Microgrid resilience control method integrating chained data repair and rolling optimization

CN122573196APending Publication Date: 2026-08-14HUNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-17
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]现有相关技术缺乏能支撑实时优化调度的高质量修复机制,前述传统信号重构手段与插补算法在处理高维非线性电力数据时,往往难以平衡计算效率与恢复精度

Benefits of technology

[0044]本发明提供的集成链式数据修复与滚动优化的微电网韧性控制方法,通过构建基于残差分析的自适应统计阈值,能够准确辨识遭受虚假数据注入攻击的异常数据,实现高精度的攻击感知。利用基于链式方程多重插补与极端随机树的集成算法对受损数据进行高保真重构,获得的修复数据集与真实运行轨迹高度吻合,为后续调度提供了可靠的数据基础。在预测环节,采用带偏差补偿的超短期修正策略,有效克服了静态预测模型的响应滞后问题,提升了光伏与负荷预测的准确性,确保了调度初值的精准性,避免了因数据失真导致的功率虚高调度风险。在优化调度层面,通过构建以总运行成本最小化为目标的经济调度优化模型,并结合滚动时域优化机制动态求解最优控制序列,能够在持续的信息攻击环境下有效抵消攻击引发的经济损失,提升微电网的运行韧性。该方法能够协助微电网在信息对抗环境中维持稳定的经济性能,保障系统安全、经济运行。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122573196A_ABST
    Figure CN122573196A_ABST
Patent Text Reader

Abstract

This invention relates to a microgrid resilience control method integrating chained data repair and rolling optimization. The method includes: real-time acquisition of raw observation data from key nodes of the microgrid; identification of abnormal data from spoofing attacks based on residual analysis and adaptive statistical thresholds; high-fidelity reconstruction of the abnormal data using the MICE-ETR algorithm to obtain a repaired dataset; construction of source-load prediction trajectories based on the repaired dataset; and ultra-short-term correction with bias compensation based on real-time reconstructed values ​​to generate corrected prediction trajectories; and construction of an economic scheduling optimization model minimizing total operating cost based on the corrected prediction trajectories, combined with a rolling time-domain optimization mechanism to solve for the optimal control sequence. This invention achieves accurate identification and high-fidelity repair of spoofing attacks, effectively overcoming prediction lag and initial value drift problems, and improving the economic resilience and operational stability of microgrids in information warfare environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of microgrid energy management and information security technology, and in particular to a microgrid resilience control method that integrates chained data repair and rolling optimization. Background Technology

[0002] As microgrids evolve into cyber-physical systems (CPS) that heavily rely on sensor data and closed-loop control, their energy management systems (EMS) are exposed to the increasingly severe threat of False Data Injection Attacks (FDIAs) while dealing with the randomness of renewable energy. FDIAs can covertly tamper with observations in communication links and bypass traditional detection methods, misleading dispatch centers into making incorrect decisions, which can lead to frequency instability, voltage over-limits, or severe economic losses.

[0003] Currently, existing defense research focuses on detection and alarm. For high-dimensional nonlinear power data, traditional signal reconstruction methods such as Long Short-Term Memory (LSTM) networks or interpolation algorithms such as Multivariate Imputation by Chained Equations (MICE) and Random Forest are used to carry out related processing work.

[0004] Existing technologies lack high-quality repair mechanisms to support real-time optimized scheduling. The aforementioned traditional signal reconstruction methods and interpolation algorithms often struggle to balance computational efficiency and recovery accuracy when processing high-dimensional nonlinear power data. Furthermore, existing repair models often exhibit static characteristics, which can easily lead to ultra-short-term prediction lags and initial biases. This can cause scheduling models to become either conservative or overly aggressive due to distorted initial values, thus limiting the economic resilience of microgrids in information warfare environments. Summary of the Invention

[0005] In view of this, it is necessary to provide a microgrid resilience control method that integrates chained data repair and rolling optimization to address the aforementioned shortcomings of the prior art.

[0006] To address the aforementioned problems, in a first aspect, embodiments of the present invention provide a microgrid resilience control method integrating chained data repair and rolling optimization, comprising:

[0007] The system collects raw observation data from key nodes of the microgrid in real time, identifies abnormal data based on residual analysis, and uses adaptive statistical thresholds to determine whether the system has been subjected to a fake data injection attack.

[0008] For the identified anomalous data, a high-fidelity data reconstruction was performed using an ensemble algorithm based on chain equation multiple interpolation and extreme random trees to obtain a repaired dataset;

[0009] Based on the repair dataset, a source-load predicted trajectory is constructed. The source-load predicted trajectory is then corrected with bias compensation using real-time reconstructed values ​​from the repair dataset to generate the corrected predicted trajectory.

[0010] Based on the corrected predicted trajectory, an economic scheduling optimization model is constructed with the goal of minimizing total operating cost. Combining the physical operating constraints of the system, a rolling time-domain optimization mechanism is used to solve for the optimal control sequence, and the first control command is sent to the underlying execution mechanism.

[0011] Furthermore, the raw observation data includes photovoltaic power, load demand, and meteorological factors;

[0012] After real-time acquisition of raw observation data from key nodes of the microgrid, the method further includes: resampling the time series of the acquired raw observation data to a uniform resolution.

[0013] Furthermore, before identifying outlier data based on residual analysis, the method also includes:

[0014] Generate theoretical baseline values ​​for system operation: A nonlinear correlation model among multiple variables of the microgrid is established using an integrated algorithm based on chain equation multiple interpolation and extreme random trees. An extreme random tree regressor is used to mine the coupling logic among photovoltaic power, irradiance, and ambient temperature variables. Through multiple iterations until the model converges, a theoretical baseline matrix reflecting the normal physical logic of the system is generated. The theoretical baseline matrix is ​​used for residual calculation for abnormal data identification.

[0015] Furthermore, the step of identifying anomalous data in the original observation data based on residual analysis and using adaptive statistical thresholds to determine whether it has been subjected to a spoofing data injection attack specifically includes:

