A method, device, terminal, medium, and product for inverse simulation of power systems.
By using a computational graphical model and backpropagation calculations based on the duality principle, the problem of low efficiency in solving inverse problems in traditional power system simulation tools is solved, achieving efficient and accurate parameter optimization and shortening the design cycle.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
- Filing Date
- 2026-04-23
- Publication Date
- 2026-06-30
Smart Images

Figure CN122310992A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power system simulation technology, and in particular to a power system inverse simulation method, device, terminal, medium and product. Background Technology
[0002] Power system simulation is a core supporting tool for power grid planning, operation analysis, protection setting, and controller design. With the large-scale grid connection of new energy sources, the widespread penetration of power electronic equipment, and the increasing complexity of power grid topologies, the requirements for simulation accuracy and efficiency continue to rise. Traditional simulation tools employ a forward solution approach, where given a network model, equipment parameters, and disturbance conditions, the system's dynamic response is obtained through numerical integration or iterative solutions to verify whether the system's behavior meets requirements under specific operating conditions.
[0003] In engineering practice, many core problems are essentially inverse in nature: engineers need to determine which control parameters will enable the system voltage to recover according to the desired curve after a fault, or which protection setting configuration will achieve the specified action sequence. Current solutions to these problems rely on iterative trial and error using forward simulation. Commonly used simulation methods are iterative simulation methods driven by parameter scanning or optimization algorithms. Their working principle is as follows: a search grid is set in the parameter space or a heuristic optimization algorithm is used to generate parameter candidates. For each set of parameters, a forward simulator is called to calculate the system response. The response is compared with the desired target to obtain a deviation index. Then, the optimization algorithm updates the parameters for the next round of simulation, iterating repeatedly until convergence. However, in engineering practice, existing iterative simulation methods require calling a complete forward simulation in each optimization iteration. As the number of parameters to be designed increases, the number of simulation calls required grows exponentially with the parameter dimension, typically requiring hundreds to thousands of forward simulations to converge. This extends the design cycle from hours to days, severely restricting engineering design efficiency. Summary of the Invention
[0004] This application provides a power system inverse simulation method, device, terminal, medium, and product, which aims to improve the efficiency of power system parameter optimization, reduce the number of simulation calls, and improve the speed and accuracy of solving inverse problems.
[0005] To achieve the above-mentioned objectives, the first aspect of this application provides a power system inverse simulation method, comprising:
[0006] Obtain a system model of the power system;
[0007] Based on the system model, a computational graph model corresponding to the power system is constructed, wherein the computational graph model uses the model parameters of the system model as input nodes and the system dynamic response as output nodes;
[0008] Based on the computational graph model, and using the current model parameter configuration of the system model as input parameters, a forward simulation is performed to obtain the system dynamic response under the current parameter conditions;
[0009] Based on the duality principle, an adjoint equation dual to the forward simulation equation is constructed. Backpropagation calculation is performed using the adjoint equation and a preset objective function. Based on the results of the backpropagation calculation, the gradient vector of the objective function with respect to each input parameter is determined. The objective function is used to calculate the response deviation between the system dynamic response output by this forward simulation and the preset expected target response. The gradient vector is used to characterize the direction and magnitude of the contribution of each input parameter to the response deviation under the current value.
[0010] If the response deviation does not meet the preset convergence condition, the input parameters are updated according to the gradient vector, and a forward simulation is performed again based on the updated input parameters. If the response deviation meets the convergence condition, the current input parameters are output.
[0011] Preferably, constructing the computational graph model corresponding to the power system based on the system model specifically includes:
[0012] Based on the system model, the differential equations and algebraic equations contained in the system model are extracted. The differential equations are used to describe processes such as generator rotor motion, excitation system dynamics, and load dynamics, while the algebraic equations are used to describe power grid balance and equipment port relationships.
[0013] The differential equation is discretized to obtain a difference equation characterized by time step. Based on the difference equation and the algebraic equation, the simulation process of the power system is characterized as multiple cascaded computing nodes, where each computing node represents a computing step and each computing node contains a forward computing function and a local Jacobian matrix computing function.
[0014] Discontinuous computation nodes are selected from the computation nodes. Following a smooth approximation method, the forward computation function of the discontinuous computation nodes is replaced with a continuous characteristic function. The discontinuous computation nodes are those whose computation step type contains discontinuous characteristics.
[0015] Using the model parameters of the system model as input nodes, the system dynamic response as output nodes, and each of the computing nodes as intermediate nodes, the input nodes, each of the intermediate nodes, and the output nodes are connected sequentially according to the time step sequence of the power system simulation process to obtain the computational graph model corresponding to the power system.
[0016] Preferably, the system model includes: a network topology sub-model, a device sub-model, and a controller sub-model.
[0017] Preferably, based on the computational graph model, and using the current model parameter configuration of the system model as input parameters, a forward simulation is performed to obtain the system dynamic response under the current parameter conditions, including:
[0018] Based on the computational graph model, and using the current model parameter configuration of the system model as input parameters, forward simulation is performed in a time-step manner. Intermediate computational data generated at each time step is saved. Finally, the dynamic response of the system under the current parameter conditions is obtained through the output node. The intermediate computational data includes: the input value, output value, and corresponding local Jacobian matrix of each computational node.
[0019] Preferably, backpropagation calculation is performed using the adjoint equation and a preset objective function to determine the gradient vector of the objective function with respect to each input parameter based on the results of the backpropagation calculation. Specifically, this includes:
[0020] Using the response deviation of the objective function as the initial condition of the adjoint equation, propagation calculation is performed according to the reverse time step. In each reverse time step, matrix-vector multiplication is performed using the transpose of the local Jacobian matrix recorded in the forward simulation to update the variables of the adjoint equation and simultaneously accumulate the local gradient vector obtained in each reverse time step. When all the reverse time steps have been traversed, the gradient vector of the objective function with respect to each input parameter is obtained.
[0021] Preferably, the convergence condition is as follows: the response deviation of the current iteration drops below a preset convergence threshold or the norm of the update amount of the input parameter is lower than a preset parameter convergence tolerance.
[0022] Meanwhile, a second aspect of this application provides a power system inverse simulation device, comprising:
[0023] The system model acquisition unit is used to acquire the system model of the power system.
[0024] The computational graph model construction unit is used to construct a computational graph model corresponding to the power system based on the system model. The computational graph model uses the model parameters of the system model as input nodes and the system dynamic response as output nodes. Each intermediate node of the computational graph model is used to represent each step of the simulation calculation.
[0025] The forward simulation calculation unit is used to perform forward simulation based on the computation graph model and the current model parameter configuration of the system model as input parameters to obtain the dynamic response of the system under the current parameter conditions.
[0026] The backpropagation calculation unit is used to construct an adjoint equation that is dual to the forward simulation equation based on the duality principle, and to perform backpropagation calculation using the adjoint equation and a preset objective function. Based on the result of the backpropagation calculation, the gradient vector of the objective function with respect to each input parameter is determined. The objective function is used to calculate the response deviation between the system dynamic response output by the current forward simulation and the preset expected target response. The gradient vector is used to characterize the direction and magnitude of the contribution of each input parameter to the response deviation under the current value.
[0027] The parameter update determination unit is used to update the input parameters according to the gradient vector if the response deviation does not meet the preset convergence condition, and to re-perform the forward simulation based on the updated input parameters. If the response deviation meets the convergence condition, the current input parameters are output.
[0028] A third aspect of this application provides a power system inverse simulation terminal, comprising: a memory and a processor;
[0029] The memory is used to store program code, which corresponds to the power system inverse simulation method provided in the first aspect of this application.
[0030] The processor is used to read and execute the program code to implement the power system inverse simulation method.
[0031] The fourth aspect of this application provides a computer-readable storage medium storing program code, which is read and executed by a processor to implement the power system inverse simulation method provided in the first aspect of this application.
[0032] The fifth aspect of this application provides a computer program product comprising: a computer program stored on a non-transitory computer-readable storage medium, the computer program being composed of program code, the program code being read and executed by a processor to implement the power system inverse simulation method provided in the first aspect of this application.
[0033] As can be seen from the above technical solutions, this application has the following advantages:
[0034] This application introduces a computational graph model and backpropagation computation based on the duality principle. First, by constructing a differentiable computational graph, the internal computational structure of the simulation is fully exposed to the inverse simulation solution mechanism, avoiding the information loss caused by traditional black-box calls. This allows gradient information to propagate accurately along the causal chain of the simulation. Then, after executing a forward simulation, the adjoint equation constructed using the duality principle is used to simultaneously obtain the analytical-level precision gradient of the objective function with respect to all input parameters through a single backpropagation of the same order as the forward simulation. The direction and magnitude of parameter adjustment are then constrained based on the obtained gradient vector. This efficiency advantage transforms the design problem in high-dimensional parameter space from computationally infeasible to computationally feasible, improving the efficiency of power system parameter optimization, reducing the number of simulation calls, accelerating the convergence process, saving computational resources, thereby improving the speed and accuracy of inverse problem solving and shortening the engineering design cycle. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a flowchart illustrating an embodiment of a power system inverse simulation method provided in this application.
[0037] Figure 2 This is a schematic diagram of the architecture of an embodiment of a power system inverse simulation device provided in this application.
[0038] Figure 3 This is a schematic diagram of the architecture of an embodiment of a power system inverse simulation terminal provided in this application. Detailed Implementation
[0039] Traditional inverse problems in power systems, such as determining control parameters or protection settings, typically rely on iterative trial-and-error methods using forward simulation. Existing iterative simulation methods require calling a complete forward simulation in each optimization iteration. As the number of parameters to be designed increases, the number of simulation calls grows exponentially, leading to long convergence times and severely limiting engineering design efficiency. Therefore, this application provides a power system inverse simulation method, apparatus, terminal, medium, and product to improve the efficiency of power system parameter optimization, reduce the number of simulation calls, and enhance the speed and accuracy of solving inverse problems.
[0040] To make the inventive objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0041] First, a detailed description of an embodiment of a power system inverse simulation method provided in this application is as follows:
[0042] Please see Figure 1 This embodiment provides a power system inverse simulation method, the steps of which include:
[0043] Step 101: Obtain the system model of the power system;
[0044] Step 102: Based on the system model, construct the corresponding computational graph model of the power system;
[0045] Step 103: Based on the computational graph model, and using the current model parameter configuration of the system model as input parameters, perform forward simulation to obtain the system dynamic response under the current parameter conditions;
[0046] Step 104: Construct the adjoint equation, which is dual to the forward simulation equation, based on the duality principle. Then, perform backpropagation calculation using the adjoint equation and the preset objective function. Based on the results of the backpropagation calculation, determine the gradient vector of the objective function with respect to each input parameter.
[0047] Step 105: If the response deviation does not meet the preset convergence condition, update the input parameters according to the gradient vector, and perform a forward simulation again based on the updated input parameters. If the response deviation meets the convergence condition, output the current input parameters.
[0048] It should be noted that, for ease of understanding, the following explanations are provided for some key terms in this embodiment:
[0049] System model: refers to a set of mathematical models used to describe the physical characteristics and operating behavior of a power system. It can include mathematical descriptions of components such as generators, transformers, transmission lines, loads, and various control devices, and is used to simulate the dynamic response of the power system in a simulation environment.
[0050] Computational graph models are graphical structures that represent complex computational processes as nodes and edges, where nodes represent computational operations or variables, and edges represent data flows. In power system simulation, computational graph models decompose the simulation process into a series of discrete computational steps, facilitating automated differentiation and optimization.
[0051] Forward simulation refers to the process of calculating the dynamic response of a power system step by step in time, given system model parameters and initial conditions. Its purpose is to predict the behavior of the system under specific operating conditions.
[0052] Duality principle: In optimization theory, this refers to the method of constructing a dual problem related to the primal problem, thereby simplifying computation or providing a more in-depth theoretical analysis in certain situations. In power system inverse simulation, the duality principle is used to construct adjoint equations for efficient calculation of gradient information.
[0053] The adjoint equations are a set of equations constructed based on the duality principle, corresponding to the forward simulation equations. They are used to efficiently calculate the gradient of the objective function with respect to the system model parameters during backpropagation.
[0054] Backpropagation computation: refers to an algorithm used to calculate the gradient of an objective function with respect to input parameters. It works by propagating the error backward from the output to the input and using the chain rule to calculate the gradient of each parameter. It is widely used in machine learning and optimization.
[0055] Objective function: A mathematical function used to quantify the difference between the system's dynamic response output in the simulation and the preset desired target response. The smaller its output value, the closer the simulation result is to the desired target.
[0056] Gradient vector: A vector composed of the partial derivatives of the objective function with respect to each input parameter. Its direction indicates the direction in which the objective function value increases the most, and its magnitude represents the rate of change in that direction. It is used in optimization algorithms to guide parameter updates.
[0057] Response bias: refers to the difference between the system's dynamic response output by forward simulation and the preset expected target response. It is the result of objective function quantification and is used to evaluate the degree of deviation between the system behavior and the expected behavior under the current parameter configuration.
[0058] Convergence criterion: This refers to the standard used in iterative optimization to determine whether the algorithm has achieved the expected optimization effect or whether it can stop iterating. It can be set based on factors such as the magnitude of the response deviation and changes in parameter update amounts.
[0059] More specifically, this application provides a power system inverse simulation method, the steps of which can be seen in the following example:
[0060] First, a system model of the power system is acquired. This model can contain mathematical descriptions of the various components of the power system, such as generators, transformers, transmission lines, loads, and various control devices. The system model can be obtained manually, by operators manually inputting information such as the power system's topology, equipment types, and initial parameters. Alternatively, the system model can be read from pre-stored non-standardized data files, such as text files or databases in a specific format, and then parsed to extract the required model parameters.
[0061] Secondly, based on the obtained system model, a computational graph model corresponding to the power system is constructed. This computational graph model uses the model parameters of the system model as input nodes and the system dynamic response as output nodes. Specifically, a direct mapping approach can be used, treating the entire power system model as a black box, where its input parameters directly correspond to the input nodes of the computational graph, and the final system dynamic response corresponds to the output nodes, without performing detailed graph structure decomposition of the internal computational process of the model. Alternatively, a coarse-grained computational graph model can be constructed, where only the main equipment or subsystems in the power system are used as computational nodes, while ignoring the detailed computational logic within these equipment or subsystems.
[0062] Next, based on the constructed computational graph model, and using the current model parameter configuration as input parameters, forward simulation is performed to obtain the system's dynamic response under the current parameter conditions. In one implementation, forward simulation can employ traditional numerical integration methods, such as the Euler method or a modified Euler method, to solve the system model in time steps. During this process, only the final output state at each time step can be recorded, without saving intermediate computational data.
[0063] Subsequently, based on the duality principle, an adjoint equation, the dual to the forward simulation equation, is constructed. Backpropagation is then performed using this adjoint equation and a pre-defined objective function to determine the gradient vector of the objective function with respect to each input parameter. This objective function is used to calculate the response deviation between the system dynamic response output from the current forward simulation and the pre-defined desired target response. The gradient vector characterizes the direction and magnitude of each input parameter's contribution to the response deviation at its current value. Specifically, the gradient vector can be approximated using the finite difference method, i.e., by applying small perturbations to each input parameter and re-running the forward simulation to observe the change in the objective function, thereby estimating the gradient of each parameter. Alternatively, a sign derivative tool can be used to perform sign differentiation on the forward simulation equation to obtain an accurate gradient expression.
[0064] Finally, if the response deviation does not meet the preset convergence condition, the input parameters are updated according to the gradient vector, and the forward simulation is performed again based on the updated input parameters. If the response deviation meets the convergence condition, the current input parameters are output. In one implementation, parameter updates can use a fixed-step gradient descent method, where the input parameters move a preset fixed step size in the opposite direction of the gradient vector in each iteration. The convergence condition can be simply set to reaching a preset maximum number of iterations, without considering the actual change in response deviation or parameter update amount.
[0065] This application achieves efficient gradient acquisition in power system inverse simulation by introducing a computational graph model and backpropagation calculation based on the duality principle. This method avoids the repeated full calls to the forward simulator in traditional iterative simulations, reducing the number of simulations required for parameter optimization. Therefore, when dealing with inverse problems of multi-parameter, complex power systems, it can effectively shorten the design cycle, improve engineering design efficiency, and solve the problem of low simulation efficiency in existing technologies.
[0066] In some embodiments, this application further proposes a method for constructing a computational graph model corresponding to a power system, specifically including:
[0067] First, based on the system model, the differential and algebraic equations contained within the model are extracted. The differential equations describe the dynamic processes of the power system, such as generator rotor motion, excitation system dynamics, and load dynamics, which change over time. These equations typically exist in the form of ordinary differential equations or partial differential equations, reflecting the evolution of system state variables. The algebraic equations describe instantaneous constraints such as grid power balance and equipment port relationships, including Kirchhoff's laws, power flow equations, and voltage-current relationships of various devices (such as transformers and lines). These equations are usually memoryless, meaning their output depends only on the current input. Through this step, the physical characteristics and operating laws of the power system are transformed into a set of equations that can be mathematically processed.
[0068] Secondly, the differential equations are discretized to obtain difference equations characterized by time steps. Power system simulations are typically performed in the discrete time domain; therefore, continuous differential equations need to be converted into discrete difference equations using numerical integration methods (e.g., Euler's method, trapezoidal integration method, or Runge-Kutta method). Based on the difference equations and the algebraic equations, the power system simulation process is represented as multiple cascaded computation nodes. Each computation node represents a computational step in the simulation process, such as a state update within a time step, the calculation of a device model, or the solution of a network power flow. Each computation node contains a forward computation function and a local Jacobian matrix calculation function. The forward computation function is responsible for outputting the computation result of the node based on the current value of the input computation node; the local Jacobian matrix calculation function is responsible for calculating the local partial derivative matrix of the node's output with respect to the input, which is crucial for subsequent backpropagation calculations.
[0069] Furthermore, discontinuous computation nodes are selected from the computation nodes, and their forward computation functions are replaced with continuous characteristic functions using a smooth approximation method. Discontinuous computation nodes refer to those whose computation steps contain discontinuous characteristics, such as limiters, protection actions, and switch switching. These discontinuities can lead to gradient uncertainty or non-existence in traditional gradient calculations, thus affecting the stability and accuracy of backpropagation. By using smooth approximations, such as differentiable functions like the Sigmoid function, Tanh function, or polynomial approximation, to approximate the original discontinuous characteristics, the continuity and computability of the gradient across the entire computational domain can be ensured, thereby enabling the backpropagation algorithm to run stably.
[0070] More specifically, the kurtosis parameter of the substitution function can be preset according to the physical meaning and accuracy requirements of the node in the system: for example, for protection tuning applications, a higher kurtosis is used to maintain the sharpness of the protection action; for control parameter tuning applications, a relatively gentle kurtosis can be used to obtain a smoother gradient field.
[0071] Finally, using the model parameters of the system model as input nodes, the system dynamic response as output nodes, and each of the computational nodes as intermediate nodes, the input nodes, intermediate nodes, and output nodes are connected sequentially according to the time step sequence of the power system simulation process to obtain the computational graph model corresponding to the power system. The model parameters can be generator inertia, excitation system gain, load characteristic parameters, etc. The system dynamic response can be curves showing the changes of voltage, frequency, active power, and reactive power over time. In this way, the entire power system simulation process is constructed as a directed acyclic graph, where nodes represent computational operations and edges represent data flows, providing a clear and operable structure for subsequent forward simulation and backpropagation calculations.
[0072] The method described above for constructing a computational graph model enables the accurate mapping of complex power system dynamic simulation processes into a differentiable computational graph structure. In particular, the discretization of differential equations and the smooth approximation of discontinuous computational nodes effectively address common nonlinearity, strong coupling, and discontinuity issues in power system simulation, ensuring the computability and stability of gradients during backpropagation. This allows subsequent gradient vector calculations to accurately reflect the contribution of input parameters to response deviations, thus providing a solid foundation for power system inverse simulation and improving the accuracy and convergence of parameter identification and optimization processes.
[0073] Based on the above embodiments, this application further proposes that the system model includes: a network topology sub-model, a device sub-model, and a controller sub-model.
[0074] Specifically, the network topology sub-model describes the physical connections and structural layout between components within the power system, such as buses, lines, and transformers. Its parameters may include line impedance and transformer turns ratio, and are typically represented using node-branch matrices or admittance matrices. The equipment sub-model characterizes the inherent characteristics and operating parameters of various devices in the power system, such as generators, loads, capacitors, and reactors. Its parameters include inertia constants, damping coefficients, time constants, and gains. These devices are typically described by a set of differential-algebraic equations to illustrate their steady-state and dynamic behavior. The controller sub-model defines the logic and parameters of various control systems in the power system, such as automatic voltage regulators (AVRs), power system stabilizers (PSSs), and speed governors. Its parameters include controller gain, time constant, and limiting values, and can be described using transfer functions or state-space models.
[0075] The above technical solution refines the power system model into network topology sub-models, equipment sub-models, and controller sub-models, ensuring that key elements such as the physical connections, equipment characteristics, and control logic of the power system can be comprehensively and accurately captured and represented. This structured modeling approach allows for more precise extraction and characterization of the differential and algebraic equations contained in the system when constructing the computational graph model, thereby improving the accuracy and completeness of the computational graph model. Based on this, forward simulation can more realistically reflect the dynamic response of the power system, while the gradient vector obtained from backpropagation calculation can more accurately indicate the direction and magnitude of the contribution of each input parameter to the response deviation. This significantly improves the reliability and optimization efficiency of the inverse simulation process, making the identification and adjustment of power system parameters more accurate and effective, and providing a solid foundation for power system operation optimization and fault diagnosis.
[0076] In some embodiments, this application further proposes to perform forward simulation based on the above-described computational graph model, combined with the current model parameter configuration of the above-described system model as input parameters, to obtain the system dynamic response under the current parameter conditions. This includes: performing forward simulation in a time-step manner based on the above-described computational graph model, combined with the current model parameter configuration of the above-described system model as input parameters, saving the intermediate computational data generated at each time step, and finally obtaining the system dynamic response under the current parameter conditions through the above-described output node. The intermediate computational data includes: the input value, output value, and corresponding local Jacobian matrix of each computational node.
[0077] It should be noted that dynamic simulation of power systems typically involves solving systems of differential-algebraic equations, which requires discretizing the problem in the continuous time domain. Forward simulation using a time-stepping approach involves dividing the entire simulation period into a series of discrete time steps. Within each time step, numerical integration methods (such as the Euler method, Runge-Kutta method, etc.) are used to iteratively solve for the state and algebraic variables of the power system. Specifically, at each time step, based on the current state and input, the state for the next time step is calculated, and the system output is updated. This method can progressively deduce the dynamic behavior of the power system under different parameter configurations, thereby obtaining the complete system dynamic response curve.
[0078] During forward simulation, the system generates a large number of intermediate computation results at each time step. Saving the intermediate computation data generated at each time step refers to storing key information such as the input values, output values, and local Jacobian matrices produced by each computation node when executing its forward computation function at each time step. This data forms the basis for subsequent backpropagation calculations, avoiding the repetition of forward calculations during backpropagation and thus significantly improving the computational efficiency of the inverse simulation process. Storage methods can include memory caching, disk files, etc., depending on the data size and access speed requirements.
[0079] In a computational graph model, each computation node represents a specific computational step, such as the model equations of a device, the logic operation of a controller, or a network power flow calculation. The input values of each computation node are the data received from upstream nodes or system parameters, while the output values are the results produced by the node after processing the inputs according to its forward computation function. Saving these input and output values is crucial for accurately reconstructing or verifying the computational state of each node during the backpropagation phase, and for providing the necessary contextual information for calculating the local Jacobian matrix.
[0080] The corresponding local Jacobian matrix characterizes the sensitivity of a single computation node's output to its input. For a computation node, if its output vector is y and its input vector is x, then the elements J of the local Jacobian matrix J are...ij Indicates y i For x j The partial derivatives of the partial derivatives. During forward simulation, each computation node, after completing its forward computation, synchronously calculates and stores its corresponding local Jacobian matrix. These local Jacobian matrices are core elements for implementing backpropagation algorithms based on the duality principle (such as the adjoint sensitivity method), because the chain rule of backpropagation requires the transpose of these local Jacobian matrices to calculate the gradient layer by layer. By pre-calculating and storing them, the complex partial derivative calculations can be avoided during backpropagation, further improving computational efficiency and accuracy.
[0081] Through the above technical solution, in forward simulation based on the computational graph model, not only is the dynamic response of the system obtained, but more importantly, by performing simulation in a time-step manner and saving the intermediate computational data generated at each time step, especially the input and output values of each computation node and the corresponding local Jacobian matrix, a solid foundation is laid for subsequent backpropagation calculations. This data saving mechanism eliminates the need to re-execute the time-consuming forward simulation process to obtain intermediate variables and local sensitivity information when determining the gradient vector. Instead, backpropagation can directly utilize the transpose of the stored local Jacobian matrix for matrix-vector multiplication, thereby efficiently and accurately calculating the gradient vector of the objective function with respect to each input parameter. This significantly improves the computational efficiency of power system inverse simulation, reduces computational resource consumption, and makes it possible to perform parameter identification, optimization, or sensitivity analysis on complex power system models, thus enabling faster convergence to the desired objective and enhancing the practicality and engineering application value of the inverse simulation method.
[0082] Building upon the aforementioned embodiments, this application further proposes a method for determining the gradient vector of the objective function with respect to various input parameters through backpropagation calculation using the adjoint equation and a preset objective function. This method uses the response deviation output by the objective function as the initial condition of the adjoint equation and performs propagation calculations in reverse time steps. Specifically, the response deviation output by the objective function quantifies the difference between the simulated dynamic response of the system and the preset desired target response. In the adjoint sensitivity analysis, this response deviation is used as the starting point of backpropagation, i.e., the initial condition of the adjoint equation at the final time step, enabling backpropagation to effectively trace the source of this deviation.
[0083] It should be noted that the working principle of the adjoint equation solution proposed in this embodiment is as follows: Based on the duality principle, a mapping relationship from input parameters to output response is established on the computational graph during the forward simulation process. The adjoint equation then establishes a mapping relationship from output gradient to input gradient on the dual graph of this computational graph. Specifically, let the state transition relationship at the k-th time step of the forward simulation be x_{k+1} = f_k(x_k, p), where x_k is the state variable at the k-th step, p is the input parameter vector, and f_k is the computation function at that time step. The adjoint equation defines the adjoint variable λ_k, which propagates in the reverse time direction and satisfies... The terminal condition of the accompanying variables is given by the gradient of the objective function's output at the final time step.
[0084] This module operates synchronously during the backpropagation of the adjoint equation. As the adjoint variable passes through computation nodes associated with the input parameter p, this module calculates the gradient contribution of the objective function to that parameter. The contribution value is then added to the gradient accumulator of the corresponding parameter. After backpropagation, the gradient accumulator of each parameter stores the complete gradient value of the objective function with respect to that parameter.
[0085] More specifically, in each backward time step, matrix-vector multiplication is performed using the transpose of the local Jacobian matrix recorded during the forward simulation to update the variables of the adjoint equation and simultaneously accumulate the local gradient vector obtained from each backward time step. The local Jacobian matrix characterizes the local sensitivity of the output of each computation node to its inputs (including state variables and model parameters) during the forward simulation. By performing matrix-vector multiplication with its transpose and the current adjoint variable, error or sensitivity information can be effectively backpropagated from the current time step to the previous time step, thereby updating the variables of the adjoint equation. These variables represent the sensitivity of the objective function to the system state variables at different time steps. Simultaneously, in each backward time step, based on the adjoint variable and the local Jacobian matrix, the local gradient contribution of the objective function to the model parameters involved in the current time step can be calculated and accumulated into the total gradient vector of the corresponding input parameters.
[0086] Once all backward time steps have been traversed—that is, the calculation has propagated from the final time step back to the initial time step—all local gradient contributions have been accumulated. At this point, the gradient vector of the objective function with respect to each input parameter is obtained. This gradient vector synthesizes the contributions from all time steps and accurately reflects the overall direction and magnitude of the influence of each input parameter on the response deviation throughout the simulation process.
[0087] By employing the aforementioned technical solution, the response deviation of the objective function output is used as the initial condition for the adjoint equation, and propagation calculations are performed using a reverse time step. This allows for the efficient and accurate calculation of the gradient vector of the objective function with respect to each input parameter. Specifically, in each reverse time step, matrix-vector multiplication is performed using the transpose of the local Jacobian matrix recorded during the forward simulation. This effectively propagates the error signal from the output to the input, avoiding the enormous computational overhead associated with multiple forward simulations for each parameter in traditional numerical perturbation methods. Simultaneously, the local gradient vector obtained in each reverse time step is accumulated synchronously, ensuring the integrity and accuracy of the gradient calculation. This results in a gradient vector that accurately represents the direction and magnitude of each input parameter's contribution to the response deviation. This backpropagation mechanism based on the adjoint equation significantly improves the efficiency and accuracy of parameter optimization and sensitivity analysis in large-scale, strongly coupled dynamic systems like power systems, providing a solid foundation for rapid convergence to the optimal parameter configuration. It is particularly suitable for inverse simulation scenarios requiring frequent iterations and high-precision gradient information.
[0088] In some embodiments, this application further proposes that the above-mentioned convergence condition is specifically: the response deviation of the current iteration drops below a preset convergence threshold or the norm of the update amount of the input parameter is lower than a preset parameter convergence tolerance.
[0089] Specifically, the convergence condition is a criterion used to determine whether the power system inverse simulation iterative process has reached the expected optimization objective and can be terminated. Its purpose is to ensure that the identified model parameters fully reflect the desired system dynamic response while avoiding unnecessary computational overhead.
[0090] The phrase "response deviation drops below a preset convergence threshold" refers to the difference between the calculated system dynamic response and the preset expected target response after each iteration of forward simulation. This difference quantifies the degree of deviation between the simulation results and the actual or expected behavior under the current model parameter configuration. The preset convergence threshold is a pre-set, sufficiently small positive value representing an acceptable range of response error. When the absolute value of the response deviation or some measure thereof (e.g., mean squared error) is less than this threshold, it indicates that the current model parameters can reproduce the expected system dynamic response with sufficient accuracy, and the algorithm can be considered to have converged. This threshold can be determined based on the simulation accuracy requirements of the actual application, the noise level of the system data, or empirical values.
[0091] On the other hand, the phrase "the norm of the input parameter update amount is lower than the preset parameter convergence tolerance" refers to calculating the overall magnitude of the parameter changes after adjusting the model parameters according to the gradient vector in each iteration. The input parameter update amount refers to the change of each model parameter relative to its value in the previous iteration in the current iteration. The norm is a mathematical quantity that measures the "magnitude" of these parameter update vectors; for example, it could be the L1 norm, L2 norm, or infinite norm, comprehensively reflecting the adjustment magnitude of all parameters. The preset parameter convergence tolerance is a pre-set, sufficiently small positive value. When the norm of the parameter update amount is less than this tolerance, it indicates that the model parameters hardly change significantly in the current iteration. Even if iterations continue, the adjustment magnitude of the parameters will be negligible, and the improvement effect on response bias will be very limited. This usually means that the optimization process has entered a stable region, and the parameters have tended to stabilize. This tolerance can be set according to the sensitivity of the parameters, the characteristics of the optimization algorithm, or the required parameter identification accuracy.
[0092] Through the above technical solution, the power system inverse simulation method proposed in this application considers not only the matching degree between the simulation output and the expected target when judging iterative convergence, but also the stability of the model parameters themselves. When the response deviation is small enough, it indicates that the simulation results have met the accuracy requirements; and when the parameter update amount is small enough, it indicates that the parameters have tended to stabilize, and the benefit of further iteration is minimal. This dual convergence condition design determines that the inverse simulation solution has converged if either condition is met, making the inverse simulation process more robust and efficient. It can effectively avoid the algorithm iterating endlessly when the response deviation is difficult to reach an extremely low value due to noise or model imperfections; at the same time, it can also prevent the algorithm from terminating prematurely when the parameters are basically stable but the response deviation has not yet fully met a certain strict threshold. Therefore, this scheme can ensure that stable and high-precision model parameters are obtained at a reasonable computational cost, significantly improving the practicality and reliability of the power system inverse simulation method.
[0093] The above is a detailed description of an embodiment of a power system inverse simulation method provided in this application. The following is a detailed description of related embodiments of a power system inverse simulation device, terminal, readable storage medium, and computer program product provided in this application.
[0094] Please see Figure 2 The second aspect of this application provides a power system inverse simulation device, comprising:
[0095] System model acquisition unit 201 is used to acquire the system model of the power system;
[0096] The computational graph model construction unit 202 is used to construct a computational graph model corresponding to the power system based on the system model. The computational graph model uses the model parameters of the system model as input nodes and the system dynamic response as output nodes. Each intermediate node of the computational graph model is used to characterize each step of the simulation calculation.
[0097] The forward simulation calculation unit 203 is used to perform forward simulation based on the calculation graph model and combined with the current model parameter configuration of the system model as input parameters to obtain the dynamic response of the system under the current parameter conditions;
[0098] The backpropagation calculation unit 204 is used to construct an adjoint equation that is dual to the forward simulation equation based on the duality principle, and to perform backpropagation calculation through the adjoint equation and a preset objective function. Based on the result of the backpropagation calculation, the gradient vector of the objective function with respect to each input parameter is determined. The objective function is used to calculate the response deviation between the system dynamic response output by the current forward simulation and the preset expected target response. The gradient vector is used to characterize the direction and magnitude of the contribution of each input parameter to the response deviation under the current value.
[0099] The parameter update determination unit 205 is used to update the input parameters according to the gradient vector if the response deviation does not meet the preset convergence condition, and to re-perform the forward simulation based on the updated input parameters. If the response deviation meets the convergence condition, the current input parameters are output.
[0100] In the specific implementation process, the system model acquisition unit first extracts the network topology sub-model, equipment sub-model, and controller sub-model from the power system database or configuration file to form a complete system model. The computational graph model construction unit further discretizes the differential and algebraic equations in the system model to obtain difference equations characterized by time steps, and transforms discontinuous computation nodes into continuous characteristic functions through smooth approximation, thereby constructing a structured computational graph model. The forward simulation computation unit performs time-step simulation based on this computational graph model, while saving intermediate data such as the input values, output values, and local Jacobian matrices of each computation node. The backpropagation computation unit uses the response deviation of the objective function output as the initial condition, and performs matrix-vector multiplication using the transpose of the local Jacobian matrix recorded in the forward simulation according to the reverse time-step sequence, efficiently accumulating to obtain the gradient vector. The parameter update determination unit updates the input parameters using the gradient descent method based on the gradient vector, and determines the convergence state based on whether the response deviation drops below the preset convergence threshold or whether the norm of the input parameter update is lower than the preset parameter convergence tolerance. If convergence fails, a new round of forward simulation and backpropagation iterations will begin with the updated parameters. If convergence is achieved, the final design parameter values will be output, and a complete verification forward simulation will be performed with these parameters. The system response curve from the verification simulation will be compared with the desired target curve, and an inverse simulation result report will be generated, including the final parameter values, the objective function convergence curve, and the matching degree index between the system response and the desired target, for engineers to review and confirm.
[0101] Furthermore, such as Figure 3 As shown, this application proposes a power system inverse simulation terminal, including: a memory 33 and a processor 31, wherein the memory 33 and the processor 31 can be connected through a communication bus 34; the memory 33 is used to store program code, which corresponds to the above-mentioned power system inverse simulation method; the processor 31 is used to read and execute the program code to implement the power system inverse simulation method.
[0102] It should be noted that this power system inverse simulation terminal is a computing entity integrating hardware and software, whose core function is to execute power system inverse simulation methods. It can be a dedicated computing device, such as a high-performance server or workstation, or it can be part of an embedded system, or it can provide services through a cloud computing platform. Its design aims to provide a stable and efficient operating environment for complex power system dynamic analysis and parameter identification.
[0103] Memory is a hardware component used for persistent or temporary storage of digital information (including program code and data). Specifically, memory can include non-volatile storage media, such as hard disk drives, solid-state drives, or flash memory, for long-term storage of program code for power system inverse simulation methods, as well as system models, simulation results, intermediate calculation data, etc.; it can also include volatile storage media, such as random access memory (RAM), for providing high-speed data access and temporary storage space while the processor executes the program code. The capacity and speed of memory directly affect the execution efficiency of inverse simulation methods and their ability to process large-scale data.
[0104] The processor is the core computing unit of the power system inverse simulation terminal, responsible for interpreting and executing the program code in memory. The processor can be a general-purpose central processing unit (CPU), possessing powerful logic control and serial computing capabilities, suitable for handling control flow and some computational tasks in inverse simulation methods; or it can be a graphics processing unit (GPU) or other dedicated accelerators, featuring a highly parallel computing architecture that can significantly accelerate large-scale matrix operations and parallel computing tasks involved in power system simulation, thereby improving the overall execution efficiency of the inverse simulation method. The processor reads the program code and executes computational, data transmission, and control operations according to the instruction sequence to realize each step of the power system inverse simulation method.
[0105] The program code is the specific software implementation of the power system inverse simulation method. It is a collection of instructions that, after being read and executed by the processor, can complete all or part of the functions of the power system inverse simulation method. These program codes correspond to the aforementioned power system inverse simulation method, meaning they precisely encode the logic and algorithms for all steps in the method, including acquiring the system model, constructing the computational graph model, performing forward simulation, performing backpropagation calculations based on the duality principle, and updating parameters. The program code can be a compiled executable file, an interpreted script, or firmware, and it forms the foundation for implementing the method's functionality.
[0106] By providing a power system inverse simulation terminal, this application effectively addresses the challenges faced by power system inverse simulation methods in practical applications in terms of deployment, execution, and management. This terminal stores the program code corresponding to the inverse simulation method in its memory, and the processor reads and executes this code, thereby transforming the abstract computational method into a concrete, operable physical entity. This enables the complex inverse simulation calculation process to run efficiently and stably on an integrated platform, ensuring the accuracy and reliability of the calculations. Simultaneously, this terminal-based implementation facilitates the integration of inverse simulation methods into existing power system analysis and control architectures, enhancing the practicality and deployability of the methods. It provides a solid hardware and software foundation for the accurate identification and optimization of power system model parameters, significantly improving the automation level and operational efficiency of inverse simulation work.
[0107] Furthermore, this application proposes a computer-readable storage medium storing program code, which is read and executed by a processor to implement the above-described power system inverse simulation method.
[0108] Specifically, the computer-readable storage medium refers to any non-transient physical medium capable of storing digital data and accessible by a computer system. It may include, but is not limited to, read-only memory (ROM), random access memory (RAM), flash memory, solid-state drive (SSD), hard disk drive (HDD), optical disc (CD, DVD, Blu-ray disc), etc. This medium provides persistent storage space for the program code of the power system inverse simulation method, ensuring the integrity and reusability of the program code.
[0109] The program code is a set of instructions written in a specific programming language, used to instruct the processor to perform specific operations. These instructions can exist in the form of source code, compiled machine code, bytecode, or scripts. In this application, the program code specifically carries all the logic and calculation steps of the above-mentioned power system inverse simulation method, including the acquisition of the system model, the construction of the computational graph model, forward simulation, backpropagation calculation of the adjoint equations, and parameter updating and determination.
[0110] By storing the power system inverse simulation method as program code on a computer-readable storage medium and executing it via a processor, this application effectively solves the problem of deploying complex algorithms onto practical computing devices. This implementation enables the aforementioned power system inverse simulation method to be executed accurately, efficiently, and automatically, transforming theoretical methods into operable computational tools. The computer-readable storage medium provides persistent storage of the program code, ensuring the repeatability and stability of the method; the processor provides the necessary computing resources, ensuring the rapid completion of numerous numerical calculations and iterative processes within the method. This greatly facilitates the deployment and promotion of the power system inverse simulation method in practical application scenarios such as power system planning, operation optimization, and fault diagnosis, improving the efficiency and accuracy of power system analysis.
[0111] Furthermore, this application also proposes a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program being composed of program code for being read and executed by a processor to implement the aforementioned power system inverse simulation method.
[0112] Specifically, the computer program product is a distributable and deployable software entity, with the computer program at its core. The computer program is program code composed of a series of instruction sets. This code precisely describes and implements each step of the aforementioned power system inverse simulation method, including acquiring a system model of the power system, constructing a computational graph model corresponding to the power system based on the system model, performing forward simulation based on the computational graph model and the current model parameter configuration of the system model as input parameters, constructing an adjoint equation dual to the forward simulation equation based on the duality principle and performing backpropagation calculation through the adjoint equation and a preset objective function, and updating the input parameters according to the gradient vector and re-performing the forward simulation or outputting the current input parameters. The non-transitory computer-readable storage medium, such as a hard disk drive, solid-state drive, optical disk, flash drive, or read-only memory, can stably store this program code for a long time, even in the event of a power outage. When the processor, such as a central processing unit (CPU), graphics processing unit (GPU), or other dedicated computing chip, reads and executes the program code on the storage medium, it will automatically complete the entire calculation process of the power system inverse simulation method according to a preset logical order and calculation rules.
[0113] The aforementioned technical solution provides the complex power system inverse simulation method as a computer program product, enabling it to operate automatically, efficiently, and accurately without human intervention. This significantly reduces operational complexity and error rates, avoiding biases introduced by manual calculations, and ensures the consistency and stability of the inverse simulation method's results across different hardware platforms and operating system environments. Furthermore, this format facilitates the deployment, distribution, and upgrading of the method, greatly enhancing the practicality, repeatability, and reliability of power system inverse simulation analysis, and providing strong technical support for power system planning, operation, and control.
[0114] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the terminals, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0115] In the several embodiments provided in this application, it should be understood that the disclosed terminals, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.
[0116] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the application described herein can be implemented, for example, 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.
[0117] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0118] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0119] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0120] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0121] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A power system inverse simulation method, characterized in that, include: Obtain a system model of the power system; Based on the system model, a computational graph model corresponding to the power system is constructed, wherein the computational graph model uses the model parameters of the system model as input nodes and the system dynamic response as output nodes; Based on the computational graph model, and using the current model parameter configuration of the system model as input parameters, a forward simulation is performed to obtain the system dynamic response under the current parameter conditions; Based on the duality principle, an adjoint equation dual to the forward simulation equation is constructed. Backpropagation calculation is performed using the adjoint equation and a preset objective function. Based on the results of the backpropagation calculation, the gradient vector of the objective function with respect to each input parameter is determined. The objective function is used to calculate the response deviation between the system dynamic response output by this forward simulation and the preset expected target response. The gradient vector is used to characterize the direction and magnitude of the contribution of each input parameter to the response deviation under the current value. If the response deviation does not meet the preset convergence condition, the input parameters are updated according to the gradient vector, and a forward simulation is performed again based on the updated input parameters. If the response deviation meets the convergence condition, the current input parameters are output.
2. The power system inverse simulation method according to claim 1, characterized in that, Based on the system model, constructing the computational graph model corresponding to the power system specifically includes: Based on the system model, the differential equations and algebraic equations contained in the system model are extracted. The differential equations are used to describe processes such as generator rotor motion, excitation system dynamics, and load dynamics, while the algebraic equations are used to describe power grid balance and equipment port relationships. The differential equation is discretized to obtain a difference equation characterized by time step. Based on the difference equation and the algebraic equation, the simulation process of the power system is characterized as multiple cascaded computing nodes, where each computing node represents a computing step and each computing node contains a forward computing function and a local Jacobian matrix computing function. Discontinuous computation nodes are selected from the computation nodes. Following a smooth approximation method, the forward computation function of the discontinuous computation nodes is replaced with a continuous characteristic function. The discontinuous computation nodes are those whose computation step type contains discontinuous characteristics. Using the model parameters of the system model as input nodes, the system dynamic response as output nodes, and each of the computing nodes as intermediate nodes, the input nodes, each of the intermediate nodes, and the output nodes are connected sequentially according to the time step sequence of the power system simulation process to obtain the computational graph model corresponding to the power system.
3. The power system inverse simulation method according to claim 2, characterized in that, The system model includes: a network topology sub-model, a device sub-model, and a controller sub-model.
4. The power system inverse simulation method according to claim 2, characterized in that, Based on the computational graph model, and using the current model parameter configuration of the system model as input parameters for forward simulation, the system dynamic response under the current parameter conditions is obtained, including: Based on the computational graph model, and using the current model parameter configuration of the system model as input parameters, forward simulation is performed in a time-step manner. Intermediate computational data generated at each time step is saved. Finally, the dynamic response of the system under the current parameter conditions is obtained through the output node. The intermediate computational data includes: the input value, output value, and corresponding local Jacobian matrix of each computational node.
5. The power system inverse simulation method according to claim 4, characterized in that, Backpropagation is performed using the adjoint equation and a preset objective function. Based on the results of the backpropagation calculation, the gradient vector of the objective function with respect to each input parameter is determined, specifically including: Using the response deviation of the objective function as the initial condition of the adjoint equation, propagation calculation is performed according to the reverse time step. In each reverse time step, matrix-vector multiplication is performed using the transpose of the local Jacobian matrix recorded in the forward simulation to update the variables of the adjoint equation and simultaneously accumulate the local gradient vector obtained in each reverse time step. When all the reverse time steps have been traversed, the gradient vector of the objective function with respect to each input parameter is obtained.
6. The power system inverse simulation method according to claim 1, characterized in that, The specific convergence condition is: the response deviation of the current iteration drops below a preset convergence threshold or the norm of the update amount of the input parameters is lower than a preset parameter convergence tolerance.
7. A power system inverse simulation device, characterized in that, include: The system model acquisition unit is used to acquire the system model of the power system. The computational graph model construction unit is used to construct a computational graph model corresponding to the power system based on the system model. The computational graph model uses the model parameters of the system model as input nodes and the system dynamic response as output nodes. Each intermediate node of the computational graph model is used to represent each step of the simulation calculation. The forward simulation calculation unit is used to perform forward simulation based on the computation graph model and the current model parameter configuration of the system model as input parameters to obtain the dynamic response of the system under the current parameter conditions. The backpropagation calculation unit is used to construct an adjoint equation that is dual to the forward simulation equation based on the duality principle, and to perform backpropagation calculation using the adjoint equation and a preset objective function. Based on the result of the backpropagation calculation, the gradient vector of the objective function with respect to each input parameter is determined. The objective function is used to calculate the response deviation between the system dynamic response output by the current forward simulation and the preset expected target response. The gradient vector is used to characterize the direction and magnitude of the contribution of each input parameter to the response deviation under the current value. The parameter update determination unit is used to update the input parameters according to the gradient vector if the response deviation does not meet the preset convergence condition, and to re-perform the forward simulation based on the updated input parameters. If the response deviation meets the convergence condition, the current input parameters are output.
8. A power system inverse simulation terminal, characterized in that, include: Memory and processor; The memory is used to store program code, which corresponds to the power system inverse simulation method as described in any one of claims 1 to 6; The processor is used to read and execute the program code to implement the power system inverse simulation method.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code that is read and executed by a processor to implement the power system inverse simulation method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes: a computer program stored on a non-transitory computer-readable storage medium, the computer program consisting of program code, the program code being read and executed by a processor to implement the power system inverse simulation method as described in any one of claims 1 to 6.