A micro-grid digital sand table operation scene generation method and system based on time sequence correlation constraint

CN122838874APending Publication Date: 2026-09-29ZENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611308855.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0005]针对上述存在的技术不足,本发明的目的是提出一种基于时序相关性约束的微电网数字沙盘运行场景生成方法及系统,旨在解决现有技术中随机合成场景难以控制异常事件间的因果时序蔓延路径,尤其是在生成连锁脱网、母线过压等微电网连锁故障类异常运行场景的条件下,无法反映异常演化的因果逻辑而导致场景偏离真实故障过程的技术问题

Benefits of technology

本发明通过构建基于图论的事件因果图,并为每条因果边赋予由因果强度系数、时延分布概率密度函数和系统状态依赖调制函数相乘构成的因果时序传递核,能够精细化地刻画不同异常事件之间的因果依赖强度、正常时延统计规律以及受系统实时状态影响的动态调制效应,使得因果关系的表达从静态统计提升为动态物理约束,从而为后续的连锁过程采样提供了精确的先验结构。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122838874A_ABST
    Figure CN122838874A_ABST
Patent Text Reader

Abstract

This invention relates to the field of electrical digital data processing technology, and discloses a method and system for generating microgrid digital sandbox operation scenarios based on time-series correlation constraints. The method includes: acquiring microgrid operation modeling data and outputting a causal time-series graph model of microgrid abnormal events; evaluating the intensity distribution of candidate events; sampling and outputting the next triggering event information using variable-scale sampling; generating an abnormal operation scenario sequence through online modulation iteration; and optimizing the output of an optimized causal time-series graph model of microgrid abnormal events. Compared to existing technologies where randomly synthesized scenarios struggle to control causal time-series propagation paths, especially when generating cascading fault scenarios such as cascading grid disconnections and bus overvoltage, which fail to reflect the causal logic of abnormal evolution and cause the scenario to deviate from the actual fault process, this application achieves targeted control of time-series propagation between events by embedding a causal time-series propagation kernel and autocorrelation constraints.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electrical digital data processing technology, and in particular to a method and system for generating microgrid digital sand table operation scenarios based on time-series correlation constraints. Background Technology

[0002] Currently, in the field of microgrid planning and fault simulation, digital sand tables have become an important tool for testing control strategies and verifying protection settings. To generate abnormal operating scenarios such as cascading grid disconnection and bus overvoltage induced by equipment failure or severe weather, existing methods typically employ random model injection or fault tree analysis based on Monte Carlo sampling. These methods first independently sample the probability of occurrence of each event, then arrange the events in sequence according to a preset time distribution, ultimately forming a scenario sequence.

[0003] For example, when generating a cascading fault scenario of "inverter tripping, bus overvoltage, and energy storage disconnection," the traditional approach simply treats each event as an independent probability event and combines them. Because it lacks explicit modeling of the causal transmission strength, timing delays, and dynamic modulation effects of system states between events, the generated scenario sequences often exhibit problems such as consequences preceding causes or time intervals deviating significantly from the physical process. This results in the simulation results of the digital sandbox being far removed from the actual fault process, failing to meet the requirements of high-fidelity testing.

[0004] Therefore, there is an urgent need for a technical solution that can still embed causal temporal correlation constraints to directionally control the temporal propagation relationship between events when generating abnormal operating scenarios such as microgrid cascading failures. This would generate an abnormal event sequence with a clear causal chain, strict causal order, and time delay distribution that conforms to physical laws, thereby improving the realism of scenario generation and directional control capabilities. Summary of the Invention

[0005] To address the aforementioned technical shortcomings, the present invention aims to propose a method and system for generating microgrid digital sandbox operation scenarios based on temporal correlation constraints. This aims to solve the technical problem that existing technologies struggle to control the causal temporal propagation path between abnormal events in randomly synthesized scenarios, especially when generating abnormal operation scenarios such as cascading grid disconnection and bus overvoltage in microgrids. This is because the scenario cannot reflect the causal logic of abnormal evolution, leading to deviations from the actual fault process.

