Magnetic field control method and device suitable for coil, terminal equipment and storage medium

By monitoring the current and magnetic field signals of the coil, generating current and magnetic field adjustment signals, and building a driving voltage signal that compensates the magnetic field, the problem of the coil being affected by external interference magnetic fields is solved, and more efficient magnetic field control and equipment stability are achieved.

CN120378804APending Publication Date: 2025-07-25MEASUREMENT CENT OF GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510441479.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the prior art, the coil is affected by external interference magnetic field, causing the magnetic field to deviate from expectations, and cannot effectively offset the impact of the interference magnetic field, affecting the stability and performance of the equipment.

Method used

By monitoring the current and magnetic field signals of the coil, the current and magnetic field adjustment signals are generated, and the driving voltage signal is constructed to compensate the magnetic field. The driving coil generates a compensated magnetic field with the same intensity and opposite direction as the external interference magnetic field.

Benefits of technology

Effectively compensate the current and magnetic field deviation of the coil, improve the accuracy and stability of magnetic field control, and improve the operating stability and performance of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378804A_ABST
    Figure CN120378804A_ABST
Patent Text Reader

Abstract

The invention discloses a magnetic field control method and device suitable for a coil, terminal equipment and a storage medium, and belongs to the technical field of coil magnetic field control. The magnetic field control method suitable for the coil comprises the steps that the current current in the coil and the current magnetic field signal corresponding to the coil are monitored at the same time; according to the invention, in addition to the current change of the coil and the change of the magnetic field, the driving voltage signal used for constructing the compensation magnetic field of the coil is generated according to the current adjustment signal and the magnetic field adjustment signal, and then the compensation magnetic field of the coil is generated according to the current adjustment signal and the magnetic field adjustment signal. The coil can be driven to generate a compensation magnetic field based on the driving voltage signal, the current deviation of the coil can be effectively compensated, the magnetic field deviation can also be effectively compensated, and therefore the influence of an interference magnetic field can be effectively offset through a double-feedback control mechanism between the current and the magnetic field; the problem that the influence of an interference magnetic field cannot be effectively counteracted in the prior art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of coil magnetic field control, and in particular, to a magnetic field control method, device, terminal device and storage medium applicable to coils. Background Art

[0002] Coils are often affected by external interfering magnetic fields, resulting in the magnetic field generated by the coils deviating from the expected value, thereby affecting the performance of the device. In devices such as motors, generators, and sensors, the accuracy and stability of the magnetic field directly affect the efficiency and performance of the device. External interfering magnetic fields may cause the device to operate unstably, reduce efficiency, or even be damaged. Therefore, it is necessary to adjust the coil to generate an additional compensation magnetic field to offset the external interference and maintain the stability of the target magnetic field.

[0003] However, traditional magnetic field control technologies usually adopt a single current closed-loop control strategy, that is, by monitoring the coil current and comparing it with a preset value, and making adjustments according to the difference from the preset value, but do not monitor the actual magnetic field change and cannot process the magnetic field change. Whether the compensation magnetic field of the coil can effectively offset the influence of the interfering magnetic field is not only related to the current, but also related to the magnetic field deviation caused by the magnetic field change of the coil. Therefore, traditional single-current feedback control ignores the change of the magnetic field itself. Since the existing technology only generates a compensation magnetic field based on the current deviation, it cannot compensate for the magnetic field deviation and cannot effectively offset the influence of the interfering magnetic field. Inaccurate magnetic field control may lead to a decline in device performance, and there is a problem that the stable operation of the device cannot be guaranteed. Summary of the Invention

[0004] Embodiments of the present invention provide a magnetic field control method, device, terminal device and storage medium applicable to coils, which can simultaneously monitor current and magnetic field signals, and can actively compensate the magnetic field of the coil according to the current deviation and the magnetic field deviation. Therefore, it can not only effectively compensate the current deviation of the coil, but also effectively compensate the magnetic field deviation, and can more effectively offset the influence of the interfering magnetic field, and can effectively solve the problem that the existing technology cannot effectively offset the influence of the interfering magnetic field and cannot guarantee the stable operation of the device.

[0005] An embodiment of the present invention provides a magnetic field control method applicable to coils, including:

[0006] Obtain the current current flowing through the target coil and the current magnetic field signal corresponding to the target coil;

[0007] Generate a current adjustment signal for characterizing the adjustment amount of the current according to the current current and the preset current threshold;

[0008] Generate a magnetic field adjustment signal for characterizing the adjustment amount of the magnetic field according to the current magnetic field signal and the preset magnetic field reference signal;

[0009] Generate a drive voltage signal for constructing a compensation magnetic field of a target coil according to the current adjustment signal and the magnetic field adjustment signal; wherein, the compensation magnetic field is used to represent a magnetic field with the same magnetic field intensity as the external interference magnetic field of the target coil and opposite to the magnetic field direction of the external interference magnetic field;

[0010] Drive the target coil to generate a compensation magnetic field according to the drive voltage signal.

[0011] Preferably, the generating a magnetic field adjustment signal for representing an adjustment amount of the magnetic field according to the current magnetic field signal and the preset magnetic field reference signal includes:

[0012] Filter the current magnetic field signal according to the current filtering weight to generate a filtered magnetic field signal;

[0013] Generate a current magnetic field deviation according to the difference between the filtered magnetic field signal and the preset magnetic field reference signal;

[0014] Generate a magnetic field adjustment signal for representing an adjustment amount of the magnetic field according to the current magnetic field deviation.

[0015] Preferably, the current magnetic field signal includes: sub-magnetic field intensity signals corresponding to a plurality of different direction axes; the current filtering weight includes: current sub-filtering weights corresponding to a plurality of different direction axes;

[0016] The filtering the current magnetic field signal according to the current filtering weight to generate a filtered magnetic field signal includes:

[0017] Generate a filtered magnetic field signal according to the following formula:

[0018]

[0019] wherein, B can (t) is the filtered magnetic field signal, w i (t) is the current sub-filtering weight corresponding to the i-th direction axis, B i (t) is the sub-magnetic field intensity signal corresponding to the i-th direction axis, and N is the number of direction axes.

[0020] Preferably, after generating the magnetic field adjustment signal for representing an adjustment amount of the magnetic field, it further includes:

[0021] Update the filtering weight step factor at the current moment according to a preset filtering weight step adjustment coefficient, the historical magnetic field deviation at the previous moment, and the current magnetic field deviation at the current moment to generate an updated filtering weight step factor; wherein, the filtering weight step factor is used to adjust the sensitivity of the filtering weight to the magnetic field deviation;

[0022] Generate updated filtering weights based on the updated filtering weight step factor, the current filtering weights, the current magnetic field signal, and the current magnetic field deviation;

[0023] Use the updated filtering weights as the current filtering weights for the next moment.

[0024] Preferably, before obtaining the current current flowing through the target coil and the current magnetic field signal corresponding to the target coil, it further includes:

[0025] Obtain the structural parameters and operating environment parameters of the target coil; wherein, the structural parameters include: vacuum permeability, number of coil turns, coil radius, wire resistivity, wire length, wire cross-sectional area, relative permeability, coil cross-sectional area, and coil average length; the operating environment parameters include: the distance from the coil center to the magnetic field strength measurement point and the current of the coil;

[0026] Construct a magnetic field strength calculation model with the maximization of the magnetic field strength at the coil center as the goal according to the vacuum permeability, number of coil turns, coil radius, the distance from the coil center to the magnetic field strength measurement point, and the current of the coil;

[0027] Construct an equivalent resistance calculation model with the minimization of the equivalent resistance of the target coil as the goal according to the wire resistivity, wire length, and wire cross-sectional area;

[0028] Construct an inductance calculation model with the minimization of the inductance as the goal according to the relative permeability, coil cross-sectional area, and coil average length;

[0029] Construct a coil optimization model with the maximization of the magnetic field strength at the coil center, the minimization of the equivalent resistance of the target coil, and the minimization of the inductance as the goal according to the magnetic field strength calculation model, the equivalent resistance calculation model, and the inductance calculation model; wherein, the constraint conditions corresponding to the coil optimization model include: coil spacing constraint, current constraint, and number of coil turns constraint;

[0030] Under the constraints of the coil spacing constraint, current constraint, and number of coil turns constraint, solve the coil optimization model, and generate the target optimization strategy corresponding to the target coil when the magnetic field strength at the coil center is maximized, the equivalent resistance of the target coil is minimized, and the inductance is minimized: wherein, the target optimization strategy includes: the number of turns of the target coil, the radius of the target coil, the spacing of the target coil, the cross-sectional area of the target wire, and the length of the target wire;

[0031] Adjust the structural parameters of the target coil according to the target optimization strategy.

[0032] Preferably, when solving the coil optimization model, a target optimization strategy corresponding to the target coil is generated when the magnetic field intensity at the center of the coil is maximized, the equivalent resistance of the target coil is minimized, and the inductance is minimized, including:

[0033] Randomly generate a number of initial grey wolves in the wolf pack; wherein, the wolf pack corresponds to a target prey; each initial grey wolf corresponds to an initial position; the initial position is used to represent the optimization strategy corresponding to the target coil;

[0034] For each initial grey wolf, calculate the initial function value corresponding to the initial position of the initial grey wolf according to the coil optimization model;

[0035] Sort the initial function values in descending order, and extract the three initial grey wolves corresponding to the initial function values with the top three serial numbers as the initial optimization grey wolves;

[0036] Repeat the following grey wolf position update operation until the current update count is the same as the preset update count, and output the target position corresponding to the target grey wolf, and the target positions all satisfy the coil spacing constraint, current constraint, and coil turn number constraint:

[0037] When the current update count is less than the preset update count, for each current grey wolf, generate an updated position corresponding to the current grey wolf according to the current position of the current grey wolf, the distance between the current grey wolf and the target prey, the current positions of each current optimization grey wolf, and the distances between the current grey wolf and each current optimization grey wolf; wherein, initially, the initial position of the initial grey wolf is used as the current position of the current grey wolf, and the initial positions of each initial optimization grey wolf are used as the current positions of each current optimization grey wolf;

[0038] For each current optimization grey wolf, generate an updated position corresponding to the current optimization grey wolf according to the current position of the current optimization grey wolf and the distance between the current position of the current optimization grey wolf and the updated positions corresponding to each current grey wolf;

[0039] For each current grey wolf, calculate the updated function value corresponding to the updated position of the current grey wolf according to the coil optimization model; for each current optimization grey wolf, calculate the updated function value corresponding to the updated position of the current optimization grey wolf according to the coil optimization model;

[0040] Sort all the updated function values in descending order, mark the three grey wolves corresponding to the updated function values with the top three serial numbers as the updated optimization grey wolves, and use the unmarked grey wolves and the updated positions corresponding to the unmarked grey wolves as the current grey wolf and the current position of the current grey wolf respectively when performing the grey wolf position update operation next time;

[0041] Take the updated optimization grey wolf with the highest updated function value as the target grey wolf;

[0042] Use each updated and optimized grey wolf and the updated position of each updated and optimized grey wolf as the current optimized grey wolf and the current position of the current optimized grey wolf respectively when performing the grey wolf position update operation next time;

[0043] Add the preset iteration number increment to the current updated iteration number value.

[0044] Preferably, the generating the updated position corresponding to the current grey wolf according to the current position of the current grey wolf, the distance between the current grey wolf and the target prey, the current positions of each current optimized grey wolf, and the distances between the current grey wolf and each current optimized grey wolf includes:

[0045] Generate the position adjustment weight coefficient of each current optimized grey wolf according to the current positions of each current optimized grey wolf and the number of current optimized grey wolves;

[0046] Generate the updated position corresponding to the current grey wolf according to the current position of the current grey wolf, the distance between the current grey wolf and the target prey, the current positions of each current optimized grey wolf, the distances between the current grey wolf and each current optimized grey wolf, and the position adjustment weight coefficient of each current optimized grey wolf.

[0047] Based on the above method embodiments, the present invention correspondingly provides apparatus embodiments.

[0048] An embodiment of the present invention provides a magnetic field control device applicable to a coil, including: a data acquisition module, a drive voltage signal generation module, and a compensation magnetic field generation module;

[0049] The data acquisition module is configured to obtain the current current flowing in the target coil and the current magnetic field signal corresponding to the target coil;

[0050] The drive voltage signal generation module is configured to generate a current adjustment signal for characterizing the adjustment amount of the current according to the current current and a preset current threshold; generate a magnetic field adjustment signal for characterizing the adjustment amount of the magnetic field according to the current magnetic field signal and a preset magnetic field reference signal; generate a drive voltage signal for constructing a compensation magnetic field of the target coil according to the current adjustment signal and the magnetic field adjustment signal; wherein, the compensation magnetic field is used to characterize a magnetic field with a magnetic field intensity equal to that of the external interference magnetic field of the target coil and a magnetic field direction opposite to that of the external interference magnetic field;

[0051] The compensation magnetic field generation module is configured to drive the target coil to generate a compensation magnetic field according to the drive voltage signal.

[0052] Based on the above method embodiments, the present invention correspondingly provides terminal device embodiments.

[0053] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a magnetic field control method applicable to a coil as described in the above-mentioned embodiment of the invention.

[0054] Based on the above method embodiment, the present invention correspondingly provides an embodiment of a storage medium.

[0055] Another embodiment of the present invention provides a storage medium. The computer-readable storage medium includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute a magnetic field control method applicable to a coil as described in the above-mentioned embodiment of the invention.

[0056] By implementing the present invention, the following beneficial effects are achieved:

[0057] The embodiment of the present invention provides a magnetic field control method, device, terminal device, and storage medium applicable to a coil. The present invention introduces a dual-feedback control mechanism, that is, it simultaneously monitors the current current in the target coil and the current magnetic field signal corresponding to the coil, and generates a current adjustment signal for characterizing the current adjustment amount according to the current current in the target coil and the preset current threshold. At the same time, according to the current magnetic field signal of the coil and the preset magnetic field reference signal, a magnetic field adjustment signal for characterizing the magnetic field adjustment amount is generated. Then, in addition to considering the current change of the target coil, the present invention also considers the change of the magnetic field. After generating a drive voltage signal for constructing the compensation magnetic field of the coil based on the current adjustment signal and the magnetic field adjustment signal, the coil can be driven to generate a compensation magnetic field based on the drive voltage signal. Since the compensation magnetic field is a magnetic field with the same magnetic field intensity as the external interference magnetic field of the coil and the opposite magnetic field direction to the external interference magnetic field, the present invention can effectively offset the influence of the external interference magnetic field and maintain the stability of the current magnetic field of the target coil by combining the current adjustment signal and the magnetic field adjustment signal to generate the corresponding compensation magnetic field. Compared with the prior art, the present invention can simultaneously monitor the current and magnetic field signals, and can actively compensate the magnetic field of the coil according to the current deviation and the magnetic field deviation. Not only can the compensation magnetic field effectively compensate the current deviation of the coil when finally driving the target coil to generate the compensation magnetic field, but the compensation magnetic field can also effectively compensate the magnetic field deviation. Therefore, through the dual-feedback control mechanism between the current and the magnetic field, the present invention can more effectively offset the influence of the interference magnetic field, improve the accuracy and stability of the magnetic field control, and enhance the performance and operation stability of the device. Description of the Drawings

[0058] Figure 1 It is a schematic flowchart of a magnetic field control method applicable to a coil provided by an embodiment of the present invention.

[0059] Figure 2 It is a schematic diagram of a compensation system provided by an embodiment of the present invention that can achieve active compensation for external interference magnetic fields.

[0060] Figure 3 It is a schematic diagram of the regulation principle of a Helmholtz coil provided by an embodiment of the present invention.

[0061] Figure 4 It is a schematic diagram of the structure of a magnetic field control device applicable to a coil provided by an embodiment of the present invention. Specific embodiments

[0062] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present invention.

[0063] As Figure 1 shown, to solve the problem that the prior art cannot effectively cancel the influence of the interference magnetic field, an embodiment of the present invention proposes a magnetic field control method applicable to a coil, including:

[0064] Step S1: Obtain the current current flowing in the target coil and the current magnetic field signal corresponding to the target coil;

[0065] Step S2: Generate a current adjustment signal for characterizing the adjustment amount of the current according to the current current and a preset current threshold;

[0066] Generate a magnetic field adjustment signal for characterizing the adjustment amount of the magnetic field according to the current magnetic field signal and a preset magnetic field reference signal;

[0067] Generate a driving voltage signal for constructing a compensation magnetic field of the target coil according to the current adjustment signal and the magnetic field adjustment signal; wherein, the compensation magnetic field is used to characterize a magnetic field with the same magnetic field intensity as the external interference magnetic field of the target coil and the opposite magnetic field direction to the external interference magnetic field;

[0068] Step S3: Drive the target coil to generate a compensation magnetic field according to the driving voltage signal.

[0069] For step S1, in a preferred embodiment, the magnetic field control method applicable to a coil of the present invention can be applied to a compensation system that can achieve active compensation for external interference magnetic fields, such as Figure 2As can be seen from the schematic diagram of the compensation system shown, the compensation system includes: a host computer PC, an STM32 control module, a magnetic field generation module, and a magnetic field acquisition module. Each of these modules works together to jointly achieve the compensation of external interfering magnetic fields.

[0070] Specifically, the STM32 control module includes: a magnetic field information processing sub-module, a current information acquisition sub-module, a voltage information acquisition sub-module, an ADC acquisition sub-module, a control sub-module for implementing an optimization algorithm, and a driving timing sub-module.

[0071] The magnetic field acquisition module can be used to acquire the current magnetic field signal corresponding to the target coil; schematically, a three-axis magnetic sensor can be used to collect the magnetic field information of each component in real time, and the collected magnetic field information is fed back to the STM32 microcontroller and the host computer through a serial communication module. The magnetic field information processing sub-module in the STM32 microcontroller outputs a driving voltage signal to drive the magnetic field generation module according to the received magnetic field information, thereby achieving the active control of external interfering magnetic fields.

[0072] It can be understood that the STM32 microcontroller of the compensation system and the host computer PC implement a dual feedback mechanism for magnetic fields and currents. The STM32 microcontroller can drive the DAC module of the magnetic field generation module to generate a driving voltage to generate a compensation magnetic field, and the host computer PC can display the environmental magnetic field information in real time to assist in continuously optimizing the generated compensation magnetic field.

[0073] Schematically, the target coil of the present invention is a Helmholtz coil; then the magnetic field generation module in the compensation system is composed of a DAC sub-module, a power amplification sub-module, a three-axis Helmholtz coil, and a current sampling circuit.

[0074] The STM32 microcontroller controls the DAC module of the magnetic field generation module to output corresponding driving voltage signals. These voltage signals are converted into current signals after passing through the power amplification module to drive the Helmholtz coil to generate a compensation magnetic field. At the same time, the current sampling circuit can sample the current flowing through the three-axis Helmholtz coil, convert the collected analog current signal into a digital signal, and then transmit it to the STM32 controller to achieve closed-loop feedback control of the current, thereby ensuring the stability and accuracy of the current.

[0075] It can be understood that after the present invention obtains the target optimization strategy according to the solution and adjusts the structural parameters of the target coil, the current flowing through the target coil with the adjusted structural parameters and the current magnetic field signal corresponding to the target coil with the adjusted structural parameters can be obtained. By adjusting the structural parameters, the magnetic field intensity, uniformity, and distribution range of the coil can be changed first, so as to better compensate for external interfering magnetic fields.

[0076] For steps S2 and S3, in order to implement the dual feedback control mechanism between current and magnetic field, after obtaining the current and the current magnetic field signal, the present invention can compare the current with the preset current threshold, and compare the current magnetic field signal with the preset magnetic field reference signal. Then, according to the difference between the current and the preset current threshold, a current adjustment signal for characterizing the adjustment amount of the current can be generated, and according to the difference between the current magnetic field signal and the preset magnetic field reference signal, a magnetic field adjustment signal for characterizing the adjustment amount of the magnetic field can be generated.

[0077] In a preferred embodiment, generating the magnetic field adjustment signal for characterizing the adjustment amount of the magnetic field according to the current magnetic field signal and the preset magnetic field reference signal includes:

[0078] Filtering the current magnetic field signal according to the current filtering weight to generate a filtered magnetic field signal;

[0079] Specifically, the current magnetic field signal includes sub-magnetic field intensity signals corresponding to a plurality of different direction axes; the current filtering weight includes current sub-filtering weights corresponding to a plurality of different direction axes.

[0080] When filtering the current magnetic field signal according to the current filtering weight to generate a filtered magnetic field signal, specifically:

[0081] Generate a filtered magnetic field signal according to the following formula:

[0082]

[0083] where B can (t) is the filtered magnetic field signal, w i (t) is the current sub-filtering weight corresponding to the i-th direction axis, B i (t) is the sub-magnetic field intensity signal corresponding to the i-th direction axis, and N is the number of direction axes.

[0084] It can be understood that the present invention can use the three-axis magnetic sensor in the magnetic field acquisition module to collect the current magnetic field signal corresponding to the Helmholtz coil in real time, and the current magnetic field signal includes sub-magnetic field intensity signals on different direction axes (such as the X, Y, and Z axes). In order to reduce noise and interference and improve the accuracy of the magnetic field signal, the present invention can filter the current magnetic field signal according to the current filtering weight of the filter.

[0085] Specifically, in order to improve the compensation accuracy, the present invention can use an adaptive filter to adjust the current magnetic field signal in real time, so as to continuously optimize the filtering weight of the filter over time and complete the accurate filtering operation of the magnetic field signal.

[0086] In a preferred embodiment, the present invention can update the filtering weights through negative feedback regulation, thereby continuously updating the filtering accuracy of the filter. Then:

[0087] After generating the magnetic field adjustment signal for characterizing the adjustment amount of the magnetic field, the embodiment of the present invention further includes:

[0088] Updating the filtering weight step factor at the current moment according to a preset filtering weight step adjustment coefficient, the historical magnetic field deviation at the previous moment, and the current magnetic field deviation at the current moment to generate an updated filtering weight step factor; wherein, the filtering weight step factor is used to adjust the sensitivity of the filtering weight to the magnetic field deviation;

[0089] Generating an updated filtering weight according to the updated filtering weight step factor, the current filtering weight, the current magnetic field signal, and the current magnetic field deviation;

[0090] Taking the updated filtering weight as the current filtering weight at the next moment.

[0091] Specifically, the updated filtering weight step factor can be generated according to the following formula:

[0092]

[0093] Wherein, λ max is the maximum eigenvalue of the autocorrelation matrix of the input signal (such as the magnetic field deviation signal), β is the preset filtering weight step adjustment coefficient, α is the step adjustment factor, e(t) is the current magnetic field deviation at the current moment, and e(t - 1) is the historical magnetic field deviation at the previous moment.

[0094] Then, by continuously updating the filtering weight at each moment, the present invention can achieve a faster convergence speed and better steady-state performance, and can more effectively suppress low-frequency random interference.

[0095] Furthermore, in a preferred embodiment, a TMR sensor array (such as a 4×4 array) is configured on the axis of each Helmholtz coil of the present invention, which can enhance the magnetic field detection resolution. The STM32 microcontroller can implement an adaptive filtering algorithm, and with three-axis independent control loops, it can perform adaptive filtering on each axis signal separately.

[0096] In a preferred embodiment, the updated filtering weight can be calculated according to the following formula

[0097] w i (t + 1) = w i (t) + 2μ(t)B i (t)e(t);

[0098] Among them, w i (t + 1) is the current filtering weight at the next moment, that is, the updated filtering weight, w i (t) is the current sub-filtering weight corresponding to the i-th direction axis, μ(t) is the updated filtering weight step factor, B i (t) is the current magnetic field signal, and e(t) is the current magnetic field deviation.

[0099] Therefore, the present invention adopts an adaptive filter algorithm, which can adjust the filtering weight in real time according to the change of the magnetic field signal, thereby optimizing the filtering effect. And through the negative feedback adjustment mechanism, the filtering weight step factor is updated according to the historical magnetic field deviation and the current magnetic field deviation, and then the filtering weight is adjusted, so that the filter can adapt to the change of the magnetic field signal faster.

[0100] Moreover, the present invention can achieve a faster convergence speed by continuously updating the filtering weight at each moment, that is, the filter can reach a stable filtering effect faster, effectively suppressing low-frequency random interference.

[0101] Furthermore, since the current adjustment signal is generated based on the comparison result between the current current and the preset current threshold, it indicates that the current current deviates from the preset threshold, and a current adjustment signal will be generated to indicate that the current in the coil needs to be adjusted to reach the preset value.

[0102] Since the magnetic field adjustment signal is generated based on the comparison result between the current magnetic field signal and the preset magnetic field reference signal, when there is a deviation between the current magnetic field and the desired magnetic field, a magnetic field adjustment signal will be generated to indicate that the magnetic field generated by the coil needs to be adjusted to match the preset magnetic field.

[0103] According to the current adjustment signal and the magnetic field adjustment signal, the present invention can calculate the drive voltage that needs to be applied to the target coil. The drive voltage is obtained by comprehensively considering the adjustment requirements of both current and magnetic field. Therefore, the present invention can not only effectively compensate for the current deviation of the coil, but also effectively compensate for the magnetic field deviation, realizing a double feedback control mechanism between current and magnetic field.

[0104] Then, the present invention generates a drive voltage signal for driving the target coil to generate a compensation magnetic field by comprehensively considering the adjustment requirements of current and magnetic field. Since the compensation magnetic field can be equal in intensity and opposite in direction to the external interference magnetic field, it can effectively cancel the influence of the external interference magnetic field, making the magnetic field at the target coil reach the expected state.

[0105] Schematically, such as Figure 3Schematic diagram of the regulation principle of the Helmholtz coil shown. The STM32 microcontroller can calculate the corresponding drive voltage signal based on the feedback signals of current and magnetic field, as well as the magnetic field control algorithm, and generate a drive timing sequence to control the DAC sub-module in the magnetic field generation module to output a drive voltage signal. After being amplified by the power amplification sub-module, this drive voltage signal drives the Helmholtz coil to generate a magnetic field (i.e., a compensation magnetic field), ensuring the stability and accuracy of the magnetic field output. Therefore, the STM32 microcontroller of the present invention can continuously adjust the drive signal according to the feedback current information and the feedback magnetic field information, so that the compensation magnetic field at the target coil reaches the expected state.

[0106] In a preferred embodiment, the present invention can also use a multi-objective optimization model to determine the relevant parameters of the Helmholtz coil. Taking the maximization of the magnetic field at the coil center, the minimization of the equivalent resistance, and the minimization of the inductance as the objective functions, and the coil spacing, the current flowing through the coil, and the number of turns as the constraint conditions, the optimal parameter configuration of the Helmholtz coil that can satisfy the maximum magnetic field at the coil center, the minimum resistance and inductance is obtained. Thus, the structural parameters of the target coil can be adjusted according to the currently obtained parameters, so that after adjustment, the target coil can generate a more accurate compensation magnetic field to more effectively offset the influence of the interference magnetic field.

[0107] Specifically, before obtaining the current flowing through the target coil and the current magnetic field signal corresponding to the target coil, the structural parameters and operating environment parameters of the target coil are obtained; wherein, the structural parameters include: vacuum permeability, number of coil turns, coil radius, wire resistivity, wire length, wire cross-sectional area, relative permeability, coil cross-sectional area, and coil average length; the operating environment parameters include: the distance from the coil center to the magnetic field intensity measurement point and the current of the coil.

[0108] According to the vacuum permeability, the number of coil turns, the coil radius, the distance from the coil center to the magnetic field intensity measurement point, and the current of the coil, a magnetic field intensity calculation model with the maximization of the magnetic field intensity at the coil center as the target is constructed.

[0109] According to the wire resistivity, the wire length, and the wire cross-sectional area, an equivalent resistance calculation model with the minimization of the equivalent resistance of the target coil as the target is constructed.

[0110] According to the relative permeability, the coil cross-sectional area, and the coil average length, an inductance calculation model with the minimization of the inductance as the target is constructed.

[0111] According to the magnetic field strength calculation model, equivalent resistance calculation model, and inductance calculation model, a coil optimization model is constructed with the goal of maximizing the magnetic field strength at the center of the coil, minimizing the equivalent resistance of the target coil, and minimizing the inductance. Among them, the constraint conditions corresponding to the coil optimization model include: coil spacing constraint, current constraint, and coil turn number constraint.

[0112] Under the constraints of the coil spacing constraint, current constraint, and coil turn number constraint, the coil optimization model is solved. When the magnetic field strength at the center of the coil is maximized, the equivalent resistance of the target coil is minimized, and the inductance is minimized, a target optimization strategy corresponding to the target coil is generated. Among them, the target optimization strategy includes: the number of turns of the target coil, the radius of the target coil, the spacing between the target coils, the cross-sectional area of the target wire, and the length of the target wire.

[0113] According to the target optimization strategy, the structural parameters of the target coil are adjusted.

[0114] It can be understood that by maximizing the magnetic field strength at the center of the coil through the coil optimization model, the effect of the Helmholtz coil in magnetic field applications can be improved. For example, in fields such as magnetic sensor calibration and magnetic resonance imaging, a stronger magnetic field can improve the measurement accuracy and imaging quality. Minimizing the equivalent resistance means that under the same current, the power loss of the coil is reduced, which reduces the energy consumption and operating cost. At the same time, it also reduces the problem of coil heating, improving the stability and reliability of the equipment. Minimizing the inductance can make the coil respond faster when the current changes, improving the dynamic performance of the system.

[0115] Schematically, the present invention can consider the influence of the structural parameters of the coil itself on the magnetic field. Thus, through the target optimization strategy obtained by constructing and solving the optimization model, the structure of the coil can be adjusted and iteratively optimized to better compensate for the external interference magnetic field and ensure the stable control of the internal environmental magnetic field of the equipment. Then, after adjusting the structure of the coil, feedback adjustment can be performed according to the current deviation and magnetic field deviation. As a result, the compensation magnetic field can not only consider the magnetic field changes brought about by the coil's own structure, but also consider the actual current changes and the actually detected magnetic field changes, and can more effectively offset the influence of the interference magnetic field, ensuring the stable operation of the equipment.

[0116] Schematically, by adjusting the structural parameters, the performance of the coil can be maintained stable. For example, increasing the number of turns can increase the magnetic field strength B, while optimizing the coil radius R and the measurement point distance can improve the magnetic field uniformity, thereby achieving more precise magnetic field control, ensuring the accuracy of the magnetic field, and reducing the influence of external interference.

[0117] Then, the target optimization strategy obtained by the present invention through constructing and solving the optimization model avoids the blindness of relying on experience and trial - and - error in the traditional design method, making the design of Helmholtz coils more scientific and reasonable.

[0118] Furthermore, the present invention can also use simulation software to iteratively optimize the structure of the Helmholtz coil to verify the rationality and effectiveness of the target optimization strategy obtained by constructing and solving the optimization model. For example, the magnetic field distribution inside the coil is simulated through a static magnetic field solver, a magnetic field intensity distribution curve of the three - axis Helmholtz coil is established, and compared with the optimization results.

[0119] In a preferred embodiment, the magnetic field intensity at the coil center can be calculated by the magnetic field formula of the Helmholtz coil:

[0120]

[0121] where B is the magnetic field intensity at the coil center, μ0 is the vacuum permeability, N is the number of coil turns, I is the current, R is the coil radius, and x is the distance from the coil center to the measurement point.

[0122] Furthermore, the equivalent resistance calculation model with the goal of minimizing the equivalent resistance of the target coil is expressed as:

[0123]

[0124] where R eq is the resistance value of the equivalent resistance, ρ is the resistivity of the wire, L is the wire length, and A is the wire cross - sectional area.

[0125] Furthermore, the inductance calculation model with the goal of minimizing the inductance is:

[0126]

[0127] where L is the inductance, μ r is the relative permeability, A is the coil cross - sectional area, and l is the average length of the coil.

[0128] Furthermore, for the coil spacing constraint, in order to ensure the magnetic field uniformity, the coil spacing d should satisfy:

[0129] d = R;

[0130] That is, the coil spacing is equal to the coil radius.

[0131] For the current constraint, in order to ensure the safe operation of the coil, the current I should satisfy:

[0132] I min ≤I≤I max ;

[0133] where Imin represents the preset minimum current, I max represents the preset maximum current;

[0134] For the coil turn constraint, the number of coil turns N should satisfy:

[0135] N min ≤ N ≤ N max ;

[0136] wherein, N min and N max are the minimum number of turns and the maximum number of turns that can be determined according to the coil size and application scenario.

[0137] In a preferred embodiment, the present invention can solve the coil optimization model based on the grey wolf optimization algorithm of the grey wolf optimizer, then there is:

[0138] Solving the coil optimization model, when maximizing the magnetic field intensity at the center of the coil, minimizing the equivalent resistance and inductance of the target coil, generating a target optimization strategy corresponding to the target coil, including:

[0139] Randomly generate a number of initial grey wolves in the wolf pack; wherein, the wolf pack corresponds to a target prey; each initial grey wolf corresponds to an initial position; the initial position is used to represent the optimization strategy corresponding to the target coil;

[0140] For each initial grey wolf, calculate the initial function value corresponding to the initial position of the initial grey wolf according to the coil optimization model;

[0141] Sort the initial function values in descending order, and extract the three initial grey wolves corresponding to the initial function values with the top three serial numbers as the initial optimization grey wolves;

