Hysteresis loop prediction model establishment method and device, electronic equipment and storage medium

By improving the combination of convolutional neural network and K nearest neighbor algorithm, the problem of low efficiency of the existing hysteresis loop prediction model in parameter identification and training time is solved, and more efficient training and better generalization capabilities are achieved.

CN119670538AActive Publication Date: 2025-03-21GUANGDONG POWER GRID CO LTD DONGGUAN POWER SUPPLY BUREAU +2

Patent Information

Application Number
CN202411677212.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-03-21
Estimated Expiration
2044-11-22

AI Technical Summary

Technical Problem

The existing hysteresis loop prediction models have low efficiency in parameter identification and training time, and are prone to overfitting, which affects the generalization ability of the model.

Method used

The improved convolutional neural network is used to combine K nearest neighbor algorithm to establish a hysteresis loop prediction model, reduce the risk of overfitting through the Dropout layer, simplify the network structure to improve training speed, and use the K nearest neighbor algorithm to adjust the model to adapt to the data distribution.

Benefits of technology

It effectively prevents the occurrence of overfitting, significantly improves the training speed and resource consumption of the model, and improves the generalization ability and accuracy of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119670538A_ABST
    Figure CN119670538A_ABST
Patent Text Reader

Abstract

The invention provides a hysteresis loop prediction model establishment method and device, electronic equipment and a storage medium, and the method comprises the steps: carrying out a hysteresis characteristic experiment on a ferromagnetic material, setting hysteresis loop related characteristics comprising magnetic induction intensity waveform data and magnetic field waveform data under the excitation of preset sine waves under different magnetic induction intensity peak values, establishing a hysteresis loop prediction model comprising an improved convolutional neural network model and a K-nearest neighbor algorithm model, training the improved convolutional neural network model, inputting a magnetic induction intensity peak value and magnetic induction intensity waveform data, and outputting magnetic field waveform data; and adjusting the magnetic field waveform data based on the feature data by using a K-nearest neighbor algorithm model to obtain a final magnetic field waveform result. According to the method, the hysteresis loop prediction model is established based on the improved convolutional neural network in combination with the K nearest neighbor algorithm, the overfitting phenomenon can be prevented, the training speed is higher, the resource consumption is lower, and rapid iteration and adjustment in practical application are facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of magnetic material technology, and in particular to a method, device, electronic equipment and storage medium for establishing a hysteresis loop prediction model. Background Art

[0002] Electrical steel sheets are widely used in various electrical equipment such as transformers and motors, and play an important role in electrical engineering and equipment. However, as an easily magnetized ferromagnetic material, electrical steel sheets have unique hysteresis characteristics, which are particularly important when modeling electrical equipment that contains a large amount of ferromagnetic materials. The hysteresis loop prediction model can effectively characterize the actual magnetization characteristics and loss of ferromagnetic materials. The accurate construction of the hysteresis loop prediction model for ferromagnetic materials is of great significance to the design accuracy and operation safety of electrical equipment.

[0003] At present, the models for simulating the hysteresis characteristics of soft magnetic materials mainly include the Preisach model and the Jiles-Atherton (JA) model. The Preisach model is based on the macroscopic magnetization theory and is a purely mathematical model. However, the classical Preisach model has some limitations in practical applications. It only considers the irreversible component of hysteresis, but ignores the actual reversible component and its interaction with the external magnetic field. This leads to limited accuracy of the classical Preisach model under most magnetic materials and application conditions. Since the JA model was proposed in 1984, it has become the most commonly used hysteresis loop prediction model due to its high computational efficiency and clear physical meaning. However, the hysteresis modeling accuracy of the JA model is jointly determined by five parameters. Therefore, it is crucial to accurately and efficiently identify these parameters. However, the current parameter fitting mostly relies on the hysteresis loop obtained from the experiment. The parameters are determined by analyzing special points (such as coercive force, residual magnetization, etc.), which often leads to low accuracy and efficiency of parameter identification. Alternatively, optimization algorithms including particle swarm optimization and genetic algorithm are used for parameter identification. Although these algorithms have improved the efficiency of parameter extraction to a certain extent, they often converge slowly and are prone to fall into local optimal solutions, thus affecting the accurate and rapid identification of JA model parameters.

