Design method of halbach active shimming coils based on cylindrical harmonics

CN122965397APending Publication Date: 2026-10-23CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611165493.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

核磁设备内部有效检测空间整体为圆柱形腔体,核磁采样管、样品容纳区域均沿轴向延伸,球谐函数仅能在腔体中心狭小球形范围内实现高精度磁场分解,球形区域之外的轴向大范围空间无法完成精准畸变表征,分解得到的谐波分量与腔体边缘磁场误差匹配度偏低,由此反演得到的匀场线圈仅能校正中心局部区域,腔体大部分轴向空间磁场均匀度无法达标,设备可利用检测空间被大幅压缩

Benefits of technology

[0028]本发明采用柱谐函数作为磁场分解基底,基底几何形态与核磁圆柱形腔体边界完全匹配,依托柱坐标拉普拉斯方程分离变量解构建正交完备谐波体系,能够对整个圆柱容积内全部空间点位的磁场畸变完成精准表征,不再局限于腔体中心狭小球形区域,腔体轴向延伸的样品容纳空间均可纳入匀场校正范围,设备内部可用检测空间能够得到充分利用,磁场均匀状态覆盖范围得到拓展。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122965397A_ABST
    Figure CN122965397A_ABST
Patent Text Reader

Abstract

The application discloses a design method of a halbach active shim coil based on a cylindrical harmonic function, relates to the technical field of nuclear magnetic resonance magnet shim coil design, and comprises the following steps: first, calibrating a cylindrical shim space and a boundary, and collecting original magnetic field data; second, constructing a cylindrical harmonic orthogonal decomposition base and decomposing the magnetic field to obtain a harmonic to be compensated; third, mapping the cylindrical coil to a two-dimensional wiring layout to manufacture a flexible coil through flow function inversion coil wiring; and fourth, simulating the compensated magnetic field after winding and assembling, and if the simulation result does not meet the standard, iteratively adjusting the harmonic order to redesign. The method matches the cylindrical cavity geometry, can expand the shim coverage range, and is suitable for the halbach nuclear magnetic magnet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of nuclear magnetic resonance magnet shimming coil design technology, and in particular to a design method for Halbach active shimming coils based on cylindrical harmonic functions. Background Technology

[0002] Nuclear magnetic resonance (NMR) spectroscopy equipment relies on a stable and uniform static magnetic field to perform non-destructive testing of materials. After the magnets are assembled, spatial magnetic field distortion naturally exists. The shimming process is a core element in ensuring the equipment's testing performance. Existing shimming methods are divided into passive and active shimming. Active shimming uses energized coils to generate a compensating magnetic field to counteract the non-uniform components of the magnetic field, enabling fine-tuning of the magnetic field and adapting to the needs of various scientific and medical NMR equipment. The wiring pattern and spatial arrangement of the shimming coils are derived from the magnetic field decomposition results. Traditional mainstream design approaches rely on spherical harmonic functions to decompose the spatial magnetic field. This mathematical tool is adapted to spherical calculation regions, and has inherent adaptation defects in the Halbach NMR cavity. The effective detection space inside the NMR equipment is a cylindrical cavity. The NMR sampling tube and sample holding area extend along the axis. The spherical harmonic function can only achieve high-precision magnetic field decomposition within a narrow spherical area in the center of the cavity. The large axial space outside the spherical area cannot complete accurate distortion characterization. The harmonic components obtained by decomposition have a low degree of matching with the magnetic field error at the edge of the cavity. As a result, the shimming coil obtained by inversion can only correct the local area in the center. The magnetic field uniformity in most of the axial space of the cavity cannot meet the standard, and the usable detection space of the equipment is greatly compressed.

[0003] When using spherical harmonic function decomposition, the radial, angular, and axial components of the three-dimensional magnetic field are coupled with each other. The decomposition calculation process requires a large number of iterative operations. To cover the distortion of the entire cylinder, a large number of high-order spherical harmonic terms need to be superimposed, resulting in a large overall computational scale and lengthening the early design cycle of the coil. At the same time, the coil wiring derived from the spherical harmonic function often has irregular and complex curved surface contours, making planar layout conversion difficult. The winding and forming process on flexible substrates is prone to wiring deformation, which places high demands on the precision of the manufacturing process. Conventional flexible circuit board processes cannot stably replicate complex coil trajectories, and the compensation magnetic field generated by the formed coil deviates significantly from the theoretical target.

[0004] The existing uniform field design process lacks a complete orthogonal basis system adapted to the cylindrical boundary, does not construct a complete harmonic decomposition scheme for the periodic boundary of the cylindrical coordinate, and cannot independently decouple and characterize the magnetic field error at any coordinate point within the complete cylindrical volume. The coil inversion process can only rely on local sampling data for derivation. The coil group matching is insufficient, a single group of coils is difficult to correspond to a single-dimensional magnetic field distortion, and multiple groups of coils are prone to mutual cancellation of magnetic fields and disordered compensation effects after being superimposed. The standardization and reproducibility of the entire design process are weak, and the coil schemes output by different designers are inconsistent, which is not conducive to the standardized development of coils for batch equipment. Summary of the Invention

[0005] The present invention proposes a design method for Halbach active shimming coils based on cylindrical harmonic functions to solve the problems mentioned in the prior art.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: a design method for a Halbach active shimming coil based on cylindrical harmonic functions, comprising the following steps:

[0007] S1 determines the target space and boundary constraints of the cylindrical shimming, calibrates the maximum radial radius and total axial length of the cylindrical shimming region inside the nuclear magnetic resonance magnet, sets the axial periodic boundary conditions in the cylindrical coordinate system, collects the three-dimensional spatial distribution data of the original non-uniform static magnetic field inside the magnet, and divides the discrete sampling grid to complete the numerical sampling of the global magnetic field.

[0008] S2 constructs a cylindrical harmonic orthogonal complete decomposition basis, generates a cylindrical harmonic series expansion expression that fits the periodic boundary conditions of the cylindrical domain, and establishes a one-to-one mapping relationship between orthogonal harmonic components and spatial magnetic field errors.

[0009] S3 original magnetic field column harmonic component decomposition, substitutes the non-uniform static magnetic field values ​​obtained by global sampling into the column harmonic series, solves the amplitude coefficients of each order of angular, axial and radial harmonics through orthogonal projection operation, and selects the correction harmonic terms whose amplitude exceeds the preset error threshold as the shimming compensation target.

[0010] The S4 scalar current function is used to invert the coil current distribution, establish the relationship between the magnetic moment and the scalar current function, substitute the amplitude coefficients corresponding to the target correction harmonics to solve the global current function distribution, and extract the current function contour lines as the basic routing profile of the shimming coil.

[0011] S5 planar routing layout mapping conversion maps the cylindrical 3D coil outline to a 2D plane through a cylindrical unfolding algorithm. Combined with rated operating current and process current density constraints, it calculates the copper trace width and trace safety spacing, and adds input / output pads, interlayer vias and alignment marks to generate flexible circuit board routing files.

[0012] S6 flexible coil physical processing and winding assembly, delivering wiring documents to manufacture flexible circuit board uniform field coils, which are spirally wound with uniform tension along the axial direction of the nuclear magnetic skeleton;

[0013] The S7 coil compensation magnetic field simulation verification involves importing the three-dimensional model of the physical coil into the magnetic field simulation platform, calculating the correction magnetic field generated by the coil, superimposing it onto the original static magnetic field, and then re-evaluating the uniformity of the magnetic field across the entire cylinder.

