An improved IPT-PLL technology for single-phase grid-connected inverters in complex power grid conditions

Aiming at the common problems of frequency variations and harmonics in complex power grids, an improved inverse Park transform phase locked loop (IPT-PLL) technology for single-phase converters suitable for micro grid systems is proposed. Firstly, in the phase detection of PLL, the α component of Park transformation is selected as the reference voltage, and its orthogonal component is constructed using a 1/4 fundamental period delay method. Secondly, Lagrange interpolation polynomials are introduced to approximate fractional delay to solve the problem of delay calculation errors caused by frequency changes. Thirdly, in order to compensate for the poor ability of traditional proportional integral (PI) regulators, multi resonant controllers are superimposed to suppress low order harmonic disturbances. Finally, the design method and system performance of the PI regulator and each resonant controller are analyzed theoretically. The experimental results show that the proposed improved IPT-PLL method has strong adaptability to complex power grids. It can significantly improve the tracking performance of power grid frequency, suppress the interference of low order harmonics and DC bias. And it has good dynamic and static performance.

Phase lock loops (PLL) is a widely synchronization method used in GCIs.It mainly includes three parts which are phase detector (PD), loop filter (LF) and voltage control oscillator (VCO).Single-phase PLL can be divided into two types: the stationary coordinate system PLL and the synchronous reference frame PLL (SRF-PLL) according to different PDs.
For the stationary coordinate system PLL, sine signal multiplication is often used to achieve phase detection, which inevitably suffers from interference of twice the frequency and affects the control accuracy of PLL 8 .In order to solve the problem of double frequency oscillation, 9 and 10 introduced high-order low-pass filters and notch filters after PD, respectively, to improve the steady-state performance of PLL by setting a lower filter bandwidth, but its dynamic performance will be greatly affected.
The SRF-PLL borrows from the three-phase voltage PLL principle and utilizes rotating coordinate transformation to realize phase detection.This method has gained widespread application due to its fast dynamic response and ease of software implementation 11,12 .However, for single-phase AC microgrid systems, there is only one voltage vector and rotational coordinate transformation cannot be directly applied as in the three-phase SRF-PLL.Therefore, different methods have been devised to design a Quadrature Signal Generator (QSG), which are then used for PD through rotational coordinate transformation.Commonly used QSG methods include the Second Order Generalized Integrator (SOGI) 13,14 and T/4 (where T is the fundamental period) delay 15 .Various advanced SOGI methods have been developed to address DC offset in PLL, including additional offset estimation loops, cascade SOGI, modified SOGI, complex coefficient filters, in-loop dq-frame DSC, notch filters, and moving average filter-based SOGI-PLL 16 .In 17 , an additional integral branch was added to the front-end SOGI to suppress DC offset, a sliding average filter was used in the back-end PLL loop instead of the integral controller of the PLL.While these enhanced SOGI-PLL algorithms effectively tackle the impact of DC offset on PLL performance, they may not account for frequency variations and harmonics in complex grid voltage.For the T/4 delay method, in 18 , an adaptive delay SPF-PLL algorithm was constructed based on the deviation between the estimated frequency and the nominal frequency of the power grid.However, it did not consider issues such as the DC offset and harmonics of the grid voltage.In 19 , the T/4 delay + Inverse Park Transformation (IPT) method was used to construct orthogonal components, effectively suppressing the DC offset of the grid voltage.However, this method did not consider the accuracy of T/4 digital delay implementation when the grid frequency changes, which will affect the output accuracy of the PLL.In 20 a multi-harmonic decoupling compensation network was established by performing Park transformation and its inverse transformation at different harmonic frequencies, the influence of grid harmonics on the PLL is eliminated.Due to the need for a large number of Park transforms, the calculation speed of PLL is affected.A high-pass filter was used to extract the harmonic components in the dq components after Park transformation in 21 , and then the difference between the extracted components and the original dq components was taken to filter out the grid voltage harmonics.But the adverse effects caused by the phase lag of the high-pass filter on the harmonic filtering algorithm were not addressed.
In addition, methods such as Discrete Fourier Transform (DFT) 22 , Hilbert Transform 23 , Kalman Filtering 24 , and Double Complex Coefficient Filtering 25 have also been used for voltage signal orthogonal component construction.However, these methods have various issues, such as requiring a large amount of controller memory or experiencing significant phase locking errors and low-frequency oscillations in complex power grid environments.
This paper introduces an improved PLL technology building upon the conventional IPT-PLL to address synchronization control challenges of the GCI in complex grids with DC offset, voltage harmonics and frequency variations.Firstly, the α component of the IPT-PLL reverse Park transformation is used as the reference and the orthogonal components is constructed by the use of the T/4 delay method.Secondly, the Lagrange interpolation polynomial is used to estimate the fractional delay, which improves the accuracy of the T/4 delay algorithm and enhances the frequency adaptability of the PLL.Thirdly, a PI + multi-resonant controller is used to construct the LF method, which helps to mitigate the impact of voltage harmonics in the complex power grid.Design methods of the PI regulator and multi resonant controllers of LF are analyzed.At last, good performances of the proposed improvement scheme are discussed.

