A design method and coil structure for shimming coils based on whale swarm optimization algorithm

By designing a shimming coil using a whale swarm optimization algorithm, the problems of complex coil structure and insufficient magnetic field uniformity inside the magnetic shielding layer were solved, achieving a highly uniform magnetic field and a larger uniform area, which is suitable for atomic magnetometer experiments.

CN116663394BActive Publication Date: 2026-07-31BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIHANG UNIV
Filing Date
2023-04-24
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing technologies, the internal coil structure of the magnetic shielding layer is complex, making it difficult to achieve a highly uniform and extremely weak magnetic field in a large-size magnetic shielding layer. Furthermore, the spherical combined coil is inconvenient for instrument and equipment installation and occupies operating space.

Method used

The swarm optimization algorithm is used to design the shimming coil. By calculating and optimizing the magnetic field distribution within the magnetic shielding layer, a custom target fitness function is constructed to optimize the coil structure parameters, forming a combination of four discrete coil loops with consistent current direction. This avoids local optima trapping and improves magnetic field uniformity.

Benefits of technology

Without increasing structural complexity, the uniformity of the magnetic field and the uniform region are improved, meeting the experimental requirements of atomic magnetometers while preserving operational space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116663394B_ABST
    Figure CN116663394B_ABST
Patent Text Reader

Abstract

A shimming coil design method and coil structure based on the whale swarm optimization algorithm provide a coil scheme that generates a highly uniform magnetic field without increasing structural complexity, enabling the provision of necessary experimental conditions for quantum precision measurement technologies such as atomic magnetometers. This invention first derives the expression for the excitation magnetic field of the coil inside the magnetic shielding layer based on boundary conditions and the equivalent current method. According to application requirements, a fitness function is selected, and the fitness function is calculated using the magnetic field expression as the optimization objective of the whale swarm optimization algorithm. The algorithm searches for optimization within the constrained parameter range, thereby obtaining optimized parameters to construct the coil system. The shimming coil current is distributed on the same cylindrical surface, composed of four discrete coil loops of the same radius, and placed within a hollow, closed-end cylindrical magnetic shielding layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of uniform field coil design technology, and in particular, it is a uniform field coil design method and coil structure based on whale swarm optimization algorithm. Background Technology

[0002] In the field of quantum sensing, atomic sensors based on the spin-free exchange relaxation effect require operation under uniform, extremely weak magnetic conditions, which is a prerequisite for achieving the spin-free exchange relaxation state. In experimental setups for atomic magnetometers, a cylindrical magnetic shielding layer made of a high-permeability material and a coil placed inside the shielding layer are typically used to generate a highly uniform, extremely weak magnetic field. Two commonly used high-permeability magnetic shielding materials are ferrite and permalloy.

[0003] Current research and analysis on coils inside magnetic shielding layers approximate the permeability of the magnetic shielding layer as infinite, which has the shortcomings of not being able to compare the effects of materials with different permeabilities and not being able to accurately describe the internal excitation magnetic field. The existing coil structure mainly consists of multiple discrete coils on a cylindrical or spherical surface. However, when applying large-sized magnetic shielding layers to experimental platforms, the spherical coil structure is not convenient for the installation of instruments and equipment. The combination of multiple coils increases the structural complexity of the coil and occupies the limited operating space inside the magnetic shielding layer.

[0004] The whale swarm optimization algorithm is a biomimetic optimization algorithm based on fish swarm intelligence. This algorithm has been applied to many engineering problems, showing fast convergence speed and obtaining better results. The optimization capability of the whale swarm optimization algorithm can be used to solve the optimization problem of the internal coil design of the magnetic shielding layer. Summary of the Invention

[0005] To overcome the shortcomings of the existing technology, this invention provides a shimming coil design method and coil structure based on the whale swarm optimization algorithm. Within a magnetically shielded layer with finite permeability, an improved shimming coil structure can be obtained through calculation and optimization using an accurate magnetic field expression. The improved coil achieves higher magnetic field uniformity and a larger magnetic field uniformity region without increasing structural complexity, meeting the magnetic field requirements of experiments such as atomic magnetometers, while also reserving more space for experimental operation.

[0006] The technical solution of the present invention is as follows:

[0007] A method for designing shimming coils based on the whale swarm optimization algorithm, characterized by the following steps:

[0008] Step 1: Determine the parameters to be optimized for the shimming coil, add constraints to the parameters to be optimized, and set the parameters for the whale swarm optimization algorithm;

[0009] Step 2: Under the constraints, initialize the population using the whale swarm optimization algorithm, where each search agent in the population corresponds to an actual coil structure.

[0010] Step 3: For each search agent, calculate the magnetic field distribution within the target region using the magnetic field expression associated with the coil structure;

[0011] Step 4: Based on the magnetic field distribution, construct a custom target fitness function and calculate the custom target fitness function value for each search agent;

[0012] Step 5: Determine the best search agent based on the minimum target fitness function value, and update the prey position in the algorithm;

[0013] Step 6: Update the path coefficients used for iteration in the algorithm;

[0014] Step 7: Update the search agent location to obtain the new population distribution;

[0015] Step 8: Determine if it is the maximum number of iterations. If not, return to step 3; if yes, proceed to step 9.

[0016] Step 9: Output the optimal coil parameters.

[0017] The parameters to be optimized in step 1 include a, z1, and z2, where a is the coil radius, the shimming coil includes a first coil loop to a fourth coil loop distributed from bottom to top along the z-axis, z1 is the half-spacing between the second and third coil loops, and z2 is the half-spacing between the first and fourth coil loops. The first and fourth coil loops are located at z-axis coordinates ±z2, and the second and third coil loops are located at z-axis coordinates ±z1. The constraints in step 1 include z2≤a<b and z1≤z2, where b is the inner radius of the magnetic shielding layer. The magnetic shielding layer is coaxial with the shimming coils, and the shimming coils are placed inside the magnetic shielding layer. The algorithm parameters in step 1 include the number of search agents, the maximum number of iterations, and the path coefficient.

[0018] In step 2, the search agents are randomly generated within the parameter constraints using the whale swarm optimization algorithm. Each search agent corresponds to a shimming coil structure, thereby completing the initialization of the population.

[0019] The expression for the magnetic field in step 3 is as follows:

[0020]

[0021] Where ρ and z are two axes in the ρyz three-axis coordinate system, z is the vertical axis, ρ is the radial axis, and (ρ,z) is the coordinate point inside the shimming coil. ρ and B zThese are the radial and axial components of the magnetic field strength, respectively, where μ0 is the free permeability, and I... c Here, L is the magnitude of the current in the coil, L is the inner half-length of the magnetic shielding layer, k is an intermediate quantity, k = mπ / L, where m is a positive integer ranging from 1 to infinity, S(ka) is an intermediate quantity, S(ka) = K1(ka) - R0(ka), I0 and I1 are the zeroth and first-order modified Bessel functions of the first kind, respectively, I1 is the first-order modified Bessel function of the second kind, and R0(ka) is an intermediate quantity.

[0022]

[0023] α b =(μ-μ0)I′0(ka)K0(kb)

[0024] α c =(μ-μ0)I′0(ka)K0(kc)

[0025] β b =μI0(kb)K′0(kb)-μ0I′0(kb)K0(kb)

[0026] β c =(μ-μ0)I′0(kb)K0(kc)

[0027] γ b =(μ-μ0)I0(kb)K′0(kc)

[0028] γ c =μI′0(kc)K0(kc)-μ0I0(kc)K′0(kc)

[0029] Where μ is the permeability of the magnetic shielding layer, K0 is the zeroth-order modified Bessel function of the second kind, c is the outer radius of the magnetic shielding layer, I′0 and K′0 are the derivatives of I0 and K0, respectively, and α b α c β b β c γ b γ c These are all intermediate quantities in the calculation process.

[0030] Step 4 includes:

[0031]

[0032] Where CostFunc is a user-defined target fitness function, and ∈ represents the magnetic field deviation. ∈ max The maximum magnetic field deviation within the target area is ∈, L F This indicates that the magnetic field deviation is less than 1×10 FThe length of the uniform region, F is a negative integer, w1 and w2 are weighting factors, and B z It is the magnetic field along the z-axis.

[0033] A shimming coil structure based on the whale swarm optimization algorithm is characterized by being obtained using the aforementioned shimming coil design method based on the whale swarm optimization algorithm.

