Method and system for predicting condensation critical temperature of few-sample 35kV switch cabinet based on BO-BiGRU
By using the BO-BiGRU model in the critical temperature prediction of 35kV high-voltage switch cabinet, combined with the ERGAN model and Bayesian algorithm, the problem of lack of systematic analysis and long-term trend considerations in the existing technology is solved, and the prediction accuracy and adaptability are improved.
Patent Information
- Application Number
- CN202411608043.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-04
AI Technical Summary
When predicting the critical temperature of 35kV high-voltage switch cabinet, the prior art lacks systematic analysis of historical data and long-term trends, resulting in the inability to respond in time when environmental conditions change significantly, affecting early warning capabilities and accuracy.
Using a BO-BiGRU-based small sample prediction method, data preprocessing and sample expansion are obtained by obtaining historical running data, ERGAN model and BiGRU model are constructed, hyperparameters are optimized using Bayesian algorithm, and BO-BiGRU model is established for prediction.
The accuracy of the critical temperature prediction of condensation in the case of few samples is improved, the adaptability and stability of the model in different scenarios is enhanced, and the reliability and practicality of the prediction results are ensured.
Smart Images

Figure CN119558462A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power equipment status monitoring, and mainly to a prediction method and system for the condensation critical temperature of a 35kV switch cabinet with a small number of samples based on BO-BiGRU. Background Art
[0002] 35kV high-voltage switchgear is a core electrical equipment in the power distribution network. When a fault occurs, it is easy to cause a large-scale power outage and affect the power supply capacity. Under high humidity conditions, the switchgear is prone to moisture and condensation, which can cause equipment malfunction or refusal to operate. Accurate prediction of the critical condensation temperature of 35kV high-voltage switchgear can effectively reduce the difficulty of condensation prevention and control. Due to the complex condensation mechanism of the switchgear, the condensation critical temperature prediction method based on the mathematical model does not fully explore the influence of various factors of the switchgear on the condensation critical temperature, and the prediction accuracy is difficult to guarantee.
[0003] In recent years, data-driven machine learning methods have been widely used in power systems. Since machine learning methods do not require the establishment of mathematical models, they can mine implicit characteristics between data through historical data and are suitable for the prediction of critical condensation temperature of 35kV high-voltage switchgear. At present, there are few prediction methods for critical condensation temperature of switchgear based on machine learning, but machine learning methods require a large number of historical samples for training, and the prediction accuracy is difficult to guarantee when switchgear condensation samples are scarce.
[0004] For example, CN115811133A "A condensation prediction control method, module and system based on switch cabinet" discloses "A condensation prediction control method, module and system based on switch cabinet, the method is applied to the control module of the switch cabinet control system, the power cabinet control system includes an early warning module, a detection module and a control module; the method includes: obtaining environmental parameters in the detection module; the environmental parameters include: relative humidity value, surface temperature value and dry bulb temperature value; calculating the dew point temperature value according to the dry bulb temperature value and the relative humidity value; comparing the surface temperature value with the dew point temperature value to determine whether the switch cabinet has the risk of condensation; if so, The control warning module sends out a condensation warning signal, improves the accuracy of condensation prediction, and realizes accurate prediction of condensation generation in various electrical cabinets and switch cabinets. However, the method relies on a large number of historical training samples, and the prediction effect is difficult to guarantee when there is a shortage of condensation samples in the high-voltage switch cabinet of the substation; in addition, the control module of the method only makes predictions based on environmental data at a single time point, lacks systematic analysis of historical data and consideration of long-term trends, and cannot comprehensively evaluate the past condensation occurrence and its relationship with environmental factors, resulting in the inability to respond in time when environmental conditions change significantly, affecting the warning capability and accuracy of condensation generation risks. Summary of the invention
[0005] In order to solve the above problems existing in the prior art, the present application provides a prediction method and system for the critical temperature of condensation of a 35kV switch cabinet with a small number of samples based on BO-BiGRU.
[0006] The technical solution of this application is as follows:
[0007] A prediction method for critical condensation temperature of a 35kV switch cabinet with a small number of samples based on BO-BiGRU, the method comprising:
[0008] Acquire historical operation data of a 35kv high-voltage switchgear, wherein the historical operation data includes historical condensation critical temperature data and environmental factor data; perform data preprocessing on the historical operation data to obtain data preprocessing results; construct an ERGAN model, and based on the data preprocessing results, use the ERGAN model to perform data expansion on the historical condensation critical temperature data to obtain sample data; construct a sample data set based on the sample data, and divide the sample data set into a training sample set and a test sample set;
[0009] Constructing a bidirectional gated recurrent unit BiGRU model, optimizing the hyperparameters of the BiGRU model using a Bayesian algorithm to obtain an optimal hyperparameter group, training the BiGRU model with the optimal hyperparameter group using a training sample set, and evaluating the trained BiGRU model based on the test sample set and a preset performance evaluation index to obtain a BO-BiGRU model;
[0010] The real-time operation data of the 35 kV high-voltage switchgear to be predicted is obtained, and the real-time operation data is input into the final BO-BiGRU model to obtain the prediction result of the condensation critical temperature.
[0011] Preferably, the data preprocessing of the historical operation data includes normalization processing and correlation analysis, and the normalization processing is specifically mapping the historical condensation critical temperature data to the interval [0, 1], which is expressed as:
[0012]
[0013] Where x represents the historical condensation critical temperature data; x min Indicates the minimum value of the historical condensation critical temperature data; x max Indicates the maximum value of historical condensation critical temperature data; Represents the normalized historical condensation critical temperature data;
[0014] The correlation analysis is to analyze the correlation between the environmental factor data and the historical condensation critical temperature data through the Pearson correlation coefficient, which is expressed as follows:
[0015]
[0016] In the formula, a k represents the kth environmental factor data; M represents the number of environmental factor data; x j represents the jth historical condensation critical temperature data; Q represents the number of historical condensation critical temperature data; It represents the average value of environmental factor data; Represents the average value of historical condensation critical temperature data;
[0017] The historical condensation critical temperature data with correlation coefficients within a preset range are selected for data expansion.
[0018] Preferably, the ERGAN model is constructed based on the GAN model, using a one-dimensional convolutional layer and a spectral normalization layer to reconstruct the generator and the discriminator, and introducing a relative loss function of gradient penalty in the discriminator, wherein:
[0019] The one-dimensional convolutional layer is expressed as follows:
[0020]
[0021] In the formula, * represents the convolution operation; τ represents the position index in the output sequence; K represents the length of the convolution kernel; C in Indicates the number of input channels; x τ-α Represents the value of the input data sequence at the τ-α position; W αβ Represents the value of the αth row and βth column in the weight matrix W;
[0022] The spectrum is normalized to one layer and expressed by the formula:
[0023]
[0024] Where W SN (W) represents the weight matrix after spectral normalization; ||W||2 represents the spectral norm of the weight matrix W;
[0025] The output of the discriminator is expressed as:
[0026] D R (x r -x g )=σ(C(x r )-C(x g ));
[0027] Where D R () represents the discriminator output; x r represents the real sample; x g Represents generated samples; σ() represents the sigmid function; C() represents the output of the nonlinear conversion layer;
[0028] The loss function L corresponding to the generator G , expressed as:
[0029]
[0030] The relative loss function of the gradient penalty introduced in the discriminator is expressed as:
[0031]
[0032] In the formula, λ represents the gradient penalty factor; P data represents the true sample distribution; P g Represents the generated sample distribution; (x r -x g )~(P data ,P g ) represents sampling from real samples and generated samples; Represents sampled data; represents the gradient penalty term; represents the sampling data distribution; D() represents the discriminator output before reconstruction; Represents the gradient operator.
[0033] Preferably, a bidirectional gated recurrent unit BiGRU model is constructed, and a Bayesian algorithm is used to perform hyperparameter optimization to obtain an optimal hyperparameter group. The hyperparameter optimization process is specifically as follows:
[0034] A hyperparameter objective function is defined, where the hyperparameter group includes a learning rate, a batch sample size, the number of neurons in the hidden layer, and a dropout rate; the hyperparameter objective function f is expressed as:
[0035] f(R)=1-Loss(R);
[0036] Where R represents the set of hyperparameter groups; Loss(R) represents the loss value of the BiGRU model;
[0037] The Gaussian process is used as a proxy model for the Bayesian algorithm and approximated as a hyperparameter objective function, which is expressed as follows:
[0038] f(ξ)~GP(m(ξ),k(ξ,ξ'));
[0039] Where GP represents Gaussian process; ξ represents the currently considered hyperparameter combination; ξ' represents the historical hyperparameter combination; m() represents the mean function; k() represents the covariance function;
[0040] Set an initial observation point, which is expressed as D = {hyperparameter group, hyperparameter objective function value}, use the initial observation point to train the Gaussian process proxy model GP, initialize the posterior distribution of GP, and express the posterior distribution in the formula as follows:
[0041] p(f(ξ)|D)~N(μ,σ 2 );
[0042] In the formula, D represents the initial observation point; μ represents the mean of the posterior distribution; σ 2 represents the variance of the posterior distribution;
[0043] The expected improvement acquisition function is used to select the hyperparameter to be evaluated, and the corresponding hyperparameter objective function value is calculated according to the hyperparameter to be evaluated. The hyperparameter objective function value is used as a new observation point, which is expressed as follows:
[0044] EI(ξ)=E[max(0,f * -f(ξ))|D];
[0045]
[0046] In the formula, f * represents the initial optimal hyperparameter group; EI() represents the expected improvement acquisition function; max() represents the maximum value function; argmax() represents the function for obtaining the maximum value of the expected improvement acquisition function;
[0047] Retrain the GP using the new observation points and update the posterior distribution of the GP until the optimization termination condition is met. The hyperparameters that meet the optimization termination condition are obtained, which is the optimal hyperparameter group.
[0048] Preferably, the preset performance evaluation index includes the mean absolute error J MAE , mean square error J MSE and mean square logarithmic error J MSLE , expressed as:
[0049]
[0050] Where: y i is the i-th sample data value in the test set; is the predicted value of the i-th sample data in the test set; N is the number of samples in the test set.
[0051] A prediction system for the critical condensation temperature of a 35kV high-voltage switchgear with a small number of samples based on BO-BiGRU includes a data acquisition module, a critical condensation temperature prediction module and a data output module, wherein:
[0052] The data acquisition module is used to acquire the real-time operation data of the 35kV high-voltage switchgear, normalize the real-time operation data, and transmit the normalized real-time operation data to the condensation critical temperature prediction module;
[0053] The condensation critical temperature prediction module is internally provided with a BO-BiGRU model. The real-time operation data is input into the BO-BiGRU model to obtain the prediction result of the condensation critical temperature. The BO-BiGRU construction process is specifically as follows:
[0054] Acquire historical operation data of a 35kv high-voltage switchgear, wherein the historical operation data includes historical condensation critical temperature data and environmental factor data; perform data preprocessing on the historical condensation critical temperature data; construct an ERGAN model, and use the ERGAN model to perform data expansion on the historical condensation critical temperature data to obtain sample data; construct a sample data set based on the sample data, and divide the sample data set into a training sample set and a test sample set;
[0055] Constructing a bidirectional gated recurrent unit BiGRU model, optimizing the hyperparameters of the BiGRU model using a Bayesian algorithm to obtain an optimal hyperparameter group, training the BiGRU model with the optimal hyperparameter group using a training sample set, and evaluating the trained BiGRU model based on the test sample set and a preset performance evaluation index to obtain a BO-BiGRU model;
[0056] The data output module is used to display the prediction result of the critical condensation temperature.
[0057] Preferably, the ERGAN model is constructed based on the GAN model, using a one-dimensional convolutional layer and a spectral normalization layer to reconstruct the generator and the discriminator, and introducing a relative loss function of gradient penalty in the discriminator, wherein:
[0058] The one-dimensional convolutional layer is expressed as follows:
[0059]
[0060] In the formula, * represents the convolution operation; τ represents the position index in the output sequence; K represents the length of the convolution kernel; C in Indicates the number of input channels; x τ-α Represents the value of the input data sequence at the τ-α position; W αβ Represents the value of the αth row and βth column in the weight matrix W;
[0061] The spectrum is normalized to one layer and expressed by the formula:
[0062]
[0063] Where WSN (W) represents the weight matrix after spectral normalization; ||W||2 represents the spectral norm of the weight matrix W;
[0064] The output of the discriminator is expressed as:
[0065] D R (x r -x g )=σ(C(x r )-C(x g ));
[0066] Where D R () represents the discriminator output; x r represents the real sample; x g Represents generated samples; σ() represents the sigmid function; C() represents the output of the nonlinear conversion layer;
[0067] The loss function L corresponding to the generator G , expressed as:
[0068]
[0069] The relative loss function of the gradient penalty introduced in the discriminator is expressed as:
[0070]
[0071] In the formula, λ represents the gradient penalty factor; P data represents the true sample distribution; P g Represents the generated sample distribution; (x r -x g )~(P data ,P g ) represents sampling from real samples and generated samples; Represents sampled data; represents the gradient penalty term; represents the sampling data distribution; D() represents the discriminator output before reconstruction; Represents the gradient operator.
[0072] Preferably, a bidirectional gated recurrent unit BiGRU model is constructed, and a Bayesian algorithm is used to perform hyperparameter optimization to obtain an optimal hyperparameter group. The hyperparameter optimization process is specifically as follows:
[0073] A hyperparameter objective function is defined, where the hyperparameter group includes a learning rate, a batch sample size, the number of neurons in the hidden layer, and a dropout rate; the hyperparameter objective function f is expressed as:
[0074] f(R)=1-Loss(R);
[0075] Where R represents the set of hyperparameter groups; Loss(R) represents the loss value of the BiGRU model;
[0076] The Gaussian process is used as a proxy model for the Bayesian algorithm and approximated as a hyperparameter objective function, which is expressed as follows:
[0077] f(ξ)~GP(m(ξ),k(ξ,ξ'));
[0078] Where GP represents Gaussian process; ξ represents the currently considered hyperparameter combination; ξ' represents the historical hyperparameter combination; m() represents the mean function; k() represents the covariance function;
[0079] Set an initial observation point, which is expressed as D = {hyperparameter group, hyperparameter objective function value}, use the initial observation point to train the Gaussian process proxy model GP, initialize the posterior distribution of GP, and express the posterior distribution in the formula as follows:
[0080] p(f(ξ)|D)~N(μ,σ 2 );
[0081] In the formula, D represents the initial observation point; μ represents the mean of the posterior distribution; σ 2 represents the variance of the posterior distribution;
[0082] The expected improvement acquisition function is used to select the hyperparameter to be evaluated, and the corresponding hyperparameter objective function value is calculated according to the hyperparameter to be evaluated. The hyperparameter objective function value is used as a new observation point, which is expressed as follows:
[0083] EI(ξ)=E[max(0,f * -f(ξ))|D];
[0084]
[0085] In the formula, f * represents the initial optimal hyperparameter group; EI() represents the expected improvement acquisition function; max() represents the expected improvement acquisition function; argmax() represents the function for obtaining the maximum value of the expected improvement acquisition function;
[0086] Retrain the GP using the new observation points and update the posterior distribution of the GP until the optimization termination condition is met. The hyperparameters that meet the optimization termination condition are obtained, which is the optimal hyperparameter group.
[0087] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for predicting the critical temperature of condensation of a 35kV switch cabinet with a small number of samples based on BO-BiGRU is implemented as described in any one of the embodiments.
[0088] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements a method for predicting the critical condensation temperature of a 35kV switch cabinet with a small number of samples based on BO-BiGRU as described in any one of the embodiments.
[0089] Compared with the prior art, the present invention has the following beneficial effects:
[0090] 1) The present invention provides a prediction method and system for the critical temperature of condensation of a 35kV switch cabinet with a small number of samples based on BO-BiGRU. The generator and discriminator are reconstructed using a one-dimensional convolutional layer and a spectral normalization layer, a gradient penalty term is added to the discriminator, and an ERGAN model is constructed to expand the condensation samples, thereby improving the diversity of the data set and enhancing the adaptability and stability of the model in different scenarios.
[0091] 2) The present invention provides a prediction method and system for the critical temperature of condensation of a 35kV switch cabinet with a small number of samples based on BO-BiGRU, and optimizes the hyperparameters of the bidirectional gated recurrent unit BiGRU model using the Bayesian algorithm, thereby enhancing the model's ability to capture complex data features and improving the accuracy of prediction;
[0092] 3) The present invention provides a prediction method and system for the critical temperature of condensation of a 35kV switchgear with a small number of samples based on BO-BiGRU. By setting clear evaluation indicators and analyzing the test sample set, the systematicness and comprehensiveness of the model evaluation are improved, the prediction accuracy of the model is enhanced, and the reliability and practicality of the final result are ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] Figure 1 is a flow chart of the method of the present invention;
[0094] Figure 2 It is a structural diagram of the method of the present invention;
[0095] Figure 3 This is an expanded architecture diagram of a high-voltage switch cabinet sample based on the ERGAN model in the present invention;
[0096] Figure 4 This is a BiGRU model structure diagram in an embodiment of the present invention;
[0097] Figure 5 This is a BO-BiGRU model training loss graph in an embodiment of the present invention;
[0098] Figure 6 is an absolute error curve of condensation critical temperature prediction after sample expansion in an embodiment of the present invention;
[0099] Figure 7 1 is the absolute error curve of condensation critical temperature prediction of different models in the embodiment of the present invention. DETAILED DESCRIPTION
[0100] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0101] The present invention provides the following technical solution: a prediction method and system for the critical temperature of condensation of a 35kV switch cabinet with a small number of samples based on BO-BiGRU.
[0102] Example 1
[0103] This embodiment provides a prediction method for the critical temperature of condensation of a 35kV switch cabinet with a small number of samples based on BO-BiGRU, and the specific steps include:
[0104] S1. Acquire historical operation data of a 35kv high-voltage switchgear, wherein the historical operation data includes historical condensation critical temperature data and environmental factor data; and perform data preprocessing on the historical operation data;
[0105] S11, performing data preprocessing on the historical operation data, including normalization processing and correlation analysis;
[0106] The normalization process specifically maps the historical condensation critical temperature data to the interval [0, 1], which can be expressed as:
[0107]
[0108] Where x represents the historical condensation critical temperature data; x min Indicates the minimum value of the historical condensation critical temperature data; x max Indicates the maximum value of historical condensation critical temperature data; Represents the normalized historical condensation critical temperature data;
[0109] The correlation analysis is to analyze the correlation between the environmental factor data and the historical condensation critical temperature data through the Pearson correlation coefficient, which is expressed as follows:
[0110]
[0111] In the formula, a k represents the kth environmental factor data; M represents the number of environmental factor data; x j represents the jth historical condensation critical temperature data; Q represents the number of historical condensation critical temperature data; It represents the average value of environmental factor data; Represents the average value of historical condensation critical temperature data;
[0112] Select historical condensation critical temperature data with correlation coefficients within a preset range for data expansion; in this embodiment, the preset range is [-1, 1];
[0113] S2. Please refer to Figure 3 , construct an ERGAN model, and use the ERGAN model to perform data expansion on the historical condensation critical temperature data to obtain sample data; since in the process of gradient penalty, only x with a gradient modulus greater than 1 will be punished, but it cannot be guaranteed that each x gradient modulus is less than or equal to 1, the 1-Lipschitz limit problem of the discriminator has not been solved; therefore, the ERGAN model is based on the GAN model, and uses a one-dimensional convolution 1D-CNN layer and a spectral normalization SN layer to reconstruct the generator and discriminator. The reconstructed discriminator and generator structure consists of multiple 1D-CNN layers and SN layers; the use of the SN layer discriminator can effectively solve the 1-Lipschitz limit problem, and the 1D-CNN layer allows the discriminator and generator to capture deep condensation features from the original data, improve the model's discrimination ability, and effectively prevent the occurrence of gradient instability problems while improving the quality of generated samples;
[0114] S21. Constructing the ERGAN model is specifically based on the GAN model, using a one-dimensional convolution layer and a spectral normalization layer to reconstruct the generator and the discriminator, and introducing a relative loss function of gradient penalty in the discriminator. The discriminator compares the distance between the generated sample and the real sample, rather than directly judging whether the input is a real sample, to solve the problem that the training process of the discriminator in the GAN model is not stable enough and the authenticity of the generated samples cannot be guaranteed;
[0115] S211, the one-dimensional convolutional layer is expressed as:
[0116]
[0117] In the formula, * represents the convolution operation; τ represents the position index in the output sequence; K represents the length of the convolution kernel; C in Indicates the number of input channels; x τ-α Represents the value of the input data sequence at the τ-α position; W αβ Represents the value of the αth row and βth column in the weight matrix W;
[0118] S212, the spectrum is normalized to one layer, which is expressed by the formula:
[0119]
[0120] Where WSN (W) represents the weight matrix after spectral normalization; ||W||2 represents the spectral norm of the weight matrix W;
[0121] S213, the output of the discriminator is expressed as:
[0122] D R (x r -x g )=σ(C(x r )-C(x g ));
[0123] Where D R () represents the discriminator output; x r represents the real sample; x g Represents generated samples; σ() represents the sigmid function; C() represents the output of the nonlinear conversion layer;
[0124] The loss function L corresponding to the generator G , expressed as:
[0125]
[0126] The relative loss function of the gradient penalty introduced in the discriminator is expressed as:
[0127]
[0128] In the formula, λ represents the gradient penalty factor; P data represents the true sample distribution; P g Represents the generated sample distribution; (x r -x g )~(P data ,P g ) represents sampling from real samples and generated samples; Represents sampled data; represents the gradient penalty term; represents the sampling data distribution; D() represents the discriminator output before reconstruction; represents the gradient operator;
[0129] S3. Please refer to Figure 4 , construct a bidirectional gated recurrent unit BiGRU model; the BiGRU model includes a forward gated recurrent unit GRU and a backward gated recurrent unit GRU. In the forward GRU, the input sequence is processed in order from front to back; in the backward GRU, the input sequence is processed in order from back to front; the BiGRU model is expressed as follows:
[0130]
[0131] Where, X t Represents input data; Y t Represents input data; represents the output of the forward hidden layer; represents the output of the backward hidden layer; Represents the output of the forward hidden layer at the previous moment; Indicates the output to the hidden layer at the next moment; α t represents the forward hidden layer output weight; β t represents the output weight of the backward hidden layer; b t Indicates the bias value;
[0132] S31. Use the Bayesian algorithm to optimize hyperparameters and obtain the optimal hyperparameter group. The hyperparameter optimization process is as follows:
[0133] A hyperparameter objective function is defined, where the hyperparameter group includes a learning rate, a batch sample size, the number of neurons in the hidden layer, and a dropout rate; the hyperparameter objective function f is expressed as:
[0134] f(R)=1-Loss(R);
[0135] Where R represents the set of hyperparameter groups; Loss(R) represents the loss value of the BiGRU model;
[0136] The Gaussian process is used as a proxy model for the Bayesian algorithm and approximated as a hyperparameter objective function, which is expressed as follows:
[0137] f(ξ)~GP(m(ξ),k(ξ,ξ'));
[0138] Where GP represents Gaussian process; ξ represents the currently considered hyperparameter combination; ξ' represents the historical hyperparameter combination; m() represents the mean function; k() represents the covariance function;
[0139] Set an initial observation point, which is expressed as D = {hyperparameter group, hyperparameter objective function value}, use the initial observation point to train the Gaussian process proxy model GP, initialize the posterior distribution of GP, and express the posterior distribution in the formula as follows:
[0140] p(f(ξ)|D)~N(μ,σ 2 );
[0141] In the formula, D represents the initial observation point; μ represents the mean of the posterior distribution; σ 2 represents the variance of the posterior distribution;
[0142] The expected improvement acquisition function is used to select the hyperparameter to be evaluated, and the corresponding hyperparameter objective function value is calculated according to the hyperparameter to be evaluated. The hyperparameter objective function value is used as a new observation point, which is expressed as follows:
[0143] EI(ξ)=E[max(0,f * -f(ξ))|D];
[0144]
[0145] In the formula, f * represents the initial optimal hyperparameter group; EI() represents the expected improvement acquisition function; max() represents the expected improvement acquisition function; argmax() represents the function for obtaining the maximum value of the expected improvement acquisition function;
[0146] Retrain the GP using the new observation points and update the posterior distribution of the GP until the optimization termination condition is met. The hyperparameters that meet the optimization termination condition are obtained, which is the optimal hyperparameter group.
[0147] See also Figure 5 ,The results of hyperparameter group optimization are shown in Table 1.,The BO-BiGRU model consists of a layer of BiGRU, and the number of neuron units is 128;,The Bayesian algorithm iteratively searches for the optimal hyperparameter group, and the adaptive moment estimation Adam algorithm is used to update the built-in parameters of the BO-BiGRU model;
[0148] Table 1 Hyperparameter group optimization results
[0149]
[0150] S32, using the optimal hyperparameter group to train the BiGRU model, and evaluating the trained BiGRU model based on the test sample set and the preset performance evaluation index to obtain the final BO-BiGRU model;
[0151] The preset performance evaluation index includes the mean absolute error J MAE , mean square error J MSE and mean square logarithmic error J MSLE , expressed as:
[0152]
[0153] Where: y i Represents the i-th sample data value in the test set; represents the predicted value of the i-th sample data in the test set; N represents the number of samples in the test set;
[0154] S4. Acquire the real-time operation data of the 35 kV high-voltage switchgear to be predicted, input the real-time operation data into the final BO-BiGRU model, and obtain the prediction result of the condensation critical temperature;
[0155] S5. Please refer to Figure 6 , the absolute error curve of condensation critical temperature prediction after sample expansion; the original data set is expanded by 40% and 80% respectively through ERGAN, and the new samples are combined with the original condensation samples to train the BO-BiGRU model to predict the condensation critical temperature; the prediction model with 80% expanded samples has the smallest absolute error, indicating that the prediction result is closest to the actual situation; the original training set does not expand the condensation samples, and the prediction model has the largest absolute error;
[0156] The prediction error indicators of condensation critical temperature under different expansion ratios are shown in Table 2. After expanding the sample, the performance of the prediction model is significantly improved. When the expansion ratio is 40%, compared with the case of not expanding the condensation sample, J MAE , J MSE and J MLSE When the expansion ratio is 80%, J MAE , J MSE and J MLSE They increased by 78.62%, 94.63% and 95.59% respectively;
[0157] Table 2 Prediction error index of condensation critical temperature under different expansion ratios
[0158]
[0159]
[0160] S6. Please refer to Figure 7 , the absolute error curves of condensation critical temperature prediction of different models; the absolute error of BO-BiGRU prediction model is the smallest, indicating that the prediction result is closest to the actual situation; due to the complex condensation mechanism of 35kV high-voltage switchgear, compared with the data-driven method, the condensation critical temperature result predicted by the Manus correction formula based on the physical model has a larger deviation;
[0161] The prediction error indicators of condensation critical temperature of different models are shown in Table 3. The prediction performance of BO-BiGRU prediction model is the best. Compared with the Manus correction formula, the J of BO-BiGRU is MAE , J MSE and J MLSE They are increased by 68.95%, 87.87% and 89.66% respectively; compared with LSTM, BO-BiGRU’s J MAE , J MSEand J MLSE They are increased by 33.01%, 52.87% and 57.14% respectively; compared with BiGRU, BO-BiGRU’s J MAE , J MSE and J MLSE An increase of 36.35%, 59.30% and 62.5% respectively.
[0162] Table 3 Prediction error index of condensation critical temperature of different models
[0163]
[0164] Example 2
[0165] This embodiment provides a prediction system for the critical condensation temperature of a 35kV high-voltage switch cabinet with a small number of samples based on BO-BiGRU. The system includes a data acquisition module, a critical condensation temperature prediction module, and a data output module, wherein:
[0166] The data acquisition module is used to acquire the real-time operation data of the 35kV high-voltage switchgear, normalize the real-time operation data, and transmit the normalized real-time operation data to the condensation critical temperature prediction module;
[0167] The condensation critical temperature prediction module is internally provided with a BO-BiGRU model. The real-time operation data is input into the BO-BiGRU model to obtain the prediction result of the condensation critical temperature. The BO-BiGRU construction process is specifically as follows:
[0168] Acquire historical operation data of a 35kv high-voltage switchgear, wherein the historical operation data includes historical condensation critical temperature data and environmental factor data; perform data preprocessing on the historical condensation critical temperature data; construct an ERGAN model, and use the ERGAN model to perform data expansion on the historical condensation critical temperature data to obtain sample data; construct a sample data set based on the sample data, and divide the sample data set into a training sample set and a test sample set;
[0169] Constructing a bidirectional gated recurrent unit BiGRU model, optimizing the hyperparameters of the BiGRU model using a Bayesian algorithm to obtain an optimal hyperparameter group, training the BiGRU model with the optimal hyperparameter group using a training sample set, and evaluating the trained BiGRU model based on the test sample set and a preset performance evaluation index to obtain a BO-BiGRU model;
[0170] The data output module is used to display the prediction result of the critical condensation temperature.
[0171] Example 3
[0172] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a method for predicting the critical temperature of condensation of a 35kV high-voltage switch cabinet with a small number of samples based on BO-BiGRU is implemented as described in any one of Embodiment 1.
[0173] Example 4
[0174] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method for predicting the critical temperature of condensation of a 35kV high-voltage switchgear with a small number of samples based on BO-BiGRU as described in any one of Embodiment 1 is implemented.
[0175] It is worth noting that the system, electronic device and computer-readable storage medium described in the present invention are based on the same principles as the method described in Example 1, and will not be described in detail here.
[0176] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A prediction method for critical condensation temperature of 35kV switch cabinet with few samples based on BO-BiGRU, characterized in that: The method comprises: Acquire historical operation data of a 35kv high-voltage switchgear, wherein the historical operation data includes historical condensation critical temperature data and environmental factor data; perform data preprocessing on the historical operation data to obtain data preprocessing results; construct an ERGAN model, and based on the data preprocessing results, use the ERGAN model to perform data expansion on the historical condensation critical temperature data to obtain sample data; construct a sample data set based on the sample data, and divide the sample data set into a training sample set and a test sample set; Constructing a bidirectional gated recurrent unit BiGRU model, optimizing the hyperparameters of the BiGRU model using a Bayesian algorithm to obtain an optimal hyperparameter group, training the BiGRU model with the optimal hyperparameter group using a training sample set, and evaluating the trained BiGRU model based on the test sample set and a preset performance evaluation index to obtain a BO-BiGRU model; The real-time operation data of the 35 kV high-voltage switchgear to be predicted is obtained, and the real-time operation data is input into the final BO-BiGRU model to obtain the prediction result of the condensation critical temperature.
2. The prediction method of condensation critical temperature of 35kV switch cabinet based on BO-BiGRU with few samples according to claim 1 is characterized in that: The data preprocessing of the historical operation data includes normalization processing and correlation analysis. The normalization processing is specifically mapping the historical condensation critical temperature data to the interval [0, 1], which is expressed as: Where x represents the historical condensation critical temperature data; x min Indicates the minimum value of the historical condensation critical temperature data; x max Indicates the maximum value of historical condensation critical temperature data; Represents the normalized historical condensation critical temperature data; The correlation analysis is to analyze the correlation between the environmental factor data and the historical condensation critical temperature data through the Pearson correlation coefficient, which is expressed as follows: In the formula, a k represents the kth environmental factor data; M represents the number of environmental factor data; x j represents the jth historical condensation critical temperature data; Q represents the number of historical condensation critical temperature data; represents the average value of environmental factor data; x represents the average value of historical condensation critical temperature data; The historical condensation critical temperature data with correlation coefficients within a preset range are selected for data expansion.
3. The prediction method of condensation critical temperature of 35kV switch cabinet based on BO-BiGRU with few samples according to claim 2 is characterized in that: The ERGAN model is constructed based on the GAN model, using one-dimensional convolutional layers and spectral normalization layers to reconstruct the generator and discriminator, and introducing a relative loss function of gradient penalty in the discriminator, where: The one-dimensional convolutional layer is expressed as follows: In the formula, * represents the convolution operation; τ represents the position index in the output sequence; K represents the length of the convolution kernel; C in Indicates the number of input channels; x τ-α Represents the value of the input data sequence at the τ-α position; W αβ Represents the value of the αth row and βth column in the weight matrix W; The spectrum is normalized to one layer and expressed by the formula: Where W SN (W) represents the weight matrix after spectral normalization; ||W||2 represents the spectral norm of the weight matrix W; The output of the discriminator is expressed as: D R (x r -x g )=σ(C(x r )-C(x g )); Where D R () represents the discriminator output; x r represents the real sample; x g Represents generated samples; σ() represents the sigmid function; C() represents the output of the nonlinear conversion layer; The loss function L corresponding to the generator G , expressed as: The relative loss function of the gradient penalty introduced in the discriminator is expressed as: In the formula, λ represents the gradient penalty factor; P data represents the true sample distribution; P g Represents the generated sample distribution; (x r -x g )~(P data ,P g ) represents sampling from real samples and generated samples; Represents sampled data; represents the gradient penalty term; represents the sampling data distribution; D() represents the discriminator output before reconstruction; Represents the gradient operator.
4. The prediction method of condensation critical temperature of 35kV switch cabinet based on BO-BiGRU with few samples according to claim 3 is characterized in that: A bidirectional gated recurrent unit BiGRU model is constructed, and the Bayesian algorithm is used to optimize hyperparameters to obtain the optimal hyperparameter group. The hyperparameter optimization process is as follows: A hyperparameter objective function is defined, where the hyperparameter group includes a learning rate, a batch sample size, the number of neurons in the hidden layer, and a dropout rate; the hyperparameter objective function f is expressed as: f(R)=1-Loss(R); Where R represents the set of hyperparameter groups; Loss(R) represents the loss value of the BiGRU model; The Gaussian process is used as a proxy model for the Bayesian algorithm and approximated as a hyperparameter objective function, which is expressed as follows: f(ξ)~GP(m(ξ),k(ξ,ξ')); Where GP represents Gaussian process; ξ represents the currently considered hyperparameter combination; ξ' represents the historical hyperparameter combination; m() represents the mean function; k() represents the covariance function; Set an initial observation point, which is expressed as D = {hyperparameter group, hyperparameter objective function value}, use the initial observation point to train the Gaussian process proxy model GP, initialize the posterior distribution of GP, and express the posterior distribution in the formula as follows: p(f(ξ)|D)~N(μ,σ 2 ); In the formula, D represents the initial observation point; μ represents the mean of the posterior distribution; σ 2 represents the variance of the posterior distribution; The expected improvement acquisition function is used to select the hyperparameter to be evaluated, and the corresponding hyperparameter objective function value is calculated according to the hyperparameter to be evaluated. The hyperparameter objective function value is used as a new observation point, which is expressed as follows: EI(ξ)=E[max(0,f * -f(ξ))|D]; In the formula, f * represents the initial optimal hyperparameter group; EI() represents the expected improvement acquisition function; max() represents the maximum value function; argmax() represents the function for obtaining the maximum value of the expected improvement acquisition function; Retrain the GP using the new observation points and update the posterior distribution of the GP until the optimization termination condition is met. The hyperparameters that meet the optimization termination condition are obtained, which is the optimal hyperparameter group.
5. The prediction method of condensation critical temperature of 35kV switch cabinet based on BO-BiGRU with few samples according to claim 4 is characterized in that: The preset performance evaluation indicators include the mean absolute error J MAE , mean square error J MSE and mean square logarithmic error J MSLE , expressed as: Where: y i Represents the i-th sample data value in the test set; represents the predicted value of the i-th sample data in the test set; N represents the number of samples in the test set.
6. A prediction system for the critical temperature of condensation of 35kV high-voltage switchgear with a small number of samples based on BO-BiGRU, characterized in that: The system includes a data acquisition module, a condensation critical temperature prediction module and a data output module, wherein: The data acquisition module is used to acquire the real-time operation data of the 35kV high-voltage switchgear, normalize the real-time operation data, and transmit the normalized real-time operation data to the condensation critical temperature prediction module; The condensation critical temperature prediction module is internally provided with a BO-BiGRU model. The real-time operation data is input into the BO-BiGRU model to obtain the prediction result of the condensation critical temperature. The BO-BiGRU construction process is specifically as follows: Acquire historical operation data of a 35kv high-voltage switchgear, wherein the historical operation data includes historical condensation critical temperature data and environmental factor data; perform data preprocessing on the historical condensation critical temperature data; construct an ERGAN model, and use the ERGAN model to perform data expansion on the historical condensation critical temperature data to obtain sample data; construct a sample data set based on the sample data, and divide the sample data set into a training sample set and a test sample set; Constructing a bidirectional gated recurrent unit BiGRU model, optimizing the hyperparameters of the BiGRU model using a Bayesian algorithm to obtain an optimal hyperparameter group, training the BiGRU model with the optimal hyperparameter group using a training sample set, and evaluating the trained BiGRU model based on the test sample set and a preset performance evaluation index to obtain a BO-BiGRU model; The data output module is used to display the prediction result of the critical condensation temperature.
7. The prediction system for critical condensation temperature of 35kV switch cabinet with few samples based on BO-BiGRU according to claim 6 is characterized in that: The ERGAN model is constructed based on the GAN model, using one-dimensional convolutional layers and spectral normalization layers to reconstruct the generator and discriminator, and introducing a relative loss function of gradient penalty in the discriminator, where: The one-dimensional convolutional layer is expressed as follows: In the formula, * represents the convolution operation; τ represents the position index in the output sequence; K represents the length of the convolution kernel; C in Indicates the number of input channels; x τ-α Represents the value of the input data sequence at the τ-α position; W αβ Represents the value of the αth row and βth column in the weight matrix W; The spectrum is normalized to one layer and expressed by the formula: Where W SN (W) represents the weight matrix after spectral normalization; ||W||2 represents the spectral norm of the weight matrix W; The output of the discriminator is expressed as: D R (x r -x g )=σ(C(x r )-C(x g )); Where D R () represents the discriminator output; x r represents the real sample; x g Represents generated samples; σ() represents the sigmid function; C() represents the output of the nonlinear conversion layer; The loss function L corresponding to the generator G , expressed as: The relative loss function of the gradient penalty introduced in the discriminator is expressed as: In the formula, λ represents the gradient penalty factor; P data represents the true sample distribution; P g Represents the generated sample distribution; (x r -x g )~(P data ,P g ) represents sampling from real samples and generated samples; Represents sampled data; represents the gradient penalty term; represents the sampling data distribution; D() represents the discriminator output before reconstruction; Represents the gradient operator.
8. According to the prediction system of the critical temperature of condensation of 35kV switch cabinet with few samples based on BO-BiGRU in claim 7, a bidirectional gated recurrent unit BiGRU model is constructed, and the Bayesian algorithm is used to optimize the hyperparameters to obtain the optimal hyperparameter group. The hyperparameter optimization process is specifically as follows: A hyperparameter objective function is defined, where the hyperparameter group includes a learning rate, a batch sample size, the number of neurons in the hidden layer, and a dropout rate; the hyperparameter objective function f is expressed as: f(R)=1-Loss(R); Where R represents the set of hyperparameter groups; Loss(R) represents the loss value of the BiGRU model; The Gaussian process is used as a proxy model for the Bayesian algorithm and approximated as a hyperparameter objective function, which is expressed as follows: f(ξ)~GP(m(ξ),k(ξ,ξ')); Where GP represents Gaussian process; ξ represents the currently considered hyperparameter combination; ξ' represents the historical hyperparameter combination; m() represents the mean function; k() represents the covariance function; Set an initial observation point, which is expressed as D = {hyperparameter group, hyperparameter objective function value}, use the initial observation point to train the Gaussian process proxy model GP, initialize the posterior distribution of GP, and express the posterior distribution in the formula as follows: p(f(ξ)|D)~N(μ,σ 2 ); In the formula, D represents the initial observation point; μ represents the mean of the posterior distribution; σ 2 represents the variance of the posterior distribution; The expected improvement acquisition function is used to select the hyperparameter to be evaluated, and the corresponding hyperparameter objective function value is calculated according to the hyperparameter to be evaluated. The hyperparameter objective function value is used as a new observation point, which is expressed as follows: EI(ξ)=E[max(0,f * -f(ξ))|D]; In the formula, f * represents the initial optimal hyperparameter group; EI() represents the expected improvement acquisition function; max() represents the maximum value function; argmax() represents the function for obtaining the maximum value of the expected improvement acquisition function; Retrain the GP using the new observation points and update the posterior distribution of the GP until the optimization termination condition is met. The hyperparameters that meet the optimization termination condition are obtained, which is the optimal hyperparameter group.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for predicting the critical condensation temperature of a 35kV switch cabinet with a small number of samples based on BO-BiGRU is implemented as described in any one of claims 1 to 5.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for predicting the critical condensation temperature of a 35kV switch cabinet with a small number of samples based on BO-BiGRU is implemented as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Condensation prediction control method, module and system based on switch cabinet
CN115811133A
Cited By
Condensation prediction control method and system of electrical cabinet
CN121165599A