Electromagnetic Transient Modeling Method of Photovoltaic Power Station Based on FPGA

The rapid development of renewable energy needs the effective support of simulation technology. Aiming at the shortage of both modeling scale and simulation accuracy of the current large-scale photovoltaic power station, an electromagnetic transient modeling and real-time simulation method suitable for large-scale photovoltaic power stations are proposed. The microsecond accurate real-time simulation of 24 photovoltaic power units is implemented on a single FPGA. Through an equivalent modeling method, the electromagnetic transient model of a photovoltaic power unit including a PV array, DC boost circuit, grid-connected inverter, filter, and grid-side transformer is established. Then, based on the FPGA parallel computing and pipeline time division multiplexing technology, the updating framework of the station collecting network and the power unit is constructed, and the real-time simulation model of the station including 24 photovoltaic power units in 4 sub-stations is built. Finally, the microsecond real-time simulation of the photovoltaic power station is realized through RTRES, a self-developed real-time simulator in China’s Southern Power Grid. The comparison with the detailed PSCAD model shows that the simulation error is within ± 2%, which verifies the correctness of the proposed method and model.

shock mechanism brought by the grid connection of renewable energy, and the stability analysis method of renewable energy power generation under different operation scenarios, electromagnetic transient simulation has become an essential key link.
The existing platforms and technologies have been mature for electromagnetic transient modeling and simulation of power electronic systems, but for the new power systems with renewable energy as the main body, the requirements of larger simulation scale and smaller simulation time-step proposed by the "double high" characteristics still cannot be fully satisfied [5][6][7].The solutions provided by commercial simulation software can be roughly divided into offline model multiplication and real-time hardware parallel.The former mainly uses a simple multiplication method to realize the modeling and simulation of large-scale renewable energy stations, which causes a loss of accuracy.The latter is mainly based on decoupling components such as transmission lines and hardware with parallel capability to realize the real-time simulation of renewable energy stations to a certain extent, but its simulation scale is significantly limited by hardware resources.
To solve the problem that it is difficult to balance the simulation scale, accuracy, and speed, this paper proposes an electromagnetic transient modeling and real-time simulation method suitable for photovoltaic power stations based on FPGA hardware.Firstly, through reasonable model segmentation and equivalent modeling method, the computational load was reduced under the premise of ensuring accuracy, Then, through pipelined hardware parallel technology based on FPGA, the simulation scale and simulation efficiency are greatly improved.Thus, the real-time simulation of photovoltaic stations with dozens of power units is realized.At the same time, this method has further scalability of scale.

2.MODEL OF PHOTOVOLTAIC POWER UNIT
At present, there are two kinds of structures for the basic power unit of photovoltaic power stations, which are single-stage structures and two-stage structures (also known as centralized structures and group string structures in engineering).Compared with the single-stage structure, the two-stage structure uses a DC boost circuit at the exit of the PV array, which not only solves the problem of low voltage grid connection of a single PV array, but also increases the dimension of system control, realizes more accurate maximum power point tracking, and improves the output power of a single PV array.Figure 1 shows the topology of a two-stage photovoltaic power unit [8], which includes discrete devices such as a photovoltaic array, a DC boost circuit, a grid-connected inverter, a filter, and a grid-side transformer to form an overall power electronic circuit for power transmission.This section establishes a simulation model for photovoltaic power units bounded by the generator terminal bus.

Photovoltaic Array
A photovoltaic array is composed of many photovoltaic cells in series and parallel, and its external characteristic equation is essentially an implicit transcendental equation.The corresponding model has been widely used in theoretical analysis and refined modeling [9][10][11].However, for real-time simulation, to reduce the amount of computation as much as possible, the implicit equation needs to be transformed into an explicit equation to avoid repeated iteration.According to the differences in conversion methods, ignoring conditions, and preserving model accuracy, many PV array models using explicit equations have been proposed [12][13][14][15].In this paper, the photovoltaic cell engineering model recognized by the mainstream is adopted.Based on the single-diode model, the calculation is simplified through curve fitting, which has a high simulation accuracy.The calculation logic can be described by Equation (1) [15]: The coefficients C 1 and C 2 are calculated from the V m , I m , P m of the maximum power point, the open circuit voltage V oc and the short circuit current I sc .