[0034] The coil current is distributed on the same cylindrical surface. The turns ratio of the four discrete coil rings from the first coil ring to the fourth coil ring is 9:4:4:9, and the current direction of the four discrete coil rings is the same.

[0035] The technical effects of this invention are as follows: This invention proposes a shimming coil design method and coil structure based on the whale swarm optimization algorithm, providing a coil scheme that generates a highly uniform magnetic field without increasing structural complexity, and can provide the necessary experimental conditions for quantum precision measurement technologies such as atomic magnetometers. This invention first obtains the expression for the excitation magnetic field of the coil inside the magnetic shielding layer based on boundary conditions and the equivalent current method. According to application requirements, a fitness function is selected, and the fitness function is calculated using the magnetic field expression as the optimization objective of the whale swarm optimization algorithm. The algorithm searches for optimization within the constrained parameter range, thereby obtaining the optimized parameters to construct the coil system. The shimming coil is composed of four discrete coil loops of the same radius, placed inside a hollow, closed-end cylindrical magnetic shielding layer.

[0036] The advantages of this invention compared to the prior art are:

[0037] (1) The present invention optimizes the magnetic field uniformity index based on the whale swarm optimization algorithm, avoiding the shortcomings of getting trapped in local optima and improving the optimization speed.

[0038] (2) The present invention takes into account a magnetic shielding layer with finite permeability and accurately describes the distribution of the coil excitation magnetic field inside the magnetic shielding layer.

[0039] (3) This invention improves the uniformity of the coil excitation magnetic field and increases the uniform area of ​​the coil magnetic field without increasing the complexity of the coil structure. Attached Figure Description

[0040] Figure 1 This is a schematic diagram illustrating the process of implementing the present invention: a shimming coil design method based on the whale swarm optimization algorithm. Figure 1The process, between the start and end, includes: Step 1, setting the constraint range of the shimming coil parameters and the shimming coil algorithm parameters. The shimming coil parameters include a, z1, and z2, where a is the coil radius, the shimming coil consists of a first coil loop to a fourth coil loop distributed from bottom to top along the z-axis, z1 is the half-spacing between the second and third coil loops (i.e., the z-axis coordinate value of the third coil loop), and z2 is the half-spacing between the first and fourth coil loops (i.e., the z-axis coordinate value of the fourth coil loop). The algorithm parameters include the number of agents and the maximum number of iterations. Step 2, initializing the population using the whale swarm optimization algorithm. Step 3, numerically calculating the magnetic field distribution of each search agent. Step 4, evaluating the custom target fitness function of each search agent. Step 5, finding the best search agent and updating the prey position. Step 6, updating the path coefficients in the algorithm. Step 7, updating the search agent position. Step 8, determining if the maximum number of iterations has been reached; if not, returning to step 3; if so, proceeding to step 9. Step 9, outputting the optimal coil parameters. Figure 1 Steps 2 through 7 belong to the whale swarm optimization algorithm steps.

[0041] Figure 2 Is adopted Figure 1 A schematic diagram of the uniform coil structure designed using the Chinese design method. Figure 2 The shimming coil is placed inside the magnetic shielding layer.

[0042] The reference numerals in the attached figures are explained as follows: 1-First coil ring; 2-Second coil ring; 3-Third coil ring; 4-Fourth coil ring; 5-Magnetic shielding layer; a-Coil radius; b-Inner radius of the magnetic shielding layer; c-Outer radius of the magnetic shielding layer; 2z1-Spacing between the second and third coil rings; 2z2-Spacing between the first and fourth coil rings; 2L-Total inner length of the magnetic shielding layer; ρyz-Three axes of the coordinate system (the vertical axis is the z-axis, the radial direction is the ρ-axis, and the direction perpendicular to the z-axis and ρ-axis is the y-axis). Detailed Implementation

[0043] The following is in conjunction with the attached diagram ( Figures 1-2 The invention will be described in the following sections and examples.

[0044] Figure 1 This is a schematic diagram illustrating the process of implementing the present invention: a shimming coil design method based on the whale swarm optimization algorithm. Figure 2 Is adopted Figure 1 A schematic diagram of the shimming coil structure designed using the Chinese design method. (Reference) Figures 1 to 2As shown, a shimming coil design method based on the whale swarm optimization algorithm includes the following steps: Step 1, determine the parameters to be optimized for the shimming coil, add constraints to the parameters to be optimized, and set the parameters of the whale swarm optimization algorithm; Step 2, initialize the population using the whale swarm optimization algorithm under the constraints, where each search agent in the population corresponds to an actual coil structure; Step 3, for each search agent, calculate the magnetic field distribution in the target region using the magnetic field expression related to the coil structure; Step 4, based on the magnetic field distribution, construct a custom target fitness function and calculate the custom target fitness function value for each search agent; Step 5, determine the optimal search agent based on the minimum target fitness function value and update the prey position in the algorithm; Step 6, update the path coefficients used for iteration in the algorithm; Step 7, update the search agent position to obtain a new population distribution; Step 8, determine whether the maximum number of iterations has been reached. If not, return to Step 3; if yes, proceed to Step 9; Step 9, output the optimal coil parameters.

[0045] In step 1, the parameters to be optimized include a, z1, and z2, where a is the coil radius, the shimming coil includes a first coil loop to a fourth coil loop distributed from bottom to top along the z-axis, z1 is the half-spacing between the second and third coil loops, and z2 is the half-spacing between the first and fourth coil loops. The first and fourth coil loops are located at z-axis coordinates ±z2, and the second and third coil loops are located at z-axis coordinates ±z1. The constraints in step 1 include z2≤a<b and z1≤z2, where b is the inner radius of the magnetic shielding layer. The magnetic shielding layer is coaxial with the shimming coils, and the shimming coils are placed inside the magnetic shielding layer. The algorithm parameters in step 1 include the number of search agents, the maximum number of iterations, and the path coefficient. In step 2, the search agents are randomly generated within the parameter constraints using a whale swarm optimization algorithm. Each search agent corresponds to a shimming coil structure, thus completing the initialization of the population.

[0046] The expression for the magnetic field in step 3 is as follows:

[0047]

[0048] Where ρ and z are two axes in the ρyz three-axis coordinate system, z is the vertical axis, ρ is the radial axis, and (ρ,z) is the coordinate point inside the shimming coil. ρ and B z These are the radial and axial components of the magnetic field strength, respectively, where μ0 is the free permeability, and I... cI0 is the magnitude of the current in the coil, L is the inner half-length of the magnetic shielding layer, k is an intermediate quantity, k = mπ / L, where m is a positive integer ranging from 1 to infinity, S(ka) is an intermediate quantity, S(ka) = K1(ka) - R0(ka), I0 and I1 are the zeroth and first-order modified Bessel functions of the first kind, respectively, K1 is the first-order modified Bessel function of the second kind, and R0(ka) is an intermediate quantity.

[0049]

[0050] α b =(μ-μ0)I′0(ka)K0(kb)

[0051] α c =(μ-μ0)I′0(ka)K0(kc)

[0052] β b =μI0(kb)K′0(kb)-μ0I′0(kb)K0(kb)

[0053] β c =(μ-μ0)I′0(kb)K0(kc)

[0054] γ b =(μ-μ0)I0(kb)K′0(kc)

[0055] γ c =μI′0(kc)K0(kc)-μ0I0(kc)K′0(kc)

[0056] Where μ is the permeability of the magnetic shielding layer, K0 is the zeroth-order modified Bessel function of the second kind, c is the outer radius of the magnetic shielding layer, I′0 and K′0 are the derivatives of I0 and K0, respectively, and α b α c β b β c γ b γ c These are all intermediate quantities in the calculation process.

[0057] Step 4 includes:

[0058]

[0059] Where CostFunc is a user-defined target fitness function, and ∈ represents the magnetic field deviation. ∈ mFx The maximum magnetic field deviation within the target area is ∈, L F This indicates that the magnetic field deviation is less than 1×10 F The length of the uniform region, F is a negative integer, w1 and w2 are weighting factors, and B z It is the magnetic field along the z-axis.

[0060] A shimming coil structure based on the whale swarm optimization algorithm is presented, obtained using the aforementioned shimming coil design method based on the whale swarm optimization algorithm. The turns ratio of the four discrete coil loops (first to fourth coil loops) is 9:4:4:9, and the current direction of the four discrete coil loops is the same.

[0061] This invention discloses a shimming coil design method based on the whale swarm optimization algorithm. The coil current is distributed on the same cylindrical surface, and it is composed of four discrete coil loops of the same radius, placed inside a hollow, closed-end cylindrical magnetic shielding layer. The invention first obtains the expression for the excitation magnetic field of the coil inside the magnetic shielding layer based on boundary conditions and the equivalent current method. According to application requirements, a fitness function is selected, and the fitness function is calculated using the magnetic field expression as the optimization objective of the whale swarm optimization algorithm. The algorithm performs optimization within the constrained parameter range. The coil system is constructed using the solved optimized parameters. This invention also discloses an improved shimming coil structure designed based on this method, providing a coil scheme that generates a highly uniform magnetic field without increasing structural complexity, and can provide the necessary experimental conditions for quantum precision measurement technologies such as atomic magnetometers.

[0062] A method for designing a shimming coil based on a whale swarm optimization algorithm includes the following steps:

[0063] Step 1: Based on the actual application scenario, determine the parameters to be optimized and add constraints to the parameters to be optimized;

[0064] Step 2: Within the parameter constraints, the whale swarm optimization algorithm initializes the population, with each search agent in the population corresponding to an actual coil structure.

[0065] Step 3: For each search agent, use the magnetic field expression to calculate the magnetic field distribution of the corresponding coil structure in the target area;

[0066] Step 4: For each search agent, based on the obtained magnetic field distribution results, substitute them into the custom target fitness function for calculation;

[0067] Step 5: Determine the best search agent based on the minimum target fitness function value, and update the prey position in the algorithm;

[0068] Step 6: Update the path coefficients used for iteration in the algorithm;

[0069] Step 7: Update the search agent location to obtain the new population distribution;

[0070] Step 8: Determine if the maximum number of iterations has been reached; if the maximum number of iterations has been reached, output the optimal coil parameters; if the maximum number of iterations has not been reached, return to Step 3 and continue executing the whale swarm optimization algorithm.

[0071] The shimming coil is placed inside the magnetic shielding layer and is coaxial with the magnetic shielding layer. The geometric centers of the shimming coil and the magnetic shielding layer coincide. A coordinate system is established with the geometric center as the origin. The longitudinal axis of the magnetic shielding layer is the z-axis, the radial direction is the ρ-axis, and the direction perpendicular to the z-axis and ρ-axis is the y-axis. The magnetic shielding layer is made of a high permeability material. The two commonly used high permeability magnetic shielding layer materials are ferrite and permalloy. The magnetic shielding layer is a hollow cylinder with closed ends.

[0072] The parameters to be optimized in step one are the coil structure parameters, including the coil radius a, the z-axis coordinates ±z1 of the two discrete coil loops (the second and third coil loops) located in the middle, and the z-axis coordinates ±z2 of the two discrete coil loops (the first and fourth coil loops) located on the outer side. According to the actual application scenario, the constraints include that the coil radius a must be less than the inner radius b of the cylindrical magnetic shielding layer, and the spacing parameter between the two coil loops should satisfy z1≤z2, while z2≤a. The algorithm parameters include the number of search agents, the maximum number of iterations, and the path coefficient.

[0073] In step two, the whale swarm optimization algorithm randomly generates search agents within the parameter constraints. Each search agent corresponds to a shimming coil structure, thereby completing the initialization of the population.

[0074] Step three calculates the magnetic field distribution for each search agent; based on boundary conditions and the equivalent current method, the magnetic field expression at point (ρ, z) inside the shimming coil in the coordinate system is:

[0075]

[0076] Among them, B ρ and B z These are the radial and axial components of the magnetic field strength, I. c This represents the magnitude of the current in the coil, where k is a parameter related to m, k = mπ / L, and m is a positive integer ranging from 1 to infinity. In the formula, S(ka) is S(ka) = K1(ka) - R0(ka), and the relevant terms and coefficients are as follows:

[0077]

[0078] α b =(μ-μ0)I′0(ka)K0(kb)

[0079] α c =(μ-μ0)I′0(ka)K0(kc)

[0080] β b =μI0(kb)K′0(kb)-μ0I′0(kb)K0(kb)

[0081] β c =(μ-μ0)I′0(kb)K0(kc)

[0082] γ b =(μ-μ0)I0(kb)K′0(kc)

[0083] γ c =μI′0(kc)K0(kc)-μ0I0(kc)K′0(kc)

[0084] μ is the permeability of the magnetic shielding layer, K0(x) and K1(x) are the first-order modified Bessel functions of the second kind, respectively, I′0(x) and K′0(x) are the derivatives of I0(x) and K0(x) with respect to x, respectively, and α b α c β b β c γ b γ c These are all intermediate quantities in the calculation process.

[0085] Step four, based on usage requirements, utilizes the uniformity index to construct a custom target fitness function, CostFunc, and calculates the custom target fitness function value for each search agent; the constructed custom target fitness function, CostFunc, is...

[0086]

[0087] Where ∈ represents the magnetic field deviation. ∈ max The maximum magnetic field deviation within the target area is ∈, L F This indicates that the magnetic field deviation is less than 1×10 F The length of the uniform region, F is a negative integer, and w1 and w2 are weighting factors.

[0088] The parameters to be optimized are defined as coil structure parameters, including the coil radius *a*, the coordinates of the two middle discrete coil loops (the second and third coil loops) as ±z1, and the coordinates of the two outer discrete coil loops (the first and fourth coil loops) as ±z2. Based on the actual application scenario, the coil radius *a* must be smaller than the inner radius *b* of the magnetic shielding layer, and the spacing between the two coil loops should satisfy *z1* ≤ *z2*, while *z2* ≤ *a*. The algorithm parameters are defined as follows: the number of search surrogates *ns*, the maximum number of iterations *Ns*, and path coefficients. The path coefficients include a convergence factor *a*, a random factor *r1*, a search random factor *l*, and a probability factor *p*.

[0089] Steps five through eight are typical steps of the optimization algorithm and will not be repeated here.

[0090] On the other hand, the present invention also proposes an improved shimming coil structure optimized by the shimming coil design method based on the whale swarm optimization algorithm. The improved shimming coil is located on the same cylindrical surface and is composed of four discrete coil loops with the same radius. The radius of the improved shimming coil is a, the z-axis coordinates of the two middle discrete coil loops (the second coil loop and the third coil loop) are ±z1, and the z-axis coordinates of the two outer discrete coil loops (the first coil loop and the fourth coil loop) are ±z2. The structural parameters of the coil are all optimized by the whale swarm optimization algorithm program.

[0091] The improved shimming coil is placed inside the magnetic shielding layer and is coaxial with the magnetic shielding layer. The geometric centers of the improved shimming coil and the magnetic shielding layer coincide. In the improved shimming coil, the turns ratio of the four discrete coil loops is 9:a:a:9, and the current directions of the four discrete coil loops are the same.

[0092] like Figure 2 As shown, the improved shimming coil structure provided in this embodiment of the invention, located inside the magnetic shielding layer, is situated on the same cylindrical surface and is composed of four discrete coil rings of the same radius, namely, the first coil ring 1, the second coil ring 2, the third coil ring 3, and the fourth coil ring 4. The shimming coils (1-4) are placed inside the magnetic shielding layer 5 and are coaxial with the magnetic shielding layer 5. The geometric centers of the four coil rings (1-4) and the magnetic shielding layer 5 coincide. The turns ratio of the four discrete coil rings is 9:4:a:9, and the current directions of the four discrete coil rings are the same.

[0093] The magnetic shielding layer 5, made of permalloy, has an inner radius b of 178 mm, an outer radius c of 180 mm, and an internal length of 2*L = 82 mm. The improved shimming coil has coordinates ±z1 of ±36.29 mm for the second and third coil loops, ±z2 of ±148.11 mm for the first and fourth coil loops, and a coil radius of 167.93 mm. Within the coil center range, the magnetic field deviation is less than one ten-thousandth, reaching 6.12 mm, a 34% improvement compared to a Leigh-White coil with the same turns ratio. This produces a highly uniform magnetic field, suitable for large-size magnetic shielding layers used on experimental platforms, providing the necessary experimental conditions for quantum precision measurement technologies such as atomic magnetometers.

[0094] Contents not described in detail in this specification are prior art known to those skilled in the art. It is hereby indicated that the above description is intended to help those skilled in the art understand this invention, but does not limit the scope of protection of this invention. Any equivalent substitutions, modifications, improvements, and / or simplifications of the above descriptions that do not depart from the essential content of this invention fall within the scope of protection of this invention.

Claims

1. A method for designing a shimming coil based on a whale swarm optimization algorithm, characterized in that, Includes the following steps: Step 1: Determine the parameters to be optimized for the shimming coil, add constraints to the parameters to be optimized, and set the parameters for the whale swarm optimization algorithm; Step 2: Under the constraints, initialize the population using the whale swarm optimization algorithm, where each search agent in the population corresponds to an actual coil structure. Step 3: For each search agent, calculate the magnetic field distribution within the target region using the magnetic field expression associated with the coil structure; Step 4: Based on the magnetic field distribution, construct a custom target fitness function and calculate the custom target fitness function value for each search agent; Step 5: Determine the best search agent based on the minimum target fitness function value, and update the prey position in the algorithm; Step 6: Update the path coefficients used for iteration in the algorithm; Step 7: Update the search agent location to obtain the new population distribution; Step 8: Determine if the maximum number of iterations has been reached. If not, return to step 3; if yes, proceed to step 9. Step 9: Output the optimal coil parameters; The parameters to be optimized in step 1 include a, z1, and z2, where a is the coil radius, the shimming coil includes a first coil loop to a fourth coil loop distributed from bottom to top along the z-axis, z1 is the half-spacing between the second and third coil loops, z2 is the half-spacing between the first and fourth coil loops, the first and fourth coil loops are located at z-axis coordinates ±z2, and the second and third coil loops are located at z-axis coordinates ±z1. The constraints in step 1 include z2≤a<b and z1≤z2, where b is the inner radius of the magnetic shielding layer, the magnetic shielding layer is coaxial with the shimming coil, and the shimming coil is placed inside the magnetic shielding layer. The algorithm parameters in step 1 include the number of search agents, the maximum number of iterations, and the path coefficient. The expression for the magnetic field in step 3 is as follows: , Where ρ and z are two axes in the ρyz three-axis coordinate system, z is the vertical axis, ρ is the radial axis, and (ρ,z) is the coordinate point inside the shimming coil. and These are the radial and axial components of the magnetic field strength, respectively. It is the vacuum permeability. Where L is the magnitude of the current in the coil, L is the inner half-length of the magnetic shielding layer, and k is an intermediate quantity. m is a positive integer ranging from 1 to infinity. It is an intermediate quantity. , and These are the zeroth-order and first-order modified Bessel functions of the first kind. It is a first-order modified Bessel function of the second kind. It is an intermediate quantity; Step 4 includes: , CostFunc is a user-defined target fitness function. Indicates magnetic field deviation. , It is the maximum magnetic field deviation within the target area. , This indicates that the magnetic field deviation is less than 1. The length of the uniform region, where F is a negative integer. As a weighting factor, It is the magnetic field along the z-axis.

2. The method for designing a uniform coil based on the whale swarm optimization algorithm according to claim 1, characterized in that, In step 2, the search agents are randomly generated within the parameter constraints using the whale swarm optimization algorithm. Each search agent corresponds to a shimming coil structure, thereby completing the initialization of the population.

3. The method for designing a uniform coil based on the whale swarm optimization algorithm according to claim 1, characterized in that, intermediate quantity The expression is as follows: , , , , , , , in It is the permeability of the magnetic shielding layer. It is a zero-order modified Bessel function of the second kind, where c is the outer radius of the magnetic shielding layer. and yes and The derivative of These are all intermediate quantities in the calculation process.

4. A shimming coil based on a whale swarm optimization algorithm, characterized in that, The shimming coil design method based on the whale swarm optimization algorithm described in any one of claims 1-3 is used.

5. The shimming coil based on the whale swarm optimization algorithm according to claim 4, characterized in that, The turns ratio of the four discrete coil loops, from the first to the fourth coil loop, is 9:4:4:9, and the current direction of the four discrete coil loops is the same.