[0014] Furthermore, it also includes the steps for solving the axial periodic eigenvalues ​​of the cylinder.

[0015] ;

[0016] in For the axial first eigenvalues ​​of order 1, with dimensions of ; The order of the axial harmonics; It is the circumference constant; Let be the half-length of the axial direction of the uniform field region of the cylinder.

[0017] Furthermore, it also includes steps for solving the spatial magnetic field contribution of a single-source magnetic moment.

[0018] ;

[0019] in, The increment of the spatial magnetic field generated by the single infinitesimal element magnetic moment. The permeability of free space, Let the side length of the equivalent square of the infinitesimal element be . Let be the magnitude of the infinitesimal scalar stream function. For spatial gradient operators; It is the unit vector normal to the infinitesimal element; The coordinate vector of the spatial observation point; The coordinate vector of the infinitesimal source point.

[0020] Furthermore, in step S1, which determines the target space and boundary constraints of the cylindrical shimming region, the radial range of the cylindrical shimming region is from 0 to the calibrated maximum radius, and the axial range is from the negative half-length to the positive half-length. Periodic repetition constraints are set on the axial boundary. The original magnetic field sampling grid is uniformly and discretely divided along the radial, angular, and axial directions, and the grid size is less than half of the spatial period corresponding to the minimum corrected harmonic. The sampling data is stored in a three-dimensional matrix format. After sampling, abnormal sampling points with boundary magnetic field distortion are removed, and neighborhood mean smoothing is used to complete the sampling data preprocessing.

[0021] Furthermore, in the S2 step of constructing the cylindrical harmonic orthogonal complete decomposition basis, the angular equations are periodic. The trigonometric function solution retains only the integer order angular harmonic components; the axial solution is configured with zero-order constant solution and higher-order trigonometric function solution; the radial solution is constructed according to the axial order, and the bounded power function solution and the modified Bessel function bounded solution of Euler equation are constructed respectively, and the second kind of modified Bessel function diverging at the axis is eliminated; the cylindrical harmonic series is obtained by superimposing all angular, axial and radial solutions, and the harmonic components of each order in the series are mutually orthogonal.

[0022] Furthermore, in the S3 original magnetic field column harmonic component decomposition step, the projection integral formula is constructed using the orthogonal characteristics of the column harmonic function. The harmonic amplitude coefficients are solved step by step for the three-dimensional sampled magnetic field. The harmonics are sorted from high to low according to the absolute value of the amplitude. A fixed error threshold is set, and only the harmonics with amplitudes higher than the threshold are retained as components to be compensated. The weak magnetic field distortions with amplitudes lower than the threshold are directly discarded.

[0023] Furthermore, in the S4 scalar current function inversion coil current distribution step, the coil thickness parameter is set to derive the linear correspondence between the surface equivalent magnetization and the scalar current function. The discrete coil micro-element is equivalent to a point magnetic moment unit, and the equation system is established by substituting it into the single-source magnetic field contribution formula. The global current function value is solved with the target harmonic amplitude as a constraint. The contour line with the same value of the current function is extracted as the single-turn coil routing path. Multiple harmonics correspond to multiple sets of independent closed routing profiles, and each set of coil routings is isolated from each other without crossing or overlapping.

[0024] Furthermore, in the S5 planar routing layout mapping and conversion step, a cylindrical equidistant expansion transformation is used to convert the three-dimensional cylindrical closed curve into a two-dimensional planar closed curve. The copper conductor trace width is calculated based on the coil's rated continuous current and the substrate's allowable current density. The spacing between adjacent traces meets the high-voltage insulation creepage process standards. Metallized vias are added at corresponding positions of multiple series-connected coils to achieve interlayer conductivity. Figure 4 The corner is set with a cross-shaped alignment mark for subsequent multi-layer winding alignment.

[0025] Furthermore, in the S6 flexible coil physical processing and winding assembly steps, the flexible circuit board substrate is selected as a low dielectric and low magnetic permeability insulating film, the copper conductor surface is treated with an anti-oxidation plating layer, the cut coil is wound at a constant speed along the nuclear magnetic tube skeleton, and a constant tensile tension is maintained throughout the process. The inner surface of the coil is completely attached to the outer wall of the skeleton without bubbles or wrinkles. The winding end is fixed with high temperature resistant insulating tape, and thick-diameter multi-strand wires are led out from both ends of the wiring as external current input leads. The solder joints are coated with insulating protective glue.

[0026] Furthermore, in the S7 coil compensation magnetic field simulation verification step, the three-dimensional winding model of the flexible coil is imported into the static magnetic field finite element simulation software, the design rated current is input to solve the coil global compensation magnetic field, the compensation magnetic field is superimposed with the original non-uniform static magnetic field vector, and the magnetic field uniformity is calculated along multiple sampling lines in the radial and axial directions of the cylinder. If the global uniformity does not meet the equipment calibration index, the number of higher-order harmonics in the cylinder harmonic decomposition is increased and all steps from S3 to S6 are repeated.

[0027] Compared with existing technologies, the beneficial effects of this invention are:

[0028] This invention uses cylindrical harmonic functions as the basis for magnetic field decomposition. The geometry of the basis is perfectly matched with the boundary of the cylindrical cavity of the nuclear magnetic resonance system. Based on the cylindrical coordinate Laplace equation, an orthogonal complete harmonic system is constructed by separating variables. This system can accurately characterize the magnetic field distortion at all spatial points within the entire cylindrical volume, no longer limited to the narrow spherical region at the center of the cavity. The sample accommodating space extending axially from the cavity can be included in the shimming correction range. The usable detection space inside the device can be fully utilized, and the coverage of the magnetic field uniformity state is expanded.

[0029] The cylindrical harmonic function uses the separation of variables method to decompose the three-dimensional coupled magnetic field into three independent components: radial, angular, and axial. Harmonics in each dimension do not interfere with each other, and a single-order harmonic corresponds to only a single type of spatial magnetic field distortion. During coil inversion, each set of traces is used only to cancel the corresponding single harmonic component. Superimposing multiple sets of coils does not result in mutual cancellation of compensating magnetic fields. The coil grouping logic is clear, and the matching degree of magnetic field correction is better. The orthogonal decomposition characteristic can filter out and directly discard low-impact distortion components with weak amplitudes, reducing the number of harmonics participating in coil inversion, thus reducing the overall computational load and shortening the time spent on early coil design.

[0030] Based on solving the scalar stream function using cylindrical harmonic series, the coil trace path is directly obtained by relying on the stream function contour lines. The generated trace outline is regular and can be easily converted into a standard two-dimensional planar wiring layout through cylindrical equidistant expansion mapping. Process parameters such as trace width, pads, and vias can be uniformly and standardized, adapting to conventional flexible circuit board mass production processes. The trace deformation is less likely to occur during coil processing, and the compensation magnetic field generated by the coil after molding has a smaller deviation from the theoretical design, reducing the performance loss caused by the molding process.

[0031] The entire design process forms a standardized closed-loop system. From spatial boundary calibration, magnetic field sampling, harmonic decomposition, coil inversion to physical fabrication and simulation verification, all steps have unified execution standards. Different operators can output uniform field coil schemes with similar performance by following the same process, resulting in stronger reproducibility. The simulation iteration mechanism can intuitively judge the uniformity of the global magnetic field during the verification stage. If the correction effect does not meet the equipment usage conditions, the harmonic order can be directly adjusted and the design iterated again without rebuilding the mathematical framework for magnetic field decomposition. The scheme is easy to adjust and adaptable to various cylindrical NMR cavities with different inner diameters and axial lengths, offering better universal adaptability. Attached Figure Description

