A method, system and electronic device for calibrating a magnetoresistive sensor

By establishing a mapping relationship between current signals and magnetic field data, and using a fluxgate meter and a magnetic field generator to perform multi-directional calibration in the static state of the magnetoresistive sensor, the problems of zero bias, inconsistent sensitivity, and non-orthogonality between axes of the magnetoresistive sensor are solved, achieving high-precision and stable calibration results.

CN122194034APending Publication Date: 2026-06-12AEROSPACE INFORMATION RES INST CAS

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
AEROSPACE INFORMATION RES INST CAS
Filing Date
2026-03-26
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Magnetoresistive sensors are prone to errors such as zero bias, inconsistent sensitivity, and non-orthogonality between axes during manufacturing and use. Existing calibration methods are difficult to meet the requirements of batch and high-precision calibration, and cable entanglement and mechanical vibration are easy to occur during the calibration of rotating mechanisms.

Method used

A magnetic field signal is generated by controlling a magnetic field generator, and a mapping relationship between the current signal and the magnetic field data is established. A fluxgate magnetometer is used to replace the magnetoresistive sensor under test, and multiple calibration magnetic fields in different directions are generated in sequence. Measurement data is collected and calibration parameters are determined. Based on these parameters, the magnetoresistive sensor under test is calibrated to avoid sensor rotation.

Benefits of technology

It enables high-precision calibration to be completed when the sensor is stationary, avoiding cable tangling and mechanical vibration, improving the stability and repeatability of the calibration process, and meeting the needs of batch calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122194034A_ABST
    Figure CN122194034A_ABST
Patent Text Reader

Abstract

The application provides a kind of magnetoresistive sensor calibration method, system and electronic equipment, it is related to sensor technical field.Therein, magnetoresistive sensor calibration method includes: control magnetic field generating device generates magnetic field signal to magnetic flux gate meter, magnetic field generating device includes coil and power supply;Power supply output current signal drives coil to generate magnetic field signal;Obtain the magnetic field data that magnetic flux gate meter is collected, establish the mapping relationship between current signal and magnetic field data;In response to magnetic flux gate meter is replaced by the magnetoresistive sensor to be measured, based on mapping relationship, control magnetic field generating device generates multiple different directions of calibration magnetic field in turn;Under each calibration magnetic field, the measurement data of the magnetoresistive sensor to be measured is collected;Based on measurement data and the parameter of corresponding calibration magnetic field determines calibration parameter;Based on calibration parameter, the measurement data of the magnetoresistive sensor to be measured is calibrated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of sensor technology, and in particular to a magnetoresistive sensor calibration method, system, and electronic device. Background Technology

[0002] Magnetoresistive sensors are prone to errors such as zero bias, inconsistent sensitivity, and non-orthogonality between axes during manufacturing and use. Existing calibration methods usually use a rotating mechanism to change the sensor's orientation to obtain multi-directional measurement data. However, the rotation process is prone to engineering problems such as cable entanglement and mechanical vibration, making it difficult to meet the requirements of mass production and high-precision calibration. Summary of the Invention

[0003] In view of this, this application provides a magnetoresistive sensor calibration method, system, and electronic device.

[0004] According to a first aspect of this application, a magnetoresistive sensor calibration method is provided, comprising: controlling a magnetic field generating device to generate a magnetic field signal for a fluxgate magnetometer, the magnetic field generating device including a coil and a power supply; the power supply outputting a current signal to drive the coil to generate the magnetic field signal; acquiring magnetic field data collected by the fluxgate magnetometer and establishing a mapping relationship between the current signal and the magnetic field data; in response to the fluxgate magnetometer being replaced by a magnetoresistive sensor under test, based on the mapping relationship, controlling the magnetic field generating device to sequentially generate multiple calibration magnetic fields in different directions; under the action of each calibration magnetic field, acquiring measurement data of the magnetoresistive sensor under test; determining calibration parameters based on the measurement data and the parameters of the corresponding calibration magnetic fields; and calibrating the measurement data acquired by the magnetoresistive sensor under test based on the calibration parameters.

[0005] The second aspect of this application provides a magnetoresistive sensor calibration system, comprising: a magnetic field generating device, including a coil and a power supply; the power supply is used to output a current signal to drive the coil to generate a magnetic field signal; a fluxgate magnetometer for acquiring magnetic field data generated by the magnetic field generating device; a magnetoresistive sensor under test, used to acquire measurement data under a calibration magnetic field generated by the magnetic field generating device after the fluxgate magnetometer is replaced; and a controller for: controlling the magnetic field generating device to generate a magnetic field signal to the fluxgate magnetometer and acquiring the magnetic field data acquired by the fluxgate magnetometer, establishing a mapping relationship between the current signal and the magnetic field data; responding to the replacement of the fluxgate magnetometer with the magnetoresistive sensor under test, based on the mapping relationship, controlling the magnetic field generating device to sequentially generate multiple calibration magnetic fields in different directions; acquiring measurement data of the magnetoresistive sensor under test under the action of each calibration magnetic field; determining calibration parameters based on the measurement data and the parameters of the corresponding calibration magnetic field; and calibrating the measurement data acquired by the magnetoresistive sensor under test based on the calibration parameters.

[0006] A third aspect of this application provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the magnetoresistive sensor calibration method described above.

[0007] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0008] The above and other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0009] Figure 1 The flowchart illustrating a magnetoresistive sensor calibration method provided in an embodiment of this application is shown in the illustration.

[0010] Figure 2 The schematic diagram illustrates the structure of a magnetoresistive sensor calibration system provided in an embodiment of this application;

[0011] Figure 3 This illustration shows a comparison diagram of an orthogonal coordinate system and a non-orthogonal coordinate system provided in an embodiment of this application;

[0012] Figure 4A This illustration schematically shows a comparison diagram of non-orthogonal errors before and after calibration, provided in an embodiment of this application.

[0013] Figure 4B This illustration schematically shows a comparison of the total field modulus (RMSE) values ​​before and after calibration, according to an embodiment of this application.

[0014] Figure 5 This is a block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0015] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.

[0016] Figure 1 A flowchart illustrating a magnetoresistive sensor calibration method provided in an embodiment of this application is shown.

[0017] like Figure 1 As shown, the magnetoresistive sensor calibration method may include the following steps.

[0018] Step S110: Control the magnetic field generating device to generate a magnetic field signal for the fluxgate magnetometer. The magnetic field generating device includes a coil and a power supply; the power supply outputs a current signal to drive the coil to generate a magnetic field signal.

[0019] Step S120: Acquire the magnetic field data collected by the fluxgate magnetometer and establish the mapping relationship between the current signal and the magnetic field data;

[0020] In step S130, in response to the fluxgate meter being replaced by the magnetoresistive sensor to be measured, the magnetic field generator is controlled to sequentially generate multiple calibration magnetic fields in different directions based on the mapping relationship.

[0021] Step S140: Under the action of each calibration magnetic field, collect the measurement data of the magnetoresistive sensor under test, and determine the calibration parameters based on the measurement data and the corresponding calibration magnetic field;

[0022] Step S150: Calibrate the measurement data collected by the magnetoresistive sensor under test based on the calibration parameters.

