Micromagnetodynamics simulation method based on generative model

Through the micromagnetic dynamics simulation method based on the generative model, the magnetic moment distribution of the micromagnetic dynamics system is predicted, which solves the problem of calculation cost and duration in the traditional simulation method, and realizes an efficient and fast simulation process.

CN119047340BActive Publication Date: 2025-02-28KUNMING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411523750.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-28
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

Traditional micromagnetic dynamics simulation methods have great challenges in computing cost and calculation time, and it is difficult to effectively reduce these problems.

Method used

Using a micromagnetic dynamics simulation method based on the generative model, the magnetic moment distribution of the next time step predicted by the improved generative network is obtained and inputted into the micromagnetic dynamics equation to iteratively predict the continuous time step until the magnetic moment distribution tends to steady state.

Benefits of technology

By generating models to predict magnetic moments, replacing the traditional calculation method of directly solving LLG equations, it significantly reduces time complexity, improves simulation speed, and greatly reduces calculation costs while ensuring accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present invention relates to the field of deep learning technology, and in particular to a micromagnetodynamics simulation method based on a generative model. The magnetic moment distribution is predicted by using a generative model, thereby replacing the traditional method of directly solving the LLG equation to directly calculate the magnetic moment. By learning the dynamic evolution process of the LLG equation, this method achieves a rapid prediction of the change of the magnetic moment and significantly improves the computational efficiency. This technology can greatly improve the speed of micromagnetodynamics simulation, aiming to solve the problems of high computational cost and long computational time in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning technology, and in particular to a micromagnetic dynamics simulation method based on a generative model. Background Art

[0002] In traditional micromagnetic simulation schemes, predictions of micromagnetism are mainly achieved through the Landau-Lifshitz-Gilbert (LLG) equation. The precise calculation of the static magnetic field in the equation is crucial to accurately predict the micromagnetic dynamic behavior. The effective magnetic field includes a variety of complex magnetic fields such as the external magnetic field, exchange field, anisotropy field, and static magnetic field. Only when these effective magnetic fields are calculated can the calculated effective magnetic field be substituted into the LLG equation to derive the magnetic moment of the next state. The simulation process needs to process a large number of time steps, and each time step requires detailed calculations of the complex magnetic interactions within the magnet system and the dynamic changes related to material properties.

[0003] With the rapid development of computing and information technology, deep learning has shown its great potential and efficiency in many fields, especially in dealing with large-scale computing tasks and complex simulations, which can greatly improve the computing speed and simulation efficiency. Therefore, a micromagnetic dynamics simulation method using deep learning technology is needed to reduce the computing cost and computing time in the micromagnetic dynamics simulation process. Summary of the invention

[0004] The main purpose of the present invention is to provide a micromagnetodynamics simulation method based on a generative model, aiming to solve the problem of how to reduce the computational cost and computational time in the micromagnetodynamics simulation process.

[0005] To achieve the above object, the present invention provides a micromagnetic dynamics simulation method based on a generative model, the method comprising:

[0006] Obtaining the magnetic moment distribution of the next time step predicted by the improved generation network;

[0007] The predicted magnetic moment distribution is input as the magnetic moment distribution of the next time step into the micromagnetodynamics equation for iterative prediction of consecutive time steps until the iteratively obtained magnetic moment distribution approaches a steady state.

[0008] Optionally, before the step of obtaining the predicted magnetic moment distribution of the next time step predicted by the improved generation network, the method further comprises:

[0009] Initialize the weights of each layer of the generated network to be trained;

[0010] Inputting the preprocessed simulation data set containing Gaussian noise into the to-be-trained generation network in batches for training through batch processing;

[0011] Obtaining the predicted magnetic moment calculated based on the weight and activation function for each layer in the generated network to be trained;

[0012] Calculating a mean square error value between the predicted magnetic moment and a reference magnetic moment;

[0013] Adjusting weights in the network based on the mean square error value;

[0014] Execute the above steps repeatedly;

