A method and system for dynamic state estimation of microgrid considering data loss

By combining the microgrid and the Gilbert-Elliott model to construct an LSTM-FNN model, the problem of reliance on precise mathematical models in existing technologies is solved, accurate state estimation is achieved in the case of data loss, and the adaptability and reliability of microgrid state estimation are improved.

CN119961606BActive Publication Date: 2025-09-30GUANGZHOU CITY UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510050693.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-09-30
Estimated Expiration
2045-01-13

AI Technical Summary

Technical Problem

Existing EKF-based microgrid state estimation methods are highly dependent on accurate mathematical models and are difficult to adapt to situations with incomplete data, resulting in a decrease in the accuracy and reliability of state estimation.

Method used

Combining the microgrid model and the Gilbert-Elliott model, the LSTM-FNN model is used for data supplementation and preprocessing, a long short-term memory network and a feedforward neural network are constructed, the Markov chain state transition matrix is ​​used to simulate data loss, and the parameters of the random forest regressor are optimized to reduce dependence on precise mathematical models and improve the adaptability and flexibility of the model.

Benefits of technology

It provides accurate state estimation in the case of incomplete data, improves the accuracy and reliability of state estimation, and enhances the adaptability and robustness of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119961606B_ABST
    Figure CN119961606B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for estimating the dynamic state of a microgrid that takes data loss into account. The method includes the following steps: establishing a microgrid model and a Gilbert-Elliott model; obtaining historical measurement data of the microgrid from sensors and a data center of the microgrid, and using 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; preprocessing the data in the data set containing historical measurement data and packet loss data to obtain a preprocessed data set; constructing an LSTM-FNN model; training the LSTM-FNN model using the preprocessed data set; and inputting data collected in real time by sensors of the microgrid into the trained LSTM-FNN model to estimate missing states caused by data loss. The present invention solves the problem that existing EKF-based grid state estimation methods are highly dependent on precise mathematical models and are difficult to adapt to situations where data is incomplete, resulting in reduced accuracy and reliability of state estimation.
Need to check novelty before this filing date? Find Prior Art

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] State estimation, a method for inferring the current state of a system based on observed data and system dynamic models, plays a crucial role in numerous fields. In the field of power systems, state estimation not only facilitates real-time monitoring of the grid's operating status but also ensures the reliability and efficiency of power transmission. Accurate state estimation is particularly crucial for small power systems such as microgrids. It can improve the accuracy of reliability-related calculations, such as equipment operation assessment and grid stability margin, thereby further enhancing the operational efficiency of grid equipment. However, state estimation in microgrids is not a simple task and can encounter challenges, such as data loss, which can significantly reduce the accuracy and reliability of estimates. To address this issue, the extended Kalman filter (EKF) is currently used to predict and estimate grid states. As a recursive algorithm, the EKF can handle noise and uncertainty to a certain extent, but it relies heavily on precise mathematical models and struggles to adapt to incomplete data, resulting in reduced accuracy and reliability of state estimation. Summary of the Invention

[0003] In response to the above-mentioned defects, the present invention proposes a microgrid dynamic state estimation method and system that takes data loss into account. The purpose is to solve the problem that the existing EKF-based grid state estimation method is highly dependent on accurate mathematical models and is difficult to adapt to situations where data is incomplete, resulting in a decrease in the 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 includes 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 a data center of the microgrid, and simulate and supplement the historical measurement data of the microgrid using the Gilbert-Elliott model to obtain a data set containing historical measurement data and packet loss data;

[0008] Step S3: preprocessing the data in the data set containing the historical measurement data and the packet loss data to obtain a preprocessed data set;

[0009] Step S4: Build 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 transition matrix; Prmγ k+1 =0|γ k =0) indicates that the system state is γ k =0 transfers to the system state γ k+1 =0 probability; p = Pr(γ k+1 =1|γ k =0) indicates that the system state is γ k =0 transfers to the 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, step S5 specifically includes the following sub-steps:

