Modeling and Control Parameters Design for Grid-Connected Inverter System Considering the Effect of PLL and Grid Impedance

Small-signal stability problems often occur when the inverter for renewable energy generation is connected to weak grid. A small-signal transfer function integrated model reflecting the interaction of grid impedance, phase locked-loop (PLL), and current control loop is established in this paper. Based on the established model, the oscillation mechanism of the grid-connected inverter system is revealed: the inductance current flowing through the grid impedance can produce a voltage disturbance, which will eventually affect the inductance current through PLL and current control loop. Therefore, the loop composed of the grid impedance and PLL can easily lead to the oscillation of the grid-connected inverter system under weak grid condition. To suppress the oscillation, a control parameters design method of the grid-connected inverter is proposed. Without changing the control method, the proposed control parameters design method can ensure the stable operation of the grid-connected inverter system under the very weak grid condition when the short-circuit ratio (SCR) is 2. Finally, the experimental results verify the correctness of the stability analysis and the effectiveness of the control parameters design method proposed in this paper.


I. INTRODUCTION
Renewable energy generation has been developed rapidly in response to the crisis of energy shortage and increased environmental pollution [1]. However, the capacity of power electronic device is increasing with the development of renewable energy generation [2]. The grid-connected power electronic devices affect the operation characteristics of the grid and weaken the grid [3]. Thus the small-signal stability problems occur one after another when inverters are connected to the weak grid [4], [5], which seriously threatens the safe and stable operation of the grid.
It is well known that there are three main methods to analyze the small-signal stability of the grid-connected inverter: impedance-based method [6], state-space method [7], and traditional transfer function method [8]. The impedance-based The associate editor coordinating the review of this manuscript and approving it for publication was Giambattista Gruosso . method is to divide the interconnected systems into two independent subsystems and establish the impedance models of the two subsystems, which reduces the complexity of system modeling. Then, the system stability is analyzed based on the impedance stability criterion. However, because of the existence of the coupling impedance [9], [10], the stability analysis based on impedance model becomes complicated [11]. The state-space method establishes the state-space model of the system, and then judges the stability of the system by the characteristic equation [12]. This method enables to identify the influence of each component on the system stability. The traditional transfer function method is widely used in control parameters design and system stability analysis [13]. It is the most basic and important method in classical control theory because of its simplicity and the ability to clearly reveal the interaction between various components in the system [14].
In order to improve the stability and suppress oscillation of the grid-connected inverter system, there are also three main methods: parameters design method [15], improved control strategy [16], and additional special equipment [17]. The parameters design method is the simplest and easiest oscillation suppression method to implement. By designing the parameters, the method can enhance the system stability without changing the control structure of grid-connected inverters or increasing additional equipment. At present, many parameters design methods are proposed. A tuning approach guided by the eigenvalue parametric sensitivities is proposed to enhance the system stability in [18]. Taking pulsewidth modulation transport and controller sampling delays into account, an analytical method is presented to determine the best possible gains in [19]. To obtain the stable regions, the stability analysis methods can be repetitively applied for all the parameters [20]. What's more, a novel parameters design method of dual-loop control strategy for grid-connected inverters is proposed in [21]. However, the above studies do not consider the impact of grid impedance, nor do they involve the interaction between weak grid, PLL, and internal loop control. It is pointed out in [22] that the grid impedance varies widely and the fluctuating grid impedance will have adverse effects on the system stability. The parameters design method which regards the grid impedance as zero is no longer applicable to grid-connected inverters under weak grid condition. At the same time, the larger the grid impedance is (the weaker the grid is), the more difficult the control parameters design of inverters is. Considering the influence of weak grid, an idea reducing PLL bandwidth to improve system stability is proposed [23]. In the further research, an adaptive control parameters adjustment method based on on-line measurement of the grid impedance is proposed [24]. But it is difficult to realize the real-time measurement of the grid impedance. The design method of current control loop parameters has not been given in the above studies [22]- [24]. These existing studies on the design of control parameters under weak grid condition is either simply optimized parameters for current control loop [19]- [21], or only designed PLL parameters [23]- [25]. There is no research on the design method of control parameters including current control loop and PLL under weak grid condition.
To address the above issues, a control parameters design method of the grid-connected inverter considering the interaction between PLL and current loop under weak grid condition is proposed in this paper. By changing the control parameters of the grid-connected inverter, the stable operation of the system under weak grid condition can be guaranteed. Firstly, considering the influence of grid impedance and PLL, a small-signal transfer function integrated model of current control loop is established, and the interaction mechanism between PLL and current loop is analyzed in section II. In section III, a control parameters design method is proposed to determine the parameters of current control loop and PLL based on the established small-signal transfer function integrated model. Then, an experimental platform is built to verify the correctness of the proposed parameters optimization method in section IV. Finally, some conclusions are obtained in section V.

