Micro-grid digital sand table system generated based on real statistical law scene data
By generating microgrid scenarios based on Markov chain models and multi-source coupling methods, the problems of strong scenario dependence, insufficient coverage, and lack of fidelity in existing technologies are solved. High-fidelity simulation training and policy transfer are achieved, improving the generalization ability and robustness of microgrid control strategies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZENERGY TECH CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-06-09
AI Technical Summary
Existing microgrid simulation systems rely on specific historical data and cannot generate new scenarios that conform to real-world statistical patterns. They suffer from insufficient scenario coverage, lack of simulation fidelity, and a lack of large-scale training data support, resulting in poor generalization ability and insufficient robustness of control strategies in extreme scenarios.
The system automatically generates microgrid operation scenarios using Markov chain models and multi-source coupling methods. It ensures consistency between the simulation and the real system through idempotent characteristic calibration and provides scenario data generation based on real statistical laws, including historical meteorological databases, weather time series generators, load time series generators, and electricity price time series generators. Combined with a multi-source coupling engine and a high-speed control interface, it achieves high-fidelity simulation training.
It generates long-term continuous scene data that conforms to the laws of the real world, improves the generalization ability and robustness of the control strategy, ensures the high-fidelity deployment of the simulation strategy in the real system, and reduces performance degradation.
Smart Images

