A New MAF based αβEPMAFPLL for Grid Connected RES with Improved Performance under Grid Faults

- Diversifying the role of renewable energy sources (RES) and in particular, the role of the grid side converter (GSC) has gained a lot of attention recently. This is a result of the need for more advanced built-in control systems that facilitate support of the grid during abnormal conditions. Distributed renewable generation can provide auxiliary support if GSC controllers are suitably developed and designed. To this end, the control of GSC relies significantly on the fast and accurate extraction of grid voltage phase angle. In addition, the control system must respond fast, be accurate during transient events and present low computational burden to the GSC which must perform a lot of other peripheral tasks. The phase angle extraction is done using phase-locked loop (PLL) algorithm and its response is critical under off-nominal grid conditions such as grid faults, frequency variations etc. Moving average filter (MAF) based PLL techniques provide a better option, however, in some cases these techniques are inaccurate. The work presents a new MAF based PLL that is faster, accurate under any grid disturbances and with significantly improved transient response. The improved performance of proposed αβEPMAFPLL is validated through simulation and experimental results.


INTRODUCTION
The continuous growth and large scale integration of distributed renewable energy sources (RES), Fig. 1, made necessary the modification and amendment of grid regulations. Recently revised grid codes require appropriate control techniques that can work efficiently under normal and faulty grid conditions. An example of such grid codes is shown in Fig. 2, depicting the normal operating voltage zone at the point of common coupling (PCC). The figure also shows the off-nominal voltage limits and RES grid-connection time requirements, as imposed by some countries, whereby it is necessary to keep injecting during this period high quality power in order to support the grid [1][2][3]. In addition, RES must accordingly operate in order to support the grid in the presence of harmonics and off-nominal grid conditions (such as, off-nominal frequency variations, variation in nominal voltage magnitude, asymmetrical grid faults etc.). As a result, in order for proper operation of RES, the control system must be designed so as to operate within acceptable grid-imposed limits. Energy generated from RES is efficiently transferred to the utility grid via power electronic based Grid Side Converter (GSC) [4,5]. Consequently, the control of RES mainly involves the control of GSC. Hence for meeting the modern grid regulations, appropriate control techniques with improved performance and reduced complexity are needed for GSC [6,7]. The control topology of GSC consists of the inner and outer current and voltage control loops, respectively used for controlling the currents and voltages, thereby controlling the transfer of desired active/reactive power to the grid [8]. The GSC control can be developed either in the stationary αβ reference frame or synchronous reference frame (SRF). The stationary αβ control is implemented by converting the three phase signals into corresponding two phase domain. It utilizes proportional integral controller in each control loop and the frequency of the grid voltage is main parameter that may affect the PR controller. For estimating the grid frequency, when the frequency is not constant, frequency locked loop (FLL) is used. Control operation in SRF is achieved by utilizing the phase angle of grid voltage as a reference parameter. The phase angle is estimated from the point of common coupling (PCC) and used for controlling the converter by converting all the variables (currents/voltages) in corresponding DC magnitudes. For the control of DC quantities, a simple transfer function with pole at zero can be used, hence SRF employs a PI controller [6]. The performance of controller in SRF frame is mainly dependent on the efficient extraction of phase angle under all the normal (balanced) and off-normal (unbalanced faults, harmonic distortion, off nominal frequencies) conditions. Consequently, a phase-locked loop (PLL) algorithm is used for acquiring the phase angle of grid voltage. The work herein presented relates to GSC control in SRF, as shown in Fig. 3. In the literature, many PLL techniques have been presented for estimating the phase angle at PCC. The simplest and most conventional techniques are the dqPLL (or SRFPLL) [12] and the αβPLL [13][14][15]. Both techniques utilize the fundamental positive sequence of grid voltage and can work efficiently under balanced grid conditions including balanced faults. However, under unbalanced conditions, the positive sequence component is accompanied by undesired double frequency oscillations caused by the existence of negative sequence component. Furthermore, dqPLL and αβPLL do not respond as desired in the presence of harmonic distortion in the grid voltage. The only advantage of αβPLL over the conventional dqPLL is that it offers significantly less overshoot in estimated frequency and phase at the time of unbalanced fault [16,17]. In order to alleviate the problem of oscillations under unbalanced conditions, the SRFPLL and αβPLL are modified by adding a decoupling network and the new PLLs are referred to as decoupled SRFPLL (dsrfPLL) [18] and decoupled αβPLL (d αβPLL) [16,17]. Unlike dqPLL, the dsrfPLL suffers from high overshoot at the instant of fault occurrence. The only disadvantage of dsrfPLL and dαβPLL is inaccurate estimation of phase and frequency in the presence of grid harmonics. For compensating the effect of grid harmonics, two new techniques are proposed in [19] and [20], known as MSHDCPLL and DNαβPLL, in which the existing decoupling network of [18] and [16,17] is expanded to incorporate the decoupling of oscillatory effects in transformed variable caused by the presence of harmonic frequencies. The MSHDCPLL and DNαβPLL respond accurately under harmonic distortion and unbalanced grid conditions, and result in smooth angle estimation. However, the decoupling network employs significantly large number of Park's transformation, due to which the computational complexity of these two PLLs is high. Furthermore, the two PLLs eliminate selected low-order harmonics and prior knowledge of which harmonics to be compensated is required. Consequently, the performance capability under any uncompensated harmonics will be poor. Considering therefore that MSHDCPLL and DNαβPLL are computationally complex and restricted in compensating harmonics, the PLL algorithms based on moving average filter (MAF) present significant attraction [21][22][23]. The unbalanced faults and harmonic distortion of any order is compensated by MAF with less computational resources. This characteristic is an essential feature for real time implementation in limited size digital signal processors. The performance of MAFPLL is highly dependent on grid frequency nominal value (50 Hz for the scope of this paper). The simplest type of MAFPLL are developed in [22] by modifying the conventional dqPLL and dsrfPLL. They are referred to as MAFPLL and MRFPLL, respectively. The problem with MAF based PLL is that it suffers from significant offset error under the condition of offnominal frequency (other than 50 Hz) [22,[24][25][26]. The problem of off-nominal error can be reduced by introducing a variable sampling rate for MAF window length in accordance with the varied frequency [22,26,27]. Variable sampling rate however is not considered practically possible as it restricts the operation of GSC controller. Furthermore, even if the offset error is eliminated, the presence of MAF in the control path results in slow dynamic response [26]. In addition, the presence of MAF in transfer function restricts the calculation of straightforward tuning parameter and stability analysis. The problem of offset error, slow dynamic response and complicated tuning procedure was recently overcome by EPMAFPLL, proposed in [24]. In EPMAFPL, a pre-filtering stage is added to shift the MAF from phase detector part, thereby removing it from main control loop and improving the dynamic response. In addition, a modification is done to the rotating speed of SRF in PD for compensating the offset errors and the tuning calculation of controller comes out to be similar to that of a simple second order transfer function. The EPMAFPLL uses the dqPLL phase extraction algorithm in addition to other schematic. The only problem of EPMAFPLL is that it offers high frequency and phase overshoot at the time of fault because dqPLL algorithm is used for phase extraction.
The aforesaid problem motivated the development of new αβEPMAFPLL, which is the combination of EPMAFPLL and the conventional αβPLL. The proposed αβEPMAFPLL minimizes the overshoot in frequency by inheriting the lower frequency overshoot property of conventional αβPLL. In addition, the proposed PLL results in accurate phase extraction due to a modification incorporated for phase offset errors, similar to that of EPMAFPLL. Hence, the proposed αβ-EPMAFPLL enables the fast operation of GSC under grid faults by keeping the frequency within the assigned limits of grid regulations. It is worth mentioning that the harmonic compensation proposed in this paper is able to compensate any harmonic present in the grid. Prior knowledge of what harmonics are present in the gird voltage is not needed and all the harmonics are eliminated with lower computational complexity. A detailed comparison for various PLLs is presented in appendix Section II discusses the existing MAF PLLs and the associated problems. The proposed αβEPMAFPLL is discussed in section III and section IV presents the tuning procedure for proposed PLL. The performance comparison of proposed PLL with existing EPMAFPLL is presented in the results and discussion section V.