[0015] When the number of cycles of the above steps meets the preset number of cycles, the cycle is stopped, and the current generated network to be trained is determined as the improved generated network after training.

[0016] Optionally, the simulation data set containing Gaussian noise is a simulation data set of spin states of different scales increasing in multiples of 32 generated by randomly initialized iterative LLG equations, wherein the simulation data set of each scale includes the complete evolution process of the magnetic moment distribution from an initial random spin state to a spin magnetic steady state.

[0017] Optionally, the improved generation network exports the trained generation model from the original framework as a model in ONNX format through a pre-installed engine, and converts the model in ONNX format into an internal optimization format of the pre-installed engine through a parser in the pre-installed engine.

[0018] Optionally, the downsampling modules of the encoder in the improved generation network are composed of a 3×3 convolution kernel, a two-dimensional convolution layer with a step size of 1 and a padding of 1, and a batch normalization layer and a LeakyReLU activation layer are set after each convolution layer.

[0019] Optionally, the upsampling module of the decoder in the improved generation network restores the image size through a Conv2DTranspose layer, the parameters in the upsampling module are the same as those of the downsampling module of the corresponding number of layers, and a batch normalization layer and a ReLU activation layer are set after the upsampling module.

[0020] Optionally, the improved generation network forms a final output through a ConvTranspose2d layer, a BatchNorm layer, a Tanh activation layer and a Conv2d layer in the output stage.

[0021] In addition, to achieve the above-mentioned purpose, the present invention also provides a micromagnetodynamics simulation system based on a generative model, and the micromagnetodynamics simulation system based on a generative model includes: a memory, a processor, and a micromagnetodynamics simulation program based on a generative model stored in the memory and executable on the processor, and the micromagnetodynamics simulation program based on a generative model, when executed by the processor, implements the steps of the micromagnetodynamics simulation method based on a generative model as described above.

[0022] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a micromagnetodynamics simulation program based on a generative model is stored. When the micromagnetodynamics simulation program based on a generative model is executed by a processor, the steps of the micromagnetodynamics simulation method based on a generative model are implemented.

[0023] The present invention has at least the following technical effects:

[0024] The generative model is used to predict the magnetic moment. The magnetic moment distribution of magnetic materials is predicted by learning the dynamic evolution process of the LLG equation, replacing the traditional method of directly solving the LLG equation to calculate the magnetic moment distribution. The magnetic moment change is quickly predicted with small error, greatly improving the simulation speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A schematic diagram of the architecture of the hardware operating environment of the micromagnetodynamics simulation device based on the generative model involved in the embodiment of the present invention;

[0026] Figure 2 It is a schematic diagram of the evolution of the magnetic moment corresponding to the LLG equation involved in an embodiment of the present invention under an external magnetic field and magnetic interaction force;

[0027] Figure 3 A schematic diagram of a micromagnetodynamics simulation architecture based on an improved generative network according to an embodiment of the present invention;

[0028] Figure 4 It is a flow chart of the first embodiment of the micromagnetodynamics simulation method based on the generative model of the present invention;

[0029] Figure 5 RGB schematic diagram of a training data set involved in an embodiment of the present invention;

[0030] Figure 6 A schematic diagram of comparative data of the time required for various methods in predicting magnetic moments of different sizes involved in an embodiment of the present invention;

[0031] Figure 7 Schematic diagram of RGB comparison between the predicted magnetic moment distribution and the measured magnetic moment distribution involved in an embodiment of the present invention;

[0032] Figure 8 This is a model training test effect diagram after adding Gaussian noise involved in an embodiment of the present invention, where Figure 8 (a) is the RGB image of the training set. Figure 8 (b) is the RGB image of the test set. Figure 8 (c) Yes Figure 8 (a) The corresponding feature point map, Figure 8 (d) Yes Figure 8 (b) Corresponding feature point map;

[0033] Fig. 9 Schematic diagram of the training loss curve of the Unet model after adding Gaussian noise involved in an embodiment of the present invention.

