A coil constant automatic measurement method and device based on host computer control

By using a host computer-controlled displacement platform and a polynomial fitting method, precise displacement control and automated scanning measurement of the magnetic field sensor were achieved. The constants of multi-order coils were automatically calibrated and remanence compensation was performed, which solved the problems of low measurement efficiency and poor repeatability in the existing technology and met the needs of precision magnetic field control and quantum precision measurement.

CN122430744APending Publication Date: 2026-07-21BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIHANG UNIV
Filing Date
2026-04-23
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies for magnetic field measurement and coil constant calibration lack precise displacement control and automated measurement methods by a host computer, making it difficult to achieve automated scanning of spatial magnetic field distribution and multi-order magnetic field compensation. This results in low measurement efficiency and poor repeatability, failing to meet the needs of precision magnetic field control and quantum precision measurement experiments.

Method used

The upper computer controls the displacement platform to precisely move the magnetic field sensor. Combined with the magnetic field acquisition module and the coil drive module, the magnetic field components are extracted using a polynomial fitting method to achieve automatic calibration and remanence compensation of uniform coils, first-order coils and second-order coils.

Benefits of technology

It achieves precise displacement control of the magnetic field sensor position and automated scanning measurement of the spatial magnetic field distribution, improving measurement efficiency and repeatability. It automatically acquires multi-order coil constants and performs remanence compensation, meeting the needs of precision magnetic field control and quantum precision measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122430744A_ABST
    Figure CN122430744A_ABST
Patent Text Reader

Abstract

The application discloses a coil constant automatic measurement method and device based on host computer control, comprising: a displacement control module for controlling a magnetic flux gate sensor probe to move to each measurement position and obtaining spatial position data; a magnetic field acquisition module for acquiring a magnetic field signal at each measurement position, obtaining an average magnetic field value and establishing a spatial magnetic field distribution function; a coil driving module for applying a set direct current to a uniform coil, a first-order coil and a second-order coil; a constant calibration module for obtaining a uniform coil constant, a first-order coil constant, a second-order coil constant and a first-order residual magnetism coefficient and a second-order residual magnetism coefficient according to the spatial magnetic field distribution function and the magnetic field response under different coil currents; and a compensation calculation module for calculating a compensation current of each coil according to the constants and the residual magnetism coefficients. The application realizes automatic calibration of the coil constant and multi-order residual magnetism compensation, and improves the automation degree and consistency of the magnetic field measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of quantum precision measurement and magnetic field measurement technology, and particularly relates to an automatic measurement method and device for coil constant based on host computer control. Background Technology

[0002] In the fields of quantum precision measurement and magnetic field metrology, experimental devices such as atomic magnetometers, atomic spin inertial measurement units, and extremely weak magnetic field measurement systems require extremely high uniformity and stability of the magnetic field environment. Simultaneously, applications such as magnetic shielding system debugging, geomagnetic magnetometer calibration, non-destructive magnetic detection, and mineral resource exploration also necessitate precise measurement and control of the spatial magnetic field distribution. Existing technologies have proposed various methods for coil constant calibration, such as using a SERF magnetometer for precise calibration of a three-dimensional magnetic compensation coil, obtaining triaxial orthogonal coil error parameters by calibrating a uniform magnetic field coordinate system within a zero-magnetic device, and in-situ measurement of coil constants based on the detection of optical pumping effects using an atomic spin magnetometer. These methods have improved the measurement accuracy of coil constants to some extent or enabled calibration under specific conditions.

[0003] However, the aforementioned existing technologies generally suffer from the following problems: First, the magnetic field measurement and coil constant calibration processes mostly rely on manual movement of the magnetic field sensor or the use of simple mechanical structures for position adjustment, lacking precise displacement control methods and automated measurement capabilities of the host computer, resulting in insufficient spatial positioning accuracy and easy introduction of human error; Second, existing methods are difficult to achieve high-precision, automated scanning measurement of spatial magnetic field distribution, especially under space-constrained conditions such as magnetic shielding environments, resulting in low measurement efficiency and poor repeatability; Third, existing technologies are mainly aimed at the calibration of uniform coils or single-order coil constants, lacking the ability to automatically calibrate the constants of multi-order coils such as first-order and second-order coils, and also unable to simultaneously achieve multi-order compensation of remanence during the calibration process, making it difficult to meet the needs of precision magnetic field control and quantum precision measurement experiments for multi-order magnetic field gradient compensation. Summary of the Invention

[0004] This invention addresses the shortcomings of existing magnetic field measurement and coil constant calibration methods, which lack precise displacement control and automated measurement methods using a host computer, making it difficult to achieve automated scanning of spatial magnetic field distribution and multi-order magnetic field compensation. It provides a precise displacement scanning magnetic field measurement device based on host computer control and an automatic calibration method for multi-order coil constants. By controlling a displacement platform precisely along the measurement axis using a host computer and automatically collecting spatial magnetic field distribution data using a magnetic field sensor, the zeroth, first, and second-order components of the magnetic field are extracted using a polynomial fitting method. This enables automatic calibration and remanence compensation of uniform coils, first-order coils, and second-order coils. It overcomes the problems of low efficiency, poor repeatability, and difficulty in multi-order magnetic field calibration associated with traditional manual measurements, and is widely applicable to precise displacement control measurement scenarios in various magnetically shielded environments.

[0005] To address the aforementioned technical problems, this invention provides an automatic coil constant measurement method and apparatus based on host computer control. Specifically, an automatic coil constant measurement apparatus based on host computer control includes: The displacement control module is used to control the fluxgate sensor probe to move along the measurement axis to various measurement positions to obtain spatial position data; The magnetic field acquisition module is used to acquire magnetic field signals at each measurement location, obtain the average magnetic field value at the corresponding location, and establish a spatial magnetic field distribution function. The coil drive module is used to apply a set DC current to the uniform coil, the first-order coil, and the second-order coil, respectively. The constant calibration module is used to obtain the uniform coil constant, first-order coil constant, second-order coil constant, first-order remanence coefficient, and second-order remanence coefficient based on the spatial magnetic field distribution function and the magnetic field response under different coil currents. The compensation calculation module is used to calculate the compensation current of the uniform coil, the first-order coil, and the second-order coil based on the uniform coil constant, the first-order coil constant, the second-order coil constant, the first-order remanent magnetization coefficient, and the second-order remanent magnetization coefficient.

