A semi-physical simulation method for single-phase photovoltaic grid-connected inverter based on FPGA
Through the semi-physical simulation method based on FPGA, the main circuit model of the grid-connected inverter is established and real-time simulation is carried out, which solves the problems of expensive hardware and closed model libraries in the existing technology, and realizes efficient and flexible simulation and performance analysis of new energy grid-connected inverter.
Patent Information
- Application Number
- CN202310221502.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-08
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2043-03-08
AI Technical Summary
The existing semi-physical simulation methods are based on expensive hardware platforms and closed model libraries, which are difficult to meet the needs of efficient experimental verification and performance analysis of new energy grid-connected inverters.
Using the semi-physical simulation method based on FPGA, the main circuit model of the grid-connected inverter is established, and the NI LabVIEW software is used for graphical programming, and the simulation model is downloaded to the general FPGA development board to realize real-time simulation and performance analysis.
Real-time adjustment and performance analysis of grid-connected inverters are realized, the cost of simulation system is reduced, the efficiency and flexibility of experimental verification are improved, and the efficient simulation needs of new energy grid-connected inverters are met.
Smart Images

Figure CN116205179B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of new energy control, and in particular is a semi-physical simulation method of a single-phase photovoltaic grid-connected inverter based on FPGA. Background Art
[0002] The current power system is mainly based on centralized power generation. With the widespread access to new energy, the grid structure will undergo significant changes and gradually evolve into a distributed power generation structure. The output device of the photovoltaic grid-connected system is the grid-connected inverter. The grid-connected inverter is the core component and technical key of the photovoltaic grid-connected power generation system. It converts the direct current emitted by the photovoltaic array into the same alternating current as the power grid. As the core carrier of new energy grid connection, the inverter undertakes multiple responsibilities such as power quality management, operating status monitoring and switching, and power distribution. Its control performance determines the success or failure of new energy grid connection. However, due to the use of high-order LCL filters, the intermittent nature of new energy itself, and the weak grid characteristics caused by the large-scale grid connection of new energy, the control difficulty of the inverter is increasing. Therefore, the semi-physical simulation system for new energy grid connection application scenarios has become a competitive research topic at home and abroad.
[0003] With the help of the new energy grid-connected semi-physical simulation system, it is very convenient to quickly verify the new inverter control algorithm, while also being safe and repeatable, which can significantly improve the research and development efficiency and reliability of the new energy grid-connected system. However, most of the existing semi-physical simulation methods are based on MATLAB's model library, and need to be bound to hardware products when used, such as the semi-physical simulation systems produced by OPAL-RT, RTDS and other companies. However, the given model library has the problem of low openness of the model itself, and the price of hardware products is very expensive, ranging from hundreds of thousands to hundreds of thousands of yuan. Summary of the invention
[0004] The purpose of the present invention is to address the deficiencies in the current semi-physical simulation technology and propose a semi-physical simulation method for a single-phase photovoltaic grid-connected inverter based on FPGA. According to the physical circuit model of the simulated object, its mathematical equations are solved, and a main circuit simulation model of the grid-connected inverter is established using the graphical programming language of NI LabVIEW software; then the simulation model is downloaded to an FPGA development board, and the actual grid-connected inverter operation process is restored using the clock module and logic resources of the FPGA, thereby realizing real-time adjustment and performance analysis of the grid-connected inverter.
[0005] The technical solution of the present invention to solve the technical problem is: designing a semi-physical simulation method of a single-phase photovoltaic grid-connected inverter based on FPGA, the method comprising the following steps:
[0006] Step (1): Establish the main circuit model of the grid-connected inverter
[0007] According to the main circuit structure of the selected grid-connected inverter, the mathematical model of its main circuit is constructed based on the two major laws of Ohm's law and Kirchhoff's law in circuit science, that is, the circuit equation group is written according to the voltage and current relationship satisfied by the branches where the capacitors and inductors in the circuit are located.
[0008] Step (2): Derivation of the state-space equations
[0009] Select the inductor current on the grid-connected inverter side as i L , the grid-connected current on the grid-connected side is i G , capacitor voltage v C The continuous differential form of the circuit equations in step (1) is discretized as state variables, and the continuous circuit equations about the time variable t are converted into difference equations based on the forward Euler method to obtain a state space equation group about the three state variables.
[0010] Step (3): Simulation model establishment
[0011] In the simulation computer, according to the state space equations derived in step (2), a simulation model of the main circuit of the grid-connected inverter is established using the NI LabVIEW graphical programming language.
[0012] Step (4): Semi-physical simulation calculation
[0013] Download the simulation model of the main circuit of the grid-connected inverter established in step (3) to the general FPGA development board. Determine V according to the structure of the main circuit of the grid-connected inverter DC With v inv The theoretical relationship of the state space equations is established, and the "selection" logic is used to realize this relationship. The timing loop period is set by using the clock module of the FPGA, and the initial values of the parameters in the state space equations are given. The parallel high-speed computing function of the FPGA is used in conjunction with the clock module. According to the mathematical relationship between the state variables given by the equations, at each simulation time step, the state variables of the current simulation time step are solved by the known state variables of the previous simulation time step; at the same time, the state variable values are output at each simulation time step, and these state variables are digitally simulated and output in real time, and input to the real controller for analysis and processing. The real controller outputs a PWM signal. The PWM signal is input into the simulation model of the main circuit of the grid-connected inverter in the FPGA through the digital input / output module, and the simulation solution of the next switching cycle is carried out, and the cycle is continuously repeated to realize the semi-physical simulation of the photovoltaic grid-connected system.
[0014] Compared with the prior art, the present invention has the following beneficial effects:
[0015] 1. Model the main circuit of the grid-connected inverter and implement FPGA-based semi-physical simulation of the grid-connected inverter to meet the current needs of experimental verification of the grid-connected inverter.
[0016] 2. This modeling method is open and flexible, and the solution method of the simulation model can be customized according to the purpose of the experiment or the simulation accuracy requirements.
[0017] 3. This modeling method is simple and easy, and can use graphical programming methods to solve the model. It does not require complex text programming languages, which greatly improves program development efficiency.
[0018] 4. This modeling method can be used to implement semi-physical simulation on general FPGA development boards. Compared with commercial semi-physical simulation platforms, the cost is greatly reduced under the same performance conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 The present invention is a circuit diagram of a grid-connected inverter according to an embodiment of a semi-physical simulation method of a single-phase photovoltaic grid-connected inverter based on FPGA.
[0020] Figure 2 The present invention discloses a simulation model of a main circuit of a grid-connected inverter of an embodiment of a semi-physical simulation method of a single-phase photovoltaic grid-connected inverter based on FPGA.
[0021] Figure 3 The waveform diagram of the grid-connected current on the grid-connected side during the implementation process of an embodiment of a semi-physical simulation method for a single-phase photovoltaic grid-connected inverter based on FPGA of the present invention. DETAILED DESCRIPTION
[0022] The technical solution of the present invention is described in detail below with reference to the accompanying drawings.
[0023] In this embodiment, a simulation model is established with a main circuit of a grid-connected inverter in a single-phase photovoltaic grid-connected system as an object.
[0024] The present invention provides a semi-physical simulation method of a single-phase photovoltaic grid-connected inverter based on FPGA, the method comprising the following steps:
[0025] (1) Establish the main circuit model of the grid-connected inverter
[0026] The main circuit of the grid-connected inverter of this embodiment adopts a relatively common single-phase full-bridge inverter circuit, and the filter is an LCL filter. The inverter module of the main circuit of the grid-connected inverter adopts a single-phase full-bridge inverter circuit, such as Figure 1 As shown in the figure, Q 1 ~Q 4 There are four fully controlled power switch devices, V DC is the DC voltage output from the front photovoltaic module to the inverter, v inv is the output voltage of the single-phase full-bridge inverter circuit, and the inductor L 1 , capacitor C and inductor L 2Construct an LCL filter, v G is the grid voltage, R 1 and R 2 is the equivalent resistance. Now let the inductor current on the inverter side be i L , the grid-connected current on the grid-connected side is i G , the voltage of capacitor C is v C Let S 1 ~S 4 Q is the switching device 1 ~Q 4 The switching function of the switching device Q x When conducting, S x =1, when the switching device Q x When turned off, S x = 0. Therefore, when Q 1 and Q 4 At the same time, S 1 =S 4 =1, v inv =V DC ; When the switch tube Q 2 and Q 3 At the same time, S 1 =S 4 =0, v inv =-V DC .
[0027] The main circuit of the grid-connected inverter contains an inductor L 1 , capacitor C and inductor L 2 Three energy storage elements, according to Ohm's law and Kirchhoff's voltage and current law in circuit science, establish the main circuit model of the grid-connected inverter, and then establish three circuit equations. First, write the first two equations according to Ohm's law and Kirchhoff's voltage law, and then write the third equation according to Ohm's law and Kirchhoff's current law, and establish the main circuit model of the grid-connected inverter as follows:
[0028]
[0029] (2) Derivation of state-space equations
[0030] The state space equations are a set that includes the input, output and state variables of the system, and expresses them as first-order differential equations. First, select the state variables and take the memory i of the energy storage element. L 、i G and v C As the state variable; the three circuit equations listed in step (1) are sorted as follows:
[0031]
[0032] Since FPGA is a digital signal processing method, the continuous differential form di in the equation needs to be L (t) / dt, di G (t) / dt and dv C (t) / dt is discretized, that is, {i L [(n+1)T]–i L (nT)}、{i G [(n+1)T]–i G (nT)} and {v C [(n+1)T]–v C (nT)} respectively replace di L 、di G and dv C , where T is the simulation step size of the main circuit model of the grid-connected inverter. Let X = L, G, the same below, we can get i X [(n+1)T] about i X (nT) equation and v C [(n+1)T] about v C The equation for (nT) is as follows:
[0033]
[0034] Through this step, the continuous circuit equation about the time variable t is transformed into a forward difference equation. The forward Euler method is used here, and the simulation step size is small enough, so this method can not only ensure sufficiently high accuracy, but also has a small amount of calculation. Written in the form of a state space equation group:
[0035]
[0036] (3) Simulation model establishment
[0037] In the simulation computer, according to the state space equations derived in step (2), the simulation model of the main circuit of the grid-connected inverter is established using the NI LabVIEW graphical programming language, as shown in Figure 2 shown.
[0038] (4) State variable output
[0039] Download the simulation model of the main circuit of the grid-connected inverter established in step (3) to the general FPGA development board. According to the above state-space equations, it can be seen that the value of each state variable in the current simulation time step needs to be solved by the value of each state variable in the previous simulation time step. For a semi-physical simulation system, model solving needs to take real-time into consideration. Therefore, the calculation of the value of each state variable in each simulation time step must be controlled within one simulation step, and the clock module of the FPGA can complete this task in conjunction with logic resources. The calculation result of the previous simulation time step can be stored in a shift register, and after a certain amount of basic operations, the result continues to be stored and used for solving the next simulation time step. Therefore, the above process realizes the function of a timing loop, and the calculation content in the timing loop is cyclically calculated with a certain period. At the same time, the cycle period of the timing loop can be set by itself, that is, the simulation step length. In this implementation case, the simulation step length is set to 1 / (10MHz). Given the initial values of the parameters in the state-space equation, V DC =400V, L 1 =1.5mH, R 1 =0.5Ω, C = 15μF, L 2 =0.5mH, R 2 =0.5Ω, and according to the mathematical relationship between the state variables given by the equation, at each simulation time step, the known i X (nT), v C (nT), solve for i X [(n+1)T]、v C [(n+1)T]. In addition, according to the structure of the main circuit of the grid-connected inverter, V DC With v inv The theoretical relationship is: when S 1 =S 4 =1,v inv =V DC , when S 1 =S 4 =0, v inv =-V DC , use "select" logic to implement this relationship.
[0040] Through the solution of the above method, the clock module and logic resources of FPGA are used to realize i L 、i G and v C The above method realizes the parallel solution of three state variables, avoids the simplification and calculation of matrices in the traditional state equation method, and does not require additional matrix algorithms, which greatly improves the efficiency of program development.
[0041] The grid-connected inverter main circuit simulation model is associated with the external real controller. The control loop of the real controller is i L -v C -i G The three-loop control method (the left side is the inner loop and the right side is the outer loop) is DB-DB-PI. Figure 1 As shown in the figure, PLL represents a phase-locked loop, which realizes the phase and frequency tracking of the output signal to the input signal, that is, the output and the input have the same frequency and phase; DB-DB-PI is a special three-loop control structure of the grid-connected inverter, that is, the inner loop and the middle loop adopt DB control mode, and the outer loop adopts PI control mode, DB means dead-beat control, and PI means proportional integral control.
[0042] The state variable i of the main circuit simulation model of the grid-connected inverter calculated in FPGA is L 、i G and v C The real controller outputs PWM (pulse width modulation) signals through the digital input / output (DIO) module and then inputs them into the grid-connected inverter main circuit simulation model in the FPGA for simulation solution at the next simulation time step. Therefore, the real controller and the grid-connected inverter main circuit simulation system in the FPGA form a complete semi-physical simulation system. The operation process of the semi-physical simulation system is as follows: Figure 3 As shown, the light-colored waveform in the figure is the grid-connected current i G The dark waveform is the grid-connected current reference value i G REF The waveform diagram shows that the phases of the two waveforms in the figure are consistent, and the grid-connected current is synchronized with its reference value to achieve the expected effect. Therefore, this modeling method can realize the semi-physical simulation of single-phase grid-connected inverter based on FPGA. For single-phase photovoltaic grid-connected inverters, there are many hardware options for controllers, including but not limited to DSP controllers and FPGA controllers; the software selection of the controller, that is, the control strategy, can be divided into single-loop control, dual-loop control and three-loop control according to the number of controlled quantities, all of which can realize the control of grid-connected inverters.
[0043] Any matters not described in the present invention are applicable to the prior art.
Claims
1. A semi-physical simulation method of a single-phase photovoltaic grid-connected inverter based on FPGA, characterized in that: The method comprises the following steps: Step (1): Establish the main circuit model of the grid-connected inverter According to the main circuit structure of the selected grid-connected inverter, the mathematical model of its main circuit is constructed based on the two major laws of Ohm's law and Kirchhoff's law in circuit science, that is, the circuit equation group is written according to the voltage and current relationship satisfied by the branches where the capacitors and inductors in the circuit are located; Step (2): Derivation of the state-space equations Select the inductor current on the grid-connected inverter side as i L , the grid-connected current on the grid-connected side is i G , capacitor voltage v C is a state variable, discretizes the continuous differential form of the circuit equation group in step (1), transforms the continuous circuit equation about the time variable t into a difference equation based on the forward Euler method, and obtains a state space equation group about the three state variables; Step (3): Simulation model establishment In the simulation computer, according to the state space equation group derived in step (2), a simulation model of the main circuit of the grid-connected inverter is established using the NILabVIEW graphical programming language; Step (4): Semi-physical simulation calculation Downloading the simulation model of the main circuit of the grid-connected inverter established in step (3) to a general FPGA development board; V is determined by the structure of the main circuit of the grid-connected inverter DC With v inv Theoretical relationship of the state space equations and the "selection" logic are used to realize this relationship; the timing loop period is set by using the clock module of the FPGA, the initial values of the parameters in the state space equations are given, and the parallel high-speed computing function of the FPGA is used in conjunction with the clock module. According to the mathematical relationship between the state variables given by the equations, at each simulation time step, the state variables of the current simulation time step are solved by the known state variables of the previous simulation time step; at the same time, the state variable values are output at each simulation time step, and these state variables are digitally simulated and output in real time, and input into the real controller for analysis and processing, and the real controller outputs a PWM signal; the PWM signal is input into the grid-connected inverter main circuit simulation model in the FPGA through the digital input / output module, and the simulation solution is performed for the next simulation time step, and the cycle is repeated continuously to realize the semi-physical simulation of the photovoltaic grid-connected system.
2. The semi-physical simulation method of a single-phase photovoltaic grid-connected inverter based on FPGA according to claim 1, characterized in that: The inverter module of the main circuit of the grid-connected inverter adopts a single-phase full-bridge inverter circuit, and the filter is an LCL filter.
Citation Information
Patent Citations
FPGA-based simulation system and method
CN105302956A
Vector-finite-element parallel solving simulation method based on LabVIEW and FPGA
CN107480323A