Self-Shielded Uniform Magnetic Field Coil Design for Miniature Atomic Sensors Using a Particle Swarm Optimization Algorithm

In this paper, an optimization method that uses the derivatives and the target field information of the magnetic field simultaneously is proposed to suppress the coupling between the coil and the magnetic shielding in miniature atomic sensors. The coupling between the coil and the magnetic shielding varies with the material magnetic permeability, which causes the magnetic field to fluctuate with the temperature as the material permeability. The magnetic field fluctuations will cause the measurement errors and drifts of the sensors. The proposed method can effectively suppress the magnetization of the magnetic shielding caused by the coil magnetic field. A shielded coil outside the main coil is used to efficiently attenuate the magnetic field outside the main coil to suppress the coupling between the coil and the magnetic shielding. A coil system consisting of pairs of circular coils distributed on two coaxial cylinder surfaces is proposed in this paper. The Taylor expansion is used to ensure the uniformity of the internal magnetic field, while the target field information is used to ensure the attenuation of the external magnetic field. A particle swarm optimization (PSO) algorithm is used to optimize the parameters of the main and shielded coils. The theoretical calculations and the finite element analysis prove that the proposed approach is an effective design method for the self-shielded coils.


I. INTRODUCTION
Self-shielded coil is a type of coil whose internal magnetic field meets the design requirements while the external magnetic field decays rapidly. This type of coil is mainly used to suppress the eddy current induced in the conductive layers caused by the rapid switching of the gradient magnetic field, especially in magnetic resonance imaging(MRI).
[1]- [4] Due to the widespread use of MRI, the researchers have focused more on the design of such self-shielded coils with gradient magnetic fields. However, in high-precision atomic measurements, a stable and uniform magnetic field is usually required. This requires high permeability alloy layers and highly uniform magnetic field coils. [5]- [8] The coupling between the coil and the high permeability alloy layers often amplifies the coil magnetic field. [9], [10] and also affects the The associate editor coordinating the review of this manuscript and approving it for publication was Muhammad Imran Tariq . distribution of the magnetic field. Some researchers adjusted the current distribution of the coil to obtain a coil with better uniformity within the magnetic shielding layers. [11]- [13] On the other hand, the magnetic field amplification factor caused by the magnetic shielding varies with the permeability of the shielding material [14], which may cause the drift of the atomic sensors. In addition, the continuous coupling between the coil and the magnetic shielding magnetizes the shielding material. Therefore, a self-shielded uniform magnetic field coil is designed in this paper to suppress the coupling between the coil and the magnetic shielding.
There are many mature design methods when designing the coil structure. [15]- [21] Similar to other coils, the selfshielded coil can be designed by a positive or inverse method. The positive method usually assumes a certain coil shape and determines the specific structural parameters. The magnetic field distribution can be obtained with the current distribution and then, the structural parameters can be obtained from the required magnetic field distribution. Generally, the coil shape in positive method is simple and standardized, such as circular, square or saddle. The positive method does not directly solve the magnetic field but expands the magnetic field in series. Typically, Taylor expansion or harmonic expansion is employed. [22]- [25] The inverse method directly solves the continuous current density function using the magnetic field distribution. Then, the current density function is discretized to obtain the structural parameters of the coil. The target field method proposed by Turner is the most widely used inverse method for coil design. [26]- [29] In general, both the positive and the inverse methods have their own advantages. Although the positive method is only suitable for coils having a regular shape, the parameters are completely determined by the analytical expression of the magnetic field, and the current density does not need to be discretized. Therefore, the magnetic field error of the coil designed by the positive method is usually small. The inverse method is flexible and can have various constraints such as shape, impedance, and power. Moreover, the inverse method is easier for transplant applications. However, it is necessary to use appropriate regularization strategy to solve the problem of ill-conditioned equation. In addition, errors will be introduced when the continuous current density is discretized. In previous studies, most self-shielded coils have been mainly designed using the target field method. Most of these studies focused on the self-shielded gradient coils in MRI. This paper proposes an improved positive method for the self-shielded uniform magnetic field coils. The proposed method not only considers the magnetic field derivative of the coil center point, but also the characteristic target points of the self-shielded region. In the coil configuration, considering the coil magnetic moment constraint, the amount of calculation in the coil optimization is significantly reduced.

