A Fractional Phase Compensation Scheme of PRMRC for LCL Inverter Connected to Weak Grid

This paper proposes a fractional phase compensation(FPC) scheme for proportional resonance in parallel with multirate repetitive control (PRMRC) to suppress the grid-injected current harmonics and improve the stability of LCL inverter under weak grid condition. In the PRMRC, the proportional resonance control is introduced to overcome the disadvantages caused by inherent delay of repetitive control. Moreover, in order to expand the system stability range and improve the adaptability of the PRMRC in the weak grid, a Newton fractional filter is proposed to approximate the fractional part of the phase compensation term. The coefficients of the Newton fractional filter do not need to be adjusted online even when the grid impedance fluctuates, which greatly reduces the computational burden. The stability principle of the fractional phase compensation PRMRC scheme and the detailed parameter setting are discussed in the paper. Both simulation and experiment are carried out and the results verify the feasibility and effectiveness of the fractional phase compensation scheme of PRMRC (FPC-PRMRC) for LCL inverter connected to weak grid.


I. INTRODUCTION
Presently, LCL grid-connected inverters are widely used to integrate various distributed generations and play an important role in injecting high quality power to the grid [1]- [3]. On the other hand, with the increase of various distributed generations and microgrids, the grid impedance cannot be ignored and the grid presents characteristics of weak grid in stead of conventional ideal grid [4]- [6]. The existence of grid impedance will amplify harmonics at point of common coupling (PCC) [7], deteriorate the quality of grid current and even lead to the system instability. Therefore, more critical requirements should be imposed on the control scheme for LCL inverter than ever before [8], [9].
Repetitive control (RC) is gradually adopted in gridconnected inverters [10]- [12] due to its advantages such as simple structure and ability of zero steady-state error tracking The associate editor coordinating the review of this manuscript and approving it for publication was Kaushik Mukherjee . for periodic signals. However, RC has a disadvantage of inherent fundamental period delay. To improve control effect, RC is usually used together with other controller, which is named as composite control strategy [13]. The commonly used composite control strategyies include proportional control in parallel with RC (PRC), proportional integral in parallel with RC (PIRC) and proportional resonance in parallel with RC (PRRC), etc. PRC provides a variable proportional term to increase the controller flexibility and the structure is relatively simple [14]. However, the PRC scheme has the disadvantage of large steady-state tracking error caused by the limitation of the control gain. A control scheme of PIRC is proposed in [15] to improve the dynamic and steady-state performance of the system. Because PI control only has zero steady-state error in the dq coordinate [16], [17], a complex decoupling transformation of the d-axis and q-axis equations is indispensable, which significantly increases the complexity of controller design [18]. Reference [19] proposes a PRRC control strategy, which can achieve high-accuracy control VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ in the αβ coordinate due to the infinite gain of PR at a specific frequency [20], and it is also preferred for its simple structure [19].
In the realistic digital implementation, the sampling frequency of conventional RC (CRC) usually equals to the switching frequency of power electronic devices and is generally as high as 10 kHz or even higher. Although high switching frequency brings high control accuracy, it also means that the number of sampling points N (N = f s /f , f s and f are sampling frequency and the grid fundamental frequency respectively) in each fundamental period are quite large, which will cause a heavy occupancy of calculator memory space. To solve this problem, a multirate repetitive control (MRC) is proposed in [21] and [22]. In the MRC scheme, the whole control system keeps high sampling frequency while the sampling frequency of RC is only a half. As a consequence, the computational burden is reduced effectively [23].
When LCL inverter connects to a weak grid, LCL filter, together with variable grid impedance and controllers, will induce a phase lag of system and deteriorate system stability. Generally, a suitable linear phase lead compensator z k is introduced to ensure the whole system has a satisfying phase margin [24], [25]. Limited by digital implementation, k can only be an integer, which is called as integer phase compensator (IPC). In CRC, it is easy to find a suitable integer k and to compensate the phase of the entire system properly. However, in MRC, IPC is easy to cause over-compensation or under-compensation due to the lower sampling frequency of RC, and both will lead to current quality deterioration or even system instability. Reference [26] proposes a FIR fractional delay filter based on Lagrange interpolation to achieve fractional phase compensation (FPC). Regrettably, the theoretical analysis and experimental verification are missed. Reference [27] analyzes the principle and design method of FPC and carries out simulations and experiments to verify the effectiveness of the FPC scheme. However, the FPC term is also based on the Lagrange interpolation fractional delay filter and the filter coefficients need to be adjusted in real time when k changes, which greatly increases computational burden. On the other hand, when LCL inverter connects to a weak grid, the change of k in the phase compensation term z k is inevitable because the grid impedance varies with the grid operation mode and transmission distance. Therefore, it needs urgently to find a phase compensation scheme with simple structure and high flexibility in this situation.
In order to improve the dynamic response of the LCL inverter system connected to weak grid and suppress harmonics of the grid-injected current, a novel fractional phase compensation of PR in parallel with multirate repetitive control (FPC-PRMRC) scheme is investigated in this paper. The fractional phase compensation (FPC) term is realized by a relatively simple Newton structure. Moreover, its coefficients remain constant even when k in the phase compensation term z k changes, which greatly reduces the computational burden and makes it typically suitable to weak grid with uncertain grid impedance. Simulation and experimental results show that the proposed FPC-PRMRC scheme can extend the stability range of the LCL inverter system and suppress the grid-injected current harmonics under weak grid condition effectively.
The rest of this paper is organized as follows: Section II describes the structure of grid-connected inverter system and the FPC-PRMRC scheme. Section III gives the system stability conditions and the control parameter setting. Section IV presents a FPC control strategy based on Newton fractional delay filter. Simulation and experimental results are shown in section V to verify the effectiveness of the proposed scheme.