[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: The present invention provides a method for generating a microgrid digital sand table operation scenario based on time-series correlation constraints.

[0007] The method for generating a microgrid digital sandbox operation scenario based on time-series correlation constraints includes: Step S10: Obtain microgrid operation modeling data, and based on the microgrid operation modeling data, perform the abnormal event causal relationship modeling task using the causal time series graph modeling mechanism to output the microgrid abnormal event causal time series graph model; Step S20: Based on the microgrid abnormal event causal time series graph model, a conditional strength evaluation mechanism that integrates Hawkes process and time series correlation constraints is used to perform the candidate event strength calculation task and output the candidate event strength distribution; Step S30: Based on the intensity distribution of the candidate events, a variable-scale sampling mechanism using a non-homogeneous Poisson process is used to perform the next event sampling preprocessing task, and the next trigger event information is output; Step S40: Based on the next triggering event information, the online parameter modulation mechanism of Markov decision process is used to perform the scene iterative generation task and output the abnormal running scene sequence; Step S50: Based on the abnormal operation scenario sequence, the model parameter feedback optimization task is performed using the causal consistency loss feedback mechanism, and the optimized microgrid abnormal event causal time sequence graph model is output.

[0008] Preferably, step S10, which involves acquiring microgrid operation modeling data, performing anomaly event causal relationship modeling tasks based on the microgrid operation modeling data using a causal time series graph modeling mechanism, and outputting a microgrid anomaly event causal time series graph model, specifically includes: The microgrid operation modeling data includes microgrid topology data, equipment parameter data, protection configuration data, and historical fault case data; Step S101: Extract the types of abnormal events and the order of occurrence between different types of abnormal events from the historical fault case data. Use the types of abnormal events as nodes and the causal relationship that represents the previous abnormal event causing the next abnormal event as directed edges to establish an initial abnormal event causal graph. Step S102: Based on the initial abnormal event causal graph, count the co-occurrence frequency and propagation delay samples of abnormal event pairs corresponding to each directed edge, determine the causal strength parameter according to the co-occurrence frequency of the abnormal event pairs, and determine the delay distribution parameter according to the propagation delay samples. Configure the causal strength parameter and delay distribution parameter to the corresponding directed edges, and output a kernel-based causal time series graph. Step S103: Based on the core-based causal time sequence graph, determine the physical connection relationship between the devices corresponding to the abnormal events according to the microgrid topology data, determine the device status reachability relationship and the protection action sequence relationship according to the device parameter data and protection configuration data, use the physical connection relationship, device status reachability relationship and protection action sequence relationship to perform causal path verification on each directed edge, delete the directed edges that do not meet the microgrid operation logic, and output the microgrid abnormal event causal time sequence graph model.

[0009] Preferably, step S20, which involves performing candidate event intensity calculation based on the microgrid anomaly event causal time-series graph model using a conditional strength evaluation mechanism that integrates Hawkes processes and time-series correlation constraints, and outputting the candidate event intensity distribution, specifically includes: Step S201: Read the current event sequence maintained during the scene generation process, determine the last abnormal event in the current event sequence as the current abnormal event, extract the successor event corresponding to the current abnormal event from the microgrid abnormal event causal time sequence graph model, and form a candidate event set with the successor event and the abnormal events with a preset baseline strength greater than zero. Step S202: Based on the candidate event set and the currently occurring event sequence, extract the causal time-series propagation kernel from the microgrid anomaly event causal time-series graph model, and calculate the conditional strength of each candidate event according to the following formula:

[0010]

[0011] In the formula, Representing candidate events At any moment Conditional strength; Represents the first in the candidate event set One candidate event; Indicates the candidate event index; Indicates the current time of the condition intensity calculation; Representing candidate events Preset baseline strength; Indicates time The previous set of currently occurring events; Represents the first event in the set of events that have already occurred. An abnormal event; Indicates an index of events that have occurred; Indicates an abnormal event The moment of occurrence; Indicates an abnormal event In time interval Next pair of candidate events The resulting causal temporal propagation kernel value; Representing candidate events The temporal correlation strength coefficient, and ; Representing candidate events At any moment Historical intensity memory items; Indicates the time of historical regression; Representing candidate events Local memory kernel function; This represents the memory decay rate of the local memory kernel function, and ; Represents the natural exponential function; When the calculated condition strength is less than zero, the condition strength of the corresponding candidate event is corrected to zero; Step S203: Sum the conditional strengths of each candidate event in the candidate event set to obtain the total strength of the candidate events, and determine the corresponding event selection probability according to the proportion of the conditional strength of each candidate event in the total strength of the candidate events. Combine the total strength of the candidate events and the event selection probabilities corresponding to each candidate event to form the candidate event strength distribution.

[0012] Preferably, in step S202, the temporal correlation constraint is used to attenuate and accumulate the deviation of the historical condition strength of the candidate event relative to the corresponding preset baseline strength through the local memory kernel function; The temporal correlation strength coefficient is limited to a preset stable value range to suppress the infinite accumulation of historical condition strength. When no new causal time-series propagation kernel value is generated, the deviation is gradually reduced according to the memory decay rate so that the conditional strength of the corresponding candidate event is restored to the preset baseline strength. When a new causal time-series propagation kernel value is generated, the deviation amount and the new causal excitation are combined to act on the conditional strength of the corresponding candidate event, so that the conditional strength after the peak of the causal excitation falls back at a rate that matches the state maintenance process of the microgrid equipment.

[0013] Preferably, step S30, which involves performing the next event sampling preprocessing task based on the candidate event intensity distribution using a non-homogeneous Poisson process variable-scale sampling mechanism and outputting the next trigger event information, specifically includes: Step S301: Extract the relationship between the total intensity of candidate events and time from the candidate event intensity distribution, accumulate the total intensity of candidate events over time, generate a first random number in the open interval between zero and one, and take the negative natural logarithm of the first random number as the target accumulated intensity, and determine the waiting time for the next event when the accumulated integral value reaches the target accumulated intensity. Step S302: Determine the time of occurrence of the next event based on the waiting time of the next event, determine the event selection probability according to the proportion of the condition strength of each candidate event at the time of occurrence of the next event, generate a second random number in the open interval of zero to one, select the next triggering event based on the second random number and the event selection probability, and output the candidate triggering result; Step S303: Based on the candidate triggering results, perform event state transition in the microgrid digital sandbox to obtain the updated microgrid operating state, and encapsulate the next triggering event, the time of occurrence of the next event, and the updated microgrid operating state into the next triggering event information.

[0014] Preferably, step S40, which involves executing an iterative scene generation task based on the next triggering event information using an online parameter modulation mechanism of a Markov decision process, and outputting an abnormal running scene sequence, specifically includes: Step S401: Analyze the next trigger event information to obtain the current abnormal event, the time of occurrence of the current event and the current microgrid operating status. Extract the subsequent causal path corresponding to the current abnormal event from the microgrid abnormal event causal time sequence graph model, and determine the causal path transfer weight set according to the causal time sequence propagation kernel value corresponding to each subsequent causal path. Step S402: Combine the current microgrid operating state and the current sequence of events to form a Markov decision state, use the causal path transition weight set as the action selection prior, select the causal path modulation action according to the preset scenario generation target, adjust the causal strength parameter or event selection probability of the corresponding subsequent causal path according to the causal path modulation action, and output the updated scenario generation control strategy. Step S403: Initialize the abnormal operation scenario sequence. Based on the updated scenario generation control strategy, iteratively execute the candidate event intensity calculation task of step S20 and the next event sampling preprocessing task of step S30. Add the next trigger event information obtained in each round to the abnormal operation scenario sequence in sequence until the abnormal operation scenario sequence reaches the preset scenario length, a preset target abnormal event occurs, or the current microgrid operation state enters the preset termination operation state, and output the abnormal operation scenario sequence.

[0015] Preferably, step S50, which involves performing model parameter feedback optimization based on the abnormal operation scenario sequence using a causal consistency loss feedback mechanism and outputting the optimized microgrid abnormal event causal time series graph model, specifically includes: Step S501: Match adjacent abnormal event pairs in the abnormal operation scenario sequence with the directed edges in the microgrid abnormal event causal time sequence graph model, detect causal order violations and propagation delay deviations in the abnormal operation scenario sequence, and detect power balance violations and equipment status unreachability according to preset microgrid physical constraints, and output scenario consistency evaluation results; Step S502: Determine the causal temporal consistency loss and physical constraint verification loss based on the scenario consistency evaluation results. Input the abnormal operation scenario sequence into a pre-trained temporal sequence discriminator to obtain a discrimination loss that characterizes the difference between the abnormal operation scenario sequence and the preset historical fault scenario distribution. Then, weight the causal temporal consistency loss, the physical constraint verification loss, and the discrimination loss according to the preset loss weights and output the total feedback loss. Step S503: Based on the total feedback loss, the causal strength parameter, time delay distribution parameter, time series correlation strength coefficient, and online parameter modulation strategy parameter in the microgrid anomaly event causal time series graph model are adjusted by using a parameter update method that combines gradient backpropagation and physical constraint projection, and the optimized microgrid anomaly event causal time series graph model is output.

[0016] This invention also provides a microgrid digital sandbox operation scenario generation system based on time-series correlation constraints, comprising: The causal time series graph construction module is used to acquire microgrid operation modeling data, and based on the microgrid operation modeling data, it uses a causal time series graph modeling mechanism to perform the causal relationship modeling task of abnormal events, and outputs a causal time series graph model of microgrid abnormal events. The candidate event intensity assessment module is used to perform candidate event intensity calculation tasks based on the microgrid abnormal event causal time series graph model and adopt a conditional intensity assessment mechanism that integrates Hawkes process and time series correlation constraints, and output the candidate event intensity distribution. The next event sampling module is used to perform the next event sampling preprocessing task based on the candidate event intensity distribution using a non-homogeneous Poisson process variable-scale sampling mechanism, and output the next trigger event information; The scene iteration generation module is used to perform scene iteration generation tasks based on the next triggering event information using an online parameter modulation mechanism of Markov decision process, and output an abnormal running scene sequence; The model feedback optimization module is used to perform model parameter feedback optimization tasks based on the abnormal operation scenario sequence using a causal consistency loss feedback mechanism, and outputs an optimized microgrid abnormal event causal time series diagram model.

[0017] The present invention also provides a microgrid digital sand table operation scenario generation device based on time-series correlation constraints. The microgrid digital sand table operation scenario generation device based on time-series correlation constraints includes: a memory, a processor, and a microgrid digital sand table operation scenario generation program based on time-series correlation constraints stored in the memory and executable on the processor. When the microgrid digital sand table operation scenario generation program based on time-series correlation constraints is executed by the processor, it implements the above-mentioned method.

[0018] The present invention also provides a computer program product, the computer program product including a microgrid digital sand table operation scenario generation program based on time-series correlation constraints, the microgrid digital sand table operation scenario generation program based on time-series correlation constraints implementing the above method when executed by a processor.

[0019] The beneficial effects of this invention are as follows: This invention constructs an event causal graph based on graph theory and assigns a causal time-series propagation kernel to each causal edge, which is composed of the product of the causal strength coefficient, the probability density function of the time delay distribution, and the modulation function dependent on the system state. This enables a fine characterization of the causal dependence strength, the statistical regularity of normal time delay, and the dynamic modulation effect affected by the real-time state of the system among different abnormal events. This elevates the expression of causal relationships from static statistics to dynamic physical constraints, thereby providing an accurate prior structure for subsequent chain process sampling.

[0020] A conditional intensity function based on Hawkes processes and incorporating temporal autocorrelation constraints is introduced. By utilizing the combined effect of causal excitation terms of already occurred events and local memory kernels, the total intensity of each candidate event is calculated. This method not only captures the excitation effect between events, but also simulates the inertial characteristics of the physical system's intensity slowly declining after being disturbed through temporal autocorrelation terms. This avoids the triggering of spurious events caused by sudden changes in intensity, making the sampled next event and its occurrence time closer to the fault propagation rhythm of the actual microgrid. Attached Figure Description

[0021] Figure 1 This is a flowchart illustrating the first embodiment of a microgrid digital sand table operation scenario generation method based on time-series correlation constraints according to the present invention. Detailed Implementation

[0022] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0023] 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.