[0023] In step S110, the magnetic field generating device refers to a device capable of generating a controllable magnetic field, which can be understood as a device that generates a magnetic field by driving a coil with current, used to provide a known magnetic field excitation for the fluxgate meter or the magnetoresistive sensor under test during the calibration process.

[0024] Figure 2 The schematic diagram illustrates the structure of a magnetoresistive sensor calibration system provided in an embodiment of this application.

[0025] like Figure 2 As shown, a magnetic field generating device may include a coil and a power supply. The coil generates a magnetic field when current is applied, and the power supply outputs a current signal to the coil. The coil is electrically connected to the power supply; the current signal output by the power supply drives the coil, and the coil generates a corresponding magnetic field signal based on the current signal.

[0026] Optionally, the coil can adopt a triaxial Helmholtz coil structure, which includes three sets of coils arranged along the X, Y, and Z axes, capable of independently generating a controllable uniform magnetic field in three-dimensional space. Correspondingly, the power supply can include power supply 1, power supply 2, and power supply 3, which supply power to the three axial coils of the triaxial Helmholtz coil, respectively. By controlling the output current of the three power supplies, the synthesis of magnetic fields in any direction can be achieved.

[0027] In this step, the measurement and control device is responsible for controlling the magnetic field generator to produce a magnetic field signal for the fluxgate magnetometer and for collecting the fluxgate magnetometer's measurement data. The measurement and control device includes a controller, which may include, but is not limited to, an industrial computer, a microcontroller, an embedded processor, or a general-purpose computer. The controller is equipped with host computer control software, which serves as the control center of the entire calibration system and is responsible for coordinating the operation of all components.

[0028] Specifically, the host computer control software sends voltage signals to the power supply, and the power supply outputs corresponding current signals to the coils based on the received voltage signals. For example, when a magnetic field of a specific direction and intensity needs to be generated, the host computer control software calculates the required current values ​​for the three axes and sends corresponding voltage control signals to power supplies 1, 2, and 3, respectively. The three power supplies then output corresponding current signals to drive the X-axis, Y-axis, and Z-axis coils, thereby generating the required magnetic field signal in the central region of the coils.

[0029] A fluxgate magnetometer is placed in the center of the coil and is used to measure the magnetic field signal generated by the magnetic field generator. As a high-precision magnetic field measuring instrument, the fluxgate magnetometer can accurately measure the three-axis components of the magnetic field, and its measurement results are transmitted to the measurement and control device via a data line. The host computer control software collects the magnetic field data output by the fluxgate magnetometer and associates the power supply current signal with the magnetic field data measured by the fluxgate magnetometer, thereby establishing a mapping relationship between the current signal and the magnetic field data, and completing the calibration of the magnetic field generator.

[0030] In step S120, the mapping relationship between the current signal and the magnetic field data refers to the correspondence between the current value output by the power supply and the actual magnetic field strength generated. It can be understood as calibrating the actual magnetic field generated by the coil under different current drives by a high-precision fluxgate magnetometer, which is then used to accurately control the magnetic field generating device to generate a known calibration magnetic field based on the mapping relationship.

[0031] In this step, the measurement and control device acquires the magnetic field data collected by the fluxgate magnetometer. Since the fluxgate magnetometer's measurement data is transmitted to the measurement and control device in real time, the host computer control software reads the magnetic field data output by the fluxgate magnetometer. This magnetic field data typically includes magnetic field components along three axes. Simultaneously, the host computer control software records the voltage signal sent to the power supply and the actual current signal output by the power supply.

[0032] Based on the collected data, the host computer control software establishes a mapping relationship between current signals and magnetic field data. Specifically, each set of current signals can be paired and recorded with the magnetic field data measured by the fluxgate magnetometer at the corresponding time. For example, when power supplies 1, 2, and 3 output currents Ix, Iy, and Iz respectively, the fluxgate magnetometer measures the three-axis components Bx, By, and Bz of the magnetic field. Then, (Ix, Iy, Iz) and (Bx, By, Bz) are stored as a set of mapped data.

[0033] Optionally, to improve the accuracy of the mapping relationship, multiple different combinations of current can be controlled to output the power supply, corresponding to the acquisition of multiple sets of magnetic field data, thereby obtaining a mapping dataset covering the entire working range. By processing these data, a quantitative mapping relationship between the current signal and the magnetic field data can be obtained. This mapping relationship can be stored in the host computer control software in the form of a lookup table, fitting function, or calibration matrix.

[0034] It should be noted that the process of establishing the mapping relationship is essentially a calibration process for the magnetic field generator. Since the fluxgate magnetometer has high measurement accuracy, this calibration process can eliminate the non-ideal characteristics of the coil itself and the non-linear effects of the power supply output, ensuring that the required calibration magnetic field can be accurately generated when the magnetic field generator is used in the future.

[0035] In step S130, the fluxgate magnetometer is first removed from the center of the coil, and then the magnetoresistive sensor under test is placed in that position. The magnetoresistive sensor under test and the fluxgate magnetometer are in the same spatial position and orientation, thus ensuring that the magnetic field conditions applied to both by the magnetic field generator are consistent. The magnetoresistive sensor under test is electrically connected to the measurement and control device, which can acquire the voltage signal output by the magnetoresistive sensor under test.

[0036] After the magnetoresistive sensor under test is placed, the host computer control software, based on the mapping relationship established in step S120, controls the magnetic field generator to sequentially generate multiple calibration magnetic fields in different directions. Specifically, the host computer control software pre-sets the direction and intensity of multiple calibration magnetic fields, and for each calibration magnetic field, it finds or calculates the required combination of current signals to be output according to the mapping relationship.

[0037] Optionally, multiple calibration magnetic fields in different directions can be generated sequentially in a predetermined order. The directions of the calibration magnetic fields can cover multiple directions in three-dimensional space to achieve omnidirectional calibration of the magnetoresistive sensor under test. When each calibration magnetic field is generated, the host computer control software controls the power supply to maintain a stable output current signal, so that the coil generates a stable calibration magnetic field that acts on the magnetoresistive sensor under test.

[0038] In step S140, when the magnetic field generator produces a calibration magnetic field in a certain direction, the magnetoresistive sensor under test outputs a corresponding voltage signal under the action of the calibration magnetic field. The measurement and control device collects the voltage signal output by the magnetoresistive sensor under test as measurement data. The host computer control software records this measurement data and associates it with the parameters of the corresponding calibration magnetic field, which include the magnetic field direction and magnetic field strength. For each calibration magnetic field, the host computer control software collects a set of measurement data; after all the calibration magnetic fields in the predetermined directions are applied in sequence, the host computer control software obtains multiple sets of measurement data and their corresponding calibration magnetic field parameters, and determines the calibration parameters based on these data through a data processing algorithm.

[0039] For each calibration magnetic field, the host computer control software acquires a set of measurement data. After all the calibration magnetic fields in the predetermined directions have been applied sequentially, the host computer control software obtains multiple sets of measurement data and their corresponding calibration magnetic field parameters. Based on this data, the host computer control software determines the calibration parameters through a data processing algorithm. The calibration parameters are used to describe the error characteristics of the magnetoresistive sensor under test, including but not limited to sensitivity coefficient, zero-point offset, and non-orthogonality error.

[0040] Specifically, the host computer control software compares and analyzes multiple sets of measurement data with the corresponding calibration magnetic field parameters, and calculates the calibration parameters using the least squares method, linear regression, or other fitting algorithms. These calibration parameters reflect the deviation between the actual response characteristics and the ideal characteristics of the magnetoresistive sensor under test.

[0041] In step S150, the magnetoresistive sensor under test outputs measurement data during actual use. After the host computer control software obtains the measurement data, it corrects the measurement data according to the calibration parameters determined in step S140.

[0042] It should be noted that once the calibration parameters are determined, they can be stored in the memory of the magnetoresistive sensor under test or in the host computer control software. The measurement data can be continuously calibrated during subsequent use, thereby maintaining the measurement accuracy of the magnetoresistive sensor under test in the long term.

[0043] By adopting the technical solution of this application, the current signal output by the power supply is first used to drive the coil to generate a magnetic field signal, and the magnetic field data is collected by a fluxgate magnetometer. A mapping relationship between the current signal and the magnetic field data is established, thereby realizing the accurate calibration of the magnetic field generating device. On this basis, when the fluxgate magnetometer is replaced with the magnetoresistive sensor under test, the magnetic field generating device is controlled to generate multiple calibration magnetic fields in different directions in sequence based on the established mapping relationship. Multi-directional excitation is achieved by changing the direction of the magnetic field instead of rotating the sensor itself. The magnetoresistive sensor under test remains stationary under the action of each calibration magnetic field and collects measurement data, avoiding the cable entanglement and mechanical vibration problems caused by traditional rotating mechanisms. Then, based on the collected measurement data and the corresponding calibration magnetic field parameters, calibration parameters are determined, and the calibration parameters are used to calibrate subsequent measurement data. Thus, without rotating the sensor, effective compensation for errors such as zero bias, inconsistent sensitivity, and non-orthogonality between axes is completed, improving the stability and repeatability of the calibration process and meeting the requirements of batch and high-precision calibration.

[0044] Based on the above embodiments, as an optional embodiment, the coil and fluxgate meter are located inside the magnetic shielding cylinder.

[0045] Magnetic shielding cylinders are used to shield external environmental magnetic fields, preventing the influence of environmental magnetic fields such as the Earth's magnetic field and electromagnetic interference on the calibration process. Magnetic shielding cylinders are typically made of highly permeable materials, which guide external magnetic fields to the cylinder walls, thus creating a low-magnetic-field environment inside. Both the coil and the fluxgate magnetometer are placed inside the magnetic shielding cylinder, ensuring that the magnetic field signal measured by the fluxgate magnetometer primarily originates from the magnetic field generated by the coil, and is not affected by external environmental magnetic fields, thereby improving the accuracy of the mapping relationship.

[0046] After removing the fluxgate magnetometer from the center of the coil inside the magnetic shielding cylinder, place the magnetoresistive sensor to be tested in the same position as the fluxgate magnetometer, meaning the magnetoresistive sensor to be tested is also located in the center region of the coil inside the magnetic shielding cylinder. The installation position and orientation of the magnetoresistive sensor to be tested are consistent with those of the fluxgate magnetometer, ensuring that both are in the same spatial coordinates and orientation, thereby ensuring that the magnetic field conditions applied to both by the magnetic field generating device are exactly the same.

[0047] Throughout the calibration process, the magnetoresistive sensor under test remains stationary and does not change its position or orientation.

[0048] By adopting the technical solution described in this application, the difference in magnetic field distribution caused by position changes can be avoided by keeping the magnetoresistive sensor under test stationary. This also simplifies the calibration algorithm, eliminating the need to consider dynamic effects caused by sensor movement. When the magnetic field generator sequentially generates multiple calibration magnetic fields in different directions, the magnetic field direction is changed only by altering the current combination of the coils, while the magnetoresistive sensor under test remains in a fixed position and orientation, ensuring the consistency and reliability of the calibration data.

[0049] Based on the above embodiments, as an optional embodiment, the coil includes a first coil, a second coil, and a third coil, which are arranged orthogonally to each other; the above step S110 may further include the following steps.

[0050] The control power supply outputs current signals to the first coil, the second coil, and the third coil in sequence to drive the first coil, the second coil, and the third coil to generate magnetic field signals respectively; the fluxgate magnetometer is used to collect the corresponding magnetic field data, and the magnetic field signal includes the three-dimensional magnetic field components generated by the first coil, the second coil, and the third coil respectively.

[0051] Optionally, the coordinate system corresponding to the coil is Oc-XcYcZc, where Oc is the origin of the coil coordinate system, and the geometric center of the magnetic sensitive coil is taken as the origin. The Xc and Yc axes are respectively set along two orthogonal radial directions of the horizontally placed magnetic sensitive coil, and the two axes are coplanar on the basic plane of the coil. The Zc axis is set along the axial direction of the horizontally placed magnetic sensitive coil, and satisfies the right-hand screw rule with the Xc and Yc axes, forming an orthogonal Cartesian coordinate system. The axial direction of the first coil is set along the Xc axis, the axial direction of the second coil is set along the Yc axis, and the axial direction of the third coil is set along the Zc axis.

[0052] Optionally, the coordinate system corresponding to the magnetic sensor is Os-XsYsZs, where Os is the origin of the sensor coordinate system, and the geometric center of the triaxial magnetic sensor's package is taken as the origin. The Xs, Ys, and Zs axes coincide with the respective sensing axes of the sensor, and the positive directions of each axis are consistent with the main sensing direction of the corresponding single-axis magnetic sensing unit. During calibration, the sensor coordinate system Os-XsYsZs of the triaxial magnetoresistive sensor under test maintains a fixed relative position with the coil coordinate system Oc-XcYcZc.

[0053] It should be noted that during calibration, it is necessary to ensure that the uniform field region generated by the coil can completely cover all the sensitive elements of the magnetic sensor in terms of spatial position and size, and the overall uniformity of the uniform field used must not exceed 0.1%. By using a triaxial orthogonal coil structure in conjunction with the high uniformity requirement, the consistency of the magnetic field at the position of each sensitive axis of the sensor under test can be guaranteed, reducing the calibration error introduced by the uneven spatial distribution of the magnetic field.

[0054] Correspondingly, step S120 may specifically include the following steps.

[0055] A mapping relationship is established based on the current signals and three-dimensional magnetic field component data corresponding to the first, second, and third coils.

[0056] For example, a known current is applied to each of the three coils individually in sequence. (Set the current of the other coils to zero), and record the three components of the magnetic field measured by the reference magnetometer: only coil x is energized. At that time, it was measured Only the Y coil is energized. At that time, it was measured Only the z-coil is energized. At that time, it was measured Based on this, a magnetic field-current mapping matrix (coil constant / coupling matrix) is established. To satisfy ,in:

[0057]

[0058] Among them For example, the magnetic field component measured in the y direction when the x coil is energized is represented by , and so on.

[0059] Optionally, after establishing the mapping relationship, the linearity and stability of the mapping matrix M can be verified by applying current signals of different amplitudes. If the three-dimensional coil meets the linear response condition within the working range, the matrix M remains constant within that range and can be repeatedly used for the calibration process of subsequent batches of magnetoresistive sensors under test.

[0060] It should be noted that the energizing sequence of the first, second, and third coils can be adjusted according to actual needs without affecting the final mapping matrix M. However, for the sake of unified management of data recording and matrix element correspondence, it is preferable to calibrate sequentially according to the Xc axis, Yc axis, and Zc axis. Furthermore, a short settling time can be reserved before each switching of energized coils to ensure that the coil current reaches a stable state and the fluxgate magnetometer output stabilizes before data acquisition, thereby reducing the impact of transient response on calibration accuracy.

[0061] By adopting the technical solution of this application, by sequentially applying independent current signals to the first coil, the second coil, and the third coil and acquiring the corresponding three-dimensional magnetic field components, an accurate current-magnetic field mapping matrix can be established. This matrix not only reflects the coil constants of each coil, but also contains the cross-axis coupling information between the coils, thereby compensating for non-ideal factors introduced during the manufacturing and installation of the coils and improving the directional accuracy and amplitude consistency of the subsequent target magnetic field generation.

[0062] Based on the above embodiments, as an optional embodiment, step S130 may further include the following steps.

[0063] Step S210: Determine the amplitude and multiple different directions of the target calibration magnetic field;

[0064] Step S220: For each direction, based on the mapping relationship, convert the amplitude and corresponding direction of the target calibration magnetic field into a current signal;

[0065] In step S230, the power supply outputs a current signal to drive the coil, thereby generating multiple calibration magnetic fields in different directions in sequence.

[0066] In step S210, the host computer control software pre-sets the amplitude and multiple different directions of the target calibration magnetic field. The amplitude of the target calibration magnetic field refers to the magnitude of the magnetic field strength required during the calibration process, and the multiple different directions refer to the combination of multiple magnetic field directions covering three-dimensional space.

[0067] Specifically, the host computer control software determines the amplitude of the target calibration magnetic field based on the range and calibration accuracy requirements of the magnetoresistive sensor under test.

[0068] For multiple different directions, the host computer control software generates direction combinations according to a predetermined spatial coverage strategy. Each direction can be represented by azimuth and elevation angles, or by a three-dimensional unit vector. Optionally, multiple different directions can be generated using a spherical uniform sampling strategy, ensuring that each direction is uniformly distributed in three-dimensional space, thereby achieving omnidirectional calibration excitation for the magnetoresistive sensor under test.

[0069] In step S220, the host computer control software converts the amplitude and corresponding direction of the target calibration magnetic field into a current signal for each direction based on the established mapping relationship.

[0070] Specifically, let the target calibration magnetic field vector be represented as B. target Its amplitude is B c The direction is determined by the unit vector n, then B target =B c ×n. Based on the established mapping relationship B=MI, the required current signal can be calculated through matrix inversion: Where M is the mapping matrix, and I is the current signal vector that the three power supplies need to output, including the current values ​​corresponding to power supply 1, power supply 2, and power supply 3.

[0071] The host computer control software performs the above calculations sequentially for each predetermined direction to obtain the corresponding current signal combination.

[0072] Optionally, after the current signal is calculated, the host computer control software can perform a range check on the current value to ensure that the calculation result is within the output capability range of the power supply; if the current value exceeds the power supply range, the amplitude of the target calibration magnetic field is adjusted or the direction combination is reselected to avoid distortion of the calibration magnetic field caused by power supply output saturation.

[0073] In step S230, the host computer control software sends current signals to power supplies 1, 2, and 3 respectively. The three power supplies output corresponding current values ​​based on the received control signals, driving the first, second, and third coils respectively. The magnetic fields generated by the simultaneous energization of the three coils superimpose in space, forming a composite magnetic field with the same direction and amplitude as the target calibration magnetic field.

[0074] The host computer control software sequentially controls the power supply to output current signals corresponding to different directions according to a predetermined sequence, thereby causing the magnetic field generator to generate multiple calibration magnetic fields in different directions. During the generation of each calibration magnetic field, the host computer control software maintains a stable power output for a period of time to ensure the magnetic field reaches a stable state, and during this period, it collects measurement data from the magnetoresistive sensor under test. Once data acquisition in one direction is complete, the host computer control software switches to the current signal corresponding to the next direction, repeating the above process until calibration magnetic fields in all predetermined directions have been applied.

[0075] It should be noted that calculating the current signal through matrix inversion can compensate for the effects of inconsistent coil constants and cross-axis coupling between coils, thereby improving the directional accuracy and amplitude consistency of the target calibration magnetic field. Compared to directly setting the current value proportionally, this method can effectively reduce the impact of coil manufacturing and installation errors on the calibration results.

[0076] By adopting the technical solution of this application, the amplitude and multiple different directions of the target calibration magnetic field are predetermined, and the target calibration magnetic field is converted into a current signal to drive the coil based on the mapping relationship. Multi-directional magnetic field excitation can be achieved under the condition that the magnetoresistive sensor under test is kept stationary, thereby avoiding the engineering complexity caused by rotating the sensor. At the same time, the non-ideal characteristics of the coil are compensated by matrix inversion operation, which improves the generation accuracy of the calibration magnetic field and provides reliable excitation conditions for the accurate solution of subsequent calibration parameters.

[0077] Based on the above embodiments, as an optional embodiment, step S140 may further include the following steps.

[0078] Step S310: Based on the measurement data and the parameters of the corresponding calibration magnetic field, establish the error model of the magnetoresistive sensor under test;

[0079] Step S320: Solve the error model based on the measurement data to obtain the calibration parameters.

[0080] In step S310, the error model refers to a mathematical model used to describe the deviation relationship between the actual measured output and the ideal output of the magnetoresistive sensor under test. It can be understood as characterizing the error characteristics of the magnetoresistive sensor under test by establishing a mapping relationship between the input magnetic field and the output measured value.

[0081] In this step, the host computer control software acquires multiple sets of measurement data and the corresponding calibration magnetic field parameters. The measurement data consists of the triaxial measurement values ​​output by the magnetoresistive sensor under test under the action of each calibration magnetic field. The parameters of the calibration magnetic field include the direction and amplitude of each calibration magnetic field.

[0082] Specifically, the host computer control software pairs the measurement data with the parameters of the calibration magnetic field, forming multiple sets of data pairs. Let the parameters of the k-th calibration magnetic field be represented as B. 1k The corresponding measurement data of the magnetoresistive sensor under test is represented as B. 0k Where k ranges from 1 to N, and N is the total number of calibration magnetic field sets. Based on these data pairs, the host computer control software establishes an error model for the magnetoresistive sensor under test, which describes the relationship between the measurement data B0 and the calibration magnetic field parameter B1.

[0083] The error model can be expressed in the form B1=F(B0), where F is a function describing the error characteristics. This function contains the error parameters of the magnetoresistive sensor under test, which are used to quantify the various errors introduced by the magnetoresistive sensor during the measurement process.

[0084] In step S320, the host computer control software transmits multiple sets of measurement data B 0k and its corresponding calibration magnetic field parameter B 1k Substitute the values ​​into the error model and calculate the error parameters using mathematical methods. These methods may include, but are not limited to, least squares, linear regression, matrix factorization, or optimization algorithms.

[0085] After the calibration parameters are solved, the host computer control software stores the calibration parameters locally or transfers them to the memory of the magnetoresistive sensor under test for calibration compensation of subsequent measurement data.