DC boost circuit
The DC boost circuit topology adopted in this paper is a single switch tube DC boost converter circuit, as shown in Figure 2 (a).According to the circuit composition, the modeling process can be divided into two parts: capacitor -inductor and IGBT-diode.While the former is discretized with trapezoidal integration, the latter can be regarded as a complementary switching group when the inductor current is not 0. In the simulation, the state switching of two switches can be realized only according to the onedimensional IGBT switch signal.Therefore, the equivalent model of the DC boost circuit as shown in Figure 2 (b) can be obtained by equating the IGBT-diode through the binary resistance method.

2.3Grid-connected inverter
As it is shown in Figure 3 (a), the grid-connected inverter in this paper adopts a two-level voltage source converter topology, which is composed of six anti-parallel diodes -IGBT switch groups.By defining a switching function to characterize the on-off state of each bridge arm, and introducing the on-resistance and the front on-off voltage of the switching device, the external characteristic equation with higher simulation accuracy can be obtained.
To save computing resources and improve simulation speed, appropriate simplification can be taken.It is assumed that the on-resistance of the diode and IGBT is the same, and the former wizard on-state voltage can be ignored.Thus, as shown in Figure 3 (b), the decoupling model of the two-level voltage source converter can be obtained, and its external characteristics can be described by Equation (2).

Filter and grid-side transformer
The filter is mainly composed of capacitors and inductors, and its adjoint and equivalent circuits can be obtained through the discretization of these energy storage elements.Similarly, as it is shown in Figure 4, for the T-type equivalent circuit of the single-phase transformer composed of inductors, the loop equation shown in Equation ( 3) can be written.
Through trapezoidal integration, the equivalent circuit of a single-phase transformer described in Equation ( 4) can be obtained, and its equivalent circuit diagram is shown in Figure 5.
The equivalent circuit of a three-phase transformer can be obtained by connecting three equivalent circuits of a single-phase transformer, according to its connection sets.According to the obtained topology structure, the voltage equation of the nodes is written down and divided into blocks according to the internal and external nodes.The short-circuit contraction is carried out by the fast-nesting method.Finally, the equivalent circuit of the three-phase transformer is obtained, which is a triangle structure connected by the conductance and current source groups end to end.

Model topology and calculation process
Figure 6 shows the topology model of a photovoltaic power station.Take a single photovoltaic power unit in a single photovoltaic power sub-station as an example, the network topology structure formed after it is connected to the power grid is shown in Figure 7.As it is shown in Figure 8, the overall simulation architecture can be divided into five steps, including control signal generation -internal node voltage updating -current source updating -network current source vector integration -network overall calculation.

