![]() |
|
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 drm031/d rev. 0, 03/2003 encoder using designer reference manual drive control with reluctance motor 3-phase switched 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 . . . drm031 ? rev. 0 designer reference manual motorola 3 3-phase switched reluctance motor control with encoder using 56f805 designer reference manual ? rev. 0 by: peter balazovic motorola czech s ystem 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 drm031 ? 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) january 2003 1 initial revision 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 . . . drm031 ? rev. 0 designer reference manual motorola 5 designer reference manual ? 3-ph . sr motor control with encoder list of sections section 1. introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 section 2. target motor theory . . . . . . . . . . . . . . . . . . . . 21 section 3. switched reluct ance motor control tech- niques with encoder position sens or. . . . . . . . . . . . . . . 35 section 4. system description. . . . . . . . . . . . . . . . . . . . . 43 section 5. hardware design. . . . . . . . . . . . . . . . . . . . . . . 65 section 6. software design . . . . . . . . . . . . . . . . . . . . . . . 77 section 7. system setup . . . . . . . . . . . . . . . . . . . . . . . . . 99 appendix a. references. . . . . . . . . . . . . . . . . . . . . . . . . 115 appendix b. glossary. . . . . . . . . . . . . . . . . . . . . . . . . . . 117 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 drm031 ? 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 . . . drm031 ? rev. 0 designer reference manual motorola 7 designer reference manual ? 3-ph . sr motor control with encoder table of contents section 1. introduction 1.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 1.2 application benefit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.3 motorola dsp advantages and features . . . . . . . . . . . . . . . . . 16 section 2. target motor theory 2.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 2.2 switched reluctance motor . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.3 mathematical description of sr motor . . . . . . . . . . . . . . . . . . . 24 2.4 digital control of sr moto r . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 2.5 voltage and current control of sr motors . . . . . . . . . . . . . . . . 30 section 3. switched reluct ance motor control tech- niques with encoder position sensor 3.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 3.2 encoder sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 3.3 commutation angle calculat ion . . . . . . . . . . . . . . . . . . . . . . . . 37 3.4 commutation strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39 3.5 current controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41 section 4. system description 4.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 4.2 system outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 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 drm031 ? rev. 0 8 motorola 4.3 application description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 section 5. hardware design 5.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65 5.2 system configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 5.3 dsp56f805evm controller board . . . . . . . . . . . . . . . . . . . . . . 67 5.4 3-phase sr high-voltage power stage . . . . . . . . . . . . . . . . . . 68 5.5 optoisolation board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 5.6 motor-brake specif ications. . . . . . . . . . . . . . . . . . . . . . . . . . . .72 5.7 hardware documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 section 6. software design 6.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77 6.2 data flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 6.3 state diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 6.4 software design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 6.5 scaling of quantities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 6.6 velocity calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 section 7. system setup 7.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99 7.2 application outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 7.3 application description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 7.4 application setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 7.5 project files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 7.6 application build and execute . . . . . . . . . . . . . . . . . . . . . . . . 111 7.7 warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 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 . . . drm031 ? rev. 0 designer reference manual motorola 9 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 drm031 ? 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 . . . drm031 ? rev. 0 designer reference manual motorola 11 designer reference manual ? 3-ph . sr motor control with encoder list of figures figure title page 2-1 3-phase 6/4 sr motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 2-2 phase energizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2-3 magnetization characteri stics of sr motor . . . . . . . . . . . . . . . 25 2-4 electrical diagram of one sr motor phase . . . . . . . . . . . . . . . 26 2-5 3-phase sr power stage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2-6 soft switching and hard swi tching. . . . . . . . . . . . . . . . . . . . . . 30 2-7 voltage control technique . . . . . . . . . . . . . . . . . . . . . . . . . . . .31 2-8 voltage control technique - vo ltage and current profiles. . . . 32 2-9 current control technique . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 2-10 current control technique - voltag e and current profiles . . . . 34 3-1 quadrature encoder signals . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3-2 commutation angle calculat ion . . . . . . . . . . . . . . . . . . . . . . . . 38 3-3 commutation strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40 3-4 phase voltage g eneration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4-1 system concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 4-2 start-up sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4-3 quadrature encoded signals . . . . . . . . . . . . . . . . . . . . . . . . . . 49 4-4 decoder and timer arrangement . . . . . . . . . . . . . . . . . . . . . . . 51 4-5 commutation algorithm flow chart . . . . . . . . . . . . . . . . . . . . . . 53 4-6 current controller utilizat ion. . . . . . . . . . . . . . . . . . . . . . . . . . . 55 4-7 shunt resistors current sensors . . . . . . . . . . . . . . . . . . . . . . . 56 4-8 soft switching current sensed on adc . . . . . . . . . . . . . . . . . . 58 4-9 phase current measur ed at current shunt resi stors . . . . . . . 59 4-10 measured 3-phase currents without and with implemented noise correction . . . . . . . . . . . . . . . . . . . . . . . . . 62 4-11 temperature sensing topolog y . . . . . . . . . . . . . . . . . . . . . . . . 63 5-1 3-phase sr high voltage platform configuratio n . . . . . . . . . . 66 5-2 block diagram of the dsp56f805evm . . . . . . . . . . . . . . . . . . 68 5-3 3-ph. sr hv power stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 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 drm031 ? rev. 0 12 motorola 5-4 inductance characteristic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 6-1 system data flow i - sr motor control . . . . . . . . . . . . . . . . . . 78 6-2 system data flow ii - ad converter. . . . . . . . . . . . . . . . . . . . .79 6-3 application state diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 6-4 software design - general overview . . . . . . . . . . . . . . . . . . . . 87 6-5 electrical angle definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 7-1 run/stop switch and up/down buttons on dsp56f805evm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 7-2 user and pwm leds on dsp56f805evm . . . . . . . . . . . . . 103 7-3 pc master software control window . . . . . . . . . . . . . . . . . . . 105 7-4 setup of 3-phase sr mo tor control application using dsp56f805evm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 7-5 dsp56f805evm jumper re ference . . . . . . . . . . . . . . . . . . . 108 7-6 target build selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 7-7 execute make command . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 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 . . . drm031 ? rev. 0 designer reference manual motorola 13 designer reference manual ? 3-ph . sr motor control with encoder list of tables table title page 1-1 memory configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 4-1 commutation sequence of the reference phase . . . . . . . . . . 60 5-1 electrical characteristi cs of power stage. . . . . . . . . . . . . . . . . 71 5-2 electrical characterist ics of optoisolation boar d . . . . . . . . . . . 72 5-3 motor - brake specificati ons. . . . . . . . . . . . . . . . . . . . . . . . . . . 73 7-1 motor application states. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 7-2 dsp56f805evm jumper sett ings . . . . . . . . . . . . . . . . . . . . . 108 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 drm031 ? 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 . . . drm031 ? rev. 0 designer reference manual motorola introduction 15 designer reference manual ? 3-ph . sr motor control with encoder section 1. introduction 1.1 contents 1.2 application benefit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.3 motorola dsp advantages and features . . . . . . . . . . . . . . . . . 16 1.2 application benefit this designer refe rence manual describes t he design of an advanced 3-phase switched reluct ance (sr) motor drive. it is based on motorola?s dsp56f80x fa mily dedicated for motor control devices. sr motors are gaining wider popularity among va riable speed drives. this is due to their simple low-cost construction characterized by an absence of magnets and roto r winding, high level of performance over a wide range of sp eeds, and fault-tolerant pow er stage design. for numerous applications, availability and a moderate cost of the necessary electronic components, the sr drives make a viable alternative to other commonly us ed motors like ac, bldc, pm synchronous or universal motors. the concept of this application is an advanced speed closed loop sr drive with encoder position sensor. an inner current loop with pi controller is included. t he encoder position sensor provides an accurate measurement of the actual roto r position necessary for proper commutation. this application serv es as an example of an advanced sr motor control. the appl ication helps to start the development of the advanced sr drive dedicated to the targeted application. this designer reference m anual includes a description of motorola dsp features, basic sr motor theory, system design concept, hardware 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 drm031 ? rev. 0 16 introduction motorola implementation, and so ftware design including a use of the software visualization tool. 1.3 motorola dsp ad vantages and features the motorola dsp56f80x family is well suited for digita l motor control, combining a dsp?s com putational ability with an mcu?s controller features on a single chip. these d sps offer many dedicated peripherals like a pulse-width-modul ation (pwm) unit, analog- to-digital converter (adc), timers, communications periphe rals (sci, spi, can), on-board flash and ram. general ly, all family members are well-suited for switched reluctance motor control. one typical member of the fami ly, the dsp56f805, provides the following peripheral blocks: two pulse width modulator m odules (pwma and pwmb), each with six pwm outputs, three curr ent sense inputs, and four fault inputs; fault tolerant design with deadtime insertion; supports both center- and edge- aligned modes twelve bit, analog to digital converters (adcs), supporting two simultaneous conversions with dual 4-pin mult iplexed inputs; the adc can be synch ronized by pwm two quadrature de coders (quad dec0 and quad dec1), each with four inputs, or two ad ditional quad timers a and b two dedicated general purpose quad timers totalling 6 pins: timer c with 2 pins and timer d with 4 pins can 2.0 a/b module with 2-pin po rts used to transmit and receive two serial communications inte rfaces (sci0 and sci1), each with two pins, or four additional gpio lines serial peripheral interf ace (spi), with confi gurable 4-pin port, or four additional gpio lines computer operating proper ly (cop) watchdog timer two dedicated exter nal interrupt pins 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 motorola dsp advantages and features drm031 ? rev. 0 designer reference manual motorola introduction 17 fourteen dedicated general pu rpose i/o (gpi o) pins, 18 multiplexed gpio pins external reset pin for hardware reset jtag/on-chip emulation (once) software-programmable, phas e-locked-loop-based frequency synthesizer for the dsp core clock the most interestin g peripherals, from the sw itched reluctance motor control point of view, are the fast analog-to-digital converter (adc) and the pulse-width-modul ation (pwm) on-chip modules. they offer extensive freedom of configuration, enabling efficient control of sr motors. the pwm module incorporates a pwm generator, enabling the generation of control si gnals for the motor power stage. the module 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 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 drm031 ? rev. 0 18 introduction motorola 15 bits of resolution half-cycle reload capability integral reload rates from 1 to 16 individual software-controlled pwm output programmable fault protection polarity control 20ma current sink c apability on pwm pins write-protectable registers the sr motor control application ut ilizes the pwm module set in independent pwm mode, permitting fully in dependent generation of control signals for all switches of th e power stage. in add ition to the pwm generators, the pwm outputs can be cont rolled separately by software, allowing the setting of the control sig nal to logical 0 or 1. thus, the state of the control signals can be changed instantly at a given rotor position (phase commutation) wi thout changing the content s of the pwm value registers. this change can be made asynchronously with the pwm duty cycle update. the analog-to-digital converter (adc) consists of a digital control module and two analog sample and hol d (s/h) circuits. it has the following features: 12-bit resolution maximum adc clock frequency is 5mhz with 200ns period single conversion time of 8.5 adc clock cycles (8.5 x 200 ns = 1.7 s) additional conversion time of 6 adc clock cycles (6 x 200 ns = 1.2 s) eight conversions in 26.5 adc clock cycl es (26.5 x 200 ns = 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 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 motorola dsp advantages and features drm031 ? rev. 0 designer reference manual motorola introduction 19 ability to sequentially scan and store up to eight measurements ability to simultaneously sa mple and hold two inputs optional interrupts at end of sc an at zero crossing or if an out-of-range limit is exceeded optional sample correction by subtracting a pre-programmed offset value signed or unsigned result single ended or di fferential inputs the application utilizes t he adc on-chip module in simultaneous mode and sequential scan. the sampling is synchronized with the pwm pulses for precise sampling and recons truction of phase currents. such a configuration allows in stant conversion of the desired ana log values of all phase currents, vo ltages and temperatures. 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 drm031 ? 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 . . . drm031 ? rev. 0 designer reference manual motorola target motor theory 21 designer reference manual ? 3-ph . sr motor control with encoder section 2. target motor theory 2.1 contents 2.2 switched reluctance motor . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.3 mathematical description of sr motor . . . . . . . . . . . . . . . . . . . 24 2.4 digital control of sr moto r . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 2.5 voltage and current control of sr motors . . . . . . . . . . . . . . . . 30 2.2 switched reluctance motor a switched reluctance (sr) motor is a rotating electric machine where both stator and rotor have salient poles. the stat or winding is comprised of a set of coils, each of which is wound on one pole. the rotor is created from lamination in order to mi nimize the eddy-current losses. sr motors differ in the number of phases wound on the stator. each of them has a certain number of suitable combinations of stator and rotor poles. figure 2-1 illustrates a typical 3- phase sr motor with a 6/4 (stator/rotor) pole configuration. 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 drm031 ? rev. 0 22 target motor theory motorola figure 2-1. 3-pha se 6/4 sr motor the motor is excited by a sequence of current pulses applied at each phase. the individual phas es are consequently e xcited, forcing the motor to rotate. the current pulses n eed to be applied to the respective phase at the exact rotor position relati ve to the excit ed phase. when any pair of rotor poles is exactly in line with the stat or poles of the selected phase, the phase is said to be in an al igned position, i.e ., the rotor is in the position of maximal stator inductance (see figure 2-1 ). if the interpolar axis of the rotor is in-li ne with the stator po les of the selected phase, the phase is said to be in an unaligned position - t he rotor is in a position of minimal stat or inductance. the induct ance profile of sr motors is triangular s haped, with maximum induct ance when it is in an aligned position and minimum inductance when unaligned. figure 2-2 illustrates the idealized triangular-like inductance profile of all three phases of an sr motor with phase a highlighted. the in dividual phases a, b, and c are shift ed electrically by 120 o relative to each other. the interval, when the respec tive phase is powered, is called the dwell angle - dwell . it is defined by the turn-on on and the turn-off off angle. stator (6 poles) rotor (4 poles) stator winding aligned position phase a phase b phase c on phase 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 . . . target motor theory switched reluctance motor drm031 ? rev. 0 designer reference manual motorola target motor theory 23 when the voltage is appl ied to the stator phase, the motor creates torque in the direction of increasing induc tance. when the phase is energized in its minimum inductanc e position, the rotor mo ves to the forthcoming position of maximal inductance. the movement is defined by the magnetization characteristi cs of the motor. a typica l current profile for a constant phase voltage is shown in figure 2-2 . for a constant phase voltage the phase current has its maximum in the posit ion when the inductance starts to increase. this corresponds to the position when the rotor and the stator poles start to ov erlap. when the phase is turned off, the phase current falls to zero. the phase current present in the region of decreasing induct ance generates negative torque. the torque generated by the motor is controlled by th e applied phas e voltage and by the appropriate definiti on of switching turn-on and turn-off angles. for more details, see miller, t.j.e., switched reluctance motors and their control . as is apparent from the description, the sr motor requi res the position feedback for motor phase commutation. in many cases, this requirement is addressed by using position sensors, like encoders, hall sensors, etc. the result is that the implementation of mechan ical sensors increases costs and decreases system reliabili ty. traditionally, developers of motion control products have atte mpted to lower system costs by reducing the number of sensors. a variety of algorithms for sensorless control have been devel oped, most of which in volve evaluation of the variation of magnetic circuit paramet ers that are dependent on the rotor position, see an1912/d of motorola inc. 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 drm031 ? rev. 0 24 target motor theory motorola figure 2-2. ph ase energizing the motor itself is a low cost ma chine of simple construction. high-speed operation is possible, thus the motor is suitable for high speed applications, like vacuum cleaner s, fans, white goods, etc. as discussed above, the disadvantage of the sr motor is the need for shaft-position information for the proper switching of individual phases. also, the motor structure causes no ise and torque ripple. the greater the number of poles, the smoot her the torque ripple, but motor construction and control electronics become more expensive. torque ripple can also be reduced by advanced control tec hniques, such as phase current profiling. 2.3 mathematical description of sr motor an sr motor is a highly non-linear system, so a non-li near theory describing the behavior of the motor was dev eloped. based on this theory, a mathematical model can be created. on one hand, it enables the simulation of sr moto r systems, and on the ot her hand, it makes the unaligned stator phase a rotor l a phase a energizing aligned aligned on_pha off_pha position / time position / time dwell i pha l b l 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 . . . target motor theory mathematical description of sr motor drm031 ? rev. 0 designer reference manual motorola target motor theory 25 development and implementation of sophisticated algorithms for controlling the sr motors easier. the electromagnetic circuit of t he sr motor is characterized by non-linear magnetization. figure 2-3 illustrates a magnetization characteristic for a sp ecific sr motor. it is a function between the magnetic flux , the phase current i and the motor position . the influence of the phase current is mo stly apparent in t he aligned position, where saturation effe cts can be observed. the magnetization characteristics cu rve defines the non- linearity of the motor. the torque generated by the motor phase is a function of the magnetic flux, therefore the phase torque is not constant for a constant phase current for different motor pos itions. this creates torque ripple and noise in the sr motor. figure 2-3. magnetization ch aracteristics of sr motor a mathematical model of an sr motor can be developed. the model is based on the electrical di agram of the motor, in corporating the phase resistance and phase inductanc e. the diagram for one phase is illustrated in figure 2-4 . 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 drm031 ? rev. 0 26 target motor theory motorola figure 2-4. electrical diagr am of one sr motor phase according to figure 2-4 , any voltage applied to a phase of the sr motor can be described as a sum of voltage drops in the phase resistance and induced voltages on the phase inductance: (eq 2-1.) where: u ph is the voltage applied to a phase r ph is the phase resistance i ph is the phase current u lph is the induced voltage over the phase inductance. the equation (eq 2-1.) supposes that all p hases are independent and have no mutual influence. the induced voltage u lph is defined by the m agnetic flux linkage ph , that is a function of the phase current i ph and the rotor position ph . so the induced voltage can be expressed as: (eq 2-2.) u ph i ph r ph l ph =f( ) u ph t () r ph i ph t () ? u lph t () + = u lph t () d ph i ph ph , () dt ---------------------------------- - ph i ph , ph () ? i ph ? ---------------------------------- - i ph d t d -------- - ? ph i ph ph , () ? ph ? ---------------------------------- - ph d t 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 . . . target motor theory mathematical description of sr motor drm031 ? rev. 0 designer reference manual motorola target motor theory 27 then the phase voltage c an be expressed as: (eq 2-3.) or: (eq 2-4.) where: is the angular speed of the motor. the torque m ph generated by one phase can be expressed as: (eq 2-5.) the mathematical model of an sr motor is then represented by a system of equations, describing the conversion of electromechanical energy. for 3-phase sr moto rs the equation (eq 2-4.) can be expanded as follows: (eq 2-6.) (eq 2-7.) (eq 2-8.) where a , b , c index the individual phases. as stated in the above equations, the mutual e ffect between individual phases is not considered. u ph t () r ph i ph t () ? d ph i ph ph , () dt ---------------------------------- - + = u ph t () r ph i ph t () ? ph i ph ph , () ? i ph ? ---------------------------------- - i ph d t d -------- - ? ph i ph ph , () ? ph ? ---------------------------------- - ? ++ = m ph ph i ph ph , () ? ph ? ---------------------------------- -i ph d 0 i ph = u a t () r a i a t () ? a i a a , () ? i a ? -------------------------- - i a d t d ------ ? a i a a , () ? a ? -------------------------- - ? ++ = u b t () r b i b t () ? b i b b , () ? i b ? --------------------------- i b d t d ------ - ? b i b b , () ? b ? --------------------------- ? ++ = u c t () r c i c t () ? c i c c , () ? i c ? -------------------------- - i c d t d ------ ? c i c c , () ? 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 . . . target motor theory designer reference manual drm031 ? rev. 0 28 target motor theory motorola 2.4 digital control of sr motor the sr motor is driven by voltage strokes coupled with the given rotor position. the profile of the phase curr ent together with the magnetization characteristics define the generated to rque and thus the speed of the motor. due to this fa ct, the motor requires electronic control for operation. several power stage t opologies are being implemented, according to the number of moto r phases and the de sired control algorithm. the particular structure of the sr power stage structure defines the freedom of control for an individual phase. a power stage with two independent pow er switches per motor phase is the most used topology. such a pow er stage for 3-phase sr motors is illustrated in figure 2-5 . it permits control of th e individual phases fully independent of each other and thus allows the wides t freedom of control. other power stage topologi es share some of the power devices for several phases, thus saving on power stage cost, but wi th these, the phases cannot be controlled fully independently. note, that this particular topology of sr power stage is f ault tolerant, in contrast to power stages of ac i nduction motors, becaus e it eliminates the possibility of a rail- to-rail short circuit. during normal operation, the electr omagnetic flux in sr motor is not constant and must be built for every stroke. in the motoring period, these strokes correspond to the rotor po sition when the rotor poles are approaching the corresponding stator pole of the e xcited phase. in case of phase a, shown in figure 2-1 , the stroke can be established by activating the switches q1 and q2. at low-speed operation the pulse width modulation (pwm ), applied to the corresponding switches, modulates the voltage level. two basic switching techniques can be applied: soft switching - where one transisto r is turned on during the whole commutation period and pwm is applied to the other one hard switching - where pwm is applied to both transistors simultaneously 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 sr motor drm031 ? rev. 0 designer reference manual motorola target motor theory 29 figure 2-5. 3-phase sr power stage figure 2-6 illustrates both soft and ha rd switching pwm techniques. the control signals for upper and lower s witches of the above-described power stage define t he phase voltage and thus the phase current. the soft switching technique generates lower current ripple compared to the hard switching technique. also, it produces lowe r acoustic noise and less emi. therefore, so ft switching techniques are often pr eferred for motoring operation. phase b dc voltage d1 pwm_q6 q3 q4 q6 d1 d2 pwm_q5 pwm_q1 pwm_q4 + cap gnd phase a q2 q5 pwm_q2 d2 pwm_q3 d2 d1 q1 phase 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 . . . target motor theory designer reference manual drm031 ? rev. 0 30 target motor theory motorola figure 2-6. soft swit ching and hard switching 2.5 voltage and current control of sr motors a number of control techni ques for sr motors exist. they differ in the structure of the contro l algorithm and in positio n evaluation. two basic techniques for controlling sr motors can be distinguished, according to the motor variables that are being controlled: voltage control - where phase voltage is a controlled variable current control - where phase current is a c ontrolled variable stator poles rotor poles unaligned aligned turn on turn off inductance phase voltage phase current unaligned aligned turn on turn off soft switching hard switching position position upper switch lower switch pwm pwm pwm +v dc +v dc -v dc -v dc 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 voltage and current control of sr motors drm031 ? rev. 0 designer reference manual motorola target motor theory 31 2.5.1 voltage cont rol of an sr motor in voltage control techni ques, the voltage applied to the motor phases is constant during the complete samplin g period of the s peed control loop. the commutation of the p hases is linked to the position of the rotor. the voltage applied to the phase is directly controlled by a speed controller. the speed controller processes the speed error, the difference between the desired s peed and the actual speed, and generates the desired phase voltage. the phase voltage is defined by a pwm duty cycle implemented at the dc-bus voltage of the sr inverter. the phase voltage is constant during a complete dwell angle. the technique is il lustrated in figure 2-7 . the current and the voltage profiles can be seen in figure 2-8 . the phase current is at its peak at the position when the in ductance starts to increase (stator and rotor poles start to overlap) due to ch ange in the inductance profile. . figure 2-7. volt age control technique speed controller pwm generator desired pwm output duty cycle controller actual error power stage on 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 . . . target motor theory designer reference manual drm031 ? rev. 0 32 target motor theory motorola figure 2-8. voltage control techni que - voltage and current profiles 2.5.2 current contro l of an sr motor in current control techni ques, the voltage applied to the motor phases is modulated to reach the desired current at the powered phase. for most applications, the desired current is constant during the complete sampling period of t he speed control loop. the commutation of the phases is linked to the position of the rotor. the voltage applied to the phase is con trolled by a current controller with an external speed cont rol loop. the speed controller processes the speed error, the difference between the desired speed and the actual speed, and generates t he desired phase current. t he current controller evaluates the difference between ac tual and desired phase current and calculates the appropriate pwm du ty cycle. the phase voltage is defined by a pwm duty cycle implemented at the dc-bus voltage of the l on off position / time position / time i ph - u dc-bus u dc-bus *pwm pwm = speed controller output u ph phase current decays through the fly back diodes l on off position / time position / time i ph - u dc-bus u dc-bus *pwm pwm = speed controller output u ph phase current decays through the fly back diodes 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 voltage and current control of sr motors drm031 ? rev. 0 designer reference manual motorola target motor theory 33 sr inverter. thus, the phase voltage is modulat ed at the rate of the current control loop. this te chnique is illustrated in figure 2-9 . the processing of the current contro ller needs to be linked to the commutation of the phases. when the phase is turned on (commutated), a duty cycle of 100% is applied to the phase. th e increasing actual phase current is regularly compared to the desired curr ent. as soon as the actual current slightly exce eds the desired curr ent, the current controller is turned on. current cont roller controls the output of the duty cycle until the phase is turned off (followin g commutation). the procedure is repeated fo r each commutation cycl e of the motor. the current and the voltage profiles can be seen in figure 2-10 . in ideal cases, the phase current is contro lled to follow t he desired current. figure 2-9. current control technique speed controller pwm generator desired pwm output duty cycle controller actual error power stage on off - i actual i error - current controller i desired 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 drm031 ? rev. 0 34 target motor theory motorola figure 2-10. current control techni que - voltage and current profiles l on off position / time position / time i ph - u dc-bus u dc-bus pwm = 100% pwm = current controller output i desired u ph phase current decays through the fly back diodes l on off position / time position / time i ph - u dc-bus u dc-bus pwm = 100% pwm = current controller output i desired u ph phase current decays through the fly back diodes 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 . . . drm031 ? rev. 0 designer reference manual motorola switched reluctance motor control techniques with encoder position sensor 35 designer reference manual ? 3-ph . sr motor control with encoder section 3. switched reluctance motor control techniques with encoder position sensor 3.1 contents 3.2 encoder sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 3.3 commutation angle calculat ion . . . . . . . . . . . . . . . . . . . . . . . . 37 3.4 commutation strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39 3.5 current controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41 3.2 encoder sensor whenever mechanical rotary motions have to be monitored, the encoder is the most important interface bet ween the mechanics and the control unit. encoders transform rotary or linear movement into a sequence of electrical pulses. a rotary encoder c an differentiate a number of discrete positions per revoluti on. the number of s egments determines the resolution of the movement and henc e the accuracy of the position and this number is called points-per-rev olution. the spe ed of an encoder is in counts-per-second. although there are various kinds of digital encoders, the most common one is the optical encode r. rotary and linear op tical encoders are used frequently for motion and position sens ing. a disc or a plate containing opaque and transparent se gments passes between a light source (such as led) and detector to interrupt a light beam. th e electronic signals that are generated are t hen fed into the dsp con troller where position and velocity information is calc ulated based upon the signals received. many incremental encoders also hav e a feature called the index pulse. in rotary encoders, an in dex pulse occurs once per encoder revolution. it is used to establish an absolute mechanical reference position within one encoder count of the 360 encoder rotation. the index signal can be used to do several tasks in the system. it can be us ed to reset or preset 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 . . . switched reluctance motor control techniques designer reference manual drm031 ? rev. 0 36 switched reluctance motor control techniques with encoder position sensor motorola the position counter and/ or generate an interrupt signal to the system controller. figure 3-1. quadrat ure encoder signals quadrature encoders are a pa rticular kind of incr emental encoder with at least two output si gnals, generally called p hase a and phase b. as seen in figure 3-1 , channel b is offset 90 degrees from channel a. the addition of a sec ond channel provides direct ion information in the feedback signal. this signal, leading or lagging by 90 electrical degrees, guarantees the exact determination of the direction of rotation at all times. the ability to detect direction is critical if encoder rotation stops on a pulse edge. without the ability to decod e direction, th e counter may count each transition through the rising edge of the signal and lose position. another benefit of the quadrat ure signal scheme is the ability to electronically multiply the count s during one encoder cycle. in the times-1 mode, all counts are gener ated on the rising edges of channel a. in the times-2 mode, both the risi ng and falling edges of channel a are used to generate counts. in the times-4 mode , the rising and falling edges of channel a and channel b ar e used to generate counts. this increases the resolution by a factor of four. fo r encoders with sine wave output, the channels may be interpol ated for very high resolution. phase a phase b time 90 el phase a phase b time 90 el 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 . . . switched reluctance motor control techniques with encoder position sensor commutation angle calculation drm031 ? rev. 0 designer reference manual motorola switched reluctance motor control techniques with encoder position sensor 37 3.3 commutation angle calculation in an sr motor, the switched-on and switc hed-off angles are complex functions of many parameters and ar e variable for opt imum operation. their fine tuning is necessary to ma intain optimum performance at different motor speed and load condit ions. the control of firing angle can be accomplished in a number of ways and strongly depends on position sensor. if the position information is precisely acquired, it is possible to suitably utilize a soph isticated algorithm. this control technique varies the firi ng angle continuously with the fixed dwell angle. the switched-on angle is ca lculated in such a way that the excitation current should reach t he maximum defined value at the beginning of the stator and rotor tooth overlap. the phase current is built up in corresponding windings of the stator since t he inductance is at a minimum level in an unaligned positio n and there is adequate time to increase it to the desired value be fore the motoring torque is being produced. the conduction angle remain s fixed through the entire run of the application to ensure the phase current is decreased before reaching the braking region (follo wing the aligned position). the calculation neglects the stator windi ng resistance, which si mplifies the equation. the resistance neglect ca n be recognized only at large values of resistance r, which is the case of very small switched reluctance machines. figure 3-2 explains the proposed algorithm for advance angle calculation. the computat ion method is derived from (eq 2-6.) - (eq 2-8.) and is rearranged into t he following expression as: (eq 3-1.) where: u ph is the voltage applied to a phase r ph is the phase resistance i ph is the phase current l ph is the phase inductance is the rotor position u ph r ph i ph l ph di ph dt --------- ? i ph dl ph 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 . . . switched reluctance motor control techniques designer reference manual drm031 ? rev. 0 38 switched reluctance motor control techniques with encoder position sensor motorola figure 3-2. commutat ion angle calculation the unaligned phase induct ance is considered as constant near the turn-on instant. if voltage drop across phase resistance is neglected, then the following expre ssion is given as (eq 3-2.) using a first order approximation: (eq 3-2.) where: on is the advance angle i desired is the desired current to be achieved l unaligned is the unaligned inductance u phase is the applied phase voltage actual is the actual rotor speed position / time i phase i desired on 0 100% pwm u applied l unaligned position / time position / time i phase i desired on 0 100% pwm u applied l unaligned on l unaligned i desired u ph --------------- actual ?? = 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 . . . switched reluctance motor control techniques with encoder position sensor commutation strategy drm031 ? rev. 0 designer reference manual motorola switched reluctance motor control techniques with encoder position sensor 39 3.4 commutation strategy in general, the co mmutation strategy determi nes the performance of the sr motor. the commutat ion method uses rotor position feedback to derive the commutating signals for t he inverter switches. the controlled parameters are the applied phas e voltage and the turn-on angle on . the dwell angle is fixed prior to th e motor starts. the number of commutations per mechanical revoluti on is proportional to the number of rotor poles and number of stator phases (eq 3-3.) . it arises from the mechanical constructi on of the sr motor. the number of motor commutations is calculated as follows: (eq 3-3.) where: numofcommut is the number of commutations per one mechanical revolution n r is the number of rotor poles m is the number of stator phases an sr motor is usually described in terms of low-sp eed and high-speed regions. the low-speed operating r egion is graphically depicted in figure 3-3 . in this low-speed operating ar ea, the phase current can be arbitrarily controlled to any desir ed value. increasing the rotor speed makes it difficult to control the phase current. there is an influence of back-emf effect combined with a dimi nishing amount of time to perform the commutation. numofcommut n r m ? = 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 . . . switched reluctance motor control techniques designer reference manual drm031 ? rev. 0 40 switched reluctance motor control techniques with encoder position sensor motorola figure 3-3. commutation strategy the commutation itself can be performed in a number of ways. the presented control technique utilizes the encoder sensor information to initiate the commutation routine, which ensures tu rn-off of the previous stator phase, and consecutively the next stator phase is turned on depending on the direct ion of the rotor rotation. the approp riate firing angle, on , is calculated through advanc e angle calculation (see section 3.3 ). the commutation software algorithm determines the necessary advance angle, advance , for turning on the correct stator phase. in the advance instant, full dc-bus voltage is applied after switching on the correc t phase. if actual val ue of the phase current exceeds desired current val ue then the current contro ller with sufficient controller initialization is started to maintain actual value of the phase current within the reque sted magnitude. this is achieved by chopping the dc-bus voltage. position / time i ph i desired off edge on advance 0 360 -u dc-bus u dc-bus pwm = 100% pwm = current controller output u applied i desired reached current actual inductance estimated inductance position / time position / time i ph i desired off edge on advance 0 360 -u dc-bus u dc-bus pwm = 100% pwm = current controller output u applied i desired reached current actual inductance estimated inductance current actual inductance estimated inductance 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 . . . switched reluctance motor control techniques with encoder position sensor current controller drm031 ? rev. 0 designer reference manual motorola switched reluctance motor control techniques with encoder position sensor 41 the simplest scheme is to leave t he lower transistor on during current regulation and to swit ch the upper one on and of f at a high fixed pwm frequency with a varying duty cycle. this strategy is often called soft switching (see figure 2-6 ). the current waveform during soft switching is similar to that shown in figure 3-3 . 3.5 current controller basically, there are thr ee different modes of oper ation, namely, voltage control, current control, and single- pulse control. the current control method is normally us ed to control the tor que efficiently, while single-pulse mode is ente red for high-speed operation. major difficulty, when designing switched reluctance motor current controllers, is that the winding back electromotive force ( back-emf) and the electrical time constant vary significantly within one electrical cycle and with the motor speed and the phase cu rrent level. the voltage equation of the srm is given by (eq 2-4.) . this equation indi cates a non-linear model, which is dependent on position, curr ent and speed. the electr ical time constant of a phase winding and the back-emf vary greatly with current and rotor position. as figure 3-3 implies, the current controll er is switched on when the desired stator phase curr ent is reached. at th is point, the slope of increasing inductance (inductance derivation over position) is considered as a constant value, and the phase cu rrent is preserved at a defined target value; then (eq 2-4.) can be rearranged as follows: (eq 3-4.) the applied phase voltage is roughly ma intained near the value of (eq 3-4.) , where i ph is the desired phase current, and is the actual angular speed of the rotor. derivation ov er the position of the corresponding phase inductance is de termined from motor parameter measurements. knowing th ese parameters, the initial current controller is set up using (eq 3-4.) in the time instance (see the red point in figure 3-4 ) when the controlle r is switched on. u phase_applied t () r ph i ph t () ? i ph t () dl ph ph () d ph ------------------------ ?? + = 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 . . . switched reluctance motor control techniques designer reference manual drm031 ? rev. 0 42 switched reluctance motor control techniques with encoder position sensor motorola figure 3-4. phase voltage generation position / time -u dc-bus u dc-bus pwm = 100% pwm = current controller output u applied i desired reached u applied position / time position / time -u dc-bus u dc-bus pwm = 100% pwm = current controller output u applied i desired reached u 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 . . . drm031 ? rev. 0 designer reference manual motorola system description 43 designer reference manual ? 3-ph . sr motor control with encoder section 4. system description 4.1 contents 4.2 system outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.3 application description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.2 system outline this system is designed to drive a 3-phase sr motor. the application meets the following perf ormance specifications: speed control of an sr motor with encoder position sensor with an inner current closed loop targeted for dsp56 f803evm, dsp56f805evm, dsp56f807evm running on a 3-phase sr hv moto r control development platform at a variable line voltage of between 115v ac and 230v ac (voltage range - 15% ... +10%) the control technique incorporates ? current srm control with speed closed loop ? motor starts from any moto r position with rotor alignment ? one direction of rotation ? motoring mode ? minimal speed 600 rpm ? maximal speed 2600 rpm at input power line 230v ac ? maximal speed 1600 rpm at input power line 115v ac encoder position reference for commutation 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 drm031 ? rev. 0 44 system description motorola manual interface (start/stop swit ch, up/down push button control, led indicator) pc master software control inte rface (motor start/stop, speed setup) power stage identification dc-bus over-voltage, dc-b us under-voltage, dc-bus over-current and over-h eating fault protection pc master software monitor ? graphical control page (required speed, ac tual motor speed, operational mode pc/m anual, start/stop status, drive fault status, dc-bus voltage level, identified po wer stage boards, system status) ? speed scope (observes actual and desired speeds) ? current controller (observes actual and desired phase current, applied phase voltage) 4.3 application description for the drive, a standard syst em concept was chosen (see figure 4-1 ). the system incorporates the following hardware parts: a 3-phase sr high-vol tage development pl atform (power stage with optoisolation board, motor brake) feedback sensors: dc-bus volt age, phase a current, phase b current, phase c current, temperature a dsp56f80x controller board 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 drm031 ? rev. 0 designer reference manual motorola system description 45 figure 4-1. system concept the dsp runs the main control algorithm. it generates 3-phase pwm output signals for the sr motor power stage a ccording to the user interface input and feedback signals. the drive can be controlled in two different ways (or operational modes): in manual operationa l mode, the required speed is set by a start/stop switch and up and down push buttons. in pc master software operationa l mode, the required speed is set by the pc master software after reset, the drive is initialized and it automatically enters manual operational mode. note, th at pc master software can only take over the 3-phase sr power stage 6 load line ac ac dc srm e speed controller speed feedback speed cmd. - dsp56f80x start stop up down pc remote control speed error sci pwm fault protection voltage current temperature current controller speed calculation commutation - mux duty cycle current cmd. current error pwm generation position feedback phase current commutation angle calculation speed feedback quad dec adc dc-bus ripple elimination desired volatge dc bus voltage 3-phase sr power stage 6 load line ac ac dc srm e speed controller speed feedback speed cmd. - dsp56f80x start stop up down pc remote control speed error sci pwm fault protection voltage current temperature current controller speed calculation commutation - mux duty cycle current cmd. current error pwm generation pwm generation position feedback phase current commutation angle calculation speed feedback quad dec adc dc-bus ripple elimination desired volatge dc bus voltage 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 drm031 ? rev. 0 46 system description motorola control when the motor is stopped. when the st art command is detected (using the start/stop switch or the pc master software ?start? button) and while no fault is pending, the start-up sequence with the rotor alignment is performed a nd the motor is started. rotor position is evaluated using an encoder position sensor. the commutation angle is calculated acco rding to the de sired speed, the desired current and the ac tual dc-bus voltage. w hen the actual position of the rotor is equal to the reference position, the commutation of the phases in the desired direction of rotation is done; the actual phase is turned off and the foll owing phase is turned on. the actual motor speed is derived from the posit ion information, so an additional velocity sensor is unneeded. the reference speed is calculated according to the control signals (start/stop switch, up/down push buttons) and pc master software commands (when controlled by the pc master software). the acce leration/deceleration ramp is implemented. the com parison between the re ference speed and the measured speed gives a speed e rror. based on the speed error, the speed controller generates the desir ed phase current. when the phase is commutated, it is turned on with a duty cycle of 100%. then, during each pwm cycle, the actual phase curr ent is compared with the desired current. as soon as the actual curr ent exceeds the desired current, the current controller is tu rned on. the current contro ller controls the output duty cycle until the phase is turned off (follo wing commutation). finally, the 3-phase pwm control signals are generated. the procedure is repeated for each commutat ion cycle of the motor. dc-bus voltage, dc-bus current, and power stage temperature are measured during t he control process. the m easurements are used for dc-bus over-voltage, dc-bus under-v oltage, dc-bus over-current and over-temperature protection of the drive. the dc-bus under-voltage and the over-temperature protection are performed by software, while the dc-bus over-current and the dc-bus over-voltage fault signals utilize fault inputs of the ds p on-chip pwm module . the line voltage is measured during initiali zation of the applicati on. according to the detected level, the 115vac or 230vac mains are re cognized. if the line voltage is detected outside the -15% ... +10% range of the nominal voltage, the fault "out of the mains li mit" disables the drive operation. if 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 drm031 ? rev. 0 designer reference manual motorola system description 47 any of the above mentioned faults o ccur, the motor control pwm outputs are disabled in order to protect the drive. the fault st atus can only be exited when the fault conditions have disappea red and the start/stop switch is toggld through the stop pos ition. the fault st ate is indicated by the on-board led. the sr power stage uses a unique configurati on of power devices, different than ac or bldc configur ation. the sr software would cause the destruction of ac or bldc power sta ges due to simultaneous switching of the power devices. sinc e the application so ftware could be accidentally loaded into an ac or bldc drive, t he software incorporates a protection feature to prevent th is could happen. each power stage contains a simple module which ge nerates a logic si gnal sequence that is unique for that type of power stage. duri ng the initialization of the chip, this sequence is read and evaluated according to the decoding table. if the correct sr power sta ge is not identified, th e fault, "wrong power stage", disables t he drive operation. 4.3.1 initializa tion and start-up before the motor can be started, the rotor alignment and initialization of the control algorithms must be performed (see figure 4-2 ) since the absolute position is not known. 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 drm031 ? rev. 0 48 system description motorola figure 4-2. start-up sequence first, the rotor needs to be aligned to a known position to be able to start the motor in the desired di rection of rotation. this is done in the following steps: 1. two phases are turned on si multaneously (phases b & c) 2. after 50msec, one phase is tur ned off (phase c), the other phase stays powered (phase b) 3. after an additi onal 550 msec, the rotor is stabilized enough in the turn on phases b & c wait to ensure the initial pulse turn off phase c wait 550msec measure phase resistance as an average of 32 measurements commutate phases (turn off phase b, turn on phase a) motor starts start command accepted rotor stabilized b a c b a c any rotor position { { phase b aligned turn on phases b & c wait to ensure the initial pulse turn off phase c wait 550msec measure phase resistance as an average of 32 measurements commutate phases (turn off phase b, turn on phase a) motor starts start command accepted rotor stabilized b a c b a c any rotor position { { phase b aligned 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 drm031 ? rev. 0 designer reference manual motorola system description 49 aligned position with respect to the powered phase (phase b). step 1 provides the initial impulse to the rotor. if phase b is exactly in an unaligned position and thus does not generate any torque, phase c provides the initial movement. then , phase c is disco nnected and phase b stays powered (step 2) . the stabilization pulse to phase b must be long enough to stabilize the rotor in the aligned positi on with respect to that phase. in total, the stabi lization takes 1 sec. after th is time, the rotor is stable enough to reliably start the motor in the desired direction of rotation. 4.3.2 position and speed sensing the position information is used to generate accurate s witching instants of the power converter, ensuring drive stability and fast dynamic response. velocity feedba ck is derived from the position information, so that an additional velocity sensor is unneeded. all members of the motorola dsp56f80x family, exce pt for the 56f801, have an on-chip quadrature decoder modul e connected to a quadrat ure timer. this peripheral is commonly used for position and speed sensing. the quadrature decoder position count er counts up/down each edge of phase a and phase b signals acco rding to their order (see figure 4-3 ). the phase a and the phase b inputs of the dsp co ntroller are routed through a switch matrix to a general purpose ti mer module and quadrature decoder module as well (see figure 4-4 ). the timer module can use all four available inputs as normal timer input capture channels. this does not preclude a use of the quadrature dec oder module. both timer and decoder take an adv antage of the digital filter incorporated in the quadrature decoder module. figure 4-3. quadr ature encoded signals 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 drm031 ? rev. 0 50 system description motorola the presented application uses th e quad decoder module approach for speed measurement using a 16-bit position difference counter. the counter acts as a different iator, whose count value is proportional to the change in position, since the last ti me the position coun ter was read. the speed can be computed by calculat ing the change in the position counter per unit time, or by reading the position difference counter register (posd) and calculating the speed. the second method is employed in this applicat ion for the rotor speed measurement and also as a feedback signal to the speed controller. the position difference register (posd) is r egularly scanned at the pr e-defined time period and consecutively this value is used to compute the act ual rotor speed. in addition, quadratur e decoder module 0 shares pins with quadrature timer module a. if the shared pins are not confi gured as timer outputs, then the pins are ava ilable for use as i nputs to the quad decoder modules. the quad timer m odule contains four i dentical counter/timer groups. due to wide variability of quad timer modules, it is possible to use this module to de code quadrature encoder signals and to sense the position and the speed as well. the presented application uses the configuration arranged for position sensing and commutation instance determination. the quad timer a0 and the quad timer a1 decode primary and secondary external inputs as quad-encoded signal s generated by the rotary sensor to monitor movem ent of the motor shaft. quad signal decoding provides both count and directi on information. the a0 timer is programmed to count up to a progr ammed value that corresponds to one electric revolution and then immediately to re-initialize after the terminal count value is reached. this a0 timer is assi gned as a master and broadcast compares signals to quad timer, a1. the a1 timer is configured to be re-initialized to a predetermined value when a master timer?s compare event occurs. th is counter continues repeatedly counting past the compare value. w hen the count matches the compare value, an interrupt is en abled and the co mpare register 2 value is used for commutation inst ances generation. 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 drm031 ? rev. 0 designer reference manual motorola system description 51 figure 4-4. decoder a nd timer arrangement 4.3.3 commutation algorithm the sr motor commutati on strategy uses roto r position feedback to drive the commutatin g signals for the in verter switches. the core of the control algorithm includes the calculation of t he commutation angle, and phases commutation. the calculat ion of the commutation angle is performed according to (eq 3-2.) . it is calculated regularly during motor operation. the commutation algorithm is described in figure 4-5 . after the finish of the start-up routine, which incl udes the alignment procedure and initialization of the ne cessary commutation va riables, the rotor is sufficiently stabilized an d is ready for run mode. this is the point from which the commutation r outine has to start. th e first procedure of the commutation routine is to turn on the correspondi ng phase. choosing the correct phase to switch it on d epends on the defined rotation of the rotor. the turn on angle is at the unal igned position, and the current rises linearly until the poles begin to overlap. in a regular switched reluctance moto r, the angle of ri sing inductance is half of the pole-pitch. the pole-pitch is the angle of rotation between two not used edge detect state machine glitch filter delay switch matrix rev counter position counter watchdog timer position difference counter phase b phase a index home timer input capture channels timer a0 timer a1 timer a3 timer a2 decoder 0 module timer a module not used edge detect state machine edge detect state machine glitch filter delay glitch filter delay switch matrix switch matrix rev counter rev counter position counter position counter watchdog timer watchdog timer position difference counter position difference counter phase b phase a index home phase b phase b phase a phase a index index home home timer input capture channels timer a0 timer a0 timer a1 timer a1 timer a3 timer a3 timer a2 timer a2 decoder 0 module timer a module 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 drm031 ? rev. 0 52 system description motorola successive aligned positions. ideally, the flux should be zero throughout the period of falling induc tance, because a current flowing in that period produces a negative (or braking) to rque. to avoid this, the dwell angle dwell can be restricted. in practice, a dwell angl e of 120 electrical degrees is usually used, because the gain in torque-impulse during the increasing inductance exceeds the sm all braking torque impulse. this condition occurs when t he current has a tail extending beyond the aligned position. the torque is negative during this tail period, but it is small. the tu rn-off angle off instant is determined. 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 drm031 ? rev. 0 designer reference manual motorola system description 53 figure 4-5. commutatio n algorithm flowchart the next step of the proposed commutat ion algorithm is to calculate the advance turn-on angle. the entire calc ulation explanation is presented in 3.3 commutation angle calculation . the firing angle on is set up for the next commutation instant. the presented commutation algorithm does not allow parallel current conduction of tw o phases at the same start turn on phase off = dwell + on on =f( , i, u, l) on > off actual > off off = on turn off phase actual > on no yes no yes yes no start start turn on phase turn on phase off = dwell + on off = dwell + on on =f( , i, u, l) on =f( , i, u, l) on > off on > off actual > off actual > off off = on off = on turn off phase turn off phase actual > on actual > on no yes no yes 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 . . . system description designer reference manual drm031 ? rev. 0 54 system description motorola time. the angle comparison of turn-on on and turn-off off assures that the current phase is turned off befor e the following phase is turned on. in the case of 120-electrical-degr ee dwell angle, the switching on and switching off are performed simult aneously. if the conduction (dwell) angle is restricted, the tu rning off overtakes turnin g on, as is clear in figure 4-5 . the comparison actual > off block waits for an appropriate position to commutate off the corres ponding stator phas e, and in the next comparison actual > on block the algorithm re mains the same until the proper position occurs to switch on the follow ing stator phase. the algorithm loop is closed and ready fo r other commutation occurrences. 4.3.4 current controller implementation the current controller util ization flowchart reveal s the algorithm process of the controller switch ing. if the appropriate stator phase is turned on, the dc-bus voltage is applied to the corres ponding rotor phase. the phase current rises almost linearly until a predefined target value is attained. at this point, by proc essing of the propos ed algorithm, the current controller is switched on and ma intains the actual current flowing within the desired value. before the current contro ller is switched on, the necessary initialization is required. it is mainly concerned with the integral portion in the k-1 step of the current pi controller. this part of the controller structure is preset according to equation (eq 3-4.) . the following commutation instance turns the controller fl ag off so the corresponding rotor phase is fully voltage loaded until reaching the de sired value of phase current. figure 4-6 clarifies the entire c ontroller usage algorithm. 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 drm031 ? rev. 0 designer reference manual motorola system description 55 figure 4-6. current controller utilization 4.3.5 current and voltage measurement precise measurement of phase curr ent and dc-bus voltage is a key factor for current control implementation. 4.3.5.1 current sensing current measurement needs to be in vestigated according to the used current sensors and the influence of the noise on the measurement. start controller off commutate ? controller off ? yes no i phase >i desired no no yes u applied =u_dc_bus controller on controller init u applied = controller yes start start controller off controller off commutate ? commutate ? controller off ? controller off ? yes no i phase >i desired i phase >i desired no no yes u applied =u_dc_bus u applied =u_dc_bus controller on controller init controller on controller init u applied = controller u applied = controller yes 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 drm031 ? rev. 0 56 system description motorola the quality of curr ent measurement depends heav ily on the type of current sensors used. t he most useful are ha ll effect sensors. unfortunately, these sensors are ex pensive and thus not suitable for most cost-sensitive applications. ther efore, current shunt resistors inserted into the current path of the phase are often implemented (see figure 4-7 ). the phase current is sensed as a voltage drop across the sense resistor. figure 4-7. shunt resi stors current sensors when the power switches? so ft switching is used (the lower switch is left on during a complete co mmutation period, whil e the upper switch is modulated by the pwm), the current is not visible on the shunt resistor all the time. the soft switching phase current, measured at the shunt resistor, is shown in figure 4-8 . the phase current is visible only when both switches are turned on (the phase current fl ows through switches and the sensing resistor) or when both switches ar e turned off (the phase current flows through t he freewheeling diodes and th e sensing resistor). when both switches of th e phase are turned on, t he measured current is negative, so it needs to be inverted. th e diagram shows that for a d1 v_ref + dc bus voltage sense sense r_sense gnd pwm_t2 t2 r1 1.65v ref op t1 r3 r4 adc phase a pwm_t1 r2 + - d2 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 drm031 ? rev. 0 designer reference manual motorola system description 57 reliable current shape reconstr uction, the sensing needs to be synchronized with the pwm frequency at the center of the pwm pulse and both positive and the negative vo ltage drop polarities should be measured. the zero current may be set to half of the a dc range, so both the positive and the nega tive voltage drops on the phase current shunt resistors can be measur ed. the voltage drop is t hen amplified according to the adc range. proce eding like this, the cu rrent can be read with accuracy and credibility. figure 4-9 illustrates the actual phase currents of a 3-phase motor, measured on the shunt re sistors as described above. the previously specified current s ensing method is de scribed from the dsp processor point of view. it se ems the measured phase current is negative, which is caused by inverting differential amplifie r. actually, the measured phase current flowing through shunt resi stor is sensed and consecutively inverted by a differentia l amplifier. 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 drm031 ? rev. 0 58 system description motorola figure 4-8. soft swit ching current sensed on adc t 1 t 2 d 1 t 2 t 1 t 2 d 1 d 2 actual phase current sensed voltage drop adc synchronization 0 0 time time time time top switch (t1) bottom switch (t2) t 1 t 2 d 1 t 2 t 1 t 2 d 1 d 2 actual phase current sensed voltage drop adc synchronization 0 0 time time time time top switch (t1) bottom switch (t2) 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 drm031 ? rev. 0 designer reference manual motorola system description 59 figure 4-9. phase cu rrent measured at curr ent shunt resistors the low-cost shunt resistor sensors create one seri ous issue. due to the low-voltage drop sensed across the shunt current resistors, the measured signals are su sceptible to noise. a technique for noise eliminati on has been developed and successfully implemented. the technique is based on the assumption that the same noise is induced simult aneously on all measured signals. the method supposes the measurement of two signals simultaneously, one known signal (a reference) and one signal to be measured. then the reference signal consists of a known signal and noise, while t he measured signal consists of an actual si gnal and the same noise. measuredsignal = act ualsignal + noise (eq 4-1.) referencesignal = knownsignal + noise (eq 4-2.) if the noise is the same , it can be eliminated by subtraction of the reference signal from the measured signal. as described above, the necessary condition is the simu ltaneous sampling of both signals, ensuring that the noise on both signals is identical. actualsignal = measuredsignal - referencesignal +knownsignal(eq 4-3.) current sensing -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0 0.010.020.030.040.05 time [sec] phase current [a] phase a phase b phase 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 . . . system description designer reference manual drm031 ? rev. 0 60 system description motorola this technique has been implemente d for phase current sensing. the sr motor is controlled in a way in which the phases are commutated sequentially, which means that when the working phas e is turned off, the following phase, in the direction of ro tation, is turned on. thus one phase of the motor is never powered during a complete commutation interval. this phase is considered as a refe rence. because the reference phase is not powered, the refe rence phase current shoul d be equal to zero. the measured value of the reference current c an be then considered as noise for a given commutation interval . the actual phase current is equal to the difference betw een the measured curr ent and the reference current: i ph = i sensed - i reference (eq 4-4.) the reference signal needs to be co mmutated toget her with the commutation of the phases. table 4-1 defines the active, discharge and reference phases for the commutation sequence c - b - a - c. it is derived from figure 4-9 . the efficiency of the cu rrent sensing noise reduction technique is illustrated in figure 4-10 . the figures illustrate th e phase current as it is measured (active phase current is inverted - compared to figure 4-9 ), and the same current with the im plemented noise reduction technique. as can be seen, the implemented te chnique improves current sensing significantly. it eliminat es not only the noise on the current sensors, but also the noise induced on the sensi ng cables and the noise of the adc reference power supply. table 4-1. commutation s equence of the re ference phase step active phase discharge phase reference phase 1c a b 2b c a 3a b c 1c a b 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 drm031 ? rev. 0 designer reference manual motorola system description 61 4.3.5.2 voltage sensing the dc-bus voltage sensor is represented by a si mple voltage divider. dc-bus voltage does not change rapidly. it is nea rly constant with the ripple given by the power supply structure. if a bridge rectifier for rectification of ac line voltage is used, the ri pple frequency is two times the ac line frequency. the ripple amplitude shoul d not exceed 10% of the nominal dc-bus valu e, if the power stage is designed correctly. the measured dc-bus voltage needs to be filtered in order to eliminate noise. one of the most usef ul techniques is at movi ng average filter, that calculates an average value from the last n samples: (eq 4-5.) in order to increase the precision of the voltage sensing, the voltage drop on the power switches and on the diodes of the pow er stage can be incorporated into the det ermination of the actual voltage present in the motor phase. u dcbus u dcbus n () n1 = 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 . . . system description designer reference manual drm031 ? rev. 0 62 system description motorola figure 4-10. measure d 3-phase currents without and with implemented noise correction -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0 0.01 0.02 0.03 0.04 0.05 time [sec] current [a] i active i discharge -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0 0.01 0.02 0.03 0.04 0.05 time [sec] current [a] i active not corrected i discharge not corrected 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 drm031 ? rev. 0 designer reference manual motorola system description 63 4.3.6 power modul e temperature sensing the measured power module temperature is used for thermal protection. the hardware realization is shown in figure 4-11 . 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 a software can be used to set safe oper ating limits. in the presented application, the temperatur e in degrees celsius is calculated according to the conversion equation: (eq 4-6.) where: temp is the power module temperature in degrees celsius temp_sense is voltage drop on diodes which is measured by adc a is diode-dependent conversion constant (a = -0.0073738) b is diode-dependent conversion constant (b = 2.4596) figure 4-11. temp erature sensing topology temp temp_sense - b a ------------------------------------- - = d2 bav99lt1 +3.3v_a d1 bav99lt1 r1 2.2k - 1% adc c1 100nf 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 drm031 ? rev. 0 64 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 . . . drm031 ? rev. 0 designer reference manual motorola hardware design 65 designer reference manual ? 3-ph . sr motor control with encoder section 5. hardware design 5.1 contents 5.2 system configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 5.3 dsp56f805evm controller board . . . . . . . . . . . . . . . . . . . . . . 67 5.4 3-phase sr high-voltage power stage . . . . . . . . . . . . . . . . . . 68 5.5 optoisolation board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 5.6 motor-brake specif ications. . . . . . . . . . . . . . . . . . . . . . . . . . . .72 5.7 hardware documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 5.2 system configuration the application is designed to dr ive the 3-phase sr motor. the application is controlled by the mo torola dsp56f805 motor control dsp. it consists of the following modules (see figure 5-1 ): dsp56f805evm control board 3-ph. sr high vo ltage power stage optoisolation board 3-phase switched reluctance 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 drm031 ? rev. 0 66 hardware design motorola figure 5-1. 3-phase sr high volt age platform configuration 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 drm031 ? rev. 0 designer reference manual motorola hardware design 67 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 drm031 ? rev. 0 68 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 5.4 3-phase sr high-voltage power stage motorola?s embedded motion control se ries high-voltage (hv) switched reluctance (sr) power stage is a 180 watt (1/4 horsepower), 3-phase power stage that will op erate off of dc input vo ltages from 1 40 volts to 230 volts and ac line vo ltages from 100 volts to 240 volts. in combination with one of motorola ?s embedded motion control series control boards and an optoisolation board, it provides a software development platform that allows algorithms to be written and tested, 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 sr high-voltage power stage drm031 ? rev. 0 designer reference manual motorola hardware design 69 without the need to desi gn and build a power stage. it supports a wide variety of algorithms for control ling switched relu ctance 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 l abeled ph. a, ph. b, ph. c on the board. power requirements are met with a single external 140-volt to 230-vo lt dc power supply or an ac li ne 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 overcurrent trip point is set at 2.69 amps. the hv sr power stage has both a printed ci rcuit board and a power substrate. the printed circuit board c ontains igbt gate driv e circuits, analog signal conditioning, low-voltage pow er supplies, power fact or control circuitry, and some of large passive power components. this board also has a mc68hc705jj7 microcontroller us ed for board conf iguration and identification. all of t he power electronics that need to dissipate heat are mounted on the power substrate. this substr ate includes the power igbts, brake resistors, current-s ensing resistors, a power factor correction mosfet, and temp erature sensing diodes. table 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 drm031 ? rev. 0 70 hardware design motorola figure 5-3. 3-ph. sr hv power stage the electrical characteristics in table 5-1 apply to operation at 25c with a 160-vdc 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 board id block 3-phase sr power module drivers motor to signals to/from control board 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 optoisolation board drm031 ? rev. 0 designer reference manual motorola hardware design 71 5.5 optoisolation board motorola?s embedded motion control series optoisolation board links signals from a controller to a high-voltage power stage. the board isolates the controller , and peripherals that ma y be attached to the controller, from dangerou s voltages that are pres ent on the power stage. the optoisolation board?s ga lvanic isolation barrier also isolates control signals from high noise in the power stage and pr ovides a noise-robust systems architecture. signal translation is virtually one- for-one. gate drive signals are passed from controller to pow er stage via high-speed, high dv/dt, digital optocouplers. analog feedback signals are passed back through hcnr201 high-linearity analog optocouplers. dela y times are typically 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 drm031 ? rev. 0 72 hardware design motorola 250 ns for digital signals, and 2 s for analog signals. grounds are separated by the optocouplers? galvanic isolation barrier. both input and output connections are made via 40-pin ribbon cable connectors. the pin assignments for bo th connectors are the same. for example, signal pwm_at appears on pin 1 of th e input connector and also on pin 1 of the output connecto r. in addition to the usual motor control signals, an mc68 hc705jj7cdw serves as a serial link, which allows controller software to identify the power board. power requirements for controller side circuitry are met with a single external 12-vdc power supply. powe r for power stage side circuitry is supplied from the power stage through the 40-pi n output connector. the electrical characteristics in table 5-2 apply to operation at 25 c, and a 12-vdc power supply voltage. 5.6 motor-brake specifications the sr motor-brake set incorporates a 3-ph. srm and attached bldc motor brake. the detailed s pecifications are listed in table table 5-2. electrical characteristics of optoisolation board characteristic symbol min typ max units notes power supply voltage vdc 10 12 30 v quiescent current i cc 70 (1) 200 (2) 500 (3) ma dc/dc converter min logic 1 input voltage v ih 2.0 ? ? v hct logic max logic 0 input voltage v il ? ? 0.8 v hct logic analog input range v in 0?3.3v input resistance r in ?10?k ? analog output range v out 0?3.3v digital delay time t ddly ?0.25? s analog delay time t adly ?2? s 1. power supply powers optoisolation board only. 2. current consumption of optoisolation board plus dsp evm board (powered from this power supply) 3. maximum current handled by dc/dc converters 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 motor-brake specifications drm031 ? rev. 0 designer reference manual motorola hardware design 73 the sr motor has six stator poles and four rotor poles. this combination yields 12 strokes (or pulses) per single mechani cal revolution. the sr motor is characterized by a dedica ted inductance prof ile. the motor inductance profile as a function of mechanical position is shown in figure 5-4 . the mechanical angle 90 o mech corresponds to one electrical period of the stroke. the pres ented profile was used for the determination of the advan ced commutation angle. on the motor brake shaf t, a position encoder and position hall sensor are attached. they allow position sensi ng if it is requir ed by the control algorithm. the introduced drive uses the encoder for the position determination table 5-3. motor - brake specifications set manufacturer em brno, czech republic motor specification: e motor type: sr40v (3-phase sr motor) stator / rotor poles: 6/4 speed range: < 5000 rpm nominal voltage: 3 x 300v nominal current: 1.2a brake specification: brake type sg40n 3-phase bldc motor nominal voltage: 3 x 27v nominal current: 2.6 a position encoder ty p e 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 . . . hardware design designer reference manual drm031 ? rev. 0 74 hardware design motorola figure 5-4. induct ance characteristic 5.7 hardware documentation all the system parts are suppli ed and documented according to the following references: u1 - controller board for dsp56f805: ? supplied as: dsp56805evm ? described in: dsp56f805evmum/d dsp evaluation module hardware user?s manual u2 - 3-phase sr high- voltage power stage ? supplied as a kit with an optoisolation board as: ecopthivsr ? described in: memc3psrhvpsum /d motorola embedded motion control 3-phase sr high-voltage power stage user?s manual u3 - optoisolation board 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 -40 -30 -20 -10 0 10 20 30 40 50 60 mechanical angle [deg] inductance [h] phase a phase b phase 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 . . . hardware design hardware documentation drm031 ? rev. 0 designer reference manual motorola hardware design 75 ? supplied with 3-ph. sr hi gh voltage power stage as: ecopthivsr ? or supplied alone as: ecop t - optoisolation board ? described in: motorola embedded motion optoisolation board user?s manual memcobum/d mb1 motor-brake am40v + sg40n ? supplied as: ecmtrhivac detailed descriptions of indi vidual boards can be found in comprehensive user?s manuals belonging to eac h board. the manuals are available on the motorola web . the user?s manual incorporates the schematic of the board, description of individual function bl ocks and a bill of materials. an indi vidual board can be ordered from motorola as a standard product. 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 drm031 ? rev. 0 76 hardware design 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 . . . drm031 ? rev. 0 designer reference manual motorola software design 77 designer reference manual ? 3-ph . sr motor control with encoder section 6. software design 6.1 contents 6.2 data flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 6.3 state diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 6.4 software design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 6.5 scaling of quantities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 6.6 velocity calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 6.2 data flow the control algorithm of a closed loop sr drive is described in figure 6-1 and figure 6-2 . it is based on the system description. the individual processes are described in detail in the fo llowing sections. 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 drm031 ? rev. 0 78 software design motorola figure 6-1. system data flow i - sr motor control omega_required_mech acceleration ramp speed setting omega_reqpcm_mech pc master omega_actual omega_desired speed calculation position_difference position_actual position sensor i_desired i_active speed controller commutation pwm generation pwm_at pwm_ab pwm_bt pwm_bb pwm_ct pwm_cb pwm outputs current controller u_desired outputdutycycle &srmcmtdata theta on theta off u_dc_bus i_active see next page see next page commutation angle calculation dc-bus ripple elimination omega_required_mech omega_required_mech acceleration ramp acceleration ramp speed setting omega_reqpcm_mech omega_reqpcm_mech pc master omega_actual omega_actual omega_desired omega_desired speed calculation speed calculation position_difference position_difference position_actual position_actual position sensor i_desired i_desired i_active i_active speed controller speed controller commutation commutation pwm generation pwm generation pwm_at pwm_ab pwm_bt pwm_bb pwm_ct pwm_cb pwm outputs current controller current controller u_desired u_desired outputdutycycle &srmcmtdata theta on theta on theta off theta off u_dc_bus u_dc_bus i_active i_active see next page see next page commutation angle calculation dc-bus ripple elimination 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 data flow drm031 ? rev. 0 designer reference manual motorola software design 79 figure 6-2. system data flow ii - ad converter 6.2.1 acceleration ramp this process calculates the desired speed based on t he required speed according to the acceleration / decel eration ramp. the r equired speed is set either manually, us ing the push bu ttons (when in manual operating mode), or by pc master software (w hen in pc master software operating mode). 6.2.2 speed calculation the process calculates the actual speed of the motor. the calculation is based on the evaluation of the position info rmation. the on-chip quadrature decoder provides informat ion on position difference through a 16-bit counter. when the position register is r ead, the position difference of the counter?s conten ts are copied into the position dc-bus volatge a-d converter 3-phase currents a-d converter i_active u_dc_bus see next page adc correction current mux dc-bus volatge a-d converter 3-phase currents a-d converter i_active i_active u_dc_bus u_dc_bus see next page adc correction current mux 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 drm031 ? rev. 0 80 software design motorola difference hold register (posdh) and position difference counter is cleared. the register is regularly read and the captured va lue is used for speed calculation. the speed is comput ed by reading the pos ition difference counter register per pr e-defined time sample. a software for moving average fi lter is applied to the speed measurement is incorporated into the process for greater noise immunity. the actual motor speed is ca lculated as the average value of the last four measurements. 6.2.3 speed controller this process calculates the desired phase curr ent according to the speed error. speed error is the diff erence between the actual speed and desired speed. a proportion al-integrational (pi) ty pe of controller is implemented. the constants of the speed controller are tuned experimentally according to the load profile and the speed limits. 6.2.4 current controller this process calculates the duty cycle of th e pwm based on phase current error. phase current error is the difference between the actual phase current and desired phase current . a pi type of controller is implemented. the current c ontroller constants are tuned experimentally according to the type of used motor used. 6.2.5 dc-bus ripple elimination this process provides the elimination of t he voltage ripple on the dc-bus. it compensates an amplit ude of the desired phase voltage generated by the pi current controller. the output of the ca lculation is the duty cycle of the pwm that is applied to co rresponding stator phase. 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 data flow drm031 ? rev. 0 designer reference manual motorola software design 81 6.2.6 pwm generation this process sets the on-chip pwm module for generation of the control pulses for the 3-ph . srm power stage. generation of these pulses is based on the software control register that is formulated by the process of the commutation calculation and is based on the required duty cycle generated by the speed co ntroller process. the calculated software control word is loaded into the pr oper pwm register and the pwm duty cycle is updated according to the required duty cycle. the pwm generation process is a ccessed regularly at a rate given by the pwm frequency. it is frequent enough to ensure the pr ecise generation of commutation pulses. 6.2.7 adc correction and current mux this process takes care of the analog-to-dig ital converter. the sampling of the adc is synchronized to the pw m pulses. the process selects the proper adc channels to be convert ed and reads and processes the results of the adc conversion. the active and discharge phase curr ents are selected and corrected using the measured reference noi se signal. the dc-bus voltage and temperature are filtered using a moving average filter. see 4.3.5 current and voltage measurement for a detailed description. 6.2.8 commutation angle calculation this process calls the commutation angle calcul ation routine which calculates the advanced angle according to the actual speed, the dc-bus voltage and t he desired current (see 3.3 commutation angle calculation ). the algorithm 3-phase sr motor commutat ion angle calculation srmcacanglecalc generates the require d advance angle of commutation accord ing to the princi ple described in 3.3 commutation angle calculation . before the calculation routine call, the scaling constant must be pro perly determined (see 6.5 scaling of quantities ). /* scaling constant */ 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 drm031 ? rev. 0 82 software design motorola scale_const = frac16((l_un*i_max*omega_max*4)/(u_max*60)); the following functions of the algorithm need to be called in order to calculate the co mmutation angle: /* routine call */ adv_angle = srmcacanglecalc(i_ph,u_ph,w_actual,scale_const); /* u_ph => voltage across phase winding */ /* i_ph => phase current */ /* w_actual => actual speed */ these functions are called in the process commutation. a detailed description of the algorithm c an be found in the sdk algorithm documentation. 6.2.9 commutation this process provides the comu tation of the motor phases. the dsp on-chip pwm module is used in a mode for generation of independent output signals t hat can be controlled ei ther by software or by the pwm module. the commutation technique distinguis hes the three following cases: when the pwm output needs to be modulated, the pwm generator controls the channel directly when the pwm output needs to be switched to an in active state (0), the software output cont rol of the corresponding pwm channel is handed over and the channel is turned off manually when the pwm output needs to be switched to t he active state (1), the software output c ontrol of the correspond ing pwm channel is handed over and the channel is turned on manually the on-chip pwm module enables cont rol of the outpu ts from the pwm module either by the pw m generator, or by using the software. setting the output control enable bit, outctlx, enables software to drive the pwm outputs instead of the pwm generator. in independent mode, with outctlx = 1, the output bit outx controls the pwmx channel. setting or clearing the outx bit activates or deactivates the pwmx output. the outctlx and outx bits are in t he pwm output cont rol register. 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 state diagram drm031 ? rev. 0 designer reference manual motorola software design 83 this control technique re quires the preparation of the output control register. for the calculation of t he outctlx and outx bits in the pwm output control register, a dedi cated commutation algorithm, 3-phase sr motor commutation handler for h/w configuration 2-switches-per-phase , srmcmt3ph2spp, was developed. the algorithm generates an output c ontrol word according to the desired action and the desired dire ction of rotation. for example, when phase a needs to be turned off, the algorithm sets the corresponding outctlx bits to enable the output control of the required pwms and clears the outx bits to turn off the pwms. the ot her output control register bits are not affected. 6.3 state diagram the processes described above are implemented in a single state machine, as illustrated in figure 6-3 . the state machine provides a transition amongst the application stat es init, stop, run, fault. the following variables are used to in voke the transit ion between the individual states: switchstate (stop, run): st ate of the start/stop switch appfault (no_fault, any fault): fault occurrence appopmode (change from manual to pc and vi ce versa): change operational mode 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 drm031 ? rev. 0 84 software design motorola figure 6-3. appli cation state diagram 6.3.1 application state - init after reset the application enters the init state. in this state, the drive is disabled and the moto r cannot be started. if any fault is detect ed, the application transi ts to the fault state (protection against faults). if no fault is present, and the start/stop switch is detected in the stop position, t he application transi ts to the stop state (protection against starting after reset if the start/stop switch is accidentally in th e start position). 6.3.2 application state - stop the stop state can be entered either from the init st ate or from the run state. in the stop state, the drive is enabled and the application waits for the start command. init state run state stop state fault state reset switchstate = stop appfault = no_fault & switchstate = stop appfault <> no_fault appfault <> no_fault appfault <> no_fault switchstate = run & appfault = no_fault switchstate = stop & appfault = no_fault appopmode change init state run state stop state fault state reset switchstate = stop switchstate = stop appfault = no_fault & switchstate = stop appfault = no_fault & switchstate = stop appfault <> no_fault appfault <> no_fault appfault <> no_fault appfault <> no_fault appfault <> no_fault appfault <> no_fault switchstate = run & appfault = no_fault switchstate = run & appfault = no_fault switchstate = stop & appfault = no_fault switchstate = stop & appfault = no_fault appopmode change appopmode change 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 design drm031 ? rev. 0 designer reference manual motorola software design 85 when the application is in the stop state, t he operating mode can be changed, either from ma nual mode to pc master software mode or vice versa. when the operating m ode is changed, the application always transits to the init state. if any fault in the stop state is detected, the application enters the fault state (fault prot ection). if no fault is present and the start command is accepted, the applicati on transits to the run state and the motor is started. 6.3.3 application state - run the run state can be enter ed from the stop state. in the run state the drive is enabled and th e motor is running. if any fault in the r un state is detected, th e application enters the fault state (fault prot ection). if no fault is present and the stop command is accepted the application transits to t he stop state and the motor is stopped. 6.3.4 application state - fault the stop state can be entered from an y state. in the fault state, the drive is disabled and the application wa its for the faults to be cleared. when it is detected that the fault has been elimi nated, and the fault clear command is accepted (the start/stop switch is moved to the stop position), then the a pplication transits to the init state. 6.4 software design the general software diagram incorporat es: (1) the main routine entered from reset, and (2) the interrupt serv ice routines (isr). the diagram is illustrated in figure 6-4 . after reset, the main r outine provides board identif ication, initialization of the dsp, initialization of the application, and then it enters an infinite 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 drm031 ? rev. 0 86 software design motorola background loop. the background loop contains fault detection, application state machine, and a scheduler routine. the scheduler routine provides the timing sequence for two tasks called timeout 1 and timeout 2. the timeout 1 and timeout 2 flags are periodically set to predetermined intervals by the adc conversion completed isr. the schedu ler utilizes these flags and calls the required routines: the routine in timeout 1 provides a user interface, calculates the required speed, the start-up r outines and the speed ramp (acceleration/deceleration). the routine in timeout 2 calc ulates the speed controller. the timeout 1 and timeou t 2 tasks are performed in the run state, instead of interrupt routin es, in order to reduce ti me and avoid software bottlenecks. the followin g interrupt service ro utines are utilized: adc conversion completed isr - services adc and provides all the control tasks linked to the ev ent; the adc is synchronized with the pwm pulses. fault isr - services f aults invoked by exter nal hardware faults. sci isr - services pc ma ster software communication. push button up isr - services the up push button. push button down isr - services the down push button. timer a1 compare isr - se rvices commutation callback 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 design drm031 ? rev. 0 designer reference manual motorola software design 87 figure 6-4. software d esign - general overview initialize dsp & reset done fault detection fault interrupt handler pwm fault interrupt done timeout 2 done done no timeout timeout 1 timeout 1 sci & pc master interrupt handler sci interrupt done adc interrupt handlers adc conversion done completed interrupt application application state machine s/w timeout ? done done timeout 2 background tasks interrupt service routines irq0, irq1 interrupt push buttons interrupt handlers done tmra1 compare interrupt commutation interrupt handler software 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 designer reference manual drm031 ? rev. 0 88 software design motorola 6.4.1 initialization after reset, the initialization of t he dsp is performed. at the beginning of the initialization, inte rrupts are disabled; at the end of initialization they are enabled. dsp initialization: disable interrupts identify power stage board ? identify sr high-voltage h/w set initialize adc on-chip module ? adc triggered simultaneously ? associate interrupt with adc conversion completed event ? 1st sample of adc_a: current phase a ? 2nd sample of adc_a: dc-bus voltage ? 3rd sample of adc_a: temperature ? 1st sample of adc_b: current phase b ? 2nd sample of adc_b: current phase c ? 3rd sample of adc_b: void initialize quadrature timer a0 on-chip module (position measurement) ? set quad count mode ? count repeatedl y up to 1024 initialize quadrature timer a1 on-chip module (commutation callback) ? set quad count mode ? count repeatedly, th e binary roll over initialize quadrature decoder on-chip module ? sets digital filter for input signals ? connects quadrature decoder signa ls to the quadrature timer a1 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 design drm031 ? rev. 0 designer reference manual motorola software design 89 initialize pwm on-chip module: ? center aligned independent pw m mode, positive polarity ? set pwm modulus for pwm frequency at 16khz ? set pwm interrupt rel oad of each pwm pulse ? set fault2 (dc-bus over-current fault) in manual mode, interrupt enabled ? set fault1 (dc-bus over-vol tage fault) in manual mode, interrupt enabled ? associate interrupt with pwm fault events initialize brake driver initialize led driver initialize push buttons ? push buttons on interrupts irq0, irq1 initialize switch driver ? switch driver used fo r dsp56f805evm and dsp56f807evm application initialization: set individual paramete rs of the application to their initial values start adc conversion measure offset of indi vidual current sensors measure dc-bus volt age and temperature calculate application parameter s according to dc-bus voltage initialize quadrature time r c2 driver (adc-pwm synchronization) ? set adc synchronization delay to 0 ? enable quadrature timer c2 to be started on first sync initialize adc driver ? set adc synchronization on ? enable 8-sample conversion 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 drm031 ? rev. 0 90 software design motorola initialize all variabl es for motor start-up set adc according to start-up phase enable interrupts 6.4.2 fault detection the fault detection routine checks applic ation faults. if a fault occurs, it disables the pwm outputs and sets the application fault status. note that in the case of dc -bus over-current and dc-bu s over-voltage faults, pwm outputs are disabled directly via internal pw m module fault protection see 6.4.7 fault isr . 6.4.3 application state machine the application state machine pr ovides transiti on between the individual states of the applicatio n: init, stop, run, and fault. for reference, see 6.3 state diagram . 6.4.4 scheduler timeout 1 this routine is accessed from the main scheduler in a period of timeout 1 (10 msec). the followi ng tasks are then performed: push button filter - debounce s push button sw itching noise start/stop switch filter - debounces start/stop switch noise according to the operating mode, desired speed is calculated ? in manual mode accordi ng to the push buttons ? in pc master software contro l mode, according to the pc master software command start-up routine is performed if required and start-up switching pattern is generated. for a det ailed description refer to 4.3.1 initialization and start-up . speed command is calculat ed using the acceleration / deceleration ramp using the desired speed setup 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 design drm031 ? rev. 0 designer reference manual motorola software design 91 led is controlled according to the st ate of the drive. it can indicate a stop state, run st ate or fault state. 6.4.5 scheduler timeout 2 this state is accessible from the ma in scheduler in a period of timeout 2 (2.5 msec). the followi ng tasks are then performed: speed controller calculates the desired phase current according to the actual and the des ired speed. the speed co ntroller constants are determined experiment ally and set during t he initialization of the chip. 6.4.6 adc conversion completed isr the adc conversion completed isr is the most critical routine and the most demanding t he processor time. most of the application control processes need to be lin ked with this isr. the analog-to-digital converter is initiated synchronous ly with a pwm reload pulse (center of t he pwm pulse). it scans all three phase currents, the dc-bus voltage and t he temperature at once . when the conversion is finalized, the adc co mpleted isr is called. the routine provides the followin g services and calculations: reads the adc conversion resu lts (phase currents, noise, dc-bus voltage, temperature) calculates the adc offsets for phase currents current controller calculates the desired phase voltage according to the desired and the actual phase current provides commutat ion if required records selected recorder va riables (pc master software) loads pwm registers calculates the references for so ftware timers timer1 and timer2 enables the next adc synchronization trigger 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 drm031 ? rev. 0 92 software design motorola 6.4.7 fault isr the pwm fault isr is the highest priority interrupt impl emented in the software. in the case of a dc-bus over-current or a dc-bus over-voltage fault detection, the exter nal hardware circuit generate s a fault signal, that is detected on the fault input pin of th e dsp. the signal disables the motor control pwm output s in order to protec t the power stage and generates a fault interr upt, where the fault condition is handled. the routine records the corresponding fault source to the fault status register. 6.4.8 sci isr this interrupt handler provides sci communi cation and pc master software service routines. these ro utines are fully independent of the motor control tasks. 6.4.9 push button up/down isr the push button interrupt handlers take care of the push buttons service. the up bu tton interrupt handler sets the up button flag, the down button interrupt handler sets the down button fl ag. the desired speed is incremented/decrement ed according to the debounced up/down button flag. 6.4.10 tmra1 compare isr the compare interrupt handler takes care of commutation call. this callback routine sets-on the commutate flag to indica te that the commutation is required. the commutat ion flag is regular ly checked in the adc conversion-completed rout ine and upon a successful compare, the commutation routine is called to perform commutation itself. 6.5 scaling of quantities the sr motor control applic ation uses a fractional representation for all real quantities except time. the n- bit signed fractional format is 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 scaling of quantities drm031 ? rev. 0 designer reference manual motorola software design 93 represented using 1.[n-1] format (1 sign bit, n-1 fractional bits). signed fractional numbers (sf) li e in the 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 be tween the real and the fractional representations: (eq 6-2.) where: fractional value is the fractional number of the real value [frac16] real value is the real value of the quantity [v, a, rpm, etc.] real quantity range is the maximal range of the quantity, defined in the application [v, a, rpm, etc.] 6.5.1 voltage scaling the application voltages are scaled to the maximal measured voltage. for dc-bus voltage the scali ng equation is the following: (eq 6-3.) where: u_dc_bus is the scaled variable of the dc-bus voltage [frac16] v dc_bus is the measured dc-bus voltage [v] v max is the maximal measurable dc-bus voltage [v] in the application, v max = 407v for the high voltage platform. 1.0 ?sf+1.0 -2 n1 ? [] ? ? fractional value real value real quantity range ---------------------------------------------- - = u_dc_bus v dc_bus 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 drm031 ? rev. 0 94 software design motorola the other application voltage variabl es are scaled in the same way (active phase voltage u_active , discharge phase voltage u_discharge , dc-bus under-voltage li mit, start-up voltage). 6.5.2 phase current scaling the application phase currents are scaled to the maximal measured phase current. for the active phase current the scaling equation is the following: (eq 6-4.) where: i _active is the scaled variable of the active phase current [frac16] i active is the measured active phase current [a] i phase _ max is the maximal measurable phase current [a] in the application, i phase _ max = 5.86a for the high -voltage platform. the other application phase current variables ar e scaled in the same way (desired current i_desired , discharge current i_discharge , current offsets i_phase_a_offset, i_phase_b_offset, i_phase_c_offset ). 6.5.3 electrical angle scaling the application electrical angle is scaled to the electrical angle in the aligned position (see figure 6-5 ). for the electrical commutation angle the scaling equation is the following: (eq 6-5.) where: theta_on_el is the scaled variable of th e electrical commutation angle [frac16] i_active i active i phase_max ------------------------------- = theta_on_el ? on_el ? aligned_el ------------------------------- - = 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 scaling of quantities drm031 ? rev. 0 designer reference manual motorola software design 95 ? on_el is the desired commutation angle [ o el ] ? aligned_el is the electrical angle in aligned position [ o el ]. in the application, ? aligned_el = 360 o el the other application electr ical angle variables ar e scaled in the same way (angle where stator and ro tor poles start to overlap theta_edge ). figure 6-5. electrical angle definition 6.5.4 speed scaling speed is scaled to the maximal s peed of the drive. for the desired start-up speed, the scaling equation is the following: (eq 6-6.) where: omega_desired_startup is the scaled variable of the desired start-up speed [frac16] start-up is the desired start-up speed [rpm] max is the maximal speed of the drive [rpm] in the application, max = 3000 rpm. the other application speed variables are scale d in the same way (actual speed, omega_actual_mech , speed limits, l aligned position a u a start_to_overlap 0 180 ?180 l aligned position a u a start_to_overlap 0 180 ?180 omega_desired_startup start_up 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 drm031 ? rev. 0 96 software design motorola omega_reqmax_mech & omega_reqmin_mech , push button speed increment, omega_increment_pb ). 6.5.5 duty cycle scaling the duty cycle is scaled to the maxima l duty cycle of the drive. for the output duty cycle t he scaling equation is the following: (eq 6-7.) where: output_duty_cycle is the scaled variable of output duty cycle [frac16] duty_cucle output is the desired output duty cycle [%] duty_cycle max is the max. applicable duty cycle [%] in the application, duty_cycle max = 100 % the other application duty cycles are scaled in the same way (high and low duty cycle limits for speed co ntroller, start up output duty cycle outputdutycyclestartup ). 6.6 velocity calculation the actual speed of the motor is calculated from the time, timecaptured, captured by the on-chip qu adrature timer between the two following edges of the position hall sensors. the actual speed, omegaactual is calculated according to the following equation: (eq 6-8.) where: omegaactual is the actual speed [rpm] timecaptured is the time, in terms of number of timer pulses, captured between two edges of the position sensor [-] output_duty_cycle duty_cycle output duty_cycle max ---------------------------------------------- = omegaactual speedcalcconst timecaptured ------------------------------------------- - = 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 velocity calculation drm031 ? rev. 0 designer reference manual motorola software design 97 speedcalcconst is a constant defining the relationship between the actual speed and number of captured pulses between the two edges of the position sensor the constant speedcalcconst is calculated as: (eq 6-9.) where: speedmin is the minimal measured speed [rpm] speedmax is the maximal measured speed [rpm] minimal measured speed, speedmin, is given by the configuration of the sensors and parameters of the dsp on-chip timer used for speed measurement. it is calculated as: (eq 6-10.) where: nopulsesperrev is the number of sensed pulses of the position sensor per single revolution [-] presc is the prescaler of the quadrature timer used for speed measurements busclockfreq is the dsp bus clock frequency [hz] maximal meas ured speed, speedmax, is selected as: (eq 6-11.) where: k is an integer constant greater than 1 then the speed calculation co nstant is determined as: (eq 6-12.) in the application: speedcalcconst 2 15 speedmin speedmax --------------------------- - = speedmin 1 nopulsesperrev -------------------------------------------- 6 0 2 15 busclockfreq -------------------------------------- p r e s c ----------------------------------------------------------- = speedmax k speedmin = speedcalcconst busclockfreq 60 nopulsesperrev presc speedmax --------------------------------------------------------------------------------------------------- - = 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 drm031 ? rev. 0 98 software design motorola nopulsesperrev = 12 hall sensor pulses per 1 revolution of the motor presc = 128 busclockfreq = 36*10 6 hz speedmax = 3000 rpm then, speedcalcconst = 468 [rev -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 . . . drm031 ? rev. 0 designer reference manual motorola system setup 99 designer reference manual ? 3-ph . sr motor control with encoder section 7. system setup 7.1 contents 7.2 application outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 7.3 application description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 7.4 application setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 7.5 project files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 7.6 application build and execute . . . . . . . . . . . . . . . . . . . . . . . . 111 7.7 warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 7.2 application outline the system is designed to drive a 3- ph. sr motor. the application has the following specifications: sr motor control using enc oder for positi on determination targeted for dsp56f805evm and for dsp56f805 controller board running on 3-ph. sr hv power stage 180 w uses optoisolasion board for hv/lv isolation speed control loop motor mode in single direction of rotation minimum speed of 600 rpm maximum speed of 2500 rpm manual interface (run/stop sw itch, up/down push buttons control, led indication) 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 setup designer reference manual drm031 ? rev. 0 100 system setup motorola overvoltage, undervoltage and ov ercurrent fault protection pc remote control interface (speed set-up) pc master software remote monitor ? pc master software monitor interface (appl ied voltage, required voltage, r equired and actual speed, start/stop switch state, fault status, hardware id) ? pc master software speed scope (observes actual and desired speed, currents: active, desired, discharge, output duty cycle) 7.3 application description the 3-ph. sr motor control with enc oder application demonstrates the switched reluctance motor control appl ication using position sensor on the dsp56f805 processor. 7.3.1 control process after reset the application enters the init state in manual mode. when the start/stop switch is detected (using star t/stop switch or pc master command) in stop position and there ar e no faults pending the stop application state is entered. when the start co mmand is detected (using start/stop sw itch or pc mast er start button), the drive enters run application state - motor is started. the following start-up sequence with the rotor ali gnment is provided: motor_stopped, motor stopped alignment_command, ali gnment command accepted alignment_stage_one, alignment in pr ogress - phases b&c switched on alignment_stage_two, alignm ent in progress - phase b switched on start_up_finished, alignment finaliz ed, motor running, start-up finalized 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 setup application description drm031 ? rev. 0 designer reference manual motorola system setup 101 the rotor position is evaluated with encoder position sensor through timer module a of channel 0, which is set into quadrature mode. channel 1 of the same module performs commutation call under successful comparing of cmp2. ever y commutation occurren ce, the cmp2 is anew loaded with recently ca lculated value, which is adjusted by advance angle routine consideri ng actual speed, desi red current and applied voltage across corresponding phase. the individual phase is supposed to be switched on before overl apping rotor and stator teeth. according to the control signals (start/stop swit ch, up/down push buttons) and pc master comm ands (in case of pc master control), the reference speed command is calculated using an acceleration/deceleration ramp. the comparison between the actual speed command and the measured speed generates a speed error. based on the error, the speed c ontroller generates desired phase current. when the phase is commuted, it is turned- on with duty cycle 100% (or output_duty_cycle_start up during motor start-up). then during each pwm cycle, the actual phas e current is compared with the desired current. as soon as the act ual current exceeds the command one, the current controll er is turned-on. the pr ocedure is repeated for each commutation cycle of the moto r. the current c ontroller generates the desired duty cycle. finally, the 3-phase pwm sr motor control signals are generated. 7.3.2 drive protection the dc-bus voltage, dc-bus curren t and power stage temperature are measured during t he control process. they are used for overvoltage, undervoltage, overcurrent and overtemperature prot ection of the drive. the undervoltage and overtemperature protection is performed by software while the overcu rrent and overvoltage faul t signal utilizes a fault inputs of the dsp. the power stage is identified using board identification. if the correct power stage is not identif ied, the "wrong power stage" fault disables the dr ive operation. the line voltage is measured during applicat ion initialization. acco rding to the detected level, the 115 vac or 230 vac mains is set. if the line voltage is detected out of the -15% .. +10% of nominal voltage, the "o ut of the mains limit" fault disables t he drive operation. 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 setup designer reference manual drm031 ? rev. 0 102 system setup motorola if any of the above m entioned faults occur, the motor control pwm outputs are disabled in or der to protect the driv e, and the application enters the fault state. the fault state can be left onl y when the fault conditions disappear and th e start/stop switch is toggled through the stop position. the application can run on: external ram or flash memory 3-phase sr high-voltage power st age powered by 115v ac or 230v ac manual or pc mast er operating mode the correct power stage and vo ltage level is identifi ed automatically and the appropriate c onstants are set. the 3-phase sr motor control applicat ion can operate in two modes: 1. manual operating mode the drive is controlled by the ru n/stop switch. the motor speed is set by the up and down push buttons (see figure 7-1 ). the actual state of the appl ication is indicated by the user leds (see figure 7-2 ). if the application runs and motor spinning is disabled (i.e., the system is r eady), the green user led will flash at a frequency of 2hz. when motor sp inning is enabl ed, the green user led will be on. if a fault occurs on the power stage, the green user led will fl ash at a frequency of 8h z. the actual state of the pwm outputs are indicated by pwm output leds. 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 setup application description drm031 ? rev. 0 designer reference manual motorola system setup 103 figure 7-1. run/stop switch and up/down buttons on dsp56f805evm figure 7-2. user and pwm leds on 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 setup designer reference manual drm031 ? rev. 0 104 system setup motorola 2. pc master software (remote) operating mode the drive is controlled remotely from a pc through the sci communication channel of the dsp device vi a an rs-232 physical interface. the drive is enabled by the run/stop switch, which can be used to safely stop the appl ication at any time. pc master software enables to set the required speed of the motor. the following pc master cont rol actions are supported: set pc master mode 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 displays the following information: required speed of the motor actual speed of the motor application status - init/stop/run/fault dc bus voltage level identified line voltage fault status - no_fault/overvoltage/overcu rrent/undervoltage/overheating identified power stage table 7-1. 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 setup application description drm031 ? rev. 0 designer reference manual motorola system setup 105 start the pc master software window application by the executing the 3ph_srm_encoder.pmp . figure 7-3 illustrates the pc master software control window after this project has been launched. 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. figure 7-3. 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 setup designer reference manual drm031 ? rev. 0 106 system setup motorola 7.4 application setup figure 7-4 illustrates the hardware se t-ups for the 3-phase sr motor control applications. the motor? s encoder connecto r attached to connector j23 on the evm board is no t required for the motor operation. it serves only for pc ma ster position reference. figure 7-4. setup of 3-phase sr motor contro l application using 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 setup application setup drm031 ? rev. 0 designer reference manual motorola system setup 107 the system consists of the following components: switched reluctance motor type 40 v, em brno s.r.o., czech republic load type sg 40n, em brno s.r.o., czech republic encoder bhk 16.05a1024-12-5, baumer electric, switzerland 3-ph. sr hv power stage 180 w: ? supplied as ecinlhivsr optoisolation board ?ecopt dsp56f805 board: ? dsp56f805 evaluation module, supplied as dsp56f805evm ? or dsp56f805 controller board the serial cable - needed for th e pc master software debugging tool only. the parallel cable - needed for the metrowerks code warrior debugging and s/w loading. command converter cable - needed for th e dsp56f805 controller board only. for detailed information, refer to the dedicated applic ation note (see references ). 7.4.1 application se tup using dsp56f805evm to execute the sr motor control with encoder, th e dsp56f805evm board requires the str ap settings shown in figure 7-5 and table 7-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 . . . system setup designer reference manual drm031 ? rev. 0 108 system setup motorola figure 7-5. 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-2. 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 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 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 setup project files drm031 ? rev. 0 designer reference manual motorola system setup 109 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.5 project files the sr motor control application is composed of the following files: ...\3ph_srm_encoder\ srm_encoder.c, main program ...\3ph_srm_encoder\ 3ph_srm_encoder.mcp, application project file ....\3ph_srm_encoder\applica tionconfig\appconfig.h, application configuration file ...\3ph_srm_encoder\systemconf ig\extram\link er_ram.cmd, linker command file for external ram ...\3ph_srm_encoder\systemconf ig\flash\linker_flash.cmd, linker command file for flash 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-2. 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 setup designer reference manual drm031 ? rev. 0 110 system setup motorola ...\3ph_srm_encoder\system config\flash\flash.cfg, configuration file for flash ...\3ph_srm_encoder\pcm aster\3ph_srm_encoder.pmp , pc master software file these files are located in the application folder. motor control algorithms used in the application: ...\controller.c, .h : source and header f iles for pi controller ...\ramp.c, .h : source and header f iles for ramp generation ...\srmcmt3ph2spp.c, .h : source and header files for sr motor commutation algorithm ...\srmcac.c, .h : source and header file s for the mechanical and the electrical quantitie s calculation algorithms other functions used in the application: ...\boardid.c, .h : source and header files for the board identification function all the necessary resources (algorit hms and peripheral drivers) are part of the application projec t file. all the resources are copied into the following folder under t he application folder: ...\3ph_srm_encoder_sa\src\include , folder for general c-header files ...\3ph_srm_encode r_sa\src\dsp56805 , folder for the device specific source files, e.g. drivers ...\3ph_srm_encoder_sa \src\pc_master_support , folder for pc master software source files ...\3ph_srm_encoder_sa \src\algorithms\ , folder for algorithms ...\3ph_srm_encoder_sa\src\bsp\ , folder for the board identification func tion source file 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 setup application build and execute drm031 ? rev. 0 designer reference manual motorola system setup 111 7.6 application build and execute when building the 3-ph. sr motor c ontrol application with encoder, the user can create an applic ation that runs from internal flash or external ram . to select the type of appl ication to build, open the 3ph_srm_encoder.mcp project and select the target build type, as shown in figure 7-6 . a definition of the projec ts associated with these target build types ma y be viewed under the targets tab of the project window. figure 7-6. target build selection to make this application, open the 3ph_srm_encoder.mcp project file and execute the make command, as shown in figure 7-7 . this will build and link the 3-phase sr encode r motor control 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 setup designer reference manual drm031 ? rev. 0 112 system setup motorola figure 7-7. execute make command to execute the 3-phase sr motor control application, select project\debug in the codewarrior id e, followed by the run command. for more help with these commands, refer to the codewarrior tutorial documentation in the following fi le located in the codewarrior installation folder: <...>\codewarrior documentation\pdf\ targeting_dsp56800.pdf if the flash target is selected, c odewarrior will autom atically program the internal flash of the dsp with the execut able code generated during build . if the external ram target is se lected, the executable code will be loaded to off-chip ram. once, the flash has be en programmed with the executable, the evm target system may be r un in a stand-alone mode from flash. to do this, set the jg5 jumper in t he 1-2 configuration to disable the parallel port, and press the reset button. once the applicat ion is running, move the ru n/stop switch to the run position; the sr moto r will be spinning. the speed can be changed by means of the up/d own push buttons from its minimal value up to its maximal value. 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 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 setup warning drm031 ? rev. 0 designer reference manual motorola system setup 113 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 an under voltage fault occu rs, the green led will blink at a frequency of 8hz. 7.7 warning this application operates in an en vironment that includes dangerous voltages and rotating machinery. be aware, that the appl ication power stage and optoisolation board are not electrically isol ated from the main s voltage - they ar e live with risk of electric shock when touched. an isolation transformer should be used when operating of f an ac power line. if an isolation transformer is not used, power stage grounds and oscilloscope grounds are at differen t potentials, unless the oscilloscope is floating. note, that probe grounds and, th erefore, the case of a floated oscilloscope are subjec ted to dangerous voltages. the user should be aware, that: before moving scope probes, maki ng connections, etc., it is generally advisable to power down the high- voltage supply. to avoid inadvertently touching li ve parts, use plastic covers. when high voltage is applied, us ing only one hand for operating the test setup minimizes the po ssibility of el ectrical shock. operation in lab setups that have grounded tables and/or chairs should be avoided. wearing safety glasses, avoiding ties and jewelry, using shields, and operation by a personnel tr ained in high-voltage lab techniques is also advisable. 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 setup designer reference manual drm031 ? rev. 0 114 system setup motorola power transistors, the pfc coil, and the motor can reach temperatures hot e nough to cause burns. when powering down; due to stor age in the bus capacitors, dangerous voltages are present unt il 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 . . . drm031 ? rev. 0 designer reference manual motorola references 115 designer reference manual ? 3-ph . sr motor control with encoder appendix a. references 1. miller, t.j.e., switched reluctance moto rs and their control , magna physics publishing and clarendon press, isbn 0-19-859387-2, 1993 2. an1937 3-phase switched relu ctance motor control with encoder using dsp56f80x , motorola inc., 2002 3. dsp56f80x 16-bit digital signa l processor, user?s manual, dsp56f801-7um/d, mo torola inc., 2001 4. dsp56f800 16-bit di gital signal processor, family manual, dsp56f800fm/d, motorola inc., 2001 5. motorola embedded motion control 3-phase switched reluctance high-voltage power stage user?s manual, memc3psrhvpsum/d, motorola inc., 2000 6. motorola embedded motion control 3-phase switched reluctance low-voltage power stage user?s manual, memc3psrlvpsum/d, motorola inc., 2000 7. dsp56f805 evaluation module hardware user?s manual, dsp56f805evmum/d, motorolainc., 2001 8. motorola embedded motion optois olation board user?s manual, memcobum/d, motorola inc., 2000 9. dsp parallel command converte r hardware user?s manual, mcsl, mc108um2r1 10. user manual for pc master software, motorola inc., 2001 11. codewarrior for motorola dsp56800 emb edded systems, cwdsp56800, metrowerks, 2001 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 drm031 ? rev. 0 116 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 . . . drm031 ? rev. 0 designer reference manual motorola glossary 117 designer reference manual ? 3-ph . sr motor control with encoder appendix b. glossary ac ? alternating current. adc ? analogue-to-digital converter brush ? a component transfering electric al power from non-rotational terminals, mounted on t he stator, to the rotor. bldc ? brushless dc motor commutation ? a process providing crea tion of a rotation field by switching of power transistor (ele ctronic replacement of brush and commutator). commutator ? a mechanical device alte rnating dc current in dc commutator motor and providing rotation of dc commutator motor. cop ? computer operat ing properly timer dc ? direct current dsp ? digital signal prosessor dsp56f80x ? a motorola family of 16-bit hybrid controller dedicated for motor control. 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. 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 drm031 ? rev. 0 118 glossary motorola electromagnetic in terference (emi) ? electrical interference with radio communications gpio ? general purpose input/output hall sensors - a position sensor giving six defined events (each 60 electrical degrees) per el ectrical revolution (f or 3-phase motor). 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. isr ? interrupt service routines interrupt ? a temporary break in the sequential exec ution of a program to respond to signals fro m peripheral devices by executing a subroutine. jtag ? interface allowing on-chi p emulation and programming. led ? light emitting 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 ). pi controller ? proportional-in tegral controller 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. pm ? permanent magnet pmsm - permanent magnet synchronous motor pwm ? pulse width modulation quadrature decoder ? a module providing de coding of po sition from a quadrature encoder mounted on a motor shaft. quad timer ? a module with four 16-bit timers. 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 drm031 ? rev. 0 designer reference manual motorola glossary 119 reset ? to force a device to a known condition. rpm ? revolutions per minute sci ? see "serial communicati ons 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. software (sw) ? 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)." srm ? switched reluctance motor sr motor ? see "srm" timer ? a module used to relate events in a system to a point in 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 . . . glossary designer reference manual drm031 ? rev. 0 120 glossary 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 . . . 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 drm031/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 . . . |
Price & Availability of DRM030
![]() |
|
|
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] |