[0006] Preferably, the displacement control module includes: The host computer is used to send displacement commands; The controller is electrically connected to the host computer and is used to receive the displacement command and output the step control signal. A stepper motor, electrically connected to the controller, is used to receive the stepping control signal and generate stepping motion; A displacement platform is connected to the stepper motor for moving along the measuring axis under the drive of the stepper motor. The clamp is fixed to the displacement platform; A glass tube, installed in the fixture, is used to move the fluxgate sensor probe along with the displacement platform to position the fluxgate sensor probe at various measurement positions.

[0007] Preferably, the magnetic field acquisition module includes: The fluxgate sensor probe is used to move to each measurement position under the drive of the displacement control module and output the magnetic field signal at the corresponding position; A fluxgate magnetometer, electrically connected to the fluxgate sensor probe, is used to read the magnetic field signal and convert it into a magnetic field reading; The host computer is also electrically connected to the fluxgate magnetometer to receive the magnetic field readings and average the multiple sampled values ​​at each measurement location to obtain the average magnetic field value at the corresponding location, thereby establishing the spatial magnetic field distribution function.

[0008] Preferably, the coil driving module includes: A current source is electrically connected to the uniform coil, the first-order coil, and the second-order coil, respectively, and is used to output an adjustable DC current to each coil. The controller is also electrically connected to the current source and is used to receive current control commands issued by the host computer and control the current source to output a set current to a designated coil.

[0009] Preferably, the constant calibration module includes: The uniform coil constant calibration unit is used to control the displacement control module to move the fluxgate sensor probe to the center position of the air chamber, and to control the coil drive module to apply multiple different DC currents to the uniform coil. The uniform coil constant is obtained by linear fitting based on the average magnetic field value at the center position of the air chamber under each current. The first-order remanence coefficient acquisition unit is used to calculate the current required to be applied to the uniform coil based on the target main magnetic field and the constant of the uniform coil. After the current is applied to the uniform coil, the displacement control module and the magnetic field acquisition module are controlled to perform displacement scanning measurement to obtain the spatial magnetic field distribution under the main magnetic field condition, and the spatial magnetic field distribution is linearly fitted to obtain the first-order remanence coefficient. The first-order coil constant calibration unit is used to control the coil drive module to apply multiple different DC currents to the first-order coil, control the displacement control module and the magnetic field acquisition module to perform displacement scanning measurement under each current value, perform a linear fitting of each group of magnetic field distributions to extract the corresponding first-order gradient value, and fit the first-order gradient value and the first-order coil current according to the linear relationship between the first-order gradient value and the first-order coil current to obtain the first-order coil constant. The second-order remanent magnetization coefficient acquisition unit is used to calculate the first-order compensation current based on the first-order remanent magnetization coefficient and the first-order coil constant, control the coil driving module to apply the corresponding current to the uniform coil and the first-order coil, control the displacement control module and the magnetic field acquisition module to perform displacement scanning measurement, obtain the compensated magnetic field distribution, and perform quadratic polynomial fitting on the compensated magnetic field distribution to obtain the second-order remanent magnetization coefficient. The second-order coil constant calibration unit is used to control the coil drive module to apply multiple different DC currents to the second-order coil under the condition that the uniform coil and the first-order coil maintain the compensation current. Under each current value, the displacement control module and the magnetic field acquisition module are controlled to perform displacement scanning measurement, and the corresponding second-order gradient value is extracted by performing secondary fitting on each group of magnetic field distributions. The second-order coil constant is obtained by fitting the second-order gradient value and the second-order coil current according to the linear relationship between the second-order gradient value and the second-order coil current.

[0010] Preferably, the compensation calculation module includes: A uniform coil compensation current calculation unit is used to calculate the applied current of the uniform coil based on the uniform coil constant and the target main magnetic field. A first-order coil compensation current calculation unit is used to calculate the first-order compensation current based on the first-order remanence coefficient and the first-order coil constant. The second-order coil compensation current calculation unit is used to calculate the second-order compensation current based on the second-order remanence coefficient and the second-order coil constant. The compensation calculation module is also used to output the calculated compensation currents to the coil drive module to apply corresponding currents to the uniform coil, the first-order coil and the second-order coil.

[0011] This invention also provides an automatic measurement method for coil constant based on host computer control, comprising: Based on displacement scanning magnetic field measurements and the magnetic field responses of applying different DC currents to a uniform coil, a first-order coil, and a second-order coil, the constants of the uniform coil, the first-order coil, the second-order coil, the first-order remanence coefficient, and the second-order remanence coefficient are obtained. Based on the uniform coil constant, the first-order coil constant, the second-order coil constant, the first-order remanence coefficient, and the second-order remanence coefficient, the compensation currents of the uniform coil, the first-order coil, and the second-order coil are obtained to establish the target magnetic field and perform multi-order remanence compensation.

[0012] Preferably, the process of obtaining the displacement scanning magnetic field measurement includes: Set the initial position of the displacement platform and the center position of the air chamber, determine the array of measurement positions to be traversed, control the displacement platform to move to each measurement position in sequence, collect magnetic field data at each measurement position and average them to obtain the average magnetic field value of the corresponding measurement position, and establish the spatial magnetic field distribution function.

[0013] Preferably, the process of obtaining the uniform coil constant, the first-order coil constant, the second-order coil constant, and the first-order remanence coefficient and the second-order remanence coefficient includes: Apply different DC currents to the uniform coil, control the displacement platform to move to the center position of the air chamber, record the magnetic field value at the center position of the air chamber under each current, establish the correspondence between the uniform coil current and the central magnetic field, and fit to obtain the uniform coil constant. Different DC currents are applied to the first-order coil, and the displacement scanning magnetic field measurement is performed at each current value. The first-order gradient value is extracted by fitting each group of magnetic field distributions, and the correspondence between the first-order gradient and the first-order coil current is established. The first-order coil constant is obtained by fitting. Under the condition that the uniform coil and the first-order coil maintain the compensation current, different DC currents are applied to the second-order coil. The displacement scanning magnetic field measurement is performed at each current value. The second-order gradient value is extracted by the second fitting of each group of magnetic field distributions. The correspondence between the second-order gradient and the second-order coil current is established, and the second-order coil constant is obtained by fitting. The required current to be applied to the uniform coil is calculated based on the target main magnetic field and the constant of the uniform coil. After the current is applied to the uniform coil, the displacement scanning magnetic field measurement is performed to obtain the spatial magnetic field distribution under the main magnetic field condition. The spatial magnetic field distribution is fitted once to obtain the first-order remanence coefficient. The first-order compensation current is calculated based on the first-order remanence coefficient and the first-order coil constant. After applying the corresponding current to the uniform coil and the first-order coil, the displacement scanning magnetic field measurement is performed to obtain the compensated magnetic field distribution. The compensated magnetic field distribution is then fitted twice to obtain the second-order remanence coefficient.

