Electromagnetic transient simulation calculation method, device and equipment and storage medium
By using a state-space model based on device connection information and partitioning results, flexible load allocation for electromagnetic transient simulation calculations is achieved, solving the problem of low efficiency in traditional simulation calculations, improving the efficiency and reliability of simulation calculations, and meeting the needs of designers for efficient development.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-03-10
AI Technical Summary
Traditional electromagnetic transient simulation calculation methods have low flexibility and cannot adaptively adjust the allocation of computing resources according to the working conditions of the simulation project, resulting in low simulation calculation efficiency and affecting the development and design efficiency of designers.
By using the device connection information based on the target electromagnetic transient simulation project, a first state space model is determined, and a second state space model is generated by combining the device partitioning results. This enables flexible and balanced computational load distribution, and the simulation results are achieved by utilizing the allocation of parallel computing resources.
It improves the flexibility and efficiency of electromagnetic transient simulation calculations, ensures the reliability and accuracy of calculations, and enhances the development and design efficiency of designers.
Smart Images

Figure CN121637809A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electromagnetic transient simulation technology, and in particular to an electromagnetic transient simulation calculation method, apparatus, device, and storage medium. Background Technology
[0002] With the continuous increase in the scale and complexity of power systems, the requirements for the accuracy, speed and dynamic adaptability of electromagnetic transient simulation have significantly increased. As a core means to achieve efficient simulation of transient processes in power systems, electromagnetic transient simulation calculation directly affects the reliability of simulation results and engineering application value.
[0003] Currently, traditional electromagnetic transient simulation methods often rely on serial computing architectures or simple parallel strategies based on fixed functional partitioning to achieve simulation calculations. However, traditional electromagnetic transient simulation methods have low flexibility, cannot adaptively adjust the allocation of computing resources according to the operating conditions of the simulation project, and have low simulation efficiency, making it difficult to meet the simulation requirements for high-efficiency simulation, thus affecting the development and design efficiency of designers. Summary of the Invention
[0004] This invention provides an electromagnetic transient simulation calculation method, apparatus, equipment, and medium to achieve efficient electromagnetic transient simulation calculation, improve the flexibility of electromagnetic transient simulation calculation, adaptively adjust the allocation of computing resources according to the working conditions of the simulation project, improve the efficiency of simulation calculation, and thus ensure the development and design efficiency of designers.
[0005] According to one aspect of the present invention, an electromagnetic transient simulation calculation method is provided, the method comprising:
[0006] Based on the device connection information corresponding to the target electromagnetic transient simulation project, the first state space model corresponding to the target electromagnetic transient simulation project is determined.
[0007] The device partitioning result corresponding to the target electromagnetic transient simulation project is determined, and based on the first state space model and the device partitioning result, at least one second state space model corresponding to the target electromagnetic transient simulation project is determined;
[0008] Based on the target simulation data corresponding to the target electromagnetic transient simulation project and the second state space model, the simulation calculation results corresponding to the target electromagnetic transient simulation project are determined.
[0009] According to another aspect of the present invention, an electromagnetic transient simulation calculation apparatus is provided, the apparatus comprising:
[0010] The first model determination module is used to determine the first state space model corresponding to the target electromagnetic transient simulation project based on the device connection information corresponding to the target electromagnetic transient simulation project.
[0011] The second model determination module is used to determine the device partitioning result corresponding to the target electromagnetic transient simulation project, and based on the first state space model and the device partitioning result, determine at least one second state space model corresponding to the target electromagnetic transient simulation project.
[0012] The simulation calculation module is used to determine the simulation calculation results corresponding to the target electromagnetic transient simulation project based on the target simulation data and the second state space model.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] At least one processor; and
[0015] A memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the electromagnetic transient simulation calculation method according to any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the electromagnetic transient simulation calculation method according to any embodiment of the present invention.
[0018] The technical solution of this invention, by determining the first state space model corresponding to the target electromagnetic transient simulation project based on the device connection information, achieves automated global modeling of the simulation project, providing reliable technical support for subsequent parallel simulation calculations. By determining the device partitioning result corresponding to the target electromagnetic transient simulation project, and based on the first state space model and the device partitioning result, at least one second state space model corresponding to the target electromagnetic transient simulation project is determined, enabling flexible and balanced computational load allocation. Based on the target simulation data corresponding to the target electromagnetic transient simulation project and the second state space model, the simulation calculation result corresponding to the target electromagnetic transient simulation project is determined, significantly improving computational efficiency while ensuring computational reliability and accuracy. This invention achieves global modeling of the simulation project through state space, and by combining the global modeling result with allocable computing resources, achieves flexible dynamic load balancing, thereby realizing efficient electromagnetic transient simulation calculations, greatly improving the flexibility and efficiency of electromagnetic transient simulation calculations, and thus ensuring the development and design efficiency of designers.
[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart of an electromagnetic transient simulation calculation method provided in Embodiment 1 of the present invention;
[0022] Figure 2 This is a flowchart of an electromagnetic transient simulation calculation method provided in Embodiment 2 of the present invention;
[0023] Figure 3 This is an example diagram of a device partitioning process according to Embodiment 2 of the present invention;
[0024] Figure 4 This is an example diagram of a parallel computing process according to Embodiment 2 of the present invention;
[0025] Figure 5 This is a schematic diagram of the structure of an electromagnetic transient simulation computing device according to Embodiment 3 of the present invention;
[0026] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the electromagnetic transient simulation calculation method of this invention. Detailed Implementation
[0027] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first," "second," "target," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0029] Example 1
[0030] Figure 1 This document provides a flowchart of an electromagnetic transient simulation calculation method according to Embodiment 1 of the present invention. This embodiment is applicable to situations involving electromagnetic transient simulation calculations. The method can be executed by an electromagnetic transient simulation calculation device, which can be implemented in hardware and / or software. This electromagnetic transient simulation calculation device can be configured in an electronic device. For example... Figure 1 As shown, the method includes:
[0031] S110. Based on the device connection information corresponding to the target electromagnetic transient simulation project, determine the first state space model corresponding to the target electromagnetic transient simulation project.
[0032] The target electromagnetic transient simulation project can refer to a specific instance of a power system to be simulated, defining the scope and object of the simulation. Device connection information refers to the network topology information describing how all components in the simulation project are interconnected through electrical nodes. The first state-space model refers to a complete, global mathematical model describing the entire simulation project; it is a theoretical overall model framework.
[0033] Specifically, based on the device connection information corresponding to the target electromagnetic transient simulation project, a discretized device model corresponding to each device in the target electromagnetic transient simulation project can be constructed using the state-space method. Combining this with the Kirchhoff current and voltage constraints corresponding to the simulation project, and using Kirchhoff's Current Law (KCL) and Voltage Law (KVL), the global linear equation corresponding to the target electromagnetic transient simulation project is derived, i.e., the first state-space model. It should be noted that this equation system is automatically parallelizable; its essence is a completely cascaded expression among the basic devices, with each module being independent of the others. The first state-space model provides reliable technical support for the parallel computation of subsequent project simulations.
[0034] S120. Determine the device partitioning results corresponding to the target electromagnetic transient simulation project, and based on the first state space model and the device partitioning results, determine at least one second state space model corresponding to the target electromagnetic transient simulation project.
[0035] The device partitioning result can refer to the task allocation scheme used to assign all devices in the simulation project to multiple computing units (such as computing threads or computing nodes). The second state-space model can refer to the state-space model corresponding to the portion of devices allocated to each parallel computing unit after device partitioning.
[0036] Specifically, available parallel computing resources provided by the user (such as the number of computing nodes and threads) can be obtained, and the quantity and type of various components in the target electromagnetic transient simulation project (such as resistors, inductors, motors, etc.) can be counted. A load balancing strategy can be adopted to divide each component into groups matching the number of computing resources, thus determining the component partitioning result corresponding to the target electromagnetic transient simulation project. Based on the component partitioning result and combined with the first state space model corresponding to the target electromagnetic transient simulation project, the row and column order of variables and matrices in the first state space model is re-determined to obtain at least one second state space model corresponding to the target electromagnetic transient simulation project. This achieves flexible and balanced computational load distribution, which helps to improve computational efficiency.
[0037] For example, "determining the device partitioning result corresponding to the target electromagnetic transient simulation project" in S120 may include: determining the device type information and device quantity information corresponding to the target electromagnetic transient simulation project; partitioning the devices corresponding to the target electromagnetic transient simulation project based on multiple calculation threads and the load parameters, device type information and device quantity information corresponding to each calculation thread, and determining the device partitioning result corresponding to the target electromagnetic transient simulation project.
[0038] Among these, device type information refers to information describing the types or categories of various components included in the target simulation project. Device quantity information refers to information describing the specific number of each type of device in the target simulation project. Computation thread refers to the smallest processing unit of a CPU core that the operating system can independently schedule and execute in parallel computing. Load parameters refer to parameters describing the load capacity of the computation thread.
[0039] Specifically, based on the target electromagnetic transient simulation project, the type and quantity of each device are identified and recorded to obtain device type and quantity information corresponding to the target electromagnetic transient simulation project. Based on the number of available computing threads and the load parameters corresponding to each computing thread, combined with the device type and quantity information, the devices corresponding to the target electromagnetic transient simulation project are divided according to the load balancing strategy. The device division result corresponding to the target electromagnetic transient simulation project can ensure that all computing threads can complete their share of work in approximately the same amount of time, thereby improving computing efficiency.
[0040] S130. Based on the target simulation data and the second state space model corresponding to the target electromagnetic transient simulation project, determine the simulation calculation results corresponding to the target electromagnetic transient simulation project.
[0041] The target simulation data can refer to all the input data and parameters required in the electromagnetic transient simulation calculation process. The simulation calculation results can refer to the time series data of all physical quantities of interest to the user, output after the simulation program runs.
[0042] Specifically, each computing unit performs single-step calculations in parallel. That is, it can calculate the model parameters of its corresponding second state space model in parallel based on the target simulation data corresponding to the target electromagnetic transient simulation project, and perform parallel calculations on each second state space model after parameter filling based on the model parameters to determine the simulation calculation results corresponding to the target electromagnetic transient simulation project. This can greatly improve the calculation efficiency and is suitable for large-scale simulation examples.
[0043] For example, S130 may include: determining the state equation coefficients, port historical current parameters, and port admittance matrix corresponding to each second state space model in parallel based on the target simulation data corresponding to the target electromagnetic transient simulation project; and determining the simulation calculation results corresponding to the target electromagnetic transient simulation project based on the state equation coefficients, port historical current parameters, and port admittance matrix corresponding to each second state space model.
[0044] Here, the state equation coefficients can refer to the constitutive coefficient matrix corresponding to the device's second state-space model. The port history current parameter can refer to the value representing the equivalent current source generated by the device's historical state (the state of the previous time step). The port admittance matrix can refer to the matrix used to describe the instantaneous influence of the port voltage on the port current.
[0045] Specifically, based on the target simulation data corresponding to the target electromagnetic transient simulation project, each calculation thread / unit can independently determine the state equation coefficients, port historical current parameters, and port admittance matrix corresponding to each second state space model; each calculation unit can fill and calculate the second state space model in parallel based on the state equation coefficients, port historical current parameters, and port admittance matrix to determine the simulation calculation results corresponding to the target electromagnetic transient simulation project, thereby improving computational efficiency.
[0046] In this embodiment, by determining the first state space model corresponding to the target electromagnetic transient simulation project based on the device connection information, a global automated modeling of the simulation project is achieved, providing reliable technical support for subsequent parallel simulation calculations. The device partitioning result corresponding to the target electromagnetic transient simulation project is determined, and based on the first state space model and the device partitioning result, at least one second state space model corresponding to the target electromagnetic transient simulation project is determined, enabling flexible and balanced computational load allocation. Based on the target simulation data and the second state space model corresponding to the target electromagnetic transient simulation project, the simulation calculation result corresponding to the target electromagnetic transient simulation project is determined, significantly improving computational efficiency while ensuring computational reliability and accuracy. This invention achieves global modeling of the simulation project through state space and, based on the global modeling results and allocable computational resources, achieves flexible dynamic load balancing, thereby realizing efficient electromagnetic transient simulation calculations, greatly improving the flexibility and efficiency of electromagnetic transient simulation calculations, and thus ensuring the development and design efficiency of designers.
[0047] Example 2
[0048] Figure 2 This is a flowchart of an electromagnetic transient simulation calculation method provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment optimizes the step "determining the first state space model corresponding to the target electromagnetic transient simulation project based on the device connection information corresponding to the target electromagnetic transient simulation project". Explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.
[0049] See Figure 2 The alternative electromagnetic transient simulation calculation method provided in this embodiment specifically includes the following steps:
[0050] S210. Based on the device connection information corresponding to the target electromagnetic transient simulation project, determine the first current relationship equation and the first voltage relationship equation corresponding to the target electromagnetic transient simulation project, and determine the initial state space model corresponding to each device in the target electromagnetic transient simulation project.
[0051] The first current relationship equation can be a matrix equation describing the current conservation relationship at all electrical connection nodes in the entire simulation project; essentially, it is a system-level mathematical expression of Kirchhoff's Current Law (KCL). The first voltage relationship equation can be a matrix equation describing the equality of port voltages for all devices connected to the same node in the entire simulation project; essentially, it is a system-level mathematical expression of Kirchhoff's Voltage Law (KVL). The initial state-space model can be a mathematical model describing the internal and external characteristics of each independent device in the simulation project in the continuous time domain.
[0052] Specifically, based on the device connection information corresponding to the target electromagnetic transient simulation project, and combined with Kirchhoff's Current Law (KCL) and Voltage Law (KVL), the first current relationship equation and the first voltage relationship equation corresponding to the target electromagnetic transient simulation project can be generated. Furthermore, an initial state space model for each type of device (resistor, inductor, capacitor, etc.) can be established for continuous time, which can intuitively describe the device state and provide a foundation for subsequent processing.
[0053] S220. Based on the first current relationship equation, the first voltage relationship equation, and the initial state space model, determine the first state space model corresponding to the target electromagnetic transient simulation project.
[0054] Specifically, the initial state space model can be discretized and rewritten. The rewritten initial state space model can then be combined with the first current relationship equation and the first voltage relationship equation to obtain the first state space model corresponding to the target electromagnetic transient simulation project, providing a technical foundation for subsequent parallel computing.
[0055] For example, S220 may include: discretizing each initial state space model for each device, and matrixing the discretized initial state space model to generate a candidate state space model; and determining the first state space model corresponding to the target electromagnetic transient simulation project based on the first current relationship equation, the first voltage relationship equation, and the candidate state space model.
[0056] Among them, the candidate state-space model can refer to the mathematical model at discrete time points obtained after discretizing the continuous-time state-space model of a single device.
[0057] Specifically, for each device's initial state space model, each initial state space model can be processed in a discrete form, and the discrete initial state space model can be rewritten in matrix form to generate candidate state space models. Based on the first current relationship equation, the first voltage relationship equation, and the candidate state space models, the first state space model corresponding to the target electromagnetic transient simulation project is determined, which can provide an efficient computing framework for subsequent task decomposition and parallel computing.
[0058] For example, based on the first current relationship equation, the first voltage relationship equation, and the candidate state space model, the first state space model corresponding to the target electromagnetic transient simulation project is determined, including: for the candidate state space model corresponding to each device, the second current relationship equation corresponding to each device is determined based on the candidate state space model; and based on the first current relationship equation, the first voltage relationship equation, and the second current relationship equation, the first state space model corresponding to the target electromagnetic transient simulation project is determined.
[0059] Among them, the second current relationship equation is an equation extracted from the candidate state-space model that directly describes the algebraic relationship between the device port current and port voltage.
[0060] Specifically, for each device, the expression of the current element corresponding to the device is extracted based on the candidate state space model, and the second current relationship equation corresponding to each device is generated. The first current relationship equation, the first voltage relationship equation and the second current relationship equation are combined and sorted to determine the first state space model corresponding to the target electromagnetic transient simulation project, providing strong data support for efficient and accurate simulation calculation.
[0061] S230. Determine the device partitioning results corresponding to the target electromagnetic transient simulation project, and based on the first state space model and the device partitioning results, determine at least one second state space model corresponding to the target electromagnetic transient simulation project.
[0062] S240. Based on the target simulation data and the second state space model corresponding to the target electromagnetic transient simulation project, determine the simulation calculation results corresponding to the target electromagnetic transient simulation project.
[0063] The technical solution of this embodiment determines the first current relationship equation and the first voltage relationship equation corresponding to the target electromagnetic transient simulation project based on the device connection information, and determines the initial state space model corresponding to each device in the target electromagnetic transient simulation project. This can intuitively describe the device state and provide a foundation for subsequent processing. Based on the first current relationship equation, the first voltage relationship equation, and the initial state space model, the first state space model corresponding to the target electromagnetic transient simulation project is determined, providing a technical foundation for subsequent parallel computing. By determining and organizing the first current relationship equation, the first voltage relationship equation, and the initial state space model, this invention can generate a linear first state space model, providing a solid mathematical foundation for subsequent parallel processing and high-performance simulation of the project.
[0064] For example, after S240, the process may further include: performing event detection on the target electromagnetic transient simulation project to obtain event detection results; and determining the event handling method corresponding to the event detection results based on the event detection results.
[0065] The event detection result can refer to the conclusion drawn during the simulation process, after monitoring the system state, regarding whether a specific sudden event has occurred and its details. The event handling method can refer to the numerical calculation strategy adopted based on the event detection result to ensure the simulation continues correctly.
[0066] Specifically, after the calculation at each time step is completed (i.e., after obtaining the simulation calculation result at time n+1), the variables related to the event can be checked. For example, check whether the voltage or current flowing through the switch reaches the judgment condition of its opening and closing logic, check whether the node voltage or branch current indicates a fault, check whether the controller state variables exceed the limit, obtain the event detection result, and determine the event handling method corresponding to the event detection result based on the event detection result. For example, the event handling method can be rollback and recalculation (used to handle rigid events) to ensure the consistency between the simulation model and the physical system before and after the event, and to ensure the reliability of the calculation result.
[0067] For example, the specific implementation process of the above electromagnetic transient simulation calculation can be as follows:
[0068] S1: The first state-space model is a system of equations constructed based on the state-space method and which can be automatically parallelized with Hough's current law (KCL) and voltage law (KVL).
[0069] First, the device-node link relationship (i.e. device connection information) of the example established by the user through the state space method can be obtained, and this relationship can be represented by Kirchhoff's laws;
[0070]
[0071]
[0072] Equation (1) is the first current relationship equation. and These are the device port voltage vector and current vector; It is a matrix listed according to KCL law, with all elements being -1, 0, and 1, which constrains the sum of currents at the connection ports of all devices to be zero; It is a matrix listed according to the KVL law, with all elements being -1, 0, and 1, which constrains different devices to have the same voltage at the same connection port.
[0073] Since the expression in equation (2) is equivalent to the connection port voltage being unique, it can be rewritten as follows:
[0074]
[0075] Equation (3) is the first voltage relationship equation. This is the port voltage vector at the connection point. This is the port-node correlation matrix.
[0076] The subsequent processing generates the state equations (i.e., the initial state-space model) for each device (such as circuit breakers, inverters, and motors), which can be written in the following form:
[0077]
[0078]
[0079] Where x is the state variable, u is the input variable, and y is the output variable. This is the constitutive coefficient matrix.
[0080] Process using discrete form:
[0081]
[0082]
[0083] in, The constitutive coefficient matrix after discretization;
[0084] For the first The state variables at each time step For the first The state variables at each time step;
[0085] For the first Input variables for time steps, For the first Output variables of time step
[0086] Reorganize and rewrite into matrix form (i.e., candidate state-space model):
[0087]
[0088] in, , .
[0089] Vector of each device Contains port current The elements are extracted from equation (8) for each device. The expression for (i.e., the second current relation equation):
[0090]
[0091] in, and for and The corresponding block vectors and matrices.
[0092] The physical meanings of each term in equation (9) are as follows:
[0093] ,and Relatively It is the internal port voltage of the device;
[0094] , For historical entries of different devices, i.e., using known elements (such as...) and Items consisting of )
[0095] , These are the admittance terms for different devices.
[0096] Finally, by combining equations (9) and (1) and (3), we obtain the first state-space model (10):
[0097]
[0098]
[0099]
[0100]
[0101]
[0102] in, , , and
[0103] Equation (10) obtained so far is a fully linearized expression, with each module performing linear calculations, specifically as follows: , , , and Each block in the middle (such as and , and The calculations of each do not affect each other.
[0104] S2: Automatic grouping of basic components in the project, parallel computation load redistribution: due to the expression in S1 ( , , , and The calculations are all linear, therefore they can be interchanged. The order of the response matrix variables is determined without affecting the calculation results. The types and data of the basic components involved in the system computing example are then evenly distributed according to the user-provided resources available for parallel computing (such as the number of computing nodes and threads) to determine the device partitioning results. This ensures that the computational pressure among each parallel computing unit is similar, optimizing the parallel load and avoiding the parallel waiting problem caused by the "weakest link" effect. For example, such as... Figure 3 As shown, the user provides two threads for calculation. In the example, there are 5 resistors, 4 inductors, and 2 motors. The first thread is assigned 3 resistors, 1 inductor, and 1 motor, and the second thread is assigned 2 resistors, 1 inductor, and 1 motor. The order of the variables and matrices in equation (10) is readjusted according to the redistribution results to generate the second state space model.
[0105] S3: Perform single-step computations in parallel: e.g. Figure 4 As shown, in the first step, each parallel computing unit uses equations (6) and (7) to calculate the coefficients of the state equations for each group. , , and In the second step, each parallel computing unit uses equation (9) to calculate the historical port current parameters. and port admittance matrix The third step is that each parallel computing unit uses... and Fill in equation (10); fourth step, solve equation (10); fifth step, and... Bring back to each parallel computing unit and complete the tasks within each parallel computing unit. The calculations are performed to obtain the simulation results.
[0106] After obtaining the simulation results, the following is also included:
[0107] S31: After step five, an event check can be performed on the simulation results. If any changes occur to the results of step one... , , and If the time frame is insufficient, appropriate event handling methods can be adopted. If the event generates a rigid problem, then return to the first step and regenerate according to the event handling method. , , and And continue with the remaining steps;
[0108] S32: In the first step, parallel execution of the various basic components is not required. , , and The calculation method is the same, but different numerical formats can be used to optimize the calculation results.
[0109] Example 3
[0110] Figure 5 This is a schematic diagram of the structure of an electromagnetic transient simulation computing device provided in Embodiment 3 of the present invention. Figure 5 As shown, the device includes: a first model determination module 310, a second model determination module 320, and a simulation calculation module 330;
[0111] The first model determination module is used to determine the first state space model corresponding to the target electromagnetic transient simulation project based on the device connection information corresponding to the target electromagnetic transient simulation project.
[0112] The second model determination module is used to determine the device partitioning result corresponding to the target electromagnetic transient simulation project, and based on the first state space model and the device partitioning result, determine at least one second state space model corresponding to the target electromagnetic transient simulation project.
[0113] The simulation calculation module is used to determine the simulation calculation results corresponding to the target electromagnetic transient simulation project based on the target simulation data and the second state space model.
[0114] The technical solution of this invention, by determining the first state space model corresponding to the target electromagnetic transient simulation project based on the device connection information, achieves automated global modeling of the simulation project, providing reliable technical support for subsequent parallel simulation calculations. By determining the device partitioning result corresponding to the target electromagnetic transient simulation project, and based on the first state space model and the device partitioning result, at least one second state space model corresponding to the target electromagnetic transient simulation project is determined, enabling flexible and balanced computational load allocation. Based on the target simulation data corresponding to the target electromagnetic transient simulation project and the second state space model, the simulation calculation result corresponding to the target electromagnetic transient simulation project is determined, significantly improving computational efficiency while ensuring computational reliability and accuracy. This invention achieves global modeling of the simulation project through state space, and by combining the global modeling result with allocable computing resources, achieves flexible dynamic load balancing, thereby realizing efficient electromagnetic transient simulation calculations, greatly improving the flexibility and efficiency of electromagnetic transient simulation calculations, and thus ensuring the development and design efficiency of designers.
[0115] Optionally, the first model determination module 310 includes:
[0116] The initial model determination unit is used to determine the first current relationship equation and the first voltage relationship equation corresponding to the target electromagnetic transient simulation project based on the device connection information corresponding to the target electromagnetic transient simulation project, and to determine the initial state space model corresponding to each device in the target electromagnetic transient simulation project.
[0117] The first model determination unit is used to determine the first state space model corresponding to the target electromagnetic transient simulation project based on the first current relationship equation, the first voltage relationship equation and the initial state space model.
[0118] Optionally, the first model determining unit includes:
[0119] The candidate model determination sub-unit is used to discretize each initial state space model corresponding to each device, and then perform matrix processing on the discretized initial state space model to generate a candidate state space model.
[0120] The first model determination sub-unit is used to determine the first state space model corresponding to the target electromagnetic transient simulation project based on the first current relationship equation, the first voltage relationship equation, and the candidate state space model.
[0121] Optionally, the first model determining sub-unit is specifically used for: for each device, determining a second current relationship equation corresponding to each device based on the candidate state space model; and determining a first state space model corresponding to the target electromagnetic transient simulation project based on the first current relationship equation, the first voltage relationship equation, and the second current relationship equation.
[0122] Optionally, the second model determining module 320 includes:
[0123] The device partitioning unit is used to determine the device type information and device quantity information corresponding to the target electromagnetic transient simulation project; based on multiple computing threads and the load parameters, device type information and device quantity information corresponding to each computing thread, the device partitioning unit is used to partition the devices corresponding to the target electromagnetic transient simulation project and determine the device partitioning result corresponding to the target electromagnetic transient simulation project.
[0124] Optionally, the simulation calculation module 330 is specifically used to: determine the state equation coefficients, port historical current parameters, and port admittance matrix corresponding to each second state space model in parallel based on the target simulation data corresponding to the target electromagnetic transient simulation project; and determine the simulation calculation results corresponding to the target electromagnetic transient simulation project based on the state equation coefficients, port historical current parameters, and port admittance matrix corresponding to each second state space model.
[0125] Optionally, the device further includes an event detection module, which is specifically used to: after determining the simulation calculation result corresponding to the target electromagnetic transient simulation project, perform event detection on the target electromagnetic transient simulation project to obtain event detection results; and determine the event handling method corresponding to the event detection results based on the event detection results.
[0126] The above-described device can execute the electromagnetic transient simulation calculation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the electromagnetic transient simulation calculation method.
[0127] Example 4
[0128] Figure 6This is a schematic diagram of the structure of an electronic device implementing the electromagnetic transient simulation calculation method of this invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0129] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0130] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0131] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as electromagnetic transient simulation calculation methods.
[0132] In some embodiments, the electromagnetic transient simulation calculation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the electromagnetic transient simulation calculation method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the electromagnetic transient simulation calculation method by any other suitable means (e.g., by means of firmware).
[0133] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.
[0134] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0135] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0136] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0137] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0138] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0139] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0140] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0141] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method of electromagnetic transient simulation calculation, characterized by, The method comprises the following steps: determining a first state space model corresponding to a target electromagnetic transient simulation project based on device connection information corresponding to the target electromagnetic transient simulation project; determining a device partition result corresponding to the target electromagnetic transient simulation project, and determining at least one second state space model corresponding to the target electromagnetic transient simulation project based on the first state space model and the device partition result; determining a simulation calculation result corresponding to the target electromagnetic transient simulation project based on target simulation data corresponding to the target electromagnetic transient simulation project and the second state space model.
2. The method of claim 1, wherein, The method comprises the following steps: determining a first current relationship equation and a first voltage relationship equation corresponding to the target electromagnetic transient simulation project based on device connection information corresponding to the target electromagnetic transient simulation project, and determining an initial state space model corresponding to each device in the target electromagnetic transient simulation project; determining a first state space model corresponding to the target electromagnetic transient simulation project based on the first current relationship equation, the first voltage relationship equation and the initial state space model.
3. The method of claim 2, wherein, The method comprises the following steps: discretizing each initial state space model corresponding to each device, and performing matrix processing on the discretized initial state space model to generate a candidate state space model; determining a first state space model corresponding to the target electromagnetic transient simulation project based on the first current relationship equation, the first voltage relationship equation and the candidate state space model.
4. The method of claim 3, wherein, The method comprises the following steps: determining a second current relationship equation corresponding to each device based on the candidate state space model corresponding to each device; determining a first state space model corresponding to the target electromagnetic transient simulation project based on the first current relationship equation, the first voltage relationship equation and the second current relationship equation.
5. The method of claim 1, wherein, The method comprises the following steps: determining device type information and device quantity information corresponding to the target electromagnetic transient simulation project; dividing devices corresponding to the target electromagnetic transient simulation project based on a plurality of calculation threads, a load parameter corresponding to each calculation thread, the device type information and the device quantity information, to determine a device partition result corresponding to the target electromagnetic transient simulation project.
6. The method of claim 1, wherein, The method comprises the following steps: determine, in parallel, a state equation coefficient, a port historical current parameter and a port admittance matrix corresponding to each of the second state space models based on the target simulation data corresponding to the target electromagnetic transient simulation project; determine a simulation calculation result corresponding to the target electromagnetic transient simulation project based on the second state space model and the state equation coefficient, the port historical current parameter and the port admittance matrix corresponding to each of the second state space models.
7. The method of claim 1, wherein, After determining the simulation calculation result corresponding to the target electromagnetic transient simulation project, the method further comprises: performing event detection on the target electromagnetic transient simulation project to obtain an event detection result; determine an event processing mode corresponding to the event detection result based on the event detection result.
8. An electromagnetic transient simulation computing device, characterized by, The method comprises: a first model determination module configured to determine a first state space model corresponding to the target electromagnetic transient simulation project based on device connection information corresponding to the target electromagnetic transient simulation project; a second model determination module configured to determine a device partition result corresponding to the target electromagnetic transient simulation project, and determine at least one second state space model corresponding to the target electromagnetic transient simulation project based on the first state space model and the device partition result; a simulation calculation module configured to determine a simulation calculation result corresponding to the target electromagnetic transient simulation project based on target simulation data corresponding to the target electromagnetic transient simulation project and the second state space model.
9. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the electromagnetic transient simulation calculation method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to execute the electromagnetic transient simulation calculation method of any one of claims 1-7 when executed by the processor.