A distributed low-carbon energy station health state early warning and prediction method
By filtering and correcting outlier data using isolated forest and random forest algorithms, and combining this with a generalized regression neural network model, the accuracy of health status early warning for distributed low-carbon energy stations was solved, enabling effective prediction of their operational status.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
- Filing Date
- 2022-11-25
- Publication Date
- 2026-07-24
Smart Images

Figure CN115713162B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of energy systems, specifically relating to a method for early warning and prediction of the health status of distributed low-carbon energy stations. Background Technology
[0002] With the rapid advancement of the "dual carbon" goals, the concepts of energy conservation, emission reduction, and low-carbon efficiency have gained widespread acceptance. Driven by both efficient energy utilization and low-carbon environmental protection, distributed low-carbon energy stations, which achieve low-carbon and efficient energy utilization, have gradually become a research focus. Accurately understanding the healthy operational status of distributed low-carbon energy stations can provide positive guidance for their operation.
[0003] In the area of health status early warning and prediction, CN115372852A proposes a battery health status prediction method based on a feedforward neural network. This method predicts the battery's health status by acquiring aging characteristic parameters, including ambient temperature and open-circuit voltage. CN115153447A proposes a health status prediction system that uses multi-feature correlation modules to achieve health status prediction. CN115343621A considers the role of data-driven approaches and proposes a power battery health status prediction method. This method processes data from existing electric vehicles to determine historical health data values and health characteristics, thereby predicting health status. CN114332613A proposes a farmland health status prediction method based on remote sensing imagery, which predicts the health status of farmland using satellite remote sensing support. Existing research mostly focuses on specific equipment, with health status predictions primarily addressing the healthy operating status of lithium batteries. Research on the health status of distributed low-carbon energy stations is scarce. Existing prediction and early warning methods are inaccurate and lack scientifically effective results. Summary of the Invention
[0004] To address the problem of early warning and prediction of the health status of distributed low-carbon energy stations, this invention provides a method for early warning and prediction of the health status of distributed low-carbon energy stations.
[0005] The health status early warning and prediction method for distributed energy low-carbon stations provided by this invention includes the following steps:
[0006] Step S1: Analyze the status information of distributed low-carbon energy stations and collect status data of distributed low-carbon energy stations;
[0007] Step S2: Use the Isolation Forest algorithm to detect the collected state variables and filter out abnormal state variable data;
[0008] Step S3: Use the random forest algorithm to correct the abnormal state data;
[0009] Step S4: Calculate the state change quantity and combine it with the current state quantity to determine the operation state classification method of the distributed low-carbon energy station;
[0010] Step S5: Collect the state changes, state variables, and operating status of the distributed low-carbon energy station, and train the generalized regression neural network PSO-GRNN model.
[0011] Step S6: Based on the newly generated state changes and state variables of the distributed low-carbon energy station, continuously revise the generalized regression neural network PSO-GRNN model.
[0012] Optionally, the state variables of the distributed low-carbon energy station in step S1 include grid voltage, grid frequency, gas grid pressure, and heating grid temperature.
[0013] Optionally, step S2 includes constructing an isolated forest, searching for trees on all state data, calculating the final isolated forest depth and the average depth of the state data, standardizing the tree depth, and retrieving test data. The calculation steps are as follows:
[0014]
[0015]
[0016] E(h(x))→0, s(x,a)→1; (3)
[0017] E(h(x))→a-1,s(x,a)→0;
[0018] E(h(x))→c(a),s(x,a)→0.5
[0019] In Formula 1, 'a' represents the number of state variables; 'c(a)' represents the average path length of the binary tree after the search is complete; and 'ξ' represents Euler's constant.
[0020] In Formulas 2 and 3, x represents the data value of the state variable to be detected; h(x) represents the average depth of state variable x on each tree; E(h(x)) represents the expected path length for a specific value; s(x,a) represents the anomaly index of state variable x; if s(x,a) approaches 1, state variable x is abnormal data; if s(x,a) approaches 0, state variable x is normal data; if s(x,a) approaches 0.5, state variable x is data without obvious anomalies.
[0021] Optionally, step S3 specifically includes:
[0022] (1) Treat abnormal state variables as decision attributes and other non-abnormal state variables as characteristic attributes;
[0023] (2) Use the Bagging method to extract samples from all state variables. Each time, take M data as a subset and use it as the training set.
[0024] (3) By performing K extractions and training, K models can be obtained;
[0025] (4) K models predict the abnormal state quantity respectively, and K predicted values are obtained. Then, the absolute average of the K predicted values is taken to obtain the corrected data of the abnormal state quantity.
[0026] Optionally, the formula for standardizing the state change in step S4 is:
[0027]
[0028] In the formula, d represents the change in state, and U k U represents the value of the state quantity at time k. k+1 U0 represents the value of the state variable at time k+1, and U0 represents the rated value of the state variable.
[0029] Optionally, the method for classifying the operating status of distributed low-carbon energy stations in step S4 is as follows:
[0030] Current state quantity U k+1 If both the current state change quantity d and the current state change quantity U are within normal ranges, the energy station will maintain normal operation. k+1 If the value is normal and the state change variable d is abnormal, then the energy station will enter a critical state of operation; the current state variable U k+1 If both the state change quantity d and the state change quantity d are abnormal values, the energy station will enter an emergency operation state.
[0031] Optionally, the network structure of the generalized regression neural network in step S5 includes an input layer, a pattern layer, a summation layer, and an output layer;
[0032] (1) Input layer: Input the test state quantity samples of the distributed low-carbon energy station. The number of neurons is 8, including 4 state quantities at time k0: grid voltage, grid frequency, heating network temperature, and gas network pressure, as well as the state change quantities between time k0-1 and time k0 corresponding to the 4 state quantities.
[0033] (2) Pattern Layer: The number of neurons in the pattern layer is guaranteed to be consistent with the number of training sample groups for state variables, which is M; each neuron corresponds to a different training sample, and its transfer function is:
[0034]
[0035] In the formula: p n X is the transfer function of the nth neuron in the pattern layer; X is the network input variable; X mLet m be the m-th training sample; its radial basis function is a Gaussian function, where δ represents the standard deviation of the Gaussian function, which determines the shape of its basis function. This is set before training and learning. δ is a hyperparameter, and the hyperparameter is optimized using the PSO optimization algorithm.
[0036] (3) Summation layer: The number of neurons in this layer is 5. The summation layer is divided into two parts. The output of the first node is the sum of the pattern layer, and the outputs of the other nodes are the weighted sum of the outputs of the previous layer.
[0037] First node:
[0038]
[0039] Other nodes:
[0040]
[0041] In equations 8 and 9, S1 is the transfer function of the first neuron node; N is the total number of neurons in the pattern layer; g i S is the output of the i-th neuron in the pattern layer; j To find the neuron transfer function of the j-th neuron in the summation layer; y ij This is represented as the j-th element corresponding to the i-th neuron in the pattern layer;
[0042] (4) Output layer: The output layer contains 4 neurons, and the output quantities are the grid voltage, grid frequency, heating network temperature and gas network pressure at time k0+1;
[0043] By predicting the four state variables at time k0+1, the state change from time k0 to time k0+1 is obtained. Based on the aforementioned operational state classification method, the operational state of the distributed low-carbon energy station at time k0+1 is determined.
[0044] Optionally, step S5 may further include obtaining the optimal solution using a particle swarm optimization algorithm.
[0045] Compared with existing technologies, the distributed low-carbon energy station health status early warning and prediction method proposed in this invention has the following advantages or beneficial effects:
[0046] This invention employs the Isolation Forest algorithm to detect abnormal state data, eliminating the influence of other factors on the state variables of distributed low-carbon energy stations. After detecting abnormal state data, the invention uses the Random Forest algorithm to correct the abnormal data. After correcting the state variables of the distributed low-carbon energy station, the invention calculates the state change and, combined with the current state variables, determines the operating status of the distributed low-carbon energy station. The health status early warning and prediction method for distributed low-carbon energy stations provided by this invention helps predict the future operating status of distributed low-carbon energy stations and has good application prospects. Attached Figure Description
[0047] Figure 1 Flowchart of the health status early warning and prediction method for distributed low-carbon energy stations provided by the present invention;
[0048] Figure 2 This is a flowchart for judging the operating status of the distributed low-carbon energy station described in this invention. Detailed Implementation
[0049] The present invention will be further described below with reference to the accompanying drawings and by way of detailed description of preferred embodiments.
[0050] Figure 1 The flowchart of the distributed low-carbon energy station health status early warning and prediction method provided by the present invention is as follows: Figure 1 As shown, the distributed low-carbon energy station health status early warning and prediction method proposed in this invention employs the isolated forest algorithm to detect collected state variables and filter out abnormal state variable data; it then uses the random forest algorithm to correct the abnormal state variable data; it calculates state change quantities and, combined with the current state variables, determines the classification method for the operating status of the distributed low-carbon energy station; it collects the state change quantities, state variables, and operating status of the distributed low-carbon energy station and trains the generalized regression neural network (PSO-GRNN) model; based on the newly generated state change quantities and state variables of the distributed low-carbon energy station, it continuously corrects the PSO-GRNN model. The specific steps of the distributed low-carbon energy station health status assessment method described in this invention are as follows.
[0051] Step S1: Analyze the status information of distributed low-carbon energy stations and collect status data of distributed low-carbon energy stations.
[0052] The main purpose of building distributed low-carbon energy stations is to improve energy utilization efficiency while meeting the energy supply needs of users. In terms of physical architecture, it can be regarded as a whole formed by integrating a series of devices to achieve safe and reliable operation of a single energy system after connecting to distributed renewable energy stations and diversified loads.
[0053] The system of a distributed low-carbon energy station mainly includes a power supply system, a gas supply system, and a heating system. The main state variables of the distributed low-carbon energy station include grid voltage, grid frequency, gas grid pressure, and heating grid temperature. These state variables can be measured by devices such as vector measurement units, pressure transmitters, temperature sensors, and voltage transformers in the distributed low-carbon energy station.
[0054] Step S2: Use the isolated forest algorithm to detect the collected state variables and filter out abnormal state variable data.
[0055] In integrated energy systems, complex environments, harsh sensor operating conditions, interference with communication lines, and complex multiple signals can cause state data to exceed the allowable error range, resulting in distorted data. Severe faults can also lead to significant data loss. The state data of distributed low-carbon energy stations determine their subsequent operating status; therefore, it is necessary to detect abnormal state data. This invention employs the Isolation Forest algorithm to detect state data such as grid voltage, grid frequency, gas grid pressure, and heating network temperature of distributed low-carbon energy stations, filtering out abnormal state data.
[0056] Typically, there is relatively little abnormal state data, and the attributes of abnormal state data differ from those of normal state data. Therefore, multiple data separation processes are needed to filter out the abnormal state data. The specific process is as follows:
[0057] (1) Select t data points from the training dataset as tree nodes and use them as subsamples;
[0058] (2) Select a threshold and perform random cutting within this range;
[0059] (3) Using the cutting point as a reference, a hyperplane is formed, which can divide the data into two subspaces;
[0060] (4) Repeat steps (2) and (3) until the minimum component is obtained or the number of iterations reaches log2t, and finally an isolated forest can be constructed.
[0061] Based on the constructed isolated forest, trees are searched across all state data to determine the final isolated forest depth. The average depth of the state data is then calculated, and the tree depths are standardized. Test data is retrieved. The specific calculation steps are as follows:
[0062]
[0063]
[0064] E(h(x))→0, s(x,a)→1; (3)
[0065] E(h(x))→a-1,s(x,a)→0;
[0066] E(h(x))→c(a),s(x,a)→0.5
[0067] In Formula 1, 'a' represents the number of state variables; 'c(a)' represents the average path length of the binary tree after the search is complete; and 'ξ' represents Euler's constant.
[0068] In Formulas 2 and 3, x represents the data value of the state variable to be detected; h(x) represents the average depth of state variable x on each tree; E(h(x)) represents the expected path length for a specific value; s(x,a) represents the anomaly index of state variable x; if s(x,a) approaches 1, state variable x is abnormal data; if s(x,a) approaches 0, state variable x is normal data; if s(x,a) approaches 0.5, state variable x is data without obvious anomalies.
[0069] Step S3: Use the random forest algorithm to correct the abnormal state data.
[0070] Random forest algorithms possess excellent nonlinear data processing capabilities and strong anti-interference properties. This invention utilizes the random forest algorithm to correct outlier data. The state variables of a distributed low-carbon energy station are primarily non-nominal attributes; the main process is as follows:
[0071] (1) Treat abnormal state variables as decision attributes and other non-abnormal state variables as characteristic attributes;
[0072] (2) Use the Bagging method to extract samples from all state variables. Each time, take M data as a subset and use it as the training set.
[0073] (3) By performing K extractions and training, K models can be obtained;
[0074] (4) K models predict the abnormal state quantity respectively, and K predicted values are obtained. Then, the absolute average of the K predicted values is taken to obtain the corrected data of the abnormal state quantity.
[0075] Step S4: Calculate the state change quantity and combine it with the current state quantity to determine the operation state classification method of the distributed low-carbon energy station.
[0076] The state change quantity represents the change in the state quantity of the distributed low-carbon energy station between the values at the previous time point and the next time point. To facilitate subsequent calculations and training, the state change quantity is standardized, and the specific formula is as follows:
[0077]
[0078] In the formula, d represents the change in state, and U k U represents the value of the state quantity at time k. k+1 U0 represents the value of the state variable at time k+1, and U0 represents the rated value of the state variable.
[0079] State change d and current state U k+1 This is related to the subsequent operational status of distributed low-carbon energy stations. Figure 2This is a flowchart illustrating the operation status determination process of the distributed low-carbon energy station described in this invention. Figure 2 As shown, the current state variable U k+1 If both the current state change quantity d and the current state change quantity U are within normal ranges, the energy station will maintain normal operation. k+1 If the value is normal and the state change variable d is abnormal, then the energy station will enter a critical state of operation; the current state variable U k+1 If both the state change quantity d and the state change quantity d are abnormal values, the energy station will enter an emergency operation state.
[0080] Step S5: Collect the state changes, state variables, and operating status of the distributed low-carbon energy station, and train the generalized regression neural network PSO-GRNN model.
[0081] Generalized regressive neural networks are a type of radial basis function neural network. They are forward-propagating neural networks and do not require backward propagation. Their main network structure includes an input layer, a pattern layer, a summation layer, and an output layer.
[0082] (1) Input layer: Input the test state quantity samples of the distributed low-carbon energy station. The number of neurons is 8, namely, the four state quantities of grid voltage, grid frequency, heating network temperature and gas network pressure at time k0, and the state change quantities between time k0-1 and time k0 corresponding to the four state quantities.
[0083] (2) Pattern Layer: The number of neurons in the pattern layer is guaranteed to be consistent with the number of training sample groups for state variables, i.e., M. Each neuron corresponds to a different training sample, and its transfer function is:
[0084]
[0085] In the formula: p n X is the transfer function of the nth neuron in the pattern layer; X is the network input variable; X m Let m be the m-th training sample; its radial basis function is a Gaussian function, where δ represents the standard deviation of the Gaussian function, which determines the shape of its basis function. It needs to be set before training and learning, and it is a hyperparameter. This invention optimizes the hyperparameters using the PSO optimization algorithm.
[0086] This invention employs a particle swarm optimization (PSO) algorithm to find the optimal solution for δ. The PSO algorithm initializes a swarm of random particles and focuses on two particle attributes: position and velocity. Each particle searches independently in space, remembering its previously found optimal solution and the current optimal solution found by the entire swarm. Its next move depends on its current direction, the direction of its previously found optimal solution, and the direction of the current optimal solution for the entire swarm. In this invention, δ is a hyperparameter affecting the accuracy of the prediction model; therefore, δ is set as the particle's position, and the deviation between its prediction and the actual value is set as the particle's fitness. Through multiple iterations, the optimal value of δ can be found. The main steps of the PSO algorithm are:
[0087] 1. Initialize a particle swarm of size N, with the velocity and position of each particle being random;
[0088] 2. Calculate the fitness value for each particle;
[0089] 3. If the current fitness value of a particle is better than the previously recorded optimal solution for that particle, then update the optimal solution for that particle.
[0090] 4. If the current fitness value of a particle is better than the previously recorded global optimum, then update the global optimum.
[0091] 5. The particle updates its velocity and position until the iteration ends. The formulas for calculating the updated velocity and position are:
[0092] v′=v+c1×rand()×(p best -μ)+c2×rand()×(g best -μ) (6)
[0093] μ'=μ+v' (7)
[0094] In formulas 6 and 7: v represents the particle's current velocity; v′ represents the particle's update velocity; rand() represents a random number between (0,1); μ represents the particle's current position; μ' represents the particle's updated position; c1 and c2 represent learning factors; p best Represents the individual optimal value; g best This represents the global optimal value.
[0095] (3) Summation layer: The number of neurons in this layer is the output dimension plus 1. In this invention, it is 5. The summation layer is divided into two parts. The output of the first node is the sum of the pattern layer, and the outputs of the other nodes are the weighted sum of the outputs of the previous layer.
[0096] First node:
[0097]
[0098] Other nodes:
[0099]
[0100] In equations 8 and 9, S1 is the transfer function of the first neuron node; N is the total number of neurons in the pattern layer; g i S is the output of the i-th neuron in the pattern layer; j To find the neuron transfer function of the j-th neuron in the summation layer; y ij It is represented as the j-th element corresponding to the i-th neuron in the pattern layer.
[0101] (4) Output layer: The output layer contains 4 neurons, and the output quantities are the grid voltage, grid frequency, heating grid temperature and gas grid pressure at time k0+1.
[0102] By predicting the four state variables at time k0+1, and calculating the state change from time k0 to time k0+1, we can then... Figure 2 The determination relationship is used to determine the operating status of the distributed low-carbon energy station at time k0+1.
[0103] Step S6: Based on the newly generated state changes and state variables of the distributed low-carbon energy station, continuously revise the generalized regression neural network PSO-GRNN model.
[0104] Because external objective factors are constantly changing, the generalized regression neural network needs continuous refinement to obtain a more accurate model. This can be achieved by continuously refining the model using the latest state change and state variable data.
[0105] Although the present invention has been described in detail through the preferred embodiments above, it should be understood that the above description should not be considered as a limitation of the present invention. Various modifications and substitutions to the present invention will be apparent to those skilled in the art after reading the above description. Therefore, the scope of protection of the present invention should be defined by the appended claims.
Claims
1. A method for early warning and prediction of the health status of a distributed low-carbon energy station, characterized in that, Includes the following steps: Step S1: Analyze the status information of distributed low-carbon energy stations and collect status data of distributed low-carbon energy stations; Step S2: Use the Isolation Forest algorithm to detect the collected state variables and filter out abnormal state variable data; Step S3: Use the random forest algorithm to correct the abnormal state data; Step S4: Calculate the state change quantity and combine it with the current state quantity to determine the operation state classification method of the distributed low-carbon energy station; Step S5: Collect the state changes, state variables, and operating status of the distributed low-carbon energy station, and train the generalized regression neural network PSO-GRNN model. Step S6: Based on the newly generated state changes and state variables of the distributed low-carbon energy station, continuously revise the generalized regression neural network PSO-GRNN model; In step S5, the network structure of the generalized regression neural network includes an input layer, a pattern layer, a summation layer, and an output layer. The input layer contains 8 neurons, namely The four state variables at any given time are: grid voltage, grid frequency, heating network temperature, and gas network pressure, and their corresponding values. Time and The change in state between moments; The transfer function of the mode layer has a radial basis function of Gaussian function with a standard deviation of δ, and the hyperparameters are optimized by the PSO optimization algorithm. The output layer contains 4 neurons, with output values of respectively. At any given time, the grid voltage, grid frequency, heating network temperature, and gas network pressure are as follows: The method for classifying the operational status of distributed low-carbon energy stations in step S4 is as follows: If both the current state quantity and the state change quantity are normal, the energy station will maintain normal operation; if the current state quantity is normal and the state change quantity is abnormal, the energy station will enter critical operation; if both the current state quantity and the state change quantity are abnormal, the energy station will enter emergency operation.
2. The method for early warning and prediction of the health status of distributed low-carbon energy stations as described in claim 1, characterized in that, Step S2 includes constructing an isolated forest, searching for trees on all state data, calculating the final isolated forest depth and the average depth of the state data, standardizing the tree depths, and retrieving test data. The calculation steps are as follows: (1) (2) (3) In formula 1, Indicates the number of state variables; This represents the average path after the binary tree has been searched; Represents Euler's constant; In formulas 2 and 3, This represents the data value of the state quantity to be detected; State variables Average depth on each tree; This represents the expected path length for a specific value; State variables Abnormal index; If the state quantity tends to 1, then This is abnormal data. The state quantity tends to 0 This is normal data. The state quantity tends to 0.5 No obvious abnormal data.
3. The health status early warning and prediction method for distributed low-carbon energy stations as described in claim 2, characterized in that, Step S3 specifically includes: (1) Treat abnormal state variables as decision attributes and other non-abnormal state variables as characteristic attributes; (2) Samples are extracted from all state variables using the Bagging method. Each time, M data points are taken as a subset and used as the training set. (3) Perform K extractions and training to obtain K models; (4) K models predict the abnormal state quantity respectively, and K predicted values are obtained. Then, the absolute average of the K predicted values is taken to obtain the corrected data of the abnormal state quantity.
4. The method for early warning and prediction of the health status of distributed low-carbon energy stations as described in claim 3, characterized in that, (1) Input layer: Input test state quantity samples of distributed low-carbon energy stations; (2) Pattern layer: The number of neurons in the pattern layer is guaranteed to be consistent with the number of training sample groups for state variables, which is M; each neuron corresponds to a different training sample, and its transfer function is: (5) In the formula: For the pattern layer The transfer function of a neuron; Input variables for the network; For the first One training sample; This represents the standard deviation of the Gaussian function, determines the shape of its basis functions, and is set before training. (3) Summation layer: The number of neurons in this layer is 5. The summation layer is divided into two parts. The output of the first node is the sum of the pattern layer, and the outputs of the other nodes are the weighted sum of the outputs of the previous layer. First node: (8) Other nodes: (9) In formulas 8 and 9, This is the transfer function for the first neuron node; For the pattern layer One neuron; For the pattern layer The output of each neuron; To sum the levels Neuron transfer function of one neuron; Represented as the pattern layer The first neuron corresponding to the first One element; (4) Output layer: By prediction The four state variables at time t are obtained. Time's up The change in state over time is determined according to the aforementioned operational state classification method. The operational status of distributed low-carbon energy stations at any given time.
5. The method for early warning and prediction of the health status of distributed low-carbon energy stations as described in claim 4, characterized in that, Step S5 further includes solving the problem using a particle swarm optimization algorithm. The optimal solution.