Systems and methods for magnetometer calibration
AssigneeSTMicroelectronics International N.V.
InventorAndrea Lorenzo VITALI
Life of this patent
Estimating the term…
Abstract
In accordance with various embodiments of the present disclosure, a method for calibrating a 3-axis magnetometer is provided. In some embodiments, the method comprises receiving magnetic field data collected as a magnetometer is moved in only two dimensions in a circle or a partial circle around a fixed vertical axis of rotation, the magnetic field data collected at a plurality of locations along the circle or the partial circle; fitting a circle to the magnetic field data; determining an X coordinate and a Y coordinate of a center of the fitted circle; and providing the X coordinate and the Y coordinate of the center of the fitted circle to the magnetometer for use as, respectively, an X-axis HI offset and a Y-axis HI offset for performing HI offset compensation.
Claims20
A method for calibrating a 3-axis magnetometer, the method comprising:
- receiving magnetic field data collected as a magnetometer is moved in only two dimensions in a circle or a partial circle around a fixed vertical axis of rotation, the magnetic field data collected at a plurality of locations along the circle or the partial circle;
- if only hard iron (HI) offset compensation of the magnetometer is desired, the method comprises:
- (a) fitting a circle to the magnetic field data;
- (b) determining an X coordinate and a Y coordinate of a center of the fitted circle;
- and
- (c) providing the X coordinate and the Y coordinate of the center of the fitted circle to the magnetometer for use as, respectively, an X-axis HI offset and a Y-axis HI offset for performing HI offset compensation;
- if only HI offset compensation and soft iron (SI) scaling compensation are desired, the method comprises:
- (a) fitting an ellipse to the magnetic field data;
- (b) determining an X coordinate and a Y coordinate of a center of the fitted ellipse;
- (c) determining an X-axis scaling factor and a Y-axis scaling factor;
- (d) providing the X-axis scaling factor and the Y-axis scaling factor to the magnetometer for performing SI scaling compensation;
- (e) using the X-axis scaling factor and the Y-axis scaling factor to determine an X-axis HI offset and a Y-axis HI offset;
- and
- (f) providing the X-axis HI offset and the Y-axis HI offset to the magnetometer for performing HI offset compensation.
A method for calibrating a 3-axis magnetometer, the method comprising:
- (i) receiving magnetic field data collected as a magnetometer is moved in only two dimensions in a circle or a partial circle around a fixed, non-vertical axis of rotation, the magnetic field data collected at a plurality of locations along the circle or the partial circle;
- (ii) if only hard iron (HI) offset compensation of the magnetometer is desired, the method comprises:
- (a) fitting a plane to the magnetic field data;
- (b) de-rotating the magnetic field data to a horizontal plane;
- (c) fitting a circle to the magnetic field data de-rotated to the horizontal plane;
- (d) determining a radius of the fitted circle;
- (e) determining an X coordinate, a Y coordinate, and a Z coordinate of a center of the fitted circle;
- (f) rotating the fitted circle back to its original plane;
- (f) determining a 3-element unity vector corresponding to a normal of the original plane, the 3-element unity vector comprising a, b, and c elements;
- (g) if a magnetic field strength at a location of the magnetometer is known, determining an X-axis HI offset, a Y-axis HI offset, and a Z-axis HI offset using the 3-element unity vector corresponding to the normal of the original plane and the magnetic field strength at the location of the magnetometer;
- (h) if a magnetic field strength at a location of the magnetometer is not known, determining an X-axis HI offset, a Y-axis HI offset, and a Z-axis HI offset using the 3-element unity vector corresponding to the normal of the original plane and an estimate of the magnetic field strength at the location of the magnetometer;
- and
- (i) providing the X-axis HI offset, the Y-axis HI offset, and the Z-axis HI offset to the magnetometer for performing HI offset compensation;
- (iii) if only HI offset compensation and soft iron (SI) scaling compensation are desired, the method comprises:
- (a) fitting a plane to the magnetic field data;
- (b) de-rotating the magnetic field data to a horizontal plane;
- (c) fitting an ellipse to the magnetic field data;
- (d) determining an X coordinate and a Y coordinate of a center of the fitted ellipse;
- (e) determining a major axis radius and a minor axis radius of the fitted ellipse;
- (f) rotating the fitted ellipse back to its original plane;
- (g) determining a height, width, and depth of a bounding box around the fitted ellipse rotated back to its original plane;
- (h) determining a height, width, and depth of an ideal bounding box using the magnetic field strength at the location of the magnetometer;
- (i) determining an X-axis scaling factor, a Y-axis scaling factor, and a Z-axis scaling factor based on dividing, respectively, the height, width, and depth of the bounding box around the fitted ellipse rotated back to its original plane by the height, width, and depth of the ideal bounding box;
- (j) providing the X-axis scaling factor, the Y-axis scaling factor, and the Z-axis scaling factor to the magnetometer for performing SI scaling compensation;
- (k) using the X-axis scaling factor, the Y-axis scaling factor, and the Z-axis scaling factor to determine an X-axis HI offset, a Y-axis HI offset, and a Z-axis HI offset;
- and
- (l) providing the X-axis HI offset, the Y-axis HI offset, and the Z-axis HI offset to the magnetometer for performing HI offset compensation.
A system for calibrating a 3-axis magnetometer, the system comprising:
- a first device comprising processing circuitry configured to:
- (i) if only hard iron (HI) offset compensation of the magnetometer is desired, the processing circuitry is configured to:
- (a) fit a circle to magnetic field data collected as a magnetometer is moved in only two dimensions in a circle or a partial circle around a fixed vertical axis of rotation;
- (b) determine an X coordinate and a Y coordinate of a center of the fitted circle;
- and
- (c) provide the X coordinate and the Y coordinate of the center of the fitted circle to the magnetometer for use as, respectively, an X-axis HI offset and a Y-axis HI offset for performing HI offset compensation;
- and
- (ii) if only HI offset compensation and soft iron (SI) scaling compensation are desired, the processing circuitry is configured to:
- (a) fit an ellipse to the magnetic field data;
- (b) determine an X coordinate and a Y coordinate of a center of the fitted ellipse;
- (c) determine an X-axis scaling factor and a Y-axis scaling factor;
- (d) provide the X-axis scaling factor and the Y-axis scaling factor to the magnetometer for performing SI scaling compensation;
- (e) use the X-axis scaling factor and the Y-axis scaling factor to determine an X-axis HI offset and a Y-axis HI offset;
- and
- (f) provide the X-axis HI offset and the Y-axis HI offset to the magnetometer for performing HI offset compensation.
Dependencies are inferred from the claim text.