A. BASIC STRUCTURE OF THE SELF-SHIELDED COILS
A self-shielded coil usually consists of two parts. The inner side is the main coil and the outer side is the shielded coil. Most atomic sensors, especially the atomic gyros, adopt the magnetic shielding and cylindrical coil structure. The self-shielded coil can be a coaxial cylindrical structure or a parallel planar structure, as shown in Fig. 1. The external magnetic field can be attenuated by applying a current in the shielded coil whose direction is opposite to that of the main coil. The coil must be designed considering both the internal and the external magnetic field requirements of the coil.
Assuming that the current is distributed in a small region(as shown in Fig. 2), the external magnetic field can be analyzed by magnetic multipole expansion. According to the theory of electromagnetism, the magnetic vector potential of point P can be obtained as: [30], [31] The structure of self-shielded coils. (a) A self-shielded coil with a cylindrical structure whose current is distributed on two coaxial cylindrical surfaces. (b) A self-shielded coil with a plan structure whose current is distributed on two pairs of symmetrical planes. For the two structures, the inner coil is the main coil and determines the direction of the central magnetic field. The current direction in the outer coil is opposite to that of the inner coil, which acts as a shielded coil to suppress the external magnetic field.
A suitable point in the current region is used as the coordinate origin. Assuming |r| r , 1 |r−r | is expanded in powers of r .
Substituting Eq. (2) into Eq. (1), an expanded expression of the magnetic vector potential can be obtained as: where, r is a vector of one point in the current distribution, r is a vector of the observation point P, j(r ) is the current density, and A is the magnetic vector potential of point P. In Eq. (3), the first and the second terms are the magnetic vector potentials generated by the magnetic monopole and dipole, respectively, while the latter are the magnetic vector potentials generated by magnetic quadrupole and octupole. According to the classical electrodynamic theory, the first term is determined to be 0, indicating that the magnetic monopole is absent. The second term in Eq. (3) The magnetic field at a point outside the current region. In the case of |r| r , the low-order terms of the magnetic multipole expansion term can reflect the magnetic field of the observation point.
can also be rewriten as: Generally, M is defined as the magnetic moment density or magnetization, while m is defined as the magnetic moment of the current system. Since the magnetic vector potential of higher-order magnetic multipoles decays more quickly, any current system can always be regarded as a magnetic dipole for points far enough away. Specifically, for observation points far enough away, the third and the following terms in Eq. (3) can be ignored. For the closer observation points, the subsequent high-order terms cannot be ignored. Especially, the magnetic field can be obtained from the magnetic vector potential of the magnetic dipole(as shown in Eq. (5)).
For any closed plane current loop, the magnetic moment is perpendicular to the plane of the loop. Furthermore, the magnitude of the magnetic moment can easily be derived regardless of the shape of the loop.
where, I is the current flowing in the closed circuit and S is the total region of the loop. Therefore, a self-shielded coil can be obtained by designing appropriate shape parameters to ensure that the magnetic moment is zero. The above-described design can ensure rapid attenuation of the external magnetic field. However, necessary design conditions need to be applied in order to ensure that the internal magnetic field meets the design requirements. Usually, the internal magnetic field is designed using the Taylor expansion method or the target field method. Both coil design methods have their own advantages and disadvantages. The traditional Taylor expansion method relies on the analytical expression of the magnetic field and has high design precision. However, the solving process is complicated, and it is difficult to design a coil with a complicated shape. The target field method has the advantages of simple solution process and good portability. However, the continuous current density needs to be discretized during the solution process, which causes errors in the magnetic field.

