One-Cycle Fourier Finite Position Set PLL

This work introduces a new method for computing the angular position of the voltage of the grid—based on a finite set of angles—in the condition of failures in the distribution systems, as symmetrical and asymmetric voltage sags, unbalance, harmonic distortions, and frequency changes. This method is inspired in the model predictive control finite control set principles. In this way, the proposal employs the One-Cycle Fourier filter (OCF) to estimate the positive sequence of the voltage vector into the stationary αβ-frame. The positive sequence voltages extracted from this filter is then handled by an algorithm that is implemented by a finite position set (FPS) for estimating the phase angle. In this way, the minimized cost function chooses the optimal angular position while using the predicted behavior of the grid voltage vector elements in dq frame. The structure, called One-Cycle Fourier Finite position Set Phase Locked Loop (OCF-FS-PLL), here is a composition of the OCF and the FPS. The results that were obtained in an experimental test bench validate the proposed method.


Introduction
One of the common uses of Phase-Locked Loop (PLL) is for the grid synchronization. Its application is essential and widely used in grid-connected power converters, such as distributed generation, static synchronous compensators, uninterrupted power supplies, and active power filters. The PLL is basically composed by three main components: the phase detector (PD), the loop filter (LP), and the voltage-controlled oscillator (VCO) [1]. Most of the use of PLL needs to occur in a fast and accurate way for detecting the phase angle of the positive sequence component, for the stable operation and dynamic recovery of these systems, especially under cases of distorted grid conditions, such as three-phase imbalances, harmonics, and low-voltage ride-through. Therefore, only the use of PLL is not sufficient. For such disturbance conditions, it becomes necessary to add a technique for extracting the positive sequence component.
The Synchronous Reference Frame PLL (SRF-PLL) is the most popular PLL used for synchronization in the control of distribute generation (DG) [2,3], where the threephase voltages of the grid are decomposed into synchronous voltages v d and v q . The mentioned technique can be degrade its performance due to voltage distortions caused by the harmonics elements or due to the unbalanced voltages. Approaches for this limitation in the SRF-PLL were proposed, as in [4]. In this work, the SRF-PLL processes the computed positive sequence. In this way, it permits canceling out the effect of any harmonic elements from the positive sequence that is represented in the dq frame using a decoupling network.
The grid voltage with 90 • -delayed versions without harmonics elements in three from four enhanced single-phase PLLs (EPLL) was presented in [5]. The six signals are employed to calculate the fundamental positive sequence while using the instantaneous sequence component (ISC) theory. The mentioned theory that allows for the sequence elements determined in the frequency-domain be computed in the time-domain is presented in [6], where six signals are employed to estimate the fundamental positive sequence. To realize the delay of 90 • it is used the relation e ±j2π/3 = −1/2±( √ 3/2)e jπ/2 , which is, a gradient descend-based method to calculate the grid voltages instantaneous sequence components.
In order to build orthogonal signals, a dual second order generalized integrator (DSOGI) pre-filter was implemented [7], providing an effective harmonics attenuation that is caused by the negative sequence component due to unbalanced voltages [8]. However, the second-order generalized integrator (SOGI) can degrade its operation due to the presence of harmonics elements and frequency deviations [9]. The work [10] introduces one proposal to fix the cited problems. The quadrature voltage amplitude employing the frequency diversion a proposal was provided in [11] order to eliminate the secondharmonic oscillations in the computed parameters of SOGI-PLL correcting. To eliminate the presence of harmonics elements in the quadrature voltages, filters are used for harmonic robustness [12]. Adaptive notch filters (ANF) to build orthogonal signals using a sinusoidal wave were also proposed in [13,14]. The works [13] suggest inserting control loops into DSOGI-PLL and in the ANF-PLL to eliminate the DC component that is caused by saturation in the core of the voltage transformers or by second-order harmonics across the DC inverter bus.
In Ref. [15], the authors propose complex-coefficient filters (CCF-PLL) with the capability of harmonic rejection and also with fast dynamic response. In Ref. [16], a proposal to tuning of PI controllers enhances the CCF-PLL. A version for this proposal in the z domain can be seen in [17]. In order to reduce higher order harmonics and eliminate the interference arising from the negative sequence, complex filters of second and third-order is proposed in [18]. An effective frequency feedback in the loop of the PLL is implemented in the CCF-PLL as a proposal in [16].
A filter in the inner of the control loop of the PLL with the insertion of a lead compensator and a moving-average filter (MAF) rejects voltage asymmetrics and also harmonic interferences counteracting the dynamics that were introduced in that control loop [19]. A proportional gain component incoroprated in the MAF enables the PLL to reject loworder harmonics [20].
In Ref. [21], a one cycle Fourier PLL (OCF-PLL) is presented. This method employs the OCF to estimate positive sequence of the voltage of the grid that feeds the SRF-PLL; even the voltage has distortions caused by harmonics and DC elements.
Hence, OCF-PLL implementation fixes the frequency adaptability that is present in DSC-PLL and the DSOGI-PLL, providing adaptability in the case of frequency deviations. This implementation is also able to reject DC components of the voltages and with the capability to filter harmonics of different orders.
It is worth mentioning that, in all the works mentioned, PI controllers are used in their implementations of PLLs, which have to define their gain parameters for each operation point.
Model Predictive Control (MPC) propositions [22][23][24][25][26][27][28] have been presented in control scheme for power converters-inverters. The finite position set-phase locked loop (FPS-PLL) applied to the permanent-magnet synchronous generators (PMSG) was presented in [29,30]. The FPS-PLL stimates the optimal rotor position of the PMSG while using a finite number of rotor positions and the PMSG equations in the minimized cost function. This application do not need the classical PI controller. This a solution was not employed in grid voltage synchronization applications.
This work presents a new method for estimating the phase angle of the voltage of the grid based on a finite set of angles in the condition of failures in the distribution systems as symmetrical and asymmetric voltage sags, unbalance, harmonic distortions, and frequency changes.
In this way, the proposal employs the one-cycle Fourier filter (OCF) in order to estimate the positive sequence of the voltage vector into the stationary αβ-frame. The positive sequence voltages extracted from this filter are then handled by an algorithm that is implemented by a finite position set (FPS) for estimating the phase angle. The structure that is composed of the OCF and the FPS is called one-cycle Fourier finite position set phase locked loop (OCF-FS-PLL). The experimental results show the good performance of the proposed work. A Dual Second-Order PLL (DOSGI-PLL) is used to compare it with the proposed work for balanced grid voltage with sag in the presence of the 5th and another voltage test under presence of harmonics as 5th, 7th, 11th, 13th, 17th, and 19th.
The rest of this work is structured in three sections. Section 2 is a systemic description for both of the algorithms: One-cycle Fourier and Finite Position Set. Section 3 presents the experimental results to evaluate the behavior of the OCF-FPS-PLL proposed and Section 4 concludes the article.

System Description-One-Cycle Fourier Finite Set Predictive Control PLL
The proposed work has two main components. The first component takes advantage of the extraction of the positive sequence while using the one-cycle Fourier filter (OCF), which is referred in [21], and the second one uses the finite position set (FPS) idea, as referred in [29].  The positive sequence is present when the phase voltages are sinusoidal, with − → v s rotating counterclockwise and ω and − → v s being positive constants. If the power grid suffers an unbalance, then the vector − → v s will be the sum of two vectors: one of the negative sequence, − → v − that rotates clockwise, with angular velocity -ω, and another of positive sequence, − → v + , rotating counterclockwise with velocity ω. The magnitudes of these vectors will be constant V − and V + . Accordingly, for the positive sequence, the angular position will be θ + = ωt + φ + and, for the negative sequence, it will be θ − = −ωt + φ − .

One-Cycle Fourier Algorithm
The v α signal that is distorted by harmonics and a DC component can be represented as: The fundamental components X c 1 and X s 1 can be computed according the OCF algorithm as: In the same way: where the fundamental period is represented by T. So, according [21]: Using the Equations (4), the magnitudes of the positive and negative sequences can be expressed: and the initial phase-angles by: The positive sequence can be computed while using the following set of equations: where the nominal frequency is ω = ω o .