[0016] Calculate the absolute residual vector between the original observed values ​​and the theoretical baseline values;

[0017] Set an adaptive statistical threshold; the threshold calculation formula is as follows:

[0018] τ=μ R +λ·σ R

[0019] In the formula, τ is the adaptive statistical threshold, and μ R Let σ be the mean of the residual sequence. R λ is the standard deviation of the residual sequence, and λ is the preset weighting coefficient.

[0020] By comparing the residual at any time k with the adaptive statistical threshold, if the residual at time k is greater than the adaptive statistical threshold, it is determined that the data point corresponding to time k has suffered a false data injection attack or a sensor failure has occurred.

[0021] Furthermore, the identified anomalous data is reconstructed using an ensemble algorithm based on chain equation multiple interpolation and extreme random trees to obtain a repaired dataset, including:

[0022] Use a binary mask matrix to mark the locations of abnormal data, mark the mask matrix elements corresponding to the abnormal data locations as invalid, and mark the mask matrix elements corresponding to the normal data locations as valid.

[0023] The masked dataset is input into an integrated algorithm framework based on chain equation multiple interpolation and extreme random trees. The observed data marked as valid states by the mask are used as predictors. The multivariate nonlinear coupling mechanism learned by extreme random trees is used as the regression basis. The damaged data points corresponding to the abnormal data locations are reconstructed multiple times and the average is taken to obtain a high-confidence repair dataset.

[0024] Furthermore, a source-load predicted trajectory is constructed based on the repaired dataset, and an ultra-short-term correction with bias compensation is performed on the source-load predicted trajectory by combining the real-time reconstruction values ​​in the repaired dataset, generating a corrected predicted trajectory, including:

[0025] For the photovoltaic data in the repair dataset, a photovoltaic basic prediction model with irradiance and ambient temperature as input is constructed using multiple linear regression to generate a photovoltaic basic prediction trajectory. For the load data in the repair dataset, statistical clustering is performed according to the date type, dividing it into weekdays and weekends, and the load basic prediction trajectory is generated using historical averages. The photovoltaic basic prediction trajectory and the load basic prediction trajectory are merged to obtain the source-load prediction trajectory.

[0026] The real-time reconstructed value at the current moment in the repair dataset is introduced to perform a linear weighted correction on the basic predicted value in the source-load predicted trajectory; the expression for the linear weighted correction is:

[0027]

[0028] In the formula, The corrected predicted value, ω obs P represents the weighting coefficients for the real-time reconstructed values. obs For real-time reconstructed values, ω pre The weighting coefficients of the base predicted values, These are the base prediction values ​​corresponding to the source-load prediction trajectory;

[0029] Within a preset prediction step size, the weights of the real-time reconstructed value and the base prediction value are adjusted using a linear decay mechanism, so that the corrected prediction trajectory is dominated by the real-time reconstructed value at the near end and smoothly transitions to the base prediction value at the far end, thus obtaining the corrected prediction trajectory.

[0030] Furthermore, based on the corrected predicted trajectory, an economic scheduling optimization model is constructed with the objective of minimizing total operating cost, including:

[0031] Based on the corrected source-load prediction trajectory, an optimization function is established with the objective of minimizing the total operating cost J. The objective function expression is as follows:

[0032] min J=J E +J G +J D +J B

[0033] In the formula, J represents the total operating cost of the microgrid throughout its entire lifecycle. E J represents the energy trading costs between the microgrid and the main grid. G J is the depreciation cost of charging and discharging energy storage systems. D J B This is a nonlinear penalty term based on deviations from the grid connection plan.

[0034] Furthermore, the optimal control sequence is solved using a rolling time-domain optimization mechanism, taking into account the system's physical operating constraints, and the first control command is issued to the underlying actuators, including:

[0035] The system physical operation constraints for solving the objective function are defined, including microgrid power balance constraints, energy storage system state of charge range constraints, energy storage system charging and discharging power limit constraints, and maximum limit of power exchange between microgrid and main grid.

[0036] Within each control cycle, a rolling time-domain optimization mechanism is adopted to solve for the optimal control sequence that satisfies the physical operating constraints in the prediction time domain based on the operating feedback state of the microgrid system in the current control cycle.

[0037] Based on the principle of rolling time-domain optimization, only the first control command in the optimal control sequence is extracted and sent to the underlying actuator of the microgrid.

[0038] Furthermore, after issuing the first control command to the underlying actuator, the method further includes:

[0039] After executing the issued control commands, the system updates the operating variables of the energy storage system's state of charge and the power exchanged between the microgrid and the main grid based on the latest operating status fed back by the microgrid.

[0040] The current control cycle is shifted to the next control cycle, returning to the step of real-time acquisition of raw observation data of each key node of the microgrid, and repeating the closed-loop control process of abnormal data identification, data reconstruction, ultra-short-term correction, optimized scheduling and command issuance.

[0041] In a second aspect, the present invention also provides an electronic device, including a memory and a processor, wherein,

[0042] The memory is used to store programs;

[0043] The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the microgrid resilience control method with integrated chained data repair and rolling optimization as described in the first aspect embodiment of the present invention.

[0044] This invention provides a microgrid resilience control method integrating chained data repair and rolling optimization. By constructing an adaptive statistical threshold based on residual analysis, it can accurately identify abnormal data subjected to spoofed data injection attacks, achieving high-precision attack detection. An integrated algorithm based on chained equation multiple interpolation and extreme random trees is used to reconstruct damaged data with high fidelity. The obtained repaired dataset closely matches the actual operating trajectory, providing a reliable data foundation for subsequent scheduling. In the prediction stage, an ultra-short-term correction strategy with bias compensation is adopted, effectively overcoming the response lag problem of static prediction models, improving the accuracy of photovoltaic and load predictions, ensuring the accuracy of initial scheduling values, and avoiding the risk of inflated power scheduling due to data distortion. At the optimization scheduling level, by constructing an economic scheduling optimization model with the goal of minimizing total operating costs, and combining it with a rolling time-domain optimization mechanism to dynamically solve for the optimal control sequence, it can effectively offset the economic losses caused by attacks in a continuous information attack environment, improving the operational resilience of the microgrid. This method can assist microgrids in maintaining stable economic performance in an information warfare environment, ensuring the safe and economical operation of the system. Attached Figure Description

