Micro-grid dynamic state estimation method and system considering data loss
By combining the Gilbert-Elliott model and the LSTM-FNN model, the problem of the dependence of the microgrid state estimation method on mathematical model in the prior art is solved, and high-accuracy state estimation is achieved in the case of incomplete data.
Patent Information
- Application Number
- CN202510050693.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-01-13
AI Technical Summary
The existing EKF-based microgrid state estimation method highly relies on accurate mathematical models, which is difficult to adapt to the situation of incomplete data, resulting in a decrease in the accuracy and reliability of state estimation.
Using a combination of Gilbert-Elliott model and LSTM-FNN model, a data set containing historical measurement data and packet loss data is generated through the Gilbert-Elliott model, and the LSTM-FNN model is trained using this data set to estimate the missing state caused by data loss.
Reduces dependence on precise mathematical models, improves the adaptability and flexibility of the model, and can provide accurate state estimation in the case of incomplete data, improving the accuracy and reliability of state estimation.
Smart Images

Figure CN119961606A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of microgrid dynamic state estimation, and in particular to a microgrid dynamic state estimation method and system taking data loss into consideration. Background Art
[0002] As a method to infer the current state of the system based on observed data and system dynamic models, state estimation plays a vital role in many fields. In the field of power systems, state estimation not only helps to monitor the operating status of the power grid in real time, but also ensures the reliability and efficiency of power transmission. For microgrids, a small power system, accurate state estimation is even more important. It can improve the accuracy of reliability-related operations such as equipment operation evaluation and power grid operation stability margin, thereby further improving the operating efficiency of power grid equipment. However, state estimation in microgrids is not easy and will encounter some challenges, such as data loss, which will greatly reduce the accuracy and reliability of estimation. In order to solve the problem of data loss, in the prior art, the extended Kalman filter (EKF) is mainly used to predict and estimate the power grid state. As a recursive algorithm, EKF can handle noise and uncertainty to a certain extent, but it is highly dependent on accurate mathematical models and is difficult to adapt to the situation of incomplete data, resulting in a decrease in the accuracy and reliability of state estimation. Summary of the invention
[0003] In view of the above-mentioned defects, the present invention proposes a microgrid dynamic state estimation method and system taking data loss into consideration, aiming to solve the problem that the existing EKF-based power grid state estimation method is highly dependent on accurate mathematical models and is difficult to adapt to situations where data is incomplete, resulting in reduced accuracy and reliability of state estimation.
[0004] To achieve this object, the present invention adopts the following technical solutions:
[0005] A method for estimating a dynamic state of a microgrid considering data loss comprises the following steps:
[0006] Step S1: establishing a microgrid model and a Gilbert-Elliott model, and combining the two, wherein the microgrid model is used to simulate the dynamic behavior of the microgrid, and the Gilbert-Elliott model is used to describe the data loss behavior in the communication network;
[0007] Step S2: Acquire historical measurement data of the microgrid from sensors and data centers of the microgrid, and use the Gilbert-Elliott model to simulate and supplement the historical measurement data of the microgrid to obtain a data set containing historical measurement data and packet loss data;
[0008] Step S3: preprocessing the data in the data set including the historical measurement data and the packet loss data to obtain a preprocessed data set;
[0009] Step S4: construct LSTM-FNN model;
[0010] Step S5: Use the preprocessed data set to train the LSTM-FNN model to obtain a trained LSTM-FNN model;
[0011] Step S6: Input the data collected by the sensors of the microgrid in real time into the trained LSTM-FNN model to estimate the missing state caused by data loss, and output the estimated value of the missing state of the microgrid.
[0012] Preferably, in step S1, the Gilbert-Elliott model describes the transition probability between system states through a Markov chain state transition matrix to simulate the process of data loss, wherein the mathematical expression of the Markov chain state transition matrix is as follows:
[0013]
[0014] Where A represents the Markov chain state transfer matrix; Prmγ k+1 =0|γ k =0) indicates that the system state is γ k = 0 transfers to system state γ k+1 =0 probability; p = Pr(γ k+1 =1|γ k =0) indicates that the system state is γ k = 0 transfers to system state γ k+1 =1; q = Pr(γ k+1 =0|γ k =1 means that the system state is γ k =1 transfers to system state γ k+1 =0 probability; Pr(γ k+1 =1|γ k =1) indicates that the system state is γ k =1 transfers to system state γ k+1 =1 probability.
[0015] Preferably, step S3 specifically includes the following sub-steps: step S31: deleting duplicate values and outliers in a data set containing historical measurement data and packet loss data, and filling missing values in a data set containing historical measurement data and packet loss data, to obtain a deleted and filled data set; step S32: normalizing the data in the deleted and filled data set to obtain a preprocessed data set.
[0016] Preferably, in step S5, the following sub-steps are specifically included:
[0017] Step S51: Use the preprocessed data set to train LSTM1, FNN1 and FNN2 in the LSTM-FNN model in sequence to complete the first stage of training, where LSTM1 represents long short-term memory network 1, which is used to extract time features without data loss; FNN1 represents feedforward neural network 1, which is used to perform deeper information processing on the time features extracted by LSTM1; FNN2 represents feedforward neural network 2, which is used to extract features from the output of FNN1;
[0018] Step S52: the parameters of LSTM1, FNN1 and FNN2 that have been trained in the first stage remain unchanged, and the preprocessed data set is used to train LSTM2, FNN3 and FNN4 in the LSTM-FNN model in sequence to complete the second stage of training, wherein LSTM2 represents a long short-term memory network 2, which is used to extract time features in the case of data loss; FNN3 represents a feedforward neural network 3, which is used to perform deeper information processing on the time features extracted by LSTM2; FNN4 represents a feedforward neural network 4, which is used to extract features from the output of FNN3;
[0019] Step S53: The parameters of LSTM2, FNN3 and FNN4 that have been trained in the second stage remain unchanged, and a random forest regressor is constructed at the output of FNN4. The random forest regressor is trained through the output of FNN4, and the parameters of the random forest regressor are optimized using RandomizedSearchCV and GridSearchCV to complete the third stage of training.
[0020] Preferably, the method further comprises the following steps:
[0021] By adjusting the parameters θ of the trained LSTM-FNN model, we can find its optimal parameter set θ M , so that the error between the predicted value and the actual value of the trained LSTM-FNN model is minimized, where the optimal parameter set θ of the trained LSTM-FNN model is M The specific mathematical formula is as follows:
[0022]
[0023] Among them, θ M represents the optimal parameter set of the trained LSTM-FNN model; f nn (y u ,y v ) represents the output value of the trained LSTM-FNN model, i.e., the predicted value; ym It indicates the target value that the trained LSTM-FNN model hopes to predict, that is, the actual value.
[0024] Another aspect of the present application provides a microgrid dynamic state estimation system considering data loss, the system comprising:
[0025] A first establishing module is used to establish a microgrid model, wherein the microgrid model is used to simulate the dynamic behavior of the microgrid;
[0026] A second building module is used to build a Gilbert-Elliott model, wherein the Gilbert-Elliott model is used to describe data loss behavior in a communication network;
[0027] A combination module is used to combine the microgrid model with the Gilbert-Elliott model;
[0028] An acquisition module, used for acquiring historical measurement data of the microgrid from sensors of the microgrid and a data center;
[0029] A simulation and supplementation module, used to simulate and supplement the historical measurement data of the microgrid using the Gilbert-Elliott model to obtain a data set including the historical measurement data and packet loss data;
[0030] A preprocessing module, used for preprocessing data in a data set including historical measurement data and packet loss data to obtain a preprocessed data set;
[0031] Building module for building LSTM-FNN model;
[0032] A model training module is used to train the LSTM-FNN model using the preprocessed data set to obtain a trained LSTM-FNN model;
[0033] The input module is used to input the data collected by the sensors of the microgrid in real time into the trained LSTM-FNN model to estimate the missing state caused by data loss;
[0034] The output module is used to output the estimated value of the missing state of the microgrid.
[0035] Preferably, in the second building module, the Gilbert-Elliott model describes the transition probability between system states through a Markov chain state transition matrix to simulate the process of data loss, wherein the mathematical expression of the Markov chain state transition matrix is as follows:
[0036]
[0037] Where A represents the Markov chain state transfer matrix; Pr(γ k+1 =0|γ k =0) indicates that the system state is γ k =0 transfers to system state γ k+1 =0 probability; p = Pr(γ k+1 =1|γ k =0) indicates that the system state is γ k = 0 transfers to system state γ k+1 =1; q = Pr(γ k+1 =0|γ k =1 means that the system state is γ k =1 transfers to system state γ k+1 =0 probability; Pr(γ k+1 =1|γ k =1) indicates that the system state is γ k =1 transfers to system state γ k+1 =1 probability.
[0038] Preferably, the preprocessing module includes: a data deletion submodule, used to delete duplicate values and abnormal values in a data set containing historical measurement data and packet loss data; a data filling submodule, used to fill missing values in a data set containing historical measurement data and packet loss data; and a data normalization submodule, used to normalize the data in the deleted and filled data set to obtain a preprocessed data set.
[0039] Preferably, the model training module includes:
[0040] The first training submodule is used to train LSTM1, FNN1 and FNN2 in the LSTM-FNN model in sequence using the preprocessed data set to complete the first stage of training, wherein LSTM1 represents long short-term memory network 1, which is used to extract time features without data loss; FNN1 represents feedforward neural network 1, which is used to perform deeper information processing on the time features extracted by LSTM1; FNN2 represents feedforward neural network 2, which is used to extract features from the output of FNN1;
[0041] The first parameter setting submodule is used to keep the parameters of LSTM1, FNN1 and FNN2 unchanged after the first stage of training;
[0042] The second training submodule is used to train LSTM2, FNN3 and FNN4 in the LSTM-FNN model in sequence using the preprocessed data set to complete the second stage of training, where LSTM2 represents long short-term memory network 2, which is used to extract time features in the case of data loss; FNN3 represents feedforward neural network 3, which is used to perform deeper information processing on the time features extracted by LSTM2; FNN4 represents feedforward neural network 4, which is used to extract features from the output of FNN3;
[0043] The second parameter setting submodule keeps the parameters of LSTM2, FNN3 and FNN4 unchanged after the second stage of training;
[0044] Build a submodule for building a random forest regressor at the output of FNN4;
[0045] The third training submodule is used to train the random forest regressor through the output of FNN4;
[0046] Parameter optimization submodule for optimizing the parameters of random forest regressors using RandomizedSearchCV and GridSearchCV.
[0047] Preferably, it also includes a model parameter optimization module, which is used to find the optimal parameter set θ by adjusting the parameters θ of the trained LSTM-FNN model. M , so that the error between the predicted value and the actual value of the trained LSTM-FNN model is minimized, where the optimal parameter set θ of the trained LSTM-FNN model is M The specific mathematical formula is as follows:
[0048]
[0049] Among them, θ M represents the optimal parameter set of the trained LSTM-FNN model; f nn (y u ,y v ) represents the output value of the trained LSTM-FNN model, i.e., the predicted value; y m It indicates the target value that the trained LSTM-FNN model hopes to predict, that is, the actual value.
[0050] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0051] In this scheme, a Gilbert-Elliott model and an LSTM-FNN model are established, and the Gilbert-Elliott model is used to simulate and supplement data to obtain a data set containing historical measurement data and packet loss data. The LSTM-FNN model is trained using this data set, and the trained LSTM-FNN model is used to estimate the missing state caused by data loss. Compared with the existing EKF-based power grid state estimation method, the LSTM-FNN model in this scheme estimates the state by learning patterns in the data, reducing the dependence on precise mathematical models and improving the adaptability and flexibility of the model. At the same time, since the LSTM-FNN model can process data sets containing packet loss data, it can provide accurate state estimation even when the data is incomplete, thereby improving the accuracy and reliability of state estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a flowchart of the steps of a method for dynamic state estimation of a microgrid considering data loss. DETAILED DESCRIPTION
[0053] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0054] A method for estimating a dynamic state of a microgrid considering data loss comprises the following steps:
[0055] Step S1: establishing a microgrid model and a Gilbert-Elliott model, and combining the two, wherein the microgrid model is used to simulate the dynamic behavior of the microgrid, and the Gilbert-Elliott model is used to describe the data loss behavior in the communication network;
[0056] Step S2: Acquire historical measurement data of the microgrid from sensors and data centers of the microgrid, and use the Gilbert-Elliott model to simulate and supplement the historical measurement data of the microgrid to obtain a data set containing historical measurement data and packet loss data;
[0057] Step S3: preprocessing the data in the data set including the historical measurement data and the packet loss data to obtain a preprocessed data set;
[0058] Step S4: construct LSTM-FNN model;
[0059] Step S5: Use the preprocessed data set to train the LSTM-FNN model to obtain a trained LSTM-FNN model;
[0060] Step S6: Input the data collected by the sensors of the microgrid in real time into the trained LSTM-FNN model to estimate the missing state caused by data loss, and output the estimated value of the missing state of the microgrid.
[0061] A microgrid dynamic state estimation method considering data loss in this scheme is proposed. Figure 1As shown, the first step is to establish a microgrid model and a Gilbert-Elliott model, and combine the two, wherein the microgrid model is used to simulate the dynamic behavior of the microgrid, and the Gilbert-Elliott model is used to describe the data loss behavior in the communication network. In this embodiment, by establishing a microgrid model, it is beneficial to real-time monitoring and estimation of the state in the microgrid. The Gilbert-Elliott model is a Markov chain model used to describe the data loss behavior in the communication network. By establishing the Gilbert-Elliott model, the Gilbert-Elliott model can use a Markov chain to describe the data loss in the communication, and by simulating the data loss mode, it helps to improve the accuracy and reliability of the state estimation when the communication is unstable. In addition, by combining the microgrid model and the Gilbert-Elliott model, it is beneficial to make the state estimation more adaptable to complex environments. The second step is to obtain the historical measurement data of the microgrid from the sensors and data center of the microgrid, and use the Gilbert-Elliott model to simulate and supplement the historical measurement data of the microgrid to obtain a data set containing historical measurement data and packet loss data. In this embodiment, by using the Gilbert-Elliott model to simulate and supplement data, it is beneficial to simulate the data loss that may occur in actual operation, and generate a more complete and accurate data set, which is helpful for the subsequent training of the LSTM-FNN model. The third step is to preprocess the data in the data set containing historical measurement data and packet loss data to obtain a preprocessed data set. In this embodiment, by preprocessing the data in the data set containing historical measurement data and packet loss data, it is beneficial to improve the quality of the data set. The fourth step is to build an LSTM-FNN model. In this embodiment, the LSTM-FNN model is a model that combines a long short-term memory network (LSTM) and a feedforward neural network (FNN). The combination of LSTM and FNN can make full use of the advantages of LSTM in processing time series data and the ability of FNN in nonlinear mapping, thereby building a neural network model suitable for dynamic state estimation of microgrids. The fifth step is to train the LSTM-FNN model using the preprocessed data set to obtain a trained LSTM-FNN model. In this embodiment, by training the LSTM-FNN model using the preprocessed data set, the LSTM-FNN model can handle the problem of data loss, thereby improving the prediction accuracy and generalization ability of the LSTM-FNN model.It is further explained that during the training process, the LSTM-FNN model receives a historical data sequence, including observed states and missing states, and takes into account the data loss pattern described by the Gilbert-Elliott model, so that it learns how to minimize the prediction error between the estimated state and the actual state. In this way, even in the face of a large amount of data loss, the LSTM-FNN model can accurately estimate the system state. The sixth step is to input the data collected in real time by the sensors of the microgrid into the trained LSTM-FNN model to estimate the missing state caused by data loss, and output the estimated value of the missing state of the microgrid. In this embodiment, the LSTM-FNN model predicts and estimates the missing state caused by data loss by using the features and patterns learned during the training process, thereby ensuring that the data loss problem can be effectively handled in practical applications.
[0062] In this scheme, a Gilbert-Elliott model and an LSTM-FNN model are established, and the Gilbert-Elliott model is used to simulate and supplement data to obtain a data set containing historical measurement data and packet loss data. The LSTM-FNN model is trained using this data set, and the trained LSTM-FNN model is used to estimate the missing state caused by data loss. Compared with the existing EKF-based power grid state estimation method, the LSTM-FNN model in this scheme estimates the state by learning patterns in the data, reducing the dependence on precise mathematical models and improving the adaptability and flexibility of the model. At the same time, since the LSTM-FNN model can process data sets containing packet loss data, it can provide accurate state estimation even when the data is incomplete, thereby improving the accuracy and reliability of state estimation.
[0063] Preferably, in step S1, the Gilbert-Elliott model describes the transition probability between system states through a Markov chain state transition matrix to simulate the process of data loss, wherein the mathematical expression of the Markov chain state transition matrix is as follows:
[0064]
[0065] Where A represents the Markov chain state transfer matrix; Prmγ k+1 =0|γ k =0) indicates that the system state is γ k = 0 transfers to system state γ k+1 =0 probability; p = Pr(γ k+1 =1|γ k =0) indicates that the system state is γ k = 0 transfers to system state γ k+1=1; q = Pr(γ k+1 =0|γ k =1 means that the system state is γ k =1 transfers to system state γ k+1 =0 probability; Pr(γ k+1 =1|γ k =1) indicates that the system state is γ k =1 transfers to system state γ k+1 =1 probability.
[0066] In this embodiment, the Gilbert-Elliott model consists of two states, namely, the state of successful data packet transmission and the state of data packet loss, and the transition between these states is subject to the transition probability. Further explanation, the parameters p and q in the mathematical expression of the Markov chain state transition matrix are used to describe the transition characteristics of the system between different states, helping to analyze the dynamic behavior and stability of the system.
[0067] Preferably, in step S3, the following sub-steps are specifically included: step S31: deleting duplicate values and outliers in a data set containing historical measurement data and packet loss data, and filling missing values in a data set containing historical measurement data and packet loss data, to obtain a deleted and filled data set; step S32: normalizing the data in the deleted and filled data set to obtain a preprocessed data set. In this embodiment, by deleting duplicate values and outliers in a data set containing historical measurement data and packet loss data, and filling missing values in a data set containing historical measurement data and packet loss data, and normalizing the data in the deleted and filled data set, it is beneficial to improve data quality and ensure the stability and reliability of subsequent LSTM-FNN model training.
[0068] Preferably, in step S5, the following sub-steps are specifically included:
[0069] Step S51: Use the preprocessed data set to train LSTM1, FNN1 and FNN2 in the LSTM-FNN model in sequence to complete the first stage of training, where LSTM1 represents long short-term memory network 1, which is used to extract time features without data loss; FNN1 represents feedforward neural network 1, which is used to perform deeper information processing on the time features extracted by LSTM1; FNN2 represents feedforward neural network 2, which is used to extract features from the output of FNN1;
[0070] Step S52: the parameters of LSTM1, FNN1 and FNN2 that have been trained in the first stage remain unchanged, and the preprocessed data set is used to train LSTM2, FNN3 and FNN4 in the LSTM-FNN model in sequence to complete the second stage of training, wherein LSTM2 represents a long short-term memory network 2, which is used to extract time features in the case of data loss; FNN3 represents a feedforward neural network 3, which is used to perform deeper information processing on the time features extracted by LSTM2; FNN4 represents a feedforward neural network 4, which is used to extract features from the output of FNN3;
[0071] Step S53: The parameters of LSTM2, FNN3 and FNN4 that have been trained in the second stage remain unchanged, and a random forest regressor is constructed at the output of FNN4. The random forest regressor is trained through the output of FNN4, and the parameters of the random forest regressor are optimized using RandomizedSearchCV and GridSearchCV to complete the third stage of training.
[0072] In this embodiment, in step S51, data loss is ignored in the first stage of training, which means that LSTM1 can obtain real measurements. By using the preprocessed data set to train LSTM1, FNN1 and FNN2 in sequence, the prediction error of the LSTM-FNN model can be effectively reduced, thereby improving the basic accuracy of the LSTM-FNN model. This step not only simplifies the training complexity when facing undesirable situations such as data loss, but also provides a more solid and reliable foundation for state estimation under data loss conditions. In step S52, by keeping the parameters of LSTM1, FNN1 and FNN2 that have been trained in the first stage unchanged, it is helpful to ensure that the three networks can learn the real physical characteristics of the microgrid when there is no packet loss. By using the preprocessed data set to train LSTM2, FNN3 and FNN4 in sequence, the error between the state estimate based on the missing data condition and the real state is minimized. In the second training, the case of data loss is taken into account, which is conducive to enhancing the adaptability and robustness of the LSTM-FNN model in the data missing environment, so that the LSTM-FNN model can not only adjust its prediction results when the data is incomplete, but also maintain or even improve the estimation accuracy under non-ideal conditions. In step S53, by keeping the parameters of LSTM2, FNN3 and FNN4 that have been trained in the second stage unchanged, it is conducive to ensuring that the three networks can learn the real physical characteristics of the microgrid when the packet is lost. The random forest regressor is trained through the output of FNN4, and the parameters of the random forest regressor are optimized using RandomizedSearchCV and GridSearchCV, which is conducive to improving the generalization ability of the LSTM-FNN model. Further explanation, RandomizedSearchCV is a hyperparameter optimization method in the Scikit-learn library. RandomizedSearchCV is particularly suitable for rapid exploration of high-dimensional or large-scale parameter spaces by randomly sampling the parameter space. GridSearchCV is a method for exhaustively enumerating all possible parameter combinations and providing more accurate optimization solutions for smaller parameter spaces.
[0073] Preferably, the method further comprises the following steps:
[0074] By adjusting the parameters θ of the trained LSTM-FNN model, we can find its optimal parameter set θ M , so that the error between the predicted value and the actual value of the trained LSTM-FNN model is minimized, where the optimal parameter set θ of the trained LSTM-FNN model is M The specific mathematical formula is as follows:
[0075]
[0076] Among them, θ M represents the optimal parameter set of the trained LSTM-FNN model; f nn (y u ,y v ) represents the output value of the trained LSTM-FNN model, i.e., the predicted value; y m It indicates the target value that the trained LSTM-FNN model hopes to predict, that is, the actual value.
[0077] In this embodiment, the optimal parameter set θ is found by adjusting the parameters θ of the trained LSTM-FNN model. M , so that the error between the predicted value and the actual value of the trained LSTM-FNN model is minimized, which is conducive to improving the prediction performance of the trained LSTM-FNN model.
[0078] Another aspect of the present application provides a microgrid dynamic state estimation system considering data loss, the system comprising:
[0079] A first establishing module is used to establish a microgrid model, wherein the microgrid model is used to simulate the dynamic behavior of the microgrid;
[0080] A second building module is used to build a Gilbert-Elliott model, wherein the Gilbert-Elliott model is used to describe data loss behavior in a communication network;
[0081] A combination module is used to combine the microgrid model with the Gilbert-Elliott model;
[0082] An acquisition module, used for acquiring historical measurement data of the microgrid from sensors of the microgrid and a data center;
[0083] A simulation and supplementation module, used to simulate and supplement the historical measurement data of the microgrid using the Gilbert-Elliott model to obtain a data set including the historical measurement data and packet loss data;
[0084] A preprocessing module, used for preprocessing data in a data set including historical measurement data and packet loss data to obtain a preprocessed data set;
[0085] Building module for building LSTM-FNN model;
[0086] A model training module is used to train the LSTM-FNN model using the preprocessed data set to obtain a trained LSTM-FNN model;
[0087] The input module is used to input the data collected by the sensors of the microgrid in real time into the trained LSTM-FNN model to estimate the missing state caused by data loss;
[0088] The output module is used to output the estimated value of the missing state of the microgrid.
[0089] The present scheme is a microgrid dynamic state estimation system that takes data loss into consideration. Through the cooperation of the first establishment module, the second establishment module, the combination module, the acquisition module, the simulation and supplementation module, the preprocessing module, the construction module, the model training module, the input module and the output module, the missing state of the microgrid due to data loss is estimated. Compared with the existing EKF-based grid state estimation method, the LSTM-FNN model in the present scheme performs state estimation by learning patterns in the data, which reduces the dependence on precise mathematical models and improves the adaptability and flexibility of the model. At the same time, since the LSTM-FNN model can process data sets containing packet loss data, it can provide accurate state estimation even when the data is incomplete, thereby improving the accuracy and reliability of state estimation.
[0090] Preferably, in the second building module, the Gilbert-Elliott model describes the transition probability between system states through a Markov chain state transition matrix to simulate the process of data loss, wherein the mathematical expression of the Markov chain state transition matrix is as follows:
[0091]
[0092] Where A represents the Markov chain state transfer matrix; Pr(γ k+1 =0|γ k =0) indicates that the system state is γ k = 0 transfers to system state γ k+1 =0 probability; p = Pr(γ k+1 =1|γ k =0) indicates that the system state is γ k = 0 transfers to system state γ k+1 =1; q = Pr(γ k+1 =0|γ k =1 means that the system state is γ k =1 transfers to system state γ k+1 =0 probability; Pr(γ k+1 =1|γ k =1) indicates that the system state is γ k =1 transfers to system state γ k+1 =1 probability.
[0093] In this embodiment, the Gilbert-Elliott model consists of two states, namely, a state in which a data packet is successfully transmitted and a state in which a data packet is lost. The transitions between these states are subject to the constraints of transition probabilities.
[0094] Preferably, the preprocessing module includes: a data deletion submodule for deleting duplicate values and outliers in a data set containing historical measurement data and packet loss data; a data filling submodule for filling missing values in a data set containing historical measurement data and packet loss data; and a data normalization submodule for normalizing the data in the deleted and filled data set to obtain a preprocessed data set. In this embodiment, by setting a data deletion submodule, a data filling submodule, and a data normalization submodule, it is beneficial to improve data quality and ensure the stability and reliability of subsequent LSTM-FNN model training.
[0095] Preferably, the model training module includes:
[0096] The first training submodule is used to train LSTM1, FNN1 and FNN2 in the LSTM-FNN model in sequence using the preprocessed data set to complete the first stage of training, wherein LSTM1 represents long short-term memory network 1, which is used to extract time features without data loss; FNN1 represents feedforward neural network 1, which is used to perform deeper information processing on the time features extracted by LSTM1; FNN2 represents feedforward neural network 2, which is used to extract features from the output of FNN1;
[0097] The first parameter setting submodule is used to keep the parameters of LSTM1, FNN1 and FNN2 unchanged after the first stage of training;
[0098] The second training submodule is used to train LSTM2, FNN3 and FNN4 in the LSTM-FNN model in sequence using the preprocessed data set to complete the second stage of training, where LSTM2 represents long short-term memory network 2, which is used to extract time features in the case of data loss; FNN3 represents feedforward neural network 3, which is used to perform deeper information processing on the time features extracted by LSTM2; FNN4 represents feedforward neural network 4, which is used to extract features from the output of FNN3;
[0099] The second parameter setting submodule keeps the parameters of LSTM2, FNN3 and FNN4 unchanged after the second stage of training;
[0100] Build a submodule for building a random forest regressor at the output of FNN4;
[0101] The third training submodule is used to train the random forest regressor through the output of FNN4;
[0102] Parameter optimization submodule for optimizing the parameters of random forest regressors using RandomizedSearchCV and GridSearchCV.
[0103] In this embodiment, by setting the first training submodule, the prediction error of the LSTM-FNN model can be effectively reduced, thereby improving the basic accuracy of the LSTM-FNN model. By setting the first parameter setting submodule, it is helpful to ensure that the three networks LSTM1, FNN1 and FNN2 can learn the real physical characteristics of the microgrid when there is no packet loss. By setting the second training submodule, it is helpful to enhance the adaptability and robustness of the LSTM-FNN model in a data missing environment, so that the LSTM-FNN model can not only adjust its prediction results when the data is incomplete, but also maintain or even improve the estimation accuracy under non-ideal conditions. By setting the second parameter setting submodule, it is helpful to ensure that the three networks LSTM2, FNN3 and FNN4 can learn the real physical characteristics of the microgrid when the packet is lost. By setting the construction submodule, the third training submodule and the parameter optimization submodule, it is helpful to improve the generalization ability of the LSTM-FNN model.
[0104] Preferably, it also includes a model parameter optimization module, which is used to find the optimal parameter set θ by adjusting the parameters θ of the trained LSTM-FNN model. M , so that the error between the predicted value and the actual value of the trained LSTM-FNN model is minimized, where the optimal parameter set θ of the trained LSTM-FNN model is M The specific mathematical formula is as follows:
[0105]
[0106] Among them, θ M represents the optimal parameter set of the trained LSTM-FNN model; f nn (y u ,y v ) represents the output value of the trained LSTM-FNN model, i.e., the predicted value; y m It indicates the target value that the trained LSTM-FNN model hopes to predict, that is, the actual value.
[0107] In this embodiment, setting a model parameter optimization module is helpful to improve the prediction performance of the trained LSTM-FNN model.
[0108] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0109] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for dynamic state estimation of a microgrid considering data loss, characterized in that: The following steps are involved: Step S1: establishing a microgrid model and a Gilbert-Elliott model, and combining the two, wherein the microgrid model is used to simulate the dynamic behavior of the microgrid, and the Gilbert-Elliott model is used to describe the data loss behavior in the communication network; Step S2: Acquire historical measurement data of the microgrid from sensors and data centers of the microgrid, and use the Gilbert-Elliott model to simulate and supplement the historical measurement data of the microgrid to obtain a data set containing historical measurement data and packet loss data; Step S3: preprocessing the data in the data set including the historical measurement data and the packet loss data to obtain a preprocessed data set; Step S4: construct LSTM-FNN model; Step S5: Use the preprocessed data set to train the LSTM-FNN model to obtain a trained LSTM-FNN model; Step S6: Input the data collected by the sensors of the microgrid in real time into the trained LSTM-FNN model to estimate the missing state caused by data loss, and output the estimated value of the missing state of the microgrid.
2. The method for estimating a microgrid dynamic state considering data loss according to claim 1, characterized in that: In step S1, the Gilbert-Elliott model describes the transition probability between system states through a Markov chain state transition matrix to simulate the process of data loss, wherein the mathematical expression of the Markov chain state transition matrix is as follows: Where A represents the Markov chain state transfer matrix; Pr(γ k+1 =0|γ k =0) indicates that the system state is γ k = 0 transfers to system state γ k+1 =0 probability; p = Pr(γ k+1 =1|γ k =0) indicates that the system state is γ k = 0 transfers to system state γ k+1 =1; q = Pr(γ k+1 =0|γ k =1 means that the system state is γ k =1 transfers to system state γ k+1 =0 probability; Pr(γ k+1 =1|γ k =1) indicates that the system state is γ k =1 transfers to system state γ k+1 =1 probability.
3. The method for dynamic state estimation of a microgrid considering data loss according to claim 1, characterized in that: In step S3, the following sub-steps are specifically included: Step S31: deleting duplicate values and abnormal values in the data set containing historical measurement data and packet loss data, and filling missing values in the data set containing historical measurement data and packet loss data, to obtain a deleted and filled data set; Step S32: normalize the data in the deleted and filled data set to obtain a preprocessed data set.
4. The method for dynamic state estimation of a microgrid considering data loss according to claim 1, characterized in that: In step S5, the following sub-steps are specifically included: Step S51: Use the preprocessed data set to train LSTM1, FNN1 and FNN2 in the LSTM-FNN model in sequence to complete the first stage of training, where LSTM1 represents long short-term memory network 1, which is used to extract time features without data loss; FNN1 represents feedforward neural network 1, which is used to perform deeper information processing on the time features extracted by LSTM1; FNN2 represents feedforward neural network 2, which is used to extract features from the output of FNN1; Step S52: the parameters of LSTM1, FNN1 and FNN2 that have been trained in the first stage remain unchanged, and the preprocessed data set is used to train LSTM2, FNN3 and FNN4 in the LSTM-FNN model in sequence to complete the second stage of training, wherein LSTM2 represents a long short-term memory network 2, which is used to extract time features in the case of data loss; FNN3 represents a feedforward neural network 3, which is used to perform deeper information processing on the time features extracted by LSTM2; FNN4 represents a feedforward neural network 4, which is used to extract features from the output of FNN3; Step S53: The parameters of LSTM2, FNN3 and FNN4 that have been trained in the second stage remain unchanged, and a random forest regressor is constructed at the output of FNN4. The random forest regressor is trained through the output of FNN4, and the parameters of the random forest regressor are optimized using RandomizedSearchCV and GridSearchCV to complete the third stage of training.
5. The method for dynamic state estimation of a microgrid considering data loss according to claim 1, characterized in that: The following steps are also included: By adjusting the parameters θ of the trained LSTM-FNN model, we can find its optimal parameter set θ M , so that the error between the predicted value and the actual value of the trained LSTM-FNN model is minimized, where the optimal parameter set θ of the trained LSTM-FNN model is M The specific mathematical formula is as follows: Among them, θ M represents the optimal parameter set of the trained LSTM-FNN model; f nn (y u ,y v ) represents the output value of the trained LSTM-FNN model, i.e., the predicted value; y m It indicates the target value that the trained LSTM-FNN model hopes to predict, that is, the actual value.
6. A microgrid dynamic state estimation system considering data loss, using the microgrid dynamic state estimation method considering data loss as claimed in any one of claims 1 to 5, characterized in that: The system comprises: A first establishing module is used to establish a microgrid model, wherein the microgrid model is used to simulate the dynamic behavior of the microgrid; A second building module is used to build a Gilbert-Elliott model, wherein the Gilbert-Elliott model is used to describe data loss behavior in a communication network; A combination module is used to combine the microgrid model with the Gilbert-Elliott model; An acquisition module, used for acquiring historical measurement data of the microgrid from sensors of the microgrid and a data center; A simulation and supplementation module, used to simulate and supplement the historical measurement data of the microgrid using the Gilbert-Elliott model to obtain a data set including the historical measurement data and packet loss data; A preprocessing module, used for preprocessing data in a data set including historical measurement data and packet loss data to obtain a preprocessed data set; Building module for building LSTM-FNN model; A model training module is used to train the LSTM-FNN model using the preprocessed data set to obtain a trained LSTM-FNN model; The input module is used to input the data collected by the sensors of the microgrid in real time into the trained LSTM-FNN model to estimate the missing state caused by data loss; The output module is used to output the estimated value of the missing state of the microgrid.
7. A microgrid dynamic state estimation system considering data loss according to claim 6, characterized in that: In the second building module, the Gilbert-Elliott model describes the transition probability between system states through a Markov chain state transition matrix to simulate the process of data loss, wherein the mathematical expression of the Markov chain state transition matrix is as follows: Where A represents the Markov chain state transfer matrix; Pr(γ k+1 =0|γ k =0) indicates that the system state is γ k = 0 transfers to system state γ k+1 =0 probability; p = Pr(γ k+1 =1|γ k =0) indicates that the system state is γ k = 0 transfers to system state γ k+1 =1; q = Pr(γ k+1 =0|γ k =1 means that the system state is γ k =1 transfers to system state γ k+1 =0 probability; Pr(γ k+1 =1|γ k =1) indicates that the system state is γ k =1 transfers to system state γ k+1 =1 probability.
8. A microgrid dynamic state estimation system considering data loss according to claim 6, characterized in that: The preprocessing module comprises: A data deletion submodule is used to delete duplicate values and outliers in the data set containing historical measurement data and packet loss data; The data filling submodule is used to fill the missing values in the dataset containing historical measurement data and packet loss data; The data normalization submodule is used to normalize the data in the deleted and filled dataset to obtain the preprocessed dataset.
9. A microgrid dynamic state estimation system considering data loss according to claim 6, characterized in that: The model training module includes: The first training submodule is used to train LSTM1, FNN1 and FNN2 in the LSTM-FNN model in sequence using the preprocessed data set to complete the first stage of training, wherein LSTM1 represents long short-term memory network 1, which is used to extract time features without data loss; FNN1 represents feedforward neural network 1, which is used to perform deeper information processing on the time features extracted by LSTM1; FNN2 represents feedforward neural network 2, which is used to extract features from the output of FNN1; The first parameter setting submodule is used to keep the parameters of LSTM1, FNN1 and FNN2 unchanged after the first stage of training; The second training submodule is used to train LSTM2, FNN3 and FNN4 in the LSTM-FNN model in sequence using the preprocessed data set to complete the second stage of training, where LSTM2 represents long short-term memory network 2, which is used to extract time features in the case of data loss; FNN3 represents feedforward neural network 3, which is used to perform deeper information processing on the time features extracted by LSTM2; FNN4 represents feedforward neural network 4, which is used to extract features from the output of FNN3; The second parameter setting submodule keeps the parameters of LSTM2, FNN3 and FNN4 unchanged after the second stage of training; Build a submodule for building a random forest regressor at the output of FNN4; The third training submodule is used to train the random forest regressor through the output of FNN4; Parameter optimization submodule for optimizing the parameters of random forest regressors using RandomizedSearchCV and GridSearchCV.
10. A microgrid dynamic state estimation system considering data loss according to claim 6, characterized in that: It also includes a model parameter optimization module, which is used to find the optimal parameter set θ by adjusting the parameters θ of the trained LSTM-FNN model. M , so that the error between the predicted value and the actual value of the trained LSTM-FNN model is minimized, where the optimal parameter set θ of the trained LSTM-FNN model is M The specific mathematical formula is as follows: Among them, θ M represents the optimal parameter set of the trained LSTM-FNN model; f nn (y u ,y v ) represents the output value of the trained LSTM-FNN model, i.e., the predicted value; y m It indicates the target value that the trained LSTM-FNN model hopes to predict, that is, the actual value.
Citation Information
Patent Citations
Multi-sensor estimation performance method in wireless network control system
CN107426748A
Short-term prediction method and device for coupled directed graph structure flow data containing missing data
CN111860787A
Method, system and device for adjusting rotating speed of BMC (Baseboard Management Controller) fan
CN116956759A
Probability photovoltaic power generation prediction method integrating missing data
CN117424208A
Internet of things communication data missing processing method and system
CN118013217A