A coil design method based on machine learning technology, coil

By combining differential evolution algorithm with neural network to optimize coil position, the problems of complex magnetic field calculation and engineering limitations in existing technologies have been solved, realizing the generation of highly uniform magnetic fields and improving the application effect of quantum technology.

CN114626282BActive Publication Date: 2026-04-21EAST CHINA NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
EAST CHINA NORMAL UNIV
Filing Date
2020-12-10
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies are computationally complex and engineering-limited in generating uniform magnetic fields, making them difficult to use directly in practical applications, thus limiting the technological level in quantum precision measurement and quantum communication.

Method used

By combining differential evolution algorithm and artificial neural network, the coil position is designed through machine learning optimization algorithm, and the L-BFGS algorithm is used to accelerate the optimization process. A hybrid machine learning algorithm is constructed to generate a highly uniform magnetic field.

Benefits of technology

Considering the limitations of practical applications, this provides a more universal and easier-to-use solution for coil design, improving the technical level of quantum precision measurement and quantum communication, and enhancing computational efficiency and optimization effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114626282B_ABST
    Figure CN114626282B_ABST
Patent Text Reader

Abstract

This invention discloses a coil design method based on machine learning technology, comprising: starting from Maxwell's equations, deriving the expression for the magnetic field, and calculating the magnetic field inhomogeneity in a specific region; setting the maximum number of iterations using the position of the coaxial coil on the circuit board as a parameter, and selecting a machine learning algorithm according to the range of the parameter; combining differential evolution algorithm with artificial neural network to explore the neighborhood of the optimal solution and construct a surrogate model for the magnetic field inhomogeneity, using the L-BFGS algorithm to find the minimum value, accelerating the convergence of the optimization algorithm; the algorithm provides the best prediction parameters, and a coil system can be constructed based on the obtained coil position parameters. This invention also discloses a coil designed based on the above design method. This invention provides a more universal and easier-to-use solution for coil design while considering the limitations of practical applications, and can obtain a highly uniform magnetic field to better improve the technical level in quantum precision measurement and quantum communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of coil design, and in particular relates to a coaxial coil design method. Based on machine learning algorithms, a design scheme is provided that can generate a highly uniform magnetic field, which can be applied to various systems that require a uniform magnetic field. Background Technology

[0002] Quantum technology utilizes the interaction between light and matter, leveraging quantum coherence to achieve high-precision detection and secure communication. It has already been widely applied in projects such as magnetoencephalography (MEG) measurement, gravitational wave detection, and secure communication. However, the coupling between quantum states and the environment can lead to decoherence effects, one of which originates from gradients in inhomogeneous magnetic fields.

[0003] Traditional methods for generating uniform magnetic fields are based on differentiating the expression for the spatial distribution of the magnetic field, or by generalizing the expression to eliminate as many spatially related terms as possible. While these methods yield good results, some become computationally complex with an increasing number of parameters, requiring higher-order derivatives. Furthermore, various engineering limitations in practical applications prevent the direct application of these methods. Summary of the Invention

[0004] To address the shortcomings of existing technologies, the present invention aims to provide a coil design method based on machine learning technology.

[0005] Inspired by gradient coil design, this invention combines computer algorithms with theoretical models of coil design to provide a universally applicable and easy-to-use design method. The coils designed using this method can generate highly uniform magnetic fields. Considering the limitations of practical applications, it offers a more universal and user-friendly solution for coil design, enabling significant improvements in quantum precision measurement and quantum communication technologies.

[0006] This invention provides a coil design method based on machine learning, the method comprising the following steps:

[0007] Step 1: Starting from Maxwell's equations, obtain the expression for the magnetic field as a theoretical model, and calculate the magnetic field inhomogeneity of a specific region by discretizing the region.

[0008] Step 2: By selecting the position of each pair of coaxial coils on the circuit board as a parameter, setting the maximum number of iterations, and limiting the range of parameters according to the size of the circuit board, the differential evolution algorithm is selected as the training data providing algorithm, and the neural network is selected as the machine learning algorithm for modeling.

[0009] Step 3: Combine the differential evolution algorithm with the artificial neural network. The differential evolution algorithm helps to explore the neighborhood where the optimal solution is located, the neural network builds a surrogate model, and the L-BFGS algorithm is used to find the minimum value, which accelerates the convergence process of the optimization algorithm.

[0010] Step 4: The algorithm provides the optimal prediction parameters, which correspond to the position of each pair of coaxial coils on the flexible circuit board. Based on the obtained parameters, the coil system can be constructed.

[0011] The objective function for the optimal prediction parameters described in this invention is magnetic field inhomogeneity. The optimized parameters are the position parameters of each pair of coaxial coils on the circuit board, with a defined range. In the initial optimization stage, the machine learning algorithm uses a differential evolution algorithm to search for parameters in the parameter space and inputs them into the theoretical model for evaluation. The results are then fed back to the neural network for training. If the maximum number of iterations is not reached or the target optimization result does not meet expectations, the optimization process continues. Every four iterations, the neural network makes a prediction, with the prediction result provided by the differential evolution algorithm. All feedback results are added to the training dataset to further train the neural network and obtain better prediction results until the preset requirements are met or the pre-set maximum number of iterations is reached, at which point the optimal prediction is output. This invention constructs a hybrid machine learning optimization algorithm, in which the differential evolution algorithm serves as the data provider for training the neural network, and the neural network is responsible for modeling and making predictions. This algorithm controls the optimization process of coil design.

[0012] The algorithm uses Python code built on the framework of NumPy and m-loop as the various computation modules.

[0013] The core of the Python code algorithm is mainly provided by the following computation packages:

[0014] Numpy: Used for scientific computing, primarily responsible for building computational modules for theoretical simulations;

[0015] m-loop: An open-source code library that provides a framework for combining machine learning algorithms with traditional optimization algorithms, which can be used to build computational modules for optimization algorithms.

[0016] TensorFlow: Google's deep learning library for building neural networks;

[0017] Scipy: Used for scientific computing, it provides the L-BFGS algorithm to find the minimum of a surrogate model built from a neural network, helping to make predictions. The algorithm is executed by calling the scipy.optimize statement inside the m-loop.

[0018] TensorFlow and SciPy are embedded in m-loop.

[0019] The present invention also provides a coil designed according to the above design method. The coil is a circular coil attached to a flexible circuit board and closely attached to the inner layer of the magnetic shield. The coil includes 10 pairs of single-loop main coils, symmetrically placed with the center of the magnetic shield as the origin. The optimized result is obtained by using position as a parameter. In addition, two pairs of gradient coils are added to compensate for the first-order and second-order gradients respectively, eliminating the influence of residual magnetism inside the magnetic shield.

[0020] Specifically, in the design of practical coils, this invention considers that the coil needs to be measured in a magnetically shielded environment with high permeability and that the axial magnetic field is the primary consideration. This invention utilizes the method of images to calculate the magnetic field distribution for a given coil system. Under certain conditions, this method of images model can degenerate into Biosavart's law to calculate the axial magnetic field distribution in free space.

[0021] Within this theoretical framework, this invention uses NumPy numerical simulation to measure the magnetic field generated by a coil system under given parameters and calculates the magnetic field uniformity within a certain range, serving as the calculation module for the theoretical model.

[0022] In the computation module of the optimization algorithm, this invention mainly utilizes m-loop for construction.

[0023] To improve optimization efficiency, this invention combines differential evolution algorithm with artificial neural network. The position of the coil is selected as the parameter to be optimized, and initially, differential evolution algorithm searches the parameter space. Differential evolution algorithm randomly generates parameters, which are then simulated by theoretical model to evaluate the corresponding uniformity, and then fed back to the optimization algorithm module.