[0086] By adopting the technical solution of this application, by establishing the error model of the magnetoresistive sensor under test and solving for the calibration parameters based on the measurement data, the error characteristics of the magnetoresistive sensor under test can be characterized in a parameterized form, thereby providing a quantitative basis for the calibration compensation of subsequent measurement data and realizing the effective correction of the output error of the magnetoresistive sensor under test.

[0087] Based on the above embodiments, as an optional embodiment, step S310 may further include the following steps.

[0088] Step S410: Based on the measurement data and the parameters of the corresponding calibration magnetic field, establish a linear error model; wherein, the linear error model includes a zero bias parameter, a scaling factor parameter, and a non-orthogonal error parameter; the zero bias parameter is used to characterize the output offset of the magnetoresistive sensor under test under zero magnetic field conditions; the scaling factor parameter is used to characterize the sensitivity difference of each sensitive axis of the magnetoresistive sensor under test; the non-orthogonal error parameter is used to characterize the degree of non-orthogonality between each sensitive axis of the magnetoresistive sensor under test.

[0089] Step S420: Based on the linear error model, obtain the error model of the magnetoresistive sensor under test.

[0090] In step S410, the linear error model refers to a mathematical model that uses a linear transformation relationship to describe the mapping between the measurement data of the magnetoresistive sensor under test and the calibration magnetic field parameters. It can be understood as characterizing the influence of linear errors such as zero bias, sensitivity difference and inter-axis non-orthogonality on the measurement results through a linear combination.

[0091] In the specific implementation of this step, the host computer control software establishes the expression for the linear error model. Let B0 be the measurement data of the magnetoresistive sensor under test, and B1 be the corresponding calibration magnetic field parameter. Then the linear error model can be expressed as:

[0092]

[0093] Where b is the zero bias parameter, represented as a three-dimensional vector, whose three components correspond to the output offset of the X-axis, Y-axis and Z-axis of the magnetoresistive sensor under test under zero magnetic field conditions; K is the scaling factor parameter, represented as a diagonal matrix, whose three elements correspond to the sensitivity coefficients of the three sensitive axes; A is the non-orthogonal error parameter, represented as a third-order matrix, used to describe the degree of deviation between the sensitive axes from the ideal orthogonal state.

[0094] Among them, the zero-bias parameter reflects the deviation between the output value of each sensitive axis of the magnetoresistive sensor under test and zero when no external magnetic field is applied. This deviation may originate from factors such as residual magnetization inside the sensor, zero-point drift of the circuit, or packaging stress. The scaling factor parameter reflects the difference in response amplitude of each sensitive axis to the same magnetic field strength. This difference may be caused by factors such as discrete material parameters of the sensitive unit and inconsistent gain of the signal conditioning circuit. The non-orthogonal error parameter reflects the degree to which the actual spatial direction of the three sensitive axes deviates from the ideal orthogonal coordinate system. This deviation may be caused by factors such as assembly deviation of the sensitive unit and substrate deformation.

[0095] It should be noted that the linear error model is suitable when the error characteristics of the magnetoresistive sensor under test are mainly dominated by linear factors. When the amplitude of the calibration magnetic field is within the linear operating region of the magnetoresistive sensor under test, the linear error model can describe the relationship between the measurement data and the calibration magnetic field parameters well.

[0096] By adopting the technical solution of this application, and by establishing a linear error model that includes zero bias parameters, scaling factor parameters, and non-orthogonal error parameters, the main linear error sources of the magnetoresistive sensor under test can be characterized in a parameterized form. This provides a clear mathematical model for solving these parameters based on measurement data, and realizes the separation and quantification of linear errors such as zero bias, sensitivity difference, and inter-axis non-orthogonality.

[0097] Based on the above embodiments, as an optional embodiment, step S420 may further include the following steps.

[0098] Step S510: Based on the linear error model and measurement data, calculate the residuals, which represent the nonlinear errors that the linear error model cannot compensate for.

[0099] Step S520: Establish a nonlinear error model based on the measurement data and residuals;

[0100] Step S530: Combine the linear error model and the nonlinear error model to obtain the error model of the magnetoresistive sensor under test.

[0101] In step S510, the residual refers to the deviation between the predicted value of the linear error model and the actual calibration magnetic field parameters. It can be understood as the error that still exists after error compensation using the linear error model.

[0102] In the specific implementation of this step, the host computer control software first performs preliminary processing on the measurement data based on the linear error model. The host computer control software obtains the equivalent transformation matrix and zero-bias parameters through preset initial parameter values ​​or preliminary estimations, and calculates the predicted values ​​of the linear error model for each set of measurement data.

[0103] Then, the host computer control software compares the predicted value of the linear error model with the corresponding calibration magnetic field parameters and calculates the difference between the two, which is the residual. The residual represents the error portion that the linear error model cannot compensate for. When the magnetoresistive sensor under test has significant nonlinear errors, the residual value will exhibit a variation pattern related to the measurement data, rather than randomly distributed noise.

[0104] Optionally, the host computer control software can perform statistical analysis on the residuals corresponding to each set of measurement data, and evaluate the compensation effect of the linear error model by calculating the root mean square value or maximum value of the residuals. When the residual value exceeds a preset threshold, it indicates that the linear error model is insufficient to fully describe the error characteristics of the magnetoresistive sensor under test, and a nonlinear error model needs to be introduced to supplement it.

[0105] In step S520, the host computer control software establishes a nonlinear error model based on the measurement data and the residuals calculated in step S510. The nonlinear error model refers to a mathematical model used to describe the nonlinear relationship between the measurement data and the residuals; it can be understood as characterizing the higher-order error characteristics of the magnetoresistive sensor under test through nonlinear functions.

[0106] Specifically, the host computer control software selects an appropriate nonlinear function form to construct the nonlinear error model. The nonlinear function can be a polynomial, trigonometric function, exponential function, or a combination thereof. For example, when the residual is correlated with the squared term of the measurement data, a quadratic polynomial can be used to establish the nonlinear error model; when the residual exhibits periodic changes, a trigonometric function can be used to establish the nonlinear error model.

[0107] The host computer control software substitutes each set of measurement data and its corresponding residuals into the selected nonlinear function, and determines the parameters of the nonlinear function through curve fitting or regression analysis. These parameters are the parameters to be solved for the nonlinear error model, and will be solved together with the parameters of the linear error model in step S320.

[0108] In step S530, the combined error model consists of two parts: a linear error model and a nonlinear error model. The linear error model is used to compensate for linear errors such as zero bias, sensitivity differences, and inter-axis non-orthogonality, while the nonlinear error model is used to compensate for higher-order nonlinear errors of the magnetoresistive sensor under test.

[0109] The host computer control software uses the combined error model as the error model of the magnetoresistive sensor under test, and employs it in step S320 to solve for the calibration parameters based on the measurement data. Correspondingly, the calibration parameters include the parameters of the linear error model and the parameters of the nonlinear error model.

[0110] By adopting the technical solution of this application, by calculating the residual of the linear error model and establishing a nonlinear error model based on the residual, higher-order nonlinear errors can be further corrected on the basis of linear error compensation, thereby improving the accuracy of the error model in describing the actual error characteristics of the magnetoresistive sensor under test.

[0111] Based on the above embodiments, as an optional embodiment, step S520 may further include the following steps.