[0032] Figure 1 This is a flowchart of the overall design method of Halbach active shimming coil based on cylindrical harmonic functions proposed in this invention.

[0033] Figure 2 This is a flowchart of the uniform field space definition and substrate construction process of the present invention;

[0034] Figure 3 This is a flowchart of the magnetic field column harmonic decomposition and stream function inversion of the present invention;

[0035] Figure 4 This is a flowchart illustrating the planar layout conversion and flexible coil processing of the present invention.

[0036] Figure 5 An example diagram of the winding method of the shimming coil can be obtained for drawing the shimming coil of the present invention. Detailed Implementation

[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0038] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0039] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified. Furthermore, the terms "installed," "connected," and "linked" should be interpreted broadly; for example, they may refer to a fixed connection, a detachable connection, or an integral connection; they may refer to a mechanical connection or an electrical connection; they may refer to a direct connection or an indirect connection through an intermediate medium; and they may refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances. The invention will now be described in further detail with reference to the accompanying drawings.

[0040] Reference Figures 1 to 5 The design method of Halbach active shimming coil based on cylindrical harmonic functions includes the following steps:

[0041] S1 determines the target space and boundary constraints of the cylindrical shimming, calibrates the maximum radial radius and total axial length of the cylindrical shimming region inside the nuclear magnetic resonance magnet, sets the axial periodic boundary conditions in the cylindrical coordinate system, collects the three-dimensional spatial distribution data of the original non-uniform static magnetic field inside the magnet, and divides the discrete sampling grid to complete the numerical sampling of the global magnetic field.

[0042] S2 constructs a complete orthogonal decomposition basis for cylindrical harmonics. Using the solution of the Laplace equation in cylindrical coordinates with the separation of variables as the basis for cylindrical harmonic functions, the independent eigensols in the angular, axial, and radial directions are derived respectively. The complete cylindrical harmonic series expansion expression that satisfies the periodic boundary conditions in the cylindrical domain is obtained by combining them. A one-to-one mapping relationship between orthogonal harmonic components and spatial magnetic field errors is established.

[0043] S3 original magnetic field column harmonic component decomposition, substitutes the non-uniform static magnetic field value obtained by global sampling into the column harmonic series, and separates the amplitude coefficients corresponding to each order of angular, axial and radial harmonics through orthogonal projection operation, and selects the target correction harmonic term whose amplitude exceeds the preset error threshold as the shimming compensation target.

[0044] The S4 scalar current function is used to invert the coil current distribution, establish the relationship between the magnetic moment and the scalar current function, substitute the amplitude coefficients corresponding to the target correction harmonics to solve the global current function distribution, and extract the current function contour lines as the basic routing profile of the shimming coil.

[0045] S5 planar routing layout mapping conversion maps the cylindrical 3D coil outline to a 2D plane through a cylindrical unfolding algorithm. Combined with rated operating current and process current density constraints, it calculates the copper trace width and trace safety spacing, and adds input / output pads, interlayer vias and alignment marks to generate flexible circuit board routing files.

[0046] The S6 flexible coil physical processing and winding assembly, the wiring documents are delivered to the manufacturer to obtain the flexible circuit board uniform field coil, and the coil is wound with uniform tension spiral along the axial direction of the nuclear magnetic skeleton to complete the lead wire welding and surface fixation.

[0047] The S7 coil compensation magnetic field simulation verification involves importing the three-dimensional model of the physical coil into the magnetic field simulation platform, calculating the correction magnetic field generated by the coil, superimposing it onto the original static magnetic field, and re-evaluating the uniformity of the cylinder's global magnetic field. If the uniformity does not meet the standard, the order of the cylinder's harmonic wave is adjusted, and the decomposition and inversion process is repeated until the index is met.

[0048] This invention also includes a step for solving the axial periodic eigenvalues ​​of the cylinder.

[0049] ;

[0050] in For the axial first eigenvalues ​​of order 1, with dimensions of ; is the axial harmonic order, which is dimensionless; It is the circumference constant; Let be the half-length of the cylindrical uniform field region along its axial direction, with dimensions of . By relying on axial periodic boundary constraints, all discrete axial intrinsic parameters are determined, providing input variables for the radially modified Bessel equation, and realizing the dimensional decoupling and splitting of the three-dimensional magnetic field.

[0051] This invention also includes a step for solving the spatial magnetic field contribution of a single-source magnetic moment.

[0052] ;

[0053] in, The increment of the spatial magnetic field generated by the single infinitesimal magnetic moment is in the dimension of T; The vacuum permeability has dimensions of H / m; Let be the side length of the square equivalent to the infinitesimal element, with dimensions in m; The magnitude of the infinitesimal scalar stream function is dimensionless. For spatial gradient operators; It is the unit vector normal to the infinitesimal element; The coordinate vector of the spatial observation point; Using the coordinate vector of the infinitesimal source point, a direct quantitative correlation is established between the stream function value and the spatial compensation magnetic field, enabling accurate reverse calculation of the coil trace profile.

[0054] In this invention, in step S1, which determines the target space and boundary constraints of the cylindrical shimming region, the radial range of the cylindrical shimming region is set from 0 to the calibrated maximum radius, and the axial interval is set from the negative half-length to the positive half-length. The axial boundary satisfies the periodic repetition constraint. The original magnetic field sampling grid is uniformly and discretely divided along the radial, angular, and axial directions. The grid size is less than half of the spatial period corresponding to the minimum corrected harmonic. The sampled data is stored in the form of a three-dimensional matrix. After sampling, abnormal sampling points with magnetic field distortion in the boundary region are removed. Neighborhood mean smoothing is used to complete the preprocessing of the sampled data, reducing the interference of sampling noise on the accuracy of subsequent cylindrical harmonic decomposition.

[0055] In this invention, in the step of constructing the cylindrical harmonic orthogonal complete decomposition basis in S2, the angular equations take trigonometric function solutions with a period of twice the circumference, retaining only integer-order angular harmonic components. The axial direction distinguishes between zero-order constant solutions and higher-order trigonometric function solutions. The radial direction constructs bounded power function solutions and modified Bessel function bounded solutions of the Euler equations according to the axial order, discarding the second-type modified Bessel function diverging at the axis. All angular, axial, and radial solutions are combined into a complete cylindrical harmonic series through the superposition principle. The harmonic components of each order within the series are mutually orthogonal. Any magnetic field distribution in the cylindrical domain that satisfies the Laplace equation can be characterized by linear fitting of this series.

[0056] In this invention, in the S3 original magnetic field column harmonic component decomposition step, the projection integral formula is constructed using the orthogonal characteristics of the column harmonic function. The harmonic amplitude coefficients are solved step by step for the three-dimensional sampled magnetic field. The harmonics are sorted from high to low according to the absolute value of the amplitude. A fixed error threshold is set, and only the harmonics with amplitudes higher than the threshold are retained as components to be compensated. The weak magnetic field distortions with amplitudes lower than the threshold are directly discarded, reducing the amount of calculation for subsequent coil inversion and shortening the overall design calculation time.

[0057] In this invention, in the S4 scalar current function inversion coil current distribution step, the coil thickness parameter is set to derive the linear correspondence between the surface equivalent magnetization and the scalar current function. The discrete coil micro-element is equivalent to a point magnetic moment unit, and the equation system is established by substituting it into the single-source magnetic field contribution formula. The global current function value is solved with the target harmonic amplitude as a constraint. The contour line with the same value of the current function is extracted as the single-turn coil routing path. Multiple harmonics correspond to multiple sets of independent closed routing profiles, and each set of coil routings is isolated from each other without crossing or overlapping.

[0058] In this invention, during the S5 planar wiring layout mapping and conversion step, a cylindrical equidistant expansion transformation is used to convert a three-dimensional cylindrical closed curve into a two-dimensional planar closed curve. The copper conductor trace width is calculated based on the coil's rated continuous current and the substrate's allowable current density. The spacing between adjacent traces meets the high-voltage insulation creepage process standards. Metallized vias are added at corresponding positions of multiple sets of series-connected coils to achieve interlayer conductivity. Figure 4 The corner is set with a cross-shaped alignment mark for subsequent multi-layer winding alignment. All trace outlines, pads, and vias are exported as standardized flexible circuit board design files.

[0059] In this invention, during the S6 flexible coil physical processing and winding assembly steps, the flexible circuit board substrate is selected as a low dielectric and low magnetic permeability insulating film, the copper conductor surface is treated with an anti-oxidation plating layer, the cut coil is wound at a constant speed along the nuclear magnetic tube skeleton, and a constant tensile tension is maintained throughout the process. The inner surface of the coil is completely attached to the outer wall of the skeleton without bubbles or wrinkles. The winding end is fixed with high temperature resistant insulating tape, and thick-diameter multi-strand wires are led out from both ends of the wiring as external current input leads. Insulating protective glue is applied to the solder joints to avoid short circuit faults.

[0060] In this invention, in the S7 coil compensation magnetic field simulation verification step, the three-dimensional winding model of the flexible coil is imported into the static magnetic field finite element simulation software, the design rated current is input to solve the coil global compensation magnetic field, the compensation magnetic field is superimposed with the original non-uniform static magnetic field vector, and the magnetic field uniformity is calculated along multiple sampling lines in the radial and axial directions of the cylinder. If the global uniformity does not meet the equipment calibration index, the number of higher-order harmonics in the cylinder harmonic decomposition is increased and all steps from S3 to S6 are repeated until the overall magnetic field uniformity inside the cylinder after superposition meets the standard for use of nuclear magnetic resonance equipment.

[0061] This embodiment uses a cylindrical inner cavity radius of 5mm and a total axial length of 20mm (half axial length). Using a 10mm nuclear magnetic resonance magnet shimming space as the implementation carrier, all steps are executed completely. The process fully incorporates all cylindrical harmonic derivation formulas and magnetic moment magnetic field solution formulas recorded in the disclosure. Based on the orthogonal decomposition of cylindrical harmonics, the design of an active shimming coil in a full cylindrical space is realized. The entire process covers magnetic field sampling, cylindrical harmonic substrate construction, harmonic decomposition, stream function inversion, layout conversion, physical fabrication, and simulation verification. The entire design scheme can be directly reproduced.

[0062] S1: Determine the target space and boundary constraints of the cylindrical shimming field, and collect the original magnetic field sampling data.

[0063] First, calibrate the geometric parameters of the target uniform cylindrical region, with radial values ​​ranging from 0 to 0. ≤5mm, axial range- ≤ ≤ That is, -10mm≤ ≤10mm, apply periodic boundary conditions axially. A three-dimensional magnetic field scanning platform was constructed, and discrete sampling grids were uniformly divided along the radial, angular, and axial directions. The grid step size was 0.5 mm, which is less than half of the spatial period of the lowest harmonic, to completely acquire the original non-uniform static magnetic field of the entire internal cavity of the cylinder. Three-dimensional numerical matrix. After sampling, a neighborhood three-point mean smoothing algorithm is used to remove abnormal sampling points caused by sensor noise and cavity boundary distortion, thus completing the sampling data preprocessing and eliminating the interference of stray data on the accuracy of subsequent harmonic decomposition. The preprocessed three-dimensional magnetic field matrix is ​​used as the input data for subsequent cylinder harmonic decomposition.

[0064] S2: Construct a complete orthogonal decomposition basis for column harmonics and derive the complete set of column harmonic equations.

[0065] cylindrical coordinate system The derivation is based on the lower Laplace equation, and the fundamental equation is:

[0066] ;

[0067] Use the method of separation of variables to define the general solution Substituting the values ​​into the equation, we obtain three sets of independent ordinary differential equations: angular, axial, and radial. The first step is to solve the angular equation:

[0068] ;

[0069] Combined with angle period constraint, Taking positive integers, the general solution in the angular direction is: The second step is to solve the axial equations. The axial governing equations are: Substituting the axial periodic boundary conditions, we use the axial eigenvalue formula:

[0070] ;

[0071] In the formula For the axial first eigenvalues, dimensions ; is the axial harmonic order, which is dimensionless; It is the circumference constant; Let be the half-length of the cylindrical uniform field region along its axial direction, with dimensions _____. . When = 0, the axial solution is a constant. ; When ≥1, the axial solution is The third step is to derive the radial equation, which will... Substituting the values, we obtain the modified Bessel-type radial equation:

[0072] ;

[0073] The magnetic field at point = 0 must be finite, so the second-type modified Bessel function is discarded, and only the first-type modified Bessel solution is retained. ; When = 0, it degenerates into the Euler equation, and the bounded solution is: Superimposing the independent solutions of all dimensions yields the complete cylindrical harmonic series of the cylindrical domain:

[0074] ;

[0075] Within the formula The series consists of the amplitude coefficients of each order cylindrical harmonic component, and the entire series is in the cylindrical... The region is orthogonally complete, and any magnetic field distribution inside the cylinder can be linearly fitted.

[0076] S3: Decomposition of original magnetic field column harmonic components, screening of harmonic terms to be compensated.

[0077] Substituting the preprocessed three-dimensional discrete magnetic field data from S1 into the cylindrical harmonic series, and relying on the orthogonality of functions to construct the projection integral, the entire series is solved step by step. The corresponding amplitude coefficients are set. An amplitude error threshold is established, and only harmonics with absolute coefficient values ​​exceeding the threshold are retained as target harmonics to be corrected. Low-amplitude, weakly distorted harmonics are directly discarded to reduce the scale of subsequent coil inversion calculations. Each order of harmonics to be compensated corresponds to a set of anti-phase magnetic field components that need to be canceled, and each component is independently equipped with a set of active shimming coils.

[0078] S4: Scalar current function inversion to determine coil current distribution; substitute into the magnetic moment and magnetic field solution formula.

[0079] Setting the coil film thickness The surface equivalent magnetization and the scalar flow function satisfy... The equivalent square side length of the coil element Single-element magnetic moment Introducing the formula for the contribution of a single-source magnetic moment to the spatial magnetic field:

[0080] ;

[0081] In the formula denoted as T, representing the increment of the spatial magnetic field generated by the single infinitesimal magnetic moment. Permeability of free space, dimensionless, H / m; Let be the side length of the square equivalent to the infinitesimal element, with dimensions m; The magnitude of the infinitesimal scalar stream function is dimensionless. For spatial gradient operators; It is the unit vector normal to the infinitesimal element; The coordinate vector of the spatial observation point; Let be the coordinate vector of the infinitesimal source point. Using the target magnetic fields of each harmonic order selected by S3 as constraints, establish a system of equations and solve for the global scalar stream function. Contour lines with the same stream function value are extracted as the three-dimensional cylindrical routing paths for a single set of uniform field coils. The contour lines corresponding to different harmonics are isolated from each other and do not overlap, forming multiple independent coil windings. Simultaneously, the magnetic field output matching degree of a single-turn coil is verified using the integral formula of the circular arc current-carrying magnetic field.

