Testing method and system of three-axis magnetic sensor

By applying a constant magnetic field in the three-axis Helmholtz coil and performing iterative calculations, the accuracy problem caused by angular errors in the calibration of the three-axis magnetic sensor is solved, and high-precision sensitivity detection and calibration are achieved.

CN112596015BActive Publication Date: 2024-09-17QST CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011585970.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-28
Publication Date
2024-09-17
Estimated Expiration
2040-12-28

AI Technical Summary

Technical Problem

Existing three-axis magnetic sensors have angular errors during calibration and calibration, resulting in low accuracy. Especially as the size of the chip decreases, the impact of the error becomes larger and larger, making it difficult to correctly obtain the chip's own sensitivity and cross-axis sensitivity.

Method used

Design a three-axis magnetic sensor testing method by placing the magnetic sensor under test into a three-axis Helmholtz coil, applying constant magnetic fields on the X-axis, Y-axis, and Z-axis separately, recording the output, and obtaining the setting through iterative calculations. Set the parameter value and perform angle compensation to improve detection accuracy. Specific steps include establishing multivariate nonlinear equations, accurately solving them using Newton's iteration method and chip characteristics, calculating the sensitivity and cross-axis coefficients of the XYZ axis, and correcting the output to improve calibration accuracy.

Benefits of technology

It achieves the acquisition of the chip's own sensitivity and cross-axis sensitivity, improves the detection accuracy and detection sensitivity of the three-axis magnetic sensor, and provides more accurate calibration results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112596015B
    Figure CN112596015B
Patent Text Reader

Abstract

The present invention discloses a testing method and system for a three-axis magnetic sensor, the testing method comprising: placing the three-axis magnetic sensor to be tested in a three-axis Helmholtz coil; applying constant magnetic fields of the X-axis, Y-axis, and Z-axis separately, and recording the outputs of the three axes of the X-axis, Y-axis, and Z-axis under each axis magnetic field; obtaining the value of a set parameter through iterative calculation; judging the calculation result, and stopping the calculation when it reaches or is less than the set accuracy, otherwise continuing the iteration; using the calculation result, performing angle compensation on the three-axis sensor, outputting scanning curves under different magnetic fields, and obtaining the test results. The testing method and system for the three-axis magnetic sensor proposed by the present invention can obtain the chip's own sensitivity and cross-axis sensitivity, and improve the detection accuracy and detection sensitivity of the three-axis magnetic sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of magnetic sensor testing, and relates to a testing system, and in particular to a testing method and system for a three-axis magnetic sensor. Background Art

[0002] Three-axis magnetic sensors are widely used, and their main application is the electronic compass in mobile phones, which requires an accuracy of less than 1 degree. However, the calibration and calibration of the three-axis magnetic sensor itself is an important factor affecting its accuracy. As the chip size becomes smaller and smaller, it is easy for the chip to produce an angle error with the external magnetic field direction when placed in the slot.

[0003] The above-mentioned angle error becomes larger and larger as the chip size decreases. This angle error has a great influence on the correlation verification of the magnetic sensor, and the chip's own sensitivity and cross-axis sensitivity cannot be correctly obtained.

[0004] In view of this, there is an urgent need to design a three-axis magnetic sensor testing method to overcome at least part of the above-mentioned defects of the existing three-axis magnetic sensors. Summary of the invention

[0005] The present invention provides a testing method and system for a three-axis magnetic sensor, which can obtain the intrinsic sensitivity and cross-axis sensitivity of a chip, and improve the detection accuracy and detection sensitivity of the three-axis magnetic sensor.

[0006] To solve the above technical problem, according to one aspect of the present invention, the following technical solution is adopted:

[0007] A testing method for a three-axis magnetic sensor, the testing method comprising:

[0008] The three-axis magnetic sensor to be tested is placed in the three-axis coil;

[0009] Apply constant magnetic fields to the X-axis, Y-axis, and Z-axis separately, and record the outputs of the three axes under each axis magnetic field;

[0010] The value of the set parameter is obtained through iterative calculation; the calculation result is judged, and when it reaches or is less than the set accuracy, the calculation is stopped, otherwise the iteration is continued;

[0011] Using the calculated results, the three-axis sensor is angle compensated, and the scanning curves under different magnetic fields are output to obtain the test results.

[0012] As an implementation mode of the present invention, a multivariate nonlinear equation is established using a three-axis sensor and the input and output of a measurement system, and is accurately solved by Newton's iteration method and actual chip characteristics to obtain a test result.