[0045] Figure 1 Flowchart of the microgrid resilience control method integrating chained data repair and rolling optimization provided by the present invention;

[0046] Figure 2 The schematic diagram of the microgrid resilience control system provided by this invention;

[0047] Figure 3 A schematic diagram of the scheduling strategy for the microgrid resilience control method integrating chained data repair and rolling optimization provided by the present invention;

[0048] Figure 4(a) is a schematic diagram of the anomaly identification mechanism based on residual analysis provided by the present invention;

[0049] Figure 4(b) shows the effect of high-fidelity data reconstruction based on the MICE-ETR algorithm provided by the present invention;

[0050] Figure 5 This is a structural block diagram of the electronic device provided by the present invention. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0052] The naming or numbering of steps in the embodiments of the present invention does not mean that the steps in the method flow must be executed in the time / logical order indicated by the naming or numbering. The execution order of the named or numbered process steps can be changed according to the technical purpose to be achieved, as long as the same or similar technical effect can be achieved.

[0053] This invention provides a microgrid resilience control method that integrates chained data repair and rolling optimization. This method effectively addresses the impact of false data injection attacks on the microgrid energy management system by constructing a closed-loop framework that spans the entire process of sensing, cleaning, prediction, and optimization.

[0054] Before describing the specific implementation methods, the core technical terms involved in this invention will be defined and explained first:

[0055] The theoretical benchmark matrix refers to the benchmark value matrix generated based on the multivariate coupled logic learned from the normal operation data of the microgrid, which reflects the normal physical operation law of the system.

[0056] A binary mask matrix is ​​a binary matrix used to mark the positions of normal and abnormal data in a microgrid observation data sequence.

[0057] High-fidelity data reconstruction refers to the data processing process that restores damaged and abnormal data in the context of fake data injection attacks, based on the inherent coupling logic between multiple variables in a microgrid, so that the repaired data is highly consistent with the actual operating state of the system.

[0058] Predictors are reliable, normal observational data used to fit the changing patterns of damaged data during the data reconstruction process.

[0059] Multivariable nonlinear coupling mechanism refers to the nonlinear correlation between multiple operating variables such as photovoltaic power, irradiance, ambient temperature, and load demand in a microgrid.

[0060] The source-load prediction trajectory refers to the trend curve of photovoltaic power generation and load power consumption within a preset future period, generated based on the repaired microgrid operation data.

[0061] Multiple linear regression is a statistical modeling method that uses the construction of linear mapping relationships between multiple independent variables and the dependent variable to predict photovoltaic power generation.

[0062] Ultra-short-term forecast correction with bias compensation refers to a forecast optimization method that uses real-time high-confidence operational data to weight and correct the basic forecast results, thereby eliminating the response lag and initial bias of the static forecast model.

[0063] The linear decay mechanism refers to a dynamic weight adjustment method that, within a preset prediction time domain, linearly decreases the weight of the real-time reconstructed value as the prediction step size increases, while linearly increases the weight of the basic predicted value as the prediction step size increases.

[0064] Real-time reconstructed values ​​refer to high-confidence observation data of the current microgrid source-load operating status after being repaired by an integrated algorithm of chain equation multiple interpolation and extreme random tree.

[0065] Figure 1 The flowchart of the microgrid resilience control method integrating chained data repair and rolling optimization provided by the present invention is shown. Figure 2 The schematic diagram of the microgrid resilience control system provided by the present invention. Figure 3 This is a schematic diagram of the scheduling strategy for the microgrid resilience control method integrating chained data repair and rolling optimization provided by the present invention. (Refer to...) Figure 1-3 The method includes the following steps:

[0066] Step S1: Collect raw observation data of each key node of the microgrid in real time, identify abnormal data based on residual analysis, and use adaptive statistical thresholds to determine whether the raw observation data has been subjected to a false data injection attack.

[0067] This embodiment provides a microgrid resilience control method integrating chained data repair and rolling optimization, applicable to a microgrid cyber-physical system (CPS) comprising photovoltaic power generation units, energy storage systems, local loads, and connection to the main grid. The microgrid energy management system (EMS) serves as the core control unit, executing each step of this method.

[0068] Reference Figure 3First, system initialization is performed. The control cycle Δt is set to 10 minutes, and the total optimization period T is 144 cycles corresponding to 24 hours. The initial state of charge (SOC) of the energy storage system and the initial exchange power between the microgrid and the main grid are initialized.

[0069] Then proceed to step S1, where raw observation data from each key node of the microgrid is collected in real time. Including photovoltaic power Load demand In this embodiment, corresponding data acquisition devices are deployed at the photovoltaic grid connection point, load access point, and meteorological monitoring node of the microgrid to collect the operational data of the corresponding nodes in real time. The collected raw observation data includes photovoltaic power, load demand, and meteorological factors, among which the meteorological factors include irradiance and ambient temperature, providing a complete input data source for subsequent multivariate coupling modeling.

[0070] Because of the differences in sampling frequencies among heterogeneous devices in a microgrid, after real-time acquisition of raw observation data, the time series data is first preprocessed and resampled to a uniform resolution. (Refer to...) Figure 3 In this embodiment, the time series is preferably resampled to a 10-minute resolution to match the subsequent rolling optimization control cycle. For instantaneous variables such as photovoltaic power and load demand, mean resampling is used; for cumulative variables such as electricity consumption, differential resampling is used to eliminate integral errors. The preprocessed data is denoted as X. raw (t) serves as the input for subsequent anomaly detection.