[0082] ;

[0083] In the formula For a single-turn current-carrying coil, the integral result is used to verify whether the coil generated by the flow function contour lines can produce a corresponding order of compensating magnetic field.

[0084] S5: Planar Routing Layout Mapping Conversion

[0085] The cylindrical 3D closed coil profile obtained from S4 is subjected to cylindrical isometric unfolding transformation, mapping all 3D curves to a 2D plane. Each group of coils corresponds to an independent closed-plane trace. The copper conductor trace width is calculated based on the coil's rated continuous operating current and the allowable current density of the flexible substrate. The spacing between adjacent traces meets the insulation creepage process standards. Metallized vias are added at the interlayer conduction locations of multiple series-connected coils. Figure 4 Add crosshair alignment marks at the corners for multi-layer winding alignment, design rectangular current input and output pads at the beginning and end of the coil traces, and integrate all traces, vias, marks, and pads to generate standardized flexible circuit board (FPC) design files.

[0086] S6: Flexible coil physical processing and winding assembly

[0087] A low-permeability, low-dielectric-constant insulating film was selected as the FPC substrate. The copper conductor surface underwent anti-oxidation tin plating treatment. Based on the design documents, circuit etching, via metallization, and shape cutting were completed to obtain a single-piece uniform field flexible coil. The coil was wound at a constant speed along the axial direction of the nuclear magnetic resonance cylindrical skeleton, maintaining constant tensile tension throughout the process. The inner surface of the coil film was completely adhered to the outer wall of the skeleton without bubbles or wrinkles. After winding, high-temperature resistant insulating tape was used to fix the beginning and end edges of the film. The layout pads were then soldered to the thick-diameter multi-strand leads, and the solder joints were coated with insulating protective adhesive to prevent short circuits.

[0088] S7: Simulation Verification and Iterative Optimization of Coil Compensation Magnetic Field

[0089] The three-dimensional solid model of the wound flexible coil is imported into the static magnetic field finite element simulation platform. The designed rated current is input into the coil, and the compensation magnetic field generated by the coil is solved globally using the aforementioned circular arc magnetic field integral formula and magnetic moment magnetic field solution formula. The compensation magnetic field vector is superimposed onto the original non-uniform static magnetic field acquired in S1, and the uniformity of the superimposed magnetic field is calculated along multiple characteristic straight lines in the radial and axial directions of the cylinder. If the global magnetic field uniformity does not meet the calibration index of the nuclear magnetic resonance equipment, the highest order of cylinder harmonic decomposition is increased, and the entire process of harmonic screening (S3), stream function inversion (S4), layout design (S5), and coil fabrication (S6) is repeated for simulation verification until the magnetic field uniformity of the entire inner cavity of the cylinder meets the equipment usage standards.

[0090] The entire implementation process relies on the orthogonal and complete decomposition characteristics of cylindrical harmonic functions. Unlike traditional spherical harmonic functions, which can only achieve shimming in small spherical regions, this scheme fully utilizes the complete set of analytical formulas for cylindrical harmonics under axial periodic boundaries. It completes the decomposition of magnetic field distortion and the reverse design of shimming coils within a complete cylindrical volume. The stream function is combined with the magnetic moment and magnetic field equations to accurately invert the coil routing. The flexible circuit board processing scheme is adapted to the cylindrical skeleton winding assembly. The simulation iteration mechanism ensures the final shimming effect. The entire process is reproducible and the parameters are quantified, making it suitable for the batch design of active shimming coils for Halbach nuclear magnetic resonance magnets.

[0091] This invention presents a design method for Halbach active shimming coils based on cylindrical harmonic functions. It is adapted to the development of active shimming in the internal cavity of Halbach NMR magnets and fully covers the entire process of magnetic field calibration, cylindrical harmonic basis derivation, harmonic decomposition, stream function inversion, planar layout conversion, flexible coil fabrication, and simulation iteration. Two sets of implementation methods are adapted to two types of cylindrical cavities: small benchtop NMR and large research NMR. All mathematical formulas are fully included in the disclosure, each engineering operation is detailed, and a comparative data table is provided to intuitively demonstrate the advantages of the solution.

[0092] Example 1: Design of a Small Desktop NMR Shim Coil

[0093] This embodiment is adapted to a desktop MRI machine, with a maximum radial radius of 5mm and an axial half-length of the cylindrical homogenizing cavity. =10mm, the overall axial range is -10mm to 10mm, a flexible thin film coil is used as the active field carrier, all design steps from S1 to S7 are fully executed, and all column harmonic, magnetic moment and circular arc magnetic field formulas are fully substituted into the calculation.

[0094] S1: Determine the target space and boundary constraints for the cylindrical uniform field; define the computational domain of the cylinder (0≤...). ≤5mm, - ≤ ≤ Apply periodic boundary conditions axially

[0095] ;

[0096] A three-dimensional magnetic field scanning device was constructed, and discrete sampling grids were uniformly divided along the radial, angular, and axial directions, with a grid step size of 0.5 mm, which is less than half the spatial period of the lowest-order harmonic. The original static magnetic field was collected over the entire domain. A three-dimensional discrete numerical matrix is ​​generated. After data acquisition, a neighborhood three-point mean smoothing algorithm is used to remove sensor noise and cavity edge distortion data, as well as single-point abrupt change abnormal sampling points. This completes the magnetic field data preprocessing, and outputs a regular three-dimensional magnetic field matrix as the decomposition input.

[0097] S2: Constructing a cylindrical harmonic orthogonal complete decomposition basis using the Laplace fundamental equations in cylindrical coordinates:

[0098] ;

[0099] Define the general solution with separate variables Decompose the equations into three independent sets. Angular governing equations:

[0100] ;

[0101] Combination Periodic constraints Take non-negative integers, angular general solution Axial governing equations Substituting the axial periodic constraint, the axial eigenvalue formula is used:

[0102] ;

[0103] In the formula For the axial first eigenvalues, dimensions ; is the axial harmonic order, which is dimensionless; It is the circumference constant; Let be the axial half-length of the uniform field region of the cylinder, dimensionless (m). The axial solution is a constant when k=0. ; Axial solution when ≥1 .Will Substituting the equations, we obtain the radially modified Bessel equation:

[0104] ;

[0105] axis The magnetic field at =0 must be finite, so the modified Bessel function of the second kind is discarded, and only the [missing information] is retained. ; When the equation equals 0, it degenerates into the Euler equation, which has a bounded solution. Superimposing solutions across all dimensions yields the global cylindrical harmonic complete series:

[0106] ;

[0107] The harmonics within the series are mutually orthogonal, and any magnetic field distribution inside the cylinder can be characterized by linear fitting.

[0108] S3: The original magnetic field cylindrical harmonic component decomposition substitutes the preprocessed three-dimensional magnetic field matrix into the cylindrical harmonic series and solves the problem step by step using orthogonal integration. Amplitude coefficients are set, and an amplitude judgment threshold is set. Only harmonics with an absolute value of coefficients higher than the threshold are retained as targets to be corrected. Low-amplitude weak distortion components are directly discarded to reduce the amount of subsequent inversion calculations. Each group of harmonics to be compensated corresponds to an independent set of uniform windings.

