Power grid joint simulation method, system and device
By segmenting the simulation model and performing data compensation in the power grid joint simulation system, the problem of data inaccuracy caused by network latency and fluctuations in remote joint real-time simulation is solved, and efficient and stable simulation data exchange and model prediction are achieved.
Patent Information
- Application Number
- CN202511655541.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-01-30
AI Technical Summary
During remote joint real-time simulation, unstable network latency and fluctuations are introduced when real-time simulation data is transmitted through a wide area network, leading to data alignment errors and system model distortion, resulting in low accuracy of simulation data exchange.
The main control platform divides the power grid simulation model into sub-models, which are then distributed to distributed simulation nodes. The sub-models run synchronously among the nodes, acquiring network status information and dynamic signal measurements, performing data compensation, and improving the robustness of data exchange.
It improves the accuracy and stability of simulation data interaction, reduces the possibility of joint simulation system crashes, and realizes efficient joint simulation of large-scale power systems.
Smart Images

Figure CN121435540A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer simulation technology, and in particular to a method, system and apparatus for co-simulation of power grids. Background Technology
[0002] With the popularization of distributed energy and the increasing complexity of power grid structures, high-precision real-time simulation of large-scale power systems has become crucial. Since a single real-time simulator is limited by its computing power and number of ports, it is difficult to simulate the entire complex system. Therefore, related technologies typically connect multiple simulators located in different geographical locations in research institutions or laboratories to conduct remote joint real-time simulation.
[0003] However, during remote joint real-time simulation, the transmission of real-time simulation data over a wide area network introduces unstable network latency and fluctuations, thereby compromising the real-time characteristics of joint simulation and causing data alignment errors and system model distortion. In the presence of network latency, it is extremely difficult to ensure that all distributed simulators operate and exchange data at the same time step. It is evident that there is a problem with the low accuracy of simulation data exchange in related joint simulation technologies. Summary of the Invention
[0004] Therefore, it is necessary to provide a power grid co-simulation method, system, device, computer equipment, computer-readable storage medium, and computer program product that can improve the accuracy of co-simulation data exchange, in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a power grid co-simulation method, applied to simulation nodes of a power grid co-simulation system. The power grid co-simulation system includes multiple simulation nodes respectively connected to a main control platform, including:
[0006] The system receives the configuration file of the power grid simulation sub-model from the main control platform, loads the power grid simulation sub-model according to the configuration file, and obtains the power grid simulation sub-model by segmenting the power grid simulation model from the main control platform.
[0007] For each simulation time step, the power grid simulation sub-model is run to obtain the first simulation data of the power grid simulation sub-model;
[0008] Send the first simulation data to the first simulation node;
[0009] Receive the second simulation data sent by the second simulation node, obtain network status information and signal dynamic measurement, and perform data compensation on the second simulation data based on the network status information and signal dynamic measurement to obtain the data-compensated second simulation data;
[0010] Based on the second simulation data after data compensation, the power grid simulation sub-model is run to obtain the first simulation data of the power grid simulation sub-model. The process then returns to the step of sending the first simulation data to the first simulation node until a simulation stop command is received from the main control platform.
[0011] Secondly, this application also provides a power grid co-simulation device, applied to a simulation node of a power grid co-simulation system. The power grid co-simulation system includes multiple simulation nodes respectively connected to a main control platform. The device includes:
[0012] The simulator module is used to receive the configuration file of the power grid simulation sub-model issued by the main control platform, load the power grid simulation sub-model according to the configuration file, and obtain the power grid simulation sub-model by the main control platform through segmentation of the power grid simulation model; for each simulation time step, the power grid simulation sub-model is run to obtain the first simulation data of the power grid simulation sub-model;
[0013] The data exchange module is used to send the first simulation data to the first simulation node and receive the second simulation data sent by the second simulation node.
[0014] The data compensation module is used to acquire network status information and signal dynamic measurement, and to perform data compensation on the second simulation data based on the network status information and signal dynamic measurement to obtain the data-compensated second simulation data.
[0015] The simulator module is also used to run the power grid simulation sub-model based on the second simulation data after data compensation, and obtain the first simulation data of the power grid simulation sub-model.
[0016] Thirdly, this application also provides a power grid co-simulation system, which includes multiple simulation nodes respectively connected to the main control platform:
[0017] The main control platform is configured to: acquire the power grid simulation model, divide the power grid simulation model to obtain multiple power grid simulation sub-models and configuration files for each power grid simulation sub-model, and distribute the configuration files of each power grid simulation sub-model to each simulation node to instruct each simulation node to perform joint simulation.
[0018] The simulation node is configured to perform co-simulation using the steps described in any of the above-mentioned power grid co-simulation method embodiments.
[0019] Fourthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in any of the above-described embodiments of the power grid co-simulation method.
[0020] Fifthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in any of the above-described embodiments of the power grid co-simulation method.
[0021] Sixthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps in any of the above-described power grid co-simulation method embodiments.
[0022] The aforementioned power grid co-simulation method, apparatus, computer equipment, computer-readable storage medium, and computer program product pre-construct a power grid co-simulation system architecture comprising multiple simulation nodes connected to a main control platform. The main control platform pre-divides the power grid simulation model and distributes the configuration files of the divided power grid simulation sub-models to the distributed simulation nodes. Subsequently, each simulation node receives the configuration file, loads the power grid simulation sub-model, and executes the co-simulation: at each simulation time step, the power grid simulation sub-model is run synchronously to obtain the first simulation data. The first simulation data is then sent to the first simulation node, and the second simulation data sent by the second simulation node is received. Here, considering that the simulation nodes based on wide area network interconnection will introduce network latency and fluctuations during data synchronization, network status information and signal dynamic measurements are obtained. Based on the network status information and signal dynamic measurements, data compensation is performed on the second simulation data to cope with the latency and jitter of the wide area network, thereby improving the robustness of simulation data interaction. Afterwards, the power grid simulation sub-model is run based on the data-compensated second simulation data, improving the prediction accuracy of the power grid simulation sub-model. Simultaneously, this helps to improve simulation stability and reduce the possibility of co-simulation system crashes.
[0023] The aforementioned power grid co-simulation system constructs a unified architecture for managing simulation nodes in different geographical locations, improving the scalability of simulation nodes in co-simulation. Meanwhile, through the main control platform, simulation models are segmented and simulation tasks are distributed. Simulation nodes dynamically select data compensation strategies based on real-time network status information and dynamic signal measurements to cope with the latency and jitter of wide area networks. Thus, simulation accuracy, computational efficiency, and operational stability are balanced in wide area networks with limited bandwidth, achieving robust and efficient co-simulation of large-scale power systems. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a diagram illustrating the application environment of the power grid co-simulation method in one embodiment;
[0026] Figure 2 This is a flowchart illustrating a power grid co-simulation method in one embodiment;
[0027] Figure 3 This is a flowchart illustrating the power grid co-simulation method in another embodiment;
[0028] Figure 4 This is a flowchart illustrating the power grid co-simulation method in yet another embodiment;
[0029] Figure 5 Here is a block diagram of the power grid co-simulation system in another embodiment;
[0030] Figure 6 Here is a block diagram of the power grid co-simulation system in a detailed embodiment;
[0031] Figure 7 This is a schematic diagram of the workflow of an adaptive synchronization engine in one embodiment;
[0032] Figure 8 This is a structural block diagram of a power grid co-simulation device in one embodiment;
[0033] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0035] The power grid co-simulation method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, multiple simulation nodes 120 located in different geographical locations communicate with the main control platform 110 via a network.
[0036] Specifically, the main control platform 110 may divide the power grid simulation model into multiple power grid simulation sub-models, distribute the configuration files of the power grid simulation sub-models to each simulation node 120, and then the simulation node 120 receives the configuration files of the power grid simulation sub-models issued by the main control platform, loads the power grid simulation sub-models according to the configuration files, and then runs the power grid simulation sub-models for each simulation time step to obtain the first simulation data of the power grid simulation sub-models. The first simulation data is sent to the first simulation node, and then the second simulation data sent by the second simulation node is received. The network status information and signal dynamic measurement are obtained, and the second simulation data is compensated according to the network status information and signal dynamic measurement to obtain the data-compensated second simulation data. The power grid simulation sub-models are run according to the data-compensated second simulation data to obtain the first simulation data of the power grid simulation sub-models, and the process returns to the step of sending the first simulation data to the first simulation node until the simulation stop command issued by the main control platform 110 is received.
[0037] The simulation node 120 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, etc. The main control platform 110 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0038] In one exemplary embodiment, such as Figure 2 As shown, a co-simulation method for power grids is provided, which can be applied to... Figure 1 Taking simulation node 120 as an example, the explanation includes the following steps (hereinafter referred to as S): S100 to S500. Wherein:
[0039] S100 receives the configuration file of the power grid simulation sub-model issued by the main control platform, loads the power grid simulation sub-model according to the configuration file, and the power grid simulation sub-model is obtained by the main control platform from the power grid simulation model segmentation.
[0040] The power grid simulation model can include parameters, status information, and connection relationships of power grid equipment. Power grid equipment includes, but is not limited to, generators, transformers, and transmission lines.
[0041] In practice, the main control platform can segment the power grid simulation model according to simulation requirements, obtaining multiple power grid simulation sub-models and generating configuration files for each sub-model. For example, an operator uploads a complete distribution network model to the main control platform via a terminal. In this distribution network structure, the power source is from the upstream power grid; the load areas include residential, commercial, and industrial areas; photovoltaic systems are installed on the rooftops of residential and industrial areas, and the photovoltaic systems in the industrial area are extensively connected via power electronic inverters; and automatically switching capacitor banks are installed in the middle of the lines for reactive power compensation. Subsequently, the main control platform segments the distribution network model, obtaining sub-model 1: feeders for residential and commercial areas; sub-model 2: feeders for industrial areas; and sub-model 3: the backbone network and the central control system. After generating the configuration files for each sub-model, the configuration files are synchronously distributed to each simulation node. For example, the main control platform distributes the configuration files for sub-models 1-3 to simulation nodes A, B, and C, respectively. Upon receiving the configuration files for the sub-models, the simulation nodes load the power grid simulation sub-models according to the configuration files.
[0042] S200 runs the power grid simulation sub-model for each simulation time step to obtain the first simulation data of the power grid simulation sub-model.
[0043] The first simulation data represents the simulation data output by the simulation node itself.
[0044] In practice, the simulation node runs the power grid simulation sub-model through its local simulator, and for each simulation time step, outputs the first simulation data obtained at the current simulation time step. For example, simulation node C runs sub-model 3 and outputs the voltage data at the interface, simulation node B runs sub-model 2 and outputs the current data at the interface, and simulation node A runs sub-model 1 and outputs the current data at the interface.
[0045] S300 sends the first simulation data to the first simulation node.
[0046] The first simulation node represents the receiving node for the first simulation data output by the simulation node.
[0047] For example, the first simulation node of simulation node C includes simulation node A and simulation node B, the first simulation node of simulation node A includes simulation node C, and the first simulation node of simulation node B includes simulation node C.
[0048] In practice, each simulation node can adjust the sending priority of the first simulation data packets according to the importance of different types of data in the first simulation data, and send its own output first simulation data to the corresponding first simulation node according to the priority.
[0049] S400 receives the second simulation data sent by the second simulation node, obtains network status information and signal dynamic measurement, and performs data compensation on the second simulation data based on the network status information and signal dynamic measurement to obtain the data-compensated second simulation data.
[0050] In this embodiment, the simulation nodes are interconnected via a wide area network. Due to potential network latency, the received simulation data needs to be compensated to address data mismatch caused by the latency. However, network conditions change in real time; therefore, this embodiment proposes an adaptive data compensation method.
[0051] Network status information may include, but is not limited to, latency, jitter, packet loss rate, and bandwidth utilization. Signal dynamics measures characterize the degree of change in simulation data (such as voltage, current, and power), and may include rate of change, acceleration, variance, and standard deviation.
[0052] In practice, simulation nodes can continuously exchange lightweight probe data packets with timestamps to measure latency, jitter, packet loss rate, and bandwidth utilization. Subsequently, at the current simulation time step, the simulation node receives second simulation data sent by the second simulation node and performs real-time calculations on the second simulation data received at previous simulation time steps within the local simulator to obtain dynamic signal measures such as rate of change, acceleration, variance, and standard deviation.
[0053] Subsequently, based on network state information and signal dynamics measurements, an adaptive data compensation method is determined for compensation. For example, the data compensation method may include, but is not limited to, predicting the ideal (delay-free, fluctuation-free, etc.) second simulation data received at the current simulation time step based on network state information and signal dynamics measurements, or running a filter to incorporate delayed observations into the state estimation through a backpropagation / forward propagation process. The filter parameters are adaptively adjusted based on network jitter and signal dynamics. For instance, if the network state information indicates severe current network latency, the second simulation data can be compensated using a zero-order hold method, that is, the compensated second simulation data from the previous simulation time step is determined as the second simulation data for the current simulation time step, i.e., the compensated second simulation data.
[0054] S500 runs the power grid simulation sub-model based on the second simulation data after data compensation, obtains the first simulation data of the power grid simulation sub-model, and returns to S300 until it receives a simulation stop command issued by the main control platform.
[0055] In practice, the simulation node can inject the compensated second simulation data into the power grid simulation sub-model, update the model output, and obtain the updated first simulation data. In this way, the above model operation, simulation data interaction, simulation data compensation, etc. are executed iteratively at each simulation time step until a simulation stop command is received from the main control platform, and the power grid simulation sub-model stops running.
[0056] In other embodiments, after acquiring network status information and signal dynamic measurements, each simulation node uploads these to the main control platform. The main control platform can detect whether a node is overloaded, whether network latency exceeds a preset alarm threshold, or whether there are signs of fluctuation in the simulation data based on the network status information and signal dynamic measurements. If at least one of the above three problems exists, the platform can send a simulation stop command to each simulation node and push alarm information. The method for pushing alarm information can include pushing alarm information in the notification bar, displaying alarm information in a full-screen or half-screen pop-up window, providing alarm prompts through specific sound or vibration patterns, or providing visual alarm prompts through flashing indicator lights. It is understood that the method for pushing alarm information can be any one of the aforementioned methods or any combination of multiple methods, and is not limited here.
[0057] In the aforementioned power grid co-simulation method, a power grid co-simulation system architecture containing multiple simulation nodes connected to the main control platform is pre-constructed. The main control platform pre-divides the power grid simulation model and distributes the configuration files of the divided power grid simulation sub-models to the distributed simulation nodes. Subsequently, each simulation node receives the configuration file, loads the power grid simulation sub-model, and executes the co-simulation: at each simulation time step, the power grid simulation sub-model is run synchronously to obtain the first simulation data. Then, the first simulation data is sent to the first simulation node, and the second simulation data sent by the second simulation node is received. Here, considering that the simulation nodes based on wide area network interconnection will introduce network latency and fluctuations when synchronizing data, network status information and signal dynamic measurement are obtained. Based on the network status information and signal dynamic measurement, data compensation is performed on the second simulation data to cope with the latency and jitter of the wide area network, thereby improving the robustness of simulation data interaction. Afterwards, the power grid simulation sub-model is run based on the data-compensated second simulation data, which improves the prediction accuracy of the power grid simulation sub-model. At the same time, it is beneficial to improve the simulation stability and reduce the possibility of co-simulation system crash.
[0058] In one exemplary embodiment, network state information and signal dynamics measurements are obtained, such as... Figure 3 As shown, it includes S410 to S420, wherein:
[0059] S410 sends a network status probe packet to the second simulation node to obtain network status information.
[0060] Among them, the network status probe packet is a lightweight probe packet, which may contain a timestamp of the time of transmission, a packet sequence number, and a second emulation node identifier.
[0061] In practice, the simulation middleware of each simulation node includes an active network probing module, which continuously sends network status probe packets to the second simulation node. The average network latency is determined based on the return time of the network status probe packets. Subsequently, network jitter is determined based on the standard deviation or maximum deviation of the continuous network latency, and the packet loss rate is determined based on the number of unreturned packets and the total number of packets sent.
[0062] S420 analyzes the second simulation data under the historical simulation time steps to obtain the signal dynamic measurement.
[0063] Among them, the dynamic measurement of the signal includes the rate of change and acceleration of the simulation data.
[0064] In practice, this can involve acquiring second simulation data from multiple historical simulation time steps and determining the rate of change of the second simulation data using a Western metric. and acceleration :
[0065]
[0066]
[0067] In the formula, Indicates the signal; k represents the signal sequence number; Describes the time interval of a signal sequence; Indicates the maximum value within the sampling period; This represents the k-th signal sample value; This represents the k-th rate of change.
[0068] After obtaining network state information and signal dynamics measurement, the network state information and signal dynamics measurement can be integrated into a state vector. Then, the state vector is input into the intelligent decision logic module of the simulation middleware of the simulation node, so that the intelligent decision logic module outputs a data compensation strategy that matches the state vector.
[0069] Based on network status information and signal dynamics measurements, data compensation is performed on the second simulation data, including S430 to S440, where:
[0070] S430 selects the target data compensation strategy from multiple preset data compensation strategies based on network status information and dynamic signal measurement.
[0071] In this embodiment, a multi-mode prediction algorithm library is deployed in the simulation node. The library contains a variety of preset data compensation strategies, such as zero-order preservation, first-order prediction, and second-order prediction data prediction algorithms.
[0072] In practice, a weighted scoring method can be used to determine the scores for network state information and signal dynamics measurement separately. Then, a comprehensive score is determined based on the network state information score and the signal dynamics measurement score. An evaluation level is then determined according to a preset range of comprehensive scores corresponding to multiple evaluation levels. This evaluation level characterizes the reliability of the interactive environment. Next, based on the evaluation level and the mapping relationship between different preset data compensation strategies and different evaluation levels, a target data compensation strategy matching the evaluation level is determined. For example, the evaluation levels are divided into three levels: Level 1, Level 2, and Level 3, with the reliability of the interactive environment decreasing sequentially. The second-order prediction strategy is mapped to the Level 1 evaluation level, the first-order prediction strategy to the Level 2 evaluation level, and the zero-order hold-up strategy to the Level 3 evaluation level.
[0073] S440, perform data compensation on the second simulation data according to the target data compensation strategy.
[0074] In specific implementation, according to the zero-order hold strategy, data compensation for the second simulation data can be achieved by using the second simulation data received at the previous simulation time step as the second simulation data at the current simulation time step. Data compensation for the second simulation data according to the first-order prediction strategy can be achieved by substituting the second simulation data into a fitted first-order linear formula to predict the second simulation data at the current simulation time step, i.e., obtaining the compensated second simulation data. The first-order linear formula is fitted based on the second simulation data from historical simulation time steps. Data compensation for the second simulation data according to the second-order prediction strategy can be achieved by substituting the second simulation data into a fitted second-order linear formula to predict the second simulation data at the current simulation time step, i.e., obtaining the compensated second simulation data. The second-order linear formula is fitted based on the second simulation data from historical simulation time steps.
[0075] In this embodiment, by acquiring network status information and adaptively filtering target data compensation strategies based on signal dynamic measurements, the received second simulation data is compensated, thereby improving the reliability of power grid simulation.
[0076] In an exemplary embodiment, network state information includes network latency, network jitter, and packet loss rate; signal dynamics measures include the rate of change and acceleration of the exchanged signal; and preset data compensation strategies include zero-order hold strategy, Kalman filtering strategy, first-order linear extrapolation strategy, and second-order polynomial extrapolation strategy.
[0077] Based on network status information and signal dynamics measurement, a target data compensation strategy is selected from multiple preset data compensation strategies, including S431 to S435, where:
[0078] S431, if the packet loss rate is greater than or equal to the preset packet loss rate threshold, or the network jitter is greater than or equal to the preset network jitter threshold, the zero-order hold strategy is determined as the target data compensation strategy.
[0079] S432, otherwise, if the acceleration is greater than or equal to the preset acceleration threshold, the filter strategy is determined as the target data compensation strategy.
[0080] S433, otherwise, if the rate of change is greater than or equal to the preset rate of change threshold, then first-order linear extrapolation is determined as the target data compensation strategy.
[0081] S434, otherwise, if the network latency is less than or equal to the preset minimum network latency, then the first-order linear extrapolation strategy is determined as the target data compensation strategy.
[0082] S435, otherwise, the zero-order hold strategy will be determined as the target data compensation strategy.
[0083] In this embodiment, multiple data compensation strategies are pre-set to address different network latency and jitter. These strategies can utilize received historical simulation data to predict the true state value of the remote simulation node at the current local simulation moment, thereby compensating for the impact of network latency and jitter. Specifically, the zero-order hold strategy can compensate for data using a zero-order hold mechanism, whereby the second simulation data received in the previous simulation time step is used as the second simulation data in the current simulation time step.
[0084] The first-order linear extrapolation strategy can be implemented by calculating a slope based on the two or more most recently received simulation data, and then using this slope to predict the simulation data at the current simulation time step. Specifically, assuming the current simulation time step is t, the slope can be calculated based on the second simulation data received at time steps t-1 and t-2. Subsequently, based on the slope and the received second simulation data, the second simulation data output by the second simulation node at the current simulation time step is predicted, resulting in the second simulation prediction data. This second simulation prediction data is then identified as the second simulation data received at the current time step.
[0085] The second-order polynomial extrapolation strategy involves fitting a second-order polynomial based on the three most recent received simulation data, substituting the received simulation data into this second-order polynomial, and predicting the simulation data received at the current simulation time step. Specifically, a second-order polynomial is fitted based on the second simulation data received at time steps t-1, t-2, and t-3. The second simulation data received at time step t is then substituting into this second-order polynomial to predict the second simulation data output by the second simulation node at the current simulation time step, resulting in the second simulation prediction data. This second simulation prediction data is then determined as the second simulation data received at the current time step.
[0086] The filter strategy can be to predict the second simulation data received at the current time step using a filter. Specifically, the filter predicts the second simulation data received at the current time step based on the second simulation data received at the most recent n simulation time steps, obtaining the predicted second simulation data, which is then determined as the second simulation data received at the current time step. The filters include, but are not limited to, Kalman filtering, particle filtering, extended Kalman filtering, or unscented Kalman filtering.
[0087] For S431, in specific implementation, the packet loss rate is set to... The packet loss rate threshold is Network fluctuations are Network fluctuation threshold After detection or In such cases, the representation network is extremely unstable, and any trend-based prediction is not reliable enough. The most robust data compensation strategy is required to compensate the received simulation data in order to reduce the possibility of system collapse. Therefore, the zero-order hold strategy is determined as the target data compensation strategy.
[0088] For S432, in specific implementation, let the acceleration be... The acceleration threshold is If the packet loss rate does not meet the judgment step of S431, and the network fluctuation also does not meet the judgment step of S431, then the acceleration is compared with a preset acceleration threshold. In cases where the characterization signal exhibits strong nonlinear dynamics, it is necessary to capture its behavior through complex models. Therefore, the filter strategy is determined as the target data compensation strategy.
[0089] For S433, in specific implementation, let the rate of change be... The threshold for the rate of change is If the packet loss rate and network fluctuations do not meet the judgment step of S431, and the acceleration does not meet the judgment step of S432, then the rate of change is compared with a preset rate of change threshold. In cases where the characterizing signal has significant curvature and the linear model is insufficient to accurately describe it, the second-order polynomial extrapolation strategy is determined as the target data compensation strategy.
[0090] For S434, in practical implementation, the network latency is assumed to be... The network latency threshold is If the packet loss rate and network fluctuation do not meet the judgment steps of S431, and the acceleration does not meet the judgment steps of S432, and the rate of change does not meet the judgment steps of S433, then the network latency is compared with a preset network latency threshold. If a threshold is detected... In the case where the network is stable and the signal changes gradually, the first-order linear extrapolation strategy is determined as the target data compensation strategy.
[0091] In this embodiment, by pre-setting multiple data compensation strategies mapped to different network states and simultaneously analyzing the data compensation strategies that match the real-time network state configuration, the reliability of data interaction is improved.
[0092] In one exemplary embodiment, such as Figure 4 As shown, the first simulation data is sent to the first simulation node, including steps S310 to S340, wherein:
[0093] S310, determine the data types of different data in the first simulation data, and determine the network service level of each data in the first simulation data according to the data types.
[0094] The simulation data types include Critical Control and Event Data (CCE), Continuous State Variable Data (CSV), and System Measurement and Monitoring Data (SMM). For example, CCE type simulation data may include, but is not limited to, simulation data requiring high timeliness and reliability, such as circuit breaker commands and fault signals. CSV type simulation data may include voltage and current, which have high timeliness requirements but slightly lower reliability requirements. SMM type simulation data may include power, frequency, etc., and this type of data has a high tolerance for delay and packet loss.
[0095] In practical applications, a mapping relationship is established between different simulation data data types and network service levels. For example, key control and event data types are mapped to the first network service level, continuous state variable data types are mapped to the second network service level, and system measurement and monitoring data are mapped to the third network service level. The priority of each network service level from high to low is as follows: first network service level > second network service level > third network service level.
[0096] In practical applications, identification rules can be set in advance for each data type. The identification rule can be that if the data field of the simulation data matches the data field set corresponding to the data type, then the data type of the simulation data is determined to be the data type corresponding to the matched data field set.
[0097] In practice, the data fields of the first simulation data can be matched with the data field sets in the identification rules of different data types. The data type to which the matching identification rule belongs is determined as the data type of the first simulation data. Then, the network service level corresponding to the first simulation data is determined according to the preset mapping relationship between data types and network service levels.
[0098] S320: Write the first simulation data into the priority queue corresponding to the network service level.
[0099] In practical applications, priority queues corresponding to different network service levels are pre-constructed. For example, priority queue P1 corresponds to the first network service level, priority queue P2 corresponds to the second network service level, and priority queue P3 corresponds to the third network service level.
[0100] In practice, after determining the different data types in the first simulation data, the different data can be packaged into data packets and loaded into a priority queue of the network service level that matches the data type.
[0101] S330, if it detects that the priority queue with the highest network service level is not empty, sends the first simulation data with the highest network service level to the first simulation node.
[0102] In this embodiment, a hierarchical hybrid scheduling framework is used for data interaction. Specifically, the highest priority queue with the highest network service level is checked first. If this priority queue is not empty, the first simulation data in this priority queue is processed first. For example, the highest network service level is the first network service level, which corresponds to the first simulation data of the critical control and event data type. If the priority queue P1 of the first network service level is detected to be not empty, the first simulation data of the critical control and event type is sent to the first simulation node in sequence. After sending, the process returns to the step of checking whether the priority queue P1 is not empty, and the loop continues until the priority queue P1 is empty.
[0103] S340, when it detects that the highest priority queue of the network service level is empty, sends the first simulation data to the first simulation node through a weighted round-robin method.
[0104] The weighted polling method can be used to assign weights to queues of different priorities and send the first simulation data according to the assigned weights.
[0105] In practice, weights can be assigned to priority queues of all network service levels except the highest one. Then, the first simulation data is sent in turn according to the weights of the priority queues. For example, a weight of 3 is assigned to priority queue P2 of the second network service level, and a weight of 1 is assigned to priority queue P3 of the third network service level. Currently, the difference between the weights of P2 and P3 is 3, and the difference between the weights of P3 and P3 is 1. After sending a data packet from a priority queue, the difference is reduced by 1. Simultaneously, the priority queues are checked again. If the highest priority queue of the network service level is found to be empty, the first simulation data is sent in turn according to the weights and differences.
[0106] In this embodiment, a hierarchical hybrid scheduling architecture is used to ensure that simulation data of critical control and event data types have the highest service priority, while other data types fairly share the remaining bandwidth according to their weights, thereby improving the robustness of the simulation.
[0107] In an exemplary embodiment, before running the power grid simulation sub-model for each synchronization time step and obtaining the first simulation data of the power grid simulation sub-model, the method further includes S110 to S120, wherein:
[0108] S110 interacts with other simulation nodes besides itself regarding the metadata of the power grid simulation sub-model.
[0109] The metadata of the power grid simulation sub-model may include model type, base frequency, step size, and interface variables, and the interaction protocol for metadata exchange may include, but is not limited to, three-way handshake protocol, point-to-point protocol, and multi-protocol tag exchange protocol.
[0110] In practice, for each simulation node, the structured text (such as XML format) of the power grid simulation sub-model can be exchanged with other simulation nodes through an interaction protocol. The structured text of the model contains the model's metadata. For example, suppose the co-simulation system includes simulation nodes A, B, and C. The simulation nodes can exchange the metadata of the power grid simulation sub-model between each other through a three-way handshake protocol.
[0111] S120: Based on the received metadata of other simulation nodes, determine the model type of the power grid simulation sub-model of other simulation nodes.
[0112] The model type may include, but is not limited to, electromagnetic transient model type and root mean square model type.
[0113] In practice, the model type of the power grid simulation sub-model of other simulation nodes can be extracted from the received metadata of other simulation nodes. For example, simulation node A is the analysis master station, which uses an electromechanical transient model to simulate a distribution network including traditional power sources and loads, and simulation node B is a new energy station, which uses an electromagnetic transient model to simulate a large photovoltaic power station, its grid-connected inverter, and the supporting battery energy storage system.
[0114] Before sending the first simulation data to the first simulation node, the method further includes steps S210 to S220, wherein:
[0115] S210, if the model type of the first simulation node is detected to be mismatched with its own model type, a target data conversion strategy that matches the model type of the first simulation node is selected from multiple preset data conversion strategies.
[0116] The preset data conversion strategy can include a bidirectional data conversion strategy between a high-resolution electromagnetic transient model and a low-resolution root-mean-square model. Specifically, when sending data from the high-resolution electromagnetic transient model to the low-resolution root-mean-square model, the data conversion strategy can include using a sliding window discrete Fourier transform algorithm to convert the high-frequency sampled three-phase instantaneous waveform generated by the electromagnetic transient into the fundamental complex phasor required for the root-mean-square model. For example, for a sequence x[n] containing N sampling points, its fundamental component complex DFT coefficients... for:
[0117]
[0118] The magnitude of the root mean square phasor obtained from this and phase angle :
[0119]
[0120]
[0121] When sending data from a low-resolution root mean square model to a high-resolution electromagnetic transient model, the data conversion strategy may include: using a direct waveform synthesis method to generate a high-resolution three-phase sinusoidal waveform based on the amplitude and phase angle provided by the root mean square model.
[0122] In practice, the target data conversion strategy can be determined by referring to the data conversion strategies corresponding to the data flow of the different data types mentioned above, based on the model type of the power grid simulation sub-model of its own simulation node and the model type of the power grid simulation sub-model of the first simulation node.
[0123] S220, perform data conversion on the first simulation data according to the target data conversion strategy.
[0124] In practical implementation, when the model type of the simulation node is an electromagnetic transient model and the model type of the first simulation node is a root mean square (RMS) model, a heterogeneous model interface within the simulation node can be used. A sliding window discrete Fourier transform algorithm is employed to convert the high-frequency sampled three-phase instantaneous waveforms generated by the electromagnetic transient into the fundamental complex phasors required for the RMS model. Alternatively, when the model type of the simulation node is a RMS model and the model type of the first simulation node is an electromagnetic transient model, a heterogeneous model interface within the simulation node can be used. A direct waveform synthesis method is employed to generate high-resolution three-phase sinusoidal waveforms based on the amplitude and phase angle information provided by the RMS model.
[0125] In this embodiment, the data conversion strategy can adapt to the data interaction between heterogeneous models in different co-simulation scenarios, thereby improving the applicability of power grid co-simulation.
[0126] In an exemplary embodiment, after performing data compensation on the second simulation data to obtain the data-compensated second simulation data, the method further includes S450 and S460, wherein:
[0127] S450, when the resolution of the power grid simulation sub-model is lower than the resolution of the power grid simulation sub-model of the second simulation node, determine the error between the predicted value of the first simulation data and the data-compensated second simulation data.
[0128] S460, based on the error and the preset correction gain, corrects the target variable in the first simulation data to obtain the corrected first simulation data, and sends the corrected first simulation data to the first simulation node.
[0129] In distributed co-simulation of power grids, different sub-models have different dynamic process timescales. To save computational resources, different simulation step sizes are set for them. For example, the simulation step size of the root mean square (RMS) model is relatively large (e.g., 10 seconds), while the simulation step size of the electromagnetic transient model is relatively small (e.g., 50 microseconds), resulting in multi-rate simulation. However, during multi-rate co-simulation, some state variables of the model (such as the amplitude and phase angle of the interface bus voltage) may shift. To address this issue, a prediction-correction feedback loop mechanism is adopted. At each large step time point t of the RMS model, the error between the predicted value of the simulation data of the RMS model at the next simulation time step and the high-precision simulation value of the electromagnetic transient model is calculated. This information is then fed back to the root mean square model for state correction. For example, the phase angle of the root mean square model is corrected:
[0130]
[0131] in, The corrected phase angle; To predict the phase angle, The correction gain is an adjustable parameter used to balance correction speed and numerical stability.
[0132] In this embodiment, the drift problem of the target variable in the multi-rate co-simulation scenario is considered. The model is corrected through prediction and correction feedback, which improves the reliability of the power grid co-simulation.
[0133] Based on the same inventive concept, in an exemplary embodiment, such as Figure 1 As shown, this application provides a power grid co-simulation system, which includes multiple simulation nodes 120 respectively connected to a main control platform 110, wherein:
[0134] The main control platform 110 is configured to: acquire the power grid simulation model, divide the power grid simulation model to obtain multiple power grid simulation sub-models and configuration files for each power grid simulation sub-model, and distribute the configuration files of each power grid simulation sub-model to each simulation node to instruct each simulation node to perform joint simulation.
[0135] Simulation node 120 is configured to perform co-simulation using the steps described in any of the above-mentioned power grid co-simulation method embodiments.
[0136] The power grid simulation model can include parameters, status information, and connection relationships of power grid equipment. Power grid equipment includes, but is not limited to, generators, transformers, and transmission lines.
[0137] In practice, an operator can upload a power grid simulation model to the main control platform via a terminal. The main control platform then segments the power grid simulation model according to simulation requirements, resulting in multiple sub-models and generating configuration files for each sub-model. For example, an operator uploads a complete distribution network model to the main control platform via a terminal. In this distribution network structure, the power source is from the upstream power grid; the load areas include residential, commercial, and industrial areas; photovoltaic systems are installed on the rooftops of residential and industrial areas, and the photovoltaic systems in the industrial area are extensively connected via power electronic inverters; and automatically switching capacitor banks are installed in the middle of the lines for reactive power compensation. Subsequently, the main control platform segments the distribution network model, resulting in sub-model 1: feeders for residential and commercial areas; sub-model 2: feeders for the industrial area; and sub-model 3: the backbone network and the central control system. After generating configuration files for each sub-model, the configuration files are synchronously distributed to the corresponding simulation nodes. For example, the main control platform distributes the configuration files for sub-models 1-3 to simulation nodes A, B, and C, respectively.
[0138] After receiving the configuration file of the sub-model, the simulation node loads the power grid simulation sub-model according to the configuration file and starts the joint simulation synchronously. Here, the implementation method of the simulation node to perform joint simulation refers to the implementation steps in the above power grid joint simulation method embodiment, and will not be repeated here.
[0139] In this embodiment, a unified power grid co-simulation system architecture is constructed to manage simulation nodes in different geographical locations, which improves the scalability of simulation nodes in co-simulation. At the same time, the simulation model is segmented and simulation tasks are distributed through the main control platform. Simulation nodes dynamically select data compensation strategies based on real-time network status information and dynamic signal measurement to cope with the latency and jitter of the wide area network. Thus, simulation accuracy, computational efficiency and operational stability are balanced in the wide area network with limited bandwidth, realizing robust and efficient co-simulation of large-scale power systems.
[0140] In one exemplary embodiment, such as Figure 5 As shown, the main control platform 110 includes a model segmentation module 112, which is configured as follows:
[0141] Determine the communication cost weight and electrical stiffness weight of the edges between bus nodes in the power grid simulation model.
[0142] A weighted undirected graph of the power grid simulation model is generated based on the communication cost weight and electrical stiffness weight of each side.
[0143] Iteratively reduce the number of nodes in the weighted undirected graph to obtain multiple weighted undirected subgraphs with the number of nodes decreasing sequentially.
[0144] The nodes in the weighted undirected subgraph with the fewest nodes are partitioned to obtain multiple node sets.
[0145] The node set of the weighted undirected subgraph with the fewest nodes is projected layer by layer onto the weighted undirected subgraph to generate a partitioning scheme for the power grid simulation model.
[0146] Based on the segmentation scheme of the power grid simulation model, configuration files for multiple power grid simulation sub-models are generated.
[0147] The communication cost weight is determined by the number of signals to be exchanged, while the electrical stiffness weight characterizes the sensitivity of the branch to changes in the overall network load.
[0148] In practice, a power grid simulation model in CIM format is imported, and electrical equipment such as buses, lines, and transformers are extracted from the model. Buses are used as vertices in the graph, and lines and transformers are used as edges between these vertices. Then, communication cost weights and electrical stiffness weights are added to the edges. Specifically, the communication cost weight is determined by counting the number of variables that need to be exchanged on the edge, and then the electrical stiffness weight is determined using the following formula:
[0149]
[0150] In the formula Indicates the weighting factor; This indicates that when generator node i injects a unit of active power and load node j absorbs a unit of active power, the line... Transmitted active power; Represents a load set; This represents a set of power sources.
[0151] This generates a weighted undirected graph of the power grid simulation model. Where V represents the set of points, corresponding to the busbar, and E represents the set of edges, corresponding to lines or transformers, etc. This represents the communication cost weight on the edge. Electrical stiffness weight on the edge.
[0152] After generating the weighted undirected graph, the weighted undirected graph is iteratively reduced using algorithms such as multiple edge matching. The number of nodes in the graph is used to obtain multiple weighted undirected subgraphs with the number of nodes decreasing sequentially. …, The heavy edge matching algorithm calculates the similarity between nodes and prioritizes matching nodes with high similarity to form "supernodes," thereby reducing the size of the weighted undirected graph and creating a coarser graph with fewer nodes. Specifically, for a weighted undirected graph... The unmatched bus nodes a and u can be determined by the sum of the communication cost weight and the electrical stiffness weight of the edge between the two bus nodes. + If the weights and values + If the preset merging conditions are met, then mother node a and mother node u are merged into a single mother node au (i.e., a supernode), inheriting the connection relationship between mother nodes a and u, and updating the edge weights. This node matching and merging process is repeated until the number of nodes in the weighted undirected subgraph is less than a preset value, resulting in multiple weighted undirected subgraphs with progressively decreasing node counts. …, .
[0153] After obtaining multiple weighted undirected subgraphs, the spectral scoring algorithm is used to select the weighted undirected subgraph with the fewest nodes. The nodes in the graph are divided into two sets. Specifically, this can be done by first constructing the graph. The Laplace matrix L is obtained, and then the eigenvalues and corresponding eigenvectors of the Laplace matrix L are solved. In this embodiment, the eigenvector f corresponding to the second smallest eigenvalue is selected to represent the partitioning trend. Then, for the parent node i, the eigenvector f is determined based on the element values of the eigenvector f. The sign of the sign divides the network nodes into two sets. For example, if... If >0, then the bus node i is assigned to node set A. If the value is less than 0, then the bus node i is assigned to the node set B.
[0154] The weighted undirected subgraph with the fewest nodes After the nodes in the graph are divided into two sets, the smallest weighted undirected subgraph is used as the starting point. Begin with the smallest weighted undirected subgraph The node partitioning scheme (node set) is projected back to the original weighted undirected graph layer by layer. Meanwhile, in order to simultaneously consider both communication volume and electrical stiffness, for any edge in the diagram... Define the composite cost function for: ,in and These are user-configurable weight factors that perform local optimization at each layer based on the composite cost of the edges. Specifically, using a graph... Given the current weighted undirected subgraph, the graph... The set of nodes is mapped to the upper-level graph. In the middle, we obtain the diagram. Two sets of nodes, then, on the graph Run the FM (Fiduccia-Mattheyses) algorithm to optimize the graph. The two sets of nodes are defined. Specifically, the optimization process is as follows: First, traverse all boundary bus nodes (the neighbor nodes of the bus node are in the other node set), and check whether the difference in the number of nodes in the two node sets exceeds a preset difference threshold (e.g., ±5%). If the difference does not exceed the difference threshold, calculate the reduction in the composite cost of the edge if the boundary bus node is moved to the other node set. Then, select the boundary bus node with the largest reduction in composite cost and move it to the other node set. Repeat the above process until optimization is no longer possible, resulting in the graph. The optimized set of two nodes. For the next round of projection: the graph... Projecting the optimized node set onto the graph In the middle, and based on the composite cost of the edges, the projected graph is... Optimize the node set to obtain the graph. The optimized two sets of nodes (i.e., the node partitioning scheme) are then projected and optimized layer by layer until a weighted undirected subgraph is obtained. The weighted undirected subgraph is obtained. The optimized set of two nodes yields the model partitioning scheme. Subsequently, configuration files for the power grid simulation sub-models are automatically generated. It's understandable that when the required number of partitioned power grid simulation sub-models is multiple, further partitioning can be performed based on the generated sub-models to ensure the final number of partitioned sub-models meets the requirements.
[0155] In this embodiment, during model segmentation, the electrical stiffness between computational nodes is incorporated into the cost function to form a composite cost function. This allows the power grid simulation model to be abstracted into a weighted directed graph, and the bus nodes in the weighted directed graph to be partitioned according to the composite cost. This generates a model segmentation scheme that places the simulation interface at the position with the weakest electrical coupling, thereby reducing the system's sensitivity to network latency from a physical perspective.
[0156] In one exemplary embodiment, such as Figure 5 As shown, the main control platform 110 also includes a task orchestration module 114, wherein:
[0157] Simulation node 120 is also configured to: acquire the simulator's running data of the power grid simulation sub-model and send the running data to task orchestration module 114.
[0158] The task orchestration module 114 is configured to: receive the running data sent by each simulation node 120, evaluate the health of the power grid joint simulation system based on the running data, and push alarm information when the health is lower than the preset health threshold.
[0159] The simulator's runtime data may include computation step size, solver iteration count, CPU utilization, memory usage, and network status information.
[0160] In practice, each simulation node runs a lightweight agent with an independent thread. Without interfering with the simulator's operation, it continuously obtains the current time and the number of solver iterations through the simulator interface, and obtains CPU usage, memory usage, etc. by calling the operating system interface. It then sends this running data to the task orchestration module of the main control platform.
[0161] After receiving the running data sent by each simulation node, the task orchestration module can compare various types of running data with the corresponding running data thresholds to determine the score of each type of running data. Then, it can determine the system health based on the score of each type of running data through a weighted scoring method. If the health is detected to be lower than the preset health threshold, an alarm message will be pushed.
[0162] In other embodiments, for each simulation node, the CPU utilization rate sent by the simulation node can be compared with a preset CPU utilization rate threshold, and the memory utilization rate can be compared with a preset memory utilization rate threshold. If both the CPU utilization rate and memory utilization rate are detected to exceed the preset CPU utilization rate threshold and the memory utilization rate is detected to exceed the preset memory utilization rate threshold, the simulation node is determined to be computationally overloaded, and an alarm message is pushed to prompt the operator to intervene and issue a simulation pause command to the simulation node. Alternatively, if a network latency is detected to be greater than a preset alarm threshold, an alarm message can be pushed to prompt the operator to intervene and issue a simulation pause command to the simulation node.
[0163] In this embodiment, the reliability of the joint simulation is improved by managing the joint simulation tasks through real-time monitoring of the joint simulation system's operating status by the main control platform.
[0164] To provide a clearer explanation of the power grid co-simulation method and system provided in this application, a specific embodiment is described below:
[0165] In this embodiment, as Figure 6 As shown, the power grid co-simulation system comprises multiple geographically dispersed simulation nodes and a main control platform. Each simulation node includes at least one real-time simulator and simulation middleware, and the simulation nodes are interconnected via a wide area network. The simulation middleware includes an adaptive synchronization engine, a data exchange module, and a heterogeneous model interface. The main control platform includes a model segmentation module and a task orchestration module.
[0166] (1) Preparation stage (offline): First, the complete power grid model is uploaded through the main control platform. The model segmentation module of the main control platform segments the model and generates a model segmentation scheme for the power grid simulation sub-model. After the user confirms the scheme, the platform automatically generates the configuration file of the power grid simulation sub-model for each simulation node.
[0167] (2) Initialization Phase: Initialization commands are issued through the main control platform. The main control platform coordinates each simulation node to load its respective power grid simulation sub-model. At this time, the simulation middleware of each simulation node starts, and its built-in adaptive synchronization engine begins to probe each other through the network detection module to obtain network status information. Simultaneously, the heterogeneous model interface completes the configuration of model type identification and data conversion strategies.
[0168] (3) Execution Phase (Real-time): Execution commands are issued through the main control platform. Simulators on all simulation nodes synchronously begin calculations. At each simulation time step, the simulator delivers the data (first simulation data) to be sent to the remote simulation node (second simulation node) to the local simulation middleware. Subsequently, the heterogeneous model interface of the simulation middleware converts the data according to the model type of the remote simulation node using a matching data conversion strategy. Then, the data exchange module of the simulation middleware packages the data, marks its priority, and sends it to the remote simulation node via UDP (User Datagram Protocol). Throughout the execution phase, the active network detection module of the adaptive synchronization engine of each simulation node acquires network status information and sends it to the intelligent decision logic module, while the signal analysis module acquires dynamic signal measurements and sends them to the intelligent decision logic module. For the receiving simulation node, its simulation middleware receives the data packet and delivers it to the adaptive synchronization engine. The intelligent decision logic module in the engine selects the target data compensation strategy from the multi-mode prediction algorithm library and sends it to the prediction compensation module. The prediction compensation module performs data compensation on the second simulation data and transmits the compensated second simulation data to the local simulator.
[0169] (4) Monitoring and Intervention: Throughout the operation phase, the agents of each simulation node continuously report the operating data of the local simulator to the main control platform. The main control platform evaluates the health of the system based on the operating data and displays the system health status on the visualization interface. If an anomaly occurs, the platform will issue an alarm, and the user can manually pause the simulation or the system can pause it automatically.
[0170] (5) End phase: The user issues a stop command through the platform, and the platform coordinates all simulation nodes to stop the simulation synchronously, and collects and archives the simulation data.
[0171] Functional description of the simulation middleware for simulation nodes:
[0172] 1. Adaptive Synchronization Engine. The structure and workflow of the adaptive synchronization engine are as follows: Figure 7 As shown, at each simulation time step, the engine first obtains the latest network state and signal dynamic characteristics from the network detection module and signal analysis module, forming the current state vector. Then, this state vector is input to the intelligent decision-making logic module. The intelligent decision-making logic module outputs a target data compensation strategy according to preset rules. Finally, the engine calls the target data compensation strategy from the algorithm library, calculates the received simulation data carrying delay, generates compensated data, and sends it to the local simulator. Simultaneously, the prediction error and its impact on system stability are used as feedback for the next round of decision-making and online learning and optimization of the intelligent logic.
[0173] Its technical content includes:
[0174] a. Outside of the main simulation loop, the active network probing module continuously sends lightweight probe packets between simulation nodes to accurately measure real-time round-trip time, one-way latency, and network jitter.
[0175] b. The multi-mode prediction algorithm library has built-in various data prediction / extrapolation algorithms, such as linear extrapolation, second-order polynomial extrapolation, zero-order hold, Kalman filtering, etc.
[0176] c. The intelligent decision-making logic module automatically selects the optimal prediction algorithm based on the real-time network status and the dynamic characteristics of the switching signals. The real-time network status considers latency and jitter severity, while the dynamic characteristics of the switching signals include the recent rate of change of the signal. The specific operation is as follows:
[0177] (1) Input network state metrics, signal dynamic metrics, and prediction performance metrics decision indicators.
[0178] Among them, network state metrics include average latency Network jitter Packet loss rate Signal dynamics metrics are calculated from a sequence of received historical signal values, including the rate of change. and acceleration .
[0179]
[0180]
[0181] In the formula, Indicates the signal; k represents the signal sequence number; Describes the time interval of a signal sequence; Indicates the maximum value within the sampling period; This represents the k-th signal sample value; This represents the k-th rate of change.
[0182] (2) Construct a rule-based heuristic selection, with the main decision logic as follows:
[0183] if or , Indicates the network jitter threshold; This represents the packet loss rate threshold; the network is extremely unstable, and any trend-based prediction is unreliable. The most robust algorithm must be used to ensure that the system does not crash, so zero-order hold is chosen.
[0184] Otherwise, if The signal exhibits strong nonlinear dynamics, requiring complex models to capture its behavior, so we switch to a Kalman filter;
[0185] Otherwise, if The signal has significant curvature, and the linear model is insufficient to accurately describe it, so we switch to second-order polynomial extrapolation.
[0186] Otherwise, if , This represents the network latency threshold; when the network is stable and the signal changes smoothly, linear prediction is the most cost-effective option, so switch to first-order linear extrapolation.
[0187] Otherwise, the zero-order hold is selected by default.
[0188] 2. Data Exchange Module. The data exchange module categorizes simulation data into different data types and maps them to different network service levels. Through a hierarchical hybrid scheduling mechanism combining strict priority queues and differentially weighted round-robin scheduling, it ensures minimal latency transmission of critical control and event data while providing fair bandwidth allocation for other data types. Its technical components include:
[0189] (1) Prioritize the data and map the Critical Control and Event Data (CCE) to the highest network priority; the Continuous State Variable Data (CSV) to the medium network priority; and the System Measurement and Monitoring Data (SMM) to the lowest network service level.
[0190] CCE (Circuit Breaker Command) and fault signals require extremely high timeliness and reliability. CSV (Voltage and Current Parameters) prioritize timeliness, with slightly lower reliability requirements. SMM (Power and Frequency Parameters) have the highest tolerance for delay and packet loss.
[0191] (2) A hierarchical hybrid scheduling architecture is adopted. First, the priority queue is checked. If it is not empty, the highest priority CCE data is processed. If it is empty, a data packet from the CSV or SMM queue is served according to the differential weighted round-robin algorithm. After each service, the process immediately returns to check the priority queue. This architecture ensures that critical data has absolute priority, while other data can fairly share the remaining bandwidth according to their weights during gaps when there are no urgent events.
[0192] 3. Heterogeneous Module Interface. The interface identifies the model types of heterogeneous simulators through an initial handshake protocol, performs bidirectional dynamic data conversion, and maintains consistency of cross-model state variables through correction to prevent drift. The specific process is as follows:
[0193] (1) During the simulation initialization phase, a three-way handshake protocol is used to exchange structured XML files to interact with metadata, including model type, base frequency, step size and interface variables, so as to realize automatic configuration of the interface.
[0194] (2) The interface performs dynamic data transformation based on the identified model type.
[0195] When sending data from a high-resolution electromagnetic transient model to a low-resolution root-mean-square model, the interface uses a sliding window discrete Fourier transform algorithm to convert the high-frequency sampled three-phase instantaneous waveforms generated by the electromagnetic transient into the fundamental complex phasors required for the root-mean-square model.
[0196] For a sequence x[n] containing N sampling points, its fundamental component complex DFT coefficients for:
[0197]
[0198] The root mean square phasor amplitude obtained from this and phase angle :
[0199]
[0200]
[0201] When sending data from a low-resolution root mean square model to a high-resolution electromagnetic transient model, the interface uses a direct waveform synthesis method to generate a high-resolution three-phase sinusoidal waveform based on the amplitude and phase angle information provided by the root mean square model.
[0202] (3) Model calibration
[0203] To address the drift problem of key state variables in multi-rate simulations, a prediction-correction feedback loop mechanism is employed. At each large-step time point t of the root mean square model, the error between the predicted value of the root mean square model and the high-precision simulation value of the electromagnetic transient model is calculated via an interface. And feed it back to the root mean square model for state correction:
[0204]
[0205] in, The corrected phase angle; To predict the phase angle, The correction gain is an adjustable parameter used to balance correction speed and numerical stability.
[0206] Functional introduction of the main control platform:
[0207] 1. Model segmentation module:
[0208] Before the simulation begins, the model segmentation module of the main control platform calculates the electrical stiffness between nodes and incorporates it as a core constraint into the cost function. This generates a model segmentation scheme that places the simulation interface at the weakest electrical coupling position, thereby reducing the system's sensitivity to network latency from a physical perspective. The specific steps are as follows:
[0209] (1) Import the power grid model in CIM format and convert it into a weighted undirected graph. , where V represents the set of points, corresponding to the busbar, and E represents the set of edges, corresponding to the line or transformer. This represents the communication cost weight on the edge, which is the number of signals that need to be exchanged. The specific formula for calculating the electrical stiffness weight on the edge is as follows:
[0210]
[0211] In the formula Indicates the weighting factor; This indicates that when generator node i injects a unit of active power and load node j absorbs a unit of active power, the line... Transmitted active power; Represents a load set; This represents a set of power sources.
[0212] (2) Using algorithms such as multiple edge matching, edge shrinkage is performed iteratively to shrink the original weighted directed graph. Simplified into a series of graphs of decreasing size …, .
[0213] (3) For the coarsest graph By applying the spectral bisector algorithm, the eigenvector corresponding to the second smallest eigenvalue of the Laplacian matrix of the graph is calculated, and the nodes are divided into two parts according to the sign of each element in the vector.
[0214] (4) The rough map The partitioning scheme is projected back to the original graph layer by layer, and local optimization is performed at each layer. The Fiduccia-Mattheyses (FM) algorithm is used for partitioning to generate the model segmentation scheme. During the segmentation process, in order to simultaneously consider communication traffic and electrical stiffness, for any edge in the graph... Define the composite cost function for: ,in and It is a user-configurable weighting factor.
[0215] (5) Automatically generate sub-model configuration files according to the model segmentation scheme so that they can be deployed to various simulators.
[0216] 2. Simulation Task Orchestration Module:
[0217] A lightweight agent runs on each simulation node, which continuously collects local simulator runtime data, such as computation step size, solver iteration count, CPU load, and network communication data, and reports it to the main control platform.
[0218] The simulation task orchestration module gathers all telemetry data and evaluates the health of the entire co-simulation system in real time using set thresholds and algorithms. When it detects early signs of computational overload on a node, network latency exceeding a critical value, or numerical oscillations, the system will immediately issue an alarm to the user and can be configured to automatically pause the simulation, awaiting manual intervention.
[0219] In an exemplary embodiment, taking a remote co-simulation of a distribution network containing large-scale photovoltaic and energy storage as an example, the collaborative operation of the modules in the above system is illustrated:
[0220] Simulation node A serves as the master analysis station, running a real-time simulator and employing an electromechanical transient (RMS) model to simulate a distribution network including traditional power sources and loads. The RMS model uses a relatively large calculation step, such as 10 minutes, primarily focusing on system stability and power flow distribution. Simulation node B represents a renewable energy station, running a real-time simulator and employing an electromagnetic transient (EMT) model to finely simulate a large photovoltaic power station, its grid-connected inverter, and its associated battery energy storage system. The EMT model uses a smaller calculation step, such as 50 microseconds, focusing on the inverter's rapid control, harmonics, and fault ride-through behavior.
[0221] The current research focuses on the impact of the low-voltage ride-through capability of photovoltaic power plants and their coordinated control with energy storage systems on the local voltage stability of the distribution network during voltage dip faults in the main grid. The specific experimental steps are as follows:
[0222] (1) Offline model segmentation:
[0223] Before the simulation begins, the user uploads the complete distribution network model to the main control platform. The model segmentation module automatically analyzes the data and calculates that the grid connection point (PCC) of the photovoltaic power plant has weak electrical coupling with the main grid, thus determining the PCC as the optimal segmentation point. Based on this, the platform automatically generates two sub-models: an RMS model for simulating node A and an EMT model for simulating node B.
[0224] (2) Heterogeneous interfaces and data exchange:
[0225] After the simulation begins, the heterogeneous model interface between simulation node A and simulation node B starts working. The RMS simulator at simulation node A calculates the voltage phasor at the PCC point and sends it to simulation node B via the interface. The interface module at simulation node B uses waveform synthesis technology to convert this phasor into a high-resolution three-phase sinusoidal voltage waveform, which serves as the boundary condition for its EMT model. The EMT simulator at simulation node B calculates the instantaneous current injected into the PCC by the photovoltaic and energy storage systems and sends it to simulation node A via the interface. The interface module at simulation node A uses DFT (Discrete Fourier Transform) technology to extract the fundamental current phasor from this phasor, which serves as the equivalent current source for its RMS model.
[0226] (3) Data exchange module:
[0227] During the simulation, the data exchange module categorizes the data. Voltage and current phasor / waveform data at the PCC point are classified as medium-priority status data (CSV). When the inverter protection of simulation node B issues a trip command, this command is classified as high-priority event data (CCE). In the event of network congestion, the SP-DWRR (Strict Priority-Weighted Round Robin Scheduler) scheduler prioritizes the transmission of trip commands, ensuring that simulation node A receives this critical event with minimal delay, thereby accurately simulating the cascading effect.
[0228] (4) Adaptive time synchronization:
[0229] Suppose that during a main network failure, the latency and jitter of the wide area network (WAN) suddenly increase. The intelligent decision logic of the adaptive time synchronization engine monitors this change in real time and analyzes that the current signal at the PCC point undergoes a drastic transient change due to the failure. Based on this, the decision logic automatically switches the latency compensation algorithm from a high-precision "second-order polynomial extrapolation" to a more robust "zero-order hold," sacrificing temporary prediction accuracy to ensure the numerical stability of the entire co-simulation system under the impact of the failure and prevent simulation collapse.
[0230] (5) Global monitoring:
[0231] Throughout the process, the main control platform monitors the computational load of simulation nodes A and B in real time, the network latency between them, the switching of prediction algorithms, and the voltage and current waveforms at the PCC point. Researchers can observe the entire process—from fault occurrence and inverter low-voltage ride-through control response to increased network jitter, prediction algorithm switching, and finally, system stabilization—through a visualization interface, thus effectively verifying the grid-connected control strategy for new energy sources.
[0232] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0233] In one exemplary embodiment, such as Figure 8 As shown, a power grid co-simulation device 600 is provided, applied to simulation nodes of a power grid co-simulation system. The power grid co-simulation system includes multiple simulation nodes respectively connected to a main control platform. The device includes: a simulator module 610, a data exchange module 620, and a data compensation module 630, wherein:
[0234] The simulator module 610 is used to receive the configuration file of the power grid simulation sub-model issued by the main control platform, load the power grid simulation sub-model according to the configuration file, and the power grid simulation sub-model is obtained by the main control platform by dividing the power grid simulation model; for each simulation time step, the power grid simulation sub-model is run to obtain the first simulation data of the power grid simulation sub-model;
[0235] Data exchange module 620 is used to send the first simulation data to the first simulation node and receive the second simulation data sent by the second simulation node;
[0236] The data compensation module 630 is used to acquire network status information and signal dynamic measurement, and to perform data compensation on the second simulation data based on the network status information and the signal dynamic measurement to obtain the data-compensated second simulation data.
[0237] The simulator module 610 is also used to run the power grid simulation sub-model based on the second simulation data after data compensation, and obtain the first simulation data of the power grid simulation sub-model.
[0238] In an exemplary embodiment, the data compensation module 630 is further configured to send network status detection packets to the second simulation node to obtain network status information; analyze the second simulation data under historical simulation time steps to obtain signal dynamic measurement; select a target data compensation strategy from multiple preset data compensation strategies based on the network status information and the signal dynamic measurement; and perform data compensation on the second simulation data according to the target data compensation strategy.
[0239] In an exemplary embodiment, the data compensation module 630 is further configured to: determine the zero-order hold strategy as the target data compensation strategy if the packet loss rate is greater than or equal to a preset packet loss rate threshold, or the network jitter is greater than or equal to a preset network jitter threshold; otherwise, determine the filter strategy as the target data compensation strategy if the acceleration is greater than or equal to a preset acceleration threshold; otherwise, determine the first-order linear extrapolation strategy as the target data compensation strategy if the rate of change is greater than or equal to a preset rate of change threshold; otherwise, determine the first-order linear extrapolation strategy as the target data compensation strategy if the network latency is less than or equal to a preset minimum network latency; otherwise, determine the zero-order hold strategy as the target data compensation strategy.
[0240] In an exemplary embodiment, the data exchange module 620 is further configured to determine the data types of different data in the first simulation data, determine the network service level of each data in the first simulation data according to the data types, write the first simulation data into a priority queue corresponding to the network service level, send the first simulation data with the highest network service level to the first simulation node when the priority queue with the highest network service level is detected to be non-empty, and send the first simulation data to the first simulation node through a weighted round-robin method when the priority queue with the highest network service level is detected to be empty.
[0241] In an exemplary embodiment, the power grid co-simulation device 600 further includes a data interaction module 640 and a data conversion module 650, wherein:
[0242] The data interaction module 640 is used to interact with other simulation nodes besides itself to obtain the metadata of the power grid simulation sub-model; and to determine the model type of the power grid simulation sub-model of other simulation nodes based on the received metadata of other simulation nodes.
[0243] The data conversion module 650 is used to select a target data conversion strategy that matches the model type of the first simulation node from a plurality of preset data conversion strategies when it is detected that the model type of the first simulation node does not match its own model type; and to perform data conversion on the first simulation data according to the target data conversion strategy.
[0244] In an exemplary embodiment, the power grid co-simulation device 600 further includes a model correction module 660, which is used to determine the error between the predicted value of the first simulation data and the data-compensated second simulation data when the resolution of the power grid simulation sub-model is lower than the resolution of the power grid simulation sub-model of the second simulation node; correct the target variable in the first simulation data according to the error and a preset correction gain to obtain the corrected first simulation data, and send the corrected first simulation data to the first simulation node.
[0245] Each module in the aforementioned power grid co-simulation device 600 can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0246] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a power grid co-simulation method.
[0247] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0248] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in any of the above embodiments of the power grid co-simulation method.
[0249] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps in any of the above embodiments of the power grid co-simulation method.
[0250] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in any of the above embodiments of the power grid co-simulation method.
[0251] It should be noted that the data involved in this application (including but not limited to data used for analysis, data stored, data displayed, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0252] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory, magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory, magnetic variable memory, ferroelectric memory, phase change memory, graphene memory, etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include blockchain-based distributed databases, etc., and are not limited thereto. The processors involved in the embodiments provided in this application can be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited thereto.
[0253] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0254] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A power grid co-simulation method, characterized in that, The application relates to a simulation node applied to a power grid joint simulation system, wherein the power grid joint simulation system comprises a plurality of simulation nodes connected with a master platform, and the method comprises the following steps: receiving a configuration file of a power grid simulation submodel issued by the master platform, loading the power grid simulation submodel according to the configuration file, and the power grid simulation submodel being obtained by segmenting a power grid simulation model by the master platform; running the power grid simulation submodel for each simulation time step to obtain first simulation data of the power grid simulation submodel; sending the first simulation data to a first simulation node; receiving second simulation data sent by a second simulation node, acquiring network state information and signal dynamic metrics, performing data compensation on the second simulation data according to the network state information and the signal dynamic metrics to obtain second simulation data after data compensation; running the power grid simulation submodel according to the second simulation data after data compensation to obtain first simulation data of the power grid simulation submodel, and returning to the step of sending the first simulation data to the first simulation node until a simulation stop instruction issued by the master platform is received.
2. The method of claim 1, wherein, The acquisition of the network state information and the signal dynamic metrics comprises the following steps: sending a network state detection packet to the second simulation node to acquire the network state information; analyzing the second simulation data at a historical simulation time step to obtain the signal dynamic metrics; The data compensation on the second simulation data according to the network state information and the signal dynamic metrics comprises the following steps: selecting a target data compensation strategy from a plurality of preset data compensation strategies according to the network state information and the signal dynamic metrics; performing data compensation on the second simulation data according to the target data compensation strategy.
3. The method of claim 2, wherein, The network state information comprises network delay, network jitter and packet loss rate, the signal dynamic metrics comprise a change rate and an acceleration of an exchanged signal, and the preset data compensation strategies comprise a zero-order hold strategy, a filter strategy, a first-order linear extrapolation strategy and a second-order polynomial extrapolation strategy; The selection of the target data compensation strategy from the plurality of preset data compensation strategies according to the network state information and the signal dynamic metrics comprises the following steps: if the packet loss rate is greater than or equal to a preset packet loss rate threshold value or the network jitter is greater than or equal to a preset network jitter threshold value, the zero-order hold strategy is determined as the target data compensation strategy; otherwise, if the acceleration is greater than or equal to a preset acceleration threshold value, the filter strategy is determined as the target data compensation strategy; otherwise, if the change rate is greater than or equal to a preset change rate threshold value, the first-order linear extrapolation is determined as the target data compensation strategy; otherwise, if the network delay is less than or equal to a preset minimum network delay value, the first-order linear extrapolation strategy is determined as the target data compensation strategy; otherwise, the zero-order hold strategy is determined as the target data compensation strategy.
4. The method of claim 1, wherein, The sending of the first simulation data to the first simulation node comprises the following steps: determining data types of different data in the first simulation data, and determining network service levels of the data in the first simulation data according to the data types. write the first simulation data into a priority queue corresponding to the network service level; in the case that the priority queue with the highest network service level is detected to be non-empty, send the first simulation data with the highest network service level to the first simulation node; in the case that the priority queue with the highest network service level is detected to be empty, send the first simulation data to the first simulation node in a weighted round-robin manner.
5. The method of claim 1, wherein, Before the step of running the power grid simulation sub-model to obtain the first simulation data of the power grid simulation sub-model, the method further comprises: interacting with other simulation nodes except itself to obtain metadata of the power grid simulation sub-model; determining the model type of the power grid simulation sub-model of other simulation nodes according to the received metadata of other simulation nodes; Before the step of sending the first simulation data to the first simulation node, the method further comprises: in the case that the model type of the first simulation node is detected to be inconsistent with the model type of itself, screening a target data conversion strategy from a plurality of preset data conversion strategies, the target data conversion strategy being matched with the model type of the first simulation node; performing data conversion on the first simulation data according to the target data conversion strategy.
6. The method according to any one of claims 1 to 5, characterized in that, After the step of performing data compensation on the second simulation data to obtain the second simulation data after data compensation, the method further comprises: in the case that the resolution of the power grid simulation sub-model is lower than the resolution of the power grid simulation sub-model of the second simulation node, determining the error between the predicted value of the first simulation data and the second simulation data after data compensation; performing correction on the target variable in the first simulation data according to the error and a preset correction gain to obtain corrected first simulation data, and sending the corrected first simulation data to the first simulation node.
7. A power grid co-simulation system, characterized in that, The system comprises a plurality of simulation nodes connected with a master control platform respectively: The master control platform is configured to: obtain a power grid simulation model, segment the power grid simulation model to obtain a plurality of power grid simulation sub-models and configuration files of the power grid simulation sub-models, and distribute the configuration files of the power grid simulation sub-models to the simulation nodes to instruct the simulation nodes to perform joint simulation; The simulation nodes are configured to perform joint simulation by using the power grid joint simulation method according to any one of claims 1 to 6.
8. The system of claim 7, wherein, The master control platform comprises a model segmentation module, and the model segmentation module is configured to: determine the communication cost weight and the electrical stiffness weight of the edges between bus nodes in the power grid simulation model; generate a weighted undirected graph of the power grid simulation model according to the communication cost weight and the electrical stiffness weight of each edge; iteratively reduce the number of nodes in the weighted undirected graph to obtain a plurality of weighted undirected sub-graphs with sequentially decreasing number of nodes; divide the nodes in the weighted undirected sub-graph with the least number of nodes to obtain a plurality of node sets; project the node sets of the weighted undirected sub-graph with the least number of nodes to the weighted undirected graph layer by layer to generate a segmentation scheme of the power grid simulation model; According to the segmentation scheme of the power grid simulation model, configuration files of a plurality of power grid simulation sub-models are generated.
9. The system of claim 7, wherein, The master control platform further comprises a task arrangement module; The simulation node is further configured to: acquire running data of a simulator of a power grid simulation sub-model, and send the running data to the task arrangement module; The task arrangement module is configured to: receive the running data sent by each simulation node, evaluate the health degree of the power grid joint simulation system according to each running data, and push alarm information in the case that the health degree is lower than a preset health degree threshold.
10. A power grid co-simulation apparatus, characterized by, The simulation node applied to a power grid joint simulation system comprises a plurality of simulation nodes connected with a master control platform respectively, and the device comprises: The simulator module is configured to receive the configuration file of the power grid simulation sub-model issued by the master control platform, load the power grid simulation sub-model according to the configuration file, and run the power grid simulation sub-model for each simulation time step to obtain first simulation data of the power grid simulation sub-model, wherein the power grid simulation sub-model is obtained by segmenting the power grid simulation model by the master control platform; The data exchange module is configured to send the first simulation data to the first simulation node and receive second simulation data sent by the second simulation node; The data compensation module is configured to acquire network state information and signal dynamic metrics, perform data compensation on the second simulation data according to the network state information and the signal dynamic metrics, and obtain second simulation data after data compensation; The simulator module is further configured to run the power grid simulation sub-model according to the second simulation data after data compensation to obtain the first simulation data of the power grid simulation sub-model.