[0004] The magnetization mechanism of ferromagnetic materials is very complex, involving the movement of magnetic domains, including multiple energy forms such as exchange energy, external field energy, and anisotropic energy. Traditional hysteresis loop prediction models mainly rely on mathematical tools, which are difficult to accurately describe the magnetization process of materials. In contrast, neural network algorithms perform well in modeling black box systems with unclear physical mechanisms. Therefore, many researchers have begun to use neural network technology to build hysteresis loop prediction models.

[0005] In the study of hysteresis modeling, many scholars have successfully applied neural networks. Some scholars have used long short-term memory networks to establish a hysteresis loop prediction model for materials. By learning the magnetization characteristics in time series data, the dynamic hysteresis characteristics of the material are effectively captured. However, the model training time takes several hours and the training time is long. Therefore, although neural networks have shown potential in hysteresis characteristic modeling, they still face the following problems in practical applications:

[0006] Overfitting problem: Neural network models are prone to overfitting, which leads to poor performance of the model on test data. Overfitting may be caused by the complexity of the network structure and the noise of the training data, which requires researchers to adopt effective regularization strategies during model design and training.

[0007] Complexity of structural design: The structural design of neural networks is complex. Selecting a suitable network structure is the key to neural network modeling. The selection of hyperparameters such as the number of network layers, number of nodes, and activation functions directly affects model performance.

[0008] Training time and resources: The training process of neural networks can require a lot of computing resources and time, especially when dealing with large-scale datasets, where computational efficiency becomes an important issue. This may limit its application in resource-limited environments. Summary of the invention

[0009] In view of the deficiencies of the prior art, the purpose of the present invention is to provide a method, device, electronic device and storage medium for establishing a hysteresis loop prediction model, which is based on an improved convolutional neural network combined with a K-nearest neighbor algorithm to establish a hysteresis loop prediction model. The method can prevent the occurrence of overfitting, and the training speed is faster, the resource consumption is less, and it is convenient for rapid iteration and adjustment in practical applications. Combined with the K-nearest neighbor algorithm, the model can not only obtain excellent performance in the feature extraction stage, but also can be adjusted through a simple and effective K-nearest neighbor method in the establishment of the final model. Therefore, the model can better adapt to the data distribution and further improve the accuracy of the model.

[0010] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0011] A method for establishing a hysteresis loop prediction model comprises the following steps:

[0012] Conducting hysteresis characteristic experiments on ferromagnetic materials, setting the hysteresis loop related features under preset sinusoidal wave excitation at different magnetic induction intensity peaks, the hysteresis loop related features including magnetic induction intensity waveform data and magnetic field waveform data;

[0013] A hysteresis loop prediction model is established. The hysteresis loop prediction model includes an improved convolutional neural network model and a K-nearest neighbor algorithm model. The improved convolutional neural network model is used for data training. The input is the magnetic induction intensity peak value and the magnetic induction intensity waveform data, and the output is the magnetic field waveform data. The trained improved convolutional neural network model is obtained. The feature data obtained by the trained improved convolutional neural network model is obtained, and the target value is set as the magnetic field waveform data. The improved convolutional neural network model is used to adjust the magnetic field waveform data based on the feature data to obtain the final magnetic field waveform result.

[0014] Furthermore, data standardization is performed on the magnetic induction intensity peak value, magnetic field intensity waveform and magnetic field waveform data, and the standardized magnetic induction intensity peak value, magnetic field intensity waveform and magnetic field waveform data are used for training in the improved convolutional neural network.

[0015] Furthermore, the method for performing data standardization processing on the magnetic induction intensity peak value, the magnetic field intensity waveform and the magnetic field waveform data is as follows:

[0016] The peak value of magnetic induction intensity, magnetic field intensity waveform and magnetic field waveform data obtained from the hysteresis characteristic experiment are arranged in columns. Each column of data is converted to the same scale through the Standard Scaler standardization method. Each data is set as a eigenvalue. The formula for standardizing each eigenvalue is:

[0017]

[0018] Among them, X is the eigenvalue, μ is the mean of each column feature, σ is the standard deviation of each column feature, X scaled It is a standardized magnetic field intensity waveform or magnetic field waveform data.

[0019] Furthermore, the improved convolutional neural network model includes a convolution layer, a pooling layer, a flattening layer, a first fully connected layer, a Dropout layer, a second fully connected layer and an output layer, wherein

[0020] The convolution layer uses 32 convolution kernels to generate 32 feature maps. The size of each convolution kernel is 1 row and 2 columns. Formula (2) is used as the activation function to introduce nonlinear characteristics. Formula (2) is:

[0021] f(x)=max(0,x)(2)

[0022] Where x represents the activation value received by the neuron. When the input x>0, the output is x, and when the input x≤0, the output is 0.

[0023] The pooling layer is used for downsampling, and the pooling layer window size is 1 row and 1 column;

[0024] The flattening layer is used to convert the multi-dimensional input data into one-dimensional data and input it into the first fully connected layer;

[0025] The first fully connected layer has 64 neurons and uses ReLU as the activation function;

[0026] The dropout rate of the Dropout layer is 40% to 60%;

[0027] The second fully connected layer contains 1 neuron.

[0028] Furthermore, in the training process of the improved convolutional neural network model, the back propagation algorithm is used to adaptively adjust the parameters according to the current prediction error in each iteration, and the loss function adopts the mean square error.

[0029] Furthermore, the K nearest neighbor algorithm model is used to adjust the magnetic field strength waveform result, and the method of outputting the final magnetic field strength waveform result is:

[0030] The sample to be predicted is set as the magnetic field intensity waveform result. For each sample to be predicted, the K nearest neighbor algorithm uses the Euclidean distance to calculate the distance between the sample to be predicted and all samples in the training set.

[0031] According to the calculated distance, find the K nearest neighbor samples closest to the sample to be predicted;

[0032] The K nearest neighbor algorithm model is used to extract K target values ​​corresponding to the K nearest neighbor samples one by one, and the final prediction value is generated by calculating the mean of the K target values, and the final prediction value is used as the final magnetic field waveform result.

[0033] Furthermore, a 5-fold cross validation was added to the K-nearest neighbor algorithm, and the data set of the magnetic field intensity waveform results was divided into 5 subsets. Each time, 1 subset was selected from the 5 subsets as the validation set, and the remaining 4 subsets were used as the training set. The training set was trained and evaluated on the test set.

[0034] In cross validation, the mean square error for each fold is calculated as shown in formula (6);

[0035]

[0036] Among them, m i is the number of samples in the i-th fold, y ij is the true value of the i-th fold, is the predicted value of the i-th fold.

[0037] A device for establishing a hysteresis loop prediction model, comprising:

[0038] A data acquisition module is used to perform a hysteresis characteristic experiment on ferromagnetic materials, and set the hysteresis loop related features under preset sinusoidal wave excitation at different magnetic induction intensity peak values. The hysteresis loop related features include magnetic induction intensity waveform data and magnetic field waveform data;

[0039] The model building module is used to establish a hysteresis loop prediction model. The hysteresis loop prediction model includes an improved convolutional neural network model and a K nearest neighbor algorithm model. The improved convolutional neural network model is used for data training. The input is the magnetic induction intensity peak value and the magnetic induction intensity waveform data. The output is the magnetic field waveform data to obtain the trained improved convolutional neural network model; the characteristic data obtained by the trained improved convolutional neural network model is obtained, the target value is set as the magnetic field waveform data, and the K nearest neighbor algorithm model is used to adjust the magnetic field waveform data based on the characteristic data to obtain the final magnetic field waveform result.

[0040] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for establishing a hysteresis loop prediction model when executing the program.

[0041] A non-transitory computer-readable storage medium stores a computer program, which implements the above-mentioned method for establishing a hysteresis loop prediction model when executed by a processor.

[0042] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0043] The method for establishing a hysteresis loop prediction model in the present invention adds a Dropout layer to a traditional convolutional neural network to prevent the occurrence of overfitting. By randomly discarding a portion of neurons, the improved convolutional neural network model is less dependent on specific training data, and the generalization ability of the model is improved, making it more robust when processing new and unseen data. The structural design of the improved convolutional neural network model adopts a six-layer structure, which can not only maintain the flexibility of the model, but also greatly reduce the computational complexity. This design makes the improved convolutional neural network model faster and consumes less resources during training, which is convenient for rapid iteration and adjustment in practical applications. Combined with the K nearest neighbor algorithm, the improved convolutional neural network model can not only obtain excellent performance in the feature extraction stage, but also can be adjusted through a simple and effective K nearest neighbor method in the establishment of the final hysteresis loop prediction model. Therefore, the hysteresis loop prediction model can better adapt to the data distribution and further improve the accuracy of the hysteresis loop prediction model. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments of the present invention and, together with the description, further serve to explain the principles of the invention and to enable one skilled in the art to make and use the present disclosure.

[0045] Figure 1 It is a flow chart of the method for establishing the hysteresis loop prediction model of the present invention;

[0046] Figure 2 is a flow chart of a method for establishing a hysteresis loop prediction model according to a specific embodiment of the present invention;

[0047] Figure 3 A schematic diagram of the structure of an improved convolutional neural network model provided by an embodiment of the present invention;

[0048] Figure 4 A comparison between the hysteresis loop prediction model establishment method provided in the embodiment of the present invention and the traditional convolutional neural network simulation of hysteresis characteristics when Bm=1.7T;

[0049] Figure 5 It is a schematic diagram of a device for establishing a hysteresis loop prediction model of the present invention. DETAILED DESCRIPTION

[0050] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0051] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0052] Example 1

[0053] Embodiment 1 provides a method for establishing a hysteresis loop prediction model, such as Figure 1 and Figure 2 As shown, the following steps are included:

[0054] Step S1: Conducting a hysteresis characteristic experiment on the ferromagnetic material, setting the hysteresis loop related features under the preset sinusoidal wave excitation at different magnetic induction intensity peak values, the hysteresis loop related features including magnetic induction intensity waveform data and magnetic field waveform data;

[0055] Step S2: Establish a hysteresis loop prediction model, which includes an improved convolutional neural network model and a K nearest neighbor algorithm model. The improved convolutional neural network model is used for data training. The input is the magnetic induction intensity peak value and the magnetic induction intensity waveform data, and the output is the magnetic field waveform data. The trained improved convolutional neural network model is obtained; the feature data obtained by the trained improved convolutional neural network model is obtained, the target value is set as the magnetic field waveform data, and the K nearest neighbor algorithm model is used to adjust the magnetic field waveform data based on the feature data to obtain the final magnetic field waveform result.

[0056] The present embodiment provides a method for establishing a hysteresis loop prediction model, which is based on an improved convolutional neural network model combined with a K-nearest neighbor algorithm model to establish a hysteresis loop prediction model. This method can prevent the occurrence of overfitting, and is faster and consumes less resources during training, which is convenient for rapid iteration and adjustment in practical applications. Combined with the K-nearest neighbor algorithm, the model can not only obtain excellent performance in the feature extraction stage, but also be adjusted through a simple and effective K-nearest neighbor method in the establishment of the final model. Therefore, the model can better adapt to the data distribution and further improve the accuracy of the model.

[0057] In this embodiment, data standardization is performed on the magnetic induction intensity peak value, magnetic induction intensity waveform data and magnetic field waveform data, and the standardized magnetic induction intensity peak value, magnetic induction intensity waveform data and magnetic field waveform data are used for training in the improved convolutional neural network.

[0058] In this embodiment, the method for performing data standardization processing on the magnetic induction intensity peak value, the magnetic field intensity waveform and the magnetic field waveform data is as follows:

[0059] The peak value of magnetic induction intensity, the waveform data of magnetic induction intensity and the waveform data of magnetic field obtained from the hysteresis characteristic experiment are arranged in columns. Each column of data is converted to the same scale by the Standard Scaler standardization method. Each data is set as a characteristic value. The formula for standardizing each characteristic value is:

[0060]

[0061] Among them, X is the eigenvalue, μ is the mean of each column feature, σ is the standard deviation of each column feature, X scaled It is standardized magnetic induction intensity waveform data or magnetic field waveform data.

[0062] In step S2 of this embodiment, Figure 3As shown, the improved convolutional neural network model includes a convolutional layer, a pooling layer, a flattening layer, a first fully connected layer, a Dropout layer, a second fully connected layer and an output layer. This embodiment designs an improved convolutional neural network model, improves the traditional convolutional neural network by adding a Dropout layer, and constructs an improved convolutional neural network with a total of 6 layers including 1 convolutional layer, 1 pooling layer, 1 flattening layer, 2 fully connected layers and 1 Dropout layer. The improved convolutional neural network model has a simple structure, which includes a convolutional layer and a pooling layer, which is specifically used to extract effective features from input data. In the establishment of the hysteresis loop prediction model, the convolution layer can automatically identify local patterns and structures in the data through the sliding window technology, while the pooling layer reduces the feature dimension by downsampling and retains the most significant information. This feature extraction capability helps the hysteresis loop prediction model capture the complex relationship between the peak value of the magnetic induction intensity and the magnetic induction intensity waveform data. Adding a Dropout layer to the network structure randomly "discards" a certain proportion of neurons, effectively reducing the complexity and overfitting risk of the hysteresis loop prediction model. This ensures that the hysteresis loop prediction model will not rely on a specific neuron during training, but can learn more robust feature representations, thereby improving the generalization ability of the hysteresis loop prediction model and ensuring the stability of the hysteresis loop prediction model.