[0112] The measured data is used as input, and the residuals are used as output to train a neural network model, resulting in a neural network model that fits the residuals. The model parameters of the neural network model are the parameters to be determined for the nonlinear error model.

[0113] Specifically, a nonlinear error model can be established using neural network methods. A neural network model refers to a computational model that achieves a nonlinear mapping between input and output through a multi-layered neuron structure. It can be understood as using the nonlinear fitting ability of neural networks to learn the complex relationship between measurement data and residuals.

[0114] In the specific implementation of this step, the host computer control software first calculates the residual of the linear error model. Let B be the measurement data of the kth group. 0k The corresponding calibration magnetic field parameter is B. 1k The linear error model includes a nonorthogonal error parameter A, a scaling factor parameter K, and a zero-bias parameter b. The host computer control software calculates the residuals based on the linear error model. The formula for calculating the residuals is:

[0115]

[0116] The residual represents the nonlinear error portion that the linear error model cannot compensate for.

[0117] Each set of measurement data is used as input to the neural network model, and the corresponding residuals are used as the output to construct a training sample set. The training sample set contains multiple input-output data pairs, which are used to train the neural network model to learn the mapping pattern of the residual function.

[0118] The structure of the neural network model can be defined, including the number of neurons in the input layer, hidden layers, and output layer, as well as the connections between each layer. The number of neurons in the input layer corresponds to the dimension of the measurement data, and the number of neurons in the output layer corresponds to the dimension of the residuals. The number of hidden layers and neurons is determined according to actual needs. The more layers and neurons, the stronger the non-linear expressive power of the model, but the training complexity also increases accordingly.

[0119] The training algorithm adjusts the model parameters θ of the neural network model to minimize the error between the model's predicted output and the actual residuals on the training sample set. The training algorithm can employ backpropagation, gradient descent, or improved versions thereof. The model parameters θ include the connection weights and bias terms between neurons in each layer; these parameters are the parameters to be determined for the nonlinear error model. After training, the neural network model can be represented as NN. θ (B0) is used to predict the residual corresponding to any measurement data B0.

[0120] Optionally, the measured data, along with operating parameters such as temperature and power supply voltage, can be used as inputs to the neural network model. Operating parameters such as temperature and power supply voltage affect the nonlinear error of the magnetoresistive sensor under test; incorporating these parameters into the neural network model can improve the model's adaptability to nonlinear errors under different operating conditions.

[0121] Optionally, to improve the generalization ability of the neural network model and avoid overfitting, training can be performed by dividing the model into training and validation sets. Specifically, all training samples are divided into training and validation sets according to a preset ratio. The training set is used to adjust the model parameters, and the validation set is used to evaluate the model performance. When the prediction error on the validation set no longer decreases or begins to increase, training is stopped, thereby avoiding overfitting of the model to the training set and resulting in a decrease in generalization ability.

[0122] Alternatively, regularization methods or early stopping strategies can be used to prevent overfitting. Regularization methods reduce model complexity by adding penalty terms to the model parameters in the training objective function, thus limiting the magnitude of the model parameters. Early stopping strategies monitor the changing trend of the validation set error and terminate training early when the validation set error reaches its minimum value.

[0123] By combining the linear and nonlinear error models, the error model of the magnetoresistive sensor under test is obtained. The combined error model can be expressed as:

[0124]

[0125] The first term is a linear error model used to compensate for linear errors such as zero bias, sensitivity differences, and inter-axis non-orthogonality; the second term is a nonlinear error model represented by a neural network model used to compensate for higher-order nonlinear errors of the magnetoresistive sensor under test.

[0126] Correspondingly, the calibration parameters obtained by solving the error model in step S320 include the parameters A, K, and b of the linear error model and the model parameter θ of the neural network model. The host computer control software stores these calibration parameters locally or transfers them to the memory of the magnetoresistive sensor under test.

[0127] By adopting the technical solution of this application, and by training a neural network model to fit the residual of the linear error model, the nonlinear fitting capability of the neural network can be used to accurately describe the high-order nonlinear error of the magnetoresistive sensor under test. Thus, on the basis of linear error compensation, accurate compensation for nonlinear error is achieved, improving the completeness of the error model and the calibration accuracy.

[0128] Based on the above embodiments, as an optional embodiment, step S320 may further include the following steps.

[0129] Step S610: Fit the measurement data in the measurement space to obtain the ellipsoid equation;

[0130] Step S620: Based on the ellipsoid equation, solve for the zero bias parameter, scaling factor parameter, and non-orthogonal error parameter in the error model; wherein, the ellipsoid equation characterizes the ellipsoidal distribution formed by the measurement data of the magnetoresistive sensor under test in three-dimensional space under constant magnetic field amplitude conditions; the zero bias parameter corresponds to the offset of the center position of the ellipsoid, and the scaling factor parameter and non-orthogonal error parameter correspond to the shape and orientation characteristics of the ellipsoid.

[0131] Specifically, under constant magnetic field amplitude conditions (e.g., |B1|=Bc), according to the linear error model B1=AK(B0-b), let D be the equivalent linear transformation matrix D=AK, then the measurement data {B0k} (k=1…N) of the triaxial magnetoresistive sensor under test under different magnetic field directions satisfy the ellipsoidal constraint condition in the three-dimensional measurement space:

[0132]

[0133] This equation characterizes the ellipsoidal distribution formed by the measurement data of the sensor under test in three-dimensional space. The least-squares ellipsoid fitting method is used to fit the collected N sets of measurement data points to an ellipsoidal equation, and the ellipsoidal parameters are then solved.

[0134] Optionally, the ellipsoid equation can be normalized during the fitting process to reduce the condition number of the numerical solution and improve parameter stability.

[0135] The geometric characteristics of the ellipsoid equation correspond to the error parameters of the magnetoresistive sensor under test. The zero-bias parameter b corresponds to the offset of the center position of the ellipsoid, and the three-axis zero-bias vector can be directly obtained by ellipsoid fitting.

[0136] The scaling factor parameter K and the non-orthogonal error parameter A correspond to the shape and orientation characteristics of the ellipsoid. The quadratic coefficient matrix of the equivalent linear transformation matrix D is obtained through ellipsoid fitting, and then D is solved.

[0137] Furthermore, D is decomposed to separate the scaling factor matrix K and the non-orthogonal error matrix A. In one implementation, an orthogonal decomposition method can be used to decompose D into the product of an orthogonal matrix and a triangular matrix, and physical feasibility constraints are imposed on the decomposition results (e.g., requiring the scaling factor to be positive and the non-orthogonal angle to be within a reasonable range), to obtain A and K parameters that conform to physical meaning, thereby realizing the calibration of linear errors such as zero bias, sensitivity differences, and inter-axis non-orthogonality.

[0138] Optionally, constraints can be introduced during the solution process to improve the robustness of parameter solution. For example, reasonable constraints can be imposed on the A and K matrices obtained by decomposition to avoid abnormal parameter fluctuations caused by measurement noise or uneven sampling.

[0139] By adopting the technical solution of this application, the measurement data of the magnetoresistive sensor under test under constant magnetic field amplitude and different directional excitation is mapped to an ellipsoidal distribution in the measurement space. By utilizing the correspondence between the geometric characteristics of the ellipsoid and the error parameters, multiple linear error parameters such as zero bias, scaling factor and non-orthogonal error can be solved at one time, so as to achieve effective calibration of the linear error of the triaxial magnetoresistive sensor.

