Part Number Hot Search : 
303CNQ 5TT15 SD202 TPS60 VI101 255381 TC610 55005
Product Description
Full Text Search
 

To Download DRM023 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  motorola.com/semiconductors 56800 hybrid controller DRM023/d rev. 0, 03/2003 3-phase ac designer reference manual induction motor vector control using 56f805 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM023 ? rev 0 designer reference manual motorola 3 3-phase ac induction motor vector control using 56f805 designer reference manual ? rev 0 by: jaroslav lepka motorola czech systems laboratories roznov pod radhostem, czech republic f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
revision history designer reference manual DRM023 ? rev 0 4 motorola to provide the most up-to-date info rmation, the re vision of our documents on the world wide web will be the most current. your printed copy may be an earlier revision. to veri fy you have the latest information available, refer to: http://www.motorol a.com/semiconductors the following revision history table summarizes cha nges contained in this document. for your conven ience, the page number designators have been linked to the appropriate location. revision history date revision level description page number(s) february 2003 1.0 initial release n/a f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM023 ? rev 0 designer reference manual motorola 5 designer reference manual ? 3-phase acim vector control list of sections section 1. introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 section 2. target motor theory . . . . . . . . . . . . . . . . . . . . 21 section 3. vector control of ac induction machines . . 33 section 4. system description. . . . . . . . . . . . . . . . . . . . . 47 section 5. hardware design. . . . . . . . . . . . . . . . . . . . . . . 55 section 6. software design . . . . . . . . . . . . . . . . . . . . . . . 65 section 7. system set-up. . . . . . . . . . . . . . . . . . . . . . . . 111 appendix a. references. . . . . . . . . . . . . . . . . . . . . . . . . 127 appendix b. glossary. . . . . . . . . . . . . . . . . . . . . . . . . . . 129 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
list of sections designer reference manual DRM023 ? rev 0 6 motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM023 ? rev 0 designer reference manual motorola 7 designer reference manual ? 3-phase acim vector control table of contents section 1. introduction 1.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 1.2 application intended functional ity . . . . . . . . . . . . . . . . . . . . . . 15 1.3 benefits of our solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 section 2. target motor theory 2.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 2.2 ac induction motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.3 mathematical descript ion of ac induction motors . . . . . . . . . . 23 2.4 digital control of ac induction motors . . . . . . . . . . . . . . . . . . . 30 section 3. vector control of ac induction machines 3.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 3.2 fundamental princi pal of the vector control . . . . . . . . . . . . . . 33 3.3 block diagram of the vector control . . . . . . . . . . . . . . . . . . . . 34 3.4 forward and inverse clarke transfor mation . . . . . . . . . . . . . . 35 3.5 forward and inverse park transformat ion . . . . . . . . . . . . . . . . 37 3.6 rotor flux model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.7 decoupling circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40 3.8 space vector modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 section 4. system description 4.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
table of contents designer reference manual DRM023 ? rev 0 8 motorola 4.2 system outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 4.3 application description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 section 5. hardware design 5.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55 5.2 system configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.3 dsp56f805evm controller board . . . . . . . . . . . . . . . . . . . . . . 57 5.4 3-phase ac bldc high voltage power stage. . . . . . . . . . . . . 59 5.5 in-line optoisolation box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 5.6 hardware documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 section 6. software design 6.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65 6.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 6.3 analog value scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 6.4 software flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 6.5 control algorithm data fl ow. . . . . . . . . . . . . . . . . . . . . . . . . . . 82 6.6 application state diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 6.7 speed sensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 6.8 analog sensing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 6.9 start/stop switch and bu tton control. . . . . . . . . . . . . . . . 107 section 7. system set-up 7.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111 7.2 hardware setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 7.3 jumper settings of controller board. . . . . . . . . . . . . . . . . . . .114 7.4 required software tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM023 ? rev 0 designer reference manual motorola 9 7.5 application build & execute . . . . . . . . . . . . . . . . . . . . . . . . . . 116 7.6 controlling the application . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 appendix a. references appendix b. glossary f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
table of contents designer reference manual DRM023 ? rev 0 10 motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM023 ? rev 0 designer reference manual motorola 11 designer reference manual ? 3-phase acim vector control list of figures figure title page 2-1 3-phase ac induction motor. . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2-2 ac induction motor speed- torque characteristic . . . . . . . . . . . 23 2-3 stator current space ve ctor and its projection . . . . . . . . . . . . 25 2-4 application of the general referenc e frame . . . . . . . . . . . . . . 28 2-5 3- phase inverter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2-6 pulse width modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3-1 block diagram of the ac induction motor vector control. . . . . 35 3-2 clarke transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 3-3 park transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 3-4 power stage schematic dia gram. . . . . . . . . . . . . . . . . . . . . . . 43 3-5 basic space vectors and voltage ve ctor projection . . . . . . . . 44 4-1 ac induction motor vector control drive structure . . . . . . . . . 51 5-1 3-phase ac induction motor high-voltage platform configuratio n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 5-2 block diagram of the dsp56f805evm . . . . . . . . . . . . . . . . . . 58 5-3 3-phase ac high voltage power stage . . . . . . . . . . . . . . . . . . 60 6-1 software flowchart overview . . . . . . . . . . . . . . . . . . . . . . . . . . 73 6-2 adc end of scan isr. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 6-3 application interrupt serv ice routines . . . . . . . . . . . . . . . . . . . 81 6-4 vector control applicatio n data flow . . . . . . . . . . . . . . . . . . . . 84 6-5 controllers data flow ch art . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 6-6 space vector modulat ion and brake control da ta flow . . . . . 86 6-7 application state diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 6-8 init state substates stat e machine. . . . . . . . . . . . . . . . . . . . .92 6-9 run state substates state machine . . . . . . . . . . . . . . . . . . . . 94 6-10 quadrature encoder signals . . . . . . . . . . . . . . . . . . . . . . . . . . 95 6-11 quad timer module a conf iguration . . . . . . . . . . . . . . . . . . . . 96 6-12 speed processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98 6-13 time diagram of pwm and adc sy nchronization . . . . . . . . . 101 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
list of figures designer reference manual DRM023 ? rev 0 12 motorola 6-14 3-phase bridge with current shunt resistors . . . . . . . . . . . . 102 6-15 current amplifier for phase c. . . . . . . . . . . . . . . . . . . . . . . . . 102 6-16 the voltage shapes of two differ ent pwm periods . . . . . . . 103 6-17 3-phase sinewave volt ages and corresponding sector values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 6-18 dc-bus voltage sensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 6-19 temperature sensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 6-20 button control - irq isr and butt onprocessing . . . . . . . . . . 109 6-21 button control - buttonedge . . . . . . . . . . . . . . . . . . . . . . . . . . 110 7-1 set-up of the 3-phase acim vector control application. . . . . 112 7-2 dsp56f805evm jumper re ference . . . . . . . . . . . . . . . . . . . 114 7-3 target build selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 7-4 execute make command . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 7-5 run/stop switch and up/down buttons at dsp56f805evm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 7-6 user and pwm leds at dsp56f805evm. . . . . . . . . . . . . . 122 7-7 pc master software control window . . . . . . . . . . . . . . . . . . . 125 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM023 ? rev 0 designer reference manual motorola 13 designer reference manual ? 3-phase acim vector control list of tables table title page 1-1 memory configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 3-1 switching patterns and resulting instantaneous line-to-line and phase voltages . . . . . . . . . . . . . . . . . . . . . . . 44 5-1 electrical characteristi cs of power stage. . . . . . . . . . . . . . . . . 61 5-2 electrical characterist ics of in-line optoisolat ion box . . . . . . . 62 5-3 motor - brake specificati ons. . . . . . . . . . . . . . . . . . . . . . . . . . . 64 7-1 dsp56f805evm jumper sett ings . . . . . . . . . . . . . . . . . . . . . 114 7-2 motor application states. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
list of tables designer reference manual DRM023 ? rev 0 14 motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM023 ? rev 0 designer reference manual motorola introduction 15 designer reference manual ? 3-phase acim vector control section 1. introduction 1.1 contents 1.2 application intended functional ity . . . . . . . . . . . . . . . . . . . . . . 15 1.3 benefits of our solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.2 application inte nded functionality this reference design describes t he design of a 3- phase ac induction vector control drive with position enc oder coupled to the motor shaft. it is based on motorola?s dsp56f805 dedicated motor control device. ac induction motors, which contain a cage, are very popular in variable speed drives. they are simple, rugged, inexpensive and available at all power ratings. progress in t he field of power electronics and microelectronics enables the application of induction motors for high-performance drives, where tr aditionally only dc motors were applied. thanks to sophisticated cont rol methods, ac induction drives offer the same contro l capabilities as high per formance four-quadrant dc drives. the drive application concept presented is that of vector control of the ac induction motor running in a closed-speed loop with the speed/position sensor coupled to the shaft. the application serves as an example of ac induction vector control drive design using a motorola dsp. this reference design incl udes a description of mo torola dsp features, basic ac induction motor theory, system design concept, hardware implementation and software design in cluding the pc master software visualization tool. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
introduction designer reference manual DRM023 ? rev 0 16 introduction motorola 1.3 benefits of our solution the motorola dsp56f80x family (see table 1-1 ) is well-suited for digital motor control, combining the dsp?s calculation capabilit y with an mcu?s controller features on a single chip. these d sps offer many dedicated peripherals, including a pulse width modulation (pwm) unit, an analog-to-digital converter (adc), timers, communication peripherals (sci, spi, can), on-boar d flash and ram. generally, all the family members are well-suited for ac induction motor control. a typical member of the family, the dsp56f805, provides the following peripheral blocks:  two pulse width modul ator units (pwma & pwmb), each with six pwm outputs, three current sens e inputs, and four fault inputs, fault tolerant design with deadtime inserti on; supports both center- and edge-aligned modes  12-bit analog-to-digital conv ertors (adcs), supporting two simultaneous conversions with dual 4-pin mult iplexed inputs; adc can be synchronized by pwm modules  two quadrature decoders (quad de c0 & quad dec1), each with four inputs, or two addi tional quad timers a & b  two dedicated general purpose quad timers totalling six pins: timer c with two pi ns and timer d with four pins  can 2.0 a/b module with 2-pin po rts used to transmit and receive  two serial communication interfac es (sci0 & sci1), each with two pins, or four additional gpio lines  serial peripheral interface (spi), with configurable 4-pin port (or four additional gpio lines)  computer operating proper ly (cop)/watchdog timer  two dedicated exter nal interrupt pins  14 dedicated general purpose i/o (gpio) pins, 18 multiplexed gpio pins  external reset pin for hardware reset f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
introduction benefits of our solution DRM023 ? rev 0 designer reference manual motorola introduction 17  jtag/on-chip emulation (once) for unobtrusive, processor speed-independent debugging  software-programmable, phas e lock loop-based frequency synthesizer for the dsp core clock the key feature of the motor contro l dsp is the inclusion of pwm modules. the device is des igned to control most mo tor types, including induction motors. an interesting feat ure for controlling the ac induction motor at low speeds is the patented pw m waveform distortion correction circuit. each pwm is double-buffe red and includes interrupt controls. the pwm module provides a refer ence output to synchronize the analog-to-digital converters. the pwm block has the following features:  three complementary pwm signal pairs, or six independent pwm signals  complementary channel operation  deadtime insertion  separate top and bottom pulse width correction via current status inputs or software  separate top and bottom polarity control  edge-aligned or ce nter-aligned pwm signals  15-bit resolution table 1-1. memory configuration dsp56f801 dsp56f803 dsp56f805 dsp56f807 program flash 8188 x 16-bit 32252 x 16-bit 32252 x 16-bit 61436 x 16-bit data flash 2k x 16-bit 4k x 16-bit 4k x 16-bit 8k x 16-bit program ram 1k x 16-bit 512 x 16-bit 512 x 16-bit 2k x 16-bit data ram 1k x 16-bit 2k x 16-bit 2k x 16-bit 4k x 16-bit boot flash 2k x 16-bit 2k x 16-bit 2k x 16-bit 2k x 16-bit f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
introduction designer reference manual DRM023 ? rev 0 18 introduction motorola  half-cycle reload capability  integral reload rates from 1 to 16  individual software-controlled pwm output  programmable fault protection  polarity control  20-ma current sink capability on pwm pins  write-protectable registers the analog-to-digital converter (adc ) consists of a digital control module and two analog sample and hold (s/h) circuits. the adc features:  12-bit resolution  maximum adc clock frequency of 5mhz with a 200ns period  single conversion time of 8.5 adc clock cycles (8.5 x 200ns = 1.7 s)  additional conversion time of six adc clock cycles (6 x 200ns = 1.2 s)  eight conversions in 26.5 adc clock cycles (26. 5 x 200ns = 5.3 s) using simultaneous mode  adc can be synchronized to the pwm via the sync signal  simultaneous or sequential sampling  internal multiplexer to se lect two of eight inputs  ability to sequentially scan and store up to eight measurements  ability to simultaneously sa mple and hold two inputs  optional interrupts at end of scan if an out- of-range limit is exceeded or at zero crossing  optional sample correction by subtracting a pre-programmed offset value  signed or unsigned result  single-ended or di fferential inputs f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
introduction benefits of our solution DRM023 ? rev 0 designer reference manual motorola introduction 19 the application utilizes the adc block in si multaneous mode and sequential scan. it is synchr onized with pwm pulses. such a configuration allows conversion of the desired analog values of all phase currents, voltage and temperatur e at once in the desired time. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
introduction designer reference manual DRM023 ? rev 0 20 introduction motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM023 ? rev 0 designer reference manual motorola target motor theory 21 designer reference manual ? 3-phase acim vector control section 2. target motor theory 2.1 contents 2.2 ac induction motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.3 mathematical descript ion of ac induction motors . . . . . . . . . . 23 2.4 digital control of ac induction motors . . . . . . . . . . . . . . . . . . . 30 2.2 ac induction motor the ac induction motor is a rotati ng electric machine designed to operate from a 3-phase sour ce of alternating volt age. for variable speed drives, the source is normally an inve rter that uses power switches to produce approximately sinusoidal volt ages and currents of controllable magnitude and frequency. a cross-section of a two-pole induction motor is shown in figure 2-1 . slots in the inner periphery of t he stator accommo date 3-phase winding a,b,c. the turns in each winding are distributed so that a current in a stator winding produces an approximat ely sinusoidally-distributed flux density around the periphery of the air gap. when three cu rrents that are sinusoidally varying in time, but di splaced in phase by 120 from each other, flow through the three sy mmetrically-placed windings, a radially-directed air gap fl ux density is produced that is also sinusoidally distributed around the gap and rotates at an angular velocity equal to the angular frequency s of the stator currents. the most common type of induction motor has a squirrel cage rotor in which aluminum conductors or bars are cast into slots in the outer periphery of the rotor. these conducto rs or bars are shorted together at both ends of the rotor by cast aluminum end ring s, which also can be shaped to act as fans. in larger in duction motors, copper or copper-alloy bars are used to fabricat e the rotor cage winding. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
target motor theory designer reference manual DRM023 ? rev 0 22 target motor theory motorola figure 2-1. 3-phase ac induction motor as the sinusoidally-distrib uted flux density wave produced by the stator magnetizing currents sweeps past the rotor conductors, it generates a voltage in them. the result is a sinusoidally-distributed set of currents in the short-circuited rotor bars. bec ause of the low resistance of these shorted bars, only a small relative angular velocity r between the angular velocity s of the flux wave and t he mechanical angular velocity of the two-pole rotor is required to produce the necessary rotor current. the relative angular velocity r is called the slip velocity. the interaction of the sinusoidally-distributed ai r gap flux density and induced rotor currents produces a torque on the rotor. the typical induction motor speed-torque characteristic is shown in figure 2-2 . b c' a' a c b' stator rotor f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
target motor theory mathematical description of ac induction motors DRM023 ? rev 0 designer reference manual motorola target motor theory 23 figure 2-2. ac induction moto r speed-torque characteristic squirrel-cage ac induction motors are popular for their simple construction, low cost per hor sepower and low maintenance (they contain no brushes, as do dc motors ). they are avai lable in a wide range of power ratings. wi th field-oriented vect or control methods, ac induction motors can fully replac e standard dc motors, even in high-performance applications. 2.3 mathematical description of ac induction motors there are a number of ac induction motor models. the model used for vector control design can be obtained by utilizatio n of the space vector theory. the 3-phase mo tor quantities (such as voltages, currents, magnetic flux, etc.) are expressed in the term of comple x space vectors. such a model is valid for any in stantaneous variation of voltage and f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
target motor theory designer reference manual DRM023 ? rev 0 24 target motor theory motorola current and adequately describes the performance of the machine under both steady-state and trans ient operation. comple x space vectors can be described using only two orthogonal axes. we can look at the motor as a 2-phase machine. the utilizat ion of the 2-phase motor model reduces the number of equations and simplifie s the control design. 2.3.1 space vector definition let?s assume i sa , i sb , and i sc are the instantaneous balanced 3-phase stator currents: (eq 2-1.) then we can define the stator curr ent space vector as follows: (eq 2-2.) where a and a 2 are the spatial operators, and k is the transformation cons tant and is chosen k=2/3 . figure 2-3 shows the stator current space vector projection. the space vector defined by (eq 2-2.) can be expressed utilizing the two-axis theory. the r eal part of the space ve ctor is equal to the instantaneous value of the direct -axis stator cu rrent component, i s , and whose imaginary part is equal to the quadrature-axis stator current component, i s . thus, the stator current spac e vector in the stationary reference frame attached to t he stator can be expressed as: (eq 2-3.) i sa i sb i sc 0 = ++ i s k =i sa ai sb a 2 i sc ++ () ae j2 3 ? a 2 e j4 3 ? = , = i s i s ji s + = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
target motor theory mathematical description of ac induction motors DRM023 ? rev 0 designer reference manual motorola target motor theory 25 figure 2-3. stator current space vector and its projection in symmetrical 3-phase ma chines, the direct and q uadrature axis stator currents i s , i s are fictitious quadrature- phase (2-phase) current components, which are related to the actual 3-phase stator currents as follows: (eq 2-4.) (eq 2-5.) where k=2/3 is a transformation constant. the space vectors of other motor quantities (voltages, currents, magnetic fluxes, etc.) can be defined in the same way as the stator current space vector. i s phase- b i s ki sa 1 2 -- -i sb ? 1 2 -- -i sc ? ?? ?? = i s k 3 2 ------ -i sb i sc ? () = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
target motor theory designer reference manual DRM023 ? rev 0 26 target motor theory motorola 2.3.2 ac induction motor model the ac induction motor model is given by the spac e vector form of the voltage equations. the syst em model defined in the stationary , -coordinate system attached to t he stator is expressed by the following equations. the mo tor model is supp osed to be ideally symmetrical with a linear magne tic circuit characteristic. a. the stator voltage di fferential equations: (eq 2-6.) (eq 2-7.) b. the rotor voltage diff erential equations: (eq 2-8.) (eq 2-9.) c. the stator and rotor flux linka ges expressed in terms of the stator and rotor cu rrent space vectors: (eq 2-10.) (eq 2-11.) (eq 2-12.) (eq 2-13.) d. electromagnetic torque express ed by utilizing space vector quantities: (eq 2-14.) u s r s i s t d d s + = u s r s i s t d d s + = u r 0r r i r t d d r ? r ++ == u r 0r r i r t d d r ? r ? + == s l s i s l m i r + = s l s i s l m i r + = r l r i r l m i s + = r l r i r l m i s + = t e 3 2 -- -p p s i s s i s ? () = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
target motor theory mathematical description of ac induction motors DRM023 ? rev 0 designer reference manual motorola target motor theory 27 where: , stator orthogonal coordinate system u s , stator voltages [v] i s , stator currents [a] u r , rotor voltages [v] i r , rotor currents [a] s , stator magnetic fluxes [vs] r , rotor magnetic fluxes [vs] r s stator phase resistance [ohm] r r rotor phase resistance [ohm] l s stator phase inductance [h] l r rotor phase inductance [h] l m mutual (stator to ro tor) inductance [h] / s electrical rotor speed / synchronous speed [rad/s] p p number of pole pairs [-] t e electromagnetic torque [nm] besides the stationary reference fr ame attached to t he stator, motor model voltage space vector equations can be formulated in a general reference frame, which ro tates at a gen eral speed g . if a general reference frame, with di rect and quadrature axes x,y rotating at a general instantaneous speed g =d g /d t is used, as shown in figure 2-4 , where g is the angle between the direct ax is of the stati onary reference frame ( ) attached to the stator and the real axis ( x ) of the general reference frame, then t he following equati on defines the stator current space vector in general reference frame: (eq 2-15.) i sg i s e j g ? i sx ji sy + = = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
target motor theory designer reference manual DRM023 ? rev 0 28 target motor theory motorola figure 2-4. application of the general reference frame the stator voltage and flux-linkage space vect ors can be similarly obtained in the general reference frame. similar considerations ho ld for the space vectors of the rotor voltages, currents and flux linkages. the real axis (r ) of the reference frame attached to the rotor is displaced from the direct axis of the stator reference frame by the rotor angle r . it can be seen that the angle between the real axis ( x ) of the general reference frame and the real axis of the reference frame ro tating with the rotor (r ) is g - r . in th e general reference frame, the spac e vector of the rotor currents can be expressed as: (eq 2-16.) where is the space vector of the rotor current in the rotor reference frame. similarly, the space vectors of the rotor voltages and rotor flux linkages in the general referenc e frame can be expressed. x y g i rg i r e j g r ? () ? i rx ji ry + = = i r f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
target motor theory mathematical description of ac induction motors DRM023 ? rev 0 designer reference manual motorola target motor theory 29 by utilizing introduced transformati ons of the motor quantities from one reference frame to the general reference frame, the motor model voltage equations in the general reference frame can be expressed. the ac induction motor model is often used in vector control algorithms. the aim of vector control is to implement control sc hemes which produce high dynamic performance and are similar to those used to control dc machines. to achieve this, the refere nce frames may be aligned with the stator flux-linkage space vector, the ro tor flux-linkage s pace vector or the magnetizing space vector. the most popular reference frame is the reference frame attached to the roto r flux linkage space vector with direct axis ( d ) and quadrature axis ( q ). after transformation into d-q coordinates the motor model is the following: (eq 2-17.) (eq 2-18.) (eq 2-19.) (eq 2-20.) (eq 2-21.) (eq 2-22.) (eq 2-23.) (eq 2-24.) (eq 2-25.) u sd r s i sd t d d sd s sq ? + = u sq r s i sq t d d sq s sd ? + = u rd 0r r i rd t d d rd s ? () rq ? + == u rq 0r r i rq t d d rq s ? () rd ++ == sd l s i sd l m i rd + = sq l s i sq l m i rq + = rd l r i rd l m i sd + = rq l r i rq l m i sq + = t e 3 2 -- -p p sd i sq sq i sd ? () = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
target motor theory designer reference manual DRM023 ? rev 0 30 target motor theory motorola 2.4 digital control of ac induction motors in adjustable speed applications, ac motors ar e powered by inverters. the inverter converts dc power to ac power at the required frequency and amplitude. figure 2-5 illustrates a typical 3-phase inverter. figure 2-5. 3- phase inverter the inverter consists of three hal f-bridge units where the upper and lower switch are controlled comple mentarily, meani ng when the upper one is turned on, the lower one must be turned off, and vi ce versa. as the power device?s turn-off time is longer than its turn-on time, some dead-time must be inserted between the turn-off of one transistor of the half-bridge and the turn- on of its complementary device. the output voltage is mostly creat ed by a pulse width modu lation (pwm) technique, where an isosceles triangle carr ier wave is compared with a fundamental-frequency sine m odulating wave and the natural points of intersection determine the switching points of the powe r devices of a half-bridge inverter. this technique is shown in figure 2-6 . the 3-phase voltage waves are shifted 120 o to one another and t hus a 3-phase motor can be supplied. 3-phase ac motor ph.a ph.c ph. b c + dc-bus - dc-bus + f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
target motor theory digital control of ac induction motors DRM023 ? rev 0 designer reference manual motorola target motor theory 31 figure 2-6. pulse width modulation the most popular power devices for motor control applications are power mosfets and igbts. a power mosfet is a voltage-contro lled transistor. it is designed for high-frequency operation and has a low-voltage dr op, so it has low power losses. however, saturation te mperature sensit ivity limits the mosfet?s use in high-power applications. an insulated-gate bipolar transisto r (igbt) is controlled by a mosfet on its base. the igbt requires low driv e current, has fast switching time, and is suitable for high switching fr equencies. the di sadvantage is the higher voltage drop of th e bipolar transistor, c ausing higher conduction losses. pwm carrier wave generated sine wave pwm output t 1 (upper switch) 0 1 0 1 pwm output t 2 (lower switch) 1 0 -1 t t t f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
target motor theory designer reference manual DRM023 ? rev 0 32 target motor theory motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM023 ? rev 0 designer reference manual motorola vector control of ac induction machines 33 designer reference manual ? 3-phase acim vector control section 3. vector contro l of ac induction machines 3.1 contents 3.2 fundamental princi pal of the vector control . . . . . . . . . . . . . . 33 3.3 block diagram of the vector control . . . . . . . . . . . . . . . . . . . . 34 3.4 forward and inverse clarke transfor mation . . . . . . . . . . . . . . 35 3.5 forward and inverse park transformat ion . . . . . . . . . . . . . . . . 37 3.6 rotor flux model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.7 decoupling circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40 3.8 space vector modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 3.2 fundamental principa l of the vector control vector control is the most popular control technique of ac induction motors. in special reference fr ames, the expression for the electromagnetic torque of the smooth-air-gap machi ne is similar to the expression for the torque of the separately exci ted dc machine. in the case of induction machines, the co ntrol is usually performed in the reference frame (d-q) attached to the rotor flux space vector. that?s why the implementation of ve ctor control requires in formation on the modulus and the space angle (positi on) of the rotor flux space vector. the stator currents of the induction machi ne are separated into flux- and torque-producing compon ents by utilizing trans formation to the d-q coordinate system, whose direct axis ( d ) is aligned with the rotor flux space vector. that means that the q -axis component of the rotor flux space vector is always zero: and also (eq 3-1.) rq 0 = t d d rq 0 = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
vector control of ac induction machines designer reference manual DRM023 ? rev 0 34 vector control of ac induction machines motorola the rotor flux space vector calcul ation and transformat ion to the d-q coordinate system requi re the high computat ional power of a microcontroller. the digita l signal processor is suit able for this task. the following sections describe the spac e vector transformations and the rotor flux space vector calculation. 3.3 block diagram of the vector control figure 3-1 shows the basic stru cture of the vector control of the ac induction motor. to perform vector contro l, it is necessary to follow these steps:  measure the motor quantities (phase voltages and currents)  transform them to the 2-phase system ( , ) using a clarke transformation  calculate the rotor flux space vector magnitu de and position angle  transform stator currents to the d-q coordinat e system using a park transformation  the stator current torque (i sq ) and flux (i sd ) producing components are separately controlled  the output stator voltage space ve ctor is calculated using the decoupling block  the stator voltage space vector is transformed by an inverse park transformation back from the d- q coordinate system to the 2-phase system fixed with the stator  using the space vector modulati on, the output 3-phase voltage is generated f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
vector control of ac induction machines forward and inverse clarke transformation DRM023 ? rev 0 designer reference manual motorola vector control of ac induction machines 35 figure 3-1. block diagra m of the ac induction motor vector control 3.4 forward and inverse clarke transformation the forward clarke transformation conv erts a 3-phase sy stem a,b,c to a 2-phase coordinate system , . figure 3-2 shows graphical construction of the space vector and pr ojection of the space vector to the quadrature-phase components , . 3-phase power stage speed sensor ac induction motor space - vector modulation forward clarke transformation rotor flux calculation forward park transformation decoupling rotor flux position i s i s i sq i sd u u u u u u sd sd_lin sq_lin s s sq rd i i i sa sb sc - - - motor flux command speed command line input speed pwm a pwm b pwm c f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
vector control of ac induction machines designer reference manual DRM023 ? rev 0 36 vector control of ac induction machines motorola figure 3-2. clarke transformation assuming that the a axis and the axis are in the sa me direction, the quadrature-phase stator currents i s and i s are related to the actual 3-phase stator currents as follows: (eq 3-2.) where: i sa actual current of the motor phase a [a] i sb actual current of the motor phase b [a] i sc actual current of the motor phase c [a] i s phase- b i s ki sa 1 2 -- -i sb ? 1 2 -- -i sc ? = i s k 3 2 ------ -i sb i sc ? () = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
vector control of ac induction machines forward and inverse park transformation DRM023 ? rev 0 designer reference manual motorola vector control of ac induction machines 37 for the non-power-invariant tr ansformation the constant k equals k =2/3. in this case, the quantities i sa and i s are equal. if we assume , the quadrature-phase comp onents can be expressed utilizing only two phases of the 3-phase system: (eq 3-3.) the inverse clarke transformati on goes back from a 2-phase ( ,) to a 3-phase i sa , i sb , i sc system. for constant k =2/3, it is given by the following equations: (eq 3-4.) 3.5 forward and inverse park transformation the components i s and i s , calculated with a clarke transformation, are attached to the stator reference frame , . in vector control, it is necessary to have all quantities expre ssed in the same reference frame. the stator reference frame is not su itable for the cont rol process. the space vector i s is rotating at a rate equal to the angular frequency of the phase currents. the components i s and i s depend on time and speed. we can transform these components from the stat or reference frame to the d-q reference fram e rotating at the same speed as the angular frequency of the phas e currents. then the i sd and i sq components do not depend on time and speed. if we consider the d -axis aligned with the rotor flux, the transform ation is illustrated in figure 3-3 , where is the rotor flux position. i sa i sb i sc 0 = ++ i s i sa = i s 1 3 ------ -i sa 2 3 ------ -i sb + = i sa i s = i sb 1 2 -- -i s ? 3 2 ------ -i s + = i sc 1 2 -- -i s ? 3 2 ------ - ?i s = field f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
vector control of ac induction machines designer reference manual DRM023 ? rev 0 38 vector control of ac induction machines motorola figure 3-3. park transformation the components i sd and i sq of the current space ve ctor in d-q reference frame are determined by the following equations: (eq 3-5.) the component i sd is called the direct axis component (flux producing component) and i sq is called the quadrature axis component (torque producing component). they are time invariant and the flux and torque control with them is easy. to avoid using trigonometric functions on the dsp we can directly calculate sin field and cos field using division. they are defi ned by the following equations: (eq 3-6.) (eq 3-7.) q field i sd i s field i s field sin + cos = i sq i s ? field i s field cos + sin = rd r r + = field sin r rd -------- - = field cos r rd -------- - = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
vector control of ac induction machines rotor flux model DRM023 ? rev 0 designer reference manual motorola vector control of ac induction machines 39 the inverse park transfor mation from the d-q to , coordinate system is given by the following equations: (eq 3-8.) 3.6 rotor flux model knowledge of the rotor flux space vector magnitude and position is key information for the ac induction moto r vector control. with the rotor magnetic flux space vect or, the rotational coor dinate system (d-q) can be established. there are several methods for obtai ning the rotor magnetic flux space vector. the im plemented flux model utilizes monitored rotor speed and stator volta ges and currents. it is calculated in the stationary reference frame ( ,) attached to the stator. the error in the calculated value of the roto r flux, influenced by the changes in temperature, is negligible for this rotor flux model. the rotor flux space vector is obt ained by solving the differential equations (eq 3-9.) and (eq 3-10.) , which are resolved into the and components. the equations ar e derived from the e quations of the ac induction motor model (see section 2.3.2 ac induction motor model) . (eq 3-9.) (eq 3-10.) where: l s self-inductance of the stator [h] l r self-inductance of the rotor [h] l m magnetizing inductance [h] r r resistance of a rotor phase winding [ohm] r s resistance of a stator phase winding [ohm] i s i sd field i sq ? field sin cos = i s i sd field i sq field cos + sin = 1 ? () t s t r + [] d r dt ------------ l m r s ------ -u s r ? t r r ? l m t s di s dt --------- ? = 1 ? () t s t r + [] d r dt ----------- - l m r s ------ -u s t r r r ? l m t s di s dt --------- ? + = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
vector control of ac induction machines designer reference manual DRM023 ? rev 0 40 vector control of ac induction machines motorola angular rotor speed [rad.s -1 ] p p number of motor pole-pairs rotor time constant [s] stator time constant [s] resultant leakage constant [-] are the , components of the stator voltage, currents and rotor flux space vectors 3.7 decoupling circuit for purposes of the rotor flux-orient ed vector control, the direct-axis stator current i sd (rotor flux-producing component) and the quadrature-axis stator current i sq (torque-producing co mponent) must be controlled independently. ho wever, the equations of the stator voltage components are coupled. the direct axis component u sd also depends on i sq and the quadrature axis component u sq also depends on i sd . the stator voltage components u sd and u sq cannot be considered as decoupled control variables for the ro tor flux and electromagnetic torque. the stator currents i sd and i sq can only be indepen dently controlled (decoupled control) if the stator voltage equations are decoupled and the stator current components i sd and i sq are indirectly controlled by controlling the terminal volt ages of the induction motor. the equations of the stat or voltage components in the d-q coordinate system (eq 2-17.) and (eq 2-18.) can be reformulat ed and separated into two components: linear components and decoupling t r l r r r ----- = t s l s r s ----- = 1 l m 2 l s l r ---------- - ? = u s u s i s i s r r ,,,, , u sd lin u sq lin , f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
vector control of ac induction machines decoupling circuit DRM023 ? rev 0 designer reference manual motorola vector control of ac induction machines 41 components . the equations are decoupled as follows: (eq 3-11.) (eq 3-12.) where: (eq 3-13.) (eq 3-14.) the voltage components are the outputs of the current controllers which control i sd and i sq components. they ar e added to the decoupling voltage components . in this way, we can get direct and quadrature components of the terminal output voltage. this means the voltage on the outputs of the cu rrent controllers is: (eq 3-15.) (eq 3-16.) and the decoupling components are: (eq 3-17.) (eq 3-18.) as can be seen, the de coupling algorithm tran sforms the nonlinear motor model to linear equations which can be controlled by general pi or pid controllers instead of complicated controllers. u sd decouple u sq decouple , u sd u sd lin u + sd decouple k r i sd k l t d d i sd + s k l i sq rd l m l r t r --------------- - + ? == u sq u sq lin u + sq decouple k r i sq k l t d d i sq + s k l i sd l m l r ------ - ? rd + + == k r r s l m 2 l r 2 ------ -r r + = k l l s l m 2 l r ------ - ? = u sd lin u sq lin , u sd decouple u sq decouple , u sd lin k r i sd k l t d d i sd + = u sq lin k r i sq k l t d d i sq + = u sd decouple s k l i sq l m l r t r ---------- rd + ?? ?? ? = u sq decouple s k l i sd l m l r ------ - ? rd + ?? ?? = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
vector control of ac induction machines designer reference manual DRM023 ? rev 0 42 vector control of ac induction machines motorola 3.8 space vector modulation space vector modulation (svm) can di rectly transform the stator voltage vectors from , -coordinate system to puls e width modulation (pwm) signals (duty cycle values). the standard technique of the output voltage generation uses an inverse clarke transformation to obtain 3- phase values. using the phase voltage values, the duty cycles needed to cont rol the power stage switches are then calculated. although this technique gives goo d results, the space vector modulation is more straightfo rward (valid only for transformation from the , -coordinate system). the basic principle of t he standard space vector modulation technique can be explained with the help of th e power stage schematic diagram depicted in figure 3-4 .regarding the 3-phase power stage configuration, as shown in figure 3-4 , eight possible switching states (vectors) are feasible. they are given by combinations of the corresponding power switches.the graphical representation of all combinations is the hexagon shown in figure 3-5 . there are six non-zero vectors, u 0 , u 60 , u 120 , u 180 , u 240 , u 300 , and two zero vectors, o 000 and o 111 , defined in , coordinates. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
vector control of ac induction machines space vector modulation DRM023 ? rev 0 designer reference manual motorola vector control of ac induction machines 43 figure 3-4. power st age schematic diagram the combination of on/off states of the power stage switches for each voltage vector is coded in figure 3-5 by the three- digit number in parenthesis. each digit represents o ne phase. for each phase, a value of one means that the upper switch is on and the bottom switch is off. a value of zero means that the upper switch is off and the bottom switch is on. these states, together with the resu lting instantaneous output line-to-line voltages , phase voltages and voltage vectors, are listed in table 3-1 . b c a ib ic ia r rr l l l u u uu u u u u u u /2 dc-bus = + - u /2 dc-bus = + - u ab i a i d0 s at s bt s ct s ab s bb s cb i b i c u bc u ca u b u c u a o f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
vector control of ac induction machines designer reference manual DRM023 ? rev 0 44 vector control of ac induction machines motorola . figure 3-5. basic sp ace vectors and voltage vector projection svm is a technique used as a direct bridge between vector control (voltage space vector) and pwm. table 3-1. switching patter ns and resulti ng instantaneous line-to-line and phase voltages abc u a u b u c u ab u bc u ca vector 000 0 0 0 0 0 0 o 000 100 2u dc-bus /3 -u dc-bus /3 -u dc-bus /3 u dc-bus 0 -u dc-bus u 0 110 u dc-bus /3 u dc-bus /3 -2u dc-bus /3 0 u dc-bus -u dc-bus u 60 010 -u dc-bus /3 2u dc-bus /3 -u dc-bus /3 -u dc-bus u dc-bus 0 u 120 011 -2u dc-bus /3 u dc-bus /3 u dc-bus /3 -u dc-bus 0 u dc-bus u 240 001 -u dc-bus /3 -u dc-bus /3 2u dc-bus /3 0 -u dc-bus u dc-bus u 300 101 u dc-bus /3 -2u dc-bus /3 u dc-bus /3 u dc-bus -u dc-bus 0 u 360 111 0 0 0 0 0 0 o 111 u u maximal phase voltage magnitude = 1 basic space vector -axis -axis ii. iii. iv. v. vi. u (110) 60 u (010) 120 u (011) 180 o (111) 000 o (000) 111 u ( 001 ) 240 u ( 101 ) 300 u (100) 0 [2/ 3,0] [-2/ 3,0] [1/ 3,1] [-1/ 3,1] [1/ 3,-1] [-1/ 3,-1] t/t* 0 u 0 t/t*u 60 60 u s voltage vector components in , axis 30 degrees f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
vector control of ac induction machines space vector modulation DRM023 ? rev 0 designer reference manual motorola vector control of ac induction machines 45 the svm technique consists of several steps: 1. sector identification 2. space voltage vector decomposition into directions of sector base vectors u x , u x60 3. pwm duty cycle calculation the principle of svm is the applic ation of the voltage vectors u xxx and o xxx for certain instances in such a way that the ?me an vector? of the pwm period t pwm is equal to the desired voltage vector. this method gives the greatest variabi lity of arrangement of the zero and non-zero vectors during the pwm period. one can arrange these vectors to lower switching losses; another might want to approach a different result, such as cent er-aligned pwm, edge-aligned pwm, minimal switching, etc. for the chosen svm, we def ine the following rule:  the desired space voltage vector is created only by applying the sector base vectors: the non-zero vectors on the sector side, (u x ,u x60 ) and the zero vectors (o 000 or o 111 ). the following expressions define the principle of the svm: (eq 3-19.) (eq 3-20.) in order to solve the time periods t 0 , t 1 and t 2 , it is necessary to decompose the space voltage vector u s [,] into directions of the sector base vectors u x , u x60 . the equation (eq 3-19.) splits into equations (eq 3-21.) and (eq 3-22.) . (eq 3-21.) (eq 3-22.) t pwm u s , [] ? t 1 u x ? t 2 u x60 t 0 o 000 o 111 () ? + ? + = t pwm t 1 t 2 t 0 ++ = t pwm u s x ? t 1 u x ? = t pwm u s x60 () ? t 2 u x60 ? = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
vector control of ac induction machines designer reference manual DRM023 ? rev 0 46 vector control of ac induction machines motorola by solving this set of equations, we can calculat e the necessary duration of the application of t he sector base vectors u x , u x60 during the pwm period t pwm to produce the right stator voltages. for vector u x (eq 3-23.) for vector u x60 (eq 3-24.) either for o 000 or o 111 (eq 3-25.) t 1 u s x u x ------------ -t pwm = t 2 u s x u x60 --------------------- t pwm = t 0 t pwm t 1 t 2 + () ? = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM023 ? rev 0 designer reference manual motorola system description 47 designer reference manual ? 3-phase acim vector control section 4. system description 4.1 contents 4.2 system outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 4.3 application description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 4.2 system outline the system is designed to drive a 3- phase ac induction motor (acim). the application has the foll owing specifications:  vector control technique used for acim control  speed control loop of the acim  targeted for dsp56f805evm  running on 3-phase ac inductio n motor control development platform at variable li ne voltage 115/230v ac (range -15%.....+10%)  control technique incorporates ? speed control loop with inner q axis stator current loop ? rotor flux cont rol loop with inner d axis stator current loop ? field-weakening technique ? stator phase current measurement method ? ac induction flux m odel calculation in , - stationary reference frame ? forward clarke and inverse park transformations ? d-q establishment - transfor mation from the stationary reference frame to the rotating reference frame f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system description designer reference manual DRM023 ? rev 0 48 system description motorola ? dc-bus ripple elimination ? space vector modulation (svm)  motor mode  generator mode  dc-bus brake  minimum speed of 50 rpm  maximum speed of 2500 rpm at input power line 230v ac  maximum speed 1100 rpm at input power line 115v ac  manual interface (run/stop sw itch, up/down push buttons control, led indication)  power stage boar d identification  overvoltage, undervo ltage, overcurrent and overheating fault protection  pc remote control interface (sta rt/stop motor push buttons, speed set-up)  pc master software remote monitor ? pc master software monitor in terface (required speed, actual motor speed, pc master software mode, start motor/stop motor controls, drive fault status, dc-bus voltage level, ident ified power stage boards, drive status, mains detection) ? pc master software speed scope (observes actual and desired speed) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system description application description DRM023 ? rev 0 designer reference manual motorola system description 49 4.3 application description the vector control algorithm is ca lculated on moto rola dsp56f805. according to the user-required inpu ts, measured and calculated signals, the algorithm generates 3-phase pwm signals for an ac induction motor inverter. the block diagram of t he acim control algorithm is shown in figure 4-1 , which describes the structure of the implemented vector control algorithm (basic blo cks and control signals). the system incorporates the fo llowing hardware components:  3-phase ac induction motor with load coupled on the motor shaft  3-phase ac/bldc high-voltage power stage  dsp56f805evm  ecoptinl, in-line optoisolation box, which is connected between the host computer and the dsp56f80xevm the drive can be controlled in two different operating modes:  in the manual operating mode , the required speed is set by up/down push buttons and the dr ive is started and stopped by the run/stop swit ch on the evm board  in the pc remote control operating mode , the required speed is set by the pc master software bar graph and the drive is started and stopped by the start moto r and stop motor controls measured quantities:  dc-bus voltage  phase currents (phase a, phase b, phase c)  power module temperature  rotor speed f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system description designer reference manual DRM023 ? rev 0 50 system description motorola the faults used for drive protection:  ?overvoltage?  ?undervoltage?  ?overcurrent?  ?overheating?  ?mains out of range?  ?wrong hardware?  ?overload? f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system description application description DRM023 ? rev 0 designer reference manual motorola system description 51 figure 4-1. ac induc tion motor vector cont rol drive structure motorola dsp56f80x start stop up down pc master software 3-phase ac bldc high voltage power stage pwm line ac load fault protection forward clark transformation a,b,c ->alpha,beta current sensing processing forward park transformation alpha,beta->d,q speed controller current q controller space vector modulation inverse park transformation d,q->alpha,beta adc pwm current d controller sci optical encoder dc-bus ripple compensation break control application control is_a_comp us_alpha us_beta is_b_comp is_c_comp is_beta is_alpha is_q is_d us_q us_d is_q_req ac dc us_alpha_comp us_beta_comp quad timer te m p e r a t u r e is_a is_b is_c omega_req u_dcb dutycycle a dutycycle b dutycycle c omega_atual_mech u_dcb 6 acim decoupling (back-emf feedforward) position & speed sensing gpio faults u_dc bus omega_atual_mech sector pwm gpio field weakening controller us_q us_d flux psi_rd controller rotor flux estimation alpha,beta psir filter psir_d omegafield sin_psir cos_psir us_req motorola dsp56f805 start stop up down 3- bldc high voltage power stage pwm line ac load fault protection forward clark transformation a,b,c ->alpha,beta current sensing processing forward park transformation alpha,beta->d,q speed controller current q controller space vector modulation inverse park transformation d,q - >alpha,beta adc pwm current d controller sci optical encoder dc-bus ripple break control application control is_a_comp us_alpha us_beta is_b_comp is_c_comp is_beta is_alpha is_q is_d us_q us_d is_q_req ac dc us_alpha_comp us_beta_comp quad timer i sa i sb i sc te m p e r a t u r e is_a is_b is_c omega_req u_dcb dutycycle a dutycycle b dutycycle c u_dcb 6 acim decoupling position & speed sensing gpio faults u dc_bus omega_actual_mech sector pwm gpio field weakening controller us_q us_d flux psi_rd controller rotor flux estimation alpha,beta psir filter psir_d omegafield sin_psir cos _ psir us_req (back-emf feedforward) omega_actual_mech f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system description designer reference manual DRM023 ? rev 0 52 system description motorola 4.3.1 control process after reset, the drive is in the in it state and in t he manual operation mode. when the run/stop switch is detected in the stop position and there are no faults pending, the init state is chan ged to the stop state. otherwise, the drive waits in the init state. if a f ault occurs, it goes to the fault state. in the init and st op states, the ope rating mode can be changed from the pc master software. in the manual operating mode, the application is contro lled by the run/stop switch and up/down push buttons; in the pc re mote-control mode, the application is controlled by the pc master software. when the start command is accepted (f rom the run/stop switch or the pc master software command), the stop state is changed to the run state. the required speed is then calculated from the up/down push buttons or pc master so ftware commands, if in pc remote control mode. the required speed is the i nput into the accelera tion/deceleration ramp and the output is used as a reference command for the s peed controller. the difference between the actual speed and the required speed generates a speed error. based on the error, the speed controller generates an is_q_req current which corr esponds to the torque component. the second component of the stator current is_d_req, which corresponds to the rotor flux, is given by the flux controller. the field-weakening algorithm generates the required rotor flux, which is compared to the calculat ed rotor flux from the ac induction flux model calculation algorithm. the differ ence between the requir ed rotor flux and calculated rotor flux generates a flux error. based on the flux error, the flux controller gene rates the required is_d_req stator current. simultaneously, the stator currents is_a , is_b and is_c (3-phase system) are measured and transformed to t he stationary reference frame , (2-phase system) and to the d-q rotati ng reference frame consecutively. the decoupling algorithm generates us_q and us_d voltages (d-q rotating reference frame). the us_q and us_d voltages are transformed back to the stationary reference frame , . the space vector modulation then generates the 3-pha se voltage system, whic h is applied to the motor. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system description application description DRM023 ? rev 0 designer reference manual motorola system description 53 4.3.2 drive protection the dc-bus voltage, dc- bus current and power stage temperature are measured during the cont rol process. they are used for the overvoltage, undervoltage, overcurrent and overheating protecti on of the drive. the undervoltage and the overheat ing protection is performed by software. the overcurrent and the ov ervoltage fault signals ut ilize fault inputs of the dsp controlled by hardware. the power stage is identified via board identification. if correc t boards are not identifi ed, the "wrong hardware" fault disables drive operation. line voltage is measured during application initialization. according to the detec ted voltage level, the 115vac or 230vac mains is recognized. if the mains is out of the -15%.... +10% range, th e ?mains out of range? fault is set, and drive operation is disabled. if any of the mentioned faults occur, the motor control pwm outputs are disabled in order to protect the drive and the applic ation enters the fault state. the f ault state can be left only when the fault conditions disappear and the run/stop switch is moved to the stop position (in pc remote control mode by pc master software). 4.3.3 indication of the application states if the application is r unning and motor spinning is disabled (i.e., the system is ready), the green user led blinks at a 2hz frequency (slower). when motor spinning is enabled, the green user led is turned on and the actual state of t he pwm outputs is indicat ed by pwm output leds. if any fault occurs (overcurrent, ov ervoltage, undervoltage, mains out of range, overheating or wrong hardware) the green user led blinks at an 8hz frequency (faster). the pc master software control page shows the identified faults. the f aults can be handled by switching the run/stop switch to stop in manual opera ting mode or bypushing the start motor/stop motor buttons to the stop motor state in pc remote control mode to acknowledge the fault state. meanwhile, the ?mains out of range? and ?wrong hardware? faults can be exited only with an application reset. it is strongly re commended that the user inspect the entire application to locate the s ource of the faul t before restart. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system description designer reference manual DRM023 ? rev 0 54 system description motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM023 ? rev 0 designer reference manual motorola hardware design 55 designer reference manual ? 3-phase acim vector control section 5. hardware design 5.1 contents 5.2 system configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.3 dsp56f805evm controller board . . . . . . . . . . . . . . . . . . . . . . 57 5.4 3-phase ac bldc high voltage power stage. . . . . . . . . . . . . 59 5.5 in-line optoisolation box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 5.6 hardware documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 5.2 system configuration the application is designed to drive the 3-phase ac mo tor. it consists of the following modules (see figure 5-1 ):  dsp56f805evm control board  3 ph ac/bldc high vo ltage power stage  in-line optoisolation box  3-phase ac induction motor f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
hardware design designer reference manual DRM023 ? rev 0 56 hardware design motorola figure 5-1. 3-phase ac i nduction motor high-voltage platform configuration 3ph ac/bldc high-voltage power stage f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
hardware design dsp56f805evm controller board DRM023 ? rev 0 designer reference manual motorola hardware design 57 5.3 dsp56f805evm controller board the dsp56f805evm is used to demon strate the abilities of the dsp56f805 and to provid e a hardware tool allo wing the development of applications that use the dsp56f805. the dsp56f805evm is an evaluation module boar d that includes a dsp56f805 part, per ipheral expansion connecto rs, external memory and a can interface. the expansio n connectors are for signal monitoring and user feature expandability. the dsp56f805evm is designed for the following purposes:  allowing new users to become fa miliar with the f eatures of the 56800 architecture. the tools and examples provided with the dsp56f805evm facilitate evaluati on of the feature set and the benefits of the family.  serving as a platform for real-t ime software devel opment. the tool suite enables the user to develop and simulate r outines, download the software to on-chip or on-b oard ram, run it, and debug it using a debugger via the jtag/once tm port. the break point features of the once port enable the user to easily sp ecify complex break conditions and to execut e user-developed softwa re at full-speed, until the break conditi ons are satisfied. t he ability to examine and modify all user accessible re gisters, memory and peripherals through the once port greatly faci litates the task of the developer.  serving as a platform for hardw are development. the hardware platform enables the user to connect exter nal hardware peripherals. the on-boar d peripherals can be disabled, providing the user with the ability to re assign any and all of the dsp's peripherals. the once port's un obtrusive design means that all of the memory on the board and on the dsp chip are available to the user. the dsp56f805evm provides t he features necessary for a user to write and debug software, demonstr ate the functionality of that software and interface with the customer's app lication-specific device(s). the dsp56f805evm is flexible enough to allow a user to fully exploit the f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
hardware design designer reference manual DRM023 ? rev 0 58 hardware design motorola dsp56f805's features to optimize the performance of their product, as shown in figure 5-2 . figure 5-2. block diag ram of the dsp56f805evm dsp56f805 reset mode/irq address, data & control jtag/once xtal/extal spi sci #0 sci #1 can timer gpio pwm #1 a/d pwm #2 3.3 v & gnd peripheral expansion connector(s) reset logic mode/irq logic program memory 64kx16-bit memory expansion connector(s) jtag connector parallel jtag interface low freq crystal dsub 25-pin data memory 64kx16-bit dsub 9-pin can interface debug leds pwm leds over v sense over i sense zero crossing detect secondary uni-3 primary uni-3 rs-232 interface 4-channel 10-bit d/a power supply 3.3v, 5.0v & 3.3va f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
hardware design 3-phase ac bldc high voltage power stage DRM023 ? rev 0 designer reference manual motorola hardware design 59 5.4 3-phase ac bldc hi gh voltage power stage motorola?s embedded motion control seri es high-voltage (hv) ac power stage is a 180 watt (one-fourth hors epower), 3-phase power stage that will operate off of dc i nput voltages from 140 to 230 volts and ac line voltages from 100 to 240 volts. in co mbination with on e of the embedded motion control series control boar ds and an optoisolat ion board, it provides a software development plat form that allows algorithms to be written and tested withou t the need to design and build a power stage. it supports a wide variety of algorithm s for both ac induction and brushless dc (bldc) motors. input connections are made via 40-pin ri bbon cable connector j14. power connections to the motor are made on output connector j13. phase a, phase b, and phase c are labeled ph_a, ph_b, and ph_c on the board. power require ments are met with a si ngle external 140 to 230 volt dc power supply or an ac line voltage. either input is supplied through connector j11. current measuring circuitry is set up for 2.93 amps full scale. both bus and phas e leg currents are measured. a cycle-by-cycle over-current trip point is set at 2.69 amps. the high-voltage ac power stage has bot h a printed circuit board and a power substrate. the printed circui t board contains igbt gate drive circuits, analog signal conditioning, low-voltage power supplies, power factor control circuitry, and so me of the large, passive, power components. all of the power electronics whic h need to dissipate heat are mounted on the power substrate. this substra te includes the power igbts, brake resistors, current s ensing resistors, a power factor correction mosfet, and temp erature sensing diodes. figure 5-3. shows a block diagram. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
hardware design designer reference manual DRM023 ? rev 0 60 hardware design motorola figure 5-3. 3-phase ac hi gh voltage power stage the electrical characteristics in table 5-1 apply to operation at 25 c with a 160v dc power supply voltage. hv power input switch mode power supply pfc control dc bus brake 3-phase igbt gate phase current phase voltage bus current bus voltage monitor zero cross back-emf sense board id block 3-phase ac signals to/from control board power module drivers motor to f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
hardware design in-line optoisolation box DRM023 ? rev 0 designer reference manual motorola hardware design 61 5.5 in-line optoisolation box motorola?s embedded motion control se ries in-line optoisolation box links jtag and rs-232 signals from a workstation to a controller connected to a high-vol tage power stage. the box isolates the workstation, and periphera ls that may be attac hed to the workstation, from dangerous voltages that are present on the power stage. the in-line optoisolation box?s galvanic is olation barrier also isolates signals from high noise in the power stage and provides a noise-robust systems architecture. signal translation is virtually one-for- one. jtag signals are passed from workstation to controller and vice-versa via high- speed, high dv/dt, logic isolators. rs-232 si gnals are passed via hi gh-speed optocouplers. delay times are typically 27ns for jtag signals, and 250ns for rs-232 table 5-1. electrical char acteristics of power stage characteristic symbol min typ max units dc input voltage vdc 140 160 230 v ac input voltage vac 100 208 240 v quiescent current i cc ?70 ?ma min logic 1 input voltage v ih 2.0 ? ? v max logic 0 input voltage v il ??0.8 v input resistance r in ?10 k ? ? analog output range v out 0?3.3v bus current sense voltage i sense ?563 ?mv/a bus voltage sense voltage v bus ?8.09 ?mv/v peak output current i pk ??2.8 a brake resistor dissipation (continuous) p bk ??50 w brake resistor dissipation (15 sec pk) p bk(pk) ??100w total power dissipation p diss ??85 w f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
hardware design designer reference manual DRM023 ? rev 0 62 hardware design motorola signals. grounds are separ ated by the optocouple rs? galvanic isolation barrier. the in-line optoisolati on box is connected to the target board jtag connector by the 14-line flat ribbon fl ex cable. there are two options on the workstation side: co nnection by the 25-line cabl e to the parallel port or by the 14-li ne flat ribbon flex to t he host/target interface. to create isolation of the rs-232 interf ace, the in-line optoisolation box is connected to the target board by the 9-line c able as well as to the workstation. a single external 12v dc power suppl y meets the power requirements for the in-line optoisolation box. on -board power supply consists of isolated dc-to-dc conv erter from traco for the target side power supply, and linear voltage regulators for the 5v and 3.3v power supply of the workstation side. reverse inpu t voltage protection is provided by a rectifier bridge. the electrical characteristics in table 5-2 apply to operation at 25 c, and a 12v dc power supply voltage. table 5-2. electrical characteristics of in-line optoisolation box characteristic symbol min typ max units notes power supply voltage vdc 10.8 12 13.2 v quiescent current i cc ?80 ?ma min logic 1 input voltage (jtag) v ih 2.0 ? ? v lvt logic (3.3v) max logic 0 input voltage (jtag) v il ??0.8 v lvt logic (3.3v) max rs232 mark input voltage v m ??-3.0v min rs232 space input voltage v s ??3.0 v max jtag clock frequency f tck ?? 4mhz jtag delay time t jdly ?27 ? ns rs232 delay time t rdly ?250 ? ns f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
hardware design hardware documentation DRM023 ? rev 0 designer reference manual motorola hardware design 63 5.6 hardware documentation all the system parts are suppli ed and documented according to the following references:  u1 - controller board for dsp56f805: ? supplied as: dsp56f805evm ? described in: dsp56f805evmum/d dsp evaluation module hardware user?s manual  u2 - 3-phase ac/bldc high voltage power stage ? supplied in kit with in-l ine optoisolation box as: ecinlhivacbldc ? described in: memc3bldcpsum/d - 3-phase ac/bldc high voltage power stage  u3 - in-line optoisolation box ? supplied in kit with 3-phase ac/bldc high voltage power stage as: ecinlhivac bldc, or separately as ecoptinl ? described in: memcilobum/d - in-line optoisolation box warning: the user must use the in-line optoisolation box during development to avoid damage to the development equipment.  mb1 motor-brake am40v + sg40n ? supplied as: ecmtrhivac detailed descriptions of indi vidual boards can be found in comprehensive user?s manuals bel onging to each board or on the motorola web pages . the user?s manual incor porates the schematic of the board, description of individual function blocks and a bill of materials. an individual board can be ordered fr om motorola as a standard product. the ac induction motor-brake set in corporates a 3-phase ac induction motor and attached bldc motor brak e. the ac induction motor has four poles. the incremental position encoder is coupled to t he motor shaft, and position hall sensor s are mounted between motor and brake. they allow sensing of the posit ion if required by the c ontrol algorithm. detailed motor-brake specificat ions are listed in table 5-3 . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
hardware design designer reference manual DRM023 ? rev 0 64 hardware design motorola table 5-3. motor - brake specifications set manufactured em brno, czech republic motor specification: e motor type: am40v 3-phase ac induction motor pole-number: 4 nominal speed: 1300 rpm nominal voltage: 3 x 200 v nominal current: 0.88 a brake specification: brake type: sg40n 3-phase bldc motor nominal voltage: 3 x 27 v nominal current: 2.6 a pole-number: 6 nominal speed: 1500 rpm position encoder type: baumer electric bhk 16.05a 1024-12-5 pulses per revolution: 1024 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM023 ? rev 0 designer reference manual motorola software design 65 designer reference manual ? 3-phase acim vector control section 6. software design 6.1 contents 6.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 6.3 analog value scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 6.4 software flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 6.5 control algorithm data fl ow. . . . . . . . . . . . . . . . . . . . . . . . . . . 82 6.6 application state diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 6.7 speed sensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 6.8 analog sensing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 6.9 start/stop switch and bu tton control. . . . . . . . . . . . . . . . 107 6.2 introduction this section describes th e software design of the ac induction vector control drive application. first, t he numerical scaling in fixed-point fractional arithmetic of the dsp is discussed. then, the control software is described in terms of:  software flowchart  control algorithm data flow  state diagram finally, particular issues such as speed and current sensing are explained. the aim of the chapter presented is to facilitate understanding of the designed software. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 66 software design motorola 6.3 analog value scaling the ac induction motor ve ctor control applicati on uses a fractional representation for all real quantities, except time. the n-bit signed fractional format is r epresented using 1.[n-1] fo rmat (1 sign bit, n-1 fractional bits). signed fractional number s (sf) lie in t he following range: (eq 6-1.) for words and long-word signed fractions, the most negative number that can be represented is -1.0, whos e internal representation is $8000 and $80000000, respectively. the most positive word is $7fff or 1.0 - 2 -15 , and the most positive l ong-word is $7fffffff or 1.0 - 2 -31 the following equation show s the relationship bet ween a real and a fractional representation: (eq 6-2.) 6.3.1 voltage scaling voltage quantities are scaled to the maximum measurable voltage, which is dependent on the hardware. the relationship between real and fractional representations of voltage quantities is: (eq 6-3.) where: u frac fractional representation of voltage quantities [-] u real real voltage quantities in physical units [v] u max maximum defined vo ltage used for scaling in physical units [v] in the application, the u max value is the maximu m measurable dc-bus voltage: u max = 407 v 1.0 ?sf+1.0 -2 n1 ? [] ? ? fractional value real value real quantity range ------------------------------------------------- - = u frac u real u max ----------- = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design analog value scaling DRM023 ? rev 0 designer reference manual motorola software design 67 other application volt age variables are scal ed in the same way ( u_dc_bus , u_dc_bus_filt , u_salphabeta , u_sdq_ref , u_sdq , u_sabc , u_samplitude, etc.). 6.3.2 current scaling the current quantities are scaled to the maximum measurable current, which is dependent on the hardware. the relationship between real and fractional representation of current quantities is: (eq 6-4.) where: i frac fractional representation of current quantities [-] i real real current quantitie s in physical units [a] i max maximum defined current used for scaling in physical units [a]. in the application, the i max value is the maximum measurable current: i max = 5.86 a other application curr ent variables are scale d in the same way ( i_sabc_comp , i_salphabeta , i_sphase_max , i_sd_desired , i_sq_desired, etc.). 6.3.3 flux scaling magnetic flux quantities are scaled to the maximum motor flux, which is dependent on the motor used. the maxi mum flux can be expressed as: (eq 6-5.) i frac i real i max ---------- = max c sf 60 2 ? 2 3 ?? ---------------------- u nom p p n ? s -------------- ?? f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 68 software design motorola where: max maximum calculated flux value used for scaling in physical units [vs] u nom nominal line-to-line voltage of motors [v] n s motor-synchronous speed dependent on pair of poles [rpm] p p number of pole pairs [-] c sf safety margin constant [-] the relationship between real and frac tional representation of flux quantities is: (eq 6-6.) where: frac fractional representati on of flux quantities [-] real real flux quantities in physical units [vs] in the application, the parameters for max calculation are: u nom = 200 v n s = 1500 rpm p p = 2 c sf = 1.92 the maximum motor flux value is then: max = 1 vs other application flux variables are scaled in the same way ( psi_ralphabeta , psi_rd_desired, etc.). frac real max ------------- = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design software flowchart DRM023 ? rev 0 designer reference manual motorola software design 69 6.3.4 speed scaling speed quantities are sca led to the defined maxi mum mechanical speed, which is dependent on the drive. the relation ship between real and fractional representation of speed quantities is: (eq 6-7.) where: frac fractional representation of speed quantities [-] real real speed quantities in physical units [rpm] max maximum defined speed used for scaling in physical units [rpm]. in the application, the max value is defined as: max = 4000 rpm other speed variables are sca led in the same way ( omega_reqpcm_mech , omega_desired_mech , omega_required_mech , omega_reqmax_mech , omega_reqmin_mech , omega_actual_mech ). 6.4 software flowchart the general software flowch art incorporates the main routine entered from reset and interrupt states. the overview of t he software flowchart is shown in figure 6-1 . after reset, the main routine prov ides initialization of the drive parameters, the applic ation and the dsp; it then enters an endless background loop. the background loop contains the routines: fault detection, start/stop sw itch and requir ed speed scan, brake control and application state machine. the following interrupt service r outines (isrs) are utilized:  pwma fault isr services faults invok ed by external hardware fault frac real max ------------ - = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 70 software design motorola  adc end of scan isr services adc and provides the execution of the fast control loop; the adc is synchronized with the pwm pulses. the pwm value registers are updated here. it is invoked with a 125 s period.  timer c, channel 0 on compare isr provides the execution of the slow control l oop, led indication pr ocessing, push button processing and switch filtering; it is invoked with a 1000 s period.  sci isr services pc master software communication  irqa isr services the up push button  irqb isr services the down push button 6.4.1 initialization initialization occurs after reset. the fi rst phase of initiali zation of the dsp peripherals is done through the appconfig.h file defines. the next phase is done in the application code. the drive parameters ar e set, then the application and dsp initializ ations are executed. initialization per formed by the appconfig.h:  dsp56f80x chip revision is defined (a ,b or d). it is not necessary to define it for othe r revisions, since it is required only for elimination of the offs et and gain errors of t he first dsp versions.  pwma module is initialized ? center-aligned comp lementary pwm mode, positive polarity ? set pwm modulus: defines the pwm frequency as 16khz ? deadtime is set to 1 s ? output pads are disabled ? pwm faults are enabled (fault interrupt requests are enabled in the appliaction)  adc module is initialized ? adc is triggered simultaneously ? conversion star ted by sync pulse f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design software flowchart DRM023 ? rev 0 designer reference manual motorola software design 71 ? associate interrupt service rout ine with adc en d of scan event ? defines adc samples  timers defined to be us ed by the application ? timer a channels 0, 1, 2, 3 ? timer c channels 0, 2  irqa and irqb inte rrupts are initialized ? interrupt service routine is a ssociated with the irqa and irqb  interrupt priorities are set in descending order from highest to lowest ? pwma fault interrupt ? adc end of scan interrupt ? timer c channel 0 on compare interrupt ? sci interrupts  pc master software recorder is initialized. the following drive paramet ers are set in the driveparamset routine:  the output voltage structure is initialized to zero volts  parameters of the ac i nduction flux model are set ? integration state va riables are reset ? motor-dependent cons tants are set  parameters of the d-q esta blishment algorithm are set ? rotor flux zero limi t value is initialized ? motor-dependent cons tants are set  parameters of the deco upling algorit hm are set ? motor-dependent cons tants are set  parameters of the torque- and fl ux-producing current components controllers and speed, flux and fi eld-weakening controllers are set ? proportional and inte gral gain and their scaling constants are set f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 72 software design motorola ? controller output limits are set ? controller integral por tion is reset to zero  currents limitation algor ithm parameter is set ? maximum motor-current value is set  states of the application stat e machine are set as follows: ? application state is set to init ? substate of applicat ion run state is se t to de-excitation ? substate of applic ation init state is set to branch  application operating mode is set to manual  primaryctrl bit in appinitcontrol control word is set  start/stop switch, switch filter and overload filter are initialized f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design software flowchart DRM023 ? rev 0 designer reference manual motorola software design 73 figure 6-1. softwar e flowchart overview application and dsp initialization reset background loop adc end of scan isr done adc end of scan interrupt - synchronized with pwm reload pwma fault isr pwma fault interrupt done sci receirver isr sci receiver interrupt done sci transmitter isr done sci transmitter interrupt irqa isr done irqa interrupt irqb isr done irqb interrupt timer c channel 0 on compare interrupt quadtimer c channel 0 isr done drive parameters settings f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 74 software design motorola after initialization of t he drive parameters is co mpleted, the application and dsp initialization routine is executed:  adc channels are assigned to the sensed quantities ? adc channel 2 to sample 0 - phase current a ? adc channel 3 to sample 1 - phase current b ? adc channel 4 to sample 2 - phase current c ? adc channel 0 to samp le 4 - dc-bus voltage ? adc channel 5 to sample 4,5, 6,7 - power module temperature  quad timer c channel 0 driver initia lization (slow control loop time base) ? count up ? prescaler 2 ? interrupt on co mpare (compare va lue set to 1000 s period) ? associate interrupt service r outine with on compare event  quad timer c channel 2 driver initialization (adc and pwm synchronization) ? count up ? prescaler 1 ? started by pwm reload signal  switch control is initialized  pwma fault interrupt serv ice routine is initialized  brake control is initialized  power stage boar d identification ? identifies hardware set connected to the evm board  speed and position measurement is initialized ? quad timer a channels 0, 1, 2, 3 initia lized for speed and position measurement. the position measurement (quad timer a channel 1) is not applied in the application. ? speed measurement-specific variables are initialized f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design software flowchart DRM023 ? rev 0 designer reference manual motorola software design 75  status leds control is initialized  quad timer c c hannel 0 is enabled  push button control is initialized  interrupts are enabled 6.4.2 background loop after initialization, the background loop is entered. it runs in an endless loop and is asynchronously interrupt ed by the system interrupt service routines. the processes exec uted in the background are:  fault detection ? fault dc-bus overvoltage and ov ercurrent pins are scanned for a fault signal occurrence ? measured dc-bus voltage in u_dc_bus_filt is checked for undervoltage ? measured power module temperature in temperature_filt is checked for overheating ? mains detection faul t flag is checked ? hardware identification fault flag is checked ? drive overload fault is detected ? when a fault occurs, the appropriate bits in appfaultstatus and appfaultpending words are set. the faultctrl bit in appcontrol is set to change applic ation state to fault.  start/stop switch and required speed scan ? based on the application operat ing mode, the process selects whether the required speed and start/stop command are set manually with the switches and but tons or by the pc master software interface. the requir ed speed is limited to maximum and minimum values.  brake control background f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 76 software design motorola ? sets the generator m ode flag if the drive is running in the generator mode. if the drive is in motor mode, the brake switch is turned off.  application state machine ? ensures the execution of the active application state and the transition between the states, according to bits in the application control word. 6.4.3 adc end of scan isr the adc end of scan isr is the most critical and the routine most demanding of the processor's time. most of the ac induction motor vector control processes mu st be linked to this isr. the analog-to-digital converter is initiated synchronously with a pwm reload pulse. it simultaneously sca ns phase currents, phase voltage and temperature. when the conversion is finalized, the adc end of scan isr is called. the pwm reload pulse frequency is set to every second pwm opportunity. for t he pwm frequency of 16k hz, this means the pwm reload pulse frequency is 8k hz, which corres ponds to the 125 s adc end of scan isr period. the routine calls control f unctions according to appl ication state. if the application state is run, the fastcontrolloopenabled function is called; otherwise, the fastcontrolloopdisabled function is called. the adc end of scan diagram is shown in figure 6-2 . the fastcontrolloopenabled function provides the following services and calculations:  sets a compare value for quadtti mer c channel 2, defining the adc start, n eeded for phase curr ent measurement  calls the analog-sensing and correction function  calls the forward cl arke transformation  calls the rotor flux model calculation  calls the d-q system establishment function calls i sd and i sq current-component controllers f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design software flowchart DRM023 ? rev 0 designer reference manual motorola software design 77  calls the decou pling algorithm  calls the inverse park transformation  calls the dc-bus ripple elimination function  calls the space vector modulation function  calls the analog-sensing correc tion reconfiguration function  passes calculated duty cycle ratios to the pwm driver  calls the brake control function the fastcontrolloopdisabled function is called in the application states when the vector control algorithm is not execut ed. the function services only the analog-sens ing correction process, space vector modulation algorithm and pwm generati on. the drive control variables are set to their initial values. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 78 software design motorola figure 6-2. adc end of scan isr analog-sensing correction forward clarke transformation rotor flux model space vector modulation fast control loop enabled done d,q establishment current loop controllers decoupling inverse park transform dc-bus ripple elimination analog-sensing reconfiguration analog-sensing correction drive initialization fast control loop disabled space vector modulation analog-sensing reconfiguration done f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design software flowchart DRM023 ? rev 0 designer reference manual motorola software design 79 6.4.4 quad timer c, c hannel 0, on compare isr the routine calculates par t of the vector contro l algorithm and handles led indication, button proc essing and switch filteri ng. it is called with a 1000 s period. the tasks provided by individual f unctions are:  slow control loop is executed. it pr ovides the part of vector control algorithm calculations, which can be executed in a slower control loop. the function slowcontrolloopenabled is called. ? reads the actual motor s peed and handles the speed measurement process ? executes the speed accelerati on/deceleration ramp algorithm ? calculates the output stator voltage amplitude ? field-weakening controller is called ? rotor flux and speed c ontrollers are called ? current limit algorithm is called  led indication pr ocess handles the led indication of the application state (init, run, stop, fault)  button processing handles the up/down button debounce counter  switch-filter processing handles the start/stop sw itch filtering  pc master software reco rder routine is called 6.4.5 pwma fault isr the pwma fault isr is the highest priority interrupt implemented in the software. in the case of dc-bus , overcurrent or overvoltage fault detection, the exter nal hardware circuit generates a fault signal that is detected on the f ault input pin of the dsp?s pwma module. the signal disables pwm outputs in order to protect the power stage and generates a fault interrupt where th e fault condition is handl ed. the routine sets the records of the correspondi ng fault source to the fault status word and sets the fault bit in t he application control word. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 80 software design motorola 6.4.6 sci isr the interrupt handler provides sc i communication a nd pc master software service routines. these ro utines are fully independent of the motor control tasks. 6.4.7 irqa and irqb isr push button interrupt handlers take ca re of the push bu tton service. the upbutton isr sets the up button flag and the downbutton isr sets the down button flag. the desired speed is in cremented/decremented according to the debounc ed up/down button flag. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design software flowchart DRM023 ? rev 0 designer reference manual motorola software design 81 figure 6-3. application in terrupt service routines pwm output pads disable fault source determination (over-current and over-voltage) pwm a fault clear pwm a fault interrupt done switch filtering button processing done led indication processing slow control loop quadtimer c channel 0 on compare interrupt fault flag asserted irqb interrupt done increment required speed (manual operating mode) irqa interrupt done pc master (independent of application) done sci reciever interrupt done sci transmitter interrupt decrement required speed (manual operating mode) pc master (independent of application) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 82 software design motorola 6.5 control algorithm data flow the 3-phase ac induction motor vector control algorithm data flow is described in figure 6-4 , figure 6-5 and figure 6-6 . the individual processes are described in detail in the following sections. 6.5.1 analog-sensing corrections the analog-sensing process handles sensing, filtering and correction of analog variables (phase currents, temperature, dc-bus voltage). 6.5.2 speed measurement the speed measurement process pr ovides the mechanical angular speed, omega_actual_mech . 6.5.3 forward clarke transformation the forward clarke transformation tr ansforms the 3-phas e system a,b,c to a 2-phase orthogonal reference frame , . for theoretical background, see section 3.4 . 6.5.4 rotor flux model the rotor flux model proce ss calculates the rotor magnetic flux of the ac induction motor in the ( , ) 2-phase stationary refere nce frame. the flux model utilizes monitored rotor speed and stator volt ages and currents. for theoretical background, see section 3.6 . 6.5.5 d-q system establishment this process transforms quantities from an ( , ) 2-phase reference frame attached to the stator into a d-q-) 2-phase reference frame rotating with the magnetic flux angular speed. the roto r magnetic flux space vector is put into the d axis of the coordi nate system. the function calculates the magnit ude of the rotor magnet ic flux and the sine and f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design control algorithm data flow DRM023 ? rev 0 designer reference manual motorola software design 83 cosine of its position angle theta_field in the ( , ) coordinate system. for theoretical background, see section 3.5 . 6.5.6 decoupling the decoupling process calculates th e decoupling rotational voltage components of the ac i nduction machine in the d-q coordinate system and adds them to the outputs of the cu rrents controllers which control the i sd and i sq components. it yiel ds to the d and q output stator voltage components. the output voltage vector is limited to the desired limits. for theoretical background, see section 3.7 . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 84 software design motorola figure 6-4. vector cont rol application data flow analog sensing corrections adc i_sabc_comp forward clarke transform i_salphabeta rotor-flux model u_ssector speed measurement omega_actual_mech u_salphabeta quadrature . encoder . fluxmodelstate psi_ralphabeta decouplingstate d,q system establishment decoupling theta_field dqdata u_sdq_ref u_sdq dqestablstate temperature_filt u_dc_bus_filt 2nd page 3rd page 3rd page f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design control algorithm data flow DRM023 ? rev 0 designer reference manual motorola software design 85 figure 6-5. controller s data flow chart rotor-flux controller omega_actual_mech dqdata->psi_rd omega_desired_mech speed controller speed_controllerparams i_sd_desired i_sq_desired isq limitation algorithm isq controller i_sphase_max isd controller dqdata.i_sd u_sdq_ref.d_axis u_sdq_ref.q_axis dqdata.i_sq i_sq_controllerparams i_sd_controllerparams fieldweakening controller u_samplitude u_sfieldweak psi_rd_desired fieldweakcontrollerparams speed ramp omega_required_mech psi_rd_controllerparams 1st page 1st page 1st page 3rd page 1st page f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 86 software design motorola figure 6-6. sp ace vector modulation and brake control data flow dc-bus ripple correction inverse park transform u_sdq theta_field u_salphabeta u_dc_bus_filt u_salphabeta_ripelim space-vector modulation u_sabc u_ssector voltage amplitude calculation u_samplitude 1st page 1st page 1st page brake control background brake control omega_actual_mech 1st page dqdata.omega_field 1st page drivestatus.b.brakeonflag drivestatus.b.generatormodeflag u_dc_bus_off_brake u_dc_bus_filt 1st page u_dc_bus_on_brake f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design control algorithm data flow DRM023 ? rev 0 designer reference manual motorola software design 87 6.5.7 speed ramp this process calculates the desired speed ( omega_desired_mech ), based on the required speed according to th e acceleration/deceleration ramp. the required speed ( omega_required_mech ) is determined either by the push buttons, if in manual mode, or by pc master software, if in pc remote control mode. 6.5.8 speed controller this process calcul ates the desired i sq stator current component ( i_sq_desired ) according to the speed erro r, which is the difference between the actual and desired speeds. the pi controller is implemented. 6.5.9 i sq controller this process calculates the linear portion of t he stator voltage space vector q component ( u_sdq_ref.q_axis ) based on the i sq stator current component error, which is the differ ence between the actual and desired i sq stator current components. the pi controller is implemented. 6.5.10 field- weakening controller the field-weakening process provides control of the desired rotor flux ( psi_rd_desired ) in order to achieve a higher motor speed than nominal. it compares the actual output motor stator-vol tage amplitude with nominal field-weakening voltage; the desired rotor flux is set based on the calculated error. 6.5.11 flux controller this process calcul ates the desired i sd stator current component ( i_sd_desired ) according to rotor flux er ror, which is the difference between the actual and desired roto r flux. the pi controller is implemented. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 88 software design motorola 6.5.12 i sd controller this process calculates the linear portion of t he stator voltage space vector d component ( u_sdq_ref.d_axis ), based on the i sd stator current component error, which is the differ ence between the actual and desired i sd stator current components. the pi controller is implemented. 6.5.13 inverse park transformation the inverse park transformation proc ess converts stator voltage space vector components from the rotating orthogonal coordi nate system (d-q) attached to the rotor magnetic fl ux to the stationary orthogonal coordinate system (,) attached to the stat or. for theoretical background, see section 3.5 . 6.5.14 dc-bus ripple elimination this process provides for the elimi nation of the volt age ripple on the dc-bus. it compensates an amp litude of the di rect- and the quadrature- components of the stator reference voltage vector for imperfections in t he dc-bus voltage. 6.5.15 space ve ctor modulation this process directly tr ansforms the stator volt age space vector from the , coordinate system to pulse widt h modulation (pwm) signals (duty cycle values). the duty cycle ratios are then passed to the pwm module in the u_sabc structure . for theoretical background, see section 3.8 . 6.5.16 voltage am plitude calculation this process provides a calculation of the actual stat or voltage space vector magnitude from the d-q comp onents of the stat or voltage. the actual stator voltage amplitude is used in field-weakening. it is the value controlled by the fiel d-weakening controller. u s f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design control algorithm data flow DRM023 ? rev 0 designer reference manual motorola software design 89 6.5.17 brake c ontrol background this process is executed in the ba ckground. it sets the generator mode flag if the drive is runni ng in generator mode. if the drive is in motor mode, the generator mode flag is clear ed. in motor mode, if the brake-on flag is set, the brake switch is tur ned off and the brake- on flag is cleared. 6.5.18 brake control this process is executed in the adc end of scan isr. if the generator mode flag is set, swit ching of the brake swit ch is enabled. the brake switch is turned on if the dc -bus voltage is higher than u_dc_bus_on_brake and turned off if it is lower than u_dc_bus_off_brake . the brake-on flag is set if the switch is on and cleared if it is off. note: constants of controllers were des igned using standard c ontrol theory in a continuous time domain. the step re sponses of the controlled system measured by the pc master softwa re were used to investigate system parameters. the least-square method, programmed in matlab, identified the respective system paramete rs in the laplace domain. the parameters were designe d using standard matlab f unctions, such as the bode plot of frequency response, nyquist plot, step response, etc. the results in the conti nuous time domain were then transform ed to the discrete time domain for dsp usage. in the application, the controller parameters were tuned slightly. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 90 software design motorola 6.6 application state diagram the processes described above are impl emented in the state machine, as illustrated in figure 6-7 . the state machine provides transitions between the states in it, stop, run, fault. figure 6-7. appli cation state diagram 6.6.1 application state - init after reset, the applicati on enters the init state, which provides dsp and application initialization. in this state, the drive is disabled and the stop state run state fault state startstopctrl=1 startstopctrl=0 faultctrl=1 faultclearctrl=1 faultctrl=1 init state application statemachine input initdonectrl=1 omchangectrl=1 faultctrl=1 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design application state diagram DRM023 ? rev 0 designer reference manual motorola software design 91 motor cannot be started. the init state is divi ded into three substates which handle the different phases of the init state. the substates of the init state are illustrated in figure 6-8 . the tasks provided by the init substates are:  the branch substate decides whether or not the primary initialization is executed. it is en tered any time ther e is a transition from any other state to the init state. it is entered just once after the init state is set. it calls t he transition functi on to either the primary or operatin g mode substates.  the primary substate provides t he primary initia lization of the dsp and the application. it is en tered from the branch substate after the application is reset or after a transition from a fault to an init application state. in the transition from the branch to the primary substate, analog-sensing correction initialization is started. after the initialization is finished, mains detection is executed and the state is change d to the operating mode substate.  the operating mode substate handles the operating mode change logic. it is entered from the branch or primary substates and sets the actual operating mode (manual or pc_master).this state can be exited only if the run/stop switch is in the stop position and the application transits to the stop state. if the switch is in the start positi on, the application remains in the init state; it serv es as protection against start after reset if the run/stop switch is in the start position. if any fault is detect ed, the application transi ts to the fault state (protection against fault). f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 92 software design motorola figure 6-8. init stat e substates state machine 6.6.2 application state - stop the stop state can be entered either from the init st ate or the run state. the stop state prov ides a motor standstill. in the stop state, the drive is disabled, pwm output pads are disabled and the fastcontrolloopdisabled function is called by the adc end of scan isr. the application wa its for the start command. when the application is in the stop state, t he operating mode can be changed, either from manual mode to pc master soft ware mode, or vice versa. when the operati ng mode request is asserted, the application always transits to the init st ate, where the mode is changed. primary state operating mode state branch state from init state primaryctrl=1 opmodectrl=1 to init state opmodectrl=1 application init state f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design application state diagram DRM023 ? rev 0 designer reference manual motorola software design 93 if a fault is detected in the stop st ate, the applicati on enters the fault state (fault protection). if no fault is present an d the start command is accepted, the applicati on transits to the run state and the motor is started. 6.6.3 application state - run the run state can be enter ed from the stop state. in the run state, the drive is enabled and the moto r runs. the pwm output pads are enabled and the fastcontrolloopenabled function is called within the adc end of scan isr. t he run state is divided into three substates which handle the different phases of the run state. the run substates? state machine is illustrated in figure 6-9 . the tasks provided by the run substates are:  the excitation substate provid es the excitation of the motor during start-up. it is entered after the tr ansition from the stop stat; motor excitation is then enabled . after the motor is excited to the nominal rotor flux value, the substate is changed to spinning. if the stop command is accepted before the motor is fully excited, the substate is changed to de-excitation.  the spinning substate provides motor spin and acceleration/decelerat ion. it is entered from the excitation substate. the required speed co mmand is accepted, and the motor spins at the required speed. if a stop command is accepted, the substate changes to de-excitation.  the de-excitation su bstate provides de-excitation as the motor is going to the stop st ate. it is entered from the excitation or spinning s ubstates. the speed command is set to zero turns. when ze ro turns are reached, motor de-excitation is executed. if the mo tor is deexcited, the application transits to the stop state. if any fault in the r un state is detected, th e application enters the fault state (fault protection). f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 94 software design motorola 6.6.4 application state - fault the fault state can be entered from any state. in the fault state, the drive is disabled and the application wa its for the faults to be cleared. when it detects that the fault has disappear ed and the fault clear command is accepted, t he run/stop switch is moved to the stop position and the applicat ion transits to the in it state. the ?wrong hardware? and ?mains ou t of range? faults can only be cleared by reset. figure 6-9. run state substates state machine spinning state deexcitation state excitation state from run state spinningctrl=1 deexcitationctrl=1 to run state deexcitationctrl=1 application run state f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design speed sensing DRM023 ? rev 0 designer reference manual motorola software design 95 6.7 speed sensing the motorola dsp56f805 contains a quadrature decoder module. this peripheral is commonly used fo r position and speed sensing. the quadrature decoder position counter counts up/down at each edge of the phase a and phase b signals acco rding to their order; see figure 6-10 . figure 6-10. quadrat ure encoder signals in addition, the quadrature decoder input signals (phas e a, phase b and index) are connected to quad timer module a. the quad timer module contains four identical counter/timer groups. due to t he wide variability of quad timer modules, it is possible to use this module to decode quadrature encoder signals and to sense position and speed. the application presented uses t he quad timer approach for speed measurement in order to be able to easily accommodate the software for the dsp56f801, which does not have a quadratur e decoder module. the configuration of the quad timer module is shown in figure 6-11 . the presented configuration is ready for position sens ing handled by timer a1. in the ac induction motor vect or control applic ation presented, however, position sensing is not applied. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 96 software design motorola figure 6-11. quad timer module a configuration 6.7.1 speed sensing there are two common ways to me asure speed. the first method measures the time between two fo llowing edges of the quadrature encoder; the second me thod measures the pos ition difference per constant period. the first method is us ed at low speed. at higher speeds, when the measured period is very s hort, the speed calc ulation algorithm switches to the second method. the proposed algorithm combines both of the above mentioned methods. the algorithm simultaneously measur es the number of quadrature encoder pulses per constant period and their accurate time period. the speed can t hen be expressed as: (eq 6-8.) quadrature decoder position c ounter impulses counter period timer time base internal digital filter phase a phase b index primary source secondary source qtimer a0 primary source secondary source qtimer a1 primary source secondary source qtimer a2 primary source secondary source qtimer a3 primary source secondary source qtimer c0 clk/2 clk not used cascade mode speed k 1 n ? t ------------- - k 1 n ? t clkt2 n clkt2 ------------------------------ kn ? n clkt2 --------------- == = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design speed sensing DRM023 ? rev 0 designer reference manual motorola software design 97 where speed calculated speed [-] k scaling constant [-] k 1 scaling constant [s] n number of counted pulses per constant period [-] t accurate period of n pulses [s] t clkt2 period of input clock to timer a2 [s] n clkt2 number of pulses counted by timer a2 [-] the speed-sensing algorithm uses thr ee timers (a0, a2, a3) in quad timer module a and another timer as a time base (c0). the timer a0 is used in quadrature count mode , where the primary and secondary external inputs are decoded as quadrature encoded si gnals. the timer a0 counts to zero and then reinitiali zes. the other tw o timers (a2 and a3) are required for counting the qua drature signals and their period; see figure 6-11 . timer a2 counts the quadr ature encoder pulses from timer a0 and timer a3 counts a system clock divided by 2. the values in both timers can be captured by eac h edge of the phas e a signal. the time base is provided by timer c0, wh ich is set to call a slow control loop every 1ms where the speed measurem ent is calculated. the speed processing algorithm works as follows: 1. the new captured values of both timers are read. the difference in the number of pulses and thei r accurate period are calculated from actual and previous values. 2. the new values are saved for the next period a nd the capture register is enabled. fr om this time, the fi rst edge of the phase a signal captures the values of bo th timers (a2, a3) and the capture register is disabled. 3. the speed is calculated using (eq 6-8.) 4. this process is repeat ed with each call of the speed processing algorithm; see figure 6-12 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 98 software design motorola figure 6-12. speed processing 6.7.1.1 minimum and ma ximum speed calculation the minimum speed is given by the following equation: (eq 6-9.) where: v min minimum obtainable speed [rpm] n e number of encoder pulses per revolution [-] t calc period of speed measurement (calculation period) [s] in this application, the quadrature encoder has 1024 pulses per revolution and the calculation period chosen is 1ms, based on the motor mechanical const ant. thus, equation (eq 6-9.) calculates the minimum speed as 14.6 rpm. c v min 60 4n e t calc --------------------- - = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design speed sensing DRM023 ? rev 0 designer reference manual motorola software design 99 the maximum speed can be expressed as: (eq 6-10.) where: v max maximum obtainable speed [rpm] n e number of encoder pulses per revolution [-] t clkt2 period of input clock to timer a2 [s] after substitution in equation (eq 6-10.) for n and t clkt2 (timer a2 input clock = system clock 36 mhz/2), we calculate the maximum speed as 263,672 rpm. as shown, the algorithm pres ented can measure speed within a wide speed range. because such a high speed is not practical, the maximum speed can be reduced to the required range by a constant k in (eq 6-8.) . the constant k can be calculated as: (eq 6-11.) where: k scaling constant in the equation [-] v max maximum requir ed speed [rpm] n e number of encoder pulses per revolution [-] t clkt2 period of input clock to timer a2 [s] in the application presented, the maximum measurabl e speed is limited to 4000 rpm. note: to ensure correct speed calculation, t he input clock of timer a2 must be chosen so that the calculation peri od of speed processing (in this case, 1ms) is represented in timer a2 as a value lower than 0x7fff (1000.10 -6 /t clkt2 <=0x7fff). v max 60 4n e t clkt2 ------------------------- = k 60 4n e t clkt2 v max ------------------------------------ - = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 100 software design motorola 6.8 analog sensing 6.8.1 current sensing the dsp56f80x family provides the abi lity to synchronize the adc and pwm modules via a sync signal. this exceptional hardw are feature, which has been patented by motorola, is used for current sensing. the pwm outputs a synchroniza tion pulse, which is connected as an input to the synchronization modu le tc2 (quad timer c, channel 2). a high-true pulse occurs for each reload of the pwm regardless of the state of the ldok bit. the intended pu rpose of tc2 is to pr ovide a user-selectable delay between the pwm sync signal and the upda ting of the adc values. a conversion process can be in itiated by the sync input, which is an output of tc2. the time diagram of the automatic synchronization between pwm and adc is shown in figure 6-13 . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design analog sensing DRM023 ? rev 0 designer reference manual motorola software design 101 figure 6-13. time diagram of pwm and adc synchronization phase currents are measured by shunt resistors at each phase. a voltage drop on the shunt resistor is am plified by an oper ational amplifier and shifted up by 1.65v. the resultant voltage is converted by the adc; see figure 6-14 and figure 6-15 pwm counter pwm sync pwm generator outputs 0, 1 pwm pins 0, 1 power stage voltage tc2 t1 t2 counter tc2 output adc conversion adc isr dead-time/2 dead-time dead-time dead-time/2 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 102 software design motorola figure 6-14. 3-phase bridge with current shunt resistors figure 6-15. current amplifier for phase c the current cannot be meas ured at the current s ense resistors at an arbitrary moment. this is because cu rrent only flows th rough the shunt resistor (for example, r1 corresponding to phase a) if transistor q2 is switched on. only at that instant can the phase a cu rrent be measured. correspondingly, the current in p hase b can only be measured if transistor q4 is switched on, and t he current in phase c can only be measured if transistor q6 is switched on. in order to get an actual instant of current sensing, voltage shape analysis must be performed. dc bus positive gate_bb source_cb sense sense r2 0.075 1% i_sense_b2 sense sense r3 0.075 1% i_sense_a2 source_bb dc bus negative gate_ab q5 skb10n60 q6 skb10n60 phase_b gate_ct q2 skb10n60 phase_a gate_cb sense sense r1 0.075 1% q3 skb10n60 phase_c source_ab i_sense_c1 q4 skb10n60 i_sense_a1 i_sense_c2 gate_bt gate_at q1 skb10n60 i_sense_b1 r321 10k-1% + c306 3.3uf/10v i_sense_c1 c307 100nf +3.3v_a 1.65v ref gnda u304 lm285m 8 5 4 r320 10k-1% r323 390 r318 75k-1% r325 33k-1% 1.65v +/- 1.65v @ +/- imax r324 100k-1% + - u301b mc33502d 5 6 7 i_sense_c i_sense_c2 gnda r322 75k-1% f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design analog sensing DRM023 ? rev 0 designer reference manual motorola software design 103 voltage shapes of two differ ent pwm periods are shown in figure 6-16 . these voltage shapes correspond to center-aligned pwm sinewave modulation. as shown, the best inst ant of current sampling is in the middle of the pwm period, where all bottom trans istors are switched on. however, not all three currents c an be measured at an arbitrary voltage shape. pwm period ii in figure 6-16 shows an instant when the bottom transistor of phase a is on for a very sh ort time. if the on time is shorter than a certain critical time, the current cannot be correctly measured. the specific critical time is give n by the hardware configuration (transistor commutation times, re sponse delays of the processing electronics, etc.). in t he 3-phase acim applicati on, two pwm periods are always longer than the cr itical pulse width. ther efore, only two currents are measured and the th ird current is ca lculated from equation: (eq 6-12.) figure 6-16. the voltage shapes of two different pwm periods 0i a i b i c ++ = phase_a phase_b phase_c pwm period adc samplin g point critical pulse width pwm reload i . ii . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 104 software design motorola figure 6-17. 3-phase si newave voltages and corresponding sector values the current that cannot be measured is the calc ulated. the simplest technique is to calculate the current of the most positive phase voltage, where the bottom pwm is switched on for the shortest time. for example, phase a generates the most positive voltage within section 0 - 60 , phase b within the section 60 - 120, etc .; see figure 6-17 . in the case presented, t he output voltages are divi ded into six sectors; see figure 6-17 . the current is then calculat ed according to the actual sector value: for sectors 1, 6: (eq 6-13.) for sectors 2, 3: (eq 6-14.) for sectors 4, 5: (eq 6-15.) 0 60 120 180 240 300 360 0 0.2 0.4 0.6 0.8 1 phase a phase b phase c angle duty cycle ratios 0 60 120 180 240 300 360 0 60 120 180 240 300 360 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 phase a phase b phase c phase a phase b phase c angle duty cycle ratios sector 1 sector 2 sector 3 sector 4 sector 5 sector 6 sector 1 sector 2 sector 3 sector 4 sector 5 sector 6 ii. i. i a i b ?i c ? = i b i a ?i c ? = i c i b ?i a ? = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design analog sensing DRM023 ? rev 0 designer reference manual motorola software design 105 note: the sector value is used only for cu rrent calculation and has no other meaning at the sinewave mo dulation. but if any ty pe of the space vector modulation is used, the sector value can be obtained as a part of space vector calculation and used fo r phase current measurement. 6.8.2 voltage sensing the resistor divider network in figure 6-18 is used to sense the dc-bus voltage. the voltage signal is divided down to the 3. 3v level and is ready for further processing. dc-bus volt age does not change rapidly. it is almost a constant, with ripple caus ed by the structure of the power supply. if a bridge rectif ier for conversion of the ac line voltage is used, the ripple frequency is twice the ac line frequ ency. ripple amplitude should not exceed 10% of the nominal dc-bus value if the power stage is designed correctly. figure 6-18. dc-bus voltage sensing the measured dc-bus volt age must be filtered in order to eliminate noise. one of the easiest and fastest techniques is a first order filter, which calculates the average filtered value recursively from the last two samples and a coefficient c: (eq 6-16.) r225 270k-1% v_sense_dcb 3.24v @ dc-bus = 400v dc bus negative r227 220k-1% r226 6.8k-1% dc bus positive r224 330k-1% r230 6.8k-1% + c209 470uf/400v c208 22nf/630vdc r229 270-1% gnda r228 6.8k-1% u dcbusfilt n1 + () cu dcbusfilt n1 + () cu dcbusfilt n () ? () u ? dcbusfilt n () = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 106 software design motorola to speed up initialization of voltage sens ing, the filter has an exponential dependence with a constant of 1/n sa mples and a moving average filter that calculates the av erage value from the last n samples is used: (eq 6-17.) 6.8.3 power modul e temperature sensing the measured power module temperatur e is used for thermal protection the hardware realization is shown in figure 6-19 the circuit consists of four diodes connected in series, a bias resistor, and a noise suppression capacitor. the four diodes have a comb ined temperature coefficient of 8.8 mv/ c. the resulting signal, temp_sense , is fed back to an a/d input where software can be used to set safe operating limits. in the application presented, t he temperature (in cels ius) is calculated according to the conversion equation: (eq 6-18.) where: temp power module tem perature in celsius temp_sense voltage drop on the dio des, which is measured by the adc a diode-dependent conv ersion constant (a = -0.0073738) b diode-dependent conv ersion constant (b = 2.4596) u dcbusfilt u dcbus n () n1 = n ? = temp temp_sense - b a ------------------------------------- - = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design start/stop switch and button control DRM023 ? rev 0 designer reference manual motorola software design 107 figure 6-19. temperature sensing 6.9 start/stop switch and button control the start/stop switch is connected to a gpio pin in the case of dsp56f805/7evms. the stat e of the start/stop switch can be read directly from the gpio data regi ster. in the dsp5 6f803evm, there are no free gpio pins; theref ore, the switch is c onnected to adc input an7 and switch status is then obtained with the adc. the switch logical status is obtained by comparing a measured value wit h the threshold value. since the dsp56f803evm does not have free gp io pins for user buttons, they are connected to irqa and irqb pins. the dsp56f805/7evms use the same connection of t he push buttons to the irqa and irqb pins, enabli ng the same code to run on dsp56f803/5/7evm boards . the evm boards do no t solve the button contact bouncing, which may occur dur ing the pushing an d releasing of a button. therefore, this iss ue must be solved by software. the irqa and irqb are ma skable interrupts connec ted directly to the dsp?s core. the irqa and ir qb lines are internal ly synchronized with the processor?s internal clock and can be programmed as level-sensitive or edge-sensitive. the ir qa and irqb interrupts do not have interrupt flags; therefore, t he flags are replaced by so ftware flags. the following algorithm is used to check the state of the irq line and is described for one interrupt. c1 100nf d1 bav99lt1 r1 2.2k - 1% d2 bav99lt1 temp_sense +3.3v_a f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 108 software design motorola the level-sensitive trigger mode of the irq interr upt is set. when the button is pressed, the logical le vel 0 is applied on the irq line and an interrupt occurs; see figure 6-20 . the isr disables the irq interrupt to avoid multiple calls of the isr due to contact bouncing, sets the debounce counter to a predefined value, and sets the variable buttonstatus to 1. the variable buttonstatus represents the interrupt flag. using the dsp56f 80x?s timer or a so ftware timer, the buttonprocessing function is called periodically; see figure 6-20 . the function buttonprocessing decrements the debounce counter and if the counter is zeroed, the irq interrupt is re-enabl ed. button pressing is checked by the buttonedge function; see figure 6-21 . when the variable buttonstatus is set, the buttonedge function returns ?1? and clears buttonstatus . when the variable buttonstatus is not set, the buttonedge function returns ?0?. the value of the debounce counter should be set according to a buttonprocessing calling period close to 180ms. this value is sufficient to prevent multiple irq isr calls due to contact bouncing. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design start/stop switch and button control DRM023 ? rev 0 designer reference manual motorola software design 109 figure 6-20. button c ontrol - irq isr and buttonprocessing irq isr disable irq interrupt set debounce counter set buttonstatus return buttonprocessing decrement debounce counter debounce counter = 0 enable irq interrupt return yes no f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
software design designer reference manual DRM023 ? rev 0 110 software design motorola figure 6-21. button control - buttonedge buttonedge buttonstatus = 1 clear buttonstatus return 1 return 0 yes no f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM023 ? rev 0 designer reference manual motorola system set-up 111 designer reference manual ? 3-phase acim vector control section 7. system set-up 7.1 contents 7.2 hardware setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 7.3 jumper settings of controller board. . . . . . . . . . . . . . . . . . . .114 7.4 required software tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 7.5 application build & execute . . . . . . . . . . . . . . . . . . . . . . . . . . 116 7.6 controlling the application . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 7.2 hardware setup figure 7-1 illustrates the hardware set- up for the 3-phase ac induction motor vector control application the system consists of the following components:  motor-brake ? ac induction motor - type am 40v, em brno s.r.o., czech republic ? brake - type sg 40n, em brno s.r.o., czech republic  encoder bhk 16.05a1024-12-5, baumer electric, switzerland  3-ph. ac bldc hv power stage 180 w  in-line optoisolation box (ecoptinl) + jtag cable  controller board - dsp56f805 evaluation m odule, supplied as dsp56f805evm  two serial cables - needed for the pc ma ster software debugging tool only. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system set-up designer reference manual DRM023 ? rev 0 112 system set-up motorola  the parallel cable - needed for the metrowerks code warrior debugging and s/w loading. the correct order of phases (phase a, phase b, phase c) for the ac induction motor shown in figure 7-1 is:  phase a = red wire  phase b = white wire  phase c = black wire when facing a motor shaft, if the phase order is: phas e a, phase b, phase c, the motor shaft should rotate clockwise (i.e., positive direction, positive speed). . figure 7-1. set-up of the 3-phase ac im vector cont rol application f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system set-up hardware setup DRM023 ? rev 0 designer reference manual motorola system set-up 113 warning: danger, high-voltage--r isk of electric shock! this application op erates in an envir onment that includes dangerous voltages and ro tating machinery. the application pcb m odules and serial inte rface (connector, cable) are not elec trically isolated from th e mains voltage--they are live. use the in-line optoisolation b ox (ecoptinl) between the pc and dsp56805 evm as prot ection from dangerous voltage on the pc-user side, and to prevent damage to the pc and other hardware. do not touch any part of the evm or the ser ial cable between the evm and the in-line optoisolatio n box unless you are using an insulation transforme r. the application is designed to be fully controllable only from pc master software. to avoid inadvertently touching live parts, use plastic covers. in the rest of this application, the descr iption supposes use of the insulation transformer. the user should be aware that: ? before moving scope probes, maki ng connections, etc., it is generally advisable to power down t he high-voltage supply.  when high voltage is applie d, using only one hand for operating the test setup minimizes the possibility of electrical shock.  operation in lab setups that have grounded tables and/or chairs should be avoided.  wearing safety glasses, avoidi ng ties and jewelry, using shields, and operation by personnel trained in high-voltage lab techniques are also advisable.  power transistors, the pfc coil, and the mo tor can reach temperatures hot en ough to cause burns.  when powering down; due to st orage in the bu s capacitors, dangerous voltages are present until the power-on led is off. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system set-up designer reference manual DRM023 ? rev 0 114 system set-up motorola 7.3 jumper settings of controller board the dsp56f805evm jumper settings shown in figure 7-2 and table 7-1 are required to execute the 3-phase acim vector control application. for a detailed description of the jumper settin gs, refer to the dsp56f805 evaluation module hardware user?s manual (motorola document order num ber dsp56f805evmum/d). figure 7-2. dsp56f805e vm jumper reference jg8 jg9 dsp56f805evm jg3 1 j29 jtag jg14 1 p3 user s/n led3 p1 y1 u1 u15 s2 s3 3 1 2 jg13 s1 s4 s5 s6 p1 pwm 4 7 3 6 9 jg12 1 3 2 jg13 1 3 2 j23 j24 jg6 jg1 jg2 1 1 jg9 jg7 jg5 u9 u10 jg4 1 jg8 reset irqb irqa run/stop gp2 gp1 1 2 7 8 jg4 1 2 7 8 jg3 3 1 2 jg12 3 1 4 jg14 jg10 6 9 7 jg10 1 jg1 3 1 jg6 3 1 jg2 3 jg5 jg15 3 1 jg11 3 1 jg16 3 1 jg15 1 jg16 1 jg11 1 jg18 jg17 jg17 jg18 jg7 table 7-1. dsp56f805 evm jumper settings jumper group comment connections jg1 pd0 input selected as a high 1-2 jg2 pd1 input selected as a high 1-2 jg3 primary uni-3 serial selected 1-2, 3-4, 5-6, 7-8 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system set-up required software tools DRM023 ? rev 0 designer reference manual motorola system set-up 115 note: when running the evm target system in a stand-alone mode from flash, the jg5 jumper must be set in the 1-2 configur ation to disable the command converter para llel port interface. 7.4 required software tools the following software tools are needed for compi ling, debugging, loading to the evm, remote control and monitoring:  metrowerks codewarrior 5.0  pc master software 1.2 jg4 secondary uni-3 serial selected 1-2, 3-4, 5-6, 7-8 jg5 enable on-board parallel jtag command converter interface nc jg6 use on-board crystal for dsp oscillator input 2-3 jg7 select dsp?s mode 0 operation upon exit from reset 1-2 jg8 enable on-board sram 1-2 jg9 enable rs-232 output 1-2 jg10 secondary uni-3 analog temperature input unused nc jg11 use host power for host target interface 1-2 jg12 primary encoder input selected for quadrature encoder signals 2-3, 5-6, 8-9 jg13 secondary encoder input selected 2-3, 5-6, 8-9 jg14 primary uni-3 3-phase current sense selected as analog inputs 2-3, 5-6, 8-9 jg15 secondary uni-3 phase a over current selected for faulta1 1-2 jg16 secondary uni-3 phase b overcurrent selected for faultb1 1-2 jg17 can terminat ion unselected nc jg18 use on-board crystal for dsp oscillator input 1-2 table 7-1. dsp56f805 evm jumper settings jumper group comment connections f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system set-up designer reference manual DRM023 ? rev 0 116 system set-up motorola 7.5 application build & execute when building the 3-phase ac induct ion machine control application, the user can create an appl ication that runs from internal program flash pflash or extrernal ram extram . to select the type of application to build, open the 3ph_acim_vector_control_sa.mcp project and select the target build type, as shown in figure 7-3 . a definition of the projects associated with these target bui ld types may be viewed under the targets tab of the project window. figure 7-3. target build selection the project may now be bui lt by executing the make command, as shown in figure 7-4 . this will build and link t he 3-phase ac induction motor vector control application and all needed metr owerks and quick start tool libraries. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system set-up application build & execute DRM023 ? rev 0 designer reference manual motorola system set-up 117 figure 7-4. execute make command to execute the 3-phase ac induction mo tor control application, select project\debug in the codewarri or ide. for more help with these commands, refer to the codewarrior tutorial documentation in the following file located in the codewarrior installation folder: <...>\codewarrior manuals\ pdf\targeting_dsp56800.pdf if the flash target is selected, c odewarrior will autom atically program the internal flash of the dsp with the executable generated during build . if the external ram target is sele cted, the executable will be loaded to off-chip ram. once flash has been progr ammed with the execut able, the evm target system may be run in a stand-alone m ode from flash. to do this, set the jg5 jumper in the 1-2 co nfiguration to disable t he parallel port, and press the reset button. once the applicat ion is running, move the ru n/stop switch to the run position and set the r equired speed using the up/ down push buttons. pressing the up/down buttons shou ld incrementally increase the f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system set-up designer reference manual DRM023 ? rev 0 118 system set-up motorola motor speed until it reaches maximum speed. if successful, the ac induction motor will be spinning. note: if the run/stop switch is set to t he run position when the application starts, toggle the run/stop s witch between the stop and run positions to enable motor spinning. this is a pr otection feature that prevents the motor from starting when the applicat ion is executed from codewarrior. you should also see a lighted green led, which indicates that the application is running. if the application is stop ped, the gree n led will blink at a 2hz frequency. if any fault occurs, the green led will blink at a frequency of 8hz. 7.6 controlling the application the drive can be controlled in two different operating modes:  manual operating mode - the r equired speed is set by the up/down push buttons and the dr ive is started and stopped by the run/stop swit ch on the evm board  pc master software operating mode - the required speed is set by the pc master software active bar graph and the dr ive is started and stopped by the start moto r and stop motor controls measured quantities:  dc-bus voltage  phase currents (phase a, phase b, phase c)  power module temperature  rotor speed f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system set-up controlling the application DRM023 ? rev 0 designer reference manual motorola system set-up 119 the faults used for drive protection:  overvoltage (pc master software error message = overvoltage fault )  undervoltage (pc master software error message = undervoltage fault )  overcurrent (pc master software error message = overcurrent fault )  overheating (pc master software error message = overheating fault )  wrong-mains (pc master software error message = mains out of range )  wrong-hardware (pc master software error message = wrong hw used )  overload (pc master so ftware error message - overload ) an informative message; actual applic ation state is not changed to fault state states of the applicat ion state machine see table 7-2 :  init - application initializa tion; operating mode changing  stop - pwm outputs disabled ; operating mode changing  run - pwm outputs enab led; motor running  fault - pwm outputs disabled; waiting for manual fault acknowledgement 7.6.1 control process after reset, the drive is in the in it state and in t he manual operating mode.when the run/stop switch is detected in the st op position and there are no faults pending, the init state is chan ged to the stop state. otherwise, the drive waits in the init st ate. if faults occur, the drive goes to the fault state. in init and stop states , the operation mode can be changed from pc master software . in the manual operating mode, the application is controlled by the run/stop switch and up/down f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system set-up designer reference manual DRM023 ? rev 0 120 system set-up motorola buttons; in the pc master software remote control , the application is controlled by the pc mast er software environment. when the start command is accepted (using the run/stop switch or the pc master software command), the stop state is changed to the run state. required sp eed is then calculated from the up/down push buttons (in case of th e manual operatin g mode) or pc ma ster software commands (in case of th e pc master software remote control mode). the required speed is the input into the accelera tion/deceleration ramp. 7.6.2 drive protection the dc-bus voltage, dc- bus current and power stage temperature are measured during t he control process. they protect the drive from overvoltage, undervoltage, ov ercurrent, ov erheating and wrong-mains. the undervoltage, overheating, wrong-hardware and wrong-mains protection is perform ed by software. the overcurrent and overvoltage fault signals utilize fault inputs of the dsp controlled by hardware. the power stage is identified usin g board identification. if the correct boards are not identified, t he wrong-hardware fault disables the drive operation. line voltage is measured during a pplication initialization and the application automatically adjusts itself to run at either 115v ac or 230v ac, depending on t he measured value. if the mains is out of range, the wrong- mains fault is set and the dr ive operation is disabled. if any of the mentioned faults occur, the motor control pwm outputs are disabled to protect the drive and the application enters the fault state. the fault state can be left only when the fault conditions disappear and the run/stop switch is moved to the stop position (in pc master software remote mode, by pc master software ). if the wrong-hardware and wrong-mains occur, the fault stat e can be left only by application reset. 7.6.3 manual operating mode the drive is controlled by the run/ stop switch (s6). the motor speed is set by the up (s2-irqb) and down (s1-irqa) push buttons; see figure 7-5 . if the application runs and motor spinning is disabled (i.e., f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system set-up controlling the application DRM023 ? rev 0 designer reference manual motorola system set-up 121 the system is ready) the u ser led (led3, shown in figure 7-6 ) will blink. when motor spinning is enabled, the user led is on . refer to table 7-2 for application states. figure 7-5. run/stop switch and up/down buttons at dsp56f805evm f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system set-up designer reference manual DRM023 ? rev 0 122 system set-up motorola figure 7-6. user and pw m leds at dsp56f805evm table 7-2. motor application states application state motor state green led state stopped stopped blinking at a frequency of 2hz running spinning on fault stopped blinking at a frequency of 8hz f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system set-up controlling the application DRM023 ? rev 0 designer reference manual motorola system set-up 123 7.6.4 pc master software (remote) operating mode project files for the pc master software are located in: ..\pc_master\3ph_acim _vector_control.pmp start the pc master software application window and choose the appropriate pc master software project. figure 7-7 shows the pc master software co ntrol window for 3ph_acim_vector_control.pmp . the drive is controlled remotely from a pc through the sci communication channel of the dsp device via an rs-232 physical interface. the drive is enabled by th e run/stop switch, which can be used to safely stop t he application at any time. pc master software enables to set the require d speed of the motor. the following pc master software control action s are supported:  set pc master software m ode of the motor control system  set manual mode of the motor control system  start the motor  stop the motor  set the required speed of the motor pc master software displa ys the following information:  actual and required speed of the motor  application status - init/stop/run/fault  dc-bus voltage  identified mains voltage  identified hardware  temperature of power module  start motor and stop motor controls (active only in pc master software mode)  pc master software check-box ( defines full pc ma ster software control or full manual control)  fault status f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system set-up designer reference manual DRM023 ? rev 0 124 system set-up motorola if any fault occurs (overcurr ent, overvoltage, wrong-mains, overheating or wr ong-hardware), the green user led will blink at a frequency of 8hz. the pc master software control page shows the identified fault. the f aults can be handled by switching the start motor/stop motor icon to st op motor, which acknowledges the fault state. meanwhile, the wrong-ma ins and the wr ong-hardware faults can be quit only wi th the application re set. it is strongly recommended that the user inspect th e entire application to locate the source of the fault be fore starting it again. note: if the pc master softwa re project (.pmp file) is unable to control the application, it is possible that th e wrong load map (. elf file) has been selected. pc master software uses the load m ap to determine addresses for global variables being monitored. once the pc master software project has been launched, this option may be selected in the pc master software window under proj ect/select other map filereload. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system set-up controlling the application DRM023 ? rev 0 designer reference manual motorola system set-up 125 figure 7-7. pc master software control window f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
system set-up designer reference manual DRM023 ? rev 0 126 system set-up motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM023 ? rev 0 designer reference manual motorola references 127 designer reference manual ? 3-phase acim vector control appendix a. references 1. bose, k. b. (1997). power electronics and variable frequency drives, ieee press, isbn 0-7803-1061-6, new york. 2. caha, z.; cerny, m. (1990). elektricke pohony, sntl, isbn 80-03-00417-7, praha. 3. subrt, j. (1987). elektricke regulacni pohony ii , vut brno. 4. vas, p. (1998). sensorless vector an d direct torque control , oxford university press, isbn 0-19-856465-1, new york. 5. motorola , inc. (2000). dsp56800 family manual , dsp56f800fm/d 6. motorola , inc.(2001). dsp56f80x user?s manual , dsp56f801-7um/d 7. motorola , inc. (2001). dsp evaluation module hardware user?s manual, dsp56f805evmum/d 8. motorola , inc. (2000). motorola embedded motion control 3-phase ac bldc hi gh-voltage power stage user?s manual , memc3pbldcpsum/d f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
references designer reference manual DRM023 ? rev 0 128 references motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM023 ? rev 0 designer reference manual motorola glossary 129 designer reference manual ? 3-phase acim vector control appendix b. glossary ac ? alternating current. acim ? alternating curren t induction motor. adc ? see ?analogue-to-d igital converter?. byte ? a set of eight bits. central processor unit (cpu) ? the primary functi oning unit of any computer system. the cpu controls the execution of instructions. clear ? to change a bit from logic 1 to logic 0; the opposite of set. comparator ? a device that compares th e magnitude of two inputs. a digital comparator defines the equalit y or relative differences between two binary numbers. computer operating properly module (cop) ? a counter module that resets the mcu if allowed to overflow. cop ? computer oper ating properly dc ? direct current. dsp ? digital signal processor. dt ? see ?dead time (dt)? dead time (dt) ? short time that must be inserted between the turning off of one transistor in the invert er half bridge and tu rning on of the complementary transistor due to t he limited switching speed of the transistors. duty cycle ? a ratio of the amount of time the signal is on versus the time it is off. duty cycle is us ually represented by a percentage. gpio ? general purpose input/output. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
glossary designer reference manual DRM023 ? rev 0 130 glossary motorola hall sensors - a position sensor giving six defined events (each 60 electrical degrees) per el ectrical revolution (for 3-phase motor) interrupt ? a temporary break in the sequential exec ution of a program to respond to signals fro m peripheral devices by executing a subroutine. interrupt request ? a signal from a peripheral to the cpu intended to cause the cpu to ex ecute a subroutine. input/output (i/o) ? input/output interfac es between a computer system and the external world. a cpu reads an input to sense the level of an external signal an d writes to an output to change the level on an external signal. jtag ? joint test access group led ? lignt emiting diode logic 1 ? a voltage level approximately equal to the inpu t power voltage (v dd ). logic 0 ? a voltage level approximatel y equal to t he ground voltage (v ss ). mcu ? microcontroller unit. see ?microcontroller.? memory map ? a pictorial repres entation of all memo ry locations in a computer system. microcontroller ? microcontroller unit (m cu). a complete computer system, including a cpu, memory, a clock oscillator, and input/output (i/o) on a single integrated circuit. modulo counter ? a counter that can be programmed to count to any number from zero to its maximum possible modulus. pi controller ? proportional-int egral controller. peripheral ? a circuit not under direct cpu control. phase-locked loop (pll) ? a clock generator circuit in which a voltage controlled oscillator produces an osci llation which is synchronized to a reference signal. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
glossary DRM023 ? rev 0 designer reference manual motorola glossary 131 port ? a set of wires for communi cating with off-chip devices. program ? a set of computer instructions that cause a computer to perform a desired operat ion or operations. pwm ? pulse width modulation. pwm period ? the time requir ed for one complete cycle of a pwm waveform. read ? to copy the contents of a memo ry location to the accumulator. register ? a circuit that st ores a group of bits. reset ? to force a device to a known condition. rpm ? revolutions per minute. sci ? see "serial communication interface module (sci)." serial communications inte rface module (sci) ? a module that supports asynchronous communication. serial peripheral inte rface module (spi) ? a module that supports synchronous communication. set ? to change a bit from logic 0 to logic 1; opposi te of clear. software ? instructions and data that control the operation of a microcontroller. software interrupt (swi) ? an instruction that causes an interrupt and its associated vector fetch. spi ? see "serial peripheral interface module (spi)." stack ? a portion of ram reserved for st orage of cpu regi ster contents and subroutine return addresses. subroutine ? a sequence of instructions to be used more than once in the course of a program. the last instruction in a subroutine is a return from subroutine (rts) instruction. at each place in the main program where the subroutine instructions are needed, a jump or branch to subroutine (jsr or bsr) instruction is used to call the subroutine. the f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
glossary designer reference manual DRM023 ? rev 0 132 glossary motorola cpu leaves the flow of the main program to exec ute the instructions in the subroutine. when the rts instruction is exec uted, the cpu returns to the main program where it left off. timer ? a module used to relate events in a system to a point in time. variable ? a value that changes duri ng the course of program execution. waveform ? a graphical representation in which the amplitude of a wave is plotted against time. word ? a set of two bytes (16 bits). write ? the transfer of a byte of data from the cpu to a memory location. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
how to reach us: usa/europe/locations not listed: motorola literature distribution; p.o. box 5405, denver, colorado 80217 1-303-675-2140 or 1-800-441-2447 japan: motorola japan ltd.; sps, technical information center, 3-20-1, minami-azabu minato-ku, tokyo 106-8573 japan 81-3-3440-3569 asia/pacific: motorola semiconductors h.k. ltd.; silicon harbour centre, 2 dai king street, tai po industrial estate, tai po, n.t., hong kong 852-26668334 technical information center: 1-800-521-6274 home page: http://motorola.com/semiconductors information in this document is provided solely to enable system and software implementers to use motorola products. there are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document. motorola reserves the right to make changes without further notice to any products herein. motorola makes no warranty, representation or guarantee regarding the suitability of its products for any partic ular purpose, nor does motorola assume any liability arising out of the app lication or use of any product or circuit, and specifically disclaims any and all liability, including withou t limitation consequential or incidental damages. ?typical? parameters which may be provided in motorola data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. all operating parameters, including ?typicals? must be validated for each customer application by customer?s technical experts. motorola does not convey any license under its patent rights nor the rights of others. motorola products are not desig ned, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the motorola product could create a situation where personal injury or death may occur. should buyer purchase or use motorola products for any such unintended or unauthorized application, buyer shall indemnify and hold motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that motorola was negligent regarding the design or manufacture of the part. motorola and the stylized m logo are registered in the u.s. patent and trademark office. digital dna is a trademark of motorola, inc. all other product or service names are the property of their respective owners. motorola, inc. is an equal opportunity/affirmative action employer. ? motorola, inc. 2003 DRM023/d f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .


▲Up To Search▲   

 
Price & Availability of DRM023

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X