B. DESIGN METHOD OF THE SELF-SHIELDED COIL
For a self-shielded coil, it is necessary to balance the magnetic field distribution inside and outside the coil. It is difficult to design the external magnetic fields using the traditional Taylor expansion method. The target field method can easily add some necessary internal and external magnetic field conditions. This is an effective way to design external magnetic field attenuation. However, the ill-conditioned equation often occurs in the solution process. In addition, the target field method requires discretization of the continuous current density, which usually reduces the design accuracy. Therefore, it is essential to integrate various design methods to develop an efficient self-shielded coil design method. High magnetic field design accuracy is the first requirement. In the proposed approach, the traditional Taylor expansion is used to design the internal magnetic field and the magnetic multipole expansion is used to design the external magnetic field. Both expansions are based on analytical expressions of the magnetic field, which can ensure the magnetic field accuracy.
This paper mainly considers the cylindrical self-shielded uniform magnetic field coils shown in Fig. 3. In this structure, the radius of the outer coil and the turns ratio of the inner and the outer coils are determined first to obtain the decay rate of the external magnetic field. The selection of the radius of the shielded coil is not arbitrary. According to section II-A, the magnetic field at a point outside the coil can be analyzed using the magnetic multipole expansion method. When designing a coil with a uniform internal magnetic field, the low-order expansion term of the Taylor expansion of the magnetic field is usually set to zero. Similarly, when designing a coil with an external magnetic field of 0, the loworder term of the magnetic multipole expansion can be set to 0. In general, the magnetic vector potential of higher order magnetic multipoles decays more quickly and it is difficult to derive the magnetic generated by the higher order magnetic multipoles. Therefore, rapid attenuation of the magnetic field outside the coil is ensured by making the lowest order magnetic dipole 0. In other words, the turns ratio and the radius ratio of the main and the shielded coils are designed to ensure that the magnetic dipole moment is 0. In addition, due to the limited the volume of the coil, the radius of the outer shielded coil cannot be too large. Otherwise, once the radius of the self-shielded coil is too large, the external magnetic shielding radius also needs to be increased, which will make the design of the self-shielded coil meaningless. This is the basis of the selection of shielded coil radius in the proposed design.
The above-mentioned method can ensure the rapid attenuation of the external magnetic field. However, a certain design method is required to ensure the uniformity of the internal magnetic field. The conventional coil design method uses a Taylor expansion or a spherical harmonic expansion at the coil center. Then the structural parameters of the coil can be solved by setting the low-order terms equal to zero. The Taylor expansion of the magnetic field is provided in Eq. 7, as shown at the bottom of the page.
In Eq. 7, i = x, y, z denotes each component of the magnetic field, n denotes the total order of the derivatives, and This method is relatively simple for solving the low-order uniform magnetic fields. However, for higher-order uniform magnetic coils, it often happens that the equations have no solution. Therefore, an optimization method is used instead of solving the equations to obtain the coil structural parameters.
Obviously, the cylindrical uniform magnetic field coils are all axially symmetric. For the cylindrical self-shielded coil shown in Fig. 3, the magnetic field distribution on the axis can be obtained by Biosvall's law(Eq. 8) as shown at the bottom of the page.
In Eq. 8, B| (0,0,z) is the magnetic field at a point of coordinates (0, 0, z), z is the unit vector in the z direction, µ 0 = 4π × 10 −7 H/m is the permeability of free space, I is the current flowing in the coil, R m and R s are radiuses of the main and the shielded coils, respectively, m is the number of main coil pairs, n mi is the number of turns of the i-th pair of main coils, n sj is the number of turns of the j-th pair of shielded coils, d mi is the distance between the i-th pair of main coils and the z = 0 plane, and d sj is the distance between the j-th pair of shielded coils and the z = 0 plane.
In order to design a uniform magnetic field, the low-order derivative terms of the magnetic field at the center point are also derived (Eq. 9) as shown at the bottom of the next page.
In the conventional coil design, the above lower order derivative terms can be made zero. The coil structural parameters can be obtained by solving these equations. However, these equations often have no real solution. Even if the equations have real solutions, the ampere-turns are usually not integers, meaning that the coil structure may be too complicated for practical applications. In addition, it is difficult to set the necessary constraints (such as the length to diameter ratio of the coil) according to the applications. Therefore, an optimization method is used in the proposed design instead of solving the equations to obtain the coil structural parameters. This optimization method can compensate many deficiencies of the traditional coil design methods.
The PSO algorithm proposed by Eberhart and Kennedy in 1995, is an intelligent optimization algorithm developed from the bird social behavior model. [32] It has been successfully applied in many fields. In PSO, each individual is called a ''particle,'' representing a potential solution of a problem. [33] The standard PSO algorithm can be represented by the following model. For a D-dimensional space, the position of the i-th particle can be expressed as X i = (x i1 , x i2 , . . . , x iD ). The best previous position of a particle can be recorded and represented as P i = (p i1 , p i2 , . . . , p iD ). The index of the best particle among all the particles in the population is represented by symbol g. The rate of change of the position (velocity) for particle i is represented . The particles will move according to Eq. (10).
where k is the current number of iterations, ω is the inertia weight, c 1 and c 2 are acceleration constants, and rand( ) and Rand( ) are two random functions both have a range of [0, 1]. The velocity of particle i has three parts. The first part is the ''inertial'' part representing the inertia of the previous behavior of the particles. The second part is the ''cognition'' part that represents the private thinking of the particle itself. The third part is the ''social'' part that represents the collaboration among the particles. The advantages of PSO include easy implementation, high precision, and fast convergence. Also, the PSO is a parallel algorithm.
In order to apply the PSO algorithm, the design of a uniform magnetic field coil is transformed into an optimization problem. The position of each circular coil pair ) is optimized as a particle swarm problem. The absolute value of each derivative of the coil center in the axial direction is used as the fitness value of the particle position. A weighted sum is then used to transform this multi-objective optimization into a single-objective optimization. In addition, a relative position constraint is set by a penalty function. The distance between two adjacent circular coils can be constrained to accommodate certain machining accuracy and opening limitations. In some atomic sensors, the apertures are usually left in the center to pass the light. In this paper, the ampere-turns ratio of each coil is designed to be 1 to facilitate processing and manufacturing. The optimization can be expressed in a mathematical form as Eq. (11).
where, k p is the number of low-order derivative terms to be optimized, ω k is the weight of each derivative in the objective is the position of each pair of coils, d c is the minimum coil spacing requirement that is limited by the manufacturing process, d max and d min are the maximum and minimum limits of the coil position, respectively. The parameter d max is limited by the coil's length to diameter ratio. While d min is often limited by the size of the hole in the center of the coil, which is used to allow the light to pass through the gas cell. These constraints increase the controllability of the coil structure. The above optimization ensures the uniformity of the internal magnetic field, but cannot guarantee the decay rate of the external magnetic field. The external magnetic field  = 0(k = 1, 3, 5 . . .).   can be analyzed and designed using the magnetic multipole expansion described in section II-A. In order to rapidly decay the external magnetic field, the magnetic moment of the coil can be made zero. Of course, the more low-order magnetic multipole expansion terms are 0, the faster the magnetic field decays. However, it is not easy to derive the analytical expressions of the higher-order magnetic multipole expansion terms. Therefore, the coil magnetic moment is often used in the design of self-shielded coils. In this paper, a magnetic moment of 0 is used in the optimization of the coil structure as a constraint. This can ensure the attenuation of the external magnetic field to a certain extent. However, this is not enough to obtain a satisfactory decay rate. Some additional constraints are necessary. For the magnetic multipole expansion of the external magnetic field, the higher-order terms of the series expansion are usually ignored. In order to overcome this shortcoming, several characteristic points are selected in the design region and the magnetic fields of these points are directly calculated using Biosaval's law. Mainly, the points between the coil and the magnetic shielding layer are selected as the VOLUME 8, 2020 characteristic points. The magnetic fields of these characteristic points are also used in the objective function. The magnetic fields at these characteristic points replace the higher-order terms of the magnetic multipole expansion from another aspect. This will ensure that the external magnetic field can decay at a faster rate. In this way, the optimization model of the coil structure can be rewritten as follows: where, ω ts is the weight of each characteristic point in the objective function, B ts is the magnetic field of each characteristic point, S m is the region of the main coil, and S s is the region of the shielded coil.