[0063] In this embodiment, the convolution layer uses 32 convolution kernels to perform convolution operations on the input magnetic induction intensity peak value and magnetic induction intensity waveform data to capture different feature modes to generate 32 feature maps. The size of each convolution kernel is 1 row and 2 columns. Formula (2) is used as the activation function to introduce nonlinear characteristics and enhance the expression ability of the model. Formula (2) is:

[0064] f(x)=max(0,x)(2)

[0065] Where x represents the activation value received by the neuron. When the input x>0, the output is x, and when the input x≤0, the output is 0.

[0066] The pooling layer is used for downsampling to reduce the dimension and computational complexity of the data. The pooling layer window size is 1 row and 1 column.

[0067] The flattening layer is used to convert the multi-dimensional input data into one-dimensional data and input it into the first fully connected layer;

[0068] The first fully connected layer has 64 neurons and uses ReLU as the activation function to improve the nonlinear expression ability of the model;

[0069] The dropout rate of the Dropout layer is 40% to 60%. In the specific implementation of this embodiment, the dropout rate of the Dropout layer is 50%. The Dropout layer is used to reduce the risk of overfitting. During the training process, 50% of the neurons are randomly ignored to enhance the generalization ability of the model;

[0070] The second fully connected layer contains 1 neuron and outputs a value as the model's prediction result for the magnetic field waveform data.

[0071] In this embodiment, in the training process of the improved convolutional neural network model, the back propagation algorithm is used to adaptively adjust the parameters according to the current prediction error in each iteration, and the loss function adopts the mean square error. In the training process, the back propagation algorithm is used to adaptively adjust the parameters according to the current prediction error in each iteration, and the learning of the important features in the data by the hysteresis loop prediction model is accelerated, so that the performance is continuously optimized during the training process, so that the prediction results gradually approach the true value. The minimization process of the loss function will prompt the model to learn the important laws in the data.

[0072] The loss function used in the present invention is the mean square error shown in formula (3).

[0073]

[0074] Among them, y i is the actual value, is the predicted value, n is the number of samples, and i is the i-th sample index.

[0075] In this embodiment, in order to improve the accuracy of the hysteresis loop prediction model, an improved convolutional neural network model and a K-nearest neighbor algorithm model are combined to perform precise adjustment of the hysteresis loop prediction model.

[0076] The training data set of the K-nearest neighbor algorithm is the features extracted by the improved convolutional neural network model, and the target value is the magnetic field waveform data. After the training is completed, the new magnetic induction intensity peak value and magnetic induction intensity waveform data are input into the hysteresis loop prediction model to predict the magnetic field waveform data and obtain the final magnetic field waveform result.

[0077] In this embodiment, the K nearest neighbor algorithm model is used to adjust the magnetic field strength waveform result, and the method for outputting the final magnetic field strength waveform result is:

[0078] The sample to be predicted is set as the magnetic field intensity waveform result. For each sample to be predicted, the K nearest neighbor algorithm uses the Euclidean distance to calculate the distance between the sample to be predicted and all samples in the training set.

[0079] According to the calculated distance, find the K nearest neighbor samples closest to the sample to be predicted;

[0080] The K nearest neighbor algorithm model is used to extract K target values ​​corresponding to the K nearest neighbor samples one by one, and the final prediction value is generated by calculating the mean of the K target values, and the final prediction value is used as the final magnetic field waveform result.

[0081] In this embodiment, for each sample to be predicted, the K nearest neighbor algorithm uses the Euclidean distance of formula (4) to calculate the distance between the sample to be predicted and all samples in the training set;

[0082]

[0083] d(x,x i ) is the input sample x and x to be predicted i The Euclidean distance between training samples, n is the number of features of the sample, x j and x ij are the values ​​of the input sample to be predicted and the training sample on the jth feature respectively.

[0084] The K nearest neighbor algorithm model is used to extract K target values ​​corresponding to the K nearest neighbor samples one by one, and the final prediction value is generated by calculating the mean of the K target values. The calculation formula is shown in formula (5).