[0142] Repeat the following grey wolf position update operation until the current update count is the same as the preset update count, and output the target position corresponding to the target grey wolf, and the target positions all satisfy the coil spacing constraint, current constraint and coil turn constraint:

[0143] When the current update count is less than the preset update count, for each current grey wolf, generate an update position corresponding to the current grey wolf according to the current position of the current grey wolf, the distance between the current grey wolf and the target prey, the current positions of each current optimization grey wolf, and the distance between the current grey wolf and each current optimization grey wolf; wherein, initially, take the initial position of the initial grey wolf as the current position of the current grey wolf, and take the initial positions of each initial optimization grey wolf as the current positions of each current optimization grey wolf;

[0144] For each current optimized grey wolf, an updated position corresponding to the current optimized grey wolf is generated according to the current position of the current optimized grey wolf and the distances between the current position of the current optimized grey wolf and the updated positions corresponding to each current grey wolf.

[0145] For each current grey wolf, an updated function value corresponding to the updated position of the current grey wolf is calculated according to the coil optimization model; for each current optimized grey wolf, an updated function value corresponding to the updated position of the current optimized grey wolf is calculated according to the coil optimization model.

[0146] Sort the updated function values in descending order, mark the three grey wolves corresponding to the updated function values with the top three serial numbers as updated optimized grey wolves, and use the unmarked grey wolves and the updated positions corresponding to the unmarked grey wolves as the current grey wolves and the current positions of the current grey wolf positions respectively when performing the grey wolf position update operation next time.

[0147] Take the updated optimized grey wolf with the highest updated function value as the target grey wolf.

[0148] Use each updated optimized grey wolf and the updated position of each updated optimized grey wolf as the current optimized grey wolf and the current position of the current optimized grey wolf respectively when performing the grey wolf position update operation next time.

[0149] Add the preset iteration number increment to the current updated iteration number value.

[0150] Among them, the generating of the updated position corresponding to the current grey wolf according to the current position of the current grey wolf, the distance between the current grey wolf and the target prey, the current positions of each current optimized grey wolf, and the distances between the current grey wolf and each current optimized grey wolf includes:

[0151] Generate a position adjustment weight coefficient for each current optimized grey wolf according to the current positions of each current optimized grey wolf and the number of current optimized grey wolves.

[0152] Generate the updated position corresponding to the current grey wolf according to the current position of the current grey wolf, the distance between the current grey wolf and the target prey, the current positions of each current optimized grey wolf, the distances between the current grey wolf and each current optimized grey wolf, and the position adjustment weight coefficient of each current optimized grey wolf.

[0153] It can be understood that the optimization process of the present invention is as follows:

[0154] Initialization stage: Generate an initial wolf pack, randomly generate several initial grey wolves in the wolf pack, and each initial grey wolf corresponds to an initial optimization strategy (initial position) of the target coil.

[0155] According to the coil optimization model, calculate the initial function value corresponding to the initial position of each initial gray wolf, and here the function value is a multi-objective function value that comprehensively considers the magnetic field strength at the coil center, equivalent resistance, and inductance.

[0156] Sort the initial function values from largest to smallest, and select the initial gray wolves corresponding to the top three initial function values as the initial optimization gray wolves, which can be the α wolf, β wolf, and δ wolf.

[0157] Iterative update stage: Repeat the position update operation: When the current update count is less than the preset update count, continuously perform the following steps:

[0158] Update the current gray wolf position: Calculate the updated position of the current gray wolf based on the current position of the current gray wolf, its distance from the target prey, the current positions of each current optimization gray wolf, and their distances.

[0159] Update the current optimization gray wolf position: Calculate the updated position of the current optimization gray wolf based on the current position of the current optimization gray wolf and its distance from the updated positions of each current gray wolf.

[0160] Calculate the updated function value: Use the coil optimization model to calculate the updated function values corresponding to the updated positions of each current gray wolf and current optimization gray wolf respectively.

[0161] Determine the updated optimization gray wolves: Sort the updated function values from largest to smallest, and mark the gray wolves corresponding to the top three updated function values as the updated optimization gray wolves, and the rest as the current gray wolves for the next iteration.

[0162] Determine the target gray wolf: Take the updated optimization gray wolf with the highest updated function value as the target gray wolf.

[0163] Update the iteration parameters: Take the updated optimization gray wolves and their updated positions as the current optimization gray wolves and current positions for the next iteration, and at the same time increase the current update iteration count.

[0164] When the current update count reaches the preset update count, output the target position corresponding to the target gray wolf. This position satisfies the constraint conditions of coil spacing, current, and coil turns, and is the target optimization strategy of the target coil.

[0165] Then, the present invention can continuously update the positions of gray wolves, enabling the wolf pack to widely explore the search space. In each iteration, the gray wolves adjust their positions according to their own positions, the relationship with the target prey, and the relationship with the optimization gray wolves, thus potentially discovering better solutions. As the number of iterations increases, the algorithm can cover a larger search space, avoid falling into local optimal solutions, and increase the probability of finding the global optimal solution.

[0166] In each iteration, the present invention sorts the grey wolves according to the current function values, and selects the grey wolf with the best performance as the optimizing grey wolf. These optimizing grey wolves represent the relatively optimal solutions found currently, and other grey wolves will learn from them and adjust their positions. By continuously repeating this process, the entire wolf pack will gradually approach the optimal solution, making the finally output target position closer to the global optimal solution.

[0167] Specifically, the present invention can calculate the fitness of each grey wolf according to the objective optimization function of the coil optimization model (maximizing the magnetic field at the center of the coil, minimizing the resistance and inductance), imitate the rank assignment of the grey wolf population, and construct four hierarchical levels (α, β, δ, ω). Among them, ω is responsible for target search, and (α, β, δ) guide the optimization process. α obtains the optimal solution, β obtains the sub-optimal solution, and δ obtains the global general solution.

[0168] In the specific search and encirclement process, ω approaches the target from all directions (iterative optimization), and all paths need to be traversed to avoid local optima. (α, β, δ) give search guidance to ω, and continuously shorten the distance between the wolf pack and the target. By continuously updating the positions of the wolf pack, the distance is shortened and target hunting is achieved.

[0169] Calculate the distance between each grey wolf and the target, that is, the fitness, and select the top three grey wolves with the best fitness and assign them to α, β, δ in turn. As the three grey wolves with the highest fitness, their positions to a certain extent reflect the location of the target. The remaining grey wolves update their positions accordingly to complete the encirclement. Then, calculate the fitness based on the positions of the grey wolves after the position update and re-perform the rank assignment. Select the three wolves with the highest fitness as the new α, β, δ until the current update times are the same as the preset update times. Take the grey wolf with the highest fitness as the target grey wolf and output the target position corresponding to the target grey wolf, so as to obtain the target optimization strategy to realize the adjustment and optimization of the structural parameters of the target coil.