[0024] Example 1: As Figure 1 The diagram shown is a flowchart of the first embodiment of a microgrid digital sand table operation scenario generation method based on time-series correlation constraints according to the present invention. The first embodiment of the microgrid digital sand table operation scenario generation method based on time-series correlation constraints according to the present invention is presented.

[0025] In the first embodiment, the method for generating a microgrid digital sandbox operation scenario based on time-series correlation constraints includes: Step S10: Obtain microgrid operation modeling data, and based on the microgrid operation modeling data, perform the abnormal event causal relationship modeling task using the causal time series graph modeling mechanism to output the microgrid abnormal event causal time series graph model; Microgrid operation modeling data refers to a dataset used to describe the structure, operational boundaries, and historical anomaly evolution of microgrid equipment. It includes at least microgrid topology data, equipment parameter data, protection configuration data, and historical fault case data. Microgrid topology data illustrates the connection relationships between buses, feeders, inverters, energy storage devices, grid connection points, and load branches. Equipment parameter data defines engineering boundaries such as rated capacity, response time, and permissible operating range for each device. Protection configuration data reflects the sequence of actions such as low-voltage ride-through, overcurrent protection, frequency protection, and islanding protection. Historical fault case data provides samples of the occurrence type, sequence, and propagation delay of abnormal events. This step does not simply compile a list of historical fault names. Instead, it first abstracts abnormal event types into causal graph nodes, abstracts the relationship between previous and subsequent abnormal events into directed edges, and then configures causal strength parameters and time delay distribution parameters based on co-occurrence frequency and propagation delay samples. Finally, it verifies the directed edges through physical connection relationships, equipment state reachability relationships, and protection action sequence relationships, deleting false paths that do not conform to the microgrid operation logic.

[0026] Through the above processing, the output microgrid anomaly event causal time sequence graph model can unify the occurrence direction, propagation strength, and time delay of anomalies into a single graph structure. This model provides prior constraints for the candidate event intensity calculation in step S20, ensuring that subsequent intensity assessments are not blindly selected from arbitrary event sets, but rather deduced along causal paths jointly verified by topology, equipment parameters, and protection configurations. Causal strength parameters are used to distinguish between high-frequency, highly correlated paths and low-frequency, occasional paths; time delay distribution parameters are used to limit the reasonable response time range between events; and physical verification results are used to block paths that, although occasionally co-occurring in text records, cannot be valid in engineering structures.

[0027] Traditional digital sandboxes often treat fault events as independent probability terms or fixed transition probability terms when generating abnormal operating scenarios. Even if statistical correlations exist between events, they lack referential relationships supported by the microgrid topology and protection action sequence. Therefore, in randomly combined scenarios, sequences that do not conform to equipment logic may occur, such as islanding protection being triggered before grid connection points are disturbed, or energy storage devices shutting down before entering overload conditions. This step first places the temporal relationships from historical samples into a causal graph, and then performs secondary filtering using equipment connection and protection logic. This makes the subsequent sampled candidate events inherently engineering interpretable, reducing false cascading faults caused by erroneous causal edges from the source.

[0028] In a digital sandbox scenario used for cascading disconnection simulations, historical fault case records show that a feeder short circuit typically induces a bus voltage drop within 0.6 to 2.4 seconds, further triggering the tripping of some inverter protection systems. After acquiring this record, the system designates "feeder short circuit," "bus voltage drop," and "inverter protection tripping" as anomalous event nodes, and "feeder short circuit leading to bus voltage drop" and "bus voltage drop leading to inverter protection tripping" as candidate directed edges. If the topology shows no electrical connection between the feeder and the target bus, or if the protection configuration indicates the target inverter is not constrained by the bus voltage, the corresponding directed edge is deleted. If both the connection relationship and the action sequence are valid, the causal path is retained, and its delay distribution parameters are determined based on historical propagation delay samples. This graphical model prioritizes generating anomalous events along truly reachable paths in subsequent simulations, rather than incorrectly splicing protection actions from unrelated branches into the same cascading scenario.

[0029] Step S20: Based on the microgrid abnormal event causal time series graph model, a conditional strength evaluation mechanism that integrates Hawkes process and time series correlation constraints is used to perform the candidate event strength calculation task and output the candidate event strength distribution; The candidate event intensity distribution refers to the relative intensity and normalized selection probability of each candidate anomalous event being triggered under the current event sequence and current time conditions. When performing this step, the current event sequence maintained during scene generation is first read, the last anomalous event is identified as the current anomalous event, and the successor events of this current anomalous event are extracted from the graph model output in step S10. Spontaneous anomalous events with preset baseline intensity are then incorporated into the candidate event set. Subsequently, three types of contributions are comprehensively considered for each candidate event: first, the preset baseline intensity, which represents the spontaneous risk caused by external environmental disturbances or equipment aging; second, the incentive contribution generated by the current event through the causal time-series propagation kernel, which reflects the direct impact of preceding anomalous events on candidate anomalous events; and third, the historical intensity memory term, which reflects the cumulative decay of the candidate event's own conditional intensity deviation from the baseline intensity under the action of the local memory kernel.

[0030] The output of this step is not the result of a single event judgment, but rather an intensity distribution that includes the total intensity of candidate events and the selection probability of each candidate event. The total intensity of candidate events provides a rate basis for determining the waiting time of the next event in step S30, while the selection probability of each candidate event provides a probability basis for determining the specific triggering event in step S30. If the conditional intensity of a candidate event is less than zero due to parameter combinations or negative correction, it is corrected to zero to avoid negative intensity from participating in sampling. The temporal correlation intensity coefficient is limited to a stable value range, preventing the historical intensity memory from accumulating indefinitely; when no new causal stimulus occurs, the historical deviation gradually decreases according to the memory decay rate, restoring the candidate event intensity to the preset baseline intensity.

[0031] Compared to traditional schemes that only use fixed failure rates or one-time transition probabilities, this step can describe the process by which microgrid anomalies occur in clusters within a short period of time and then gradually return to stability. After preceding anomalies such as feeder short circuits occur, the conditional intensity of related candidate events is increased by the causal propagation kernel. However, this increase does not disappear immediately after one sampling period, but decays at a rate consistent with the equipment state maintenance process through the historical intensity memory term. This avoids the problem that fixed probability models cannot express the continuous impact of fault shocks, and also avoids the problem that infinite intensity accumulation leads to repeated erroneous triggering of candidate events, making the candidate event intensity distribution more suitable as input for non-homogeneous Poisson sampling.

[0032] At 1.2 seconds after a feeder short circuit occurs in the microgrid, the current event sequence includes two events: feeder short circuit and bus voltage drop. The system extracts a set of candidate events from the graphical model, including inverter protection tripping, energy storage overload shutdown, and capacitor bank protection action. Since the causal time-series propagation kernel of the bus voltage drop on inverter protection tripping is in a higher range, and the intensity of inverter protection tripping has increased in the preceding seconds, its historical intensity memory term has not yet fully decayed. Therefore, the conditional strength of this candidate event is higher than that of capacitor bank protection action. In the output candidate event intensity distribution, inverter protection tripping has a higher selection probability, while energy storage overload shutdown retains the second highest probability. When sampling in step S30, event selection will naturally favor protection actions closer to the current fault chain, rather than sampling evenly from all anomaly types.