[0014] Preferably, the process of obtaining the compensation current of the uniform coil, the first-order coil, and the second-order coil includes: The applied current of the uniform coil is calculated based on the uniform coil constant and the target main magnetic field. The first-order compensation current is calculated based on the first-order remanent magnetization coefficient and the first-order coil constant. The second-order compensation current is calculated based on the second-order remanent magnetization coefficient and the second-order coil constant.

[0015] Compared with the prior art, the present invention has the following advantages and technical effects: This invention achieves precise displacement control of the magnetic field sensor position and automated scanning measurement of the spatial magnetic field distribution through unified control of the displacement platform, magnetic field sensor, and coil current source by a host computer. This avoids positioning errors caused by manual operation and significantly improves measurement efficiency and repeatability. At the same time, by applying different currents to the uniform coil, first-order coil, and second-order coil and performing polynomial fitting of the spatial magnetic field distribution, the constants of the uniform coil, first-order coil, and second-order coil can be automatically obtained. Based on this, the first-order remanence coefficient and second-order remanence coefficient are extracted, and the compensation current of each coil is calculated. This achieves accurate establishment of the target magnetic field and automatic compensation of first-order and second-order remanence, effectively solving the problems of lack of precise displacement control, low degree of automation, and difficulty in calibrating multi-order coil constants and compensating for remanence in the prior art. Attached Figure Description

[0016] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram of the device structure according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the method flow according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating the magnetic field acquisition module according to an embodiment of the present invention; Figure 4 This is a flowchart illustrating the uniform coil constant calibration unit according to an embodiment of the present invention. Figure 5 This is a flowchart illustrating the first-order remanence coefficient acquisition unit according to an embodiment of the present invention. Figure 6 This is a flowchart illustrating the first-order coil constant calibration unit according to an embodiment of the present invention. Figure 7 This is a flowchart illustrating the second-order remanence coefficient acquisition unit according to an embodiment of the present invention; Figure 8 This is a flowchart illustrating the second-order coil constant calibration unit according to an embodiment of the present invention. Detailed Implementation

[0017] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0018] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0019] Example 1 This embodiment provides an automatic coil constant measurement device based on host computer control, including: The displacement control module is used to control the fluxgate sensor probe to move along the measurement axis to various measurement positions to obtain spatial position data; The magnetic field acquisition module is used to acquire magnetic field signals at each measurement location, obtain the average magnetic field value at the corresponding location, and establish a spatial magnetic field distribution function. The coil drive module is used to apply a set DC current to the uniform coil, the first-order coil, and the second-order coil, respectively. The constant calibration module is used to obtain the uniform coil constant, first-order coil constant, second-order coil constant, first-order remanence coefficient, and second-order remanence coefficient based on the spatial magnetic field distribution function and the magnetic field response under different coil currents. The compensation calculation module is used to calculate the compensation current of the uniform coil, the first-order coil, and the second-order coil based on the constant of the uniform coil, the constant of the first-order coil, the constant of the second-order coil, and the remanence coefficient of the first-order coil and the remanence coefficient of the second-order coil.

[0020] Furthermore, the displacement control module includes: The host computer is used to send displacement commands; The controller, which is electrically connected to the host computer, is used to receive displacement commands and output step control signals; A stepper motor, electrically connected to a controller, is used to receive stepping control signals and generate stepping motion; The displacement platform is connected to the stepper motor drive and is used to move along the measuring axis under the drive of the stepper motor. The clamp is fixed to the displacement platform; A glass tube, installed in a fixture, is used to move the fluxgate sensor probe along with the displacement platform to position the fluxgate sensor probe at various measurement locations.

[0021] Furthermore, such as Figure 3 As shown, the magnetic field acquisition module includes: The fluxgate sensor probe is used to move to various measurement positions under the drive of the displacement control module and output the magnetic field signal at the corresponding position; The fluxgate magnetometer is electrically connected to the fluxgate sensor probe and is used to read the magnetic field signal and convert it into a magnetic field reading. The host computer is also electrically connected to the fluxgate magnetometer to receive magnetic field readings and average the multiple sampled values ​​at each measurement location to obtain the average magnetic field value at the corresponding location, thereby establishing the spatial magnetic field distribution function.

[0022] Furthermore, the coil drive module includes: A current source is electrically connected to a uniform coil, a first-order coil, and a second-order coil, respectively, and is used to output an adjustable DC current to each coil. The controller is also electrically connected to a current source to receive current control commands from the host computer and control the current source to output a set current to a designated coil.

[0023] Furthermore, the constant calibration module includes: like Figure 4 As shown, the uniform coil constant calibration unit is used to control the displacement control module to move the fluxgate sensor probe to the center position of the air chamber, and to control the coil drive module to apply multiple different DC currents to the uniform coil. The uniform coil constant is obtained by linear fitting based on the average magnetic field value at the center position of the air chamber under each current. like Figure 5 As shown, the first-order remanence coefficient acquisition unit is used to calculate the current required to be applied to the uniform coil based on the target main magnetic field and the uniform coil constant. After the uniform coil is loaded with current, the displacement control module and the magnetic field acquisition module are controlled to perform displacement scanning measurement to obtain the spatial magnetic field distribution under the main magnetic field condition. The spatial magnetic field distribution is then linearly fitted to obtain the first-order remanence coefficient. like Figure 6 As shown, the first-order coil constant calibration unit is used to control the coil drive module to apply multiple different DC currents to the first-order coil. Under each current value, the displacement control module and the magnetic field acquisition module are controlled to perform displacement scanning measurement. The first-order gradient value is extracted by linear fitting of each group of magnetic field distributions. The first-order coil constant is obtained by fitting the linear relationship between the first-order gradient value and the first-order coil current. like Figure 7 As shown, the second-order remanence coefficient acquisition unit is used to calculate the first-order compensation current based on the first-order remanence coefficient and the first-order coil constant. After the control coil driving module applies the corresponding current to the uniform coil and the first-order coil, the control displacement module and the magnetic field acquisition module perform displacement scanning measurement to obtain the compensated magnetic field distribution. The compensated magnetic field distribution is then fitted with a quadratic polynomial to obtain the second-order remanence coefficient. like Figure 8 As shown, the second-order coil constant calibration unit is used to control the coil drive module to apply multiple different DC currents to the second-order coil under the condition that the uniform coil and the first-order coil maintain the compensation current. Under each current value, the displacement control module and the magnetic field acquisition module are controlled to perform displacement scanning measurement, and the corresponding second-order gradient value is extracted by performing secondary fitting on each group of magnetic field distributions. The second-order coil constant is obtained by fitting the second-order gradient value and the second-order coil current according to the linear relationship between the second-order gradient value and the second-order coil current.

