Grid-Connected Phase-Locked Loop Technology Based on a Cascade Second-Order IIR Filter

: The moving average ﬁlter-based phase-locked loop (MAF-PLL) can obtain grid synchronization signals accurately under adverse grid conditions with a large amount of harmonics due to the high ﬁltering capability of the MAF. However, MAF-PLL cannot achieve a fast dynamic response in the case of frequency drift, phase angle steps, and unbalanced voltage sag. MAF is essentially an FIR ﬁlter, and its ﬁltering performance is hard to be adjusted. To address this issue, this paper proposes an alternative to MAF consisting of a set of cascading second-order IIR ﬁlters (CIIRF). Based on MAF, CIIRF introduces multiple zeros and poles from the zero–pole replacement perspective, and by changing the position of the poles, the ﬁlter performance can be adjusted. To improve the anti-interference ability of PLL based on CIIRF (CIIRF-PLL) in the presence of grid frequency drift, a frequency-adaptive scheme is also proposed. Simulation and experimental results show that CIIRF-PLL can accurately track the grid voltage phase in the case of frequency steps


Introduction
The phase-locked loop (PLL) is widely used in a variety of real applications associated with signal synchronization and control of power electronic-based devices.With the increasingly growing usage of renewable energy sources such as wind and solar, gridconnected equipment and PLLs are of high importance [1][2][3][4].Typically, the synchronous reference frame phase-locked loop (SRF-PLL) has been widely used due to its ease of operation and robust behavior under stiff grid conditions.However, under adverse grid conditions, a significant amount of unexpected ripple will appear.To improve the filtering capability in the weak grid, different in-loop low-pass filters have been incorporated into the SRF-PLL.For example, the SOGI [5][6][7], MAF [8][9][10], notch filter [11][12][13], linear Kalman filter [14], and delayed signal cancellation operator [15][16][17] can all be used to block the harmonics.
In-loop low-pass filters can be classified into two categories based on the harmonic elimination approach.The first type of filter is represented by SOGI, which may block high-frequency signals such as a phase-locked loop based on a double second-order generalized integrator (DSOGI-PLL) [18].High-order harmonics can be efficiently suppressed by DSOGI-PLL, while low-order harmonics, such as the fifth and seventh harmonics, cannot be properly suppressed.A PLL based on multiple second-order generalized integrators (MSOGI-PLL) uses multiple SOGI modules in parallel to separate the fundamental component from each low-order harmonic through the control method that the output signals of each paralleled SOGI module feed forward to account for the weakening harmonics of the input voltage to a greater extent [19].This method can prevent low-order harmonic interference, but it has a complex structure and significant system computation costs.Another type of filter, with MAF being the most common, performs fixed-point cleaning on Energies 2023, 16, 3967 2 of 18 each harmonic.Because of its simple digital realization and cheap computing overhead, a MAF operates as an excellent low-pass filter and is widely employed in many real-world implementations.In comparison to the first type of filter's characteristics, the second type of filter is more extensively employed in practical applications.
The MAF-based phase-locked loop (MAF-PLL) incorporates a MAF into the SRF-PLL.It substantially rejects the harmonics and obtains an accurate synchronous grid voltage signal.The transient response, however, becomes slower due to the presence of the inloop MAF.To address this issue, refs.[20,21] adopt a quasi-type-1 (QT1) PLL structure to compensate the delay, and [4] shorten the window length to 1/6 of the fundamental period, aiming to reduce the phase delay.However, only non-triple odd harmonics can be blocked.Authors [22][23][24] move the MAF out of the PLL as the prefilter, which provides a favorable dynamic performance but increases complexity and computational load.Another study [21] introduces a correction link and QT1 simultaneously into the feedback loop to improve the dynamic response.In [8], a phase-lead compensator (PLC) is used; however, the working mechanism and parameter selection of the PLC are not analyzed in detail.
Typically, adaptive schemes are used to improve the disturbance rejection capacity of the PLL when the grid voltage frequency varies [25][26][27].To achieve the frequency adaptation, ref. [12] provides several frequency-adaptive schemes for the MAF-PLL and presents their simulation analysis, but the hardware implementation is not shown.In this paper, the round-to-nearest integer method is suggested.
Due to the fact that MAF-PLL is fundamentally a FIR filter and cannot achieve a quick dynamic response in the situation of frequency drift, phase angle step, and unbalanced voltage sag, its filtering performance is difficult to improve.This research suggests a set of cascading second-order IIR filters (CIIRF) as an alternative to MAF.From a zero-pole replacement standpoint, CIIRF introduces various zeros and poles based on MAF, and the filter performance may be altered by adjusting the pole positions.Additionally, a frequencyadaptive scheme is suggested to enhance the CIIRF-PLL's anti-interference performance in the presence of grid frequency drift.
This paper is organized as follows: In Section 2, the standard MAF is analyzed, and a structure diagram of the standard MAF-PLL is given.In Section 3, the proposed method is presented along with an analysis of its performance.Section 4 presents the design guidelines for the system parameters.Section 5 suggests the frequency-adaptive method and shows the hardware implementation.Finally, in Section 6, simulation and experimental results are shown to validate the feasibility and effectiveness of the proposed method.

Analysis of the Standard MAF-PLL
Figure 1 shows the system structure of the grid-connected inverter with an LCL filter.To obtain a reliable grid connection at the point of common coupling (PCC), the synchronization signal of the grid voltage must be extracted.Typically, SRF-PLL is widely used under a stiff grid condition.However, when the grid voltage is distorted due to significant harmonic pollution, the SRF-PLL is unable to obtain the synchronization signal correctly.To address the issue, one possible solution is to introduce a MAF into the SRF-PLL to eliminate the harmonic disturbance.The transfer function of the standard MAF can be expressed in the s-domain [14].
where Tw is the window length.Assuming that Ts is the control system sampling time, the The transfer function of the standard MAF can be expressed in the s-domain [14].
where T w is the window length.Assuming that T s is the control system sampling time, the window length T w contains N sample, and N = T w /T s .It is worth noting that the selection of the window length T w is decided by the grid's harmonic components, and it is recommended that T w = T (nominal grid period) in the case that the grid's harmonic components are uncertain, or T w = T/2 and T w = T/6, respectively, in the case that the odd harmonics and the non-triple odd harmonics are present in the applications [16].According to the harmonic components, the window length T w = T/2 is considered in this paper.
The Bode plot of MAF is presented as follows.
From Figure 2, it can be observed that the MAF has a set of notches centered at 1/T w in hertz and its integer multiples, which act as a quasi-ideal low-pass filter.The MAF provides unity gain at zero frequency and negative gain at notch frequencies n/T w (n = 1, 2, 3, . . . ) in hertz.This means passing the dc component and completely blocking the frequency components of the integer multiples of 1/T w in hertz.The transfer function of the standard MAF can be expressed in the s-domain where Tw is the window length.Assuming that Ts is the control system sampling t window length Tw contains N sample, and N = Tw/Ts.It is worth noting that the s of the window length Tw is decided by the grid's harmonic components, and it is mended that Tw = T (nominal grid period) in the case that the grid's harmonic com are uncertain, or Tw = T/2 and Tw = T/6, respectively, in the case that the odd ha and the non-triple odd harmonics are present in the applications [16].Accordin harmonic components, the window length Tw = T/2 is considered in this paper.The Bode plot of MAF is presented as follows.
From Figure 2, it can be observed that the MAF has a set of notches centered in hertz and its integer multiples, which act as a quasi-ideal low-pass filter.The M vides unity gain at zero frequency and negative gain at notch frequencies n/Tw ( 3....) in hertz.This means passing the dc component and completely blocking quency components of the integer multiples of 1/Tw in hertz.Based on the filtering characteristics analyzed earlier, MAF is introduced into as an in-loop filter.The structure diagram and small-signal model of MAF-PLL a as follows.
Figure 3 shows the structure of the MAF-PLL, which includes two in-loop MA an SRF-PLL.To reduce the negative effect of the input voltage amplitude variatio PLL, an amplitude normalization scheme (ANS) is also incorporated into the PLL Based on the filtering characteristics analyzed earlier, MAF is introduced into the SRF as an in-loop filter.The structure diagram and small-signal model of MAF-PLL are given as follows.
Figure 3 shows the structure of the MAF-PLL, which includes two in-loop MAFs and an SRF-PLL.To reduce the negative effect of the input voltage amplitude variation on the PLL, an amplitude normalization scheme (ANS) is also incorporated into the PLL.The magnitude margin is 14.1 dB and the phase margin is 43.3°; this means that the M PLL is stable.The cut-off frequency ωc, on the other hand, is insufficiently high, resu in a slow dynamic response.The bode plot of the open-loop transfer function of the standard MAF-PLL i in Figure 4.The parameters of the proportional integrator are kp = 83.33 and ki = The magnitude margin is 14.1 dB and the phase margin is 43.3°; this means that th PLL is stable.The cut-off frequency ωc, on the other hand, is insufficiently high, r in a slow dynamic response.