[0033] Step S30: Based on the intensity distribution of the candidate events, a variable-scale sampling mechanism using a non-homogeneous Poisson process is used to perform the next event sampling preprocessing task, and the next trigger event information is output; The next trigger event information refers to the event encapsulation result formed after one sampling, including the next trigger event, the time of occurrence of the next event, and the updated microgrid operating status obtained after performing event state transition in the microgrid digital sandbox. When performing this step, firstly, the relationship between the total intensity of candidate events and time is extracted from the candidate event intensity distribution and accumulated. Then, a first random number is generated within the open interval of zero to one, and the negative natural logarithm of this random number is used as the target accumulated intensity. When the accumulated integral value reaches the target accumulated intensity, the corresponding time interval is the next event waiting time. Subsequently, the time of occurrence of the next event is determined based on this waiting time, and the event selection probability is determined according to the proportion of conditional intensity of each candidate event at that time. Finally, a second random number is used to select a specific next trigger event from the candidate event set.

[0034] This step binds "when it happens" and "what happens" within the same intensity distribution. When the total intensity of candidate events is high, the target cumulative intensity is reached faster, and the waiting time tends to be shorter; when the total intensity of candidate events is low, the waiting time is correspondingly longer. The selection of specific events is determined by the intensity ratio of each candidate event at the time of the next event. Therefore, the causal excitation, temporal memory, and baseline risk formed in the preceding steps will all be included in the final sampling result. After sampling, an event state transition is performed, which can update the operating states such as bus voltage, feeder current, inverter connection status, and energy storage output status in a timely manner. This ensures that the input obtained in step S40 includes not only the event label but also the actual changed state of the sandbox after the event occurs.

[0035] Traditional scene generation methods often employ a fixed time step, progressing frame by frame, or first randomly selecting the fault type and then providing an empirical time, separating time generation from event generation. When used for cascading fault scenarios, this leads to two typical problems: first, the fault intensity has clearly increased, but the next event is still delayed until after the fixed time step; second, the selected event is unrelated to the strongest causal path at the current moment. This step uses variable-scale sampling with a non-homogeneous Poisson process, making the waiting time determined by the time-varying total intensity and the triggering event determined by the proportion of conditional intensity at that moment. This allows cascading faults to exhibit dense progression during high-risk phases and sparse progression during the system's gradual recovery phase.

[0036] In a simulation segment depicting a voltage drop after a short circuit, the current time is 1.0 second, and the total intensity given in step S20 is significantly higher than the baseline level. The system generates a first random number to obtain the target cumulative intensity, which is reached at 1.18 seconds. Therefore, the next event waiting time is determined to be 0.18 seconds. At 1.18 seconds, the proportion of conditional intensity for inverter protection tripping is 0.62, the proportion for energy storage overload shutdown is 0.25, and the proportion for capacitor bank protection action is 0.13. After the second random number falls into the interval corresponding to inverter protection tripping, the system uses this event as the next trigger event and updates the corresponding inverter state from grid-connected operation to protection tripping in the digital sandbox. The output next trigger event information thus carries the event type, the 1.18-second timestamp, and the updated operating state, providing complete input for further iteration in step S40.

[0037] Step S40: Based on the next triggering event information, the online parameter modulation mechanism of Markov decision process is used to perform the scene iterative generation task and output the abnormal running scene sequence; The online parameter modulation mechanism refers to the control process in each scenario iteration that, based on the current abnormal event, the current event occurrence time, the current microgrid operating state, and the current sequence of events, selects whether to modulate the causal strength parameter or event selection probability of subsequent causal paths. When executing this step, the next triggering event information output in step S30 is first parsed to obtain the current abnormal event, the current event occurrence time, and the current microgrid operating state. Then, the subsequent causal path corresponding to the current abnormal event is extracted from the graph model, and the causal path transition weight set is determined based on the causal time-series propagation kernel value of each subsequent causal path. Subsequently, the current operating state and the sequence of events are combined into a Markov decision state, the transition weight set is used as the action selection prior, and the causal path modulation action is selected according to the preset scenario generation target, outputting the updated scenario generation control strategy.

[0038] The technical effect of this step is to expand a single sampling result into a continuously iterative sequence of abnormal operating scenarios. The updated scenario generation control strategy continues to constrain steps S20 and S30, ensuring that the calculation of candidate event intensity and the sampling of the next event in each round proceed along a causal path that better matches the target scenario under the current state. The preset scenario length, preset target abnormal events, and preset termination states together constitute the iteration stopping condition, preventing the scenario sequence from extending indefinitely. Since each round adds new information about the next triggering event to the abnormal operating scenario sequence, the final output not only includes a list of event names but also the occurrence time, state transition, and causal relationship of each event.

[0039] Traditional random generation methods typically require generating a large number of samples and then filtering them to obtain specific types of cascading scenarios. Many samples fall into non-target paths, especially in microgrids with multiple fault propagation branches, resulting in high filtering costs. This new approach allows the scenario generation objective to continuously influence the selection of subsequent causal paths through a Markov decision process during iteration. For example, when the objective is "energy storage overload shutdown after voltage drop," the system does not directly force the next event. Instead, it increases the weight of subsequent paths related to the objective without disrupting the causal propagation kernel and state reachability. The resulting sequence is both objective-oriented and retains the scenario diversity and physical constraints required for random sampling.

[0040] In actual simulations, if the current event is a bus voltage drop, and the current microgrid operation status shows that the energy storage device's output current reaches 1.15 times its rated value, its state of charge is high, and the grid-connected inverter has been partially disconnected, the preset scenario generation objective is to examine the risk of energy storage overload shutdown. The system uses the above state and the sequence of events as Markov decision states, identifies "bus voltage drop causing energy storage overload shutdown" as a target-related path, and therefore selects a modulation action to enhance the probability of this path's event selection, while not changing other paths that are not physically connected. Subsequently, when steps S20 and S30 are executed again, energy storage overload shutdown becomes a more easily sampled subsequent event. After multiple iterations, the output abnormal operation scenario sequence can present a continuous chain of feeder short circuit, bus voltage drop, inverter protection disconnection, energy storage device assuming remaining power and ultimately overload shutdown.

[0041] Step S50: Based on the abnormal operation scenario sequence, the model parameter feedback optimization task is performed using the causal consistency loss feedback mechanism, and the optimized microgrid abnormal event causal time sequence graph model is output.