[0034] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0035] In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0036] As an implementation plan, Figure 1 It is a schematic diagram of the architecture of the hardware operating environment of the micromagnetodynamics simulation system based on the generative model involved in the embodiment of the present invention.

[0037] like Figure 1 As shown, the micromagnetic dynamics simulation system based on the generative model may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0038] Those skilled in the art will understand that Figure 1The architecture of the micro-magnetodynamics simulation system based on the generative model shown in the figure does not constitute a limitation of the micro-magnetodynamics simulation system based on the generative model, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0039] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a micro-magnetodynamics simulation program based on a generative model. The operating system is a program for managing and controlling the hardware and software resources of the micro-magnetodynamics simulation system based on a generative model, the micro-magnetodynamics simulation program based on a generative model, and the operation of other software or programs.

[0040] exist Figure 1 In the micromagnetodynamics simulation system based on the generative model shown, the user interface 1003 is mainly used to connect to the terminal and communicate data with the terminal; the network interface 1004 is mainly used for the background server and communicates data with the background server; the processor 1001 can be used to call the micromagnetodynamics simulation program based on the generative model stored in the memory 1005.

[0041] In this embodiment, the micromagnetodynamics simulation system based on the generative model includes: a memory 1005, a processor 1001, and a micromagnetodynamics simulation program based on the generative model stored in the memory and executable on the processor, wherein:

[0042] When the processor 1001 calls the micromagnetodynamics simulation program based on the generative model stored in the memory 1005, the following operations are performed:

[0043] Obtaining the predicted magnetic moment of the next time step predicted by the improved generation network;

[0044] The predicted magnetic moment is input as the magnetic moment of the next time step into the micromagnetodynamics equation to perform iterative prediction of consecutive time steps until the iteratively obtained magnetic moment approaches a steady state.

[0045] When the processor 1001 calls the micromagnetodynamics simulation program based on the generative model stored in the memory 1005, the following operations are performed:

[0046] Initialize the weights of each layer of the generated network to be trained;

[0047] Inputting the preprocessed simulation data set containing Gaussian noise into the to-be-trained generation network in batches for training through batch processing;

[0048] Obtaining the predicted magnetic moment calculated based on the weight and activation function for each layer in the generated network to be trained;

[0049] Calculating a mean square error value between the predicted magnetic moment and a reference magnetic moment;

[0050] Adjusting weights in the network based on the mean square error value;

[0051] Execute the above steps repeatedly;

[0052] When the number of cycles of the above steps meets the preset number of cycles, the cycle is stopped, and the current generated network to be trained is determined as the improved generated network after training.

[0053] Based on the hardware architecture of the micromagnetodynamics simulation system based on the generative model using the above-mentioned deep learning technology, an embodiment of the micromagnetodynamics simulation method based on the generative model of the present invention is proposed.

[0054] First embodiment

[0055] The main equation in micromagnetism is the micromagnetic equation, which is usually obtained by appropriate reduction and approximation of Maxwell's equations. Among them, one of the most important and widely used equations in micromagnetism is the Landau-Lifshitz-Gilbert (LLG) equation.

[0056] The LLG equation is a differential equation that describes the evolution of magnetic moment under external magnetic field and magnetic interaction force. The general form of the LLG equation can be written as:

[0057]

[0058] in: is the gyromagnetic ratio, is the time rate of change of the magnetic moment; is the effective magnetic field; is the Gilbert dissipation parameter.

[0059] This embodiment is carried out for the calculation of the accelerating effective magnetic field.

[0060] The effective magnetic field is given by the external magnetic field ( ), exchange field ( ), anisotropy field ( ), demagnetization field ( ). That is:

[0061]

[0062] Among them, the external magnetic field ( ) refers to an external magnetic field applied to a magnetic material, usually produced experimentally by a magnet or electromagnet;

[0063] Exchange Field( ) refers to the exchange interaction between electron spins;