A. PERFORMANCE BALANCE OF THE SELF-SHIELDED COIL
For the coil design, the balance of various performances, such as the loop quantity, coil dimension, uniformity, zeros field position, is very important. Correspondingly, the selection of constraints and parameters is critical for the optimization of the self-shielded coil. The choice of design parameters is extremely important for the shielding performance and the magnetic field uniformity of the self-shielded coil. In the entire coil design process, there are four types of parameters. The first parameter to be selected is the radius of the shielded coil. As described in section II-B, the region ratio of the inner and the outer coils should be inversely proportional to the turns ratio of the inner and the outer coils. The radius of the shielded coil is limited by the volume and should not be too large. However, the radius should also not be too small, otherwise the magnetic field of the inner and the outer coils will be cancelled, making the coil constant very small. Combined with the appropriate turns ratio, the radius of the shielded coil can be determined. In this paper, the inner and outer turns ratio is set at 12: 8, and the radius ratio is 1: 1.225. In order to analyze the influence of the turns of the inner and outer coils, under the premise of the same turns ratio, this paper also optimized the coils with 6:4 turns.
The second type of parameter to be selected is ω k , the weight of each derivative value of the magnetic field at the center of the coil. Usually, ω k is taken as 1: 1 and can be adjusted according to the actual results of optimization. After preliminary optimization, the weight corresponding to the large derivative of any order can be increased appropriately. In this paper, the preferred value of ω k is taken as 1: 1. Considering that the influence of the lower order derivative is stronger than that of the higher order derivative, a scheme for increasing the weight of the second derivative is also added for comparison.
The third type of parameter to be selected is the target field. These target field points located between the coil and the shielding layer are selected to ensure the attenuation rate of the external magnetic field of the coil. For simplicity, the points on the coordinate axis are selected in this paper. Different combinations of target field points are also selected for comparison.
The fourth type of parameter to be selected is ω ts , the weight of the magnetic field at each target field point. The function of these weights is similar to that of the derivatives of various orders, which is to adjust the optimization results. Since the cylindrical coil magnetic field decays faster on the r-axis than on the z-axis, the weight of the target field point on the z-axis is selected to be large. This is more conducive to obtaining better optimization results. At the same time, there is also a ratio between the second and the fourth type of parameters that needs to be selected. Adjusting this ratio can balance the shielding performance of the coil and the uniformity of the magnetic field. This parameter has a very important effect on the balance between magnetic field uniformity and attenuation performance.
In order to reflect the influence of different parameters on various performances of the coil, several combinations of different parameters are optimized for selection in this paper. The specific parameter combinations are shown in Table 1. In fact, it is difficult to simply describe the influence of the selection of these parameters on the optimization results. The change of any parameter may affect the uniformity of the the magnetic fields are expressed in terms of relative values. Since different coils have different coil coefficients, the magnetic field produced by the same current is also different. It is difficult to use the absolute magnitude of the magnetic field to reflect the decay rate of the magnetic field of different coils. For better comparison, the magnetic fields of the coils are normalized. The magnetic field at the center point of each coil is recorded as one unit, and the relative magnetic field is obtained. The relative value of the magnetic field at a certain point is the ratio of the magnetic field at that point to the magnetic field at the central point. The relative value of the magnetic field in the center region is approximately 1 (the value of the center point is 1), and the magnetic field of the point outside the coil will decay to 0. In this way, objective and universal standards can be used to judge the decay rate of the magnetic field. The figures also show the contours of the magnetic fields. It can be seen from the figures that the external magnetic fields of the self-shielded coils rapidly decay to a level close to 0, especially in the axial direction. Among them, the external magnetic field attenuation performance of the Group 1 is the best.
internal magnetic field and the decay rate of the external magnetic field. In practical applications, it is still necessary to match the parameters as required. According to the five groups of parameters shown in Table 1, we have obtained the corresponding self-shielded coils. The corresponding coil structure parameters are shown in Table 2.
The magnetic field uniformity and attenuation rate of the various self-shielded coils obtained above are verified by numerical calculation. These numerical calculation results can provide references for the selection of optimization parameters and performance balance. In this paper, the radius of the shielded coil is set to 25 mm. Hence, according to the condition that the magnetic moment is 0, a main coil with a radius of 20.412 mm can be obtained. The structure of the self-shielded coil is shown in Fig. 3. In order to verify the effectiveness of the optimization, numerical calculations are performed on the designed coils and the relative errors of the magnetic fields produced by the self-shielded coils are analyzed. For comparison, the magnetic field distributions of a Lee-Whiting coil and a non-moment coil are also calculated in this paper. The Lee-Whiting coil is a type of traditional uniform magnetic field coil that is often used in applications that require high uniform magnetic fields. Its magnetic field uniformity is better than that of a Helmholtz coil with the same radius. A non-moment coil is a coil with a magnetic moment of approximately zero. Its internal magnetic field is uniform and the external magnetic field decays rapidly. It is often used inside a magnetic shield to suppress the coupling between the coil and the magnetic shield and obtain a precise magnetic field. The structures and parameters of the Lee-Whiting coil and the non-moment coil are shown in Fig. 4 and Table 3. In this paper, the outer radii of the coils are all set to 25 mm. The fairness of performance comparison can be guaranteed under the same outer dimensions. Fig. 5 shows the magnetic field distributions of the coils in a wide range of the radial and axial directions. Fig. 6 shows the magnetic field distributions of the coils over a large region of r −z plan. For better comparison, the magnetic fields of the coils are normalized in both figures. The figures show that the external magnetic field of the self-shielded coil can rapidly decay to a level close to 0. It can be seen from the figures that the shielding effect of the self-shielded coil is remarkable. Moreover, the magnetic field uniformity in the center of the coil should also be noted. Therefore, the magnetic field of the center region is analyzed. Fig. 7 shows the magnetic field distributions of the coils in a small range of the radial and axial directions. Fig. 8 shows the magnetic field distributions of the coils over a small region of r −z plan. Both figures show that while the external magnetic field is rapidly attenuating, the self-shielded coils maintains a high uniformity in the internal magnetic field.