[0042] The causal consistency loss feedback mechanism refers to a closed-loop process that uses a generated sequence of abnormal operating scenarios to evaluate and update the parameters of the graph model. In this step, adjacent pairs of abnormal events in the abnormal operating scenario sequence are first matched with directed edges in the graph model to detect issues such as events without corresponding causal edges, violations of causal order, and deviations in propagation delay. Simultaneously, power balance violations and equipment unreachability are detected according to pre-defined microgrid physical constraints, forming a scenario consistency evaluation result. Subsequently, based on this evaluation result, the causal temporal consistency loss and physical constraint verification loss are determined. The abnormal operating scenario sequence is then input into a pre-trained temporal sequence discriminator to obtain a discrimination loss characterizing the difference between the generated sequence and the distribution of historical fault scenarios. The three types of losses are weighted and combined according to preset weights to form the total feedback loss.

[0043] The total feedback loss directly determines the direction of model parameter updates. If a causal edge is frequently used to generate scenarios, but the generation delay is systematically shorter than historical fault samples, the delay distribution parameter of that edge is adjusted through parameter updates. If a subsequent event frequently violates the protection action sequence or causes equipment to become unreachable, the corresponding causal strength parameter is reduced through physical constraint projection or the online parameter modulation strategy parameter is adjusted. If the overall sequence satisfies local physical constraints but differs significantly from the temporal pattern of historical fault scenarios, the discriminative loss drives the model to approach the true distribution in the global temporal structure. The final optimized graph model can be reused in the next round of S10 to S40 processes, forming a closed loop of generation, evaluation, feedback, and regeneration.

[0044] Compared to traditional digital sandboxes that rely solely on expert experience to set parameters once, this step enables the model to continuously improve based on the generated results. Even when traditional methods generate a large number of samples, they often lack joint feedback on causal order, propagation delay, and physical state consistency, leading to the inclusion of engineering-unreliable sequences within the seemingly abundant sample set. This step transforms causal continuity errors, delay deviations, and physical constraint violations in the sequences into loss sources that can be used for parameter updates. It employs a combination of gradient backpropagation and physical constraint projection to update causal strength parameters, delay distribution parameters, temporal correlation strength coefficients, and modulation strategy parameters. This ensures that model optimization not only pursues statistical similarity but also converges simultaneously to the parameter range allowed by the microgrid's operational logic.

[0045] In a batch of generated results containing 50 cascading disconnection samples, the system found that the propagation delay from "bus voltage drop to inverter protection disconnection" was concentrated around 1.1 seconds, while the corresponding peak value in historical fault recordings was approximately 2.3 seconds. Simultaneously, three sequences showed an incorrect sequence where inverter protection disconnection occurred before the bus voltage drop, and a small number of sequences retained the equipment's output power even after disconnection. Step S50 accordingly included delay deviation, causal sequence violation, and equipment state unreachability in the scenario consistency evaluation results, which, together with the distribution differences in the time-series discriminator output, formed the total feedback loss. After parameter updates, the delay distribution parameters of this causal edge were adjusted to a range closer to 2.3 seconds, the weight of the path corresponding to the sequence error was suppressed, and the state transition of continuing power output after disconnection was corrected by physical constraint projection. When the scenario was generated again, the correspondence between the event sequence, time interval, and operating state in the sequence more closely approximated the actual microgrid fault evolution process.

[0046] Example 2: Furthermore, the present invention provides a microgrid digital sandbox operation scenario generation system based on time-series correlation constraints, which employs a microgrid digital sandbox operation scenario generation method based on time-series correlation constraints described in the above embodiments, and can solve the technical problem of generating microgrid digital sandbox operation scenarios based on time-series correlation constraints. The beneficial effects of the microgrid digital sandbox operation scenario generation system based on time-series correlation constraints provided by the present invention are the same as those of the microgrid digital sandbox operation scenario generation method based on time-series correlation constraints provided in the above embodiments, and other technical features of the microgrid digital sandbox operation scenario generation system based on time-series correlation constraints are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0047] Example 3: This invention provides a microgrid digital sandbox operation scenario generation device based on time-series correlation constraints. The device includes at least one processor and a memory communicatively connected to the processor. The memory stores instructions executable by the processor, which are then executed to enable the processor to perform the microgrid digital sandbox operation scenario generation method based on time-series correlation constraints described in Example 1. The microgrid digital sandbox operation scenario generation device based on time-series correlation constraints in this invention can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. This microgrid digital sandbox operation scenario generation device based on time-series correlation constraints is merely an example and should not limit the functionality or scope of this invention. A microgrid digital sandbox operation scenario generation device based on time-series correlation constraints may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) that can execute various appropriate actions and processes according to a program stored in read-only memory or a program loaded from a storage device into random access memory. The random access memory also stores various programs and data required for the operation of the microgrid digital sandbox operation scenario generation device based on time-series correlation constraints. The processing unit, read-only memory, and random access memory are interconnected via a bus. An I / O interface is also connected to the bus. Typically, the following systems can be connected to the I / O interface: input devices including touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices including liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices including magnetic tapes, hard disks, etc.; and communication devices. The communication device allows the microgrid digital sandbox operation scenario generation device based on time-series correlation constraints to communicate wirelessly or wiredly with other devices to exchange data. While a microgrid digital sandbox operation scenario generation device based on time-series correlation constraints with various systems has been described, it should be understood that implementation of or possession of all the described systems is not required. Alternatively, more or fewer systems may be implemented.

[0048] Example 4: This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method for generating a microgrid digital sandbox operation scenario based on time-series correlation constraints. The computer program product provided by this invention can solve the technical problem of generating a microgrid digital sandbox operation scenario based on time-series correlation constraints. Compared with the prior art, the beneficial effects of the computer program product provided by this invention are the same as those of the method for generating a microgrid digital sandbox operation scenario based on time-series correlation constraints provided in the above embodiments, and will not be repeated here.

[0049] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a read-only memory. When the computer program is executed by a processing device, it performs the functions defined in the methods of the embodiments disclosed in this invention.