[0071] Before identifying anomalous data, it is necessary to generate theoretical baseline values ​​for system operation for subsequent residual calculations. Specifically, the Multivariate Imputation by Chained Equations-Extra Trees Regressor (MICE-ETR) algorithm is used to establish a nonlinear correlation model among multiple variables in the microgrid. The MICE-ETR algorithm utilizes an extreme random tree regressor to uncover the coupling logic between variables such as photovoltaic power, irradiance, and ambient temperature. Through multiple iterations until the model converges, a theoretical baseline matrix reflecting the normal physical logic of the system is generated. .

[0072] The specific implementation method for anomaly data identification is as follows: Calculate the original observation value X raw Compared with theoretical benchmark value The absolute residual vector R between them. An adaptive statistical threshold τ is set, and its calculation formula is:

[0073] τ=μ R +λ·σ R

[0074] In the formula, τ is the adaptive statistical threshold, and μ R Let σ be the mean of the residual sequence. R Let τ be the standard deviation of the residual sequence, and λ be a preset weighting coefficient. The adaptive statistical threshold is a threshold dynamically generated based on the statistical characteristics of the observed data residual sequence, used to distinguish between normal observed data and attacked abnormal data. The adaptive statistical threshold τ can be dynamically adjusted according to the statistical characteristics of the residual sequence to adapt to fluctuation levels under different operating conditions.

[0075] By comparing the residual at any time k with the adaptive statistical threshold τ, if the residual at time k is greater than the adaptive statistical threshold, it is determined that the data point corresponding to time k has suffered a false data injection attack or a sensor failure has occurred.

[0076] Reference Figure 3 It should be noted that if the data at the current moment is not identified as abnormal, the original observation data will be retained as reliable data for subsequent prediction and optimization; if it is identified as abnormal, the next step of the data reconstruction process will be initiated.

[0077] This invention achieves standardized processing of heterogeneous data through multi-dimensional data acquisition and time-scale alignment. By integrating algorithms to construct a theoretical benchmark for system operation, it provides a physically sound basis for anomaly detection, effectively improving attack identification accuracy and laying a reliable data foundation for subsequent data repair and precise scheduling, thus ensuring the operational safety of microgrids under attack conditions from the source. Furthermore, by constructing an adaptive detection threshold based on residual analysis, it achieves accurate detection of false data injection attacks, exhibiting high anomaly identification sensitivity and a low false alarm rate.

[0078] Step S2: For the identified abnormal data, a high-fidelity data reconstruction is performed using an ensemble algorithm based on chain equation multiple interpolation and extreme random trees to obtain the repaired dataset.

[0079] Understandably, existing research on defense against spoofed data injection attacks in microgrids focuses primarily on attack detection and alarms, lacking a high-quality data restoration mechanism capable of supporting real-time optimized scheduling. Traditional signal reconstruction and interpolation algorithms struggle to balance computational efficiency and recovery accuracy when processing high-dimensional nonlinear power data in microgrids. After detecting an attack, they cannot effectively restore the damaged data, directly leading to lag and distortion in subsequent source-load predictions, errors in initial values ​​of the scheduling model, and ultimately resulting in system operational risks and economic losses.

[0080] To address the aforementioned issues, this invention, after identifying anomalous attack data, accurately restores damaged observation data through proactive, high-fidelity data reconstruction. This eliminates the impact of false data injection attacks at the data level, providing reliable input data for subsequent source-load forecasting and economic dispatch, and ensuring the accuracy and operational resilience of microgrid dispatch decisions under attack conditions.

[0081] Specifically, a binary mask matrix is ​​used to mark the locations of outlier data. The binary mask matrix is ​​a matrix with the same dimension as the original observed data, used to identify the confidence level of each data point. Specifically, mask matrix elements corresponding to outlier data locations are marked as invalid, typically represented by 0; mask matrix elements corresponding to normal data locations are marked as valid, typically represented by 1. This marking process is as follows: Figure 2 As shown in the "mask" module of the middle defense layer, it clarifies which data points need to be repaired and which data points can be used as the basis for subsequent reconstruction.

[0082] Furthermore, the masked dataset is input into an integrated algorithm framework based on chain equation multiple interpolation and extreme random trees. Observations marked as valid states by the mask are used as predictors, and the multivariate nonlinear coupling mechanism learned by extreme random trees is used as the regression basis. Damaged data points corresponding to outlier locations are reconstructed multiple times, and the average is taken to obtain a high-confidence repair dataset. Specifically, the MICE-ETR algorithm iterates multiple times using chain equations. In each iteration, for a variable to be repaired, data marked as valid states from all other variables are used as input features. An extreme random tree regressor is used to build a regression model to predict and fill in the damaged value of that variable. Since there are complex nonlinear coupling relationships between variables such as photovoltaic power, irradiance, and ambient temperature, extreme random trees, by integrating multiple decision trees and introducing randomness, can effectively capture these nonlinear relationships, thereby achieving high-precision reconstruction of damaged data. This process is iterated multiple times until the model converges. To eliminate possible random errors in a single reconstruction, the same damaged point is reconstructed multiple times, and the average is taken as the final repair value. This process can be referenced... Figure 2 The "MICE-ETR Reconstruction" section and Figure 3 The "masking & MICE-ETR recovery" step outputs the repaired dataset X. recovered This provides a high-confidence data foundation for subsequent prediction and optimization.

[0083] This embodiment achieves high-fidelity reconstruction of damaged data under false data injection attack scenarios. Abnormal data is accurately located through a binary mask matrix, and data restoration is completed by relying on the multivariate coupling logic mined by the integrated algorithm. It can effectively balance reconstruction accuracy and computational efficiency. The generated repair dataset is highly consistent with the actual operating state of the system, solving the problem of scheduling input distortion caused by the attack from the source. It provides reliable data support for subsequent prediction and scheduling, and improves the operational resilience of the microgrid in the information warfare environment.

[0084] Step S3: Construct the source-load predicted trajectory based on the repair dataset, and perform ultra-short-term correction with bias compensation on the source-load predicted trajectory by combining the real-time reconstruction value in the repair dataset to generate the corrected predicted trajectory.

