A method and related equipment for generating a Helmholtz coil magnetic field based on a constant voltage source
By using a Helmholtz coil magnetic field generation method based on a constant voltage source, and calculating magnetic field parameters using a triaxial magnetometer and a constant voltage source, the problems of expensive constant current sources and unstable voltage sources are solved, and low-cost, highly stable magnetic field generation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2026-04-03
AI Technical Summary
Among the existing power supply methods for Helmholtz coils, constant current sources are expensive, while ordinary voltage sources result in unstable current, making it difficult to meet the expected magnetic field requirements.
A Helmholtz coil magnetic field generation method based on a constant voltage source is adopted. The zero magnetic field base and the comprehensive external magnetic field reading of the magnetometer are obtained through a triaxial magnetometer. The magnetic field reading to be canceled is calculated, the bias current and resistance of the zero magnetic field coil are obtained, and a set voltage is applied to generate a magnetic field that meets the expected requirements. The constant voltage source is used instead of the constant current source.
It achieves the same magnetic field effect as a constant current source while reducing system cost, and meets the expected magnetic field stability requirements.
Smart Images

Figure CN119049827B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Helmholtz coil technology, and in particular to a method and related equipment for generating a Helmholtz coil magnetic field based on a constant voltage source. Background Technology
[0002] A Helmholtz coil is a device that generates a uniform magnetic field over a small area. Because of its open nature, Helmholtz coils allow for easy insertion and removal of other instruments and direct visual observation, making them widely used in physics experiments.
[0003] When using a Helmholtz coil, it needs to be powered. In the existing technology, there are usually two power supply methods. The first is to use a constant current source, but constant current sources are expensive and not conducive to widespread application. The second is to use a common voltage source, but common voltage source power supply may fail to meet the expected magnetic field requirements due to unstable current and other reasons. Summary of the Invention
[0004] To facilitate the generation of a magnetic field that meets the expected requirements using a constant voltage source, this application provides a method and related equipment for generating a Helmholtz coil magnetic field based on a constant voltage source.
[0005] Firstly, this application provides a Helmholtz coil magnetic field generation method based on a constant voltage source, which adopts the following technical solution:
[0006] A method for generating a Helmholtz coil magnetic field based on a constant voltage source includes:
[0007] Obtain the zero magnetic field floor of the magnetometer;
[0008] Acquire the comprehensive external magnetic field reading, and based on the comprehensive external magnetic field reading and the zero magnetic field baseline of the magnetometer, calculate the magnetic field reading to be canceled in order to construct a zero magnetic field environment;
[0009] Based on the reading of the magnetic field to be canceled, obtain the bias current of the zero magnetic field coil;
[0010] Obtain the coil circuit resistance;
[0011] The resistance of the coil circuit is estimated, and the estimated resistance is obtained;
[0012] Based on the zero magnetic field coil bias current, the expected current is obtained;
[0013] Based on the estimated resistor and the expected current, obtain the set voltage;
[0014] A set voltage is applied to the coil, and the corresponding magnetic field reading is obtained;
[0015] The corresponding magnetic field readings are linearly corrected, and the corrected magnetic field reading values are obtained.
[0016] By adopting the above technical solution, a triaxial magnetometer is used to read the zero magnetic field baseline and the comprehensive external magnetic field reading. The canceling magnetic field reading is then calculated based on the comprehensive external magnetic field reading and the zero magnetic field baseline. This canceling magnetic field reading is input into the calculation model to calculate the zero magnetic field coil bias current required to cancel the canceling magnetic field reading. The coil circuit resistance is read, estimated, and a pre-estimation resistance is obtained. The expected current is calculated based on the coil bias current. Then, based on the expected current and the pre-estimation resistance, a setting voltage is calculated. This setting voltage is applied to the coil, and the corresponding magnetic field reading is read. Finally, the corresponding magnetic field reading is linearly corrected, and the corrected magnetic field reading value is obtained. A constant voltage source is used instead of a constant current source. Based on the measurement results, optimal estimation is performed. By applying a current value close to the expectation, not only can the same result as a constant current source be achieved, generating a magnetic field that meets the expected requirements, but it also helps to significantly reduce system costs.
[0017] Optionally, the specific steps for obtaining the zero magnetic field floor of the magnetometer include:
[0018] Place the magnetometer in the designated device and read the current reading of the magnetometer;
[0019] Change the placement orientation of the magnetometer;
[0020] Determine whether the current reading has changed;
[0021] If the current reading does not change, then the current reading is taken as the zero magnetic field base of the magnetometer.
[0022] By adopting the above technical solution, the magnetometer is placed in the designated device, and the current reading of the magnetometer is read. The placement posture of the magnetometer is changed, and the current reading of the magnetometer is read again. This operation is continued until the current reading no longer changes regardless of the placement posture. The current reading at this time is the zero magnetic field floor of the magnetometer. By obtaining the zero magnetic field floor of the magnetometer, it is helpful to remove the zero magnetic field floor of the magnetometer in subsequent operations, so that the magnetic field reading obtained by the constant voltage source better meets the expected requirements.
[0023] Optionally, the specific steps for obtaining the zero magnetic field coil bias current based on the reading of the magnetic field to be canceled include: inputting the reading of the magnetic field to be canceled into a preset calculation model and calculating the initial current reading;
[0024] The initial current reading is optimized, and the zero magnetic field coil bias current is obtained.
[0025] By adopting the above technical solution, the magnetic field to be canceled is input into a preset calculation model. The initial current reading is calculated through the preset calculation model, and then the initial current reading is optimized to finally obtain the zero magnetic field coil bias current. Optimizing the initial current reading helps to reduce the environmental impact, thereby helping to improve the accuracy of the zero magnetic field coil bias current.
[0026] Optionally, the specific steps for optimizing the initial current reading and obtaining the zero-magnetic-field coil bias current include:
[0027] Based on the zero magnetic field floor of the magnetometer and the reading of the magnetic field to be canceled, the magnetometer deviation is obtained;
[0028] Obtain the coil current;
[0029] Based on the zero magnetic field baseline of the magnetometer, the magnetometer output value, and the coil current, the ratio coefficient between the magnetic force count value and the current is obtained;
[0030] The bias current of the zero magnetic field coil is obtained based on the magnetometer deviation, the proportional coefficient, and the comprehensive external magnetic field reading.
[0031] By adopting the above technical solution, the magnetometer deviation and coil current are obtained. Then, based on the magnetometer zero magnetic field baseline, the magnetometer output value, and the coil current, the proportionality coefficient between the magnetometer count value and the current is calculated. Finally, based on the magnetometer deviation, the proportionality coefficient, and the comprehensive external magnetic field reading, the zero magnetic field coil bias current is calculated. Combining the magnetometer deviation, the proportionality coefficient, and the comprehensive external magnetic field reading to calculate the zero magnetic field coil bias current helps to improve the accuracy of the zero magnetic field bias current, thereby helping to obtain a magnetic field that meets the expected requirements.
[0032] Optionally, the specific steps for obtaining the coil current include:
[0033] The current of the three coil circuits XYZ is acquired through a three-channel AD acquisition board;
[0034] The number of voltage points is obtained based on a preset voltage range and voltage interval;
[0035] Obtain the target readings corresponding to the current detector channels for different numbers of voltage points;
[0036] Calculate the current conversion coefficient based on the target reading;
[0037] Based on the current conversion coefficient, a target set of different segmented current conversion coefficients is obtained;
[0038] Based on the target set, the coil current is obtained.
[0039] By adopting the above technical solution, the current of three coil circuits is collected and the number of voltage points is obtained. Then, the target readings corresponding to the current detector channels at different voltage points are obtained. The current conversion coefficient is calculated based on the target readings. Then, the target set of different segmented current conversion coefficients is obtained based on the current conversion coefficients. Finally, the coil current is calculated based on the target set, which helps to improve the accuracy of the coil current and thus helps to obtain a magnetic field that meets the expected requirements.
[0040] Optionally, the specific steps for obtaining the coil current based on the target set include:
[0041] Obtain the output vector of the three-channel AD acquisition board and the zero current bias value of the current detector;
[0042] The coil current is obtained based on the target set, the output vector, and the zero current bias of the current detector.
[0043] By adopting the above technical solution, the output vector and the zero current bias value of the current detector are first obtained, and then the coil current is calculated based on the target set, the output vector and the zero current bias value of the current detector.
[0044] Optionally, the specific steps for obtaining the expected current based on the zero magnetic field coil bias current include:
[0045] The current difference is obtained based on the coil current and the bias current of the zero magnetic field coil;
[0046] The current difference is taken as the expected current.
[0047] By adopting the above technical solution, the current difference is calculated based on the coil current and the zero magnetic field coil bias current.
[0048] Secondly, this application also discloses a Helmholtz coil magnetic field generating system based on a constant voltage source, which adopts the following technical solution:
[0049] A Helmholtz coil magnetic field generating system based on a constant voltage source includes:
[0050] The first acquisition module is used to acquire the zero magnetic field baseline of the magnetometer;
[0051] The second acquisition module is used to acquire the comprehensive external magnetic field reading, and calculate the magnetic field reading to be canceled based on the comprehensive external magnetic field reading and the zero magnetic field base of the magnetometer, so as to construct a zero magnetic field environment;
[0052] The third acquisition module is used to acquire the zero magnetic field coil bias current based on the reading of the magnetic field to be canceled;
[0053] The fourth acquisition module is used to acquire the coil circuit resistance;
[0054] The fifth acquisition module is used to estimate the resistance of the coil circuit and acquire the estimated resistance;
[0055] The sixth acquisition module is used to acquire the expected current based on the bias current of the zero magnetic field coil;
[0056] The seventh acquisition module is used to acquire the set voltage based on the estimated resistor and the expected current;
[0057] The eighth acquisition module is used to apply a set voltage to the coil and acquire the corresponding magnetic field reading;
[0058] The ninth acquisition module is used to perform linear correction on the corresponding magnetic field reading and acquire the magnetic field reading correction value.
[0059] By adopting the above technical solution, a triaxial magnetometer is used to read the zero magnetic field baseline and the comprehensive external magnetic field reading. The canceling magnetic field reading is then calculated based on the comprehensive external magnetic field reading and the zero magnetic field baseline. This canceling magnetic field reading is input into the calculation model to calculate the zero magnetic field coil bias current required to cancel the canceling magnetic field reading. The coil circuit resistance is read, estimated, and a pre-estimation resistance is obtained. The expected current is calculated based on the coil bias current. Then, based on the expected current and the pre-estimation resistance, a setting voltage is calculated. This setting voltage is applied to the coil, and the corresponding magnetic field reading is read. Finally, the corresponding magnetic field reading is linearly corrected, and the corrected magnetic field reading value is obtained. A constant voltage source is used instead of a constant current source. Based on the measurement results, optimal estimation is performed. By applying a current value close to the expectation, not only can the same result as a constant current source be achieved, generating a magnetic field that meets the expected requirements, but it also helps to significantly reduce system costs.
[0060] Thirdly, the computer device provided in this application adopts the following technical solution:
[0061] A smart terminal includes a memory and a processor, wherein the memory stores a computer program that can run on the processor, and when the processor loads the computer program, it executes the method of the first aspect.
[0062] By adopting the above technical solution, a computer program is generated based on the method of the first aspect and stored in a memory for loading and execution by a processor. Thus, a smart terminal is made based on the memory and the processor, making it convenient for users to use.
[0063] Fourthly, the computer-readable storage medium provided in this application adopts the following technical solution:
[0064] A computer-readable storage medium storing a computer program that, when loaded by a processor, executes the method of the first aspect.
[0065] By adopting the above technical solution, a computer program is generated based on the method of the first aspect and stored in a computer-readable storage medium for loading and execution by a processor. The computer-readable storage medium facilitates the reading and storage of the computer program.
[0066] In summary, this application includes the following beneficial technical effects:
[0067] The zero magnetic field baseline and the combined external magnetic field reading are read by a triaxial magnetometer. The canceling magnetic field reading is then calculated based on the combined external magnetic field reading and the zero magnetic field baseline. The canceling magnetic field reading is input into the calculation model to calculate the zero magnetic field coil bias current required to cancel the canceling magnetic field reading. The coil circuit resistance is read and estimated to obtain the estimated resistance. The expected current is calculated based on the coil bias current. The set voltage is then calculated based on the expected current and the estimated resistance. The set voltage is applied to the coil, and the corresponding magnetic field reading is read. Finally, the corresponding magnetic field reading is linearly corrected, and the corrected magnetic field reading value is obtained.
[0068] By replacing the constant current source with a constant voltage source, and making optimal estimates based on the measurement results, by applying a current value close to the expectation, not only can the same result as the constant current source be achieved and a magnetic field that meets the expected requirements be generated, but the system cost can also be significantly reduced. Attached Figure Description
[0069] Figure 1 This is a main flowchart of a Helmholtz coil magnetic field generation method based on a constant voltage source according to an embodiment of this application;
[0070] Figure 2 This is a block diagram of a Helmholtz coil magnetic field generating system based on a constant voltage source according to an embodiment of this application.
[0071] Explanation of reference numerals in the attached figures:
[0072] 1. First acquisition module; 2. Second acquisition module; 3. Third acquisition module; 4. Fourth acquisition module; 5. Fifth acquisition module; 6. Sixth acquisition module; 7. Seventh acquisition module; 8. Eighth acquisition module; 9. Ninth acquisition module. Detailed Implementation
[0073] In the first aspect, this application discloses a method for generating a Helmholtz coil magnetic field based on a constant voltage source.
[0074] Reference Figure 1A method for generating a Helmholtz coil magnetic field based on a constant voltage source, comprising steps S101 to S109:
[0075] Step S101: Obtain the zero magnetic field baseline of the magnetometer.
[0076] Specifically, in this embodiment, the magnetometer needs to be placed inside a small shielded container and then inside a large shielded barrel. The magnetic field reading remains unchanged regardless of the placement orientation; this reading represents the zero magnetic field floor of the magnetometer. In this embodiment, the magnetometer is a triaxial magnetometer, and the zero magnetic field floor of the magnetometer is an absolute reference value.
[0077] Step S102: Obtain the comprehensive external magnetic field reading, and calculate the magnetic field reading to be canceled based on the comprehensive external magnetic field reading and the zero magnetic field baseline of the magnetometer, so as to construct a zero magnetic field environment.
[0078] Specifically, in this embodiment, the comprehensive external magnetic field reading is the final reading of the three-axis magnetometer after the magnetometer is affected by the Earth's magnetic field and the ambient magnetic field, based on the zero magnetic field baseline of the magnetometer; the canceled magnetic field reading is the magnetic field strength after subtracting the zero magnetic field baseline of the magnetometer from the comprehensive external magnetic field reading.
[0079] Step S103: Obtain the zero magnetic field coil bias current based on the reading of the magnetic field to be canceled.
[0080] Specifically, the zero-field bias current is the current that the coil uses to cancel out the combined external magnetic field. In this embodiment, the zero-field bias current is a vector value, used as... This indicates that the zero magnetic field bias current is a variable affected by the environment and requires real-time optimal estimation.
[0081] Step S104: Obtain the coil circuit resistance.
[0082] Specifically, the coil circuit resistance is the resistance present in the coil circuit. In this embodiment, the coil circuit resistance is a vector value, used as... It means that among them
[0083] Step S105: Estimate the coil circuit resistance and obtain the estimated resistance.
[0084] Specifically, the coil resistance is a variable affected by factors such as temperature, requiring optimal estimation. The coil resistance obtained after optimal estimation is the estimated resistance. The estimation period can be 10 sampling intervals. The estimated resistance is used... Specifically, Kalman filtering or fixed-length smoothing averaging can be used to optimize the coil resistance. In this embodiment, Kalman filtering is used.
[0085] Specifically, estimating the resistance Measurement equations that satisfy Kalman filtering: in It is the output voltage of a constant voltage source, which can be read using a voltmeter. The coil current can be read using an ammeter. For the error term, it is worth noting that the calculation It is not possible to calculate when the coil current is close to zero.
[0086] Step S106: Obtain the expected current based on the zero magnetic field coil bias current.
[0087] Specifically, the expected current is the coil current minus the zero magnetic field bias current, using... It means, that is In this embodiment, The determined value is used to correct the result of the optimal estimate of the coil's zero-magnetic-field bias current. Through continuous research The result obtained through dynamic adjustment is: when When it gets infinitely close to zero, it eventually becomes
[0088] Step S107: Obtain the set voltage based on the estimated resistor and the expected current.
[0089] Specifically, in this embodiment, setting the voltage is used to obtain a magnetic field that meets the expected requirements. This voltage is applied to the coil by a constant voltage source. It means, and
[0090] Step S108: Apply the set voltage to the coil and obtain the corresponding magnetic field reading.
[0091] Specifically, in this embodiment, the corresponding magnetic field reading is the final magnetic field reading that meets the expected requirements, which is read by the constant voltage source after applying a set voltage to the coil.
[0092] Step S109: Perform linear correction on the corresponding magnetic field readings and obtain the corrected magnetic field reading values.
[0093] Specifically, in this embodiment, the set voltage is obtained. Afterwards, use Three constant voltage sources were set up. However, due to the insufficient resolution of the constant voltage sources and the need for optimal estimation resistors... Due to factors such as errors, the obtained current is expected to be... Zero magnetic field bias current It is not equal to the expected value because The error is small, and the magnetometer output value is considered to be... Within a small interval, the relationship between the magnetic force count and the current is linear. Therefore, the proportionality coefficient between the magnetic force count and the current is used. Perform small-interval linear correction to achieve elimination. The magnetometer reading after error correction is the corrected value for the magnetic field reading. diagonal matrix
[0094] Determining the ideal current using magnetometer deviation: When the optimal estimate of the coil bias current at zero magnetic field is obtained, the magnetometer deviation is... The corresponding current deviation is The corrected zero-magnetic-field bias current of the coil is
[0095] Correcting magnetometer results using current deviation: when there is an error between the expected current and the actual applied current. At that time, calculate Corresponding magnetometer linearity correction value After correction, an error-free result can be obtained. The corresponding magnetometer output correction value, i.e., the magnetic field reading correction value.
[0096] The Helmholtz coil magnetic field generation method based on a constant voltage source provided in this embodiment reads the zero magnetic field baseline and the comprehensive external magnetic field reading of the magnetometer using a triaxial magnetometer. Then, the canceling magnetic field reading is calculated based on the comprehensive external magnetic field reading and the zero magnetic field baseline of the magnetometer. The canceling magnetic field reading is input into the calculation model to calculate the zero magnetic field coil bias current required to cancel the canceling magnetic field reading. The coil circuit resistance is read, and the estimated resistance is obtained after estimating the coil circuit resistance. The expected current is calculated based on the coil bias current. Then, the set voltage is calculated based on the expected current and the estimated resistance. The set voltage is applied to the coil, and the corresponding magnetic field reading corresponding to the set voltage is read.
[0097] By replacing the constant current source with a constant voltage source, and making optimal estimates based on the measurement results, by applying a current value close to the expectation, not only can the same result as the constant current source be achieved and a magnetic field that meets the expected requirements be generated, but the system cost can also be significantly reduced.
[0098] In one embodiment of this example, the specific steps of obtaining the zero magnetic field baseline of the magnetometer in step S101 include steps S201 to S204:
[0099] Step S201: Place the magnetometer in the designated device and read the current reading of the magnetometer.
[0100] Specifically, the designated device is the device used to measure the zero magnetic field floor of the magnetometer. In this embodiment, the designated device consists of two shielding barrels, one large and one small, with the smaller shielding barrel placed inside the larger shielding barrel and the triaxial magnetometer placed inside the smaller shielding barrel.
[0101] Step S202: Change the placement orientation of the magnetometer.
[0102] Specifically, in this embodiment, the position and orientation of the magnetometer within the shielding cylinder can be arbitrarily changed.
[0103] Step S203: Determine whether the current reading has changed.
[0104] Step S204: If the current reading has not changed, then take the current reading as the zero magnetic field base of the magnetometer.
[0105] The Helmholtz coil magnetic field generation method based on a constant voltage source provided in this embodiment involves placing a magnetometer in a designated device and reading its current reading. The placement orientation of the magnetometer is then changed, and the current reading is read again. This process is continued until the current reading no longer changes regardless of the placement orientation. The current reading at this point is the zero magnetic field floor of the magnetometer. Obtaining the zero magnetic field floor helps to remove it during subsequent operations, thereby ensuring that the magnetic field reading obtained through the constant voltage source better meets the expected requirements.
[0106] In one embodiment of this example, step S103, which involves obtaining the zero magnetic field coil bias current based on the reading of the magnetic field to be canceled, specifically includes steps S301 to S302:
[0107] Step S301: Input the reading of the magnetic field to be canceled into the preset calculation model and calculate the initial current reading.
[0108] Specifically, in this embodiment, the preset calculation model is a model that is pre-set to calculate the initial current reading based on the reading of the external magnetic field to be offset. The initial current reading is the current reading calculated after the reading of the magnetic field to be offset is input into the preset calculation model.
[0109] Step S302: Optimize the initial current reading and obtain the zero magnetic field coil bias current.
[0110] The Helmholtz coil magnetic field generation method based on a constant voltage source provided in this embodiment inputs the magnetic field to be canceled into a preset calculation model. The preset calculation model calculates the initial current reading, and then optimizes the initial current reading to finally obtain the zero magnetic field coil bias current. Optimizing the initial current reading helps to reduce the environmental impact, thereby helping to improve the accuracy of the zero magnetic field coil bias current.
[0111] In one embodiment of this example, the specific steps of optimizing the initial current reading and obtaining the zero magnetic field coil bias current in step S302 include steps S401 to S404:
[0112] Step S401: Obtain the magnetometer deviation based on the zero magnetic field baseline of the magnetometer and the reading of the magnetic field to be canceled.
[0113] Specifically, the magnetometer deviation is the zero magnetic field floor of the magnetometer. The magnetometer output value corresponding to the application of a zero magnetic field bias current The difference between them, i.e. In this embodiment, through continuous dynamic adjustments, It continuously and infinitely approaches 0, which means that... and The dynamics are infinitely similar, thus canceling out the zero magnetic field floor of the magnetometer.
[0114] Step S402: Obtain the coil current.
[0115] Step S403: Based on the zero magnetic field base of the magnetometer Magnetometer output value By analyzing the coil current, the ratio of the magnetic force count to the current is obtained.
[0116] Specifically, in this embodiment, the proportionality coefficient between the magnetic force count value and the current is a set of segmented constant values, which needs to be measured and obtained. It means that among them
[0117] Step S404: Obtain the zero magnetic field coil bias current based on the magnetometer deviation, proportional coefficient, and comprehensive external magnetic field reading.
[0118] Specifically, in this embodiment, by It can be known Combined available After transformation, we obtain Finally, I sought to obtain... in The zero-voltage magnetic field reading (comprehensive external field reading) can be directly...
[0119] magnetic
[0120] Read; Set the bias voltage value.
[0121] The Helmholtz coil magnetic field generation method based on a constant voltage source provided in this embodiment obtains the magnetometer deviation and coil current, then calculates the proportionality coefficient between the magnetometer reading and the current based on the magnetometer zero magnetic field base, the magnetometer output value, and the coil current. Finally, the zero magnetic field coil bias current is calculated based on the magnetometer deviation, the proportionality coefficient, and the comprehensive external magnetic field reading. Calculating the zero magnetic field coil bias current by combining the magnetometer deviation, the proportionality coefficient, and the comprehensive external magnetic field reading helps improve the accuracy of the zero magnetic field bias current, thereby helping to obtain a magnetic field that meets the expected requirements.
[0122] In one embodiment of this example, step S402, which involves obtaining the coil current, specifically includes steps S501 to S506:
[0123] Step S501: Acquire the current of the three coil circuits XYZ through the three-channel AD acquisition board.
[0124] Specifically, in this embodiment, the current detector has three channels to detect the current in the XYZ coil loops respectively. The detector consists of a three-channel AD acquisition board and three 1Ω standard resistors connected in series in the XYZ coil loops. When calibrating the X coil, an ammeter is connected in series with the X coil. The voltage output range of voltage source 1 is 0-8V. The power polarity switch is adjusted to apply a voltage of ±8V to the X coil loop, with voltage intervals of 0.5V, for a total of 33 voltage points. The current value of the ammeter is recorded. i And the corresponding voltage point current detector X channel reading DX i .
[0125] Step S502: Obtain the number of voltage points based on the preset voltage range and voltage interval.
[0126] Specifically, in this embodiment, the preset voltage range is 0-8V. Adjusting the power polarity switch can apply a voltage of ±8V to the coil circuit, with a voltage interval of 0.5V and 33 voltage points.
[0127] Step S503: Obtain the target readings corresponding to the current detector channels for different voltage points.
[0128] Specifically, in this embodiment, the target reading i is a number from 0 to 32, and each number corresponds to a range of values for DX. For example, applying a voltage of ±8V to the coil at 0.5V intervals results in 31 voltage points. Assuming the reading value ranges from -8000 to 8000, the current conversion coefficient CX0 corresponds to a range of values from -8000 to -7500. 32 The corresponding value range is 7500 to 8000.
[0129] Step S504: Calculate the current conversion coefficient based on the target reading.
[0130] Specifically, in this embodiment, the current conversion coefficient CX i =Iagilent i / (DX i -DX bias ),in, It is the output value of the current detector when the power supply voltage is set to zero (or the power supply is off). It is defined as the zero current bias value of the current detector and is a fixed value.
[0131] Step S505: Based on the current conversion coefficient, obtain the target set of different segmented current conversion coefficients.
[0132] Specifically, in this embodiment, the target set is: It includes arrive A set of vectors.
[0133] Step S506: Obtain the coil current based on the target set.
[0134] Specifically, in this embodiment, when the reading range of the XYZ channel of the current detector is ijk, It is worth noting that the set of constants Calculations cannot be performed when the divisor (channel reading) is close to zero; at this time, the current value of the current detector is... Among them, DX i For the corresponding voltage point current detector X channel reading, DY j For the corresponding voltage point current detector Y-channel reading, DZ k This corresponds to the reading of the Z-channel current detector at the voltage point; IX coil IY coil and IZ coil These represent the currents passing through the X, Y, and Z coils, respectively.
[0135] The Helmholtz coil magnetic field generation method based on a constant voltage source provided in this embodiment collects the current of three coil circuits and obtains the number of voltage points. Then, it obtains the target readings corresponding to the current detector channels at different voltage point numbers, calculates the current conversion coefficient based on the target readings, obtains the target set of different segmented current conversion coefficients based on the current conversion coefficients, and finally calculates the coil current based on the target set. This helps to improve the accuracy of the coil current, thereby helping to obtain a magnetic field that meets the expected requirements.
[0136] In one embodiment of this example, step S506, based on the target set, specifically includes steps S601 to S604:
[0137] Step S601: Obtain the output vector of the three-channel AD acquisition board and the zero current bias value of the current detector.
[0138] Specifically, it is worth noting that when testing the zero current bias value of the current detector, the polarity cannot be in the disconnected state. This is because the ground wire of the current detector shares a common ground with the power supply ground, and the power supply ground is connected to the coil. The disconnected state disconnects the power supply ground from the coil, which in turn disconnects the ground wire of the current detector from the coil. The readings in the two cases are not equal. Therefore, the disconnected setting is not used in this application.
[0139] Step S602: Obtain the coil current based on the target set, output vector, and zero current bias of the current detector.
[0140] In one embodiment of this example, step S107, which involves obtaining the set voltage based on the estimated resistor and the expected current, includes steps S701 to S702:
[0141] Step S701: Obtain the current difference based on the coil current and the zero magnetic field coil bias current.
[0142] Specifically, in this embodiment, the current difference is the difference between the coil current and the zero magnetic field coil bias current.
[0143] Step S702: Use the current difference as the expected current.
[0144] It is worth noting that the resistance of the Helmholtz coil and the ambient magnetic field change over time, and even changes in a short period of time (a few minutes) can affect the accuracy. Therefore, parameters such as coil resistance, zero magnetic bias current, and applied current need to be optimally estimated under synchronous conditions. The optimal estimation method is not limited to: UKF filtering, least squares estimation, smoothing filtering of historical values, and PID method. In this embodiment, the UKF filtering (unscented Kalman filtering) algorithm is used.
[0145] Secondly, this application also discloses a Helmholtz coil magnetic field generation system based on a constant voltage source.
[0146] Reference Figure 2 A Helmholtz coil magnetic field generating system based on a constant voltage source includes:
[0147] The first acquisition module 1 is used to acquire the zero magnetic field baseline of the magnetometer;
[0148] The second acquisition module 2 is used to acquire the comprehensive external magnetic field reading and, based on the comprehensive external magnetic field reading and the zero magnetic field baseline of the magnetometer, calculate the magnetic field reading to be canceled in order to construct a zero magnetic field environment;
[0149] The third acquisition module 3 is used to acquire the zero magnetic field coil bias current based on the reading of the magnetic field to be canceled;
[0150] The fourth acquisition module 4 is used to acquire the coil circuit resistance;
[0151] The fifth acquisition module 5 is used to estimate the coil circuit resistance and obtain the estimated resistance;
[0152] The sixth acquisition module 6 is used to acquire the expected current based on the bias current of the zero magnetic field coil;
[0153] The seventh acquisition module 7 is used to acquire the set voltage based on the estimated resistor and the expected current;
[0154] The eighth acquisition module 8 is used to apply a set voltage to the coil and acquire the corresponding magnetic field reading;
[0155] The ninth acquisition module 9 is used to perform linear correction on the corresponding magnetic field readings and obtain the corrected magnetic field reading value.
[0156] Thirdly, this application discloses a smart terminal, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor loads the computer program, it executes a Helmholtz coil magnetic field generation method based on a constant voltage source as described in the above embodiment.
[0157] Fourthly, embodiments of this application disclose a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is loaded by a processor, it executes a Helmholtz coil magnetic field generation method based on a constant voltage source according to the above embodiments.
[0158] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.
Claims
1. A method for generating a Helmholtz coil magnetic field based on a constant voltage source, characterized in that, include: Obtain the zero magnetic field floor of the magnetometer; Acquire the comprehensive external magnetic field reading, and based on the comprehensive external magnetic field reading and the zero magnetic field baseline of the magnetometer, calculate the magnetic field reading to be canceled in order to construct a zero magnetic field environment; Based on the reading of the magnetic field to be canceled, obtain the bias current of the zero magnetic field coil; Obtain the coil circuit resistance; The resistance of the coil circuit is estimated, and the estimated resistance is obtained; Based on the bias current of the zero magnetic field coil, the expected current is obtained; Based on the estimated resistor and the expected current, obtain the set voltage; A set voltage is applied to the coil, and the corresponding magnetic field reading is obtained; The corresponding magnetic field readings are linearly corrected, and the corrected magnetic field reading values are obtained.
2. The method for generating a Helmholtz coil magnetic field based on a constant voltage source according to claim 1, characterized in that, The specific steps for obtaining the zero magnetic field floor of the magnetometer include: Place the magnetometer in the designated device and read the current reading of the magnetometer; Change the placement orientation of the magnetometer; Determine whether the current reading has changed; If the current reading does not change, then the current reading is taken as the zero magnetic field base of the magnetometer.
3. The method for generating a Helmholtz coil magnetic field based on a constant voltage source according to claim 2, characterized in that, The specific steps for obtaining the zero-magnetic-field coil bias current based on the reading of the magnetic field to be canceled include: Input the reading of the magnetic field to be canceled into a preset calculation model and calculate the initial current reading; The initial current reading is optimized, and the zero magnetic field coil bias current is obtained.
4. The method for generating a Helmholtz coil magnetic field based on a constant voltage source according to claim 3, characterized in that, The specific steps for optimizing the initial current reading and obtaining the zero-magnetic-field coil bias current include: Based on the zero magnetic field baseline of the magnetometer and the reading of the magnetic field to be canceled, the magnetometer deviation is obtained; Obtain the coil current; Based on the zero magnetic field baseline of the magnetometer, the magnetometer output value, and the coil current, the ratio coefficient between the magnetic force count value and the current is obtained; The bias current of the zero magnetic field coil is obtained based on the magnetometer deviation, the proportional coefficient, and the comprehensive external magnetic field reading.
5. The method for generating a Helmholtz coil magnetic field based on a constant voltage source according to claim 4, characterized in that, The specific steps for obtaining the coil current include: The current of the three coil circuits XYZ is acquired through a three-channel AD acquisition board; The number of voltage points is obtained based on a preset voltage range and voltage interval; Obtain the target readings corresponding to the current detector channels for different numbers of voltage points; Calculate the current conversion coefficient based on the target reading; Based on the current conversion coefficient, a target set of different segmented current conversion coefficients is obtained; Based on the target set, the coil current is obtained.
6. The method for generating a Helmholtz coil magnetic field based on a constant voltage source according to claim 5, characterized in that, The specific steps for obtaining the coil current based on the target set include: Obtain the output vector of the three-channel AD acquisition board and the zero current bias value of the current detector; The coil current is obtained based on the target set, the output vector, and the zero current bias of the current detector.
7. The method for generating a Helmholtz coil magnetic field based on a constant voltage source according to claim 1, characterized in that, The specific steps for obtaining the expected current based on the bias current of the zero magnetic field coil include: The current difference is obtained based on the coil current and the bias current of the zero magnetic field coil; The current difference is taken as the expected current.
8. A Helmholtz coil magnetic field generating system based on a constant voltage source, characterized in that, include: The first acquisition module (1) is used to acquire the zero magnetic field baseline of the magnetometer; The second acquisition module (2) is used to acquire the comprehensive external magnetic field reading and, based on the comprehensive external magnetic field reading and the zero magnetic field base of the magnetometer, calculate the magnetic field reading to be canceled in order to construct a zero magnetic field environment; The third acquisition module (3) is used to acquire the zero magnetic field coil bias current based on the reading of the magnetic field to be canceled; The fourth acquisition module (4) is used to acquire the coil circuit resistance; The fifth acquisition module (5) is used to estimate the resistance of the coil circuit and acquire the estimated resistance; The sixth acquisition module (6) is used to acquire the expected current based on the bias current of the zero magnetic field coil; The seventh acquisition module (7) is used to acquire the setting voltage based on the estimated resistor and the expected current; The eighth acquisition module (8) is used to apply a setting voltage to the coil and acquire the corresponding magnetic field reading; The ninth acquisition module (9) is used to perform linear correction on the corresponding magnetic field reading and obtain the magnetic field reading correction value.
9. A smart terminal, comprising a memory and a processor, characterized in that, The memory is used to store computer programs that can run on the processor, and when the processor loads the computer program, it executes the method of any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is loaded by the processor, it executes the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Electromagnetic coil magnetic field generation system for actuating magnetic micro-robot
CN113380519A
Dual Helmholtz control device for dynamic magnetic field compensation
CN115327450A