Magnetic core loss improved random forest prediction model based on data driving

By introducing dynamic splitting threshold, feature interaction mechanism, adaptive weighting mechanism and gradient enhancement mechanism in the random forest model, the problem of low prediction accuracy of traditional core loss prediction models at high frequency and large temperatures is solved, and a higher prediction accuracy is achieved. Prediction accuracy and robustness.

CN119494065AInactive Publication Date: 2025-02-21NANTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411530471.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-21
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional core loss prediction model has large deviations in high frequency and large temperature ranges, making it difficult to deal with complex waveforms and nonlinear factors, and lacks the ability to model complex relationships of multivariables.

Method used

A data-driven core loss-improved random forest prediction model is proposed, which improves the prediction accuracy and robustness of the model through dynamic splitting threshold, feature interaction mechanism, adaptive weighting mechanism and gradient enhancement mechanism.

Benefits of technology

It significantly improves the prediction accuracy under high frequency and large temperature variation ranges, is suitable for loss prediction under complex operating conditions, has good generalization ability and robustness, and reduces the interference of noise and abnormal data on the prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494065A_ABST
    Figure CN119494065A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of prediction models, in particular to a magnetic core loss improved random forest prediction model based on data driving, which comprises the following steps: step 1, obtaining experimental data of a magnetic core material, the experimental data comprising magnetic core loss and magnetic flux density information under different materials, different temperatures, different frequencies and different excitation waveforms; 2, the obtained experimental data are preprocessed, the preprocessing step comprises data denoising, missing value filling and data normalization processing, and it is guaranteed that input data of a follow-up model has consistency and integrity; 3, based on the magnetic flux density sampling points and other related experiment conditions, key characteristic variables including magnetic flux density distribution, excitation waveform shape characteristics, temperature change trends and material characteristic parameters are extracted; and 4, constructing an improved random forest model. By optimizing the traditional random forest algorithm, the accuracy and robustness of the model in the aspect of predicting the magnetic core loss are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of prediction models, and in particular to an improved random forest prediction model for magnetic core loss based on data-driven. Background Art

[0002] Core loss is an important factor in the process of electric energy conversion of magnetic materials, which directly affects the performance and efficiency of power equipment and power converters. Traditional core loss prediction models (such as the Steinmetz equation and its improved version) have large deviations when predicting losses under high frequency and large temperature range, especially the limited processing capabilities for complex waveforms and nonlinear factors. In addition, traditional models are usually based on empirical formulas, which make it difficult to make full use of modern experimental data and lack the ability to model complex relationships of multiple variables. In order to solve these problems, the present invention proposes an improved core loss prediction model that can make full use of experimental data for feature extraction and multivariate analysis to improve the accuracy of core loss prediction. Summary of the invention

[0003] The purpose of the present invention is to solve the shortcomings of the prior art and propose a data-driven improved random forest prediction model for core loss, which is used for core loss prediction under different magnetic materials, temperatures, frequencies and excitation waveforms.

[0004] In order to achieve the above object, the present invention adopts the following technical solutions:

[0005] A data-driven improved random forest prediction model for magnetic core loss includes the following steps:

[0006] Step 1: Acquire experimental data of magnetic core materials, wherein the experimental data includes information on magnetic core loss and magnetic flux density under different materials, temperatures, frequencies and excitation waveforms;

[0007] Step 2: Preprocess the acquired experimental data, including data denoising, missing value filling and data normalization, to ensure the consistency and integrity of the input data of the subsequent model;

[0008] Step 3: Based on the magnetic flux density sampling points and other relevant experimental conditions, extract key characteristic variables, including magnetic flux density distribution, excitation waveform shape characteristics, temperature change trend and material characteristic parameters;

[0009] Step 4: Construct an improved random forest model. The improved random forest model adds the following improved modules based on the traditional random forest model:

[0010] Step 4.1: Introduce a dynamic splitting threshold into the node splitting criterion, and dynamically adjust the node splitting criterion according to the importance of each characteristic variable to loss prediction; the formula for core loss is:

[0011]

[0012] In the formula, α i is the feature variable weight, f i is the frequency, B i is the magnetic flux density, T is the temperature, β, γ, δ are the parameters in the model;

[0013] Step 4.2: Add a feature interaction mechanism to model the interrelationships among feature variables such as temperature, frequency, and magnetic flux density to improve the accuracy of the model in predicting losses under complex working conditions.

[0014] Step 4.3: For the processing of extreme loss values ​​and outliers, an adaptive weighting mechanism is used to make the model more robust and generalizable to extreme loss values ​​and outlier data points.

[0015] Step 4.4: During the model training process, the gradient enhancement mechanism is used to optimize the weights of the tree to improve the prediction accuracy;

[0016] Step 5: Use the preprocessed experimental data to train the improved random forest model, and determine the optimal model parameters through cross-validation to ensure the prediction effect of the model on the training set;

[0017] Step 6: Use the trained improved random forest model to predict the core loss of new sample data.

[0018] Preferably, in step 1, the acquisition of experimental data is achieved in the following manner: first, the loss and flux density data of the magnetic core material are collected under different temperature conditions (such as 25°C, 50°C, 70°C, 90°C); then, experimental data under different excitation waveforms (such as sine wave, triangular wave, trapezoidal wave) are collected within different frequency ranges (such as 50kHz to 500kHz); finally, different magnetic core materials (such as ferrite, powder core, nanocrystalline material, etc.) are experimentally measured to obtain their loss values ​​under different working conditions.

[0019] Preferably, in step 2, the preprocessing includes the following steps: using a filtering algorithm to remove the noise in the experimental data to ensure the stability of the data; using a nearest neighbor interpolation method to fill in the missing values ​​generated during the experiment to maintain the continuity of the data; using a normalization algorithm for data of different dimensions to make the data of each dimension operate at the same level to avoid the negative impact of excessive data differences on model training.

[0020] Preferably, in step 3, the extraction of characteristic variables includes: performing statistical analysis on the magnetic flux density sampling points of each experimental sample to extract its distribution characteristics, including parameters such as maximum value, minimum value, mean, variance and peak value; extracting the shape factor and waveform distribution pattern according to the shape characteristics of different excitation waveforms as important characteristic variables for model input; extracting temperature gradient characteristics for loss trends at different temperatures to capture the nonlinear effect of temperature on loss; analyzing the magnetic properties of different materials to extract material characteristic parameters such as saturation magnetic flux density and magnetic permeability to reflect the loss change law of the material under different working conditions.

[0021] Preferably, in step 4, the construction of the improved random forest model includes: based on the traditional random forest, improving the splitting criterion, adding a dynamic splitting threshold, and dynamically adjusting the splitting criterion of each node according to the importance of different feature variables to avoid the deviation caused by over-reliance on certain single features in the traditional model;

[0022] The calculation formula of dynamic split threshold is:

[0023]

[0024] In the formula, θ j is the splitting threshold of feature j, L is the loss function, x ij is the jth eigenvalue of the i-th sample;

[0025] A feature interaction mechanism is introduced to model the nonlinear relationship between feature variables under different experimental conditions, especially the interaction between parameters such as temperature, frequency, and magnetic flux density. The prediction accuracy of the model is improved by adding feature interaction terms. For outliers or extreme points, an adaptive weighting mechanism is used to give these data points lower weights, thereby avoiding abnormal data from having too much impact on the model training results. A gradient enhancement mechanism is used to optimize the overall model performance by gradually adjusting the weight of the tree during the training process of each tree, so as to improve the accuracy and stability of the prediction results.

[0026] Preferably, the dynamic splitting threshold is determined based on: performing correlation analysis on the characteristic variables in the experimental data to determine the importance of different characteristic variables for loss prediction, and dynamically adjusting the node splitting threshold based on the importance, so that the model can perform a deeper splitting of important features at different nodes; using information gain or Gini coefficient as a measurement method for the splitting criterion, combined with a dynamic adjustment mechanism, to ensure that variables with higher feature importance can be split preferentially;

[0027] The information gain formula is:

[0028]

[0029] In the formula, IG(S,A) is the information gain of feature A, H(S) is the entropy function, S ν It is the subset when the feature A takes the value of ν.

[0030] Preferably, the feature interaction mechanism is implemented as follows: for the two important influencing factors of temperature and frequency, the nonlinear relationship between the two is simulated by introducing interaction terms to ensure that the model can accurately predict the core loss under high temperature and high frequency conditions; through feature combination, new feature variables are generated to describe the complex interaction relationship between magnetic flux density, material properties and excitation waveform, so as to improve the expressive ability of the model.