Principle of PD in IPT-PLL
IPT-PLL structure is shown in Fig. 2 18 , where PD consists of three parts: Park transformation, low pass filter (LPF), and inverse Park transformation.The grid voltage u s and the output signal u β of inverse Park transforma- tion are transformed into dq components u d and u q through Park transformation.And the high-order harmonics of dq components are filtered out by LPF to obtain the DC form u d ′ and u q ′ , which are then transformed into u α and u β through inverse Park transformation.The q-axis component u q ′ from LPF is taken as the output of PD, the error angular frequency �ω is generated through the LPF and PI regulator of LF, and then it is summed with the nominal angular frequency ω N (ω N = 100π rad/s) of the complex power grid's fundamental voltage.And the PLL output θ and the power grid frequency observation signal f are obtained from VCO.
According to the PD shown in Fig. 2, the transfer function F(s) of the first-order LPF is defined as where ω c represents the cutoff frequency of the LPF.
The time-domain relationship between the input of the Park transform in Fig. 2 and the output of the inverse Park transform can be derived as where * represents the convolution operator, f(t) is the unit impulse response of the LPF。 In terms of Euler's formula, Park transformation matrix can be expressed as where θ = ωt.According to Eq. ( 3) and the property of frequency shift, the Laplace transform of Eq. ( 2) can be obtained as The transfer functions u α (s) u s (s) and u β (s) u s (s) derived by (4) can be expressed as ( 5) and ( 6) respectively.
The Bode plots of Eqs. ( 5) and ( 6) are shown in Fig. 3, where ω c = 2000π rad/s.It can be seen that T α (s) is a second-order band-pass filter with angular frequency centered on ω , which can filter DC and high-frequency components of the complex power grid voltage.T β (s) is a second-order LPF with an amplitude of 1 at a frequency (1) (3) cos θ sin θ −sin θ cos θ = 1 2 e j ωt + e −j ωt je j ωt − je −j ωt −je j ωt + je −j ωt e j ωt + e −j ωt (4)