……
(1) The control signal generation module is divided into branch switch signal control and PWM signal modulation of each photovoltaic power unit.The former generates switch signals according to the grid-connected time sequence, while the latter compares the incoming modulated wave with the FPGA built-in carrier to generate trigger signals of the grid-connected inverter and store them.
(2) Network internal node voltage updating module is mainly aimed at the internal nodes eliminated by the fast-nesting method.That is, after the overall calculation of the equivalent circuit network of the previous time-step is completed, the internal node information that has been eliminated can be quickly updated by the reverse solution.
(3) The current source updating module is the core module to expand the simulation scale and efficiency, which will be detailed in Section 3.2.
(4) Network current source vector integration: Update values of each part of the current source completed by modules will be merged in this time-step. (

Current source updating module
For the above simulation architecture, the specific process of current source updating, its core link, is shown in Figure 9.The topology structure of the photovoltaic power station is disassembled to form two parts of the independent photovoltaic power unit system and its external network.(1) The external network is mainly composed of lines, transformers, and sources, and its equivalent circuit can be represented by a combination of resistance, inductor, and capacitor.Take the line as an example, its equivalent circuit is shown in Figure 10.Using the set bus model, the obtained LR point voltage after EMT calculation under the previous time-step is denoted as L V and R V .As shown in Equation ( 5), after discretization of capacitance and inductance, the updating equations for the current sources, which exist between L point and R point and from L/R points to the ground, between LR are obtained.
(2) For the photovoltaic power unit, when there are a large number of units, the complete parallel programming of FPGA will consume too many resources.Considering that the photovoltaic power unit is a relatively independent part of the overall network topology structure, and the internal topology and calculation process of each unit is the same, the pipeline scheme (time for space) can be used to realize the serial equivalent current source updating of multiple photovoltaic power units.That is, the same calculation process is assigned to each unit, and only the external input of each unit is changed Its calculation process is shown on the right in Figure 9. FPGA t is the calculation time-step of FPGA.
Assuming that the calculation time of each photovoltaic power unit is m FPGA t (m≥n), then the temperature and irradiance of multiple units can be input into the solving module successively

4.PARAMETER DESIGN AND SIMULATION VERIFICATION OF THE SIMULATION SYSTEM
Based on the modeling method and the topology model shown in Figure 6, a real-time simulation example of a photovoltaic power station was established based on FPGA.The input time interval of photovoltaic power units in each sub-station was 0.16 s.When all the units of the four sub-stations are put into the grid in parallel, the overall grid connection of 24 photovoltaic power units can be realized.

Parameter design
(1) Parameter design of photovoltaic power unit Every 6 photovoltaic power units are connected in parallel to form a photovoltaic power sub-station.The main parameters of the photovoltaic power unit are shown in Table 1.(3) Parameter design of the control system Establish the control system.As it is an open-loop control, the input parameters shown in Table 3 are directly input: Table 3 Parameters of the control system Reference value of d-axis current (p.u.) 1.101 Reference value of q-axis current (p.u.) 0.5 Duty ratio of DC boost circuit (p.u.) 0.375

Simulation verification
To verify the correctness of the above model, the simulation results were compared with those based on the detailed model in PSCAD.The ZYNQ-MZ7100FA development board is shown in Figure 11, where the FPGA board is XC7Z100-2FFG900I, with 444K Logic Cells and 2020 DSP slices.Figure 13 Active power for the grid connection point of the photovoltaic power station In addition, to verify the extensibility of the scheme, the simulation scale comparison between the pipeline-using scheme and the non-using scheme under different simulation time-step is studied.The conclusions are detailed in Chapter 5.

5.CONCLUSION
Electromagnetic transient simulation analysis plays an important role in studying electromagnetic transient operation characteristics, stability analysis methods, and control and protection strategies of new power systems.Aiming at the problems of low precision of multiplication model and low efficiency of fine model faced by commercial software simulation schemes, this paper proposes an electromagnetic transient modeling level real-time simulation method of photovoltaic power station based on FPGA and realizes grid-connected operation of photovoltaic power station with 24 power units.The simulation results show that: (1) Compared with the simulation results based on the detailed model of PSCAD, the steady-state error of the time-domain simulation results of the photovoltaic power station model proposed in this paper is controlled within ± 2%.
(2) Using one FPGA board to realize the real-time simulation modeling of the whole grid-connected 24 photovoltaic power units, greatly reduces the consumption of simulation computing resources and improves the simulation efficiency while ensuring the simulation accuracy.
(3) This method is specifically extensible.Studies show that taking a photovoltaic power station as an example, adding a power unit only increases 1 delay (about 5 ns, 200 MHz), and adding a substation/branch only increases 3 delays, which makes it possible to realize the fine real-time simulation of large-scale renewable energy systems containing hundreds of power units, and provides simulation algorithm support for the development of domestic real-time simulation platform and the construction of renewable energy projects.
In summary, the electromagnetic transient modeling method and photovoltaic power station model proposed in this paper can accurately simulate the grid-connecting process of multiple photovoltaic power units at the same time while reducing simulation resource consumption and improving efficiency, saving computing equipment and reducing costs on the premise of not sacrificing simulation accuracy.

Figure 1
photovoltaic array

Figure 2
Figure 2 DC boost circuit

4 Figure 3
Figure 3 Two-level voltage source converter

Figure 4 T
Figure 4 T-type equivalent circuit of the single-phase transformer

Figure 5
Figure 5 Discrete equivalent circuit of a single-phase transformer

Figure 7
Photovoltaic power Unit 6

Figure 8
Figure 8 Simulation architecture process

Figure 9
Figure 9 Current source updating process

Figure 11 Figure 12
Figure 11 Structure of the simulation system The simulation collected the port voltage port V and the port current port I of the photovoltaic power

Table 1
Parameters of a photovoltaic power unit Parameter design of external networkThe six sub-stations are connected to the power grid through a transformer after they are connected in parallel.The parameters of the step-up transformer and transmission line are shown in

Table 2 .
Table 2 Parameters of the step-up transformer and transmission line