[0050] It should be understood that the various parts disclosed in this invention can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.

[0051] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the present invention and its equivalents, the present invention also intends to include these modifications and variations.

Claims

1. A method for generating a microgrid digital sandbox operation scenario based on time-series correlation constraints, characterized in that, The method includes: Step S10: Obtain microgrid operation modeling data, and based on the microgrid operation modeling data, perform the abnormal event causal relationship modeling task using the causal time series graph modeling mechanism to output the microgrid abnormal event causal time series graph model; Step S20: Based on the microgrid abnormal event causal time series graph model, a conditional strength evaluation mechanism that integrates Hawkes process and time series correlation constraints is used to perform the candidate event strength calculation task and output the candidate event strength distribution; Step S30: Based on the intensity distribution of the candidate events, a variable-scale sampling mechanism using a non-homogeneous Poisson process is used to perform the next event sampling preprocessing task, and the next trigger event information is output; Step S40: Based on the next triggering event information, the online parameter modulation mechanism of Markov decision process is used to perform the scene iterative generation task and output the abnormal running scene sequence; Step S50: Based on the abnormal operation scenario sequence, the model parameter feedback optimization task is performed using the causal consistency loss feedback mechanism, and the optimized microgrid abnormal event causal time sequence graph model is output.

2. The method for generating a microgrid digital sandbox operation scenario based on time-series correlation constraints as described in claim 1, characterized in that, Step S10, which involves acquiring microgrid operation modeling data, performing anomaly event causal relationship modeling tasks based on the microgrid operation modeling data using a causal time series graph modeling mechanism, and outputting a microgrid anomaly event causal time series graph model, specifically includes: The microgrid operation modeling data includes microgrid topology data, equipment parameter data, protection configuration data, and historical fault case data; Step S101: Extract the abnormal event types and the order of occurrence between different abnormal event types from the historical fault case data. Use the abnormal event type as a node and the causal relationship that represents the previous abnormal event causing the next abnormal event as a directed edge to establish an initial abnormal event causal graph. Step S102: Based on the initial abnormal event causal graph, count the co-occurrence frequency and propagation delay samples of abnormal event pairs corresponding to each directed edge, determine the causal strength parameter according to the co-occurrence frequency of the abnormal event pairs, and determine the delay distribution parameter according to the propagation delay samples. Configure the causal strength parameter and delay distribution parameter to the corresponding directed edges, and output the kernel-based causal time series graph. Step S103: Based on the core-based causal time sequence graph, determine the physical connection relationship between the devices corresponding to the abnormal events according to the microgrid topology data, determine the device status reachability relationship and the protection action sequence relationship according to the device parameter data and protection configuration data, use the physical connection relationship, device status reachability relationship and protection action sequence relationship to perform causal path verification on each directed edge, delete the directed edges that do not meet the microgrid operation logic, and output the microgrid abnormal event causal time sequence graph model.

3. The method for generating a microgrid digital sandbox operation scenario based on time-series correlation constraints as described in claim 1, characterized in that, Step S20, which involves performing candidate event intensity calculation based on the microgrid anomaly event causal time-series graph model using a conditional strength evaluation mechanism that integrates Hawkes processes and time-series correlation constraints, and outputting the candidate event intensity distribution, specifically includes: Step S201: Read the current event sequence maintained during the scene generation process, determine the last abnormal event in the current event sequence as the current abnormal event, extract the successor event corresponding to the current abnormal event from the microgrid abnormal event causal time sequence graph model, and form a candidate event set with the successor event and the abnormal events with a preset baseline strength greater than zero. Step S202: Based on the candidate event set and the currently occurring event sequence, extract the causal time-series propagation kernel from the microgrid anomaly event causal time-series graph model, and calculate the conditional strength of each candidate event according to the following formula: In the formula, Representing candidate events At any moment Conditional strength; Represents the first in the candidate event set One candidate event; Indicates the candidate event index; Indicates the current time of the condition intensity calculation; Representing candidate events Preset baseline strength; Indicates time The previous set of currently occurring events; Represents the first event in the set of events that have already occurred. An abnormal event; Indicates an index of events that have occurred; Indicates an abnormal event The moment of occurrence; Indicates an abnormal event In time interval Next pair of candidate events The resulting causal temporal propagation kernel value; Representing candidate events The temporal correlation strength coefficient, and ; Representing candidate events At any moment Historical intensity memory items; Indicates the time of historical regression; Representing candidate events Local memory kernel function; This represents the memory decay rate of the local memory kernel function, and ; Represents the natural exponential function; When the calculated condition strength is less than zero, the condition strength of the corresponding candidate event is corrected to zero; Step S203: Sum the conditional strengths of each candidate event in the candidate event set to obtain the total strength of the candidate events, and determine the corresponding event selection probability according to the proportion of the conditional strength of each candidate event in the total strength of the candidate events. Combine the total strength of the candidate events and the event selection probabilities corresponding to each candidate event to form the candidate event strength distribution.

4. The method for generating a microgrid digital sandbox operation scenario based on time-series correlation constraints as described in claim 3, characterized in that, In step S202, the temporal correlation constraint is used to attenuate and accumulate the deviation of the historical condition strength of the candidate event from the corresponding preset baseline strength through the local memory kernel function; The temporal correlation strength coefficient is limited to a preset stable value range to suppress the infinite accumulation of historical condition strength. When no new causal time-series propagation kernel value is generated, the deviation is gradually reduced according to the memory decay rate so that the conditional strength of the corresponding candidate event is restored to the preset baseline strength. When a new causal time-series propagation kernel value is generated, the deviation amount and the new causal excitation are combined to act on the conditional strength of the corresponding candidate event, so that the conditional strength after the peak of the causal excitation falls back at a rate that matches the state maintenance process of the microgrid equipment.