[0064] Anisotropy field ( ) refers to the effective magnetic field in the easy magnetization direction, which comes from the crystal structure inside the material. The magnetization energy in some crystal directions is low, so the magnetic moments tend to align along these easy magnetization axes;

[0065] Demagnetization field ( ) refers to the dipole-dipole interaction, which is the distribution of the magnetic field in space generated by the magnetic moment;

[0066] The calculation formulas for each field are as follows:

[0067] ① ,in, is the anisotropy energy constant, is the saturation magnetization, is the direction of the anisotropy axis, It is The spin of a magnetic moment.

[0068] ② ,in is the exchange integral, D is the spacing between neighboring magnetic moments, and are the spins of the neighboring magnetic moments, respectively.

[0069] ③ ,in is the vacuum permeability, is the position vector between the magnetic moments.

[0070] For ease of explanation, refer to Figure 2 The schematic diagram of the evolution of the magnetic moment corresponding to the traditional direct solution of the LLG equation under the external magnetic field and magnetic interaction force is shown. The material is divided into tiny magnetic volume elements and various magnetic interactions (i.e. the above four) are considered. Then the physical parameters in the model are determined, such as magnetic anisotropy, magnetic susceptibility, external magnetic field, etc. Among them, the external magnetic field is fixed, It is calculated by the above formula.

[0071] In the picture Since the algorithm needs to be calculated with all the surrounding magnetized units, the time complexity of the algorithm is O(N^2). When the calculation scale becomes larger, the amount of calculation accounts for the vast majority of the entire LLG equation calculation. Although the introduction of FFT has alleviated this problem to a certain extent, computing resources are still a major challenge when dealing with large-scale systems.

[0072] For this purpose, refer to Figure 3The schematic diagram of the micromagnetic dynamics simulation architecture based on the improved generative network in this implementation is shown. This method integrates solving each magnetic field component, calculating the effective magnetic field, applying the Landau-Lifshitz-Gilbert (LLG) equation, and the complex calculation of the magnetic moment iteration process. Through this technology, we can directly predict the magnetic moment of the next time step in one step. Then, this predicted value is looped over as input to achieve iterative predictions at consecutive time steps.

[0073] In addition, refer to Figure 4 In a first embodiment, when the micromagnetodynamics simulation method based on a generative model is applied to a micromagnetodynamics simulation system based on a generative model (hereinafter referred to as the system), the following steps are performed:

[0074] Step S10, obtaining the predicted magnetic moment distribution of the next time step predicted by the improved generation network;

[0075] In this embodiment, the system obtains the predicted magnetic moment distribution at the next time step by using the built-in improved generation network for prediction.

[0076] It should be noted that in this embodiment, the improved generative model includes two major parts: downsampling and upsampling. The hierarchical relationship and connection mode in each part are crucial to the performance of the model. The downsampling part uses standard 2D convolution for feature extraction, doubling the number of feature channels at each step, thereby increasing the expressive power of the model; the upsampling part uses a transposed convolution layer to gradually restore the image size, halving the number of feature channels at each step, and finally outputs a prediction result of the same size as the input image. Batch normalization and activation layers are applied after each convolution operation to maintain the stability of network training and introduce nonlinearity.

[0077] Optionally, the improved generation network can be built based on the Unet network architecture to obtain an improved Unet network.

[0078] For example, referring to the traditional Unet network architecture, the U-Net architecture (minimum resolution is 32x32 pixels). The left side of the network is the contracting path, and the right side is the expansive path. The contracting path is a conventional 3×3 convolution structure, with ReLU, and 2×2 max pooling. Each time the sample is downsampled, the channel of the featuremap is doubled. The expansive path is an upsampling process, each time it is a 2*2 upsampling convolution process, and the corresponding feature channel is reduced to half of the previous one. The features in the downsampling process corresponding to the upsampling will be connected. The cropping process is necessary because the pixels at the edge of each convolution process will be lost, and the final network has 23 convolution layers.