[0170] In a preferred embodiment, the search direction and relative position of the remaining grey wolves can be updated according to the fitness of the grey wolf individuals, which actually corresponds to the target encirclement process of the grey wolf population. The mathematical modeling of the encirclement process is as follows:

[0171]

[0172] Among them, represents the distance between the grey wolf and the prey, that is, the target position vector and the grey wolf 's distance. and are coefficient vectors, is the convergence factor. As the number of iterations increases, its modulus decreases from 2 to 0; and is a random vector with a modulus between 0 and 1.

[0173] After the gray wolves identify the prey location, that is, after completing the target encirclement, the target hunting, namely the optimization process, will be carried out. The mathematical model for individual gray wolves to track the prey location is as follows:

[0174]

[0175]

[0176] Among them, respectively represent the distances between α, β, δ and other individuals, respectively represent the current positions of α, β, δ. Then it represents the positions of the remaining gray wolves in the wolf pack after update.

[0177] In a preferred embodiment, the present invention can also introduce multi-objective and non-linear fast optimization processes. Using non-linear accelerated convergence, while introducing an external archive to save non-dominated solutions, and improving the diversity and fast convergence of solutions through a grid mechanism and a leader selection mechanism. The specific optimization scheme is as follows:

[0178] Define the convergence factor through the GWO algorithm Decreasing from 2 to 0, a non-linear model can be introduced during the decreasing process, as follows:

[0179]

[0180] At the same time, in order to avoid the GWO falling into a local optimum, ω i is introduced as the learning rate of the gray wolf (i.e., the position adjustment weight coefficient). Where i = 1, 2, 3 corresponds to α, β, δ, then there is:

[0181]

[0182] Then, after calculating the position adjustment weight coefficient of each currently optimizing gray wolf, based on the current position of the current gray wolf, the distance between the current gray wolf and the target prey, the current positions of each currently optimizing gray wolf, the distances between the current gray wolf and each currently optimizing gray wolf, and the position adjustment weight coefficient of each currently optimizing gray wolf, the updated position corresponding to the current gray wolf is generated, achieving dynamic balance and effectively reducing the risk of falling into a local optimum.

[0183] As Figure 4 shown, based on the above various embodiments of the magnetic field control method applicable to coils, the present invention correspondingly provides device item embodiments;

[0184] An embodiment of the present invention provides a magnetic field control device applicable to a coil, including: a data acquisition module, a drive voltage signal generation module, and a compensation magnetic field generation module;

[0185] The data acquisition module is configured to obtain the current current flowing in the target coil and the current magnetic field signal corresponding to the target coil;

[0186] The drive voltage signal generation module is configured to generate a current adjustment signal for characterizing the adjustment amount of the current according to the current current and a preset current threshold; generate a magnetic field adjustment signal for characterizing the adjustment amount of the magnetic field according to the current magnetic field signal and a preset magnetic field reference signal; generate a drive voltage signal for constructing a compensation magnetic field of the target coil according to the current adjustment signal and the magnetic field adjustment signal; wherein, the compensation magnetic field is used to characterize a magnetic field with a magnetic field intensity equal to that of the external interference magnetic field of the target coil and a magnetic field direction opposite to that of the external interference magnetic field;

[0187] The compensation magnetic field generation module is configured to drive the target coil to generate a compensation magnetic field according to the drive voltage signal.

[0188] It should be noted that the device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules. They may be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided by the present invention, the connection relationship between modules indicates that they have a communication connection, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement without creative efforts.

[0189] Those skilled in the art can clearly understand that for the convenience and simplicity, the specific working process of the device described above can refer to the corresponding process in the foregoing method embodiment, and will not be described in detail here.

[0190] Based on the above embodiments of various magnetic field control methods applicable to coils, the present invention correspondingly provides embodiments of a terminal device.

[0191] An embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a magnetic field control method applicable to a coil according to any method embodiment of the present invention.

[0192] The terminal device may be a computing terminal device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal device may include, but is not limited to, a processor and a memory.

[0193] The so-called processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the terminal device, and connects various parts of the entire terminal device through various interfaces and circuits.

[0194] The memory can be used to store the computer program. The processor realizes various functions of the terminal device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0195] Based on the above embodiments of various magnetic field control methods applicable to coils, the present invention correspondingly provides embodiments of a storage medium.

[0196] An embodiment of the present invention provides a storage medium, which includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute a magnetic field control method applicable to a coil described in any method item embodiment of the present invention.

[0197] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0198] The above is the preferred embodiment of the present invention. It should be pointed out that for those of ordinary skill in the art of the present technology, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of the present invention.

Claims

1. A magnetic field control method applicable to coils, characterized in that, Including: Obtaining the current current flowing in the target coil and the current magnetic field signal corresponding to the target coil; Generating a current adjustment signal for characterizing the adjustment amount of the current according to the current current and a preset current threshold; Generating a magnetic field adjustment signal for characterizing the adjustment amount of the magnetic field according to the current magnetic field signal and a preset magnetic field reference signal; Generating a drive voltage signal for constructing a compensation magnetic field of the target coil according to the current adjustment signal and the magnetic field adjustment signal; wherein, the compensation magnetic field is used to characterize a magnetic field with a magnetic field strength equal to that of the external interference magnetic field of the target coil and a magnetic field direction opposite to that of the external interference magnetic field; Driving the target coil to generate a compensation magnetic field according to the drive voltage signal.

2. The magnetic field control method applicable to a coil according to claim 1, wherein The generating a magnetic field adjustment signal for characterizing the adjustment amount of the magnetic field according to the current magnetic field signal and a preset magnetic field reference signal includes: Filtering the current magnetic field signal according to the current filtering weight to generate a filtered magnetic field signal; Generating a current magnetic field deviation according to the difference between the filtered magnetic field signal and the preset magnetic field reference signal; Generating a magnetic field adjustment signal for characterizing the adjustment amount of the magnetic field according to the current magnetic field deviation.

3. The magnetic field control method for a coil according to claim 2, characterized in that, The current magnetic field signal includes: sub-magnetic field intensity signals corresponding to a plurality of different direction axes; the current filtering weight includes: current sub-filtering weights corresponding to a plurality of different direction axes; The filtering the current magnetic field signal according to the current filtering weight to generate a filtered magnetic field signal includes: Generating a filtered magnetic field signal according to the following formula: Among them, B can (t) is the filtered magnetic field signal, w i (t) is the current sub-filtering weight corresponding to the i-th direction axis, B i (t) is the sub-magnetic field intensity signal corresponding to the i-th direction axis, and N is the number of direction axes.