[0024] The randomly generated parameters and corresponding feedback constitute the training dataset, which is then provided to the neural network built using TensorFlow for training. After the neural network is trained, the previously optimal parameters are selected as the initial points for the L-BFGS algorithm. The minimum point is then found in the surrogate model as the prediction result and fed into the theoretical model for simulation evaluation. The new evaluation results are added to the training dataset to obtain better prediction results.

[0025] This invention allows the evolutionary algorithm to pre-search for data, which is then evaluated by the model and submitted to the network for prediction. This process is repeated until the prediction given by the algorithm meets the preset requirements or reaches the pre-set maximum number of iterations, at which point the optimization ends and the best prediction result is given.

[0026] The present invention also proposes an apparatus comprising: a memory and a processor; wherein the memory stores a computer program that, when executed by the processor, implements the above-described method.

[0027] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.

[0028] The beneficial effects of this invention include: the coil design method provided by this invention, while considering the limitations of practical applications, offers a more universal and easier-to-use solution for coil design, enabling the generation of highly uniform magnetic fields, thereby improving the technical level in quantum precision measurement and quantum communication. Furthermore, the hybrid machine learning algorithm provided by this invention has a mechanism similar to active learning. Through the algorithm, the machine learner autonomously explores the region where the optimal solution is located, continuously exploring within a given number of iterations. In coil optimization problems, compared with traditional algorithms, it not only significantly improves computational efficiency but also better approaches the optimal solution in high-dimensional optimization. The neural network used in this invention has been proven to fit the magnetic field inhomogeneity function generated by multi-turn coil systems well. Using this optimization algorithm, it can be well combined with theoretical models and finite element simulations, greatly improving the usability of the coil design method. Attached Figure Description

[0029] Figure 1 This is a flowchart of the machine learning algorithm of the present invention.

[0030] Figure 2 This is the structure of the machine learning neural network of the present invention.

[0031] Figure 3 4 is a schematic diagram of the coil system designed by the design method of the present invention. Detailed Implementation

[0032] The invention will be further described in detail below with reference to the specific embodiments and accompanying drawings. Except for the contents specifically mentioned below, the processes, conditions, and experimental methods for implementing the invention are all common knowledge and general knowledge in the art, and the invention does not have any particular limitations.

[0033] This invention discloses a coil design method based on machine learning technology. The method includes: starting from Maxwell's equations, obtaining the expression for the magnetic field, and calculating the magnetic field inhomogeneity in a specific region; setting the maximum number of iterations using the position of the coaxial coil on the circuit board as a parameter, and selecting a machine learning algorithm based on the parameter range; combining differential evolution algorithm with artificial neural network to explore the neighborhood of the optimal solution and construct a surrogate model for the magnetic field inhomogeneity; using the L-BFGS algorithm to find the minimum value to accelerate the convergence of the optimization algorithm; the algorithm provides the best prediction parameters, and a coil system can be constructed based on the obtained coil position parameters. This invention also discloses a coil designed based on the above design method. This invention provides a more universal and easier-to-use solution for coil design while considering the limitations of practical applications, and can obtain a highly uniform magnetic field to better improve the technical level in quantum precision measurement and quantum communication.

[0034] This invention provides a coil design method based on the above system, the method comprising the following steps:

[0035] Step 1: Starting from Maxwell's equations, obtain the expression for the magnetic field as a theoretical model, and calculate the magnetic field inhomogeneity of a specific region by discretizing the region.

[0036] Step 2: By selecting the position of each pair of coaxial coils on the circuit board as a parameter, setting the maximum number of iterations, and limiting the range of parameters according to the size of the circuit board, the differential evolution algorithm is selected as the training data providing algorithm, and the neural network is selected as the machine learning algorithm for modeling.

[0037] Step 3: Combine the differential evolution algorithm with the artificial neural network. The evolution algorithm helps to explore the neighborhood of the optimal solution, the neural network builds a surrogate model, and the L-BFGS algorithm is used to find the minimum value, which accelerates the convergence process of the optimization algorithm.