[0031] Preferably, the specific implementation of the adaptive weighting mechanism is as follows: for each outlier or extreme value point, calculate its distance or deviation degree from the normal data point, dynamically adjust its weight according to the deviation degree, and assign a lower weight to the outlier or extreme value point to reduce its negative impact on the model training result; add an outlier detection algorithm to the loss data to identify possible abnormal data points in advance, and perform special processing on these data points during the model training process;

[0032] The adaptive weighting formula is:

[0033]

[0034] In the formula, w i is the weight of the i-th data point, λ is the adjustment parameter, x i is the data point value, x mean is the average value.

[0035] Preferably, the specific implementation steps of the gradient enhancement mechanism are: in each round of model training, gradually optimize the weight of each tree in the random forest so that the model can better fit the experimental data and reduce the prediction error of the model; by weighting each tree and adjusting the prediction direction of the tree, the model can reduce the accumulation of previous errors in each iteration and improve the overall prediction accuracy of the model;

[0036] The error update formula of the gradient boosting algorithm is:

[0037]

[0038] In the formula, h t (x) is the predicted value of the tth tree, η is the learning rate, is the gradient of the loss function, and N is the number of samples.

[0039] Preferably, in step 5, the training of the improved random forest prediction model includes the following steps: training and validating the improved random forest prediction model using the k-fold cross validation method, determining the optimal parameter combination of the model through multiple rounds of cross validation, including the number of trees, maximum depth, and number of leaf nodes, etc.; calculating the generalization error of the model (i.e., the performance of the model on unseen data) through the results of cross validation, and commonly used evaluation indicators include mean square error (MSE) and mean absolute error (MAE) to ensure the prediction accuracy of the model for new data;

[0040] The mean square error (MSE) formula is:

[0041]

[0042] The mean absolute error (MAE) formula is:

[0043]

[0044] In the formula, y i is the true value, is the predicted value, and N is the number of samples.

[0045] By adopting the above technical solutions: Improved Random Forest is an enhanced model formed by optimizing the shortcomings of the traditional random forest algorithm, aiming to solve its performance bottleneck in complex tasks. Improved Random Forest improves the fixed standard of the traditional model when splitting nodes by dynamically adjusting the split threshold, so that the model can adaptively adjust the decision rules of splitting nodes dynamically according to the weights of different features. The model introduces a feature interaction mechanism to solve the problem that the traditional random forest is not able to handle complex relationships between variables. Improved Random Forest also introduces an adaptive weighting mechanism, which can effectively deal with outliers or extreme cases in experimental data. The model combines the idea of ​​gradient boosting mechanism (GradientBoosting) to gradually correct the errors in the previous round of predictions, so that each newly added decision tree can focus on the part that the previous model failed to accurately predict, thereby improving the overall prediction performance. Improved Random Forest is not only an optimization of the traditional algorithm, but also an extension of its function, enabling it to cope with more complex real-world application scenarios, especially in high-dimensional and multi-feature environments, and can achieve more efficient and accurate predictions.

[0046] Compared with the prior art, the present invention has the following beneficial effects:

[0047] 1. The present invention introduces a dynamic splitting threshold and a feature interaction mechanism, which significantly improves the prediction accuracy of the model under high frequency and large temperature change range, and is suitable for loss prediction under complex working conditions.

[0048] 2. The present invention adopts an adaptive weighting mechanism, which makes the model more robust when dealing with outliers and extreme values, and reduces the interference of noise and abnormal data on the prediction results.

[0049] 3. The present invention can be applied to loss prediction under various magnetic materials and working conditions, and has good generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is a flow chart of the present invention;

[0051] Figure 2 It is a schematic diagram of the performance of the improved random forest algorithm in the present invention in the prediction of magnetic core loss;

[0052] Figure 3 This is a schematic diagram of the error distribution of the improved random forest in the present invention;

[0053] Figure 4 This is a schematic diagram of feature importance analysis of the improved random forest model in the present invention;

[0054] Figure 5 This is a schematic diagram of the learning curve of the improved random forest model in the present invention;

[0055] Figure 6 This is a schematic diagram of the prediction results of the improved random forest model for core loss in the present invention. DETAILED DESCRIPTION

[0056] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings, so that those skilled in the art can better understand the advantages and features of the present invention, thereby making a clearer definition of the protection scope of the present invention. The embodiments described in the present invention are only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.

[0057] like Figure 1 As shown, a data-driven improved random forest prediction model for core loss includes the following steps:

[0058] Step 1: Acquire experimental data of magnetic core materials, wherein the experimental data includes information on magnetic core loss and magnetic flux density under different materials, temperatures, frequencies and excitation waveforms;

[0059] Step 2: Preprocess the acquired experimental data, including data denoising, missing value filling and data normalization, to ensure the consistency and integrity of the input data of the subsequent model;

[0060] Step 3: Based on the magnetic flux density sampling points and other relevant experimental conditions, extract key characteristic variables, including magnetic flux density distribution, excitation waveform shape characteristics, temperature change trend and material characteristic parameters;

[0061] Step 4: Construct an improved random forest model. The improved random forest model adds the following improved modules based on the traditional random forest model:

[0062] Step 4.1: Introduce a dynamic splitting threshold into the node splitting criterion, and dynamically adjust the node splitting criterion according to the importance of each characteristic variable to loss prediction; the formula for core loss is:

[0063]

[0064] In the formula, α i is the feature variable weight, f i is the frequency, B i is the magnetic flux density, T is the temperature, β, γ, δ are the parameters in the model;

[0065] Step 4.2: Add a feature interaction mechanism to model the interrelationships among feature variables such as temperature, frequency, and magnetic flux density to improve the accuracy of the model in predicting losses under complex working conditions.

[0066] Step 4.3: For the processing of extreme loss values ​​and outliers, an adaptive weighting mechanism is used to make the model more robust and generalizable to extreme loss values ​​and outlier data points.

[0067] Step 4.4: During the model training process, the gradient enhancement mechanism is used to optimize the weights of the tree to improve the prediction accuracy;

[0068] Step 5: Use the preprocessed experimental data to train the improved random forest model, and determine the optimal model parameters through cross-validation to ensure the prediction effect of the model on the training set;

[0069] Step 6: Use the trained improved random forest model to predict the core loss of new sample data.

[0070] For random forest, an improved module is added, and a dynamic splitting threshold is introduced in the node splitting criterion, and the node splitting standard is dynamically adjusted according to the importance of each feature variable to loss prediction; a feature interaction mechanism is added to model the intercorrelations of feature variables such as temperature, frequency, and magnetic flux density to improve the accuracy of the model in loss prediction under complex working conditions; for the processing of extreme loss values ​​and outliers, an adaptive weighting mechanism is adopted to make the model more robust and generalizable to extreme values ​​and abnormal data points; a gradient enhancement mechanism is used to optimize the weights of the tree to improve the prediction accuracy.

[0071] Specifically, in step 1, the acquisition of experimental data is achieved in the following ways: first, the loss and flux density data of the core material are collected under different temperature conditions (such as 25°C, 50°C, 70°C, 90°C); then, experimental data under different excitation waveforms (such as sine wave, triangle wave, trapezoidal wave) are collected within different frequency ranges (such as 50kHz to 500kHz); finally, different core materials (such as ferrite, powder core, nanocrystalline material, etc.) are experimentally measured to obtain their loss values ​​under different working conditions.

[0072] Specifically, in step 2, the preprocessing includes the following steps: the noise in the experimental data is removed by a filtering algorithm to ensure the stability of the data; the missing values ​​generated during the experiment are filled in by a nearest neighbor interpolation method to maintain the continuity of the data; for data of different dimensions, a normalization algorithm is used to make the data of each dimension operate at the same level to avoid the negative impact of excessive data differences on model training.

[0073] Specifically, in step 3, the extraction of characteristic variables includes: performing statistical analysis on the magnetic flux density sampling points of each experimental sample to extract its distribution characteristics, including parameters such as maximum value, minimum value, mean, variance and peak value; extracting the shape factor and waveform distribution pattern according to the shape characteristics of different excitation waveforms as important characteristic variables for model input; extracting temperature gradient characteristics for loss trends at different temperatures to capture the nonlinear effect of temperature on loss; analyzing the magnetic properties of different materials to extract material characteristic parameters such as saturation magnetic flux density and magnetic permeability to reflect the loss change law of the material under different working conditions.

[0074] Specifically, in step 4, the construction of the improved random forest model includes: based on the traditional random forest, the splitting criterion is improved, a dynamic splitting threshold is added, and the splitting criterion of each node is dynamically adjusted according to the importance of different feature variables to avoid the deviation caused by over-reliance on certain single features in the traditional model;

[0075] The calculation formula of dynamic split threshold is:

[0076]

[0077] In the formula, θ j is the splitting threshold of feature j, L is the loss function, x ij is the jth eigenvalue of the i-th sample;

[0078] A feature interaction mechanism is introduced to model the nonlinear relationship between feature variables under different experimental conditions, especially the interaction between parameters such as temperature, frequency, and magnetic flux density. The prediction accuracy of the model is improved by adding feature interaction terms. For outliers or extreme points, an adaptive weighting mechanism is used to give these data points lower weights, thereby avoiding abnormal data from having too much impact on the model training results. A gradient enhancement mechanism is used to optimize the overall model performance by gradually adjusting the weight of the tree during the training process of each tree, so as to improve the accuracy and stability of the prediction results.

[0079] Specifically, the dynamic splitting threshold is determined based on: performing correlation analysis on the characteristic variables in the experimental data to determine the importance of different characteristic variables for loss prediction, and dynamically adjusting the node splitting threshold based on the importance, so that the model can perform a deeper splitting of important features at different nodes; using information gain or Gini coefficient as a measurement method for the splitting criterion, combined with a dynamic adjustment mechanism, to ensure that variables with higher feature importance can be split first;

[0080] The information gain formula is:

[0081]

[0082] In the formula, IG(S,A) is the information gain of feature A, H(S) is the entropy function, S ν It is the subset when the feature A takes the value of ν.

[0083] Specifically, the feature interaction mechanism is implemented as follows: for the two important influencing factors of temperature and frequency, the nonlinear relationship between the two is simulated by introducing interaction terms to ensure that the model can accurately predict the core loss under high temperature and high frequency conditions; through feature combination, new feature variables are generated to describe the complex interaction relationship between magnetic flux density, material properties and excitation waveform, so as to improve the expressive ability of the model.

[0084] Specifically, the adaptive weighting mechanism is implemented as follows: for each outlier or extreme value point, calculate its distance or degree of deviation from normal data points, dynamically adjust its weight according to the degree of deviation, and assign a lower weight to the outlier or extreme value point to reduce its negative impact on the model training results; add an outlier detection algorithm to the loss data to identify possible abnormal data points in advance, and perform special processing on these data points during the model training process;

[0085] The adaptive weighting formula is:

[0086]

[0087] In the formula, w i is the weight of the i-th data point, λ is the adjustment parameter, xi is the data point value, x mean is the average value.

[0088] Specifically, the specific implementation steps of the gradient enhancement mechanism are: in each round of model training, gradually optimize the weight of each tree in the random forest so that the model can better fit the experimental data and reduce the prediction error of the model; by weighting each tree and adjusting the prediction direction of the tree, the model can reduce the accumulation of previous errors in each iteration and improve the overall prediction accuracy of the model;

[0089] The error update formula of the gradient boosting algorithm is:

[0090]

[0091] In the formula, h t (x) is the predicted value of the tth tree, η is the learning rate, is the gradient of the loss function, and N is the number of samples.

[0092] Specifically, in step 5, the training of the improved random forest prediction model includes the following steps: the improved random forest prediction model is trained and verified by using the k-fold cross-validation method, and the optimal parameter combination of the model is determined through multiple rounds of cross-validation, including the number of trees, the maximum depth, and the number of leaf nodes; the generalization error of the model is calculated through the results of cross-validation, and the commonly used evaluation indicators include mean square error and mean absolute error to ensure the prediction accuracy of the model for new data;

[0093] The mean square error formula is:

[0094]

[0095] The mean absolute error formula is:

[0096]

[0097] In the formula, y i is the true value, is the predicted value, and N is the number of samples.