B. FINITE ELEMENT ANALYSIS OF THE MAGNETIC FIELD OF THE SELF-SHIELDED COIL WITHIN A MAGNETIC SHIELDING
Figs. 5 -8 show the magnetic field distributions of the coils. However, these calculations do not involve the external magnetic shielding. As the magnetic shielding layer will change the magnetic field distribution, the Figs. 5 -8 are not sufficient to fully reflect the magnetic field distribution in practical applications. In order to completely analyze the magnetic field distribution inside a magnetic shielding layer, a finite element analysis with Ansys Maxwell is performed. In this paper, a Permalloy magnetic shielding layer with an inner radius of 36 mm, a thickness of 1.5 mm, and a height of 60 mm is placed outside the coil. Fig. 9 shows the finite element analysis models of the coils. Here, the Lee-Whiting coil, the non-moment coil, and the Group 1 of self-shielded coil are used as examples for finite element analysis. Fig. 10 shows the magnetic field distributions of the coils along the radial and axial directions. Due to the influence of the magnetic shielding, the magnetic field outside the magnetic shielding almost reaches the level of 0. Fig. 10 shows that in the region of the magnetic shielding layer, the magnetic field changes caused by the magnetic shielding of the non-moment coil and the self-shielded coil are much smaller than that causes by the Lee-Whiting coil. In addition, in the center of the coil, the magnetic shielding caused the magnetic field generated by the Lee-Whiting coil to be 1.2 times larger than that without the magnetic shielding. For the non-moment coil, this factor is 1.000. For the self-shielded coil, this factor is 0.997. These results show that the coupling between the magnetic shielding and the self-shielded coil or the non-moment is much smaller than that between the magnetic shielding and the Lee-Whiting coils. In other words, the non-moment coil and the self-shielded coil can suppress the coupling between the magnetic shielding and the coil. Furthermore, it is possible to avoid the magnetic field fluctuations caused by the changes of the material magnetic permeability. Fig. 11 shows the magnetic field distributions of the coils inside the magnetic shielding over a large region  Fig. 6 focuses on the decay rate of the external magnetic field, while this figure focuses on the uniformity of the internal magnetic field. Similarly, when evaluating the uniformity of the magnetic field of coils with different coil constants, a unified metric is required. We can use the relative value of the magnetic field used in Fig. 6 to show the uniformity of the central magnetic field. In this case, the magnitude of the magnetic field at the central point is defined as one unit. However, the magnetic fields at other points in the central region are also approximately 1, which is not very intuitive. Therefore, we use relative error to express the uniformity of the magnetic field in the central region. The magnetic fields of the coils are shown in the form of the relative error value with respect to the magnetic field of the center point. It can be seen that the uniformities of the magnetic fields in the center region of the self-shielded coils are usually better than that of the Lee-Whiting coil and non-moment coil. That is, while the external magnetic field is rapidly attenuating, the self-shielded coils maintain high uniformities in the internal magnetic field. of r − z plan. The results show that the non-moment coil and the self-shielded coil can well limit the magnetic field lines within a certain range, so as to eliminate the coupling effects between the coils and the shielding layers.
The central magnetic field uniformities of the coils are also calculated by finite element analysis. Fig. 12 the magnetic field distributions of the coils along the radial and axial directions. Fig. 13 shows the magnetic field distributions of the FIGURE 9. The finite element analysis models of the Lee-Whiting coil, the non-moment coil, and the self-shielded coil. In the figure, the gray cylindrical shell is the magnetic shielding layer, which is made of permalloy with high magnetic permeability. All magnetic shielding layers are cylindrical layers with a radius of 36 mm, a height of 72 mm, and a thickness of 1.5 mm. Inside the shield, the orange and purple rings are coils. The two different colors represent the opposite direction of the current. For comparison under the same conditions, the maximum radii of the inner coils are all 25 mm.