[0109] S4: Scalar current function inversion to determine coil current distribution and set coil film thickness. The magnetization intensity and the stream function satisfy The equivalent square side length of the coil element Single-element magnetic moment Introducing the formula for solving the magnetic field of a single-source magnetic moment:

[0110] ;

[0111] In the formula denoted as T, representing the increment of the spatial magnetic field generated by the single infinitesimal magnetic moment. Permeability of free space, dimensionless, H / m; Let be the side length of the square equivalent to the infinitesimal element, with dimensions m; The magnitude of the infinitesimal scalar stream function is dimensionless. For spatial gradient operators; It is the unit vector normal to the infinitesimal element; The coordinate vector of the spatial observation point; Let be the coordinate vector of the infinitesimal source point. Establish a system of equations using the amplitudes of each target harmonic, and solve for the scalar stream function globally. The contour lines of the same stream function are extracted as the single-turn closed trace path. The magnetic field output of the single-turn coil is verified using the circular arc current-carrying integral formula.

[0112] ;

[0113] Multiple harmonics correspond to multiple sets of isolated traces, and the coils in each set do not cross or overlap.

[0114] S5: The planar routing layout mapping conversion uses cylindrical equidistant expansion transformation to map three-dimensional cylindrical closed curves into two-dimensional planar closed traces. The copper conductor trace width is calculated based on the equipment's rated continuous current and the thin-film allowable current density. The spacing between adjacent traces meets insulation creepage process standards. Metallized vias are placed at the corresponding positions of series coils. Figure 4Cross-shaped alignment marks are set at the corners, rectangular current pads are designed at the beginning and end of the traces, and all graphics are integrated to output standardized flexible circuit board design files.

[0115] S6: The flexible coil physical processing and winding assembly uses a low-dielectric, low-permeability insulating film as the substrate. The copper conductor surface is plated with an anti-oxidation metal layer. Etching, via metallization, and shape cutting are completed according to the layout file. The film is spirally wound at a uniform speed along the NMR skeleton, maintaining constant tensile tension throughout the process. The inner wall of the film is completely adhered to the skeleton without bubbles or wrinkles. The two ends of the winding are fixed with high-temperature resistant insulating tape. The pads are soldered to the multi-strand thick wires, and the solder joints are coated with insulating protective glue.

[0116] S7: Coil Compensation Magnetic Field Simulation Verification. Import the 3D model of the wound coil into the static magnetic field simulation platform, input the rated operating current, and use the magnetic moment magnetic field and circular arc integral formulas to solve the compensation magnetic field across the entire domain. Superimpose the compensation magnetic field vector onto the original static magnetic field, and calculate the uniformity of the entire magnetic field along multiple sampling lines in the radial and axial directions. If the uniformity does not meet the specifications of the benchtop NMR equipment, increase the highest order of column harmonic decomposition and repeat the S3 to S6 process iterative optimization until the equipment usage standards are met.

[0117] Table 1: Comparison of the homogenization effect of small desktop NMR spectrometers

[0118] Traditional spherical harmonic design Central spherical narrow area 2mm axial High This embodiment features column harmonic design. Complete cylindrical cavity 20mm axial Low

[0119] As shown in Table 1, traditional spherical harmonic decomposition schemes can only cover a very small spherical area at the center of the cavity, have a short axially correctable distance, cannot eliminate magnetic field distortion at both ends of the cavity, and have a large overall magnetic field uniformity deviation. This embodiment relies on the complete matching of the cylindrical boundary by the cylindrical harmonic orthogonal series, enabling full-domain magnetic field distortion decomposition and correction. The axially correctable range covers the entire NMR sample containment area, and magnetic field distortion at both ends of the cavity can be synchronously canceled, improving the magnetic field uniformity deviation. Simultaneously, variable separation and decoupling reduce the computational cost of iterative calculations, the coil traces are more regular, facilitating thin-film fabrication, and the entire process is more standardized. This allows for stable reproduction of shimming performance during the mass development of small benchtop NMR systems.

[0120] Example 2: Design of a Large-Scale Scientific Nuclear Magnetic Field Homogenizing Coil

[0121] This embodiment is adapted to research-grade nuclear magnetic resonance equipment, with a maximum radial radius of 15mm and an axial half-length of the cylindrical uniform field cavity. =50mm, axial range -50mm to 50mm, multi-layer flexible thin film stacked as active field homogenizer, fully reuse all cylindrical harmonic, magnetic moment and circular arc magnetic field calculation formulas, refine the large-size cavity adaptation optimization steps, and adapt parameters to large-diameter long axial cylindrical space.

[0122] S1: Determine the target space and boundary constraints for the cylindrical uniform field; define the computational domain of the cylinder 0≤ ≤15mm, -50mm≤ ≤50mm, axial direction follows periodic boundary conditions:

[0123] ;

[0124] The sampling range of the three-dimensional magnetic field scanning was expanded, and the grid step size was adjusted to 1 mm, while still meeting the requirement of being less than half the spatial period of the lowest harmonic. The original three-dimensional numerical matrix of the static magnetic field of the entire large-aperture cavity was completely acquired. A five-point neighborhood mean smoothing algorithm was used to process the sampled data. Since there are more distortion points at the boundary of the large cavity, the outlier removal window was expanded. After data preprocessing, a high-precision three-dimensional magnetic field matrix was output for cylinder harmonic decomposition.

[0125] S2: Constructing a cylindrical harmonic orthogonal complete decomposition basis using the Laplace fundamental equations in cylindrical coordinates:

[0126] ;

[0127] Separate variables The three sets of independent equations are derived step by step. Angular governing equations:

[0128] ;

[0129] Take non-negative integers, angular general solution Axial governing equations Substitute the axial half-length =50mm Calculation of axial eigenvalues

[0130] ;

[0131] When = 0, the axial solution is a constant. ; Axial solution when ≥1 Radial modified Bessel equations:

[0132] ;

[0133] Discard the second-type modified Bessel function with divergent axes, and retain... ; When = 0, there is a radially bounded solution. Combining all dimensional components yields the complete cylindrical harmonic series for large cavity adaptation:

[0134] ;

[0135] Long-axis cavities require expansion of the highest harmonic order, and the completeness of the order ensures that low-frequency distortion at both ends of the cavity can still be accurately characterized.

[0136] S3: The original magnetic field column harmonic component decomposition substitutes the three-dimensional magnetic field matrix of the large cavity into the column harmonic orthogonal integral to solve for all order amplitude coefficients. The amplitude judgment threshold is appropriately lowered. The long-axis cavity has more low-frequency distortion components, and more low-order harmonics are retained for magnetic field correction at both ends of the cavity. Each group of harmonics independently generates a set of isolation uniform windings, and multi-layer thin films carry coils of different orders.

[0137] S4: Scalar current function inversion coil current distribution maintains thin film thickness parameters constant; relationship between magnetization and current function. Infinite element magnetic moment Substituting the magnetic moment into the formula for solving the spatial magnetic field:

[0138] ;

[0139] A system of equations was constructed using the amplitudes of multiple harmonics to solve for the global stream function, and contour lines were used to extract the traces of multiple independent coils. The magnetic field output of a long-axis single-turn coil was verified using the circular arc current-carrying integral formula.

[0140] ;