[0024] Furthermore, the compensation calculation module includes: The uniform coil compensation current calculation unit is used to calculate the applied current of the uniform coil based on the uniform coil constant and the target main magnetic field. The first-order coil compensation current calculation unit is used to calculate the first-order compensation current based on the first-order remanence coefficient and the first-order coil constant. The second-order coil compensation current calculation unit is used to calculate the second-order compensation current based on the second-order remanence coefficient and the second-order coil constant. The compensation calculation module is also used to output the calculated compensation currents to the coil drive module to apply the corresponding currents to the uniform coil, the first-order coil and the second-order coil.

[0025] As a preferred implementation, the measuring device in this embodiment includes a host computer, a controller, a stepper motor, a displacement platform, a fluxgate sensor probe, a multi-layer magnetic shielding cylinder, a uniform coil, a first-order coil, a second-order coil, and a current source. The multi-layer magnetic shielding cylinder contains a uniform coil, a first-order coil, and a second-order coil, which are arranged coaxially. The displacement platform is set in the measuring axis direction of the multi-layer magnetic shielding cylinder. The fluxgate sensor probe is installed on the displacement platform and moves along the measuring axis direction under the drive of the displacement platform to perform spatial scanning measurement of the coil magnetic field. The stepper motor is connected to the displacement platform for driving the displacement platform to move along the measurement axis. The controller is electrically connected to the host computer, the stepper motor and the current source respectively. It is used to receive control commands issued by the host computer, control the stepper motor to drive the displacement platform to move, and control the current source to output the set current to the uniform coil, the first-order coil and / or the second-order coil. The fluxgate sensor probe is used to measure the magnetic field signal at the scanning position and send the measurement data to the host computer so that the host computer can calculate the coil constant and the spatial distribution parameters of the magnetic field.

[0026] The uniform coil, the first-order coil, and the second-order coil are arranged coaxially along the same central axis.

[0027] The displacement platform is set along the measurement axis, which coincides with the central axis of the uniform coil, the first-order coil, and the second-order coil.

[0028] This embodiment uses a control displacement platform to drive a fluxgate sensor probe to scan along the measurement axis, acquiring the spatial distribution of the magnetic field. By applying different currents to a uniform coil, a first-order coil, and a second-order coil and fitting the data, the corresponding coil constants and remanence parameters are obtained. Further calculation of the compensation current for each coil enables the establishment of the target magnetic field and multi-order remanence compensation. This embodiment features high automation, high positioning accuracy, and good repeatability, making it suitable for magnetic field calibration, remanence compensation, and magnetic field control of precision measuring devices such as atomic magnetometers in weak magnetic environments.

[0029] More specifically, such as Figure 1 As shown, the device in this embodiment includes a controller 1, a stepper motor 2, a displacement platform 3, a clamp 4, a glass tube 5, a multi-layer magnetic shielding cylinder 6, a Lee-Whiting 9449 second-order coil 7, a fluxgate sensor probe 8, a Lee-Whiting 9449 first-order coil 9, a Lee-Whiting 9449 uniform coil 10, a current source 11, a host computer 12, and a fluxgate magnetometer 13.

[0030] The host computer 12 is connected to the controller 1, the current source 11 and the fluxgate magnetometer 13 respectively, and is used to send displacement control commands and current control commands, and receive magnetic field measurement data. The controller 1 is connected to the stepper motor 2 and is used to convert the displacement command sent by the host computer 12 into the corresponding step control signal and output it to the stepper motor 2. Stepper motor 2 is connected to displacement platform 3 and is used to drive displacement platform 3 to perform linear displacement along the measuring axis direction; The clamp 4 is fixed on the displacement platform 3 and is used to clamp the glass tube 5; A fluxgate sensor probe 8 is installed at one end of the glass tube 5. The fluxgate sensor probe 8 is used to measure the magnetic field value at the position to be measured. The fluxgate sensor probe 8 is connected to the fluxgate magnetometer 13 through a signal line. The fluxgate magnetometer 13 is used to read the magnetic field signal output by the fluxgate sensor probe 8 and transmit the corresponding magnetic field reading to the host computer 12. A multi-layer magnetic shielding cylinder 6 is installed on the outside of the device to shield the external geomagnetic field and stray magnetic fields in the environment; The Lee-Whiting 9449 uniform coil 10, the Lee-Whiting 9449 first-order coil 9, and the Lee-Whiting 9449 second-order coil 7 are disposed inside the multi-layer magnetic shielding cylinder 6 and arranged along the same axis. The current source 11 is connected to the Lee-Whiting9449 uniform coil 10, the Lee-Whiting9449 first-order coil 9 and the Lee-Whiting9449 second-order coil 7 respectively, and is used to provide adjustable DC current to each coil.

[0031] The displacement control section is a key component of the device in this embodiment, and it includes a host computer 12, a controller 1, a stepper motor 2, a displacement platform 3, a fixture 4, a glass tube 5, and a fluxgate sensor probe 8. The displacement control section is used to drive the fluxgate sensor probe 8 to perform precise, stable, and repeatable displacement along the measurement axis, thereby realizing automatic scanning measurement of the magnetic field sensor at different spatial measurement points.

[0032] Specifically, the host computer 12 sends displacement commands to the controller 1 via a serial port. The displacement commands include one or more of the following: displacement direction, displacement steps, displacement speed, return to zero command, and stop command.

[0033] Controller 1 generates corresponding stepping control signals based on displacement commands and outputs them to stepper motor 2.

[0034] After receiving the stepping control signal, stepper motor 2 drives displacement platform 3 to move linearly in a preset direction and with a preset step length. This forms a displacement execution link of "host computer 12 - controller 1 - stepper motor 2 - displacement platform 3", realizing automatic position adjustment of displacement platform 3.