FIGURE 10.
Within the magnetic shielding layer, the magnetic field distributions of the Lee-Whiting, the non-moment coil and the self-shielded coils in a wide range of the radial and axial directions. (a) the magnetic field distributions along the radial direction. (b) the magnetic field distributions along the axial direction. In order to better demonstrate the influence of the magnetic shielding, the magnetic fields calculated by the finite element method are normalized with the magnetic field at the center point when there is no magnetic shielding. In this FEA simulation, homogeneous Neumann boundary condition is selected. In order to improve the accuracy of the finite element analysis, a cube with a side length of 400 mm is selected as the solution region. It can be found that the field is zero below z=-40 mm and above z=40 mm. This is caused by the shielding effect of the shielding layer outside the coil. The shielding effect of the shielding layer is bidirectional. The shielding layer can not only prevent the internal magnetic field from being disturbed by the external magnetic field, but also protect the external magnetic field from the internal magnetic field. FIGURE 11. The magnetic field distributions of the coils inside the magnetic shielding over a large region of r − z plan. The results show that the non-moment coil and the self-shielded coil can well limit the magnetic field lines within a certain range, so as to eliminate the coupling effects between the coils and the shielding layers.
coils inside the magnetic shielding over a small region of r −z plan. These results show that the internal magnetic field of the Lee-Whiting coil is greatly affected by the magnetic shield, and the uniformity of the magnetic field drops by one to two orders of magnitude. Inside the shielding layer, the magnetic field uniformity of the non-moment coil is slightly reduced. The uniformity of the magnetic field of the self-shielded coil is almost not affected by the magnetic shielding layer, and its magnetic field distribution is almost the same as when there is no magnetic shielding layer. The self-shielded coil FIGURE 12. Within the magnetic shielding layer, the magnetic field distributions of the Lee-Whiting, the non-moment coil, and the self-shielded coils in a small range of the radial and axial directions. (a) the magnetic field distributions along the radial direction. (b) the magnetic field distributions along the axial direction. Compared with Fig. 7, it can be found that the magnetic field uniformity in the central region of the coil has decreased for the Lee-Whiting coil. Inside the shielding layer, the magnetic field uniformity is slightly reduced. While the magnetic field uniformity of the self-shielded coil is almost not affected by the magnetic shielding layer.