[0079] Optionally, the upsampling block of the decoder of the network architecture of the improved Unet model restores the image size through the Conv2DTranspose layer, and the parameters in the upsampling module are the same as the downsampling module of the corresponding layer to ensure that the image size can be correctly reconstructed; the upsampling module is followed by a batch normalization layer and a ReLU activation layer to help restore the full-size version of the image or feature map. Through this deconvolution operation, the model gradually reduces the number of feature channels and adjusts to a depth and size close to the original input image.

[0080] Optionally, in order to optimize the stability and nonlinear characteristics of the data flow through the network and restore a high-quality version of the data without sacrificing details, the improved generation network forms the final output through a ConvTranspose2d layer, a BatchNorm layer, a Tanh activation layer, and a Conv2d layer at the output stage. Among them, the Tanh activation function is used to adjust the output range to adapt to the color depth of the original image.

[0081] Step S20, inputting the predicted magnetic moment distribution as the magnetic moment distribution of the next time step into the micromagnetodynamics equation to perform iterative prediction of consecutive time steps until the iteratively obtained magnetic moment distribution approaches a steady state.

[0082] In this embodiment, after the predicted magnetic moment distribution is obtained, the predicted magnetic moment distribution is input into the micromagnetodynamics equation to perform iterative prediction at consecutive time steps until the iteratively obtained magnetic moment distribution approaches a steady state.

[0083] Optionally, corresponding to how to judge whether the magnetic moment distribution tends to a steady state, the magnetic moment distribution recorded in each magnetic moment iteration is recorded, and an evolution curve of the magnetic moment change over time is plotted. In a steady state, the curve changes tend to be stable, that is, the curve tends to be horizontal or the rate of change of the magnetic moment is very small, and it is considered to be a steady state.

[0084] In the technical solution provided in this embodiment, a generative model is used to predict the magnetic moment distribution, replacing the traditional LLG formula for calculating the magnetic moment. The hierarchical structure is used to significantly reduce the time complexity, quickly predict the magnetic moment change with small error, and greatly improve the simulation speed.

[0085] Second embodiment

[0086] Based on the first embodiment, as an optional implementation, in this embodiment, in order to increase the inference speed of the model during the prediction process, the TensorRT engine can be used to accelerate the inference of the improved generation network.

[0087] Specifically, on the basis of the traditional generative network architecture, the TensorRT engine is also introduced to accelerate the reasoning of the Unet network. Specifically, the trained Unet model is exported from the original framework to an ONNX format model through the TensorRT engine. Optionally, the UNet model is converted using the torch_tensorrt.compile function and optimized using specific operator fusion and precision calibration strategies. Operator fusion reduces the number of memory accesses required during GPU execution, thereby reducing latency. In addition, the dynamic tensor memory allocation strategy optimizes the use of GPU memory and improves the ability to process large-scale image data.

[0088] Precision calibration allows the model to run in FP16 or INT8 format, balancing the relationship between computational speed and prediction accuracy. The model is calibrated for precision to balance the relationship between inference speed and model accuracy. Specifically, the Unet network is reduced from 32-bit floating point (FP32) to 16-bit floating point (FP16) or 8-bit integer (INT8) precision.

[0089] For example, the optimization process of the TensorRT engine is as follows:

[0090] 1. Export the trained Unet model from its original framework (such as PyTorch or TensorFlow) to ONNX (Open Neural Network Exchange) format; use TensorRT's parser to convert the ONNX model to TensorRT's internal optimized format.

[0091] 2. Calibrate the model to reduce the 32-bit floating point (FP32) to 16-bit floating point (FP16) or 8-bit integer (INT8) precision;

[0092] 3. Image optimization;

[0093] 4. Perform layer fusion, tensor reduction, and kernel auto-tuning;

[0094] 5. Compile and generate the inference engine according to the specific hardware environment configuration.