5. The method for generating a microgrid digital sandbox operation scenario based on time-series correlation constraints as described in claim 3, characterized in that, Step S30, which involves performing the next event sampling preprocessing task based on the candidate event intensity distribution using a non-homogeneous Poisson process variable-scale sampling mechanism and outputting the next trigger event information, specifically includes: Step S301: Extract the relationship between the total intensity of candidate events and time from the candidate event intensity distribution, accumulate the total intensity of candidate events over time, generate a first random number in the open interval between zero and one, and take the negative natural logarithm of the first random number as the target accumulated intensity, and determine the waiting time for the next event when the accumulated integral value reaches the target accumulated intensity. Step S302: Determine the time of occurrence of the next event based on the waiting time of the next event, determine the event selection probability according to the proportion of the condition strength of each candidate event at the time of occurrence of the next event, generate a second random number in the open interval of zero to one, select the next triggering event based on the second random number and the event selection probability, and output the candidate triggering result; Step S303: Based on the candidate triggering results, perform event state transition in the microgrid digital sandbox to obtain the updated microgrid operating state, and encapsulate the next triggering event, the time of occurrence of the next event, and the updated microgrid operating state into the next triggering event information.

6. The method for generating a microgrid digital sandbox operation scenario based on time-series correlation constraints as described in claim 5, characterized in that, Step S40, which involves using an online parameter modulation mechanism of a Markov decision process to perform scene iterative generation based on the next triggering event information and outputting an abnormal running scene sequence, specifically includes: Step S401: Analyze the next trigger event information to obtain the current abnormal event, the time of occurrence of the current event and the current microgrid operating status. Extract the subsequent causal path corresponding to the current abnormal event from the microgrid abnormal event causal time sequence graph model, and determine the causal path transfer weight set according to the causal time sequence propagation kernel value corresponding to each subsequent causal path. Step S402: Combine the current microgrid operating state and the current sequence of events to form a Markov decision state, use the causal path transition weight set as the action selection prior, select the causal path modulation action according to the preset scenario generation target, adjust the causal strength parameter or event selection probability of the corresponding subsequent causal path according to the causal path modulation action, and output the updated scenario generation control strategy. Step S403: Initialize the abnormal operation scenario sequence. Based on the updated scenario generation control strategy, iteratively execute the candidate event intensity calculation task of step S20 and the next event sampling preprocessing task of step S30. Add the next trigger event information obtained in each round to the abnormal operation scenario sequence in sequence until the abnormal operation scenario sequence reaches the preset scenario length, a preset target abnormal event occurs, or the current microgrid operation state enters the preset termination operation state, and output the abnormal operation scenario sequence.

7. The method for generating a microgrid digital sandbox operation scenario based on time-series correlation constraints as described in claim 6, characterized in that, Step S50, which involves performing model parameter feedback optimization based on the abnormal operation scenario sequence using a causal consistency loss feedback mechanism and outputting the optimized microgrid abnormal event causal time series graph model, specifically includes: Step S501: Match adjacent abnormal event pairs in the abnormal operation scenario sequence with the directed edges in the microgrid abnormal event causal time sequence graph model, detect causal order violations and propagation delay deviations in the abnormal operation scenario sequence, and detect power balance violations and equipment status unreachability according to preset microgrid physical constraints, and output scenario consistency evaluation results; Step S502: Determine the causal temporal consistency loss and physical constraint verification loss based on the scenario consistency evaluation results. Input the abnormal operation scenario sequence into a pre-trained temporal sequence discriminator to obtain a discrimination loss that characterizes the difference between the abnormal operation scenario sequence and the preset historical fault scenario distribution. Then, weight the causal temporal consistency loss, the physical constraint verification loss, and the discrimination loss according to the preset loss weights and output the total feedback loss. Step S503: Based on the total feedback loss, the causal strength parameter, time delay distribution parameter, time series correlation strength coefficient, and online parameter modulation strategy parameter in the microgrid anomaly event causal time series graph model are adjusted by using a parameter update method that combines gradient backpropagation and physical constraint projection, and the optimized microgrid anomaly event causal time series graph model is output.

8. A microgrid digital sandbox operation scenario generation system based on time-series correlation constraints, applied to the microgrid digital sandbox operation scenario generation method based on time-series correlation constraints as described in any one of claims 1 to 7, characterized in that, The microgrid digital sand table operation scenario generation system includes: The causal time series graph construction module is used to acquire microgrid operation modeling data, and based on the microgrid operation modeling data, it uses a causal time series graph modeling mechanism to perform the causal relationship modeling task of abnormal events, and outputs a causal time series graph model of microgrid abnormal events. The candidate event intensity assessment module is used to perform candidate event intensity calculation tasks based on the microgrid abnormal event causal time series graph model and adopt a conditional intensity assessment mechanism that integrates Hawkes process and time series correlation constraints, and output the candidate event intensity distribution. The next event sampling module is used to perform the next event sampling preprocessing task based on the candidate event intensity distribution using a non-homogeneous Poisson process variable-scale sampling mechanism, and output the next trigger event information; The scene iteration generation module is used to perform scene iteration generation tasks based on the next triggering event information using an online parameter modulation mechanism of Markov decision process, and output an abnormal running scene sequence; The model feedback optimization module is used to perform model parameter feedback optimization tasks based on the abnormal operation scenario sequence using a causal consistency loss feedback mechanism, and outputs an optimized microgrid abnormal event causal time series diagram model.

9. A device for generating a microgrid digital sand table operation scenario based on time-series correlation constraints, characterized in that, The microgrid digital sand table operation scenario generation device based on time-series correlation constraints includes: a memory, a processor, and a microgrid digital sand table operation scenario generation program based on time-series correlation constraints stored in the memory and executable on the processor. When the microgrid digital sand table operation scenario generation program based on time-series correlation constraints is executed by the processor, it implements a microgrid digital sand table operation scenario generation method based on time-series correlation constraints as described in any one of claims 1 to 7.

10. A computer program product, characterized in that, The computer program product includes a microgrid digital sand table operation scenario generation program based on time-series correlation constraints. When the microgrid digital sand table operation scenario generation program based on time-series correlation constraints is executed by the processor, it implements a microgrid digital sand table operation scenario generation method based on time-series correlation constraints as described in any one of claims 1 to 7.