FIGURE 13.
The magnetic field distributions of the coils inside the magnetic shielding over a small region of r − z plan. It shows that the internal magnetic field of the Lee-Whiting coil is greatly affected by the magnetic shield, and the uniformity of the magnetic field drops by one to two orders of magnitude. The magnetic field uniformity of the non-moment coil is slightly reduced. The uniformity of the magnetic field of the self-shielded coil is almost not affected by the magnetic shielding layer, and its magnetic field distribution is almost the same as when there is no magnetic shielding layer (compared with Fig. 8).
significantly suppresses the coupling between the magnetic shielding and the coil.

IV. CONCLUSION
An innovative design method for the self-shielded uniform magnetic field coils based on the PSO algorithm is proposed in this paper. The proposed design method is based on the Taylor expansion of the magnetic field. The traditional coil design method of solving the equations is replaced by the optimization method. Moreover, combining with the multi-pole expansion and the target field information, a selfshielded coil with a uniform internal magnetic field and a fast attenuation of the external magnetic field is obtained. The theoretical calculations and the finite element analysis prove that the proposed method is an effective design method for the self-shielded uniform magnetic field coils. This is significant for applications that need to suppress the coupling between the magnetic shielding and coils, such as the high-precision atomic measurements. The future study will include the experimental measurements of the magnetic field generated using the coil within the magnetic shielding layer by an atomic magnetometer and further enhancement of coupling suppression.