Some problems with IPT-PLL
For a single-phase complex power grid, it generally includes a DC offset, fundamental and harmonic voltage harmonics.The complex grid voltage u s (t) can be written as where U 0 , U, and U h represent the amplitudes of the DC component, fundamental component, and hth harmonic component of the grid voltage respectively.ω is the angular frequency of the fundamental voltage, while φ and φ h represent the phases of the fundamental and hth harmonic voltages, respectively.If PLL output angular frequency ω = ω , the steady-state components of u α (t) and u β (t) are shown in ( 8) and ( 9) can be calculated from Eqs. ( 5)- (7).
where T α (jhω) 、 T α ( − jhω) 、 T β (jhω) and T β ( − jhω) are moduli of T α (s) and T β (s) , ∠T α (jhω) and ∠T β (jhω) are phase angles of T α (s) and T β (s) when s = ±jhω respectively.By substituting ( 8) and ( 9) into the Park transformation matrix, the expression for u q can be obtained as where According to Eq. ( 10), in steady state, sin(θ − θ) is approach to θ − θ .The DC component of the grid volt- age can be expressed as U 0 cos θ , which is an AC component with a frequency of ω .The hth voltage harmonic is transformed into (h ± 1)th harmonic component.Consider the DC and harmonic components of the grid voltage  11) and ( 12) respectively where k p and k i are the proportional and integral coefficients of the PI controller.
where ω c1 is the cutoff frequency of the LPF in LF of the PLL.According to Fig. 4, it can be seen that the closed-loop transfer function under the input signal θ(s) and the disturbance signal N(s) is the same.It can be given by where k vco is the gain of VCO, and k vco = U.
Through some simple theoretical derivations, the output θ(s) and the error E(s) in Fig. 4 can be obtained as From ( 14), it can be seen that the closed-loop phase error E(s) based on IPT contains the low-frequency component of N(s) is shown in Fig. 13.This will cause phase fluctuation of PLL output, which in turn affecting the stable operation of the GCI.In addition, the conventional IPT-PLL has not solved the issue of phase-locked loop output double frequency ripple caused by grid frequency variations.

Improved IPT-PLL
This paper proposes an improved strategy for the shortcomings of the conventional IPT-PLL, as shown in Fig. 5. Since T α (s) is a bandpass filter, it can filter out the DC component and higher-order harmonics of the grid voltage, while preserving all the information of the fundamental frequency.In this paper, u α (s) is taken as the research object, its delay T/4 is used to obtain the corresponding orthogonal component u β ′(s) .And the fractional delay caused by grid frequency variations is estimated using Lagrange interpolation polynomials to solve the problem of computational accuracy.Then the q-axis component is obtained through the Park transformation, and PD is realized.Considering the influence of low-order harmonics in the grid voltage on the PLL, a multi-resonant (MR) controller is paralleled with the PI controller to improve the anti-interference performance of PLL against low order harmonics.

Improved T/4 Delay Realization
The transfer function of the T/4 delay element can be represented as: where f s is the switching frequency of the GCI, f is the output frequency of the PLL.If the grid frequency varies, f s / f may not be an integer.It can be represented as the sum of its integer part I, and its fractional part F.
In order to improve the accuracy of T/4 delay calculation, the fractional order delay element can be approximated using Lagrange interpolation 26 , z −F can be approximated by ( 11) Table 1 shows the calculation formulas for the corresponding interpolation polynomial coefficients as N varies from 1 to 4.
Figure 6 shows the frequency response curves of different-order Lagrange interpolation polynomials approximating the fractional-order delay element at F = 0.2, 0.5, and 0.8.Here, N = 0 represents the original fractionalorder delay element.It can be observed that when N is set to 1 ~ 3, the calculated interpolation polynomials can approximate the original delay element within a certain frequency range.However, when N is set to 4 or higher, the obtained interpolation polynomials exhibit significant differences in both magnitude and phase compared to the original element.Taking into account the magnitude-frequency and phase-frequency characteristics, polynomial with N = 3 is chosen to approximate the fractional-order delay element.
Based on the previous analysis, the implementation method of T/4 delay with frequency adaptivity can be obtained as shown in Fig. 7.

Harmonic issues and solutions in IPT-PLL
Harmonic issues in IPT-PLL By using the improved phase estimation method for IPT proposed in this paper, the complex power grid voltage expression (7) and the bandpass filter characteristics of T α (s) can be used to obtain the result shown in Fig. 5.
By using the improved IPT phase detection method proposed in this paper, the expression of u α ′ , as shown in Fig. 5, can be derived from the complex power grid voltage expression (7) and the bandpass filter characteristics of T α (s).
where U h ′ represents the amplitude of the harmonic voltage contained in u α ′ , which has a certain attenuation relative to U h due to the effect of filter T α (s).
Under the effect of T/4 delay, the orthogonal signal u β ′ corresponding to u α ′ can be written as Table 1.Lagrange interpolation polynomial coefficients for fractional-order delay elements.(N = 1, 2, 3, 4).

N d(0) d(1) d(2) d(3) d(4)
Vol.:(0123456789)  17) and ( 18) can be rewritten as From Eq. ( 19), it can be seen that u α ′ and u β ′ constructed by the T/4 delay module include fundamental com- ponents, negative sequence harmonic components such as the 3rd, 7th, and 11th harmonics, as well as positive sequence harmonic components such as the 5th, 9th, and 13th harmonics.By performing a Park transformation on u α ′ and u β ′ , the q-axis component u ′′ q is given by According to Eq. ( 20), it can be seen that the q-axis component based on the improved IPT phase detection contains harmonic components such as ± 4, ± 8, and so on, which have an impact on the PLL.( 18)  The solution to the harmonic problem The harmonic components of u ′′ q can be regarded as disturbance signals to the PLL.Insufficient gain of the PI controller at harmonic frequencies prevents the elimination of low-order harmonic signals on the PLL.The resonant controller features a sine transfer function with a specified resonant frequency, where the gain can theoretically reach infinity.This effectively reduces steady-state error to zero in response to step changes in a reference signal at that frequency 27,28 .This paper proposes implementing parallel resonant controller of various harmonic frequencies alongside a conventional PLL PI controller to suppress harmonic interference signals.
The transfer function of the MR controller is given as follows where k rh and ω ch are the resonant gain and cutoff frequency of the resonant controller at hth harmonic frequen- cies, respectively.Considering the suppression effect of bandpass filter T α (s) on high-order harmonics of the grid voltage, it can be assumed that the orthogonal components u β ′ contain harmonics from the 3 rd to the 9th order.Therefore, resonant controllers at the 4th and 8th harmonic frequencies can be added to the PI controller in the LF of the PLL. Figure 8 shows the Bode plot of the MR controller (h = 4, 8) with k rh = 50 and ω ch = 4 rad/s.From the figure, it can be seen that the resonant controller at the hth harmonic frequency has infinite gain at the ± hth harmonic frequencies, which enables the suppression of disturbance signals at the ± hth harmonic frequencies.

Tuning procedure of the improved IPT-PLL
In the improved IPT-PLL shown in Fig. 5, assuming the system is in steady state, the grid voltage contains loworder harmonics such as the 3rd to 9th harmonics.Equation ( 20) can be approximated as follows The improved IPT-PLL linear model structure diagram can be obtained as shown in Fig. 9.

The corresponding open-loop transfer function G o (s) is
According to the conclusion obtained from 26 , the PI controller determines the bandwidth and DC gain of the open-loop system, while the resonant controller determines the gain at the resonant frequency of the openloop system.It can be considered that the PI controller and the resonant controller are decoupled, and the phase margin (PM) of the control system can be used as a constraint to separately design each controller.

Design of PI controller
The open-loop transfer function G o1 (s) of the IPT-PLL linear model, as shown in Fig. 9, can be obtained by ignoring the influence of the MR controller.where φ z = arctan(ω co ω z ) , φ p = arctan(ω co ω p ).
The PM expressed in ( 26) of the open-loop system can be obtained from Eq. ( 24).
Differentiating Eq. ( 26) with respect to ω co and setting it to zero.Then ω co can be calculated as Hence the phase margin (PM) of the PLL control loop is maximized, if the control system loop bandwidth ω co satisfies Eq. ( 27).In the meantime, sin(φ z ) = cos(φ p ) , ω co = K.
Define the parameter b = ω p ω z , and PM can be calculated as It can be seen that the maximum PM is exclusively determined by b.In this paper, the value of ω c1 for the LPF in LF is set to 2000π rad/s.According to ( 27) and ( 28), Fig. 10 illustrates the PM and ω co for different b values from 1 to 13.It shows that, if the PM is set to 50°, the value of b can be chosen as 3 and ω co = 3626 rad/s which are derived by ( 28) and ( 27) respectively.From ( 25) and ( 27), the parameters of PI controller can be computed as k p = 11.7,k i = 24,495.