[0035] The clamp 4 is fixedly mounted on the displacement platform 3, the glass tube 5 is installed in the clamp 4, and the fluxgate sensor probe 8 is located at the front end of the glass tube 5 and moves along the measurement axis with the glass tube 5 as a whole. Through this structure, the displacement command issued by the host computer 12 can be ultimately transmitted to the fluxgate sensor probe 8, causing the fluxgate sensor probe 8 to move point by point within the target area according to a preset step size and complete spatial positioning. Compared to manually moving the magnetic field probe, this embodiment achieves automatic control of the probe position through the displacement platform 3, which helps to reduce positional deviations and attitude changes introduced by manual operation, and improves the spatial positioning accuracy and repeatability of magnetic field measurements.

[0036] Furthermore, the displacement platform 3 is preferably a high-precision linear displacement platform, whose direction of motion is consistent with the axis of the glass tube 5, so that the fluxgate sensor probe 8 can scan along the axis of the coil to be tested.

[0037] Driven by stepper motor 2, displacement platform 3 can perform various operations including homing, single-step feed, multi-step feed, fixed-point positioning, and continuous scanning. Homing returns the displacement platform 3 to its initial reference position; single-step feed controls the fluxgate sensor probe 8 to move one measurement point distance according to a preset minimum step size; multi-step feed quickly moves the platform to the vicinity of the target area; fixed-point positioning moves the fluxgate sensor probe 8 to a predetermined measurement position and keeps it stationary; and continuous scanning sequentially traverses multiple measurement points within a set travel range. If the target displacement sent by the host computer is... The single-step displacement equivalent of the displacement platform is The controller then outputs the number of steps to the stepper motor. Satisfy the following formula: in, For the target displacement, This refers to the displacement of a single step driven by a stepper motor on a displacement platform. This is the number of step pulses output by the controller. The minimum control step size can be set to 0.1mm.

[0038] Example 2 like Figure 2 As shown, based on the same inventive concept, this embodiment also provides an automatic measurement method for coil constant based on host computer control, including: Based on displacement scanning magnetic field measurements and the magnetic field responses of applying different DC currents to a uniform coil, a first-order coil, and a second-order coil, the constants of the uniform coil, the first-order coil, the second-order coil, the first-order remanence coefficient, and the second-order remanence coefficient are obtained. Based on the constants of the uniform coil, the first-order coil, the second-order coil, the first-order remanence coefficient, and the second-order remanence coefficient, the compensation currents of the uniform coil, the first-order coil, and the second-order coil are obtained to establish the target magnetic field and perform multi-order remanence compensation.

[0039] Furthermore, the process of obtaining displacement scanning magnetic field measurements includes: Set the initial position of the displacement platform and the center position of the air chamber, determine the array of measurement positions to be traversed, control the displacement platform to move to each measurement position in sequence, collect magnetic field data at each measurement position and average them to obtain the average magnetic field value of the corresponding measurement position, and establish the spatial magnetic field distribution function.

[0040] Specifically, the process of controlling the displacement platform to move sequentially to each measurement position includes: The host computer sends displacement commands to the controller via a serial port. The controller outputs step control signals to the stepper motor according to the displacement commands. The stepper motor drives the displacement platform to move according to a preset step size. The ratio of the target displacement sent by the host computer to the single-step displacement equivalent of the displacement platform is determined as the number of step pulses output by the controller.

[0041] Furthermore, the process of obtaining the uniform coil constant, the first-order coil constant, the second-order coil constant, and the first-order and second-order remanence coefficients includes: Apply different DC currents to the uniform coil, control the displacement platform to move to the center position of the air chamber, record the magnetic field value at the center position of the air chamber under each current, establish the correspondence between the uniform coil current and the central magnetic field, and fit to obtain the uniform coil constant. Apply different DC currents to the first-order coil, perform displacement scanning magnetic field measurement at each current value, perform a fitting of each group of magnetic field distributions to extract the corresponding first-order gradient values, establish the correspondence between the first-order gradient and the first-order coil current, and obtain the first-order coil constant through fitting. Under the condition of maintaining compensation current in uniform coil and first-order coil, different DC currents are applied to second-order coil. Displacement scanning magnetic field measurement is performed at each current value. The corresponding second-order gradient value is extracted by second-order fitting of each group of magnetic field distributions. The correspondence between second-order gradient and second-order coil current is established, and the second-order coil constant is obtained by fitting. The required current to be applied to the uniform coil is calculated based on the target main magnetic field and the constant of the uniform coil. After the current is applied to the uniform coil, the displacement scanning magnetic field measurement is performed to obtain the spatial magnetic field distribution under the main magnetic field condition. The spatial magnetic field distribution is fitted once to obtain the first-order remanence coefficient. The first-order compensation current is calculated based on the first-order remanence coefficient and the first-order coil constant. After applying the corresponding current to the uniform coil and the first-order coil, the displacement scanning magnetic field measurement is performed to obtain the compensation magnetic field distribution. The compensation magnetic field distribution is then fitted twice to obtain the second-order remanence coefficient.

[0042] Specifically, the process of performing a second-order fitting of the compensated magnetic field distribution includes: The compensated magnetic field distribution is fitted as a function containing constant terms, first-order terms, and second-order terms, where the coefficient of the second-order term is the second-order remanence coefficient.

[0043] Furthermore, the process of obtaining the compensation current for the uniform coil, the first-order coil, and the second-order coil includes: The current applied to the uniform coil is calculated based on the uniform coil constant and the target main magnetic field. The first-order compensation current is calculated based on the first-order remanent magnetization coefficient and the first-order coil constant. The second-order compensation current is calculated based on the second-order remanent magnetization coefficient and the second-order coil constant.