4. A magnetic field control method applicable to a coil according to claim 3, characterized in that, After generating the magnetic field adjustment signal for characterizing the adjustment amount of the magnetic field, it further includes: Updating the filtering weight step factor at the current moment according to a preset filtering weight step adjustment coefficient, the historical magnetic field deviation at the previous moment, and the current magnetic field deviation at the current moment to generate an updated filtering weight step factor; wherein, the filtering weight step factor is used to adjust the sensitivity of the filtering weight to the magnetic field deviation; Generating an updated filtering weight according to the updated filtering weight step factor, the current filtering weight, the current magnetic field signal, and the current magnetic field deviation; Taking the updated filtering weight as the current filtering weight at the next moment.

5. A magnetic field control method applicable to a coil according to claim 4, characterized in that, Before obtaining the current current flowing in the target coil and the current magnetic field signal corresponding to the target coil, it further includes: Obtaining the structural parameters and operating environment parameters of the target coil; wherein, the structural parameters include: vacuum permeability, number of coil turns, coil radius, wire resistivity, wire length, wire cross-sectional area, relative magnetic permeability, coil cross-sectional area, and coil average length; the operating environment parameters include: the distance from the coil center to the magnetic field strength measurement point and the current of the coil; Constructing a magnetic field strength calculation model with the maximization of the magnetic field strength at the coil center as the target according to the vacuum permeability, number of coil turns, coil radius, the distance from the coil center to the magnetic field strength measurement point, and the current of the coil; Constructing an equivalent resistance calculation model with the minimization of the equivalent resistance of the target coil as the target according to the wire resistivity, wire length, and wire cross-sectional area; Construct an inductance calculation model aiming at minimizing inductance based on relative permeability, coil cross-sectional area, and coil average length; Construct a coil optimization model aiming at maximizing the magnetic field strength at the coil center, minimizing the equivalent resistance of the target coil, and minimizing inductance according to the magnetic field strength calculation model, equivalent resistance calculation model, and inductance calculation model; among them, the constraint conditions corresponding to the coil optimization model include: coil spacing constraint, current constraint, and coil turn number constraint; Under the constraints of the coil spacing constraint, current constraint, and coil turn number constraint, solve the coil optimization model. When the magnetic field strength at the coil center is maximized, the equivalent resistance of the target coil is minimized, and the inductance is minimized, generate the target optimization strategy corresponding to the target coil: among them, the target optimization strategy includes: the number of turns of the target coil, the radius of the target coil, the spacing of the target coil, the cross-sectional area of the target wire, and the length of the target wire; Adjust the structural parameters of the target coil according to the target optimization strategy.

6. The magnetic field control method for a coil according to claim 5, wherein, The solution of the coil optimization model to generate the target optimization strategy corresponding to the target coil when the magnetic field strength at the coil center is maximized, the equivalent resistance of the target coil is minimized, and the inductance is minimized includes: Randomly generate a number of initial gray wolves in the wolf pack; among them, the wolf pack corresponds to a target prey; each initial gray wolf corresponds to an initial position; the initial position is used to represent the optimization strategy corresponding to the target coil; For each initial gray wolf, calculate the initial function value corresponding to the initial position of the initial gray wolf according to the coil optimization model; Sort the initial function values in descending order, and extract the three initial gray wolves corresponding to the initial function values with the top three serial numbers as the initial optimization gray wolves; Repeat the following gray wolf position update operation until the current update count is the same as the preset update count, and output the target position corresponding to the target gray wolf, and the target positions all satisfy the coil spacing constraint, current constraint, and coil turn number constraint: When the current update count is less than the preset update count, for each current gray wolf, generate the updated position corresponding to the current gray wolf according to the current position of the current gray wolf, the distance between the current gray wolf and the target prey, the current positions of each current optimization gray wolf, and the distances between the current gray wolf and each current optimization gray wolf; among them, initially, use the initial position of the initial gray wolf as the current position of the current gray wolf, and use the initial positions of each initial optimization gray wolf as the current positions of each current optimization gray wolf; For each current optimization gray wolf, generate the updated position corresponding to the current optimization gray wolf according to the current position of the current optimization gray wolf and the distance between the current position of the current optimization gray wolf and the updated positions corresponding to each current gray wolf; For each current gray wolf, calculate the updated function value corresponding to the updated position of the current gray wolf according to the coil optimization model; for each current optimization gray wolf, calculate the updated function value corresponding to the updated position of the current optimization gray wolf according to the coil optimization model; Sort the values of each update function in descending order, and mark the three grey wolves corresponding to the update function values of the first three serial numbers as the updated optimization grey wolves. Use the grey wolves that are not marked and the updated positions corresponding to the grey wolves that are not marked as the current grey wolf and the current position of the current grey wolf position respectively when performing the grey wolf position update operation next time; Use the updated optimization grey wolf with the highest update function value as the target grey wolf; Use each updated optimization grey wolf and the updated position of each updated optimization grey wolf as the current optimization grey wolf and the current position of the current optimization grey wolf respectively when performing the grey wolf position update operation next time; Add the preset iteration number increment to the current update iteration number value.

7. The magnetic field control method for a coil according to claim 6, characterized in that, Generating the updated position corresponding to the current grey wolf according to the current position of the current grey wolf, the distance between the current grey wolf and the target prey, the current positions of each current optimization grey wolf, and the distances between the current grey wolf and each current optimization grey wolf includes: Generating the position adjustment weight coefficient of each current optimization grey wolf according to the current position of each current optimization grey wolf and the number of current optimization grey wolves; Generating the updated position corresponding to the current grey wolf according to the current position of the current grey wolf, the distance between the current grey wolf and the target prey, the current positions of each current optimization grey wolf, the distances between the current grey wolf and each current optimization grey wolf, and the position adjustment weight coefficient of each current optimization grey wolf.

8. A magnetic field control device applicable to a coil, characterized in that, Including: A data acquisition module, a drive voltage signal generation module, and a compensation magnetic field generation module; The data acquisition module is used to obtain the current current flowing in the target coil and the current magnetic field signal corresponding to the target coil; The drive voltage signal generation module is used to generate a current adjustment signal for characterizing the adjustment amount of the current according to the current current and a preset current threshold; Generating a magnetic field adjustment signal for characterizing the adjustment amount of the magnetic field according to the current magnetic field signal and a preset magnetic field reference signal; generating a drive voltage signal for constructing the compensation magnetic field of the target coil according to the current adjustment signal and the magnetic field adjustment signal; wherein, the compensation magnetic field is used to characterize a magnetic field with the same magnetic field intensity as the external interference magnetic field of the target coil and the opposite magnetic field direction to the external interference magnetic field; The compensation magnetic field generation module is used to drive the target coil to generate a compensation magnetic field according to the drive voltage signal.

9. A terminal device, characterized in that, Including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a magnetic field control method for a coil as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein when the computer program runs, it controls the device where the storage medium is located to execute a magnetic field control method for a coil as described in any one of claims 1 to 7.

Citation Information

Cited By

  • System and method for geomagnetic compensation and bias magnetic field generation for cold atom interference

    CN120872095A