# US 10,310,129 B2 · Sensor devices and methods for calculating an orientation while accounting for magnetic interference

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,310,129 B2
- Document ID: US10310129B2
- Status: Granted
- Kind: B2
- Application number: 14/674,336
- Filed: 2015-03-31
- Published: 2015-07-23
- Granted: 2019-06-04
- Earliest claimed: 2013-08-06
- Assignees: Yost Labs Inc.
- Applicants: Yost Labs Inc.
- Inventors: Stephen P. Landers; Paul W. Yost; David Rieksts
- Web page: https://patentgrep.com/patent/US10310129B2

## CPC

- G01V 3/08: operating with magnetic or electric fields produced or modified by objects or geological structures or by detecting devices (with electromagnetic waves G01V3/12)
- G01C 19/00: Gyroscopes; Turn-sensitive devices using vibrating masses; Turn-sensitive devices without moving masses; Measuring angular rate using gyroscopic effects
- G01C 21/08: involving use of the magnetic field of the earth
- G01R 33/0064: {comprising means for performing simulations, e.g. of the magnetic variable to be measured}
- G01V: GEOPHYSICS; GRAVITATIONAL MEASUREMENTS; DETECTING MASSES OR OBJECTS; TAGS (means for indicating the location of accidentally buried, e.g. snow-buried, persons A63B29/02)
- G01C: MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY (measuring liquid level G01F; radio navigation, determining distance or velocity by use of propagation effects, e.g. Doppler effects, propagation time, of radio waves, analogous arrangements using other waves G01S)
- G01R: MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES (indicating correct tuning of resonant circuits H03J3/12)

## Abstract

Sensor devices and methods for calculating an orientation of a sensor device including a magnetometer are disclosed. In one embodiment, a method of computing an orientation of a sensor device includes receiving a current magnetic field reading including at least a magnetic field magnitude, calculating a difference between the current magnetic field magnitude and a reference magnetic field magnitude, and comparing the difference between the current magnetic field magnitude and the reference magnetic field magnitude with a threshold. The method further includes adjusting a trust value of the magnetometer such that the trust value is decreased if the difference between the current magnetic field magnitude is greater than or equal to the threshold, and computing an orientation of the sensor device based at least on the trust value and the current magnetic field reading, wherein the trust value affects a reliance on the magnetic field reading in computing the orientation.

## Claims

### Claim 1

A sensor device to measure orientation comprising:
a plurality of sensing devices including a magnetometer and one or more from a group of an accelerometer and a gyroscope, wherein the magnetometer measures a magnetic field and produces a magnetic field reading including at least a magnitude of the magnetic field;
a processor, wherein the processor is communicatively coupled to the plurality of sensing devices by a communication bus, wherein each sensing device provides a signal over the communication bus to the processor representing a physical orientation of the sensor device; and
a non-transitory computer-readable memory storing instructions that, when executed by the processor, cause the processor to:
receive a current magnetometer reading including at least a current magnetic field magnitude as detected by the magnetometer;
detect a presence of the sensor device within an interfering magnetic field based on comparing a difference between the current magnetic field magnitude and a reference magnetic field magnitude
with a threshold;
adjust a trust value of the magnetometer such that the trust value is decreased in response to the sensor device being detected within the interfering magnetic field based on the difference between the current magnetic field magnitude and the reference magnetic field magnitude being greater than or equal to the threshold;
increase the trust value when: the sensor device is detected outside the interfering magnetic field based on the difference between the current magnetic field magnitude and the reference magnetic field magnitude being less than the threshold, the trust value is less than a maximum trust value, and following a waiting period beginning when the difference between the current magnetic field magnitude and the reference magnetic field magnitude was last above the threshold;
switch between the signals of the plurality of sensing devices to compute an orientation of the sensor device based at least on the trust value, wherein the trust value affects a reliance on magnetic field readings in computing the orientation of the sensor device; and
provide an output signal, wherein the output signal indicates the orientation of the sensor device.

### Claim 2 (depends on 1)

The sensor device of claim 1, wherein the waiting period is defined by:
Lignore <-αignore*Lignore,
where:
Lignore indicates a current state of the waiting period and is set to a maximum value when the difference between the current magnetic field magnitude and the reference magnetic field magnitude is greater than the threshold, and
αignore determines how quickly Lignore decays.

### Claim 3 (depends on 1)

The sensor device of claim 1, wherein the trust value is equal to zero after the trust value is decreased, and the trust value is equal to one after the trust value is increased.

### Claim 4 (depends on 1)

The sensor device of claim 1, wherein the trust value ranges from a minimum trust value to the maximum trust value.

### Claim 5 (depends on 4)

The sensor device of claim 4, wherein the trust value is increased by converging the trust value from the minimum trust value to the maximum trust value over a convergence period so long as the difference between the current magnetic field magnitude and the reference magnetic field magnitude is not greater than the threshold during the convergence period.

### Claim 6 (depends on 5)

The sensor device of claim 5, wherein the minimum trust value is equal to zero and the maximum trust value is equal to one.

### Claim 7 (depends on 1)

The sensor device of claim 1, wherein the trust value is equal to zero after the trust value is decreased, and the trust value is equal to one when the trust value is increased.

### Claim 8 (depends on 1)

The sensor device of claim 1, wherein the reference magnetic field magnitude is determined by:
mref<-αcompass*mref+(1−αcompass)*m,
where:
mref is the reference magnetic field magnitude, m is the current magnetic field magnitude, and αcompass is a predetermined value.

### Claim 9 (depends on 1)

The sensor device of claim 1, wherein a time delay exists between when the current magnetic field reading is detected by the magnetometer and when the current magnetometer reading is used to compute the orientation of the sensor device.

### Claim 10 (depends on 1)

The sensor device of claim 1, wherein the instructions further cause the processor to:
receive a plurality of magnetic field readings from the magnetometer;
store, in the non-transitory computer-readable memory, the plurality of magnetic field readings in a time delay table; and
select, as the current magnetic field reading, an oldest magnetic field reading from the plurality of magnetic field readings stored in the time delay table according to a time delay threshold.

### Claim 11 (depends on 1)

The sensor device of claim 1, wherein the orientation of the sensor device is based on one or more outputs from at least one from a group of the accelerometer and the gyroscope.

### Claim 12

A sensor device to measure orientation comprising:
a plurality of sensing devices including a magnetometer and one or more from a group of an accelerometer and a gyroscope, wherein the magnetometer measures a magnetic field and produces a magnetic field reading including at least a magnitude of the magnetic field;
a processor, wherein the processor is communicatively coupled to the plurality of sensing devices by a communication bus, wherein each sensing device provides a signal over the communication bus to the processor representing a physical orientation of the sensor device; and
a non-transitory computer-readable memory storing instructions that, when executed by the processor, cause the processor to:
receive a current magnetometer reading including at least a current magnetic field magnitude as detected by the magnetometer;
detect a presence of the sensor device within an interfering magnetic field based on comparing a difference between the current magnetic field magnitude and a reference magnetic field magnitude
with a threshold;
adjust a trust value of the magnetometer such that the trust value is decreased in response to the sensor device being detected within the interfering magnetic field based on the difference between the current magnetic field magnitude and the reference magnetic field magnitude being greater than or equal to the threshold;
increase the trust value when: the sensor device is detected outside the interfering magnetic field based on the difference between the current magnetic field magnitude and the reference magnetic field magnitude being less than the threshold, the trust value is less than a maximum trust value, and following a waiting period beginning when the difference between the current magnetic field magnitude and the reference magnetic field magnitude was last above the threshold, wherein:
the trust value ranges from a minimum trust value to the maximum trust value,
the trust value is increased by converging the trust value from the minimum trust value to the maximum trust value over a convergence period so long as the difference between the current magnetic field magnitude and the reference magnetic field magnitude is not greater than the threshold during the convergence period, and
the convergence period is defined by:
T<-Tmin+(1−I/Imax)*(Tdefault−Tmin),
where:
T is the trust value,
Tmin is the minimum trust value,
Tdefault is the maximum trust value,
Imax is a number of consecutive iterations to return the trust value to the maximum trust value, and
I is a number of iterations remaining to return the trust value to the maximum trust value;
switch between the signals of the plurality of sensing devices to compute an orientation of the sensor device based at least on the trust value, wherein the trust value affects a reliance on magnetic field readings in computing the orientation of the sensor device; and
provide an output signal, wherein the output signal indicates the orientation of the sensor device.

### Claim 13 (depends on 12)

The sensor device of claim 12, wherein I=Imax when it is determined that the difference between the current magnetic field magnitude and the reference magnetic field magnitude is greater than the threshold, and the trust value T converges toward the maximum trust value as I converges toward zero.

### Claim 14 (depends on 12)

The sensor device of claim 12, wherein the instructions further cause the processor to:
receive a plurality of magnetic field readings from the magnetometer;
store, in the non-transitory computer-readable memory, the plurality of magnetic field readings in a time delay table; and
select, as the current magnetic field reading, an oldest magnetic field reading from the plurality of magnetic field readings stored in the time delay table according to a time delay threshold.

### Claim 15 (depends on 12)

The sensor device of claim 12, wherein the orientation of the sensor device is based on one or more outputs from at least one from a group of the accelerometer and the gyroscope.

### Claim 16

A method of computing an orientation of a sensor device comprising a plurality of sensing devices and a processor communicatively coupled to the plurality of sensing devices by a communication bus, wherein the plurality of sensing devices includes a magnetometer and one or more from a group of an accelerometer and a gyroscope with each sensing device providing a signal over the communication bus to the processor representing a physical orientation of the sensor device, the method comprising:
receiving by the processor a plurality of magnetic field readings from the magnetometer, each magnetic field reading comprising at least a magnetic field magnitude;
storing by the processor, in a non-transitory computer-readable memory, the plurality of magnetic field readings in a time delay table;
selecting by the processor, as a current magnetic field reading, an oldest magnetic field reading from the plurality of magnetic field readings stored in the time delay table according to a time delay threshold;
detecting by the processor a presence of the sensor device within an interfering magnetic field based on comparing a difference between the current magnetic field magnitude and a reference magnetic field magnitude
with a threshold;
adjusting by the processor a trust value of the magnetometer such that the trust value is decreased in response to the sensor device being detected within the interfering magnetic field based on the difference between the current magnetic field magnitude and the reference magnetic field magnitude being greater than or equal to the threshold;
switching between the signals of the plurality of sensing devices for computing an orientation of the sensor device based at least on the trust value, wherein the trust value affects a reliance on magnetic field readings in computing the orientation of the sensor device; and
providing an output signal, wherein the output signal indicates the orientation of the sensor device.

### Claim 17 (depends on 16)

The method of claim 16, further comprising increasing the trust value when the difference between the current magnetic field magnitude and the reference magnetic field magnitude is less than the threshold, the trust value is less than a maximum trust value, and following a waiting period beginning when the difference between the current magnetic field magnitude and the reference magnetic field magnitude was last above the threshold.

### Claim 18 (depends on 16)

The method of claim 16, wherein a time delay exists between when the current magnetic field reading is detected by the magnetometer and when the current magnetometer reading is used to compute the orientation of the sensor device.
