CN-114626282-B - Coil design method and coil based on machine learning technology
Abstract
The invention discloses a coil design method based on a machine learning technology, which comprises the steps of starting from a Maxwell equation set, obtaining an expression of a magnetic field, calculating magnetic field non-uniformity of a specific area, setting maximum iteration times by taking the position of a coaxial coil in a circuit board as a parameter, selecting a machine learning algorithm according to the range of the parameter, combining a differential evolution algorithm with an artificial neural network, searching a neighborhood where an optimal solution is located, constructing a proxy model related to the magnetic field non-uniformity, searching a minimum value by an L-BFGS algorithm, accelerating convergence of the optimization algorithm, giving optimal prediction parameters by the algorithm, and constructing a coil system according to the obtained coil position parameters. The invention also discloses a coil designed and obtained based on the design method. The invention provides a more universal and easy-to-use scheme for coil design under the limit of practical application, and can obtain a magnetic field with high uniformity so as to better improve the technical level in quantum precision measurement and quantum communication.
Inventors
- YUAN CHUNHUA
- CHEN JUN
- CHEN LIQING
- WU ZELIANG
- BAO GUZHI
- ZHANG WEIPING
- YU ZHIFEI
Assignees
- 华东师范大学
- 华东师范大学
Dates
- Publication Date
- 20260421
- Application Date
- 20201210
- Priority Date
- 20201210
Claims (7)
- 1. A coil design method based on machine learning technology, characterized in that the method comprises the following steps: step one, starting from a Maxwell equation set, obtaining an expression of a magnetic field, and calculating magnetic field non-uniformity of a specific area through a discretization area as a theoretical model; step two, setting the maximum iteration times by selecting the position of each pair of coaxial coils in the circuit board as a parameter, limiting the range of the parameter according to the size of the circuit board, and selecting a differential evolution algorithm as a training data providing algorithm and a neural network as a modeling machine learning algorithm; combining a differential evolution algorithm with an artificial neural network, searching a neighborhood where an optimal solution is located by the aid of the differential evolution algorithm, constructing a proxy model by the neural network, searching a minimum value by an L-BFGS algorithm, and accelerating the convergence process of the optimization algorithm; and step four, giving optimal prediction parameters by an algorithm, wherein the parameters correspond to the positions of each pair of coaxial coils on the flexible circuit board, and constructing a coil system according to the obtained parameters.
- 2. The method of claim 1, wherein the objective function of the optimal prediction parameters is magnetic field non-uniformity, the optimized parameters are the position parameters of each pair of coaxial coils on the circuit board and define a good range, the machine learning algorithm searches parameters in a parameter space by the differential evolution algorithm in an initial optimization stage, inputs a theoretical model for evaluation, and feeds back the obtained result to the neural network for training, if the maximum iteration number is not reached or the target optimization result is not reached to be expected, the optimization process is continued, the neural network makes a prediction every four iterations, the prediction result is given by the differential evolution algorithm, all feedback results are added into a training data set to further train the neural network, a better prediction result is obtained until the preset requirement is met or the preset maximum iteration number is reached, and the optimal prediction is output.
- 3. The method of claim 1, wherein the machine learning algorithm is a hybrid machine algorithm, wherein the differential evolution algorithm is used as a data provider for training a neural network, and the neural network is responsible for modeling a controller for prediction, controlling a coil design optimization process for coil design, and generating a high-uniformity magnetic field.
- 4. A design method according to claim 3, wherein the algorithm uses Python codes built based on Numpy and m-loop as frames as respective calculation modules; The calculation package of the core part of the Python code algorithm comprises Numpy and m-loop, wherein TensorFlow, scipy is embedded in the m-loop; Numpy a calculation module which is used for scientific calculation and is mainly responsible for constructing theoretical simulation; m-loop, an open source code library, which provides a framework for combining a machine learning algorithm with a traditional optimization algorithm, and can be used for constructing a calculation module of the optimization algorithm; TensorFlow a google deep learning library for constructing a neural network; scipy the method is used for scientific calculation, provides an L-BFGS algorithm to find the minimum value of the agent model constructed by the neural network, and helps to give prediction.
- 5. A coil designed by the design method according to any one of claims 1 to 4, wherein the coil is composed of 10 pairs of main coils, one-to-one gradient coils, and one pair of second gradient coils, and the parameters obtained by the above method are built on a flexible circuit board.
- 6. An apparatus comprising a memory and a processor; The memory having stored thereon a computer program which, when executed by the processor, implements the method according to any of claims 1-4.
- 7. A computer readable storage medium, on which a computer program is stored which, when being executed by a processor, implements the method according to any of claims 1-4.
Description
Coil design method and coil based on machine learning technology Technical Field The invention belongs to the field of coil design, and particularly relates to a coaxial coil design method, which provides a design scheme based on a machine learning algorithm, can generate a magnetic field with high uniformity, and can be applied to various systems requiring uniform magnetic fields. Background Quantum technology, which uses the interaction of light and a substance to perform high-precision detection and secret communication by means of quantum coherence, has been widely used in the fields of brain magnetic measurement, gravitational wave detection, secret communication, and the like. But the coupling of the quantum states to the environment can lead to decoherence effects, one of which is the gradient from the inhomogeneous magnetic field. Conventional schemes for generating a uniform magnetic field are based on deriving an expression of the magnetic field with respect to the spatial distribution, or generalized expansion of the expression, with the term relating to the spatial position being eliminated as much as possible. Although the results of these schemes are good, some schemes require higher-order derivation along with the increase of parameters, are complex in calculation, and have various engineering problems in practical application design, so that the schemes cannot be directly used. Disclosure of Invention In order to solve the defects existing in the prior art, the invention aims to provide a coil design method based on a machine learning technology. The invention is inspired by the design of the gradient coil, and combines a computer algorithm with a theoretical model of the coil design to provide a design method which is universally applicable and easy to be used by hands. The coil designed by the design method can generate a magnetic field with high uniformity, provides a more universal and easy-to-use scheme for coil design under the limit of practical application, and can better improve the technical level in quantum precision measurement and quantum communication. The invention provides a coil design method based on machine learning, which comprises the following steps: step one, starting from a Maxwell equation set, obtaining an expression of a magnetic field, and calculating magnetic field non-uniformity of a specific area through a discretization area as a theoretical model; step two, setting the maximum iteration times by selecting the position of each pair of coaxial coils in the circuit board as a parameter, limiting the range of the parameter according to the size of the circuit board, and selecting a differential evolution algorithm as a training data providing algorithm and a neural network as a modeling machine learning algorithm; combining a differential evolution algorithm with an artificial neural network, searching a neighborhood where an optimal solution is located by the aid of the differential evolution algorithm, constructing a proxy model by the neural network, searching a minimum value by an L-BFGS algorithm, and accelerating the convergence process of the optimization algorithm; And step four, the algorithm gives out optimal prediction parameters, the parameters correspond to the positions of each pair of coaxial coils on the flexible circuit board, and a coil system can be constructed according to the obtained parameters. The optimal prediction parameters of the invention have the objective function of magnetic field non-uniformity, the optimized parameters are the position parameters of each pair of coaxial coils on a circuit board and define a good range, a machine learning algorithm searches parameters in a parameter space by a differential evolution algorithm in an initial optimization stage, inputs a theoretical model for evaluation, feeds back the obtained result to a neural network for training, if the maximum iteration number is not reached or the target optimization result is not reached to be expected, the optimization process is continued, the neural network makes a prediction, the prediction result is given by the differential evolution algorithm every four iterations, all feedback results are added into a training data set for further training the neural network, the better prediction result is obtained until the preset requirement is met or the preset maximum iteration number is reached, and the optimal prediction is output. The invention constructs a controller for training a neural network by using a differential evolution algorithm as a data provider of the neural network, wherein the neural network is responsible for modeling and predicting, and a hybrid machine learning optimization algorithm is formed by two algorithms together to control the optimization flow of coil design. The algorithm part takes Python codes built on the basis of Numpy and m-loop as frames as each calculation module. The core part of the Python code algorithm is mainly provide