[0013] As an embodiment of the present invention, the three-axis coil is a three-axis Helmholtz coil; the three-axis magnetic sensor to be measured is placed in the three-axis Helmholtz coil, the coordinates of the two are consistent, and due to the placement error, the three axes of the sensor and the three axes of the coil form a set angle.

[0014] As an implementation mode of the present invention, in the step of calculating each parameter value, the parameters obtained by iterative calculation include the sensitivity of the three axes XYZ, the important cross-axis coefficient, and the angles between the three axes XYZ and the three axes of the coil.

[0015] As an implementation of the present invention, it is assumed that the magnetic field generator of the three-axis coil has been calibrated, the axis-to-axis error itself is negligible, the magnetic field is accurate, and the constant magnetic field is Mx, My, Mz, which are known quantities;

[0016] Assume that the sensitivity of the three-axis magnetic sensor is Gx, Gy, Gz; the key cross-axis coefficients of the three-axis magnetic sensor, Kx, Ky are unknown quantities; ignore other cross-axis coefficients;

[0017] The coordinate system M of the three-axis coil and the coordinate system H of the three-axis magnetic sensor are assumed to have an angle between the two coordinate systems. In the XY plane, the angle between the X-axis of the three-axis magnetic sensor chip and the magnetic field Mx is Rzx, and the angle between the Y-axis of the chip and the magnetic field My is Rzy; in the XZ or YZ plane, the angle between the Z-axis of the chip and the magnetic field Mz, rotating around the X-axis is Rx, and the angle between the Z-axis of the chip and the magnetic field Mz, rotating around the Y-axis is Ry, and the four angles are unknown.

[0018] Assume that the outputs of the three axes under a constant XYZ magnetic field are 9 known quantities: XiXo, XiYo, XiZo, YiXo, YiYo, YiZo, ZiXo, ZiYo, ZiZo;

[0019] According to the coordinate system transformation principle, there are the following formulas, of which there are 9 unknown parameters, namely Gx, Gy, Gz, Kx, Ky, Rzx, Rzy, Rx, Ry, and the rest are known quantities:

[0020]

[0021] As an implementation mode of the present invention, after the above matrix operation, there are the following 9 equations:

[0022]

[0023]

[0024]

[0025] The iterative calculation method includes the following steps:

[0026] (1) Given the initial values ​​Rx0, Ry0, Rzx0, Rzy0, Kx0, Ky0, Gx0, Gy0, Gz0 as the basic values ​​for error judgment;

[0027] (2) Iterative calculation method, assuming a total of i iterations;

[0028] In the first iteration, assume that Rx, Ry, Rzx, Rzy, Kx, Ky are 0, and calculate Gx, Gy, Gz in turn according to the above equations 11, 22, and 33.

[0029]

[0030] In the second iteration, based on the known parameters Mx, My, Mz and Gx, Gy, Gz calculated in the first iteration, Ry is calculated according to equation 31, and Rzx is calculated according to equation 21; Rx is calculated according to equation 32, and Rzy is calculated according to equation 12. Here, asin is used to improve the calculation accuracy.

[0031]

[0032] Continue with the i-th iteration and continue iterative calculation based on all parameters and formulas known in the i-1-th iteration.

[0033] (3) Determine whether the calculation result reaches the required accuracy after i iterations. After each iteration, increase the calculation of d.

[0034]

[0035] Here, the closer d is to 0, the higher the accuracy of the calculation result, thereby obtaining the sensitivity Gx, Gy, Gz of the three-axis magnetic sensor device itself, the cross-axis sensitivity Kx, Ky, and the angle Rx, Ry, Rzx, Rzy between the chip and the coil when placed;

[0036] (4) The output of the three-axis magnetic sensor is compensated and corrected. The corrected Xout, Yout, Zout formulas are as follows:

[0037]

[0038] That is, the output of the device's own sensitivity under the action of a single X / Y / Z magnetic field. This data provides correct cross-validation results for mass production testing, thereby improving the overall calibration accuracy of mass production.

[0039] According to another aspect of the present invention, the following technical solution is adopted: a testing system for a three-axis magnetic sensor, the testing system comprising:

[0040] A magnetic field application module is used to apply constant magnetic fields of the X-axis, Y-axis and Z-axis separately when the three-axis magnetic sensor to be tested is placed in the three-axis coil, and record the outputs of the three axes of the X-axis, Y-axis and Z-axis under each axis magnetic field;

[0041] The parameter value calculation module is used to obtain the value of the set parameter through iterative calculation; the calculation result is judged, and when it reaches or is less than the set accuracy, the calculation is stopped, otherwise the iteration is continued;

[0042] The angle compensation module is used to use the result calculated by the parameter value calculation module to perform angle compensation on the three-axis sensor, output scanning curves under different magnetic fields, and obtain test results.

[0043] As an embodiment of the present invention, the three-axis coil is a three-axis Helmholtz coil; the magnetic field application module is used to place the three-axis magnetic sensor to be measured into the three-axis Helmholtz coil, and the coordinates of the two are consistent. Due to the placement error, the three axes of the sensor and the three axes of the coil form a set angle.

[0044] As an implementation mode of the present invention, the parameters obtained by the parameter value calculation module through iterative calculation include the sensitivity of the three axes XYZ, the important cross-axis coefficient, and the angles between the three axes XYZ and the three axes of the coil.

[0045] As an implementation manner of the present invention, the iterative process of the parameter value calculation module includes:

[0046] Assume that the magnetic field generator of the three-axis coil has been calibrated, the axis-to-axis error is negligible, the magnetic field is accurate, and the constant magnetic field is Mx, My, Mz, which are known quantities;

[0047] Assume that the sensitivity of the three-axis magnetic sensor is Gx, Gy, Gz; the key cross-axis coefficients of the three-axis magnetic sensor, Kx, Ky are unknown quantities; ignore other cross-axis coefficients;

[0048] The coordinate system M of the three-axis coil and the coordinate system H of the three-axis magnetic sensor are assumed to have an angle between the two coordinate systems. In the XY plane, the angle between the X-axis of the three-axis magnetic sensor chip and the magnetic field Mx is Rzx, and the angle between the Y-axis of the chip and the magnetic field My is Rzy; in the XZ or YZ plane, the angle between the Z-axis of the chip and the magnetic field Mz, rotating around the X-axis is Rx, and the angle between the Z-axis of the chip and the magnetic field Mz, rotating around the Y-axis is Ry, and the four angles are unknown.

[0049] Assume that the outputs of the three axes under a constant XYZ magnetic field are 9 known quantities: XiXo, XiYo, XiZo, YiXo, YiYo, YiZo, ZiXo, ZiYo, ZiZo;

[0050] According to the coordinate system transformation principle, there are the following formulas, of which there are 9 unknown parameters, namely Gx, Gy, Gz, Kx, Ky, Rzx, Rzy, Rx, Ry, and the rest are known quantities:

[0051]

[0052] After the above matrix operations, there are 9 equations as follows:

[0053]

[0054]

[0055]

[0056] The iterative calculation method includes the following steps:

[0057] (1) Given the initial values ​​Rx0, Ry0, Rzx0, Rzy0, Kx0, Ky0, Gx0, Gy0, Gz0 as the basic values ​​for error judgment;

[0058] (2) Iterative calculation method, assuming a total of i iterations;

[0059] In the first iteration, assume that Rx, Ry, Rzx, Rzy, Kx, Ky are 0, and calculate Gx, Gy, Gz in turn according to the above equations 11, 22, and 33;

[0060]

[0061] In the second iteration, based on the known parameters Mx, My, Mz and Gx, Gy, Gz calculated in the first iteration, Ry is calculated according to equation 31, and Rzx is calculated according to equation 21; Rx is calculated according to equation 32, and Rzy is calculated according to equation 12. Here, asin is used to improve the calculation accuracy;

[0062]

[0063] Continue with the i-th iteration and continue iterative calculation based on all parameters and formulas known in the i-1-th iteration.

[0064] (3) Determine whether the calculation result reaches the required accuracy after i iterations. After each iteration, increase the calculation of d.

[0065]

[0066] Here, the closer d is to 0, the higher the accuracy of the calculation result, thereby obtaining the sensitivity Gx, Gy, Gz of the three-axis magnetic sensor device itself, the cross-axis sensitivity Kx, Ky, and the angle Rx, Ry, Rzx, Rzy between the chip and the coil when placed;

[0067] (4) The output of the three-axis magnetic sensor is compensated and corrected. The corrected Xout, Yout, Zout formulas are as follows:

[0068]

[0069] That is, the output of the device's own sensitivity under the action of a single X / Y / Z magnetic field. This data provides correct cross-validation results for mass production testing, thereby improving the overall calibration accuracy of mass production.

[0070] The beneficial effect of the present invention is that the testing method and system of the three-axis magnetic sensor proposed in the present invention can obtain the chip's own sensitivity and cross-axis sensitivity, thereby improving the detection accuracy and detection sensitivity of the three-axis magnetic sensor. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 The figure is a flow chart of a method for testing a three-axis magnetic sensor in one embodiment of the present invention.

[0072] Figure 2 FIG. 1 is a schematic diagram of the composition of a testing system for a three-axis magnetic sensor in an embodiment of the present invention. DETAILED DESCRIPTION

[0073] The preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0074] In order to further understand the present invention, preferred embodiments of the present invention are described below in conjunction with examples. However, it should be understood that these descriptions are only for further illustrating the features and advantages of the present invention, rather than limiting the claims of the present invention.

[0075] The description in this section is only for several typical embodiments, and the present invention is not limited to the scope of the embodiments. The same or similar prior art means and some technical features in the embodiments are mutually replaced within the scope of the present invention.

[0076] The description of the steps in each embodiment in the specification is only for the convenience of explanation, and the implementation of the present application is not limited by the order of the steps. The "connection" in the specification includes both direct connection and indirect connection.

[0077] The present invention discloses a method for testing a three-axis magnetic sensor. Figure 1 is a flow chart of a method for testing a three-axis magnetic sensor in one embodiment of the present invention; please refer to Figure 1, the test method comprises:

[0078] [Step S1] Place the three-axis magnetic sensor to be tested into a three-axis coil; in one embodiment, the three-axis coil is a three-axis Helmholtz coil. The three-axis Helmholtz coil is a device used to create a uniform magnetic field in a small area. It has an open nature and is easy to place or remove the chip; other three-axis coils with similar functions can also be used.

[0079] [Step S2] Apply constant magnetic fields on the X-axis, Y-axis, and Z-axis separately, and record the outputs of the three axes under each axis magnetic field;

[0080] [Step S3] Obtain the value of the set parameter through iterative calculation; judge the calculation result, and stop the calculation when it reaches or is less than the set accuracy, otherwise continue the iteration;

[0081] [Step S4] Using the calculation results, the three-axis sensor is angle compensated, and scanning curves under different magnetic fields are output to obtain test results.

[0082] In one embodiment, a multivariate nonlinear equation is established using the input and output of the three-axis sensor and the measurement system, and an accurate solution is obtained through the Newton iteration method and the actual characteristics of the chip to obtain the test results and improve the measurement accuracy. The purpose of iteration is to converge, so the solution can converge quickly by using the Newton iteration method and combining the characteristics of the actual chip, and obtain accurate results with a smaller number of iterations.

[0083] In one embodiment of the present invention, the three-axis magnetic sensor to be measured is placed in a three-axis Helmholtz coil, and the coordinates of the two are consistent. Due to placement errors, the three axes of the sensor and the three axes of the coil form a set angle.

[0084] In one embodiment of the present invention, in the step of calculating each parameter value, the parameters obtained by iterative calculation include the sensitivity of the three axes XYZ, the important cross-axis coefficient, and the angles between the three axes XYZ and the three axes of the coil.

[0085] In one embodiment of the present invention, it is assumed that the magnetic field generator of the three-axis coil has been calibrated, the axis-to-axis error itself is negligible, the magnetic field is accurate, and the constant magnetic field is Mx, My, Mz, which are known quantities;

[0086] Assume that the sensitivity of the three-axis magnetic sensor is Gx, Gy, Gz; the key cross-axis coefficients of the three-axis magnetic sensor, Kx, Ky are unknown quantities; ignore other cross-axis coefficients;

[0087] The coordinate system M of the three-axis coil and the coordinate system H of the three-axis magnetic sensor are assumed to have an angle between the two coordinate systems. In the XY plane, the angle between the X-axis of the three-axis magnetic sensor chip and the magnetic field Mx is Rzx, and the angle between the Y-axis of the chip and the magnetic field My is Rzy; in the XZ or YZ plane, the angle between the Z-axis of the chip and the magnetic field Mz, rotating around the X-axis is Rx, and the angle between the Z-axis of the chip and the magnetic field Mz, rotating around the Y-axis is Ry, and the four angles are unknown.

[0088] Assume that the outputs of the three axes under a constant XYZ magnetic field are 9 known quantities: XiXo, XiYo, XiZo, YiXo, YiYo, YiZo, ZiXo, ZiYo, ZiZo;

[0089] According to the coordinate system transformation principle, there are the following formulas, of which there are 9 unknown parameters, namely Gx, Gy, Gz, Kx, Ky, Rzx, Rzy, Rx, Ry, and the rest are known quantities:

[0090]

[0091] In one embodiment, after the above matrix operations, there are 9 equations as follows:

[0092]

[0093]

[0094]

[0095] The iterative calculation method includes the following steps:

[0096] (1) Given the initial values ​​Rx0, Ry0, Rzx0, Rzy0, Kx0, Ky0, Gx0, Gy0, Gz0 as the basic values ​​for error judgment;

[0097] (2) Iterative calculation method, assuming a total of i iterations;

[0098] In the first iteration, assume that Rx, Ry, Rzx, Rzy, Kx, Ky are 0, and calculate Gx, Gy, Gz in turn according to the above equations 11, 22, and 33.

[0099]

[0100] In the second iteration, based on the known parameters Mx, My, Mz and Gx, Gy, Gz calculated in the first iteration, Ry is calculated according to equation 31, and Rzx is calculated according to equation 21; Rx is calculated according to equation 32, and Rzy is calculated according to equation 12. Here, asin is used to improve the calculation accuracy;

[0101]

[0102] Continue with the i-th iteration and continue iterative calculation based on all parameters and formulas known in the i-1-th iteration.

[0103] (3) Determine whether the calculation result reaches the required accuracy after i iterations. After each iteration, increase the calculation of d.

[0104]

[0105] Here, the closer d is to 0, the higher the accuracy of the calculation result, thereby obtaining the sensitivity Gx, Gy, Gz of the three-axis magnetic sensor device itself, the cross-axis sensitivity Kx, Ky, and the angle Rx, Ry, Rzx, Rzy between the chip and the coil when placed;

[0106] (4) The output of the three-axis magnetic sensor is compensated and corrected. The corrected Xout, Yout, Zout formulas are as follows:

[0107]

[0108] That is, the output of the device's own sensitivity under the action of a single X / Y / Z magnetic field. This data provides correct cross-validation results for mass production testing, thereby improving the overall calibration accuracy of mass production.

[0109] The present invention also discloses a testing system for a three-axis magnetic sensor. Figure 2 FIG. 1 is a schematic diagram of the composition of a testing system for a three-axis magnetic sensor according to an embodiment of the present invention; Figure 2 , the test system includes: a magnetic field application module 1, a parameter value calculation module 2 and an angle compensation module 3. The magnetic field application module 1 is used to apply constant magnetic fields of the X-axis, Y-axis and Z-axis separately when the three-axis magnetic sensor to be tested is placed in a three-axis coil (such as a three-axis Helmholtz coil, which is a device used to create a uniform magnetic field in a small area, has an open nature, and is easy to place or remove the chip; other three-axis coils with similar functions can also be selected), and record the output of the three axes of the X-axis, Y-axis and Z-axis under each axis magnetic field. The parameter value calculation module 2 is used to obtain the value of the set parameter through iterative calculation; the calculation result is judged, and when it reaches or is less than the set accuracy, the calculation is stopped, otherwise it continues to iterate. The angle compensation module 3 is used to use the result calculated by the parameter value calculation module to perform angle compensation on the three-axis sensor, output scanning curves under different magnetic fields, and obtain test results.

[0110] In one embodiment of the present invention, the magnetic field application module is used to place the three-axis magnetic sensor to be measured into the three-axis Helmholtz coil, and the coordinates of the two are consistent. Due to the placement error, the three axes of the sensor and the three axes of the coil form a set angle. In one embodiment, the parameters obtained by the parameter value calculation module through iterative calculation include the sensitivity of the three axes of XYZ, the important cross-axis coefficient, and the angles between the three axes of XYZ and the three axes of the coil.

[0111] In one embodiment of the present invention, the iterative process of the parameter value calculation module includes:

[0112] Assume that the magnetic field generator of the three-axis coil has been calibrated, the axis-to-axis error is negligible, the magnetic field is accurate, and the constant magnetic field is Mx, My, Mz, which are known quantities;

[0113] Assume that the sensitivity of the three-axis magnetic sensor is Gx, Gy, Gz; the key cross-axis coefficients of the three-axis magnetic sensor, Kx, Ky are unknown quantities; ignore other cross-axis coefficients;