[0038] Step 4: The algorithm provides the optimal prediction parameters, which correspond to the position of each pair of coaxial coils on the flexible circuit board. Based on the obtained parameters, the coil system can be constructed.

[0039] This invention constructs a controller that uses a differential evolution algorithm as the data provider for training a neural network, and the neural network is responsible for modeling and making predictions. The two algorithms together form a hybrid machine learning optimization algorithm to control the optimization process of coil design.

[0040] The algorithm uses Python code built on the framework of NumPy and m-loop as the various computation modules.

[0041] The core of the Python code algorithm is mainly provided by the following computation packages:

[0042] Numpy: Used for scientific computing, primarily responsible for building computational modules for theoretical simulations;

[0043] m-loop: An open-source code library that provides a framework for combining machine learning algorithms with traditional optimization algorithms, which can be used to build computational modules for optimization algorithms.

[0044] TensorFlow: Google's deep learning library for building neural networks;

[0045] Scipy: Used for scientific computing, it provides the L-BFGS algorithm to find the minimum of a surrogate model built from a neural network, helping to make predictions. The algorithm is executed by calling the scipy.optimize statement inside the m-loop.

[0046] TensorFlow and SciPy are embedded in m-loop.

[0047] Specifically, in the design of practical coils, this invention considers that the coil needs to be measured in a magnetically shielded environment with high permeability and that the axial magnetic field is the primary consideration. This invention utilizes the method of images to calculate the magnetic field distribution for a given coil system. Under certain conditions, this method of images model can degenerate into Biosavart's law to calculate the axial magnetic field distribution in free space.

[0048] Within this theoretical framework, this invention uses NumPy numerical simulation to measure the magnetic field generated by a coil system under given parameters and calculates the magnetic field uniformity within a certain range, serving as the calculation module for the theoretical model.

[0049] In the computation module of the optimization algorithm, this invention mainly utilizes m-loop for construction.

[0050] To improve optimization efficiency, this invention combines differential evolution algorithm with artificial neural network. The position of the coil is selected as the parameter to be optimized, and the differential evolution algorithm initially searches the parameter space. The differential evolution algorithm randomly generates parameters. When the parameter dimension N is less than or equal to 10, 20 sets of parameters are generated; when the parameter dimension N>10, 2N sets of parameters are generated. Then, the theoretical model is used for simulation to evaluate the corresponding uniformity, and then the results are fed back to the optimization algorithm module.

[0051] The randomly generated parameters and corresponding feedback constitute the training dataset, which is then provided to the neural network built using TensorFlow for training. After the neural network is trained, the previously optimal parameters are selected as the initial points for the L-BFGS algorithm. The minimum point is then found in the surrogate model as the prediction result and fed into the theoretical model for simulation evaluation. The new evaluation results are added to the training dataset to obtain better prediction results.

[0052] This invention allows the evolutionary algorithm to pre-search for data, which is then evaluated by the model and submitted to the network for prediction. This process is repeated until the prediction given by the algorithm meets the preset requirements or reaches the pre-set maximum number of iterations, at which point the optimization ends and the best prediction result is given.

[0053] The present invention also proposes an apparatus comprising: a memory and a processor; wherein the memory stores a computer program that, when executed by the processor, implements the above-described method.

[0054] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.

[0055] The present invention also provides a coil designed according to the above design method. The coil is a circular coil attached to a flexible circuit board and closely attached to the inner layer of the magnetic shield. The coil includes 10 pairs of single-loop main coils, symmetrically placed with the center of the magnetic shield as the origin. The optimized result is obtained by using position as a parameter. In addition, two pairs of gradient coils are added to compensate for the first-order and second-order gradients respectively, eliminating the influence of residual magnetism inside the magnetic shield.

[0056] The position of the coil is set as the parameter to be optimized, its range is defined, and the number of optimization attempts or the target cost is specified. Below is a simple example of a main program for this invention:

[0057]

[0058]

[0059]