[0141] Multi-layer traces do not overlap, and series connection between layers is achieved through vias.

[0142] S5: The planar routing layout is mapped and transformed into a two-dimensional multi-layer planar layout by expanding the three-dimensional cylindrical curve of the large cavity coil through equal-distance cylindrical expansion. The copper trace width is widened according to the high current operating conditions, the insulation spacing between adjacent traces is enlarged, alignment marks are set for each multi-layer layout, metallized vias are uniformly arranged at the inter-layer conduction positions, and current input and output pads are set independently for each layer layout. Multi-layer flexible circuit board design files are output in batches.

[0143] S6: The flexible coil physical processing and winding assembly of the multi-layer thin film substrate all use low magnetic and low dielectric insulating materials, and the copper circuit anti-oxidation plating is thickened. Layer-by-layer etching and cutting are performed. The NMR skeleton is spirally wound layer by layer along the long axis, and the winding tension of each layer is uniformly controlled. The alignment marks between layers are aligned to ensure the coaxiality of the multi-layer coil. The ends of the multi-layer coils are fixed in layers, and the external current leads are independently led out from the solder pads of each layer. The solder joints of each layer are individually insulated and protected.

[0144] S7: Simulation and Verification of Coil Compensation Magnetic Field. The multi-layer coil 3D superimposed model is imported into the simulation platform. Rated current is applied layer by layer, and the magnetic moment and circular arc integral formulas are used to solve the compensation magnetic field of each layer. After the multi-layer magnetic field vectors are superimposed, they are merged with the original static magnetic field. The uniformity of the global magnetic field is calculated uniformly along multiple sampling lines along the long axis. If the uniformity at both ends of the cavity does not meet the standard, the number of low-order harmonics in the columnar harmonic decomposition is increased, and the iteration optimization from S3 to S6 is repeated until the global uniformity index of the research equipment meets the usage requirements.

[0145] Table 2: Comprehensive Comparison of Large-Scale Scientific Research NMR Homogenization Design

[0146] Traditional spherical harmonic design Three-dimensional components are coupled together Complex curved surfaces are difficult to form Longer This embodiment features column harmonic design. Complete decoupling of radial, angular and axial directions Planar layout is easy to process in layers shorter

[0147] As shown in Table 2, traditional spherical harmonic decomposition results in mutual coupling of the three-dimensional magnetic field components. For large cavities with long axes, a large number of high-order harmonics need to be superimposed to barely correct the distortion at both ends. The resulting coil surface morphology is complex, and multi-layer thin-film molding is prone to trace offset deformation, leading to a longer overall iterative design cycle. This embodiment achieves independent decoupling of the three-dimensional components by separating the cylindrical harmonics. High and low-order harmonics can be layered and distributed to different flexible thin films. After unfolding, the cylindrical surfaces are all regular planar curves, making multi-layer layout standardization easier to process. The harmonic screening process can directly discard insignificant distortions, reducing the computational cost of multi-layer coil iterations. This improves the development efficiency of large-aperture, long-axis scientific NMR. The compensation magnetic fields after multi-layer superposition do not cancel each other out, and the uniform magnetic field throughout the cavity remains stable.

[0148] Reference Figure 1 This figure macroscopically illustrates the complete workflow architecture of an active shimming coil design based on cylindrical harmonic functions. It begins by defining the target space of the cylindrical shimming and acquiring the original magnetic field data, laying the foundation for the design. Then, by constructing an orthogonal and complete cylindrical harmonic decomposition basis, the complex magnetic field distribution is transformed into a mathematical series expression. Based on this, the original non-uniform static magnetic field is decomposed, and the harmonic components requiring correction are extracted. Next, the theoretical current distribution of the coil is calculated using scalar flow function inversion. After completing the theoretical calculation, the system maps the three-dimensional current distribution to a two-dimensional plane, generating a standard flexible circuit board layout. The layout is then physically fabricated into a flexible coil and precisely wound and assembled. Finally, simulation software is used to rigorously verify the uniformity of the compensation magnetic field generated by the coil, forming a design closed loop and ensuring that the final magnetic field meets the extremely high uniformity standards required by the equipment.

[0149] Reference Figure 2 This diagram analyzes the process of defining and preparing the target uniform field space and constructing the underlying physical and mathematical foundation. At the outset, the system precisely calibrates the radial and axial boundaries of the cylindrical region inside the nuclear magnetic resonance magnet and establishes axial periodic boundary constraints. Based on this spatial model, the original three-dimensional static magnetic field inside the magnet is discretized using a high-density grid, and noise interference is eliminated through preprocessing methods such as neighborhood mean smoothing. In the foundation construction phase, the system uses the separated variable solution of the Laplace equation as the core, independently deriving angular trigonometric function solutions, axial periodic solutions, and radial Euler or Bessel function solutions that satisfy the physical boundedness conditions. These solutions of independent dimensions are precisely combined through the superposition principle to form a set of orthogonal and complete cylindrical harmonic series foundations. This foundation provides a solid mathematical tool for subsequently mapping complex and disordered spatial magnetic field errors into discrete and regular harmonic components.

[0150] Reference Figure 3This figure illustrates the core computational logic from magnetic field error decomposition to the inversion of the theoretical coil routing shape. The system substitutes the pre-processed global sampled magnetic field data into a pre-constructed complete cylindrical harmonic series. Utilizing the spatial orthogonality of each harmonic component, the amplitude coefficients in each direction are precisely extracted through projection integration. Subsequently, rigorous noise reduction and screening are performed, eliminating weak disturbances based on a set error threshold, and locking the main distortion harmonics as the final shimming compensation targets. In the inversion stage, a scalar stream function is introduced as a bridge to establish a direct analytical relationship between discrete magnetic moment elements and spatial magnetic field increments. Using the selected target correction harmonic amplitude as a constraint, the system equations are solved to obtain the numerical distribution matrix of the global stream function. By accurately extracting the contour lines of specific stream function values, the system successfully visualizes the abstract magnetic field compensation requirement as the physical routing profile of a single-turn shimming coil, achieving the reverse reconstruction of the target magnetic field.

[0151] Reference Figure 4 This diagram focuses on the engineering implementation and manufacturing assembly path of transforming the theoretical three-dimensional coil outline into a physical flexible circuit board. After obtaining the contour lines of the three-dimensional cylindrical stream function, the system uses a cylindrical equidistant unfolding transformation algorithm to non-destructively map them into two-dimensional planar closed curves. Combining the coil's rated carrying current and the process-limited current density, the optimal trace width of the copper conductor and the line spacing that meets high-voltage insulation standards are rigorously calculated. After adding metallized vias and alignment marks to realize multi-layer series connection within the layout, standardized manufacturing documents are output. Entering the physical processing stage, a low-dielectric insulating film is selected as the substrate, and surface anti-oxidation treatment is completed. The final winding and assembly process emphasizes process control. The flexible coil is spirally attached to the NMR tube frame at a constant tension and speed to ensure no bubbles or wrinkles. The end leads are welded and fixed using professional insulating tape and protective adhesive to ensure the physical reliability of the coil's long-term stable operation.

[0152] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A design method for Halbach active shimming coils based on cylindrical harmonic functions, characterized in that, Includes the following steps: S1 determines the target space and boundary constraints of the cylindrical shimming, calibrates the maximum radial radius and total axial length of the cylindrical shimming region inside the nuclear magnetic resonance magnet, sets the axial periodic boundary conditions in the cylindrical coordinate system, collects the three-dimensional spatial distribution data of the original non-uniform static magnetic field inside the magnet, and divides the discrete sampling grid to complete the numerical sampling of the global magnetic field. S2 constructs a cylindrical harmonic orthogonal complete decomposition basis, generates a cylindrical harmonic series expansion expression that fits the periodic boundary conditions of the cylindrical domain, and establishes a one-to-one mapping relationship between orthogonal harmonic components and spatial magnetic field errors. S3 original magnetic field column harmonic component decomposition, substitutes the non-uniform static magnetic field values ​​obtained by global sampling into the column harmonic series, solves the amplitude coefficients of each order of angular, axial and radial harmonics through orthogonal projection operation, and selects the correction harmonic terms whose amplitude exceeds the preset error threshold as the shimming compensation target. The S4 scalar current function is used to invert the coil current distribution, establish the relationship between the magnetic moment and the scalar current function, substitute the amplitude coefficients corresponding to the target correction harmonics to solve the global current function distribution, and extract the current function contour lines as the basic routing profile of the shimming coil. S5 planar routing layout mapping conversion maps the cylindrical 3D coil outline to a 2D plane through a cylindrical unfolding algorithm. Combined with rated operating current and process current density constraints, it calculates the copper trace width and trace safety spacing, and adds input / output pads, interlayer vias and alignment marks to generate flexible circuit board routing files. S6 flexible coil physical processing and winding assembly, delivering wiring documents to manufacture flexible circuit board uniform field coils, which are spirally wound with uniform tension along the axial direction of the nuclear magnetic skeleton; The S7 coil compensation magnetic field simulation verification involves importing the three-dimensional model of the physical coil into the magnetic field simulation platform, calculating the correction magnetic field generated by the coil, superimposing it onto the original static magnetic field, and then re-evaluating the uniformity of the magnetic field across the entire cylinder.

2. The design method of Halbach active shimming coil based on cylindrical harmonic functions according to claim 1, characterized in that, It also includes the steps for solving the axial periodic eigenvalues ​​of the cylinder. ; in For the axial first eigenvalues ​​of order 1, with dimensions of ; The order of the axial harmonics; It is the circumference constant; Let be the half-length of the axial direction of the uniform field region of the cylinder.

3. The design method of Halbach active shimming coil based on cylindrical harmonic functions according to claim 1, characterized in that, It also includes steps for solving the spatial magnetic field contribution of a single-source magnetic moment. ; in, The increment of the spatial magnetic field generated by the single infinitesimal element magnetic moment. The permeability of free space, Let the side length of the equivalent square of the infinitesimal element be . Let be the magnitude of the infinitesimal scalar stream function. For spatial gradient operators; It is the unit vector normal to the infinitesimal element; The coordinate vector of the spatial observation point; The coordinate vector of the infinitesimal source point.

4. The design method of Halbach active shimming coil based on cylindrical harmonic functions according to claim 1, characterized in that, In step S1, which determines the target space and boundary constraints of the cylindrical shimming region, the radial range of the cylindrical shimming region is from 0 to the calibrated maximum radius, and the axial range is from the negative half-length to the positive half-length. Periodic repetition constraints are set on the axial boundary. The original magnetic field sampling grid is uniformly and discretely divided along the radial, angular, and axial directions, and the grid size is less than half of the spatial period corresponding to the minimum corrected harmonic. The sampling data is stored in a three-dimensional matrix format. After sampling, abnormal sampling points with boundary magnetic field distortion are removed, and neighborhood mean smoothing is used to complete the sampling data preprocessing.

5. The design method of Halbach active shimming coil based on cylindrical harmonic functions according to claim 1, characterized in that, In the S2 step of constructing a column harmonic orthogonal complete decomposition basis, the angular equations are periodic. The trigonometric function solution retains only the integer order angular harmonic components; the axial solution is configured with zero-order constant solution and higher-order trigonometric function solution; the radial solution is constructed according to the axial order, and the bounded power function solution and the modified Bessel function bounded solution of Euler equation are constructed respectively, and the second kind of modified Bessel function diverging at the axis is eliminated; the cylindrical harmonic series is obtained by superimposing all angular, axial and radial solutions, and the harmonic components of each order in the series are mutually orthogonal.

6. The design method of Halbach active shimming coil based on cylindrical harmonic functions according to claim 1, characterized in that, In the S3 original magnetic field column harmonic component decomposition step, the projection integral formula is constructed using the orthogonal characteristics of the column harmonic function. The harmonic amplitude coefficients are solved step by step for the three-dimensional sampled magnetic field. The harmonics are sorted from high to low according to the absolute value of the amplitude. A fixed error threshold is set, and only the harmonics with amplitudes higher than the threshold are retained as components to be compensated. The weak magnetic field distortions with amplitudes lower than the threshold are directly discarded.

7. The design method of Halbach active shimming coil based on cylindrical harmonic functions according to claim 1, characterized in that, In the S4 scalar current function inversion coil current distribution step, the coil thickness parameter is set to derive the linear correspondence between the surface equivalent magnetization and the scalar current function. The discrete coil micro-element is equivalent to a point magnetic moment unit. The equation system is established by substituting it into the single-source magnetic field contribution formula. The global current function value is solved with the target harmonic amplitude as a constraint. The contour line with the same value of the current function is extracted as the single-turn coil routing path. Multiple harmonics correspond to multiple sets of independent closed routing profiles. Each set of coil routings is isolated from each other and has no intersection or overlap.

8. The design method of Halbach active shimming coil based on cylindrical harmonic functions according to claim 1, characterized in that, In the S5 planar wiring layout mapping and conversion step, the three-dimensional cylindrical closed curve is converted into a two-dimensional planar closed curve by cylindrical equidistant expansion transformation. The copper conductor trace width is calculated based on the rated continuous current of the coil and the allowable current density of the substrate. The spacing between adjacent traces meets the high-voltage insulation creepage process standard. Metallized vias are added at the corresponding positions of multiple sets of series coils to achieve interlayer conduction. Cross-shaped alignment marks are set at the four corners of the layout for subsequent multi-layer winding alignment.

9. The design method of Halbach active shimming coil based on cylindrical harmonic functions according to claim 1, characterized in that, In the S6 flexible coil physical processing and winding assembly steps, the flexible circuit board substrate is selected as a low dielectric and low magnetic permeability insulating film, the copper conductor surface is treated with an anti-oxidation plating layer, the cut coil is wound at a constant speed along the nuclear magnetic tube skeleton, and a constant tensile tension is maintained throughout the process. The inner surface of the coil is completely attached to the outer wall of the skeleton without bubbles or wrinkles. The winding end is fixed with high temperature resistant insulating tape, and thick-diameter multi-strand wires are led out from both ends of the wiring as external current input leads. The solder joints are coated with insulating protective glue.

10. The design method of Halbach active shimming coil based on cylindrical harmonic functions according to claim 1, characterized in that, In the S7 coil compensation magnetic field simulation verification step, the three-dimensional winding model of the flexible coil is imported into the static magnetic field finite element simulation software, the design rated current is input to solve the coil global compensation magnetic field, the compensation magnetic field is superimposed with the original non-uniform static magnetic field vector, and the magnetic field uniformity is calculated along multiple sampling lines in the radial and axial directions of the cylinder. If the global uniformity does not meet the equipment calibration index, the number of higher-order harmonics in the cylinder harmonic decomposition is increased and all steps from S3 to S6 are repeated.