A real-time hybrid simulation method and device for electromagnetic and electromechanical systems
By building a network connection between electromagnetic and electromechanical simulation platforms, and using the extrapolation method synchronization step size and functional simulation interface for data interaction, the problem of insufficient computing power and low compatibility of electromagnetic-electromechanical hybrid simulation in the existing technology is solved, and electric power is realized. Efficient, real-time simulation and generalized simulation of systems.
Patent Information
- Application Number
- CN202410619739.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-05-20
AI Technical Summary
The existing electromagnetic-electromechanical hybrid simulation technology has problems such as low computing resources, inability to simulate in real time, inconsistent step sizes, waste of computing resources and low compatibility. It is difficult to meet the high-precision and high-efficiency simulation needs of the complex characteristics of modern power grids.
By building a network connection between the electromagnetic transient simulation and electromechanical transient simulation platforms, the extrapolation method is used to synchronize the simulation step size, and data interaction is realized through the functional simulation interface. The frequency-related network equivalent method is combined for model equivalence, and the export complies with FMI standards. FMU files for generalized communication.
It achieves large-scale real-time simulation of power systems, improves simulation efficiency and stability, avoids waste of computing resources, and improves the versatility of the simulation process.
Smart Images

Figure CN118211552B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of power system simulation, and in particular relates to an electromagnetic and electromechanical real-time hybrid simulation method and device. Background Art
[0002] Digital simulation of power systems can accurately simulate the operating status of power systems and assist engineers in system planning and design, as well as fault analysis. Therefore, it is widely used in power systems. With the continuous expansion of the scale of power grids, power systems are becoming more and more complex. Especially with the increase in the scale and penetration of new energy sources such as wind power and photovoltaics, power systems have shown a high proportion of electronic characteristics. How to quickly and accurately simulate emerging power systems has become an important research direction. According to the different dynamic response contents analyzed, power system simulation can be divided into two categories: electromagnetic transient simulation and electromechanical transient simulation. Electromagnetic transient simulation modeling is accurate, but the simulation scale is small and the simulation is slow. Electromechanical transient simulation has a fast simulation speed and a large simulation scale, but the simulation accuracy is not high enough. Given that traditional single electromagnetic transient simulation or electromechanical transient simulation is difficult to fully describe the complex characteristics of modern power grids, electromagnetic-electromechanical hybrid simulation technology is usually used to simulate modern power grids with high precision and efficiency.
[0003] Electromagnetic-electromechanical hybrid simulation can fully combine the advantages of electromagnetic transient simulation and electromechanical transient simulation to achieve comprehensive consideration of simulation speed, accuracy and scale. At present, many scientific and technological institutions, universities and enterprises have begun to study electromagnetic-electromechanical hybrid simulation platforms. For example, a certain university has developed an electromagnetic-electromechanical transient decoupling hybrid simulation platform based on frequency-related network equivalence. The platform implements electromagnetic-electromechanical transient hybrid simulation on PSCAD / EMTDC and EWSC based on simulation support modules and pipeline communication modules, and introduces simulation support modules and pipeline communication modules during the simulation process. However, this method has the following disadvantages: First, the EWSC program is an analysis software for transient stability warning and preventive control. It has low computing power and fewer computing resources, and cannot achieve real-time simulation. At the same time, when facing large-scale systems, problems such as low computing efficiency will occur. Second, the electromechanical transient simulation step is often hundreds of times that of the electromagnetic transient simulation step. Therefore, the electromechanical transient simulation program performs a simulation step calculation, and the electromagnetic transient simulation program is often hundreds of times the electromagnetic transient simulation step. Limited by the large step-length interaction cycle of hybrid simulation, the electromagnetic transient simulation program cannot obtain the real-time calculation results of the electromechanical network, so these hundreds of calculations use the same initial data, wasting computing resources. Third, the simulation support module and pipeline communication module introduced in the simulation process are dedicated only to the PSCAD / EMTDC and EWSC hybrid simulation frameworks, and do not support users to replicate the simulation solution on other simulation platforms, which limits the development of hybrid simulation and has poor versatility.
[0004] This is a shortcoming of the prior art. Therefore, it is very necessary to provide an electromagnetic and electromechanical real-time hybrid simulation method and device to address the above defects in the prior art. Summary of the invention
[0005] Digital simulation of power systems can simulate the operating status of power systems, so it has been widely used in power systems. Traditional electromagnetic transient simulation and electromechanical transient simulation both have shortcomings. Hybrid simulation based on the two can simulate the power grid with high precision and high efficiency. However, the existing hybrid simulation methods have the disadvantages of low computing resources, inability to simulate in real time, inconsistent step sizes, repeated same calculations in small step sizes, waste of computing resources, and low compatibility. The present invention provides an electromagnetic and electromechanical real-time hybrid simulation method and device to solve the above technical problems.
[0006] In a first aspect, the present invention provides an electromagnetic and electromechanical real-time hybrid simulation method, comprising the following steps:
[0007] S1. Build an electromagnetic transient simulation platform based on the first simulation tool, build an electromechanical transient simulation platform based on the second simulation tool, and establish a network connection between the two simulation platforms to complete the construction of a hybrid simulation hardware architecture;
[0008] S2. Divide the complete power system simulation network into an electromechanical transient subnetwork and an electromagnetic transient subnetwork, and construct an electromagnetic transient simulation model by equivalently constructing the electromechanical transient subnetwork, and constructing an electromechanical transient simulation model by equivalently constructing the electromagnetic transient subnetwork;
[0009] S3. Calculate the electromagnetic transient simulation data interaction amount and the electromechanical transient simulation data interaction amount by combining the electromagnetic transient simulation model with the electromechanical transient simulation model;
[0010] S4. Use the extrapolation method to predict the simulation value of the simulation tool with the longest simulation step in the first simulation tool and the second simulation tool to synchronize the simulation step of the two simulation tools;
[0011] S5. During the dynamic simulation process, the functional simulation interface is used to transmit data interaction between the two simulation platforms to achieve standardized data transmission between the two simulation models.
[0012] Furthermore, the specific steps of step S1 are as follows:
[0013] S11. Use the first simulation tool RTLAB to build an electromagnetic transient simulation platform on the RTLAB simulator;
[0014] S12. Using the second simulation tool PowerFactory on the Windows test machine to build an electromechanical transient simulation platform, wherein the simulation step size of the first simulation tool RTLAB is smaller than the simulation step size of the second simulation tool PowerFactory, and the difference between the two is greater than a set threshold;
[0015] S13. Establish a network connection between the electromagnetic transient simulation platform and the electromechanical transient simulation platform, and set the two simulation platforms to communicate using the UDP communication protocol.
[0016] Furthermore, the specific steps of step S2 are as follows:
[0017] S21. According to the simulation accuracy requirements, the complete power system simulation network is divided into an electromechanical transient subnetwork and an electromagnetic transient subnetwork;
[0018] S22. Perform electromagnetic transient simulation by equivalently treating the electromechanical transient subnetwork, and use the electromechanical equivalent model and the electromagnetic transient subnetwork as an electromagnetic transient simulation model;
[0019] S23. Perform electromechanical transient simulation by equivalent the electromagnetic transient subnetwork, and use the electromagnetic equivalent model and the electromechanical transient subnetwork as the electromechanical transient simulation model.
[0020] Furthermore, the specific steps of step S22 are as follows:
[0021] S221. Use the frequency-dependent network equivalent admittance to replace the fundamental frequency admittance value in the traditional Norton equivalent circuit to complete the Norton equivalent circuit transformation;
[0022] S222. Use the modified Norton equivalent circuit to perform electromechanical transient sub-network equivalence to obtain the electromechanical equivalent model;
[0023] S223. The electromechanical equivalent model and the electromagnetic transient subnetwork are used as electromagnetic transient simulation models, and are imported into the first simulation tool RTLAB to build an electromagnetic transient simulation platform;
[0024] The specific steps of step S23 are as follows:
[0025] S231. Read the power and voltage of the two simulation platform interface locations;
[0026] S232. Setting a constant current source of the same power to perform electromagnetic transient sub-network equivalence to obtain an electromagnetic field equivalent model;
[0027] S233. The electromagnetic side equivalent model and the electromechanical transient subnetwork are used as the electromechanical transient simulation model, and are imported into the electromechanical transient simulation platform built by the second simulation tool PowerFactory.
[0028] Furthermore, the specific steps of step S3 are as follows:
[0029] S31. Perform circuit equivalence on the electromechanical side of the electromagnetic transient simulation model and introduce frequency-dependent network equivalent admittance and the current of the first current source , and obtain a graphical display of the electromagnetic transient simulation model;
[0030] S32. Use Norton equivalent circuit to represent the electromechanical transient subnetwork in the electromechanical transient simulation model and introduce imaginary admittance and the current of the imaginary current source , the current of the equivalent current source of the electromagnetic transient subnetwork is expressed as , and obtain a graphical display of the electromechanical transient simulation model;
[0031] S33. During the simulation of the electromagnetic transient simulation model, according to the current of the first current source on the electromechanical side Calculate the equivalent current of the electromagnetic transient subnetwork , and the equivalent current of the electromagnetic transient subnetwork is transmitted to the electromechanical transient simulation model as a first interaction quantity, the first interaction quantity being an electromagnetic transient simulation data interaction quantity;
[0032] S34. Calculate the second interaction amount according to the first interaction amount during the simulation process of the electromechanical transient simulation model, and pass the second interaction amount to the electromagnetic transient simulation model, that is, according to the equivalent current of the electromagnetic transient subnetwork Calculate the current of an imaginary current source , verify the current of the imaginary current source The current of the first current source The second interaction quantity is the electromechanical transient simulation data interaction quantity.
[0033] Furthermore, the specific steps of step S4 are as follows:
[0034] S41. Obtain the simulation step length of the second simulation tool PowerFactory, denoted as ;
[0035] S42. Obtain the simulation step length of the first simulation tool RTLAB, recorded as ;
[0036] S43. Calculate the ratio of the simulation step length of the second simulation tool PowerFactory to the simulation step length of the first simulation tool RTLAB ;
[0037] S44. Ratio based on simulation step length Using extrapolation to calculate the current of the first current source on the electromechanical side of the electromagnetic transient simulation model The predicted value is passed to the electromagnetic transient simulation model as the electromechanical transient simulation data interaction quantity to achieve the simulation step synchronization of the two simulation models.
[0038] Furthermore, the specific steps of step S5 are as follows:
[0039] S51. Encapsulate the electromechanical transient simulation model into an FMU file that complies with the FMI standard on the second simulation tool PowerFactory;
[0040] S52. Export the FMU file on the Windows test machine, and call the FMU file through the general script file to communicate between the first simulation tool RTLAB and the second simulation tool PowerFactory, and perform standardized transmission of data interaction between the electromagnetic transient simulation model and the electromechanical transient simulation model to achieve dynamic simulation.
[0041] Furthermore, before exporting the FMU file on the Windows test machine in step S52, the electromechanical transient simulation model needs to be configured through the following steps:
[0042] Add a DLS model and select the DLS model type as compiled model;
[0043] Set up dynamic link library files that adapt to the FMI standard;
[0044] The input of the DLS model is defined as the equivalent current of the electromagnetic transient subnetwork , the output is the current of the first current source , thereby configuring the DLS model as an electromechanical transient simulation model.
[0045] In a second aspect, the present invention provides an electromagnetic and electromechanical real-time hybrid simulation device, comprising:
[0046] A simulation architecture hardware construction module is used to build an electromagnetic transient simulation platform based on the first simulation tool, build an electromechanical transient simulation platform based on the second simulation tool, and establish a network connection between the two simulation platforms to complete the construction of a hybrid simulation hardware architecture;
[0047] A simulation network division module is used to divide the complete power system simulation network into an electromechanical transient subnetwork and an electromagnetic transient subnetwork, and to construct an electromagnetic transient simulation model by equivalently constructing the electromechanical transient subnetwork, and to construct an electromechanical transient simulation model by equivalently constructing the electromagnetic transient subnetwork;
[0048] A data interaction amount calculation module is used to calculate the electromagnetic transient simulation data interaction amount and the electromechanical transient simulation data interaction amount by combining the electromagnetic transient simulation model with the electromechanical transient simulation model;
[0049] An extrapolation data interaction module is used to predict the simulation value of the first simulation tool and the simulation tool with a larger simulation step length in the second simulation tool by using an extrapolation method, so as to synchronize the simulation step lengths of the two simulation tools;
[0050] The standardized transmission module is used to transmit data interaction between two simulation platforms using the functional simulation interface during the dynamic simulation process, thereby realizing standardized data transmission between two simulation models.
[0051] Furthermore, the simulation architecture hardware building module includes:
[0052] An electromagnetic transient simulation platform building unit, used for building an electromagnetic transient simulation platform on an RTLAB simulation machine using a first simulation tool RTLAB;
[0053] An electromechanical transient simulation platform building unit is used to build an electromechanical transient simulation platform on a Windows test machine using a second simulation tool PowerFactory, wherein the simulation step size of the first simulation tool RTLAB is smaller than the simulation step size of the second simulation tool PowerFactory, and the difference between the two is greater than a set threshold;
[0054] A network connection unit is used to establish a network connection between the electromagnetic transient simulation platform and the electromechanical transient simulation platform, and set the two simulation platforms to communicate using the UDP communication protocol;
[0055] The simulation network partitioning module includes:
[0056] A network division unit is used to divide the complete power system simulation network into an electromechanical transient sub-network and an electromagnetic transient sub-network according to the simulation accuracy requirements;
[0057] The electromechanical transient subnetwork equivalent unit is used to perform electromagnetic transient simulation by equivalent the electromechanical transient subnetwork, and use the electromechanical equivalent model and the electromagnetic transient subnetwork as the electromagnetic transient simulation model;
[0058] The electromagnetic transient subnetwork equivalent unit is used to perform electromechanical transient simulation by equivalent the electromagnetic transient subnetwork, and use the electromagnetic side equivalent model and the electromechanical transient subnetwork as the electromechanical transient simulation model;
[0059] The data interaction volume calculation module includes:
[0060] Graphical unit for electromagnetic transient simulation model, used to perform circuit equivalence on the electromechanical side of the electromagnetic transient simulation model and introduce frequency-dependent network equivalent admittance and the current of the first current source , and obtain a graphical display of the electromagnetic transient simulation model;
[0061] The electromechanical transient simulation model graphical unit is used to represent the electromechanical transient subnetwork in the electromechanical transient simulation model using Norton equivalent circuits and introduce imaginary admittance and the current of the imaginary current source , the current of the equivalent current source of the electromagnetic transient subnetwork is expressed as , and obtain a graphical display of the electromechanical transient simulation model;
[0062] The first interactive quantity calculation unit is used to calculate the current of the first current source on the electromechanical side during the simulation process of the electromagnetic transient simulation model. Calculate the equivalent current of the electromagnetic transient subnetwork , and the equivalent current of the electromagnetic transient subnetwork is transmitted to the electromechanical transient simulation model as a first interaction quantity, the first interaction quantity being an electromagnetic transient simulation data interaction quantity;
[0063] The second interaction quantity calculation unit calculates the second interaction quantity according to the first interaction quantity during the simulation process of the electromechanical transient simulation model, and transmits the second interaction quantity to the electromagnetic transient simulation model, that is, according to the equivalent current of the electromagnetic transient subnetwork. Calculate the current of an imaginary current source , verify the current of the imaginary current source The current of the first current source The second interaction quantity is the electromechanical transient simulation data interaction quantity;
[0064] The extrapolation data interaction module includes:
[0065] The second simulation step length acquisition unit is used to acquire the simulation step length of the second simulation tool PowerFactory, denoted as ;
[0066] The first simulation step length acquisition unit is used to acquire the simulation step length of the first simulation tool RTLAB, which is recorded as ;
[0067] A step ratio calculation unit is used to calculate the ratio of the simulation step length of the second simulation tool PowerFactory to the simulation step length of the first simulation tool RTLAB ;
[0068] Extrapolation simulation value prediction unit for ratios based on simulation step lengths Using extrapolation to calculate the current of the first current source on the electromechanical side of the electromagnetic transient simulation model The predicted value is passed to the electromagnetic transient simulation model as the electromechanical transient simulation data interaction quantity to achieve the simulation step synchronization of the two simulation models;
[0069] Standardized transport modules include:
[0070] An FMU file generating unit is used to encapsulate the electromechanical transient simulation model into an FMU file conforming to the FMI standard on the second simulation tool PowerFactory;
[0071] The FMU file export unit is used to export FMU files on a Windows test machine, and call the FMU file through a general script file to communicate between the first simulation tool RTLAB and the second simulation tool PowerFactory, and to perform standardized transmission of data interaction between the electromagnetic transient simulation model and the electromechanical transient simulation model to achieve dynamic simulation.
[0072] The beneficial effects of the present invention are:
[0073] The electromagnetic and electromechanical real-time hybrid simulation method and device provided by the present invention realize large-scale real-time simulation of simulation models by combining the RTLAB simulation tool and the PowerFactory simulation tool, but the simulation efficiency is low; the data interaction amount is predicted by the extrapolation method to make up for the difference in simulation step lengths of the two simulation tools, improve the stability and convergence speed of the hybrid simulation, and avoid the waste of computing resources in the electromagnetic transient simulation process; by exporting the electromechanical transient simulation model of the PowerFactory simulation tool into an FMU file that complies with the FMI standard, the universality of communication between the two simulation tools is achieved by calling the FMU file.
[0074] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect.
[0075] It can be seen that compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0077] Figure 1 It is a flow chart of the electromagnetic and electromechanical real-time hybrid simulation method of the present invention.
[0078] Figure 2 It is a schematic diagram of the electromagnetic and electromechanical real-time hybrid simulation device of the present invention.
[0079] Figure 3 It is a schematic diagram of the overall architecture of the hybrid simulation of the present invention.
[0080] Figure 4It is a schematic diagram of subnetting the simulation network of the present invention.
[0081] Figure 5 It is a schematic diagram of the electromagnetic transient simulation model of the present invention.
[0082] Figure 6 It is a schematic diagram of the electromechanical transient simulation model of the present invention.
[0083] Figure 7 It is an equivalent circuit diagram of the electromagnetic transient simulation model of the present invention.
[0084] Figure 8 It is an equivalent circuit diagram of the electromechanical transient simulation model of the present invention. DETAILED DESCRIPTION
[0085] The electromagnetic and electromechanical real-time hybrid simulation method and device provided by the present invention are based on the existing mainstream simulation software RTLAB and PowerFactory, and use the functional model interface FMI standard. First, based on the frequency-dependent network equivalence method FDNE, the electromagnetic transient subnetwork and the electromechanical transient subnetwork are respectively equivalently modeled to obtain their own complete electromagnetic transient simulation models and electromechanical transient simulation models; secondly, the data interaction information between the models is defined, the calculation formula for the data interaction amount is given, and a large-step data extrapolation method is designed to realize the data interaction between the models; thirdly, the complete electromagnetic transient simulation model is imported into the RTLAB simulator, and the complete electromechanical transient simulation model is encapsulated into an FMU file that complies with the FMI standard on PowerFactory. Finally, the Windows host and the RTLAB simulator are connected via a network cable, and the FMU file is called by the C++ software written on the Windows host, and the real-time hybrid simulation of the power system between RTLAB and PowerFactory is realized based on UDP communication.
[0086] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0087] See also Figure 1 The figure shows a specific implementation of the electromagnetic and electromechanical real-time hybrid simulation method, which includes the following steps:
[0088] S1. Build an electromagnetic transient simulation platform based on the first simulation tool, build an electromechanical transient simulation platform based on the second simulation tool, and establish a network connection between the two simulation platforms to complete the construction of a hybrid simulation hardware architecture;
[0089] S2. Divide the complete power system simulation network into an electromechanical transient subnetwork and an electromagnetic transient subnetwork, and construct an electromagnetic transient simulation model by equivalently constructing the electromechanical transient subnetwork, and constructing an electromechanical transient simulation model by equivalently constructing the electromagnetic transient subnetwork;
[0090] S3. Calculate the electromagnetic transient simulation data interaction amount and the electromechanical transient simulation data interaction amount by combining the electromagnetic transient simulation model with the electromechanical transient simulation model;
[0091] S4. Use the extrapolation method to predict the simulation value of the simulation tool with the longest simulation step in the first simulation tool and the second simulation tool to synchronize the simulation step of the two simulation tools;
[0092] S5. During the dynamic simulation process, the functional simulation interface is used to transmit data interaction between the two simulation platforms to achieve standardized data transmission between the two simulation models.
[0093] In this embodiment, the specific steps of step S1 are as follows:
[0094] S11. Use the first simulation tool RTLAB to build an electromagnetic transient simulation platform on the RTLAB simulator;
[0095] RTLAB simulation tool is closely integrated with MATLAB / Simulink, and can be directly used to import models established in MATLAB / Simulink for real-time simulation and control. RTLAB is applicable to various engineering system simulation and control scenarios due to its convenience, flexibility and openness, and has been widely used in power systems, motor drive, power electronics and other fields.
[0096] S12. Using the second simulation tool PowerFactory on the Windows test machine to build an electromechanical transient simulation platform, wherein the simulation step size of the first simulation tool RTLAB is smaller than the simulation step size of the second simulation tool PowerFactory, and the difference between the two is greater than a set threshold;
[0097] As a comprehensive simulation software for large-scale power systems, PowerFactory adopts an operation model based on Windows standards and an integrated processing method of graphics and models. It has a rich library of power system component models, including generators, motors, controllers, dynamic loads, lines, transformers, parallel equipment, etc.
[0098] S13. Establish a network connection between the electromagnetic transient simulation platform and the electromechanical transient simulation platform, and set the two simulation platforms to communicate using the UDP communication protocol;
[0099] By executing step S1, the following is achieved: Figure 3The overall architecture of hybrid simulation is shown as follows;
[0100] The specific steps of step S2 are as follows:
[0101] S21. According to the simulation accuracy requirements, the complete power system simulation network is divided into an electromechanical transient subnetwork and an electromagnetic transient subnetwork;
[0102] By executing step S21, the following is obtained: Figure 4 The simulated network shown is divided into subnets;
[0103] S22. Perform electromagnetic transient simulation by equivalent electromechanical transient subnetwork, and use the electromechanical equivalent model and the electromagnetic transient subnetwork as the electromagnetic transient simulation model; the specific steps of step S22 are as follows:
[0104] S221. Use the frequency-dependent network equivalent admittance to replace the fundamental frequency admittance value in the traditional Norton equivalent circuit to complete the Norton equivalent circuit transformation;
[0105] S222. Use the modified Norton equivalent circuit to perform electromechanical transient sub-network equivalence to obtain the electromechanical equivalent model;
[0106] By executing step S222, the following is obtained: Figure 5 The electromagnetic transient simulation model shown;
[0107] S223. The electromechanical equivalent model and the electromagnetic transient subnetwork are used as electromagnetic transient simulation models, and are imported into the first simulation tool RTLAB to build an electromagnetic transient simulation platform;
[0108] S23. Perform electromechanical transient simulation by equivalently performing electromagnetic transient subnetwork, and use the electromagnetic side equivalent model and the electromechanical transient subnetwork as the electromechanical transient simulation model; the specific steps of step S23 are as follows:
[0109] S231. Read the power and voltage of the two simulation platform interface locations;
[0110] S232. Setting a constant current source of the same power to perform electromagnetic transient subnetwork equivalence to obtain an electromagnetic field equivalent model;
[0111] By executing step S232, the following is obtained: Figure 6 The electromechanical transient simulation model shown;
[0112] S233. The electromagnetic side equivalent model and the electromechanical transient subnetwork are used as an electromechanical transient simulation model, and are imported into the electromechanical transient simulation platform built by the second simulation tool PowerFactory;
[0113] The specific steps of step S3 are as follows:
[0114] S31. Perform circuit equivalence on the electromechanical side of the electromagnetic transient simulation model and introduce frequency-dependent network equivalent admittance and the current of the first current source , and obtain a graphical display of the electromagnetic transient simulation model;
[0115] By executing step S31, the following is obtained: Figure 7 The equivalent circuit diagram of the electromagnetic transient simulation model shown;
[0116] S32. Use Norton equivalent circuit to represent the electromechanical transient subnetwork in the electromechanical transient simulation model and introduce imaginary admittance and the current of the imaginary current source , the current of the equivalent current source of the electromagnetic transient subnetwork is expressed as , and obtain a graphical display of the electromechanical transient simulation model;
[0117] By executing step S32, the following is obtained: Figure 8 The equivalent circuit diagram of the electromagnetic transient simulation model shown;
[0118] S33. During the simulation of the electromagnetic transient simulation model, according to the current of the first current source on the electromechanical side Calculate the equivalent current of the electromagnetic transient subnetwork , and the equivalent current of the electromagnetic transient subnetwork is transmitted to the electromechanical transient simulation model as a first interaction quantity, the first interaction quantity being an electromagnetic transient simulation data interaction quantity;
[0119] S34. Calculate the second interaction amount according to the first interaction amount during the simulation process of the electromechanical transient simulation model, and pass the second interaction amount to the electromagnetic transient simulation model, that is, according to the equivalent current of the electromagnetic transient subnetwork Calculate the current of an imaginary current source , verify the current of the imaginary current source The current of the first current source The second interaction quantity is the electromechanical transient simulation data interaction quantity;
[0120] Figure 7 middle, is the frequency-dependent network equivalent admittance, for The voltage across the is the current of the current source in the Norton equivalent circuit, and Injecting Norton Current Source into the Network Active power and reactive power; Figure 8 middle, is the current of the equivalent current source of the electromagnetic transient subnetwork, is the admittance in the hypothetical Norton equivalent network, for The voltage across the is the current of the current source in the imaginary Norton equivalent network, and Injecting a hypothetical Norton current source into the network Active power and reactive power;
[0121] Electromagnetic transient simulation programs need to be based on Calculate the equivalent current of the electromagnetic transient subnetwork (assuming that it is Figure 7 exists in ), that is, corresponding to Figure 8 Current flow in electromechanical transient simulation programs ; Assume current source The three-phase voltage at , , , the three-phase current is , , , the network provides a current source The power can be calculated by the formula:
[0122] (1)
[0123] (2)
[0124] Mapped to the electromechanical transient simulation model are:
[0125] (3)
[0126] (4)
[0127] It can be deduced that the current source is calculated in the electromagnetic transient simulation program The formula is:
[0128] (5)
[0129] (6)
[0130] During the electromechanical transient simulation process, Calculate the equivalent current of the electromechanical transient subnetwork , and transmitted to the electromagnetic transient simulation program; exist Figure 7 Corresponding current in electromagnetic transient simulation program ; Easily derive the electromechanical transient simulation program to calculate the current source The formula is:
[0131] (7)
[0132] (8)
[0133] The specific steps of step S4 are as follows:
[0134] S41. Obtain the simulation step length of the second simulation tool PowerFactory, denoted as ;
[0135] S42. Obtain the simulation step length of the first simulation tool RTLAB, recorded as ;
[0136] S43. Calculate the ratio of the simulation step length of the second simulation tool PowerFactory to the simulation step length of the first simulation tool RTLAB ;
[0137] S44. Ratio based on simulation step length Using extrapolation to calculate the current of the first current source on the electromechanical side of the electromagnetic transient simulation model The predicted value is passed to the electromagnetic transient simulation model as the electromechanical transient simulation data interaction quantity to achieve the simulation step synchronization of the two simulation models;
[0138] Given that The size of is usually around several hundred, which means that the electromechanical transient simulation program performs one simulation step calculation, and the electromagnetic transient simulation program will perform hundreds of simulation step calculations; limited by the large step interaction cycle, the electromagnetic transient simulation model cannot obtain the real-time calculation results of the electromechanical network, so these hundreds of calculations use the same initial data, wasting computing resources;
[0139] To this end, the problem is optimized based on the extrapolation method, that is, the calculation results of this and the last time in the execution of the electromechanical simulation model are used for extrapolation, so as to obtain the initial value of the electromagnetic transient simulation model with a certain predictive effect; the formula of the extrapolation method is:
[0140] (9)
[0141] (10)
[0142] in, is the current amplitude transmitted by the i-th electromechanical simulation program, is the current amplitude transmitted by the i-1th electromechanical simulation program, is the current phase angle transmitted by the i-th electromechanical simulation program, is the current phase angle transmitted by the i-1th electromechanical simulation program;
[0143] The specific steps of step S5 are as follows:
[0144] S51. Encapsulate the electromechanical transient simulation model into an FMU file that complies with the FMI standard on the second simulation tool PowerFactory;
[0145] S52. Export the FMU file on the Windows test machine, and call the FMU file through the general script file to communicate between the first simulation tool RTLAB and the second simulation tool PowerFactory, and perform standardized transmission of data interaction between the electromagnetic transient simulation model and the electromechanical transient simulation model to achieve dynamic simulation; before exporting the FMU file on the Windows test machine in step S52, the electromechanical transient simulation model needs to be configured through the following steps:
[0146] Add a DLS model and select the DLS model type as compiled model;
[0147] Set up dynamic link library files that adapt to the FMI standard;
[0148] The input of the DLS model is defined as the equivalent current of the electromagnetic transient subnetwork , the output is the current of the first current source , thereby configuring the DLS model as an electromechanical transient simulation model;
[0149] The only data that need to be exchanged as input and output quantities are the equivalent current amplitude and phase angle of the electromagnetic transient subnetwork and the equivalent current amplitude and phase angle of the electromechanical transient subnetwork.
[0150] The electromagnetic transient simulation model was built using Simulink and then imported into RTLAB for execution; the PowerFactory model was first converted into an FMU file that complies with the FMI standard, and then called and executed using a self-written C++ program; RTLAB was connected to the digital computer running the PowerFactory model via a high-speed network cable for high-speed digital communication based on the UDP communication protocol; during simulation, the two exchanged data using the step size of the electromechanical simulation as a cycle; the start and stop of the hybrid simulation and the viewing of the simulation results were all completed in the RTLAB host computer.
[0151] It should be understood that the order of execution of the steps in the above embodiment does not mean that the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0152] The following is an embodiment of an electromagnetic and electromechanical real-time hybrid simulation device provided by an embodiment of the present disclosure. The device and the electromagnetic and electromechanical real-time hybrid simulation method of the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the electromagnetic and electromechanical real-time hybrid simulation device, reference can be made to the embodiment of the electromagnetic and electromechanical real-time hybrid simulation method.
[0153] like Figure 2 As shown, the device comprises:
[0154] The simulation architecture hardware building module is used to build an electromagnetic transient simulation platform based on the first simulation tool, build an electromechanical transient simulation platform based on the second simulation tool, and establish a network connection between the two simulation platforms to complete the construction of the hybrid simulation hardware architecture; the simulation architecture hardware building module includes:
[0155] An electromagnetic transient simulation platform building unit, used for building an electromagnetic transient simulation platform on an RTLAB simulation machine using a first simulation tool RTLAB;
[0156] An electromechanical transient simulation platform building unit is used to build an electromechanical transient simulation platform on a Windows test machine using a second simulation tool PowerFactory, wherein the simulation step size of the first simulation tool RTLAB is smaller than the simulation step size of the second simulation tool PowerFactory, and the difference between the two is greater than a set threshold;
[0157] A network connection unit is used to establish a network connection between the electromagnetic transient simulation platform and the electromechanical transient simulation platform, and set the two simulation platforms to communicate using the UDP communication protocol;
[0158] The simulation network division module is used to divide the complete power system simulation network into an electromechanical transient subnetwork and an electromagnetic transient subnetwork, and to construct an electromagnetic transient simulation model by equivalently constructing the electromechanical transient subnetwork, and to construct an electromechanical transient simulation model by equivalently constructing the electromagnetic transient subnetwork; the simulation network division module includes:
[0159] A network division unit is used to divide the complete power system simulation network into an electromechanical transient sub-network and an electromagnetic transient sub-network according to the simulation accuracy requirements;
[0160] The electromechanical transient subnetwork equivalent unit is used to perform electromagnetic transient simulation by equivalent the electromechanical transient subnetwork, and use the electromechanical equivalent model and the electromagnetic transient subnetwork as the electromagnetic transient simulation model;
[0161] The electromagnetic transient subnetwork equivalent unit is used to perform electromechanical transient simulation by equivalent the electromagnetic transient subnetwork, and use the electromagnetic side equivalent model and the electromechanical transient subnetwork as the electromechanical transient simulation model;
[0162] The data interaction amount calculation module is used to calculate the electromagnetic transient simulation data interaction amount and the electromechanical transient simulation data interaction amount by combining the electromagnetic transient simulation model with the electromechanical transient simulation model; the data interaction amount calculation module includes:
[0163] Graphical unit for electromagnetic transient simulation model, used to perform circuit equivalence on the electromechanical side of the electromagnetic transient simulation model and introduce frequency-dependent network equivalent admittance and the current of the first current source , and obtain a graphical display of the electromagnetic transient simulation model;
[0164] The electromechanical transient simulation model graphical unit is used to represent the electromechanical transient subnetwork in the electromechanical transient simulation model using Norton equivalent circuits and introduce imaginary admittance and the current of the imaginary current source , the current of the equivalent current source of the electromagnetic transient subnetwork is expressed as , and obtain a graphical display of the electromechanical transient simulation model;
[0165] The first interactive quantity calculation unit is used to calculate the current of the first current source on the electromechanical side during the simulation process of the electromagnetic transient simulation model. Calculate the equivalent current of the electromagnetic transient subnetwork , and the equivalent current of the electromagnetic transient subnetwork is transmitted to the electromechanical transient simulation model as a first interaction quantity, the first interaction quantity being an electromagnetic transient simulation data interaction quantity;
[0166] The second interaction quantity calculation unit calculates the second interaction quantity according to the first interaction quantity during the simulation process of the electromechanical transient simulation model, and transmits the second interaction quantity to the electromagnetic transient simulation model, that is, according to the equivalent current of the electromagnetic transient subnetwork. Calculate the current of an imaginary current source , verify the current of the imaginary current source The current of the first current source The second interaction quantity is the electromechanical transient simulation data interaction quantity;
[0167] The extrapolation data interaction module is used to predict the simulation value of the simulation tool with the longest simulation step in the first simulation tool and the second simulation tool by using the extrapolation method to synchronize the simulation steps of the two simulation tools; the extrapolation data interaction module includes:
[0168] The second simulation step length acquisition unit is used to acquire the simulation step length of the second simulation tool PowerFactory, denoted as ;
[0169] The first simulation step length acquisition unit is used to acquire the simulation step length of the first simulation tool RTLAB, which is recorded as ;
[0170] A step ratio calculation unit is used to calculate the ratio of the simulation step length of the second simulation tool PowerFactory to the simulation step length of the first simulation tool RTLAB ;
[0171] Extrapolation simulation value prediction unit for ratios based on simulation step lengths Using extrapolation to calculate the current of the first current source on the electromechanical side of the electromagnetic transient simulation model The predicted value is passed to the electromagnetic transient simulation model as the electromechanical transient simulation data interaction quantity to achieve the simulation step synchronization of the two simulation models;
[0172] The standardized transmission module is used to transmit data interaction between two simulation platforms using the functional simulation interface during the dynamic simulation process, so as to realize the standardized transmission of data between two simulation models; the standardized transmission module includes:
[0173] An FMU file generating unit is used to encapsulate the electromechanical transient simulation model into an FMU file conforming to the FMI standard on the second simulation tool PowerFactory;
[0174] The FMU file export unit is used to export FMU files on a Windows test machine, and call the FMU file through a general script file to communicate between the first simulation tool RTLAB and the second simulation tool PowerFactory, and to perform standardized transmission of data interaction between the electromagnetic transient simulation model and the electromechanical transient simulation model to achieve dynamic simulation.
[0175] Although the present invention has been described in detail by referring to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person skilled in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, and they shall be within the scope of protection of the present invention.
Claims
1. A real-time hybrid electromagnetic and electromechanical simulation method, characterized in that: The steps include: S1. Build an electromagnetic transient simulation platform based on the first simulation tool, build an electromechanical transient simulation platform based on the second simulation tool, and establish a network connection between the two simulation platforms to complete the construction of the hybrid simulation hardware architecture; the specific steps of step S1 are as follows: S11. Use the first simulation tool RTLAB to build an electromagnetic transient simulation platform on the RTLAB simulator; S12. Using the second simulation tool PowerFactory on the Windows test machine to build an electromechanical transient simulation platform, wherein the simulation step size of the first simulation tool RTLAB is smaller than the simulation step size of the second simulation tool PowerFactory, and the difference between the two is greater than a set threshold; S13. Establish a network connection between the electromagnetic transient simulation platform and the electromechanical transient simulation platform, and set the two simulation platforms to communicate using the UDP communication protocol; S2. Divide the complete power system simulation network into an electromechanical transient subnetwork and an electromagnetic transient subnetwork, and construct an electromagnetic transient simulation model by equivalently constructing the electromechanical transient subnetwork, and constructing an electromechanical transient simulation model by equivalently constructing the electromagnetic transient subnetwork; S3. Calculate the electromagnetic transient simulation data interaction amount and the electromechanical transient simulation data interaction amount by combining the electromagnetic transient simulation model with the electromechanical transient simulation model; step S3 includes the following steps: S31. Perform circuit equivalence on the electromechanical side of the electromagnetic transient simulation model and introduce frequency-dependent network equivalent admittance and the current of the first current source , and obtain a graphical display of the electromagnetic transient simulation model; S4. The simulation tool with the longest simulation step in the first simulation tool and the second simulation tool is used to predict the simulation value by using the extrapolation method to synchronize the simulation step of the two simulation tools; the specific steps of step S4 are as follows: S41. Obtain the simulation step length of the second simulation tool PowerFactory, denoted as ; S42. Obtain the simulation step length of the first simulation tool RTLAB, recorded as ; S43. Calculate the ratio of the simulation step length of the second simulation tool PowerFactory to the simulation step length of the first simulation tool RTLAB ; S44. Ratio based on simulation step length Using extrapolation to calculate the current of the first current source on the electromechanical side of the electromagnetic transient simulation model The predicted value is passed to the electromagnetic transient simulation model as the electromechanical transient simulation data interaction quantity to achieve the simulation step synchronization of the two simulation models; S5. During the dynamic simulation process, the functional simulation interface is used to transmit data interaction between the two simulation platforms to achieve standardized data transmission between the two simulation models.
2. The electromagnetic and electromechanical real-time hybrid simulation method according to claim 1, characterized in that: The specific steps of step S2 are as follows: S21. According to the simulation accuracy requirements, the complete power system simulation network is divided into an electromechanical transient subnetwork and an electromagnetic transient subnetwork; S22. Perform electromagnetic transient simulation by equivalently treating the electromechanical transient subnetwork, and use the electromechanical equivalent model and the electromagnetic transient subnetwork as an electromagnetic transient simulation model; S23. Perform electromechanical transient simulation by equivalent the electromagnetic transient subnetwork, and use the electromagnetic equivalent model and the electromechanical transient subnetwork as the electromechanical transient simulation model.
3. The electromagnetic and electromechanical real-time hybrid simulation method according to claim 2, characterized in that: The specific steps of step S22 are as follows: S221. Use the frequency-dependent network equivalent admittance to replace the fundamental frequency admittance value in the traditional Norton equivalent circuit to complete the Norton equivalent circuit transformation; S222. Use the modified Norton equivalent circuit to perform electromechanical transient sub-network equivalence to obtain the electromechanical equivalent model; S223. The electromechanical equivalent model and the electromagnetic transient subnetwork are used as electromagnetic transient simulation models, and are imported into the first simulation tool RTLAB to build an electromagnetic transient simulation platform; The specific steps of step S23 are as follows: S231. Read the power and voltage of the two simulation platform interface locations; S232. Setting a constant current source of the same power to perform electromagnetic transient subnetwork equivalence to obtain an electromagnetic field equivalent model; S233. The electromagnetic side equivalent model and the electromechanical transient subnetwork are used as the electromechanical transient simulation model, and are imported into the electromechanical transient simulation platform built by the second simulation tool PowerFactory.
4. The electromagnetic and electromechanical real-time hybrid simulation method according to claim 2, characterized in that: Step S3 also includes the following steps: S32. Use Norton equivalent circuit to represent the electromechanical transient subnetwork in the electromechanical transient simulation model and introduce imaginary admittance and the current of the imaginary current source , the current of the equivalent current source of the electromagnetic transient subnetwork is expressed as , and obtain a graphical display of the electromechanical transient simulation model; S33. During the simulation of the electromagnetic transient simulation model, according to the current of the first current source on the electromechanical side Calculate the equivalent current of the electromagnetic transient subnetwork , and the equivalent current of the electromagnetic transient subnetwork is transmitted to the electromechanical transient simulation model as a first interaction quantity, the first interaction quantity being an electromagnetic transient simulation data interaction quantity; S34. Calculate the second interaction amount according to the first interaction amount during the simulation process of the electromechanical transient simulation model, and pass the second interaction amount to the electromagnetic transient simulation model, that is, according to the equivalent current of the electromagnetic transient subnetwork Calculate the current of an imaginary current source , verify the current of the imaginary current source The current of the first current source The second interaction quantity is the electromechanical transient simulation data interaction quantity.
5. The electromagnetic and electromechanical real-time hybrid simulation method according to claim 4, characterized in that: The specific steps of step S5 are as follows: S51. Encapsulate the electromechanical transient simulation model into an FMU file that complies with the FMI standard on the second simulation tool PowerFactory; S52. Export the FMU file on the Windows test machine, and call the FMU file through the general script file to communicate between the first simulation tool RTLAB and the second simulation tool PowerFactory, and perform standardized transmission of data interaction between the electromagnetic transient simulation model and the electromechanical transient simulation model to achieve dynamic simulation.
6. The electromagnetic and electromechanical real-time hybrid simulation method according to claim 5, characterized in that: Before exporting the FMU file on the Windows test machine in step S52, the electromechanical transient simulation model needs to be configured through the following steps: Add a DLS model and select the DLS model type as compiled model; Set up dynamic link library files that adapt to the FMI standard; The input of the DLS model is defined as the equivalent current of the electromagnetic transient subnetwork , the output is the current of the first current source , thereby configuring the DLS model as an electromechanical transient simulation model.
7. An electromagnetic and electromechanical real-time hybrid simulation device, characterized in that: include: A simulation architecture hardware construction module is used to build an electromagnetic transient simulation platform based on the first simulation tool, build an electromechanical transient simulation platform based on the second simulation tool, and establish a network connection between the two simulation platforms to complete the construction of a hybrid simulation hardware architecture; The simulation architecture hardware building modules include: An electromagnetic transient simulation platform building unit, used for building an electromagnetic transient simulation platform on an RTLAB simulation machine using a first simulation tool RTLAB; An electromechanical transient simulation platform building unit is used to build an electromechanical transient simulation platform on a Windows test machine using a second simulation tool PowerFactory, wherein the simulation step size of the first simulation tool RTLAB is smaller than the simulation step size of the second simulation tool PowerFactory, and the difference between the two is greater than a set threshold; A network connection unit is used to establish a network connection between the electromagnetic transient simulation platform and the electromechanical transient simulation platform, and set the two simulation platforms to communicate using the UDP communication protocol; A simulation network division module is used to divide the complete power system simulation network into an electromechanical transient subnetwork and an electromagnetic transient subnetwork, and to construct an electromagnetic transient simulation model by equivalently constructing the electromechanical transient subnetwork, and to construct an electromechanical transient simulation model by equivalently constructing the electromagnetic transient subnetwork; The data interaction amount calculation module is used to calculate the electromagnetic transient simulation data interaction amount and the electromechanical transient simulation data interaction amount by combining the electromagnetic transient simulation model with the electromechanical transient simulation model; the data interaction amount calculation module includes: Graphical unit for electromagnetic transient simulation model, used to perform circuit equivalence on the electromechanical side of the electromagnetic transient simulation model and introduce frequency-dependent network equivalent admittance and the current of the first current source , and obtain a graphical display of the electromagnetic transient simulation model; The extrapolation data interaction module is used to predict the simulation value of the simulation tool with the longest simulation step in the first simulation tool and the second simulation tool by using the extrapolation method to synchronize the simulation steps of the two simulation tools; the extrapolation data interaction module includes: The second simulation step length acquisition unit is used to acquire the simulation step length of the second simulation tool PowerFactory, denoted as ; The first simulation step length acquisition unit is used to acquire the simulation step length of the first simulation tool RTLAB, which is recorded as ; A step ratio calculation unit, used to calculate the ratio of the simulation step lengths of the second simulation tool PowerFactory and the first simulation tool RTLAB ; Extrapolation simulation value prediction unit for ratios based on simulation step lengths Using extrapolation to calculate the current of the first current source on the electromechanical side of the electromagnetic transient simulation model The predicted value is passed to the electromagnetic transient simulation model as the electromechanical transient simulation data interaction quantity to achieve the simulation step synchronization of the two simulation models; The standardized transmission module is used to transmit data interaction between two simulation platforms using the functional simulation interface during the dynamic simulation process, thereby realizing standardized data transmission between two simulation models.
8. The electromagnetic and electromechanical real-time hybrid simulation device according to claim 7, characterized in that: The simulation network partitioning module includes: A network division unit is used to divide the complete power system simulation network into an electromechanical transient subnetwork and an electromagnetic transient subnetwork according to the simulation accuracy requirements; The electromechanical transient subnetwork equivalent unit is used to perform electromagnetic transient simulation by equivalent the electromechanical transient subnetwork, and use the electromechanical equivalent model and the electromagnetic transient subnetwork as the electromagnetic transient simulation model; The electromagnetic transient subnetwork equivalent unit is used to perform electromechanical transient simulation by equivalent the electromagnetic transient subnetwork, and use the electromagnetic side equivalent model and the electromechanical transient subnetwork as the electromechanical transient simulation model; The data interaction volume calculation module also includes: The electromechanical transient simulation model graphical unit is used to represent the electromechanical transient subnetwork in the electromechanical transient simulation model using Norton equivalent circuits and introduce imaginary admittance and the current of the imaginary current source , the current of the equivalent current source of the electromagnetic transient subnetwork is expressed as , and obtain a graphical display of the electromechanical transient simulation model; The first interactive quantity calculation unit is used to calculate the current of the first current source on the electromechanical side during the simulation process of the electromagnetic transient simulation model. Calculate the equivalent current of the electromagnetic transient subnetwork , and the equivalent current of the electromagnetic transient subnetwork is transmitted to the electromechanical transient simulation model as a first interaction quantity, the first interaction quantity being an electromagnetic transient simulation data interaction quantity; The second interaction quantity calculation unit calculates the second interaction quantity according to the first interaction quantity during the simulation process of the electromechanical transient simulation model, and transmits the second interaction quantity to the electromagnetic transient simulation model, that is, according to the equivalent current of the electromagnetic transient subnetwork. Calculate the current of an imaginary current source , verify the current of the imaginary current source The current of the first current source The second interaction quantity is the electromechanical transient simulation data interaction quantity; Standardized transport modules include: An FMU file generating unit is used to encapsulate the electromechanical transient simulation model into an FMU file conforming to the FMI standard on the second simulation tool PowerFactory; The FMU file export unit is used to export FMU files on a Windows test machine, and call the FMU file through a general script file to communicate between the first simulation tool RTLAB and the second simulation tool PowerFactory, and to perform standardized transmission of data interaction between the electromagnetic transient simulation model and the electromechanical transient simulation model to achieve dynamic simulation.