Finite Position Set
Using the extraction of the positive sequence with the OCF algorithm, an algorithm utilizing the (FPS) predictive control scheme uses the finite number of angle positions to predict its future behavior over a given prediction horizon.
The first step is to sample and hold the positive sequence that is extracted from the first component, as shown in the Figure 2, by the block ZOH (zero order hold). That is, this block will obtain samples v and v + c . The continuous-time for the grid positive voltage, v + g,α and v + g,β , in the reference αβframe is shown by Equation (8) and the same voltage v + g,q and v + g,d in the reference dq-frame by Equation (9), below: where θ 1 is the angular position of the grid positive voltage.
Adopting the grid voltage-oriented as the reference frame, aligning the direct axis of the reference system with the vector of voltage, i.e., the grid voltage q-component is zero, as stated in Equation (10) This second part works with samples. Accordingly, Equations (11) and (12) are the discretized Equations (8) and (9).
The strategy is based on a finite number of positions (eight positions for every iteration) due to the fact that the phase of the voltage of the grid changes between 0 and 2π rad. Its implementation was based on the iteration-based algorithm that was presented in [29].
Hence, defining the initial position θ in [k, i] in order to obtain a finite number of angles, through the use of two nested iteration loops with indices i and j (each linked to discrete values), a finite number of positions for the grid positive sequence q-component can be obtained. The discretized angular position can be expressed as: where: Now, a cost function is defined in order to select the optimal (estimated) angular position: Thus, the angular position that minimizes the cost function was obtained using 64 interactions. Hence, v + g,q [k, i, j] reaches the closest value of the zero. In order to understand how the technique works, suppose that θ in [k,1] = 0 rad and g in = ∞. Looking at Equation (14), in the first round of the first loop, (i = 1) and ∆θ[k,1] = π 4 rad, and using the Equation (13), the generated angles are: −π, − 3π 4 , − π 2 , − π 4 , 0, π 4 , π 2 , 3π 4 rad. With each one of these values, θ 1 [k,i,j] permits computing the q-axis element v + g,q . In this way, the second round employs the angle that allows for minimizing the cost function θ in [k,2]. Hence, the accuracy of the technique is increased by a factor of 2. In this way, eight new angular positions can be computed while using Equation (13). Hence, they can be π 8 , π 4 , 3π 8 , π 2 , 5π 8 , 3π 4 , 7π 8 rad. The algorithm reaches the optimal grid angular position due to the increment of the number of iterations. Continuing with the iteration, in the last one (i = 8), the estimator grid angular position is found. Thereby, the algorithm provides an accuracy of 1 2 × π 4 × 2 −7 = π 1024 = 0.003 rad. To clarify, a supposition that π 2 is the optimal angle computed in the first round of the loop. Hence, in the second round (i = 2) and ∆θ[k,2] = π 8 rad, and so on. Figure 3 shows the flowchart of the proposed search technique. The estimated angular speedω 1 [k] (Equation (16)) is then calculated, as indicated in Figure 2, where T s is the sampling time.
where k−1 and k are the previous and actual values at the sampling instants, respectively. A second-order Butterworth filters the signalω 1 [k]. Its output (ω 1 ) is the estimated angular speed voltage (ω 1 [k]) filtered, as depicted in Figure 2.
No matter how time consuming this solution is, it is better when compared to conventional PLLs, as tuning often becomes time effort. This solution has a long execution time when compared to the SRF-PLL. However, the systems of energy conversion systems employs sampling frequency below (≤5 kHz) [31]. In this way, the sampling period is enough to compute the proposal technique and the control algorithm due to the high capacity of the digital signal processors.
One of the drawbacks of the proposed OCF-FS-PLL is the ripples in the estimated angular position when compared with the conventional SRF-PLL. The mentioned ripple was produced because of the finite set of angles that permits to select the optimal angular position. Hence, the mentioned angle may not represent the actual value of the position exactly. Accordingly, this angular position contains (much) lower oscillations.
The precision of the proposal can be increased when the number of rounds are improved. Hence, the oscillations can be smoothed in the estimated position/frequency. In this way, a trade-off between precision and computational burden must be reached. In this work, the values of the rounds were fixed to i, j ∈ [1, 8] and a sampling frequency as 50 kHz.
A point to be highlighted is that, although the OCF-FS-PLL rejects harmonics very well, the operation with the presence of interharmonics is not supported by it, as it is designed according to the fundamental component; therefore, being the subject of future work.

Experimental Results
The evaluation of the proposed OCF-FS-PLL performance in a experimental bench depicted in Figure 4 was built using programmable power source connected to a threephase restive load, digital signal processor (DSP) from Texas Instruments TMS 320F28335 and electronic boards for signal conditioning and data acquisition of voltage signals to interface with the TMS 320F28335 DSP. The DSP was programmed while using the Code Composer Studio of Texas instruments and one has a sampling frequency of 50 KHz. The algorithmic rule computes the ω 1 , the estimated angular speed, and the constructed grid voltage positive sequence components. Using the programmable power source, it is possible to set up a maximum voltage value of 220 V and power of 3 kW, and it can program performing unbalanced and balanced voltage sags while adding or not harmonic components. It is also possible to program the fundamental component with harmonics up to the 30th order. The DSP is a C2000 real-time micro-controller that includes a development ANSI C/C++ compiler/assembler/linker for easy adaptation from simulation code of MATLAB. Figure 5 presents a block diagram of the experimental platform to clarify the connections between the components of the practical test.

Unbalanced Voltage with Sag in Two Phases
In this test, a sag was inserted in two phases of the grid voltage. This insertion was at a time near 1.103 s and it was removed near 1.445 s, as shown in Figure 6. This figure shows the unbalanced voltage sag in the two phases of the grid voltage (Figure 6), the phase for the OCF-FS-PLL (Figure 7), the d-component from the OCF-FS-PLL, the DSOGI-PLL, and the SRF-PLL (Figure 8), and the estimated output frequency for them ( Figure 9). In this last figure, the SRF-PLL output frequency of 120 Hz can be seen [32].
The test showed that the OCF-FS-PLL has a better dynamics when compared to DSOGI-PLL, as can be seen in Figure 9 and Table 1. M p is the percentage of overshoot, t s is the settling time in frequency and in the d-component (V d ). The column oscillation shows the limits in frequency amplitudes and the column ∆V d is the variation range for V d in p.u.