II. PRMRC SCHEME A. CONFIGUARTION OF GRID-CONNECTED INVERTER SYSTEM
The configuration of the investigated LCL inverter is shown in Fig. 1. In Fig. 1, C is the filter capacitor of LCL filter; L 1 and L 2 are the filter inductances of LCL filter; Z g is the grid impedance; i L , i g and i c are the output current of inverter, grid-injected current and capacitor current, respectively; v c , v pcc and v g are the capacitor voltage, PCC voltage and grid voltage, respectively; The reference current i ref of grid connected inverter is calculated from command I ref . GCFAD is abbreviation of grid current feedback active damping, which is used to suppress the inherent resonance peak of LCL filter. The adopted GCFAD is actually a high pass filter [28] and its one order expression is: where k c is the gain and ω c is the cut-off frequency of the high pass filter. In this paper, the current loop adopts a control scheme of PRMRC, which is represented as G i in Fig. 2 and the structure is show in Fig. 3. It should be noted that T s in Fig. 3 is the sampling period of PR control loop and T s = 1/f s . T m is sampling period of RC and T m = mT s , where m is an integer (also named as sampling ratio). It is clear that the sampling rate of the PR control loop is higher than that of RC. E(z) is the tracking error between the reference signal i ref (z) and the grid current signal i g (z); E(z m ) is the down-sampling value of E(z); U r (z m ) is the output signal of RC, and the zero-order holder (ZOH) provides function of up-sampling and makes U r (z m ) restore to sampling frequency of PR [12]. P 0 (z) is the control object of the current loop controller, and the expression is as follows: To transfer functions from s domain to z domain, there is a relationship shown in (3): In order to simplify the following analysis and parameter setting, the multirate sampling structure in Fig. 3 is equivalent to a single-rate sampling structure as shown in Fig. 4. Both the down-sampling process and up-sampling process (ZOH) in Fig. 3 are compensated by z k m in Fig. 4. G pr (z m ) and P(z m ) are the equivalent transfer functions at the RC sampling rate; k r is the gain of RC; Q(z m ) is a term introduced to enhance the robustness of RC; N m = f s /f /m, where f s and f are sampling frequency and grid frequency respectively; z k m is used to compensate the phase lag of the control object of MRC. S(z m ) is adopted to accelerate the magnitude attenuation speed of system in high frequency band.   Fig. 4 can be expressed as:

III. PARAMETERS OF PRMRC SCHEME
From Fig. 4, the closed-loop transfer function of the system can be derived as (5), shown at the bottom of the next page.
1+G pr (z m )P 0 (z m ) and the characteristic equation of the closed-loop system is as follow:  Replaced z m by e jmwTs in (6), a sufficient condition for the system stability based on the small gain theorem can be obtained: (7) It can be verified that:

A. PARAMETERS OF PR AND GCFAD
Parameters of LCL inverter and controller are shown in Table 1, where the parameters of PR and GCFAD control are determined according to the design principles of [28] and [29]. According to [22], m is set to 2.