Conventional MAFPLL
The structure of conventional MAFPLL is shown in Fig. 4. The MAFPLL exhibits slow dynamic response due to the presence of MAF in the control path. In addition, the closed loop transfer function of MAFPLL results in 4 th order system, for which tuning process is complicated and is based on symmetrical optimum method. The slow dynamic response of MAFPLL is mainly due to the fact that there is a lower limit on the settling time (ST) that can be selected [22]. According to [22], for MAF window length of 0.01 sec, the ST of MAFPLL cannot be less than 0.028 sec (28 msec). If this occurs, a reduction in phase margin (PM) is observed (PM falls below 30°), thereby making the system unstable. Furthermore, the MAFPLL offers significant offset error in the estimated phase angle under offnominal frequency, which is the main disadvantage.

EPMAFPLL
Recently in [24], a new MAF based PLL algorithm has been proposed for improving the problems of slow dynamic response, complicated tuning process and phase drift under offnominal grid frequencies. In EPMAFPLL, two modifications are employed respectively for overcoming the problem of slow dynamics (simpler tuning) and compensation of offset phase error under off-nominal frequencies. The pre-filtering stage modification is introduced by making the control path free of moving average filter, shown in Fig. 5. Herein, MAF is inserted to pre-filtering stage and the input/output of MAF is rotated with an angle obtained from nominal frequency. However, for compensating the problem of offset error a simple modification incorporated to the speed of SRF in phase detector part. The transfer function of MAF and its phase and magnitude response are given by (1) and (2), respectively. It is important to notice that the speed of SRF frames in pre-filtering stage and phase detector stage are different from each other.  (2) and is given by (3).
The EPMAFPLL accurately compensates the error caused under off-nominal frequency with fast dynamic response. However, in case of unbalanced grid fault EPMAFPLL suffers from large value of frequency overshoot, which is observed at the instant when the fault occurs.