[0098] like Figure 2 , the horizontal axis is the true value, and the vertical axis is the predicted value of the improved random forest model. The black dotted line represents the situation where the ideal predicted value is completely consistent with the actual value, and the black origin is the actual predicted value of the model. By comparing the distribution of the black dotted line and the black dots, the prediction effect of the model can be intuitively judged. The higher the accuracy of the model, the closer the black dots are to the black dotted line.

[0099] like Figure 3, the improved random forest error distribution diagram shows the error generated by the model when predicting the data. The definition of error is the difference between the model's predicted value and the actual value. As can be seen from the figure, the horizontal axis represents the numerical range of the error, covering from negative error to positive error, while the vertical axis shows the number of data points with a specific error value. According to the distribution characteristics of the figure, the prediction results of the improved random forest model are mostly concentrated near zero error, which shows that the prediction results of most samples are very close to the actual value, and the overall prediction accuracy of the model is high.

[0100] However, the long tail phenomenon in the figure shows that although the errors of most samples are small, there are still a small number of samples with large prediction errors, especially on the left and right ends of the error graph. This long tail phenomenon may be caused by some outliers or noise data in the data, or the model performs poorly when processing some special samples. In addition, the distribution of this error also suggests possible underfitting or overfitting. Therefore, for these long-tail data, the overall prediction effect can be improved through further feature analysis, outlier processing or optimization of model parameters. In general, the improved random forest model performs stably and accurately in most cases.

[0101] like Figure 4 , the feature importance analysis chart of the improved random forest model reveals the contribution of each input feature to the prediction model. The chart represents the feature index on the horizontal axis and the importance score of each feature on the vertical axis. It can be clearly seen from the figure that feature 6 and feature 2 are the most important variables in the model, with scores close to 0.5 and 0.4 respectively, which are much higher than other features. This means that the model mainly relies on these two features when making predictions, indicating that they have the strongest correlation with the prediction results.

[0102] In contrast, the importance scores of feature 8, feature 7, and other features are relatively low, indicating that these features contribute less to the prediction. Although these minor features are not completely useless in the model, their impact on the final prediction results is far less than that of feature 6 and feature 2. Based on the results of these feature importances, researchers can further screen the features in the dataset, perhaps retaining only the most important features, simplifying the model structure while also helping to reduce model training time and improve generalization capabilities.

[0103] This feature importance analysis not only helps to understand the decision-making mechanism of the model, but can also be used for optimization in practical applications. For example, if feature 6 and feature 2 are closely related to the physical properties of the core material (such as temperature, magnetic flux density, frequency, etc.). In addition, optimizing feature selection can also avoid unnecessary complexity of the model due to the interference of too many secondary features, further improving the efficiency of the model.

[0104] like Figure 5, shows the learning curve of an improved random forest model, which is used to compare the score performance of the training set and the test set under different numbers of training samples. The horizontal axis represents the number of training samples, and the vertical axis represents the score of the model, ranging from 0.90 to 1.00.

[0105] The upper curve represents the score of the training set. It can be seen that as the number of training samples increases, the score of the training set is relatively stable and close to 1.0, indicating that the model has a high degree of fit on the training set.

[0106] The curve below represents the score of the test set. As can be seen from the curve, as the number of training samples increases, the score of the test set gradually increases, especially when the number of samples reaches a certain scale (for example, more than 5,000 samples), the score of the test set gradually approaches that of the training set, which indicates that the generalization ability of the model increases with the increase in the number of samples.

[0107] Overall, this learning curve shows that as the amount of data increases, the performance of the model gradually improves, especially the prediction ability of the test set is significantly improved, avoiding overfitting. This shows that the random forest model performs well under large amounts of data and has strong generalization ability.

[0108] like Figure 6 , showing the prediction results of the improved random forest model for core loss. The horizontal axis is the sample number, and the vertical axis is the predicted core loss value in W / m 3 The curve in the figure depicts the loss value prediction of different samples, showing obvious fluctuations.

[0109] Loss peak: As can be seen from the figure, the loss has a higher peak in some sample numbers (such as around 100, 150 and 250), and the highest loss is close to 3 million W / m 3 These peaks may correspond to special core materials, temperatures or frequency combinations, resulting in higher energy losses.

