POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 19 |NUMBER: 1 |2021 |MARCH Comparative Analysis of Lattice-based All-Pass Filter and Second Order Generalized Integrator as Orthogonal System Generator of a PLL Luciano Emilio BELANDRIA1, Nancy Alejandra AGUDELO1, Joan BERGAS-JANE 2 1Department of Electronic Engineering, National Experimental University of Tachira, Universidad, 5001 San Cristobal, Venezuela 2Center of Technological Innovation in Static Converters and Drives, Department of Electrical Engineering, Polytechnic University of Catalonia, Diagonal 647, 08028 Barcelona, Spain lb[email protected]e, [email protected],
[email protected] DOI: 10.15598/aeee.v19i1.4002 Article history: Received Nov 13, 2020; Revised Jan 31, 2021; Accepted Feb 10, 2021; Published Mar 31, 2021. This is an open access article under the BY-CC license. Abstract. This paper presents a steady-state comparison of two methods that generate an orthogonal voltage system for a single-phase Phase-Locked Loop (PLL) structure: a widely accepted one based on a Second Order Generalized Integrator (SOGI) and a new one based on a All-Pass Filter (APF) with Lattice structure. Both methods are very attractive because of their simple digital implementation, low computational load and good performance under harmonically distorted grid conditions and variable frequency, so they are a good alternative to other known methods. The paper derives and analyzes the full state space models of the two methods. It is shown that these two methods are equivalent in the most common operation conditions of distributed energy resources, although the APF structure is clearly better than the SOGI one because it maintains its orthogonal generation ability for any higher notch frequencies and any lower sampling frequencies. The comparative analysis were validated by simulation using MATLAB/Simulink and experimental results using a fixed-point DSP. Keywords All-Pass Filter, Orthogonal Signal Generator, Phase-Locked Loop, Single-Phase PLL, Notch Filter, Second Order Generalized Integrator. 1. Introduction The use, development and deployment of Distributed Energy Resources (DERs), especially renewable resources, has increased dramatically in the last decade. This is changing the paradigm of electric generation [1], [2], [3], and [4]. Single-phase grid-connected inverters are found in many DERs, such as photovoltaic inverters and energy storage devices [5] and [6]. Inverter system control must ensure that the power generation system is synchronized with the grid, and that phase angle jumps are detected for reliable power delivery [7] and [8]. Moreover, it must ensure that gridconnected system performance complies with operation requirements under the most common distortions, such as line harmonics, notches, voltage dips, rises and falls, and frequency variations. Phase, frequency and amplitude characterize the single-phase grid voltage signal and knowledge of these parameters is fundamental in the design of gridconnected inverter systems [9], like the one in Fig. 1. In order to meet the new requirements of network codes and optimize inverter performance, a PLL is used for rapid synchronization with the grid. The main task of the PLL is to accurately detect the actual voltage phase angle at the Point of Common Coupling (PCC), even in the presence of voltage harmonics and unbalance [10] and [11]. This structure, for example, should be used to provide any unity power factor operation which involves synchronization of the ©2021 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 1
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 19 |NUMBER: 1 |2021 |MARCH DC Power Source PLL Inverter Filter Transformer Grid PWM PCC vac iac q , f, V RMS Controller Fig. 1: Grid-connected power conversion systems. inverter output current with the grid voltage and to give a clean sinusoidal current reference, among other functions. For three-phase applications, some of the recent and most popular grid synchronization techniques for detecting the phase and frequency of the mains voltage signal using PLL are presented in [12], where a complete study was carried out on the control strategies of Distributed Generation Power Systems (DGPSs) under ideal and non-ideal network conditions. These techniques are: basic structure traditional Synchronous Reference Frame PLL (SRF-PLL), Enhanced PLL (EPLL), Dual Second Order Generalized Integrator PLL (DSOGI-PLL), Moving Average Filter (MAF) and Decoupled Double Synchronous Reference (DDSRF). Indeed, the single-phase structure of PLLs limits the use of some well-known three-phase control strategies [13] and [14]. In single-phase systems, less is known about the network operating conditions than in threephase systems. That is why the most advanced methods used to overcome this limitation must create an orthogonal voltage system [15] and then exploit the existing three-phase control methods. In this line of research, several advanced PLL techniques, have been proposed for single-phase applications [16], [17], [18], and [19]. dq Voltage Monitoring Frequency and Phase Estimator Orthogonal System Generator a b V V VV V V a b RMS q d f q Fig. 2: PLL using the park transformation. General structure of a single-phase PLL algorithm based on Orthogonal Signal Generator (OSG), also called Quadrature Signal Generator (QSG), for grid synchronization is presented in [15], [16], [20], [21], [22], [23], and [24]. This structure can use the Park Transformation, as shown in Fig. 2 or the arc-tangent function depicted in Fig. 3. The main difference between OSG-based single-phase PLLs lies in the way orthogonal voltage systems are generated. Voltage Monitoring Frequency and Phase Estimator Orthogonal System Generator V V V V a b RMS f q b a v v tan 1_ + q Fig. 3: PLL using the arctangent function. The OSG-based single-phase PLL structures, Fig. 2 and Fig. 3, found in the state-of-the-art methods are basically formed by two blocks. In the first, an orthogonal system in phase with the above signal is generated from a single reference sinusoidal signal. The second block uses either a feedback loop through the αβ to dq transformation or the arc-tangent function to determine the phase angle of the reference signal. The methods for OSG of a single-phase PLL must be easy to apply in practice. Moreover, the OSG must deliver the filtered output without any delay, because of its resonance at the fundamental frequency, not to be affected by frequency changes. The most common methods used in the literature to generate the orthogonal voltage are presented in [15], [19], [20], [21], [25], [26], [27], [28], [29], [30], [31], and [33]. One using a block of a Transport Delay function is shown in Fig. 4. It introduces a 90 degree phase shift with respect to the input signal [21] and [28]. Another method uses the Hilbert Transformation [29], depicted in Fig. 5, and the Inverse Park Transformation [19], [30], and [31], shown in Fig. 6. However, these methods have one or more of the following deficiencies: frequency dependence, high complexity, non-linearity, and poor or no filtration. V V V a b -1 T/4 delay Fig. 4: Transport delay function. To improve the deficiencies mentioned in the OSG methods, an improved Average Filter (AF) is proposed in [32], with a simple structure and implementation, which, integrated into OSG, attenuates the negative effect of voltage harmonics and unbalances on orthogonal ©2021 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 2
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 19 |NUMBER: 1 |2021 |MARCH V V V a b -1 Hilbert Transform Fig. 5: Hilbert transformation. V V b a b dq LPFLPF V q Vd q V a Fig. 6: Inverse park transformation. d-q signals for PLL. Providing fast phase detection and fast dynamic response without using the second order filters, which reduce the dynamic response time and the detection of the synchronization unit. In [34], a Frequency Lock Loop (FLL) with a Generalized Integrator (GI) was proposed. In the GI-FLL, the GI part is a OSG, while the FLL part uses the signals generated for unknown frequency estimation purposes. The GI works as an adaptive bandpass filter using coordinate transformation, which allows to improve the dynamic tuning range, with an excellent balance between the convergence speed and the maximum acceptable peak estimation error, but with some computational cost additional to that needed for accuracy and the FLL has to add the normalization of the gain that the GI does not have. The technique using the grid voltage demodulation to obtain a OSG is proposed in [35], in a Demodulation Type PLL (DT-PLL) with improved DC offset rejection capacity, for the adaptive estimation of the phase angle and the frequency of a single-phase system, which avoids the use of any low-pass filter. The demodulation has good dynamic performance and disturbance rejection ability. However, due to the presence of trigonometric quantities in the estimator dynamics, small-signal modelling-based parameter tuning can be complicated for DT-PLL. Moreover, real-time implementation of trigonometric functions is computationally expensive. A single-phase PLL structure based on SOGI which overcomes the above problems and avoidance of filtering delays due to its resonance at the fundamental frequency was presented in [15], [20], [21], [36], [37], [38], [39], [40], and [41]. Thus, the way in which the two signals are generated is improved. In [42], [43], and [44] a three-phase PLL structure based on a Double Second Order Generalized Integrator (DSOGI) is presented. The SOGI structure has also been applied to other aspects of power electronic control, especially in the current control loop [37] and [38], detection of harmonics [39] and active anti-islanding methods [22]. However, as already indicated in [15], [37], and [38], the SOGI was designed in the continuous time and quadrature phase delay and amplitude ripples are present in its discrete application. Moreover, it is difficult to apply this structure on a fixed-point DSP or FPGA due to their limited precision and sensitivity to coefficient rounding. A second-order APF with Lattice structure was proposed in [45], [46], [47], [48], [49], and [50]. This filter generates orthogonal signals necessary for the PLL, with good noise filtering capability but amplitudes different from that of the single-phase input signal. Here a APF with Lattice structure is proposed as OSG which meets all requirements and overcomes all the drawbacks of the methods used in single-phase PLL while maintaining any unity gain with respect to the input. This paper performs a comparative steadystate analysis of the structures based on APF and SOGI as part of a PLL. These structures are widely used for filtering the power supply signal to ensure the best possible synchronization system references for use in single-phase converters operating in highly disturbed environments. Solutions for the discrete application of the two structures are also provided. Simulations and a fixed-point DSP implementation validate the effectiveness of one or another structure. The rest of the paper is organized as follows. Section 2. describes the lattice APF as OSG with its main diagrams and equations. In Sec. 3. , the SOGI algorithm is presented. Section 4. provides discrete time simulation results for both OSGs using as input a 50 Hz normalized sinusoidal signal in both filters. In Sec. 5. , the experimental results of a fixed-point DSP implementation of both OSGs under the same simulation conditions are discussed. Finally, Sec. 6. draws the conclusions. 2. Lattice-Based APF In the approach proposed in [49], no unity gain has been considered while, in this paper, a new structure of OSG based on APF, as illustrated in Fig. 7, is proposed characterized by unity gain [50]. In the system, the output signals x1(n)and x2(n) have a −90 degree and 0 phase shift, respectively, ©2021 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 3
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 19 |NUMBER: 1 |2021 |MARCH -1 -1 -cos 1 -sin 1 sin 1 u(n) x (n) 1 sin -1 2 -sin 2 -cos 1 sin 2 x (n) 2 -sin -1 2 y(n) Fig. 7: APF as OSG with unity gain. with respect to the input signal with unity gain, are defined as: x1(n) = cos θ1(1−sin θ2)z−1 1 + sin θ1(1 + sin θ2)z−1+ sin θ2z−2u(n), (1) x2(n) = sin θ1(sin θ2−1)z−1+ (sin θ2−1)z−2 1 + sin θ1(1 + sin θ2)z−1+ sin θ2z−2u(n). (2) The space-state equation of the APF with Lattice structure can be obtained from the system in Fig. 7, is defined as: x1(n+ 1) x2(n+ 1) y(n) = = −sin θ1cos θ1sin θ2cos θ1(1 −sin θ2) −cos θ1−sin θ1sin θ2sin θ1(sin θ2−1) 0−(1 + sin θ2) sin θ2 · x1(n) x2(n) u(n) , (3) where θ1is associated with the notch frequency ω0, at which the APF offers a phase shift of πradians, and θ2is associated with the 3 dB attenuation Bandwidth BW of the filter. They are defined as: θ1=ω0 fs−π 2,(4) θ2= arcsin 1−tan BW 2 1 + tan BW 2 ,(5) BW =2πB fs ,(6) where fsand Bcorrespond to the sampling frequency and bandwidth in Hz, respectively. Independent adjustment of notch frequency and bandwidth is a desirable attribute. Adjusting the bandwidth for any sampling frequency from Eq. (6), either directly or adaptively, allows the APF to reject very low frequencies, even rejecting the DC offset, without adding another type of filter and without interfering with the tuning frequency. This feature of the APF can comply with those of the OSG with DC offset rejection capability proposed in [33], with only the adjustment of a single parameter. The structure in Fig. 7, is theoretically stable and numerically well behaved in time-varying environments [49]. Each rotation angle ωk(k = 1, 2) is directly controlled, so that θ1and θ2are converted into the adjustable parameters for adaptive performance. Elements Aand Bof the structure are extracted from Eq. (3): A=−sin θ1cos θ1sin θ2 −cos θ1−sin θ1sin θ2,(7) B=cos θ1(1−sin θ2) −sin θ1(1−sin θ2).(8) Figure 8, shows the Bode diagram of the APF as normalized OSG for a tuning frequency of 50 Hz. Magnitude (dB) Phase (deg) Frequency (Hz) -80 -60 -40 -20 0 100101102103 -180 -90 0 90 180 x (n) x (n) 1 2 Fig. 8: Bode diagram of lattice-based APF as normalized OSG. 3. The SOGI A SOGI is equivalent to two Proportional-Integral (PI) controllers in synchronous reference frames compensating the sequences of positive and negative [15], [20], [37], [38], [39], and [40]. SOGI is proposed to obtain a zero steady state error using sinusoidal references working on the αβ stationary reference frame. This method has been included in harmonic elimination algorithms (because harmonics act in a very narrow band around their resonance frequency); grid sequence detection and quadrature signal generation algorithms; algorithms for converter synchronization to the power supply; and for multifrequency detection. The transfer function of a SOGI for a single sinusoidal signal is [37] and [38]: G(s) = 2s s2+ω2 0 ,(9) where ω0is the resonance frequency and sthe Laplace operator. The integrator output contains not ©2021 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 4
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 19 |NUMBER: 1 |2021 |MARCH only the integrated input but also an insignificant additional component. In order to use them to generate quadrature signals, the original topology is modified, as shown in Fig. 9. The resulting mathematical expression is: G(s) = x(s) y(s) =ω0s s2+ω2 0 .(10) r(s) y(s) _ + w 1 s 1 s x(s) 0 w 0 Fig. 9: Continuous-time SOGI. The new transfer function has two poles at ±jω0and a zero at the origin, just as Eq. (9). The only difference between the two expressions is in the gain, which is not significant as far as the final performance is concerned. However, the function leads to a more general structure that can be used for both power converters control and synchronization tasks. The SOGI structure for generation of orthogonal signals, also known as OSG-SOGI, is outlined in Fig. 10. As can be seen, the basic element is a SOGI [15], [20], [37], [38], [39], and [40]. The continuous-time transfer functions are: v’( s) v( s)=Ksω0s s2+Ksω0s+ω2 0 ,(11) qv’( s) v( s)=Ksω2 0 s2+Ksω0s+ω2 0 .(12) v’(s) _ + w 1 s 1 s x(s) 0 w 0 _ + K v(s) s qv’(s) SOGI Fig. 10: Continuous-time OSG-SOGI. Discrete-time implementation of the SOGI can be accomplished by discretizing the continuous-time transfer functions or by using discrete integrators [15], [37], and [38]. Figure 11 shows the discrete-time SOGI structure. Its output behaves like that of the continuous-time SOGI in Fig. 9 upon application of a step signal of amplitude 1 at input x(n), that is a sinusoidal signal of pulsation ω0and amplitude 1. The choice of this SOGI is based on the use of discrete Euler Backward Integrator with computational delay added in series with the feedback gain, modeling the inherent delay caused by the programming process. Moreover, its structure is more similar to that of the classical PI controller. ++ ++ x(n) y(n) _ + Z-1 Z-1 r(n) Z-1 w T 0 S w T 0 S Euler Backward Integrator Euler Backward Integrator Fig. 11: SOGI based on Euler Backward Integrator and computational delay. The transfer function of the discrete-time SOGI is: G(z) = ω0Ts−ω0Tsz−1 1+(ω2 0T2 sz−1−2) + z−2.(13) Figure 12 displays the SOGI based on discrete Euler Backward Integrator within an OSG-SOGI, which ensures that signals v’ and qv’ are quadrature signals at all operating frequencies. The OSG-SOGI allows independent adjustment of the notch frequency ω0and of the 3 dB attenuation bandwidth BW, considering the sampling period Ts, according to: Kt=ω0Ts,(14) Ks=BW ω0 √0.98.(15) ++ ++ u(n) v’(n) _ + Z-1 Z-1 qv’(n) Z-1 Euler Backward Integrator _ + K s Z-1 Euler Backward Integrator SOGI K t K t Fig. 12: Discrete-time OSG-SOGI structure. ©2021 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 5
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 19 |NUMBER: 1 |2021 |MARCH The OSG-SOGI can also be expressed by state equation form based on the final circuit of Fig. 13, which is equivalent to that of Fig. 12, where x1(n)and x2(n)are the signals corresponding to the orthogonal system and are denoted as in the APF, with a −90 and 0 degree phase shift, respectively, and unity gain with respect to the input signal of power u(n)at instant n. + + u(n) v’(n) _ + Z-1 qv’(n) _ + K s Z-1 + + x (n) 1 x (n) 2 K t K t Fig. 13: Definitive OSG-SOGI structure. This orthogonal system is given by: x1(n) = =KsK2 tz−1 1+(KsKt−2 + K2 t)z−1+ (1−KsKt)z−2u(n), (16) x2(n) = =KsKtz−1−KsKtz−2 1+(KsKt−2 + K2 t)z−1+ (1−KsKt)z−2u(n). (17) Figure 14 offers the Bode diagram of the OSG-SOGI, for a tuning frequency of 50 Hz. Considering that outputs x1(n+ 1) and x2(n+ 1) are the same answers qv’(n) and v’(n), the state equation is: x1(n+ 1) x2(n+ 1) y(n) = = 1−K2 tKt(1 −KsKt)KsK2 t −Kt1−KsKtKsKt 0 1 0 · x1(n) x2(n) u(n) . (18) Elements Aand Bof the structure can be extracted from Eq. (18): A=1−K2 tKt(1 −KsKt) −Kt1−KsKt,(19) B=KsK2 t KsKt.(20) Magnitude (dB)Phase (deg) Frequency (Hz) -80 -60 -40 -20 0 100101102103 -180 -135 -90 -45 0 45 90 135 180 qv(n) v(n) Fig. 14: Bode diagram of the OSG-SOGI. 4. Behavior and Comparison of OSGs The structures of the lattice-based APF in Fig. 7 and the OSG-SOGI in Fig. 13 can be easily implemented as matrix system consisting of elements Aand Bonly, thus we will have the equation of state of the form: x1(n+ 1) x2(n+ 1)=A B·x(n) u(n).(21) Both structures have the ability to generate, in phase with the input signal, an orthogonal system. Figure 15 shows the implementation of the lattice-based APF and OSG-SOGI structures in state equation. Two parameters identified as x1(n)and x2(n), which constitute the orthogonal system, are observed. + A B u(n) x (n) 1 x (n) 2 + Z-1 x (n) Fig. 15: OSG in state equation. Both structures are simulated under the same conditions to compare them as Band-Pass Filters (BPF) which generate a disturbance-free orthogonal system with one signal image of the fundamental input signal and another one delayed 90 degrees with respect to the same input signal. The two filters are evaluated using any unity amplitude sinusoidal signal at the frequency of 50 Hz as the fundamental input signal. Is sets a sampling frequency of 20 kHz, 50 Hz tuning frequency and a low bandwidth of 4 Hz, narrow enough for many applications where a very selective magnitude response is required, with a high quality factor. The simulation is implemented in MATLAB/Simulink. The state equa- ©2021 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 6
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 19 |NUMBER: 1 |2021 |MARCH tion from Eq. (3) for the APF with the values estimated under these conditions is: x1(n+ 1) x2(n+ 1)= =0.9998766 0.0156876 0.0000197 −0.0157073 0.9986209 0.0012557· x1(n) x2(n) u(n) . (22) And the state equation from Eq. (18) for the OSGSOGI with the values estimated: x1(n+ 1) x2(n+ 1)= =0.9997532 0.0156884 0.0000195 −0.0157080 0.9987560 0.0012440· x1(n) x2(n) u(n) . (23) Figure 16 gives the frequency response for outputs x2(n)/u(n), of Eq. (2) and Eq. (17), corresponds to the APF and the OSG-SOGI. For frequencies over 10 Hz both structures maintain a strong similarity in both magnitude and phase. But for frequencies below 10 Hz they already begin to differentiate, the APF begins to increase its phase to values greater than 90 degrees. For frequencies below 1 Hz the difference in magnitude begins to be more noticeable. Magnitude (dB)Phase (deg) Frequency (Hz) -80 -60 -40 -20 0 100101102103104 -180 -90 0 90 180 OSG-SOGI APF Lattice Fig. 16: Bode diagram of x2(n)/u(n)in Lattice-based APF and OSG-SOGI. As shown in Eq. (22) and Eq. (23), the values of the coefficients of both filters are nearly identical under these operating conditions, the differences between the coefficients are less than 0.0001233. Hence, their frequency responses should have a very similar behavior. The frequency responses are obtained for x2(n)/u(n), in the APF and in the OSG-SOGI for a range of fundamental frequencies, from 100 Hz to 10 kHz, with a bandwidth of 4 Hz, a sampling frequency of 20 kHz, for both filters. In Fig. 17, one can observe that both OSG behave like a BPF, but for fundamental frequencies greater than 400 Hz, the magnitude responses begin to have differences, although they maintain their tuning. From frequencies greater than 3 kHz, the SOGI begins to lose its tuning, both in its magnitude and phase response. -150 -100 -50 0 Magnitude (dB) 101102103104 -180 -90 0 90 180 Phase (deg) Frequency (Hz) OSG-SOGI APF Lattice Fig. 17: Bode diagram of x2(n)/u(n)in Lattice-based APF and OSG-SOGI for various tuning frequencies. 102103104 -80 -60 -40 -20 0 Magnitud(dB) APF Lattice OSG-SOGI (a) For various tuning frequencies. Magnitud(dB) 102103104105 -25 -20 -15 -10 -5 0 5 APF Lattice OSG-SOGI (b) For various sampling frequencies. 101102103104 -35 -30 -25 -20 -15 -10 -5 0 5 Frecuency(Hz) Magnitud(dB) APF Lattice OSG-SOGI 500Hz 14 kHz 17 kHz 20 kHz 23 kHz 29 kHz 11 kHz 8 kHz 5 kHz 2 kHz 26 kHz (c) For various sampling frequencies and variation of the tuning frequency. Fig. 18: Magnitude of x2(n)/u(n)in the Lattice-based APF and OSG-SOGI. ©2021 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 7
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 19 |NUMBER: 1 |2021 |MARCH -3 -2 -1 0 a21 -1 0 1 a22 102103104 -2 0 2x 10 -3 Frecuency(Hz) a23 -6 -4 -2 0 2 a11 0 1 2 3 a12 0 2 4x 10-3 a13 10210 10 Frecuency(Hz) 3 4 APF Lattice OSG-SOGI (a) For various tuning frequencies. -10 -5 0 5 a11 0 1 2 3 a12 -0.5 0 0.5 1 a13 10210310410 5 Frecuency(Hz) -3 -2 -1 0 a21 -1 0 1 a22 -0.4 -0.2 0 0.2 a23 102103104105 Frecuency(Hz) APF Lattice OSG-SOGI (b) For various sampling frequencies. Fig. 19: Behavior of the matrix parameters of the state equation of APF and OSG-SOGI. Figure 18 displays the result of the magnitude for x2(n)/u(n)of the lattice APF and the OSG-SOGI with a bandwidth of 4 Hz and a sampling frequency of 20 kHz at various frequencies, for a tuning frequency of 50 Hz with sampling frequencies ranging from 100 Hz to 100 kHz and for various sampling frequencies and variations of the frequency of tuning. As can be noticed, from a tuning frequency of 600 Hz and a sampling frequency below 1 kHz, the tuning of the SOGI is not accurate, and so are its characteristics as OSG, which does not happen with the APF. The magnitude in dB of x2(n)/u(n)is obtained by evaluating the APF and the OSG-SOGI with a bandwidth of 4 Hz, depicted in Fig. 18(a) for a sampling frequency of 20 kHz and the variation of the tuning frequency. In Fig. 18(b) the tuning frequency is kept at 50 Hz with variation of the sampling frequency from 100 Hz to 100 kHz and in Fig. 18(c) the result of the magnitude is shown for several sampling frequencies (500 Hz, 2 kHz, 5 kHz, 8 kHz, 11 kHz, 14 kHz, 17 kHz, 20 kHz, 23 kHz, 26 kHz, and 29 kHz) and variation of the tuning frequency. As can be seen, the APF maintains a constant magnitude of 0 dB for all the variations in all the evaluated ranges. On the other hand, the SOGI loses the tuning starting from a tuning frequency of 500 Hz and a sampling frequency lower than 1 kHz, and therefore hence its characteristics as OSG. Figure 19 shows the behavior of the matrix parameters of the state equation of the APF Eq. (3) and the OSG-SOGI Eq. (18) for various tuning and sampling frequencies. The parameters begin to differ more significantly from tuning frequencies greater than 500 Hz and sampling frequencies below 1 kHz in most cases. This is demonstrated by the results in Fig. 16, Fig. 17, and Fig. 18. Figure 20, has the magnitude response surface for x2(n)/u(n), as a function of the tuning frequency and the sampling frequency. Observing that for the APF, the result is a completely flat surface with a magnitude of 0 dB constant for any variation of the frequencies. This does not occur for the OSG-SOGI, where it is observed that the magnitude response varies as the frequencies vary, moving away from the required passband. Being the worst case when the tuning frequency increases and the sampling frequency decreases. 0 1 2 x 10 4 0 1 2 3 x 10 4 -300 -200 -100 0 Frecuency(Hz) Sampling Frecuency(Hz) Magnitud(dB) -350 -300 -250 -200 -150 -100 -50 0 (a) APF. 0 1 2 x 10 4 0 1 2 3 x 10 4 -300 -200 -100 0 Frecuency(Hz) Sampling Frecuency(Hz) Magnitud(dB) -350 -300 -250 -200 -150 -100 -50 0 (b) OSG-SOGI. Fig. 20: Surface of the magnitude of x2(n)/u(n)for various sampling frequencies and variation of the tuning frequency. ©2021 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 8
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 19 |NUMBER: 1 |2021 |MARCH 5. Simulation and Experimental Results In order to validate the analysis, the APF and the OSG-SOGI are simulated by using MATLAB/Simulink program and an experimental setup was implemented. A CDM2480 test platform, with a TMS320F2812 fixed-point DSP from Texas Instruments as the central element, suitable for motion control and power electronics applications, was used to implement and test both structures as OSG. The fixed point DSP, with a clock frequency of 150 MHz, was used to generate the input signal, the OSG algorithms and the output signals with a 12 bit D/A converter. All simulated and experimental results, were obtained using the structures in Fig. 7 and Fig. 13. The outputs x1(t)and x2(t)of the APF and the OSG-SOGI are obtained. The OSG input signal and parameters are the same for the simulation and the experimental part, where the input signal is a sinusoid with unity amplitude and frequency equal to the tuning frequency of the filter. A bandwidth of 4 Hz was set for the design of the OSGs. In the DSP, a fixed-point Q15 base was used for global calculations whereas a Q30 base was used for calculations of the filters. Voltage(V) 0.5 0.505 0.51 0.515 0.52 0.525 0.53 0.535 0.54 -1 Time(sec) -1 0 1 -1 0 1 -1 0 1 -1 0 1Vref Vref 90º Vref Vref 90º Voltage(V)Voltage(V) Voltage(V) 2APF 1APF 2SOGI 1SOGI (a) Simulation. Vref 2APF Vref 90º 1APF Vref 2SOGI Vref 90º 1SOGI (b) DSP Implementation. Fig. 21: x1(t)and x2(t)of the APF and the OSG-SOGI for a sampling frequency of 20 kHz and tuning frequency of 50 Hz. In the experimental results obtained for the OSGs, channels A and B in blue are x2(t)and x1(t)of the APF with [1 V/div]; channels C and D in green are x2(t)and x1(t)of the SOGI with [1 V/div]. Corresponding reference signals (in red), an of the fundamental input signal on channels A and C and delayed signals 90 degrees with respect to this input signal on channels B and D, were added. The results for a frequency of 50 Hz for the input signal and tuning, with a sampling frequency of 20 kHz, are presented in Fig. 21, where it is evidenced that both OSGs behave in accordance with the established, both in the simulation and in the DSP implementation. The outputs x1(t)and x2(t)follow their references and retain their waveform, and maintain the gain of 1, necessary condition for both OSGs operating as PLLs. -1 0 1 -1 0 1 -1 0 1 0.5 0.5005 0.501 0.5015 0.502 0.5025 0.503 0.5035 0.504 -1 0 1 Time(sec) Voltage(V) Vref Vref 90º Vref Vref 90º Voltage(V) Voltage(V) Voltage(V) 2APF 1APF 2SOGI 1SOGI (a) Simulation. Vref 2APF Vref 90º 1APF Vref 2SOGI Vref 90º 1SOGI (b) DSP Implementation. Fig. 22: x1(t)and x2(t)of the APF and the OSG-SOGI for a sampling frequency of 20 kHz and tuning frequency of 500 Hz. The sampling frequency is kept at 20 kHz and the frequency of the input and tuning signal was increased to 500 Hz in Fig. 22 and 1000 Hz in Fig. 23. In the simulation for both tuning frequencies, the signals of the orthogonal system corresponding to the APF have a good follow-up of the reference signals with a gain of 1. The OSG-SOGI, loses its characteristics like OSG, with an advance of 0.0002 seconds, relative to the reference signals, which introduces a phase shift, as well as a decrease in the gain, which is not reaching 1. ©2021 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 9