II. MODELING AND ANALYSIS OF THE GRID-CONNECTED INVERTER SYSTEM
A. THE GRID-CONNECTED INVERTER SYSTEM Fig. 1 shows the topology and control of a typical gridconnected inverter system. C dc is DC-side capacitor. v dc is DC-side voltage of inverter, which can be considered as a constant. e a , e b and e c are mid-point voltages of inverter bridge leg; v a , v b and v c are point of common coupling (PCC) voltages. i a , i b and i c are inductance currents of inverter; i ga , i gb and i gc are grid-connected currents of inverter. i ca , i cb and i cc are filter capacitor currents. L g and R g are the equivalent inductance and resistance of grid, respectively. C f and R d are filter capacitor and its damping resistance, respectively. L f and R f are filter inductance and its equivalent resistance, respectively. c a , c b and c c are the modulation signals. i cf * d and i cf * q are the d-axis and q-axis components of the reference inductance current in the control frame, respectively. Subscripts ''d'' and ''q'' represent the d-axis components and the q-axis components, respectively, and the superscript ''cf'' represents the variable in the control frame. The control equations are shown in (1). G i (s) is the PI controller of current control loop. G i (s) = k p_i + k i_i /s; K d = ω 1 L f /K pwm ; K f = 1/K pwm ; K pwm = v dc /2; ω 1 is the fundamental angular frequency of the grid.
θ PLL is the output of PLL. Its expression [9] can be obtained from Fig. 1.

B. SMALL-SIGNAL TRANSFER FUNCTION INTEGRATED MODEL
As can be seen from Fig. 1, the mathematical model of the main circuit can be derived as According to Kirchhoff's current law, we can obtain the equations where Because of the small-disturbance in the output phase angle of PLL, there exists a deviation θ PLL between the control frame and the system frame, as shown in Fig. 2 [9]. Therefore, the transformations between the control frame and the system frame are defined as where the variable x can represent the PCC voltage v, the inductance current of inverter i and the modulation signal c. e d and e q can be expressed as where the delay transfer fuction G del (s) is 1/(1.5T s s+1), sampling period T s is 5×10 −5 s. The grid-connected inverter system is a nonlinear system. In order to study the stability of the grid-connected inverter system, it is necessary to linearize it. The prefix sign '' '' denotes the small-disturbance of variables, and the subscript ''0'' denotes the steady state of variables. Combing (1), (4), (8) and (10), in addition, the variables are substituted by the form of x = x 0 + x and x 0 are eliminated, we can derive the linearized closed-loop expression of current control loop which considering the effect of PLL as Since G del (s)−1 ≈ 0, the term containing (G del (s)−1) can be ignored. Equation (11) can be simplified as Grid impedance and PLL can affect the stability of the gridconnected inverter system. In order to explore the interaction mechanism between grid impedance, PLL, and current control loop, a small-signal transfer function integrated model of current control loop considering the effect of grid impedance and PLL is established.
From (9), we can get the relationship in (13).
In order to obtain the small-signal transfer function integrated model, the variables in (2), (3), (5), (6) and (13) ignored the quadratic term and eliminated x 0 , are expressed in the form of Combining (14), (15) and (16), we can establish the relationships between the d-axis, q-axis small-disturbance components of PCC voltage v d , v q and the d-axis, q-axis where Substituting (18) into (17), the expression of the relationship between θ PLL , i d , and i q can be obtained as where We can derive the small-signal transfer function integrated model of current control loop between the reference inductance current and inductance current as where