[0044] As a preferred implementation method, the method of this embodiment includes the following steps: Step 1: Construct a displacement control module. The displacement control module includes a displacement platform, a stepper motor, and a controller. The host computer sends displacement commands to the controller via a serial port. The controller outputs step control signals to the stepper motor according to the displacement commands. The stepper motor drives the displacement platform to move along the measurement axis, thereby realizing precise displacement control of the magnetic field sensor in space. Step 2: Set the initial position of the displacement platform and the center position of the air chamber, and determine the array of measurement positions to be traversed. The displacement platform is controlled to return to its initial position, and the corresponding magnetic field value is collected at each measurement position to obtain the spatial distribution function of the magnetic field as a function of position. ; Step 3: Determine the DC current array that the uniform coil needs to traverse. The displacement platform is moved to the center of the air chamber, and different current values ​​are applied to the uniform coil. The magnetic field value at the center of the air chamber under each current is recorded. The correspondence between the current of the uniform coil and the central magnetic field is established, and the constant of the uniform coil is obtained. ; Step 4: Determine the magnitude of the target main magnetic field. According to the uniform coil constant Calculate the current required to be applied to the uniform coil, and perform the displacement scan measurement in step 2 after the current is applied to the uniform coil to obtain the first-order remanent magnetization distribution under the main magnetic field conditions. Perform a first-order fitting on the first-order remanent magnetization distribution to obtain the first-order remanent magnetization coefficient. ; Step 5: Determine the DC current array that the first-order coil needs to traverse. Different current values ​​are applied to the first-order coil, and displacement scanning measurements are performed at each current value. The magnetic field distribution of each group is fitted once, the corresponding first-order gradient value is extracted, and the correspondence between the first-order gradient and the first-order coil current is established to obtain the first-order coil constant. ; Step 6, based on the first-order remanence coefficient obtained in Step 4 and the first-order coil constant obtained in step 5 Calculate the first-order compensation current and apply the corresponding current to the uniform coil and the first-order coil. Then, perform the displacement scan measurement in step 2 again to obtain the compensated magnetic field distribution. Perform a second-order fitting on the magnetic field distribution to obtain the second-order remanence coefficient. and additional first-order remanence coefficient ; Step 7: Determine the DC current array that the second-order coil needs to traverse. Under the condition that the uniform coil and the first-order coil maintain the compensation current, different current values ​​are applied to the second-order coil, and the displacement scanning measurement in step 2 is performed under each current value. The magnetic field distribution of each group is then fitted twice, the corresponding second-order gradient value is extracted, and the correspondence between the second-order gradient and the second-order coil current is established to obtain the second-order coil constant. ; Step 8, based on the uniform coil constant First-order coil constant Second-order coil constant The target main magnetic field and remanent magnetization fitting results are used to calculate the applied currents for the uniform coil, first-order coil and second-order coil respectively, and the corresponding current values ​​are applied to the three types of coils to achieve the establishment of the target magnetic field and multi-order remanent magnetization compensation.

[0045] Furthermore, the target displacement sent by the host computer in step 1 is The single-step displacement equivalent of the displacement platform is The controller then outputs the number of steps to the stepper motor. Satisfy the following formula: in, For the target displacement, This refers to the displacement of a single step driven by a stepper motor on a displacement platform. This represents the number of step pulses output by the controller.

[0046] Furthermore, in step 2, the initial position of the displacement platform is set to... and the center position of the air chamber The initial position is... Used as the starting reference position for displacement scanning, the center position of the air chamber. This is used as the position for subsequent uniform coil center magnetic field measurement. Then, based on the preset scan range and measurement step size, the array of measurement positions to be traversed is determined. ,in, Indicates the first One measurement location, This indicates the total number of measurement locations. The sampling rate of the fluxgate sensor is... The magnetic field sampling time at a single measurement location is The number of samples taken at that measurement location satisfy: For the Measurement locations Collected from The average magnetic field value at that location is obtained by averaging the magnetic field data. : in, The sampling rate of the fluxgate sensor. The magnetic field sampling time at a single measurement location. This represents the number of samples taken at this measurement location. Indicates the first Measurement locations The average magnetic field value at that location, For the first Measurement locations First The magnetic field value obtained from the second sampling; Furthermore, a spatial magnetic field distribution function can be established, denoted as: .

[0047] After the displacement platform moves to a target measurement position, it first waits for a preset time to reduce the disturbance caused by mechanical movement. Then, it continuously samples the output signal of the fluxgate sensor within a preset sampling time and averages the sampling results to obtain the magnetic field value of the corresponding measurement position.

[0048] Furthermore, step 3 includes determining the array of DC currents that the uniform coil needs to traverse: The control displacement platform is moved to the center of the air chamber, positioning the fluxgate sensor probe at the center of the air chamber, and different current values ​​are sequentially applied to the uniform coil. Record the magnetic field value corresponding to the center position of the air chamber under each current value. Establish the correspondence between the current in the uniform coil and the central magnetic field: in, For the uniform coil One current value For a uniform coil in the first... The magnetic field value generated at the center of the air chamber under a given current value. The constant of a uniform coil is expressed in nT / mA. This is the background magnetic field bias term. This is the current sequence number.

[0049] In this embodiment, data obtained at multiple current points are... The data is subjected to a linear fit, and the slope obtained from the fit is used as the constant of the uniform coil. The intercept obtained from the fitting is used as the background magnetic field bias term. .

[0050] Furthermore, step 4 includes determining the magnitude of the target main magnetic field. Based on the uniform coil constant obtained in step 3 Calculate the current required to generate the target main magnetic field using a uniform coil. : in, The magnitude of the target main magnetic field, The current required to generate the target main magnetic field for a uniform coil.

[0051] Applying current to a uniform coil Then, the displacement scanning measurement in step 1 is performed to obtain the spatial magnetic field distribution under the main magnetic field conditions. A first-order remanent magnetization distribution function is obtained by fitting the spatial magnetic field distribution: in, For the first-order fitting constant term, The first-order remanence coefficient, in units of , Applying current to a uniform coil The first-order remanent magnetization distribution function was then obtained.

[0052] In this embodiment, the first-order remanence coefficient is obtained by performing a linear fit between the magnetic field value and the position coordinates at each measurement location. .

[0053] Furthermore, step 5 includes the following formula: in, It is the number of current groups that need to be traversed. For a first-order coil One current value For the first The spatial distribution function of the magnetic field measured at each current value. This corresponds to the first-order gradient value. This is the first-order coil constant, with units of nT / mm / mA. This is the first-order gradient bias term.

[0054] In this embodiment, data obtained at multiple current points are... The data is subjected to a linear fit, and the slope obtained from the fit is used as the constant of the first-order coil. .

[0055] Furthermore, in step 6, based on the obtained first-order remanence coefficient... and the first-order coil constant obtained in step 4 Calculate the compensation current of the first-order coil. : in, This is the compensation current for the first-order coil.

[0056] Apply corresponding currents to the uniform coil and the first-order coil respectively. and The displacement scan measurement in step 1 is performed again to obtain the compensated magnetic field distribution. A second fitting is then performed on the magnetic field distribution to obtain: in, For the quadratic fitting constant term, To add the first-order remanence coefficient, the unit is , This is the second-order remanence coefficient, in units of... , This is the magnetic field distribution function obtained after first-order compensation.

[0057] In this embodiment, the coefficients of the quadratic term obtained by quadratic fitting are used as the second-order remanence coefficient. The coefficients of the first-order term obtained by the quadratic fitting reflect the remaining first-order components after the first-order compensation.