[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 the long short-term memory network 1, which is used to extract time features without data loss; FNN1 represents the feedforward neural network 1, which is used to perform deeper information processing on the time features extracted by LSTM1; FNN2 represents the 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 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, where LSTM2 represents the long short-term memory network 2, which is used to extract time features in the case of data loss; FNN3 represents the feedforward neural network 3, which is used to perform deeper information processing on the time features extracted by LSTM2; and FNN4 represents the 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 end 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, among which 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 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 establishing module is used to establish a Gilbert-Elliott model, wherein the Gilbert-Elliott model is used to describe data loss behavior in a communication network;

[0027] Combining module, used to combine the microgrid model and the Gilbert-Elliott model;

[0028] An acquisition module is used to obtain historical measurement data of the microgrid from sensors of the microgrid and a data center;

[0029] A simulation and supplementation module is used to simulate and supplement the historical measurement data of the microgrid using the Gilbert-Elliott model to obtain a data set containing 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] The 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 microgrid sensors 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 the system state γ k+1 =0 probability; p = Pr(γ k+1 =1|γ k =0) indicates that the system state is γ k =0 transfers to the 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 outliers 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 dataset to complete the first stage of training. LSTM1 represents long short-term memory network 1, which is used to extract temporal features without data loss; FNN1 represents feedforward neural network 1, which is used to perform deeper information processing on the temporal features extracted by LSTM1; and 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. LSTM2 represents the long short-term memory network 2, which is used to extract temporal features in the case of data loss; FNN3 represents the feedforward neural network 3, which is used to perform deeper information processing on the temporal features extracted by LSTM2; and FNN4 represents the 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, a model parameter optimization module is further included, wherein the model parameter optimization module 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, among which 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 Indicates the target value that the trained LSTM-FNN model hopes to predict, that is, the actual value.

[0050] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:

[0051] This solution establishes a Gilbert-Elliott model and an LSTM-FNN model, and uses the Gilbert-Elliott model to simulate and supplement data to generate a dataset containing historical measurement data and packet loss data. This dataset is then used to train the LSTM-FNN model, which is then used to estimate missing states due to data loss. Compared to existing EKF-based power grid state estimation methods, the LSTM-FNN model in this solution learns patterns in the data to perform state estimation, reducing reliance on precise mathematical models and improving the model's adaptability and flexibility. Furthermore, because the LSTM-FNN model can handle datasets containing packet loss, it can provide accurate state estimates even with incomplete data, 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 microgrid dynamic state estimation method considering data loss. DETAILED DESCRIPTION

[0053] The embodiments of the present invention are described in detail below. 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 throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and are not to be construed as limiting the present invention.

[0054] A method for estimating a dynamic state of a microgrid considering data loss includes 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 a data center of the microgrid, and simulate and supplement the historical measurement data of the microgrid using the Gilbert-Elliott model to obtain a data set containing historical measurement data and packet loss data;

[0057] Step S3: preprocessing the data in the data set containing the historical measurement data and the packet loss data to obtain a preprocessed data set;

[0058] Step S4: Build 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] This scheme is a microgrid dynamic state estimation method considering data loss, such as 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 the 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 pattern, 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 historical measurement data from the microgrid's sensors and data center. The Gilbert-Elliott model is used to simulate and supplement the microgrid's historical measurement data to obtain a dataset containing both historical measurement data and packet loss data. In this embodiment, using the Gilbert-Elliott model for data simulation and supplementation facilitates simulating data loss scenarios that may occur during actual operation and generates a more complete and accurate dataset, thereby facilitating subsequent training of the LSTM-FNN model. The third step is to preprocess the data in the dataset containing both historical measurement data and packet loss data to obtain a preprocessed dataset. In this embodiment, preprocessing the data in the dataset containing both historical measurement data and packet loss data facilitates improving the quality of the dataset. The fourth step is to construct an LSTM-FNN model. In this embodiment, the LSTM-FNN model combines a long short-term memory network (LSTM) with a feedforward neural network (FNN). This combination of LSTM and FNN leverages the advantages of LSTM in processing time series data and the capabilities of FNN in nonlinear mapping, thereby constructing 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 using the preprocessed data set to train the LSTM-FNN model, the LSTM-FNN model can handle the problem of data loss, thereby improving the prediction accuracy and generalization ability of the LSTM-FNN model.Further explanation: During the training process, the LSTM-FNN model receives a historical data sequence, including observed and missing states. Taking into account the data loss patterns described by the Gilbert-Elliott model, the model learns how to minimize the prediction error between the estimated and true states. This allows the LSTM-FNN model to accurately estimate the system state even in the face of significant data loss. The sixth step involves inputting the real-time data collected by the microgrid's sensors into the trained LSTM-FNN model to estimate the missing states caused by data loss and output an estimate of the microgrid's missing states. In this embodiment, the LSTM-FNN model leverages the features and patterns learned during training to predict and estimate the missing states caused by data loss, thereby ensuring that data loss can be effectively addressed in practical applications.