Balanced Grid Voltage Sag under the Presence of 5th Harmonic
In this test, it was inserted in the grid voltage with the presence of 5th harmonic. A balanced voltage sag was inserted at a time close to 0.724 s, and it was removed near 1.057 s, as shown in Figure 10.  Figure 10 shows the balanced voltage sag under the presence of 5th harmonic and Figure 11 shows the phase of the OCF-FS-PLL. Figure 12 shows the d-component from the OCF-FS-PLL, the DSOGI-PLL, and the SRF-PLL, and Figure 13 shows the estimated output frequency for them. In the same way, the test showed that OCF-FS-PLL has better dynamics than DSOGI-PLL, as can be seen in Figure 13 and in Table 1.
The obtained result also showed that OCF-FS-PLL has better THD (Total Harmonic Distortion) when compared to DSOGI-PLL. This is due to the better immunity to harmonic noise being performed by the OCF filter, as can be seen in Table 2.   In this test, it was inserted a balanced grid voltage distorted by 3.94% in 5th, 3.15% in 7th, 2.36% in 11th, 1.50% in 13th, 1.10% in 17th, and 0.70% in 19th harmonics components. Figure 14 shows the input balanced grid voltage that was distorted by harmonics. Figure 15 shows the phase of the OCF-FS-PLL. Figure 16 shows the d-component from the OCF-FS-PLL, the DSOGI-PLL, and also the SRF-PLL, and Figure 17 shows the estimated output frequency for them.    The test showed that OCF-FS-PLL has better dynamics than DSOGI-PLL, as can be seen in Figure 17 and Table 1. As can be seen, the results showed that OCF-FS-PLL has better THD (Total Harmonic Distortion) when compared to DSOGI-PLL. As already mentioned, this is due to the better immunity to harmonic noise being performed by the OCF filter, as can be seen in Table 3.

Balanced Grid Voltage with Frequency Deviation
In this test, a change in frequency from 60 to 65 Hz was done at 0.4 s. Figure 18 shows the input balanced grid voltage with a deviation in the frequency from 60 to 65 Hz. Figure 19 shows the phase of the OCF-FS-PLL. In Figure 20, the d-component for the OCF-FS-PLL, the DSOGI-PLL, the OCF-SRF-PLL, and the SRF-PLL can be seen. Additioonally, Figure 21 shows the transient state in response to a step in the frequency from 60 to 65 Hz for all of them. A point to be noted is that the OCF-SRF-PLL requires two cascading blocks in the case of frequency adaptability, designated as AOCF-PLL, as presented in [21]. In the OCF-FS-PLL, there is no need.
Again, the test showed that OCF-FS-PLL has better dynamics than DSOGI-PLL, as can be seen in Table 1.

Conclusions
In this paper, a new Finite Position Set Predictive Control PLL has been proposed, which enjoys the One-cycle Fourier (OCF) filter to extract the grid positive sequence. This proposal employs the model predictive control fundamentals, in which a finite set of angles using the discrete angular position of the voltage of the grid. Hence, the optimal angular position is chosen by means of a minimized cost function.
In this context, the presented results permits endorsing the performance of the proposal. Additionally, the proposal (OCF-FS-PLL) has better performance when compared with another solution, such as SRF-PLL, DSOGI-PLL, and OFC-SRF-PLL, for the tests under unbalanced voltage in two phases, voltage balanced sag under the presence of 5th harmonic, voltage distorted by harmonics components as 5th, 7th, 11th, 13th, 17th, and 19th and balanced grid voltage with a frequency deviation from 60 to 65 Hz. However, the algorithmic rule can have a high computational burden with the increase of the number of interactions. Additionally, the proposal when the voltages are distorted by the interhamonics elements is a challenge for future works.
Using this work, three improvements could be observed in the implementation of PLL. As a first, it was shown that the OCF filter used in the OCF-FS-PLL has a better noise immunity in the presence of harmonics. The second improvement was the best response in the cases of frequency deviations in the electrical grid when compared with OCF-SRF-PLL. It is also noteworthy here that the OCF-SRF-PLL requires two cascading blocks in the case of frequency adaptability, while the OCF-FS-PLL does not. Additionally, as a third, the implemented Finite Set (FS) algorithm in the PLL in this work has the advantage of not using PI controllers, which needs to gain adjustments for each operation point.