Design of MR
The MR controller shown in Fig. 9 includes two sets of parameters: resonant gain and open-loop cutoff frequency ω ch .Considering frequency selectivity 29 , it is possible to choose the same open-loop cutoff frequency for each resonance controller.In this paper, ω ch is set to 4 rad/s.And then the resonant gains k r4 and k r8 , which are 4 times and 8 times the fundamental frequency resonant controllers respectively, are calculated based on the phase constraints.Taking the example of a PI controller with a resonant controller that is 4 times the fundamental In order to ensure system stability, the phase of system at 4 ω must satisfy the following inequality Figure 11a shows the Nyquist plot of G 02 (s) for different values of k r4 .It can be observed that as k r4 increases, the phase at the resonant frequency approaches − 180°.For k r4 < 400, Eq. (30) holds true.In this paper, k r4 is chosen to be 300.And the phase at the resonant frequency is − 160°, providing a phase margin of 20° at the resonant frequency.Similarly, the open-loop transfer function G 03 (s) of the PI controller with an 8 times resonant frequency resonant controller of IPT-PLL is given by According to the Nyquist plot shown in Fig. 11b, when k r8 is set to 200, the phase at the resonant frequency is − 165°, and the open-loop system has a phase margin of 15° at the resonant frequency.
The Bode plot of the open-loop transfer function (23) for the improved IPT-PLL scheme, utilizing the determined parameters of the PI controller and MR controller, is depicted in Fig. 12.It is clear that the addition of (29) the resonant controller does not impact the stability of the initial system with the PI controller, as each resonant controller operates independently.At specific resonant frequencies, there is a significant gain enhancement, effectively reducing harmonic interference at those frequencies within the PLL control loop.

Performance Analysis of the Improved IPT-PLL
For the open-loop transfer function (23), the frequency domain expression of the error E c (s) in the improved IPT-PLL scheme shown in Fig. 9 can be obtained as Comparing the expression of the error signal E(s) for the conventional IPT-PLL in (13), the amplitudefrequency characteristics of the PLL error signal for both schemes are plotted in Fig. 13.It can be observed that the improved IPT-PLL effectively suppresses the influence of low-order harmonics from the grid on the PLL.

Experimental results
Figure 14 illustrates the integrated power supply system for the load of a traction substation at a railway station of the National Railway Group, combining the power grid and energy storage.The improved IPT-PLL proposed in this paper was applied to the GCI to accurately capture the phase information of the power grid voltage.The phase-locked loop algorithm was executed using TI's DSP (TMS320F28377) as the central controller.The specific parameters of the experimental setup are outlined in Table 2.The improved IPT-PLL incorporates two park transformations, three LPFs, one PI controller, two resonant controllers, one Lagrange interpolation, and one integral controller.In tests conducted on a floating-point DSP, the execution time was found to be under 19 microseconds, significantly lower than the 100-microsecond switching period of the GCI.Importantly, the  operation of the GCI remains unaffected by the improved IPT-PLL.Furthermore, the pointed out PLL program occupies no more than 5 k bits of memory capacity.The waveforms of the PLL output frequency f , phase θ and phase error △ θ are shown in Fig. 15a,b respec- tively, when the grid voltage amplitude abruptly drops from 311 to 70 V and abruptly rises from 70 to 311 V.It can be observed that when the grid voltage amplitude undergoes a sudden change, the PLL control system stabilizes within 10 ms.Meanwhile, the steady state phase error of the PLL output does not exceed 0.03 rad. Figure 15c,d show the waveforms of the PLL output frequency f , phase θ and phase error △ θ when the grid voltage frequency drops from 50 to 47 Hz and increases from 50 to 53 Hz, respectively.It can be observed that the PLL is able to track the grid frequency accurately within 20 ms and the steady state phase error are no more than 0.02 rad.The improved IPT-PLL scheme enables accurate tracking of the grid frequency.
Experimental comparisons are conducted to verify the advancement of the improved IPT-PLL over the conventional IPT-PLL.In Fig. 16, a comparative experiment is performed with a grid voltage containing an 8 V DC offset.The output waveforms of the conventional IPT-PLL, shown in Fig. 16a, reveal disturbances at twice the fundamental frequency and phase error due to the DC offset in the grid voltage.However, Fig. 16b displays the experimental waveforms of the improved IPT-PLL.By leveraging the bandpass filter characteristics of T α (s) as described in Eq. ( 5), the proposed method effectively suppresses the DC component in the grid voltage, thereby eliminating the impact of DC offset on the output frequency of the PLL.Moreover, the phase error remains stable, without any pulsation, and stays below 0.03 radians.
A comparative experiment in Fig. 17 examines the grid voltage with low-order harmonics, focusing on harmonics ranging from the 3rd to 9th orders.The 3rd harmonic content is at 3%, the 5th harmonic content at 7.5%, the 7th harmonic content at 5.0%, and the 9th harmonic content at 2.0%.In Fig. 17a, the experimental waveform of the conventional IPT-PLL is depicted.It is observed that the output frequency and phase error of the conventional PLL exhibit multiple frequency oscillation components like the 2nd, 4th, and 6th harmonics, impacting the PLL's performance.On the other hand, Fig. 17b showcases the experimental waveform of the improved IPT-PLL.By incorporating multi-harmonic resonant controllers, the PLL's output frequency and phase      Compared to the conventional IPT-PLL, the improved version not only addresses DC offset and harmonic issues in complex single phase power grid voltage but also mitigates problems arising from voltage frequency variations.The experimental results suggest that the improved IPT-PLL achieves a control accuracy of less than 1% and exhibits commendable dynamic performance.

