# US 2015/0177020 A1 · Method and apparatus for data fusion of a three-axis magnetometer and three axis accelerometer

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

- Number: US 2015/0177020 A1
- Document ID: US20150177020A1
- Status: Published application
- Kind: A1
- Application number: 14/418,761
- Filed: 2013-08-01
- Published: 2015-06-25
- Earliest claimed: 2012-08-02
- Assignees: Memsic, Inc.
- Applicants: Memsic, Inc.
- Inventors: Dong An; Yang Zhao; Haipeng Ding; Jong-Ki Lee
- Web page: https://patentgrep.com/patent/US20150177020A1

## CPC

- G01C 17/38: Testing, calibrating, or compensating of compasses
- G01C 25/00: Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass (testing, calibrating or compensating compasses G01C17/38)
- G01P 21/00: Testing or calibrating of apparatus or devices covered by the preceding groups
- G01R 35/00: Testing or calibrating of apparatus covered by the other groups of this subclass
- G06F 18/256: {of results relating to different input data, e.g. multimodal recognition}
- G01P 15/00: Measuring acceleration; Measuring deceleration; Measuring shock, i.e. sudden change of acceleration
- 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)
- G01P: MEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT (measuring or recording blood flow A61B5/02, A61B8/06; monitoring speed or deceleration of electrically-propelled vehicles B60L3/00; vehicle lighting systems adapted to indicate speed B60Q1/54; determining position or course in navigation, measuring ground distance in geodesy or surveying G01C; combined measuring devices for measuring two or more variables of movement G01C23/00; measuring velocity of sound G01H; measuring velocity of light G01J7/00; measuring direction or velocity of solid objects by reception or emission of radiowaves or other waves and based on propagation effects, e.g. Doppler effect, propagation time, direction of propagation, G01S; measuring speed of nuclear radiation G01T; measuring acceleration of gravity G01V; {measuring or recording the speed of trains B61L23/00; speed indicators incorporated in motor vehicles B60K35/00; measuring frequency or phase G01R; traffic control G08G})
- G01R: MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES (indicating correct tuning of resonant circuits H03J3/12)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Method and apparatus of integrating a three-axis magnetometer and a three-axis accelerometer to provide attitude and heading, calibrated magnetometer and accelerometer data, and angular rate, while removing sensor error sources over time and temperature and to compensate for hard and soft iron distortions of the Earth magnetic field. Filtered accelerometer data are corrected to account for various error sources. The magnetic heading is calculated from a horizontal magnetic field vector transformed from three dimensional Earth's magnetic field vector by using quasi-static roll and pitch angles from the filtered accelerometer data. A first Kalman filter estimates the state vector, based on the principle that the magnitude of local Earth's magnetic field vector is constant, to form hard and soft iron correction matrices. A second Kalman filter estimates a correction matrix of coupled remaining soft iron and the misalignment of the magnetometer and the accelerometer, as the dot product of local Earth's magnetic field vector and a corrected gravitational acceleration vector, at a quasi-static position, is constant. The three dimensional Earth's magnetic field vector is received by removing the hard and soft irons through the soft iron and hard iron correction matrixes.

## Claims

### Claim 1

A computer-implemented method of fusing data from a three-axis magnetometer and a three-axis accelerometer to provide a magnetic heading of a device, the method comprising:
receiving magnetic field measurements from the magnetometer associated with the device;
receiving acceleration measurements from the accelerometer associated with the device;
filtering the magnetic field measurements to remove outlying data points and noise and obtaining filtered magnetic field data;
filtering the acceleration measurements to remove outlying data points and noise and obtaining filtered acceleration measurements;
correcting the filtered acceleration measurements as a function of one or more error sources and obtaining corrected acceleration measurements;
correcting the filtered magnetic field data for hard-iron and soft-iron distortions and obtaining corrected magnetic field measurements;
computing quasi-static roll and pitch angles of the device as a function of the corrected acceleration measurements;
forming a transformation matrix from a body frame to a level coordinate frame as a function of the computed quasi-static roll and pitch angles;
transforming the corrected magnetic field measurements from the body frame to the level frame and generating a horizontal magnetic field vector; and
determining a magnetic heading of the device as a function of the generated horizontal magnetic field vector.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein correcting the filtered magnetic field data for hard-iron and soft-iron distortions comprises:
applying a first Kalman filter to the filtered magnetic field data and generating first soft iron and hard iron matrices,
wherein the first Kalman filter is based on the principle that the magnitude of local Earth's magnetic field vector is constant.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, further comprising:
determining when the device is in a quasi-static condition and, if so determined, then:
applying a second Kalman filter to the filtered magnetic field data and generating a coupled soft iron/misalignment correction matrix,
wherein the second Kalman filter is based on the principle that an angle between the local Earth's magnetic field vector and the gravitational acceleration vector is constant.

### Claim 4 (depends on 3)

The computer-implemented method of claim 3, further comprising:
multiplying the coupled soft iron/misalignment correction matrix by the first soft iron matrix and generating a soft-iron correction matrix,
wherein the magnetic heading of the device is determined as a function of the generated soft-iron correction matrix.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, further comprising:
determining if a magnetic field disturbance is present.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, further comprising:
determining if the magnetic field is stable.

### Claim 7

A computer system including a storage device storing computer instructions that, when executed by a computer, implements a method of fusing data from a three-axis magnetometer and a three-axis accelerometer to provide a magnetic heading of a corresponding device, the method comprising:
receiving magnetic field measurements from the magnetometer associated with the device;
receiving acceleration measurements from the accelerometer associated with the device;
filtering the magnetic field measurements to remove outlying data points and noise and obtaining filtered magnetic field data;
filtering the acceleration measurements to remove outlying data points and noise and obtaining filtered acceleration measurements;
correcting the filtered acceleration measurements as a function of one or more error sources and obtaining corrected acceleration measurements;
correcting the filtered magnetic field data for hard-iron and soft-iron distortions and obtaining corrected magnetic field measurements;
computing quasi-static roll and pitch angles of the device as a function of the corrected acceleration measurements;
forming a transformation matrix from a body frame to a level coordinate frame as a function of the computed quasi-static roll and pitch angles;
transforming the corrected magnetic field measurements from the body frame to the level frame and generating a horizontal magnetic field vector; and
determining a magnetic heading of the device as a function of the generated horizontal magnetic field vector.

### Claim 8 (depends on 7)

The computer system of claim 7, wherein correcting the filtered magnetic field data for hard-iron and soft-iron distortions comprises:
applying a first Kalman filter to the filtered magnetic field data and generating first soft iron and hard iron matrices,
wherein the first Kalman filter is based on the principle that the magnitude of local Earth's magnetic field vector is constant.

### Claim 9 (depends on 8)

The computer system of claim 8, wherein the method further comprises:
determining when the device is in a quasi-static condition and, if so determined, then:
applying a second Kalman filter to the filtered magnetic field data and generating a coupled soft iron/misalignment correction matrix,
wherein the second Kalman filter is based on the principle that an angle between the local Earth's magnetic field vector and the gravitational acceleration vector is constant.

### Claim 10 (depends on 9)

The computer system of claim 9, wherein the method further comprises:
multiplying the coupled soft iron/misalignment correction matrix by the first soft iron matrix and generating a soft-iron correction matrix,
wherein the magnetic heading of the device is determined as a function of the generated soft-iron correction matrix.

### Claim 11 (depends on 7)

The computer system of claim 7, wherein the method further comprises:
determining if a magnetic field disturbance is present.

### Claim 12 (depends on 7)

The computer system of claim 7, wherein the method further comprises:
determining if the magnetic field is stable.