[0058] Furthermore, step 7 includes determining the array of DC currents that the second-order coil needs to traverse: Maintaining the target main magnetic field current in a uniform coil First-order coil maintaining compensation current Under these conditions, different current values ​​are applied sequentially to the second-order coil. And perform the displacement scan measurement in step 1 at each current value to obtain the corresponding magnetic field spatial distribution function. .

[0059] For each group of magnetic field spatial distribution functions Perform a second-order fitting and extract the corresponding second-order gradient values. It satisfies: in, For the second-order coil One current value For the first The spatial distribution function of the magnetic field measured at each current value. This corresponds to the second-order gradient value. The constant of the second-order coil is given by units of 1. , This is the second-order gradient bias term.

[0060] In this embodiment, data obtained at multiple current points are... The data is subjected to a linear fit, and the slope obtained from the fit is used as the constant of the second-order coil. .

[0061] Furthermore, based on the uniform coil constant First-order coil constant Second-order coil constant In addition to the main magnetic field parameters and remanence parameters obtained from the aforementioned fitting, the applied currents corresponding to the uniform coil, first-order coil and second-order coil are calculated respectively, and the corresponding currents are applied to the three types of coils, thereby realizing the establishment of the target main magnetic field and multi-order remanence compensation.

[0062] In this process, a uniform coil applies current to establish the target main magnetic field, a first-order coil applies current to compensate for the first-order remanent magnetization component, and a second-order coil applies current to compensate for the second-order remanent magnetization component. Through this process, the spatial inhomogeneity of the magnetic field within the target area can be effectively reduced, and the uniformity and stability of the magnetic field environment within the target area can be improved.

[0063] This embodiment addresses the common practice of manually moving the magnetic field sensor, manually reading data, and manually recording results when measuring coil constants. This method suffers from low automation, insufficient spatial positioning accuracy, and susceptibility to human error in positioning and reading, leading to low measurement efficiency, poor repeatability, and difficulty in continuously characterizing the spatial distribution of the magnetic field. This embodiment employs a displacement control console to precisely control the position of the magnetic field sensor. The displacement path, step size, and sampling position are programmed by a host computer, automating and standardizing the magnetic field measurement process, significantly improving measurement efficiency and consistency. Furthermore, this embodiment can continuously acquire magnetic field data at multiple spatial locations and quantitatively determine the coil constant based on multiple sets of current-magnetic field measurement results, thereby reducing the impact of single-point measurement errors and improving the accuracy and stability of coil constant measurement. Moreover, this embodiment is not only applicable to uniform field coil constant measurement but can also be extended to the performance testing of gradient coils and magnetic field compensation coils, demonstrating strong versatility and engineering application value.

[0064] This embodiment enables automated, high-precision measurement of the magnetic field response characteristics of the tested coil, accurately obtaining the coil constant and its spatial distribution characteristics. This embodiment relies on a host computer, controller, stepper motor, and displacement platform to form a displacement control system. The host computer sends serial port control commands, causing the stepper motor to drive the displacement platform to move precisely according to a preset step size, thereby driving the magnetic field sensor to scan and measure point by point within the measured area. Simultaneously, by combining the magnetic field acquisition module and data processing module, a correspondence between the coil excitation current and the magnetic field response can be established, and the coil constant can be obtained through fitting calculations. This method not only enables single-point coil constant measurement but also obtains magnetic field distribution information of the coil within the target area, which is beneficial for further analysis of the coil's magnetic field uniformity, gradient characteristics, and central region magnetic field performance, providing a basis for coil design optimization and magnetic field compensation.

[0065] This embodiment uses a host computer to uniformly control the displacement platform, magnetic field sensor, and coil current source, achieving precise movement of the magnetic field measurement position, automatic acquisition and processing of magnetic field data, and, by combining spatial magnetic field distribution fitting, completing the coil constant calibration and remanence compensation of uniform coils, first-order coils, and second-order coils. The proposed device and method are not only suitable for automatic coil constant measurement but can also be widely applied to precise displacement control measurement scenarios in various magnetically shielded environments. It possesses good versatility and scalability, and can be applied to fields such as magnetic shielding system debugging, geomagnetic magnetometer calibration, non-destructive magnetic testing, mineral resource exploration, and magnetic field measurement.

[0066] The automatic coil constant measurement method based on host computer control provided in this embodiment has all the advantages of the automatic coil constant measurement device based on host computer control provided in Embodiment 1.

[0067] Example 3 This embodiment also discloses a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in Embodiment 1.

[0068] Example 4 This embodiment also discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method described in Embodiment 1.

[0069] Example 5 This embodiment also discloses a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in Embodiment 1.

[0070] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An automatic coil constant measuring device based on host computer control, characterized in that, include: The displacement control module is used to control the fluxgate sensor probe to move along the measurement axis to various measurement positions to obtain spatial position data; The magnetic field acquisition module is used to acquire magnetic field signals at each measurement location, obtain the average magnetic field value at the corresponding location, and establish a spatial magnetic field distribution function. The coil drive module is used to apply a set DC current to the uniform coil, the first-order coil, and the second-order coil, respectively. The constant calibration module is used to obtain the uniform coil constant, first-order coil constant, second-order coil constant, first-order remanence coefficient, and second-order remanence coefficient based on the spatial magnetic field distribution function and the magnetic field response under different coil currents. The compensation calculation module is used to calculate the compensation current of the uniform coil, the first-order coil, and the second-order coil based on the uniform coil constant, the first-order coil constant, the second-order coil constant, the first-order remanent magnetization coefficient, and the second-order remanent magnetization coefficient.

2. The apparatus according to claim 1, characterized in that, The displacement control module includes: The host computer is used to send displacement commands; The controller is electrically connected to the host computer and is used to receive the displacement command and output the step control signal. A stepper motor, electrically connected to the controller, is used to receive the stepping control signal and generate stepping motion; A displacement platform, driven by the stepper motor, is used to move along the measuring axis direction under the drive of the stepper motor. The clamp is fixed to the displacement platform; A glass tube, installed in the fixture, is used to move the fluxgate sensor probe along with the displacement platform to position the fluxgate sensor probe at various measurement positions.

3. The apparatus according to claim 2, characterized in that, The magnetic field acquisition module includes: The fluxgate sensor probe is used to move to each measurement position under the drive of the displacement control module and output the magnetic field signal at the corresponding position; A fluxgate magnetometer, electrically connected to the fluxgate sensor probe, is used to read the magnetic field signal and convert it into a magnetic field reading; The host computer is also electrically connected to the fluxgate magnetometer to receive the magnetic field readings and average the multiple sampled values ​​at each measurement location to obtain the average magnetic field value at the corresponding location, thereby establishing the spatial magnetic field distribution function.