Conclusion
This paper presents an improved IPT-PLL technique designed for single-phase GCIs connected to complex single phase power grids.The primary objective of this improvement is to accurately capture fundamental voltage phase and frequency information under conditions with DC offset, low-order harmonics, and fluctuating frequency, thereby facilitating seamless grid connection of inverters.
This study examines the limitations of the traditional IPT-PLL, such as inadequate frequency adaptability, susceptibility to DC offset and low-order harmonics.The improved IPT-PLL incorporates the reverse Park transformation output of the IPT as the reference grid voltage, introducing a T/4 delay to create orthogonal components and implementing a PI + MR controller.Furthermore, a fractional delay approximation of T/4 delay is achieved using Lagrange interpolation polynomial to enhance the frequency adaptability of the phase-locked loop.The design strategies for the PI and MR controllers in the improved IPT-PLL are discussed, followed by a thorough analysis of the system's performance to evaluate its effectiveness.Experimental validation of the proposed technique and design approaches is conducted at a railway station traction substation operated by a national railway group.Results from experiments in complex grid environments show that the fundamental phase of the grid voltage has an error of no more than 1%, with a dynamic time within 10ms.The proposed improved IPT-PLL method shows excellent dynamic and steady-state performance, along with a robust adaptability to complex power grid conditions.In comparison to the conventional IPT-PLL, the improved IPT-PLL exhibits notable advancements (Supplementary Information file 1).

Figure 1 .
Figure 1.Single phase microgrid of traction power supply.

Figure 6 .
Figure 6.Approximation of different fractional-order delay elements with different Nth-order interpolation polynomials.

Figure 7 .
Figure 7. Implementation method of T/4 delay with frequency adaptability.

8 .
Figure 8. Bode plot of the MR controller.

Figure 12 .
Figure 12.Bode plot of the proposed improved PLL open-loop transfer function.

Figure 13 .
Figure 13.Comparison curve of PLL control loop error signal.

Figure 14 .
Figure 14.Railway load power supply system.
controller k p = 11.7,k i = 24,495 Lagrange interpolation polynomial order N = 3 Parameters of MR controller k r4 = 300, k r8 = 200, ω ch = 4 rad/s Cutoff frequency of the LPF ω c = ω c1 = 2000π rad/s The gain of VCO k vco = 311error display minimal low-order harmonic fluctuations, effectively mitigating the impact of low-order harmonics in the complex power grid voltage on the PLL.

Figure 15 .
Figure 15.Phase locked waveform of voltage dynamic.

Figure 17 .
Figure 17.Comparative experiment with low order harmonics.

Table 2 .
Parameters for the experimental setup.