[0085]

[0086] in, is the final predicted value, y i is the actual target value of the K nearest neighbor samples.

[0087] In this embodiment, three nearest neighbor samples and K target values ​​corresponding to the three nearest neighbor samples are extracted.

[0088] In this embodiment, a 5-fold cross validation is added to the K-nearest neighbor algorithm, and the data set is divided into 5 subsets. Each time, one of the 5 subsets is selected as the validation set, and the remaining 4 are used as the training set. The model is trained and evaluated on the test set.

[0089] In cross validation, the mean square error for each fold is calculated as shown in formula (6).

[0090]

[0091] Among them, m i is the number of samples in the i-th fold, y ij is the true value of the i-th fold, is the predicted value of the i-th fold, and j is the index of the j-th sample in the validation set.

[0092] The method for establishing the hysteresis loop prediction model is described in detail below through a specific embodiment.

[0093] Data preprocessing,In this stage, data collection is first carried out, and the hysteresis characteristics experiment is carried out on the 23RK85 model silicon steel sheet to obtain experimental data. The data includes the relevant characteristics of the hysteresis loop under 50Hz sinusoidal wave excitation with different magnetic induction intensity peak values ​​Bm, including magnetic induction intensity waveform data B and magnetic field waveform data H.

[0094] The data is normalized and the magnetic induction intensity peak value, magnetic field intensity waveform and magnetic field waveform data are converted to the same scale through the StandardScaler standardization method.

[0095] After the data preprocessing is completed, the data dimensions of the magnetic induction intensity peak value, the magnetic field intensity waveform and the magnetic field waveform data are converted into a four-dimensional feature matrix that can be input into the convolutional neural network;

[0096] The magnetic induction intensity peak value Bm and the magnetic induction intensity waveform data B are used as the input of the improved convolutional neural network model, and the magnetic field waveform data H is used as the output of the improved convolutional neural network model.

[0097] Among them, in the improved convolutional neural network model, a data set of magnetic induction intensity peak, magnetic field intensity waveform and magnetic field waveform data is established, and 80% of the data in the data set is divided as a training set and 20% of the data as a test set. The matrix of the training set is (0.8n, 1, 2, 1), and the matrix of the test set is (0.2n, 1, 2, 1), where n is the total number of samples, each sample contains 1 channel, 2 features, and the depth of each feature map is 1.

[0098] During the training process, the model parameters are continuously adjusted through the back-propagation algorithm, and the loss function used is the mean square error.

[0099] The K nearest neighbor algorithm model is used to adjust the magnetic field intensity waveform result and output the final magnetic field intensity waveform result.

[0100] Add 5-fold cross validation to the K-nearest neighbor algorithm model.

[0101] After multiple verifications, the hysteresis loop prediction model can better generalize to unseen data and reduce the risk of overfitting.

[0102] The hysteresis loop prediction model constructed by the improved convolutional neural network model combined with the K-nearest neighbor algorithm model in the present invention is compared with the hysteresis loop prediction model constructed by the traditional convolutional neural network. The traditional convolutional neural network used for comparison includes a six-layer structure, 2 convolutional layers, 2 pooling layers, 1 flattening layer, and 1 fully connected layer.

[0103] The comparison results are shown in Table 1;

[0104] Table 1 Comparison of the hysteresis loop prediction model based on the traditional convolutional neural network and the improved convolutional neural network model combined with the K nearest neighbor algorithm model

[0105] algorithm Training set mean square error Test set mean square error Total time Traditional Convolutional Neural Network 0.0068614 0.0291109 3.54 seconds Improved Convolutional Neural Network-K Nearest Neighbor Algorithm 0.0003609 0.0011165 2.62 seconds

[0106] As shown in Table 1, the hysteresis loop prediction model constructed based on the improved convolutional neural network model combined with the K nearest neighbor algorithm model has a mean square error of 0.0003609 on the training set, a mean square error of 0.0011165 on the test set, and a total time consumption of 2.62 seconds. The mean square error of the traditional convolutional neural network on the training set is 0.0068614, the mean square error on the test set is 0.0291109, and the total time consumption is 3.54 seconds.

