Power system co-simulation method and device, computer equipment, readable storage medium and program product
By employing a hybrid simulation method combining positive-sequence and three-phase models in power systems, the problem of simulating the mutual influence between different levels of power grids in traditional power system simulations has been solved, achieving more efficient and accurate power system simulation.
Patent Information
- Application Number
- CN202511602154.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2026-02-13
AI Technical Summary
In traditional power system simulation, the independent modeling of the main grid, distribution network and microgrid makes it difficult to simulate the mutual influence between different levels of the power grid, resulting in low reliability of simulation results.
A hybrid simulation method combining positive sequence model and three-phase model is adopted to model the main grid, distribution network and microgrid respectively. The positive sequence model is used to perform efficient simulation of the main grid and fine simulation of the distribution network and microgrid. At each time step, information interaction and convergence judgment are performed at the boundary between the main grid and the distribution network.
It improves the accuracy and reliability of power system simulation, and can more realistically reflect the mutual influence between the three-level power grid, significantly improving the accuracy and reliability of complex power system simulation.
Smart Images

Figure CN121525263A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power system simulation technology, and in particular to a power system co-simulation method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology
[0002] With the increasing penetration of distributed energy sources such as photovoltaics and wind power in distribution networks and microgrids, modern power systems are characterized by a tightly coupled three-tiered structure of main grid, distribution network, and microgrid.
[0003] In traditional technologies, the three levels of power grid—main grid, distribution network, and microgrid—are modeled and simulated independently.
[0004] However, the integration of a high proportion of distributed energy resources has brought about new phenomena such as bidirectional power flow, microgrid islanding operation mode switching, and rapid dynamic response of a large number of inverter interface resources. These phenomena have unprecedentedly enhanced the dynamic interaction between different levels of the power grid. Disturbances in the microgrid can be transmitted to the distribution network and even affect the main grid, while faults in the main grid can quickly spread to lower-level networks. Independent modeling and simulation methods are insufficient to simulate the mutual influence among these three factors, resulting in low reliability of simulation results. Summary of the Invention
[0005] Therefore, it is necessary to provide a power system co-simulation method, device, computer equipment, computer-readable storage medium, and computer program product that can improve the reliability of simulation results, addressing the aforementioned technical problems.
[0006] Firstly, this application provides a method for collaborative simulation of a power system, wherein the power system comprises a three-tier structure of main grid, distribution network, and microgrid; the method includes:
[0007] The simulation model of the power system is obtained. The simulation model includes a positive-sequence model constructed based on the positive-sequence model region and a three-phase model constructed based on the three-phase model region. The positive-sequence model region includes the main grid, and the three-phase model region includes the distribution network and microgrid.
[0008] Simulation steps: Simulate the system state of the main grid at the current time step using a positive sequence model to obtain the current main grid state data; and simulate the system state of the distribution network and microgrid at the current time step using a three-phase model to obtain the current distribution network state data and the current microgrid state data.
[0009] Based on the current main grid status data and the current distribution network status data, if it is determined that the simulation model converges at the boundary between the main grid and the distribution network, proceed to the next time step, return to execute the simulation steps, and continue until the preset simulation termination conditions are met.
[0010] In one exemplary embodiment, prior to the simulation step, the method includes:
[0011] Obtain the time step value, and determine the current time step based on the time step value;
[0012] Predict the system state of the power system at the current time step to obtain high-order and low-order prediction results;
[0013] The norm of the difference between the higher-order prediction result and the lower-order prediction result is determined as the local truncation error at the current time step.
[0014] If the local truncation error does not exceed the preset error threshold, the simulation step is executed, and the time step value is updated according to the local truncation error and the preset error threshold. The updated time step value is negatively correlated with the local truncation error.
[0015] In an exemplary embodiment, after determining the norm of the difference between the higher-order prediction result and the lower-order prediction result as the local truncation error at the current time step, the method further includes:
[0016] If the local truncation error exceeds the preset error threshold, the time step value is updated based on the local truncation error and the preset error threshold, and the process returns to the step of determining the next time step based on the time step value, until the local truncation error does not exceed the preset error threshold. The updated time step value is negatively correlated with the local truncation error.
[0017] In one exemplary embodiment, prior to the simulation step, the method further includes:
[0018] The three-phase voltage phasors of each power grid node in the positive sequence model region are detected, and the positive sequence voltage components and negative sequence voltage components are decomposed from the three-phase voltage phasors.
[0019] Based on the positive-sequence voltage components and negative-sequence voltage components of each power grid node, the target power grid node whose voltage imbalance exceeds the preset voltage imbalance threshold is determined from each power grid node.
[0020] The target power grid node is divided into a three-phase model region, and the simulation model is updated based on the re-divided three-phase model region and the positive sequence model region.
[0021] In one exemplary embodiment, after the simulation step, the method further includes:
[0022] Based on the current main grid status data and the current distribution network status data, if the simulation model fails to converge at the boundary between the main grid and the distribution network, the target boundary node that has not converged is determined.
[0023] The Anderson acceleration method is used to iteratively update the boundary variables of the target boundary nodes until convergence occurs at the boundary between the main grid and the distribution network.
[0024] In an exemplary embodiment, the positive-sequence model includes a Thevenin equivalent model for the equivalent three-phase model region; in each iteration of the method for iteratively updating the boundary variables of the target boundary nodes using the Anderson acceleration method, the method further includes:
[0025] Obtain the voltage and current phasors of the target boundary node in the current iteration round;
[0026] Based on the voltage phasor and current phasor, the parameter vector of the Thevenin equivalent model is updated using the recursive least squares method.
[0027] The Anderson acceleration method is adopted, and the boundary variables of the target boundary nodes are iteratively updated based on the updated positive order model.
[0028] In one exemplary embodiment, the method is executed by a central processing unit (CPU), and the simulation steps include multiple sub-steps, each of which is assigned by the CPU to a different graphics processing unit (GPU) for execution.
[0029] Secondly, this application also provides a power system co-simulation device, comprising:
[0030] The acquisition module is used to acquire the simulation model of the power system. The simulation model includes a positive-sequence model constructed based on the positive-sequence model region and a three-phase model constructed based on the three-phase model region. The positive-sequence model region includes the main grid, and the three-phase model region includes the distribution network and microgrid.
[0031] The simulation module is used to perform the simulation steps: simulate the system state of the main grid at the current time step using the positive sequence model to obtain the current main grid state data, and simulate the system state of the distribution network and microgrid at the current time step using the three-phase model to obtain the current distribution network state data and the current microgrid state data.
[0032] The advancement module is used to advance to the next time step and return to execute the simulation steps when the simulation model is determined to converge at the boundary between the main grid and the distribution network based on the current main grid status data and the current distribution network status data, until the preset simulation termination conditions are met.
[0033] Thirdly, 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 perform the following steps:
[0034] The simulation model of the power system is obtained. The simulation model includes a positive-sequence model constructed based on the positive-sequence model region and a three-phase model constructed based on the three-phase model region. The positive-sequence model region includes the main grid, and the three-phase model region includes the distribution network and microgrid.
[0035] Simulation steps: Simulate the system state of the main grid at the current time step using a positive sequence model to obtain the current main grid state data; and simulate the system state of the distribution network and microgrid at the current time step using a three-phase model to obtain the current distribution network state data and the current microgrid state data.
[0036] Based on the current main grid status data and the current distribution network status data, if it is determined that the simulation model converges at the boundary between the main grid and the distribution network, proceed to the next time step, return to execute the simulation steps, and continue until the preset simulation termination conditions are met.
[0037] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0038] The simulation model of the power system is obtained. The simulation model includes a positive-sequence model constructed based on the positive-sequence model region and a three-phase model constructed based on the three-phase model region. The positive-sequence model region includes the main grid, and the three-phase model region includes the distribution network and microgrid.
[0039] Simulation steps: Simulate the system state of the main grid at the current time step using a positive sequence model to obtain the current main grid state data; and simulate the system state of the distribution network and microgrid at the current time step using a three-phase model to obtain the current distribution network state data and the current microgrid state data.
[0040] Based on the current main grid status data and the current distribution network status data, if it is determined that the simulation model converges at the boundary between the main grid and the distribution network, proceed to the next time step, return to execute the simulation steps, and continue until the preset simulation termination conditions are met.
[0041] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0042] The simulation model of the power system is obtained. The simulation model includes a positive-sequence model constructed based on the positive-sequence model region and a three-phase model constructed based on the three-phase model region. The positive-sequence model region includes the main grid, and the three-phase model region includes the distribution network and microgrid.
[0043] Simulation steps: Simulate the system state of the main grid at the current time step using a positive sequence model to obtain the current main grid state data; and simulate the system state of the distribution network and microgrid at the current time step using a three-phase model to obtain the current distribution network state data and the current microgrid state data.
[0044] Based on the current main grid status data and the current distribution network status data, if it is determined that the simulation model converges at the boundary between the main grid and the distribution network, proceed to the next time step, return to execute the simulation steps, and continue until the preset simulation termination conditions are met.
[0045] The aforementioned power system co-simulation method, device, computer equipment, computer-readable storage medium, and computer program product first construct a hybrid simulation model integrating a positive-sequence model and a three-phase model to accurately characterize the characteristics of different regions of the system. The main grid region is modeled using a computationally efficient positive-sequence model, while the distribution network and microgrid regions, which are sensitive to power quality and exhibit significant three-phase imbalance, are modeled using a more refined three-phase model. During the simulation, the main grid, distribution network, and microgrid are simulated in parallel or sequentially at each time step to obtain current main grid state data, current distribution network state data, and current microgrid state data. Emphasis is placed on information exchange and convergence judgment at the boundary interfaces between the main grid and distribution network. Simulation only proceeds to the next time step when the boundary states converge, thereby improving the coordination and consistency of dynamic responses among different models. By constructing an integrated co-simulation framework for the main grid, distribution network, and microgrid, the shortcomings of traditional independent modeling methods in dynamic interaction and boundary response modeling can be effectively overcome. This allows for a more realistic reflection of the mutual influence between the three levels of the power grid, significantly improving the accuracy and reliability of complex power system simulations. Attached Figure Description
[0046] 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.
[0047] Figure 1 This is a flowchart illustrating a power system co-simulation method in one embodiment of this application;
[0048] Figure 2 This is a flowchart illustrating the time step value update step in one embodiment of this application;
[0049] Figure 3 This is a flowchart illustrating the simulation model update steps in one embodiment of this application;
[0050] Figure 4 This is a structural block diagram of a power system co-simulation device in one embodiment of this application;
[0051] Figure 5 This is an internal structural diagram of a computer device in one embodiment of this application. Detailed Implementation
[0052] 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.
[0053] In one exemplary embodiment, such as Figure 1 As shown, a power system co-simulation method is provided. This embodiment illustrates the application of this method to a terminal, where the terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. It is understood that this method can also be applied to a server, and can also be applied to a system including a terminal and a server, and implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps 102-106. Wherein:
[0054] Step 102: Obtain the simulation model of the power system. The simulation model includes a positive-sequence model constructed based on the positive-sequence model region and a three-phase model constructed based on the three-phase model region. The positive-sequence model region includes the main grid, and the three-phase model region includes the distribution network and microgrids.
[0055] The power system comprises a three-tiered structure: the main grid, distribution networks, and microgrids. The main grid typically refers to high-voltage or ultra-high-voltage transmission networks, responsible for the long-distance transmission of large-capacity electrical energy. It features a relatively balanced three-phase structure and is generally symmetrical. The distribution network connects the main grid to end users, operates at lower voltage levels, and is susceptible to three-phase imbalances due to the integration of distributed power sources. Microgrids are small local power grids containing distributed power sources, loads, and energy storage. They typically operate in low-voltage three-phase or single-phase mode and possess the capability to switch between grid-connected and islanded modes.
[0056] To accurately and efficiently simulate this three-level structure, this embodiment constructs a corresponding simulation model, whose overall structure includes two modeling regions: a positive-sequence model built based on the positive-sequence model region, and a three-phase model built based on the three-phase model region. The positive-sequence model region covers the main grid, while the three-phase model region covers the distribution network and microgrids, forming a hybrid modeling architecture that balances computational efficiency and simulation accuracy.
[0057] The positive-sequence model is a simplified equivalent model of a three-phase system. It assumes three-phase balance and retains only the positive-sequence components for modeling and simulation, ignoring the negative-sequence and zero-sequence components. This model is computationally efficient and suitable for regions with basically symmetrical three-phase systems, such as high-voltage main grids. For example, in main grid simulations, if a 500kV transmission line has symmetrical three-phase parameters and a balanced load, the positive-sequence model can be used to treat it as an equivalent single-phase circuit for power flow and transient stability calculations, significantly reducing the computational load.
[0058] A three-phase model is a detailed model of the A, B, and C phases of a power system, which can accurately reflect complex electrical phenomena such as three-phase imbalance, asymmetrical faults, and single-phase grounding. It is suitable for areas with prominent power quality problems, such as distribution networks and microgrids. For example, in low-voltage distribution networks with a large number of single-phase photovoltaic connections, due to the phase imbalance between load and generation, using a three-phase model to calculate the voltage and current of each phase separately can more accurately simulate voltage deviation and neutral line current.
[0059] The positive sequence model region can refer to the modeling region in a power system that is divided according to electrical characteristics for constructing a positive sequence model. The network part with three-phase balance and high voltage level can be divided into the positive sequence model region.
[0060] The three-phase model region can refer to the modeling area in a power system, defined based on its electrical characteristics, used to construct a three-phase model. Three-phase unbalanced and distributed energy-intensive network portions can be designated as the three-phase model region.
[0061] In this simulation model, the main grid, due to its relatively symmetrical three-phase operation, can be effectively simplified and its simulation efficiency improved by using a positive-sequence model. However, the distribution network and microgrids, due to the widespread integration of asymmetrical loads and power sources such as single-phase photovoltaics and electric vehicles, exhibit significant three-phase imbalance. Therefore, a three-phase model capable of accurately characterizing the electrical quantities of each phase is used for modeling. This differentiated modeling approach ensures both the high efficiency of the main grid system simulation and the accuracy of the local dynamic responses of the distribution network and microgrids. It effectively reduces the computational burden of using a highly complex three-phase model for the entire system and overcomes the limitation of using a uniform positive-sequence model, which cannot reflect the imbalance characteristics of the distribution and consumption sides. This achieves a balance between efficiency and accuracy, providing a reasonable and feasible technical foundation for the collaborative simulation of multi-level power systems.
[0062] For example, before simulation, the power system can be pre-divided into two modeling regions based on its physical structure and operating characteristics. The main grid is assigned to the positive-sequence model region, while the distribution network and microgrids are assigned to the three-phase model region. Then, a positive-sequence model is built for the positive-sequence model region, using single-phase equivalent circuits to describe its dynamic behavior; a three-phase model is built for the three-phase model region, independently modeling the voltage, current, impedance, and other parameters of each phase. This results in a hybrid simulation model that includes both positive-sequence and three-phase models. This model structurally covers the main grid, distribution network, and microgrid systems while preserving the modeling accuracy requirements of each region. During simulation, this simulation model can be configured and loaded using power system analysis software or a custom simulation platform.
[0063] Step 104, Simulation steps: Simulate the system state of the main grid at the current time step using the positive sequence model to obtain the current main grid state data, and simulate the system state of the distribution network and microgrid at the current time step using the three-phase model to obtain the current distribution network state data and the current microgrid state data.
[0064] Among them, status data can refer to a set of key electrical variables that describe the operating status of at least some areas or nodes in a power system within a specific time range. Key electrical variables may include at least one of voltage amplitude and phase angle, current, power, frequency, etc.
[0065] Current main grid status data refers to a set of key electrical variables describing the operation of the main grid in the power system at the current moment. Current distribution network status data refers to a set of key electrical variables describing the operation of the distribution network in the power system at the current moment. Current microgrid status data refers to a set of key electrical variables describing the operation of the microgrid in the power system at the current moment.
[0066] For example, at each current time step, the main grid can be dynamically simulated using a positive sequence model to calculate its system state at the current time step and output current main grid state data including boundary bus voltage and injected power; synchronously, the distribution network and microgrid can be simulated using a three-phase model to calculate their system state at the current time step and output current distribution network state data and current microgrid state data including phase voltage, current, and power.
[0067] As an example, dynamic simulation of the main network using the positive sequence model includes substituting the positive sequence model of the main network into a numerical integration algorithm for solution, and calculating the current main network state data at the end of the time step.
[0068] As an example, synchronous simulation of distribution networks and microgrids using a three-phase model involves substituting the three-phase models of the distribution network and microgrid into a numerical integration algorithm to solve for the current distribution network state data and the current microgrid state data at the end of the time step.
[0069] In some feasible implementations, the forward-order model and the three-phase model can be executed in parallel or sequentially, depending on actual needs and computing resources. This embodiment does not impose any restrictions on this.
[0070] In some feasible implementations, the simulation process can be completed based on the differential-algebraic equation solvers of their respective models, and the time step values can be the same or coordinated through interpolation.
[0071] Step 106: Based on the current main grid status data and the current distribution network status data, if it is determined that the simulation model converges at the boundary between the main grid and the distribution network, proceed to the next time step and return to execute the simulation step until the preset simulation termination condition is met.
[0072] In this context, convergence at the boundary refers to the situation in co-simulation where, at the common nodes where the main grid and the distribution network connect, the change in the exchanged electrical quantities, after iterative calculation, is less than a preset small threshold, indicating that both sides have reached a consensus on the state of that point. For example, if the main grid calculates that the voltage at its connection point with the distribution network is 10.5kV, and the distribution network calculates that the voltage at the same point is 10.5001kV, and the preset convergence tolerance is 0.01kV, then these two values are considered to have reached a consensus, i.e., convergence at the boundary.
[0073] The preset simulation termination condition can refer to the judgment condition for stopping the simulation process, including reaching the set total simulation time, meeting a specific running state, or being manually terminated by the user.
[0074] For example, variables such as voltage and power of the main grid-side boundary nodes are extracted from the current main grid status data, and equivalent variables of the distribution network-side boundary nodes are extracted from the current distribution network status data, with a one-to-one correspondence between the main grid-side boundary nodes and the distribution network-side boundary nodes. The variables of the distribution network-side boundary nodes are compared with their equivalent variables. If the difference is within a preset error range, convergence at the boundary is determined; otherwise, if the difference is outside the preset error range, non-convergence at the boundary is determined. If convergence at the boundary is achieved, the current time step is advanced to the next time step, and the simulation execution step is returned to continue the simulation at the next time step. This process is repeated until the preset simulation termination condition is met. If non-convergence at the boundary is achieved, the simulation at the current time step can be repeated or the interface variables can be adjusted for iteration until convergence at the boundary or the maximum number of iterations is reached.
[0075] The main grid boundary node and the distribution network boundary node are physically the same electrical connection point, but they are decoupled into two mutually coupled logical nodes belonging to different sub-models during simulation modeling.
[0076] In some feasible implementations, the positive-sequence model provides an estimate of a boundary voltage to the three-phase model; the three-phase model uses this as a known condition, solves the problem, and returns an estimate of a boundary current to the positive-sequence model; the positive-sequence model then uses the new current value to solve for a new voltage estimate and provides it to the three-phase model. This process is repeated until the calculated voltage and current values at the two nodes hardly change in two consecutive iterations, indicating convergence at the task boundary. At this point, the two logical nodes are electrically equivalent to the same physical node they represent.
[0077] Understandably, the current time step represents the moment when the simulation calculation is currently underway, and is a dynamically updated time variable that progresses as the simulation continues. After boundary convergence, the simulation time is advanced by one time step, at which point the current time step is updated to the new advanced time step, meaning the next time step becomes the new current time step. Subsequently, the method returns to execute the simulation steps, re-performing the simulation calculations for the main grid, distribution network, and microgrid under this new current time step. This process is repeated until the preset simulation termination conditions are met.
[0078] In the aforementioned power system co-simulation method, a hybrid simulation model integrating a positive-sequence model and a three-phase model is first constructed to accurately characterize the characteristics of different regions of the system. The main grid region is modeled using a computationally efficient positive-sequence model, while the distribution network and microgrid regions, which are sensitive to power quality and exhibit significant three-phase imbalance, are modeled using a more refined three-phase model. During the simulation, the main grid, distribution network, and microgrid are simulated in parallel or sequentially at each time step to obtain current main grid state data, current distribution network state data, and current microgrid state data. Emphasis is placed on information exchange and convergence judgment at the boundary interfaces between the main grid and distribution network. Simulation continues only when the boundary states converge, thereby improving the coordination and consistency of dynamic responses among different models. By constructing an integrated co-simulation framework for the main grid, distribution network, and microgrid, the shortcomings of traditional independent modeling methods in dynamic interaction and boundary response modeling can be effectively overcome. This approach can more realistically reflect the mutual influence between the three levels of the power grid, significantly improving the accuracy and reliability of complex power system simulations.
[0079] In one exemplary embodiment, such as Figure 2 As shown, prior to the simulation step, the method further includes steps 202 to 208. Wherein:
[0080] Step 202: Obtain the time step value and determine the current time step based on the time step value.
[0081] It should be noted that in traditional power system simulations, the time step value is usually a fixed value or a simple adjustment strategy based on experience. However, modern power systems, due to the high proportion of distributed energy resources integrated, exhibit dynamic characteristics across multiple time scales. That is, the electromechanical transient processes in the main grid are relatively slow (on the order of seconds), while the inverter control and islanding switching processes in the microgrid are extremely fast (on the order of milliseconds). If a fixed small step size is used, the computational load is enormous and the efficiency is low; if a fixed large step size is used, fast dynamic processes may be missed, leading to simulation distortion.
[0082] The current time step refers to a time interval in which simulation calculations will be performed. This interval is determined by its start time and the time step size. The current time is the start point of the time step, and the time step size determines the end point of the time step. That is, the end point = start time + time step size.
[0083] Before entering the simulation calculation at each current time step, its start time is known. For the first simulation time step, the start time is the simulation start time, for example, t=0; for subsequent time steps, the start time is the end time of the previous time step.
[0084] When executing the first time step, the time step size can use a preset initial value; when executing any subsequent current time step, the time step size can use the updated time step size obtained after adaptive adjustment in the previous time step. This time step size will be used for prediction and simulation calculations in this time step, and can be updated again after the end of this step based on the accuracy evaluation results for use in the next time step.
[0085] For example, before performing simulation at each current time step, the current time step size is first obtained. This value can be an initial setting or a value updated in the previous cycle. Then, based on this time step size and the start time of the current time step, the time interval for the simulation calculation to be performed is determined, that is, the current time step is determined.
[0086] Step 204: Predict the system state of the power system at the current time step to obtain high-order and low-order prediction results.
[0087] Among them, higher-order prediction results can refer to the results obtained by using higher-order numerical integration methods, such as the fourth-order Runge-Kutta method, to predict the system state, which has higher accuracy.
[0088] Low-order prediction results refer to the results obtained by using low-order numerical integration methods, such as the Euler method or the second-order Runge-Kutta method, to predict the state of the system. These methods are simple to calculate but have low accuracy.
[0089] For example, at the current time step, both a higher-order numerical integration method and a lower-order numerical integration method are used to predict the system state of the power system. Specifically, based on the system state data from the previous time step, the higher-order algorithm is invoked to perform a forward step to obtain the higher-order prediction result; simultaneously, the lower-order algorithm is invoked to perform the same forward step to obtain the lower-order prediction result.
[0090] Step 206: Determine the norm of the difference between the higher-order prediction result and the lower-order prediction result as the local truncation error of the current time step.
[0091] Among them, local truncation error refers to the error introduced by the numerical integration method due to the truncation of the Taylor series within a single time step, reflecting the local accuracy of the simulation results at that step.
[0092] For example, the obtained higher-order prediction results are compared variable-wise with the lower-order prediction results, their difference vector is calculated, and the norm of the difference vector is obtained. The resulting value is used as the local truncation error estimate for the current time step. This error reflects the accuracy deviation of the lower-order method relative to the higher-order method at the current step size and is used to evaluate the reliability of the current simulation step.
[0093] In some feasible implementations, the local truncation error L err It can be represented as:
[0094]
[0095] in, This indicates the results of higher-order predictions; This indicates the results of low-order predictions; Norm operations are used. Higher-order prediction results and consolidation prediction results can be calculated using the embedded Runge-Kutta method.
[0096] Step 208: If the local truncation error does not exceed the preset error threshold, perform the simulation step and update the time step value according to the local truncation error and the preset error threshold. The updated time step value is negatively correlated with the local truncation error.
[0097] The preset error threshold can refer to the maximum value of the allowed local truncation error set by the user or the system, which is used to determine whether the current time step value meets the accuracy requirements.
[0098] For example, when the calculated local truncation error is less than or equal to a preset error threshold, the current time step value is determined to meet the accuracy requirements. Therefore, subsequent simulation steps can be executed according to the current time step determined based on the current time step value. Simultaneously, the time step value is adaptively adjusted based on the relationship between the local truncation error and the preset error threshold. Specifically, if the error is small, it indicates that the system's dynamic changes are gradual, and the time step value can be appropriately increased to improve simulation efficiency; if the error is close to the threshold, it indicates that the system's dynamics are drastic, and the time step value is decreased to ensure accuracy.
[0099] In some feasible implementations, the updated time step value h new It can be represented as:
[0100]
[0101] Among them, h old Indicates the time step value before the update; L max Indicates the preset error threshold; L err denoted by , where p represents the local truncation error; p represents the order of the higher-order numerical integration method.
[0102] In this embodiment, by simultaneously generating high-order and low-order prediction results and using their difference norm as the local truncation error, real-time evaluation of the current simulation accuracy is achieved. Based on this, the time step value is dynamically updated according to the relationship between the local truncation error and a preset error threshold, ensuring that the time step value always matches the dynamic characteristics of the power system. The step size is increased to improve efficiency when the dynamics are slow, and decreased to ensure accuracy when the dynamics are intense. This method significantly improves the adaptive capability of multi-timescale power system simulation, effectively reducing unnecessary computational overhead while ensuring simulation reliability. It is particularly suitable for three-level coupled systems where the dynamic characteristics of the main grid, distribution network, and microgrid differ significantly, providing crucial support for high-precision and high-efficiency collaborative simulation.
[0103] In one exemplary embodiment, such as Figure 2 As shown, after determining the norm of the difference between the higher-order and lower-order prediction results as the local truncation error at the current time step, the method further includes:
[0104] Step 210: If the local truncation error exceeds the preset error threshold, update the time step value based on the local truncation error and the preset error threshold, and return to execute the step of determining the next time step based on the time step value, until the local truncation error does not exceed the preset error threshold. The updated time step value is negatively correlated with the local truncation error.
[0105] For example, after determining the norm of the difference between the higher-order and lower-order prediction results as the local truncation error of the current time step, it is further determined whether this local truncation error exceeds a preset error threshold. If the determination result is that it exceeds the threshold, the current time step value is determined to be insufficient for accuracy. In this case, subsequent simulation model steps cannot be performed according to this time step value. Instead, the current time step value is updated based on the local truncation error and the preset error threshold. After the time step value is updated, the process returns to the step of determining the next time step based on the time step value. That is, the endpoint of the current time step is redefined using the updated time step value, and higher-order and lower-order predictions are re-performed and the local truncation error is recalculated based on the new current time step. This process is executed cyclically, trying a finer step size each time, until the local truncation error does not exceed the preset error threshold. At this point, the current step size is considered sufficient to ensure simulation accuracy, and subsequent simulation steps can continue.
[0106] In this embodiment, when the local truncation error exceeds a preset threshold, the system can automatically identify that the current step size does not meet the accuracy requirements, and self-correct by reducing the step size, repeatedly trying until the error meets the standard, thereby ensuring that the calculation results of each simulation step are within an acceptable accuracy range.
[0107] In one exemplary embodiment, such as Figure 3 As shown, before the simulation step, the method further includes steps 302 to 306. Wherein:
[0108] Step 302: Detect the three-phase voltage phasors of each power grid node in the positive sequence model region, and decompose the positive sequence voltage component and the negative sequence voltage component from the three-phase voltage phasors.
[0109] It should be noted that with a high proportion of distributed energy integration, significant three-phase voltage imbalances may also occur in local areas of the main grid, such as near substations with a large number of single-phase photovoltaic systems. If these areas are still retained in the positive-sequence model region, simulation errors such as voltage distortion and harmonic misjudgment will occur due to neglecting negative-sequence and zero-sequence components.
[0110] Among them, the three-phase voltage phasor can refer to the complex representation of the three-phase voltages A, B, and C at a certain node in a power system. It contains amplitude and phase angle information and can be used for frequency domain or steady-state analysis.
[0111] Positive-sequence voltage components refer to the positive-sequence components obtained through the symmetrical component method, representing the balanced portion of the three phases. Negative-sequence voltage components refer to the negative-sequence components obtained through the symmetrical component method, representing the reverse-rotating portion of the three-phase imbalance, which may lead to problems such as motor overheating and relay protection malfunction.
[0112] For example, the three-phase voltage phasors of each grid node in the current operating state are first obtained in the positive-sequence model region. Although the region is simulated using a positive-sequence model, the three-phase voltage amplitude and phase angle of each grid node can still be obtained through external data input, historical records, or simplified estimation methods. Subsequently, the symmetric component method is applied to the three-phase voltage phasors of each node for mathematical decomposition, calculating its corresponding positive-sequence and negative-sequence voltage components. This decomposition process is based on a standard formula, that is, using the three-phase voltages to construct a voltage vector, multiplying it by the symmetric component transformation matrix to obtain the positive-sequence, negative-sequence, and zero-sequence components.
[0113] Step 304: Based on the positive-sequence voltage component and negative-sequence voltage component of each power grid node, determine the target power grid node whose voltage imbalance exceeds the preset voltage imbalance threshold from among the power grid nodes.
[0114] Voltage unbalance is an index that measures the degree of asymmetry in three-phase voltage. It can be defined as the ratio of the amplitude of the negative-sequence voltage component to the amplitude of the positive-sequence voltage component, expressed as a percentage. For example, if the positive-sequence voltage amplitude is 220V and the negative-sequence voltage amplitude is 6.6V, then the voltage unbalance is (6.6 / 220) × 100% = 3%.
[0115] For example, after obtaining the positive-sequence and negative-sequence voltage components of each grid node, their amplitudes are calculated, and then the voltage imbalance of each grid node is calculated. The calculation results are compared with a preset voltage imbalance threshold, and grid nodes with voltage imbalance greater than the preset voltage imbalance threshold are marked as target grid nodes. This process traverses all grid nodes within the positive-sequence model region, identifying all target grid nodes with voltage imbalance greater than the preset voltage imbalance threshold.
[0116] Step 306: Divide the target power grid node into the three-phase model region, and update the simulation model based on the re-divided three-phase model region and positive sequence model region.
[0117] For example, all target grid nodes and their associated grid components, such as connected lines and transformers, identified in step 2 are removed from the original positive-sequence model region and reassigned to the three-phase model region. This partitioning operation changes the topological boundary between the positive-sequence model region and the three-phase model region. Subsequently, the overall simulation model is updated based on the re-partitioned region. The mathematical model of the portion that originally belonged to the positive-sequence model region but is now reassigned to the three-phase model region is replaced by a three-phase detailed model instead of a positive-sequence equivalent model; simultaneously, the interface boundary between the main grid and the distribution network may also be adjusted, requiring a redefinition of the data interaction mechanism. The updated simulation model can more accurately reflect the electrical behavior of local three-phase imbalance regions.
[0118] In this embodiment, an efficient positive-sequence model is still used in the basically symmetrical three-phase regions of the main grid, while automatically upgrading to a high-precision three-phase model in regions with significant local imbalances. This avoids computational redundancy or insufficient local accuracy caused by unified modeling of the entire system. Especially in scenarios where fluctuations in distributed energy output exacerbate local imbalances in the main grid, this adaptive modeling mechanism ensures that the simulation model always matches the actual system state, significantly improving the accuracy and reliability of multi-level power system simulation under complex operating conditions, while also taking computational efficiency into account.
[0119] In one exemplary embodiment, after the simulation step, the method further includes:
[0120] Based on the current main grid status data and the current distribution network status data, if the simulation model fails to converge at the boundary between the main grid and the distribution network, the target boundary node that has not converged is determined. The Anderson acceleration method is used to iteratively update the boundary variables of the target boundary node until convergence occurs at the boundary between the main grid and the distribution network.
[0121] It should be noted that, because the positive-sequence model and the three-phase model use different mathematical descriptions and solution methods, the electrical quantities at the boundary interface are often difficult to match in one step, leading to simulation non-convergence. Traditional fixed-point iterative methods converge very slowly, or even diverge, when dealing with boundary variable exchanges in such tightly coupled systems, making it difficult to obtain an effective solution.
[0122] Among them, the target boundary node can refer to the grid node at the junction of the main grid and the distribution network, which is determined to be a node whose boundary variables do not meet the convergence condition. It is the target of subsequent accelerated iteration.
[0123] Boundary variables can refer to key electrical quantities used for data exchange at the interface between the main grid and the distribution network. They typically include at least one of the following: node voltage phasors (amplitude and phase angle), injected active power, injected reactive power, and current.
[0124] The Anderson acceleration method is a numerical method for accelerating the convergence of fixed-point iterations. It can use residuals and variable change information from historical iteration steps to construct an optimal linear combination to update the current variable, thereby speeding up the convergence and reducing the number of iterations.
[0125] For example, after completing the simulation at the current time step, the system compares the current main grid state data with the current distribution network state data, focusing on whether the boundary interface between the main grid and the distribution network meets the preset convergence criteria, such as the voltage difference or power residual being less than a threshold. If the judgment result is non-convergence, the residual magnitude of each boundary node is further analyzed, and one or more boundary nodes that do not meet the convergence condition are marked as target boundary nodes. For each target boundary node, its current boundary variables, such as voltage phasors or injected power, can be extracted, and the Anderson accelerated iteration process is initiated. Specifically, in each iteration, the main grid and the distribution network resolve their respective models based on the boundary variables exchanged in the previous round to obtain new state outputs; subsequently, using the current and historical boundary variables and their residuals, i.e., the difference between the main grid output and the distribution network feedback, a least-squares optimization problem is solved to calculate the optimal update amount of the boundary variables. The process is repeated, with the Anderson acceleration method used each time to update the boundary variables of the target boundary nodes until the differences between the variables of the main grid and the distribution network at all boundary nodes fall within the preset convergence range, which is considered as convergence at the boundary. At this point, the iteration can be terminated and the simulation time step can be advanced.
[0126] In some feasible implementations, let the boundary variable of the target boundary node to be updated be x, and its corresponding functional relationship be x=G(x), where G(x) represents the nonlinear mapping relationship under the joint action of the main grid and the distribution network. For example, the main grid calculates the injected power based on the feedback voltage of the distribution network, and the distribution network updates the node voltage based on the output power of the main grid, forming a closed loop.
[0127] In the k-th iteration, the historical residual difference matrix F is first constructed. k Difference matrix G of historical function values k .
[0128] , is a matrix composed of the difference vectors between the residuals of the most recent mk+1 steps.
[0129] , is a matrix composed of the difference vectors between the function values of the most recent mk+1 steps.
[0130] in Let be the residual of the i-th iteration. This is the function value.
[0131] These matrices record the trends in residuals and function values during historical iterations, which are used to estimate the direction of subsequent optimization.
[0132] Then, an unconstrained least squares problem is constructed and the optimal coefficient vector is solved. :
[0133]
[0134] The problem aims to find a set of optimal weights. This allows the current residual fk to be optimally approximated by a linear combination of historical residual differences; the optimal coefficient vector is obtained by solving this problem using numerical methods such as QR decomposition. .
[0135] Furthermore, using the obtained Difference matrix G of historical function values k Calculate the new iteration point:
[0136]
[0137] This update expression will change the current function value g. k The algorithm is modified to use a weighted combination based on historical information, thereby skipping the slow convergence path and directly approximating the fixed point.
[0138] The above process is repeated in each iteration until the boundary variables of the target boundary node meet the preset convergence conditions, such as the residual being less than a threshold. This indicates that the main grid and the distribution network have converged at the boundary, and the iteration can then end and proceed to the next time step.
[0139] In this embodiment, by making full use of historical iteration information through the Anderson acceleration method, the number of iterations required to reach convergence can be significantly reduced, thereby improving simulation efficiency.
[0140] In an exemplary embodiment, the positive-sequence model includes a Thevenin equivalent model for the equivalent three-phase model region; in each iteration of the method for iteratively updating the boundary variables of the target boundary nodes using the Anderson acceleration method, the method further includes:
[0141] Obtain the voltage and current phasors of the target boundary node in the current iteration; based on the voltage and current phasors, update the parameter vector of the Thevenin equivalent model using the recursive least squares method; and use the Anderson acceleration method to iteratively update the boundary variables of the target boundary node based on the updated positive sequence model.
[0142] It should be noted that in the co-simulation of the main grid and distribution network, due to the complex internal structure and frequent dynamic changes of the three-phase model region, directly connecting it to the positive-sequence model of the main grid will lead to excessive computational burden or model distortion. To solve this problem, the Thevenin equivalent model is usually used to simplify and represent the three-phase model region. However, the static Thevenin equivalent model is difficult to adapt to the rapid changes in actual operation, especially under conditions of load fluctuations and changes in distributed energy output. Its parameters may no longer be accurate, leading to increased voltage and current prediction errors at the boundaries, affecting simulation accuracy and convergence.
[0143] The Thevenin equivalent model is a simplified model used for circuit analysis, consisting of an ideal voltage source and a series impedance, which can effectively characterize the externally observed network behavior. In this scheme, it is used to analyze the impact of the equivalent three-phase model region on the main network.
[0144] Recursive least squares is an online parameter estimation method that can continuously adjust model parameters as new data arrives, in order to minimize the sum of squared errors between historical observations and model predictions.
[0145] The parameter vector can refer to a mathematical vector that describes the characteristics of the Thevenin equivalent model, and can contain the real and imaginary parts of the equivalent voltage magnitude, phase angle, and equivalent impedance.
[0146] For example, at the start of each Anderson acceleration iteration, the voltage and current phasors of the target boundary node are first extracted from the positive-sequence model and the three-phase model. These voltage and current phasors represent the electrical state of the target boundary node at the current moment under the two different models. Then, using the extracted voltage and current phasors, the recursive least squares method is applied to dynamically update the parameter vector of the Thevenin equivalent model. After updating the Thevenin equivalent model parameters, the Anderson acceleration iteration process continues using the updated positive-sequence model. This means that in a new iteration, the main network will recalculate the boundary variables at the distribution network interface based on the updated Thevenin equivalent model, and optimize the update speed of these variables using the Anderson acceleration method to ensure faster convergence. The specific operation follows the basic process of the Anderson acceleration method described above, but the positive-sequence model used at this time already contains the latest equivalent information of the three-phase model region, thereby improving the simulation accuracy of the entire system.
[0147] In this embodiment, by monitoring the voltage and current phasors of boundary nodes in real time and adjusting the Thevenin equivalent model parameters accordingly, the accuracy of the simulation of the interaction between the main grid and the distribution network can be improved. Especially when there are a large number of distributed energy sources or when loads fluctuate drastically within the distribution network, this method can promptly capture these changes and reflect them in the equivalent model, thereby reducing simulation errors caused by model lag.
[0148] In one exemplary embodiment, the method is executed by a central processing unit (CPU), and the simulation steps include multiple sub-steps, each of which is assigned by the CPU to a different graphics processing unit (GPU) for execution.
[0149] The power system co-simulation method is entirely controlled and executed by a CPU (Central Processing Unit), with the CPU responsible for scheduling and coordinating the core logic flow. During simulation steps, each step is broken down into multiple independently runnable sub-steps, which typically involve computationally intensive tasks such as large-scale matrix operations and solving network equations. To address the massive computational load from the joint simulation of the main grid, distribution network, and microgrid, the system employs a heterogeneous computing architecture: these sub-steps are distributed from the CPU to multiple GPUs (Graphics Processing Units) for execution, fully utilizing the parallel computing capabilities of the GPUs to improve overall simulation efficiency.
[0150] During the data transmission phase, the CPU first reads large-scale network data from the main grid, distribution network, and microgrids, such as node admittance matrices, from the host memory and stores it in a compressed sparse row format. Then, it transfers this data to the GPU's global memory via PCIe (Peripheral Component Interconnect Express). This process ensures that the data from the high-dimensional power system model can be efficiently loaded onto the GPU, providing fundamental support for subsequent parallel computing.
[0151] During the task assignment and initiation phase, the CPU issues computational instructions to the GPU, launching thousands of threads to execute computational tasks concurrently. These threads are managed by the GPU's streaming multiprocessors, and each thread block can handle local computational tasks of a subsystem, such as internal state updates of a power distribution network or microgrid.
[0152] During the parallel computing phase, GPUs utilize their massively parallel architecture to perform computational tasks. The parallelism methods can include at least one of subsystem-level parallelism, algorithm-level parallelism, and node-level parallelism.
[0153] Subsystem-level parallelism refers to distributing the internal solution tasks of the main network, various distribution networks, and microgrids to different GPU streams to achieve asynchronous parallel execution. For example, the main network solution runs in one stream, while the dynamic simulation of a certain microgrid is performed synchronously in another stream, without interfering with each other.
[0154] Algorithm-level parallelism can refer to matrix-vector operations involved in algorithms such as Anderson acceleration, which are executed by calling highly optimized GPU linear algebra libraries such as cuBLAS (a basic linear algebra subroutine library), giving full play to the advantages of GPUs in numerical computation.
[0155] Node-level parallelism refers to the process of solving the network equations within each subsystem being further subdivided into computational tasks for each network node. Each node is assigned to a thread or thread block on the GPU, achieving fully parallel computation. For example, if a power distribution network has 1000 nodes, 1000 threads can be started to solve for the voltage of each node simultaneously.
[0156] During the result return and control phase, after the GPU completes all parallel computations, it returns the results from the GPU's global memory to the CPU. After receiving this data, the CPU performs convergence checks (such as checking whether boundary variables meet convergence conditions) and logic control (such as deciding whether to advance the time step or whether to re-divide the modeling region), thus completing a full simulation cycle.
[0157] In this embodiment, by using a GPU-based parallel computing architecture, the time for joint simulation of the main network, distribution network, and microgrid can be reduced from hours to minutes.
[0158] In some feasible implementations, a three-level coupled test system of main grid-distribution grid-microgrid is constructed. The main grid adopts the IEEE (Institute of Electrical and Electronics Engineers) 39-node system, and the distribution grid adopts the IEEE 34-node feeder system, connected to a load node of the main grid via a step-down transformer. A microgrid is connected to the end of the distribution grid, which includes photovoltaic inverters, battery energy storage systems, and local loads. The distribution grid includes a certain proportion of induction motor loads.
[0159] A single-phase ground fault lasting 100ms is installed on the main grid transmission line. This fault is an asymmetrical fault, which will cause significant transient imbalance and voltage drop, and its effects will propagate to the distribution network and microgrid through the transformer.
[0160] At T=0.1s, a fault occurs, detecting drastic changes in voltage and current. The adaptive step-size module immediately and automatically reduces the simulation step size from the steady-state 10ms to the microsecond level (e.g., 50μs) to accurately capture the electromagnetic transient process in the early stages of the fault. The fault is a single-phase grounding fault, causing severe voltage imbalance in the main grid area near the fault point. The dynamic partitioning module calculates that the voltage imbalance in this area far exceeds the preset voltage imbalance threshold of 2%, and immediately dynamically switches this part of the main grid area, which was originally using the positive-sequence model, to a high-precision three-phase model to accurately calculate the unbalanced fault current.
[0161] During the fault duration of T=0.1s - 0.2s, the voltage drop propagates to the distribution network and microgrid, causing induction motors in the distribution network to stall and absorb a large amount of reactive power, while inverters in the microgrid enter low-voltage ride-through control mode. At each simulation time step, the internal equations of each subsystem are solved in parallel by the GPU. During the iterative process of interface data exchange, the Anderson acceleration module utilizes historical information, requiring only 2-3 iterations to converge boundary variables, while traditional fixed-point iterative methods may require dozens of iterations or even diverge. The main grid simulator, using measurement data from boundary nodes, updates its Thevenin equivalents for the entire distribution network and microgrid in real time using recursive least squares, accurately capturing the dynamic changes in equivalent impedance and voltage sources caused by motor stall and inverter low-voltage ride-through behavior, providing precise boundary conditions for the main grid simulation.
[0162] After the fault is cleared in t>0.2s, the system voltage cannot be restored immediately because the stalled motors in the distribution network are still absorbing a large amount of reactive power, exhibiting a typical fault-induced voltage delay recovery phenomenon.
[0163] This embodiment enables the accurate and efficient simulation of this complex multi-scale dynamic process. The simulation results can accurately assess the system voltage recovery time and determine whether there is a risk of voltage instability.
[0164] It should be understood that although the steps in the flowcharts of the above embodiments 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 above embodiments 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.
[0165] Based on the same inventive concept, this application also provides a power system co-simulation device for implementing the power system co-simulation method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more power system co-simulation device embodiments provided below can be found in the limitations of the power system co-simulation method described above, and will not be repeated here.
[0166] In one exemplary embodiment, such as Figure 4As shown, a power system collaborative simulation device is provided, including an acquisition module 402, a simulation module 404, and a propulsion module 406, wherein:
[0167] The acquisition module 402 is used to acquire the simulation model of the power system. The simulation model includes a positive sequence model constructed based on the positive sequence model region and a three-phase model constructed based on the three-phase model region. The positive sequence model region includes the main grid, and the three-phase model region includes the distribution network and the microgrid.
[0168] Simulation module 404 is used to execute the simulation steps: simulate the system state of the main grid at the current time step using the positive sequence model to obtain the current main grid state data, and simulate the system state of the distribution network and microgrid at the current time step using the three-phase model to obtain the current distribution network state data and the current microgrid state data.
[0169] The advancement module 406 is used to advance to the next time step and return to execute the simulation steps when the simulation model is determined to converge at the boundary between the main grid and the distribution network based on the current main grid status data and the current distribution network status data, until the preset simulation termination conditions are met.
[0170] In one exemplary embodiment, the power system co-simulation device further includes a step size update module; prior to the simulation step, the step size update module is used to:
[0171] Obtain the time step value, and determine the current time step based on the time step value;
[0172] Predict the system state of the power system at the current time step to obtain high-order and low-order prediction results;
[0173] The norm of the difference between the higher-order prediction result and the lower-order prediction result is determined as the local truncation error at the current time step.
[0174] If the local truncation error does not exceed the preset error threshold, the simulation step is executed, and the time step value is updated according to the local truncation error and the preset error threshold. The updated time step value is negatively correlated with the local truncation error.
[0175] In an exemplary embodiment, after determining the norm of the difference between the higher-order prediction result and the lower-order prediction result as the local truncation error of the current time step, the step size update module is further configured to:
[0176] If the local truncation error exceeds the preset error threshold, the time step value is updated based on the local truncation error and the preset error threshold, and the process returns to the step of determining the next time step based on the time step value, until the local truncation error does not exceed the preset error threshold. The updated time step value is negatively correlated with the local truncation error.
[0177] In one exemplary embodiment, the power system co-simulation device further includes a model update module; prior to the simulation step, the model update module is used to:
[0178] The three-phase voltage phasors of each power grid node in the positive sequence model region are detected, and the positive sequence voltage components and negative sequence voltage components are decomposed from the three-phase voltage phasors.
[0179] Based on the positive-sequence voltage components and negative-sequence voltage components of each power grid node, the target power grid node whose voltage imbalance exceeds the preset voltage imbalance threshold is determined from each power grid node.
[0180] The target power grid node is divided into a three-phase model region, and the simulation model is updated based on the re-divided three-phase model region and the positive sequence model region.
[0181] In one exemplary embodiment, the power system co-simulation device further includes an acceleration module; after the simulation step, the acceleration module is used to:
[0182] Based on the current main grid status data and the current distribution network status data, if the simulation model fails to converge at the boundary between the main grid and the distribution network, the target boundary node that has not converged is determined.
[0183] The Anderson acceleration method is used to iteratively update the boundary variables of the target boundary nodes until convergence occurs at the boundary between the main grid and the distribution network.
[0184] In an exemplary embodiment, the positive-sequence model includes a Thevenin equivalent model for the equivalent three-phase model region; the acceleration module is further configured to:
[0185] Obtain the voltage and current phasors of the target boundary node in the current iteration round;
[0186] Based on the voltage phasor and current phasor, the parameter vector of the Thevenin equivalent model is updated using the recursive least squares method.
[0187] The Anderson acceleration method is adopted, and the boundary variables of the target boundary nodes are iteratively updated based on the updated positive order model.
[0188] In one exemplary embodiment, the method is executed by a central processing unit (CPU), and the simulation steps include multiple sub-steps, each of which is assigned by the CPU to a different graphics processing unit (GPU) for execution.
[0189] Each module in the aforementioned power system co-simulation device 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.
[0190] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output 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 and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a power system co-simulation method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0191] Those skilled in the art will understand that Figure 5 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.
[0192] In one embodiment, a computer device is also 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 the above method embodiments.
[0193] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0194] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0195] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application 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.
[0196] Those skilled in the art will understand that all or part of the processes in the methods of 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 of the above methods. Any references to memory, database, 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 (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0197] 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.
[0198] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this 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 system co-simulation method, characterized in that, The power system comprises a three-tiered structure of main grid, distribution network, and microgrid; the method includes: Obtain a simulation model of the power system. The simulation model includes a positive-sequence model constructed based on a positive-sequence model region and a three-phase model constructed based on a three-phase model region. The positive-sequence model region includes the main grid, and the three-phase model region includes the distribution network and the microgrid. Simulation steps: Simulate the system state of the main grid at the current time step using the positive sequence model to obtain the current main grid state data; and simulate the system state of the distribution network and the microgrid at the current time step using the three-phase model to obtain the current distribution network state data and the current microgrid state data. If, based on the current main grid status data and the current distribution network status data, the simulation model is determined to converge at the boundary between the main grid and the distribution network, the process proceeds to the next time step and returns to execute the simulation steps until the preset simulation termination condition is met.
2. The method according to claim 1, characterized in that, Prior to the simulation step, the method includes: Obtain the time step value, and determine the current time step based on the time step value; Predict the system state of the power system at the current time step to obtain high-order and low-order prediction results; The norm of the difference between the higher-order prediction result and the lower-order prediction result is determined as the local truncation error of the current time step. If the local truncation error does not exceed the preset error threshold, the simulation step is performed, and the time step value is updated according to the local truncation error and the preset error threshold, wherein the updated time step value is negatively correlated with the local truncation error.
3. The method according to claim 2, characterized in that, After determining the norm of the difference between the higher-order prediction result and the lower-order prediction result as the local truncation error of the current time step, the method further includes: If the local truncation error exceeds a preset error threshold, the time step value is updated based on the local truncation error and the preset error threshold, and the process returns to the step of determining the next time step based on the time step value, until the local truncation error does not exceed the preset error threshold, wherein the updated time step value is negatively correlated with the local truncation error.
4. The method according to claim 1, characterized in that, Prior to the simulation step, the method further includes: The three-phase voltage phasors of each power grid node in the positive-sequence model region are detected, and the positive-sequence voltage component and the negative-sequence voltage component are decomposed from the three-phase voltage phasors. Based on the positive-sequence voltage component and the negative-sequence voltage component of each power grid node, a target power grid node whose voltage imbalance exceeds a preset voltage imbalance threshold is determined from each power grid node. The target power grid node is divided into a three-phase model region, and the simulation model is updated based on the re-divided three-phase model region and the positive sequence model region.
5. The method according to claim 1, characterized in that, Following the simulation step, the method further includes: If, based on the current main grid status data and the current distribution network status data, it is determined that the simulation model has not converged at the boundary between the main grid and the distribution network, the target boundary node that has not converged is identified. The boundary variables of the target boundary nodes are iteratively updated using the Anderson acceleration method until convergence occurs at the boundary between the main grid and the distribution network.
6. The method according to claim 5, characterized in that, The positive-order model includes a Thevenin equivalent model for equivalencing the three-phase model region; in each iteration of the method for iteratively updating the boundary variables of the target boundary nodes using the Anderson acceleration method, the method further includes: Obtain the voltage phasor and current phasor of the target boundary node in the current iteration round; Based on the voltage phasor and the current phasor, the parameter vector of the Thevenin equivalent model is updated using the recursive least squares method. The Anderson acceleration method is used to iteratively update the boundary variables of the target boundary nodes based on the updated positive order model.
7. The method according to any one of claims 1 to 6, characterized in that, The method is executed by a central processing unit (CPU), and the simulation steps include multiple sub-steps, each of which is assigned by the CPU to a different graphics processing unit (GPU) for execution.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.