Detailed Description
The present invention will be described in further detail below with reference to the drawings and detailed description for the purpose of better understanding of the technical solution of the present invention to those skilled in the art. Embodiments of the present invention will hereinafter be described in detail, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for explaining the present invention and are not to be construed as limiting the present invention. As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or coupled. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items. It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The embodiment of the invention provides a DC power system dynamic characteristic analysis method based on mixed time scale modeling, which is shown in fig. 5 and comprises the following steps:
S1, an EMT subsystem and a DP subsystem of a direct current power system are established.
S2, importing the built EMT subsystem into the FPGA1, and importing the built DP subsystem into the FPGA 2.
In practical application, the number of EMT subsystems may be 1, but the number of DP subsystems may be multiple, and the FPGA2 may include multiple FPGAs.
S3, an interface calculation module is established according to the external characteristics of the EMT subsystem and the DP subsystem and is deployed on the FPGA3, and the FPGA3 is used for data interaction of the EMT calculation module and the DP calculation module.
Logic for parallel simulation time sequence control can be imported on the FPGA3, so that the simulation time sequence control logic is used for selecting whether serial or parallel is adopted in subsequent processing, and specifically, the logic for simulation time sequence control can be loaded into an interface calculation module deployed on the FPGA3, and the interface calculation module selects whether serial time sequence simulation or parallel time sequence simulation is adopted in the subsequent processing. Therefore, the FPGA3 is specifically used for simulating the timing selection and the data interaction of the EMT calculation module and the DP calculation module.
S4, after initialization, the EMT subsystem performs n single step length analyses and the DP subsystem performs one single step length analysis until the interaction time is reached.
S5, outputting the analysis result to the terminal equipment.
The method comprises the steps of establishing a state equation of an EMT subsystem and a state equation of a DP subsystem, and operating the DP subsystem by using an FPGA2, wherein the state equation of the EMT subsystem is as follows: Wherein r D is the real-time interaction volume of the DP subsystem, Representing an EMT subsystem state variable differential term, A E represents an EMT subsystem state variable matrix, x E represents an EMT subsystem state variable, B E represents an EMT subsystem control variable matrix, u represents an EMT subsystem control variable, C E-D represents an EMT subsystem interaction volume matrix, E represents an EMT subsystem, D represents a DP subsystem, and the state equation of the DP subsystem is: r E is the real-time interaction quantity of the EMT subsystem, k represents the dynamic phasor order, Representing DP subsystem state variable differential terms, x D representing DP subsystem state variables, j representing imaginary units, ω s =2pi/T, T representing fundamental period, a D representing DP subsystem state variable matrix, B D representing DP subsystem control variable matrix, u D representing DP subsystem control variables, operator < x > k representing k-th order dynamic phasors of the respective variables.
In practical application, a state equation of a subsystem needs to be established, and the subsystem simulation is realized by using an FPGA:
in the method, r D is the real-time interaction quantity of the DP subsystem
And establishing a state equation of the DP subsystem, wherein the state equation (2) described by the instantaneous differential equation is converted into a formula (3) when the DP subsystem adopts dynamic phasor modeling
Wherein r E is the real-time interaction quantity of the DP subsystem:
Wherein ω s =2pi/T, T is fundamental wave period, operator < x > k represents k-order dynamic phasors of corresponding variables, and the definition and solving modes are as follows
In the formula, the superscript 'R' and 'I' respectively represent a real part and an imaginary part.
In particular, the dynamic process of the DP subsystem needs to be split into real and imaginary parts. In practical application, the computer does not calculate differential equation containing complex number, so that it must be expanded into two equation types of real part and imaginary part to solve, and all the forms of < x > k are complex numbers, and can be expressed as
Wherein, the dynamic process of the DP subsystem represented by the formula (4) is split into real part and imaginary part due to the complex characteristic of the dynamic phasor, thus obtaining
R represents the real part, I represents the imaginary part,Representing the real matrix of DP subsystem state variables,Representing the imaginary matrix of the DP subsystem state variable,Representing the real matrix of the DP subsystem control variables,Representing the imaginary matrix of the DP subsystem control variable,Representing the real matrix of the DP subsystem interaction quantity,Representing the imaginary matrix of the DP subsystem interaction quantity,Representing the real part of the real-time interaction volume of the EMT subsystem,Representing the real-time interaction volume imaginary part of the EMT subsystem,Representing the real part of the DP subsystem state variable,Representing the imaginary part of the DP subsystem state variable.
In this embodiment, in the process of using the FPGA3 to perform data interaction between the EMT calculation module and the DP calculation module, the interface mechanism adopted includes:
And extracting a dynamic phasor value from the interaction volume instantaneous value output by the EMT subsystem.
And generating an interaction quantity instantaneous value by using the interaction quantity in the form of the dynamic phasor output by the DP subsystem.
The interface circuit is used for solving the EMT subsystem and the DP subsystem in a single step by using a controlled voltage source and a controlled current source, and the interaction quantity is used as a controlled source amplitude.
The DC side external characteristics can be roughly divided into two types of bus voltage control type and bus current control type, so that a controlled voltage source and a controlled current source are respectively used as interface circuits when the two types of subsystems are solved in a single step, and the interaction quantity is the amplitude of the controlled source. Link ② is used to extract the dynamic phasor values from the EMT subsystem interaction volume instantaneous values, while link ④ is used to generate the instantaneous values from the DP subsystem interaction volume in the form of dynamic phasors.
Furthermore, an interface calculation module is built. According to the external characteristics of the EMT subsystem and the DP subsystem, an interface scheme is determined, and the FPGA3 is utilized to realize simulation time sequence selection and data interaction of the EMT calculation module and the DP calculation module. The DC side external characteristics of the subsystems formed by the converter station, the load converter and the like can be roughly divided into two types of bus voltage control type and bus current control type, so that a controlled voltage source and a controlled current source are respectively used as interface circuits when the two types of subsystems are solved in a single step, and the interaction quantity is the amplitude of the controlled source. Fig. 2 shows an interface mechanism schematic, in which links ① and ③ are EMT and DP subsystems, link ② is used to extract a dynamic phasor value from an EMT subsystem interaction volume instantaneous value, and link ④ is used to generate an instantaneous value from an interaction volume in the form of a DP subsystem dynamic phasor.
In this embodiment, in step S4, the initializing process includes:
And initializing an EMT calculation module of the EMT subsystem, a DP calculation module of the DP subsystem and an interface calculation module.
The interface computing module is used as a bridge for interaction of the two subsystems. The initialization processing comprises the steps that the time of the three modules is synchronous, the initial time is t=t 0, the simulation step length delta T of the EMT subsystem, the simulation step length delta T of the DP subsystem=h delta T, the total simulation duration T, the system parameters of the EMT calculation module and the DP calculation module, wherein T0 represents that the initial time is generally taken to be 0, and delta T represents the simulation step length of the EMT subsystem. And the parameters of the system of the EMT calculation module and the system of the DP calculation module comprise all parameters in a state quantity matrix and a control quantity matrix when the DP subsystem and the EMT subsystem are established.
In this embodiment, the hybrid simulation includes two modes, serial timing simulation and parallel timing simulation, as shown in fig. 2, for the serial timing simulation, in step S4, the DP subsystem performs a single step length analysis, including:
At time t1, the interaction quantity in the form of dynamic phasor output by the DP subsystem generates an instantaneous value sequence through an interface and transmits the instantaneous value sequence to the EMT subsystem. The "interface" herein may also be referred to as a "hybrid emulation interface", and is implemented on a hardware level as an interface circuit, such as a controlled voltage source or a current source as shown in fig. 1, where the left side in fig. 1 is two EMT subsystems and an interface circuit form, and the right side is two DP subsystems corresponding thereto. The EMT subsystem interface can be a controlled voltage source or a current source, and the corresponding DP subsystem can be the controlled current source or the controlled voltage source, wherein single-step solution refers to calculation of one simulation step, and the interaction quantity refers to the value of r E、rD when the EMT subsystem and the DP subsystem are established as the interaction quantity, and the value of the interaction quantity is= "controlled source amplitude". And the EMT subsystem reads the interaction quantity from the instantaneous value sequence, sets an interface circuit controlled source and then analyzes according to the electromagnetic transient step length until the time t 2. As shown in fig. 2, each interaction time represented by time T1 is simulated many times, and a DP subsystem simulation step Δt is between T1 and T2. And updating the instantaneous value sequence according to an analysis result obtained by the EMT subsystem, extracting a dynamic phasor value of the interaction quantity through an interface calculation module, and transmitting the dynamic phasor value to the DP subsystem, wherein the interface calculation module is used for loading an interface mechanism shown in the figure 1 so as to conveniently realize the interaction between the DP subsystem and the EMT subsystem. And executing the DP subsystem to the time t2, and if the interaction interval is consistent with the simulation step length of the DP subsystem, performing only one iteration. When the next interaction interval is entered, step ⑤~⑧ in fig. 2a is performed. The interaction interval is the time of the interface calculation module for transmitting the interaction quantity each time, which is generally consistent with the simulation step length of the DP subsystem, and the time of the interface calculation module for transmitting the interaction quantity each time is not smaller than the simulation step length of the DP subsystem in practical application.
Specifically, in the case of adopting a serial timing processing method, the method includes:
Step 11, at the time t1, the DP subsystem interaction volume dynamic phasor value < r D>k generates an instantaneous value sequence r D,n={rD,n(t),…rD,n (t+ (m-1) delta t) through a mixed simulation interface and then transmits the instantaneous value sequence r D,n={rD,n(t),…rD,n (t+ (m-1) delta t) to the EMT subsystem;
Step 12, the EMT subsystem sequentially reads the interaction quantity from the interaction quantity instantaneous value sequence r D, sets an interface circuit controlled source, and executes simulation m steps according to the electromagnetic transient step length delta t to the time t 2;
Step 13, updating the interaction quantity instantaneous value sequence of the [ t 2-T,t2 ] period by using the simulation result of the EMT subsystem (t 1,t2), extracting the interaction quantity dynamic phase value < r E>k through a mixed simulation interface, and transmitting the interaction quantity dynamic phase value < r E>k to the DP subsystem for simulation at the moment (t 1,t2);
And 14, executing the DP subsystem to the time T2 by using the simulation step length delta T, and if the interaction interval is consistent with the simulation step length of the DP subsystem, performing iteration only once.
When the next interaction interval is entered, step ⑤~⑧ in fig. 2 a) is performed, as in step ①~④ in fig. 2 a).
For parallel time sequence simulation, in step S4, the EMT subsystem performs n single step length analyses, including generating an instantaneous value sequence through a hybrid simulation interface by the interaction quantity in the form of dynamic phasors output by the DP subsystem at the time t1, and then transmitting the instantaneous value sequence to the EMT subsystem. The EMT subsystem utilizes an instantaneous value sequence (expressed in the form of [ t 1-T,t1 ]), extracts a dynamic phasor value of the interaction quantity through an interface and transmits the dynamic phasor value to the DP subsystem. When the interaction time is over, the two subsystems need to transmit the interaction quantity to the interface calculation module to generate a corresponding form, and then the next stage is completed to be simulated, so that the two subsystems can be considered. The two processes of ' the interactive quantity in the form of the dynamic phasor output by the DP subsystem ' are carried out simultaneously by generating an instantaneous value sequence through a mixed simulation interface and then transmitting the instantaneous value sequence to the EMT subsystem ' and ' the EMT subsystem utilizes the instantaneous value sequence to extract the dynamic phasor value of the interactive quantity through the interface and transmit the dynamic phasor value to the DP subsystem '.
Specifically, in the case of adopting a parallel time-series processing method, the method includes:
Step 21, at time t1, the DP subsystem interaction volume dynamic phasor value < r D>k generates an instantaneous value sequence r D,n={rD,n(t),…rD,n (t+ (m-1) delta t) through a mixed simulation interface and then transmits the instantaneous value sequence r D,n={rD,n(t),…rD,n (t+ (m-1) delta t) to the EMT subsystem, and meanwhile, the EMT subsystem extracts the interaction volume dynamic phasor value < r E>k through the interface and transmits the interaction volume dynamic phasor value to the DP subsystem by utilizing the [ t 1-T,t1 ] time interval interaction volume instantaneous value sequence;
Step 22, the EMT subsystem and the DP subsystem respectively simulate and execute to the time T2 in step length delta T and delta T, and the DP subsystem updates the interaction volume instantaneous value sequence to [ T 2-T,t2 ].
Step ③~④ in fig. 2 b) corresponds to the next interaction interval, which is the same as the execution of step ①~② in fig. 2 b), and will not be described again.
It should be noted that in the serial timing simulation, the advanced DP subsystem of the EMT subsystem is described as an example, and the DP subsystem may be actually constructed in an advanced EMT subsystem manner. Because of inconsistent interaction time attributes, although serial and parallel time sequence simulation are independently solved for each subsystem, certain convergence difference still exists. Generally, the convergence of serial timing simulation is relatively high, and the hardware requirement of the simulation platform is low, but the calculation efficiency is far lower than that of parallel timing simulation.
In practical application of this embodiment, the following implementation procedure may also be adopted, including:
and 101, subsystem division. The direct current power system is classified into a detailed electromagnetic transient modeling subsystem (EMT subsystem) and a simplified dynamic phasor modeling subsystem (DP subsystem) according to the object attention.
And 102, constructing an EMT calculation module. And importing the established mathematical model program of the EMT subsystem into the FPGA 1.
And 103, constructing a DP calculation module. And importing the established DP subsystem mathematical model program into the FPGA cluster 2.
And 104, building an interface calculation module. According to the external characteristics of the EMT subsystem and the DP subsystem, an interface scheme is determined, and the FPGA3 is utilized to realize simulation time sequence selection and data interaction of the EMT calculation module and the DP calculation module.
Step 105, module initialization. The system comprises an EMT calculation module, a DP calculation module and an interface calculation module, wherein the initialization comprises an initial time t=t 0, an EMT subsystem simulation step length delta T, a DP subsystem simulation step length delta t=nΔt, a simulation total duration T, simulation time sequence (serial time sequence simulation and parallel time sequence simulation) determination, and EMT and DP calculation module system parameters.
Step 106, completing the single-step long simulation of the EMT subsystem n times and the single-step long simulation of the DP subsystem once. When the interaction time is reached, the interface computing module completes extraction, transformation and transmission of interaction data of the DP computing module and the EMT computing module.
And 107, judging whether the simulation is finished, if T is more than or equal to T, finishing the simulation, outputting a result, and otherwise, returning to the step 106.
If the invention is further described by referring to fig. 3 and 4, an EMT calculation module, a DP calculation module and an interface calculation module are built by using an FPGA to form a dynamic phasor-electromagnetic transient hybrid simulation platform, so that the hybrid simulation of the direct current power system is completed, and the efficiency and the accuracy of the simulation are balanced. The method is concretely realized as follows:
in step 201, taking the three-terminal VSC dc power system shown in fig. 3 as an example, the subsystem 1 formed by the converter station 1 and the dc network is an EMT subsystem, and the converter stations 2 and 3 including ac equivalent circuits are DP subsystems.
And 202, constructing an EMT calculation module. And importing the established mathematical model program of the EMT subsystem into the FPGA 1.
And 203, constructing a DP calculation module. Taking the DP subsystem main circuit of the VSC-containing converter station shown in fig. 1 as an example, when the switching function is introduced to describe the switching process, the general expression of the DP subsystem main circuit dynamic phasor model is as follows
Where p E { a, b, c } represents three phases, u sp is an ac side equivalent power supply, i sp is an ac side equivalent power supply phase currents, u dc is a dc side capacitor voltage, i dc is a dc side output current ,Sa=2sa/3-sb/3-sc/3,Sb=2tb/3-sa/3-sc/3,Sc=2sc/3-sa/3-sb/3,sp is a three-phase bridge arm switching function.
When only the dominant component of the dc power system is considered, the ac side state quantity is modeled using 1, 5, and 7 order dynamic phasors, the dc side state quantity is modeled using 0 and 6 order dynamic phasors, and equation (6) can be decomposed into:
wherein for a multi-variable constitution Can be obtained by < xy > k by dynamic phasor convolution property expansion, i.e.
In the formula,
And importing the established DP subsystem mathematical model program into the FPGA cluster 2.
Step 204, an interface calculation module is built, the constant voltage station shown in fig. 3 is a bus voltage control type interface, and a controlled voltage source is selected.
Step 205, inputting parameters of a system to be simulated, and setting initial simulation time t=0, simulation step length delta T of an EMT calculation module, simulation step length delta T of a DP calculation module and total simulation duration T.
Step 206, initializing interface module parameters, and determining that the system selects serial time sequence simulation or parallel time sequence simulation.
Step 207, updating t=t+deltat at the simulation time.
Step 208, the EMT calculation module completes n single step long simulations. After each simulation, no data interaction is performed, the dynamic phasor interaction value adopts the value of the first single-step long simulation, and other state quantity initial values are updated after each simulation.
In step 209, the DP calculation module completes one single step simulation.
Step 2010, judging whether the simulation is finished, if T < T, executing step 2011, otherwise executing step 2014.
In step 2011, the EMT calculation module and the DP calculation module transmit the interaction value at the moment t to the interface module.
Step 2012, the interface computing module analyzes the interactive data transmitted by the EMT subsystem to generate an instantaneous value and transmit the instantaneous value to the DP computing module, and analyzes the interactive data transmitted by the DP subsystem to extract a dynamic phase value and transmit the dynamic phase value to the EMT computing module.
Step 2013, after the states and control matrix of the EMT calculation module and the DP calculation module are updated, returning to step 206.
And 2014, outputting a result, and finishing the simulation.
The scheme of the embodiment can be applied to a platform for mixed simulation of Dynamic Phasors (DP) -electromagnetic transients (EMT) of a direct current power system, adopts dynamic phasor modeling to process non-concerned parts of the direct current power system to be simulated, ensures high simulation efficiency, adopts electromagnetic transients to process concerned parts of the direct current power system to be simulated, ensures simulation accuracy, and utilizes a plurality of groups of FPGA to realize interface data interaction and serial and parallel time sequence mixed simulation, thereby ensuring simulation efficiency. The existing electromagnetic transient simulation platform can be utilized to build a dynamic phasor-electromagnetic transient hybrid simulation heterogeneous platform, and the simulation precision and speed of the power system are balanced. The dynamic phasor-electromagnetic transient hybrid simulation has small hardware limit on simulation equipment, can realize the simulation of a large-scale alternating-current and direct-current system, and can flexibly realize the modification of a hybrid simulation interface mode, and the modification and the upgrade of the hybrid simulation.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are mutually referred to, i.e. each embodiment is different from other embodiments in emphasis. In particular, for the apparatus embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points. The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present invention should be included in the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.