The Proposed Method
The standard MAF-PLL suffers from a slow dynamic response due to the pre the in-loop MAF.Examining Figure 4, in order to increase the cut-off frequenc standard MAF-PLL, and, thus, improve the dynamic performance, the proportio cient kp of the PI regulator could be increased.However, looking at the phase-fre characteristics in Figure 4, it can be seen that too much phase lag will lead to ins phase margin and system instability.Therefore, phase compensation becomes a ke Analyzing the frequency characteristic in Figure 2, it can be seen that the ma attenuation occurs at the frequencies except for the notch frequencies n/Tw (n = 1 in hertz and many high-frequency signals are filtered; this is the essence of the ph lay.Consequently, the phase delay can be reduced by increasing the amplitude-fre gain in the passband.

Zero-Pole Replacement
If the nonlinear delay term  in Equation ( 1) is linearized using the fir Pade approximation expressed as Equation (2), Equation ( 3) is easily obtained: From Equation (3), it is noted that the MAF provides approximate unity gai low-frequency region (below the fundamental frequency) and large attenuation at quencies in the high-frequency region, which matches the magnitude-frequency c in Figure 2. According to the analysis above, with the aim of improving the frequen

The Proposed Method
The standard MAF-PLL suffers from a slow dynamic response due to the presence of the in-loop MAF.Examining Figure 4, in order to increase the cut-off frequency of the standard MAF-PLL, and, thus, improve the dynamic performance, the proportion coefficient k p of the PI regulator could be increased.However, looking at the phasefrequency characteristics in Figure 4, it can be seen that too much phase lag will lead to insufficient phase margin and system instability.Therefore, phase compensation becomes a key issue.
Analyzing the frequency characteristic in Figure 2, it can be seen that the magnitude attenuation occurs at the frequencies except for the notch frequencies n/T w (n = 1, 2, 3 . . . ) in hertz and many high-frequency signals are filtered; this is the essence of the phase delay.Consequently, the phase delay can be reduced by increasing the amplitude-frequency gain in the passband.

Zero-Pole Replacement
If the nonlinear delay term e −T w s in Equation ( 1) is linearized using the first-order Pade approximation expressed as Equation (2), Equation (3) is easily obtained: From Equation (3), it is noted that the MAF provides approximate unity gain in the low-frequency region (below the fundamental frequency) and large attenuation at the frequencies in the high-frequency region, which matches the magnitude-frequency character in Figure 2. According to the analysis above, with the aim of improving the frequency gain at the passband, the first correction link G c1 (s) that has only one zero is introduced, and its transfer function is given as follows: Figure 5 shows the Bode plot of G c1 (s)G MAF (s) after adding the correction link G c1 (s), which introduces a zero into the original filter.Compared with Figure 2, the amplitude-Energies 2023, 16, 3967 5 of 18 frequency gain at the passband in the high-frequency region almost achieves 0 dB, and the phase also improves.The gain at the vicinity of the notch frequencies is not flat enough, which also affects the dynamic performance.One possible way of obtaining flatter gain at the passband is to fine-tune the amplitude-frequency gain by adjusting the quantity and position of the poles. .
Figure 5 shows the Bode plot of Gc1(s)GMAF(s) after adding the correction lin which introduces a zero into the original filter.Compared with Figure 2, the am frequency gain at the passband in the high-frequency region almost achieves 0 the phase also improves.The gain at the vicinity of the notch frequencies is not flat which also affects the dynamic performance.One possible way of obtaining flatte the passband is to fine-tune the amplitude-frequency gain by adjusting the quan position of the poles.To better discuss the phase compensation scheme from the zero-pole repl perspective, it is preferable to analyze the system in the z-domain.By discreti MAF, the transfer function in the z-domain can be obtained: , where N denotes the sample order.
It can be observed from Equation ( 6) that there are N zeros on the unit circle pole fixed at the origin.Consequently, the MAF is essentially an FIR filter with phase-frequency curve whose drawback is that its performance cannot be tu changing the position of its poles because it only has a fixed pole at the origin.purpose of system adjustment, N poles will be introduced.Furthermore, for sys bility, all introduced poles should be located in the unit circle.Therefore, a second tion link Gc1(s) that has only poles is given as follows: where the parameter  ∈ [0,1) denotes the attenuation factor at the notch freq Similarly, Equation ( 7) can be rewritten as Equation ( 8) by approximating the de  using the first-order Pade approximation expressed as Equation (2).
Noted that the correction link Gc1(s) is included in Equation ( 8), we can use rection link Gc2(s) instead of Gc1(s).Equation ( 9) can be obtained by multiplying E (8) with Equation (4).To better discuss the phase compensation scheme from the zero-pole replacement perspective, it is preferable to analyze the system in the z-domain.By discretizing the MAF, the transfer function in the z-domain can be obtained: where N denotes the sample order.It can be observed from Equation ( 6) that there are N zeros on the unit circle and one pole fixed at the origin.Consequently, the MAF is essentially an FIR filter with a linear phase-frequency curve whose drawback is that its performance cannot be tuned by changing the position of its poles because it only has a fixed pole at the origin.For the purpose of system adjustment, N poles will be introduced.Furthermore, for system stability, all introduced poles should be located in the unit circle.Therefore, a second correction link G c1 (s) that has only poles is given as follows: where the parameter r ∈ [0, 1) denotes the attenuation factor at the notch frequencies.Similarly, Equation ( 7) can be rewritten as Equation ( 8) by approximating the delay term e −T w s using the first-order Pade approximation expressed as Equation ( 2).
Noted that the correction link G c1 (s) is included in Equation ( 8), we can use the correction link G c2 (s) instead of G c1 (s).Equation ( 9) can be obtained by multiplying Equation (8) with Equation (4).
Energies 2023, 16, 3967 6 of 18 From Equation ( 9), after adding G c2 (s), another pole arises.To ensure that the amplitude-frequency gain of G c1 (s)G MAF (s) at the passband is equal to 0 dB, G c2 (s) is modified into G c (s) as Equation (10).
By discretizing Equation (10) and doing some simple mathematical operations, the discrete expression can be neatly given as Equation ( 11): where .
For a given N and r, K and β are both constant.After introducing some zeros and poles synthesized in G c (s), the transfer function of G CIIRF (z) can be obtained as It is easily seen from Equation ( 12) that in the complex z-plane, there exist N + 1 zeros on the unit circle and poles of the same quantity in the circle.
Through some mathematical operations on Equation ( 12), the following is obtained: where It is noted that G CIIRF (z) is the proposed alternative filter of MAF in this paper, i.e., CIIRF, which is divided into two parts.The first part represents the tracking gain at the fundamental frequency, and the second part consists of a set of second-order IIR filters expressed as Equation ( 16), which is responsible for the harmonic rejection.Curve 2 in Figure 6 depicts the Bode plot of G CIIRF (z) (r = 0.99).
expressed as Equation ( 16), which is responsible for the harmonic rejection.C Figure 6 depicts the Bode plot of GCIIRF(z) (r = 0.99).For better visualization, the Bode plot in Figure 5 is redrawn as Curve 2 in Curve 2, that is, the frequency characteristic curve of GCIIRF(z), has a flatter passb compared with Curve 1, but with a smaller negative gain at the notch frequenci however, sufficient for harmonic suppression and has a larger phase in the low region although the phase-frequency characteristic is slightly nonlinear; this is in this application.It can be concluded that CIIRF, such as the IIR filter, has poles that can fine-tune the amplitude-frequency gain and phase of the filter, th ing the performance of the filter.Next, CIIRF will be further discussed.
Figure 7a depicts the open-loop Bode plot of GCIIRF(z) with different values rameter r.The enlarged plot in Figure 7b shows that GCIIRF(z) provides the flatt tude response at the passband.Moreover, the 3 dB bandwidth at the notch fr decreases with an increase in parameter r, which provides a flat magnitude re the passband; hence, it improves the transient performance.However, the atte the notch frequencies decreases with an increase in parameter r.To achieve a b formance tradeoff between the flatter magnitude response at the passband and ficient attenuation at the notch frequencies by adjusting the value of parameter r sible solution is to minimize the filter gain-bandwidth product at the notch fr [28].For better visualization, the Bode plot in Figure 5 is redrawn as Curve 2 in Figure 6.Curve 2, that is, the frequency characteristic curve of G CIIRF (z), has a flatter passband when compared with Curve 1, but with a smaller negative gain at the notch frequencies.This is, however, sufficient for harmonic suppression and has a larger phase in the low frequency region although the phase-frequency characteristic is slightly nonlinear; this is negligible in this application.It can be concluded that CIIRF, such as the IIR filter, has adjustable poles that can fine-tune the amplitude-frequency gain and phase of the filter, thus adjusting the performance of the filter.Next, CIIRF will be further discussed.
Figure 7a depicts the open-loop Bode plot of G CIIRF (z) with different values of the parameter r.The enlarged plot in Figure 7b shows that G CIIRF (z) provides the flatter magnitude response at the passband.Moreover, the 3 dB bandwidth at the notch frequencies decreases with an increase in parameter r, which provides a flat magnitude response at the passband; hence, it improves the transient performance.However, the attenuation at the notch frequencies decreases with an increase in parameter r.To achieve a better performance tradeoff between the flatter magnitude response at the passband and more sufficient attenuation at the notch frequencies by adjusting the value of parameter r, one possible solution is to minimize the filter gain-bandwidth product at the notch frequencies [28].For better visualization, the Bode plot in Figure 5 is redrawn as Curve 2 in Fig Curve 2, that is, the frequency characteristic curve of GCIIRF(z), has a flatter passband compared with Curve 1, but with a smaller negative gain at the notch frequencies.T however, sufficient for harmonic suppression and has a larger phase in the low freq region although the phase-frequency characteristic is slightly nonlinear; this is neg in this application.It can be concluded that CIIRF, such as the IIR filter, has adju poles that can fine-tune the amplitude-frequency gain and phase of the filter, thus a ing the performance of the filter.Next, CIIRF will be further discussed.
Figure 7a depicts the open-loop Bode plot of GCIIRF(z) with different values of t rameter r.The enlarged plot in Figure 7b shows that GCIIRF(z) provides the flatter m tude response at the passband.Moreover, the 3 dB bandwidth at the notch frequ decreases with an increase in parameter r, which provides a flat magnitude respo the passband; hence, it improves the transient performance.However, the attenua the notch frequencies decreases with an increase in parameter r.To achieve a bette formance tradeoff between the flatter magnitude response at the passband and mo ficient attenuation at the notch frequencies by adjusting the value of parameter r, on sible solution is to minimize the filter gain-bandwidth product at the notch frequ [28].

Selection of Parameter r
By converting Equation ( 16) into another form, the following is obtained: where the tuning parameters  and  are related to the normalized center freq ωk and the normalized bandwidth BWn at the notch frequencies, respectively.Figure 8 shows the pole-zero plot of the second-order IIR filter Gk(z) shown in tion (17).Two pole-zero pairs are of mirrored layout in the z-plane.The pole-zer lying in the upper half of the z-plane is mapped to the real frequency in the freq domain, i.e., the harmonic frequency.Assuming that c is an arbitrary point on the unit circle that is in close vicinity zero Zk that corresponds to the line frequency ωk, the gain of Gk(z) at point c on th circle that corresponds to the line frequency ωc can be obtained by substituting th  into Equation ( 17) and calculating the amplitude of Gk( ).The further the di between point c and zero Zk, the larger the attenuation gain of Gk(z) at point c for a

Selection of Parameter r
By converting Equation ( 16) into another form, the following is obtained: ) where the tuning parameters a k and ρ k are related to the normalized center frequency ω k and the normalized bandwidth BW n at the notch frequencies, respectively.Figure 8 shows the pole-zero plot of the second-order IIR filter G k (z) shown in Equation (17).Two pole-zero pairs are of mirrored layout in the z-plane.The pole-zero pair lying in the upper half of the z-plane is mapped to the real frequency in the frequency domain, i.e., the harmonic frequency.