B. SETTING OF Q(z m )
Q(z m ) in MRC is adopted intentionally to improve the stability of entire system. It can be a low-pass filter or a constant less than 1. It should be noted that a smaller value of Q(z m ) means a better stability and a worse zero-error characteristic of RC. Therefore, a trade-off is made and Q(z m ) is set as 0.98 in this paper [21].

C. SETTING OF FILTER S(z m )
S(z m ) is the term introduced to accelerate the magnitude attenuation speed of P(z m ) in high frequency band. In this paper, it is a fourth-order Butterworth filter with 1 kHz cutoff frequency and the transfer function is as follows (the parameters are designed by MATLAB), (9), as shown at the bottom of the next page. According to Fig. 5, after the introduction of Butterworth filter, the gain of P(z m ) at the frequency higher than 1 kHz is significantly reduced, which means a more efficient suppression of harmonics of high frequency. However, the phase of P(z m ) lags further at the same time.

D. SETTING OF FILTER k r
A larger k r means that the system is more likely to lose stability. However, if the value of k r is too small, the tracking accuracy of RC will be seriously deterioated. According to [27], k r is set to 1 in this paper.

E. PHASE COMPENSATOR z m
In order to compensate the phase lag induced by P(z m ) and S(z m ), a z k m is introduced in RC. The phase lead compensation term can provide a lead phase angle θ = k × m × (ω/ω N ) × 180 • at ω. It is clear that the larger k and m, the larger the compensation angle at ω. Due to the limitation of digital realization, k can only be an integer, which will easily cause overcompensation or undercompensation of the entire system. Fig. 6 shows the phase-frequency characteristics of z k m under different k. Fig. 6 shows that with the increase of k, the uptrend of the phase curve of z k m accelerates, especially at high frequency. At the same time, the greater the k, the greater the phase angle of z k m at the same frequency. When k = 1, 2, 3, the correponding phases at 1 kHz are 72 • , 144 • and 216 • respectively and the phase difference of adjacent z k m is as large as 72 • . Therefore, the over-compensation or undercompensation of the system is more likely to occur and the optimal phase compensation can not be achieved.    to (7), in order to meet the system stability conditions, the trajectory of e jωmT s S(e jωT s )P(e jωT s ) must be within the unit circle in Fig. 7-9 (a), and Q(z m ) − z k m S(z m )P(z m ) must be less than 1. Fig. 7 shows that when grid inductance is ignored (i.e. L g = 0 mH), the system stability can be ensured if k set as an integer such as 4 or 5, which means that integer phase lead compensation is effective. However, when the value of grid inductance increases, phase compensation effect of IPC is poor, and the system may even lose stability, as shown in Fig. 8 and 9. Fig. 8 also indicates that when L g = 3 mH, there may be a fractional value of k (5 < k < 6) that provides proper phase compensation. Fig. 9 shows that when L g = 5 mH, there may also be a fraction k (5 < k < 6) that keeps the system stable. Therefore, under the condition of weak grid, traditional IPC should be replaced by FPC scheme for PRMRC to achieve more accuracy phase compensation and improve the stability performance of the investigated LCL inverter.

A. FPC BASED ON NEWTON FD FILTER
If k is a fraction, it can be written as k = k i + d, where k i is the integer part of k, d is the fractional part of k and d ∈ [0, 1]. Therefore, z k m can be written as (10): In this paper, a fractional delay (FD) filter based on Newton structure is proposed to approximate the phase lead compensation term zd m (the relationship betweend and d will be given in the following analysis process), and this can be achieved by replacing z −1 m with z m [30]. The Newton structure is transformed from the Farrow structure [31], (11) is the expression of the Farrow structure fractional filter. where M is the number of the sub-filters contained in Farrow FD filter; (N − 1) is the order of subfilter; C is the coefficient matrix of Farrow FD filter. The transformation from Farrow structure to Newton structure can be realized by (12).
where T d and T z are the transformation matrices that transform D and Z m intoD andẐ m respectively; And the transformation matrices T d and T z are described detailly in [32].
The order of the Newton filter is (M − 1). Because the third-order filter has the best compromise between structure complexity and approximate effect [33], M is chosen as 4,  Fig. 10. In this paper, spline interpolation is adopted to implement Newton structure FD filter due to its excellent approximation characteristics [21]. The coefficient matrix C spline of the third-order spline interpolation is shown as follows: The coefficient matrix of the third-order FD filter based on Newton structure can be obtained as (14).
According to (12)- (14), the structure of third-order Newton FD filter can be shown as Fig. 11. Fig. 11 indicates that the proposed Newton FD filter has relatively simple structure and filter coefficients are constants, which greatly reduces the computational burden and implementation complexity [34]. Fig. 12 (a) shows the trajectories of Q(z m ) − z k m S(z m )P(z m ) when k changes from the value of 5 to 6 with the step of 0.1, and L g is set as 3 mH and 5 mH respectively to represent different situations of weak grid. Fig. 12 (a) shows that when L g = 3 mH, the system can maintain stable with proposed Newton FPC scheme when 5.2 < k < 5.5. Fig. 12 (b) shows that when L g = 5 mH, the system keeps stable if 5.3 < k < 5.5. Therefore, the effectiveness of Newton FPC to maintain the stability of the system is proved.