[0060]

[0061] Create a controller, provide the custom data interface of this invention to the controller, select the differential evolution algorithm module built into m-loop as the training_type to provide training data, and call the neural network built by TensorFlow within m-loop as the controller_type to be responsible for data regression and prediction. Set the maximum number of iterations to 15000, do not set a target cost, and give a parameter range.

[0062]

[0063]

[0064] The coil design program built using m-loop and NumPy is simple and easy to use. It is compatible with flexible circuit boards and performs better than traditional coil systems designed and optimized using evolutionary algorithms or simulated annealing algorithms.

[0065] The scope of protection of this invention is not limited to the above embodiments. Any variations and advantages that can be conceived by those skilled in the art without departing from the spirit and scope of the inventive concept are included in this invention and are protected by the appended claims.

Claims

1. A coil design method based on machine learning technology, characterized in that, The method includes the following steps: Step 1: Starting from Maxwell's equations, obtain the expression for the magnetic field as a theoretical model, and calculate the magnetic field inhomogeneity of a specific region by discretizing the region. Step 2: By selecting the position of each pair of coaxial coils on the circuit board as a parameter, setting the maximum number of iterations, and limiting the range of parameters according to the size of the circuit board, the differential evolution algorithm is selected as the training data providing algorithm, and the neural network is selected as the machine learning algorithm for modeling. Step 3: Combine the differential evolution algorithm with the artificial neural network. The differential evolution algorithm helps to explore the neighborhood where the optimal solution is located, the neural network builds a surrogate model, and the L-BFGS algorithm is used to find the minimum value, which accelerates the convergence process of the optimization algorithm. Step 4: The algorithm provides the optimal prediction parameters, which correspond to the position of each pair of coaxial coils on the flexible circuit board. The coil system is constructed based on the obtained parameters.

2. The design method as described in claim 1, characterized in that, The objective function of the optimal prediction parameter is the magnetic field inhomogeneity. The optimized parameter is the position parameter of each pair of coaxial coils on the circuit board with a defined range. In the initial stage of optimization, the machine learning algorithm searches for parameters in the parameter space using the differential evolution algorithm, inputs them into the theoretical model for evaluation, and feeds the results back to the neural network for training. If the maximum number of iterations is not reached or the target optimization result does not meet expectations, the optimization process will continue. Every four iterations, the neural network makes a prediction, and the prediction result is given by the differential evolution algorithm. All feedback results are added to the training dataset to further train the neural network and obtain better prediction results until the preset requirements are met or the preset maximum number of iterations is reached, and the optimal prediction is output.

3. The design method as described in claim 1, characterized in that, The machine learning algorithm is a hybrid machine algorithm, in which differential evolution algorithm serves as the data provider for training the neural network, and the neural network is responsible for modeling and predicting the controller, controlling the coil design optimization process, and generating a highly uniform magnetic field.

4. The design method as described in claim 3, characterized in that, The algorithm uses Python code built on the framework of NumPy and m-loop as its various computational modules; The core computational packages of the Python code algorithm include: NumPy and m-loop; among which, TensorFlow and SciPy are embedded in m-loop; Numpy: Used for scientific computing, primarily responsible for building computational modules for theoretical simulations; m-loop: An open-source code library that provides a framework for combining machine learning algorithms with traditional optimization algorithms, which can be used to build computational modules for optimization algorithms; TensorFlow: Google's deep learning library for building neural networks; Scipy: Used for scientific computing, it provides the L-BFGS algorithm to find the minimum of a surrogate model built from a neural network, helping to make predictions.

5. A coil designed according to any one of claims 1-4, characterized in that, The coil consists of 10 pairs of main coils, one pair of first-order gradient coils, and one pair of second-order gradient coils; the parameters of the coil obtained by the above method are constructed on a flexible circuit board.

6. A device, characterized in that, include: Memory and processor; The memory stores a computer program that, when executed by the processor, implements the method as described in any one of claims 1-4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-4.