[0085] Step S3 aims to address the issue of lag in the response of existing static prediction models to high-frequency fluctuations in renewable energy. By introducing real-time observations to dynamically correct the basic predictions, initial zero-point drift is eliminated, providing accurate initial prediction values ​​for subsequent optimized scheduling. Step S3 specifically includes the following sub-steps S31~S33:

[0086] S31, Construct a source-load basic prediction model.

[0087] For the photovoltaic (PV) data in the repair dataset, a physical model for PV foundation prediction is constructed using multiple linear regression. Multiple linear regression is a statistical method for establishing linear relationships between multiple independent and dependent variables. In this embodiment, irradiance and ambient temperature are used as independent variables, and PV power is used as the dependent variable. Historical data is used to train the regression coefficients, thereby generating the PV foundation prediction trajectory. For the load data in the repair dataset, statistical clustering is performed based on date type, dividing the data into weekdays and weekends. Historical means are used to generate the load foundation prediction trajectory. The load data exhibits obvious periodicity, with significant differences in electricity consumption patterns between weekdays and weekends. Therefore, establishing two separate load curves can improve prediction accuracy. The PV foundation prediction trajectory and the load foundation prediction trajectory are merged to obtain the source-load prediction trajectory. This process... Figure 2 The system is structured into two modules: "PV Forecast (MLR)" and "Load Forecast (Historical Cluster)," which output the basic PV forecast values ​​respectively. base (t) and the load base forecast value Load base (t), together constitute the basic predicted trajectory.

[0088] S32 introduces real-time reconstructed values ​​for ultra-short-term correction with bias compensation.

[0089] To overcome the lag of static models in dealing with high-frequency fluctuations, a method is introduced to repair the real-time reconstructed value P in the dataset at the current moment. obsThe baseline predicted values ​​in the source-load predicted trajectory are then linearly weighted and corrected. The expression for the linearly weighted correction is:

[0090]

[0091] In the formula, The corrected predicted value, ω obs P represents the weighting coefficients for the real-time reconstructed values. obs For real-time reconstructed values, ω pre The weighting coefficients of the base predicted values, This represents the base prediction value corresponding to the source-load predicted trajectory. The sum of the weighting coefficients of the real-time reconstructed value and the base prediction value is 1. By adjusting the ratio of the two, the deviation correction of the predicted trajectory can be achieved.

[0092] Step S33: Dynamically adjust the weights to achieve a smooth transition of the predicted trajectory.

[0093] Within a preset ultra-short-term prediction step size, a linear decay mechanism is used to adjust the weights of real-time reconstructed values ​​and base prediction values. This linear decay mechanism means that as the prediction time extends forward, the weight of real-time reconstructed values ​​gradually decreases, while the weight of base prediction values ​​gradually increases. Specifically, at the near end of the prediction window, the weight coefficient of real-time reconstructed values ​​is higher, ensuring that the corrected prediction trajectory is dominated by real-time reconstructed values, thus quickly responding to the current actual state of the system. As the prediction window extends further, the weight coefficient of real-time reconstructed values ​​linearly decays to zero, while the weight coefficient of base prediction values ​​linearly increases to one, allowing the prediction trajectory to smoothly transition to be dominated by base prediction values. This mechanism effectively eliminates the initial zero-point drift problem caused by initial value distortion in static models.

[0094] This invention constructs a basic prediction model adapted to the source-load characteristics of microgrids based on a high-fidelity repair dataset. Through an ultra-short-term correction mechanism with bias compensation, it effectively eliminates the response lag and initial zero-point drift problems of static prediction models, improves the accuracy of source-load prediction under attack scenarios, provides reliable input for subsequent economic dispatch optimization, avoids the operational risk of initial value distortion in the prediction stage, and effectively improves the operational stability and economic resilience of microgrids in information warfare environments.

[0095] Step S4: Based on the corrected predicted trajectory, construct an economic scheduling optimization model with the goal of minimizing total operating cost. Combined with the physical operating constraints of the system, use a rolling time-domain optimization mechanism to solve for the optimal control sequence, and issue the first control command to the underlying execution mechanism.

[0096] After completing data repair and accurate forecasting, it is necessary to transform high-quality forecast information into actual economic dispatch decisions. At the same time, it is necessary to deal with the volatility of renewable energy and the uncertainty brought about by attacks, and ensure that dispatch instructions are always close to the latest operating status of the system through dynamic rolling optimization.

[0097] In some embodiments of this application, step S4 specifically includes the following sub-steps S41 to S44:

[0098] Step S41: Based on the corrected source-load prediction trajectory, establish an optimization function with the objective of minimizing the total operating cost J.

[0099] min J=J E +J G +J D +J B

[0100] In the formula, J represents the total operating cost of the microgrid throughout its entire lifecycle. E J represents the energy transaction cost between the microgrid and the main grid, indicating the expenses incurred in purchasing and selling electricity; G The depreciation cost of an energy storage system during charging and discharging reflects the lifespan loss of energy storage equipment during charge-discharge cycles; J D The opportunity cost of microgrid operation represents the potential loss caused by dispatch decisions deviating from the optimal economic operating point; J B This is a nonlinear penalty term based on grid connection plan deviation, used to constrain the fluctuations in power exchanged between the microgrid and the main grid, ensuring the feasibility of the grid connection plan.

[0101] This objective function quantifies various economic indicators, enabling the optimization model to pursue optimal economic performance throughout the entire lifecycle while ensuring the safe operation of the system.

[0102] Step S42: Set the physical operation constraints of the system for solving the objective function.

