The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

Induction Motor Vector Control, Driven eTPU MPC5500 Covers MPC550


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



AN3001 Rev. 06/2006
Induction Motor Vector Control, Driven eTPU MPC5500
Covers MPC5500 eTPU-Equipped Devices
Milan Brejl Michal Princ System Application Engineers Roznov Czech System Center
This application note describes design 3-phase induction motor (ACIM) speed torque vector control drive based Freescale's PowerPC MPC5500 microprocessor. application design takes advantage enhanced time processing unit (eTPU) module, which used motor control co-processor. eTPU handles motor control processing, eliminating microprocessor overhead other duties. induction motors, which contain cage, very popular variable speed drives. They simple, rugged, inexpensive, available power ratings. Progress field power electronics microelectronics enables application induction motors high-performance drives, where traditionally only motors were applied. Thanks sophisticated control methods, induction drives offer same control capabilities high performance four-quadrant drives. concept application create vector control ACIM driver with speed closed-loop, using quadrature encoder coupled shaft. serves example ACIM vector control system design using Freescale microprocessor with eTPU. also
Table Contents
PowerPC MPC5554 eTPU Advantages Features Target Motor Theory System Concept Software Design Implementation Notes Microprocessor Usage Summary Conclusions References Revision History
Freescale Semiconductor, Inc., 2006. rights reserved.
PowerPC MPC5554 eTPU Advantages Features
illustrates usage dedicated motor control eTPU functions that included motor control eTPU function set. This application note also includes basic motor theory, system design concept, hardware implementation, microprocessor eTPU software design, including FreeMASTER visualization tool.
Figure Using MPC5554DEMO, 3-Phase AC/BLDC High-Voltage Power Stage, Inline Optoisolation Box, 3-Phase Induction Motor
PowerPC MPC5554 eTPU Advantages Features
PowerPC MPC5554 Microcontroller
MPC5554 microcontroller belongs family next generation powertrain microcontrollers based PowerPC Book architecture. Featuring 32-channel eTPU engines, Kbytes cache, Kbytes internal SRAM, Mbytes internal Flash memory, 64-channel eDMA controller, FlexCAN modules, UARTs, four DSPI modules, MPC5554 been designed applications that require complex, real-time control.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
PowerPC MPC5554 eTPU Advantages Features
This 32-bit device based PowerPC core operating frequency MHz. On-chip modules include: High-performance 32-bit PowerPC Book E-compliant core Memory management unit (MMU) with 24-entry fully associative translation look-aside buffer (TLB) embedded Flash memory with error correction coding (ECC) on-chip static with cache that configured additional Nexus IEEE-ISTO 5001 class multicore debug capabilities enhanced time processor units (eTPUs) 64-channel Enhanced Direct Memory Access (eDMA) controller Interrupt controller (INTC) capable handling selectable-priority interrupt sources Frequency modulated phase-locked loop (FMPLL) assist electromagnetic interference (EMI) management Enhanced queued analog-to-digital converter (eQADC) Four deserial serial peripheral interface (DSPI) modules Three controller area network (FlexCAN) modules enhanced serial communication interface (eSCI) modules Eighty-eight channels timed Crossbar switch (XBAR) Enhanced modular system (eMIOS) more information, refer Reference
eTPU Module
eTPU intelligent, semi-autonomous co-processor designed timing control, handling, serial communications, motor control, engine control applications. operates parallel with host CPU. eTPU processes instructions real-time input events, performs output waveform generation, accesses shared data without host CPU's intervention. Consequently, host setup service times each timer event minimized eliminated. eTPU MPC5554 microcontroller engines with timer channels each. addition, Kbytes code memory Kbytes data memory that stores software modules downloaded boot time that mixed matched required specific application. eTPU provides more specialized timer processing than host achieve. This partially eTPU implementation, which includes specific instructions handling processing time events. addition, channel conditions available eTPU processor, thus eliminating many branches. eTPU creates host overhead servicing timing events. more information, refer Reference
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Target Motor Theory
Target Motor Theory
Stator Rotor
Figure 3-Phase Induction Motor
induction motor rotating electric machine designed operate from 3-phase source alternating voltage. variable speed drives, source normally inverter that uses power switches produce approximately sinusoidal voltages currents controllable magnitude frequency. cross-section two-pole induction motor shown Figure Slots inner periphery stator accommodate 3-phase winding a,b,c. turns each winding distributed that current stator winding produces approximately sinusoidally-distributed flux density around periphery gap. When three currents that sinusoidally varying time, displaced phase 120° from each other, flow through three symmetrically-placed windings, radially-directed flux density produced that also sinusoidally distributed around rotates angular velocity equal angular frequency, stator currents. most common type induction motor squirrel cage rotor which aluminum conductors bars cast into slots outer periphery rotor. These conductors bars shorted together both ends rotor cast aluminum rings, which also shaped fans. larger induction motors, copper copper-alloy bars used fabricate rotor cage winding. sinusoidally-distributed flux density wave produced stator magnetizing currents sweeps past rotor conductors, generates voltage them. result sinusoidally-distributed currents short-circuited rotor bars. Because resistance these shorted bars, only small relative angular velocity between angular velocity flux wave mechanical angular velocity two-pole rotor required produce necessary rotor current. relative angular velocity called slip velocity. interaction sinusoidally-distributed flux density induced rotor currents produces torque rotor. typical induction motor speed-torque characteristic shown Figure Squirrel-cage induction motors popular their simple construction, cost horsepower, maintenance (they contain brushes, unlike motors). They available wide range power ratings. With field-oriented vector control methods, induction motors fully replace standard motors, even high-performance applications.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Target Motor Theory
Figure Induction Motor Speed-Torque Characteristic
Digital Control ACIM
adjustable speed applications, motors powered inverters. inverter converts power power required frequency amplitude. Figure illustrates typical 3-phase inverter.
DC-Bus
DC-Bus
3-Phase Motor
Figure 3-Phase Power Stage
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Target Motor Theory
inverter consists three half-bridge units where upper lower switches controlled complimentarily, meaning when upper turned lower must turned off, vice versa. Because power device's turn-off time longer than turn-on time, some dead time must inserted between turning transistor half-bridge, turning complementary device. output voltage mostly created pulse-width modulation (PWM) technique. 3-phase voltage waves shifted 120o another, thus 3-phase motor supplied.
Vector Control ACIM
Vector control elegant method controlling induction motors, where field-oriented theory used control space vectors magnetic flux, current, voltage. possible co-ordinate system decompose vectors into electro-magnetic field generating part torque generating part. Then structure motor controller (vector control controller) almost same separately excited motor, which simplifies control ACIM. This vector control technique developed past especially achieve similar excellent dynamic performance ACIM. explained Figure choice been made widely used current control with inner position closed loop. this method, decomposition field generating part torque generating part stator current allows separate control magnetic flux torque. need rotary co-ordinate system connected rotor magnetic field. This co-ordinate system generally called "d-q reference co-ordinate system". more information, refer Reference
ACIMVC
u_d_lin omega_field
u_dc_bus
Decoupling
i_d_required
Circle Limitation
Inverse Park Transform
u_q_lin
DC-Bus Ripple Elimination
i_q_required
u_alpha
alpha beta
u_beta
omega_actual u_alpha u_beta
Flux Model
psi_r_alpha
Establishment
omega_field
psi_r_beta
i_beta
Clarke Transform
i_alpha
i_alpha i_beta
Figure ACIM Vector Control Current Loop Block Diagram
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
System Concept
Quadrature Encoder
ACIM motor application uses quadrature encoder rotor position sensing. quadrature encoder output consists three signals. phases, represent rotor position, index pulse defines zero position. quadrature encoder signals depicted Figure
4094 4095
position counter values
Phase Phase Index revolution
Figure Quadrature Encoder Output Signals
System Concept
System Outline
system designed drive 3-phase induction motor. application meets these performance specifications: Vector control ACIM motor Targeted PowerPC MPC5554DEMO evaluation board (MPC554DEMO) Control technique incorporates: Torque vector control speed vector control Both directions rotation 4-quadrant operation Maximal speed 1100 input power line Maximal torque FreeMASTER control interface (speed set-up, speed control/torque control choice) FreeMASTER monitor FreeMASTER graphical control page (required speed, required torque, actual motor speed, actual torque, start/stop status, fault status) FreeMASTER control scope (observes required actual speeds torques, applied voltage) Detail description eTPU functions used application (monitoring channel registers function parameters real time) break over-current fault protection
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
4094 4095
System Concept
Application Description
standard system concept chosen motor control function (see Figure system incorporates this hardware: Evaluation board MPC5554DEMO Interface board with UNI-3 3-phase AC/BLDC high-voltage power stage Inline optoisolation 3-phase induction motor Type AM40V, Brno s.r.o., Czech Republic Load Type 40N, Brno s.r.o, Czech Republic Quadrature encoder 16.05A 1024-I2-5, Baumer Electric, Switzerland eTPU module runs main control algorithm. 3-phase output signals 3-phase inverter generated, using vector control algorithm, according feedback signals from quadrature encoder, actual values phase currents, input variable values, provided microprocessor CPU. DC-bus voltage phase currents sampled on-chip analog-to-digital converter (eQADC module). transfer measured samples from eQADC eTPU data provided eDMA module.
Figure System Concept
system processing distributed between eTPU, which both parallel. performs these tasks: Periodically scans FreeMASTER interface. Based user input, handles application state machine calculates required speed, which passed eTPU.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
System Concept
Periodically reads application data from eTPU data order monitor application variables. event overcurrent fault, outputs immediately temporarily disabled eTPU hardware. Then, after interrupt latency, disables outputs permanently displays fault state. Periodically, with period 50us, eDMA transfers eQADC conversion commands from eTPU data into eQADC results conversion transferred from eQADC into eTPU data RAM.
eTPU performs these tasks: eTPU channels (PWMF) generate output signals. Three eTPU channels (QD) process quadrature encoder signals. eTPU channel (BC) controls DC-bus break. eTPU channel (ASAC) triggers on-chip convertor preprocess sampled values. eTPU channel (PWMMAC) internally synchronizes outputs calculate space vector modulation, based applied motor voltage vector alpha-beta coordinates. eTPU channel (SC) internally calculates actual motor speed, control speed closed loop case speed vector control. actual motor speed calculated based position counter last edge time. required speed provided passed through ramp. speed control algorithm processes error between required actual speed. controller output passed ACIMVC eTPU function newly corrected value required motor torque. eTPU channel (ACIMVC) internally calculates current vector control closed loop. takes values actual phase currents from ASAC, actual rotor position from actual motor speed from phase currents transferred alpha-beta coordinate system, using Clark Park transformations. control algorithm processes error between required actual D-current, another error between required actual Q-current. required value D-current, which flux controlling current, required value Q-current, which torque controlling current, either directly (torque vector control), provided output (speed vector control). controller outputs create motor applied voltage vector, coordinate system. transformed back alpha-beta coordinate system passed generator.
3.2.1
User Interface
application interfaced FreeMASTER running connected MPC5554DEMO RS232 serial cable. on/off switch FreeMASTER control page affects application state enables disables phases. When switch off-position, voltage applied motor windings. When on/off switch on-position, motor speed controlled speed gauge FreeMASTER control page. FreeMASTER also displays real-time values application variables, their time behavior using scopes.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
System Concept
FreeMASTER software designed provide application-debugging, diagnostic, demonstration tool development algorithms applications. runs connected MPC5554DEMO RS232 serial cable. small program resident microprocessor communicates with FreeMASTER software return status information process control information from FreeMASTER software, executing uses part Microsoft Internet Explorer user interface. Note, that FreeMASTER version 1.2.31.1 higher required. FreeMASTER application downloaded from http://www.freescale.com. more information about FreeMASTER, refer Reference
Hardware Implementation Application Setup
previously stated, application runs PowerPC MPC5554 microprocessor using: MPC5554DEMO evaluation board Interface board with UNI-3 3-phase AC/BLDC high-voltage power stage Inline optoisolation box, which connected between host computer controller board 3-phase induction motor Type AM40V, Brno s.r.o., Czech Republic Quadrature encoder 16.05A 1024-I2-5, Baumer Electric, Switzerland Power supply MPC5554DEMO Evaluation Board, 9-12V minimum Amps Power supply 3-phase induction motor, 230V Figure shows connection these parts. system parts supplied Freescale documented according references.
3.3.1
PowerPC MPC5554 Evaluation Board (MPC5554DEMO)
MPC5554 demonstration board shows example minimum configuration MPC5554 system with addition external SRAM optional peripherals. This board intended full evaluation board MPC5554, shows minimal system learning about MPC5500 family products. demo board shows example connecting MPC5554 MC33394 power supply connectivity other basic optional circuits (configuration non-default boot operation CAN, LIN, RS-232 transceivers). demo board also provides access pins MPC5554 some inputs that connected MPC5554 demonstration purposes. more information, refer Reference Table lists MPC5554DEMO jumper settings used application.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
System Concept
Figure Connection Application Parts
Table MPC5554DEMO Jumper Settings Jumper VRH_EN SRAM_SEL VSTBY_SWITCH Setting CAN_SEL Setting CONFIG SWITCH Setting
3.3.2
Flashing MPC5554DEMO
eSys Flasher utility used programming code into flash memory MPC5554DEMO. Check correct setting switches jumpers.The flashing procedure follows: Metrowerks MPC55xx V1.5b2 open project. Choose Intflash target compile application. file simple_eflash.elf.S19, which will loaded into flash memory, created project directory bin.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
System Concept
eSysFlasher application. Target Configuration window select type Communication Wiggler. Click close window. Program section clicking "Program Flash" button (see Figure Select Binary Image, Address check "Verify after program" option (see Figure 10). Press "Program" select intflash.bin file. Finally, press "Open" button bottom window start loading code into flash memory. code been programmed correctly, remove interface push RESET button MPC5554Demo. application should from flash.
Figure eSysFlasher Target Configuration Window
eSYS Flasher application downloaded from http://www.freescale.com
Figure eSys Flasher Program Window
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
System Concept
3.3.3
Interface Board with UNI-3
This board connects power stage with motor MPC5554DEMO board used software hardware developers test programs tools. supports algorithms that Hall sensors, sensors, encoder feedback, back-EMF (electromotive force) signals sensors control. Input connections made connectors bottom side board headers MPC5554DEMO board. Output connections made 40-pin UNI-3 connector expansion headers. Power requirements input connectors. more information, refer Reference
Figure Interface Board with UNI-3
3.3.4
Setting Overcurrent Level
over-current fault signal connected eMIOS output disable input (eMIOS that enables, together with proper eTPU configuration, handling fault eTPU hardware. This connection part MPC5554. order enable handling fault also software, fault signal available eMIOS generates interrupt request case fault. over-current level trimmer (I_SEN) interface board with UNI-3 (see Figure 12). Reference describes what voltage must trimmer define over-current comparator.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
System Concept
Figure Overcurrent Level Trimmer Interface Board with UNI-3 (R24)
3.3.5
3-Phase High Voltage AC/BLDC Power Stage Board
3-phase high voltage AC/BLDC power stage board provides, together with optoisolation controller boards, platform software development wide variety control algorithms miscellaneous 3-phase drives: induction, brushless (BLDC), permanent magnet, synchronous motors. Control techniques algorithms written tested without need design build power stage. This allows design application optimal system with significant time overall cost savings. power stage senses variety feedback signals suitable different motor control techniques. measures three phase currents, dc-bus current, dc-bus voltage, back voltages with zero cross sensing, inductor current, input line zero crossing PFC. power module temperature measured well. analog signals accommodated directly sampled MCU's DSP's converter. 3-phase high voltage AC/BLDC power stage consists modules: power module power stage. power stage contains sensing control circuitry interface connectors. power module mounted heatsink contains power devices, which need dissipate heat. main power stage features are: Capable supplying 3-phase induction, synchronous, permanent magnet, brushless motors 1-phase bridge rectifier Dc-bus break IGBT break anti-parallel diode Power signal connectors external board 3-phase bridge inverter (6-IGBT's) Individual phase current sensing shunts with Kelvin connections Power stage temperature sensing IGBT gate drivers Current temperature signal conditioning 3-phase back-EMF voltage sensing zero cross detection circuitry
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
System Concept
Low-voltage on-board power supplies Cooling UNI-3 motor control interface
more information, refer Reference
Figure 3-Phase AC/BLDC High Voltage Power Stage Board
3.3.6
Inline Optoisolation
Freescale's embedded motion control series in-line optoisolation links JTAG RS-232 signals from workstation controller connected high-voltage power stage. isolates workstation, peripherals that attached workstation, from dangerous voltages that present power stage. in-line optoisolation box's galvanic isolation barrier also isolates signals from high noise power stage provides noise-robust systems architecture. in-line optoisolation used mainly during development phase high-voltage power applications such electrical drives, power convertors, high voltage systems etc. in-line optoisolation connect your wide range MCU/DSP boards. more information, refer Reference
3.3.7
Induction Motor with BLDC Motor Brake Quadrature Encoder
used induction motor-brake incorporates 3-phase induction motor AM40V attached BLDC motor brake 40N. Detailed motor-brake specifications listed following Table more motor specifications, refer Reference
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
System Concept
Table Motor-Brake Specifications
Manufactured Motor Specification: Brno, Czech Republic Motor Type: Pole-Number: Nominal Speed: Nominal Voltage: Nominal Current: Brake Specification: Brake Type: Nominal Voltage: Nominal Current: Pole-Number: Nominal Speed: AM40V 3-Phase Induction Motor 1300 0.88 SG40N 3-Phase BLDC Motor 1500
Quadrature encoder 16.05A 1024-I2-5 attached motor scan encode shaft movement. basic encoder features are: Three channel quadrature output with index pulse Resolution 1024 counts revolution -20°C 85°C operating temperature compatible Single supply more quadrature encoder specifications, refer Reference
Figure Induction Motor with BLDC Motor Brake Quadrature Encoder
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
3.3.8
Power Supply
MPC5554DEMO board powered 12-V/1.2-A power supply, 3-phase high voltage AC/BLDC power stage board powered 230-V power supply. application scaled this 230-V power supply.
Software Design
This section describes software design ACIM vector control drive application. system processing distributed between eTPU, which parallel. eTPU tasks described terms following: Software flowchart Application state diagram eTPU application eTPU eTPU block diagram eTPU timing software uses several ready-to-use Freescale software drivers. communication between microprocessor FreeMASTER handled software included freemaster_protocol.c/.h files. eTPU module uses general eTPU utilities, eTPU function interface routines (eTPU function API), eTPU application interface routines (eTPU application API). general utilities, included etpu_util.c/.h files, used initialization global eTPU module engine settings. eTPU function routines used initialization eTPU channels interfacing each eTPU function during run-time. eTPU application encapsulates several eTPU function APIs. eTPU application eliminates need initialize each eTPU function separately handle eTPU function initialization settings, thus ensuring correct cooperation eTPU functions.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
Figure eTPU Project Structure
Software Flowchart
After reset, software initializes interrupts pins. following processing incorporated periodic timer interrupts, periodical eTPU channel interrupt, fault interrupts.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
FreeMASTER Timer Interrupt
RESET Initialize peripherals Enable interrupts
FreeMASTER Dispatcher
eTPU Channel Interrupt
wait
FreeMASTER Recorder
Fault Interrupt Timer Interrupt Handle overcurrent fault Handle application state machine Service Status Read application data structure
eTPU Global Exception Interrupt
Handle eTPU global exception
Figure Software Flowchart
4.1.1
Timer Interrupt Service Routine
timer interrupt handled timer_isr function. These actions performed periodically, timer_isr: Handle application state machine. application state diagram described detail below. Service status ApplicationButtonsAndStatusLed function. Read data structure through eTPU application routine fs_etpu_app_acimesvc1_get_data (see 4.3).
4.1.2
FreeMASTER Interrupt Service Routine
FreeMASTER interrupt service routine called FMSTR_Isr. This function implemented freemaster_protocol.c.
4.1.3
eTPU Channel Interrupt Service Routine
This interrupt, which raised every period PWMMAC eTPU function running eTPU channel handled etpu_ch7_isr function. This function calls FMSTR_Recorder, implemented freemaster_rec.c, enabling configuration application variable time courses with PWM-period time resolution.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
4.1.4
Fault Interrupt Service Routine
over-current fault interrupt, which raised eMIOS input function running eMIOS channel handled emios_isr function. These actions performed switch motor off: Reset required speed. Disable generation signals. Switch fault Enter APP_STATE_MOTOR_FAULT. FAULT_OVERCURRENT.
4.1.5
eTPU Global Exception Interrupt Service Routine
global exception interrupt handled etpu_globalexception_isr function. These situations cause this interrupt assertion: Microcode global exception asserted. Illegal instruction flag asserted. MISC flag asserted. These actions switch motor off: Reset required speed. Disable generation signals. Enter APP_STATE_GLOBAL_FAULT. Based eTPU global exception source, FAULT_MICROCODE_GE, FAULT_ILLEGAL_INSTR, FAULT_MISC.
Application State Diagram
application state diagram consists seven states (see Figure that controlled power on/off switch placed FreeMASTER control page. After reset, application goes firstly APP_STATE_INIT. Where on/off switch position, APP_STATE_STOP follows, otherwise APP_STATE_MOTOR_FAULT entered on/off switch must turned from APP_STATE_MOTOR_FAULT APP_STATE_STOP. Then cycle between APP_STATE_STOP, APP_STATE_ENABLE, APP_STATE_RUN, APP_STATE_DISABLE repeated, depending on/off switch position. APP_STATE_ENABLE APP_STATE_DISABLE states introduced ensure safe transitions between APP_STATE_STOP APP_STATE_RUN states. Where over-current fault interrupt raised (see line Figure 17), APP_STATE_MOTOR_FAULT entered. This fault cleared moving on/off switch position thus entering APP_STATE_STOP. Where eTPU global exception interrupt raised (see gray line Figure 17), APP_STATE_GLOBAL_FAULT entered. global fault cleared moving on/off switch position thus entering APP_STATE_INIT.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
reset
ON/OFF switch moved
APP_STATE_INIT APP_STATE_ MOTOR_FAULT
APP_STATE_ GLOBAL_FAULT
ON/OFF switch moved
APP_STATE_STOP
ON/OFF switch moved
APP_STATE_ENABLE
APP_STATE_DISABLE
ON/OFF switch moved
APP_STATE_RUN
over-current fault interrupt
Figure Application State Diagram
next paragraphs describe processing each application states.
4.2.1
APP_STATE_INIT
This state passed through only. entered either after reset, after APP_STATE_GLOBAL_FAULT. These actions initialize (re-initialize) application: Disable over_current interrupt. Call my_system_etpu_init routine eTPU module initialization. Calibrate eQADC. destination addresses eDMA1, eDMA3, eDMA5, eDMA7. source address eDMA47. eTPU functions DATA addresses FreeMASTER. addresses channel configuration registers FreeMASTER. Initialize FreeMASTER. Call my_system_etpu_start routine eTPU Start. this point, eTPU parallel. Depending on/off switch position, enter APP_STATE_STOP APP_STATE_MOTOR_FAULT.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
4.2.1.1
Initialization Start eTPU Module
eTPU module initialized using my_system_etpu_init function. Later, after initialization other peripherals, eTPU started my_system_etpu_start. These functions general eTPU utilities eTPU function routines. Both my_system_etpu_init my_system_etpu_start functions, included acimesvc1_etpu_gct.c file, generated eTPU Graphical Configuration Tool. eTPU Graphical Configuration Tool downloaded from http://www.freescale.com/etpu. more information, refer Reference my_system_etpu_init function first configures eTPU module motor settings. Some these settings include: Channel filter mode three-sample mode Channel filter clock etpuclk input signals (from quadrature encoder) filtered channel filters. filter settings guarantee minimum delay input transition recognition. TCR1 source etpuclk TCR1 prescaler TCR1 internal eTPU clock maximum rate 128-MHz system clock), corresponding resolution generated signals. TCR2 source etpuclk TCR2 prescaler TCR2 internal eTPU clock rate 128-MHz system clock). TCR2 clock settings optimized motor speed calculation precision. After configuring module engine settings, my_system_etpu_init function initializes eTPU channels. Channel quadrature decoder (QD) phase channel Channel quadrature decoder (QD) phase channel Channel quadrature decoder (QD) index channel Channel speed controller (SC) Channel ACIM vector control (ACIMVC) Channel master motors (PWMMAC) Channel full range (PWMF) phase base channel Channel full range (PWMF) phase complementary channel Channel full range (PWMF) phase base channel Channel full range (PWMF) phase complementary channel Channel full range (PWMF) phase base channel Channel full range (PWMF) phase complementary channel Channel break controller (BC) Channel analog sensing motors (ASAC) These eTPU channels initialized fs_etpu_app_acimesvc1_init eTPU application function (see 4.3).
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
application settings follows: phases-type full range complementary pairs frequency dead-time Motor speed range 4000 Motor speed minimum DC-bus voltage range Phase current range Rotor flux range Number motor pole pairs Resistance stator phase winding 32.25 Resistance rotor phase winding 31.17 Magnetizing inductance 537.8 Self-inductance stator 28.1 Self-inductance rotor 65.5 Motor electrical constant V/kRPM D-current controller parameters: Controller gain Integral time constant controller parameters were experimentally tuned. Q-current controller parameters: Controller gain Integral time constant controller parameters were experimentally tuned. Speed controller update frequency Speed controller parameters: Controller gain Integral time constant controller parameters experimentally tuned. Ramp parameters: ramp from zero maximum speed Number quadrature encoder position counter increments revolution 4096 Break controller mode PWM-based breaking signal generated case over-voltage. Break control signal polarity active high. DC-bus voltage level, which break control signal 130% nominal DC-bus voltage DC-bus voltage level, which break control signal OFF, 110% nominal DC-bus voltage
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
ASAC function triggers converter low-high edge Phase currents DC-bus voltage measurement time, including conversion time eDMA transfer time, p_ASAC_result_queue pointer contains address eTPU DATA RAM, where result queue transferred. samples result queue shifted left bits achieve alignment corresponding 24-bit fractional format, which used eTPU functions. Phase current sample offset within ASAC_result_queue Phase current sample offset within ASAC_result_queue Phase current sample offset within ASAC_result_queue DC-bus voltage sample offset within ASAC_result_queue ASAC EWMA filter time constant phase currents ASAC EWMA filter time constant DC-bus voltage my_system_etpu_start function first applies settings channel interrupt enable channel output disable options, then enables eTPU timers, starting eTPU.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
Figure eTPU Configuration Using eTPU Graphical Configuration Tool
4.2.1.2
Initialization FreeMASTER Communication
Prior FreeMASTER initialization, necessary pointers eTPU functions data bases configuration register bases. Based these pointers, which read FreeMASTER during initialization, locations eTPU function parameters configuration registers defined. This essential correct FreeMASTER operation. FreeMASTER consists software running microprocessor, connected RS-232 serial port. small program resident microprocessor communicates with FreeMASTER order return status information processes control information from microprocessor part FreeMASTER initialized FMSTR_Init() function.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
4.2.2
APP_STATE_STOP
this state, signals disabled motor off. motor shaft rotated hand, which enables explore functionality quadrature decoder (QD) eTPU function, watch variables produced signals FreeMASTER. When on/off switch FreeMASTER control page turned application goes through APP_STATE_ENABLE APP_STATE_RUN.
4.2.3
APP_STATE_ENABLE
This state passed through only. These switch motor drive Reset required speed. Enable overcurrent interrupt. Enable generation signals calling fs_etpu_app_acimesvc1_enable application routine. phases were successfully enabled, eMIOS channel configured input, interrupt falling edge, APP_STATE_RUN entered. Where phases were successfully enabled, application state does change.
4.2.4
APP_STATE_RUN
this state, signals enabled motor required motor speed using speed gauge FreeMASTER control page. latest value periodically written eTPU. When on/off switch FreeMASTER control page turned off, application goes through APP_STATE_DISABLE APP_STATE_STOP.
4.2.5
APP_STATE_DISABLE
This state passed through only. These actions switch motor drive off: Reset required speed. Disable generation signals. phases were successfully disabled, APP_STATE_STOP entered. Where phases were successfully disabled, application state remains same.
4.2.6
APP_STATE_MOTOR_FAULT
This state entered after over-current fault interrupt service routine. application waits until on/off switch turned off. This clears fault application enters APP_STATE_STOP.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
4.2.7
APP_STATE_GLOBAL_FAULT
This state entered after eTPU global exception interrupt service routine. application waits until on/off switch turned off. This clears fault application enters APP_STATE_INIT.
eTPU Application
eTPU application encapsulates several eTPU function APIs. eTPU application includes methods that enable initialization, control, monitor eTPU application. eTPU application functions eliminates need initialize each eTPU function separately, ensures correct cooperation eTPU functions. eTPU application device independent only handles eTPU tasks. shorten eTPU application names, abbreviated application names introduced. abbreviations include: Motor type (DCM motor, BLDCM brushless motor, PMSM permanent magnet synchronous motor, ACIM induction motor, switched reluctance motor, stepper motor) Sensor type Hall sensors, shaft encoder, resolver, Sincos, sensorless) Control type open loop, position loop, speed loop, current loop, speed vector control, torque vector control) Based these definitions, ACIMESVC1 abbreviation `ACIM with quadrature encoder speed vector control' eTPU motor-control application. there several applications like this, number denotes first such application order. ACIMESVC1 eTPU application described next paragraphs. There five basic functions added ACIMESVC1 application API. routines found etpu_app_acimesvc1.c/.h files. ACIMESVC1 application routines described order below: Initialization function:
int32_t fs_etpu_app_acimesvc1_init( acimesvc1_instance_t acimesvc1_instance, uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t uint32_t uint32_t PWM_master_channel, PWM_phaseA_channel, PWM_phaseB_channel, PWM_phaseC_channel, QD_phaseA_channel, QD_index_channel, SC_channel, BC_channel, ACIMVC_channel, ASAC_channel, PWM_phases_type, PWM_freq_hz, PWM_dead_time_ns,
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
int32_t int32_t int32_t int32_t int32_t uint8_t int32_t int32_t int32_t int32_t int32_t int32_t int32_t int32_t int32_t int32_t uint32_t int32_t int32_t uint32_t uint32_t uint8_t uint8_t uint8_t uint8_t uint8_t uint24_t uint8_t uint8_t uint8_t uint8_t uint8_t uint32_t uint32_t
speed_range_rpm, speed_min_rpm, dc_bus_voltage_range_mV, phase_current_range_mA, rotor_flux_range_mVs, ACIM_pole_pairs, ACIM_resist_stator_mOhm, ACIM_resist_rotor_mOhm, ACIM_Lm_uH, ACIM_Ls_leak_uH, ACIM_Lr_leak_uH, ACIM_Ke_mv_per_krpm, ACIMVC_D_PID_gain_permil, ACIMVC_D_I_time_const_us, ACIMVC_Q_PID_gain_permil, ACIMVC_Q_I_time_const_us, SC_freq_hz, SC_PID_gain_permil, SC_I_time_const_us, SC_ramp_time_ms, QD_pc_per_rev, BC_mode, BC_polarity, BC_u_dc_bus_ON_perc, BC_u_dc_bus_OFF_perc, ASAC_polarity, ASAC_measure_time_us, ASAC_bit_shift, ASAC_ia_queue_offset, ASAC_ib_queue_offset, ASAC_ic_queue_offset, ASAC_u_dcbus_queue_offset, ASAC_filter_time_constant_i_us, ASAC_filter_time_constant_u_us)
uint32_t *ASAC_result_queue,
Change operation functions:
int32_t fs_etpu_app_acimesvc1_enable( acimesvc1_instance_t acimesvc1_instance, uint8_t sc_configuration)
int32_t fs_etpu_app_acimesvc1_disable( acimesvc1_instance_t acimesvc1_instance)
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
void acimesvc1_instance_t acimesvc1_instance, int32_t speed_required_rpm)
Value return function:
void fs_etpu_app_acimesvc1_get_data( acimesvc1_instance_t acimesvc1_instance, acimesvc1_data_t acimesvc1_data)
4.3.1
int32_t fs_etpu_app_acimesvc1_init(.)
This routine initializes eTPU channels ACIM with quadrature encoder torque vector control application. This function these parameters: acimesvc1_instance (acimesvc2_instance_t*) This pointer acimesvc1_instance_t structure, which filled fs_etpu_app_acimesvc1_init. This structure must declared user application. When there more instances application running simultaneously, there must separate acimesvc1_instance_t structure each one. PWM_master_channel (uint8_t) This master channel number. 0-31 ETPU_A, 64-95 ETPU_B. PWM_phaseA_channel (uint8_t) This phase channel number. 0-31 ETPU_A, 64-95 ETPU_B. case complementary signal generation complementary channel channel higher. PWM_phaseB_channel (uint8_t) This phase channel number. 0-31 ETPU_A, 64-95 ETPU_B. case complementary signal generation complementary channel channel higher. PWM_phaseC_channel (uint8_t) This phase channel number. 0-31 ETPU_A, 64-95 ETPU_B. case complementary signal generation complementary channel channel higher. QD_phaseA_channel (uint8_t) This quadrature decoder phase channel number. 0-30 ETPU_A, 64-94 ETPU_B. quadrature decoder phase channel channel higher. QD_index_channel (uint8_t) This quadrature decoder index channel number. 0-31 ETPU_A, 64-95 ETPU_B. SC_channel (uint8_t) This speed controller channel number. 0-31 ETPU_A, 64-95 ETPU_B. BC_channel (uint8_t) This break controller channel number. 0-31 ETPU_A, 64-95 ETPU_B. ACIMVC_channel (uint8_t) This ACIM vector control function channel number. 0-31 ETPU_A, 64-95 ETPU_B.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
ASAC_channel (uint8_t) This analog sensing motors (ASAC) channel number. 0-31 ETPU_A, 64-95 ETPU_B. PWM_phases_type (uint8_t) This parameter determines type phases. This parameter should assigned value PWM_freq_hz (uint32_t) This frequency PWM_dead_time_ns (uint32_t) This dead-time speed_range_rpm (int32_t) This maximum motor speed rpm. speed_min_rpm (int32_t) This minimum (measurable) motor speed rpm. dc_bus_voltage_range_mv (int32_t) This maximum measurable DC-bus voltage phase_current_range_mA (int32_t) This maximum measurable phase current rotor_flux_range_mVs (int32_t) This rotor flux range mVs. ACIM_pole_pairs (uint8_t) This number motor pole-pairs. ACIM_resist_stator_mOhm (uint32_t) This motor resistance stator phase winding mOhm. ACIM_resist_rotor_mOhm (uint32_t) This motor resistance rotor Cels. deg.) mOhm. ACIM_Lm_uH (uint32_t) This motor magnetizing inductance ACIM_Ls_leak_uH (uint32_t) This motor leakage inductance stator ACIM_Lr_leak_uH (uint32_t) This motor leakage inductance rotor ACIM_Ke_mv_per_krpm (uint32_t) This motor electrical constant mV/1000RPM. ACIMVC_D_PID_gain_permil (int32_t) This D-current (flux controlling current) controller gain millesimals. ACIMVC_D_I_time_constant_us (int32_t) This D-current (flux controlling current) controller integral time constant ACIMVC_Q_PID_gain_permil (int32_t) This Q-current (torque controlling current) controller gain millesimals. ACIMVC_Q_I_time_constant_us (int32_t) This Q-current (torque controlling current) controller integral time constant SC_freq_hz (uint32_t) This speed controller update frequency assigned value must equal PWM_freq_hz divided SC_PID_gain_permil (int32_t) This speed controller gain millesimals. SC_I_time_constant_us (int32_t) This speed controller integral time constant SC_ramp_time_ms (uint32_t) This parameter defines required speed ramp time step change required speed from speed_range_rpm slowed down ramp take defined time.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
QD_qd_pc_per_rev (uint32_t) This number position counter increments revolution. BC_mode (uint8_t) This function mode. This parameter should assigned value BC_polarity (uint8_t) This output polarity. This parameter should assigned value BC_u_dc_bus_ON_perc (uint8_t) This proportion between U_DC_BUS, above which output nominal U_DC_BUS, expressed percentage (usually about 130%). BC_u_dc_bus_OFF_perc (uint8_t) This proportion between U_DC_BUS, below which output OFF, nominal U_DC_BUS, expressed percentage (usually about 110%). ASAC_polarity (uint8_t) This polarity assign ASAC function. This parameter should assigned value ASAC_measure_time_us (uint24_t) Time from first (triggering) edge second edge, which result queue supposed ready DATA_RAM us). This value depends conversion time transfer time. ASAC_result_queue (uint32_t Pointer result queue eTPU DATA RAM. Result queue array 16-bit words that contains measured values. ASAC_bit_shift (uint8_t) This parameter defines align data from result queue into fract24 int24). This parameter should assigned values ASAC_ia_queue_offset (uint8_t) Position phase current sample result queue. Offset defined bytes. ASAC_ib_queue_offset (uint8_t) Position phase current sample result queue. Offset defined bytes. ASAC_ic_queue_offset (uint8_t) Position phase current sample result queue. Offset defined bytes. ASAC_u_dcbus_queue_offset (uint8_t) Position DC-bus voltage sample result queue. Offset defined bytes. ASAC_filter_time_constant_i_us (uint32_t) This time constant Exponentially-Weighted Moving Average (EWMA) filter which applies when processing phase current samples, ASAC_filter_time_constant_i_us (uint32_t) This time constant EWMA filter which applies when processing DC-bus voltage samples,
Induction Motor Vector Control, Driven eTPU MPC5500, Rev.
Freescale Semiconductor
Software Design
4.3.2
int32_t fs_etpu_app_acimesvc1_enable(.)
This routine used enable generation signals, align motor start position reset position counter, initialize measurement analog values, start vector control loop speed controller. This function following parameters: acimesvc1_instance (acimesvc1_instance_t*) This pointer acimesvc1_instance_t structure, which filled fs_etpu_app_acimesvc1_init. sc_configuration (uint8_t) This required configuration This parameter should assigned value speed loop opened, motor controlled torque, closed, motor controlled speed.
4.3.3
int32_t fs_etpu_app_acimesvc1_disable (acimesvc1_instance_t acimesvc1_instance)
This routine disabled generation signals stops vector control loop speed controller. This function this parameter: acimesvc1_instance (acimesvc1_instance_t*) This pointer acimesvc1_instance_t structure, which filled fs_etpu_app_acimesvc1_init.
4.3.4
void
This routine sets required motor speed. This function these parameters: acimesvc1_instance (acimesvc1_instance_t*) This pointer acimesvc1_instance_t structure, which filled fs_etpu_app_acimesvc1_init. speed_required_rpm (int32_t) This required motor speed rpm. case speed loop opened (sc_configuration been fs_etpu_acimesvc1_enable(.)), required speed value passed directly speed controller output, which required motor torque. this case, required motor speed RPM, fraction speed range RPM, corresponds required motor torque, fraction maximum motor torque.
4.3.5
void
This routine gets application state data. This function these parameters: acimesvc1_instance (acimesvc1_instance_t*) This pointer acimesvc1_instance_t structure, which filled fs_etpu_app_acimesvc1_init. acimesvc1_data (acimesvc1_data_t*) This pointer acimesvc1_data_t structure application state data, which updated.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
eTPU Block Diagram
eTPU functions used ACIM vector control drive located motor-control eTPU functions (set4 motors). eTPU functions within serve building blocks various motor-control applications. next paragraphs describe functionality each block.
Figure Block Diagram eTPU Processing
4.4.1
Generator (PWMMAC+PWMF)
generation signals motor-control applications with eTPU provided eTPU functions: PWM-master motors (PWMMAC) PWM-full range (PWMF) master motors (PWMMAC) function calculates sine wave space vector modulation resulting duty cycles, updates three phases. phases driven full range (PWMF) function, which enables full 100%) duty-cycle range. PWMF function generates signals. PWMMAC function controls three PWMF functions, three phases, does generate drive signal. PWMMAC executed even eTPU channel connected output pin.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
input values alpha angle input values
beta amplitude
PWMMAC
update update update update update
polarity: active-high active-low center-aligned edge-aligned single channel complementary pair variable periods
PWMF PWMF PWMF
Figure Functionality PWMMAC+PWMF
more details about PWMMAC PWMF eTPU functions, refer Reference
4.4.2
Quadrature Decoder (QD)
quadrature decoder eTPU function intended process signals generated shaft encoder motion control systems. uses channels decode pair out-of-phase encoder signals produce 24-bit bi-directional position counter, together with direction information, CPU. additional input channels also processed. index channel receives pulse each revolution. Based actual direction, revolution counter incremented decremented index pulse. further additional input channel indicate home position, used this application.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
position_counter direction last_edge_tcr
revolution_counter
QD_INDEX
QD_HOME
Figure Functionality
more details about eTPU function, refer Reference
4.4.3
Analog Sensing Motors (ASAC)
analog sensing motors eTPU function (ASAC) useful pre-processing analog values that measured converter transferred eTPU data memory transfer. ASAC function also useful triggering converter synchronizing other eTPU functions. above mentioned ASAC features utilized application. ASAC initialized synchronized mode, e.g. first ASAC edge synchronized with beginning period. Simultaneously, ASAC manages synchronize function generating link channel every 20th ASAC period synchronize ACIMVC function generating link ACIMVC channel each ASAC period. ASAC function preprocesses phase currents DC-bus voltage analog values passes adjusted values input ACIMVC functions. Processing DC-bus voltage sample includes shifting, dc-offset removing, filtering. Processing phase current samples includes also computation third phase current from other two, based actual motor position sectors, computation dead-time compensation parameters. more details about ASAC eTPU function, refer Reference
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
result queue shift offset shift offset
transfer
converter
shift offset sector
shift offset
trigger trigger
filter
dtc_a dtc_b dtc_c
filter
filter
filter
ASAC
Pre-processed analog values
link outer link inner loop controller loop controller
link inner loop controller
Figure Functionality ASAC
ensure periodic sampling quick transfer measured data from converter eTPU data RAM, several peripheral modules used (see Figure 23): On-chip analog digital converter (eQADC) sampling analog values. Sampling analog values triggered eTRIG signal generated internally ASAC eTPU function running eTPU channel direct memory access (eDMA) channels: eDMA channel used transfer four 32-bits eQADC conversion commands from eTPU data (p_ASAC_command_queue) EQADC_CFPR2 (CFIFO push register eQADCmodule. eDMA channel transfer initiated request generated ASAC eTPU function. ASAC changes command queue based actual motor position sectors order ensure defined order analog values sampling. eDMA channel used transfer 16-bits phaseA current sampling result from EQADC_RFPR0 (result FIFO register eTPU data RAM. channel transfer initiated request generated eQADC module after conversion finished. eDMA channel used transfer 16-bits phaseB current sampling result from EQADC_RFPR1 (result FIFO register eTPU data RAM. channel transfer initiated request generated eQADC module after conversion finished. eDMA channel used transfer 16-bits phaseC current sampling results from EQADC_RFPR2 (result FIFO register eTPU data RAM. channel transfer initiated request generated eQADC module after conversion finished. eDMA channel used transfer 16-bits voltage sampling results from EQADC_RFPR3 (result FIFO register eTPU data RAM.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
channel transfer initiated request generated eQADC module after conversion finished.
eTRIG
period
ETPU_A_CH29 ASAC
ADC0 ADC1
request
EQADC_CFIFO2
ETPU DATA
p_ASAC command_queue
eDMA
4x32bits
EQADC_RFIFO0 EQADC_CFPR2 EQADC_RFPR0 EQADC_RFPR1 EQADC_RFIFO2 EQADC_RFPR2 EQADC_RFPR3 EQADC_RFIFO3 EQADC_RFIFO1
CHAN
1x16bits
CHAN CHAN CHAN CHAN
1x16bits
p_ASAC result_queue 1x16bits
1x16bits
Figure Analog Values Sampling, Cooperation eTPU, eDMA eQADC Modules
eDMA eQADC settings made using Quick Start Configuration Tool, refer Reference
4.4.4
ACIM Vector Control (ACIMVC)
ACIM vector control eTPU function intended process input output signals. purpose control another eTPU function's input parameter. ACIMVC function executed even eTPU channel connected output pin. purpose ACIMVC function perform current control loop field-oriented (vector control) drive induction motor (ACIM). sequence ACIMVC calculations consists these steps: Forward Clarke transformation Rotor flux estimation establishment (incl. calculation sine, cos, omega_field, Forward Park transformation) current controllers calculation Decoupling Circle limitation Inverse Park transformation DC-bus ripple elimination
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
ACIMVC calculates applied voltage vector components based measured phase currents required values phase currents 2-phase orthogonal rotating reference frame (D-Q). ACIMVC function optionally enables perform limitation calculated components stator voltages into circle.
ACIMVC
u_d_lin omega_field
u_dc_bus
Decoupling
i_d_required
Circle Limitation
Inverse Park Transform
u_q_lin
DC-Bus Ripple Elimination
i_q_required
u_alpha
alpha beta
u_beta
omega_actual u_alpha u_beta
Flux Model
psi_r_alpha
Establishment
omega_field
psi_r_beta
i_beta
Clarke Transform
i_alpha
i_alpha i_beta
Figure Functionality ACIMVC
more details about ACIMVC eTPU function, refer Reference
4.4.5
Speed Controller (SC)
speed controller eTPU function intended process input output signals. purpose control another eTPU function's input parameter. function executed even eTPU channel connected output pin. function includes general controller algorithm. controller calculates output based inputs: measured value required value. measured value (the actual motor speed) calculated based inputs provided function. required value output speed ramp, whose input function parameter, provided another eTPU function. motor-control eTPU function set, this function mostly provides speed outer-loop.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
applied_voltage
controller ramp
scaling_factor position_difference time_difference
position_counter last_edge_time
requested_value
time
Figure Functionality
more details about eTPU function, refer Reference
4.4.6
Break Controller (BC)
purpose break controller (BC) eTPU function eliminate DC-bus overvoltage when motor driven generating mode. function generates DC-bus break control signal (see Figure based actual DC-bus voltage.
AC/DC
DC-bus
H-BRIDGE
DC-bus break control signal
Figure Functionality
described application uses mode function. this mode, function switches softly using signal. u_dc_bus_ON u_dc_bus_OFF thresholds define ramp (see Figure 27). When DC-bus voltage lower than u_dc_bus_OFF, control signal turned off. Between u_dc_bus_OFF u_dc_bus_ON thresholds, signal with duty-cycle linearly increasing from 100% generated. Above u_dc_bus_ON threshold, control signal turned functionality shown Figure Figure Figure Signal (dark blue line) represents DC-bus voltage, signal (light blue line) reflects DC-bus break control signal generated
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
Duty_cycle 100%
U_dc_bus_OFF U_dc_bus_ON
U_dc_bus
Figure Mode Break Controller Function
Figure Oscilloscope Screenshot Showing DC-bus Voltage Course when Motor Reaches Generating Mode (Without Action Break Controller)
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
Figure Oscilloscope Screenshot Showing Functionality Break Controller
Figure Oscilloscope Screenshot showing Functionality Break Controller Detail (Zoom DC-Bus Break Control Signal)
more details about eTPU function, refer Reference
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
eTPU Timing
eTPU processing event-driven. Once event service begins, execution cannot interrupted another event service. other event services have wait, which causes service request latency. maximum service request latency, worst case latency (WCL), differs each eTPU channel. affected channel priority activity other channels. each channel must kept below required limit. example, PWMF channels must lower than period. theoretical calculation WCLs, given eTPU configuration, trivial task. motor control eTPU functions introduce debugging feature that enables user check channel latencies using oscilloscope, eliminates necessity theoretical calculations. mentioned earlier, some eTPU functions intended process input output signals driving motor. These functions turn output high low, that high-time identifies period time which function execution active. oscilloscope used determine much channel activity pulse varies time, which indicates channel service latency range. example, when oscilloscope time base synchronized with periods, behavior tested channel activity pulse described these cases: pulse asynchronous with periods. This means that tested channel activity synchronized with periods. pulse synchronous with periods stable. This means that tested channel activity synchronous with periods delayed service latency. pulse synchronous with periods, position varies time. This means that tested channel activity synchronous with periods service latency varies this time range.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Software Design
ACIMVC
PWMMAC
ASAC
period
period
Figure Oscilloscope Screenshot eTPU Timing
Figure explains application eTPU timing. oscilloscope screen-shot depicts typical situation described below. live view oscilloscope screen enables user variation ACIMVC, PWMMAC ASAC activity pulses. yellow signal generated speed controller (SC) eTPU function. pulses determine activity pulse width determines time necessary calculate motor speed from position counter last edge time, calculate required speed ramp, apply controller algorithm. This calculation performed periodically 1-kHz rate, which every 20th period. blue signal generated ACIM vector control (ACIMVC) eTPU function. update ACIMVC divided three consecutive threads (pulses). ACIM update performed every period. violet signal generated master motors (PWMMAC) eTPU function. pulses determine activity PWMMAC. Immediately after ACIMVC update finished, narrow PWMMAC pulse occurs. These pulses determine service time ACIMVC request update applied motor voltage vector. This service includes also calculation space vector modulation. Apart from these pulses, wider pulses signal actual update next period. green signal corresponds analog sensing motors (ASAC) eTPU function. This signal triggers converter first (low-high) edge. ASAC pulse width determines time necessary sample phase currents DC-bus voltage transfer sampled values eTPU data memory. ASAC starts measured samples preprocessing time second edge when samples supposed ready eTPU data memory.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Implementation Notes
ASAC thread executed first ASAC edge requests update every 20th period, sending link channel. Consequently, requests update (not displayed oscilloscope screen). Both updates finished prior ASAC second edge. ASAC thread executed second edge requests ACIMVC update, apply values phase currents every period. ACIMVC update separated into three threads. After third finished, ACIMVC requests PWMMAC update applied motor voltage vector. these ASAC, ACIMVC activities have finished prior start PWMMAC update. they finished, PWMMAC update postponed next period. update starts update_time prior period frame, that update finished period frame, even worst case latency case. Reference describes update_time value.
Implementation Notes
Scaling Quantities
ACIM vector control algorithm running eTPU uses 24-bit fractional representation real quantities except time. 24-bit signed fractional format mostly represented using 1.23 format sign bit, fractional bits). most negative number that represented -1.0, whose internal representation 0x800000. most positive number 0x7FFFFF 2-23. following equation shows relationship between real fractional representations:
Real Value Fractional Value -Real Quatity Range Eqn.
where: Fractional value fractional representation real value [fract24]. Real value real value quantity RPM, etc.]. Real quantity range maximal range quantity, defined application RPM, etc.]. Some quantities represented using 3.21 format signed integer bits, fractional bits) order eliminate need saturation range (-1, most negative number that represented -4.0, whose internal representation 0x800000. most positive number 0x7FFFFF 2-21. this format components applied motor voltage vector passed from ACIMVC PWMMAC.
Speed Calculation
position_difference omega_actual scaling_factor time_difference
speed controller (SC) eTPU function calculates angular motor speed using pc_sc last_edge parameters eTPU function. following equation applies:
Eqn.
where: omega_actual [fract24] actual angular speed fraction maximum speed range. position_difference [int24] difference between updated value position counter previous value, which captured previous period. fact position_difference readable from pc_sc parameter function. After reads
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Microprocessor Usage
updated value resets this pc_sc parameters which ensures that position_difference available pc_sc parameter next time reads time_difference [int24] difference between updated value last_edge previous value, which captured previous period. scaling_factor pre-calculated using following equation:
etpu_tcr_freq scaling_factor -omega_max pc_per_rev Eqn.
where: etpu_tcr_freq [Hz] frequency internal eTPU timer (TCR1 TCR2) used. omega_max [RPM] maximal speed range. pc_per_rev number position counter increments revolution. internal eTPU timer (TCR1 TCR2) frequency must that calculation omega_actual both fits into 24-bits arithmetic resolution sufficient.
Microprocessor Usage
Table Memory Usage Bytes
Memory Flash eTPU code eTPU data Available Used
Table shows much memory needed application.
eTPU module usage terms time load easily determined based these facts: According Reference maximum eTPU load produced generation 1340 eTPU cycles period. frequency 20kHz, thus period 6400 eTPU cycles (eTPU module clock MHz, 128-MHz clock). According Reference contribution function overall eTPU time load calculated. depends number shaft encoder pulses (1024) motor speed (maximum 1000 rpm). maximum eTPU busy time encoder pulse eTPU cycles. According Reference ACIM vector control calculation takes 1538 eTPU cycles. calculation performed every period. According Reference speed controller calculation takes eTPU cycles. calculation performed every 20th period. According Reference maximum eTPU load update slave switching mode eTPU cycles, maximum eTPU load edge eTPU cycles. update performed every periods. frequency DC-bus break control signal kHz, which means that BC-PWM update performed every periods.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Summary Conclusions
According Reference ASAC maximum eTPU load takes eTPU cycles (both first then second edge processing performed). ASAC function processing executed every period.
values eTPU load each functions influenced compiler efficiency. above numbers given guidance only subject change. date information, refer information provided latest release available from Freescale. peak eTPU time load occurs within period when speed controller break controller calculations take place. This peak value must kept below 100%, which ensures that processing fits into period, service latency longer than period, thus generated signals affected. Table shows eTPU module time load several typical situations. more information, refer Reference
Table eTPU Time Load
Situation Motor Speed (170.7 pulses second) Motor Speed 1000 (17067 pulses second) Average Time Load 53.1 61.8 Peak Time Load Within Period 58.8 67.5
Summary Conclusions
This application note provides description demo application ACIM vector control. application also demonstrates usage eTPU module PowerPC MPC5554, which results independent motor drive. Lastly, demo application targeted MPC5500 family devices, could easily reused with device that eTPU.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
References
References
Table References
MPC5554 Reference Manual, MPC5554RM MPC5554DEMO User's Manual, MPC5554DEMO EVBUM Interface Board with UNI-3 User's Manual 3-phase AC/BLDC High Voltage Power Stage User's Manual Freescale Embedded Motion In-Line Optoisolation User's Manual, MEMCILOBUM 3-Phase Induction Motor AM40V, Brno, page: http://www.embrno.cz Quadrature Encoder 16.05A 1024-I2-5, Baumer Electric, page: http://www.baumerelectric.com FreeMASTER page, http://www.freescale.com, search keyword "FreeMASTER" Enhanced Time Processing Unit Reference Manual, ETPURM "Using Quadrature Decoder (QD) eTPU Function," AN2842 "Using Speed Controller (SC) eTPU Function," AN2843 "Using Motor Control eTPU Functions," AN2969 "Using Analog Sensing Motors (ASAC) eTPU Function," AN2970 "Using ACIM Vector Control (ACIMVC) eTPU Function," AN2973 "Using Break Controller (BC) eTPU Function," AN2845 "Using Motor Control eTPU Function (set4)," AN2968 eTPU Graphical Configuration Tool, http://www.freescale.com, search keyword "ETPUGCT" MPC5550 Quick Start User's Manual
Revision History
Table Revision History
Revision Rev. Location(s) Substantive Change(s) This first released version this document.
Table provides revision history this document.
Induction Motor Vector Control, Driven eTPU MPC5500, Rev. Freescale Semiconductor
Reach
Home Page: www.freescale.com E-mail: support@freescale.com USA/Europe Locations Listed: Freescale Semiconductor Technical Information Center, CH370 1300 Alma School Road Chandler, Arizona 85224 +1-800-521-6274 +1-480-768-2130 support@freescale.com Europe, Middle East, Africa: Freescale Halbleiter Deutschland GmbH Technical Information Center Schatzbogen 81829 Muenchen, Germany 1296 (English) 52200080 (English) 92103 (German) (French) support@freescale.com Japan: Freescale Semiconductor Japan Ltd. Headquarters ARCO Tower 1-8-1, Shimo-Meguro, Meguro-ku, Tokyo 153-0064, Japan 0120 191014 5437 9125 support.japan@freescale.com Asia/Pacific: Freescale Semiconductor Hong Kong Ltd. Technical Information Center King Street Industrial Estate N.T., Hong Kong +800 2666 8080 support.asia@freescale.com Literature Requests Only: Freescale Semiconductor Literature Distribution Center P.O. 5405 Denver, Colorado 80217 1-800-441-2447 303-675-2140 Fax: 303-675-2150
Information this document provided solely enable system software implementers Freescale Semiconductor products. There express implied copyright licenses granted hereunder design fabricate integrated circuits integrated circuits based information this document. Freescale Semiconductor reserves right make changes without further notice products herein. Freescale Semiconductor makes warranty, representation guarantee regarding suitability products particular purpose, does Freescale Semiconductor assume liability arising application product circuit, specifically disclaims liability, including without limitation consequential incidental damages. "Typical" parameters that provided Freescale Semiconductor data sheets and/or specifications vary different applications actual performance vary over time. operating parameters, including "Typicals", must validated each customer application customer's technical experts. Freescale Semiconductor does convey license under patent rights rights others. Freescale Semiconductor products designed, intended, authorized components systems intended surgical implant into body, other applications intended support sustain life, other application which failure Freescale Semiconductor product could create situation where personal injury death occur. Should Buyer purchase Freescale Semiconductor products such unintended unauthorized application, Buyer shall indemnify hold Freescale Semiconductor officers, employees, subsidiaries, affiliates, distributors harmless against claims, costs, damages, expenses, reasonable attorney fees arising directly indirectly, claim personal injury death associated with such unintended unauthorized use, even such claim alleges that Freescale Semiconductor negligent regarding design manufacture part.
Freescaleand Freescale logo trademarks Freescale Semiconductor, Inc. other product service names property their respective owners.© Freescale Semiconductor, Inc. 2004. rights reserved. AN3001 Rev. 06/2006

Other recent searches


TC74LCX02F - TC74LCX02F   TC74LCX02F Datasheet
TC74LCX02FT - TC74LCX02FT   TC74LCX02FT Datasheet
RLD2WMNL2 - RLD2WMNL2   RLD2WMNL2 Datasheet
NX8310UA - NX8310UA   NX8310UA Datasheet
MMBT6520LT1G - MMBT6520LT1G   MMBT6520LT1G Datasheet
KBPC800 - KBPC800   KBPC800 Datasheet
KBPC810 - KBPC810   KBPC810 Datasheet
F-51824FNF-SLW-AE - F-51824FNF-SLW-AE   F-51824FNF-SLW-AE Datasheet
ENN6236 - ENN6236   ENN6236 Datasheet
BD9850FVM - BD9850FVM   BD9850FVM Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive