PSO-EMD-RF-based transformer micro-water content prediction method, system and equipment and medium
The PSO-EMD-RF method is used to predict the micro water content in GIS. By optimizing EMD parameters with PSO and constructing a multi-scale feature learning model, the accuracy and robustness of existing prediction methods are not sufficient, and efficient and accurate micro water content prediction is achieved.
Patent Information
- Application Number
- CN202511059452.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-28
AI Technical Summary
Existing methods for predicting trace moisture content are insufficient in terms of accuracy, model robustness, and adaptability, making it difficult to effectively predict changes in trace moisture content in gas-insulated switchgear (GIS), which affects insulation performance and threatens power system safety.
A PSO-EMD-RF-based method for predicting the trace water content of transformers is adopted. The Particle Swarm Optimization (PSO) algorithm is used to optimize the Empirical Mode Decomposition (EMD) parameters, and a multi-scale feature learning mechanism is constructed by combining the Random Forest (RF) model to decompose and predict the trace water content time series data.
It improves the accuracy and reliability of micro-moisture content prediction, achieves efficient and accurate prediction of micro-moisture content changes, enhances the sensitivity and adaptability of the model, and is significantly better than traditional methods.
Smart Images

Figure CN121031285A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of electrical equipment, in particular to a transformer micro-water content prediction method, system, device and medium based on PSO-EMD-RF. BACKGROUND
[0002] As a key configuration device in modern power systems, gas insulated switchgear (GIS) is widely used in high-voltage and ultra-high-voltage power transmission networks due to its compact structure, excellent insulation performance and high reliability. GIS mainly uses sulfur hexafluoride (SF6) gas as an insulating medium, which has excellent electrical performance and superior arc extinguishing ability, effectively ensuring the safe and stable operation of the power grid.
[0003] However, abnormal internal micro-water content can affect its insulation performance, and excessive micro-water content not only reduces the insulation effect, but also may cause equipment failure and threaten the safe operation of the power system. The increase in micro-water content is prone to condensation in low-temperature environments, increasing the risk of surface discharge. At the same time, water reacts with SF6 decomposition products to generate corrosive substances, accelerating the aging of the equipment. The change trend of micro-water content is closely related to the sealing state, adsorbent performance and operating environment, so accurate prediction of the change in micro-water content is of great engineering significance and helps to implement maintenance measures in advance.
[0004] Currently, the commonly used micro-water content prediction methods mainly include three categories: one is the method based on physical models, which predicts by establishing gas diffusion equations or thermodynamic models, and has a clear mechanism basis, but is limited by the complexity of the GIS structure, and the model parameters are difficult to accurately calibrate, with limited prediction accuracy; another is statistical methods, such as time series analysis and regression models, which have high computational efficiency, but are insufficient in dealing with the nonlinear and non-stationary characteristics of micro-water concentration; the third is machine learning methods, such as support vector machines, neural networks, etc., which can automatically mine complex patterns in data and have strong prediction ability, but are prone to overfitting or local extremum, and the "black box" nature affects the interpretability of its engineering application.
[0005] Therefore, in view of the deficiencies of existing methods in terms of prediction accuracy, model robustness and adaptability, it is urgent to develop an intelligent prediction means that integrates multiple technologies. SUMMARY
[0006] In order to improve the accuracy of micro-water content prediction, the application provides a transformer micro-water content prediction method, system, device and medium based on PSO-EMD-RF.
[0007] In a first aspect, the application provides a transformer micro-water content prediction method based on PSO-EMD-RF, which adopts the following technical solution: The transformer micro-water content prediction method based on PSO-EMD-RF comprises: Obtain micro-water content time series data, divide the micro-water content time series data based on time series cross-validation to obtain an initial training set and an initial test set; Based on the PSO algorithm, the data in the initial training set and the initial test set are decomposed by EMD to obtain a decomposed training set and a decomposed test set; The decomposed training set and the decomposed test set are used to construct features and labels to obtain a first supervised learning set and a second supervised learning set, wherein the first supervised learning set includes input feature data and label data, the input feature data includes IMF components, and the label data is micro-water content sequence data within T hours in the future; Based on the RF model, a micro-water IMF component prediction model is constructed according to the first supervised learning set and the second supervised learning set; Obtain target micro-water content data, predict the micro-water IMF component based on the micro-water IMF component prediction model and the target micro-water content data to obtain a micro-water IMF predicted component; According to the micro-water IMF predicted component, the signal is reconstructed to obtain the corresponding micro-water content prediction sequence of the transformer.
[0008] By adopting the technical scheme, time series data of the micro water content is acquired, the time series data of the micro water content is divided based on a time series cross-validation manner to obtain an initial training set and an initial test set, then EMD decomposition is performed on data in the initial training set and the initial test set based on a PSO algorithm to obtain a decomposition training set and a decomposition test set, then feature and label construction is performed on the decomposition training set and the decomposition test set to obtain a first supervised learning set and a second supervised learning set, wherein the first supervised learning set includes input feature data and label data, the input feature data includes IMF components, and the label data is micro water content sequence data in the future T hours, then a micro water IMF component prediction model is constructed based on an RF model and according to the first supervised learning set and the second supervised learning set, then target micro water content data is acquired, the micro water IMF component is predicted based on the micro water IMF component prediction model and according to the target micro water content data to obtain a micro water IMF prediction component, and finally, signal reconstruction is performed according to the micro water IMF prediction component to obtain a micro water content prediction sequence corresponding to the transformer; the method proposed in the application optimizes EMD parameters by introducing a PSO algorithm, which helps to capture the change characteristics of different time scales and effectively improves the prediction accuracy of the micro water content, the micro water content time series data is decomposed in multiple scales by EMD to extract rich IMF components, which helps to capture the change characteristics of different time scales, and the multi-scale feature learning mechanism constructed based on the RF model enhances the sensitivity and adaptability of the model to the change of the micro water content, the overall scheme realizes efficient and accurate micro water content prediction, is significantly better than the traditional method, and improves the accuracy and reliability of the micro water content prediction.
[0009] Optionally, the step of performing EMD decomposition on data in the initial training set and the initial test set based on the PSO algorithm to obtain a decomposition training set and a decomposition test set comprises: performing EMD decomposition on data in the initial training set and the initial test set to obtain a plurality of intrinsic mode functions; optimizing EMD parameters of the intrinsic mode functions based on the PSO algorithm to obtain optimized EMD parameters, wherein the EMD parameters include a screening stop threshold value ε and an IMF number n; performing EMD decomposition on data in the initial training set and the initial test set according to the optimized EMD parameters to obtain a decomposition training set and a decomposition test set.
[0010] By adopting the technical scheme, in order to obtain the decomposed training set and the decomposed test set, the data in the initial training set and the initial test set are subjected to EMD decomposition to obtain a plurality of intrinsic mode functions, then the EMD parameters of the intrinsic mode functions are optimized based on the PSO algorithm to obtain the optimized EMD parameters, wherein the EMD parameters include a screening stop threshold ε and an IMF number n, and then the data in the initial training set and the initial test set are subjected to EMD decomposition according to the optimized EMD parameters to obtain the decomposed training set and the decomposed test set.
[0011] Optionally, the fitness function of the PSO algorithm is:
[0012] wherein, , all represent weights, represents sample entropy, represents signal-to-noise ratio.
[0013] Optionally, the constraint condition of the EMD parameter is:
[0014] wherein, is the number of IMFs, is a ratio threshold of total energy of decomposed IMFs to energy of an original signal.
[0015] Optionally, the step of constructing features and labels for the decomposed training set and the decomposed test set to obtain the first supervised learning set and the second supervised learning set comprises: performing feature engineering processing on the IMF components in the decomposed training set and the decomposed test set to obtain IMF derived features, wherein the IMF derived features include time domain features and frequency domain features; performing translation on the IMF components in the decomposed training set and the decomposed test set to construct corresponding IMF sequences and label vectors Y; obtaining environmental variables corresponding to the IMF components, and performing feature fusion on the IMF sequences, the IMF derived features and the environmental variables to obtain corresponding feature matrices X; generating the first supervised learning set and the second supervised learning set according to the feature matrices X and the label vectors Y, wherein the first supervised learning set corresponds to the decomposed training set, and the second supervised learning set corresponds to the decomposed test set.
[0016] By adopting the technical scheme, in order to obtain the first supervised learning set and the second supervised learning set, the IMF components in the decomposed training set and the decomposed test set are subjected to feature engineering processing to obtain IMF derived features, wherein the IMF derived features include time domain features and frequency domain features, then the IMF components in the decomposed training set and the decomposed test set are subjected to translation to construct corresponding IMF sequences and label vectors Y, then the environment variables corresponding to the IMF components are obtained, and the IMF sequences, the IMF derived features and the environment variables are subjected to feature fusion to obtain corresponding feature matrices X, and then the first supervised learning set and the second supervised learning set are generated according to the feature matrices X and the label vectors Y, wherein the first supervised learning set corresponds to the decomposed training set, and the second supervised learning set corresponds to the decomposed test set.
[0017] Optionally, the step of constructing the micro-water IMF component prediction model based on the RF model and according to the first supervised learning set and the second supervised learning set comprises: Bootstrap sampling is performed on the first supervised learning set to obtain training subsets corresponding to each decision tree; Random feature subset training is performed on the decision trees according to the training subsets based on a node splitting criterion to obtain a trained RF model; Performance evaluation is performed on the trained RF model according to the second supervised learning set based on a predefined evaluation index to obtain the micro-water IMF component prediction model.
[0018] By adopting the technical scheme, in order to construct the micro-water IMF component prediction model, Bootstrap sampling is performed on the first supervised learning set to obtain training subsets corresponding to each decision tree, then random feature subset training is performed on the decision trees according to the training subsets based on a node splitting criterion to obtain a trained RF model, and then performance evaluation is performed on the trained RF model according to the second supervised learning set based on a predefined evaluation index to obtain the micro-water IMF component prediction model.
[0019] Optionally, the method further comprises: obtaining a micro-water content monitoring value of the transformer and determining whether the micro-water content monitoring value is lower than a pre-warning threshold or higher than an alarm threshold; when the micro-water content monitoring value is lower than the pre-warning threshold, pre-warning information is generated; when the micro-water content monitoring value is higher than the alarm threshold, alarm information is generated.
[0020] By adopting the technical scheme, in order to realize the hierarchical early warning of the micro water content, the micro water content monitoring value of the transformer is obtained, and it is judged whether the micro water content monitoring value is lower than the early warning threshold or higher than the alarm threshold, when the micro water content monitoring value is lower than the early warning threshold, the early warning information is generated, and when the micro water content monitoring value is higher than the alarm threshold, the alarm information is generated.
[0021] In a second aspect, the application further provides a transformer micro water content prediction system based on PSO-EMD-RF, which adopts the following technical scheme: The transformer micro water content prediction system based on PSO-EMD-RF comprises: A data set division module is configured to obtain micro water content time series data, divide the micro water content time series data based on a time series cross-validation manner, and obtain an initial training set and an initial test set; An EMD decomposition module is configured to perform EMD decomposition on data in the initial training set and the initial test set based on a PSO algorithm, and obtain a decomposition training set and a decomposition test set; A supervised learning set construction module is configured to construct features and labels for the decomposition training set and the decomposition test set, and obtain a first supervised learning set and a second supervised learning set, wherein the first supervised learning set comprises input feature data and label data, the input feature data comprises the IMF component, and the label data is micro water content sequence data within T hours in the future; A model generation module is configured to construct a micro water IMF component prediction model based on an RF model and according to the first supervised learning set and the second supervised learning set; A prediction module is configured to obtain target micro water content data, perform prediction on a micro water IMF component based on the micro water IMF component prediction model and according to the target micro water content data, and obtain a micro water IMF prediction component; A signal reconstruction module is configured to perform signal reconstruction according to the micro water IMF prediction component, and obtain a micro water content prediction sequence corresponding to the transformer.
[0022] In a third aspect, the application further provides a computer device, which adopts the following technical scheme: A computer device comprises a memory and a processor, the memory stores a computer program capable of running on the processor, and the processor implements the method in the first aspect when executing the computer program.
[0023] In a fourth aspect, the application further provides a computer readable storage medium, which adopts the following technical scheme: A computer readable storage medium stores a computer program capable of being loaded and executed by a processor to implement the method in the first aspect.
[0024] In summary, the present application at least includes the following beneficial technical effects: obtaining micro water content time series data, dividing the micro water content time series data based on time series cross-validation to obtain an initial training set and an initial test set, then performing EMD decomposition on the data in the initial training set and the initial test set based on a PSO algorithm to obtain a decomposition training set and a decomposition test set, then constructing features and labels for the decomposition training set and the decomposition test set to obtain a first supervised learning set and a second supervised learning set, wherein the first supervised learning set includes input feature data and label data, the input feature data includes IMF components, and the label data is micro water content sequence data within T hours in the future, then constructing a micro water IMF component prediction model based on an RF model and according to the first supervised learning set and the second supervised learning set, then obtaining target micro water content data, predicting the micro water IMF component based on the micro water IMF component prediction model and according to the target micro water content data to obtain a micro water IMF prediction component, and finally reconstructing a signal according to the micro water IMF prediction component to obtain a micro water content prediction sequence corresponding to the transformer; the method proposed in the present application optimizes the empirical mode decomposition (EMD) parameters by introducing a particle swarm optimization (PSO) algorithm, which helps to capture the change characteristics of different time scales and effectively improves the prediction accuracy of the micro water content. The use of EMD to perform multi-scale decomposition on the micro water content time series data helps to capture the change characteristics of different time scales, and the multi-scale feature learning mechanism constructed based on the random forest (RF) model enhances the sensitivity and adaptability of the model to the change of the micro water content. The overall scheme realizes efficient and accurate micro water content prediction, significantly outperforms traditional methods, and improves the accuracy and reliability of micro water content prediction. BRIEF DESCRIPTION OF DRAWINGS
[0025] Figure 1 is a whole flow schematic diagram of an embodiment of the present application.
[0026] Figure 2 is a structure schematic diagram of a system of the present application.
[0027] Figure 3 is a structure block diagram of a computer device of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. Figures 1-3 and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0029] The embodiment of the present application discloses a transformer micro water content prediction method based on PSO-EMD-RF.
[0030] Referring toFigure 1 The transformer micro water content prediction method based on the PSO-EMD-RF includes: In step S11, the micro water content time series data is obtained, and the micro water content time series data is divided based on a time series cross-validation manner to obtain an initial training set and an initial test set.
[0031] It should be noted that the micro water content time series data in step S11 is the micro water content time series data after a preprocessing operation, and the preprocessing operation includes missing value filling. Through missing value filling, the data integrity can be ensured, and the subsequent analysis and modeling are affected by data missing. The adaptive filling strategy is adopted in the present application: for the case of less data missing and gentle change trend, the linear interpolation method is used to complete the linear fitting by using the adjacent data points before and after; and for the case of more data missing or nonlinear change characteristics, the K nearest neighbor (KNN) filling method based on time series is used to realize the missing value filling by calculating the weighted average value of the adjacent data of the similar time point. This hierarchical processing method can ensure the accuracy of data filling and adapt to the needs of different missing scenarios, and provides a complete and reliable data basis for subsequent analysis.
[0032] It should be further noted that in step S11, the data is divided by time series cross-validation to construct reliable model training and verification data sets. In specific implementation, the overall data is strictly divided into a training set (70%-80%) and a test set (20%-30%) in time sequence. This time sequence division method can effectively avoid the problem of future information leakage.
[0033] In step S12, the data in the initial training set and the initial test set is decomposed based on the PSO algorithm to obtain a decomposed training set and a decomposed test set.
[0034] It should be noted that in step S12, the data (i.e. the micro water content time series data) in the initial training set and the initial test set is decomposed into a plurality of intrinsic mode functions (IMF) and a residual component (Residue) by empirical mode decomposition (EMD), and each IMF represents the fluctuation characteristics of different time scales. EMD decomposes the signal x(t) into IMF components through a screening process, and the screening stopping criterion is:
[0035] Wherein, SD k is the judgment value calculated after the kth screening, h k (t) is the signal after the kth screening, h k-1 (t) is the signal after the (k-1)th screening, and the typical threshold value ε∈[0.2, 0.3].
[0036] The IMF component extraction process can be expressed as:
[0037] where the IMF i (t) is the i th intrinsic mode function, r n (t) is the residual component, and n is the total number of IMF components.
[0038] Step S13, feature and label construction is performed on the decomposition training set and the decomposition test set to obtain a first supervised learning set and a second supervised learning set.
[0039] The first supervised learning set includes input feature data and label data, the input feature data includes IMF components, and the label data is micro water content sequence data within T hours in the future.
[0040] It should be noted that the traditional EMD decomposition may cause modal aliasing due to end effect or noise, and PSO is used to optimize the screening stop criterion and the number of IMF of EMD to improve the decomposition precision. The sample entropy (Sample Entropy) or signal-to-noise ratio (SNR) is selected as the independent variable of the PSO fitness function, which ensures that the decomposed IMF has clear physical meaning. The particle swarm update formula is:
[0041] wherein, wherein, is the k+1 th iteration point, is the k th iteration point, is the speed in the k th iteration, is the speed in the k+1 th iteration, w is the inertia weight, is the cognitive factor, is a random number between 0 and 1, is the best position found in the search process, is the social learning factor, is a random number between 0 and 1, is the best position found in the global.
[0042] Step S14, based on the RF model, and according to the first supervised learning set and the second supervised learning set, a micro water IMF component prediction model is constructed.
[0043] Step S15, target micro water content data is obtained, based on the micro water IMF component prediction model, and the micro water IMF component is predicted according to the target micro water content data to obtain a micro water IMF prediction component.
[0044] Step S16, signal reconstruction is performed according to the micro water IMF prediction component to obtain a micro water content prediction sequence corresponding to the transformer.
[0045] It should be noted that in step S16, firstly, the trained random forest model is used to independently predict each IMF component to obtain the future trend of each component; then the prediction results of all IMF components are linearly superimposed, and the long-term trend information of the residual component (Residue) is integrated, and the final micro water content prediction sequence is obtained through the signal reconstruction algorithm; this method fully retains the contribution of different time scale components to the prediction results, considering both high frequency fluctuation characteristics and long-term trend, thus realizing comprehensive and accurate prediction of micro water content change, and the reconstructed mathematical relationship can be expressed as:
[0046] wherein, is the prediction value at time t, IMF represents the IMF prediction signal, and Residue represents the predefined residual component.
[0047] In the above embodiment, the micro water content time series data is obtained, the micro water content time series data is divided based on the time series cross-validation method to obtain an initial training set and an initial test set, then the data in the initial training set and the initial test set is decomposed based on the PSO algorithm to obtain a decomposed training set and a decomposed test set, then the decomposed training set and the decomposed test set are constructed for features and labels to obtain a first supervised learning set and a second supervised learning set, wherein the first supervised learning set includes input feature data and label data, the input feature data includes IMF components, and the label data is the micro water content sequence data within T hours in the future, then a micro water IMF component prediction model is constructed based on the RF model and according to the first supervised learning set and the second supervised learning set, then target micro water content data is obtained, the micro water IMF component is predicted based on the micro water IMF component prediction model and according to the target micro water content data to obtain a micro water IMF prediction component, and finally the micro water IMF prediction component is used for signal reconstruction to obtain the micro water content prediction sequence corresponding to the transformer; the method proposed in the present application optimizes the empirical mode decomposition (EMD) parameters by introducing the particle swarm optimization (PSO) algorithm, which helps to capture the change characteristics of different time scales, effectively improves the prediction accuracy of the micro water content, uses the EMD to perform multi-scale decomposition on the micro water content time series data, extracts rich IMF components, which helps to capture the change characteristics of different time scales, and the multi-scale feature learning mechanism constructed based on the random forest (RF) model enhances the sensitivity and adaptability of the model to the micro water content change, the overall scheme realizes efficient and accurate micro water content prediction, which is significantly better than the traditional method, and improves the accuracy and reliability of the micro water content prediction.
[0048] As a further implementation manner of the method, based on the PSO algorithm, the step of performing EMD decomposition on data in the initial training set and the initial test set to obtain a decomposed training set and a decomposed test set comprises: In step S21, EMD decomposition is performed on data in the initial training set and the initial test set to obtain a plurality of intrinsic mode functions.
[0049] It should be noted that in step S21, after EMD decomposition, a residual component (Residue) is also obtained.
[0050] In step S22, based on the PSO algorithm, EMD parameters of the intrinsic mode functions are optimized to obtain optimized EMD parameters, wherein the EMD parameters include a screening stop threshold ε and an IMF number n.
[0051] It should be noted that the fitness function of the PSO algorithm is:
[0052] wherein, , all represent weights, represents sample entropy, represents signal-to-noise ratio.
[0053] The calculation formula of is:
[0054] wherein, m is the dimension (window length) of the sequence used to construct the vector; r is the tolerance (usually a certain proportion of the standard deviation of the sequence, such as 0.2-0.3); A m+1 (r) represents the logarithm of the number of vectors satisfying the similarity condition in all vectors of length m+1 in the sequence; A m (r) represents the logarithm of the number of vectors satisfying the similarity condition in all vectors of length m in the sequence.
[0055] The calculation formula of is:
[0056] wherein, noise represents noise.
[0057] The optimization variable of the EMD parameter is:
[0058] The constraint condition of the EMD parameter is:
[0059] wherein, is the number of IMFs, The ratio threshold of the total energy of the decomposed IMF to the energy of the original signal is η, which is usually 0.95.
[0060] In step S23, the data in the initial training set and the initial test set are decomposed according to the optimized EMD parameters to obtain a decomposed training set and a decomposed test set.
[0061] In the above embodiment, in order to obtain the decomposed training set and the decomposed test set, the data in the initial training set and the initial test set are decomposed to obtain a plurality of intrinsic mode functions, and then the EMD parameters of the intrinsic mode functions are optimized based on the PSO algorithm to obtain the optimized EMD parameters, wherein the EMD parameters include a screening stop threshold ε and an IMF number n, and then the data in the initial training set and the initial test set are decomposed according to the optimized EMD parameters to obtain the decomposed training set and the decomposed test set.
[0062] As a further embodiment of the method, the step of constructing features and labels for the decomposed training set and the decomposed test set to obtain a first supervised learning set and a second supervised learning set comprises: In step S31, the IMF components in the decomposed training set and the decomposed test set are subjected to feature engineering processing to obtain IMF derived features, wherein the IMF derived features include time domain features and frequency domain features.
[0063] In step S32, the IMF components in the decomposed training set and the decomposed test set are shifted to construct corresponding IMF sequences and label vectors Y.
[0064] In step S33, the environmental variables corresponding to the IMF components are obtained, and the IMF sequences, the IMF derived features and the environmental variables are subjected to feature fusion to obtain corresponding feature matrices X.
[0065] In step S34, the first supervised learning set and the second supervised learning set are generated according to the feature matrices X and the label vectors Y, wherein the first supervised learning set corresponds to the decomposed training set, and the second supervised learning set corresponds to the decomposed test set.
[0066] It should be noted that in steps S31 to S34, the features and labels of the decomposition training set and the decomposition test set are divided to construct a supervised learning data set, and the input features and prediction target are determined. When constructing the supervised learning data set, the present research adopts a multi-dimensional feature engineering method. First, time-frequency domain features are extracted from each IMF component obtained by PSO-EMD decomposition, including time domain statistical features such as mean, variance, and extreme value, as well as frequency domain wavelet coefficient and FFT energy spectrum features. At the same time, environmental variables (temperature, air pressure, etc.) are fused as auxiliary features. The prediction target is defined as the micro water content in the future T hours. The original data sequence is shifted backward by T steps to construct the label vector. Finally, the feature matrix X and the label vector Y of the supervised learning data set are integrated to provide a structured input-output pair for subsequent random forest model training, ensuring that the model can learn the time sequence rule of micro water content change and its correlation with environmental factors.
[0067] In the above embodiment, in order to obtain the first supervised learning set and the second supervised learning set, the IMF components in the decomposition training set and the decomposition test set are subjected to feature engineering processing to obtain IMF derived features, wherein the IMF derived features include time domain features and frequency domain features. Then, the IMF components in the decomposition training set and the decomposition test set are shifted to construct corresponding IMF sequences and label vectors Y. Then, the environmental variables corresponding to the IMF components are obtained, and the IMF sequences, the IMF derived features, and the environmental variables are subjected to feature fusion to obtain corresponding feature matrices X. Then, the first supervised learning set and the second supervised learning set are generated according to the feature matrices X and the label vectors Y, wherein the first supervised learning set corresponds to the decomposition training set, and the second supervised learning set corresponds to the decomposition test set.
[0068] As a further embodiment of the method, based on the RF model, and according to the first supervised learning set and the second supervised learning set, the step of constructing the micro water IMF component prediction model comprises: Step S41, Bootstrap sampling is performed on the first supervised learning set to obtain a training subset corresponding to each decision tree.
[0069] It should be noted that for a training set D containing N samples, the training set D' of each decision tree is generated by Bootstrap sampling. The Bootstrap sampling formula is:
[0070] Wherein, K is the total number of decision trees, and U{1,N} represents uniformly random sampling of indexes from {1,2,…,N} (with replacement).
[0071] Step S42, based on the node splitting criterion, and according to the training subset, each decision tree is trained based on a random feature subset to obtain a trained RF model.
[0072] It should be noted that the calculation formula of MSE of the node is:
[0073] For the split of feature j at value s:
[0074] where D L {(x,y)∈D m |x j ≤s},D R {(x,y)∈D m |xj>s} is selected to maximize ΔMSE(j,s).
[0075] In terms of feature random selection, when splitting a node, a subset is randomly selected from M features:
[0076] where M is the total number of features, and m is the number of features considered for each tree.
[0077] In terms of single tree prediction, for input sample x, the prediction of the kth tree is the mean of the leaf node samples:
[0078] or
[0079] where Lk(x) is the set of training samples of the leaf node to which x belongs in the kth tree.
[0080] In terms of random forest ensemble prediction, the final prediction of the regression task is the average of all trees, denoted as:
[0081] Hyperparameter optimization (such as the number of trees, maximum depth) can be determined by grid search or Bayesian optimization, for example, minimizing the validation set loss L through grid search can be represented as:
[0082] where θ={n_estimators,max_depth,min_samples_split,...}, L is the loss function (MSE or MAPE).
[0083] Step S43, based on the pre-defined evaluation index, and according to the second supervised learning set, the performance of the trained RF model is evaluated, and the micro water IMF component prediction model is obtained.
[0084] It should be noted that the evaluation index includes at least one of mean square error (MSE) or mean absolute percentage error (MAPE), and the MSE calculation formula is:
[0085] The MAPE calculation formula is:
[0086] The Gini-based importance score formula is:
[0087] Wherein, T k (j) represents the node set split using feature j in the kth tree, and ΔMSE t (j) represents the reduction of MSE when node t is split.
[0088] In the above manner, the optimal prediction model is obtained:
[0089] Wherein, X val represents the feature matrix of the validation set, Y val represents the label of the validation set, represents the mean square error of the model on the validation set.
[0090] In the above embodiment, in order to construct the micro water IMF component prediction model, Bootstrap sampling is performed on the first supervised learning set to obtain the training subset corresponding to each decision tree, then based on the node splitting criterion, and according to the training subset, the random feature subset training is performed on each decision tree, to obtain the trained RF model, then based on the predefined evaluation index, and according to the second supervised learning set, the performance of the trained RF model is evaluated, to obtain the micro water IMF component prediction model.
[0091] As a further embodiment of the method, the method further comprises: Step S51, obtaining the micro water content monitoring value of the transformer, and determining whether the micro water content monitoring value is lower than the early warning threshold or higher than the alarm threshold.
[0092] Step S52, when the micro water content monitoring value is lower than the early warning threshold, early warning information is generated.
[0093] Step S53, when the micro water content monitoring value is higher than the alarm threshold, alarm information is generated.
[0094] It should be noted that the pre-warning threshold and the warning threshold are set according to expert experience, the pre-warning threshold can be set as 1.5 times of the standard deviation of the historical normal micro-water content, when the monitoring value exceeds the threshold, a yellow pre-warning signal is triggered, prompting that the equipment may have potential abnormalities and needs to be monitored intensively; the warning threshold is set as an absolute upper limit value (such as 500 ppm) according to the industry standard (such as DL / T1631-2016) and the suggestion of the equipment manufacturer, when the monitoring value exceeds the warning threshold, a red warning signal is triggered, indicating that the insulation performance of the equipment has been seriously deteriorated and maintenance measures need to be taken immediately. By comparing the results, a visual pre-warning signal (yellow / red) is automatically generated, which provides an intuitive and reliable basis for operation and maintenance decision-making, and is conducive to improving the state monitoring level of the GIS equipment.
[0095] In the above embodiment, in order to realize the hierarchical pre-warning of the micro-water content, the micro-water content monitoring value of the transformer is obtained, and it is judged whether the micro-water content monitoring value is lower than the pre-warning threshold or higher than the warning threshold, when the micro-water content monitoring value is lower than the pre-warning threshold, pre-warning information is generated, and when the micro-water content monitoring value is higher than the warning threshold, warning information is generated.
[0096] The embodiment of the present application also discloses a transformer micro-water content prediction system based on PSO-EMD-RF.
[0097] Reference Figure 2 The transformer micro-water content prediction system based on PSO-EMD-RF comprises: A data set division module is configured to obtain micro-water content time series data, divide the micro-water content time series data based on a time series cross-validation manner, and obtain an initial training set and an initial test set; An EMD decomposition module is configured to perform EMD decomposition on data in the initial training set and the initial test set based on a PSO algorithm, and obtain a decomposition training set and a decomposition test set; A supervised learning set construction module is configured to construct features and labels for the decomposition training set and the decomposition test set, and obtain a first supervised learning set and a second supervised learning set, wherein the first supervised learning set comprises input feature data and label data, the input feature data comprises an IMF component, and the label data is micro-water content sequence data in the future T hours; A model generation module is configured to construct a micro-water IMF component prediction model based on an RF model and according to the first supervised learning set and the second supervised learning set; A prediction module is configured to obtain target micro-water content data, perform prediction on a micro-water IMF component based on the micro-water IMF component prediction model and according to the target micro-water content data, and obtain a micro-water IMF prediction component; A signal reconstruction module is configured to perform signal reconstruction according to the micro-water IMF prediction component, and obtain a micro-water content prediction sequence corresponding to the transformer.
[0098] The transformer micro water content prediction system based on PSO-EMD-RF of the present application can implement any one of the transformer micro water content prediction methods based on PSO-EMD-RF, and the specific working process of the transformer micro water content prediction system based on PSO-EMD-RF of the present application can refer to the corresponding process in the above-mentioned transformer micro water content prediction method based on PSO-EMD-RF.
[0099] The present application also discloses a computer device.
[0100] Reference Figure 3 A computer device, comprising a memory and a processor, the memory has a computer program stored thereon, the computer program can be run on the processor, and the processor implements any one of the above-mentioned transformer micro water content prediction methods based on PSO-EMD-RF when executing the computer program.
[0101] The present application also discloses a computer readable storage medium.
[0102] A computer readable storage medium, which stores a computer program capable of being loaded and executed by a processor to implement any one of the above-mentioned transformer micro water content prediction methods based on PSO-EMD-RF.
[0103] The computer readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or apparatus; the program code contained on the computer readable medium can be transmitted by any appropriate medium, including but not limited to wireless, wire, optical cable, RF, etc., or any appropriate combination of the above.
[0104] The above are the preferred embodiments of the present application, which do not limit the protection scope of the present application, any feature disclosed in the specification (including the abstract and the drawings) can be replaced by other equivalent or similar features unless specifically described, that is, each feature is only an example of a series of equivalent or similar features.
Claims
1. A method for predicting the trace moisture content of transformers based on PSO-EMD-RF, characterized in that, include: Time series data on trace water content were acquired, and the data was divided based on time series cross-validation to obtain an initial training set and an initial test set. Based on the PSO algorithm, EMD decomposition is performed on the data in the initial training set and the initial test set to obtain the decomposed training set and the decomposed test set. Features and labels are constructed on the decomposed training set and the decomposed test set to obtain a first supervised learning set and a second supervised learning set. The first supervised learning set includes input feature data and label data. The input feature data includes IMF components, and the label data is micromoisture content sequence data for the next T hours. Based on the RF model, a micro-water IMF component prediction model is constructed according to the first and second supervised learning sets; Obtain target trace moisture content data, predict trace moisture IMF components based on trace moisture IMF component prediction model, and predict trace moisture IMF components based on the target trace moisture content data to obtain trace moisture IMF predicted components. The signal is reconstructed based on the micro-water IMF prediction component to obtain the micro-water content prediction sequence corresponding to the transformer.
2. The method for predicting transformer moisture content based on PSO-EMD-RF according to claim 1, characterized in that, The step of performing EMD decomposition on the data in the initial training set and the initial test set based on the PSO algorithm to obtain the decomposed training set and the decomposed test set includes: EMD decomposition is performed on the data in the initial training set and the initial test set to obtain multiple intrinsic mode functions; Based on the PSO algorithm, the EMD parameters of the intrinsic mode function are optimized to obtain the optimized EMD parameters, wherein the EMD parameters include the screening stop threshold ε and the number of IMFs n; Based on the optimized EMD parameters, EMD decomposition is performed on the data in the initial training set and the initial test set to obtain the decomposed training set and the decomposed test set.
3. The method for predicting transformer moisture content based on PSO-EMD-RF according to claim 2, characterized in that, The fitness function of the PSO algorithm is: in, , All represent weights. Represents sample entropy. This indicates the signal-to-noise ratio.
4. The method for predicting transformer moisture content based on PSO-EMD-RF according to claim 2, characterized in that, The constraints on the EMD parameters are as follows: in, For the number of IMFs, The threshold is the ratio of the total energy of the decomposed IMF to the energy of the original signal.
5. The method for predicting transformer moisture content based on PSO-EMD-RF according to claim 1, characterized in that, The step of constructing features and labels from the decomposed training set and the decomposed test set to obtain a first supervised learning set and a second supervised learning set includes: Feature engineering is performed on the IMF components in the decomposed training set and the decomposed test set to obtain IMF-derived features, wherein the IMF-derived features include time-domain features and frequency-domain features. The IMF components in the decomposed training set and the decomposed test set are shifted to construct the corresponding IMF sequence and label vector Y; Obtain the environmental variables corresponding to the IMF components, and perform feature fusion on the IMF sequence, the IMF derived features, and the environmental variables to obtain the corresponding feature matrix X; A first supervised learning set and a second supervised learning set are generated based on the feature matrix X and the label vector Y, wherein the first supervised learning set corresponds to the decomposed training set and the second supervised learning set corresponds to the decomposed test set.
6. The method for predicting transformer moisture content based on PSO-EMD-RF according to claim 1, characterized in that, The step of constructing a micro-water IMF component prediction model based on the RF model and according to the first and second supervised learning sets includes: Bootstrap sampling is performed on the first supervised learning set to obtain the training subsets corresponding to each decision tree; Based on the node splitting criterion, and by training each decision tree with random feature subsets according to the training subset, a trained RF model is obtained; Based on predefined evaluation metrics and the performance evaluation of the trained RF model according to the second supervised learning set, a micro-water IMF component prediction model is obtained.
7. The method for predicting transformer moisture content based on PSO-EMD-RF according to claim 1, characterized in that, The method further includes: Obtain the moisture content monitoring value of the transformer and determine whether the moisture content monitoring value is lower than the warning threshold or higher than the alarm threshold; When the monitored value of trace moisture content is lower than the warning threshold, a warning message is generated; When the monitored value of trace moisture content is higher than the alarm threshold, an alarm message is generated.
8. A transformer moisture content prediction system based on PSO-EMD-RF, characterized in that, include: The dataset partitioning module is used to acquire time-series data on trace water content and partition the time-series data on trace water content based on time-series cross-validation to obtain an initial training set and an initial test set. The EMD decomposition module is used to perform EMD decomposition on the data in the initial training set and the initial test set based on the PSO algorithm to obtain the decomposed training set and the decomposed test set. The supervised learning set construction module is used to construct features and labels on the decomposed training set and the decomposed test set to obtain a first supervised learning set and a second supervised learning set. The first supervised learning set includes input feature data and label data. The input feature data includes the IMF component, and the label data is the micro-moisture content sequence data for the next T hours. The model generation module is used to construct a micro-water IMF component prediction model based on the RF model and according to the first supervised learning set and the second supervised learning set. The prediction module is used to acquire target trace moisture content data, predict trace moisture IMF components based on the trace moisture IMF component prediction model, and obtain the trace moisture IMF predicted components according to the target trace moisture content data. The signal reconstruction module is used to reconstruct the signal based on the micro-water IMF prediction component to obtain the micro-water content prediction sequence corresponding to the transformer.
9. A computer device, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer program is stored that can be loaded by a processor and execute the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Single-channel blind source separation method based on particle swarm optimization
CN118410313A
Evaporator fault prediction method for evaporating materials
CN119046852A
Lithium battery health state estimation method based on similar time sequence characteristics and improved particle swarm optimization algorithm
CN120314789A
Method and system for identifying water leakage of water intake pipeline of thermal power plant based on multi-modal data
CN121139878A