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*)

 

 

3-Phase Motor Control with V/Hz Speed Closed Loop Using 56F800/E


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



AN1958 Rev. 07/2005
3-Phase Motor Control with V/Hz Speed Closed Loop Using 56F800/E
Design Motor Control Application Based Processor Expert
Contents
Introduction Freescale Controller Advantages Features Target Motor Theory
3-phase Induction Motor Drives3 Volts Hertz Control. Speed Closed-Loop System
Introduction
System Design Concept Hardware
System Outline. High-Voltage Hardware Set.
This application note describes design 3-phase induction motor drive with Volts Hertz control closed-loop (V/Hz CL). based Freescale's 56F800/E microcontrollers, which ideal motor control applications. system designed motor control system driving medium-power, 3-phase induction motors. part targeted toward applications both industrial home appliance industries, such washing machines, compressors, conditioning units, pumps, simple industrial drives. drive introduced here intended example 3-phase induction motor drive. drive serves example V/Hz motor control system design using Freescale's controller with Processor Expert(PE) support. This document includes basic motor theory, system design concept, hardware implementation, software design, including master software visualization tool inclusion.
Software Design
Data Flow. 6.1.1 Acceleration/Deceleration Ramp. 6.1.2 Speed Measurement. 6.1.3 Controller 6.1.4 V/Hz Ramp 6.1.5 DCBus Voltage Ripple Elimination 6.1.6 Generation. 6.1.7 Fault Control.
Software implementation
Embedded Beans. Bean Modules 7.2.1 Initialization. State Diagram. 7.3.1 Application State Machine 7.3.2 Check Run/Stop Switch.
Freescale Controller Advantages Features
Freescale 56F800/E families ideal digital motor control, combining DSP's calculation capability with MCU's controller features single chip. These controllers offer rich dedicated peripherals set, such Pulse Width Modulation (PWM) modules, Analog-to-Digital Converter (ADC), timers, communication peripherals (SCI, SPI, CAN), on-board Flash RAM. Several parts comprise family: 56F80x with different peripherals on-board memory configurations. Generally, suited motor control.
Freescale Semiconductor, Inc., 2004, 2005. rights reserved.
Master Software References
Freescale Controller Advantages Features
typical member 56F800 family, 56F805, provides following peripheral blocks: Pulse Width Modulators (PWMA PWMB), each with outputs, three current status inputs, four fault inputs, fault-tolerant design with dead time insertion; supports both center- edge- aligned modes 12-bit, Analog-to-Digital Converters (ADCs), supporting simultaneous conversions with dual 4-pin multiplexed inputs; synchronized modules quadrature decoders (Quad Dec0 Quad Dec1), each with four inputs, additional quad timers dedicated general-purpose quad timers totalling pins: Timer with pins Timer with four pins module with 2-pin ports used transmit receive Serial Communication Interfaces (SCI0 SCI1), each with pins, four additional MPIO lines Serial Peripheral Interface (SPI), with configurable 4-pin port, four additional MPIO lines Computer Operating Properly (COP) timer dedicated external interrupt pins Fourteen dedicated multiple purpose (MPIO) pins multiplexed MPIO pins External reset hardware reset JTAG/on-chip emulation (OnCETM) Software-programmable, phase lock loop-based frequency synthesizer controller core clock
Pulse Width Modulation (PWM) block offers high freedom configuration, enabling efficient control induction motor. block following features: Three complementary signal pairs, independent signals Features complementary channel operation Dead time insertion Separate bottom pulse width correction current status inputs software Separate bottom polarity control Edge-aligned center-aligned reference signals bits resolution Half-cycle reload capability Integral reload rates from Individual software-controlled outputs Programmable fault protection Polarity control 20-mA current sink capability pins Write-protectable registers
outputs configured complementary mode this application.
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
3-phase Induction Motor Drives
Target Motor Theory
3-phase Induction Motor Drives
induction motor workhorse with adjustable speed drive systems. most popular type 3-phase, squirrel-cage induction motor. maintenance-free, less noisy efficient motor. stator supplied balanced 3-phase power source. synchronous speed motor calculated
3-1.)
where synchronous stator frequency number stator poles. load torque produced slip frequency. motor speed characterized slip
3-2.)
where rotor mechanical speed slip speed, both rpm. Figure illustrates torque characteristics corresponding slip. seen from 3-2, motor speed controlled variation stator frequency with influence load torque.
Figure 3-1. Torque-Speed Characteristic Constant Voltage Frequency
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Target Motor Theory
adjustable speed applications, motors powered inverters. inverter converts power power required frequency amplitude. typical 3-phase inverter illustrated Figure 3-2.
Figure 3-2. Phase Inverter inverter consists three half-bridge units; upper lower switches controlled complementarily, which means that when upper turned lower must turned vice versa. power device's turn-off time longer than turn-on time, some dead time must inserted between turn-off transistor half-bridge turn-on complementary device. output voltage mostly created Pulse Width Modulation (PWM) technique, where isosceles triangle carrier wave compared with fundamental-frequency sine modulating wave, natural points intersection determine switching points power devices half bridge inverter. This technique shown Figure 3-3. 3-phase voltage waves shifted 120o each other thus 3-phase motor supplied.
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Volts Hertz Control
Figure 3-3. Pulse Width Modulation most popular power devices motor control applications Power MOSFETs IGBTs. Power MOSFET voltage-controlled transistor. designed high-frequency operation voltage drop, resulting low-power losses. However, saturation temperature sensitivity limits MOSFET application high-power applications. Insulated Gate Bipolar Transistor (IGBT) bipolar transistor controlled MOSFET base. IGBT requires low-drive current, fast switching time, suitable high-switching frequencies. disadvantage higher voltage drop bipolar transistor, causing higher conduction losses.
Volts Hertz Control
Volts Hertz control method, most popular technique Scalar Control, controls magnitude such variables frequency, voltage current. command feedback signals quantities, proportional respective variables. purpose Volts Hertz control scheme maintain air-gap flux induction motor constant, achieving higher run-time efficiency. steady-state operation, machine air-gap flux approximately related ratio Vs/fs, where amplitude motor phase voltage synchronous electrical frequency applied motor. control system illustrated Figure 3-4. characteristic defined base point motor. Below base point, motor operates optimum excitation constant Vs/fs ratio. Above this point, motor operates under-excited because DCBus voltage limit. simple closed-loop Volts Hertz speed control induction motor control technique targeted low-performance drives. This basic scheme unsatisfactory more demanding applications, where speed precision required.
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Target Motor Theory
Figure 3-4. Volts Hertz Control Method
Speed Closed-Loop System
improve system performance, closed-loop Volts Hertz control introduced. this method, speed sensor measures actual motor speed system takes this input into consideration. number applications closed-loop Volts Hertz method because simple relatively good speed accuracy, suitable systems requiring servo performance excellent response highly dynamic torque/speed variations. Figure illustrates general principle speed control loop.
Reference Speed (Omega_required) Actual Motor Speed (Omega_actual) Corrected Speed (Omega_command)
Speed Error
Controller
Controlled System
Figure 3-5. Closed Loop Control System speed closed-loop control characterized measurement actual motor speed. This information compared with reference speed while error signal generated. magnitude polarity error signal correspond difference between actual required speed. Based speed error, controller generates corrected motor stator frequency compensate error. V/Hz closed-loop application, feedback speed signal derived from incremental encoder using Quadrature Decoder. speed controller constants have been experimentally tuned according actual load.
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Speed Closed-Loop System
System Design Concept
Targeted 56F800/E platforms Running 3-phase ACIM motor control development platform variable line voltage 230V Control technique incorporates motoring generating mode bi-directional rotation V/Hz speed closed-loop Manual interface (Start/Stop switch, Up/Down push button speed control, indication) master software interface (motor start/stop, speed set-up) Power stage identification Overvoltage, undervoltage, overcurrent, overheating fault protection
system designed drive 3-phase induction motor. application meets following performance specifications:
drive introduced here designed system that meets general performance requirements Table 4-1. Table 4-1. Motor Drive Specification
Motor Characteristics Motor Type Four poles 3-Phase, star-connected, squirrel cage motor (standard industrial motor) 5000rpm 50Hz 200V (Star) -1024 pulses revolution <2250 <1200 230V 50Hz 115V 60Hz 400V Closed-Loop Control Required Varying
Speed Range Base Electrical Frequency Max. Electrical Power Delta Voltage (rms) Drive Characteristics Transducers Speed Range Line Input Maximum DCBus Voltage Control Algorithm Optoisolation Load Characteristic Type
controller runs main control algorithm generates 3-phase output signals motor inverter according user's interface input feedback signals.
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
System Design Concept
standard system concept chosen drive, illustrated Figure 4-1. system incorporates following hardware boards: Power supply rectifier 3-phase inverter Feedback sensors: Speed DCBus voltage DCBus current Temperature Optoisolation Evaluation board
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Speed Closed-Loop System
Rectifier Line Voltage 230V/50Hz
Three-Phase Inverter DC-Bus
Isolation Barrier
Temperature, Current Voltage Sensing Optoisolation Optoisolation
Temperature DC-Bus Voltage
Over Current Over Voltage
Temperature Voltage Processing
Voltage
Faults Processing
V/Hz Regulator
DC-Bus Ripple Cancel.
Generator with Dead Time
Speed Set-up
Speed Command Processing DSP56F80x
Actual Speed
Speed Processing (Incremental Decoder)
Figure 4-1. System Concept
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Hardware
Control Process: When start command accepted, using Start/Stop switch, state inputs periodically scanned. According state control signals (Start/Stop switch, speed up/down buttons master software speed), speed command calculated using acceleration/deceleration ramp. comparison between actual speed command measured speed generates speed error, speed error brought speed controller, which generates corrected motor stator frequency. With V/Hz ramp, corresponding voltage calculated then DCBus ripple cancellation function then eliminates influence DCBus voltage ripples generated phase voltage amplitude. generation process calculates 3-phase voltage system required amplitude frequency, including dead time. Finally, 3-phase motor control signals generated. DCBus voltage power stage temperature measured during control process. They protect drive from overvoltage, undervoltage, overheating. Both undervoltage protection overheating performed software, while DCBus overcurrent overvoltage fault signals connected fault inputs. above-mentioned faults occurs, motor control outputs disabled protect drive fault state system displayed master software control page.
Hardware
System Outline
motor control system designed drive 3-phase motor speed-closed loop. Software targeted these controllers evaluation modules (EVMs): 56F805 56F8346
hardware set-up depends evaluation module (EVM) module used. software only high-voltage hardware described Section 5.2. Other power module boards will denied, board identification build software. This feature protects misuse hardware module. hardware set-up shown Figure 4-1, also found documentation device being implemented.
High-Voltage Hardware
system configuration shown Figure 5-1.
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
High-Voltage Hardware
+12VDC flat ribbon cable, gray flat ribbon cable, gray JP1.1 JP1.2
Black Light Blue Green-Yellow J11.1 J11.2
Optoisolation Board ECOPT
Controller Board
AC/BLDC High Voltage Power Stage
J13.1 J13.2 J13.3
BlaW
Motor-Brake SG40N
conn. A2510
ECOPTHIVACBLDC
Encoder Conn. Table
Controler 56F803 56F805 56F807 Conn.
AM40V
Incremental Encoder Baumer Electric BHK16.05A 1024-I2-5
Hall Sensor Encoder 00126A
ECMTRHIVAC
used application
Incremental Encoder Cable Connector Table Cable Wire Color Desc. Brown White, Shielding Green Yellow Pink Unused +5VDC Ground Shielding Phase Phase Index Unused
Figure 5-1. High-Voltage Hardware System Configuration system parts supplied documented according following references: Controller board: Supplied 56F80x 56F83xx Described 56F80x 56F83xx Evaluation Module Hardware User's Manual device being implemented 3-phase AC/BLDC high-voltage power stage Supplied with optoisolation board, Order ECOPTHIVACBLDC Described Described 3-Phase Brushless High-Voltage Power Stage, Order MEMC3BLDCPSUM/D Optoisolation board Supplied with 3-phase AC/BLDC high-voltage power stage, Order ECOPTHIVACBLDC Supplied alone, Order ECOPT Described Optoisolation Board User's Manual motor-brake AM40V SG40N Order ECMTRHIVAC
Warning: strongly recommended that optoisolation (optocouplers optoisolation amplifiers) during development avoid damage development equipment. Note: detailed description individual boards found comprehensive user's manual each board. manual incorporates schematic board, description individual function blocks, bill materials. Individual boards ordered from Freescale standard product; Section information.
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Software Design
Software Design
This section describes design drive's software blocks includes data flow state diagrams.
Data Flow
drive's requirements dictate that software gather values from user interface sensors, process them, generate 3-phase signals inverter. control algorithm closed-loop drive described Figure 6-1. control algorithm's processes described following subsections. detailed description given subroutine's 3-phase calculation Volts Hertz control algorithm.
Temperature DCBus Voltage (A/D) (A/D) u_dc_bus MASTER SPEED SETTING INCREMENTAL ENCODER
Omega_desired
Speed Measurement
Acceleration/Deceleration Ramp Omega_actual Temperature Omega_required
Controller
Fault Control
Omega_command
V/Hz Ramp Drive Fault Status
AmplitudeVoltScale
Faults
(Overvoltage/Overcurrent)
DCBus Voltage Ripple Elimination
Amplitude
Generation
PVAL0
PVAL2
PVAL4
Figure 6-1. Data Flow
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Data Flow
6.1.1 Acceleration/Deceleration Ramp
process calculates actual speed command based required speed according acceleration/deceleration ramp. desired speed determined either push buttons master software. During deceleration, motor work generator. generator state, DCBus capacitor charged voltage easily exceed maximum voltage. Therefore, voltage level DCBus link controlled resistive brake, operating case overvoltage. process input parameter Omega_desired, desired speed. process output parameter Omega_required, used input parameter generation process.
6.1.2 Speed Measurement
speed measurement process uses on-chip Quadrature Decoder. process output MeasuredSpeed, only used information value master software.
6.1.3 Controller
controller process takes input parameters, actual speed command Omega_required, actual motor speed, measured incremental encoder Omega_actual, then calculates speed error performs speed control algorithm. output controller frequency first harmonic sine wave generated inverter, Omega_command.
6.1.4 V/Hz Ramp
drive designed Volts Hertz drive, which means control algorithm keeps constant motor's magnetizing current (flux) varying stator voltage with frequency. commonly used Volts Hertz ramp 3-phase induction motor illustrated Figure 6-2.
Figure 6-2. Volt Hertz Ramp
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Software Design
Volts Hertz ramp defined following parameters: Base point defined fbase (usually 50Hz 60Hz) Boost point- defined Vboostand fboost Start point defined Vstart zero frequency
ramp profile fits specific motor easily changed accommodate different motors. Process Description This process provides voltage calculation according Volts Hertz ramp. input this process generated desired inverter frequency, Omega_required. output this process AmplitudeVoltScale, parameter required DCBus voltage ripple elimination process.
6.1.5 DCBus Voltage Ripple Elimination
Process Description voltage ripple elimination process eliminates influence DCBus voltage ripples generated phase voltage sine waves. fact, lowers 50Hz 60Hz acoustic noise motor. Another positive aspect this function generated phase voltage, which independent level DCBus voltage, making application easily adapted power supply systems worldwide. process performed mcgenDCBVoltRippleElim method MC_WaveGenerate bean, converting phase voltage amplitude (AmplitudeVoltScale) sine wave amplitude (Amplitude), based actual value DCBus voltage (u_dc_bus) inverse value modulation index (ModulationIndexInverse). modulation index ratio between maximum amplitude first harmonic phase voltage voltage scale) half DCBus voltage voltage scale), which defined following formula:
phasemax DCBus
6-1.)
modulation index specific given 3-phase generation algorithm; this application, 1.27. Note: result modulation index based harmonic injection technique. first chart Figure demonstrates Amplitude scale generated sine wave amplitude) counter-modulated eliminate DCBus ripples. second chart delineates duty cycles generated 3-phase wave generation functions. third chart contains symetrical sine waves phase-to-phase voltages actually applied 3-phase motor.
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Data Flow
u_dc_bus
litu litu
Figure 6-3. 3-Phase Waveforms with DCBus Voltage Ripple Elimination
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Software Design
6.1.6 Generation
Process Description This process generates system 3-phase sine waves with addition third harmonic component shifted 120o each other using mcgen3PhWaveSine3rdHIntp function from motor control function library. function based fixed-wave table describing first quadrant sine wave stored data memory controller. symmetry sine function, data other quadrants calculated using data first quadrant, which saves data memory. sine wave generation Phase simplicity, explained Figure 6-4. Phases shifted 120o with respect Phase
0x7fff
ActualPhase(n) PhaseIncrement amplitude 100%
ActualPhase(n-1)
0x4000
(DutyCycle.PhaseA)
0x0000 0x8000 -180o 0x7fff 180o
Figure 6-4. Sine Wave generation
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
amplitude
Data Flow
Each time waveform generation function called, ActualPhase from previous step updated PhaseIncrement, and, according calculated phase, value sine fetched from sine table function tfr16SinPIxLUT, from Trigonometric Function Library Processor Expert. It's then multiplied amplitude passed PWM. explanation 3-phase waveform generation with harmonic additionis found following formulas:
PWMA Amplitude PWMB Amplitude 1PWMC Amplitude
Where PWMA, PWMB PWMC calculated, duty cycles passed driver amplitude determine level phase voltage amplitude. process performed reload callback function, pwm_Reload_A_ISR, accessed regularly rate given reload frequency. This process repeated often enough compare wave frequency. Wave length comparisons made generate correct wave shape. Therefore, 16kHz frequency, called each fourth pulse; thus, registers updated 4kHz rate (every 250µsec). Figure shows duty cycles generated mcgen3PhWaveSine3rdHIntp function when Amplitude (100%).
-0.1 -0.2 onic onic onic onic utyC ycle.P haseA utyC ycle.P haseB utyC ycle.P haseC
6-2.)
Figure 6-5. 3-Phase Sine Waves with Harmonic Injection, Amplitude 100%
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Software Design
Figure defines duty cycles generated mcgen3PhWaveSine3rdHIntp function when Amplitude (50%).
-0.1 -0.2 onic onic onic onic utyC ycle.P haseA utyC ycle.P haseB utyC ycle.P haseC
Figure 6-6. 3-Phase Sine Waves with Harmonic Injection, Amplitude Input process: Amplitude obtained from DCBus ripple elimination process Omega_required obtained from acceleration/deceleration ramp process
Output process: Results calculated mcgen3PhWaveSine3rdHIntp function passed directly value registers using driver.
6.1.7 Fault Control
This process responsible fault handling. software accommodates five fault inputs: overcurrent, overvoltage, undervoltage, overheating wrong identified hardware. Overcurrent: overcurrent occurs DCBus link, external hardware provides rising edge controller's fault input pin, FAULTA1. This signal immediately disables motor control outputs (PWM1 PWM6) sets DC_Bus_OverCurrent DriveFaultStatus variable. Overvoltage: overvoltage occurs DCBus link, external hardware provides rising edge controller's fault input pin, FAULTA0. This signal immediately disables motor control outputs (PWM1 PWM6) sets DC_Bus_OverVoltage DriveFaultStatus variable. Undervoltage: DCBus voltage sensed compared with limit software. undervoltage occurs after period defined UNDERVOLTAGE_COUNT, motor control outputs disabled, DriveFaultStatus variable DC_Bus_UnderVoltage.
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Bean Modules
Overheating: temperature power module sensed compared with limit software. overheating occurs after period defined OVERHEATING_COUNT, motor control outputs disabled DriveFaultStatus variable OverHeating. Wrong Hardware: wrong hardware (for example, different power module missing optoisolation board) identified during initialization, DriveFaultStatus variable Wrong_Hardware. these faults occur, program into infinite loop waits reset. fault signaled user LEDs controller board master software control screen.
Software implementation
This project implemented using Processor Expert plug-in Embedded Beanstechnology CodeWarrior Integrated Devolopment Environment (IDE). Processor Expert designed rapid application development embedded applications many platforms.
Embedded Beans
Embedded Beans design components which encapsulate functionality basic elements embedded systems such controller's core; on-chip peripherals; stand-alone peripherals; virtual devices; pure software algorithms. Embedded Beans allow access these facilities simple uniform interface properties, methods events. Additional information found Processor Expert help. Table lists beans used implementing 56F805 application.
Bean Modules
Each peripheral controller chip board accessible through bean. Processor Expert generates source code modules containing implementation methods controlling hardware which provides bean's functionality. following steps required generate code: beans your project (Processor Expert CodeWarrior's project panel) beans according hardware configuration Generate source code beans' methods your code (generated functions bean's methods named beanName_MethodName)
should modify generated modules; generated code found Files folder CodeWarriors's project panel. User modules, which meant modified user, found User Modules folder, where other user modules could also added. Events module (events.c) contains handling routines beans' events, those caused interrupt, example. Main module (projectName.c) contains function main() necessary declarations variables.
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Software implementation
enabled methods generated into appropriate bean modules during code generation process. Methods each bean inserted into project visible subtree bean Project panel (Processor Expert CodeWarrior's project panel). Figure Figure show list beans inserted project 56F805 56F8346 implementations. detailed list beans, Table Table 7-2.
Figure 7-1. Beans Used Implementing 56F805
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Bean Modules
Table 7-1. Beans Used Implementing 56F805
Bean name PC_Master Bean type PC_Master Description Provides serial communication with master software running using SCI0 on-chip device. Communication speed 9600bps. UpButtonFD, DownButtonFD Button Buttons used motor speed settings, with 75rpm step. Buttons connected IRQA IRQB inputs. Events:
LED1, LED2, LED3 LED_Green, LED_Red, LED_Yellow
OnButton Invoked pressing button
Beans control LEDs connected pins GPIOB0, GPIOB1 GPIOB2. Methods:
Switches Switches Toggle Reverses state
SwitchFD
Switch_RUNSTOP
Sets application state RUN/STOP. bean uses GPIOD5 input bit. Methods:
GetVal Reads switch state
Measures DCBus voltage temperature. bean uses channels (voltage) ADA5 (temperature) ADCA on-chip device. Methods: Events: OnEnd conversion. This event watches values voltage temperature. When values overrun allowed range, motor disconnected. OnHighLimit Switches brake OnLowLimit Switches brake
Measure Start measurement (length measurement 1.7us) GetChanValue Reading measured value from given channel SetHighChanLimit Sets upper limit value given channel SetLowChanLimit Sets lower limit value given channel
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Software implementation
Table 7-1. Beans Used Implementing 56F805 (Continued)
Bean name Bean type FreeCounter Description This timer bean watches 100ms minimum delay between presses Down buttons. bean uses on-chip device TMRD23. TimerLED TimerInt This timer controls LED's blinking. uses on-chip timer TMRA0. Events: TimerID FreeCntr16 OnInterrupt Toggles timer used identify hardware. Methods: TimerRamp TimerInt
Enable Starts timer Disable Disables timer
timer controlling acceleration/decceleration ramp. Methods: Events: OnInterrupt Sets speed needed
Enable Starts timer
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Bean Modules
Table 7-1. Beans Used Implementing 56F805 (Continued)
Bean name PwmFD Bean type PWMMC Description Controls state module motor applications. Frequency output 16kHz; dead time 2.5µs. Pulse width controlled application. Methods: Events: Onreload This event: Measures actual speed (MeasuredSpeed) Eliminates DCBus voltage ripples (mcgenDCBVoltRippleElim function) Calculates waveform generator (mcgen3PhWaveSine3rdHIntp function) Updates value registers StartsADC conversion OnFault0 Switches motor sets Overvoltage error flag OnFault1 Switches motor sets Overcurrent error flag
Enable Enables output Disable Disables output SetDuty Sets duty appropriate channel Load Updates control registers Swap Swaps pairs OutputPadEnable Enables signal output onto pins OutputPadDisable Disables signal output onto pins
Primary_UNI_3 PinIO
Accesses Primary Serial signal Primary connector. Uses GPIOD7 input bit. Methods:
GetVal reads input value
BrakeFD
PinIO
.Accesses signal switching brake on/off. Methods:
SetVal Switches brake ClrVal Switches brake
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Software implementation
Table 7-1. Beans Used Implementing 56F805 (Continued)
Bean name QuadFD Bean type QuadratureDecoder Description Computes position speed motor. Uses Quad Decoder0 on-chip device. Methods: mc_gen mc_lut MC_WaveGenerate MC_LookUpTable
CoeficientCalc Computes parameters' settings GetScalePositionDifference Computes position speed
Algorithm used determining state phases motor control. Look-up table algorithm. Methods:
lutGetValue Gets desired value from table
MC_ramp
MR_Ramp
Sets acceleration/decceleration ramp. Methods:
rampGetValue Gets ramp value
MC_PIController
Computes motor speed using controller. Methods:
controllerPItype1 controller algorithm
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Bean Modules
Figure 7-2. Beans Used Implementing 56F8346
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Software implementation
Table 7-2. Beans Used Implementation 56F8346
Bean name PC_Master Bean type PC_Master Description Provides serial communication with master software running using SCI0 on-chip device. Communication speed 9600bps. UpButtonFD, DownButtonFD Button Buttons used motor speed settings, with 75rpm step. Buttons connected GPIOE4 GPIOE7 inputs. Events: SwitchFD Switch_RUNSTOP OnButton Invoked pressing button Sets applcation state RUN/STOP. bean uses GPIOE5 input bit. Methods:
GetVal Reads switch state
Measures DCBus voltage temperature. bean uses channels (voltage) ADA5(temperature) ADCB on-chip device. Methods:
Measure Start measurement (length measurement 1.7us) GetChanValue Reading measured value from given channel SetHighChanLimit Sets upper limit value given channel SetLowChanLimit Sets lower limit value given channel
Events: OnEnd conversion. This event watches values voltage temperature. When values overrun allowed range, motor disconnected. OnHighLimit Switches brake OnLowLimit Switches brake
FreeCounter
This timer bean watches 100ms minimum delay between presses Down buttons. bean uses on-chip device TMRD23.
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Bean Modules
Table 7-2. Beans Used Implementation 56F8346 (Continued)
Bean name TimerLED Bean type TimerInt Description This timer controls LED's blinking. uses on-chip timer TMRB0. Events: TimerID FreeCntr16 OnInterrupt Toggles timer used identify hardware. Uses TMRA0 on-chip device. Methods: TimerRamp TimerInt
Enable Starts timer Disable Disables timer
timer controlling acceleration/decceleration ramp. Uses TMRA1 on-chip device. Methods: Events: OnInterrupt Sets speed needed
Enable Starts timer
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Software implementation
Table 7-2. Beans Used Implementation 56F8346 (Continued)
Bean name PwmFD Bean type PWMMC Description Controls state module motor-application. Frequency output 16kHz, Dead time 2.5us. Pulse width controlled application. Uses PWM_B on-chip device. Methods: Events: Onreload This event: Measures actual speed (MeasuredSpeed) Eliminates DCBus voltage ripples (mcgenDCBVoltRippleElim function) Calculate waveform generator (mcgen3PhWaveSine3rdHIntp function) Updates value registers Starts conversion OnFault0 Switches motor sets Overvoltage error flag OnFault1 Switches motor sets Overcurrent error flag
Enable Enables output Disable Disables output SetDuty Sets duty appropriate channel Load Updates control registers Swap Swaps pairs OutputPadEnable Enables signal output onto pins OutputPadDisable Disables signal output onto pins
Primary_UNI_3 PinIO
Accesses Primary Serial signal Primary connector. Uses GPIOE6 input bit. Methods:
GetVal Reads input value
BrakeFD
PinIO
Accesses signal switching break GPIOD7. Methods:
SetVal Switches brake ClrVal Switches brake
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Bean Modules
Table 7-2. Beans Used Implementation 56F8346 (Continued)
Bean name QuadFD Bean type QuadratureDecoder Description Computes position speed motor. Uses Quad Decoder1 on-chip device. Methods: mc_gen mc_lut MC_WaveGenerate MC_LookUpTable
CoeficientCalc Computes parameters' settings GetScalePositionDifference computes position speed
Algorithm used determining state phases motor control. Look-up table algorithm. Methods:
lutGetValue Gets desired value from table
MC_ramp
MR_Ramp
Sets acceleration/decceleration ramp. Methods:
rampGetValue Gets ramp value
MC_PIController
Computes motor speed using controller. Methods:
controllerPItype1 controller algorithm
PWMMC1
PWMMC
Sets LED's state EVM. bean uses LEDs connected outputs. Methods:
Mask Switches LEDs on/off
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Software implementation
7.2.1 Initialization
Main routine calls PE_low_level_init() function generated Processor Expert. This function pre-sets internal peripherals initial state according beans' settings. main method provides following application initialization: Sets upper lower limits converter Starts conversion Sets aplication state Identifies connected hardware Establishes Quadrature Encoder settings speed computation Sets controller
board identification routine identifies connected power stage board decoding identified message sent from power stage. wrong power stage identified, program goes infinite loop, displaying fault status LED. state left only reset.
State Diagram
general state diagram incorporates main routine entered from reset interrupt states. main routine includes initialization main loop. main loop incorporates initialization state, application state machine checks state Run/Stop switch. interrupt states calculates actual speed motor, reload event, service, Limit analog values handling, overcurrent overvoltage fault handler, other tasks.
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
State Diagram
reset
Initialization
done Application State Machine done Check Run/Stop Switch
Timer interrupt
Timer Subroutine done Timer Speed Ramp Interrupt
done limit Interrupt Timer Speed Ramp Subroutine done
Limit Interrupt Subroutine done high limit Interrupt
Reload Interrupt
High Limit Interrupt Subroutine done conversion complete Interrupt Interrupt Subroutine done
Reload Interrupt Subroutine done Fault Interrupt
Fault Interrupt Subroutine done
Figure 7-3. State Diagram General Overview
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
Master Software
7.3.1 Application State Machine
This state controls main application functions, depicted Figure 7-4.
Application State Machine Begin
Test Drive Fault Status NO_FAULT Test Application Mode STOP
RESET FAULT
Emergency Stop
Enable Calculate V/Hz Ramp
Speed Disable done
done
Application State Machine
Figure 7-4. State Application State Machine
7.3.2 Check Run/Stop Switch
this state, Run/Stop switch checked according Application Mode setting STOP directed. Individual driver functions provided special function calls, found under Processor Expert tab.
Master Software
master software designed provide debugging, diagnostic demonstration tool development algorithms applications. runs connected RS-232 serial cable. small program resident controller communicates with master software parse commands, return status information process control information from master software uses part Microsoft's Internet Explorer user interface. enable master software operation controller target board application, master software bean project configure This automatically
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
State Diagram
includes driver installs necessary services. communication's default baud rate 9600bd. automatically master software driver changed needed. detailed description master software provided dedicated User's Manual. 3-phase Motor V/Hz Speed Open Loop application utilizes master software remote control from enables user motor speed close loop Required actual motor speed Application operational mode Start/stop status DCBus voltage Temperature Phase voltage amplitude
master software reads displays these variables user:
master software Control Page illustrated Figure 8-1. Profiles required actual speeds seen Speed Scope window.
Figure 8-1. Control Window
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
References
References
DSP56F800 Family Manual, DSP56F800FM, Freescale Semiconductor DSP56F80x User's Manual, DSP56F801-7UM, Freescale Semiconductor DSP56F805 Evaluation Module Hardware User's Manual, DSP56F805EVM, Freescale Semiconductor DSP56800E Reference Manual, DSP56800ERM, Freescale Semiconductor MC56F8300 Peripheral User Manual, MC56F8300UM, Freescale Semiconductor MC56F8346 Evaluation Module Hardware User's Manual, MC56F8346EVMUM, Freescale Semiconductor 3-Phase Induction Motor Control V/Hz Application Closed Loop, 805ACIMTD, Freescale Semiconductor 3-Phase Induction Motor Control V/Hz Application Closed Loop, 8346ACIMTD, Freescale Semiconductor Cost 3-phase Motor Control System Based MC68HC908MR24, AN1664, Freescale Semiconductor Processor Expert Embedded Beans, Processor Expert Help more information, www.freescale.com
3-Phase Motor Control with V/Hz Speed Closed Loop, Rev. Freescale Semiconductor
State Diagram
3-Phase Motor Control with V/Hz Speed Closed Loop, 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. This product incorporates SuperFlash® technology licensed from SST. Freescale Semiconductor, Inc. 2005. rights reserved. AN1958 Rev. 07/2005

Other recent searches


TMS320DM647 - TMS320DM647   TMS320DM647 Datasheet
DM648 - DM648   DM648 Datasheet
TB6581H - TB6581H   TB6581H Datasheet
M74HC4075 - M74HC4075   M74HC4075 Datasheet
FP303 - FP303   FP303 Datasheet
CY7C1072AV33 - CY7C1072AV33   CY7C1072AV33 Datasheet
bq2403x - bq2403x   bq2403x Datasheet
A6300 - A6300   A6300 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive