scieee Open visual document viewer

Comparative Analysis of Lattice-based All-Pass Filter and Second Order Generalized Integrator as Orthogonal System Generator of a PLL

Belandria, Luciano Emilio

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 with MATLAB/Simulink and experimental results using a fixed-point DSP.

Full text

POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 19 |NUMBER: 1 |2021 |MARCH Compa a i e Analysis o La ice-based All-Pass Fil e and Second O de Gene alized In eg a o as O hogonal Sys em Gene a o o a PLL Luciano Emilio BELANDRIA1, Nancy Alejand a AGUDELO1, Joan BERGAS-JANE 2 1Depa men o Elec onic Enginee ing, Na ional Expe imen al Uni e si y o Tachi a, Uni e sidad, 5001 San C is obal, Venezuela 2Cen e o Technological Inno a ion in S a ic Con e e s and D i es, Depa men o Elec ical Enginee ing, Poly echnic Uni e si y o Ca alonia, Diagonal 647, 08028 Ba celona, Spain lb[email p o ec ed]e, [email p o ec ed], joan.gab iel.be [email protected] DOI: 10.15598/aeee. 19i1.4002 A icle his o y: Recei ed No 13, 2020; Re ised Jan 31, 2021; Accep ed Feb 10, 2021; Published Ma 31, 2021. This is an open access a icle unde he BY-CC license. Abs ac . This pape p esen s a s eady-s a e compa i- son o wo me hods ha gene a e an o hogonal ol age sys em o a single-phase Phase-Locked Loop (PLL) s uc u e: a widely accep ed one based on a Second O de Gene alized In eg a o (SOGI) and a new one based on a All-Pass Fil e (APF) wi h La ice s uc u e. Bo h me hods a e e y a ac i e because o hei simple digi al implemen a ion, low compu a- ional load and good pe o mance unde ha monically dis o ed g id condi ions and a iable equency, so hey a e a good al e na i e o o he known me hods. The pape de i es and analyzes he ull s a e space mod- els o he wo me hods. I is shown ha hese wo me hods a e equi alen in he mos common ope a ion condi ions o dis ibu ed ene gy esou ces, al hough he APF s uc u e is clea ly be e han he SOGI one because i main ains i s o hogonal gene a ion abili y o any highe no ch equencies and any lowe sampling equencies. The compa a i e analysis we e alida ed by simula ion using MATLAB/Simulink and expe imen al esul s using a ixed-poin DSP. Keywo ds All-Pass Fil e , O hogonal Signal Gene a o , Phase-Locked Loop, Single-Phase PLL, No ch Fil e , Second O de Gene alized In eg a o . 1. In oduc ion The use, de elopmen and deploymen o Dis ibu ed Ene gy Resou ces (DERs), especially enewable e- sou ces, has inc eased d ama ically in he las decade. This is changing he pa adigm o elec ic gene a ion [1], [2], [3], and [4]. Single-phase g id-connec ed in- e e s a e ound in many DERs, such as pho o ol aic in e e s and ene gy s o age de ices [5] and [6]. In e e sys em con ol mus ensu e ha he powe gene a ion sys em is synch onized wi h he g id, and ha phase angle jumps a e de ec ed o eliable powe deli e y [7] and [8]. Mo eo e , i mus ensu e ha g id- connec ed sys em pe o mance complies wi h ope a ion equi emen s unde he mos common dis o ions, such as line ha monics, no ches, ol age dips, ises and alls, and equency a ia ions. Phase, equency and ampli ude cha ac e ize he single-phase g id ol age signal and knowledge o hese pa ame e s is undamen al in he design o g id- connec ed in e e sys ems [9], like he one in Fig. 1. In o de o mee he new equi emen s o ne wo k codes and op imize in e e pe o mance, a PLL is used o apid synch oniza ion wi h he g id. The main ask o he PLL is o accu a ely de ec he ac ual ol age phase angle a he Poin o Com- mon Coupling (PCC), e en in he p esence o ol age ha monics and unbalance [10] and [11]. This s uc u e, o example, should be used o p o ide any uni y powe ac o ope a ion which in ol es synch oniza ion o he ©2021 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 1 POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 19 |NUMBER: 1 |2021 |MARCH DC Powe Sou ce PLL In e e Fil e T ans o me G id PWM PCC ac iac q , , V RMS Con olle Fig. 1: G id-connec ed powe con e sion sys ems. in e e ou pu cu en wi h he g id ol age and o gi e a clean sinusoidal cu en e e ence, among o he unc ions. Fo h ee-phase applica ions, some o he ecen and mos popula g id synch oniza ion echniques o de- ec ing he phase and equency o he mains ol age signal using PLL a e p esen ed in [12], whe e a com- ple e s udy was ca ied ou on he con ol s a egies o Dis ibu ed Gene a ion Powe Sys ems (DGPSs) unde ideal and non-ideal ne wo k condi ions. These ech- niques a e: basic s uc u e adi ional Synch onous Re e ence F ame PLL (SRF-PLL), Enhanced PLL (EPLL), Dual Second O de Gene alized In eg a o PLL (DSOGI-PLL), Mo ing A e age Fil e (MAF) and Decoupled Double Synch onous Re e ence (DDSRF). Indeed, he single-phase s uc u e o PLLs limi s he use o some well-known h ee-phase con ol s a egies [13] and [14]. In single-phase sys ems, less is known abou he ne wo k ope a ing condi ions han in h ee- phase sys ems. Tha is why he mos ad anced me h- ods used o o e come his limi a ion mus c ea e an o hogonal ol age sys em [15] and hen exploi he exis ing h ee-phase con ol me hods. In his line o esea ch, se e al ad anced PLL echniques, ha e been p oposed o single-phase applica ions [16], [17], [18], and [19]. dq Vol age Moni o ing F equency and Phase Es ima o O hogonal Sys em Gene a o a b V V VV V V a b RMS q d q Fig. 2: PLL using he pa k ans o ma ion. Gene al s uc u e o a single-phase PLL algo i hm based on O hogonal Signal Gene a o (OSG), also called Quad a u e Signal Gene a o (QSG), o g id synch oniza ion is p esen ed in [15], [16], [20], [21], [22], [23], and [24]. This s uc u e can use he Pa k T ans- o ma ion, as shown in Fig. 2 o he a c- angen unc- ion depic ed in Fig. 3. The main di e ence be ween OSG-based single-phase PLLs lies in he way o hogo- nal ol age sys ems a e gene a ed. Vol age Moni o ing F equency and Phase Es ima o O hogonal Sys em Gene a o V V V V a b RMS q          b a  an 1_ + q Fig. 3: PLL using he a c angen unc ion. The OSG-based single-phase PLL s uc u es, Fig. 2 and Fig. 3, ound in he s a e-o - he-a me hods a e basically o med by wo blocks. In he i s , an o hog- onal sys em in phase wi h he abo e signal is gene a ed om a single e e ence sinusoidal signal. The second block uses ei he a eedback loop h ough he αβ o dq ans o ma ion o he a c- angen unc ion o de e - mine he phase angle o he e e ence signal. The me hods o OSG o a single-phase PLL mus be easy o apply in p ac ice. Mo eo e , he OSG mus deli e he il e ed ou pu wi hou any delay, because o i s esonance a he undamen al equency, no o be a ec ed by equency changes. The mos common me hods used in he li e a u e o gene a e he o hog- onal ol age a e p esen ed in [15], [19], [20], [21], [25], [26], [27], [28], [29], [30], [31], and [33]. One using a block o a T anspo Delay unc ion is shown in Fig. 4. I in oduces a 90 deg ee phase shi wi h espec o he inpu signal [21] and [28]. Ano he me hod uses he Hilbe T ans o ma ion [29], depic ed in Fig. 5, and he In e se Pa k T ans o ma ion [19], [30], and [31], shown in Fig. 6. Howe e , hese me hods ha e one o mo e o he ollowing de iciencies: equency dependence, high complexi y, non-linea i y, and poo o no il a ion. V V V a b -1 T/4 delay Fig. 4: T anspo delay unc ion. To imp o e he de iciencies men ioned in he OSG me hods, an imp o ed A e age Fil e (AF) is p oposed in [32], wi h a simple s uc u e and implemen a ion, which, in eg a ed in o OSG, a enua es he nega i e e - ec o ol age ha monics and unbalances on o hogonal ©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 Hilbe T ans o m Fig. 5: Hilbe ans o ma ion. V V b a b dq LPFLPF V q Vd q V a Fig. 6: In e se pa k ans o ma ion. d-q signals o PLL. P o iding as phase de ec ion and as dynamic esponse wi hou using he second o de il e s, which educe he dynamic esponse ime and he de ec ion o he synch oniza ion uni . In [34], a F equency Lock Loop (FLL) wi h a Gen- e alized In eg a o (GI) was p oposed. In he GI-FLL, he GI pa is a OSG, while he FLL pa uses he sig- nals gene a ed o unknown equency es ima ion pu - poses. The GI wo ks as an adap i e bandpass il e using coo dina e ans o ma ion, which allows o im- p o e he dynamic uning ange, wi h an excellen bal- ance be ween he con e gence speed and he maximum accep able peak es ima ion e o , bu wi h some com- pu a ional cos addi ional o ha needed o accu acy and he FLL has o add he no maliza ion o he gain ha he GI does no ha e. The echnique using he g id ol age demodula ion o ob ain a OSG is p oposed in [35], in a Demodu- la ion Type PLL (DT-PLL) wi h imp o ed DC o se ejec ion capaci y, o he adap i e es ima ion o he phase angle and he equency o a single-phase sys- em, which a oids he use o any low-pass il e . The demodula ion has good dynamic pe o mance and dis- u bance ejec ion abili y. Howe e , due o he p es- ence o igonome ic quan i ies in he es ima o dy- namics, small-signal modelling-based pa ame e uning can be complica ed o DT-PLL. Mo eo e , eal- ime implemen a ion o igonome ic unc ions is compu a- ionally expensi e. A single-phase PLL s uc u e based on SOGI which o e comes he abo e p oblems and a oidance o il e - ing delays due o i s esonance a he undamen al e- quency was p esen ed in [15], [20], [21], [36], [37], [38], [39], [40], and [41]. Thus, he way in which he wo sig- nals a e gene a ed is imp o ed. In [42], [43], and [44] a h ee-phase PLL s uc u e based on a Double Second O de Gene alized In eg a o (DSOGI) is p esen ed. The SOGI s uc u e has also been applied o o he aspec s o powe elec onic con ol, especially in he cu en con ol loop [37] and [38], de ec ion o ha mon- ics [39] and ac i e an i-islanding me hods [22]. Howe e , as al eady indica ed in [15], [37], and [38], he SOGI was designed in he con inuous ime and quad a u e phase delay and ampli ude ipples a e p esen in i s disc e e applica ion. Mo eo e , i is di - icul o apply his s uc u e on a ixed-poin DSP o FPGA due o hei limi ed p ecision and sensi i i y o coe icien ounding. A second-o de APF wi h La ice s uc u e was p o- posed in [45], [46], [47], [48], [49], and [50]. This il e gene a es o hogonal signals necessa y o he PLL, wi h good noise il e ing capabili y bu ampli udes di - e en om ha o he single-phase inpu signal. He e a APF wi h La ice s uc u e is p oposed as OSG which mee s all equi emen s and o e comes all he d aw- backs o he me hods used in single-phase PLL while main aining any uni y gain wi h espec o he inpu . This pape pe o ms a compa a i e s eady- s a e analysis o he s uc u es based on APF and SOGI as pa o a PLL. These s uc u es a e widely used o il e ing he powe supply signal o ensu e he bes possible synch oniza- ion sys em e e ences o use in single-phase con e e s ope a ing in highly dis u bed en i onmen s. Solu ions o he disc e e applica ion o he wo s uc- u es a e also p o ided. Simula ions and a ixed-poin DSP implemen a ion alida e he e ec i eness o one o ano he s uc u e. The es o he pape is o ganized as ol- lows. Sec ion 2. desc ibes he la ice APF as OSG wi h i s main diag ams and equa ions. In Sec. 3. , he SOGI algo i hm is p esen ed. Sec- ion 4. p o ides disc e e ime simula ion esul s o bo h OSGs using as inpu a 50 Hz no malized sinu- soidal signal in bo h il e s. In Sec. 5. , he expe i- men al esul s o a ixed-poin DSP implemen a ion o bo h OSGs unde he same simula ion condi ions a e discussed. Finally, Sec. 6. d aws he conclusions. 2. La ice-Based APF In he app oach p oposed in [49], no uni y gain has been conside ed while, in his pape , a new s uc u e o OSG based on APF, as illus a ed in Fig. 7, is p oposed cha ac e ized by uni y gain [50]. In he sys em, he ou pu signals x1(n)and x2(n) ha e a −90 deg ee and 0 phase shi , espec i ely, ©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 wi h uni y gain. wi h espec o he inpu signal wi h uni y gain, a e de ined 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-s a e equa ion o he APF wi h La ice s uc u e can be ob ained om he sys em in Fig. 7, is de ined 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) whe e θ1is associa ed wi h he no ch equency ω0, a which he APF o e s a phase shi o π adians, and θ2is associa ed wi h he 3 dB a enua ion Bandwid h BW o he il e . They a e de ined as: θ1=ω0 s−π 2,(4) θ2= a csin     1− an BW 2 1 + an BW 2     ,(5) BW =2πB s ,(6) whe e sand Bco espond o he sampling equency and bandwid h in Hz, espec i ely. Independen adjus men o no ch equency and bandwid h is a de- si able a ibu e. Adjus ing he bandwid h o any sampling equency om Eq. (6), ei he di ec ly o adap i ely, allows he APF o ejec e y low equen- cies, e en ejec ing he DC o se , wi hou adding an- o he ype o il e and wi hou in e e ing wi h he uning equency. This ea u e o he APF can comply wi h hose o he OSG wi h DC o se ejec ion ca- pabili y p oposed in [33], wi h only he adjus men o a single pa ame e . The s uc u e in Fig. 7, is heo e ically s able and nume ically well beha ed in ime- a ying en i onmen s [49]. Each o a ion angle ωk(k = 1, 2) is di ec ly con olled, so ha θ1and θ2a e con e ed in o he adjus able pa ame e s o adap i e pe o mance. Elemen s Aand Bo he s uc u e a e ex ac ed om 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) Figu e 8, shows he Bode diag am o he APF as no malized OSG o a uning equency o 50 Hz. Magni ude (dB) Phase (deg) F equency (Hz) -80 -60 -40 -20 0 100101102103 -180 -90 0 90 180 x (n) x (n) 1 2 Fig. 8: Bode diag am o la ice-based APF as no malized OSG. 3. The SOGI A SOGI is equi alen o wo P opo ional-In eg al (PI) con olle s in synch onous e e ence ames compensa - ing he sequences o posi i e and nega i e [15], [20], [37], [38], [39], and [40]. SOGI is p oposed o ob ain a ze o s eady s a e e o using sinusoidal e e ences wo king on he αβ s a ion- a y e e ence ame. This me hod has been included in ha monic elimina ion algo i hms (because ha mon- ics ac in a e y na ow band a ound hei esonance equency); g id sequence de ec ion and quad a u e signal gene a ion algo i hms; algo i hms o con e e synch oniza ion o he powe supply; and o mul i- equency de ec ion. The ans e unc ion o a SOGI o a single sinu- soidal signal is [37] and [38]: G(s) = 2s s2+ω2 0 ,(9) whe e ω0is he esonance equency and s he Laplace ope a o . The in eg a o ou pu con ains no ©2021 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 4 POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 19 |NUMBER: 1 |2021 |MARCH only he in eg a ed inpu bu also an insigni ican ad- di ional componen . In o de o use hem o gene a e quad a u e signals, he o iginal opology is modi ied, as shown in Fig. 9. The esul ing ma hema ical ex- p ession is: G(s) = x(s) y(s) =ω0s s2+ω2 0 .(10) (s) y(s) _ + w 1 s 1 s x(s) 0 w 0 Fig. 9: Con inuous- ime SOGI. The new ans e unc ion has wo poles a ±jω0and a ze o a he o igin, jus as Eq. (9). The only di e ence be ween he wo exp essions is in he gain, which is no signi ican as a as he inal pe o mance is conce ned. Howe e , he unc ion leads o a mo e gene al s uc u e ha can be used o bo h powe con e e s con ol and synch oniza ion asks. The SOGI s uc u e o gene a ion o o hogonal sig- nals, also known as OSG-SOGI, is ou lined in Fig. 10. As can be seen, he basic elemen is a SOGI [15], [20], [37], [38], [39], and [40]. The con inuous- ime ans e unc ions a e: ’( s) ( s)=Ksω0s s2+Ksω0s+ω2 0 ,(11) q ’( s) ( s)=Ksω2 0 s2+Ksω0s+ω2 0 .(12) ’(s) _ + w 1 s 1 s x(s) 0 w 0 _ + K (s) s q ’(s) SOGI Fig. 10: Con inuous- ime OSG-SOGI. Disc e e- ime implemen a ion o he SOGI can be ac- complished by disc e izing he con inuous- ime ans e unc ions o by using disc e e in eg a o s [15], [37], and [38]. Figu e 11 shows he disc e e- ime SOGI s uc u e. I s ou pu beha es like ha o he con inuous- ime SOGI in Fig. 9 upon applica ion o a s ep signal o am- pli ude 1 a inpu x(n), ha is a sinusoidal signal o pulsa ion ω0and ampli ude 1. The choice o his SOGI is based on he use o disc e e Eule Backwa d In eg a- o wi h compu a ional delay added in se ies wi h he eedback gain, modeling he inhe en delay caused by he p og amming p ocess. Mo eo e , i s s uc u e is mo e simila o ha o he classical PI con olle . ++ ++ x(n) y(n) _ + Z-1 Z-1 (n) Z-1 w T 0 S w T 0 S Eule Backwa d In eg a o Eule Backwa d In eg a o Fig. 11: SOGI based on Eule Backwa d In eg a o and com- pu a ional delay. The ans e unc ion o he disc e e- ime SOGI is: G(z) = ω0Ts−ω0Tsz−1 1+(ω2 0T2 sz−1−2) + z−2.(13) Figu e 12 displays he SOGI based on disc e e Eu- le Backwa d In eg a o wi hin an OSG-SOGI, which ensu es ha signals ’ and q ’ a e quad a u e signals a all ope a ing equencies. The OSG-SOGI allows independen adjus men o he no ch equency ω0and o he 3 dB a enua ion bandwid h BW, conside ing he sampling pe iod Ts, acco ding o: K =ω0Ts,(14) Ks=BW ω0 √0.98.(15) ++ ++ u(n) ’(n) _ + Z-1 Z-1 q ’(n) Z-1 Eule Backwa d In eg a o _ + K s Z-1 Eule Backwa d In eg a o SOGI K K Fig. 12: Disc e e- ime OSG-SOGI s uc u e. ©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 exp essed by s a e equa- ion o m based on he inal ci cui o Fig. 13, which is equi alen o ha o Fig. 12, whe e x1(n)and x2(n)a e he signals co esponding o he o hogonal sys em and a e deno ed as in he APF, wi h a −90 and 0 deg ee phase shi , espec i ely, and uni y gain wi h espec o he inpu signal o powe u(n)a ins an n. + + u(n) ’(n) _ + Z-1 q ’(n) _ + K s Z-1 + + x (n) 1 x (n) 2 K K Fig. 13: De ini i e OSG-SOGI s uc u e. This o hogonal sys em is gi en by: x1(n) = =KsK2 z−1 1+(KsK −2 + K2 )z−1+ (1−KsK )z−2u(n), (16) x2(n) = =KsK z−1−KsK z−2 1+(KsK −2 + K2 )z−1+ (1−KsK )z−2u(n). (17) Figu e 14 o e s he Bode diag am o he OSG-SOGI, o a uning equency o 50 Hz. Conside ing ha ou - pu s x1(n+ 1) and x2(n+ 1) a e he same answe s q ’(n) and ’(n), he s a e equa ion is:   x1(n+ 1) x2(n+ 1) y(n)  = =  1−K2 K (1 −KsK )KsK2 −K 1−KsK KsK 0 1 0  ·  x1(n) x2(n) u(n)  . (18) Elemen s Aand Bo he s uc u e can be ex ac ed om Eq. (18): A=1−K2 K (1 −KsK ) −K 1−KsK ,(19) B=KsK2 KsK .(20) Magni ude (dB)Phase (deg) F equency (Hz) -80 -60 -40 -20 0 100101102103 -180 -135 -90 -45 0 45 90 135 180 q (n) (n) Fig. 14: Bode diag am o he OSG-SOGI. 4. Beha io and Compa ison o OSGs The s uc u es o he la ice-based APF in Fig. 7 and he OSG-SOGI in Fig. 13 can be easily implemen ed as ma ix sys em consis ing o elemen s Aand Bonly, hus we will ha e he equa ion o s a e o he o m: x1(n+ 1) x2(n+ 1)=A B·x(n) u(n).(21) Bo h s uc u es ha e he abili y o gene a e, in phase wi h he inpu signal, an o hogonal sys em. Figu e 15 shows he implemen a ion o he la ice-based APF and OSG-SOGI s uc u es in s a e equa ion. Two pa ame- e s iden i ied as x1(n)and x2(n), which cons i u e he o hogonal sys em, a e obse ed. + A B u(n) x (n) 1 x (n) 2 + Z-1 x (n) Fig. 15: OSG in s a e equa ion. Bo h s uc u es a e simula ed unde he same con- di ions o compa e hem as Band-Pass Fil e s (BPF) which gene a e a dis u bance- ee o hogonal sys em wi h one signal image o he undamen al inpu signal and ano he one delayed 90 deg ees wi h espec o he same inpu signal. The wo il e s a e e alua ed using any uni y ampli ude sinusoidal signal a he equency o 50 Hz as he undamen al inpu signal. Is se s a sam- pling equency o 20 kHz, 50 Hz uning equency and a low bandwid h o 4 Hz, na ow enough o many ap- plica ions whe e a e y selec i e magni ude esponse is equi ed, wi h a high quali y ac o . The simula ion is implemen ed in MATLAB/Simulink. The s a e equa- ©2021 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 6 POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 19 |NUMBER: 1 |2021 |MARCH ion om Eq. (3) o he APF wi h he alues es ima ed unde hese condi ions 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 he s a e equa ion om Eq. (18) o he OSG- SOGI wi h he alues es ima ed: 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) Figu e 16 gi es he equency esponse o ou pu s x2(n)/u(n), o Eq. (2) and Eq. (17), co esponds o he APF and he OSG-SOGI. Fo equencies o e 10 Hz bo h s uc u es main ain a s ong simila i y in bo h magni ude and phase. Bu o equencies below 10 Hz hey al eady begin o di e en ia e, he APF begins o inc ease i s phase o alues g ea e han 90 deg ees. Fo equencies below 1 Hz he di e ence in magni ude begins o be mo e no iceable. Magni ude (dB)Phase (deg) F equency (Hz) -80 -60 -40 -20 0 100101102103104 -180 -90 0 90 180 OSG-SOGI APF La ice Fig. 16: Bode diag am o x2(n)/u(n)in La ice-based APF and OSG-SOGI. As shown in Eq. (22) and Eq. (23), he alues o he coe icien s o bo h il e s a e nea ly iden ical un- de hese ope a ing condi ions, he di e ences be ween he coe icien s a e less han 0.0001233. Hence, hei equency esponses should ha e a e y simila beha - io . The equency esponses a e ob ained o x2(n)/u(n), in he APF and in he OSG-SOGI o a ange o undamen al equencies, om 100 Hz o 10 kHz, wi h a bandwid h o 4 Hz, a sampling equency o 20 kHz, o bo h il e s. In Fig. 17, one can obse e ha bo h OSG beha e like a BPF, bu o undamen al equencies g ea e han 400 Hz, he magni ude esponses begin o ha e di e ences, al hough hey main ain hei uning. F om equencies g ea e han 3 kHz, he SOGI begins o lose i s uning, bo h in i s magni ude and phase esponse. -150 -100 -50 0 Magni ude (dB) 101102103104 -180 -90 0 90 180 Phase (deg) F equency (Hz) OSG-SOGI APF La ice Fig. 17: Bode diag am o x2(n)/u(n)in La ice-based APF and OSG-SOGI o a ious uning equencies. 102103104 -80 -60 -40 -20 0 Magni ud(dB) APF La ice OSG-SOGI (a) Fo a ious uning equencies. Magni ud(dB) 102103104105 -25 -20 -15 -10 -5 0 5 APF La ice OSG-SOGI (b) Fo a ious sampling equencies. 101102103104 -35 -30 -25 -20 -15 -10 -5 0 5 F ecuency(Hz) Magni ud(dB) APF La ice OSG-SOGI 500Hz 14 kHz 17 kHz 20 kHz 23 kHz 29 kHz 11 kHz 8 kHz 5 kHz 2 kHz 26 kHz (c) Fo a ious sampling equencies and a ia ion o he uning equency. Fig. 18: Magni ude o x2(n)/u(n)in he La ice-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 F ecuency(Hz) a23 -6 -4 -2 0 2 a11 0 1 2 3 a12 0 2 4x 10-3 a13 10210 10 F ecuency(Hz) 3 4 APF La ice OSG-SOGI (a) Fo a ious uning equencies. -10 -5 0 5 a11 0 1 2 3 a12 -0.5 0 0.5 1 a13 10210310410 5 F ecuency(Hz) -3 -2 -1 0 a21 -1 0 1 a22 -0.4 -0.2 0 0.2 a23 102103104105 F ecuency(Hz) APF La ice OSG-SOGI (b) Fo a ious sampling equencies. Fig. 19: Beha io o he ma ix pa ame e s o he s a e equa- ion o APF and OSG-SOGI. Figu e 18 displays he esul o he magni ude o x2(n)/u(n)o he la ice APF and he OSG-SOGI wi h a bandwid h o 4 Hz and a sampling equency o 20 kHz a a ious equencies, o a uning equency o 50 Hz wi h sampling equencies anging om 100 Hz o 100 kHz and o a ious sampling equencies and a ia ions o he equency o uning. As can be no- iced, om a uning equency o 600 Hz and a sam- pling equency below 1 kHz, he uning o he SOGI is no accu a e, and so a e i s cha ac e is ics as OSG, which does no happen wi h he APF. The magni ude in dB o x2(n)/u(n)is ob ained by e alua ing he APF and he OSG-SOGI wi h a band- wid h o 4 Hz, depic ed in Fig. 18(a) o a sampling equency o 20 kHz and he a ia ion o he uning equency. In Fig. 18(b) he uning equency is kep a 50 Hz wi h a ia ion o he sampling equency om 100 Hz o 100 kHz and in Fig. 18(c) he esul o he magni ude is shown o se e al sampling equencies (500 Hz, 2 kHz, 5 kHz, 8 kHz, 11 kHz, 14 kHz, 17 kHz, 20 kHz, 23 kHz, 26 kHz, and 29 kHz) and a ia ion o he uning equency. As can be seen, he APF main- ains a cons an magni ude o 0 dB o all he a ia- ions in all he e alua ed anges. On he o he hand, he SOGI loses he uning s a ing om a uning e- quency o 500 Hz and a sampling equency lowe han 1 kHz, and he e o e hence i s cha ac e is ics as OSG. Figu e 19 shows he beha io o he ma ix pa ame- e s o he s a e equa ion o he APF Eq. (3) and he OSG-SOGI Eq. (18) o a ious uning and sampling equencies. The pa ame e s begin o di e mo e sig- ni ican ly om uning equencies g ea e han 500 Hz and sampling equencies below 1 kHz in mos cases. This is demons a ed by he esul s in Fig. 16, Fig. 17, and Fig. 18. Figu e 20, has he magni ude esponse su ace o x2(n)/u(n), as a unc ion o he uning equency and he sampling equency. Obse ing ha o he APF, he esul is a comple ely la su ace wi h a magni- ude o 0 dB cons an o any a ia ion o he equen- cies. This does no occu o he OSG-SOGI, whe e i is obse ed ha he magni ude esponse a ies as he equencies a y, mo ing away om he equi ed pass- band. Being he wo s case when he uning equency inc eases and he sampling equency dec eases. 0 1 2 x 10 4 0 1 2 3 x 10 4 -300 -200 -100 0 F ecuency(Hz) Sampling F ecuency(Hz) Magni ud(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 F ecuency(Hz) Sampling F ecuency(Hz) Magni ud(dB) -350 -300 -250 -200 -150 -100 -50 0 (b) OSG-SOGI. Fig. 20: Su ace o he magni ude o x2(n)/u(n) o a ious sampling equencies and a ia ion o he uning e- quency. ©2021 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 8 POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 19 |NUMBER: 1 |2021 |MARCH 5. Simula ion and Expe imen al Resul s In o de o alida e he analysis, he APF and he OSG-SOGI a e simula ed by using MATLAB/Simulink p og am and an expe imen al se up was implemen ed. A CDM2480 es pla o m, wi h a TMS320F2812 ixed-poin DSP om Texas Ins umen s as he cen al elemen , sui able o mo ion con ol and powe elec onics applica ions, was used o implemen and es bo h s uc u es as OSG. The ixed poin DSP, wi h a clock equency o 150 MHz, was used o gene a e he inpu signal, he OSG algo i hms and he ou pu signals wi h a 12 bi D/A con e e . All simula ed and expe imen al esul s, we e ob- ained using he s uc u es in Fig. 7 and Fig. 13. The ou pu s x1( )and x2( )o he APF and he OSG-SOGI a e ob ained. The OSG inpu signal and pa ame e s a e he same o he simula ion and he expe imen al pa , whe e he inpu signal is a sinusoid wi h uni y ampli ude and equency equal o he uning equency o he il e . A bandwid h o 4 Hz was se o he de- sign o he OSGs. In he DSP, a ixed-poin Q15 base was used o global calcula ions whe eas a Q30 base was used o calcula ions o he il e s. Vol age(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 1V e V e 90º V e V e 90º Vol age(V)Vol age(V) Vol age(V) 2APF 1APF 2SOGI 1SOGI (a) Simula ion. V e 2APF V e 90º 1APF V e 2SOGI V e 90º 1SOGI (b) DSP Implemen a ion. Fig. 21: x1( )and x2( )o he APF and he OSG-SOGI o a sampling equency o 20 kHz and uning equency o 50 Hz. In he expe imen al esul s ob ained o he OSGs, channels A and B in blue a e x2( )and x1( )o he APF wi h [1 V/di ]; channels C and D in g een a e x2( )and x1( )o he SOGI wi h [1 V/di ]. Co e- sponding e e ence signals (in ed), an o he unda- men al inpu signal on channels A and C and delayed signals 90 deg ees wi h espec o his inpu signal on channels B and D, we e added. The esul s o a equency o 50 Hz o he inpu sig- nal and uning, wi h a sampling equency o 20 kHz, a e p esen ed in Fig. 21, whe e i is e idenced ha bo h OSGs beha e in acco dance wi h he es ablished, bo h in he simula ion and in he DSP implemen a ion. The ou pu s x1( )and x2( ) ollow hei e e ences and e ain hei wa e o m, and main ain he gain o 1, nec- essa y condi ion o bo h OSGs ope a ing 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) Vol age(V) V e V e 90º V e V e 90º Vol age(V) Vol age(V) Vol age(V) 2APF 1APF 2SOGI 1SOGI (a) Simula ion. V e 2APF V e 90º 1APF V e 2SOGI V e 90º 1SOGI (b) DSP Implemen a ion. Fig. 22: x1( )and x2( )o he APF and he OSG-SOGI o a sampling equency o 20 kHz and uning equency o 500 Hz. The sampling equency is kep a 20 kHz and he equency o he inpu and uning signal was inc eased o 500 Hz in Fig. 22 and 1000 Hz in Fig. 23. In he simula ion o bo h uning equencies, he signals o he o hogonal sys em co esponding o he APF ha e a good ollow-up o he e e ence signals wi h a gain o 1. The OSG-SOGI, loses i s cha ac e is ics like OSG, wi h an ad ance o 0.0002 seconds, ela i e o he e - e ence signals, which in oduces a phase shi , as well as a dec ease in he gain, which is no eaching 1. ©2021 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 9