[0062] This solution establishes a Gilbert-Elliott model and an LSTM-FNN model, and uses the Gilbert-Elliott model to simulate and supplement data to generate a dataset containing historical measurement data and packet loss data. This dataset is then used to train the LSTM-FNN model, which is then used to estimate missing states due to data loss. Compared to existing EKF-based power grid state estimation methods, the LSTM-FNN model in this solution learns patterns in the data to perform state estimation, reducing reliance on precise mathematical models and improving the model's adaptability and flexibility. Furthermore, because the LSTM-FNN model can handle datasets containing packet loss, it can provide accurate state estimates even with incomplete data, 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 transition matrix; Prmγ k+1 =0|γ k =0) indicates that the system state is γ k =0 transfers to the system state γ k+1 =0 probability; p = Pr(γ k+1 =1|γ k =0) indicates that the system state is γ k =0 transfers to the 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: 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 governed by transition probabilities. Furthermore, the parameters p and q in the mathematical expression of the Markov chain state transition matrix are used to describe the transition characteristics between different states of the system, helping to analyze the system's dynamic behavior and stability.

[0067] Preferably, step S3 specifically includes the following sub-steps: Step S31: deleting duplicate values ​​and outliers in the dataset containing historical measurement data and packet loss data, and filling missing values ​​in the dataset containing historical measurement data and packet loss data, to obtain a deleted and filled dataset; Step S32: normalizing the data in the deleted and filled dataset to obtain a preprocessed dataset. In this embodiment, by deleting duplicate values ​​and outliers in the dataset containing historical measurement data and packet loss data, filling missing values ​​in the dataset containing historical measurement data and packet loss data, and normalizing the data in the deleted and filled dataset, 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 the long short-term memory network 1, which is used to extract time features without data loss; FNN1 represents the feedforward neural network 1, which is used to perform deeper information processing on the time features extracted by LSTM1; FNN2 represents the 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 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, where LSTM2 represents the long short-term memory network 2, which is used to extract time features in the case of data loss; FNN3 represents the feedforward neural network 3, which is used to perform deeper information processing on the time features extracted by LSTM2; and FNN4 represents the 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 end 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 measurement values. 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 beneficial 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 actual state is minimized. In the second training phase, data loss is considered, which helps enhance the adaptability and robustness of the LSTM-FNN model in data-missing environments. This allows the LSTM-FNN model to not only adjust its prediction results when data is incomplete, but also maintain or even improve its estimation accuracy under non-ideal conditions. In step S53, by keeping the parameters of LSTM2, FNN3, and FNN4 unchanged after the second phase of training, it helps ensure that these three networks can learn the true physical characteristics of the microgrid under packet loss. The random forest regressor is trained using the output of FNN4, and its parameters are optimized using RandomizedSearchCV and GridSearchCV, which helps improve the generalization ability of the LSTM-FNN model. Further explanation: RandomizedSearchCV is a hyperparameter optimization method in the Scikit-learn library. RandomizedSearchCV performs random sampling of the parameter space and is particularly suitable for rapid exploration of high-dimensional or large parameter spaces. GridSearchCV is a method that exhaustively enumerates all possible parameter combinations, 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, among which 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 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 establishing module is used to establish a Gilbert-Elliott model, wherein the Gilbert-Elliott model is used to describe data loss behavior in a communication network;

[0081] Combining module, used to combine the microgrid model and the Gilbert-Elliott model;

[0082] An acquisition module is used to obtain historical measurement data of the microgrid from sensors of the microgrid and a data center;

[0083] A simulation and supplementation module is used to simulate and supplement the historical measurement data of the microgrid using the Gilbert-Elliott model to obtain a data set containing 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] The 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 microgrid sensors 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] This solution proposes a microgrid dynamic state estimation system that accounts for data loss. Through the coordinated efforts of a first establishment module, a second establishment module, a combination module, an acquisition module, a simulation and supplementation module, a preprocessing module, a construction module, a model training module, an input module, and an output module, it estimates the missing state of the microgrid due to data loss. Compared to existing EKF-based grid state estimation methods, the LSTM-FNN model in this solution performs state estimation by learning patterns in the data, reducing reliance on precise mathematical models and improving the model's adaptability and flexibility. Furthermore, because the LSTM-FNN model can handle datasets containing packet loss, it can provide accurate state estimation even with incomplete data, 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 the system state γ k+1 =0 probability; p = Pr(γ k+1 =1|γ k =0) indicates that the system state is γ k =0 transfers to the 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 transition probabilities.