[0095] Optionally, in this embodiment, in order to adapt the network architecture of the generative model to the introduction of the TensorRT engine, the downsampling module of the encoder of the improved network architecture of the generative model is composed of a 3×3 convolution kernel, a two-dimensional convolution layer with a step size of 1 and a padding of 1. This setting is intended to maintain the image size through convolution operations while increasing the depth of the features. In addition, a batch normalization layer and a LeakyReLU activation layer are set after each convolution layer. Dropout is not included. Such a configuration helps the model increase the number of feature channels while reducing the size, allowing the model to capture higher-level abstract features.

[0096] In the technical solution provided in this embodiment, a high-performance deep learning inference engine TensorRT is introduced into the generation model, and the architecture of the generation model is optimized to further improve the processing speed.

[0097] Third embodiment

[0098] Based on any of the foregoing embodiments, in this embodiment, before step S10, the method further includes:

[0099] Step S30, initializing the weights of each layer configuration in the generated network to be trained;

[0100] Step S40, inputting the pre-processed simulation data set containing Gaussian noise into the to-be-trained generation network in batches for training through batch processing;

[0101] Step S50, obtaining the predicted magnetic moment distribution calculated based on the weight and activation function for each layer in the generated network to be trained;

[0102] Step S60, calculating a mean square error between the predicted magnetic moment distribution and the reference magnetic moment distribution;

[0103] Step S70, adjusting the weights in the network based on the mean square error value;

[0104] Step S80, executing the above steps in a loop;

[0105] Step S90, when the number of cycles of the above steps meets the preset number of cycles, the cycle is stopped, and the current generated network to be trained is determined as the improved generated network after training.

[0106] As an optional embodiment, in this embodiment, in order to improve the robustness of the model when facing complex and changing conditions in the real world, the weights of each layer configuration in the generated network to be trained are first initialized.

[0107] Furthermore, the pre-processed simulated data set containing Gaussian noise is input into the to-be-trained generative network in batches for training through batch processing. Optionally, each batch contains 100 samples.

[0108] It should be noted that in order to enhance the robustness of the model and simulate data disturbances in the real world, Gaussian noise is used to process the original data. Gaussian noise, also known as normal distribution noise, is a common statistical noise that simulates errors and uncertainties in the data acquisition process by adding random values ​​to the data.

[0109] Optionally, Gaussian noise is noise generated according to a normal distribution , where N is the normal distribution, 0 is the mean, is the variance, To control the intensity of noise.

[0110] Optionally, for each magnetic moment state and , randomly generate noise according to the normal distribution and add it to the original data: , .in and They represent the magnetic moment states after adding noise.

[0111] Further, the predicted magnetic moment of each layer in the training generation network is obtained based on the weight and activation function. Specifically, the data is passed through the generation model, and the output of each layer is calculated based on the weight and activation function.

[0112] Furthermore, at the end of each iteration, the loss between the output and the true state is calculated, and the mean square error value is used as the loss value for calculation, which can calculate the difference between the magnetic moment state predicted by the model and the actual magnetic moment state. The Adam optimizer is used because it shows good convergence speed and stability in various deep learning tasks.

[0113] Optionally, in this embodiment, Two loss functions are used to optimize the robustness of the model:

[0114] First, , which measures the prediction value after three iterations of prediction With the actual label The mean square error between .

[0115] second, In order to evaluate the model's ability to resist noise, Represents the operation of adding Gaussian noise to the data.

[0116] The total loss function is defined as , where a is the loss weight.

[0117] Further, the weights in the network are adjusted based on the mean square error value, and finally, the above steps are executed repeatedly, and when the number of cycles of the above steps meets the preset number of cycles, the cycle is stopped, and the current generation network to be trained is determined as the improved generation network after training. Optionally, the preset number of cycles can be 100 times.

[0118] By combining these two loss functions, the model can not only optimize the data fitting accuracy, but also enhance its resistance to data interference.

[0119] In some specific implementation training processes, we found that The value of is reduced from 0.008 to 0.0015, while It dropped from 0.6 to 0.05, showing that the model significantly improved its prediction accuracy and anti-interference ability during the training process.