[0110] Overall trend: The overall curve fluctuates greatly, indicating that the core loss of different samples is significantly different. This reflects that the influence of external conditions (such as temperature, excitation waveform, frequency, etc.) on core loss is very complex and has nonlinear characteristics.

[0111] This figure intuitively shows the variation of core loss predicted by the model, which can provide data support for further analysis of the loss characteristics of core materials under different conditions. By analyzing these fluctuations, we can better understand the key factors affecting core loss and provide direction for optimized design.

[0112] In summary, the present invention significantly improves the prediction accuracy of the model under high frequency and large temperature change range by introducing dynamic splitting threshold and feature interaction mechanism, and is suitable for loss prediction under complex working conditions. The use of adaptive weighting mechanism makes the model more robust when dealing with outliers and extreme values, reducing the interference of noise and abnormal data on the prediction results. The model can be applied to loss prediction under various magnetic materials and working conditions, and has good generalization ability.

[0113] The description and practice disclosed in the present invention are easy to think and understand for ordinary technicians in the technical field, and several improvements and modifications can be made without departing from the principles of the present invention. Therefore, modifications or improvements made without departing from the spirit of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A data-driven improved random forest prediction model for core loss, characterized in that: The steps include: Step 1: Acquire experimental data of magnetic core materials, wherein the experimental data includes information on magnetic core loss and magnetic flux density under different materials, temperatures, frequencies and excitation waveforms; Step 2: Preprocess the acquired experimental data, including data denoising, missing value filling and data normalization, to ensure the consistency and integrity of the input data of the subsequent model; Step 3: Based on the magnetic flux density sampling points and experimental conditions, extract key characteristic variables, including magnetic flux density distribution, excitation waveform shape characteristics, temperature change trend and material characteristic parameters; Step 4: Construct an improved random forest model. The improved random forest model adds the following improved modules based on the traditional random forest model: Step 4.1: Introduce a dynamic splitting threshold into the node splitting criterion, and dynamically adjust the node splitting criterion according to the importance of each characteristic variable to loss prediction; the formula for core loss is: In the formula, α i is the feature variable weight, f i is the frequency, B i is the magnetic flux density, T is the temperature, β, γ, δ are the parameters in the model; Step 4.2: Add a feature interaction mechanism to model the interrelationship of temperature, frequency, and magnetic flux density feature variables to improve the accuracy of the model's loss prediction under complex working conditions; Step 4.3: For the processing of extreme loss values ​​and outliers, an adaptive weighting mechanism is used to make the model more robust and generalizable to extreme loss values ​​and outlier data points. Step 4.4: During the model training process, the gradient enhancement mechanism is used to optimize the weights of the tree to improve the prediction accuracy; Step 5: Use the preprocessed experimental data to train the improved random forest model, and determine the optimal model parameters through cross-validation to ensure the prediction effect of the model on the training set; Step 6: Use the trained improved random forest model to predict the core loss of new sample data.

2. The data-driven improved random forest prediction model for core loss according to claim 1, characterized in that: In step 1, the acquisition of experimental data is achieved in the following ways: first, the loss and flux density data of the core material are collected under different temperature conditions; then, the experimental data under different excitation waveforms are collected within different frequency ranges; finally, different core materials are experimentally measured to obtain their loss values ​​under different working conditions.

3. The data-driven improved random forest prediction model for core loss according to claim 1, characterized in that: In step 2, preprocessing includes the following steps: using a filtering algorithm to remove the noise in the experimental data to ensure the stability of the data; using a nearest neighbor interpolation method to fill in the missing values ​​generated during the experiment to maintain the continuity of the data; using a normalization algorithm for data of different dimensions to make the data of each dimension operate at the same level to avoid the negative impact of excessive data differences on model training.

4. The data-driven improved random forest prediction model for core loss according to claim 1, characterized in that: In step 3, the extraction of characteristic variables includes: performing statistical analysis on the magnetic flux density sampling points of each experimental sample to extract its distribution characteristics, including maximum value, minimum value, mean value, variance and peak value parameters; extracting the shape factor and waveform distribution pattern according to the shape characteristics of different excitation waveforms as important characteristic variables for model input; extracting temperature gradient characteristics for loss trends at different temperatures to capture the nonlinear effect of temperature on loss; analyzing the magnetic properties of different materials to extract their saturation magnetic flux density and magnetic permeability material characteristic parameters to reflect the loss change law of the material under different working conditions.