[0107] The hysteresis characteristics when the peak value of magnetic induction intensity Bm = 1.7 are simulated. Figure 4 It can be clearly seen that the hysteresis loop prediction model constructed based on the improved convolutional neural network model combined with the K nearest neighbor algorithm model is more in line with the actual test data than the hysteresis loop prediction model constructed by the traditional convolutional neural network. The hysteresis loop prediction model constructed based on the improved convolutional neural network model combined with the K nearest neighbor algorithm model has been greatly improved in accuracy and construction time.

[0108] Example 2

[0109] Embodiment 2 provides a device for establishing a hysteresis loop prediction model, such as Figure 5 As shown, including:

[0110] A data acquisition module is used to perform a hysteresis characteristic experiment on ferromagnetic materials, and set the hysteresis loop related features under preset sinusoidal wave excitation at different magnetic induction intensity peak values. The hysteresis loop related features include magnetic induction intensity waveform data and magnetic field waveform data;

[0111] The model building module is used to establish a hysteresis loop prediction model. The hysteresis loop prediction model includes an improved convolutional neural network model and a K nearest neighbor algorithm model. The improved convolutional neural network model is used for data training. The input is the magnetic induction intensity peak value and the magnetic induction intensity waveform data. The output is the magnetic field waveform data to obtain the trained improved convolutional neural network model; the characteristic data obtained by the trained improved convolutional neural network model is obtained, the target value is set as the magnetic field waveform data, and the K nearest neighbor algorithm model is used to adjust the magnetic field waveform data based on the characteristic data to obtain the final magnetic field waveform result.

[0112] Example 3

[0113] Embodiment 3 provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for establishing a hysteresis loop prediction model when executing the program.

[0114] Example 4

[0115] Embodiment 4 provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned method for establishing a hysteresis loop prediction model is implemented.

[0116] The memory in the embodiment of the present invention is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program used to operate on the electronic device.

[0117] The method for establishing a hysteresis loop prediction model disclosed in the embodiment of the present invention can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the method for establishing a hysteresis loop prediction model can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software. The above-mentioned processor may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present invention. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in a memory, and the processor reads the information in the memory, and completes the steps of the method for establishing a hysteresis loop prediction model provided in the embodiment of the present invention in combination with its hardware.

[0118] In an exemplary embodiment, the electronic device may be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), FPGA, general purpose processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned method.

[0119] It can be understood that the memory can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), direct memory bus random access memory (DRRAM). The memory described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0120] 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 method for establishing a hysteresis loop prediction model, characterized in that: The following steps are involved: Conducting hysteresis characteristic experiments on ferromagnetic materials, setting the hysteresis loop related features under preset sinusoidal wave excitation at different magnetic induction intensity peaks, the hysteresis loop related features including magnetic induction intensity waveform data and magnetic field waveform data; A hysteresis loop prediction model is established. The hysteresis loop prediction model includes an improved convolutional neural network model and a K-nearest neighbor algorithm model. The improved convolutional neural network model is used for data training. The input is the magnetic induction intensity peak value and the magnetic induction intensity waveform data, and the output is the magnetic field waveform data. The trained improved convolutional neural network model is obtained. The feature data obtained by the trained improved convolutional neural network model is obtained, and the target value is set as the magnetic field waveform data. The improved convolutional neural network model is used to adjust the magnetic field waveform data based on the feature data to obtain the final magnetic field waveform result.

2. The method for establishing a hysteresis loop prediction model according to claim 1, characterized in that: The magnetic induction intensity peak value, magnetic field intensity waveform and magnetic field waveform data are all standardized, and the standardized magnetic induction intensity peak value, magnetic field intensity waveform and magnetic field waveform data are used for training in the improved convolutional neural network.

3. The method for establishing a hysteresis loop prediction model according to claim 1, characterized in that: The method for performing data standardization processing on the magnetic induction intensity peak value, magnetic field intensity waveform and magnetic field waveform data is as follows: The peak value of magnetic induction intensity, magnetic field intensity waveform and magnetic field waveform data obtained from the hysteresis characteristic experiment are arranged in columns. Each column of data is converted to the same scale through the Standard Scaler standardization method. Each data is set as a eigenvalue. The formula for standardizing each eigenvalue is: Among them, X is the eigenvalue, μ is the mean of each column feature, σ is the standard deviation of each column feature, X scaled It is a standardized magnetic field intensity waveform or magnetic field waveform data.