[0120] In addition, in some specific implementation schemes, in order to verify that the aforementioned improved generation network can significantly speed up the calculation speed while ensuring the accuracy control, we conducted the following experiments to verify that in the implementation scheme, the generation model is built based on the improved Unet architecture:

[0121] Reference Figure 5 The RGB diagram of the training data set is shown. The training data set represents the initial state from random Gradually iterate to steady state data.

[0122] Reference Figure 6A schematic diagram showing the comparison of the time required for various methods in predicting magnetic moments of different sizes. The "MAG" column indicates the time required for iterative calculations using the Landau-Lifshitz-Gilbert (LLG) equation of traditional micromagnetism, the "Unetbase" column shows the time required for predictions using the traditional Unet model, and the "Unet" column represents the time required for predictions using the improved Unet model. The ratios "ratio1" and "ratio2" respectively indicate the acceleration times of the prediction time of the basic Unet model and the Unet model after engine acceleration relative to the LLG equation.

[0123] The data shows that the generative model proposed in this solution is built on the Unet architecture and performs well in improving prediction speed. Especially in large-scale application scenarios (size greater than 512), the acceleration of using the Unet model is dozens of times compared with the traditional direct solution of the LLG equation. This significant performance improvement verifies the high efficiency and practicality of this technical solution in handling large-scale magnetic material simulation tasks.

[0124] Specifically, when the size is 2048, the processing time of the original MAG equation is 0.045 seconds, while the optimized Unet model (Unet) only takes 0.00245 seconds, which is about 18 times faster (ratio2 column).

[0125] Further, see Figure 7 The RGB comparison diagram between the predicted magnetic moment and the measured magnetic moment is shown. The first row shows the RGB comparison diagram for any magnetic moment. The second row shows the true prediction value (label), indicating Start to iterate backward to get the magnetic moment The third row shows the Unet model predictions. . Through our data filtering strategy, the first row With the second line There is a clear distinction between the two. At the same time, the second row Compared with the third row predicted by Unet The similarity between them is extremely high, showing the high accuracy of the model prediction. This result not only verifies the effectiveness of the data screening strategy, but also proves the high efficiency and accuracy of the UNet model in processing this type of data.

[0126] Further, see Figure 8 The model training and testing effect diagram after adding Gaussian noise is shown in Figure 1, where: Figure 8 (a) Figure 8 (c) shows the effect on the training set, where Gaussian noise is artificially added to the training data to enhance the robustness of the model; Figure 8 (b) Figure 8 (d) shows the prediction effect of the model without Gaussian noise interference. The upper part of the figure is an RGB image, which is used to intuitively display the input visual information; the lower part is a feature point map, which marks the areas that have a greater impact on the model prediction. By comparing the points in the upper and lower figures, the model's ability to learn and predict important features can be evaluated.

[0127] Further, see Fig. 9 The training loss curve of the Unet model after adding Gaussian noise is shown. This figure shows the loss curve of the UNet model during training and testing. Both the training error (train) and the test error (test) show a rapid and obvious convergence trend, indicating that the model has a good ability to fit the data. The figure also includes the ground truth loss curves (train_groundtruth and test_groundtruth) of the training truth value and the test truth value, which indicate the difference between the input data and the labeled data. As the training progresses, the model shows enhanced fitting accuracy, with the training error dropping from 0.6 to about 0.05, and the error for noise immunity dropping from 0.008 to 0.0015, indicating an improvement in the robustness of the model. The figure shows the total Loss.

[0128] In addition, it can be understood by a person skilled in the art that all or part of the processes in the method for implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the micromagnetic dynamics simulation system based on the generative model to implement the process steps of the embodiment of the above-mentioned method.

[0129] Therefore, the present invention also provides a computer-readable storage medium, which stores a micromagnetodynamics simulation program based on a generative model. When the micromagnetodynamics simulation program based on a generative model is executed by a processor, the various steps of the micromagnetodynamics simulation method based on a generative model described in the above embodiment are implemented.