PROPOSED αβEPMAFPLL
The offset phase error of MAFPLL under off-nominal grid frequencies is overcome by EPMAFPLL [24]. However, the high frequency overshoot of EPMAFPLL at the time of fault may result in violation of frequency limits.
The problem of high frequency overshoot is alleviated by the proposed αβPMAFPLL which incorporates the αβPLL in the phase detector part of EPMAFPLL. The lower frequency overshoot characteristic of αβPLL helps in reducing the frequency/phase overshoot significantly. The phase angle in αβPLL is estimated using a trigonometric equation (4) and is valid for small values of ∆ .
To incorporate the phase error caused under off nominal frequencies (− ∆ ( − ) 2 ⁄ ), it is added to the output of αβPLL phase detector. The resulting angle is being fed back to the sine and cosine part of extraction algorithm. This proposed modification to αβPLL results in compensation of phase error that appeared due to off nominal frequencies. The structure of proposed αβPMAFPLL is shown in Fig. 6. Fig. 6: The proposed αβEPMAFPLL As mentioned, the proposed αβEPMAFPLL minimizes the overshoot in phase and frequency estimation by incorporating the lower frequency overshoot property of conventional αβPLL and also results in accurate phase extraction due to a modification incorporated for off-nominal frequency phase offset errors. Hence, the proposed αβEPMAFPLL enables the fast and accurate operation of GSC under grid faults and also under off-nominal grid frequencies, by remaining within the assigned limits of frequency grid regulations.

TUNING PROCEDURE
The stability analysis and tuning of proposed αβEPMAFPLL is similar to EPMAFPLL. The small signal model for EPMAFPLL and αβ-EPMAFPLL is shown in Fig. 7. The derived closed loop transfer function is given by (5).
According to [24], the transfer function is stable under the constraint 0 < < . The tuning of (5) is very simple and straightforward, as it is a second order transfer function. Following the control theory, the calculated PI controller's tuning parameters in terms of desired settling time ( ) are given by (6), where is damping factor and for optimal response it is selected to be 0.707. For experimental verification, a model equivalent to simulation setup is developed in the laboratory.

Simulation Results
The performance of proposed PLL is analyzed by comparing it with EPMAFPLL under different value of settling time, that is, slow (4T, T=20 msec), medium (3T) and fast (2T). During this analysis, the type of fault is fixed and only the effect of different settling times is observed. The tuning parameters for both PLLs are slightly modified for the purpose of this work due to the fact that the PLLs are investigated under grid voltage fault. However, the tuning parameters in (6) are in accordance to a step change in phase angle. In this paper, the parameters are tuned in such a way that the frequency responses of both PLLs achieves same settling time when an unbalance fault occurs. The calculated values of tuning parameters are presented in appendix Table C.1.
The performance comparison of proposed αβPMAFPLL and EPMAFPLL is developed in the presence of unbalanced grid faults, voltage swell, voltage sag with phase jump, frequency variation and in addition, the performance of proposed PLL is tested in FRT operation of GSC. For all the cases, the frequency overshoot analysis is performed by maintaining the same settling time for both PLLs. For same settling time, the frequency overshoot of proposed PLL is lower, implying that it can be tuned for even faster response while maintaining the frequency limits. For all the plots the time of fault is at 1 sec. The voltage is measured from PCC which is the point between GSC and /Δ transformer (connected between GSC and grid for isolation). The pattern in which fault propagates after /Δ is considered according to [28].

Response under Single Phase to Ground Fault
The grid voltage is subjected to one phase to ground fault and the response of both the PLLs are analyzed under fast (Fig. 8), slow (Fig. 9) and medium (Fig. 10). Under all the cases of settling time, the overshoot of proposed αβPMAFPLL is less than the overshoot experienced by EPMAFPLL. The EPMAFPLL overshoot under the fast response is 2.4 Hz, under medium response 1.1 Hz and under slow response 0.66Hz. The highest value of overshoot for the proposed PLL is 0.75 Hz. The V + and Vin Fig. 8 are the estimated positive ( * +1 ) and negative sequence ( * −1 ) magnitudes respectively obtained from the PLL. These components are used as feedforward terms for GSC control. The settling time Vs frequency overshoot is depicted in Fig. 11, validating the improved performance of proposed technique.

Response under Grid Voltage Swell
The responses of PLLs are compared under a voltage swell event. In this case, the grid voltage is subjected to a step change of 4pu at 1 sec. The response of both PLLs is depicted in Fig.  12, where lower frequency overshoot is observed for the proposed PLL.

Response under Voltage Sag with phase jump
In the event of a voltage sag with phase jump, the proposed PLL is also seen to have better transient response, Fig. 13. An unbalanced fault with a phase jump of 30 o simulates this event and as observed, the frequency overshoot of proposed PLL is lower than the one of EPMAFPLL which reaches a value of 6 Hz.

Response under Grid Frequency Variation
The response of PLLs to a step change of -2 Hz in grid frequency is shown in Fig. 14. In this case, both PLLs are tracking the reference accurately without any overshoot.

Two Phase to Ground Fault
The responses of EPMAFPLL and proposed αβPMAFPLL are also compared for two phase to ground fault under various settling times, as shown in Fig. 15. Similar to one phase faults, the overshoot of proposed αβPMAFPLL is lower than the existing EPMAFPLL.