[0103] The constraints include: microgrid power balance constraints, i.e., the sum of photovoltaic output, energy storage charging and discharging power, and power exchanged with the main grid equals the local load demand; energy storage system state of charge (SOC) range constraints, ensuring that the SOC of the energy storage is maintained between safe upper and lower limits to prevent overcharging and over-discharging; energy storage system charging and discharging power limit constraints, restricting the charging and discharging power of the energy storage to not exceed its rated power; and a maximum limit on the power exchanged between the microgrid and the main grid, ensuring that the power at the grid connection point does not exceed the grid capacity. These constraints together constitute the feasible region of the optimization problem, ensuring that the solution meets the safety boundaries of the microgrid's physical operation.

[0104] Step S43: In each control cycle, a rolling time-domain optimization mechanism is adopted to solve for the optimal control sequence that satisfies the physical operating constraints in the prediction time domain based on the operating feedback state of the microgrid system in the current control cycle.

[0105] Microgrids face various uncertainties in actual operation, including prediction errors, attack interference, and load fluctuations, making static optimization difficult to adapt to real-time changes. This invention decomposes long-term optimization into multiple finite-time-domain rolling optimizations, resolving the problem in each control cycle based on the latest feedback state. This allows for dynamic adaptation to system changes, improving the robustness and adaptability of scheduling decisions. Figure 2 As shown, the optimizer receives the corrected photovoltaic forecast value PV(t) and load forecast value Load(t), and combines them with the energy storage system state x(t) to solve for the optimal control sequence under the conditions of power balance and energy storage constraints. , Figure 3 The step “Calculate the optimal sequence U* using the optimal scheduling” demonstrates this optimization process.

[0106] Step S44: Based on the rolling time-domain optimization principle, only the first control command in the optimal control sequence is extracted and sent to the microgrid's underlying actuator.

[0107] like Figure 2 As shown, the optimal control sequence u(t+1) obtained by the optimizer is passed to the main controller, which selects only the control instruction u(t) for the current control cycle. opt The command is then sent to the microgrid model for execution. Figure 3 The step of "execution strategy using only the first action u(t)" clearly illustrates this mechanism. The technical motivation for this approach is that subsequent control instructions are solved based on the current prediction information. As the system state and prediction information are updated over time, only the current instruction is executed, and re-optimization is performed in the next cycle, thereby maintaining the real-time optimality of the instructions.

[0108] This embodiment constructs an economic scheduling optimization model covering all dimensions of operating costs based on the high-precision corrected source-load prediction trajectory. Combined with system safety operation constraints and rolling time-domain optimization mechanism, it realizes real-time closed-loop optimization of microgrid scheduling strategy under false data injection attack environment.

[0109] In some embodiments of this application, after the first control command is issued to the underlying actuator in step S4, the microgrid resilience control method integrating chained data repair and rolling optimization further includes:

[0110] Step S5: Closed-loop feedback and status window update.

[0111] S51, after executing the issued control command, updates the operating variables of the energy storage system's state of charge and the power exchanged between the microgrid and the main grid based on the latest operating status fed back by the microgrid.

[0112] It is understandable that the actual operation of a microgrid is a continuously changing process, with uncertainties such as prediction errors, attack interference, and load fluctuations always present. A single optimized scheduling cannot guarantee that the instructions for subsequent periods will remain optimal. A closed-loop feedback mechanism must be used to feed the actual operating status of the system back to the control front end in real time, forming a complete closed loop of "sensing-cleaning-prediction-optimization-execution-feedback". This continuously corrects model mismatches, offsets disturbances caused by continuous information attacks, and ensures that the system is in an optimal operating state in the long term.

[0113] like Figure 2 As shown, after the microgrid model executes the control commands issued by the main controller, it feeds back the actual operating status of the system to the energy management system (EMS). Based on this, the EMS updates the state of charge (SOC) of the energy storage system and the exchange power between the microgrid and the main grid. Figure 3 The "state update" step further illustrates this process, updating the energy storage's state of charge (SOC) and the power exchanged between the microgrid and the main grid, and shifting the time variable to the next moment. This update operation ensures that the optimization model always makes subsequent decisions based on the state information that best reflects the actual system conditions, avoiding the failure of scheduling commands due to state lag.

[0114] S52 moves the current control cycle to the next control cycle, returning to the step of real-time acquisition of raw observation data of key nodes in the microgrid, and repeatedly executes the closed-loop control process of abnormal data identification, data reconstruction, ultra-short-term correction, optimized scheduling and command issuance.

[0115] Reference Figure 2 After the updated status information is transmitted to EMS, EMS restarts a new round of data collection and processing. Figure 3 The complete process loop arrows clearly illustrate the closed-loop path from "state update" back to "data acquisition," forming an infinitely looping rolling optimization mechanism. Through this loop, the system can re-solve for the optimal scheduling command based on the latest observation data, the repaired high-confidence dataset, the corrected predicted trajectory, and the real-time system state in each control cycle. This allows for real-time compensation for model prediction errors and attack disturbances, ensuring that the microgrid maintains safe and economical operation in an information warfare environment.

[0116] This invention provides a microgrid resilience control method integrating chained data repair and rolling optimization. By constructing an adaptive statistical threshold based on residual analysis, it can accurately identify abnormal data subjected to spoofed data injection attacks, achieving high-precision attack detection. An integrated algorithm based on chained equation multiple interpolation and extreme random trees is used to reconstruct damaged data with high fidelity. The obtained repaired dataset closely matches the actual operating trajectory, providing a reliable data foundation for subsequent scheduling. In the prediction stage, an ultra-short-term correction strategy with bias compensation is adopted, effectively overcoming the response lag problem of static prediction models, improving the accuracy of photovoltaic and load predictions, ensuring the accuracy of initial scheduling values, and avoiding the risk of inflated power scheduling due to data distortion. At the optimization scheduling level, by constructing an economic scheduling optimization model with the goal of minimizing total operating costs, and combining it with a rolling time-domain optimization mechanism to dynamically solve for the optimal control sequence, it can effectively offset the economic losses caused by attacks in a continuous information attack environment, improving the operational resilience of the microgrid. This method can assist microgrids in maintaining stable economic performance in an information warfare environment, ensuring the safe and economical operation of the system.

