A method and system for determining the stream function of a magnetic field coil based on target field method and Adam
The magnetic field coil structure is optimized by the target field method and Adam algorithm, which solves the local optimal solution problem of coil design in the existing technology, achieves the uniformity of the magnetic field gradient and the safety of the coil operation, and is suitable for magnetic field elimination in magnetic shielding rooms.
Patent Information
- Application Number
- CN202411705523.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-11-26
AI Technical Summary
The dual-plane coils designed using existing methods have local optimal solutions, resulting in uneven magnetic field gradients and unable to meet the near-zero background magnetic field requirements of medical programs such as magnetoencephalography and magnetocardiography.
The target field method is used to solve the initial value of the magnetic field coil structure control vector, and the Adam algorithm is combined to iteratively optimize the coil structure control vector. By setting the expected magnetic induction intensity gradient value of the target point, the coil structure is optimized to improve the uniformity of the magnetic field gradient.
The accuracy and safety of the compensation magnetic field generated by the coil are improved, the stability of the coil operation is ensured, and the technical requirements of medical programs for near-zero background magnetic fields are met.
Smart Images

Figure CN119623185B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of magnetic field coil design, and more specifically, relates to a method and system for determining a magnetic field coil stream function based on a target field method and Adam. Background Art
[0002] Currently, magnetically shielded chambers can effectively block interfering magnetic fields from the external environment, with magnetic field noise reaching the nanoT level. These chambers are suitable for testing extremely weak magnetometers, such as superconducting quantum magnetometers and spin-exchange relaxation-free atomic magnetometers, and address calibration issues related to magnetic parameters such as temperature characteristics, magnetic field noise, sensitivity, and orthogonality. However, the magnetic field in the central region of the chamber fluctuates dramatically, with large magnetic field gradients. This does not meet the near-zero background magnetic field requirements of medical protocols such as magnetoencephalography and magnetocardiography. Therefore, further elimination of residual magnetic fields in the central region of the chamber is necessary. Dual-plane coils can generate a uniform magnetic field or magnetic field gradient in the target area, thereby eliminating residual magnetic fields in different directions.
[0003] The target field method is the most effective inverse method for designing dual-plane coils, transforming the coil design problem into a multi-parameter nonlinear optimization problem. Because the equations for solving the coil structure are overdetermined, the Tikhonov regularization method is required to address its ill-posed nature. Common penalty terms include the curvature of the dual-plane coil streamlines and the total power of the coil. The specific structure of the coil is controlled by a vector, and the solution obtained by the target field method is typically a local optimal solution. Existing coil design methods still use the method of setting the expected magnetic induction intensity value at the target point when designing dual-plane gradient coils, which limits the uniformity of the magnetic induction intensity gradient generated by the coil. Summary of the Invention
[0004] In response to the defects of the existing technology, the purpose of this application is to provide a method and system for determining the flow function of the magnetic field coil based on the target field method and Adam, aiming to solve the problem that the existing method obtains the coil structure corresponding to the local optimal solution.
[0005] To achieve the above objectives, in a first aspect, the present application provides a method for determining a stream function of a magnetic field coil based on a target field method and Adam, wherein the magnetic field coil is a dual-plane shim coil or a dual-plane gradient coil, the method comprising:
[0006] S1. Use the target field method to solve the initial value of the control vector of the magnetic field coil structure;
[0007] S2. Use the Adam algorithm to iteratively optimize the magnetic field coil structure control vector;
[0008] S3. Solve the magnetic field coil stream function using the optimized magnetic field coil structure control vector.
[0009] Preferably, step S1 is specifically as follows: using the least squares method to solve the coil structure control vector corresponding to the minimum value of the first evaluation function as the initial value P0 of the magnetic field coil structure control vector P, wherein the first evaluation function is used to measure the difference between the magnetic field / magnetic field gradient generated by the magnetic field coil and the expected value:
[0010] P0=(K T K+αG) -1 ·K T B
[0011] Among them, G is the heating power factor matrix of the magnetic field coil, and α is the weight coefficient of the penalty term;
[0012] For the dual-plane shim coil, K is the magnetic flux density coefficient matrix generated by the trigonometric function terms of different orders of the magnetic field coil stream function, and B is the vector composed of the expected magnetic flux density values of the target point arranged in the distribution order;
[0013] For the dual-plane gradient coil, K is the magnetic induction intensity gradient coefficient matrix generated by the trigonometric function terms of different orders of the magnetic field coil stream function, and B is the vector composed of the expected magnetic induction intensity gradient values of the target point arranged in distribution order.
[0014] Preferably, for the dual-plane gradient coil, the elements of the magnetic induction intensity gradient coefficient matrix K in the i-th row and the (m-1)×N+n-th column generated by the trigonometric function terms of different orders of the magnetic field coil stream function are:
[0015]
[0016] Where μ0 is the vacuum permeability, H is half the height of the magnetic field coil plane, L is half the length of the magnetic field coil plane, z is half the distance between the two coil planes, and r i is the coordinate vector of the i-th target point, z i is the z coordinate of the i-th target point, r s1 ,r s2 are the coordinate vectors of the current source points on the two coil planes in the magnetic field coil, || is the distance between the vectors, f1(m,x) and f2(n,y) are the types of trigonometric function terms of different orders in the x-direction and y-direction in the magnetic field coil stream function, respectively, which are determined according to the direction of the compensation magnetic field generated by the desired magnetic field coil, i=1,2,3…,Num, m=1,2,3…,M, n=1,2,3…,N, Num is the number of target points in the target compensation area, M and N are the x-direction order and y-direction order in the Fourier expansion of the triangular form of the magnetic field coil stream function, respectively.
[0017] Preferably, step S2 includes:
[0018] S21. Calculate the gradient vector of the second evaluation function for the magnetic field coil structure control vector, where the second evaluation function is used to evaluate the quality of each iteration result of the Adam algorithm;
[0019] S22. Update the first-order moment and second-order moment of the second evaluation function with respect to the magnetic field coil structure control vector using the gradient vector;
[0020] S23. Calculate the first-order moment and second-order moment vector after deviation correction;
[0021] S24. Update the magnetic field coil structure control vector using the first-order moment and second-order moment vectors after the deviation correction;
[0022] S25. Repeat the above operation until the iteration stop condition is met to obtain the optimized value of the magnetic field coil structure control vector.
[0023] Preferably, the second evaluation function E is specifically as follows:
[0024] E=‖KP-B‖ 2 +αP T GP
[0025] Among them, ‖‖ is the second norm of the vector, P is the magnetic field coil structure control vector, G is the magnetic field coil heating power factor matrix, and α is the penalty term weight coefficient;
[0026] For the dual-plane shim coil, K is the magnetic flux density coefficient matrix generated by the trigonometric function terms of different orders of the magnetic field coil stream function, and B is the vector composed of the expected magnetic flux density values of the target point arranged in the distribution order;
[0027] For the dual-plane gradient coil, K is the magnetic induction intensity gradient coefficient matrix generated by the trigonometric function terms of different orders of the magnetic field coil stream function, and B is the vector composed of the expected magnetic induction intensity gradient values of the target point arranged in distribution order.
[0028] Preferably, the second evaluation function E is specifically as follows:
[0029]
[0030] Among them, B * is the magnetic flux density / magnetic flux density gradient generated by the actual coil at the target point, B * =TP, T is the coefficient matrix of magnetic flux density / magnetic flux density gradient generated by the current in the magnet coil, P is the magnetic field coil structure control vector, B * (i) is vector B * The i-th element of B * avg B * The average value of all elements in ;
[0031] For a dual-plane shim coil, T i,: The calculation formula is as follows:
[0032]
[0033] For a dual-plane gradient coil, T i,: The calculation formula is as follows:
[0034]
[0035] Among them, all elements in the same row of T are equal, T i,: is the value of the element in row i of T, μ0 is the magnetic permeability of vacuum, N c is the number of closed streamlines of the magnet coil, For l j The curve integral of l j is the jth closed streamline of the magnetic coil, H is half of the plane height of the magnetic coil, L is half of the plane length of the magnetic coil, a is half of the plane distance between the two coils, r i is the coordinate vector of the i-th target point, z i is the z coordinate of the i-th target point, r s1 ,r s2 are the coordinate vectors of the current source points on the two coil planes in the magnetic field coil, || is the distance between the vectors, f1(m,x) and f2(n,y) are the types of trigonometric function terms of different orders in the x-direction and y-direction in the magnetic field coil stream function, respectively, which are determined according to the direction of the compensation magnetic field generated by the desired magnetic field coil, i=1,2,3…,Num, m=1,2,3…,M, n=1,2,3…,N, Num is the number of target points in the target compensation area, M and N are the x-direction order and y-direction order in the Fourier expansion of the triangular form of the magnetic field coil stream function, respectively.
[0036] Preferably, the updating magnetic field coil structure control vector is specifically as follows:
[0037]
[0038] in, m t =β1·+m t-1 (1-β1)·g t , v t =β2·v t-1 +(1-β2)·g t 2 ;
[0039] P t (i) is the magnetic field coil structure control vector P after the tth iteration update tThe i-th element, η1 is the learning rate of the magnetic field coil structure control vector, m t ′(i) is the first-order moment m after the deviation correction of the tth iteration t ′The i-th element, v t ′(i) is the second-order moment v after the deviation correction of the tth iteration t ′ is the i-th element, ε is the deviation correction constant, m t is the first-order moment of the second evaluation function of the t-th iteration with respect to the control vector of the magnetic field coil structure, v t is the second-order moment of the second evaluation function of the t-th iteration with respect to the control vector of the magnetic field coil structure, β1 and β2 are the weight coefficients of the first-order moment and the second-order moment, respectively, i = 1, 2, …, M × N, M and N are the x-direction order and y-direction order of the Fourier expansion of the triangular form of the magnetic field coil stream function, respectively.
[0040] Preferably, step S3 is specifically:
[0041] The magnetic field coil stream function S(x,y) is determined by integrating the types of trigonometric functions of different orders in the magnetic field coil stream function and the optimized control vector:
[0042]
[0043] Where (x, y) is the coordinate of the midpoint of the coil plane, -H≤x≤H, -L≤y≤L, is the optimized coil structure control vector P * The (m-1)×N+nth element, H is half the plane height of the magnetic field coil, L is half the plane length of the magnetic field coil, f1(m,x) and f2(n,y) are the types of trigonometric function terms of different orders in the x-direction and y-direction in the magnetic field coil stream function, respectively, which are determined according to the direction of the compensation magnetic field generated by the desired magnetic field coil, m=1,2,3…,M, n=1,2,3…,N, M and N are the x-direction order and y-direction order in the Fourier expansion of the trigonometric form of the magnetic field coil stream function, respectively.
[0044] Preferably, the method further includes: S4. determining the specific structure of the magnetic field coil based on the stream function of the magnetic field coil.
[0045] To achieve the above-mentioned objectives, in a second aspect, the present application provides a system for determining the flow function of a magnetic field coil based on a target field method and Adam, comprising at least one processor and at least one memory; the at least one memory is used to store computer instructions; the at least one processor is used to execute at least part of the computer instructions to implement the method described in the first aspect.
[0046] It can be understood that the beneficial effects of the second aspect mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0047] In general, the above technical solutions conceived by this application have the following beneficial effects compared with the existing technologies:
[0048] This application proposes a method for determining the magnetic field coil stream function based on the target field method and Adam. The target field method is used to solve the initial value of the magnetic field coil structure control vector. The Adam algorithm is used to iteratively optimize the magnetic field coil structure control vector. The magnetic field coil stream function is solved using the optimized magnetic field coil structure control vector. This application improves the target field method by designing a dual-plane gradient coil by setting the expected magnetic induction intensity gradient value at the target point. The Adam algorithm is used to optimize the sum of the coil structure control vectors to closely approximate the optimal solution for the coil structure, thereby improving the accuracy of the coil's generation of the compensation magnetic field and ensuring the coil's operational safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a flow chart of a method for determining the flow function of a magnetic field coil based on the target field method and Adam, provided in an embodiment of the present application.
[0050] Figure 2 Schematic diagram of the dual-plane coil and target compensation area provided in an embodiment of the present application.
[0051] Figure 3 This is the dB provided by the embodiment of the present application. x Schematic diagram of the design of the / dz gradient coil.
[0052] Figure 4 This is a finite element analysis result diagram of the compensation magnetic field generated by the coil provided in the embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0054] The term "and / or" as used herein describes an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. The symbol " / " as used herein indicates that the related objects are in an "or" relationship, for example, A / B means either A or B.
[0055] The terms "first" and "second" in this specification and claims are used to distinguish different objects rather than to describe a specific order of objects. For example, "first response message" and "second response message" are used to distinguish different response messages rather than to describe a specific order of response messages.
[0056] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0057] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more, for example, multiple processing units means two or more processing units, etc.; multiple elements means two or more elements, etc.
[0058] Next, the technical solutions provided in the embodiments of this application are introduced.
[0059] like Figure 1 As shown, the present application provides a method for determining a stream function of a magnetic field coil based on a target field method and Adam, wherein the magnetic field coil is a dual-plane shim coil or a dual-plane gradient coil, and the method comprises:
[0060] S1. Use the target field method to solve the initial value of the control vector of the magnetic field coil structure;
[0061] Selecting the total power of the dual-plane coil as the penalty term of the Tikhonov regularization can solve the ill-conditioned equation problem of the coil structure solution, while avoiding the coil structure being too complicated and the coil power being too high. Therefore, the evaluation function E is:
[0062] E=||KP-B|| 2 +αP T GP
[0063] Preferably, step S1 is specifically as follows: using the least squares method to solve the coil structure control vector corresponding to the minimum value of the first evaluation function as the initial value P0 of the magnetic field coil structure control vector P, wherein the first evaluation function is used to measure the difference between the magnetic field / magnetic field gradient generated by the magnetic field coil and the expected value:
[0064] P0=(K T K+αG) -1 ·K T B
[0065] Among them, G is the heating power factor matrix of the magnetic field coil, and α is the weight coefficient of the penalty term;
[0066] For the dual-plane shim coil, K is the magnetic flux density coefficient matrix generated by the trigonometric function terms of different orders of the magnetic field coil stream function, and B is the vector composed of the expected magnetic flux density values of the target point arranged in the distribution order;
[0067] For the dual-plane gradient coil, K is the magnetic induction intensity gradient coefficient matrix generated by the trigonometric function terms of different orders of the magnetic field coil stream function, and B is the vector composed of the expected magnetic induction intensity gradient values of the target point arranged in distribution order.
[0068] Preferably, for a dual-plane shim coil, according to the symmetry and antisymmetry of the trigonometric function terms, the element in the i-th row and the (m-1)×N+n-th column of K is:
[0069]
[0070] Where μ0 represents the vacuum permeability, r i is the coordinate vector of the i-th target point, z i is the z coordinate of the i-th target point, r s1 ,r s2 are the coordinate vectors of the current source points on the two coil planes, || are the distances between them, i=1,2,3…,Num, m=1,2,3…,M, n=1,2,3…,N.
[0071] Preferably, for the dual-plane gradient coil, the elements of the magnetic induction intensity gradient coefficient matrix K in the i-th row and the (m-1)×N+n-th column generated by the trigonometric function terms of different orders of the magnetic field coil stream function are:
[0072]
[0073] Where μ0 is the vacuum permeability, H is half the height of the magnetic field coil plane, L is half the length of the magnetic field coil plane, a is half the distance between the two coil planes, and r i is the coordinate vector of the i-th target point, z i is the z coordinate of the i-th target point, r s1 ,r s2 are the coordinate vectors of the current source points on the two coil planes in the magnetic field coil, || is the distance between the vectors, f1(m,x) and f2(n,y) are the types of trigonometric function terms of different orders in the x-direction and y-direction in the magnetic field coil stream function, respectively, which are determined according to the direction of the compensation magnetic field generated by the desired magnetic field coil, i=1,2,3…,Num, m=1,2,3…,M, n=1,2,3…,N, Num is the number of target points in the target compensation area, M and N are the x-direction order and y-direction order in the Fourier expansion of the triangular form of the magnetic field coil stream function, respectively.
[0074]
[0075] Where δ is the resistivity of the magnetic field coil wire, t is the thickness of the wire, and J xIt represents the inverse of the partial derivative of the product of the trigonometric function in the stream function with respect to y, J y It represents the partial derivative of the product of the trigonometric functions in the stream function with respect to x, where m = 1, 2…M and n = 1, 2,…,N.
[0076] The evaluation function value corresponding to P0 obtained from the above formula is the local minimum of E. It is necessary to further optimize the coil structure and power to improve its performance.
[0077] S2. Use the Adam algorithm to iteratively optimize the magnetic field coil structure control vector;
[0078] Preferably, step S2 includes:
[0079] S21. Calculate the gradient vector of the second evaluation function for the magnetic field coil structure control vector, where the second evaluation function is used to evaluate the quality of each iteration result of the Adam algorithm;
[0080] S22. Update the first-order moment and second-order moment of the second evaluation function with respect to the magnetic field coil structure control vector using the gradient vector;
[0081] S23. Calculate the first-order moment and second-order moment vector after deviation correction;
[0082] S24. Update the magnetic field coil structure control vector using the first-order moment and second-order moment vectors after the deviation correction;
[0083] S25. Repeat the above operation until the iteration stop condition is met to obtain the optimized value of the magnetic field coil structure control vector.
[0084] Preferably, the second evaluation function E is specifically as follows:
[0085] E=‖KP-B‖ 2 +αP T GP
[0086] Among them, ‖‖ is the second norm of the vector, P is the magnetic field coil structure control vector, G is the magnetic field coil heating power factor matrix, and α is the penalty term weight coefficient;
[0087] For the dual-plane shim coil, K is the magnetic flux density coefficient matrix generated by the trigonometric function terms of different orders of the magnetic field coil stream function, and B is the vector composed of the expected magnetic flux density values of the target point arranged in the distribution order;
[0088] For the dual-plane gradient coil, K is the magnetic induction intensity gradient coefficient matrix generated by the trigonometric function terms of different orders of the magnetic field coil stream function, and B is the vector composed of the expected magnetic induction intensity gradient values of the target point arranged in distribution order.
[0089] After the evaluation function E converges, for example, the difference between two adjacent iteration functions is less than 1×10-5 , get the optimized value P of the coil structure control vector * .
[0090] Preferably, the second evaluation function E is specifically as follows:
[0091]
[0092] Among them, B * is the magnetic flux density / magnetic flux density gradient generated by the actual coil at the target point, B * =TP, T is the coefficient matrix of magnetic flux density / magnetic flux density gradient generated by the current in the magnet coil, P is the magnetic field coil structure control vector, B * (i) is vector B * The i-th element of B * avg B * The average value of all elements in ;
[0093] For a dual-plane shim coil, T i,: The calculation formula is as follows:
[0094]
[0095] For a dual-plane gradient coil, T i,: The calculation formula is as follows:
[0096]
[0097] Among them, all elements in the same row of T are equal, T i,: is the value of the element in row i of T, μ0 is the magnetic permeability of vacuum, N c is the number of closed streamlines of the magnet coil, For l j The curve integral of l j is the jth closed streamline of the magnetic coil, h is half the plane height of the magnetic coil, L is half the plane length of the magnetic coil, a is half the plane distance between the two coils, r i is the coordinate vector of the i-th target point, z i is the z coordinate of the i-th target point, r s1 ,r s2are the coordinate vectors of the current source points on the two coil planes in the magnetic field coil, || is the distance between the vectors, f1(m,x) and f2(n,y) are the types of trigonometric function terms of different orders in the x-direction and y-direction in the magnetic field coil stream function, respectively, which are determined according to the direction of the compensation magnetic field generated by the desired magnetic field coil, i=1,2,3…,Num, m=1,2,3…,M, n=1,2,3…,N, Num is the number of target points in the target compensation area, M and N are the x-direction order and y-direction order in the Fourier expansion of the triangular form of the magnetic field coil stream function, respectively.
[0098] After reaching the maximum number of iterations, the optimized value P of the coil structure control vector is obtained. * .
[0099] Preferably, the updating magnetic field coil structure control vector is specifically as follows:
[0100]
[0101] in, m t =β1·+m t-1 (1-β1)·g t , v t =β2·v t-1 +(1-β2)·g t 2 ;
[0102] P t (i) is the magnetic field coil structure control vector P after the tth iteration update t The i-th element, η1 is the learning rate of the magnetic field coil structure control vector, m t ′(i) is the first-order moment m after the deviation correction of the tth iteration t ′The i-th element, v t ′(i) is the second-order moment v after the deviation correction of the tth iteration t ′The i-th element, g t is the gradient vector of the tth iteration, g t 2 is the vector g t The corresponding elements are multiplied, ε is the deviation correction constant, n t is the first-order moment of the second evaluation function of the t-th iteration with respect to the control vector of the magnetic field coil structure, v t is the second-order moment of the second evaluation function for the magnetic field coil structure control vector at iteration t. β1 and β2 are the weight coefficients for the first and second moments, respectively. i = 1, 2, …, M × N, where M and N are the x- and y-order orders in the Fourier expansion of the triangular form of the magnetic field coil stream function. The initial values m0 and v0 of the first and second moments are both 0. The operation here is the bitwise division / square root of each vector element.
[0103] The gradient vector g is the gradient of E with respect to P, that is, the vector of derivative values:
[0104]
[0105] S3. Solve the magnetic field coil stream function using the optimized magnetic field coil structure control vector.
[0106] Preferably, step S3 is specifically:
[0107] The magnetic field coil stream function S(x,y) is determined by integrating the types of trigonometric functions of different orders in the magnetic field coil stream function and the optimized control vector:
[0108]
[0109] Where (x, y) is the coordinate of the midpoint of the coil plane, -H≤x≤H, -L≤y≤L, is the optimized coil structure control vector P * The (m-1)×N+nth element, H is half the plane height of the magnetic field coil, L is half the plane length of the magnetic field coil, f1(m,x) and f2(n,y) are the types of trigonometric function terms of different orders in the x-direction and y-direction in the magnetic field coil stream function, respectively, which are determined according to the direction of the compensation magnetic field generated by the desired magnetic field coil, m=1,2,3…,M, n=1,2,3…,N, M and N are the x-direction order and y-direction order in the Fourier expansion of the trigonometric form of the magnetic field coil stream function, respectively.
[0110] Preferably, the method further includes: S4. determining the specific structure of the magnetic field coil based on the stream function of the magnetic field coil.
[0111] After obtaining the stream function of the magnetic field coil, there are many different methods to determine the specific structure of the magnetic field coil, including but not limited to: solving the current density distribution in the coil plane based on the relationship between current density and the curl of the stream function, and discretizing the specific coil structure using contour lines.
[0112] The magnitude of the coil excitation current is:
[0113]
[0114] Among them, S max ,S min are the maximum and minimum values of the stream function D(x,y) respectively.
[0115] The ith (i=1,2,3…,N c ) turns of coil corresponding to the stream function value is:
[0116] S(i)=Smin +(i-0.5)I0.
[0117] Example
[0118] This embodiment adopts the method proposed in this application to design dB x / dz dual-plane gradient coil. The length 2L and height 2H of the dual-plane coil plane are both 1.6m, the distance 2a between the two planes is 1.7m, the cube side length 2d of the target compensation area is 0.3m, the number of target points Num is 125, and the number of closed streamlines of the magnetic field coil is N. c Initialized to 24, the magnetic field coil wire resistivity δ is 1.724×10 -8 Ω·m, the wire thickness is 1mm. Clearly define the expected magnetic induction intensity / magnetic induction intensity gradient value of each target point in the target compensation area of the designed dual-plane coil. After specifying the number of target points, the principle of uniform distribution of target points in the target compensation area is adopted to determine the r of each target point. i and z i , where the x, y, z coordinate spacing of adjacent target points is
[0119] Set the Fourier order of the stream function M and N to 4, and initialize the penalty weight coefficient α to 4.1822×10 -14 In the specific implementation process, it is necessary to try several sets of hyperparameter combinations and select the combination with good convergence and large decrease in the evaluation function. In this embodiment, f1(m,x) is selected In this type, f2(n,y) selects This type.
[0120] In step S2, the learning rate of vector P is η1 = 1 × 10 -4 , the weight coefficient of the first-order moment β1 = 0.9, the weight coefficient of the second-order moment β2 = 0.999, and the deviation correction parameter ε = 1×10 -8 After 100 iterations under the setting of , the minimum value of the second evaluation function E is 0.7945%. Compared with the value of 12.1672% of the second evaluation function E of the traditional target field method, it is significantly reduced, proving the effectiveness of this method.
[0121] The specific structure of the coil obtained in step S4 is as follows Figure 3 As shown, the blue and red loops represent clockwise and counterclockwise current directions, respectively.
[0122] This embodiment uses finite element analysis to solve the distribution of the compensation magnetic field generated by the dual-plane coil. Specifically, it includes:
[0123] A three-dimensional finite element model for the magnetic field analysis of the dual-plane coil is established to analyze the accuracy of the compensation magnetic field generated by the coil. The governing equation of the three-dimensional finite element model for magnetic field analysis is:
[0124]
[0125] in, is the Hamiltonian operator, μ0 is the vacuum permeability, A is the vector magnetic potential, and J is the current density in the conductor, which is equal to the external excitation current density J e , B is the magnetic flux density, σ is the vacuum conductivity, V is the potential, and the electric field intensity E c represents the Coulomb electric field component generated by the time-varying charge.
[0126] The x-direction magnetic field distribution in the target compensation area at x=-0.15m, 0m, and 0.15m planes obtained based on finite element magnetic field analysis is as follows Figure 4 As shown, there is a significant dB x / dz magnetic field gradient.
[0127] It is understandable that the detailed functional implementation of each of the above units / modules can be found in the introduction of the aforementioned method embodiment, and will not be repeated here.
[0128] It should be understood that the above-mentioned device is used to execute the method in the above-mentioned embodiment. The implementation principle and technical effect of the corresponding program module in the device are similar to those described in the above-mentioned method. The working process of the device can refer to the corresponding process in the above-mentioned method and will not be repeated here.
[0129] Based on the method in the above embodiment, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.
[0130] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.
[0131] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.
[0132] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.
[0133] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)).
[0134] It will be understood that the various numerical numbers involved in the embodiments of the present application are merely distinctions for the convenience of description and are not intended to limit the scope of the embodiments of the present application.
[0135] It is easy for those skilled in the art to understand that the above is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A method for determining the stream function of a magnetic field coil based on the target field method and Adam, characterized in that: The magnetic field coil is a dual-plane shim coil or a dual-plane gradient coil, and the method includes: S1. Use the target field method to solve the initial value of the control vector of the magnetic field coil structure; S2. Use the Adam algorithm to iteratively optimize the magnetic field coil structure control vector; S3. Solve the magnetic field coil stream function using the optimized magnetic field coil structure control vector; Step S1 is as follows: Use the least squares method to solve the coil structure control vector corresponding to the minimum value of the first evaluation function as the magnetic field coil structure control vector The initial value of The first evaluation function is used to measure the difference between the magnetic field / magnetic field gradient generated by the magnetic field coil and the expected value: in, is the heating power factor matrix of the magnetic field coil, is the penalty item weight coefficient; For the dual-plane shim coil, is the magnetic induction coefficient matrix generated by the trigonometric function terms of different orders of the magnetic field coil stream function, is a vector composed of the expected magnetic induction intensity values of the target point arranged in the order of distribution; For dual-plane gradient coils, is the magnetic induction intensity gradient coefficient matrix generated by the trigonometric function terms of different orders of the magnetic field coil stream function, It is a vector composed of the expected magnetic induction intensity gradient values of the target point arranged in the order of distribution.
2. The method according to claim 1, wherein For the dual-plane gradient coil, the magnetic induction intensity gradient coefficient matrix generated by the trigonometric function terms of different orders of the magnetic field coil stream function No. Rank The column elements are: in, is the vacuum permeability, is half the height of the magnetic field coil plane, is half the plane length of the magnetic field coil, is half the distance between the two coil planes, For the The coordinate vector of the target point, For the target points coordinate, are the coordinate vectors of the current source points on the two coil planes in the magnetic field coil, To find the distance between vectors, , are the stream functions of the magnetic field coil Direction and The type of trigonometric function terms of different orders in different directions is determined according to the direction of the compensation magnetic field generated by the desired magnetic field coil. , , , is the number of target points in the target compensation area, They are the triangular form of the magnetic field coil stream function and the Fourier expansion form respectively. Direction order, Direction order.
3. The method according to claim 1, wherein Step S2 includes: S21. Calculate the gradient vector of the second evaluation function for the magnetic field coil structure control vector, where the second evaluation function is used to evaluate the quality of each iteration result of the Adam algorithm; S22. Update the first-order moment and second-order moment of the second evaluation function with respect to the magnetic field coil structure control vector using the gradient vector; S23. Calculate the first-order moment and second-order moment vector after deviation correction; S24. Update the magnetic field coil structure control vector using the first-order moment and second-order moment vectors after the deviation correction; S25. Repeat the above operation until the iteration stop condition is met to obtain the optimized value of the magnetic field coil structure control vector.
4. The method according to claim 3, wherein The second evaluation function The details are as follows: in, is the two-norm of the vector.
5. The method according to claim 3, wherein The second evaluation function The details are as follows: in, is the magnetic flux density / magnetic flux density gradient generated by the actual coil at the target point, , is the coefficient matrix of the magnetic flux density / magnetic flux density gradient generated by the current in the magnet coil, is the magnetic field coil structure control vector, is a vector No. elements, for The average value of all elements in ; For a biplanar shim coil, The calculation formula is as follows: For dual-plane gradient coils, The calculation formula is as follows: in, All elements in the same row are equal. for Middle The value of the row element, is the vacuum permeability, is the number of closed streamlines of the magnet coil, For The curve integral of The first closed streamlines, is half the distance between the two coil planes, For the The coordinate vector of the target point, For the The z coordinate of the target point, are the coordinate vectors of the current source points on the two coil planes in the magnetic field coil, To find the distance between vectors, , The number of target points within the target compensation area.
6. The method according to claim 3, wherein The updating magnetic field coil structure control vector is specifically as follows: in, For the The control vector of the magnetic field coil structure after the iteration update No. elements, is the learning rate of the magnetic field coil structure control vector, For the The first-order moment after the iterative bias correction No. elements, For the The second-order moment after the iterative bias correction No. elements, For the The gradient vector of the second evaluation function of the magnetic field coil structure control vector is iterated. is a vector Multiply the corresponding elements, is the deviation correction constant, For the The first-order moment of the second evaluation function of the iteration about the control vector of the magnetic field coil structure is: For the The second moment of the second evaluation function of the iteration about the control vector of the magnetic field coil structure, are the weight coefficients of the first-order moment and the second-order moment, , They are the triangular form of the magnetic field coil stream function and the Fourier expansion form respectively. Direction order, Direction order.
7. The method according to claim 1, wherein Step S3 is specifically as follows: The types of trigonometric functions of different orders in the magnetic field coil stream function and the optimized control vector are integrated to determine the magnetic field coil stream function. : in, is the position coordinate of the midpoint of the coil plane, , The control vector for the optimized coil structure No. elements, is half the height of the magnetic field coil plane, is half the plane length of the magnetic field coil, , are the stream functions of the magnetic field coil Direction and The type of trigonometric function terms of different orders in different directions is determined according to the direction of the compensation magnetic field generated by the desired magnetic field coil. , , They are the triangular form of the magnetic field coil stream function and the Fourier expansion form respectively. Direction order, Direction order.
8. The method according to any one of claims 1 to 7, wherein: The method further includes: S4. determining the specific structure of the magnetic field coil based on the stream function of the magnetic field coil.
9. A system for determining the stream function of a magnetic field coil based on the target field method and Adam, characterized in that: comprising at least one processor and at least one memory; The at least one memory is configured to store computer instructions; The at least one processor is configured to execute at least part of the computer instructions to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Radio frequency coil methods and apparatus
CN107530026A