Three-axis high-uniformity magnetic field coil design method based on improved multi-target grey wolf algorithm
By improving the multi-objective gray wolf algorithm to optimize the parameters of the three-axis uniform magnetic field coil, the problems of complex calculation and insufficient uniformity in traditional methods are solved, and the design effect of high uniformity and low calculation amount is achieved.
Patent Information
- Application Number
- CN202510191022.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-02-20
AI Technical Summary
It is difficult to design a three-axis uniform magnetic field coil that meets the requirements of high uniformity, especially in atomic sensors. The traditional method has complex calculations and is difficult to achieve high uniformity.
The improved multi-objective gray wolf algorithm is adopted to convert the coil optimization problem from traditional equation solution to nonlinear optimization problem. By constructing optimization objective functions and constraints, the multi-objective gray wolf algorithm is used to optimize the coil parameters to reduce the amount of manual calculation.
A high uniform three-axis uniform magnetic field coil is designed with a small calculation amount, which meets the uniformity requirements in atomic sensors. Compared with traditional methods, it significantly improves uniformity and reduces the calculation amount.
Smart Images

Figure CN120145819A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a design method for a three-axis highly uniform magnetic field coil based on an improved multi-objective grey wolf algorithm, belonging to the technical field of designing sensors according to the magnetic field effect generated by current and optimizing sensor parameters using intelligent optimization algorithms. Background Art
[0002] Common design methods for uniform magnetic field coils include the discrete wire method (utilizing the positive relationship between current and magnetic field) and the target field method (utilizing the inverse relationship between current and magnetic field), and the finite element method. These methods all idealize the overall coil for modeling. For example, the discrete wire method regards the coil as discrete wires without thickness, and the target field method regards the coil surface as an ideal conductor when designing a uniform magnetic field coil. In addition, both the discrete wire method and the target field method derive the magnetic field generated by the coil according to the Biot-Savart law.
[0003] The grey wolf algorithm mimics the leadership hierarchy and hunting mechanism of grey wolves in nature. Four types of grey wolves, namely alpha, beta, delta, and omega, are used to represent the optimal solution, sub-optimal solution, and other solutions in the set of parameter solutions during the actual algorithm operation, respectively. In addition, mathematical models are established for the three main steps of grey wolves in nature for hunting, searching for prey, surrounding prey, and attacking prey. Moreover, compared with algorithms such as the particle swarm algorithm and differential evolution algorithm used in traditional design of uniform magnetic field coils, the grey wolf algorithm has better performance and has been proven to be superior to the particle swarm algorithm in terms of solution accuracy and convergence speed. For the multi-objective grey wolf algorithm, since it is difficult to find a solution that is optimal for all optimization objectives, alpha, beta, and delta are randomly selected from a set of solutions stored in an external archive through a roulette wheel mechanism.
[0004] When the grey wolf algorithm mathematically models the social hierarchy of wolves, the search (optimization) is guided by alpha, beta, and delta wolves, and omega wolves follow these wolves.
[0005] The wolf pack will first carry out hunting behavior and gradually approach the prey (which is reflected as a solution in the specific implementation of the algorithm):
[0006] The behavior of surrounding the prey can be expressed mathematically by Equation (9) and Equation (10):
[0007]
[0008]
[0009] Where represents the position distance between the grey wolf and the prey, t represents the number of current iterations, is the position vector of the prey in the t-th iteration, represents the position vector of the grey wolf in the t-th iteration, is the position vector of the grey wolf in the (t + 1)-th iteration, and are coefficient vectors, which are used to represent the distance between the grey wolf and the prey, and the proportion taken when determining a new position in the next iteration, respectively. and can be expressed by Equations (11) and (12):
[0010]
[0011] where is the element iteration vector, the elements of and are vectors composed of randomly generated numbers between [0, 1], the elements of take values in the range of [-α, α], where α is a set quantity. Since the elements of the vector linearly decrease from 2 to 0 as the number of iterations increases, the element values of
[0012] will also decrease accordingly. This process enables the grey wolf optimization to simulate converging to the optimal solution in mathematical modeling.
[0013]
[0014] where is the position vector corresponding to a certain omega in the (t + 1)-th iteration, are the temporary position vectors updated according to the positions of alpha, beta, and delta respectively, and the position is updated based on these temporary position vectors.
[0015] The grey wolf algorithm determines whether the search agent (the grey wolf participating in the hunting operation) is more inclined to exploitation behavior or exploration behavior by changing the magnitude of . When , the algorithm tends to approach the currently considered optimal solution. However, this process may cause the algorithm to fall into a local optimum. When is greater than 1, the algorithm deviates from the currently considered optimal solution in order to search for the global optimal solution.
[0016] Compared with the single-objective grey wolf algorithm, the multi-objective grey wolf algorithm adds two new mechanisms - external archive and adaptive grid. Since there are multiple optimization objective functions involved in multi-objective problems, it is difficult to find a function that is optimal for all optimization objectives. Therefore, only the solution vectors that are superior to all other solutions in some optimization objectives and not worse than other solutions in some other objectives can be stored in the external archive. The external archive will be divided into high-dimensional hypercubes during the algorithm operation, and the dimension is determined by the number of selected optimization objectives. When the solutions newly added to the external archive exceed the storage range of the archive, the algorithm will activate the adaptive grid mechanism to expand the storage range to accommodate the newly incorporated solutions.
[0017] After retrieving the existing materials, it is found that there is no direct use of the multi-objective grey wolf algorithm in coil design to convert the coil optimization from equation solving to a non-linear optimization problem to reduce the manual calculation amount. Summary of the Invention
[0018] The present invention idealizes the modeling of the coil according to the basic idea of the discrete wire method, derives the magnetic field B generated by the coil through the Biot-Savart law, solves the coil position parameters according to its Taylor expansion, and finds a set of solutions to minimize the absolute value of each coefficient term of the Taylor expansion. Since the calculation amount is complex when using equation solving for high-order expansion, the present invention directly uses the multi-objective grey wolf algorithm for the first time to convert the coil optimization from equation solving to a non-linear optimization problem, reducing the manual calculation amount. By constructing the optimization objective function and constraint conditions, the coil parameters are obtained through multiple iterations. Compared with the cumbersome calculation process brought by traditional equation solving, the coil design scheme based on the grey wolf algorithm reduces the amount of calculation, and only requires the designer to focus on deriving the magnetic field generated by the coil according to the Biot-Savart law.
[0019] The problem solved by the present invention is: to provide a design method for a three-axis high-uniform magnetic field coil based on an improved multi-objective grey wolf algorithm. The three-axis uniform magnetic field coil designed by this method needs to satisfy that the uniform region range covers the gas chamber where the working substance in the atomic sensor (such as rubidium 87 in the CPT magnetometer, CPT, Coherent Population Trapping) is located. Generally, the relative uniformity of the entire key region (along the axis [-1R, 1R], R is the coil radius) should be about 1% or lower. Therefore, it is necessary to design a three-axis (meeting the magnetic field vector measurement requirements) high-uniform magnetic field coil that meets the uniformity requirements, and the coil must have a large coil constant to ensure that it generates a magnetic field of the order of the geomagnetic field (50000 nT - 60000 nT) within the current range that the finished coil can withstand (for a common flexible circuit board, when the wire width is about 0.2 mm and the copper thickness is 1 oz, the maximum current that can be withstood at an ambient temperature of 25 degrees Celsius is 550 mA), so as to facilitate the study of the performance of the CPT magnetometer in the geomagnetic field environment.
[0020] The technical solution of the present invention is as follows:
[0021] A design method of a three-axis highly uniform magnetic field coil based on an improved multi-objective grey wolf algorithm, characterized by comprising the following steps:
[0022] Step 1, perform idealized modeling on the coil;
[0023] Step 2, determine the constraint conditions according to the requirements of sensor miniaturization;
[0024] Step 3, determine the coil structure;
[0025] Step 4, perform Taylor expansion on the magnetic field expression, including performing single-component Taylor expansion on the axial coil in the three-axis coil, using Biot-Savart law to deduce the magnetic field of the axial coil, and performing three-component Taylor expansion on the radial coil in the three-axis coil, using Biot-Savart law to deduce the magnetic field of the radial coil;
[0026] Step 5, optimize the parameters using the multi-objective grey wolf optimization algorithm, including constructing the optimization objective function of the axial coil using the linear weighted summation method for the axial coil, directly using the Taylor expansion terms to construct the optimization objective function of the radial coil for the radial coil, and constructing the radial coil screening function according to the sum of the average relative uniformity and the proportion of the uniform region for the optimization objective function of the radial coil;
[0027] Step 6, for the optimization objective function of the axial coil and the radial coil screening function, improve the initialization mechanism and convergence factor of the multi-objective grey wolf algorithm, including implementing the reverse learning initialization mechanism through Python, and modifying the convergence mode of the convergence factor α of the grey wolf algorithm from a linear mode to a non-linear mode;
[0028] Step 7, for the optimization objective function of the axial coil and the radial coil screening function, run the improved multi-objective grey wolf algorithm to obtain the optimization of the axial coil and the optimization of the radial coil;
[0029] Step 8, perform finite element simulation verification of the uniformity according to the optimization results;
[0030] Step 9, determine whether the uniformity requirement is met. If not, return to Step 7. If so, enter Step 10;
[0031] Step 10, process the coil finished product using FPC technology and experimentally verify the uniformity.
[0032] Step 10 includes the following steps:
[0033] Step 10.1, build a magnetic shielding barrel;
[0034] Step 10.2, build an experimental platform inside the magnetic shielding barrel and place the coil on the platform;
[0035] Step 10.3: Use the current element NI-SMU to supply current to the coil to generate a magnetic field.
[0036] Step 10.4: Measure the magnetic field actually generated by the coil with a fluxgate.
[0037] Step 10.5: Process the recorded magnetic field data through Python, calculate the actual relative uniformity, and generate a chart.
[0038] Step 1 includes the following expressions:
[0039]
[0040] where B is the magnetic field generated by the coil derived using the Biot-Savart law for solving the magnetic field generated by an ideal wire with zero thickness, μ 0 is the magnetic permeability of vacuum, I is the current passing through the coil, is the current element on the energized coil, is the vector connecting the point where a certain current element on the coil is located to an arbitrary point in space, and r is the magnitude of ;
[0041] ε z is the relative uniformity at a certain point on the z-axis representing the magnetic field generated by the z-axis coil along the z-axis direction, B z (z) is the magnitude of the axial magnetic field generated by the axial coil at the point (0, 0, z), and B z (0) is the magnetic field at the origin of the z-axis;
[0042] ε x represents the relative uniformity at a certain point on the x-axis representing the magnetic field generated by the x-axis coil along the x-axis direction, B x (x) is the magnitude of the radial magnetic field generated by the radial coil at the point (x, 0, 0), and B x (0) is the magnetic field at the origin of the x-axis.
[0043] The relative uniformity is used to describe the uniformity of the coil magnetic field. The better the uniformity in a certain area, the lower the average relative uniformity in the corresponding area.
[0044] The coil structure in Step 3 includes an axial coil and a radial coil. The axial coil is a z-axis uniform magnetic field coil composed of a combination of multiple pairs of coaxial, same-sized, and parallel circular coils, and the radial coil is an x-axis or y-axis uniform magnetic field coil composed of multiple pairs of nested coaxial saddle-shaped coils.
[0045] Step 3 includes the following expressions:
[0046]
[0047] where is the solution vector of the axial coil, d 1 is the distance from the position of the first pair of circular coils in the axial coil to the xy plane, d 1 The value is expressed as a multiple of R, where R is the coil radius, d 2 to d 8 and so on. is the solution vector of the radial coil, h 1 is the height of the first pair of rectangular saddle coils in the radial coil, h 1 The value is expressed as a multiple of R, h 2 to h 6 and so on. is the opening angle of the arc region of the first pair of rectangular saddle coils in the radial coil, to and so on.
[0048] Step 4 includes the following expressions:
[0049]
[0050] where B z | (0,0,z) is the magnitude of the magnetic field generated by the coil along the z-axis at (0, 0, z), where z is the z-axis coordinate corresponding to a certain point, B z | (0,0,0) is the magnitude of the magnetic field generated by the coil along the z-axis at the origin, is for B z the value of the j-th partial derivative of B with respect to z at (0, 0, 0), R j (z) is the infinitesimal term in the Taylor expansion;
[0051] B i (x, y, z) is the magnetic field component of the magnetic field B along one of the x, y, z axes, where x, y, z are the x-axis, y-axis, and z-axis coordinates corresponding to a certain point, B i (0, 0, 0) is the magnitude of the magnetic field along a certain axis at the origin, m is the highest order of the Taylor expansion, m 1 , m 2 , m 3 are the orders of the Taylor expansions corresponding to the x, y, z components respectively, is the higher-order infinitesimal function, n 1 , n 2 , n 3 correspond to the orders of the x, y, z components in the partial derivative respectively;
[0052] is the magnetic field of the axial coil. I is the current, R is the coil radius, N is a positive integer representing the number of coil pairs, μ 0 is the vacuum permeability, is the unit vector along the z-axis, n i is the number of turns of the i-th pair of coils, i is the sequence number, d i is the distance from the position of the i-th pair of circular coils to the xy plane, is the magnetic field of the radial coil at the origin, Dia is the diameter of the coil, is the unit vector along the x-axis, s i equals 1 plus the square of the ratio of the coil height h i and the coil diameter Dia, is the opening angle of the arc segment of the rectangular saddle coil in the radial coil.
[0053] Step 5 includes the following expressions:
[0054]
[0055] where K p is the number of even orders in the Taylor expansion, k is a positive integer, ω k is the coefficient of the k-th expansion term, is the 2k-th partial derivative of B z with respect to z at (0, 0, 0), B z is the magnetic field along the z-axis, f penalty (x) is the penalty function, x is the candidate solution vector, c is the weight of the uniformity index, is the average relative uniformity of the key interval, M is the number of points for calculating the relative uniformity in the key interval, w is the weight of the length index of the uniform region, usually negative, and θ is the length of the uniform region.
[0056] Step 6 includes the following expressions:
[0057] x = a + (b - a) * rand,
[0058] x′ = b - (x - a),
[0059]
[0060] where x is the initial solution, a is the upper bound of the coil parameter value range, b is the lower bound of the coil parameter value range. rand is a random number between [0, 1], x′ is the initial solution of the reverse learning corresponding to x, α is the convergence factor of the improved multi-objective grey wolf algorithm, t is the current iteration number of the algorithm, t max is the maximum iteration number of the algorithm set by the designer.
[0061] The technical effects of the present invention are as follows: Based on the design method of a three-axis highly uniform magnetic field coil using an improved multi-objective grey wolf algorithm, the coil is idealized modeled, and the magnetic field expression generated by the coil is derived using the Biot-Savart law and the superposition of magnetic fields. For the first time, the multi-objective grey wolf algorithm is directly used to optimize the coil parameters, and the optimization objective function is constructed according to the Taylor expansion coefficients of the magnetic field expression and the coil structure constraint conditions. Compared with the traditional method of solving equations or using a single-objective optimization algorithm to manually set weight parameters for each optimization objective, there is no need to face the situation of no solution for high-order equations or repeatedly experiment to determine appropriate parameters for each optimization objective, reducing the computational difficulty and cumbersome amount of operations. At the same time, the present invention also improves the initialization mechanism and convergence factor of the original multi-objective grey wolf algorithm, improving the quality of the final solution. And finally, a finished three-axis highly uniform magnetic field coil is fabricated using flexible printed circuit (FPC) technology. The present invention is the first to use this algorithm to design a three-axis uniform magnetic field coil.
[0062] The relative average magnetic field uniformity of the axial coil and the radial coil of the three-axis highly uniform magnetic field coil based on the improved multi-objective grey wolf algorithm obtained by theoretical calculation along the axis [-1R, 1R] (R is the radius of the finished cylindrical shape) is respectively reduced by three orders of magnitude and one order of magnitude compared with the common three-axis Helmholtz coil (the relative average magnetic field uniformity is 1.0618×10 -1 ), and the uniformity is greatly improved compared with the Helmholtz coil. The relative average uniformity of the axial coil and the radial coil obtained by the original grey wolf algorithm in the same region is 2.9538×10 -4 and 2.9915×10 -2 , respectively. The design scheme proposed by the present invention improves the uniformity by 27.53% and 23.25% respectively compared with the unimproved grey wolf algorithm. The actually measured relative average magnetic field uniformity of the axial coil and the radial coil using the design scheme of the present invention along the axis [-1R, 1R] is 2.5646×10 -4 and 1.8×10 -2 , respectively, meeting the high uniformity target of the set relative average uniformity of about 1% or less. There is still a huge improvement in uniformity compared with the three-axis Helmholtz coil, with an improvement of three orders of magnitude and one order of magnitude. This proves the effectiveness of the design method of the three-axis highly uniform magnetic field coil proposed by the present invention.
[0063] The flexible circuit printing and processing technology on which the present invention is based is mature, and the cost of manufacturing the present invention is relatively low. Compared with the traditional manually wound three-axis Helmholtz coil, it has higher precision, good coaxiality, and the average magnetic field uniformity is improved by 1-3 orders of magnitude compared with the three-axis Helmholtz coil. It can generate a geomagnetic-level magnetic field within the output range of a common current source. The present invention can be used for a variety of micro atomic sensors, especially for the calibration, magnetic compensation, and sensitivity improvement of vector measurement sensors. Its application scenarios are extensive and it has strong practical value. Brief Description of the Drawings
[0064] Figure 1 It is a schematic flowchart of implementing the design method of a three-axis high-uniform magnetic field coil based on an improved multi-objective grey wolf algorithm. Figure 1 It includes Step 1, performing idealized modeling on the coil; Step 2, determining constraint conditions according to the requirements of sensor miniaturization; Step 3, determining the coil structure; Step 4, performing Taylor expansion on the magnetic field expression, including performing single-component Taylor expansion on the axial coil in the three-axis coil, using Biot-Savart law to deduce the magnetic field of the axial coil, and performing three-component Taylor expansion on the radial coil in the three-axis coil, using Biot-Savart law to deduce the magnetic field of the radial coil; Step 5, optimizing parameters using the multi-objective grey wolf optimization algorithm, including constructing an optimization objective function for the axial coil using the linear weighted summation method for the axial coil, directly using the Taylor expansion terms to construct an optimization objective function for the radial coil, and constructing a screening function for the radial coil according to the sum of the average relative uniformity and the proportion of the uniform region for the optimization objective function of the radial coil; Step 6, for the optimization objective function of the axial coil and the screening function of the radial coil, improving the initialization mechanism and convergence factor of the multi-objective grey wolf algorithm, including implementing the reverse learning initialization mechanism through Python, and modifying the convergence mode of the convergence factor α of the grey wolf algorithm from a linear mode to a non-linear mode; Step 7, for the optimization objective function of the axial coil and the screening function of the radial coil, running the improved multi-objective grey wolf algorithm to obtain the optimization of the axial coil and the optimization of the radial coil; Step 8, performing finite element simulation verification of the uniformity according to the optimization results; Step 9, judging whether the uniformity requirement is met. If not, return to Step 7. If so, enter Step 10; Step 10, processing the coil finished product using FPC technology (FPC, Flexible Printed Circuit) and experimentally verifying the uniformity.
[0065] Figure 2 It is a schematic diagram of the axial and radial coil structures involved in the design method of a three-axis high-uniform magnetic field coil based on an improved multi-objective grey wolf algorithm of the present invention. Figure 2On the left side is the axial coil, and on the right side is the radial coil. The axial coil is an axially (along the z-axis) uniform magnetic field coil composed of a combination of multiple pairs of coaxial and equal-sized circular coils that are parallel to each other. The radial coil is a radially (along the x and y axes) uniform magnetic field coil composed of multiple pairs of nested coaxial saddle-shaped coils. Figure 2 In it, xyz are the three axes of a rectangular coordinate system (i.e., the x-axis, the y-axis, and the z-axis), R is the coil radius, and d 8 is the distance from the position of the 8th pair of circular coils that make up the axial coil to the xy plane. The distance value is generally expressed as a multiple of the coil radius. The distance from the position of the i-th pair of circular coils to the xy plane is denoted as d i , where i is the serial number of the circular coil. h is the coil height. The height of the i-th pair of saddle-shaped coils that make up the radial coil is denoted as h i , expressed as a multiple of the finished coil radius. is the opening angle of the arc segment of the saddle-shaped coil in the radial coil. The opening angle of the arc segment of the i-th pair of saddle-shaped coils is denoted as
[0066] Figure 3 is a schematic flow chart showing the specific steps of implementing the method for designing a three-axis high-uniform magnetic field coil based on the improved multi-objective grey wolf algorithm of the present invention, including processing the coil finished product by FPC technology and experimentally verifying the uniformity. Figure 3 In it, 1 represents the magnetic field generated by the coil deduced according to the electromagnetic field theory. 2 represents performing a Taylor expansion on the magnetic field expression deduced in 1 and constructing an appropriate optimization objective function for the improved grey wolf algorithm based on the expansion term coefficients. 3 represents the improvement made to the original grey wolf algorithm. 4 represents writing an algorithm implementation program in Python and running it. 5 represents verifying the uniformity of the coil corresponding to the parameters obtained in 4 through finite element simulation according to the parameters obtained in 4. 6 represents processing the finished coil using FPC technology and experimentally verifying it. 6.1 represents the FPC processing step. 6.2 represents building a magnetic shielding barrel to isolate the interference of other environmental magnetic fields. 6.3 represents building an experimental platform and placing the coil on the platform. 6.4 represents using a current element NI-SMU (National Instruments - Source Measurement Unit) to provide current for the coil to generate a magnetic field. 6.5 represents measuring the magnetic field actually generated by the coil using a fluxgate. 6.6 represents processing the recorded data through Python, calculating the actual relative uniformity, and generating a chart for easy comparison with the relative uniformity of other traditional coils. Specific implementation manner
[0067] The following will describe the present invention in conjunction with the accompanying drawings ( Figures 1 - 3 ).
[0068] Figure 1It is a schematic flow chart of implementing the design method of a three-axis high-uniform magnetic field coil based on an improved multi-objective grey wolf algorithm of the present invention. Figure 2 It is a schematic diagram of the axial and radial coil structures involved in the design method of a three-axis high-uniform magnetic field coil based on an improved multi-objective grey wolf algorithm of the present invention. Figure 3 It is a schematic flow chart of the specific steps of processing the coil finished product by FPC technology and experimentally verifying the uniformity in implementing the design method of a three-axis high-uniform magnetic field coil based on an improved multi-objective grey wolf algorithm of the present invention. Refer to Figures 1 to 3 As shown, the design method of a three-axis high-uniform magnetic field coil based on an improved multi-objective grey wolf algorithm includes the following steps: Step 1, perform idealized modeling on the coil; Step 2, determine the constraint conditions according to the requirements of sensor miniaturization; Step 3, determine the coil structure; Step 4, perform Taylor expansion on the magnetic field expression, including performing single-component Taylor expansion on the axial coil in the three-axis coil, deriving the magnetic field of the axial coil using Biot-Savart law, and performing three-component Taylor expansion on the radial coil in the three-axis coil, deriving the magnetic field of the radial coil using Biot-Savart law; Step 5, optimize the parameters using the multi-objective grey wolf optimization algorithm, including constructing the optimization objective function of the axial coil using the linear weighted summation method for the axial coil, directly using the Taylor expansion terms to construct the optimization objective function of the radial coil for the radial coil, and constructing the radial coil screening function according to the sum of the average relative uniformity and the proportion of the uniform region for the optimization objective function of the radial coil; Step 6, improve the initialization mechanism and convergence factor of the multi-objective grey wolf algorithm for the optimization objective function of the axial coil and the radial coil screening function, including implementing the reverse learning initialization mechanism through Python, and modifying the convergence mode of the convergence factor α of the grey wolf algorithm from a linear mode to a non-linear mode; Step 7, run the improved multi-objective grey wolf algorithm for the optimization objective function of the axial coil and the radial coil screening function to obtain the optimization of the axial coil and the optimization of the radial coil; Step 8, perform finite element simulation verification of the uniformity according to the optimization results; Step 9, judge whether the uniformity requirement is met, if not, return to Step 7, if so, enter Step 10; Step 10, process the coil finished product by FPC technology and experimentally verify the uniformity.
[0069] Step 10 includes the following steps: Step 10.1, build a magnetic shielding barrel; Step 10.2, build an experimental platform inside the magnetic shielding barrel and place the coil on the platform; Step 10.3, use a current element NI-SMU to provide current for the coil to generate a magnetic field; Step 10.4, measure the magnetic field actually generated by the coil with a fluxgate; Step 10.5, process the recorded magnetic field data through Python, calculate the actual relative uniformity and generate a chart.
[0070] Step 1 includes the following expressions:
[0071]
[0072] Among them, B is the magnetic field generated by the coil derived by applying the Biot-Savart law for solving the magnetic field generated by an ideal wire with zero thickness, and μ 0 is the magnetic permeability of vacuum, I is the current passing through the coil, is the current element on the energized coil, is the vector connecting the point where a certain current element on the coil is located to any point in space, and r is the modulus of;
[0073] ε represents the relative uniformity at a certain point on the z-axis of the magnetic field generated by the z-axis coil along the z-axis direction, and B z (z) is the magnitude of the axial magnetic field generated by the axial coil at the point (0, 0, z), and B z (0) is the magnetic field at the origin of the z-axis; ε x represents the relative uniformity at a certain point on the x-axis of the magnetic field generated by the x-axis coil along the x-axis direction, and B x (x) is the magnitude of the radial magnetic field generated by the radial coil at the point (x, 0, 0), and B x (0) is the magnetic field at the origin of the x-axis.
[0074] The coil structure in Step 3 includes an axial coil and a radial coil. The axial coil is a z-axis uniform magnetic field coil composed of a combination of multiple pairs of coaxial and same-sized parallel circular coils, and the radial coil is an x-axis or y-axis uniform magnetic field coil composed of multiple pairs of nested coaxial rectangular saddle-shaped coils.
[0075] Step 3 includes the following expressions:
[0076]
[0077] Among them is the solution vector of the axial coil, and d 1 is the distance from the position of the first pair of circular coils in the axial coil to the xy plane, and d 1 is expressed as a multiple of R, where R is the coil radius, and d 2 to d 8 are all in the same way, is the solution vector of the radial coil, and h 1 is the height of the first pair of rectangular saddle-shaped coils in the radial coil, and h 1 is expressed as a multiple of R, and h 2 to h 6 are all in the same way, is the opening angle of the first pair of rectangular saddle-shaped coils in the radial coil, to are all in the same way.
[0078] Step 4 includes the following expressions:
[0079]
[0080]
[0081] where B z | (0,0,z) is the magnitude of the magnetic field generated by the coil along the z-axis at (0, 0, z), z is the z-axis coordinate corresponding to a certain point, and B z | (0,0,0) is the magnitude of the magnetic field generated by the coil along the z-axis at the origin, is the value of the j-th partial derivative of B z with respect to z at (0, 0, 0), and R j (z) is the infinitesimal term in the Taylor expansion;
[0082] B i (x, y, z) is the magnetic field component of the magnetic field B along one of the x, y, and z axes, x, y, and z are the x, y, and z axis coordinates corresponding to a certain point, and B i (0, 0, 0) is the magnitude of the magnetic field along one of the axes at the origin, m is the highest order of the Taylor expansion, and m 1 、m 2 、m 3 are the orders of the Taylor expansions corresponding to the x, y, and z components respectively, is the higher-order infinitesimal function, and n 1 、n 2 、n 3 correspond to the orders of the x, y, and z components in the partial derivatives respectively;
[0083] is the axial coil magnetic field, I is the current, R is the coil radius, N is a positive integer representing the number of coil pairs, and μ 0 is the vacuum permeability, is the unit vector along the z-axis, and n i is the number of turns of the i-th pair of coils, i is the serial number, and d i is the distance from the position of the i-th pair of circular coils to the xy plane, is the magnetic field of the radial coil at the origin, is the unit vector along the x-axis. Dia is the coil diameter, and s i is equal to 1 plus the square of the ratio of the coil height h i and the coil diameter Dia, is the central angle of the arc segment of the rectangular saddle-shaped coil in the radial coil.
[0084] Step 5 includes the following expressions:
[0085]
[0086] where K pis the number of even orders in the Taylor expansion, k is a positive integer, ω k is the coefficient of the k-th term in the expansion, is B z at (0, 0, 0) with respect to z of the 2k-th partial derivative, B z is the magnetic field along the z-axis, f penalty (x) is the penalty function, x is the candidate solution vector, c is the weight of the uniformity index, is the average relative uniformity of the key interval, M is the number of points for calculating the relative uniformity in the key interval, w is the weight of the length index of the uniform region, which is usually negative, and θ is the length of the uniform region.
[0087] Step 6 includes the following expressions:
[0088] x = a + (b - a) * rand,
[0089] x′ = b - (x - a),
[0090]
[0091] where x is the initial solution, a is the upper bound of the coil parameter value range, b is the lower bound of the coil parameter value range. rand is a random number between [0, 1], x′ is the initial solution of the reverse learning corresponding to x, α is the convergence factor of the improved multi-objective grey wolf algorithm, t is the current iteration number of the algorithm, t max is the maximum iteration number of the algorithm set by the designer.
[0092] A method for designing a three-axis high-uniform magnetic field coil based on an improved multi-objective grey wolf algorithm, characterized by including the following steps:
[0093] (1) Idealize the overall coil for modeling
[0094] When actually designing the coil, the overall coil can be idealized for modeling (considering the coil thickness). Therefore, the Biot-Savart law for solving the magnetic field generated by an ideal wire with no thickness can be used to derive the magnetic field B generated by the coil.
[0095]
[0096] Among them, μ 0 is the magnetic permeability in vacuum, which is a constant. I is the current passing through the coil, is the current element on the energized coil, is the vector connecting the point where a current element is located on the coil to an arbitrary point in space. r is The modulus. For the derived expression of the magnetic field magnitude (magnetic flux magnitude), a single-component Taylor expansion (Equation 2) is performed on the axial coils, a three-component Taylor expansion (Equation 3) is performed on the radial coils, and the solution is obtained such that a set of coil parameters with the smallest (tending to zero) coefficients of the first N terms in the Taylor expansion is the final coil parameter. The axial coil parameters are composed of the positions of each coil (expressed as multiples of the radius of the final finished cylindrical coil for simplicity of calculation). The radial coil parameters are composed of the height of each coil and the subtended angle of the arc part.
[0097]
[0098] where B z | (0,0,z) is the magnitude of the magnetic field generated by the coil along the z-axis at (0, 0, z), z is the z-axis coordinate corresponding to a certain point, and B z | (0,0,z) is the magnitude of the magnetic field generated by the coil along the z-axis at the origin. is the value of the partial derivative of B z with respect to z at (0, 0, 0), and R j (z) is the infinitesimal term in the Taylor expansion. B i (x, y, z) is the magnetic field component of the magnetic field B along one of the x, y, z axes, x, y, z are the x, y, z axis coordinates corresponding to a certain point, and B i (0, 0, 0) is the magnitude of the magnetic field along one of the axes at the origin, m is the highest order of the Taylor expansion, m 1 、m 2 、m 3 are the orders of the Taylor expansion corresponding to the x, y, z components respectively, and n 1 、n 2 、n 3 correspond to the orders of the x, y, z components in the partial derivative respectively. Generally, the higher the expansion, the better the magnetic field uniformity of the coil corresponding to the obtained parameters, but the more computational effort is required when optimizing the parameters.
[0099] The uniformity of the coil is described by introducing the relative uniformity ε, and its expressions are shown in Equations (4) and (5):
[0100]
[0101] where ε z represents the relative uniformity of the magnetic field generated by the z-axis coil (axial coil) along the z-axis at a certain point on the z-axis. ε x represents the relative uniformity of the magnetic field generated by the x-axis coil (radial coil) along the x-axis at a certain point on the x-axis. Similarly, it can represent the relative uniformity of the magnetic field of the y-axis coil along the y-axis at a certain point on the y-axis. B z(z) is the magnitude of the axial magnetic field generated by the axial coil at the point (0, 0, z), B x (x) is the magnitude of the radial magnetic field generated by the radial coil at the point (x, 0, 0). Since the relative uniformity ε describes the change in the magnetic field at other points relative to the magnetic field at the origin, the lower the relative uniformity, the more uniform the magnetic field is within a certain range, and the better the overall uniformity. The improvement in uniformity described in the abstract and the following text represents a decrease in the relative uniformity of the coil magnetic field.
[0102] (2) Design for the miniaturization and small - scale of atomic sensors
[0103] Atomic sensors such as Coherent Population Trapping (CPT) magnetometers, Optical Pumping (OP) magnetometers, Spin - Exchange Relaxation - Free (SERF) magnetometers, and Nuclear Magnetic Resonance (NMR) gyroscopes all require high - uniformity magnetic field coils, but their miniaturization requirements limit the volume of the coils. The present invention decomposes the problem of designing a three - axis uniform magnetic field coil into an axial coil parameter optimization problem and a radial coil parameter optimization problem. Since the y - axis coil can be obtained by rotating the x - axis coil by 90°, they share the same structural parameters (height, radius, opening angle). Therefore, the parameters obtained after optimizing the x - axis coil can be applied to the y - axis at the same time. According to the structure of the atomic sensor, the overall coil is designed to be cylindrical and the Flexible Printed Circuit (FPC) technology is used to print the circuit on the flexible circuit board, so as to easily attach the designed coil to a 3D - printed bracket of less than 100 cm 3 to surround the gas chamber where the working substance of the atomic sensor is located and provide a uniform magnetic field for the gas chamber. In order to ensure that the sensitivity of the atomic sensor is not affected by the non - uniform magnetic field generated by the coil, the goal in designing the coil is that the relative uniformity of the target average magnetic field in the key area should be about 1% or lower. Traditional three - axis uniform magnetic field coils are often three - axis Helmholtz coils, but their relative uniformity of the average magnetic field in the key area (not less than the volume of the gas chamber, along the axis [-1R, 1R]) can only reach 10 -1 orders of magnitude, and this structure can only be manually wound on the coil skeleton, which will bring certain errors resulting in poor coil coaxiality and further affecting its uniformity. The present invention combines multiple pairs of coaxial and same - sized circular coils to form the axial coil, and multiple pairs of coaxial and rectangular saddle - shaped coils with the same radius of the arc part to form the radial coil. The structure is as Figure 2, which generates a more uniform magnetic field compared to Helmholtz coils and can use FPC technology to produce cylindrical finished products (fitting a cylindrical gas chamber, with axial and radial coils attached to the cylindrical surface), reducing the weight and space occupied by the coils in an integrated atomic sensor (the copper thickness of each layer is only 35μm, and the minimum volume of the coil designed in the present invention can be less than 11.78 cm 3 ), which is beneficial to the miniaturized application of atomic sensors.
[0104] (3) Applying the multi-objective grey wolf algorithm to the design of three-axis coils for the first time
[0105] The problem of the coil position parameters that minimize the coefficients of the Taylor expansion terms in traditional equation solving
[0106] will become a complex high-order equation when there are many coil pairs, and its calculation is too complex to obtain a suitable solution. Therefore, the present invention uses an intelligent optimization algorithm to solve the coil parameters, converting the coil optimization problem from a traditional equation-solving problem to a non-linear optimization problem, avoiding complex equation solving, and focusing on constructing an optimization objective function based on the coefficients of each term in the Taylor expansion of the magnetic field expression. It is then converted into a set of solutions obtained by continuous iteration of the algorithm to minimize the value of the optimization objective function. And a constraint penalty function is added in combination with the minimum line spacing for processing the finished coil and the need to open a light-transmitting hole in the center of the coil to facilitate the detection light (the technology required for an optically pumped magnetometer) to enter the gas chamber. When the result obtained by the algorithm iteration does not meet the constraint conditions, a penalty value is added to the optimization objective function to filter out candidate solutions that do not conform to the actual mechanical structure of the coil.
[0107] However, since the Taylor expansion order is usually high (usually greater than 4), there are usually multiple optimization objectives for the optimization function. Since the effect of only finding the solution with the minimum value of the coefficient of one expansion term in the coil optimization problem is often poor, a set of solutions with better values of the coefficients of multiple expansion terms need to be obtained when actually optimizing the axial coil and the radial coil. The coil optimization problem is actually a multi-objective optimization problem. The coil optimization problem has actually become a multi-objective optimization problem. Traditional coil design problems based on intelligent optimization algorithms usually use the method of linear weighted summation to convert the coil optimization from a multi-objective problem to a single-objective problem, and the algorithms used in these works are also designed based on single-objective problems. However, the method of designing coils by linear weighted summation requires determining a weight coefficient for each optimization objective and then adding them as the final optimization objective function (the optimization objective function of the single-objective algorithm). Determining the appropriate weights requires a certain amount of work and certain experience, and there is a situation where the coil corresponding to the solution with the minimum value of the optimization objective function may have better magnetic field uniformity in the entire air chamber area than other solutions, but the size of the uniform area is smaller than other solutions. Especially when designing the radial coil, unlike the axial coil, the magnetic field expression cannot be converted from a complex integral form to a polynomial form by using single-component Taylor expansion. Therefore, a three-component expansion is required (the result obtained by single-component expansion is poor in the region along the non-axis. If the single-component expansion cannot simplify the calculation, then a three-component expansion needs to be considered). Partial derivatives need to be taken with respect to the three variables x, y, and z, and there are more optimization objectives, and the workload of determining the weight coefficients is more cumbersome.
[0108] Therefore, the present invention first uses the multi-objective grey wolf algorithm specifically designed for multi-objective problems to design a three-axis uniform magnetic field coil, which introduces an adaptive grid and an external archive mechanism compared with the single-objective algorithm. Its algorithm is more complex. After directly using the multi-objective grey wolf algorithm in the present invention, there is no need to determine a suitable weight coefficient for each optimization objective, greatly reducing the workload in the optimization stage. When constructing the optimization objective function of the multi-objective grey wolf algorithm in the present invention, two key indicators, namely the average uniformity and the size of the uniform region, are comprehensively considered, and a penalty function is added considering factors such as the coil spacing, the need for a light passing hole for the detection light, and the limitation of the coil volume on the integration miniaturization of the atomic sensor. When the parameters obtained by the algorithm do not meet the limitations of the coil structure, a penalty value is added to the corresponding objective function. The present invention respectively adopts the linear weighted summation method and directly uses the multi-objective mechanism to optimize the position parameters of their respective coils according to the difficulty of optimizing the axial coil and the radial coil. When directly using the multi-objective mechanism for optimization, since the multi-objective algorithm obtains a set of solutions existing in the external archive instead of a single solution of the single-objective algorithm, but only one solution is required for the coil design, a series of solutions in the external archive need to be screened out to obtain a solution as the final scheme. When screening in the present invention, a new screening function is innovatively designed additionally, which is the sum of the average relative uniformity on the x-axis and the size of the uniform region generated by the coil corresponding to this parameter. The two key parameters of the average uniformity and the size of the uniform region are comprehensively considered.
[0109] The present invention first uses the multi-objective grey wolf algorithm to directly optimize the parameters of the coil. The grey wolf algorithm mimics the leadership hierarchy and hunting mechanism of grey wolves in nature. Four types of grey wolves, namely alpha, beta, delta, and omega, are used to simulate the leadership level. In addition, three main steps, namely hunting, searching for prey, surrounding prey, and attacking prey, are implemented. And compared with traditional coil optimization algorithms such as the particle swarm algorithm and the differential evolution algorithm, the grey wolf algorithm has better performance and has been proven to be superior to the particle swarm algorithm in terms of solution accuracy and convergence speed. When actually optimizing the coil parameters, the grey wolf algorithm will sort all candidate solutions that meet the constraint conditions according to the values of the optimization objective function, and select several groups of solutions with the smallest optimization objective function values from small to large as alpha (optimal solution), beta (sub-optimal solution), and delta (third-optimal solution), that is, the leaders, and the remaining candidate solutions will be regarded as omega (search agents). These search agents will continuously update their positions according to the positions of alpha, beta, and delta to make them closer to the positions of these three solutions until the algorithm reaches the maximum number of iterations, or the value of the optimization objective function corresponding to the new position (new coil parameters) is better than that of the leaders.
[0110] (4) Improve the original multi-objective grey wolf algorithm
[0111] After actual operation, it is found that although the original multi-objective grey wolf algorithm has the advantages of fast convergence speed, relatively simple structure, small number of parameters to be controlled, and strong robustness, etc., in actual operation, it is prone to problems such as low convergence accuracy when facing complex problems, possible slow convergence speed in the later stage, and insufficient population diversity, resulting in being easily trapped in local optima. Therefore, when optimizing the position parameters of the three-axis coil, the present invention also improves the mechanism of the original grey wolf algorithm, and improves its initialization mechanism and convergence mechanism.
[0112] Since the quality of the initialized population directly affects the convergence speed and solution accuracy of the algorithm, the present invention first updates the initialization mechanism of the original grey wolf algorithm. The reverse learning mechanism is used to generate an initial set of candidate solution parameters. Compared with the original method of directly randomly generating initial candidate solution parameters within the coil position range, when the reverse learning mechanism randomly generates a set of parameters, it will also generate a set of solutions that are centrosymmetric within the coil position range, avoiding the situation where the initial coil parameters are all concentrated in a small range, which may cause the algorithm to be trapped in local optima and make it difficult to find a better solution. In addition, the reverse learning mechanism will also screen the initial candidate solutions with the number of 2N, and select a set of solutions with better objective function values as the final initial candidate solution parameter set. This enables the algorithm to converge to the position of a better solution faster. The initialization parameters of the reverse learning mechanism are as shown in the formula:
[0113] x = a + (b - a) * rand(6)
[0114] x′ = b - (x - a) (7)
[0115] Where, a is the upper bound of the coil parameter value range, b is the lower bound of the coil parameter value range. rand is a random number between [0, 1]. x is a generated initial solution, and x′ is the initial solution of reverse learning corresponding to x.
[0116] In addition, in order to better balance the local convergence and global search performance of the grey wolf algorithm, the convergence mode of the convergence factor α of the multi-objective grey wolf algorithm can also be improved.
[0117] When the present invention runs the coil optimization algorithm, a non-linearly varying convergence factor α is used to replace the linearly varying convergence factor of the traditional grey wolf algorithm.
[0118]
[0119] Where, α is the convergence factor of the improved multi-objective grey wolf algorithm, t is the current iteration number of the algorithm, and t max is the maximum iteration number of the algorithm set by the designer.
[0120] After adopting a non - linearly decreasing convergence factor, the attenuation degree of the convergence factor is slow in the initial stage of iteration, greater than 1 in most cases, which is conducive to a large number of global searches; in the later stage of iteration, the attenuation degree of the convergence factor increases, quickly entering the range less than 1, which is conducive to a large number of local searches.
[0121] The relative average magnetic field uniformity of the axial coil and the radial coil along the axis [-1R, 1R] (R is the radius of the finished cylindrical coil) obtained after theoretical calculation optimized by the actual improved grey wolf algorithm is 2.1405×10 -4 and 2.2959×10 -2 , respectively. Compared with the relative average magnetic field uniformity of 1.0618×10 -1 of the common three - axis Helmholtz coils of micro - atomic sensors, they are reduced by 3 orders of magnitude and 1 order of magnitude respectively. And the uniformity of the axial coil obtained by the improved grey wolf algorithm is increased by 27.53% compared with the coil obtained after optimizing the parameters of the original grey wolf algorithm. The uniformity of the radial coil obtained by the improved grey wolf algorithm in the key area is increased by 23.25% compared with the radial coil obtained by the original grey wolf algorithm.
[0122] (5) Precision machining of the finished three - axis uniform magnetic field coil using FPC technology
[0123] The coil position parameters optimized by the improved multi - objective grey wolf algorithm of the present invention have been significantly improved in terms of uniformity compared with traditional three - axis Helmholtz coils after theoretical calculation verification. In order to realize a three - axis uniform magnetic field coil (combining the designed axial coil and radial coil), FPC (Flexible Printed Circuit) technology can be used to achieve it. Compared with the traditional way of winding wires manually on the coil skeleton, FPC technology can avoid the poor coaxiality (resulting in the deviation of the actual magnetic field direction from the predicted direction) and the error between the actual position and the pre - designed position caused by manual winding. In order to avoid mutual interference between the axial coil and the radial coil, it is necessary to use FPC technology to make a multi - layer PCB circuit board, and place the axial coil (corresponding to the z - axis), two radial coils (corresponding to the x - axis and y - axis) on different layers respectively. The axial coil and the radial coil are independently connected to the current source. In order to realize the designed coil structure (coaxial multi - pair circular coils and coaxial multi - pair nested rectangular saddle coils), both the axial coil and the radial coil are connected in series through a straight wire for each loop. Among them, the wire of the axial coil switches the layer through the through - hole of the four - layer flexible circuit board to avoid crossing with the wire of the radial coil and affecting the magnetic field generated by the coil. The designed finished coil of the present invention is to avoid the magnetic field generated by the wires for connecting the current source from interfering with the magnetic fields generated by the axial coil and the radial coil. The current directions of the access wire and the outgoing wire are opposite and symmetric about the center axis of the cylindrical coil to cancel out the magnetic fields generated by the access wire and the outgoing wire.
[0124] After processing the finished coil using FPC technology, the average magnetic field relative uniformity of the axial coil and the radial coil of the actual three-axis coil verified on the experimental platform is 2.5646×10 -4 and 1.8×10 -2 , meeting the design goal that the average relative uniformity in the preset key area is about 1% or lower. Compared with the three-axis Helmholtz coil, the uniformity has been improved by three orders of magnitude and one order of magnitude.
[0125] The present invention uses a combination of multiple pairs of coaxial and same-sized and parallel circular coils to form an axial (along the z-axis) uniform magnetic field coil, and nests multiple pairs of coaxial rectangular saddle coils to form a radial (along the x and y axes) uniform magnetic field coil (as Figure 2 shown). The Biot-Savart law is used to derive the magnetic field generated by the coil, and the derivation result is subjected to Taylor expansion. For the axial coil, a single-component Taylor expansion is used according to Equation (2) to simplify the operation. The coefficients of each term in the Taylor expansion are the partial derivatives of the magnetic field component B z with respect to z generated by the axial coil along the z-axis. For the radial coil, a single-component Taylor expansion cannot convert the complex integral into a polynomial form either, and the optimization result of the single-component Taylor expansion in the non-axis region is poor. Therefore, a three-component Taylor expansion is performed according to Equation (3). The coefficients of each term in the Taylor expansion are the partial derivatives of the magnetic field component B x with respect to x, y, and z generated by the radial coil along the x-axis. Since the coil optimization problem is a multi-objective optimization problem (simultaneously minimizing multiple Taylor expansion term coefficients), the linear weighted summation method is commonly used in the traditional method of designing coils by combining intelligent optimization algorithms to convert the multi-objective problem into a single-objective problem. The linear weighting method requires determining appropriate weights for each optimization objective, and there is no unified standard for determining the weights, which requires a large amount of experiments or experience to determine, bringing a certain amount of workload. The coil design scheme proposed by the present invention uses a multi-objective grey wolf algorithm to obtain the parameters of the axial coil and the radial coil. When optimizing the axial coil, since the axial magnetic field expression is relatively simple, B can be obtained by performing a single-component Taylor expansion zConverting the integral form to polynomial form is convenient for differentiation. Therefore, the axial coil optimization still uses linear weighted summation to construct the optimization objective function. However, when deriving the radial magnetic field, since it involves three-component Taylor expansion, partial derivatives with respect to x, y, and z need to be taken simultaneously, and there are many Taylor expansion term coefficients involved. If linear weighted summation is still used, it is very cumbersome to determine appropriate coefficients for each optimization objective. Therefore, the multi-objective grey wolf algorithm is directly used for optimization, and the optimization objective function is directly the coefficient of each three-component Taylor expansion term. And in view of the situation that the multi-objective algorithm cannot obtain a unique deterministic solution (it is difficult to find a solution that is optimal for all optimization objectives in the multi-objective optimization problem), the present invention innovatively adds a screening function, and selects a parameter with the best comprehensive ratio of relative uniformity and uniform region occupancy as the final solution for the radial coil optimization from a set of solutions stored in the external archive through the screening function.
[0126] For the design problem of a three-axis uniform magnetic field, the solution vector of the axial coil can be expressed as where d i is the distance from the position of the i-th pair of circular coils forming the axial coil to the xy plane, expressed as a multiple of the coil radius. The solution vector of the radial coil can also be expressed as But at this time where h i is the height of the i-th pair of rectangular saddle-shaped coils forming the radial coil, expressed as a multiple of the radius of the finished coil, is the opening angle corresponding to the arc segment of the i-th pair of rectangular saddle-shaped coils of the radial coil.
[0127] In view of the problems that the original grey wolf algorithm may have, such as slow convergence speed and easy to fall into local optimal solutions, when using the grey wolf algorithm to design the coil parameters in the present invention, its initialization mechanism is also improved. The present invention adopts an initialization population strategy based on the reverse learning mechanism, which improves the diversity of the initial population and avoids falling into local optimal situations. The parameter vector of a certain candidate solution in the initial population is Suppose The upper bound of the value range of any element in is And the lower bound is The first step is when randomly generating the parameter of a certain candidate solution between , simultaneously generate The position of corresponding to is Performing the above operations on all candidate solutions, the current number of individuals can be obtained as 2N, so that the initial position distribution of individuals in the population is more diverse. The second step is to filter these individual position vectors and select the first N individual position vectors with the optimal objective function values as the initial position vector set of the entire gray wolf population, which is convenient for improving the convergence speed of the gray wolf algorithm.
[0128] When designing the coil by the gray wolf algorithm, the present invention also improves its convergence mechanism and uses a non-linearly varying convergence factor to replace the linearly varying convergence factor. After using a non-linearly decreasing convergence factor, the attenuation degree of the convergence factor is slow in the initial stage of iteration, and is greater than 1 in most cases, which is beneficial to a large number of global searches; the attenuation degree of the convergence factor increases in the later stage of iteration, and quickly enters the range less than 1, which is beneficial to a large number of local searches.
[0129] For the obtained optimization results, first run in the source program to compare the theoretical uniformity with the traditional coil, and further verify the design effect of the algorithm through finite element simulation (Finite Element Method FEM). Finally, the effectiveness of the finished three-axis coil made using FPC technology is verified by building an experimental platform. The entire design process of the present invention is as Figure 3 shown.
[0130] This method needs to implement a three-axis uniform magnetic field coil based on the multi-objective gray wolf algorithm through 6 steps.
[0131] Step 1: Deduce the magnetic field generated by the coil
[0132] The present invention uses a combination of multiple pairs of coaxial and same-sized circular coils as axial coils and multiple pairs of nested coaxial rectangular saddle coils as radial coils. Before constructing the optimization objective function, it is necessary to deduce the magnetic field expression generated by the coil according to the coil structure. When designing the coil by the discrete wire method, the coil is regarded as an ideal wire without thickness, so that the magnitude of the magnetic field generated by the energized coil can be obtained by using the Biot-Savart law. For circular coils, it is relatively simple to directly deduce the magnetic field generated by them. For rectangular saddle coils, the magnetic field superposition principle can be used to regard its magnetic field as the superposition of the magnetic fields generated by a finite-length straight wire and an arc part of the wire. The magnetic field expression of the axial coil along the z-axis deduced is as shown in (14). Similarly, the magnetic field expressions of the radial coil along the x and y axes can be obtained. (15) is the magnetic field expression of the radial coil at the zero point obtained by simplification.
[0133]
[0134] where is the magnetic field of the axial coil, I is the current, R is the coil radius, N is a positive integer, μ 0is the vacuum permeability, is the unit vector along the z-axis, n i is the number of turns of the i-th pair of coils, and i is the sequence number, d i is the distance from the position of the i-th pair of circular coils to the xy plane, is the magnetic field of the radial coil at the origin, and Dia is the diameter of the coil, is the unit vector along the x-axis, s i equals 1 plus the square of the ratio of the coil height h i and the coil diameter Dia, is the opening angle of the arc segment of the rectangular saddle-shaped coil in the radial coil.
[0135] Step 2: Construct the optimization objective function of the multi-objective grey wolf algorithm
[0136] During the iterative process of the intelligent optimization algorithm, an important indicator for evaluating the quality of the solution is its value in the optimization objective function (in the differential evolution algorithm, it is also called fitness). For the problem of designing the parameters of the uniform magnetic field coil, it is a typical minimization problem. When the grey wolf algorithm is used for optimization, it will select the candidate solutions with smaller values in the optimization objective function.
[0137] Perform Taylor expansion on the magnetic field expression generated by the coil. For the optimization of the axial coil, since the B derived using single-component Taylor expansion z is in polynomial form, the process of taking partial derivatives is relatively concise. Therefore, directly use the linear summation method to convert the multi-objective optimization into a single-objective optimization, and expand B z to the 16th order. Linearly weight and sum the selected first 16-order partial derivatives, and the result is the optimization objective function of the grey wolf algorithm when optimizing the axial coil as shown in Equation (16). For the optimization of the radial coil, since the B derived using three-component Taylor expansion x is in integral form with multiple parameters, taking partial derivatives is relatively complex. Therefore, directly use the multi-objective grey wolf algorithm to optimize the parameters of the radial coil, and each expansion term coefficient in the three-component Taylor expansion is regarded as the optimization objective function. And according to Equation (18), select the solutions with better overall performance (comprehensive average relative uniformity, uniform region size) from the set of solutions stored in the archive.
[0138]
[0139] Among them, K p is the number of even orders in the Taylor expansion, and k is one of the orders. is the 2k-th partial derivative of B z with respect to z at (0, 0, 0). x is a candidate solution vector obtained after a certain iteration of the multi-objective grey wolf algorithm. f penalty is the penalty function set for the coil structure constraint conditions. is the average relative uniformity within the key interval (along the axis [-1R, 1R], where R is the coil radius), M is the number of points for calculating the relative uniformity in the key interval, θ is the length of the uniform region (the region where the relative uniformity is less than 1%), and is the ratio of the length of the uniform region to the length of the key region. c is the weight of the average relative uniformity index in the screening function (18), and w is the weight of the uniform region length index in (18), which is usually negative. During screening, the parameter with the smallest value of (18) is usually selected as the finally screened coil parameter.
[0140] Step 3: Improve the initialization mechanism and convergence factor of the multi-objective grey wolf algorithm
[0141] When writing the program of the multi-objective grey wolf algorithm, write a new function obl_init to implement the initialization mechanism of reverse learning through Python. And modify the convergence mode of the convergence factor α of the grey wolf algorithm (from linear to non-linear).
[0142] Step 4: Run the multi-objective grey wolf algorithm
[0143] The present invention uses Python3 to implement the single-objective grey wolf algorithm (axial coil optimization) and the multi-objective grey wolf algorithm (radial coil optimization) respectively. The candidate solutions use the ndarray type as the data structure for recording the coil parameters. Use the numpy module and the math module to implement the mathematical equations in the grey wolf algorithm, as well as the conversion between angles and radians. For the magnetic field expression derived from the Biot-Savart law, also use the respective functions in the numpy module for code implementation. Reflect the multiple iterations of the algorithm in the form of a loop. Use the random module to generate random numbers. In order to verify the uniformity of the design method proposed by the present invention, the algorithm program also compares the uniformity of the Lee-Whiting coil, the axial coil designed by the original grey wolf algorithm and the axial coil designed by the present invention, the single saddle coil, the radial coil designed by the original grey wolf algorithm and the radial coil designed by the present invention. Also compare the overall three-axis uniformity of the common three-axis Helmholtz coil and the coil designed by the present invention. The comparison results are displayed through the matplotlib module responsible for graph generation in Python and the data calculation software MATLAB.
[0144] Step 5: Verification by finite element simulation
[0145] The Finite Element Method is a common method for simulating and verifying the effectiveness of coil design in optimization algorithms. Its core idea is to divide a complex problem domain into many units. A local equation is established for these units and then combined into a global equation to approximately solve the entire problem domain. In the verification stage of the present invention, the electromagnetic simulation professional software ANSYS MAXWELL 3D is used for electromagnetic simulation of the coil. Since direct current is mostly used to power the coil in common micro-atomic sensors, the solution type of the simulation software is set to the Magnetostatic type.
[0146] Step Six: Process the finished coil using FPC technology and experimentally verify the uniformity
[0147] In the implementation stage of the present invention, a finished product of a three-axis uniform magnetic field coil is fabricated by printing the coil wire on a flexible circuit board. A flexible circuit board, also known as a flexible printed circuit board, is a printed circuit board made of polyester film or polyimide as the substrate, with high reliability and excellent flexibility. It can greatly save the volume and thickness occupied by the coil in the micro-atomic sensor. To avoid interference between the axial coil and the radial coil, the axial coil and the radial coil are independently connected to the current source. To achieve the designed coil structure, both the axial coil and the radial coil connect each loop in series through a single wire. The axial coil and the radial coil (y-axis coil, x-axis coil) both need vias to penetrate layers to avoid the mutual crossing of non-coaxial coils and affect the magnetic fields generated by each axis. The finished coil designed in the present invention avoids the magnetic field interference generated by the wires connecting the current source in and out from interfering with the magnetic fields generated by the axial coil and the radial coil by routing the current directions of the connecting wires in opposite directions, so that their magnetic fields cancel each other out. Finally, the uniformity of the coil designed in the present invention is experimentally verified by the method of direct current power supply + magnetic shielding to weaken the environmental magnetic field interference.
[0148] The content not described in detail in the specification of the present invention belongs to the prior art well-known to those skilled in the art. It is hereby specified that the above description helps those skilled in the art to understand the present invention, but does not limit the protection scope of the present invention. Any implementation that makes equivalent substitutions, modifications, improvements, and / or simplifies the above description without departing from the substantial content of the present invention falls within the protection scope of the present invention.
Claims
1. A three-axis high uniform magnetic field coil design method based on an improved multi-objective grey wolf algorithm, characterized in that: The following steps are involved: Step 1, idealized modeling of the coil; Step 2: determine the constraints for sensor miniaturization requirements; Step 3, determine the coil structure; Step 4, Taylor expansion of the magnetic field expression, including single-component Taylor expansion of the axial coil in the three-axis coil, using the Pie-Sass law to derive the axial coil magnetic field, and three-component Taylor expansion of the radial coil in the three-axis coil, using the Pie-Sass law to derive the radial coil magnetic field; Step 5, optimizing parameters using a multi-objective Grey Wolf optimization algorithm, including constructing an axial coil optimization objective function using a linear weighted summation method for the axial coil, directly constructing a radial coil optimization objective function using Taylor expansion terms for the radial coil, and constructing a radial coil screening function based on the sum of the average relative uniformity and the uniform area ratio for the radial coil optimization objective function; Step 6, for the axial coil optimization objective function and radial coil screening function, improve the multi-objective Grey Wolf algorithm initialization mechanism and convergence factor, including implementing the reverse learning initialization mechanism through Python, and changing the convergence mode of the Grey Wolf algorithm convergence factor α from a linear mode to a nonlinear mode; Step 7, running the improved multi-objective grey wolf algorithm for the axial coil optimization objective function and the radial coil screening function to obtain the axial coil optimization and the radial coil optimization; Step 8, performing finite element simulation to verify uniformity based on the optimization results; Step 9, determine whether the uniformity requirement is met, if not, return to step 7, if yes, proceed to step 10; Step 10, use FPC technology to process the finished coil and experimentally verify the uniformity.
2. The three-axis high uniform magnetic field coil design method based on the improved multi-objective grey wolf algorithm according to claim 1 is characterized in that: Step 10 includes the following steps: Step 10.1, build a magnetic shielding barrel; Step 10.2, build an experimental platform in the magnetic shielding barrel and place the coil on the platform; Step 10.3, use the current unit NI-SMU to supply current to the coil to generate a magnetic field; Step 10.4, use the fluxgate to measure the magnetic field actually generated by the coil; In step 10.5, the recorded magnetic field data is processed by Python to calculate the actual relative uniformity and generate a chart.
3. The three-axis high uniform magnetic field coil design method based on the improved multi-objective grey wolf algorithm according to claim 1 is characterized in that: Step 1 includes the following expressions: Where B is the magnetic field generated by the coil derived by solving the Biot-Savart law for the magnetic field generated by an ideal wire with no thickness, μ0 is the magnetic permeability of vacuum, I is the current passing through the coil, is the current element on the energized coil, is the vector connecting a point where the current element on the coil is located to any point in space, r is Model; ε z It represents the relative uniformity of the magnetic field generated by the z-axis coil along the z-axis at a certain point on the z-axis. z (z) is the magnitude of the axial magnetic field generated by the axial coil at point (0,0,z), B z (0) is the magnetic field at the origin of the z-axis; ε x Indicates the relative uniformity of the magnetic field along the x-axis direction generated by the x-axis coil at a certain point on the x-axis, B x (x) is the radial magnetic field generated by the radial coil at point (x, 0, 0), B x (0) is the magnetic field at the origin of the x-axis.
4. The three-axis high uniform magnetic field coil design method based on the improved multi-objective grey wolf algorithm according to claim 1 is characterized in that: The coil structure in step 3 includes an axial coil and a radial coil. The axial coil is a z-axis uniform magnetic field coil composed of a combination of multiple pairs of coaxial, same-size and mutually parallel circular coils, and the radial coil is an x-axis or y-axis uniform magnetic field coil composed of a nested multiple pairs of coaxial rectangular saddle coils.
5. The three-axis high uniform magnetic field coil design method based on the improved multi-objective grey wolf algorithm according to claim 4 is characterized in that: Step 3 includes the following expressions: in is the solution vector of the axial coil, d1 is the distance from the position of the first pair of circular coils in the axial coil to the xy plane, and the d1 value is expressed in multiples of R, where R is the coil radius, and d2 to d8 are similar. is the solution vector of the radial coil, h1 is the height of the first pair of rectangular saddle coils in the radial coil, and the h1 value is expressed in multiples of R, and the same applies to h2 to h6. is the opening angle of the first pair of rectangular saddle coils in the radial coils, to And so on.
6. The three-axis high uniform magnetic field coil design method based on the improved multi-objective grey wolf algorithm according to claim 1 is characterized in that: Step 4 includes the following expressions: Among them B z | (0,0,z) is the magnitude of the magnetic field generated by the coil along the z-axis at (0,0,z), z is the z-axis coordinate corresponding to a certain point, B z | (0,0,0) is the magnitude of the magnetic field in the z-axis direction at the origin, For B z The value of the j-order partial derivative of z at (0,0,0) is R j (z) is the infinitesimal term in Taylor expansion; B i (x, y, z) is the magnetic field component of the magnetic field B along one of the x, y, and z axes. x, y, and z are the x, y, and z axis coordinates of a point. B i (0,0,0) is the magnitude of the magnetic field at the origin along a certain axis, m is the highest order of Taylor expansion, m1, m2, and m3 are the Taylor expansion orders corresponding to the x, y, and z components, respectively. It is a high-order infinitesimal function, where n1, n2, and n3 correspond to the orders of the x, y, and z components in the partial derivative respectively; in is the axial coil magnetic field, I is the current, R is the coil radius, N is a positive integer representing the number of coil pairs, μ0 is the vacuum permeability, is the unit vector along the z-axis, n i is the number of turns of the i-th pair of coils, i is the serial number, d i is the distance from the position of the ith pair of circular coils to the xy plane, is the magnetic field of the radial coil at the origin, Dia is the diameter of the coil, is the unit vector along the x-axis, s i Equal to 1 plus the coil height h i The square of the ratio of the coil diameter Dia, It is the arc segment angle of the rectangular saddle coil in the radial coil.
7. The three-axis high uniform magnetic field coil design method based on the improved multi-objective grey wolf algorithm according to claim 1 is characterized in that: Step 5 includes the following expression: Where K p is the number of even orders in the Taylor expansion, k is a positive integer, ω k is the coefficient of the expanded k term, For B z The 2k-order partial derivative with respect to z at (0,0,0), B z is the z-axis magnetic field, f penalty (x) is the penalty function, x is the candidate solution vector, c is the uniformity index weight, is the average relative uniformity of the key interval, M is the number of points in the key interval for calculating relative uniformity, w is the weight of the uniform area length indicator, and θ is the length of the uniform area.
8. The three-axis high uniform magnetic field coil design method based on the improved multi-objective grey wolf algorithm according to claim 1 is characterized in that: Step 6 includes the following expression: x=a+(ba)*rand, x′=b-(xa), Where x is the initial solution, a is the upper bound of the coil parameter range, b is the lower bound of the coil parameter range, rand is a random number between [0,1], x′ is the initial solution of reverse learning corresponding to x, α is the convergence factor of the improved multi-objective grey wolf algorithm, t is the current iteration number of the algorithm, t max is the maximum number of iterations.
Citation Information
Patent Citations
Multi-objective optimization method and system based on axial flux permanent magnet motor two-dimensional equivalent model
CN117634397A
Design method of different-region high-order uniform magnetic field coil
CN118194648A
Design Method of High Magnetic Field Superconducting Magnet
US20090322457A1
Design of MRI gradient coil
US20100268514A1
System and method of perceptive quantitative mapping of physical properties
US20220229140A1
Cited By
Design method of multistage nested Helmholtz coil system
CN120633266A