[0117] Figure 4(a) is a schematic diagram of the anomaly identification mechanism based on residual analysis provided by the present invention. In Figure 4(a), the 24-hour period is used as the time dimension, and the absolute residual of the anomaly judgment is used as the vertical axis, which fully verifies the effectiveness of the anomaly identification mechanism based on residual analysis in step S1 of the present invention and the rationality of the adaptive statistical threshold. In the figure, the gray solid line is the absolute residual between the photovoltaic original observation value and the theoretical benchmark value calculated in step S1, the red dashed line is the adaptive statistical threshold critical value calculated based on the statistical characteristics of the residual sequence, and the red filled area is the anomaly area identified after threshold judgment. It can be clearly seen from the figure that in the three time periods of 8:00, 10-12:00, and 14-16:00, the absolute residual significantly exceeds the adaptive critical value and is judged as anomaly area. This result accurately corresponds to the time period when the photovoltaic observation data is tampered with by false data injection attacks, with no obvious missed detections or false detections, which verifies the high sensitivity and high accuracy of the anomaly identification method of the present invention, and can provide accurate anomaly location basis for data reconstruction in the subsequent step S2.

[0118] Figure 4(b) shows the effect of high-fidelity data reconstruction based on the MICE-ETR algorithm provided by this invention. In Figure 4(b), the 24-hour period is used as the time dimension, and photovoltaic power is used as the vertical axis, fully demonstrating the anomaly detection effect of step S1 and the high-fidelity data reconstruction performance of the MICE-ETR algorithm in step S2 of this invention. In the figure, the yellow solid line is the original observation data of the attacked photovoltaic power collected on-site in the microgrid, the blue solid line is the MICE baseline reflecting the normal operation law of photovoltaic power, the purple dashed line is the recovered data after reconstruction by the MICE-ETR algorithm of this invention, and the red crosses are the abnormal data points detected by the adaptive threshold in step S1. As can be clearly seen from the figure, the original observation data at 8:00, 10:00-12:00, and 14:00-16:00 showed significant abnormal abrupt changes deviating from the baseline, corresponding to tampering behavior by false data injection attacks. The method of this invention accurately identified all abnormal data points. The recovered data after reconstruction by the algorithm can accurately match the baseline trajectory of normal photovoltaic operation, effectively restoring the true variation law of photovoltaic power, verifying the reliability of the high-fidelity data reconstruction method of this invention, and providing high-confidence input data for subsequent source-load prediction and economic dispatch.

[0119] Figure 5 A structural block diagram of the electronic device provided by the present invention, such as Figure 5 As shown, the present invention also provides an electronic device 500, which can be a mobile terminal, desktop computer, laptop, handheld computer, server, or other computing device. The electronic device 500 includes a processor 501 and a memory 502, wherein the memory 502 stores a microgrid resilience control program 503 integrating chained data repair and rolling optimization.

[0120] In some embodiments, memory 502 may be an internal storage unit of a computer device, such as a hard disk or memory. In other embodiments, memory 502 may be an external storage device of a computer device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, memory 502 may include both internal and external storage units of the computer device. Memory 502 is used to store application software and various types of data installed on the computer device, such as program code installed on the computer device. Memory 502 can also be used to temporarily store data that has been output or will be output. In one embodiment, when the microgrid resilience control program 503 integrating chained data repair and rolling optimization is executed by processor 501, the following steps are implemented:

[0121] The system collects raw observation data from key nodes of the microgrid in real time, identifies abnormal data based on residual analysis, and uses adaptive statistical thresholds to determine whether the system has been subjected to a fake data injection attack.

[0122] For the identified anomalous data, a high-fidelity data reconstruction was performed using an ensemble algorithm based on chain equation multiple interpolation and extreme random trees to obtain a repaired dataset;

[0123] Based on the repair dataset, a source-load predicted trajectory is constructed. The source-load predicted trajectory is then corrected with bias compensation using real-time reconstructed values ​​from the repair dataset to generate the corrected predicted trajectory.

[0124] Based on the corrected predicted trajectory, an economic scheduling optimization model is constructed with the goal of minimizing total operating cost. Combining the physical operating constraints of the system, a rolling time-domain optimization mechanism is used to solve for the optimal control sequence, and the first control command is sent to the underlying execution mechanism.

[0125] In some embodiments, processor 501 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 502 or process data, such as executing a microgrid resilience control program with integrated chained data repair and rolling optimization.

[0126] This embodiment also provides a computer-readable storage medium storing a microgrid resilience control program integrating chained data repair and rolling optimization. When the microgrid resilience control program integrating chained data repair and rolling optimization is executed by a processor, it implements the steps of the microgrid resilience control method integrating chained data repair and rolling optimization.

[0127] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A microgrid resilience control method integrating chained data repair and rolling optimization, characterized in that, include: The system collects raw observation data from key nodes of the microgrid in real time, identifies abnormal data based on residual analysis, and uses adaptive statistical thresholds to determine whether the system has been subjected to a fake data injection attack. For the identified anomalous data, a high-fidelity data reconstruction was performed using an ensemble algorithm based on chain equation multiple interpolation and extreme random trees to obtain a repaired dataset; Based on the repair dataset, a source-load predicted trajectory is constructed. The source-load predicted trajectory is then corrected with bias compensation using real-time reconstructed values ​​from the repair dataset to generate the corrected predicted trajectory. Based on the corrected predicted trajectory, an economic scheduling optimization model is constructed with the goal of minimizing total operating cost. Combining the physical operating constraints of the system, a rolling time-domain optimization mechanism is used to solve for the optimal control sequence, and the first control command is sent to the underlying execution mechanism.

2. The microgrid resilience control method integrating chained data repair and rolling optimization according to claim 1, characterized in that, The raw observation data includes photovoltaic power, load demand, and meteorological factors; After real-time acquisition of raw observation data from key nodes of the microgrid, the method further includes: resampling the time series of the acquired raw observation data to a uniform resolution.