5. The data-driven improved random forest prediction model for core loss according to claim 1, characterized in that: In step 4, the construction of the improved random forest model includes: based on the traditional random forest, the splitting criterion is improved, a dynamic splitting threshold is added, and the splitting criteria of each node is dynamically adjusted according to the importance of different feature variables to avoid the deviation caused by over-reliance on certain single features in the traditional model; The calculation formula of dynamic split threshold is: In the formula, θ j is the splitting threshold of feature j, L is the loss function, x ij is the jth eigenvalue of the i-th sample; A feature interaction mechanism is introduced to model the nonlinear relationship between feature variables under different experimental conditions, especially the interaction relationship between temperature, frequency, and magnetic flux density parameters. The prediction accuracy of the model is improved by adding feature interaction terms. For outliers or extreme points, an adaptive weighting mechanism is used to give these data points lower weights, thereby avoiding abnormal data from having too much impact on the model training results. A gradient enhancement mechanism is used to optimize the overall model performance by gradually adjusting the weight of the tree during the training process of each tree, so as to improve the accuracy and stability of the prediction results.

6. The data-driven improved random forest prediction model for core loss according to claim 5, characterized in that: The dynamic splitting threshold is determined based on: performing correlation analysis on the characteristic variables in the experimental data to determine the importance of different characteristic variables for loss prediction, and dynamically adjusting the node splitting threshold based on the importance, so that the model can perform a deeper splitting of important features at different nodes; using information gain or Gini coefficient as a measurement method for the splitting criterion, combined with a dynamic adjustment mechanism, to ensure that variables with higher feature importance can be split first; The information gain formula is: In the formula, IG(S,A) is the information gain of feature A, H(S) is the entropy function, S ν It is the subset when the feature A takes the value of ν.

7. The data-driven improved random forest prediction model for core loss according to claim 5, characterized in that: The feature interaction mechanism is implemented as follows: for the two important influencing factors of temperature and frequency, the nonlinear relationship between the two is simulated by introducing interaction terms to ensure that the model can accurately predict the core loss under high temperature and high frequency conditions; through feature combination, new feature variables are generated to describe the complex interaction relationship between magnetic flux density, material properties and excitation waveform, so as to improve the expressive ability of the model.

8. The data-driven improved random forest prediction model for core loss according to claim 5, characterized in that: The specific implementation of the adaptive weighting mechanism is as follows: for each outlier or extreme value point, calculate its distance or degree of deviation from normal data points, dynamically adjust its weight according to the degree of deviation, and give the outlier or extreme value point a lower weight to reduce its negative impact on the model training results; add an outlier detection algorithm to the loss data to identify possible abnormal data points in advance, and perform special processing on these data points during the model training process; The adaptive weighting formula is: In the formula, w i is the weight of the i-th data point, λ is the adjustment parameter, x i is the data point value, x mean is the average value.

9. The data-driven improved random forest prediction model for core loss according to claim 5, characterized in that: The specific implementation steps of the gradient enhancement mechanism are as follows: in each round of model training, the weight of each tree in the random forest is gradually optimized so that the model can better fit the experimental data and reduce the prediction error of the model; by weighting each tree and adjusting the prediction direction of the tree, the model can reduce the accumulation of previous errors in each iteration and improve the overall prediction accuracy of the model; The error update formula of the gradient boosting algorithm is: In the formula, h t (x) is the predicted value of the tth tree, η is the learning rate, is the gradient of the loss function, and N is the number of samples.

10. The data-driven improved random forest prediction model for core loss according to claim 1, characterized in that: In step 5, the training of the improved random forest prediction model includes the following steps: the improved random forest prediction model is trained and validated by using the k-fold cross validation method, and the optimal parameter combination of the model is determined through multiple rounds of cross validation, including the number of trees, the maximum depth, and the number of leaf nodes; the generalization error of the model is calculated through the results of cross validation, and the commonly used evaluation indicators include mean square error and mean absolute error to ensure the prediction accuracy of the model for new data; The mean square error formula is: The mean absolute error formula is: In the formula, y i is the true value, is the predicted value, and N is the number of samples.