Power system simulation method and device, electronic equipment and storage medium
By constructing a white-box model of the main circuit and a black-box model of the controller, and combining real-time operating data for initialization, a digital twin model of the power system is formed. This solves the problem of simulation results deviating from the actual system in existing technologies, realizes high-precision power system simulation, and improves the efficiency and reliability of simulation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-13
AI Technical Summary
Existing power system simulation methods cannot accurately reproduce the dynamic response characteristics of controllers in high-voltage direct current transmission and flexible AC transmission systems, resulting in simulation results that deviate from the actual system. Furthermore, traditional modeling methods are inefficient, time-consuming, and prone to oscillation, making it difficult to meet the real-time analysis requirements under complex operating conditions.
By constructing a white-box model of the main circuit and a black-box model of the controller, and combining real-time operating data for initialization, a digital twin model of the power system is formed, enabling high-precision simulation of the LCC DC system.
It improves the fidelity and practicality of simulation models, enhances the predictive power and reliability of system-level simulations, and supports efficient and safe analysis and control strategy verification.
Smart Images

Figure CN121658150A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system simulation technology, and more specifically, to a power system simulation method, apparatus, electronic device, and storage medium. Background Technology
[0002] As modern power systems develop towards large-scale, high-proportion renewable energy integration and AC / DC hybrid interconnection, the dynamic characteristics of power grids are becoming increasingly complex. Traditional analysis and control methods are no longer sufficient to meet the higher requirements for system security, stability, and intelligent operation and maintenance.
[0003] In existing technologies, the simulation of AC / DC hybrid power systems with DC access typically relies on electromagnetic transient simulation software (such as PSCAD / EMTDC, EMTP-RV, MATLAB / Simulink, etc.). This involves manually building the main circuit model based on the system topology and equipment parameters, configuring corresponding control strategy modules, and then conducting dynamic process simulations under typical operating conditions such as short-circuit faults, commutation failures, and DC blocking. While this method can reproduce the electromagnetic transient behavior of the system to some extent, it still faces key technical bottlenecks: existing simulation modeling often employs a "white-box" manual modeling approach, where engineers manually construct the controller logic based on publicly available information or experience.
[0004] However, in practical engineering, especially in systems such as high-voltage direct current (HVDC) transmission and flexible alternating current transmission (FACTS), the control algorithms of core controllers (such as pole control and valve control systems) are usually embedded in dedicated hardware by the manufacturer in the form of binary program files, making them highly confidential "black box" systems. Because the internal logic source code is unavailable, simulations often have to use simplified, general-purpose control models to represent the actual controller behavior, leading to simulation results that deviate from the dynamic response characteristics of the actual system and reducing the confidence level and engineering applicability of the simulation. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a power system simulation method, apparatus, electronic device and storage medium.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows: In a first aspect, the present invention provides a power system simulation method, the method comprising: Construct a white-box model of the main circuit based on the main circuit structure information and component parameters of the target power system; The controller program file of the target power system is encapsulated to construct a controller black-box model; Based on the controller black-box model and the main circuit white-box model, a digital twin model of the power system is constructed. Electromagnetic transient simulation of the target power system is performed based on the digital twin model of the power system.
[0007] Optionally, the step of constructing a controller black-box model based on the controller program file of the target power system includes: The controller program file is compiled to generate a dynamic link library file that can be called in the electromagnetic transient simulation environment; Based on the input / output interface definition of the controller program file, a front-end simulation element connected to the dynamic link library file is constructed in the electromagnetic transient simulation environment; The front-end simulation components and the dynamic link library files are encapsulated to obtain the controller black-box model that can run independently in the electromagnetic transient simulation environment.
[0008] Optionally, the step of constructing a digital twin model of the power system based on the controller black-box model and the main circuit white-box model includes: Based on the input / output interface definition of the controller black-box model, a signal interaction connection is established between the controller black-box model and the main circuit white-box model to obtain the power system digital twin model.
[0009] Optionally, the step of establishing a signal interaction connection between the controller black-box model and the main circuit white-box model based on the input / output interface definition of the controller black-box model includes: Based on the input interface list of the controller black box model, electrical state variables are extracted from the main circuit white box model as input signals of the controller black box model; The control commands output by the controller black box model are fed back to the power electronic device triggering unit in the main circuit white box model to form a closed-loop control circuit.
[0010] Optionally, the step of performing electromagnetic transient simulation of the target power system based on the digital twin model of the power system includes: Using the current values of each state variable in the multi-dimensional real-time operation data of the target power system, an electromagnetic transient simulation initialization section is constructed; The electromagnetic transient simulation initialization section is loaded as the starting condition into the power system digital twin model to initialize the electromagnetic transient simulation process. Initiate electromagnetic transient simulation of the digital twin model of the power system to simulate the dynamic response process of the system under preset operating conditions and obtain the corresponding electromagnetic transient simulation results.
[0011] Optionally, the step of constructing the electromagnetic transient simulation initialization section using the current values of each state variable in the multi-dimensional real-time operating data of the target power system includes: Time synchronization calibration is performed on each state variable in the multi-dimensional real-time running data to obtain the calibrated state variables. The calibrated state variables are organized into a time-stamped system state snapshot according to a preset format to generate the electromagnetic transient simulation initialization section.
[0012] Optionally, the method further includes: Obtain the actual operating data of the target power system within a preset time period; The actual operating data is compared and analyzed with the electromagnetic transient simulation results to calculate the simulation error; If the simulation error is greater than a preset threshold, the model parameters of the power system digital twin model are corrected according to a preset strategy, and the process returns to the step of performing electromagnetic transient simulation of the target power system based on the power system digital twin model, until the obtained simulation error is not greater than the preset threshold.
[0013] Secondly, the present invention provides a power system simulation device, the device comprising: A construction module is used to construct a white-box model of the main circuit based on the main circuit structure information and component parameters of the target power system; to encapsulate the controller program file of the target power system to construct a black-box model of the controller; and to construct a digital twin model of the power system based on the black-box model of the controller and the white-box model of the main circuit. The simulation module is used to perform electromagnetic transient simulation of the target power system based on the digital twin model of the power system.
[0014] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing machine-executable instructions executable by the processor, the processor executing the machine-executable instructions to implement the power system simulation method described in the first aspect above.
[0015] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the power system simulation method as described in the first aspect above.
[0016] The power system simulation method, apparatus, electronic device, and storage medium provided in this invention construct a white-box model of the main circuit based on the main circuit structure information and component parameters of the target power system; construct a black-box model of the controller based on the controller program file of the target power system; construct a digital twin model of the power system based on the controller black-box model and the main circuit white-box model; and perform electromagnetic transient simulation of the target power system based on the power system digital twin model. Because this invention constructs a high-precision power system digital twin model by combining the white-box model of the main circuit and the black-box model of the controller, it can effectively retain the dynamic response characteristics of the controller without needing to obtain the internal logic of the controller, thereby achieving accurate simulation of the electromagnetic transient process of the target power system, improving the fidelity and practicality of the simulation model. It overcomes the problem of traditional white-box modeling's strong dependence on the internal information of the controller, and enhances the predictive ability and reliability of system-level simulation under complex operating conditions, providing efficient, safe, and flexible technical support for the analysis, optimization, and control strategy verification of power systems.
[0017] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This figure shows a schematic block diagram of an electronic device provided by an embodiment of the present invention; Figure 2 This illustration shows a flowchart of a power system simulation method provided by an embodiment of the present invention. Figure 1 ; Figure 3 This illustration shows a flowchart of a power system simulation method provided by an embodiment of the present invention. Figure 2 ; Figure 4 A functional block diagram of a power system simulation device provided in an embodiment of the present invention is shown.
[0020] Icons: 100 - Electronic device; 110 - Memory; 120 - Processor; 130 - Communication module; 200 - Power system simulation device; 201 - Building module; 202 - Simulation module. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0022] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0023] It should be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0024] In modern power systems, the demand for high-capacity, long-distance power transmission is increasing. Line commutated converters (LCCs) based on thyristor technology have been widely used in high-voltage direct current (HVDC) transmission projects due to their high reliability and mature operating experience. A typical LCC DC system mainly consists of converter stations (including rectifier stations and inverter stations), DC transmission lines, and a complex hierarchical control system (such as the main control system, pole control system, and valve control system). This system achieves power regulation by controlling the firing angle of the thyristors and relies on the voltage of the AC system to complete the commutation process.
[0025] However, due to the strong nonlinearity, multi-timescale dynamic characteristics, and high sensitivity to external power grid disturbances, LCC DC systems face numerous challenges in actual operation. For example, short-circuit faults or voltage fluctuations on the AC side can easily lead to commutation failure, and in severe cases, may cause DC blockage, thus significantly impacting the stability of the entire AC / DC hybrid system. Furthermore, LCC converters generate a large number of characteristic and non-characteristic harmonics during operation, requiring appropriate AC filters to ensure power quality.
[0026] To deeply study the dynamic behavior of LCC DC systems, assess their operational safety, and optimize control strategies, high-precision simulation modeling technology has become an indispensable tool. Currently, the mainstream simulation methods mainly include electromechanical transient simulation and electromagnetic transient simulation. Among them, electromagnetic transient simulation can accurately characterize the switching process of power electronic devices and high-frequency transient phenomena in the system. It is suitable for analyzing key issues such as commutation failure, harmonic propagation, and control and protection action timing, and is an important means of conducting refined analysis.
[0027] Despite this, existing LCC DC system simulation technologies still have significant limitations. Firstly, in terms of model building, traditional methods typically involve manually constructing LCC system models on electromagnetic transient simulation platforms such as PSCAD / EMTDC and MATLAB / Simulink. This approach is inefficient and struggles to keep up-to-date with changes in field equipment parameters or control logic upgrades. More importantly, the specific implementation details of LCC controllers in actual engineering projects are often kept secret by manufacturers, resulting in publicly available controller models that are mostly simplified structures that cannot accurately reproduce the dynamic response characteristics of the real system, thus reducing the reliability of the simulation.
[0028] Secondly, regarding simulation initialization, conventional electromagnetic transient simulations typically start with zero initial conditions (i.e., all state variables are set to zero). This initialization method results in a lengthy transition process before the system reaches a stable operating state, which is not only time-consuming but also prone to numerical oscillations during the startup phase, affecting simulation efficiency and the accuracy of results. Especially for online applications, such as real-time risk assessment or control strategy verification, the slow convergence speed greatly limits its practical feasibility.
[0029] In recent years, with the development of digital twin technology, its application in the energy and power sector has gradually attracted attention. Digital twins, by integrating real-time measurement data of the physical system with high-fidelity simulation models, construct a virtual mapping system that can evolve synchronously and provide interactive feedback. This technology has been used for condition monitoring and predictive maintenance in scenarios such as wind farms, photovoltaic power plants, and distribution networks. However, existing research on digital twins for power systems mostly focuses on the visualization of external electrical quantities (such as port voltage and current), lacking in-depth modeling capabilities for internal control logic and transient mechanisms. In particular, for critical equipment like LCC DC systems with complex control architectures and rapid dynamic processes, an effective digital twin solution has not yet been formed. Existing solutions fail to achieve deep integration of operational data and electromagnetic transient simulations, cannot support accurate inversion and forward-looking warning of critical faults such as commutation failures, and are also insufficient to meet the needs of online testing and optimization of control strategies.
[0030] In summary, current LCC DC systems still have significant shortcomings in terms of modeling accuracy, simulation efficiency, and functional integration: on the one hand, the black-box nature of the controller leads to model inaccuracies; on the other hand, the simulation startup mechanism under zero initial conditions restricts its application in real-time analysis; at the same time, the system-level functions are limited, and there is a lack of an overall architecture that organically combines real-time monitoring, high-precision simulation, and advanced applications (such as fault diagnosis and strategy verification).
[0031] To overcome the shortcomings of the prior art, embodiments of the present invention provide a power system simulation method, apparatus, electronic device, and storage medium, which will be described in detail below.
[0032] Please refer to Figure 1 This is a block diagram of an electronic device 100. The electronic device 100 includes a memory 110, a processor 120, and a communication module 130. The memory 110, processor 120, and communication module 130 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0033] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0034] The processor 120 is used to read / write data or programs stored in the memory 110 and to perform corresponding functions.
[0035] The communication module 130 is used to establish a communication connection between the electronic device 100 and other communication terminals through the network, and to send and receive data through the network.
[0036] It should be understood that, Figure 1 The structure shown is only a schematic diagram of the electronic device 100. The electronic device 100 may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.
[0037] Please refer to Figure 2 The power system simulation method provided in this embodiment of the invention includes steps S101 to S104.
[0038] S101, construct a white-box model of the main circuit based on the main circuit structure information and component parameters of the target power system.
[0039] In this embodiment of the invention, the target power system is an LCC-HVDC system that includes a converter station, a DC transmission line and an AC filter.
[0040] First, obtain the actual topology information of the main circuit of the target power system, including the AC side access method (such as bipolar connection), converter transformer connection group, valve group configuration, smoothing reactor arrangement, and DC line distributed parameters, etc. At the same time, collect the electrical parameters of key equipment, such as transformer turns ratio and short-circuit impedance, filter tuning frequency and quality factor, line resistance per unit length and inductance, etc.
[0041] Based on the above information, a white-box model of the main circuit is constructed in an electromagnetic transient simulation platform (such as PSCAD / EMTDC or a self-developed simulation kernel). This model employs a modular modeling approach, establishing detailed mathematical models for the converter bridge arm, thyristor switching elements, converter transformer, AC filter, DC smoothing reactor, and transmission line to ensure accurate reflection of the electromagnetic transient processes in the system. Specifically, the thyristor devices utilize ideal switches or nonlinear models with recovery characteristics to accurately simulate the commutation process; the AC filter's parameters are fitted based on measured frequency response characteristics to improve the accuracy of the harmonic response.
[0042] The main circuit white-box model has complete internal visibility, and all node voltages, branch currents, and device states can be monitored and output, providing a foundation for subsequent closed-loop simulation and state analysis.
[0043] S102, Construct a controller black-box model based on the controller program file of the target power system.
[0044] Since the control and protection devices of LCC DC systems in actual engineering are usually provided by the manufacturer, and their source code is not visible, but dynamic link library (.so) or (.dll) files can be compiled from the binary program files (such as static link library .a) provided by the manufacturer. In order to reproduce the behavior of the real controller in the simulation environment, this invention proposes a black-box modeling method for controllers based on binary files.
[0045] In a possible implementation, step S102 can be implemented as follows: S102-1 compiles the controller program file to generate a dynamic link library file that can be called in the electromagnetic transient simulation environment.
[0046] In this embodiment of the invention, the controller program file is a static link library file provided by the LCC DC system manufacturer. It contains complete control algorithm code, interrupt service routines and initialization logic, and is typically used for firmware burning on embedded DSP chips.
[0047] To integrate this closed-source controller program into the digital twin simulation environment, it needs to be recompiled into a shared library format that can be dynamically loaded by the simulation platform. This involves using a cross-compilation toolchain to link the original .a file with necessary runtime support libraries (such as mathematical function libraries and memory management modules) to generate a dynamic link library file suitable for the host operating system.
[0048] This dynamic link library file retains all the functional logic and execution flow of the original controller program, only adapting to the calling interface specifications under the target operating system. In this way, the migration from a dedicated embedded environment to a general-purpose simulation computing environment is achieved, enabling the controller's internal functions such as control cycle scheduling, PI regulator calculation, and fault criterion judgment to be accurately called and executed during the simulation process.
[0049] In addition, a symbol preservation mechanism is introduced during the compilation process to ensure that critical functions and their input / output variable addresses are not removed by optimization, so that the subsequent simulation platform can access and bind them.
[0050] S102-2, based on the input / output interface definition of the controller program file, constructs a front-end simulation element that is connected to the dynamic link library file in the electromagnetic transient simulation environment.
[0051] After generating a callable dynamic link library file, a visual front-end simulation element needs to be built in the electromagnetic transient simulation platform as a draggable, configurable, and monitorable functional module in the user modeling interface.
[0052] The front-end simulation component has standard electrical ports and control ports. The electrical ports are used to receive real-time status quantities from the main circuit model, such as the instantaneous values of the three-phase AC bus voltage of the converter station and the DC pole current feedback values. The control ports are used to transmit digital signals, such as circuit breaker positions, unlock / lock commands, and operating mode selections.
[0053] The front-end simulation component integrates an interface mapping mechanism with dynamic link library files, that is, based on the controller input and output interface definitions obtained through reverse analysis or manufacturer documentation, it establishes a memory mapping relationship between the input buffer and the output buffer.
[0054] The front-end simulation element also provides a parameter configuration panel, allowing users to set the controller's initial state, enable / disable specific protection functions, inject test signals, etc., enhancing the model's flexibility and debugging capabilities.
[0055] S102-3 encapsulates the front-end simulation components and dynamic link library files to obtain a controller black-box model that can run independently in the electromagnetic transient simulation environment.
[0056] To further improve the reusability of the model and the efficiency of engineering deployment, the aforementioned front-end simulation components, along with their dependent dynamic link library files, interface mapping tables, configuration files, and version information, are packaged into a complete controller black-box model component package.
[0057] Once encapsulated, the controller black-box model can be directly imported and used on any computer with a compatible simulation environment installed, without the need for recompilation or manual interface configuration. Throughout the digital twin simulation process, the controller black-box model operates as an independently functional entity, forming a closed-loop interaction with the main circuit white-box model. The main circuit provides real-time electrical feedback, which the controller black-box uses to generate precise control actions, thereby achieving a high-fidelity simulation of the behavior of a real LCC DC control system.
[0058] This invention achieves "black-box" integration of closed-source controllers by compiling the controller binary file into a cross-platform dynamic library, constructing a front-end and back-end collaborative simulation element, and encapsulating it into an integrated system. This not only solves the problem of controller model distortion in traditional simulations but also avoids dependence on source code, demonstrating good engineering applicability and promotional value.
[0059] S103 constructs a digital twin model of the power system based on the controller black-box model and the main circuit white-box model.
[0060] After completing the construction of the main circuit white-box model and the controller black-box model, they need to be integrated to form a complete power system digital twin model, realizing the closed-loop mapping of the physical system in the virtual space.
[0061] In a possible implementation, step S103 can be implemented by establishing a signal interaction connection between the controller black-box model and the main circuit white-box model based on the input / output interface definition of the controller black-box model, thereby obtaining a digital twin model of the power system.
[0062] In this embodiment of the invention, "establishing a signal interaction connection between the controller black box model and the main circuit white box model according to the input and output interface definition of the controller black box model" can be achieved by extracting electrical state variables from the main circuit white box model as input signals of the controller black box model based on the input interface list of the controller black box model; and feeding back the control commands output by the controller black box model to the power electronic device triggering unit in the main circuit white box model to form a closed-loop control circuit.
[0063] In other words, based on the input interface list of the controller's black-box model, the corresponding electrical state quantities can be extracted from the main circuit's white-box model as input signals. For example, the instantaneous three-phase voltage values can be obtained from the AC bus node, transformed by coordinates, and then sent to the AC side measurement channel of the controller; the DC current sampling values can be extracted from the DC line as feedback quantities for the power control loop.
[0064] The control commands (such as trigger angle α and valve group switching commands) output by the controller black box model are transmitted to the thyristor triggering unit in the main circuit model to control the conduction time of each valve and realize the accurate simulation of the commutation process.
[0065] The resulting digital twin model realizes a closed-loop mechanism of "perception-decision-execution", which can reproduce the dynamic response characteristics of the real LCC system in the simulation environment. It is especially suitable for analyzing processes involving strong coupling control, such as commutation failure, reactive power regulation, and mode switching.
[0066] S104, based on the digital twin model of the power system, performs electromagnetic transient simulation of the target power system.
[0067] In this embodiment of the invention, an electromagnetic transient simulation algorithm is used to solve the constructed digital twin model to simulate the dynamic behavior of the system under different operating conditions. To improve simulation startup efficiency and ensure the consistency of the initial state, an initialization mechanism based on real-time operating data is introduced.
[0068] In a possible implementation, step S104 can be implemented as follows: S104-1 utilizes the current values of various state variables in the multi-dimensional real-time operation data of the target power system to construct the electromagnetic transient simulation initialization section.
[0069] Among them, key operating data of the target power system can be acquired in real time through data acquisition units deployed on site, including but not limited to: instantaneous values of three-phase voltage and current of AC bus of converter station, DC pole voltage and current, tap position of converter transformer, filter switching status, and trigger angle command output by controller.
[0070] In this embodiment of the invention, time synchronization calibration can be performed on each state variable in multi-dimensional real-time running data to obtain calibrated state variables; the calibrated state variables are organized into a time-stamped system state snapshot according to a preset format to generate an electromagnetic transient simulation initialization section.
[0071] In other words, time synchronization calibration is performed on each state variable to eliminate time misalignment caused by communication delays or device clock deviations, ensuring that all state variables are aligned under the same timestamp. Subsequently, the calibrated state variables are organized into a time-stamped system state snapshot according to a preset data structure, generating an electromagnetic transient simulation initialization profile. This initialization profile contains the current values of all state variables in the system to be simulated (such as capacitor voltage, inductor current, and the state of the controller's internal integrator), serving as the starting conditions for the simulation.
[0072] S104-2 loads the electromagnetic transient simulation initialization section as the starting condition into the power system digital twin model to initialize the electromagnetic transient simulation process.
[0073] Before the simulation starts, the values of each state variable in the initialization section are written in batches into the initial state field of the corresponding component in the digital twin model. For example, the initial value of the capacitor is set to its measured voltage, the initial value of the inductor is set to its measured current, and the internal state register of the controller (such as the historical error of the PI regulator) is also initialized based on historical data.
[0074] Compared to the traditional zero-initial-condition startup method, the embodiments of the present invention avoid the long transition process and numerical oscillation risk caused by the system gradually climbing from zero to steady state, improve the simulation convergence speed, and make the simulation results closer to the actual operating state of the physical system.
[0075] S104-3, initiate electromagnetic transient simulation of the digital twin model of the power system, simulate the dynamic response process of the system under preset operating conditions, and obtain the corresponding electromagnetic transient simulation results.
[0076] After the simulation starts, the digital twin model iteratively calculates according to a set time step (usually on the order of microseconds) to solve a system of high-order nonlinear differential-algebraic equations composed of the main circuit elements and the controller. During this process, the main circuit model and the controller black box continuously interact with each other to form a closed-loop control.
[0077] The simulated operating conditions include, but are not limited to: normal power rise and fall, commutation failure caused by a single-phase ground fault on the AC side, overcurrent protection activation due to a short circuit in the DC line, control mode switching (such as constant power to constant current), and testing and verification of new control strategies. After the simulation, a complete dynamic response curve is output, including time series data of key variables such as voltage, current, firing angle, and power, for subsequent analysis.
[0078] Further, please refer to Figure 3 The power system simulation method provided in this embodiment of the invention further includes steps S105 to S107.
[0079] S105, Obtain the actual operating data of the target power system within a preset time period.
[0080] Extract actual operating data corresponding to the simulation period from SCADA systems, fault recording devices, or dedicated monitoring terminals, covering the same types of electrical quantities and control signals, as a comparison benchmark.
[0081] S106 compares and analyzes the actual operating data with the electromagnetic transient simulation results to calculate the simulation error.
[0082] Key characteristic quantities, such as peak DC current, commutation failure duration, recovery time, and harmonic content, are selected. Indicators such as normalized root mean square error, maximum absolute error, or dynamic time warping are used to quantify the difference between simulation results and measured data, and the overall simulation error is obtained.
[0083] S107, if the simulation error is greater than the preset threshold, the model parameters of the power system digital twin model are corrected according to the preset strategy, and the step of performing electromagnetic transient simulation of the target power system based on the power system digital twin model is returned until the obtained simulation error is not greater than the preset threshold.
[0084] When the model accuracy is deemed insufficient (e.g., normalized root mean square error > 5%), the model optimization process is initiated. Optimization strategies may include: adjusting uncertain parameters in the main circuit model (such as line damping coefficient and transformer excitation branch parameters); introducing a delay compensation module to match the controller response hysteresis; updating the filter resonant frequency to match the measured spectrum characteristics; or recalibrating the input signal calibration coefficients of the controller black box.
[0085] After adjusting the parameters, the simulation process is re-executed, and the results are compared again, forming a closed-loop iterative mechanism of "simulation-verification-correction" until the digital twin model reaches the predetermined confidence level.
[0086] In summary, the embodiments of the present invention integrate white-box modeling of the main circuit with black-box packaging technology of the controller, and combine it with the construction of initialization sections based on measured data to achieve high-fidelity and high-efficiency digital twin simulation of complex power systems such as LCC. This not only improves the accuracy and practicality of electromagnetic transient simulation, but also provides strong technical support for the safety assessment, fault tracing and intelligent operation and maintenance of AC and DC power grids.
[0087] To perform the corresponding steps in the above embodiments and various possible methods, an implementation of a power system simulation device 200 is given below. Further, please refer to... Figure 4 , Figure 4This is a functional block diagram of a power system simulation device 200 provided in an embodiment of the present invention. It should be noted that the basic principle and technical effects of the power system simulation device 200 provided in this embodiment are the same as those in the above embodiments. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments. The power system simulation device 200 includes: Module 201 is used to construct a white-box model of the main circuit based on the main circuit structure information and component parameters of the target power system; construct a black-box model of the controller based on the controller program file of the target power system; and construct a digital twin model of the power system based on the controller black-box model and the main circuit white-box model.
[0088] Simulation module 202 is used to perform electromagnetic transient simulation of the target power system based on the digital twin model of the power system.
[0089] Optionally, the above modules can be stored in the form of software or firmware. Figure 1 The memory 110 shown is either stored in or embedded in the operating system (OS) of the electronic device 100, and can be used by... Figure 1 The processor 120 executes the program. Meanwhile, the data and program code required to execute the above modules can be stored in the memory 110.
[0090] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0091] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0092] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion 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 this 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.
[0093] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A power system simulation method, characterized in that, The method includes: Construct a white-box model of the main circuit based on the main circuit structure information and component parameters of the target power system; Construct a controller black-box model based on the controller program file of the target power system; Based on the controller black-box model and the main circuit white-box model, a digital twin model of the power system is constructed. Electromagnetic transient simulation of the target power system is performed based on the digital twin model of the power system.
2. The power system simulation method as described in claim 1, characterized in that, The steps for constructing a controller black-box model based on the controller program file of the target power system include: The controller program file is compiled to generate a dynamic link library file that can be called in the electromagnetic transient simulation environment; Based on the input / output interface definition of the controller program file, a front-end simulation element connected to the dynamic link library file is constructed in the electromagnetic transient simulation environment; The front-end simulation components and the dynamic link library files are encapsulated to obtain the controller black-box model that can run independently in the electromagnetic transient simulation environment.
3. The power system simulation method as described in claim 1, characterized in that, The steps for constructing a digital twin model of the power system based on the controller black-box model and the main circuit white-box model include: Based on the input / output interface definition of the controller black-box model, a signal interaction connection is established between the controller black-box model and the main circuit white-box model to obtain the power system digital twin model.
4. The power system simulation method as described in claim 3, characterized in that, The step of establishing the signal interaction connection between the controller black-box model and the main circuit white-box model based on the input / output interface definition of the controller black-box model includes: Based on the input interface list of the controller black box model, electrical state variables are extracted from the main circuit white box model as input signals of the controller black box model; The control commands output by the controller black box model are fed back to the power electronic device triggering unit in the main circuit white box model to form a closed-loop control circuit.
5. The power system simulation method as described in claim 1, characterized in that, The steps for performing electromagnetic transient simulation of the target power system based on the digital twin model of the power system include: Using the current values of each state variable in the multi-dimensional real-time operation data of the target power system, an electromagnetic transient simulation initialization section is constructed; The electromagnetic transient simulation initialization section is loaded as the starting condition into the power system digital twin model to initialize the electromagnetic transient simulation process. Initiate electromagnetic transient simulation of the digital twin model of the power system to simulate the dynamic response process of the system under preset operating conditions and obtain the corresponding electromagnetic transient simulation results.
6. The power system simulation method as described in claim 5, characterized in that, The step of constructing the electromagnetic transient simulation initialization profile by utilizing the current values of each state variable in the multi-dimensional real-time operating data of the target power system includes: Time synchronization calibration is performed on each state variable in the multi-dimensional real-time running data to obtain the calibrated state variables. The calibrated state variables are organized into a time-stamped system state snapshot according to a preset format to generate the electromagnetic transient simulation initialization section.
7. The power system simulation method as described in claim 1, characterized in that, The method further includes: Obtain the actual operating data of the target power system within a preset time period; The actual operating data is compared and analyzed with the electromagnetic transient simulation results to calculate the simulation error; If the simulation error is greater than a preset threshold, the model parameters of the power system digital twin model are corrected according to a preset strategy, and the process returns to the step of performing electromagnetic transient simulation of the target power system based on the power system digital twin model, until the obtained simulation error is not greater than the preset threshold.
8. A power system simulation device, characterized in that, The device includes: A construction module is used to construct a white-box model of the main circuit based on the main circuit structure information and component parameters of the target power system; to encapsulate the controller program file of the target power system to construct a black-box model of the controller; and to construct a digital twin model of the power system based on the black-box model of the controller and the white-box model of the main circuit. The simulation module is used to perform electromagnetic transient simulation of the target power system based on the digital twin model of the power system.
9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor to implement the power system simulation method of any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the power system simulation method as described in any one of claims 1-7.