Figure CN122174685A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of microgrid simulation and optimization control technology, and in particular relates to a microgrid digital sand table system based on real statistical regularity scenario data. Background Technology
[0002] Microgrids, as small-scale power generation and distribution systems integrating distributed generation, energy storage devices, controllable loads, and monitoring and protection devices, rely heavily on advanced control strategies for efficient and economical operation. In recent years, data-driven and artificial intelligence algorithms have received widespread attention in the field of microgrid energy management. However, the effective training and validation of these algorithms heavily depend on massive amounts of high-fidelity and comprehensive simulation environment data. Currently, the technologies and tools providing simulation support for microgrids have significant limitations, mainly in the following aspects:
[0003] Strong dependence on scenario data: The simulation operation relies heavily on specific historical data sequences input by the user (such as measured radiation and load data for one year), and cannot automatically create new scenarios that conform to real statistical laws but have not occurred in history, resulting in a single training data for the algorithm.
[0004] Insufficient scenario coverage: Relying on limited historical data, it is impossible to effectively generate boundary scenarios (such as extremely low photovoltaic output accompanied by extremely high load) or extreme scenarios (such as continuous rainy days and peak electricity prices) that affect system stability. This makes the control strategy trained based on such data have poor generalization ability and insufficient robustness when encountering unseen scenarios.
[0005] The simulation lacks fidelity and idempotency: Traditional simulation models focus on physical principles but lack a strict, quantitative consistency calibration mechanism with specific real physical systems; simulation models have significant deviations from real systems in key output indicators such as power, energy, and cost, resulting in strategies that perform well in simulations but show significant performance degradation when deployed to real systems.
[0006] Lack of large-scale training data support: Data-driven artificial intelligence algorithms typically require millions to tens of millions of interaction data steps to converge. Existing tools struggle to efficiently and flexibly generate continuous time-series scenes spanning several years or even decades, and their interfaces with algorithm engines are inefficient, becoming a bottleneck in the training process.
[0007] Therefore, there is an urgent need for a microgrid digital sand table system that can automatically generate data that conforms to real statistical laws, covers complete scene combinations, has idempotent fidelity, and supports large-scale algorithm training. Summary of the Invention
[0008] To address the technical problems of the prior art, this invention provides a microgrid digital sand table system based on real statistical regularity scenario data. It applies a Markov chain model and uses a multi-source coupling scenario automatic generation method based on historical meteorological statistical regularities to achieve automatic generation, statistical realism, and comprehensive coverage of microgrid operation scenarios. Through strict idempotency characteristic calibration, it ensures that the control strategies trained in the digital sand table can be directly transferred and applied to real physical microgrid systems, reducing performance loss.
[0009] This application provides a microgrid digital sand table system based on real statistical regularity scenario data, including: Manual configuration layer: used to receive microgrid static parameters configured by users. The static parameters include at least the power plant address, photovoltaic installed capacity, wind power installed capacity, energy storage capacity and power capacity, maximum load and load type, and electricity price type and price range. Automatic scene generation layer: connected to the manual configuration layer, including historical meteorological database, weather time series generator, load time series generator, electricity price time series generator, scene batch generator and multi-source coupling engine, used to automatically generate dynamic time series data to drive simulation based on historical statistical patterns; The historical meteorological database is used to store gridded historical meteorological time-series data; The weather time series generator is used to match historical meteorological time series data based on the power station address, generate weather type sequences using a Markov chain model, and combine weather type conditional probability distribution to sample and generate weather time series that include at least irradiance, temperature and wind speed. The load timing generator is used to generate electrical load timing by superimposing random disturbances on a typical daily load curve, and automatically decompose it into multiple electrical load types, including at least rigid loads and controllable loads. The electricity price time series generator is used to generate electricity price time series based on electricity price policy parameters, and supports the injection of predefined abnormal electricity price events; The scene batch generator is used to generate independent time-series scenes, including normal operation scenes, boundary scenes and rare scenes of microgrids, and supports pre-generation mode and streaming generation mode. The multi-source coupling engine is used to model and execute the correlation constraints and joint sampling between the weather time series, the power load time series and the electricity price time series, and to control the proportion of generated scenarios through a hierarchical sampling strategy. Physical simulation layer: connected to the scene automatic generation layer, including photovoltaic power output analysis model, wind power output analysis model, energy storage system model and load response model, used to calculate and output the real-time power, energy status and operating cost of the microgrid based on the time series data output by the scene generation layer and external control commands; Idempotent mapping calibration module: connected to the physical simulation layer, used to collect the operating data of the real physical microgrid, compare it with the output of the physical simulation layer, identify and correct the model parameters of the physical simulation layer, so that the digital sandbox meets the idempotent characteristics that the relative deviation of instantaneous power, the relative deviation of cumulative energy and the relative deviation of cumulative cost within a time period are all within a preset threshold. High-speed control interface: Connected to the physical simulation layer, used for interacting with external control algorithms to exchange status information and control commands.
[0010] Furthermore, the manual configuration layer provides a graphical interface to receive user-defined microgrid static topology and parameters, including at least the geographical coordinates of the power station, the rated capacity of the photovoltaic inverter, the rated power of the wind turbine, the rated energy capacity and maximum charging and discharging power of the energy storage system, the type and peak power of the electrical load, and the type and parameters of the electricity price contract at the grid connection point.
[0011] Furthermore, the scene automatic generation layer dynamically synthesizes entirely new time-series scenes of arbitrary length based on the statistical patterns and probability models of historical data. This layer includes: Historical meteorological database: Stores hourly meteorological data for many years in a geographic grid format, including at least total irradiance, direct radiation, diffuse radiation, ambient temperature, wind speed, wind direction, and cloud cover.
[0012] Weather time series generator: It adopts a two-stage generation method. The first stage is based on statistical data in historical meteorological database to construct a weather state Markov chain model to generate a time series sequence of weather types. In the second stage, for the weather type at each moment, specific meteorological parameter values are sampled from its corresponding conditional probability distribution and smoothed by a first-order autoregressive model to ensure the continuity of the time series.
[0013] Load sequence generator: It has a built-in library of typical daily load curve templates, indexed by industry type, weekday, holiday identifier and season; during the time sequence generation process, it first selects the base curve according to the date type, then superimposes random disturbances to simulate uncertainty, and dynamically adjusts the proportion of air conditioning and heating loads according to the temperature-load coupling relationship; this module can also automatically decompose the total load into rigid load, movable load, interruptible load and reduceable load, and assign scheduling attributes such as time window, power range and priority to the latter three.
[0014] Electricity Price Time Series Generator: Generates deterministic time-of-use electricity prices based on configuration, and generates volatile spot electricity price curves based on random processes, injecting preset extreme electricity price events to test the strategy's responsiveness.
[0015] Scene batch generator: Supports pre-generation mode, which generates data for several years at once for backup, and streaming generation mode, which generates data for the next moment in real time as needed; it generates independent scene sequences in parallel, including regular microgrid operation scenarios, boundary scenarios and rare scenarios, for cross-validation.
[0016] Multi-source coupling engine: responsible for coordinating the inherent relationship between weather time series, load time series, and electricity price time series, including temperature-load coupling sub-model, which is used to dynamically adjust the proportion of air conditioning and heating load in the total load based on the generated ambient temperature data; and weather-electricity price coupling sub-model, which is used to dynamically adjust the fluctuation range of spot electricity price series based on the generated photovoltaic output forecast data; The engine employs a hierarchical sampling strategy, which actively controls the proportion of various scenarios when generating microgrid operation scenarios, ensuring that the generated scenario set includes not only high-probability regular scenarios, but also low-probability but critical boundary scenarios and rare scenarios that are essential to system operation.
[0017] Furthermore, the physical simulation layer includes a series of simplified but sufficient analytical models to describe the system dynamics, including: Photovoltaic power output analysis model: Real-time power output is calculated based on irradiance, temperature and module parameters; Wind power output analysis model: Real-time output calculated based on wind speed-power curve; Energy storage system model: includes dynamic update equations for state of charge (SOC), upper and lower limits of SOC and power constraints, and integrates a simplified cyclic aging model to simulate capacity decay; Load response model: Adjusts the switching status and power level of controllable loads according to control commands.
[0018] Furthermore, the idempotency mapping calibration module is key to achieving consistency between the microgrid operation simulation scenario and the real physical world. It defines three quantifiable idempotency indices, including: Instantaneous power relative deviation index: for any given time... The deviation between the total power of the microgrid calculated by the digital sand table simulation and the measured total power of the actual physical system, relative to the rated power of the system, satisfies the following:
[0019] in, express The total system power calculated by the digital sandbox simulation of the microgrid at any given time. express Real-time measured total power of the actual physical system. Indicates the system's rated power; This indicates the set threshold for relative deviation of instantaneous power, and This means that at any given time, the power error in the simulation must not exceed 2% of the system's rated power.
[0020] Cumulative energy relative deviation index over a time period: within any specified time window Within, the cumulative energy of the system calculated by digital sand table simulation. Accumulated energy measured with real physical systems The deviation between them, relative to the system's rated energy during that time period. The relative value of satisfies:
[0021] in, Calculate the rated power With time length The product of is obtained, This represents the threshold value for the relative deviation of accumulated energy within a set time period, and .
[0022] Cumulative cost relative deviation index: within any specified time window The total operating cost of the system calculated using digital sand table simulation. Total operating cost compared to actual physical systems The deviation between them, relative to the actual measurement cost The relative value of satisfies:
[0023] in, This represents the set threshold for relative deviation of cumulative costs, and .
[0024] The calibration module collects actual operating data of the physical system within a set time period and compares it with the output of the digital sand table under the same input. It then uses a parameter identification algorithm to reverse-correct key model parameters in the physical simulation layer, including at least photovoltaic conversion efficiency, energy storage coulomb efficiency, and load baseline, so that the output of the digital sand table continuously meets the above-mentioned idempotency threshold requirements.
[0025] Furthermore, the high-speed control interface serves as a bridge connecting the microgrid digital sandbox with external control algorithms. It employs the gRPC high-performance communication framework and the efficient serialization protocol Protocol Buffers to exchange information with the algorithm at millisecond-level latency. The state vector transmitted by the interface not only includes the current system state but also short-term prediction information provided by the scenario generator, such as predicted irradiance, load, and electricity price for the next few hours, for use by the model predictive control algorithm.
[0026] This application discloses the following technical effects: This application provides a microgrid digital sand table system based on real statistical regularity scenario data, which has the following significant advantages compared with the prior art: This system generates weather time-series data based on historical meteorological statistical patterns, significantly reducing the deviation of key statistical indicators from real meteorological data, ensuring that the scene conforms to real-world patterns, and generating continuous and seamless time-series data for periods ranging from 1 to 10 years or even longer through multiple generators. This provides nearly unlimited high-quality training samples for advanced algorithms that rely on big data training, solving the problems of scarce and monotonous training data.
[0027] Through a multi-source coupling engine and an active hierarchical sampling strategy, this system can proactively and proportionally generate a complete scene spectrum covering regular, boundary, and rare scenes. This solves the problem of scene missing caused by traditional simulations relying on limited historical data, enabling the trained control strategy to cope with various extreme and rare situations, and greatly improving the generalization ability and robustness of the strategy.
[0028] At the level of simulation model fidelity, the system clearly defines the three core idempotent indicators and their thresholds for power, energy, and cost, transforming the fidelity of the simulation system from a vague concept into a measurable and verifiable objective standard. Furthermore, the system identifies and corrects the simulation model parameters through an idempotent mapping calibration module, ensuring that the digital sandbox is highly consistent with the target physical system in terms of key output indicators. This allows the control strategies trained and optimized in the sandbox to be deployed directly and with high fidelity to the real physical microgrid with extremely low performance degradation. Attached Figure Description
[0029] Figure 1 A schematic diagram of the structure of a microgrid digital sand table system generated based on real statistical regularity scenario data, provided in an embodiment of this application. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description of this application will be provided in conjunction with the accompanying drawings. The described embodiments should not be considered as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0031] Example 1: This application provides a microgrid digital sand table system generated based on real statistical regularity scenario data, such as... Figure 1 As shown, the system includes: Manual configuration layer: used to receive microgrid static parameters configured by users. The static parameters include at least the power plant address, photovoltaic installed capacity, wind power installed capacity, energy storage capacity and power capacity, maximum load and load type, and electricity price type and price range.
[0032] Automatic Scene Generation Layer: Connected to the manually configured layer, this layer includes a historical meteorological database, a weather time series generator, a load time series generator, an electricity price time series generator, a scene batch generator, and a multi-source coupling engine. It is used to automatically generate dynamic time series data to drive simulation based on historical statistical patterns, specifically including: Historical meteorological database: Stores hourly meteorological data for many years in a geographic grid format, including at least total irradiance, direct radiation, diffuse radiation, ambient temperature, wind speed, wind direction, and cloud cover.
[0033] Weather time series generator: It adopts a two-stage generation method. The first stage is based on statistical data in historical meteorological database to construct a weather state Markov chain model to generate a time series sequence of weather types. In the second stage, for the weather type at each moment, specific meteorological parameter values are sampled from its corresponding conditional probability distribution and smoothed by a first-order autoregressive model to ensure the continuity of the time series.
[0034] Load sequence generator: It has a built-in library of typical daily load curve templates, indexed by industry type, weekday, holiday identifier and season; during the time sequence generation process, it first selects the base curve according to the date type, then superimposes random disturbances to simulate uncertainty, and dynamically adjusts the proportion of air conditioning and heating loads according to the temperature-load coupling relationship; this module can also automatically decompose the total load into rigid load, movable load, interruptible load and reduceable load, and assign scheduling attributes such as time window, power range and priority to the latter three.
[0035] Electricity Price Time Series Generator: Generates deterministic time-of-use electricity prices based on configuration, and generates volatile spot electricity price curves based on random processes, injecting preset extreme electricity price events to test the strategy's responsiveness.
[0036] Scene batch generator: Supports pre-generation mode, which generates data for several years at once for backup, and streaming generation mode, which generates data for the next moment in real time as needed; it generates independent scene sequences in parallel, including regular microgrid operation scenarios, boundary scenarios and rare scenarios, for cross-validation.
[0037] Multi-source coupling engine: responsible for coordinating the inherent relationship between weather time series, load time series, and electricity price time series, including temperature-load coupling sub-model, which is used to dynamically adjust the proportion of air conditioning and heating load in the total load based on the generated ambient temperature data; and weather-electricity price coupling sub-model, which is used to dynamically adjust the fluctuation range of spot electricity price series based on the generated photovoltaic output forecast data; The engine employs a hierarchical sampling strategy, which actively controls the proportion of various scenarios when generating microgrid operation scenarios, ensuring that the generated scenario set includes not only high-probability regular scenarios, but also low-probability but critical boundary scenarios and rare scenarios that are essential to system operation.
[0038] Physical simulation layer: Connected to the scene automatic generation layer, it includes photovoltaic power output analytical models, wind power output analytical models, energy storage system models, and load response models. It is used to calculate and output the real-time power, energy state, and operating costs of the microgrid based on the time-series data output by the scene generation layer and external control commands. This includes a series of simplified but sufficient analytical models to describe the system dynamics. Photovoltaic power output analysis model: Real-time power output is calculated based on irradiance, temperature and module parameters; Wind power output analysis model: Real-time output calculated based on wind speed-power curve; Energy storage system model: includes dynamic update equations for state of charge (SOC), upper and lower limits of SOC and power constraints, and integrates a simplified cyclic aging model to simulate capacity decay; Load response model: Adjusts the switching status and power level of controllable loads according to control commands.
[0039] Idempotent mapping calibration module: connected to the physical simulation layer, used to collect the operating data of the real physical microgrid, compare it with the output of the physical simulation layer, identify and correct the model parameters of the physical simulation layer, so that the digital sand table meets the idempotent characteristics that the relative deviation of instantaneous power, the relative deviation of cumulative energy and the relative deviation of cumulative cost within a time period are all within a preset threshold.
[0040] High-speed control interface: Connected to the physical simulation layer, it is used to interact with external control algorithms for state information and control commands. It employs the gRPC high-performance communication framework and the efficient serialization protocol Protocol Buffers to exchange information with the algorithm at millisecond-level latency. The state vector transmitted by the interface not only includes the current system state but also short-term prediction information provided by the scene generator, such as predicted irradiance, load, and electricity price for the next few hours, for use by the model predictive control algorithm.
[0041] Example 2: This embodiment of the invention provides an example of verifying the scene generation capability of the system described in Example 1. The verification process is as follows: This embodiment verifies the following capabilities of the digital sandbox system described in Embodiment 1: automatically generating comprehensive operational scenarios that conform to real-world characteristics based on real statistical patterns; the verification process consists of three stages: system configuration, scenario generation, and multi-dimensional comparative analysis. Phase 1: Verification of environment setup and system configuration: A region with typical climate characteristics and electricity load patterns was selected as the verification object. In this embodiment, Nanjing City, Jiangsu Province, China was selected, and the geographical coordinates (latitude and longitude) of Nanjing City were obtained. By inputting the following static parameters of the simulated microgrid through the manual configuration layer of the digital sand table system, a basic model is constructed: Power supply configuration: Photovoltaic installed capacity is 100 kWp; Energy storage configuration: Lithium battery energy storage system with a rated energy capacity of 500 kWh and a rated power of 250 kW; Load configuration: Maximum load is 200 kW, and the type is set as a mixed load including residential and commercial. Electricity pricing policy: Configured as a typical grid time-of-use pricing policy; Phase Two, Scene Generation Process Execution: In this embodiment, the digital sand table system automatically matches and calls historical meteorological statistics data of the region for many years from the historical meteorological database according to the configured geographical location of Nanjing City, providing a probability distribution basis for subsequent statistical model training and conditional sampling. The generation mode in the scene batch generator is set to pre-generation mode, and the generation time is 5 consecutive years, totaling 43,800 hours. The weather time series generator first uses the weather type transition probability matrix learned from historical meteorological data in Nanjing to run a Markov chain model to generate a weather type state sequence, including the following detailed steps: First, the continuous weather phenomena are discretized and classified, defining four weather states: sunny, cloudy, overcast, and rainy. Hourly data from Nanjing City over many years are called from the historical meteorological database. For each hourly data, the weather state is automatically determined and labeled according to the predefined criteria, converting the original meteorological parameter time series data into a series of discrete weather state sequences. Secondly, construct the weather type transition probability matrix. , of which elements Indicates weather conditions Shift to weather status The probability, the construction process includes: Iterate through the historical weather state sequence obtained in the previous step, for each pair of adjacent times in the sequence Record a time from Time's up State transitions at any given time, and count the number of times each such transition occurs.
[0042] For each current weather condition Sum the frequencies of all outward transfers to obtain the result from the weather conditions. Total number of departures Calculate the transition probability:
[0043] in, From the weather conditions Shift to weather status Statistical frequency, matrix The sum of each row should equal 1; Finally, a new weather state sequence of 43,800 hours in length was generated, including: Calculate the transition probability matrix The stationary distribution of each weather state is obtained from the main left eigenvector (corresponding to eigenvalue 1). A weather state is randomly sampled based on this distribution as the starting point of the sequence. ; Iteratively generating subsequent states, for To 43799: Let the current state be View the transition probability matrix Corresponding row in the middle This row vector defines the probability distribution of all possible states at the next time step; based on this probability distribution, a random sampling is performed, and the result is the state at the next time step. After the cycle ends, a discrete weather state sequence for the next 43,800 hours, conforming to historical statistical transfer patterns, is obtained.
[0044] For each hour in the future weather state sequence output by the Markov chain model, the weather sequence generator samples irradiance from a truncated normal distribution, temperature from a normal distribution, and wind speed from a Weibull distribution according to the weather type. The sampled raw sequence is then processed to eliminate unreasonable abrupt changes, ensuring that the irradiance, temperature, and wind speed parameters have reasonable continuity between adjacent time points. Finally, it outputs smooth 5-year hourly meteorological time series data that conforms to the statistical regularity of Nanjing.
[0045] The load time series generator dynamically matches the corresponding basic load curve template from the typical daily load curve template library based on the configured mixed load type and the generated 5-year date information (weekdays, weekends, seasons). On this basis, a random disturbance conforming to a specific distribution is superimposed to simulate the randomness and uncertainty of actual electricity consumption, thereby synthesizing a 5-year total load demand time series curve. Based on preset rules, the load timing generator automatically decomposes the total load at each moment into rigid loads, shiftable loads, interruptible loads, and reduceable loads. It also marks the dispatchable attributes of the latter three types of controllable loads, including dispatchable time windows, power adjustment ranges, and priorities, to provide input for subsequent demand response control.
[0046] The electricity price time series generator generates a deterministic 5-year electricity price time series curve based on the time-of-use electricity pricing policy set by the manual configuration layer. It generates hourly electricity price data according to the peak, flat, and valley periods and their corresponding prices. At the same time, the electricity price time series generator injects predefined extreme electricity price events at any time point to test the response of the control strategy under drastic price fluctuations.
[0047] The multi-source coupling engine runs the internally established coupling model to coordinate the aforementioned initially generated independent weather, load, and electricity price time series. Through the temperature-load coupling model, it dynamically adjusts the proportion of air conditioning or heating in the load curve based on the generated ambient temperature data. Through the weather-electricity price coupling model, it appropriately suppresses peak electricity prices based on high photovoltaic power generation forecasts. The engine's hierarchical sampling module actively intervenes in the random sampling process to ensure that the ratio of regular scenes, boundary scenes, and rare scenes in the final generated scene set meets the target ratio of 7:2:1.
[0048] Finally, in the pre-generation mode of this embodiment, the scene batch generator coordinates the workflow of all the above modules, manages memory and data input and output, and finally packages the meteorological data output by the weather time series generator, the decomposed load data output by the load time series generator, and the electricity price data output by the electricity price time series generator into a complete, time-synchronized 5-year coupled scene data package, and outputs and stores it for subsequent physical simulation layer calls and realism verification analysis.
[0049] Phase Three: Multi-dimensional Comparative Analysis Authenticity Verification: Taking meteorological data as an example, the measured historical meteorological data of Nanjing City over the past 10 years were used as the statistical comparison benchmark to calculate the values of the meteorological time-series data generated by the digital sand table system and the historical data on the following key climate and macroeconomic statistical indicators: Annual average total irradiance: reflects the abundance of solar energy resources in a region; Average annual ambient temperature: reflects the basic climate characteristics of a region; Percentage of sunny days: reflects the statistical patterns in the distribution of weather types; Table 1. Comparison of key climate and macroeconomic statistical indicators between meteorological time-series data and historical data generated by the digital sand table system. Statistical indicators Historical data (benchmark value) Generate data (5-year series) relative deviation Annual average total irradiance 1285 kWh / m² / year 1271 kWh / m² / year -1.1% Average ambient temperature 16.2℃ 16.0℃ -1.2% Percentage of sunny days 38.5% 37.8% -1.8% The comparison results are shown in Table 1. The deviation of all key statistical indicators is less than 2%, which proves that the scene data generated by the system described in Example 1 highly follows the historical patterns of the real world in terms of core statistical characteristics and meets the requirements of authenticity.
[0050] Scene coverage verification: Utilizing the batch generation function of the scene batch generator and enabling the hierarchical sampling strategy in the multi-source coupling engine, 1000 independent annual microgrid operation scenarios with different random seeds are generated at once. Based on whether extreme values or rare combinations of weather, load, and electricity price characteristics appear in each scenario, all generated scenarios are automatically classified as follows: Typical scenarios: the most common and most probable operating states; Boundary scenario: Operating under extreme conditions of maximum temperature, minimum radiation, and peak load; Rare scenario: An extreme combination of adverse factors occurs, such as consecutive rainy days coinciding with peak electricity prices.
[0051] The percentages of the above-mentioned scenarios among the 1000 scenarios generated were statistically analyzed. Among them, regular scenarios accounted for 71.2%, boundary scenarios accounted for 19.1%, and rare scenarios accounted for 9.7%. This distribution result is consistent with the preset proportion target of stratified sampling. This indicates that the system can not only generate ordinary scenarios, but also actively and proportionally generate boundary and rare scenarios that pose challenges to the system's stability and economy, thereby ensuring the completeness of the training data and laying a data foundation for the subsequent training of control strategies with strong generalization capabilities.
[0052] Example 3: This embodiment of the invention uses the physical system of Example 2 to verify the idempotency property. The verification process is as follows: This embodiment rigorously verifies the core fidelity characteristic of the digital sand table system—the idempotent characteristic—and demonstrates the lossless transfer process of control strategies from the sand table to the physical system. The verification process consists of data acquisition, deviation calculation, model calibration, and strategy transfer.
[0053] The real microgrid physical system configured in Example 2 is used as the benchmark, namely a grid-connected microgrid experimental platform located in Nanjing, equipped with 100kWp photovoltaic, 500kWh / 250kW energy storage, and a maximum load of 200kW. In the digital sandbox, the static parameters of the physical system are completely reproduced by the artificial configuration layer to establish its digital mapping. At this time, the physical simulation layer model parameters of the sandbox are the default values or uncalibrated initial values, and its output has an unknown deviation from the real output of the physical system.
[0054] The physical microgrid was operated continuously for 7 days (168 hours) under typical operating conditions, during which time the data required for calculating the following idempotent indices were collected simultaneously: Instantaneous power relative deviation index: for any given time... The deviation between the total power of the microgrid calculated by the digital sand table simulation and the measured total power of the actual physical system, relative to the rated power of the system, satisfies the following:
[0055] in, express The total system power calculated by the digital sandbox simulation of the microgrid at any given time. express Real-time measured total power of the actual physical system. Indicates the system's rated power; This indicates the set threshold for relative deviation of instantaneous power, and This means that at any given time, the power error in the simulation must not exceed 2% of the system's rated power.
[0056] Cumulative energy relative deviation index over a time period: within any specified time window Within, the cumulative energy of the system calculated by digital sand table simulation. Accumulated energy measured with real physical systems The deviation between them, relative to the system's rated energy during that time period. The relative value of satisfies:
[0057] in, Calculate the rated power With time length The product of is obtained, This represents the threshold value for the relative deviation of accumulated energy within a set time period, and .
[0058] Cumulative cost relative deviation index: within any specified time window The total operating cost of the system calculated using digital sand table simulation. Total operating cost compared to actual physical systems The deviation between them, relative to the actual measurement cost The relative value of satisfies:
[0059] in, This represents the set threshold for relative deviation of cumulative costs, and .
[0060] Based on the above indicators, real physical system measured data will be collected simultaneously. , and , and the simulation calculation data of the digital sand table system , and Perform point-by-point, time-window-by-time comparisons: For each synchronous sampling point within a 168-hour acquisition period, the relative deviation of instantaneous power is calculated, and the maximum value of this deviation among all sampling points, 1.3%, is taken as the threshold. The verification value is less than the preset threshold for relative power deviation, and the power deviation index meets the standard. The entire 168-hour data collection period was divided into 7 periods of 24 hours each. Within a given time window, for each window, the cumulative energy relative deviation is calculated, and the maximum value of this relative deviation across all windows, 0.7%, is taken as the threshold. The verification value is less than the preset threshold for the relative deviation of cumulative energy, and the energy deviation index meets the standard. Using the same time window as the energy deviation, for each window, calculate the cumulative cost relative deviation, and take the maximum value of this relative deviation across all windows, 2.1%, as the threshold. The verification value is less than the preset threshold for the relative deviation of cumulative costs, and the cost deviation indicator meets the standard.
[0061] If any of the above indicators exceeds the limit, the idempotent mapping calibration module is activated to establish an error function between the sandbox simulation output and the physical system output. This function is correlated with a set of adjustable parameters of the physical simulation layer. (Related to photovoltaic inverter efficiency, energy storage charge / discharge efficiency, and load baseline coefficient); using optimization algorithms such as the least squares method, a set of parameters is found. This minimizes the overall root mean square error between the sand table output and the physical system output on the collected dataset; the optimal parameters are... Update the corresponding model in the physical simulation layer of the sandbox, and recalculate the idempotency index using the updated model until all three indexes meet the preset threshold.
[0062] Finally, the performance of the policy trained in a calibrated sandbox with idempotent properties is verified in a real system: First, in a digital sandbox environment that has passed idempotent calibration, the scene automatic generation layer is enabled. Using the 5-year coupled scene data generated in Example 2, a reinforcement learning energy management strategy aimed at minimizing the average daily operating cost is trained. The final performance of the strategy in the sandbox test scenario is recorded, and the average daily operating cost is found to be 127.3 yuan. Secondly, the trained and converged strategy was directly deployed to the real physical microgrid experimental platform without any re-optimization for the real environment. The strategy was allowed to run continuously in the physical system for one month, and the measured average daily operating cost of the physical system was recorded as 130.0 yuan. Finally, the migration performance degradation loss was calculated: performance degradation = (actual daily average operating cost - sandbox daily average operating cost) / sandbox daily average operating cost = (130.0 - 127.3) / 127.3 ≈ 2.1%, which is less than the preset migration degradation threshold of 3%, and the strategy migration verification meets the standard.
[0063] This embodiment demonstrates through detailed comparative testing that, after calibration, the digital sandbox system proposed in this invention achieves highly consistent idempotent characteristics with the physical system in terms of power, energy, and cost, with all quantitative indicators exceeding the preset thresholds. Based on this high-fidelity sandbox training control strategy, it can be directly transferred to the real physical system with extremely low performance loss (<3%) and operate stably.
[0064] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application. In some cases, the actions or steps described in this application can be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A microgrid digital sand table system generated based on real statistical regularity scenario data, characterized in that, The system includes: Manual configuration layer: used to receive user-configured microgrid static parameters; Automatic scene generation layer: connected to the manual configuration layer, used to automatically generate dynamic time-series data to drive simulation based on historical statistical patterns; Physical simulation layer: connected to the scene automatic generation layer, used to calculate and output the real-time power, energy state and operating cost of the microgrid based on the time series data output by the scene generation layer and external control commands; Idempotent mapping calibration module: connected to the physical simulation layer, used to collect the operating data of the real physical microgrid, compare it with the output of the physical simulation layer, identify and correct the model parameters of the physical simulation layer, so that the digital sandbox meets the idempotent characteristics that the relative deviation of instantaneous power, the relative deviation of cumulative energy and the relative deviation of cumulative cost within a time period are all within a preset threshold. High-speed control interface: Connected to the physical simulation layer, used for interacting with external control algorithms to exchange status information and control commands.
2. The microgrid digital sand table system based on real statistical regularity scenario data as described in claim 1, characterized in that, The static parameters of the microgrid configured by the artificial configuration layer include power plant address, photovoltaic installed capacity, wind power installed capacity, energy storage capacity and power capacity, maximum load and load type, and electricity price type and price range.
3. The microgrid digital sand table system based on real statistical regularity scenario data as described in claim 1, characterized in that, The automatic scene generation layer includes a historical meteorological database, a weather time series generator, a load time series generator, an electricity price time series generator, a scene batch generator, and a multi-source coupling engine. The historical meteorological database is used to store gridded historical meteorological time-series data; The weather time series generator is used to match historical meteorological time series data based on the power station address, generate weather type sequences using a Markov chain model, and combine weather type conditional probability distribution to sample and generate weather time series that include at least irradiance, temperature and wind speed. The load timing generator is used to generate electrical load timing by superimposing random disturbances on a typical daily load curve, and automatically decompose it into multiple electrical load types, including at least rigid loads and controllable loads. The electricity price time series generator is used to generate electricity price time series based on electricity price policy parameters, and supports the injection of predefined abnormal electricity price events; The scene batch generator is used to generate independent time-series scenes, including normal operation scenes, boundary scenes and rare scenes of microgrids, and supports pre-generation mode and streaming generation mode. The multi-source coupling engine is used to model and execute the correlation constraints and joint sampling between the weather time series, electricity load time series and electricity price time series, and to control the proportion of generated scenarios through a hierarchical sampling strategy.
4. The microgrid digital sand table system based on real statistical regularity scenario data as described in claim 1, characterized in that, The physical simulation layer includes a photovoltaic power output analytical model, a wind power output analytical model, an energy storage system model, and a load response model.
5. The microgrid digital sand table system based on real statistical regularity scenario data as described in claim 1, characterized in that, In the weather time series generator, the state of the Markov chain model is a discrete weather type, and its state transition probability matrix is obtained by statistical learning of the weather type sequence in historical meteorological data; the conditional probability distribution is the probability distribution function and its parameters that each meteorological parameter follows under a given weather type.
6. The microgrid digital sand table system based on real statistical regularity scenario data as described in claim 1, characterized in that, In the load time sequence generator, the typical daily load curve template library is classified and stored according to industry type, weekday, holiday identifier and season; the controllable load includes shiftable load, interruptible load and reduceable load, and each type of controllable load is associated with a schedulable time window, power adjustment range and priority parameters.
7. The microgrid digital sand table system based on real statistical regularity scenario data as described in claim 1, characterized in that, The multi-source coupling engine includes a temperature-load coupling sub-model, which is used to dynamically adjust the proportion of air conditioning and heating loads in the total load based on the generated ambient temperature data. And a weather-electricity price coupling sub-model, used to dynamically adjust the fluctuation range of the spot electricity price series based on the generated photovoltaic output forecast data.
8. The microgrid digital sand table system based on real statistical regularity scenario data as described in claim 1, characterized in that, The scene batch generator supports pre-generation mode and streaming generation mode; wherein, the pre-generation mode is used to generate complete scene data files within a preset time period in batches before the simulation starts; the streaming generation mode is used to generate scene data for the next moment in real time as needed during the simulation.
9. The microgrid digital sand table system based on real statistical regularity scenario data as described in claim 1, characterized in that, The threshold values for the idempotent characteristic are: the instantaneous power relative deviation does not exceed 2% of the system's rated power; the cumulative energy relative deviation within the time period does not exceed 1% of the rated energy within that time period; and the cumulative cost relative deviation within the time period does not exceed 3%.
10. The microgrid digital sand table system based on real statistical regularity scenario data as described in claim 1, characterized in that, The high-speed control interface adopts the gRPC remote procedure call framework and uses Protocol Buffers to serialize and deserialize the transmitted state vector and action instructions. The state vector includes the current system state and each prediction sequence.