[0114] The coordinate system M of the three-axis coil and the coordinate system H of the three-axis magnetic sensor are assumed to have an angle between the two coordinate systems. In the XY plane, the angle between the X-axis of the three-axis magnetic sensor chip and the magnetic field Mx is Rzx, and the angle between the Y-axis of the chip and the magnetic field My is Rzy; in the XZ or YZ plane, the angle between the Z-axis of the chip and the magnetic field Mz, rotating around the X-axis is Rx, and the angle between the Z-axis of the chip and the magnetic field Mz, rotating around the Y-axis is Ry, and the four angles are unknown.

[0115] Assume that the outputs of the three axes under a constant XYZ magnetic field are 9 known quantities: XiXo, XiYo, XiZo, YiXo, YiYo, YiZo, ZiXo, ZiYo, ZiZo;

[0116] According to the coordinate system transformation principle, there are the following formulas, of which there are 9 unknown parameters, namely Gx, Gy, Gz, Kx, Ky, Rzx, Rzy, Rx, Ry, and the rest are known quantities:

[0117]

[0118] After the above matrix operations, there are 9 equations as follows:

[0119]

[0120]

[0121]

[0122] The iterative calculation method includes the following steps:

[0123] (1) Given the initial values ​​Rx0, Ry0, Rzx0, Rzy0, Kx0, Ky0, Gx0, Gy0, Gz0 as the basic values ​​for error judgment;

[0124] (2) Iterative calculation method, assuming a total of i iterations;

[0125] In the first iteration, assume that Rx, Ry, Rzx, Rzy, Kx, Ky are 0, and calculate Gx, Gy, Gz in turn according to the above equations 11, 22, and 33.

[0126]

[0127] In the second iteration, based on the known parameters Mx, My, Mz and Gx, Gy, Gz calculated in the first iteration, Ry is calculated according to equation 31, and Rzx is calculated according to equation 21; Rx is calculated according to equation 32, and Rzy is calculated according to equation 12. Here, asin is used to improve the calculation accuracy;

[0128]

[0129] Continue with the i-th iteration and continue iterative calculation based on all parameters and formulas known in the i-1-th iteration.

[0130] (3) Determine whether the calculation result reaches the required accuracy after i iterations. After each iteration, increase the calculation of d.

[0131]

[0132] Here, the closer d is to 0, the higher the accuracy of the calculation result, thereby obtaining the sensitivity Gx, Gy, Gz of the three-axis magnetic sensor device itself, the cross-axis sensitivity Kx, Ky, and the angle Rx, Ry, Rzx, Rzy between the chip and the coil when placed;

[0133] (4) The output of the three-axis magnetic sensor is compensated and corrected. The corrected Xout, Yout, Zout formulas are as follows:

[0134]

[0135] That is, the output of the device's own sensitivity under the action of a single X / Y / Z magnetic field. This data provides correct cross-validation results for mass production testing, thereby improving the overall calibration accuracy of mass production.

[0136] In summary, the testing method and system of the three-axis magnetic sensor proposed in the present invention can obtain the intrinsic sensitivity and cross-axis sensitivity of the chip, thereby improving the detection accuracy and detection sensitivity of the three-axis magnetic sensor.

[0137] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0138] The description and application of the present invention here are illustrative, and it is not intended to limit the scope of the present invention to the above-mentioned embodiments. The effects or advantages involved in the embodiments may not be embodied in the embodiments due to interference from various factors, and the description of the effects or advantages is not used to limit the embodiments. The deformation and change of the embodiments disclosed here are possible, and the replacement of the embodiments and the various equivalent parts are well known to those of ordinary skill in the art. It should be clear to those skilled in the art that the present invention can be implemented in other forms, structures, arrangements, proportions, and with other components, materials and parts without departing from the spirit or essential features of the present invention. Other deformations and changes can be made to the embodiments disclosed here without departing from the scope and spirit of the present invention.

Claims

1. A method for testing a three-axis magnetic sensor, characterized in that: The test method includes: The three-axis magnetic sensor to be tested is placed in the three-axis coil; A constant magnetic field is applied separately with the X-axis direction, the Y-axis direction and the Z-axis direction as the axes of the magnetic field, and the outputs in the three directions of the X-axis direction, the Y-axis direction and the Z-axis direction under each magnetic field are recorded; The value of the set parameter is obtained through iterative calculation; the calculation result is judged, and when it reaches or is less than the set accuracy, the calculation is stopped, otherwise the iteration is continued; Using the calculated results, the three-axis sensor is angle compensated, and the scanning curves under different magnetic fields are output to obtain the test results. The magnetic field generator of the three-axis Helmholtz coil has been calibrated, the axis-to-axis error is negligible, the magnetic field is accurate, and the constant magnetic field is Mx, My, Mz, which are known quantities; The sensitivities of the three-axis magnetic sensor are set to Gx, Gy, and Gz respectively; the key cross-axis coefficients Kx and Ky of the three-axis magnetic sensor are unknown quantities; other cross-axis coefficients are ignored; The coordinate system M of the three-axis coil and the coordinate system H of the three-axis magnetic sensor are assumed to have an angle between the two coordinate systems. In the XY plane, the angle between the X-axis of the three-axis magnetic sensor chip and the magnetic field Mx is Rzx, and the angle between the Y-axis of the chip and the magnetic field My is Rzy; in the XZ or YZ plane, the angle between the Z-axis of the chip and the magnetic field Mz, rotating around the X-axis is Rx, and the angle between the Z-axis of the chip and the magnetic field Mz, rotating around the Y-axis is Ry, and the four angles are unknown. Assume that the outputs of the three axes under a constant XYZ magnetic field are 9 known quantities: XiXo, XiYo, XiZo, YiXo, YiYo, YiZo, ZiXo, ZiYo, ZiZo; According to the coordinate system transformation principle, there are the following formulas, of which there are 9 unknown parameters, namely Gx, Gy, Gz, Kx, Ky, Rzx, Rzy, Rx, Ry, and the rest are known quantities: After the above matrix operations, there are 9 equations as follows: The iterative calculation method includes the following steps: (1) Given the initial values ​​Rx0, Ry0, Rzx0, Rzy0, Kx0, Ky0, Gx0, Gy0, Gz0 as the basic values ​​for error judgment; (2) Iterative calculation method, assuming a total of i iterations; In the first iteration, assume that Rx, Ry, Rzx, Rzy, Kx, Ky are 0, and calculate Gx, Gy, Gz in turn according to the above equations 11, 22, and 33; In the second iteration, based on the known parameters Mx, My, Mz and Gx, Gy, Gz calculated in the first iteration, Ry is calculated according to equation 31, and Rzx is calculated according to equation 21; Rx is calculated according to equation 32, and Rzy is calculated according to equation 12. Here, asin is used to improve the calculation accuracy; Continue with the i-th iteration, and continue iterative calculation based on all the parameters and formulas known in the i-1 iteration; (3) Determine whether the calculation result reaches the required accuracy after i iterations. After each iteration, increase the calculation of d. Here, the closer d is to 0, the higher the accuracy of the calculation result, thereby obtaining the sensitivity Gx, Gy, Gz, the cross-axis coefficient Kx, Ky, and the angle Rx, Ry, Rzx, Rzy between the chip and the coil when it is placed; (4) The output of the three-axis magnetic sensor is compensated and corrected. The corrected Xout, Yout, Zout formulas are as follows: That is, the output of the device's own sensitivity under the action of a single X / Y / Z magnetic field. This data provides correct cross-validation results for mass production testing, thereby improving the overall calibration accuracy of mass production.

2. The method for testing a three-axis magnetic sensor according to claim 1, characterized in that: The input and output of the three-axis sensor and the measurement system are used to establish a multivariate nonlinear equation or set of equations, which are accurately solved through the Newton iteration method and the actual characteristics of the chip to obtain the test results. The solution can converge quickly by using the Newton iteration method combined with the characteristics of the actual chip.

3. The method for testing a three-axis magnetic sensor according to claim 1, wherein: The three-axis coil is a three-axis Helmholtz coil; the three-axis magnetic sensor to be measured is placed in the three-axis Helmholtz coil. Due to placement errors, the three axes of the three-axis magnetic sensor and the three axes of the three-axis Helmholtz coil have a certain angle.

4. The method for testing a three-axis magnetic sensor according to claim 1, wherein: In the step of calculating each parameter value, the parameters obtained through iterative calculation include the sensitivity of the three axes XYZ, the important cross-axis coefficient, and the angles formed by the three axes XYZ and the three axes of the coil.