C. INTERACTION BETWEEN PLL AND CURRENT CONTROL LOOP UNDER WEAK GRID CONDITION
According to (12), (17), and (18), the small-signal transfer function integrated model of current control loop considering the effect of grid impedance and PLL can be obtained, as shown in Fig. 3. It can be seen that the voltage disturbance will occur when the inductance current passes through the grid impedance. The voltage disturbance affects the output of the current control loop through PLL, and finally acts on the inductance current. The loop composed by grid impedance and PLL easily lead to the oscillation of the grid-connected inverter system under weak grid condition. When the grid can be regarded as stiff grid, L g ≈ 0 mH, R g ≈ 0 . Therefore, (23) can be simplified as Under this condition, the PLL does not affect the output of the current control loop. The d-axis component of the reference inductance current only affects active current control loop. The q-axis component of the reference inductance current only affects reactive current control loop. Therefore, the control parameters without considering the influence of grid impedance can meet the stability requirements of the system under stiff grid condition. When the grid is weak, the influence of L g and R g cannot be neglected. Grid impedance and PLL affect current control loop together, which will have a negative impact on the stability of the gridconnected inverter system. In general, the grid-connected inverter for renewable energy generation only generates active power. Therefore, this paper only discusses the case that the reactive power reference value of the inverters i cf * q0 is 0 A. According to Fig. 3, it can be seen that the grid impedance, PLL, and i cf * d0 have an impact on the reactive current control loop. The control parameters without considering VOLUME 8, 2020 this impact are difficult to meet the grid-connected inverter system stability requirements under weak grid condition.

III. CONTROL PARAMETERS DESIGN METHOD OF THE GRID-CONNECTED INVERTER A. PARAMETERS DESIGN OF CURRENT CONTROL LOOP
Because the active and reactive current control loops of the grid-connected inverters are symmetrical, the active current control loop and the reactive current control loop choose the same PI parameters. Because of i cf * q0 = 0 A, grid impedance and PLL do not affect the active current control loop. The parameters of the active current control loop are easy to be designed. When designing the parameters of the grid-connected inverter, the PI parameters of active current control loop can be designed first.
From Fig. 3, the open-loop transfer function of the active current control loop before adding G i (s) can be obtained as G OP (s) has two open-loop poles, and the corner frequencies of the amplitude-frequency characteristics are 0.5 Hz and 2122 Hz.
There is a relationship between G OP (s) and G i (s) in crossover frequency ω c : Usually, the zero of the PI controller of the current control loop is designed at the dominant pole 0.5 Hz of G OP (s), thus Combining (27) and (28), k i_i can be obtained as The crossover frequency ω c should be less than 1/10 of the inverter switching frequency. The PI parameters can be obtained under the parameters in Table 1.
The slope of G i (s) at the crossover frequency is 0 dB/dec. After adding G i (s), the amplitude-frequency characteristic curve of the open-loop transfer function of the active current control loop will pass through the 0 dB at −20 dB/dec. Thus, it can satisfy the phase margin requirement of the grid-connected inverter system.
Bode plot of the open-loop transfer function without PI controller is shown in Fig. 4 (a). It can be seen from the diagram that the gain margin (GM) of the system is infinite and the phase margin (PM) is 19 • . Under this condition, the PM is very small and the system is prone to instability   Fig. 4 (b). It can be seen that the GM of the system is infinite and the PM is 59 • . When GM is greater than unity, the GM can meet the system stability requirement [14]. Compared with the system without PI controller, the PM of the system is increased by 40 • . After adding the PI controller, the stability margin of the system is greatly improved.
Generally, a suitable value for PM is between 30 • and 60 • [14]. The target for PM is increasing the PM to the range between 30 • and 60 • . The PM is 59 • with PI controller, thus the PM of the system with PI controller is suitable.

B. PARAMETERS DESIGN OF PLL
Because the grid impedance affects the reactive current control loop through PLL, PLL parameters can be designed according to the stability of reactive current control loop.

1) INFLUENCE OF ACTIVE POWER
According to the above analysis, the i cf * d0 contained in the active power P s , is closely related to PLL parameters design and system stability. The PLL parameters derived from [25], k p_PLL = 1.963, k i_PLL = 299.1989. While L g = 15.4 mH, the stability of reactive current control loop when P s changes from 0.2 pu to 1 pu is discussed. The open-loop transfer function of the reactive current control loop G OQ (s) shown in (31) is obtained from Fig. 3. Under the parameters set in Table 1, G OQ (s) has no right half-plane poles.
The Nyquist diagram of G OQ (s) with P s changing from 0.2 pu to 1 pu is shown in Fig. 5. It can be seen from Table 2 that the greater the P s is, the smaller the gain margin is, and the worse the stability of reactive current control loop has. When P s = 0.8 pu and P s = 1 pu, Nyquist curves surround the point (−1, j0) and the gain margin is smaller than 1. Thus the inverter is unstable. In order to ensure the stable operation of the grid-connected inverter system under different active power output conditions, P s = 1 pu is chosen when designing the PLL parameters.

