A method, system and storage medium for predicting end-of-line loop irregularity
By combining Kalman filters and VAE autoencoders with deep belief networks, historical electrical and environmental parameters of the end-point power grid loops are processed, solving the problem of low prediction accuracy of end-point power grid loop anomaly in existing technologies and achieving higher prediction accuracy and system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG JINCHENG ELECTRONICS CO LTD
- Filing Date
- 2023-08-25
- Publication Date
- 2026-04-24
AI Technical Summary
Existing methods for predicting the anomaly of end-point power grid circuits have low accuracy when dealing with nonlinear load data and outliers, making it difficult to accurately predict the aging degree of embedded electrical equipment, which increases the risk of electrical fires.
A Kalman filter is used to preprocess historical electrical and environmental parameters, and a variational autoencoder (VAE) is used to handle outliers and missing values. A deep belief network model is used for training and prediction, and environmental temperature and humidity parameters are added to improve prediction accuracy.
It improves the prediction accuracy and reliability of end-point power grid circuit anomaly, enhances the accuracy of electrical equipment aging detection, and reduces the risk of electrical fires.
Smart Images

Figure CN117216487B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power grid security technology, and in particular to a method, system, and storage medium for predicting the anomaly degree of end-grid circuits. Background Technology
[0002] Electrical equipment undergoes aging and changes during prolonged operation, increasing the likelihood of electrical fires. Statistics show that 56.7% of major fires are caused by electrical issues, making the monitoring of aging and changes in electrical equipment essential. However, for embedded electrical equipment, such as light fixtures installed in sealed containers, inspectors often find it difficult to visually assess the degree of change. Accurately predicting the degree of change in circuits within the final electrical grid remains a significant technical challenge in electrical fire prevention.
[0003] Most existing forecasting methods are based on time series analysis and regression analysis. Time series analysis assumes that the electrical characteristic data of equipment is stationary and linear. However, actual load data often contains nonlinear relationships and complex characteristics, which may lead to low prediction accuracy of time series models. Furthermore, external factors and influencing factors such as temperature and humidity can significantly impact equipment changes, but these are difficult to capture and handle effectively in time series models. Regression analysis struggles to model the complex interactions between multiple independent variables. Moreover, the electrical characteristic data of resistive equipment in the end-point power grid may contain outliers or outliers due to various reasons (such as faults or unexpected events). Regression analysis is highly sensitive to outliers and outliers, resulting in insufficient fitting and prediction accuracy of its regression models. Summary of the Invention
[0004] This invention addresses the shortcomings of existing technologies by providing a method for predicting the anomaly degree of end-grid circuits, comprising the following steps:
[0005] S1, the system collects multiple sets of historical electrical parameters of the terminal power grid circuit within a preset time period by sensors installed in the power circuit of the equipment, and collects multiple sets of historical environmental parameters of the terminal power grid circuit within a preset time period by temperature / humidity sensors placed in the environment of the terminal power grid circuit. The circuit electrical parameters include, but are not limited to, circuit voltage, circuit steady-state current, circuit active power and circuit equivalent internal resistance. The environmental parameters include, but are not limited to, cable surface temperature, ambient temperature and ambient humidity.
[0006] S2, after preprocessing the collected historical electrical parameters and historical environmental parameters of the circuit using a Kalman filter, a first sample parameter set is established. The first sample parameter set is then input into the constructed VAE encoder for re-encoding and output to form a second sample parameter set.
[0007] S3, construct a deep belief network model, use the second sample parameter set for training the deep belief network model, input the real-time collected electrical parameters and environmental parameters of the circuit into the trained deep belief network model, and output the anomaly prediction value of the current end power grid circuit.
[0008] Preferably, step S1 includes: setting the frequency of parameter data acquisition, preprocessing the historical electrical parameters and historical environmental parameters of the acquired end-grid circuits, and establishing an n-dimensional sample input vector. ,in The loop voltages at time i, collected over a preset time period of N hours, are respectively represented. steady-state current of the loop Active power of the circuit Equivalent internal resistance of the loop Cable surface temperature Ambient temperature and ambient humidity .
[0009] Preferably, the step involves using a Kalman filter to preprocess the collected historical electrical parameters and historical environmental parameters of the circuit. Specifically, this includes: in the prediction phase, the Kalman filter uses the filtered estimation from the previous state to obtain the optimal data, and makes an estimate of the current state to obtain the predicted value.
[0010] ;
[0011] in for( The optimal estimated value of the loop parameters at time ) for( ) at all times The optimal estimate at time; for( The covariance matrix of the estimated values at time ) for( ) at all times The covariance matrix of the time-time estimates; For the effect on The state transition model on the above takes a value of 1; To act on the controller vector The input control model takes a value of 0; It means ( The control gain at time ) is set to 0; It is the covariance of the process excitation noise, which is a preset adjustable parameter;
[0012] During the update phase, the Kalman filter optimizes the predicted value obtained in the prediction phase using the observations of the current state to obtain a new estimate as the filter's output value.
[0013] ;in The matching value for the number of digits in the observations and the number of digits in the estimates is set to 1. In order to be in The collected values of circuit electrical parameters and environmental parameters at any given time. The identity matrix is a preset value; the data vector is obtained after smoothing the data through the Kalman filter. This serves as the first set of sample parameters input to the VAE encoder.
[0014] Preferably, the step of inputting the first sample parameter set into the constructed VAE encoder for re-encoding and output specifically includes:
[0015] The outliers and missing values in the first sample parameter set are processed. The outliers are extreme values of the circuit load electrical parameters that do not conform to the actual situation. The missing values are sample values for which data was not collected at some time points. The outliers are replaced with zero values to form the corrected first sample parameter set.
[0016] A VAE encoder is constructed, which has L hidden layers with dimension H. The structure of the VAE encoder is as follows: the first sample parameters output after Kalman filtering are... , as input to the VAE encoder ,Right now: = ; The corresponding hidden variable is : Where L represents the number of hidden layers, This is the weight matrix of this layer. It is the bias vector of this layer. It is the output of the previous layer; ReLU is the modified linear unit activation function.
[0017] Using the mean vector As the output of the encoder: ;in It is the weight matrix output by the encoder. It is the bias vector output by the encoder; the corrected first sample parameter set is input into the constructed VAE encoder for re-encoding and then outputs the second sample parameter set.
[0018] Preferably, step S3 includes:
[0019] S31, randomly divide the second sample parameter set after encoding into training set, validation set and test set according to a set ratio.
[0020] S32, Set the input vector D(ti) of the deep belief network model. The input vector consists of the re-encoded loop electrical parameters and environmental parameters. The output of the deep belief network model is the loop anomaly degree.
[0021] ;
[0022] in F(ti) is the input to the deep belief network for period ti, and F(ti) is the neuron state output of the deep belief network model for period ti. The equipment anomaly measured in the power grid circuit at hour ti;
[0023] S33, Construct a deep belief network model, wherein the input variables of the deep belief network model are the device electrical parameter vector. The output variable is the device variability data F(ti). The input layer is configured with m neurons, and the hidden and output layers have n and 1 neurons, respectively. The connection weights between neurons are represented by a matrix W, and the biases of neurons are represented by a vector b. During the initial training phase, a random number between 0 and 1 is randomly assigned to the weight matrix W and the bias vector b in the deep belief network, providing initial values. The hidden layer receives the output from the input layer, uses the weight matrix and bias vector to perform linear combination and nonlinear transformation on the input vector, extracts features from the input data, and outputs them to the next layer. The hidden layer is represented by the first... At time j, the output of the j-th neuron If we represent the output of the output layer, then: ;in This represents the weights between the j-th neuron in the input layer and the k-th neuron in the hidden layer. This represents the weights between the k-th neuron in the hidden layer and the output layer. Let represent the bias of the k-th neuron in the hidden layer, b represent the bias of the output layer, and f(x) represent the activation function; configure the output layer and apply the sigmoid function to map the output value to a probability value between 0 and 1: h_out = 1 / (1 + e^(-j) / j) -a ), where a is the input of the Sigmoid function, and the output value h_out is close to 1, indicating a high probability of resistive device malfunction, and close to 0, indicating a low probability of resistive device malfunction;
[0024] S34. The deep belief network model is trained using the training set, validation set and test set. The electrical parameters and environmental parameters of the end grid circuit collected in real time are input into the trained deep belief network model, and the anomaly prediction value of the current end grid circuit is output.
[0025] This invention also discloses a prediction system for the anomaly degree of a terminal power grid loop, comprising a parameter acquisition module, a preprocessing encoding module, and a prediction module. The parameter acquisition module acquires multiple sets of historical electrical parameters of the terminal power grid loop within a preset time period, transmitted by sensors placed in the power circuit of the equipment, and multiple sets of historical environmental parameters of the terminal power grid loop within a preset time period, transmitted by temperature / humidity sensors placed in the environment of the terminal power grid loop, within a preset time period. The loop electrical parameters include, but are not limited to, loop voltage, loop steady-state current, loop active power, and loop equivalent internal resistance. The environmental parameters include, but are not limited to, cable surface temperature, ambient temperature, and ambient humidity. The preprocessing encoding module preprocesses the acquired historical electrical parameters and historical environmental parameters using a Kalman filter to establish a first sample parameter set. This first sample parameter set is then input into a constructed VAE encoder for re-encoding and output to form a second sample parameter set. The prediction module constructs a deep belief network model, uses the second sample parameter set for training the deep belief network model, and inputs the real-time acquired loop electrical and environmental parameters into the trained deep belief network model to output the predicted anomaly value of the current terminal power grid loop.
[0026] Preferably, the parameter acquisition module is further configured to: set the frequency of parameter data acquisition, preprocess the historical electrical parameters and historical environmental parameters of the acquired end-point power grid circuit, and establish an n-dimensional sample input vector. ,in The loop voltages at time i, collected over a preset time period of N hours, are respectively represented. steady-state current of the loop Active power of the circuit Equivalent internal resistance of the loop Cable surface temperature Ambient temperature and ambient humidity .
[0027] Preferably, the preprocessing encoding module is specifically configured as follows:
[0028] In the prediction phase, the Kalman filter uses the filtered estimation from the previous state to obtain the optimal data, and makes an estimate of the current state to obtain the predicted value:
[0029] ;
[0030] in for( The optimal estimated value of the loop parameters at time ) for( ) at all times The optimal estimate at time; for( The covariance matrix of the estimated values at time ) for( ) at all times The covariance matrix of the time-time estimates; For the effect on The state transition model on the above takes a value of 1; To act on the controller vector The input control model takes a value of 0; It means ( The control gain at time ) is set to 0; It is the covariance of the process excitation noise, which is a preset adjustable parameter;
[0031] During the update phase, the Kalman filter optimizes the predicted value obtained in the prediction phase using the observations of the current state to obtain a new estimate as the filter's output value.
[0032] ;in The matching value for the number of digits in the observations and the number of digits in the estimates is set to 1. In order to be in The collected values of circuit electrical parameters and environmental parameters at any given time. The identity matrix is a preset value; the data vector is obtained after smoothing the data through the Kalman filter. This serves as the first set of sample parameters input to the VAE encoder.
[0033] The present invention also discloses a device for predicting the anomaly degree of the end-grid circuit, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the methods described above.
[0034] The present invention also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the methods described above.
[0035] This invention discloses a method, system, and storage medium for predicting loop anomalies in a power grid. By combining a Kalman filter, a VAE autoencoder, and a deep belief network, the method first processes the collected historical electrical and environmental parameters using a Kalman filter to reduce the impact of noise on the collected data. Secondly, a VAE autoencoder generates and supplements discrete and outlier points in the data, ensuring the comparability and stability of the data. Finally, a deep belief network is used to train and predict loop anomalies, and a backpropagation algorithm is employed to optimize the parameters, improving the prediction accuracy. Furthermore, environmental parameters such as temperature and humidity are incorporated into the prediction process, significantly increasing the reliability and accuracy of the prediction. Thus, by utilizing existing monitoring methods and data, and adding environmental influence factors, the method maximizes the accuracy of the prediction results and the stability of the system, thereby enhancing the system's reliability and automation level.
[0036] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0037] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0038] Figure 1 This is a schematic diagram of the specific process of the end-point power grid loop anomaly prediction method disclosed in an embodiment of the present invention.
[0039] Figure 2 This is a schematic diagram of the principle of the end-grid loop anomaly prediction system disclosed in an embodiment of the present invention. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0041] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains. The terms “first,” “second,” and similar terms used in the specification and claims of this patent application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a limitation of quantity, but rather indicate the presence of at least one.
[0042] Currently, aging and abnormal changes in electrical equipment are a common cause of large-scale fires, and assessing the degree of aging and abnormal changes in electrical equipment is crucial for fire prevention. However, for some embedded electrical equipment, it is often difficult to visually determine the degree of change, necessitating prediction of the degree of change in circuits within the end-user power grid. Existing prediction methods are mostly based on time series analysis and regression analysis. Time series analysis, when predicting the degree of change in circuits within the end-user power grid, typically treats historical electrical characteristic data of equipment as a time series and attempts to capture trends, seasonality, and periodicity to predict future load conditions. However, time series analysis methods all assume that the electrical characteristic data of equipment is stationary and linear; however, actual load data often contains nonlinear relationships and complex characteristics, which may lead to low prediction accuracy of the time series model. Regression analysis generally establishes a linear model, finding the linear relationship between independent variables such as current, voltage, and temperature and the dependent variable (resistive equipment) by fitting historical load data. However, regression analysis is sensitive to outliers and abnormal values, which can result in insufficient accuracy in the fitting and prediction results of its regression model.
[0043] Based on the above problems, this embodiment discloses a method for predicting the anomaly degree of the terminal power grid loop, as shown in the attached figure. Figure 1 As shown, the method improves the accuracy and reliability of loop anomaly prediction by using variational autoencoders combined with machine learning. Specifically, this method may include the following:
[0044] Step S1: Collect multiple sets of historical electrical parameters of the end power grid circuit within a preset time period by sensors installed in the power circuit of the equipment, and collect multiple sets of historical environmental parameters of the end power grid circuit within a preset time period by temperature / humidity sensors placed in the environment of the end power grid circuit. The circuit electrical parameters include, but are not limited to, circuit voltage, circuit steady-state current, circuit active power and circuit equivalent internal resistance. The environmental parameters include, but are not limited to, cable surface temperature, ambient temperature and ambient humidity.
[0045] In this embodiment, step S1 further includes setting the frequency of parameter data collection, preprocessing the historical electrical parameters and historical environmental parameters of the collected end-grid circuits, and establishing an n-dimensional sample input vector with an n-hour unit period. ,in The loop voltages at time i are respectively collected within a preset time period of n hours. steady-state current of the loop Active power of the circuit Equivalent internal resistance of the loop Cable surface temperature Ambient temperature and ambient humidity .
[0046] Specifically, in this embodiment, a 240-hour data collection cycle is used, with data collected once per hour. The above sample input vector... This represents the circuit electrical and environmental parameters from hour ti to the previous 240 hours, where These can be vectors representing loop voltage, loop steady-state current, loop active power, loop equivalent internal resistance, cable surface temperature, ambient temperature, and ambient humidity data within the period [ti-240, ti].
[0047] Step S2: After preprocessing the collected historical electrical parameters and historical environmental parameters of the circuit using a Kalman filter, a first sample parameter set is established. The first sample parameter set is then input into the constructed VAE encoder for re-encoding and output to form a second sample parameter set.
[0048] In this embodiment, the preprocessing of the collected historical electrical parameters and historical environmental parameters of the circuit using a Kalman filter specifically includes:
[0049] During the prediction phase, the Kalman filter uses the filtered estimate from the previous state to obtain the optimal data, and then estimates the current state to obtain the predicted value.
[0050] ;
[0051] in for( The optimal estimated value of the loop parameters at time ) for( ) at all times The optimal estimate at time; for( The covariance matrix of the estimated values at time ) for( ) at all times The covariance matrix of the time-time estimates; For the effect on The state transition model on the above takes a value of 1; To act on the controller vector The input control model takes a value of 0; It means ( The control gain at time ) is set to 0; This represents the covariance of the process excitation noise and the error between the state transition matrix and the actual process. It is used as a preset adjustable parameter during estimation. Since this parameter generally remains constant at the next time step based on the measured loop electrical and environmental parameters, the state transition matrix in this embodiment is set to a scalar of 1. In most practical cases, there is no control gain; therefore, in this embodiment… The value is 0.
[0052] During the update phase, the Kalman filter optimizes the predicted value obtained in the prediction phase using the observations of the current state to obtain a new estimate as the filter's output value.
[0053] ;in The matching value for the number of digits in the observations and the number of digits in the estimates is set to 1. In order to be in The collected values of circuit electrical parameters and environmental parameters at any given time. The identity matrix is a preset value; the data vector is obtained after smoothing the data through the Kalman filter. This serves as the first set of sample parameters input to the VAE encoder.
[0054] Specifically, in the update stage of smoothing the acquired data using a Kalman filter in this embodiment, the following three quantities need to be calculated:
[0055] Measurement residuals: ;
[0056] Measurement residual covariance: ;
[0057] Optimal Kalman gain: ;
[0058] in, The covariance matrix of the observation noise, which is generally taken to be absolute to the inherent noise of the measuring device. Match the number of digits in the observations with the number of digits in the estimates. Typically, the elements in a matrix are only 1s and 0s. In this invention, H is set to 1. In order to be in At any given moment, a measured value of the circuit's electrical and environmental parameters in their actual state.
[0059] Then update The optimal estimate of time and Covariance matrix of time estimates :
[0060]
[0061] in It is the identity matrix, obtained after the above Kalman filter data smoothing process. This data vector can be used as input for the next step of the VAE encoder, improving the encoding accuracy of the encoder disclosed in this embodiment. The collected environmental and loop parameters are processed in the first stage using a Kalman filter to remove noise, making the collected data more realistic and improving the reliability and accuracy of the prediction.
[0062] In this embodiment, the step of inputting the first sample parameter set into the constructed VAE encoder for re-encoding and output specifically includes the following:
[0063] Step S101: Process outliers and missing values in the first sample parameter set. Outliers are extreme values of circuit load electrical parameters that do not conform to the actual situation. Missing values are sampled values for which data was not collected at some time points. Replace the outliers with zero values to form a corrected first sample parameter set.
[0064] First, examine the data in the first sample parameter set, handling outliers and missing values. Outliers can be extreme values where the circuit load electrical parameters do not match the actual situation, while missing values refer to data not collected at certain time points. For outliers, replace them with 0 values before re-encoding them in the assembled VAE encoder.
[0065] Step S102: Construct a VAE encoder. The VAE encoder has L hidden layers with dimension H. The structure of the VAE encoder is as follows:
[0066] The first sample parameter output after Kalman filtering , as input to the VAE encoder ,Right now: = .
[0067] The corresponding hidden variable is : Where L represents the number of hidden layers, This is the weight matrix of this layer. It is the bias vector of this layer. It is the output of the previous layer; ReLU is the modified linear unit activation function.
[0068] Using the mean vector As the output of the encoder: ;in It is the weight matrix output by the encoder. It is the bias vector output by the encoder; the corrected first sample parameter set is input into the constructed VAE encoder for re-encoding and then outputs the second sample parameter set.
[0069] In this embodiment, the logarithmic variance vector output by the encoder can be: .
[0070] Specifically, the encoder input data is a vector of dimension n. (Composed of collected parameters), the encoder's hidden layer has a dimension of H. Assume the encoder has L hidden layers (excluding the input layer). The encoder's output is not a direct latent variable, but rather the mean (μ) and log-variance vector of its Gaussian distribution. These parameters are used to define the Gaussian distribution of the latent space.
[0071] Step S103: Input the corrected first sample parameter set into the constructed VAE encoder for re-encoding and output the second sample parameter set.
[0072] In this embodiment, the specific workflow of the VAE self-encoder in this step is as follows:
[0073] Step S201: Input the first sample parameter set into the constructed VAE encoder to obtain the mean μ and the log-variance vector. .
[0074] The input data of the VAE autoencoder is an n-dimensional vector that has been acquired and processed by a Kalman filter. In this embodiment, the dimension is 240, and its output is not a direct latent variable, but rather the mean μ and log-variance vector of its Gaussian distribution. These parameters are used to define the Gaussian distribution of the latent space.
[0075] Step S202, using a random vector ε sampled from the standard normal distribution N(0, 1), and through a reparameterization trick, it is coupled with the mean (μ) and log-variance vector. These are combined to obtain a representation of the latent variables. The reparameterization formula is as follows: Z = μ + ε * exp(0.5 * log(σ²)), where z is the latent variable, i.e., the input to the decoder, and μ is the mean vector. It is the logarithmic variance vector, and ε is a random vector sampled from the standard normal distribution N(0, 1).
[0076] Step S203: Input the latent variable Z into the decoder, construct the decoder and train its output. The VAE decoder structure is as follows:
[0077] KL divergence=-0.5*sum(1+log(σ²)-μ²-σ²);
[0078] Loss=MSE(x, x') +β*KL divergence;
[0079] In this context, the reconstruction error uses mean squared error (MSE) as the loss function, μ is the mean vector, x is the input data, x' is the reconstructed data generated by the decoder, and β is the weight parameter used to balance the reconstruction error and KL divergence.
[0080] The above method trains the VAE encoder by minimizing the total loss function, thereby mapping the input data to the latent space and learning the probability distribution of the data. The encoder's outputs μ and σ are used to generate latent variables z. The decoder reconstructs the data using the generated latent variables z and optimizes the parameters of the entire network by minimizing the reconstruction error and the KL divergence term. Here, KL divergence measures the difference between the encoder output distribution and the standard normal distribution. The goal of the VAE is to minimize the weighted sum of the reconstruction error and KL divergence. The loss function measures the similarity between the input and output; the smaller the loss function, the closer the input and output are, meaning the more accurately the autoencoder reproduces the input.
[0081] By using a VAE autoencoder, outliers and missing values in the first sample parameter set are removed, reducing their impact on prediction accuracy and precision. The VAE autoencoder then performs a second stage of processing on the collected data, encoding the collected values and then decoding them back to their original values. This automatically distributes the data and generates and supplements it. High-dimensional data is encoded and then output using dimensionality reduction. Using a variational autoencoder can significantly reduce the impact of outliers on prediction accuracy and minimize the impact of missing data on prediction precision.
[0082] Step S3: Construct a deep belief network model, use the second sample parameter set for training the deep belief network model, and input the real-time collected electrical and environmental parameters of the circuit into the trained deep belief network model to output the anomaly prediction value of the current end power grid circuit.
[0083] Step S3 specifically includes:
[0084] Step S31: The second sample parameter set output after encoding is randomly divided into a training set, a validation set, and a test set according to a set ratio.
[0085] In this embodiment, 70% of the data in the second sample parameter set can be allocated to the training set, 15% of the data to the validation set, and the remaining 15% of the data to the test set for testing.
[0086] Step S32: Set the input vector D(ti) of the deep belief network model. The input vector consists of the re-encoded loop electrical parameters and environmental parameters. The output of the deep belief network model is the loop anomaly degree.
[0087] ;
[0088] in F(ti) is the input to the deep belief network for period ti, and F(ti) is the neuron state output of the deep belief network model for period ti. The equipment anomaly measured in the power grid circuit at hour ti;
[0089] In this embodiment, the data collected every 240 hours can be used as a training unit, D Each parameter in the vector is a 240-dimensional vector. That is, it contains the electrical parameter information of the resistive device from hour ti to the previous 240 hours, with each 240-hour data collection serving as a training unit.
[0090] Step S33: Construct a deep belief network model, wherein the input variables of the deep belief network model are the device electrical parameter vectors. The output variable is the device variability data F(ti). The input layer is configured with m neurons, and the hidden and output layers have n and 1 neurons, respectively. The connection weights between neurons are represented by a matrix W, and the biases of neurons are represented by a vector b. During the initial training phase, a random number between 0 and 1 is randomly assigned to the weight matrix W and the bias vector b in the deep belief network, providing initial values. The hidden layer receives the output from the input layer, uses the weight matrix and bias vector to perform linear combination and nonlinear transformation on the input vector, extracts features from the input data, and outputs them to the next layer. The hidden layer is represented by the first... At time j, the output of the j-th neuron If we represent the output of the output layer, then: ;in This represents the weights between the j-th neuron in the input layer and the k-th neuron in the hidden layer. This represents the weights between the k-th neuron in the hidden layer and the output layer. Let represent the bias of the k-th neuron in the hidden layer, b represent the bias of the output layer, and f(x) represent the activation function. Configure the output layer and apply the Sigmoid function to map the output value to a probability value between 0 and 1: h_out = 1 / (1 + ea), where a is the input of the Sigmoid function. An output value h_out close to 1 indicates a high probability of resistive device mutation, and close to 0 indicates a low probability of resistive device mutation.
[0091] In this embodiment, the deep belief network used includes an input layer, a hidden layer, and an output layer. The input layer receives electrical measurement data from the equipment, the hidden layer extracts features from the electrical data, and the output layer outputs the prediction result. During model training, the backpropagation algorithm can be used for parameter optimization, with specific steps including:
[0092] Step S301: Input the initial values of the model parameters and the data of one training unit in the second sample parameter set test set, and calculate layer by layer to obtain the predicted value of the neural network.
[0093] Step S302: Calculate the error between the predicted value and the label value using the squared loss function.
[0094] Step S303: Determine if the error exceeds a first preset value. If it does, use the error backpropagation algorithm to backpropagate the gradient information of the error loss function, and update all model parameters simultaneously. In other words, if the predicted value differs significantly from its sample label, the error function needs to be used to adjust the model parameters, which is equivalent to training the network.
[0095] Specifically, first update the output layer model parameters:
[0096] Specifically, the parameter update formula for gradient descent is as follows, and the chain rule is used to calculate the error loss function. and Partial derivatives:
[0097] ;
[0098] ;
[0099] in, ; obtain the loss function pair and After taking the partial derivative, set the learning rate η to 0.5, and update according to the iterative formula. and Value:
[0100] ;
[0101] .
[0102] Step S303: Continue updating the parameters of the hidden layer. The parameter update formula is the same as that of the gradient descent method, as follows:
[0103]
[0104] Step S204: Repeat the above steps using the new parameters until the error converges to less than the first preset value, completing the training. Next, use the new parameters to calculate the new predicted value layer by layer in the forward direction, then compare it with the label value to calculate the error. Then, propagate the gradient information of the loss function layer by layer in the backward direction to update the model parameters and complete the next round of training. This process is repeated until the error converges to an ideal value.
[0105] By employing the backpropagation algorithm to optimize the output of the neural network, and utilizing the chain rule, the gradient information of the loss function is backpropagated. The neural network is traversed from back to front, and the gradient of the loss function with respect to all model parameters in the network is calculated, thereby optimizing the neural network to achieve the best prediction effect.
[0106] Step S34: The deep belief network model is trained using the training set, validation set and test set. The electrical parameters and environmental parameters of the end grid circuit collected in real time are input into the trained deep belief network model, and the anomaly prediction value of the current end grid circuit is output.
[0107] By constructing a deep belief network and training it with collected historical data, the actual circuit anomalies of electrical equipment are simulated. After training, the network can accurately obtain the circuit anomaly degree of the electrical equipment at this time through real-time data collection, which greatly improves the accuracy and reliability of circuit anomaly degree prediction.
[0108] The method for predicting loop anomalies in the end-point power grid disclosed in this embodiment employs a combination of Kalman filters, VAE autoencoders, and deep belief networks. First, a Kalman filter is applied to process the collected historical electrical and environmental parameters to reduce the impact of noise on the collected data. Second, a VAE autoencoder is used to generate and supplement discrete and outlier points in the data, ensuring the comparability and stability of the data. Finally, a deep belief network is used to train and predict loop anomalies, and a backpropagation algorithm is applied to optimize the parameters, improving the prediction accuracy of loop anomalies. Furthermore, environmental parameters such as temperature and humidity are incorporated into the prediction process, significantly increasing the reliability and accuracy of the prediction. Thus, by utilizing existing monitoring methods and data, and adding environmental impact factors, the method maximizes the accuracy of the prediction results and the stability of the system, thereby enhancing the system's reliability and automation level.
[0109] Appendix Figure 2 Another embodiment discloses a prediction system for the anomaly degree of a terminal power grid loop, comprising a parameter acquisition module 1, a preprocessing encoding module 2, and a prediction module 3. The parameter acquisition module 1 acquires multiple sets of historical electrical parameters of the terminal power grid loop within a preset time period, transmitted by sensors arranged in the power circuit of the equipment, and acquires multiple sets of historical environmental parameters of the terminal power grid loop within a preset time period, transmitted by temperature / humidity sensors arranged in the environment of the terminal power grid loop, within a preset time period. The loop electrical parameters include, but are not limited to, loop voltage, loop steady-state current, loop active power, and loop equivalent internal resistance. The environmental parameters include, but are not limited to, cable surface temperature, ambient temperature, and ambient humidity. The preprocessing encoding module 2 preprocesses the acquired historical electrical parameters and historical environmental parameters using a Kalman filter to establish a first sample parameter set. The first sample parameter set is then input into a constructed VAE encoder for re-encoding and output to form a second sample parameter set. Prediction module 3 is used to construct a deep belief network model, use the second sample parameter set for training the deep belief network model, and input the electrical and environmental parameters of the circuit collected in real time into the trained deep belief network model to output the anomaly prediction value of the current end power grid circuit.
[0110] In this embodiment, the parameter acquisition module is further configured to: set the frequency of parameter data acquisition, preprocess the historical electrical parameters and historical environmental parameters of the acquired end-grid circuit, and establish an n-dimensional sample input vector. ,in The loop voltages at time i, collected over a preset time period of N hours, are respectively represented. steady-state current of the loop Active power of the circuit Equivalent internal resistance of the loop Cable surface temperature Ambient temperature and ambient humidity .
[0111] In this embodiment, the preprocessing encoding module is specifically configured to: during the prediction stage, the Kalman filter uses the filtered estimation of the previous state to obtain the optimal data, and makes an estimate of the current state to obtain the predicted value.
[0112] ;
[0113] in for( The optimal estimated value of the loop parameters at time ) for( ) at all times The optimal estimate at time; for( The covariance matrix of the estimated values at time ) for( ) at all times The covariance matrix of the time-time estimates; For the effect on The state transition model on the above takes a value of 1; To act on the controller vector The input control model takes a value of 0; It means ( The control gain at time ) is set to 0; It is the covariance of the process excitation noise, which is a preset adjustable parameter;
[0114] During the update phase, the Kalman filter optimizes the predicted value obtained in the prediction phase using the observations of the current state to obtain a new estimate as the filter's output value. ;in The matching value for the number of digits in the observations and the number of digits in the estimates is set to 1. In order to be in The collected values of circuit electrical parameters and environmental parameters at any given time. The identity matrix is a preset value; the data vector is obtained after smoothing the data through the Kalman filter. This serves as the first set of sample parameters input to the VAE encoder.
[0115] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. Regarding the prediction system for end-grid loop anomaly disclosed in the embodiments, since it corresponds to the prediction method for end-grid loop anomaly disclosed in the embodiments, the description is relatively simple, and relevant parts can be referred to the method section.
[0116] In other embodiments, an apparatus for predicting end-grid loop anomalies is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the end-grid loop anomaly prediction method as described in the above embodiments.
[0117] The device for predicting the anomaly of the end-grid loop may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that the schematic diagram is merely an example of a device for predicting the anomaly of the end-grid loop and does not constitute a limitation on the device. It may include more or fewer components than illustrated, or combine certain components, or use different components. For example, the device may also include input / output devices, network access devices, buses, etc.
[0118] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. This processor is the control center of the end-grid loop anomaly prediction device, connecting all parts of the device via various interfaces and lines.
[0119] The memory can be used to store the computer program and / or modules. The processor, by running or executing the computer program and / or modules stored in the memory and calling the data stored in the memory, realizes various functions of the end-grid loop anomaly prediction device. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0120] If the device for predicting the anomaly of the end-grid circuit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above embodiments of the method for predicting the anomaly of the end-grid circuit. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately added to or subtracted from the content as required by the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium may not include electrical carrier signals and telecommunication signals.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
[0122] In summary, the above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made within the scope of the claims of the present invention should be covered by the present invention.
Claims
1. A method for predicting the anomaly degree of a terminal power grid loop, characterized in that, Includes the following steps: S1. Sensors installed in the power circuit of the equipment collect multiple sets of historical electrical parameters of the end-point power grid circuit within a preset time period at predetermined time intervals. Temperature / humidity sensors placed in the environment of the end-point power grid circuit collect multiple sets of historical environmental parameters of the end-point power grid circuit within the preset time period at predetermined time intervals. The circuit electrical parameters include, but are not limited to, circuit voltage, circuit steady-state current, circuit active power, and circuit equivalent internal resistance. The environmental parameters include, but are not limited to, cable surface temperature, ambient temperature, and ambient humidity. The frequency of parameter data collection is set, and the collected historical electrical and environmental parameters of the end-point power grid circuit are preprocessed to establish an n-dimensional sample input vector. ,in The loop voltages at time i, collected over a preset time period of N hours, are respectively represented. steady-state current of the loop Active power of the circuit Equivalent internal resistance of the loop Cable surface temperature Ambient temperature and ambient humidity ; S2, after preprocessing the collected historical electrical parameters and historical environmental parameters of the circuit using a Kalman filter, a first sample parameter set is established. This first sample parameter set is then input into the constructed VAE encoder for re-encoding and output, forming a second sample parameter set. Specifically, this includes: During the prediction phase, the Kalman filter uses the filtered estimate from the previous state to obtain the optimal data, and then makes an estimate of the current state to obtain the predicted value. ; in for( The optimal estimated value of the loop parameters at time ) for( ) at all times The optimal estimate at time; for( The covariance matrix of the estimated values at time ) for( ) at all times The covariance matrix of the time-time estimates; For the effect on The state transition model on the surface takes a value of 1; To act on the controller vector The input control model takes a value of 0; It means ( The control gain at time ) is set to 0; It is the covariance of the process excitation noise, which is a preset adjustable parameter; During the update phase, the Kalman filter optimizes the predicted value obtained in the prediction phase using the observations of the current state to obtain a new estimate as the filter's output value. ;in The matching value for the number of digits in the observations and the number of digits in the estimates is set to 1. In order to be in The collected values of circuit electrical parameters and environmental parameters at any given time. The identity matrix is a preset value; the data vector is obtained after smoothing the data through the Kalman filter. As the first set of sample parameters input to the VAE encoder; S3, construct a deep belief network model, use the second sample parameter set for training the deep belief network model, input the real-time collected electrical parameters and environmental parameters of the circuit into the trained deep belief network model, and output the anomaly prediction value of the current end power grid circuit.
2. The method for predicting the anomaly degree of the terminal power grid loop according to claim 1, characterized in that, The step of inputting the first sample parameter set into the constructed VAE encoder for re-encoding and output specifically includes: The outliers and missing values in the first sample parameter set are processed. The outliers are extreme values of the circuit load electrical parameters that do not conform to the actual situation. The missing values are sample values for which data was not collected at some time points. The outliers are replaced with zero values to form the corrected first sample parameter set. A VAE encoder is constructed, which has L hidden layers with dimension H. The structure of the VAE encoder is as follows: The first sample parameter output after Kalman filtering , as input to the VAE encoder ,Right now: = ; The corresponding hidden variable is : Where L represents the number of hidden layers, This is the weight matrix of this layer. It is the bias vector of this layer. It is the output of the previous layer; ReLU is the modified linear unit activation function. Using the mean vector As the output of the encoder: ;in It is the weight matrix output by the encoder. It is the bias vector output by the encoder; The corrected first sample parameter set is input into the constructed VAE encoder for re-encoding, and then the second sample parameter set is output.
3. The method for predicting the anomaly degree of the terminal power grid loop according to claim 2, characterized in that, Step S3 includes: S31, randomly divide the second sample parameter set after encoding into training set, validation set and test set according to a set ratio; S32, Set the input vector D(ti) of the deep belief network model. The input vector consists of the re-encoded loop electrical parameters and environmental parameters. The output of the deep belief network model is the loop anomaly degree. ; in F(ti) is the input to the deep belief network for period ti, and F(ti) is the neuron state output of the deep belief network model for period ti. The equipment anomaly measured in the power grid circuit at hour ti; S33, Construct a deep belief network model, wherein the input variables of the deep belief network model are the device electrical parameter vector. The output variable is the device variability data F(ti). The input layer is configured with m neurons, and the hidden and output layers have n and 1 neurons, respectively. The connection weights between neurons are represented by a matrix W, and the biases of neurons are represented by a vector b. During the initial training phase, a random number between 0 and 1 is randomly assigned to the weight matrix W and the bias vector b in the deep belief network, providing initial values. The hidden layer receives the output from the input layer, uses the weight matrix and bias vector to perform linear combination and nonlinear transformation on the input vector, extracts features from the input data, and outputs them to the next layer. The hidden layer is represented by the first... At time j, the output of the j-th neuron If we represent the output of the output layer, then: ;in This represents the weights between the j-th neuron in the input layer and the k-th neuron in the hidden layer. This represents the weights between the k-th neuron in the hidden layer and the output layer. Let b represent the bias of the k-th neuron in the hidden layer, b represent the bias of the output layer, and f(x) represent the activation function. Configure the output layer and apply the sigmoid function to map the output value to a probability value between 0 and 1: h_out = 1 / (1+e^(k-1)). -a ), where a is the input of the Sigmoid function, and the output value h_out is close to 1, indicating a high probability of resistive device malfunction, and close to 0, indicating a low probability of resistive device malfunction; S34. The deep belief network model is trained using the training set, validation set and test set. The electrical parameters and environmental parameters of the end grid circuit collected in real time are input into the trained deep belief network model, and the anomaly prediction value of the current end grid circuit is output.
4. A prediction system for the anomaly degree of a terminal power grid loop, characterized in that, include: The parameter acquisition module is used to acquire multiple sets of historical electrical parameters of the end-grid circuit within a preset time period, transmitted by sensors arranged in the power circuit of the equipment, and multiple sets of historical environmental parameters of the end-grid circuit within a preset time period, transmitted by temperature / humidity sensors arranged in the environment of the end-grid circuit. The circuit electrical parameters include, but are not limited to, circuit voltage, circuit steady-state current, circuit active power, and circuit equivalent internal resistance. The environmental parameters include, but are not limited to, cable surface temperature, ambient temperature, and ambient humidity. The module sets the frequency of parameter data acquisition, preprocesses the acquired historical electrical and environmental parameters of the end-grid circuit, and establishes an n-dimensional sample input vector. ,in The loop voltages at time i, collected over a preset time period of N hours, are respectively represented. steady-state current of the loop Active power of the circuit Equivalent internal resistance of the loop Cable surface temperature Ambient temperature and ambient humidity ; The preprocessing encoding module is used to preprocess the acquired historical electrical parameters and historical environmental parameters of the circuit using a Kalman filter to establish a first sample parameter set. This first sample parameter set is then input into the constructed VAE encoder for re-encoding and output to form a second sample parameter set. Specifically, it includes: During the prediction phase, the Kalman filter uses the filtered estimate from the previous state to obtain the optimal data, and then makes an estimate of the current state to obtain the predicted value. ; in for( The optimal estimated value of the loop parameters at time ) for( ) at all times The optimal estimate at time; for( The covariance matrix of the estimated values at time ) for( ) at all times The covariance matrix of the time-time estimates; For the effect on The state transition model on the above takes a value of 1; To act on the controller vector The input control model takes a value of 0; It means ( The control gain at time ) is set to 0; It is the covariance of the process excitation noise, which is a preset adjustable parameter; During the update phase, the Kalman filter optimizes the predicted value obtained in the prediction phase using the observations of the current state to obtain a new estimate as the filter's output value. ;in The matching value for the number of digits in the observations and the number of digits in the estimates is set to 1. In order to be in The collected values of circuit electrical parameters and environmental parameters at any given time. The identity matrix is a preset value; the data vector is obtained after smoothing the data through the Kalman filter. As the first set of sample parameters input to the VAE encoder; The prediction module is used to construct a deep belief network model, use the second sample parameter set for training the deep belief network model, and input the electrical and environmental parameters of the circuit collected in real time into the trained deep belief network model to output the anomaly prediction value of the current end power grid circuit.
5. A device for predicting the anomaly degree of a terminal power grid loop, 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 computer program, it implements the steps of the method as described in any one of claims 1-3.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-3.
Citation Information
Patent Citations
Method for predicting residual life of multivariate degradation equipment
CN112926273A
GNSS / INS integrated navigation system fault detection method based on integrated neural network
CN116576890A