| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
3-Phase Motor Control with V/Hz Speed Closed Loop Using 56F800/E
Top Searches for this datasheetOrder AN1958/D (Motorola Order Number) Rev. 9/2003 3-Phase Motor Control with V/Hz Speed Closed Loop Using 56F800/E Design Motor Control Application Based Processor Expert Contents Introduction Motorola Hybrid Controller Advantages Features Target Motor Theory 3-phase Induction Motor Drives Volts Hertz Control Speed Closed-Loop System. Introduction System Design Concept Hardware System Outline High-Voltage Hardware This application note describes design 3-phase induction motor drive with Volts Hertz control closed-loop (V/Hz CL). based Motorola's 56F800/E hybrid 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 Motorola hybrid 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 Motorola Hybrid Controller Advantages Features Master Software References Motorola 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 Motorola, Inc., 2002. rights reserved. More Information This Product, www.freescale.com 3-Phase Motor Control with V/Hz Speed Closed Loop Motorola Hybrid Controller Advantages Features (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. 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 hybrid 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 MOTOROLA More Information This Product, www.freescale.com Target Motor Theory 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 MOTOROLA 3-Phase Motor Control with V/Hz Speech Closed Loop More Information This Product, www.freescale.com 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 MOTOROLA More Information This Product, www.freescale.com Target Motor Theory 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. MOTOROLA 3-Phase Motor Control with V/Hz Speech Closed Loop More Information This Product, www.freescale.com 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) Corrected Speed (Omega_command) Speed Error Controller Controlled System Actual Motor Speed (Omega_actual) 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 MOTOROLA More Information This Product, www.freescale.com System Design Concept 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 system designed drive 3-phase induction motor. application meets following performance specifications: 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 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 hybrid controller runs main control algorithm generates 3-phase output signals motor inverter according user's interface input feedback signals. standard system concept chosen drive, illustrated Figure 4-1. system incorporates following hardware boards: Power supply rectifier 3-phase inverter MOTOROLA 3-Phase Motor Control with V/Hz Speech Closed Loop More Information This Product, www.freescale.com System Design Concept Feedback sensors: Speed DCBus voltage DCBus current Temperature Optoisolation Evaluation board Rectifier Line Voltage 230V/50Hz Three-Phase Inverter DC-Bus Isolation Barrier 3-ph Temperature, Current Voltage Sensing Optoisolation Optoisolation Temperature DC-Bus Voltage Over Current Over Voltage Temperature Voltage Processing Faults Processing Voltage DC-Bus Ripple Cancel. V/Hz Regulator 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 MOTOROLA More Information This Product, www.freescale.com 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 hybrid 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. MOTOROLA 3-Phase Motor Control with V/Hz Speech Closed Loop More Information This Product, www.freescale.com Hardware +12VDC flat ribbon cable, gray flat ribbon cable, gray JP1.1 JP1.2 Black Light Blue reen-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 hite, 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 Motorola standard product; Section information. 3-Phase Motor Control with V/Hz Speed Closed Loop MOTOROLA More Information This Product, www.freescale.com 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 MOTOROLA 3-Phase Motor Control with V/Hz Speech Closed Loop More Information This Product, www.freescale.com Software Design 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 MOTOROLA More Information This Product, www.freescale.com 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. MOTOROLA 3-Phase Motor Control with V/Hz Speech Closed Loop More Information This Product, www.freescale.com Software Design 0.90 0.80 0.70 0.60 0.50 0.40 0.30 0.20 0.10 u_dc_bus max] AmplitudeVolt Scale max] Amplitude [%Ampl max] 0.00 0.90 0.80 0.70 0.60 0.50 0.40 0.30 0.20 0.10 0.00 DutyCycle.PhaseA DutyCycle.PhaseB DutyCycle.PhaseC -100 PhA-PhB -150 PhB-PhC PhC-PhA Figure 6-3. 3-Phase Waveforms with DCBus Voltage Ripple Elimination 3-Phase Motor Control with V/Hz Speed Closed Loop MOTOROLA More Information This Product, www.freescale.com 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 MOTOROLA 3-Phase Motor Control with V/Hz Speech Closed Loop More Information This Product, www.freescale.com amplitude Software Design 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 6-2.) PWMC 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 Harmonic Harmonic Harmonic Harmonic DutyCycle.PhaseA DutyCycle.PhaseB DutyCycle.PhaseC Figure 6-5. 3-Phase Sine Waves with Harmonic Injection, Amplitude 100% 3-Phase Motor Control with V/Hz Speed Closed Loop MOTOROLA More Information This Product, www.freescale.com Software Design Figure defines duty cycles generated mcgen3PhWaveSine3rdHIntp function when Amplitude (50%). Harmonic Harmonic Harmonic Harmonic DutyCycle.PhaseA DutyCycle.PhaseB DutyCycle.PhaseC -0.1 -0.2 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. MOTOROLA 3-Phase Motor Control with V/Hz Speech Closed Loop More Information This Product, www.freescale.com Software implementation 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 hybrid 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 MOTOROLA More Information This Product, www.freescale.com 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 MOTOROLA 3-Phase Motor Control with V/Hz Speech Closed Loop More Information This Product, www.freescale.com Software implementation 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 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 MOTOROLA More Information This Product, www.freescale.com Software implementation Table 7-1. Beans Used Implementing 56F805 Bean name TimerLED Bean type TimerInt Description This timer controls LED's blinking. uses on-chip timer TMRA0. Events: TimerID FreeCntr16 OnInterrupt Toggles timer used identify hardware. Methods: Enable Starts timer Disable Disables timer TimerRamp TimerInt timer controlling acceleration/decceleration ramp. Methods: Events: OnInterrupt Sets speed needed Enable Starts timer PwmFD PWMMC Controls state module motor applications. Frequency output 16kHz; dead time 2.5µs. Pulse width controlled application. Methods: 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 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 MOTOROLA 3-Phase Motor Control with V/Hz Speech Closed Loop More Information This Product, www.freescale.com Software implementation Table 7-1. Beans Used Implementing 56F805 Bean name Primary_UNI_3 Bean type PinIO Description Accesses Primary Serial signal Primary connector. Uses GPIOD7 input bit. Methods: BrakeFD PinIO GetVal reads input value .Accesses signal switching brake on/off. Methods: SetVal Switches brake ClrVal Switches brake QuadFD QuadratureDecoder Computes position speed motor. Uses Quad Decoder0 on-chip device. Methods: CoeficientCalc Computes parameters' settings GetScalePositionDifference Computes position speed mc_gen MC_WaveGenerate Algorithm used determining state phases motor control. Look-up table algorithm. Methods: mc_lut MC_LookUpTable 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 MOTOROLA More Information This Product, www.freescale.com Software implementation Figure 7-2. Beans Used Implementing 56F8346 MOTOROLA 3-Phase Motor Control with V/Hz Speech Closed Loop More Information This Product, www.freescale.com 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. TimerLED TimerInt This timer controls LED's blinking. uses on-chip timer TMRB0. Events: OnInterrupt Toggles 3-Phase Motor Control with V/Hz Speed Closed Loop MOTOROLA More Information This Product, www.freescale.com Software implementation Table 7-2. Beans Used Implementation 56F8346 Bean name TimerID Bean type FreeCntr16 Description 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: PwmFD PWMMC Enable Starts timer OnInterrupt Sets speed needed Controls state module motor-application. Frequency output 16kHz, Dead time 2.5us. Pulse width controlled application. Uses PWM_B on-chip device. Methods: 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 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 MOTOROLA 3-Phase Motor Control with V/Hz Speech Closed Loop More Information This Product, www.freescale.com Software implementation Table 7-2. Beans Used Implementation 56F8346 Bean name Primary_UNI_3 Bean type PinIO Description Accesses Primary Serial signal Primary connector. Uses GPIOE6 input bit. Methods: BrakeFD PinIO GetVal Reads input value Accesses signal switching break GPIOD7. Methods: SetVal Switches brake ClrVal Switches brake QuadFD QuadratureDecoder Computes position speed motor. Uses Quad Decoder1 on-chip device. Methods: CoeficientCalc Computes parameters' settings GetScalePositionDifference computes position speed mc_gen MC_WaveGenerate Algorithm used determining state phases motor control. Look-up table algorithm. Methods: mc_lut MC_LookUpTable 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 MOTOROLA More Information This Product, www.freescale.com 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. MOTOROLA 3-Phase Motor Control with V/Hz Speech Closed Loop More Information This Product, www.freescale.com Software implementation reset Initialization done Application State Machine done Timer interrupt Timer Subroutine done Check Run/Stop Switch 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 Reload Interrupt Subroutine done Fault Interrupt Interrupt Subroutine done Fault Interrupt Subroutine done Figure 7-3. State Diagram General Overview 3-Phase Motor Control with V/Hz Speed Closed Loop MOTOROLA More Information This Product, www.freescale.com 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 RESET NO_FAULT FAULT Test Application Mode STOP 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 hybrid controller target board application, master software bean project configure This automatically includes driver installs necessary MOTOROLA 3-Phase Motor Control with V/Hz Speech Closed Loop More Information This Product, www.freescale.com Master Software 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 MOTOROLA More Information This Product, www.freescale.com References References DSP56F800 Family Manual, DSP56F800FM/D DSP56F80x User's Manual, DSP56F801-7UM/D DSP56F805 Evaluation Module Hardware User's Manual, DSP56F805EVM DSP56800E Reference Manual, DSP56800ERM/D MC56F8300 Peripheral User Manual, MC56F8300UM/D MC56F8346 Evaluation Module Hardware User's Manual, MC56F8346EVMUM 3-Phase Induction Motor Control V/Hz Application Closed Loop, 805ACIMTD/D, Motorola 3-Phase Induction Motor Control V/Hz Application Closed Loop, 8346ACIMTD/D, Motorola "Low Cost 3-phase Motor Control System Based MC68HC908MR24." Motorola Semiconductor Application Note, AN1664, 1998. Processor Expert Embedded Beans, Processor Expert Help more information, URL: MOTOROLA 3-Phase Motor Control with V/Hz Speech Closed Loop More Information This Product, www.freescale.com REACH USA/EUROPE/LOCATIONS LISTED: Motorola Literature Distribution; P.O. 5405, Denver, Colorado 80217 1-303-675-2140 1-800-441-2447 JAPAN: Motorola Japan Ltd.; SPS, Technical Information Center, 3-20-1, Minami-Azabu Minato-ku, Tokyo 106-8573 Japan 81-3-3440-3569 ASIA/PACIFIC: Motorola Semiconductors H.K. Ltd.; Silicon Harbour Centre, King Street, Industrial Estate, N.T., Hong Kong 852-26668334 TECHNICAL INFORMATION CENTER: 1-800-521-6274 HOME PAGE: Information this document provided solely enable system software implementers Motorola products. There express implied copyright licenses granted hereunder design fabricate integrated circuits integrated circuits based information this document. Motorola reserves right make changes without further notice products herein. Motorola makes warranty, representation guarantee regarding suitability products particular purpose, does Motorola assume liability arising application product circuit, specifically disclaims liability, including without limitation consequential incidental damages. "Typical" parameters which provided Motorola 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. Motorola does convey license under patent rights rights others. Motorola products designed, intended, authorized components systems intended surgical implant into body, other applications intended support sustain life, other application which failure Motorola product could create situation where personal injury death occur. Should Buyer purchase Motorola products such unintended unauthorized application, Buyer shall indemnify hold Motorola 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 Motorola negligent regarding design manufacture part. Motorola Stylized Logo registered U.S. Patent Trademark Office. digital trademark Motorola, Inc. This product incorporates SuperFlash® technology licensed from SST. other product service names property their respective owners. Motorola, Inc. Equal Opportunity/Affirmative Action Employer. Motorola, Inc. 2003 AN1958/D More Information This Product, www.freescale.com Other recent searchesW5603SYDL - W5603SYDL W5603SYDL Datasheet TPS62230 - TPS62230 TPS62230 Datasheet TPS62231 - TPS62231 TPS62231 Datasheet TPS62232 - TPS62232 TPS62232 Datasheet TPS62233 - TPS62233 TPS62233 Datasheet TPS62234 - TPS62234 TPS62234 Datasheet TPS62235 - TPS62235 TPS62235 Datasheet TPS62236 - TPS62236 TPS62236 Datasheet TPS62237 - TPS62237 TPS62237 Datasheet TPS62238 - TPS62238 TPS62238 Datasheet TPS62239 - TPS62239 TPS62239 Datasheet TPS622310 - TPS622310 TPS622310 Datasheet TPS622311 - TPS622311 TPS622311 Datasheet MAX1693 - MAX1693 MAX1693 Datasheet MAX1694 - MAX1694 MAX1694 Datasheet LD2981 - LD2981 LD2981 Datasheet LA4495 - LA4495 LA4495 Datasheet 4496 - 4496 4496 Datasheet KK-100 - KK-100 KK-100 Datasheet ISO15693-compliant - ISO15693-compliant ISO15693-compliant Datasheet BVH-C61YHYGY - BVH-C61YHYGY BVH-C61YHYGY Datasheet 2SK2182 - 2SK2182 2SK2182 Datasheet
Privacy Policy | Disclaimer |