[0140] Figure 3 The illustration shows a comparison diagram of an orthogonal coordinate system and a non-orthogonal coordinate system provided in an embodiment of this application.

[0141] Figure 4A The illustration shows a schematic diagram of the comparison of non-orthogonal errors before and after calibration provided in an embodiment of this application.

[0142] Figure 4B This illustration shows a comparison of the total field modulus (RMSE) values ​​before and after calibration, as provided in an embodiment of this application.

[0143] like Figure 3 As shown, in an ideal orthogonal coordinate system O1X1Y1Z1, the three coordinate axes are perpendicular to each other. However, in the non-orthogonal coordinate system OXYZ of the actual triaxial magnetoresistive sensor under test, there are angular deviations between the sensitive axes. Here, α represents the non-orthogonal angular error between the Y and Z axes, β represents the non-orthogonal angular error between the X and Z axes, and γ represents the non-orthogonal angular error between the X and Y axes. These angular errors reflect the degree to which each sensitive axis of the sensor deviates from the ideal orthogonal state.

[0144] To verify the effectiveness of the calibration method in this application, the magnetic field modulus was set to 50 μT in the calibration platform, and the performance of the triaxial magnetoresistive sensor under test before and after calibration was compared.

[0145] like Figure 4A As shown, before calibration, the non-orthogonal angle errors α, β, and γ of the sensor under test all showed significant deviations, and the magnitude of the non-orthogonal errors between each axis was large. After calibration, the three non-orthogonal angle errors α, β, and γ were significantly suppressed, and the magnitude of the non-orthogonal errors was greatly reduced, approaching the ideal orthogonal state.

[0146] like Figure 4B As shown, before calibration, there was a large deviation between the total field modulus value measured by the sensor under test and the set value (50 μT), and the root mean square error (RMSE) of the total field modulus value was on the order of magnitude. After calibration, the root mean square error (RMSE) of the total field modulus value was significantly reduced, and the consistency between the measured value and the set value was significantly improved.

[0147] Furthermore, comparisons of other performance indicators before and after calibration show that: the relative repeatability error decreased from 14.15% before calibration to 0.05% after calibration; the average orientation error decreased from more than 5° before calibration to less than 0.1° after calibration; and the maximum amplitude error decreased from 3691.7 nT before calibration to 44.1 nT after calibration.

[0148] By adopting the technical solution of this application, the joint calibration method based on ellipsoid fitting and neural network residual learning can effectively compensate for various error sources such as zero bias, scaling factor difference, inter-axis non-orthogonality and nonlinear error of the triaxial magnetoresistive sensor under test, significantly improving the measurement accuracy, repeatability and directional accuracy of the sensor. After calibration, all performance indicators meet the requirements of high-precision magnetic field measurement.

[0149] This application also provides a magnetoresistive sensor calibration system, including:

[0150] A magnetic field generating device includes a coil and a power supply; the power supply is used to output a current signal to drive the coil to generate a magnetic field signal.

[0151] A fluxgate magnetometer is used to collect magnetic field data generated by a magnetic field generator.

[0152] The magnetoresistive sensor under test is used to collect measurement data under the calibration magnetic field generated by the magnetic field generator after the fluxgate meter is replaced.

[0153] The controller is used to: control the magnetic field generator to generate a magnetic field signal for the fluxgate magnetometer and acquire the magnetic field data collected by the fluxgate magnetometer, and establish a mapping relationship between the current signal and the magnetic field data; respond to the fluxgate magnetometer being replaced by the magnetoresistive sensor under test, based on the mapping relationship, control the magnetic field generator to sequentially generate multiple calibration magnetic fields in different directions; acquire the measurement data of the magnetoresistive sensor under test under the action of each calibration magnetic field; determine the calibration parameters based on the measurement data and the parameters of the corresponding calibration magnetic field; and calibrate the measurement data acquired by the magnetoresistive sensor under test based on the calibration parameters.

[0154] According to an embodiment of this application, the coil includes a first coil, a second coil, and a third coil, which are orthogonally arranged. The controller is further configured to control the power supply to sequentially output current signals to the first coil, the second coil, and the third coil, so that the fluxgate magnetometer generates a magnetic field signal. The magnetic field signal includes three-dimensional magnetic field components generated by the first coil, the second coil, and the third coil, respectively. A mapping relationship is established based on the current signals and three-dimensional magnetic field component data of the first coil, the second coil, and the third coil.

[0155] According to an embodiment of this application, the controller is further configured to determine the amplitude and multiple different directions of the target calibration magnetic field; for each direction, based on a mapping relationship, convert the amplitude and corresponding direction of the target calibration magnetic field into a current signal; and control the power supply to output a current signal to drive the coil to sequentially generate calibration magnetic fields in multiple different directions.

[0156] According to an embodiment of this application, the controller is further configured to establish an error model of the magnetoresistive sensor under test based on the measurement data and the parameters of the corresponding calibration magnetic field; and to solve the error model based on the measurement data to obtain the calibration parameters.

[0157] According to an embodiment of this application, the controller is further configured to establish a linear error model based on measurement data and the parameters of the corresponding calibration magnetic field; wherein, the linear error model includes a zero bias parameter, a scaling factor parameter, and a non-orthogonal error parameter; the zero bias parameter is used to characterize the output offset of the magnetoresistive sensor under test under zero magnetic field conditions; the scaling factor parameter is used to characterize the sensitivity difference of each sensitive axis of the magnetoresistive sensor under test; the non-orthogonal error parameter is used to characterize the degree of non-orthogonality between each sensitive axis of the magnetoresistive sensor under test; based on the linear error model, the error model of the magnetoresistive sensor under test is obtained.

[0158] According to an embodiment of this application, the controller is further configured to calculate residuals based on a linear error model and measurement data, wherein the residuals characterize nonlinear errors that the linear error model cannot compensate for; establish a nonlinear error model based on the measurement data and residuals; and combine the linear error model and the nonlinear error model to obtain the error model of the magnetoresistive sensor under test.

[0159] According to an embodiment of this application, the controller is further configured to fit the measurement data in the measurement space to obtain the ellipsoid equation; based on the ellipsoid equation, solve for the zero bias parameter, scaling factor parameter, and non-orthogonal error parameter in the error model; wherein, the ellipsoid equation characterizes the ellipsoidal distribution formed by the measurement data of the magnetoresistive sensor under test in three-dimensional space under constant magnetic field amplitude conditions; the zero bias parameter corresponds to the offset of the center position of the ellipsoid, and the scaling factor parameter and non-orthogonal error parameter correspond to the shape and orientation characteristics of the ellipsoid.

[0160] According to an embodiment of this application, the coil and the fluxgate magnetometer are located inside a magnetic shielding cylinder; the magnetic shielding cylinder is used to shield the external magnetic field; the magnetoresistive sensor to be tested is replaced in the same position as the fluxgate magnetometer and remains stationary.

[0161] This application also discloses an electronic device, including: a memory for storing computer instructions; the computer instructions are loaded by a processor and are used to: control a magnetic field generator to generate a magnetic field signal for a fluxgate magnetometer and acquire magnetic field data collected by the fluxgate magnetometer, and establish a mapping relationship between the current signal and the magnetic field data; in response to the fluxgate magnetometer being replaced by a magnetoresistive sensor under test, based on the mapping relationship, control the magnetic field generator to sequentially generate multiple calibration magnetic fields in different directions; under the action of each calibration magnetic field, acquire measurement data of the magnetoresistive sensor under test; determine calibration parameters based on the measurement data and the parameters of the corresponding calibration magnetic fields; and calibrate the measurement data acquired by the magnetoresistive sensor under test based on the calibration parameters.

[0162] Figure 5 This is a block diagram of an electronic device provided in an embodiment of this application. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0163] like Figure 5 As shown, an electronic device according to an embodiment of this application includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a memory 508 into a random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.

[0164] RAM 503 stores various programs and data required for the operation of the electronic device. Processor 501, ROM 502, and RAM 503 are interconnected via bus 504. Processor 501 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 502 and / or RAM 503. It should be noted that the programs may also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.

[0165] According to embodiments of this application, the electronic device may further include an input / output (I / O) interface 505 connected to a bus 504. The electronic device may also include one or more of the following components connected to the input / output (I / O) interface 505: an input device 506 including a keyboard, mouse, etc.; an output device 507 including a cathode ray tube (CRT), liquid crystal display (LCD), display screen, and speaker, etc.; a memory 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output (I / O) interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the memory 508 as needed.

[0166] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this application is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this application, and all such substitutions and modifications should fall within the scope of this application.

Claims

1. A method for calibrating a magnetoresistive sensor, characterized in that, The method includes: A magnetic field generating device is used to generate a magnetic field signal for a fluxgate magnetometer. The magnetic field generating device includes a coil and a power supply. The power supply outputs a current signal to drive the coil to generate the magnetic field signal. Acquire the magnetic field data collected by the fluxgate magnetometer and establish a mapping relationship between the current signal and the magnetic field data; In response to the replacement of the fluxgate magnetometer with the magnetoresistive sensor to be measured, based on the mapping relationship, the magnetic field generator is controlled to sequentially generate multiple calibration magnetic fields in different directions; Under the action of each calibration magnetic field, measurement data of the magnetoresistive sensor under test is collected, and calibration parameters are determined based on the measurement data and the parameters of the corresponding calibration magnetic field. The measurement data collected by the magnetoresistive sensor under test is calibrated based on the calibration parameters.

2. The method according to claim 1, characterized in that, The coil includes a first coil, a second coil, and a third coil, which are arranged orthogonally to each other. The control magnetic field generating device generates a magnetic field signal for the fluxgate magnetometer, including: The power supply is controlled to sequentially output current signals to the first coil, the second coil, and the third coil in the coil, so that the fluxgate magnetometer can collect the magnetic field signals generated by the coil; the magnetic field signals include the three-dimensional magnetic field components generated by the first coil, the second coil, and the third coil respectively; Establishing the mapping relationship between the current signal and the magnetic field data includes: A mapping relationship is established based on the current signals and three-dimensional magnetic field component data corresponding to the first coil, the second coil, and the third coil, respectively.

3. The method according to claim 1, characterized in that, Based on the mapping relationship, controlling the magnetic field generator to sequentially generate multiple calibration magnetic fields in different directions includes: Determine the amplitude of the target calibration magnetic field and several different directions at that amplitude; For each of the directions, based on the mapping relationship, the amplitude and corresponding direction of the target calibration magnetic field are converted into a current signal; The power supply outputs a current signal to drive the coil, thereby generating multiple calibration magnetic fields in different directions in sequence.

4. The method according to claim 1, characterized in that, The determination of calibration parameters based on the measurement data and the corresponding parameters of the calibration magnetic field includes: Based on the measurement data and the corresponding parameters of the calibration magnetic field, an error model for the magnetoresistive sensor under test is established. The error model is solved based on the measurement data to obtain the calibration parameters.

5. The method according to claim 4, characterized in that, The step of establishing an error model for the magnetoresistive sensor under test based on the measurement data and the corresponding parameters of the calibration magnetic field includes: Based on the measurement data and the corresponding parameters of the calibration magnetic field, a linear error model is established; The linear error model includes a zero-bias parameter, a scaling factor parameter, and a non-orthogonal error parameter. The zero-bias parameter is used to characterize the output offset of the magnetoresistive sensor under test under zero magnetic field conditions; The scaling factor parameter is used to characterize the sensitivity differences of each sensitive axis of the magnetoresistive sensor under test; The non-orthogonal error parameter is used to characterize the degree of non-orthogonality between the sensitive axes of the magnetoresistive sensor under test. Based on the linear error model, the error model of the magnetoresistive sensor under test is obtained.

6. The method according to claim 5, characterized in that, The error model of the magnetoresistive sensor under test, obtained based on the linear error model, includes: Based on the linear error model and the measurement data, the residual is calculated, and the residual represents the nonlinear error that the linear error model cannot compensate for. A nonlinear error model is established based on the measurement data and the residual; The linear error model and the nonlinear error model are combined to obtain the error model of the magnetoresistive sensor under test.

7. The method according to claim 4, characterized in that, The step of solving the error model based on the measurement data to obtain calibration parameters includes: The measurement data is fitted in the measurement space to obtain the ellipsoid equation; Based on the ellipsoid equation, solve for the zero-partial parameter, scaling factor parameter, and non-orthogonal error parameter in the error model; The ellipsoid equation characterizes the ellipsoidal distribution formed by the measurement data of the magnetoresistive sensor under constant magnetic field amplitude in three-dimensional space; the zero bias parameter corresponds to the offset of the center position of the ellipsoid; and the scaling factor parameter and the non-orthogonal error parameter correspond to the shape and orientation characteristics of the ellipsoid.

8. The method according to claim 1, characterized in that, The coil and the fluxgate magnetometer are located inside a magnetic shielding cylinder; the magnetic shielding cylinder is used to shield external environmental magnetic fields. The magnetoresistive sensor to be tested is replaced in the same position as the fluxgate magnetometer and remains stationary.

9. A magnetoresistive sensor calibration system, characterized in that, include: A magnetic field generating device includes a coil and a power supply; the power supply is used to output a current signal to drive the coil to generate a magnetic field signal. A fluxgate magnetometer is used to collect magnetic field data generated by the magnetic field generator. The magnetoresistive sensor under test is used to collect measurement data under the calibration magnetic field generated by the magnetic field generator after the fluxgate meter is replaced. Controller, used for: The magnetic field generating device is controlled to generate the magnetic field signal for the fluxgate, and the magnetic field data collected by the fluxgate is acquired, and a mapping relationship between the current signal and the magnetic field data is established. In response to the replacement of the fluxgate magnetometer with the magnetoresistive sensor under test, based on the mapping relationship, the magnetic field generator is controlled to sequentially generate multiple calibration magnetic fields in different directions; Under the action of each of the calibration magnetic fields, the measurement data of the magnetoresistive sensor under test are collected; The calibration parameters are determined based on the measurement data and the corresponding parameters of the calibration magnetic field; The measurement data collected by the magnetoresistive sensor under test is calibrated based on the calibration parameters.

10. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.