[0094] Preferably, the preprocessing module includes: a data deletion submodule for deleting duplicate values ​​and outliers in a dataset containing historical measurement data and packet loss data; a data filling submodule for filling missing values ​​in a dataset containing historical measurement data and packet loss data; and a data normalization submodule for normalizing the data in the deleted and filled dataset to obtain a preprocessed dataset. In this embodiment, the provision of the data deletion submodule, the data filling submodule, and the data normalization submodule helps 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 dataset to complete the first stage of training. LSTM1 represents long short-term memory network 1, which is used to extract temporal features without data loss; FNN1 represents feedforward neural network 1, which is used to perform deeper information processing on the temporal features extracted by LSTM1; and 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. LSTM2 represents the long short-term memory network 2, which is used to extract temporal features in the case of data loss; FNN3 represents the feedforward neural network 3, which is used to perform deeper information processing on the temporal features extracted by LSTM2; and FNN4 represents the 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 there is packet loss. 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, a model parameter optimization module is further included, wherein the model parameter optimization module 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, among which 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 Indicates the target value that the trained LSTM-FNN model hopes to predict, that is, the actual value.

[0107] In this embodiment, by setting the model parameter optimization module, it is beneficial to improve the prediction performance of the trained LSTM-FNN model.

[0108] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing module, each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they 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 will be understood that the above embodiments are exemplary and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify 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 by: 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 a data center of the microgrid, and simulate and supplement the historical measurement data of the microgrid using the Gilbert-Elliott model to obtain a data set containing historical measurement data and packet loss data; Step S3: preprocessing the data in the data set containing the historical measurement data and the packet loss data to obtain a preprocessed data set; Step S4: Build 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. A method for dynamic state estimation of a microgrid 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 the system state γ k+1 =0 probability; p = Pr(γ k+1 =1|γ k =0) indicates that the system state is γ k =0 transfers to the system state γ k+1 =1; q = Pr(γ k+1 =0|γ k =1) indicates 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 outliers 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 dataset to obtain a preprocessed dataset.

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 the long short-term memory network 1, which is used to extract time features without data loss; FNN1 represents the feedforward neural network 1, which is used to perform deeper information processing on the time features extracted by LSTM1; FNN2 represents the feedforward neural network 2, which is used to extract features from the output of FNN1; Step S52: The parameters of LSTM1, FNN1, and FNN2 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, where LSTM2 represents the long short-term memory network 2, which is used to extract time features in the case of data loss; FNN3 represents the feedforward neural network 3, which is used to perform deeper information processing on the time features extracted by LSTM2; and FNN4 represents the 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 end 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, among which 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 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 according to 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 establishing module is used to establish a Gilbert-Elliott model, wherein the Gilbert-Elliott model is used to describe data loss behavior in a communication network; Combining module, used to combine the microgrid model and the Gilbert-Elliott model; An acquisition module is used to obtain historical measurement data of the microgrid from sensors of the microgrid and a data center; A simulation and supplementation module is used to simulate and supplement the historical measurement data of the microgrid using the Gilbert-Elliott model to obtain a data set containing 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; The 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 microgrid sensors 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. The 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 the system state γ k+1 =0 probability; p = Pr(γ k+1 =1|γ k =0) indicates that the system state is γ k =0 transfers to the system state γ k+1 =1; q = Pr(γ k+1 =0|γ k =1) indicates 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. The microgrid dynamic state estimation system considering data loss according to claim 6, characterized in that: The pre-processing module comprises: The 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 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. The 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 dataset to complete the first stage of training. LSTM1 represents long short-term memory network 1, which is used to extract temporal features without data loss; FNN1 represents feedforward neural network 1, which is used to perform deeper information processing on the temporal features extracted by LSTM1; and 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. LSTM2 represents the long short-term memory network 2, which is used to extract temporal features in the case of data loss; FNN3 represents the feedforward neural network 3, which is used to perform deeper information processing on the temporal features extracted by LSTM2; and FNN4 represents the 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. The microgrid dynamic state estimation system considering data loss according to claim 6, characterized in that: The module 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, among which 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 Indicates the target value that the trained LSTM-FNN model hopes to predict, that is, the actual value.