4. The method for establishing a hysteresis loop prediction model according to claim 1, characterized in that: The improved convolutional neural network model includes a convolution layer, a pooling layer, a flattening layer, a first fully connected layer, a Dropout layer, a second fully connected layer and an output layer, where The convolution layer uses 32 convolution kernels to generate 32 feature maps. The size of each convolution kernel is 1 row and 2 columns. Formula (2) is used as the activation function to introduce nonlinear characteristics. Formula (2) is: f(x)=max(0,x)(2) Where x represents the activation value received by the neuron. When the input x>0, the output is x, and when the input x≤0, the output is 0. The pooling layer is used for downsampling, and the pooling layer window size is 1 row and 1 column; The flattening layer is used to convert the multi-dimensional input data into one-dimensional data and input it into the first fully connected layer; The first fully connected layer has 64 neurons and uses ReLU as the activation function; The dropout rate of the Dropout layer is 40% to 60%; The second fully connected layer contains 1 neuron.

5. The method for establishing a hysteresis loop prediction model according to claim 1, characterized in that: In the training process of the improved convolutional neural network model, the back propagation algorithm is used to adaptively adjust the parameters according to the current prediction error in each iteration, and the loss function adopts the mean square error.

6. The method for establishing a hysteresis loop prediction model according to claim 1, characterized in that: The K nearest neighbor algorithm model is used to adjust the magnetic field strength waveform result, and the method of outputting the final magnetic field strength waveform result is: The sample to be predicted is set as the magnetic field intensity waveform result. For each sample to be predicted, the K nearest neighbor algorithm uses the Euclidean distance to calculate the distance between the sample to be predicted and all samples in the training set. According to the calculated distance, find the K nearest neighbor samples closest to the sample to be predicted; The K nearest neighbor algorithm model is used to extract K target values ​​corresponding to the K nearest neighbor samples one by one, and the final prediction value is generated by calculating the mean of the K target values, and the final prediction value is used as the final magnetic field waveform result.

7. The method for establishing a hysteresis loop prediction model according to claim 1, characterized in that: Add 5-fold cross validation to the K-nearest neighbor algorithm, divide the data set of magnetic field intensity waveform results into 5 subsets, select 1 from the 5 subsets as the validation set each time, and the remaining 4 as the training set, train the training set and evaluate it on the test set; In cross validation, the mean square error for each fold is calculated as shown in formula (6); Among them, m i is the number of samples in the i-th fold, y ij is the true value of the i-th fold, is the predicted value of the i-th fold.

8. A device for establishing a hysteresis loop prediction model, characterized in that: include: A data acquisition module is used to perform a hysteresis characteristic experiment on ferromagnetic materials, and set the hysteresis loop related features under preset sinusoidal wave excitation at different magnetic induction intensity peak values. The hysteresis loop related features include magnetic induction intensity waveform data and magnetic field waveform data; The model building module is used to establish a hysteresis loop prediction model. The hysteresis loop prediction model includes an improved convolutional neural network model and a K nearest neighbor algorithm model. The improved convolutional neural network model is used for data training. The input is the magnetic induction intensity peak value and the magnetic induction intensity waveform data. The output is the magnetic field waveform data to obtain the trained improved convolutional neural network model; the characteristic data obtained by the trained improved convolutional neural network model is obtained, the target value is set as the magnetic field waveform data, and the K nearest neighbor algorithm model is used to adjust the magnetic field waveform data based on the characteristic data to obtain the final magnetic field waveform result.

9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for establishing a hysteresis loop prediction model as described in any one of claims 1 to 7 when executing the program.

10. A non-transitory computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method for establishing a hysteresis loop prediction model described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Dynamic hysteresis model for predicting hysteresis characteristics under high-frequency sine excitation

    CN115050433A

  • Method for simulating hysteresis characteristic of electrical steel under harmonic excitation

    CN116087847A

  • Transformer hysteresis determination method and device and transformer hysteresis detection system

    CN118820942A

  • Compensation control method for torsion angle of motor-driven joint based on hysteresis model

    CN118848961A

Cited By

  • Hysteresis loop simulation method, device, equipment and medium

    CN120874281A

  • Hysteresis loop simulation method, device, equipment and medium

    CN120874281B

  • J-A hysteresis model parameter identification method and system based on physical information neural network

    CN122017700A

  • J-a hysteresis model parameter identification method and system based on physical information neural network

    CN122017700B

  • Estimation device, learning device, estimation method, learning method, and computer program

    WO2026023692A1