FRT operation of GSC with Advanced PQ Controller
The FRT operation of GSC is enabled by an advanced PQ controller capable of providing clean current references to the current controller. The advanced control technique enables the accurate injection of symmetrical and harmonic free pure sinusoidal current under grid faults and disturbances. In addition, the proposed control technique can be used for FRT operation of grid connected RES. The preconditions for FRT operation of GSC is that the converter should not disconnect in the event of grid faults and provide required amount of reactive power in order to support the grid [13,29]. The current references are generated according to [30] and are given by (6). where the * +1 are the estimated d and q axis voltages, obtained from proposed αβEPMAFPLL. * = * +1 and * = * +1 are the reference currents generated by PQ controller according to desired active * and reactive * powers, respectively.
According to instantaneous power theory [20,28,30] the relation for active/reactive power delivered by GSC under unbalanced harmonically distorted grid voltage is given by (7) and (8), respectively.
where, v +1 is the positive sequence grid voltage, v −1 and v ℎ are negative and harmonic components, respectively. Similarly, I +1 , I −1 and I ℎ are respectively positive, negative and harmonic component of currents.
However, by using the current references given by (6), the oscillations in active and reactive powers are reduced, as shown by (9) and (10). The vectors I −1 and I ℎ become zero when (6) is used for reference generation.
The FRT control necessitates that the converter should not disconnect and provide reactive power support to the grid in the event of a fault. In some cases, the fault event may violate the converter's injected current limits. As a result, it might be necessary to limit the maximum assigned converter's current I , by limiting the injected current to * i ⁄ to ensure safe operation of GSC converter. Furthermore, the injection of active power is reduced based on the amount of voltage sag and a certain Q/P ratio is calculated. Consequently, the resulting amount of reactive power is supplied for improving the stability of grid. The amount of reactive power under fault must be greater than the active power.
As mentioned earlier, the fast and accurate response of PLL affects the performance of GSC. The performance of PLL directly affects the response of current and voltage controller, implemented in dq SRF frame. Therefore, the proposed αβEPMAFPLL is tested for fault ride through operation, as shown in Fig. 16.
Initially, the GSC is injecting a 2 kW of active power. However, at 0.9 sec, the active power is increased to a value of 2.5 kW. In addition, at 1 sec an unbalanced fault is applied and FRT mode of GSC is turned ON with a Q/P ratio of 3/1. The selection of Q/P=3/1 is an arbitrary ratio selected to justify the FRT operation (a more accurate value according to fault type can be obtained according to [7] or from reactive power profile). As can be seen from Fig. 16, after 1 sec the GSC injects reactive power to provide reactive power support and at the same time the grid current limits are maintained. The reactive to active power ratio as can be inferred from Fig. 16 is 1845/613. The GSC controller is responding efficiently to all the variations and disturbances due to accurate and fast estimation of phase angle.

Experimental Results
The performance improvement of αβEPMAFPLL in terms of frequency overshoot compared to existing EPMAPLL is also verified experimentally. The experimental setup is shown in Fig. 17 For analyzing the behavior of PLLs, two experimental case studies under different working conditions are presented. In the first case study, the two PLLs are compared for a same settling time of 60 ms when a Type B fault with 50% voltage sag is applied. The initial value of all the three phases is equal in magnitude, however, a type B fault is initiated by producing 50% voltage dip in phase 'a' (point of disturbance marked in Fig. 18, subplot a). The three phase voltage waveform with 50% voltage sag and corresponding variations in estimated phase and frequency are depicted in Fig. 18 (b) and (c), respectively. It can be seen from Fig. 18 that the proposed αβEPMAFPLL suffers from lower frequency overshoot compared to conventional EPMAFPLL. The amount of frequency overshoot experienced by EPMAFPLL is 0.64 Hz, whereas the proposed PLL's overshoot is only 0.072 Hz. Hence, the proposed αβEPMAFPLL is offering 9 times less frequency overshoot compared to existing EPMAFPLL. Furthermore, small oscillations are observed in the estimated phase of EPMAFPLL at the time of fault. On the other hand, the proposed PLL is free of such undesired oscillations.

CONCLUSION
The proposed αβEPMAFPLL presents significant improvement to the response of PLL in terms of low frequency overshoot under various kinds of faults, as verified through simulations and experiments. The harmonic mitigation capability of EPMAFPLL is not affected by the addition of αβPLL in the phase detector part, as proved from experiments. Furthermore, the FRT control of GSC using the proposed PLL verified its accurate performance in a grid connected operation. Therefore, the proposed αβEPMAFPLL is considered the most favorable synchronization algorithm compared to the other PLLs. Consequently, the use of αβEPMAFPLL in the control of grid connected RES is an appropriate solution.

Appendix-A: Comparison of Various state-of-the-art PLLs
Various state-of-the-art PLLs are compared against the proposed PLL in terms of processing time, computational complexity, frequency overshoot and performance capabilities under abnormal grid conditions. The processing time analysis is performed in MATLAB using Matlab profiler report.

Appendix-B: Discrete Implementation of MAF
The discrete time implementation of MAF is based on (1) and is shown in Fig. B. 1, which requires only one subtraction, one addition and one multiplication. Hence it implies that MAF is computationally less complex. The lower complexity of MAF makes it most suitable candidate for real time implementation in the control algorithms.

Appendix-C: Tuning Parameters Table
The tuning parameters used in this paper are listed in Table C. 1. The tuning parameters are modified to present identical settling time under fault for enabling the frequency overshoot evaluation of two PLLs under same dynamic response. These tuning parameters are valid for per unit of the input voltage.