5. A three-axis magnetic sensor testing system, characterized in that: The test system comprises: A magnetic field application module is used to apply constant magnetic fields of the X-axis, Y-axis and Z-axis separately when the three-axis magnetic sensor to be tested is placed in the three-axis coil, and record the outputs of the three axes of the X-axis, Y-axis and Z-axis under each axis magnetic field; The parameter value calculation module is used to obtain the value of the set parameter through iterative calculation; the calculation result is judged, and when it reaches or is less than the set accuracy, the calculation is stopped, otherwise the iteration is continued; An angle compensation module, used to use the result calculated by the parameter value calculation module to perform angle compensation on the three-axis sensor, output scanning curves under different magnetic fields, and obtain test results; The iterative process of the parameter value calculation module includes: Assume that the magnetic field generator of the three-axis coil has been calibrated, the axis-to-axis error is negligible, the magnetic field is accurate, and the constant magnetic field is Mx, My, Mz, which are known quantities; Assume that the sensitivity of the three-axis magnetic sensor is Gx, Gy, Gz; the key cross-axis coefficients Kx and Ky of the three-axis magnetic sensor are unknown quantities; ignore other cross-axis coefficients; The coordinate system M of the three-axis coil and the coordinate system H of the three-axis magnetic sensor are assumed to have an angle between the two coordinate systems. In the XY plane, the angle between the X-axis of the three-axis magnetic sensor chip and the magnetic field Mx is Rzx, and the angle between the Y-axis of the chip and the magnetic field My is Rzy; in the XZ or YZ plane, the angle between the Z-axis of the chip and the magnetic field Mz, rotating around the X-axis is Rx, and the angle between the Z-axis of the chip and the magnetic field Mz, rotating around the Y-axis is Ry, and the four angles are unknown. Assume that the outputs of the three axes under a constant XYZ magnetic field are 9 known quantities: XiXo, XiYo, XiZo, YiXo, YiYo, YiZo, ZiXo, ZiYo, ZiZo; According to the coordinate system transformation principle, there are the following formulas, of which there are 9 unknown parameters, namely Gx, Gy, Gz, Kx, Ky, Rzx, Rzy, Rx, Ry, and the rest are known quantities: After the above matrix operations, there are 9 equations as follows: The iterative calculation method includes the following steps: (1) Given the initial values ​​Rx0, Ry0, Rzx0, Rzy0, Kx0, Ky0, Gx0, Gy0, Gz0 as the basic values ​​for error judgment (2) Iterative calculation method, assuming a total of i iterations; In the first iteration, assume that Rx, Ry, Rzx, Rzy, Kx, Ky are 0, and calculate Gx, Gy, Gz in turn according to the above equations 11, 22, and 33. In the second iteration, based on the known parameters Mx, My, Mz and Gx, Gy, Gz calculated in the first iteration, Ry is calculated according to equation 31, and Rzx is calculated according to equation 21; Rx is calculated according to equation 32, and Rzy is calculated according to equation 12. Here, asin is used to improve the calculation accuracy; Continue with the i-th iteration, and continue iterative calculation based on all the parameters and formulas known in the i-1 iteration; (3) Determine whether the calculation result reaches the required accuracy after i iterations. After each iteration, the calculation of d is increased: Here, the closer d is to 0, the higher the accuracy of the calculation result, thereby obtaining the sensitivity Gx, Gy, Gz of the three-axis magnetic sensor device itself, the cross-axis sensitivity Kx, Ky, and the angle Rx, Ry, Rzx, Rzy between the chip and the coil when placed; (4) The output of the three-axis magnetic sensor is compensated and corrected. The corrected Xout, Yout, Zout formulas are as follows: That is, the output of the device's own sensitivity under the action of a single X / Y / Z magnetic field. This data provides correct cross-validation results for mass production testing, thereby improving the overall calibration accuracy of mass production.

6. The three-axis magnetic sensor testing system according to claim 5, characterized in that: The three-axis coil is a three-axis Helmholtz coil; the magnetic field application module is used to place the three-axis magnetic sensor to be measured into the three-axis Helmholtz coil, and the coordinates of the two are consistent. Due to the placement error, the three axes of the sensor and the three axes of the coil have a certain angle.

7. The three-axis magnetic sensor testing system according to claim 5, characterized in that: The parameters obtained by the parameter value calculation module through iterative calculation include the sensitivity of the three axes XYZ, the important cross-axis coefficient, and the angles between the three axes XYZ and the three axes of the coil.