Application Note, V1.0, July 006 AP16097 XC164 Diffeent PWM Wavefom Geneation fo 3-Phae AC Induction Moto with XC164CS Micocontolle
Edition 006-08-04 Publihed by Infineon echnologie AG 8176 München, Gemany Infineon echnologie AG 006. All Right Reeved. LEGAL DISCLAIMER HE INFORMAION GIVEN IN HIS APPLICAION NOE IS GIVEN AS A HIN FOR HE IMPLEMENAION OF HE INFINEON ECHNOLOGIES COMPONEN ONLY AND SHALL NO BE REGARDED AS ANY DESCRIPION OR WARRANY OF A CERAIN FNCIONALIY, CONDIION OR QALIY OF HE INFINEON ECHNOLOGIES COMPONEN. HE RECIPIEN OF HIS APPLICAION NOE MS VERIFY ANY FNCION DESCRIBED HEREIN IN HE REAL APPLICAION. INFINEON ECHNOLOGIES HEREBY DISCLAIMS ANY AND ALL WARRANIES AND LIABILIIES OF ANY KIND (INCLDING WIHO LIMIAION WARRANIES OF NON-INFRINGEMEN OF INELLECAL PROPERY RIGHS OF ANY HIRD PARY) WIH RESPEC O ANY AND ALL INFORMAION GIVEN IN HIS APPLICAION NOE. Infomation Fo futhe infomation on technology, delivey tem and condition and pice pleae contact you neaet Infineon echnologie Office (www.infineon.com). Waning Due to technical equiement component may contain dangeou ubtance. Fo infomation on the type in quetion pleae contact you neaet Infineon echnologie Office. Infineon echnologie Component may only be ued in life-uppot device o ytem with the expe witten appoval of Infineon echnologie, if a failue of uch component can eaonably be expected to caue the failue of that life-uppot device o ytem, o to affect the afety o effectivene of that device o ytem. Life uppot device o ytem ae intended to be implanted in the human body, o to uppot and/o maintain and utain and/o potect human life. If they fail, it i eaonable to aume that the health of the ue o othe peon may be endangeed.
PWM fo ACIM AP99007 Reviion Hitoy: 006-07 V1.0 Peviou Veion: Page none Subject (majo change ince lat eviion) We Liten to You Comment Any infomation within thi document that you feel i wong, unclea o miing at all? You feedback will help u to continuouly impove the quality of thi document. Pleae end you popoal (including a efeence to thi document) to: mcdocu.comment@infineon.com Application Note 3 V1.0, 006-07
PWM fo ACIM able of Content Page 1 Intoduction...5 3-Phae AC Induction Moto Contol Pinciple..6.1 Baic Opeation heoy...6. VVVF Contol.6 3 Diffeent PWM cheme 8 3.1 Geneal heoy of PWM (Pule Width Modulation). 8 3. SPWM (Sinuoidal PWM)...8 3..1 Baic Pinciple...8 3.. Implementation Method....9 3..3 Modulation Index...10 3..4 3-Phae SPWM...11 3.3 HIPWM (hid-hamonic Injection PWM). 11 3.4 SAPWM (Saddle-wave PWM)....1 3.5 SVPWM (Space Vecto PWM).1 4 XC164CS Implementation... 14 4.1 CAPCOM6 nit Intoduction...14 4.1.1 Oveview...14 4.1. 1 Cente-Aligned Mode...14 4.1.3 PWM Signal Geneation...15 4. CAPCOM6 Initialization...16 4.3 Pogamming Conideation and Flow Chat...16 5 Expeiment Reult...18 5.1 Simulation Reult...18 5. Ocillocope meaued wavefom...19 6 Concluion...1 Application Note 4 V1.0, 006-07
PWM fo ACIM Intoduction 1 Intoduction In thi application note, the method to geneate diffeent PWM wavefom fo 3-phae AC induction moto uing an Infineon 16-bit micocontolle XC164CS ae intoduced. Fo bette undetanding, the baic opeation and contol pinciple of 3-phae AC induction moto i decibed in Section. he content of Section 3 i the epective explanation of the theoy of fou popula PWM cheme fequently utilized in AC induction moto contol, SPWM (Sinuoidal PWM), HIPWM (hid-hamonic Injection PWM), SAPWM (Saddle-wave PWM), SVPWM (Space Vecto PWM). In Section 4, XC164CS DAvE configuation and code pogamming fo diffeent PWM cheme ealization ae dicued in detail and illutated with flow chat. At the end of thi aticle ome expeimental eult including imulato wavefom and figue meaued by ocillocope ae hown to validate the algoithm and ome concluion ae dawn. Futhemoe, two et of ouce code fo SPWM and SVPWM with 10KHz caie fequency and output fequency fom 0 to 50Hz in 10 econd epectively a well a an EXCEL file on calculation table fo all PWM mode ae attached. Application Note 5 V1.0, 006-07
PWM fo ACIM 3-Phae AC Induction Moto Contol Pinciple 3-Phae AC Induction Moto Contol Pinciple.1 Baic Opeation heoy he 3-phae tato and 3-phae oto ae conideed a two fundamental pat of a 3- phae AC induction moto. When the 3-phae tato ae enegized by the 3-phae AC powe ouce, cuent flow i geneated in the tato. he magnetic field yntheized by 3-phae tato cuent i alway otating inceantly with the vaiation of the cuent. hi otating magnetic field cut the oto and the cuent geneated in it inteact with the otating magnetic field and thu poduce the magnetic toque which make the oto otate (Figue 1). he otating peed of the oto n hould be le than that of the otating magnetic field n 0. Revee otating of the oto will be ealized by two of the 3-phae powe ouce poition exchanged. Figue 1 Rotating tat fo AC induction moto he otating diection of the otating magnetic field i conitent with the cuent phae and it peed i popotional to the powe ouce fequency f and inveely popotional to the magnetic pola pai numbe P. Calculated pe minute, the peed of the otating magnetic field n 0 can be epeented by thi equation: n 60f p 0 = (E-1) Whee f i the fequency of powe ouce and P i the magnetic pola pai numbe.. VVVF Contol Fom the equation (E-1) two pimay method fo peed contol of 3-phae AC induction moto can be concluded: one i to change the magnetic pola pai numbe but the inflexibility and low efficiency of thi method ha limited it populaity of application. Anothe method i to egulate the tato cuent fequency. ually a pinciple of popula pactical implementation called VVVF i adopted on peed egulation. he 3-phae tato cutting the flux of the otating magnetic field eult in the back electomotive foce geneated and it can be calculated by the equation given below: E1 = 4. 44k 1f1N 1Φ M (E-) Application Note 6 V1.0, 006-07
PWM fo ACIM 3-Phae AC Induction Moto Contol Pinciple Whee k 1 i the winding tuctue elated contant and N 1 i the numbe of tun of the tato winding pe phae, f 1 i the tato cuent fequency, Φ M i the main flux. Let a contant KE 1 = 4. 44k 1N1, we have E 1 = K E 1f1Φ M (E-3) Since the voltage dop on the tato impedance only occupie elatively vey mall potion of the whole tato voltage 1 and can be ignoed, theefoe Deived Fom (E-3) and (E-4), it hold Whee K E 1 1 E 1 (E-4) 1 Φ M = KΦ (E-5) f1 1 K Φ = i alo a contant. Fom (E-5) it can be concluded that if the value of / f can be contolled to be a contant, 1 1 Φ M emain unchanged. hi contol method to egulate fequency with voltage changed accodingly i uually called VVVF, i.e. Vaiable Voltage Vaiable Fequency. Application Note 7 V1.0, 006-07
PWM fo ACIM Diffeent PWM Scheme fo 3-Phae AC Induction Moto 3 Diffeent PWM Scheme fo 3-Phae AC Induction Moto 3.1 Geneal heoy of PWM (Pule Width Modulation) PWM (Pule Width Modulation) technology wa put fowad baed on an impotant concluion in the ample contol theoy that when two goup of pule with the ame impule aea but diffeent wavefom ae input to an inetial link, the effectivene of thee two goup of impule ae the ame. he main pinciple of PWM technique can be biefly decibed a: hough ON/OFF contol on the emiconducto witching component, a eie of pule with the ame amplitude and diffeent width ae geneated on the output pot to eplace the inuoidal wave o othe wavefom equied. he duty cycle of the output wavefom need to be modulated by a cetain ule and a a eult both the output voltage and output fequency of the invete can be egulated. he ignal befoe PWM and afte PWM ae hown in Figue and Figue 3 epectively. Compaed with Figue, the fequency of the ignal in Figue 3 i inceaed, the amplitude emain unchanged and theefoe the aveage value of the ignal i deceaed. heefoe PWM jut meet the equiement of VVVF decibed in ection. and i adopted a the geneal method fo AC induction moto contol. Figue Pule befoe PWM Figue 3 Pule afte PWM 3. SPWM (Sinuoidal PWM) 3..1 Baic Pinciple Among all PWM cheme, SPWM i one of the mot popula and imple method utilized in powe invete and moto contol field. It main featue can be ummaized a ine-tiangle wave compaion. A hown in Figue 4, a ine wave (modulated wave, magenta) i compaed with a tiangle wave (caie wave, geen) and when the intantaneou value of the tiangle wave Application Note 8 V1.0, 006-07
PWM fo ACIM Diffeent PWM Scheme fo 3-Phae AC Induction Moto i le than that of the ine wave, the PWM output ignal (oange) i in high level (1). Othewie it i tuned into the low level (0). he level witching edge i poduced at evey moment the ine wave inteect the tiangle wave. hu the diffeent coing poition eult in vaiable duty cycle of the output wavefom. Figue 4 SPWM Wavefom Geneation 3.. Implementation Method In tem of the baic pinciple of SPWM illutated above, it eay to implement uing analog cicuit (Figue 5). Sine and tiangle wave ae epectively geneated by pecially deigned cicuit and then fed to the popely elected compaato which can output the deied SPWM ignal. But the contol peciion and eliability of thi cheme ae alway not o atifying due to the complicated cicuit tuctue a well a the intability of the paamete of all analog device. With the development of the micocontolle, nowaday the oftwae implementation fo SPWM i abolutely motly adopted to ealize high peciion contol. Figue 5 Analog Scheme fo SPWM Implementation he method utilizing the natual inteection point of ine wave with tiangle wave to ealize PWM i called Natual Sampled Method. It able to demontate the tue moment the pule i tated and ended and the SPWM wavefom i much cloe to ine Application Note 9 V1.0, 006-07
PWM fo ACIM Diffeent PWM Scheme fo 3-Phae AC Induction Moto wave. hi method i not adopted in mot contol application due to the andom inteection point of ine and tiangle wave which eult in complicated calculation and difficult eal-time implementation. o ovecome thee diadvantage, anothe new method called Regula Sampled Method wa put fowad. It i widely ued in engineeing application nowaday. It i baed on the pinciple that a cetain moment i elected in evey cycle of the tiangle caie wave to find the coeponding value of the ine wave voltage which i intoduced to ample on tiangle wave and the ample eult detemine the ON/OFF moment of the powe device, ignoing whethe the ine wave and tiangle wave inteect in thi moment o not. A moe pactical method named Aveage Symmetic Regula Sampled Method (illutated in Figue 6) i applied in mot contol cae. In Figue 6, the ampled moment i given on the tough point of the tiangle wave, then centeed by the coeponding value of ine wave voltage, a hoizontal line i dawn to inteect the tiangle wave on both ide o the leading and tailing edge of PWM wavefom ae decided upon that. he leading edge i a little wide which jut compenate the naow tailing edge and theefoe a an aveage conideation the effectivene of thi method i almot equivalent to that of the natual ampled method. Figue 6 Symmetic Regula Sampled Method 3..3 Modulation Index When the amplitude of the modulated ine wave i lage than that of the caie tiangle wave, ove modulation occu. Once the ine wave eache the peak of the tiangle, the PWM pule will obtain the maximum width o the modulation will ente the tate of atuation (Figue 7). heefoe the item Modulation index (epeented by m) defined by the atio of the amplitude of the modulated wave to that of the caie wave i intoduced to decibe the modulation tate. When 0<m<1, the linea elationhip between the input and PWM output voltage i maintained. If the value of modulation index exceed 1, thi linea mode cannot be kept any moe and the pecial contol tategy fo ove modulation i equied. Application Note 10 V1.0, 006-07
PWM fo ACIM Diffeent PWM Scheme fo 3-Phae AC Induction Moto Figue 7 SPWM Satuation 3..4 3-Phae SPWM Fo 3-phae AC induction moto contol ytem, the SPWM ignal to tigge the ix powe witche in the voltage ouce invete i geneated by compaion of the 3-phae ine wave with the ame tiangle wave (Figue 8). Figue 8 3-phae SPWM Wavefom (Ppice Simulation) 3.3 SPWM (Sinuoidal PWM) If cetain potion of the thid hamonic wave i injected into the ine wave, the eulted modulated wave will appea a addle-like hape (Figue 9) and the amplitude will Application Note 11 V1.0, 006-07
PWM fo ACIM Diffeent PWM Scheme fo 3-Phae AC Induction Moto obviouly deceae. With keeping m<1, the amplitude of the fundamental wave can exceed that of the tiangle wave and thu utilization atio of the DC-bu voltage inceae. Figue 9 3-phae HIPWM Modulated Wave 3.4 SAPWM (Saddle PWM) SAPWM i one type of the optimized PWM method and it modulated wave (Figue 10) can be exactly decibed by the mathematic equation (E-6): π 3 inω1t, 0 < ω1t < 3 y ( t) = (E-6) π π π in( ω ), < < 1t ω1t 3 3 It can be concluded fom the eeach eult that the maximum output voltage of the invete adopting SAPWM can each the value of the input voltage of the electic net which i 15% highe than that of the invete uing SPWM. Futhemoe, the SAPWM invete ha been impoved in etaining hamonic cuent, educing toque fluctuation and enhancing output toque. ω 1 t Figue 10 3-phae SAPWM Modulated Wave 3.5 SVPWM (Space Vecto PWM) Baed on the 3-phae integated geneation effectivene and fo the pupoe of appoaching the ideal ounded tack with contant amplitude of the otating field fomed by the gap flux, SVPWM wavefom i ealized by the combination of diffeent witching mode of the invete. In a 3-phae invete, if 1 i defined a the poitive half of the DCbu voltage and 0 a the negative half (both ae efeed to the neutal point), thee ae totally 8 witch tate fo the ix powe witche (Figue 11). heefoe 8 voltage vecto (active vecto 1 ~ 6 and zeo vecto 0, 7 ) can be coepondingly defined to fom Application Note 1 V1.0, 006-07
PWM fo ACIM the vecto pace which i divided into 6 ecto (Figue 1). Diffeent PWM Scheme fo 3-Phae AC Induction Moto S 0 = 000 S = 001 S = 1 011 S 3 = 010 S 4 = 110 S 5 = 100 S 6 = 101 Figue 11 Eight Switch State S 7 = 111 3 S = 3 010 S = 011 S = 000 S = 110 0 4 S = 111 S 1 = 001 1 4 7 5 S 5 = 100 S 6 = 101 6 Figue 1 Voltage Vecto Space he voltage vecto i geneally decompoed into two neaet adjacent voltage vecto with zeo vecto 0 and/o 7 a upplement. hu the vecto in the ix ecto I ~ VI ae elatively calculated (aume that the zeo vecto opeation time i halved by 0 and 7 ) a the equation (E-7): Application Note 13 V1.0, 006-07
PWM fo ACIM Diffeent PWM Scheme fo 3-Phae AC Induction Moto Application Note 14 V1.0, 006-07 = = = = = = ) ( ) ( ) ( ) ( ) ( ) ( 7 0 1 6 1 1 6 6 7 0 6 5 6 6 5 5 7 0 5 4 5 5 4 4 7 0 4 3 4 4 3 3 7 0 3 3 3 7 0 1 1 1 VI V IV III II I (E-7) Fo detailed SVPWM calculation and moe elated infomation, pleae efe to anothe application note (AP0803601, itle: Space Vecto Modulation and Ove-Modulation with an 8-bit Micocontolle, www.infineon.com/micocontolle->application Note -8-bit Micocontolle).
PWM fo ACIM XC164CS Implementation of Diffeent PWM Geneation 4 XC164CS Implementation of Diffeent PWM Geneation 4.1 CAPCOM6 nit Intoduction 4.1.1 Oveview he CAPCOM6 unit of XC164CS povide independent time 1 and 13 fo PWM ignal geneation, epecially fo AC induction moto contol. It block diagam i hown in Figue 13. Figue 13 CAPCOM6 Block Diagam hee ae 3 captue/compae channel fo ime1 (16-bit) and each channel can be ued eithe a captue o compae channel. Geneation of a 3-phae Cente- o edgealigned PWM ignal with dead-time contol fo each channel to avoid hot-cicuit in the powe tage i uppoted (6 output, individual ignal fo lowide and highide witche) by 1. ime13 (10-bit) ha one independent compae channel with one output. It can be ynchonized to 1 and uppot ingle-hot mode. Fat emegency top without CP load via extenal ignal CRAP and elated oftwae inteupt poce ae both uppoted by CAPCOM6 unit to enue the eliable potection unde unexpected fault. 4.1. 1 Cente-Aligned Mode 1 block i the main unit to geneate the 3-phae PWM. A 16-bit counte i connected to 3 channel egite via compaato, which geneate a ignal when the counte content match one of the channel egite content. Beide the 3-phae PWM geneation, the 1 block offe option fo individual compae and captue function a well a dead-time contol. 1 can opeate in Edge-Aligned mode o Cente-Aligned mode. In thi aticle the Cente-Aligned mode i adopted in PWM implementation and it opeation pinciple i illutated in Figue 14. Application Note 15 V1.0, 006-07
PWM fo ACIM XC164CS Implementation of Diffeent PWM Geneation 4.1.3 PWM Signal Geneation Figue 14 1 Cente-Aligned Mode A hown in Figue 15, each channel of 1 i connected to the 1 counte egite via it individual equal-to compaato, which geneate a match ignal (CC6x_O) when the content of the counte (CC6_1) matche thoe of the aociated compae egite (CC6xR). Each channel conit of the compaato and a double egite tuctue - the actual compae egite CC6xR feed the compaato and an aociated hadow egite CC6xSR i peloaded by oftwae and tanfeed into the compae egite when 1 hadow tanfe (1_S) become active. CC6xS i a State Bit which hold the compae opeation tatu of each channel. Bit CC6xPS/CO6xPS elect the tate of each channel, conideed a the paive tate duing which the paive level (defined in egite PSLR) i diven by the output pin: 0 epeent that the compae output dive paive level while CC6xS i 0 and 1 define that the compae output dive paive level while CC6xS i 1. Figue 15 PWM Signal Geneated by 1 Application Note 16 V1.0, 006-07
PWM fo ACIM XC164CS Implementation of Diffeent PWM Geneation 4. CAPCOM6 Initialization he geneal initialization of CAPCOM6 fo all the PWM cheme dicued in thi aticle i ummaized below (accoding to diplay ode in DAvE): Module Clock : Enable module. Pin Contol : e pin CC60, CC61, CC6, CO60, CO61, CO6 a output. 1 : 13 : Multi Ch. : Channel : ap/in : Inteupt : Function : fcpu/4 (Reolution: 0.100u); Cente-Aligned mode; 1 peiod 100u (caied fequency 10KHz); Stat 1 afte initialization; Enable inteupt fo 1 peiod match (geneating inteupt pe caie cycle). No initialization i equied fo it, 13 in t ued hee. Diable multi-channel mode. Channel 0,1, hould be individually configued a (x=0,1,): Compae Mode 3 (e pin CC6x/CO6x a output); Enable 1 modulation fo CC6x; he compae output CC6x dive paive level while CC6xS i 0 ; he compae output CO6x dive paive level while CC6xS i 1 ; he paive level of CC6x and CO6x output ae all 1 ; Enable dead time geneation. he demo code i jut focu on PWM algoithm implementation and veification, CRAP function i not neceay to be configued. In Inteupt Configuation elect Enable 1 inteupt / node I(IE). CC6 I IN -> Level 15, Goup 0 (Fo convenience it et to the highet pioity.) In Initialization Function elect CC6_vInit. 4.3 Pogamming Conideation and Flow Chat Hee in all thee PWM cheme 10KHz caie fequency i adopted and thu 1PR value i 1F3 H (499 D ) with eolution et to 0.1u. A a eult 499 D i egaded a the PWM cycle value in the code pogamming and pule width table calculation. Fo SPWM/HIPWM/SAPWM, all the modulated wavefom can be decibed with mathematic equation o pule width table can be diectly pe-calculated fo look-up. Hee the π modulated wave i divided into 3000 point and theefoe the 3-phae look-up pointe have 1000 point diffeence with each othe. In the 1 peiod match inteupt evice pogam, the incement of the 3-phae look-up pointe P inc ae detemined by: P inc = F caie PWM-out PWM-out 3000 = 3000 = 3000 = FPWMout (E-8) PWM-out Fcaie 10000 3 he 3-phae look-up pointe ae updated epectively with P inc incement evey 1 Peiod-Match Inteupt. Hence the pule width can be obtained by uing thee pointe to look up the pecalculated table. Pleae efe to the attached EXCEL file fo moe detail about the look-up table geneation. It eay to geneate HIPWM o SAPWM wavefom diectly uing thei look-up table to eplace SPWM table in the attached SPWM demo code file. About detailed SVPWM algoithm pogamming, pleae efe to anothe two application Application Note 17 V1.0, 006-07 F 10
PWM fo ACIM XC164CS Implementation of Diffeent PWM Geneation note (AP0801701, itle: XC866 Contant V/f Contol of Induction Moto ing Space Vecto Modulation ; AP080360, Optimized Space Vecto Modulation and Ovemodulation with the XC866. www.infineon.com/micocontolle->application Note -8-bit Micocontolle) Figue 16 how the geneal flow chat of the 1 Peiod-Match Inteupt evice ubpogam in all thee PWM cheme. Figue 16 Flow Chat of 1 Peiod-Match Inteupt Sevice Routine Application Note 18 V1.0, 006-07
PWM fo ACIM Expeiment Reult 5 Expeiment Reult 5.1 Simulation Reult Figue 17 how the imulated 3-phae SVPWM wavefom with dead-time contol (P1L.0/CC60, P1L.1/CO60, P1L./CC61, P1L.3/CO61, P1L.4/CC6, P1L.5/CO6) uing KEIL uviion3 imulato. (a) 3-phae SVPWM ignal (b) 3-phae SVPWM ignal (Zoomed-in) (c) dead-time contol Figue 17 SVPWM Simulated Wavefom Application Note 19 V1.0, 006-07
PWM fo ACIM Expeiment Reult 5. Ocillocope Meaued Wavefom he modulated wavefom of 3-phae SPWM, HIPWM (with 1/4 and 1/6 amplitude thid hamonic injection epectively), SAPWM and SVPWM meaued by ocillocope ae individually hown in Figue 18. All the ignal ae meaued afte being filteed epectively with thee 3.3KΩ eito and eight 1uF capacito between CC6x/CO6x and gound. Figue 19 diplay the zoomed-in PWM output wavefom (diectly meaued between CC6x/CO6x and gound) and the dead-time fo thee PWM cheme. Fo SPWM, HIPWM (1/4), HIPWM (1/6), SAPWM, SVPWM, the dead-time i coepondingly et to 1u, u, 3u, 4u, 5u. Figue 18 Modulated Wavefom fo Diffeent PWM Scheme Application Note 0 V1.0, 006-07
PWM fo ACIM Expeiment Reult Figue 19 Output Signal fo Diffeent PWM Scheme Application Note 1 V1.0, 006-07
PWM fo ACIM 6 Concluion Concluion he implementation of diffeent PWM cheme fo 3-phae AC induction moto contol via Infineon 16-bit MC XC164CS i dicued in thi aticle. he high-pefomance CAPCOM6 unit dedicated fo moto contol povide an eay and fat way to ealize vaiou type of 3-phae PWM ignal geneation. Application Note V1.0, 006-07
http://www.infineon.com Publihed by Infineon echnologie AG