2) INFLUENCE OF THE GRID IMPEDANCE
Taking the same PLL parameters as above, and P s = 1 pu, the influence of grid impedance on the stability of the reactive current control loop is discussed. SCR is often used to analyze the relative strength of AC grid when power electronic device (such as photovoltaic) is fed into AC system. This paper considers stiff grid SCR = 11.6, weak grid SCR = 6, SCR = 3, SCR = 2.5, very weak grid SCR = 2 to analyze the stability of reactive current control loop.
The Nyquist diagram of G OQ (s) with the changing grid condition is shown in Fig. 6. It can be seen from Table 3 that the weaker the grid is, the smaller the gain margin is, and the worse the stability of reactive current control loop has. When SCR = 3, SCR = 2.5 or SCR = 2, Nyquist curves surround the point (−1, j0) and the system gain margin is smaller than 1. Thus the inverter is unstable. The stability of reactive current control loop is the worst when SCR = 2. In order to ensure the stable operation of the grid-connected inverter system under different grid conditions, very weak grid condition (SCR = 2) is taken into consideration when designing the PLL parameters.

3) PARAMETERS DESIGN OF PLL CONSIDERING THE INFLUENCE OF P S , SCR, AND CURRENT CONTROL LOOP
According to the analysis above, the PLL parameters are designed under the very weak grid condition with P s = 1 pu. The parameters for current control loop are designed from (28) and (29): k p_i = 0.0740, k i_i = 0.2467.  PLL is a typical second-order control system. According to the relationship between control parameters, PLL bandwidth BW PLL and damping ratio, the design equation of PLL parameters is obtained as The damping ratio ξ = 0.707. The Nyquist diagram of G OQ (s) with the changing BW PLL is shown in Fig. 7. In Table 4, it can be seen that the bigger the BW PLL is, the smaller the gain margin is, and the worse the stability of reactive current control loop has. Under the very weak grid condition, BW PLL is required smaller than 74 Hz to maintain the stability of the reactive current control loop. In order to keep certain stability margin, BW PLL = 70 Hz.
In order to verify that the reactive current control loop can be stable in the parameter range shown in (33), taking a step of 0.1, a three-dimensional diagram with P s as the x-axis, SCR as the y-axis, and the real part of the rightmost pole of  the closed-loop transfer function of reactive current control loop G CQ (s) as the z-axis is drawn, as shown in Fig. 7. The expression of G CQ (s) is shown in (34).
We define the tuned parameters as the parameters derived from the proposed method in this paper and define the quoted parameters as the parameters for current control loop derived from [19] and the PLL parameters derived from [25]. As can be seen from Fig. 8 (a), the real parts of the rightmost pole of G CQ (s) are less than zero. Therefore, the tuned parameters satisfies the stability requirement of different grid conditions and different active power output conditions. When the system operating with the quoted parameters, there have some real parts of the rightmost poles greater than zero. Therefore, the quoted parameters cannot meet the stability requirements of different grid conditions and diffe-rent active power conditions. The simulation results verify the effectiveness of the proposed method.
In summary, the control parameters design method of the grid-connected inverter considering interaction between PLL and current control loop under weak grid condition proposed in this paper is presented in Fig. 9.
Firstly, the small-signal transfer function integrated model of current control loop considering the influence of grid impedance and PLL is established. The PI parameters of current control loop are designed according to the pole-zero cancellation method. Then, the interaction between weak grid, PLL, and current control loop is analyzed, and the worst condition is adopted to design the PLL parameters. Finally, the three-dimensional diagram of the real part of the rightmost pole of G CQ (s) of reactive current control loop verified that the grid-connected inverter system can be operated stably under different conditions with the designed parameters. Therefore, the proposed control parameters design method can ensure the stable operation of the grid-connected inverter system under different conditions without changing the control strategy. It is a very simple and effective method to suppress the oscillation, and can be readily used in engineering applications.