Selection of Parameter r
By converting Equation ( 16) into another form, the following is obtained: where the tuning parameters  and  are related to the normalized center ωk and the normalized bandwidth BWn at the notch frequencies, respectively.Figure 8 shows the pole-zero plot of the second-order IIR filter Gk(z) show tion (17).Two pole-zero pairs are of mirrored layout in the z-plane.The pol lying in the upper half of the z-plane is mapped to the real frequency in the domain, i.e., the harmonic frequency.Assuming that c is an arbitrary point on the unit circle that is in close vic zero Zk that corresponds to the line frequency ωk, the gain of Gk(z) at point c circle that corresponds to the line frequency ωc can be obtained by substituti  into Equation ( 17) and calculating the amplitude of Gk( ).The further t between point c and zero Zk, the larger the attenuation gain of Gk(z) at point c pole Pk or  .However, for a fixed point c, tuning the position of the pole Pk c the gain and phase of Gk(z), thus improving system performance.When mov infinitely close to the zero Zk, the difference Rzk between the vector Zk and  a Assuming that c is an arbitrary point on the unit circle that is in close vicinity of the zero Z k that corresponds to the line frequency ω k , the gain of G k (z) at point c on the unit circle that corresponds to the line frequency ω c can be obtained by substituting the z = e jω c into Equation (17) and calculating the amplitude of G k (e jω c ).The further the distance between point c and zero Z k , the larger the attenuation gain of G k (z) at point c for a fixed pole P k or ρ k .However, for a fixed point c, tuning the position of the pole P k can regulate the gain and phase of G k (z), thus improving system performance.When moving point c infinitely close to the zero Z k , the difference R zk between the vector Z k and e jω c approaches ε which is a infinitesimal constant.The ratio of the vectors R zk and R pk is the difference between the vectors P k and the vector e jω c and is approximately equal to ε/(1 − ρ k ), which represents the gain of G k (e jω c ) at the point c.However, from the attenuation point of view, the decay multiple is equal to the reciprocal of the gain, i.e., (1 − ρ k )/ε.According to the aforementioned analysis, for simplicity, the filter gain-bandwidth product at the notch frequencies is represented by the product of the bandwidth and decay multiple, as shown in Equation (20): The minimization of the filter gain-bandwidth product at the notch frequencies is equivalent to minimizing the value of the expression G by tuning the parameter ρ k .When ρ k comes infinitely close to 1, i.e., N √ r ≈ 1, expression G takes the minimal value.Taking processing unit resolution into account, it is assumed that ρ k = 0.9999, then r = 0.99 when N = 100.