3. The microgrid resilience control method integrating chained data repair and rolling optimization according to claim 1, characterized in that, Prior to identifying outlier data based on residual analysis, the method further includes: Generate theoretical baseline values ​​for system operation: A nonlinear correlation model among multiple variables of the microgrid is established using an integrated algorithm based on chain equation multiple interpolation and extreme random trees. An extreme random tree regressor is used to mine the coupling logic among photovoltaic power, irradiance, and ambient temperature variables. Through multiple iterations until the model converges, a theoretical baseline matrix reflecting the normal physical logic of the system is generated. The theoretical baseline matrix is ​​used for residual calculation for abnormal data identification.

4. The microgrid resilience control method integrating chained data repair and rolling optimization according to claim 3, characterized in that, The step of identifying abnormal data in the original observation data based on residual analysis and using adaptive statistical thresholds to determine whether it has been subjected to a fake data injection attack specifically includes: Calculate the absolute residual vector between the original observed values ​​and the theoretical baseline values; Set an adaptive statistical threshold; the threshold calculation formula is as follows: τ=μ R +l·s R In the formula, τ is the adaptive statistical threshold, and μ R Let σ be the mean of the residual sequence. R λ is the standard deviation of the residual sequence, and λ is the preset weighting coefficient. By comparing the residual at any time k with the adaptive statistical threshold, if the residual at time k is greater than the adaptive statistical threshold, it is determined that the data point corresponding to time k has suffered a false data injection attack or a sensor failure has occurred.

5. The microgrid resilience control method integrating chained data repair and rolling optimization according to claim 1, characterized in that, The identified anomalous data is reconstructed using an ensemble algorithm based on chain equation multiple interpolation and extreme random trees to obtain a repaired dataset, including: Use a binary mask matrix to mark the locations of abnormal data, mark the mask matrix elements corresponding to the abnormal data locations as invalid, and mark the mask matrix elements corresponding to the normal data locations as valid. The masked dataset is input into an integrated algorithm framework based on chain equation multiple interpolation and extreme random trees. The observed data marked as valid states by the mask are used as predictors. The multivariate nonlinear coupling mechanism learned by extreme random trees is used as the regression basis. The damaged data points corresponding to the abnormal data locations are reconstructed multiple times and the average is taken to obtain a high-confidence repair dataset.

6. The microgrid resilience control method integrating chained data repair and rolling optimization according to claim 1, characterized in that, Based on the repaired dataset, a source-load predicted trajectory is constructed. Then, the source-load predicted trajectory is modified with bias compensation using real-time reconstructed values ​​from the repaired dataset to generate the modified predicted trajectory, including: For the photovoltaic data in the repair dataset, a photovoltaic basic prediction model with irradiance and ambient temperature as input is constructed using multiple linear regression to generate a photovoltaic basic prediction trajectory. For the load data in the repair dataset, statistical clustering is performed according to the date type, dividing it into weekdays and weekends, and the load basic prediction trajectory is generated using historical averages. The photovoltaic basic prediction trajectory and the load basic prediction trajectory are merged to obtain the source-load prediction trajectory. The real-time reconstructed value at the current moment in the repair dataset is introduced to perform a linear weighted correction on the basic predicted value in the source-load predicted trajectory; the expression for the linear weighted correction is: In the formula, The corrected predicted value, ω obs P represents the weighting coefficients for the real-time reconstructed values. obs For real-time reconstructed values, ω pre The weighting coefficients of the base predicted values, These are the base prediction values ​​corresponding to the source-load prediction trajectory; Within a preset prediction step size, the weights of the real-time reconstructed value and the base prediction value are adjusted using a linear decay mechanism, so that the corrected prediction trajectory is dominated by the real-time reconstructed value at the near end and smoothly transitions to the base prediction value at the far end, thus obtaining the corrected prediction trajectory.

7. The microgrid resilience control method integrating chained data repair and rolling optimization according to claim 1, characterized in that, Based on the corrected predicted trajectory, an economic scheduling optimization model is constructed with the objective of minimizing total operating cost, including: Based on the corrected source-load prediction trajectory, an optimization function is established with the objective of minimizing the total operating cost J. The objective function expression is as follows: min J=J E +J G +J D +J B In the formula, J represents the total operating cost of the microgrid throughout its entire lifecycle. E J represents the energy trading costs between the microgrid and the main grid. G J is the depreciation cost of charging and discharging energy storage systems. D J B This is a nonlinear penalty term based on deviations from the grid connection plan.

8. The microgrid resilience control method integrating chained data repair and rolling optimization according to claim 7, characterized in that, The optimal control sequence is solved using a rolling time-domain optimization mechanism, taking into account the physical operating constraints of the system, and the first control command is issued to the underlying actuators, including: The system physical operation constraints for solving the objective function are defined, including microgrid power balance constraints, energy storage system state of charge range constraints, energy storage system charging and discharging power limit constraints, and maximum limit of power exchange between microgrid and main grid. Within each control cycle, a rolling time-domain optimization mechanism is adopted to solve for the optimal control sequence that satisfies the physical operating constraints in the prediction time domain based on the operating feedback state of the microgrid system in the current control cycle. Based on the principle of rolling time-domain optimization, only the first control command in the optimal control sequence is extracted and sent to the underlying actuator of the microgrid.

9. The microgrid resilience control method integrating chained data repair and rolling optimization according to claim 1, characterized in that, After issuing the first control command to the underlying actuator, the method further includes: After executing the issued control commands, the system updates the operating variables of the energy storage system's state of charge and the power exchanged between the microgrid and the main grid based on the latest operating status fed back by the microgrid. The current control cycle is shifted to the next control cycle, returning to the step of real-time acquisition of raw observation data of each key node of the microgrid, and repeating the closed-loop control process of abnormal data identification, data reconstruction, ultra-short-term correction, optimized scheduling and command issuance.

10. An electronic device, Its features are, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the microgrid resilience control method with integrated chained data repair and rolling optimization as described in any one of claims 1 to 9.