IV. EXPERIMENTS
In order to verify the correctness of the control parameters design method and conclusions of this paper, the gridconnected inverter experimental platform shown in Fig. 10 is built. The control method is implemented in the DSP and FPGA, and the experimental parameters are consistent with the previous analysis.
On the experimental platform, the following experiments Case 1∼Case 8 are designed.
Case 1: The grid-connected inverter operates with the quoted parameters (k p_i = 0.0343, k i_i = 4.5714), SCR = 2,  and P s increased from 0.2 pu to 0.4 pu. The grid-connected current of the inverter can be observed.
Case 2: The grid-connected inverter operates with the quoted parameters (k p_i = 0.0343, k i_i = 4.5714), SCR = 2, and P s increased from 0.4 pu to 0.8 pu. The grid-connected current of the inverter can be observed.
The experimental results of Case 1 and Case 2 are shown in Fig. 11. The experimental results show that the change of active power affects the stability of the system. Under the condition of SCR = 2, when P s = 0.2 pu, the system can be operated steadily. But with the increase of P s , the system becomes unstable gradually: when P s = 0.4 pu, the gridconnected current is seriously distorted; when P s = 0.8 pu, the system oscillates and then over-current protection works. The critical value of over-current protection is 1.3 times of rated current. VOLUME 8, 2020 Case 3: The grid-connected inverter operates with the quoted parameters (k p_i = 0.0343, k i_i = 4.5714), P s = 1 pu, and SCR decreased from 6 to 3. The grid-connected current of the inverter can be observed.
Case 4: The grid-connected inverter operates with the quoted parameters (k p_i = 0.0343, k i_i = 4.5714), P s = 1 pu, and SCR decreased from 3 to 2. The grid-connected current of the inverter can be observed.
The experimental results of Case 3 and Case 4 are shown in Fig. 12. It is obviously that when the SCR = 6 with the quoted parameters, the system can operate stable. However, when the SCR is reduced from 6 to 3, the grid-connected current is seriously distorted and the system oscillates. When the grid becomes very weak SCR = 2, the system oscillates and then over-current protection works.

Case 5:
The grid-connected inverter operates with the tuned parameters (k p_i = 0.0740, k i_i = 0.2467), SCR = 2, and P s increased from 0.2 pu to 0.4 pu. The grid-connected current of the inverter can be observed.
Case 6: The grid-connected inverter operates with the tuned parameters (k p_i = 0.0740, k i_i = 0.2467), SCR = 2, and P s increased from 0.4 pu to 0.8 pu. The grid-connected current of the inverter can be observed.
The experimental results of Case 5 and Case 6 are shown in Fig. 13. From the experimental results, it can be concluded that the tuned parameters can keep the system stable under  Fig. 11, it can be seen that the tuned parameters can keep the system stably under different P s conditions, and have better stability than those quoted.
Case 7: The grid-connected inverter operates with the tuned parameters (k p_i = 0.0740, k i_i = 0.2467), P s = 1 pu, and SCR decreased from 6 to 3. The grid-connected current of the inverter can be observed.
Case 8: The grid-connected inverter operates with the tuned parameters (k p_i = 0.0740, k i_i = 0.2467), P s = 1 pu, and SCR decreased from 3 to 2. The grid-connected current of the inverter can be observed.
The experimental results of Case 7 and Case 8 are shown in Fig. 14. Under the tuned parameters, when the SCR is reduced from 6 to 3 and 2, the system can be operated steadily. Compared with the experimental results in Fig. 12, it can be seen that the tuned parameters can keep the system steadily in very weak grid, and have better adaptability to weak grid than those quoted. Experiments show that when designing control parameters of the grid-connected inverter, the influence of grid impedance on stability should be considered to prevent the system oscillation when the grid condition changes.
The above experimental results show that the gridconnected inverter system can be operated stably with the tuned parameters under different active power output conditions and different grid conditions.

V. CONCLUSION
Small-signal stability problems often occur when the inverter for renewable energy generation is connected to weak grid. Considering the influence of grid impedance and PLL, a small-signal transfer function integrated model is established in this paper; the mechanism of the influence of grid impedance, PLL, and current control loop on the stability of grid-connected inverter system is analyzed; and the control parameters design method of the grid-connected inverter considering interaction between PLL and current control loop under weak grid condition is proposed. The following conclusions are drawn: 1) The small-signal transfer function integrated model of the current control loop established in this paper shows that the voltage disturbance will occur when the inductance current passes through the grid impedance. The voltage disturbance affects the output of the current control loop through PLL, and finally acts on the inductance current. The loop composed of the grid impedance and PLL can easily lead to the oscillation of the grid-connected inverter system under weak grid condition.
2) When the grid-connected inverter only output active power, because the reactive current reference value is 0 A, the grid impedance and PLL only affect the stability of the reactive current control loop, but do not affect the stability of the active current control loop.
3) The proposed control parameters design method can ensure the stable operation of the grid-connected inverter under the very weak grid condition of SCR = 2. It is a very simple and effective method to suppress the oscillation. It is easy to be used to engineering applications without changing the control strategy and hardware structure.