PI-Type Controller Parameter Design
Some controller design guidelines for the PLL are presented in this section.This paper proposes the replacement of MAF in Figure 3 with the CIIRF.Therefore, as shown in Figure 9, the small-signal model of the CIIRF-based PLL can be obtained by referring to Figure 3.
nergies 2023, 16, x FOR PEER REVIEW of view, the decay multiple is equal to the reciprocal of the gain, i.e., (1 −  ing to the aforementioned analysis, for simplicity, the filter gain-bandwid the notch frequencies is represented by the product of the bandwidth and d as shown in Equation ( 20): The minimization of the filter gain-bandwidth product at the notch equivalent to minimizing the value of the expression G by tuning the parame  comes infinitely close to 1, i.e., √ ≈ 1, expression G takes the minimal processing unit resolution into account, it is assumed that  = 0.9999 , when N = 100.

PI-Type Controller Parameter Design
Some controller design guidelines for the PLL are presented in this sec per proposes the replacement of MAF in Figure 3 with the CIIRF.Therefor Figure 9, the small-signal model of the CIIRF-based PLL can be obtained b Figure 3.According to this model, the open-loop transfer function of CIIRF-PL tained as As seen in Figure 7, the IIIRF with  = 0.9999 provides almost uni passband.Therefore, GIIIRF is approximately equal to one and can be n close-loop transfer function of CIIRF-PLL can be obtained.
It is easily observed that Equation ( 22) is a typical second-order syste to the common expression of a typical second-order system,  = 2 where  and  are the natural frequency and damping factor, respective the best damping effect and a fast transient response,  = 0.707,  = 22 177.71,  = 15,791.
Figure 10 shows the close-loop Bode plot of the proposed CIIRF-PLL.Co the close-loop Bode plot of the MAF-PLL in Figure 4, the magnitude and increase considerably; moreover, the bandwidth improvement more than d As seen in Figure 7, the IIIRF with ρ k = 0.9999 provides almost unity gain at the passband.Therefore, GIIIRF is approximately equal to one and can be neglected.The close-loop transfer function of CIIRF-PLL can be obtained.
It is easily observed that Equation ( 22) is a typical second-order system.In contrast to the common expression of a typical second-order system, k p = 2ζω n and k i = ω 2 n , where ω n and ζ are the natural frequency and damping factor, respectively.To achieve the best damping effect and a fast transient response, ζ = 0.707, ω n = 2π20 rad/s, k p = 177.71,k i = 15,791.
Figure 10 shows the close-loop Bode plot of the proposed CIIRF-PLL.Compared with the close-loop Bode plot of the MAF-PLL in Figure 4, the magnitude and phase margin increase considerably; moreover, the bandwidth improvement more than doubles.

Frequency-Adaptive CIIRF Implementation
The CIIRF-PLL can block the sinusoidal disturbance of integer multiples of quency fd which is twice the nominal frequency when Tw = 0.01, and the grid fund frequency keeps the nominal value unchanged.However, the CIIRF-PLL cann pletely block the disturbance components due to the variation in the disturba quency fd with the grid fundamental frequency.Therefore, a frequency-adaptiv PLL structure (FACIIRF-PLL) is proposed in this paper.To achieve frequency-a performance, many online adjustment approaches are provided in the earlier l [10].
According to the expression of the sample order N = fs/fd, one possible meth keep the N constant by adjusting the system sample frequency adaptively to the quency variations.It is worth noting that, in most cases, changing the system sam quency will deteriorate the system control strategy; thus, adjusting the sample fr adaptively is not feasible.The authors of [28] proposed that N can vary adaptive grid frequency variations according to the estimated grid frequency; this is as with different detailed approaches found in the earlier literature.The sample ord be adjusted via the rounding-down, rounding-up, rounding-to-nearest integer mean value, and linear interpolation methods.Contrary to the round-to-neares method, the rounding-down and rounding-up methods produce greater error, are easier to be implement on digital hardware.The weighted mean value and l terpolation methods can provide less error; however, they cause greater calculat on the processor in digital implementation.Therefore, considering the tradeoff, th to-nearest integer method is a relatively good option.
According to the aforementioned analysis, the notch center frequency of FA determined by the value of N corresponding to the variant estimated frequency.mated frequency within a certain range matches the same N because the value attained by using the round-to-nearest integer method.For example, assuming 90 or N = 91, the estimated frequency ranges are approximately (55.55 ± 0.3) (54.95 ± 0.3) Hz, respectively, which are shown in Figure 11.

Frequency-Adaptive CIIRF Implementation
The CIIRF-PLL can block the sinusoidal disturbance of integer multiples of the frequency f d which is twice the nominal frequency when T w = 0.01, and the grid fundamental frequency keeps the nominal value unchanged.However, the CIIRF-PLL cannot completely block the disturbance components due to the variation in the disturbance frequency f d with the grid fundamental frequency.Therefore, a frequency-adaptive CIIRF-PLL structure (FACIIRF-PLL) is proposed in this paper.To achieve frequency-adaptive performance, many online adjustment approaches are provided in the earlier literature [10].
According to the expression of the sample order N = f s /f d , one possible method is to keep the N constant by adjusting the system sample frequency adaptively to the grid frequency variations.It is worth noting that, in most cases, changing the system sample frequency will deteriorate the system control strategy; thus, adjusting the sample frequency adaptively is not feasible.The authors of [28] proposed that N can vary adaptively to the grid frequency variations according to the estimated grid frequency; this is associated with different detailed approaches found in the earlier literature.The sample order N can be adjusted via the rounding-down, rounding-up, rounding-to-nearest integer, weight mean value, and linear interpolation methods.Contrary to the round-to-nearest integer method, the rounding-down and rounding-up methods produce greater error, but they are easier to be implement on digital hardware.The weighted mean value and linear interpolation methods can provide less error; however, they cause greater calculation load on the processor in digital implementation.Therefore, considering the tradeoff, the round-to-nearest integer method is a relatively good option.
According to the aforementioned analysis, the notch center frequency of FACIIRF is determined by the value of N corresponding to the variant estimated frequency.The estimated frequency within a certain range matches the same N because the value of N is attained by using the round-to-nearest integer method.For example, assuming that N = 90 or N = 91, the estimated frequency ranges are approximately (55.55 ± 0.3) Hz and (54.95 ± 0.3) Hz, respectively, which are shown in Figure 11.
From Figure 11, it can be seen that intersection a represents the critical frequency, and its corresponding gain is approximately −36 dB.The closer to the center frequencies the estimated frequency is, the larger the attenuation gain.
The first row of Table I lists the distortion limits in IEEE Standard 519-2014 [29].The second row lists a given worse case of grid voltage distortion, which is far beyond the distortion limits listed in the first row.When the fundamental frequency of the given grid voltage drifts to the intersection a shown in Figure 11, each individual harmonic will be attenuated by 36 dB adopting the FACIIRF.After filtering, the data related to harmonic distortion are listed in the third row of Table 1.The total distortion is far below that in the first row.Therefore, the FACIIRF is also applicable under the most unfavorable conditions in practical applications.From Figure 11, it can be seen that intersection a represents the critical freq its corresponding gain is approximately −36 dB.The closer to the center freq estimated frequency is, the larger the attenuation gain.
The first row of Table I lists the distortion limits in IEEE Standard 519-20 second row lists a given worse case of grid voltage distortion, which is far distortion limits listed in the first row.When the fundamental frequency of th voltage drifts to the intersection a shown in Figure 11, each individual harm attenuated by 36 dB adopting the FACIIRF.After filtering, the data related t distortion are listed in the third row of Table 1.The total distortion is far below first row.Therefore, the FACIIRF is also applicable under the most unfavorable in practical applications.Figure 12 shows the digital implementation schematic diagram of CIIR described by the difference equation, i.e., Equation (23).   Figure 12 shows the digital implementation schematic diagram of CIIRF, which is described by the difference equation, i.e., Equation (23).
where x(k), y(k) are the input and output variables, respectively, and x(k) is intermediate variable.From Figure 11, it can be seen that intersection a represents the critical f its corresponding gain is approximately −36 dB.The closer to the center fr estimated frequency is, the larger the attenuation gain.
The first row of Table I lists the distortion limits in IEEE Standard 519second row lists a given worse case of grid voltage distortion, which is fa distortion limits listed in the first row.When the fundamental frequency of voltage drifts to the intersection a shown in Figure 11, each individual har attenuated by 36 dB adopting the FACIIRF.After filtering, the data related distortion are listed in the third row of Table 1.The total distortion is far bel first row.Therefore, the FACIIRF is also applicable under the most unfavora in practical applications.Figure 12 shows the digital implementation schematic diagram of CI described by the difference equation, i.e., Equation (23).[ ] where (), () are the input and output variables, respectively, and ̄( diate variable.

Simulation Analysis
Simulations are implemented in the Matlab/Simulink environment to analyze the effectiveness of the proposed PLL structure in this section.To highlight the effectiveness of the proposed method, some comparative analysis will be completed with the conventional SRF and standard MAF, where the control parameter designs of the latter two are carried out using the symmetrical optimum method.
To investigate the stability and dynamic performance of the proposed FACIIRF-PLL, three different operating cases will be provided, which, respectively, represent the frequency step, phase angle jump, and unbalanced sag followed by harmonic injection.The specific description is as follows: Case 1: The grid voltage undergoes a frequency step change of +5 Hz at time 0.15 s and injection of 0.2 pu for the 5th harmonic, 0.1 pu for the 7th harmonic, and 0.05 pu for the 11th harmonic at time 0.3 s.Case 2: The grid voltage undergoes a phase angle jump of +20 • at time 0.15 s and an injection of 0.2 pu for the 5th harmonic, 0.1 pu for the 7th harmonic, and 0.05 pu for the 11th harmonic at time 0.3 s.Case 3: The grid voltage undergoes an A-phase amplitude drop of 0.3 pu at time 0.15 s and an injection of 0.2 pu for the 5th harmonic, 0.1 pu for the 7th harmonic, and 0.05 pu for the 11th harmonic at time 0.3 s.
The simulation results of the three PLLs under Case 1 are shown in Figure 13a.When the grid voltage undergoes a frequency step of +5 Hz at 0.15 s, the frequency error and phase angle error of SRF-PLL and FACIIRF-PLL both reach zero much faster than those of MAF-PLL.As to the frequency and phase angle errors, when the harmonics are injected into the grid voltage at 0.3 s, SRF-PLL produces a violent oscillation so as not to reach zero, and MAF-PLL fluctuates slightly in the vicinity of zero while FACIIRF-PLL can approach zero soon.
The simulation results of the three PLLs under Case 2 are shown in Figure 13b.When the grid voltage undergoes a phase angle step of +20 • at 0.15 s, the frequency error of FACIIRF-PLL is faster to reach zero than that of MAF-PLL but is a bit slower than that of SRF-PLL.The angle error of FACIIRF-PLL reaches zero as fast as that of SRF-PLL, but much faster than that of MAF-PLL.When harmonics are injected into the grid voltage at 0.3 s, SRF-PLL produces a violent oscillation so that the frequency error and phase angle error cannot reach zero, while those of MAF-PLL and FACIIRF-PLL can both approach zero soon.
Simulations are implemented in the Matlab/Simulink environment to an fectiveness of the proposed PLL structure in this section.To highlight the eff the proposed method, some comparative analysis will be completed with the SRF and standard MAF, where the control parameter designs of the latter tw out using the symmetrical optimum method.
To investigate the stability and dynamic performance of the proposed FA three different operating cases will be provided, which, respectively, repre quency step, phase angle jump, and unbalanced sag followed by harmonic i specific description is as follows: Case 1: The grid voltage undergoes a frequency step change of +5 Hz at tim injection of 0.2 pu for the 5th harmonic, 0.1 pu for the 7th harmonic, and 0.0 11th harmonic at time 0.3 s.Case 2: The grid voltage undergoes a phase angle jump of +20° at time 0.15 s tion of 0.2 pu for the 5th harmonic, 0.1 pu for the 7th harmonic, and 0.05 pu harmonic at time 0.3 s.Case 3: The grid voltage undergoes an A-phase amplitude drop of 0.3 pu a and an injection of 0.2 pu for the 5th harmonic, 0.1 pu for the 7th harmonic, for the 11th harmonic at time 0. The simulation results of the three PLLs under Case 2 are shown in Figure 13 the grid voltage undergoes a phase angle step of +20° at 0.15 s, the frequency FACIIRF-PLL is faster to reach zero than that of MAF-PLL but is a bit slower tha SRF-PLL.The phase angle error of FACIIRF-PLL reaches zero as fast as that of S but much faster than that of MAF-PLL.When harmonics are injected into the grid at 0.3 s, SRF-PLL produces a violent oscillation so that the frequency error and ph error cannot reach zero, while those of MAF-PLL and FACIIRF-PLL can both a zero soon.
The simulation results of the three PLLs under Case 3 are shown in Figure 13 the grid voltage experiences an unbalanced sag at 0.15 s and harmonics injection the frequency and phase angle errors of FACIIRF-PLL reach zero as quickly as The simulation results of the three PLLs under Case 3 are shown in Figure 13c.When the grid voltage experiences an unbalanced sag at 0.15 s and harmonics injection at 0.3 s, the frequency and phase angle errors of FACIIRF-PLL reach zero as quickly as those of MAF-PLL, whereas those of SRF-PLL vibrate and cannot converge.
To sum up, among the three PLLs, the FACIIRF-PLL improves the dynamic response speed while ensuring that the phase is locked accurately.

Experimental Results
In this section, the effectiveness and hardware implementation of the proposed method are validated.In this experiment, a set of experimental devices for detecting the grid voltage synchronization signal are used.The main control processor is the TMS320F28335 digital signal processor of the TI company, which realizes the digital operation of the algorithm.For simplicity, three different operating cases associated with the grid voltage signal are generated by the same control processor.They are implemented by code placed in the interrupt program, which can avoid the impact of sampling errors on the verification results.The sampling frequency of the DSP is set to 10 kH.In addition, the waveform data generated in the experiment are transmitted to the upper computer software through cache and serial port communication, then the graphics are drawn.Figure 14 shows the experimental devices used in experiments.The three working conditions set in the experiment are consistent with those in the simulation, and the waveforms of various PLLs are shown in Figure 15.
grid voltage synchronization signal are used.The main control pro TMS320F28335 digital signal processor of the TI company, which realizes eration of the algorithm.For simplicity, three different operating cases assoc grid voltage signal are generated by the same control processor.They are by code placed in the interrupt program, which can avoid the impact of sa on the verification results.The sampling frequency of the DSP is set to 10 kH the waveform data generated in the experiment are transmitted to the up software through cache and serial port communication, then the graphics a ure 14 shows the experimental devices used in experiments.The three work set in the experiment are consistent with those in the simulation, and the various PLLs are shown in Figure 15.grid voltage synchronization signal are used.The main control proc TMS320F28335 digital signal processor of the TI company, which realizes t eration of the algorithm.For simplicity, three different operating cases assoc grid voltage signal are generated by the same control processor.They are by code placed in the interrupt program, which can avoid the impact of sam on the verification results.The sampling frequency of the DSP is set to 10 kH the waveform data generated in the experiment are transmitted to the up software through cache and serial port communication, then the graphics ar ure 14 shows the experimental devices used in experiments.The three worki set in the experiment are consistent with those in the simulation, and the w various PLLs are shown in Figure 15.It can be seen from Figure 15 that the experimental waveforms of the error and frequency error of the three PLLs under three different operating most consistent with the simulation results.
Under the test condition of harmonic injection after the frequency step jump, and unbalanced sag, the frequency dynamic response of the SRF-P among the three PLLs, but the waveforms of the frequency error and phase under the cases of unbalanced sag and harmonic injection.In the followin It can be seen from Figure 15 that the experimental waveforms of the phase angle error and frequency error of the three PLLs under three different operating cases are almost consistent with the simulation results.
Under the test condition of harmonic injection after the frequency step, phase angle jump, and unbalanced sag, the frequency dynamic response of the SRF-PLL is fastest among the three PLLs, but the waveforms of the frequency error and phase error vibrate under the cases of unbalanced sag and harmonic injection.In the following discussion, some performance comparisons between MAF-PLL and FACIIRF-PLL are made.
In Figure 15a, in the case of the frequency step and compared with the frequency tracking performance of MAF-PLL, FACIIRF-PLL is about 30 ms faster and has a little less overshoot; compared with the phase tracking performance of MAF-PLL, FACIIRF-PLL reaches the stable state with a significantly smaller overshoot and faster speed.It is obvious that after the harmonics are added at 0.3 s, the waveform of FACIIRF-PLL achieves the stable state quickly, while the waveform of MAF-PLL shows a slight oscillation around the stable value; this indicates that FACIIRF-PLL can quickly adjust the notch frequency and filter out the harmonics due to the frequency-adaptive strategy, while the harmonic suppression ability of MAF-PLL is insufficient as a result of the much too small harmonic attenuation gain in the low-frequency region.
Comparing the frequency and phase tracking performances at 0.15 s, it is clear that the adjustment time and overshoot of MAF-PLL and FACIIRF-PLL in Figure 15c are almost the same.In Figure 15b, the adjustment times of MAF-PLL and FACIIRF-PLL are close in terms of the frequency tracking, but the adjustment time of FACIIRF-PLL is about 25 ms faster than that of MAF-PLL in terms of the phase tracking.Furthermore, as seen in Figure 15b,c, FACIIRF-PLL exhibits a slightly worse harmonic rejection capability when it comes to frequency tracking after the harmonics are added at 0.3 s.This has two explanations.One is that the slight frequency drift caused by the phase angle step or unbalanced sag of grid voltage at 0.15 s does not completely vanish at 0.3 s; the second is that when the harmonics are injected at 0.3 s, MAF-PLL can reject the harmonic quickly due to its higher 3 dB bandwidth at the notch frequencies.In contrast, FACIIRF-PLL cannot attenuate the harmonics quickly as a result of its relatively lower 3 dB bandwidth at the notch frequencies until the frequency estimation comes closer to 50 Hz at about 0.34 s.The THD statistics of the filtered input voltage are listed in Table 2; this permits an easier evaluation of the harmonic suppression abilities of the three separate PLLs in Figure 15 under 3 different operating cases.Table 2 makes clear that MAF-PLL and FACIIRF-PLL are equally capable of suppressing harmonics, virtually eliminating all set harmonics in the power grid.Table 3 compares and assesses the performance of three PLLs in several aspects based on the analysis presented above.

Conclusions
Based on the aforementioned analysis, it is clear that the FACIRF-PLL suggested in this paper performs significantly better in terms of dynamic performance while having roughly the same harmonic suppression capabilities and computing overhead as MAF-PLL.The experimental results verify the feasibility and effectiveness of the parameter tuning and frequency-adaptive implementation of the FACIIRF-PLL proposed in this paper.

Figure 1 .
Figure 1.The system structure of the inverter with LCL filter.

Figure 1 .
Figure 1.The system structure of the inverter with LCL filter.

Figure 1 .
Figure 1.The system structure of the inverter with LCL filter.

Figure 2 .
Figure 2. The Bode plot of MAF.

Figure 2 .
Figure 2. The Bode plot of MAF.

Figure 3 .
Figure 3.The structure diagram of MAF-PLL.The bode plot of the open-loop transfer function of the standard MAF-PLL is shown in Figure 4.The parameters of the proportional integrator are k p = 83.33 and k i = 2893.5.The magnitude margin is 14.1 dB and the phase margin is 43.3 • ; this means that the MAF-PLL is stable.The cut-off frequency ω c , on the other hand, is insufficiently high, resulting in a slow dynamic response.

Figure 4 .
Figure 4.The Bode plot of the open-loop transfer function of the standard MAF-PLL.Param = 83.33,and ki = 2893.5.

Figure 4 .
Figure 4.The Bode plot of the open-loop transfer function of the standard MAF-PLL.Parameters: k p = 83.33,and k i = 2893.5.

Figure 7 .
Figure 7. (a) The Bode plot of G CIIRF (z) with different r.(b) The enlarged plot of (a) at 100 Hz.

Figure 7 .
Figure 7. (a) The Bode plot of GCIIRF(z) with different r.(b) The enlarged plot of (a) at 10

Figure 9 .
Figure 9. Small-signal model of standard CIIRF-PLL.According to this model, the open-loop transfer function of CIIRF-PLL can be obtained as

Energies 2023 ,Figure 11 .
Figure 11.The magnitude-frequency plot of FACIIRF-PLL in the vicinity of 55 ferent N.

Figure 12 .
Figure 12.The digital implementation schematic diagram of CIIRF.

Figure 11 .
Figure 11.The magnitude-frequency plot of FACIIRF-PLL in the vicinity of 55 Hz for different N.

Figure 11 .
Figure 11.The magnitude-frequency plot of FACIIRF-PLL in the vicinity of ferent N.

Figure 12 .
Figure 12.The digital implementation schematic diagram of CIIRF.

Figure 12 .
Figure 12.The digital implementation schematic diagram of CIIRF.

Figure 14 .
Figure 14.The experimental devices used in experiments.

Figure 14 .
Figure 14.The experimental devices used in experiments.

Figure 14 .
Figure 14.The experimental devices used in experiments.