Magnetometer calibration method based on single-axis modulation
Through the magnetometer calibration method based on single-axis modulation, a magnetometer ellipsoid output model is established and the zero position error and sensitivity error are used to calibrate online by using sinusoidal signal characteristics, the problems of large calibration errors and dependence on high-precision equipment in the prior art are solved, and efficient and convenient magnetometer calibration is achieved.
Patent Information
- Application Number
- CN202510271399.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-08
- Publication Date
- 2025-05-02
AI Technical Summary
The fast and autonomous calibration method of the existing three-axis MEMS magnetometer has the problem of fewer data points, resulting in large calibration errors, and its dependence on high-precision non-magnetic turntables and complex operations.
The magnetometer calibration method based on single-axis modulation is adopted, and the magnetometer heading angle is corrected by establishing a magnetometer ellipsoid output model and the magnetometer's zero position error and sensitivity error are calibrated online through a single-axis servo motor using the sinusoidal signal characteristics.
It realizes that precise calibration is achieved by relying solely on the magnetometer's own output data without an external reference magnetic field, which improves the convenience and practicality of the calibration process and reduces the dependence on professional equipment and calibration costs.
Smart Images

Figure CN119916281A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of precision measurement and inertial navigation, and in particular relates to a magnetometer calibration method based on single-axis modulation. Background Art
[0002] Magnetometers are precision instruments specifically used to measure magnetic field strength and play a vital role in the navigation system of UAV platforms. Although inertial measurement units (IMUs) are widely used in autonomous navigation systems of UAVs, their inherent drift characteristics can lead to significant cumulative errors in position and attitude measurements. Long-term operation requires the use of other navigation methods to correct navigation information. Three-axis magnetometers are widely used as inertial navigation-aided systems. They can correct the heading drift of the gyroscope based on the measurement of geomagnetism, thereby ensuring the heading navigation accuracy of the carrier attitude. The measurement accuracy of the magnetometer directly determines the accuracy of the navigation system. Therefore, accurate and reliable calibration of the three-axis MEMS magnetometer is the basis for achieving high-precision geomagnetic navigation. Due to the influence of the manufacturing process and the surrounding environment, the magnetometer will inevitably have errors such as zero position and sensitivity during use, which requires accurate calibration before use.
[0003] However, in the application of fast and autonomous calibration of three-axis MEMS magnetometers, the existing calibration methods have the following problems: (1) Some calibration methods rely on fewer data points and are prone to large calibration errors when there is a lot of random noise. For example, a method is used to fix a magnetometer in a cube and solve the error coefficient of the magnetometer by placing it in 12 different orientations. (2) Use a high-precision non-magnetic turntable to determine the direction, and use a higher-precision magnetometer to obtain magnetic field data. Determine the error coefficient through experiments. Although the correction accuracy is high, the equipment requirements are high and the operation process is complicated.
[0004] To address these problems, in the absence of a non-magnetic turntable, how to use a single-axis servo motor to achieve accurate calibration of the three-axis zero bias and sensitivity of the magnetic sensor has become the key to obtaining reliable heading angle attitude. Summary of the invention
[0005] In view of the deficiencies in the prior art, an object of the present invention is to provide a magnetometer calibration method based on uniaxial modulation to solve or improve the defects in the prior art.
[0006] To achieve the above object, the present invention adopts the following technical solution: A magnetometer calibration method based on uniaxial modulation comprises the following steps: S1. Establish the magnetometer ellipsoid output model and its parameter equations to obtain the relationship between the magnetic field measurement values of the three axes of the magnetometer and the zero error and sensitivity error; S2, using the sinusoidal signal characteristics, calibrate the zero position error of the x-axis and y-axis of the magnetometer online through a single-axis servo motor; S3, using the sinusoidal signal characteristics, calibrate the sensitivity errors of the x-axis and y-axis of the magnetometer online through a single-axis servo motor; S4. Based on the zero position error calibrated in step S2 and the sensitivity error calibrated in step 3, the heading angle of the magnetometer is corrected.
[0007] Preferably, in step S1, the specific method of establishing the magnetometer ellipsoid output model and its parameter equations, and obtaining the relationship between the magnetic field measurement values of the three axes of the magnetometer and the zero error and sensitivity error is: The magnetometer output is modeled as an ellipsoid equation as follows: Among them, m x (i) m y (i) m z (i) represents the magnetic field measurement value of the magnetometer along the x, y, and z axes, and i represents the magnetic field component value measured by the magnetometer at the i-th time point; It represents the bias value of the magnetometer when there is no external magnetic field. Its physical meaning represents the zero position error of the x, y, and z axes of the magnetometer. a, b, and c are the semi-axis lengths of the ellipsoid, respectively. Its physical meaning represents the sensitivity error of the x, y, and z axes of the magnetometer. Since any point on the ellipsoid is obtained by two rotations, the magnetic field measurement value m of the magnetometer is x (i) m y (i) m z (i) Obtained by the following parametric equation: Among them, α is the angle between the geomagnetic vector and the horizontal plane, -90°≤α≤90°; β is the angle between the projection of the geomagnetic vector on the horizontal plane and the geographic north y-axis, 0≤β≤2π.
[0008] Preferably, in step S2, the specific method of calibrating the zero position errors of the x-axis and y-axis of the magnetometer online by using the sinusoidal signal characteristics through a single-axis servo motor is: Trigonometric functions are periodic, and their results are zero when integrated over integer periods, that is: Since data signals are generally discrete, the above formula can be simplified to: Where n is a data point within a cycle; According to the property that the integral of trigonometric function is 0 within the period, the measurement data of x and y axes are integrated with integer periods. Since the function is an odd function plus a constant, the integral of the odd function with integer periods is 0, and the integral of the remaining part with respect to the constant is exactly the zero bias error of the magnetometer. The Z axis rotates within an integer period, and the integral of the x and y axis data is expressed as: Where T represents the rotation period, the integer n is used to index a specific time point within the rotation period T, and N represents the total number of rotation periods completed by the magnetometer; Since the magnetic heading is only related to the horizontal two-axis output of the magnetometer, it is only necessary to compensate for the zero bias of the horizontal two-axis of the magnetometer. The zero position error of the x-axis and y-axis is expressed as: The zero position error of the x-axis and y-axis of the magnetometer is compensated online by a single-axis servo motor.
[0009] Preferably, in step S3, the specific method of calibrating the sensitivity errors of the x-axis and y-axis of the magnetometer online by using the sinusoidal signal characteristics through a single-axis servo motor is: The integral of a trigonometric function within a half period is a constant, so the integral of the absolute value form of the trigonometric function within the period is constructed as follows: Since data signals are generally discrete, the above formula can be simplified to: Assuming that the measured values of the magnetometer on the x-axis and y-axis are independent of each other, and the measurement error of each axis is described by its own sensitivity, the integral of the magnetic components on the x-axis and y-axis within a fixed period is constructed as follows: Where T represents the rotation period, the integer n is used to index the specific time point within the rotation period T, N represents the total number of rotation periods completed by the magnetometer, and a and b are the sensitivity errors of the magnetometer's x-axis and y-axis, respectively; By solving the above formula, the sensitivity errors of the magnetometer x-axis and y-axis are obtained as follows: The sensitivity errors of the x-axis and y-axis of the magnetometer are compensated by a single-axis servo motor.
[0010] Preferably, in step S4, based on the zero position error calibrated in step S2 and the sensitivity error calibrated in step 3, the specific method for correcting the heading angle of the magnetometer is: Magnetic heading ψ m It is the angle between the direction of the compass pointing to the magnetic north pole and the geographic north, expressed as: Among them, m x '、m y 'Represents the magnetic field component values of the geomagnetic vector in the x and y axes; The projection of the magnetometer processed by steps S1, S2, and S3 on the horizontal axis represents an elliptical model. The magnetic heading is corrected to: Since there is a magnetic declination angle Δρ between the geographic North Pole and the magnetic North Pole, the true heading angle hx of the carrier is expressed as: The magnetic declination Δρ is obtained by looking up the table based on the local geographic coordinate system.
[0011] Compared with the prior art, the present invention has the following beneficial effects: By establishing a magnetometer ellipsoid output model and its parameter equations through step S1, the relationship between the magnetic field measurement values of the three axes of the magnetometer and the zero position error and the sensitivity error can be obtained; by using the sinusoidal signal characteristics, the zero position error and the sensitivity error of the two horizontal axes related to the heading of the magnetometer are calculated through steps S2 and S3, and the zero bias of the two horizontal axes of the magnetometer is compensated online through a single-axis servo motor; by correcting the magnetic heading of the magnetometer through step S4, accurate calibration is achieved without the need for an external reference magnetic field, relying only on the output data of the magnetometer itself, thereby improving the convenience and practicality of the calibration process; without the need for an expensive high-precision turntable or external reference conditions, the self-calibration of the magnetometer can be achieved through only a single-axis servo motor, thereby reducing the dependence on professional equipment and the calibration cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on the drawings in the following description without paying any creative work.
[0013] Figure 1 The figure is a flow chart of a magnetometer calibration method based on single-axis modulation according to an embodiment of the present invention.
[0014] Figure 2 The present invention provides a technical roadmap for a magnetometer calibration method based on single-axis modulation according to an embodiment of the present invention. DETAILED DESCRIPTION
[0015] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In order to make the above-mentioned features and advantages of the present invention more obvious and easy to understand, the following embodiments are specifically cited and described in detail with the drawings.
[0016] like Figure 1 and Figure 2 As shown, an embodiment of the present invention provides a magnetometer calibration method based on single-axis modulation, comprising the following steps: S1. Establish the magnetometer ellipsoid output model and its parameter equations to obtain the relationship between the magnetic field measurement values of the three axes of the magnetometer and the zero error and sensitivity error; S2, using the sinusoidal signal characteristics, calibrate the zero position error of the x-axis and y-axis of the magnetometer online through a single-axis servo motor; S3, using the sinusoidal signal characteristics, calibrate the sensitivity errors of the x-axis and y-axis of the magnetometer online through a single-axis servo motor; S4. Based on the zero position error calibrated in step S2 and the sensitivity error calibrated in step 3, the heading angle of the magnetometer is corrected.
[0017] In this embodiment, in step S1, the specific method of establishing the magnetometer ellipsoid output model and its parameter equations, and obtaining the relationship between the magnetic field measurement values of the three axes of the magnetometer and the zero error and sensitivity error is: The magnetometer output is modeled as an ellipsoid equation as follows: Among them, m x (i) m y (i) m z (i) represents the magnetic field measurement value of the magnetometer along the x, y, and z axes, and i represents the magnetic field component value measured by the magnetometer at the i-th time point; It represents the bias value of the magnetometer when there is no external magnetic field. Its physical meaning represents the zero position error of the x, y, and z axes of the magnetometer. a, b, and c are the semi-axis lengths of the ellipsoid, respectively. Its physical meaning represents the sensitivity error of the x, y, and z axes of the magnetometer. Since any point on the ellipsoid is obtained by two rotations, the magnetic field measurement value m of the magnetometer is x (i) m y (i) m z (i) Obtained by the following parametric equation: Among them, α is the angle between the geomagnetic vector and the horizontal plane, -90°≤α≤90°; β is the angle between the projection of the geomagnetic vector on the horizontal plane and the geographic north y-axis, 0≤β≤2π.
[0018] In this embodiment, in step S2, the specific method of calibrating the zero position errors of the x-axis and y-axis of the magnetometer online by using the sinusoidal signal characteristics through a single-axis servo motor is: Trigonometric functions are periodic, and their results are zero when integrated over integer periods, that is: Since data signals are generally discrete, the above formula can be simplified to: Where n is a data point within a cycle; According to the property that the integral of trigonometric function is 0 within the period, the measurement data of x and y axes are integrated with integer periods. Since the function is an odd function plus a constant, the integral of the odd function with integer periods is 0, and the integral of the remaining part with respect to the constant is exactly the zero bias error of the magnetometer. The Z axis rotates within an integer period, and the integral of the x and y axis data is expressed as: Where T represents the rotation period, the integer n is used to index a specific time point within the rotation period T, and N represents the total number of rotation periods completed by the magnetometer; Since the magnetic heading is only related to the horizontal two-axis output of the magnetometer, it is only necessary to compensate for the zero bias of the horizontal two-axis of the magnetometer. The zero position error of the x-axis and y-axis is expressed as: The zero position error of the x-axis and y-axis of the magnetometer is compensated online by a single-axis servo motor.
[0019] In this embodiment, in step S3, the specific method of calibrating the sensitivity errors of the x-axis and y-axis of the magnetometer online by using the sinusoidal signal characteristics through a single-axis servo motor is: The integral of a trigonometric function within a half period is a constant, so the integral of the absolute value form of the trigonometric function within the period is constructed as follows: Since data signals are generally discrete, the above formula can be simplified to: The sensitivity error needs to be determined by obtaining the bilateral extreme values of a single axis of the magnetometer. Since the absolute value of the trigonometric function is symmetrical within a period, this symmetry can help quantify the sensitivity change of the magnetometer in different directions. Therefore, accurate calculation can be achieved during the modulation process. Assuming that the measured values of the magnetometer on the x-axis and y-axis are independent of each other, and the measurement error of each axis is described by its own sensitivity, the integral of the magnetic components on the x-axis and y-axis within a fixed period is constructed as follows: Where T represents the rotation period, the integer n is used to index the specific time point within the rotation period T, N represents the total number of rotation periods completed by the magnetometer, and a and b are the sensitivity errors of the magnetometer's x-axis and y-axis, respectively; By solving the above formula, the sensitivity errors of the magnetometer x-axis and y-axis are obtained as follows: The sensitivity errors of the x-axis and y-axis of the magnetometer are compensated by a single-axis servo motor.
[0020] In this embodiment, in step S4, based on the zero position error calibrated in step S2 and the sensitivity error calibrated in step 3, the specific method for correcting the heading angle of the magnetometer is: Magnetic heading ψ m It is the angle between the direction of the compass pointing to the magnetic north pole and the geographic north, expressed as: Among them, m x '、m y 'Represents the magnetic field component values of the geomagnetic vector in the x and y axes; The projection of the magnetometer processed by steps S1, S2, and S3 on the horizontal axis represents an elliptical model. The magnetic heading is corrected to: Since there is a magnetic declination angle Δρ between the geographic North Pole and the magnetic North Pole, the true heading angle hx of the carrier is expressed as: The magnetic declination Δρ is obtained by looking up the table based on the local geographic coordinate system.
[0021] This embodiment first establishes an ellipsoid model with zero position error and sensitivity error according to the actual output of the magnetometer. According to the property that the trigonometric function integrates to 0 within a period, the single axis of the magnetometer is rotated by an integer multiple of the period with a sine or cosine waveform, and the single axis zero bias can be obtained by integrating and averaging the data. Since the absolute value of the trigonometric function is symmetrical within a period, this symmetry can help quantify the sensitivity change of the magnetometer in different directions. In this way, the sensitivity error can be obtained by rotating the single axis of the magnetometer by an integer multiple of the period with a sine or cosine waveform. The magnetic heading is only related to the magnetometer output of the horizontal two axes, so it is only necessary to compensate for the zero bias of the horizontal two axes magnetometer. Finally, the heading angle is obtained according to the parameters obtained above, so that the calibration can be completed by relying only on the output of the magnetometer itself without an external reference magnetic field.
[0022] This embodiment has the following advantages: (1) The present invention utilizes the characteristics of a sinusoidal signal and removes the periodic error by integrating within a fixed period, thereby achieving accurate calibration without the need for an external reference magnetic field and relying solely on the output data of the magnetometer itself, thereby improving the convenience and practicality of the calibration process and providing more accurate navigation support for the UAV platform; (2) The present invention does not require an expensive high-precision turntable or external reference conditions, and can achieve self-calibration of the magnetometer using only a single-axis servo motor, thereby reducing dependence on specialized equipment and reducing calibration costs.
[0023] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A magnetometer calibration method based on uniaxial modulation, characterized in that: The steps include: S1. Establish the magnetometer ellipsoid output model and its parameter equations to obtain the relationship between the magnetic field measurement values of the three axes of the magnetometer and the zero error and sensitivity error; S2, using the sinusoidal signal characteristics, calibrate the zero position error of the x-axis and y-axis of the magnetometer online through a single-axis servo motor; S3, using the sinusoidal signal characteristics, calibrate the sensitivity errors of the x-axis and y-axis of the magnetometer online through a single-axis servo motor; S4. Based on the zero position error calibrated in step S2 and the sensitivity error calibrated in step 3, the heading angle of the magnetometer is corrected.
2. The magnetometer calibration method based on uniaxial modulation according to claim 1, characterized in that: In step S1, the magnetometer ellipsoid output model and its parameter equations are established, and the specific method for obtaining the relationship between the magnetic field measurement values of the three axes of the magnetometer and the zero error and sensitivity error is: The magnetometer output is modeled as an ellipsoid equation as follows: Among them, m x (i) m y (i) m z (i) represents the magnetic field measurement value of the magnetometer along the x, y, and z axes, and i represents the magnetic field component value measured by the magnetometer at the i-th time point; It represents the bias value of the magnetometer when there is no external magnetic field. Its physical meaning represents the zero position error of the x, y, and z axes of the magnetometer. a, b, and c are the semi-axis lengths of the ellipsoid, respectively. Its physical meaning represents the sensitivity error of the x, y, and z axes of the magnetometer. Since any point on the ellipsoid is obtained by two rotations, the magnetic field measurement value m of the magnetometer is x (i) m y (i) m z (i) Obtained by the following parametric equation: Among them, α is the angle between the geomagnetic vector and the horizontal plane, -90°≤α≤90°; β is the angle between the projection of the geomagnetic vector on the horizontal plane and the geographic north y-axis, 0≤β≤2π.
3. The magnetometer calibration method based on uniaxial modulation according to claim 2, characterized in that: In step S2, the specific method of calibrating the zero position error of the x-axis and y-axis of the magnetometer online by using the sinusoidal signal characteristics through a single-axis servo motor is as follows: Trigonometric functions are periodic, and their results are zero when integrated over integer periods, that is: Since data signals are generally discrete, the above formula can be simplified to: Where n is a data point within a cycle; According to the property that the integral of trigonometric function is 0 within the period, the measurement data of x and y axes are integrated with integer periods. Since the function is an odd function plus a constant, the integral of the odd function with integer periods is 0, and the integral of the remaining part with respect to the constant is exactly the zero bias error of the magnetometer. The Z axis rotates within an integer period, and the integral of the x and y axis data is expressed as: Where T represents the rotation period, the integer n is used to index a specific time point within the rotation period T, and N represents the total number of rotation periods completed by the magnetometer; Since the magnetic heading is only related to the horizontal two-axis output of the magnetometer, it is only necessary to compensate for the zero bias of the horizontal two-axis of the magnetometer. The zero position error of the x-axis and y-axis is expressed as: The zero position error of the x-axis and y-axis of the magnetometer is compensated online by a single-axis servo motor.
4. The magnetometer calibration method based on uniaxial modulation according to claim 3 is characterized in that: In step S3, the specific method of calibrating the sensitivity errors of the x-axis and y-axis of the magnetometer online by using the sinusoidal signal characteristics through a single-axis servo motor is as follows: The integral of a trigonometric function within a half period is a constant, so the integral of the absolute value form of the trigonometric function within the period is constructed as follows: Since data signals are generally discrete, the above formula can be simplified to: Assuming that the measured values of the magnetometer on the x-axis and y-axis are independent of each other, and the measurement error of each axis is described by its own sensitivity, the integral of the magnetic components on the x-axis and y-axis within a fixed period is constructed as follows: Where T represents the rotation period, the integer n is used to index the specific time point within the rotation period T, N represents the total number of rotation periods completed by the magnetometer, and a and b are the sensitivity errors of the magnetometer's x-axis and y-axis, respectively; By solving the above formula, the sensitivity errors of the magnetometer x-axis and y-axis are obtained as follows: The sensitivity errors of the magnetometer's x-axis and y-axis are compensated by a single-axis servo motor.
5. The magnetometer calibration method based on uniaxial modulation according to claim 4, characterized in that: In step S4, based on the zero position error calibrated in step S2 and the sensitivity error calibrated in step 3, the specific method for correcting the heading angle of the magnetometer is: magnetic heading ψ m It is the angle between the direction of the compass pointing to the magnetic north pole and the geographic north, expressed as: Among them, m x '、m y 'Represents the magnetic field component values of the geomagnetic vector in the x and y axes; The projection of the magnetometer processed by steps S1, S2, and S3 on the horizontal axis represents an elliptical model. The magnetic heading is corrected to: Since there is a magnetic declination angle Δρ between the geographic North Pole and the magnetic North Pole, the true heading angle hx of the carrier is expressed as: The magnetic declination Δρ is obtained by looking up the table based on the local geographic coordinate system.