[0130] The computer-readable storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0131] It should be noted that since the storage medium provided in the embodiment of the present application is the storage medium used to implement the method of the embodiment of the present application, based on the method introduced in the embodiment of the present application, the person skilled in the art can understand the specific structure and deformation of the storage medium, so it is not repeated here. All storage media used in the method of the embodiment of the present application belong to the scope of protection of this application.

[0132] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0133] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0134] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0135] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0136] It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claim. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0137] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0138] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A micromagnetic dynamics simulation method based on a generative model, characterized in that: The invention is applied to a micro-magnetodynamics simulation system based on a generative model, wherein the micro-magnetodynamics simulation system based on a generative model comprises an improved generative network, and the method comprises the following steps: Obtaining the predicted magnetic moment distribution of the next time step predicted by the improved generation network; Inputting the predicted magnetic moment distribution as the magnetic moment distribution of the next time step into the micromagnetodynamics equation to perform iterative prediction of consecutive time steps until the iteratively obtained magnetic moment distribution approaches a steady state; Before the step of obtaining the predicted magnetic moment distribution of the next time step predicted by the improved generation network, the method further includes: Initialize the weights of each layer of the generated network to be trained; Inputting the preprocessed simulation data set containing Gaussian noise into the to-be-trained generation network in batches for training through batch processing; Obtaining the predicted magnetic moment calculated based on the weight and activation function for each layer in the generated network to be trained; Calculating a mean square error value between the predicted magnetic moment and a reference magnetic moment; Adjusting weights in the network based on the mean square error value; Execute the above steps repeatedly; When the number of cycles of the above steps meets the preset number of cycles, the cycle is stopped, and the current generated network to be trained is determined as the improved generated network after training; The simulation data set containing Gaussian noise is a simulation data set of spin states of different scales increasing in multiples of 32 generated by randomly initialized iterative LLG equations, wherein the simulation data set of each scale includes the complete evolution process of the magnetic moment from the initial random spin state to the spin magnetic steady state.

2. The method according to claim 1, characterized in that The improved generation network exports the trained generation model from the original framework as a model in ONNX format through the pre-loaded engine, and converts the model in ONNX format into an internal optimization format of the pre-loaded engine through a parser in the pre-loaded engine.

3. The method according to claim 2, characterized in that The downsampling modules of the encoder in the improved generative network are composed of a 3×3 convolution kernel, a two-dimensional convolution layer with a step size of 1 and a padding of 1, and a batch normalization layer and a LeakyReLU activation layer are set after each convolution layer.

4. The method according to claim 3, characterized in that The upsampling module of the decoder in the improved generation network restores the image size through the Conv2DTranspose layer. The parameters in the upsampling module are the same as those of the downsampling module of the corresponding number of layers. A batch normalization layer and a ReLU activation layer are set after the upsampling module.

5. The method according to claim 4, characterized in that The improved generation network forms the final output through a ConvTranspose2d layer, a BatchNorm layer, a Tanh activation layer and a Conv2d layer in the output stage.

6. A micromagnetic dynamics simulation system based on a generative model, characterized in that: The generative model-based micromagnetodynamics simulation system comprises: a memory, a processor and a generative model-based micromagnetodynamics simulation program stored in the memory and executable on the processor. When the generative model-based micromagnetodynamics simulation program is executed by the processor, the steps of the generative model-based micromagnetodynamics simulation method as described in any one of claims 1 to 5 are implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a micromagnetodynamics simulation program based on a generative model, and when the micromagnetodynamics simulation program based on a generative model is executed by a processor, the steps of the micromagnetodynamics simulation method based on a generative model as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Physical neural network construction method based on magnetic skyrmion nano oscillator

    CN116702848A

  • Self-adaptive scale micro-magnetic simulation method based on deep learning

    CN118246349A