4. The apparatus according to claim 2, characterized in that, The coil driving module includes: A current source is electrically connected to the uniform coil, the first-order coil, and the second-order coil, respectively, and is used to output an adjustable DC current to each coil. The controller is also electrically connected to the current source and is used to receive current control commands issued by the host computer and control the current source to output a set current to a designated coil.

5. The apparatus according to claim 1, characterized in that, The constant calibration module includes: The uniform coil constant calibration unit is used to control the displacement control module to move the fluxgate sensor probe to the center position of the air chamber, and to control the coil drive module to apply multiple different DC currents to the uniform coil. The uniform coil constant is obtained by linear fitting based on the average magnetic field value at the center position of the air chamber under each current. The first-order remanence coefficient acquisition unit is used to calculate the current required to be applied to the uniform coil based on the target main magnetic field and the constant of the uniform coil. After the current is applied to the uniform coil, the displacement control module and the magnetic field acquisition module are controlled to perform displacement scanning measurement to obtain the spatial magnetic field distribution under the main magnetic field condition, and the spatial magnetic field distribution is linearly fitted to obtain the first-order remanence coefficient. The first-order coil constant calibration unit is used to control the coil drive module to apply multiple different DC currents to the first-order coil, control the displacement control module and the magnetic field acquisition module to perform displacement scanning measurement under each current value, perform a linear fitting of each group of magnetic field distributions to extract the corresponding first-order gradient value, and fit the first-order gradient value and the first-order coil current according to the linear relationship between the first-order gradient value and the first-order coil current to obtain the first-order coil constant. The second-order remanent magnetization coefficient acquisition unit is used to calculate the first-order compensation current based on the first-order remanent magnetization coefficient and the first-order coil constant, control the coil driving module to apply the corresponding current to the uniform coil and the first-order coil, control the displacement control module and the magnetic field acquisition module to perform displacement scanning measurement, obtain the compensated magnetic field distribution, and perform quadratic polynomial fitting on the compensated magnetic field distribution to obtain the second-order remanent magnetization coefficient. The second-order coil constant calibration unit is used to control the coil drive module to apply multiple different DC currents to the second-order coil under the condition that the uniform coil and the first-order coil maintain the compensation current. Under each current value, the displacement control module and the magnetic field acquisition module are controlled to perform displacement scanning measurement, and the corresponding second-order gradient value is extracted by performing secondary fitting on each group of magnetic field distributions. The second-order coil constant is obtained by fitting the second-order gradient value and the second-order coil current according to the linear relationship between the second-order gradient value and the second-order coil current.

6. The apparatus according to claim 1, characterized in that, The compensation calculation module includes: A uniform coil compensation current calculation unit is used to calculate the applied current of the uniform coil based on the uniform coil constant and the target main magnetic field. A first-order coil compensation current calculation unit is used to calculate the first-order compensation current based on the first-order remanence coefficient and the first-order coil constant. The second-order coil compensation current calculation unit is used to calculate the second-order compensation current based on the second-order remanence coefficient and the second-order coil constant. The compensation calculation module is also used to output the calculated compensation currents to the coil drive module to apply corresponding currents to the uniform coil, the first-order coil and the second-order coil.

7. An automatic measurement method for coil constant based on host computer control, characterized in that, include: Based on displacement scanning magnetic field measurements and the magnetic field responses of applying different DC currents to a uniform coil, a first-order coil, and a second-order coil, the constants of the uniform coil, the first-order coil, the second-order coil, the first-order remanence coefficient, and the second-order remanence coefficient are obtained. Based on the uniform coil constant, the first-order coil constant, the second-order coil constant, the first-order remanence coefficient, and the second-order remanence coefficient, the compensation currents of the uniform coil, the first-order coil, and the second-order coil are obtained to establish the target magnetic field and perform multi-order remanence compensation.

8. The method according to claim 7, characterized in that, The process of obtaining the displacement scanning magnetic field measurement includes: Set the initial position of the displacement platform and the center position of the air chamber, determine the array of measurement positions to be traversed, control the displacement platform to move to each measurement position in sequence, collect magnetic field data at each measurement position and average them to obtain the average magnetic field value of the corresponding measurement position, and establish the spatial magnetic field distribution function.

9. The method according to claim 7, characterized in that, The process of obtaining the uniform coil constant, the first-order coil constant, the second-order coil constant, and the first-order and second-order remanence coefficients includes: Apply different DC currents to the uniform coil, control the displacement platform to move to the center position of the air chamber, record the magnetic field value at the center position of the air chamber under each current, establish the correspondence between the uniform coil current and the central magnetic field, and fit to obtain the uniform coil constant. Different DC currents are applied to the first-order coil, and the displacement scanning magnetic field measurement is performed at each current value. The first-order gradient value is extracted by fitting each group of magnetic field distributions, and the correspondence between the first-order gradient and the first-order coil current is established. The first-order coil constant is obtained by fitting. Under the condition that the uniform coil and the first-order coil maintain the compensation current, different DC currents are applied to the second-order coil. The displacement scanning magnetic field measurement is performed at each current value. The second-order gradient value is extracted by the second fitting of each group of magnetic field distributions. The correspondence between the second-order gradient and the second-order coil current is established, and the second-order coil constant is obtained by fitting. The required current to be applied to the uniform coil is calculated based on the target main magnetic field and the constant of the uniform coil. After the current is applied to the uniform coil, the displacement scanning magnetic field measurement is performed to obtain the spatial magnetic field distribution under the main magnetic field condition. The spatial magnetic field distribution is fitted once to obtain the first-order remanence coefficient. The first-order compensation current is calculated based on the first-order remanence coefficient and the first-order coil constant. After applying the corresponding current to the uniform coil and the first-order coil, the displacement scanning magnetic field measurement is performed to obtain the compensated magnetic field distribution. The compensated magnetic field distribution is then fitted twice to obtain the second-order remanence coefficient.

10. The method according to claim 7, characterized in that, The process of obtaining the compensation current for the uniform coil, the first-order coil, and the second-order coil includes: The applied current of the uniform coil is calculated based on the uniform coil constant and the target main magnetic field. The first-order compensation current is calculated based on the first-order remanent magnetization coefficient and the first-order coil constant. The second-order compensation current is calculated based on the second-order remanent magnetization coefficient and the second-order coil constant.