V. SIMULATION AND EXPERIMENT
In order to verify the effectiveness of the proposed Newton-PRMRC scheme, the simulation is carried out under Matlab/ Simulink and the corresponding experimental platform is also built in our laboratory.

A. SIMULATION
This research carries out simulation and experiment under two different scenarios: 1) the performance of PRMRC scheme with different sampling ratio m, where m is the ratio of the sampling time T m of RC to the sampling time T s of the current control loop (taking L g = 0 mH for example); 2) the effectiveness of the proposed Newton-FPC PRMRC scheme for LCL inverter connected to weak grid condition (taking L g = 3 mH and L g = 5 mH as examples).

1) PERFORMANCE OF PRMRC SCHEME WITH DIFFERENT SAMPLING RATIO m
To investigate the influence of m on the grid-injected current of inverter, simulations are carried out under the condition of ideal grid (L g = 0 mH) and m is set as 1, 2 and 4 respectively. The parameters of the grid-connected inverter system are listed in Tab.1 in section IV. Fig. 13 (a) and (b) show that the when m = 1, the gridinjected current i g has an ideal waveform and the THD of i g is 1.26%, which means that conventional RC (CRC) can achieve excellent control effect for LCL inverter connected to ideal grid. When the sampling frequency of RC decreases and m increases to 2, Fig. 13 (c) and (d) show that the waveform of the i g has little distortion and the THD increases to 1.48%. When the sampling frequency of RC is further reduced and m = 4, the quality of i g deteriorates significantly and the THD of i g is increased to 2.45% as shown in Fig. 13 (e) and (f). It can be concluded that if sampling frequency of RC decrease slightly (corresponding to m = 2 in this paper), it may have little impact on the control effect of PRMRC. But when the sampling frequency of RC decreases too much, i.e., the value of m is too large, the control performance of PRMRC will be seriously deteriorated. Therefore, m of PRMRC is chosen as 2 in this paper reasonably.

2) PERFORMANCE OF THE PROPOSED NEWTON FPC-PRMRC WITH DIFFERENT L g
To verify effectiveness of the proposed Newton FPC-PRMRC scheme under weak grid condition, system performances based on IPC (k is an integer) and FPC (k is a fraction) are compared. L g is set as 3 mH and 5 mH respectively to represent various situation of weak grid. Fig. 14 shows the steady-state response of the system. It can be seen from Fig. 14 (a) and (b) that when k = 5, the THD of v pcc is as high as 4.78%, the THD of i g is about 2.41% and the control error Fig. 14 (c) and (d) indicate that when k = 6, both v pcc and i g have large harmonics and the THD is 5.85% and 3.24% respectively. Moreover, the control error of i g , ε is as large as about 1.4 A. It should be noted that the poor power quality is caused by under-compensation to the system phase margin of k = 5 and over-compensation of k = 6. According to the analysis in Section IV, if k is set as 5.1 < k < 5.5, more proper phase compensation can be expected. In this paper, k is set as the value of 5.3. Fig. 14 (e) and (f) show that when k = 5.3, the quality of i g is significantly improved comparing to k is an integer 5 or 6. The THD is only 1.49%, and the steady-state error ε is also significantly reduced to only about 0.6 A. Fig. 15 (a)-(c) are simulation results when L g is 5 mH. Fig. 15 (a) and (b) show that k is an integer, no matter k = 5 or k = 6, the system cannot be stable. It means that with the grid inductance increasing, the IPC cannot provide proper phase compensation to the system with PRMRC, and the LCL inverter may lose stability. Fig. 15 (c) shows the steadystate response of the LCL inverter with proposed Newton FPC-PRMRC scheme, where k is set to a fraction of 5.5. With the proposed Newton-FPC scheme, the stability of the system improved obviously. The THD of v pcc and i g is 4.12% and 1.76% respectively, which meets the quality standards of renewable energy connection. Moreover, ε is only 0.7 A according to Fig.15 (c). Fig. 16 shows the experimental platform of the three-phase LCL-type grid-connected inverter built in our laboratory. In order to ensure the safety of the experimental equipment and personal safety, the value of the v pcc and i g are reduced to one-third of the simulated value during the experiment, and the remaining parameters are the same as Table 1.  Fig. 17 (b) and (d) show that when m = 1, the THD of i g is about 2.52% and when m = 2, the THD increases to 2.87%. However, when m is further increased to 4, the harmonics of i g increase significantly and the THD is as high as 8.87%. To tradeoff the calculation burden against current quality, m is chosen as 2.

