AVR494: AC Induction Moto Contol Uing the contant V/f Pinciple and a Natual PWM Algoithm Featue Cot-effective and flexible -phae induction moto dive Inteupt diven Low memoy and computing equiement 8-bit Micocontolle 1. Intoduction Electical powe ha been ued fo a long time to poduce mechanical motion (eithe otation o tanlation), thank to electomechanical actuato. It i etimated that 5% of the electical powe poduced in the United State i conumed by electical moto. Moe than 5 moto can typically be found in a houe, and nealy a many in a ca. To peeve the envionment and to educe geen-houe effect ga emiion, govenment aound the wold ae intoducing egulation equiing white good manufactue and indutial factoie to poduce moe enegy efficient appliance. Mot often, thi goal can be eached by an efficient dive and contol of the moto peed. Thi i the eaon why appliance deigne and emiconducto upplie ae now inteeted by the deign of low-cot and enegy-efficient vaiable peed dive. Becaue of thei high obutne, eliability, low cot and high efficiency ( 8%), AC induction moto ae ued in many indutial application uch a appliance (wahe, blowe, efigeato, fan, vacuum cleane, compeo ); HVAC (heating, ventilation and ai conditioning); indutial dive (motion contol, centifugal pump, obotic, ); automotive contol (electic vehicle) Howeve, induction moto can only un at thei ated peed when they ae connected to the main powe upply. Thi i the eaon why vaiable fequency dive ae needed to vay the oto peed of an induction moto. The mot popula algoithm fo the contol of a thee-phae induction moto i the V/f contol appoach uing a natual pule-width modulation (PWM) technique to dive a voltage-ouce invete (VSI), a hown on Figue 1-1. The aim of thi application note i to how how thee technique can be eaily implemented on a AT9PWM, an AVR RISC baed micocontolle dedicated to powe contol application. 7545A AVR 1/5
Figue 1-1. Typical Stuctue of an Invete-fed Induction Moto. AT9PWM Key Featue The contol algoithm have been implemented on the AT9PWM, a low-cot low-powe ingle-chip micocontolle, achieving up to 16MIPS and uitable fo the contol of dc-dc buck-boot convete, pemanent magnet ynchonou machine, thee-phae induction moto and buhle DC moto. Thi device integate: - a micocontolle with an 8-bit AVR advanced RISC achitectue (imila to the ATmega 88), - 8 kbyte of In-Sytem-Pogammable flah memoy allowing up to 496 intuction fo the boot pogam and the application pogam, - 51 byte of tatic am to toe vaiable and lookup table ued in the application pogam, - 51 byte of EEPROM to toe configuation data and look-up table, - one 8-bit time and one 16-bit time, - a pogammable watchdog time with an intenal ocillato, - an 11-channel 1-bit ADC and a 1-bit DAC. The main featue that make thi device uited to moto contol application ae the thee powe-tage contolle (called PSC). Thee peipheal ae 1-bit up/down counte with two compaato, whoe output can dive the powe tanito of an invete leg. Thi allow to geneate any thee-phae wavefom by pule width modulation, with an eay management of the invete dead time.. Theoy of Opeation.1 The Aynchonou Moto In oppoition to the buh o buhle DC moto, the aynchonou AC moto ha no pemanent magnet. The oto i made of a quiel cage whee the otating electic field induce a magnetic flux. Thank to the peed diffeence between electic field in the tato and the magnetic flux in the oto, the moto can delive toque and tun.. The Contant V/f Pinciple The contant Volt pe Hetz pinciple i today the mot common contol pinciple ued in adjutable-peed dive of induction machine [1,]. Hence, many eal-life moto contol application do not need a high dynamic pefomance, a long a the peed can be efficiently vaied in the 7545A AVR 1/5
full ange. Thi allow to ue a inuoidal teady tate model of the induction moto, in which the magnitude of the tato flux i popotional to the atio between the magnitude and the fequency of the tato voltage. If thi atio i kept contant, the tato flux will emain contant, and o the moto toque will only depend on the lip fequency. Moe peciely, tating fom the uual model of an induction moto expeed in a fixed efeence fame dφ dφ + R I = V ; jωmφ + R I = dt dt φ = L I + Lm I; φ = L I + Lm I; p * ωm Cem = Lm Im( I I ); Ωm = p whee V, φ, φ, I, I ae epectively the tato voltage, tato and oto magnetic fluxe, tato and oto cuent, and R, R, L, L, L and ae epectively the global tato m ω m eitance, oto eitance, tato inductance, oto inductance, global leakage inductance and mechanical pulation. If the moto i fed with a inuoidal -phae voltage with a pulation, ω V = jω t Vm e, the teady-tate cuent in the oto and the tato will alo be inuoid with ; ω j ω t +ϕ ) ) = ω +ϕ ( ( pulation : I I m e and I = I e j t. The peviou equation lead to m R + I = j L ω Δ lp V j Lm ω lp Lm R, I = V and φ = V Δ Δ, withω lp = ω ω m and Δ = ( R + j L ω)( R + j L ωlp ) + Lm ωlpω. Hence, the oto magnitude φ m can be kept V m contant if the atio i kept contant. At high peed,,and the oto flux Δ Δ j R L ω V m m m m magnitude i kept contant if the atio i kept contant: φ m Vm =. ω R L ω L ω L R L V. Thee expe- The moto toque i then popotional to the lip fequency: ion how that a deied moto toque C em and a deied C em p = φ m R ω lp C R em moto peed ωm can be obtained if ω = ωm +. At low peed,, and pφ Δ R R L m φ V R. When the tato fequency fail unde a given fequency thehold (called the boot fequency), the voltage magnitude mut be kept at a given level (called the boot voltage) to keep the oto flux magnitude contant. At the oppoite, when the fequency become highe than the ated value, the voltage magnitude i alo kept to the ated value, to take the atuation of the invete into account. The oto flux i no moe contant and the toque deceae. m 7545A AVR 1/5
Figue -1. Stato Voltage Magnitude Veu the Stato Fequency Deduced fom the V/f Pinciple f Roughly peaking, the cala V/f contol pinciple conit in feeding the moto winding with a -phae inuoidal voltage whoe amplitude i popotional to the fequency, except below the boot fequency and ove the ated fequency, a hown on Figue -1. In pactice, the lope that define the elation between the voltage magnitude and the voltage fequency i deduced fom the ated teminal upply voltage and the ated upply fequency witten on the moto name plate, and the boot fequency i choen equal to a pecentage (ay 5%) of the ated fequency. Thi pinciple can be ued to build a peed contol loop (Figue -.) in which the diffeence between the deied peed and the meaued peed feed a PI contolle that detemine the tato voltage fequency. To deceae the complexity of the contolle, the input of the V/f law and of the pace vecto PWM algoithm i the abolute value of the tato voltage fequency. If the output of the PI contolle i a negative numbe, two of the witching vaiable diving the powe tanito of the invete ae intechanged. It hould be noticed that the contol pinciple decibed hee can only be ued in application whee the peed i kept contant whateve the load toque. Application whee the load toque mut be kept contant whateve the moto peed equie tato cuent meauement and moe ophiticated contol pinciple. Figue -. Block-diagam of a V/f Speed Contol Loop Sytem 4 7545A AVR 1/5
. The Natual PWM Pinciple So a to feed the tato winding with a -phae inuoidal voltage though an invete, a fit olution i to ue a ine table to geneate thee ine wave with 1 degee phae hift to each othe. Fo thi, the tato pulation ω i ued to feed thee dicete-time integato which compute the intantaneou phae of each tato voltage, θ [ k ] = θ [ k 1] + ω [ k] T θ θ 1 [ k] [ k] 1 = θ = θ [ k [ k 1] 1] + ω + ω [ [ k] T k] T π 4π with θ 1 [] =, θ [] =, θ [] =, being the ampling peiod of the contol algoithm. T When one of thee angle become highe than π, π i ubtacted to it to keep it between and π. A ine table i the ued to compute the thee voltage that hould be applied to the tato, V [ k] = V a V [ k] = V b V [ k] = V c m m m ( ω [ k]) ita( θ [ k]) ( ω [ k]) ita( θ [ k]) ( ω [ k]) ita( θ [ k]) whee V m ( ω ) i the tato voltage magnitude deduced fom the contant Volt pe Hetz pinciple and ita( θ ) = in( θ ). A light impovement can be obtained by adding to the pue ine wave of the ine table a thid 1 hamonic, ita( θ ) = in( θ ) + in(θ ), ince it ha no effect on the moto behavio and it allow 6 to geneate a ignal whoe fit hamonic ha an amplitude which i 15.47% highe ( ) than the ignal maximum (ee Figue -). With thi impovement, we can geneate moe AC voltage with the ame DC bu voltage, o we can inceae the peed of the moto with keeping contant the V/F atio. 1 Figue -. Ue of a Non-inuoidal Wavefom to Inceae the Ratio Between the Fit Hamonic Magnitude and the Wavefom Maximum 1.8.6.4...4.6.8 1.1...4.5.6.7.8.9 1 θ/(π) Thee value ae compaed to the output of an up/down counte (ued a a tiangle geneato). When the up/down counte output ovetep one of thee value, the coeponding output of 7545A AVR 1/5 5
the compaato toggle. A a eult, the duty cycle of each PWM channel i popotional to the coeponding tato voltage value. Since thi up/down counte with thee compaato would be vey heavy to implement by oftwae, uch a device mut be included in a micocontolle o a to uit AC moto contol application. Thi i of coue the cae of the AT9PWM, which povide thee powe tage contolle (PSC). Taking the fit phae a an example, the duty cycle toed in the compae egite of the coeponding PSC will be popotional to T (1 +α tato V V a k [ ] ) max δ, with α 1, V and ae epectively the highet value of the = max T voltage magnitude and the dead time of the invete witche. The eulting data-flow diagam i hown on Figue -4. δ Figue -4. Natual PWM Data Flow Diagam 6 7545A AVR 1/5
.4 How Many Byte ae Needed to Stoe a Sine Table A peented in the peviou ection, the natual PWM algoithm equie a ine table to compute in(θ ) fo all value of θ between and π. Thank to the popetie of the tigonometic function, eveal olution ae poible to educe the length of thi look-up table. The mot efficient ue a look up table of the value of the inu function fo θ between and π only, ince in( π π θ ) = in( θ ) + in( θ π ) fo θ between and π π in( θ ) = in( π θ ) fo θ between and π in( θ ) = in( θ π ) fo θ between π and 4π in( 4π 5π 4π θ ) = in( θ ) + in( θ ) fo θ between and 5π 5π in( θ ) = in(π θ ) fo θ between and π Howeve, thi olution doe not eaily allow to add a thid hamonic to the inu function, a explained in the peviou ection.thi i the eaon why we advie to ue a look-up table 1 ita(θ ) in( with the value of eithe in(θ o θ ) + in(θ ) ) fo θ π between and, and to ue 6 π the following elationhip to compute ita(θ ) between and π : ( θ ) = ( π θ π ita ita ) fo θ between and π π ita( θ ) = ita( θ π ) fo θ between π and π ita( θ ) = ita(π θ ) fo θ between and π The latte olution allow to eaily intechange between the two poible look-up table..5 The PI Regulato Pinciple A PI contolle i an algoithm that can be implemented without eoting to any heavy contol theoy. The aim of uch an algoithm i to detemine the plant input (in ou cae the tato voltage fequency) that will make the meaued output (in ou cae the peed of the oto) each the efeence (the peed the ue wihe to have). PI tand fo Popotional and Integal, two tem which decibe two ditinct element of the contolle: - a popotional tem, which i equal to the poduct of the eo ignal (the meaued plant output ubtacted to the efeence) by a contant called the popotional gain. The popotional tem mainly detemine the hot-tem behavio of the contolle ince it detemine how the contolle tongly eact to efeence change; - an integal tem, which add long-tem peciion to the contolle. Thi tem i the poduct of the um of all the peviou eo ignal value by a contant called the integal gain. Thi um keep all the peviou eo ignal value in memoy, and evolve a long a the eo i not 7545A AVR 1/5 7
zeo. It allow the contolle to cancel the diffeence between the meaued output and the efeence, but it uually make the cloed loop ytem lowe and deceae it tability, howeve. Thee two tem ae ometime added to a thid one, popotional to the deivative of the eo ignal. The eulting egulato i then called a PID (Popotional, Integato and Deivative). To contol the peed of and induction moto by the V/f pinciple, thi thid tem i not ueful. It inceae the peed of the cloed loop, but it alo deivate noie and it deceae the tability of the cloed loop. So, the D tem i ticky to adjut..6 Seno fo Moto Contol Speed eno play a citical ole in a contol loop. Seveal olution ae poible to obtain the peed and diection of the oto. The mot pecie, but alo the mot expenive, i to ue abolute o incemental encode. Thee optical eno may be a expenive a the induction moto itelf. Anothe olution that we ued in ou expeiment i to ue the output of a tachomete geneato that i connected to the oto haft. An analog-to-digital convete i needed to inteface the output of thi eno with the micocontolle. A thid olution i to ue Hall effect eno. Thee cheap non-contact eno ae now popoed in mall IC package including the eno and a eno ignal conditioning cicuit. They povide an output that can be diectly connected to the input-output pot of a micocontolle. 4. Hadwae Deciption (ATAVRMC) Thi application i available on the ATAVRMC evaluation boad. Thi boad povide a way to tat and expeiment aynchonou moto contol. ATAVRMC main featue: AT9PWM micocontolle 11-VAC moto dive Intelligent Powe Module (V / 7W boad ized) ISP & Emulato inteface RS inteface Iolated I/O fo eno -1V input fo command o eno 8 7545A AVR 1/5
5. Softwae Deciption All algoithm have been witten in the C language uing IAR' embedded wokbench and AVR Studio a development tool. The CPU i clocked at 8 MHz uing the intenal calibated RC ocillato. In thi application, component of the micocontolle play an impotant ole: The 8-bit time i ued to geneate an inteuption evey 1 m, which i the ampling peiod of the ADC and of the PIO contolle. Thi time i ued in CTC mode (clea time on compae) and clocked at khz. The 16-bit time1 i fee fo othe tak. The PSC ae clocked by the PLL at 64 MHz and ae ued a thee ynchonou counte, the thid one (PSC) being the mate and PSC and PSC1 being the lave. In thi configuation, the modification of the value of the compae egite of PSC and PSC1 ae taken into account when the PSC compae egite ae modified. Thi allow the thee PSC to evolve imultaneouly. They ae configued in centeed mode with a witching fequency of 1 khz (the value 666 i toed in the RB egite, o that the PWM fequency appoximately equal 64 MHz/(* 666)=1 khz). The analog-to-digital convete i alo configued to geneate an inteuption when the conveion i finihed. Thi allow to have a contant delay between two ample of the meaued peed. The voltage efeence of the convete i choen a Vcc. The digital-to-analog convete can alo be ued duing the tet to watch how intenal vaiable evolve. Fo the natual PWM algoithm, a table of the ounded value of πk 17 in( ) 48 o 17 (in( πk 1 6πk ) + in( )) fo k 48 6 48 between and 1 i ued. The length of thi table (11 byte) i a good tade-off between the ize of the available intenal memoy and the quantification of the oto haft peed. Fo a bidiectional peed contol, the value toed in two of the compaato ae intechanged when the output of the PI egulato i a negative numbe. Figue 5-1 and Figue 6- how the peed epone and the tato voltage obtained with the micocontolle fo peed efeence tep between +7 and -7 RPM. Thee eult wee obtained on a 75 W induction machine (with a load le than 7W). Thee figue how that ω the deied peed i eached afte a 1 econd tanient, and that when the tato fequency obtained at the output of the PI egulato nea zeo, the tato voltage magnitude i equal to the boot voltage. Thee figue alo confim that the ame peed and toque can be obtained with a lowe tato voltage peak-to-peak amplitude thank to the ue of a thid hamonic component, at the pice of a le egula tanient. 7545A AVR 1/5 9
Figue 5-1. Expeimental Reult Obtained with Puely Sinuoidal Lookup Table (a) peed [pm] tato voltage [V] tato voltage [V] 5 5 1 1 4 5 6 7 8 (b) 5 5 1 1 4 5 6 7 8 (c) 5 5..4.6.8.1.1.14.16.18. time [] 1 7545A AVR 1/5
Figue 5-. Expeimental Reult Obtained with a Lookup Table Including a Thid Hamonic Component (a) peed [pm] tato voltage [V] tato voltage [V] 5 5 1 1 4 5 6 7 8 (b) 5 5 1 1 4 5 6 7 8 (c) 5 5..4.6.8.1.1.14.16.18. time [] 6. Reouce Code Size: 1 947 byte Ram Size: 46 byte (including ine table) CPU Load: % (without PI egulation) / 55% (with PI egulation) 7. Refeence 1. W. Leonhad, Contol of electical dive, nd Ed, Spinge, 1996.. F.A. Toliyat, S.G. Campbell, DSP-baed electomechanical motion contol, CRC Pe, 4. 7545A AVR 1/5 11
Atmel Copoation 5 Ochad Pakway San Joe, CA 9511, USA Tel: 1(48) 441-11 Fax: 1(48) 487-6 Regional Headquate Euope Atmel Sal Route de Aenaux 41 Cae Potale 8 CH-175 Fiboug Switzeland Tel: (41) 6-46-5555 Fax: (41) 6-46-55 Aia Room 119 Chinachem Golden Plaza 77 Mody Road Timhatui Eat Kowloon Hong Kong Tel: (85) 71-9778 Fax: (85) 7-169 Japan 9F, Tonetu Shinkawa Bldg. 1-4-8 Shinkawa Chuo-ku, Tokyo 14- Japan Tel: (81) -5-551 Fax: (81) -5-7581 Atmel Opeation Memoy 5 Ochad Pakway San Joe, CA 9511, USA Tel: 1(48) 441-11 Fax: 1(48) 46-414 Micocontolle 5 Ochad Pakway San Joe, CA 9511, USA Tel: 1(48) 441-11 Fax: 1(48) 46-414 La Chanteie BP 76 446 Nante Cedex, Fance Tel: () -4-18-18-18 Fax: () -4-18-19-6 ASIC/ASSP/Smat Cad Zone Indutielle 116 Rouet Cedex, Fance Tel: () 4-4-5-6- Fax: () 4-4-5-6-1 115 Eat Cheyenne Mtn. Blvd. Coloado Sping, CO 896, USA Tel: 1(719) 576- Fax: 1(719) 54-1759 Scottih Entepie Technology Pak Maxwell Building Eat Kilbide G75 QR, Scotland Tel: (44) 155-8- Fax: (44) 155-4-74 RF/Automotive Theeientae Potfach 55 745 Heilbonn, Gemany Tel: (49) 71-1-67- Fax: (49) 71-1-67-4 115 Eat Cheyenne Mtn. Blvd. Coloado Sping, CO 896, USA Tel: 1(719) 576- Fax: 1(719) 54-1759 Biometic/Imaging/Hi-Rel MPU/ High Speed Convete/RF Datacom Avenue de Rochepleine BP 1 851 Saint-Egeve Cedex, Fance Tel: () 4-76-58-- Fax: () 4-76-58-4-8 Liteatue Requet www.atmel.com/liteatue Diclaime: The infomation in thi document i povided in connection with Atmel poduct. No licene, expe o implied, by etoppel o othewie, to any intellectual popety ight i ganted by thi document o in connection with the ale of Atmel poduct. EXCEPT AS SET FORTH IN ATMEL S TERMS AND CONDI- TIONS OF SALE LOCATED ON ATMEL S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDEN- TAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel make no epeentation o waantie with epect to the accuacy o completene of the content of thi document and eeve the ight to make change to pecification and poduct deciption at any time without notice. Atmel doe not make any commitment to update the infomation contained heein. Unle pecifically povidedothewie, Atmel poduct ae not uitable fo, and hall not be ued in, automotive application. Atmel Atmel poduct ae not intended, authoized, o waanted fo ue a component in application intended to uppot o utain life. Atmel Copoation 5. All ight eeved. Atmel, logo and combination theeof, ae egiteed tademak, and Eveywhee You Ae ae the tademak of Atmel Copoation o it ubidiaie. Othe tem and poduct name may be tademak of othe. Pinted on ecycled pape. 7545A AVR 1/5