B. EXPERIMENT
2) PERFORMANCE OF THE SYSTEM WITH PROPOSED NEWTON FPC-PRMRC UNDER DIFFERENT L g Fig. 18 (a)-(d) show the experimental results of v pcc , i g and ε, which are obtained with the Newton FPC-PRMRC and L g = 3 mH. It can be seen that when k is an integer of 5 or 6, the waveforms of v pcc and i g distort severely and the grid connection requirements cannot be met. When k = 5, the THD of v pcc and i g is 16.87% and 26.33% respectively and the RMS of ε is 0.276 A. When k = 6, the THD of v pcc and i g is 27.72% and 42.1% respectively, and the ε is 0.308 A. Fig. 18 (e) and (f) show the experimental results when L g = 3 mH and k is set as a fraction of 5.3 according to the above analysis in section 4.2. Fig. 18 (e) and (f) show that the THD of v pcc and i g is 1.66% and 2.46% respectively, and the RMS of ε is 0.135 A. The feasibility and effectiveness of the proposed FPC-PRMRC strategy are verified.
When L g increases to 5 mH, the system will lose stability whether k is 5 or 6. During the experiment, once the control program begins to operate, the inverter's protection is trigged immediately and experiment process is interrupted, therefore, the experimental results under the condition of L g = 5 mH and k = 5 or 6 cannot be given Fig. 19 shows the experimental results when L g = 5 mH and k is set as a fraction of 5.5. It can be seen that the system can operate stably, the i g and v pcc have relatively perfect waveforms. The THD of i g is 2.32%, which is less than 5% of the IEEE Std 519-2014 and the THD of v pcc is 1.97%.
Simulation and experimental results show that IPC scheme has poor adaptability under weak grid condition. However, the Newton FPC-PRMRC scheme proposed in this paper can compensate the phase of entire LCL inverter system effectively, improve the quality of i g and reduce the control error. The outstanding characteristic of the proposed FPC-PRMRC scheme is that it is typically suitable for LCL inverter under the weak grid condition. Comparing to conventional FPC based on Lagrange fractional filter whose coefficients need to be adjusted online with the fluctuation of the grid inductance, the proposed FPC method in this paper based on the Newton fractional filter greatly reduces the occupation of the calculator storage unit and releases calculation burden.

VI. CONCLUSION
For LCL inverter connected to weak grid, phase overcompensation or under-compensation caused by IPC cannot be avoided and it will deteriorate grid current quality and even lead to system unstable. To solve this problem, a Newton FPC-PRMRC is proposed in this paper. The realization method of Newton FPC scheme and the specific structure of the third-order Newton fractional filter are introduced in the paper. Stability conditions of the system are given and the parameters of the proposed control strategy are designed according to these stability conditions. The Newton fractional filter proposed in this paper has a simple structure and the coefficient does not need to be adjusted even when the fractional phase lead compensation value k changes, which makes it typically suitable for weak-grid conditions and can greatly reduce the consumption of calculator memory cells. Finally, the feasibility and effectiveness of the Newton FPC-PRMRC scheme are verified by simulation and experiment. The results show that the control scheme proposed in this paper can effectively improve the robustness of PRMRC scheme under weak grid and improve the quality of gridinjected current.