Home

3-Phase AC Motor Control with V/Hz Speed Closed Loop Using the

image

Contents

1. Bean name Bean type Description PC Master PC Master Provides serial communication with the PC master software running on the PC using the SCIO on chip device Communication speed is 9600bps UpButtonFD Button Buttons are used for motor speed settings with a 75rpm step DownButtonFD Buttons are connected to GPIOE4 and GPIOE7 inputs Events OnButton Invoked by pressing the button SwitchFD Switch RUNSTOP Sets the applcation state to RUN STOP The bean uses GPIOES input bit Methods GetVal Reads the switch state Adc ADC Measures the DCBus voltage and temperature The bean uses channels ADO voltage and ADA5 temperature of the ADCB on chip device Methods Measure Start of the measurement length of the measurement is 1 7us GetChanValue Reading of the measured value from a given channel SetHighChanLimit Sets the upper limit value for a given channel e SetLowChanLimit Sets the lower limit value for a given channel Events OnEnd End of conversion This event watches the values of voltage and temperature When the values overrun the allowed range the motor is disconnected e OnHighLimit Switches brake on OnLowLimit Switches brake off FC1 FreeCounter This timer bean watches the 100ms minimum delay between presses of the Up and Down buttons The bean uses the on chip device TMRD23 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 26 Freescale Semiconduct
2. add pm f Hz Figure 6 2 Volt per Hertz Ramp 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 13 Software Design The Volts per Hertz ramp is defined by following parameters e Base point defined by f usually 50Hz or 60Hz e Boost point defined by Vyoostand fpoost Start point defined by V tart at zero frequency The ramp profile fits to the specific motor and can be easily changed to accommodate different motors Process Description This process provides voltage calculation according to Volts per Hertz ramp The input of this process is generated by desired inverter frequency Omega required The output of this process is AmplitudeVoltScale a parameter required by DCBus voltage ripple elimination process 6 1 5 DCBus Voltage Ripple Elimination Process Description The voltage ripple elimination process eliminates the influence of the DCBus voltage ripples to the generated phase voltage sine waves In fact it lowers the 50Hz or 60Hz acoustic noise of the motor Another positive aspect due to this function is the generated phase voltage which is independent of the level of DCBus voltage making the application easily adapted to power supply systems worldwide The process is performed by the mcgenDCBVoltRippleElim method of the MC WaveGenerate bean converting the phase voltage amplitude AmplitudeVoltScale to the sine wave amplitude Amplitude based on the actual value of the
3. 150 Figure 6 3 3 Phase Waveforms with DCBus Voltage Ripple Elimination 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 15 Software Design 6 1 6 PWM Generation Process Description This process generates a system of 3 phase sine waves with addition of third harmonic component shifted 120 to each other using mcgen3PhWaveSine3rdHIntp function from the motor control function library The function is based on a fixed wave table describing the first quadrant of sine wave stored in data memory of the controller Due to symmetry of sine function data in other quadrants are calculated using the data of first quadrant which saves data memory The sine wave generation for Phase A simplicity is explained in Figure 6 4 Phases B and C are shifted 120 with respect to Phase A Ox Tit ActualPhase n ag e T ETT PhaseIncrement i T J TO ctualPhase n 1 a E DutyCycle PhaseA _0x0000 AvRNNN 180no n Ov 7f 18nc Figure 6 4 Sine Wave generation 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor Data Flow Each time the waveform generation function is called ActualPhase from previous step is updated by Phaselncrement and according to the calculated phase the value of sine is fetched from the sine table by the function ffr 16SinPIxLUT from the Trigonometric Function Library in Processor Expert It s the
4. number of applications use the closed loop Volts per Hertz method because of its simple and relatively good speed accuracy but it is not suitable for systems requiring servo performance or excellent response to highly dynamic torque speed variations Figure 3 5 illustrates the general principle of the speed PI control loop Reference Corrected Speed Speed Speed Omega command Omega required Error PI C ontrolled y 2 J Controller g System Actual Motor Speed Omega_actual Figure 3 5 Closed Loop Control System The speed closed loop control is characterized by the measurement of the actual motor speed This information is compared with the reference speed while the error signal is generated The magnitude and polarity of the error signal correspond to the difference between the actual and required speed Based on the speed error the PI controller generates the corrected motor stator frequency to compensate for the error In an AC V Hz closed loop application the feedback speed signal is derived from the incremental encoder using the Quadrature Decoder The speed controller constants have been experimentally tuned according to the actual load 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor Speed Closed Loop System 4 System Design Concept The system is designed to drive a 3 phase AC induction motor The application meets the following performance s
5. ordered from Freescale as a standard product see Section 9 for information 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 11 Software Design 6 Software Design This section describes the design of the drive s software blocks and includes data flow and state diagrams 6 1 Data Flow The drive s requirements dictate that the software gather values from the user interface and sensors process them and generate 3 phase PWM signals for the inverter The control algorithm of the closed loop AC drive is described in Figure 6 1 The control algorithm s processes are described in the following subsections The detailed description is given to the subroutine s 3 phase PWM calculation and Volts per Hertz control algorithm Temperature DCBus Voltage PC SPEED INCREMENTAL A D A D MASTER SETTING ENCODER u dc bus Omega desired Speed Measurement Acceleration Deceleration Ramp Omega required PI Controller Omega command Omega actual Temperature Drive Fault Status AmplitudeVoltScale PWM Faults Overvoltage Overcurrent DCBus Voltage Ripple Elimination Amplitude PWM Generation PVALO PVAL2 PVAL4 Figure 6 1 Data Flow 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor Data Flow 6 1 1 Acceleration Deceleration Ramp The process calculates the new actual speed command based on the required speed and a
6. proportional to the respective variables The purpose of the Volts per Hertz control scheme is to maintain the air gap flux of AC induction motor in constant achieving higher run time efficiency In steady state operation the machine air gap flux is approximately related to the ratio V f where V is the amplitude of motor phase voltage and f is the synchronous electrical frequency applied to the motor The control system is illustrated in Figure 3 4 The characteristic is defined by the base point of the motor Below the base point the motor operates at optimum excitation due to the constant V f ratio Above this point the motor operates under excited because of the DCBus voltage limit A simple closed loop Volts per Hertz speed control for an induction motor is the control technique targeted for low performance drives This basic scheme is unsatisfactory for more demanding applications where speed precision is required 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 5 Target Motor Theory Volt per Hertz Characteristic Motor Base 100 Point Amplitude Base Frequency Frequency Frequency Frequency Figure 3 4 Volts per Hertz Control Method 3 3 Speed Closed Loop System To improve system performance a closed loop Volts per Hertz control was introduced In this method a speed sensor measures the actual motor speed and the system takes this input into consideration A
7. DCBus voltage u dc bus and the inverse value of the modulation index ModulationIndexInverse The modulation index is the ratio between the maximum amplitude of the first harmonic of the phase voltage in voltage scale and half of the DCBus voltage in voltage scale which is defined by the following formula 1 m phasemax _ 2 i B EQ 6 1 2 UD CBus The modulation index is specific to a given 3 phase generation algorithm in this application it is 1 27 Note The result of the modulation index is based on the 3rd harmonic injection PWM technique The first chart in Figure 6 3 demonstrates how the Amplitude 1n scale of generated sine wave amplitude is counter modulated to eliminate the DCBus ripples The second chart delineates the duty cycles generated by one of the 3 phase wave generation functions The third chart contains symetrical sine waves of the phase to phase voltages actually applied to the 3 phase motor 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 14 Freescale Semiconductor Data Flow 20 1 u dc bus 5 U max AmplitudeVolt Scale 55 U max Amplitude Ampl max DutyCycle PhaseA DutyCycle PhaseB 5 DutyCycle PhaseC 50 100 PhA PhB V PhB PhC V PhC PhA V
8. Freescale Semiconductor Bean Modules Overheating The temperature of the power module sensed by ADC is compared with the limit set in the software If overheating occurs after a period defined by OVERHEATING COUNT all motor control PWM outputs are disabled and the DriveFaultStatus variable is set to OverHeating Wrong Hardware If the wrong hardware for example a different power module or missing optoisolation board is identified during initialization the DriveFaultStatus variable is set to Wrong Hardware If any of these faults occur the program run into infinite loop and waits for reset The fault is signaled by user LEDs on the controller board and on the PC master software control screen 7 Software implementation This project is implemented using Processor Expert plug in and Embedded Beans M technology in the CodeWarrior Integrated Devolopment Environment IDE Processor Expert is designed for rapid application development of embedded applications on many platforms 7 1 Embedded Beans Embedded Beans are design components which encapsulate functionality of basic elements of embedded systems such as the controller s core on chip peripherals stand alone peripherals virtual devices and pure software algorithms Embedded Beans allow access to these facilities via simple and uniform interface of properties methods and events Additional information can be found in Processor Expert help Table 7 1 lists the beans used in implemen
9. Freescale Semiconductor AN1958 Application Note Rev 0 07 2005 3 Phase AC Motor Control Contents with V Hz Speed Closed 1 Introduction seeee 1 Loo p U S Ng th e 56 F800 E 2 Freescale Controller Advantages and i FeatUres concerne 1 Design of a Motor Control Application Based on Processor Expe rt 3 Target Motor Theory 3 3 1 3 phase AC Induction Motor Drives3 3 2 Volts per Hertz Control 5 3 3 Speed Closed Loop System 6 Introduction l 4 System Design Concept 7 This application note describes the design of a 3 phase AC induction motor drive with Volts per Hertz control in closed loop 5 Hardware cccccecssesseesseeecseeseeseens 10 V Hz CL It is based on Freescale s 56F800 E microcontrollers 5 1 System Outline 10 which are ideal for motor control applications The system is 5 2 High Voltage Hardware Set 10 designed as a motor control system for driving medium power n D 3 phase AC induction motors The part is targeted toward 6 Software ESIET a ge 6 1 Data Flow 12 applications in both the industrial and home appliance industries 611 A NOME l cceleration Deceleration such as washing machines compressors air conditioning units Biden ME E 13 pumps or simple industrial drives 6 1 2 Speed Measurement 13 The drive introduced here is intended as an
10. Hz Speed Closed Loop Rev 0 Freescale Semiconductor 7 System Design Concept A standard system concept is chosen for the drive illustrated in Figure 4 1 The system incorporates the following hardware boards e Power supply rectifier e 3 phase inverter e Feedback sensors Speed DCBus voltage DCBus current Temperature e Optoisolation Evaluation board 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 8 Freescale Semiconductor Speed Closed Loop System Rectifier Three Phase Inverter DC Bus Line Voltage uu 230V 50Hz T M AM M Temperature IRC Current amp Isolation Barrier Voltage Sensing Optoisolation Optoisolation M M M Temperature Over Current amp amp PWM DC Bus Voltage Over Voltage Temperature i 2 Faults amp Voltage i Processing i Processing i DC Bus Voltage Vl DC Bus V2 PWM V Hz Ripple Generator Cancel with Dal aes Dead Time Regulator F Speed Set up Speed Command SQ Processing Actual Speed Speed Processing Incremental Decoder Figure 4 1 System Concept 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 9 Hardware The Control Process When the start command is accepted using the Start Stop switch the state of the inputs is periodically scanned According to the state of the control signals Start Stop switch speed up down buttons or PC master softwar
11. adEnable Enables signal output onto CPU pins e OutputPaaDisable Disables signal output onto CPU pins Events Onreload This event Measures actual speed MeasuredSpeed Eliminates DCBus voltage ripples mcgenDCBVoltRippleElim function Calculates waveform generator mcgen3PhWaveSine3rdHintp function Updates PWM value registers StartsADC conversion OnFault0 Switches the motor off and sets the Overvoltage error flag OnFault1 Switches the motor off and sets the Overcurrent error flag Primary UNI 3 PinlO Accesses the Primary Serial COM signal of Primary UNI connector Uses the GPIOD7 input bit Methods e GetVal reads the input value BrakeFD PinlO Accesses the signal for switching brake on off Methods e SetVal Switches brake on CIrVal Switches brake off 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 23 Software implementation Table 7 1 Beans Used in Implementing the 56F805 Continued Bean name Bean type Description QuadFD QuadratureDecoder Computes the position and speed of the motor Uses the Quad Decoder0 on chip device Methods e CoeficientCalc Computes parameters settings GetScalePositionDifference Computes position and speed mc gen MC WaveGenerate Algorithm used for determining the state of phases for motor control mc lut MC LookUpTable Look up table algorithm Methods
12. ation Incremental Encoder Cable gt Connector Table Cable Wire Color Desc Brown 5VDC White Shielding Ground and Shielding Green Phase Yellow Phase B Pink Index Unused Unused Figure 5 1 High Voltage Hardware System Configuration All the system parts are supplied and documented according the following references UI Controller board Supplied as 56F80x or 56F83xx EVM Described in the 56F80x or 56F83xx Evaluation Module Hardware User s Manual for the device being implemented e U2 3 phase AC BLDC high voltage power stage Supplied in kit with optoisolation board Order ECOPTHIVACBLDC Described in Described in 3 Phase Brushless DC High Voltage Power Stage Order MEMC3BLDCPSUM D e U3 Optoisolation board or Supplied with 3 phase AC BLDC high voltage power stage Order ECOPTHIVACBLDC Supplied alone Order ECOPT Described in Optoisolation Board User s Manual e MBI motor brake AM40V SG40N Warning Note Order ECMTRHIVAC It is strongly recommended that you use optoisolation optocouplers and optoisolation amplifiers during development to avoid any damage to the development equipment A detailed description of individual boards can be found in the comprehensive user s manual for each board The manual incorporates the schematic of the board a description of individual function blocks and a bill of materials Individual boards can be
13. aves with 3rd Harmonic Injection Amplitude 50 Input process e Amplitude is obtained from the DCBus ripple elimination process Omega required is obtained from acceleration deceleration ramp process Output process Results calculated by the mcgen3PhWaveSine3rdHIntp function are passed directly to the PWM value registers using the PWM driver 6 1 7 Fault Control This process is responsible for fault handling The software accommodates five fault inputs overcurrent overvoltage undervoltage overheating and wrong identified hardware Overcurrent If overcurrent occurs in the DCBus link the external hardware provides a rising edge on the controller s fault input pin FAULTAI This signal immediately disables all motor control PWM outputs PWMI PWM6 and sets the DC Bus OverCurrent bit of DriveFaultStatus variable Overvoltage If overvoltage occurs in the DCBus link the external hardware provides a rising edge on the controller s fault input pin FAULTAO This signal immediately disables all motor control PWM outputs PWMI PWM6 and sets the DC Bus OverVoltage bit of DriveFaultStatus variable Undervoltage The DCBus voltage sensed by ADC is compared with the limit set in the software If undervoltage occurs after a period defined by UNDERVOLTAGE COUNT all motor control PWM outputs are disabled and the DriveFaultStatus variable is set to DC Bus UnderVoltage 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0
14. ccording to the acceleration deceleration ramp The desired speed is determined either by push buttons or by the PC master software During deceleration the motor can work as a generator In the generator state the DCBus capacitor is charged and its voltage can easily exceed its maximum voltage Therefore the voltage level in the DCBus link is controlled by a resistive brake operating in case of overvoltage The process input parameter is Omega desired the desired speed The process output parameter is Omega required used as an input parameter of the PWM generation process 6 1 2 Speed Measurement The speed measurement process uses the on chip Quadrature Decoder The process output is MeasuredSpeed and is only used as an information value in PC master software 6 1 3 PI Controller The PI controller process takes the input parameters actual speed command Omega required and actual motor speed measured by a incremental encoder Omega actual then calculates a speed error and performs the speed PI control algorithm The output of the PI controller is a frequency of the first harmonic sine wave to be generated by the inverter Omega command 6 1 4 V Hz Ramp The drive is designed as a Volts per Hertz drive which means the control algorithm keeps the constant motor s magnetizing current flux by varying the stator voltage with frequency A commonly used Volts per Hertz ramp of a 3 phase AC induction motor is illustrated in Figure 6 2
15. d for surgical implant into the body or other applications intended to support or sustain life or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur Should Buyer purchase or use Freescale Semiconductor products for any such unintended or unauthorized application Buyer shall indemnify and hold Freescale Semiconductor and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death associated with such unintended or unauthorized use even if such claim alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part e eo freescale semiconductor Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners This product incorporates SuperFlash technology licensed from SST Freescale Semiconductor Inc 2005 All rights reserved AN1958 Rev 0 07 2005
16. e set speed the speed command is calculated using an acceleration deceleration ramp The comparison between the actual speed command and the measured speed generates a speed error E The speed error is brought to the speed PI controller which generates a new corrected motor stator frequency With the use of the V Hz ramp the corresponding voltage is calculated and then DCBus ripple cancellation function then eliminates the influence of the DCBus voltage ripples to the generated phase voltage amplitude The PWM generation process calculates a 3 phase voltage system at the required amplitude and frequency including dead time Finally the 3 phase PWM motor control signals are generated The DCBus voltage and power stage temperature are measured during the control process They protect the drive from overvoltage undervoltage and overheating Both undervoltage protection and overheating are performed by ADC and software while the DCBus overcurrent and overvoltage fault signals are connected to PWM fault inputs If any of the above mentioned faults occurs the motor control PWM outputs are disabled to protect the drive and the fault state of the system is displayed in PC master software control page 5 Hardware 5 1 System Outline The motor control system is designed to drive the 3 phase AC motor in a speed closed loop Software is targeted for these controllers and evaluation modules EVMs 56F805 56F8346 The hardware set up depe
17. ed es e 9 TM z freescale semiconductor Freescale Controller Advantages and Features A typical member of the 56F800 family the 56F805 provides the following peripheral blocks Two Pulse Width Modulators PWMA amp PWMB each with six PWM outputs three current status inputs and four fault inputs fault tolerant design with dead time insertion supports both center and edge aligned modes Two 12 bit Analog to Digital Converters ADCs supporting two simultaneous conversions with dual 4 pin multiplexed inputs can be synchronized by PWM modules Two quadrature decoders Quad Dec0 amp Quad Dec1 each with four inputs or two additional quad timers A amp B Two dedicated general purpose quad timers totalling six pins Timer C with two pins and Timer D with four pins CAN 2 0 A B module with 2 pin ports used to transmit and receive Two Serial Communication Interfaces SCIO amp SCI1 each with two pins or four additional MPIO lines Serial Peripheral Interface SPI with configurable 4 pin port or four additional MPIO lines Computer Operating Properly COP timer Two dedicated external interrupt pins Fourteen dedicated multiple purpose I O MPIO pins and 18 multiplexed MPIO pins External reset pin for hardware reset JTAG on chip emulation OnCE Software programmable phase lock loop based frequency synthesizer for the controller core clock The Pulse Width Modulation PWM block offers high freed
18. er P O Box 5405 Denver Colorado 80217 1 800 441 2447 or 303 675 2140 Fax 303 675 2150 LDCForFreescaleSemiconductor hibbertgroup com Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document Freescale Semiconductor reserves the right to make changes without further notice to any products herein Freescale Semiconductor makes no warranty representation or guarantee regarding the suitability of its products for any particular purpose nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability including without limitation consequential or incidental damages Typical parameters that may be provided in Freescale Semiconductor data sheets and or specifications can and do vary in different applications and actual performance may vary over time All operating parameters including Typicals must be validated for each customer application by customer s technical experts Freescale Semiconductor does not convey any license under its patent rights nor the rights of others Freescale Semiconductor products are not designed intended or authorized for use as components in systems intende
19. ert tab of CodeWarrior s project panel Figure 7 1 and Figure 7 2 show the list of beans inserted in the project for 56F805 and 56F8346 implementations To see a detailed list of beans see Table 7 1 and Table 7 2 m3 ac closed loop mcp dri xj ext RAM mode 3 w hostio Bw A a fal Files Link Order Targets Processor Expert Configurations amp Operating System E CPUs lt Cpu 56F805 El Beans Ej v LED1 56FB0SEVM LED Green LED 1 9 Inhrl BitlO Bitl D Ei M On E B Off Ei FM Toggle B M Set Tx Fi Status Ix M ConnectPin lt LED2 56F805EVM LED Red LED lt LED3 56F80BEVM LED Yellow LED z Q ADCADC timerlD FreeCntrl 6 Z amp timerLED Timerint Ti timerR amp Timerlnt pemFD PWMMC 9 Primary LINI 3 PinlO Bitl 2 3 BrakeFD PinlO Bitl D e UpButtonFD 55F805EVM Button IRGA BUTTON e DownButtonFD 56F805EVM Button IRGB BUTTON 3 SwitchFD 5BFB05EVM Switch RUNSTOP SWITCH v d FC1 BUTTONButton_Counter FreeCnitr 1 o quadFD QuadratureD ecoder 7 amp mc gen MC WaveGenerate mc lut MC LookUpT able 4 mc ramp MC Ramp lt MCT MC PlController lt TFRI DSP Func TFR lt MFRI1 DSP_Func_MFR e ea v B PC MIT PC Master Documentation x PESL Figure 7 1 Beans Used in Implementing the 56F805 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 20 Freescale Semiconductor Bean Modules Table 7 1 Beans Used in Implemen
20. example of a 3 phase PRA VEINS LN i AC induction motor drive The drive serves as an example of AC 615 DCBus Voltage Ripple en V Hz motor control system design using Freescale s controller EliminstiOn 2e eee cen mte 14 with Processor Expert M PE support 6 1 6 PWM Generation 16 i 6 1 7 Faul mE 1 This document includes the basic motor theory system design Cea concept hardware implementation and software design 7 Software implementation 19 including the PC master software visualization tool inclusion I Embedded OAS 0 5 cack 19 7 2 Bean Modules 19 7 2 1 Initialization sss 30 2 Freescale Controller Advantages 73 State Diagram 30 7 3 1 Application State Machine 32 and Features 7 3 2 Check Run Stop Switch 32 The Freescale 56F800 E families are ideal for digital motor control combining the DSP s calculation capability with the SEG Mastek OO NATE nisaire me MCU s controller features on a single chip These controllers 9 References 34 offer a rich dedicated peripherals set such as Pulse Width a Modulation PWM modules Analog to Digital Converter ADC timers communication peripherals SCI SPI CAN on board Flash and RAM Several parts comprise the family 56F80x with different peripherals and on board memory configurations Generally all are suited for motor control Freescale Semiconductor Inc 2004 2005 All rights reserv
21. lutGetValue Gets the desired value from the table MC ramp MR Ramp Sets the acceleration decceleration ramp Methods rampGetValue Gets the ramp value MC1 MC PlController Computes motor speed using the PI controller Methods controllerPItype1 PI controller algorithm 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 24 Freescale Semiconductor Bean Modules m CloseLoop mcp Me Xl sdm external memory i A s Files Link Order Targets Processor Expert E Configurations v amp sdm external memory X 2 Idm external memory amp Operating System E amp CPUs lt Cpu 56F8346 El Beans lt amp PC MT PC Master v amp ADCADC E timerR amp Timerlnt amp pwmFD PwMMC 9 Primary UNI 3 PinlO BitlO 4 9 BrakeFD PinlO Bitl 2 Z amp SwitchFD Switch vd e UpButtonFD Button e DownButtonFD Button i FC1 BUTTON Button_Counter FreeCntr o quadFD QuadratureD ecoder me_gen MC_WaveGenerate Z me_lut MC_LookUpT able BY mc ramp MC Ramp E M rampGetValue v amp MCT MC PlController v TFR1 DSP_Func_TFR z MFR1 DSP_Func_MFR v MEM1 DSP_MEM 4 QU PWMCTPWMMC amp Documentation PESL Figure 7 2 Beans Used in Implementing the 56F8346 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 25 Software implementation Table 7 2 Beans Used in Implementation the 56F8346
22. n multiplied by amplitude and passed to the PWM An explanation of the 3 phase waveform generation with 3rd harmonic additionis found in the following formulas PWMA P Amplitude sina F i sin3a 0 5 NE 6 PWMB Amplitude sinc 120 l sin3a t 0 5 EQ 6 2 1 NC PWMC Amplitude sino 2409 sin3a 0 5 B 6 Where PWMA PWMB and PWMC are calculated duty cycles passed to the PWM driver and amplitude determine the level of phase voltage amplitude The process performed in the PWM reload callback function pwm Reload A ISR is accessed regularly at the rate given by the set PWM reload frequency This process is repeated often enough to compare it to the wave frequency Wave length comparisons are made to generate the correct wave shape Therefore for 16kHz PWM frequency it is called each fourth PWM pulse thus the PWM registers are updated in a 4kHz rate every 250usec Figure 6 5 shows the duty cycles generated by the mcgen3PhWaveSine3rdHIntp function when Amplitude is 1 100 1st Harmonic A 1st Harmonic B 1st Harmonic B Figure 6 5 3 Phase Sine Waves with 3rd Harmonic Injection Amplitude 100 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 17 Software Design Figure 6 6 defines the duty cycles generated by the mcgen3PhWaveSine3rdHIntp function when Amplitude is 0 5 50 Figure 6 6 3 Phase Sine W
23. ncorporates the initialization state the application state machine and checks the state of the Run Stop switch The interrupt states calculates the actual speed of the motor PWM reload event ADC service Limit analog values handling overcurrent and overvoltage PWM fault handler and other tasks 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 30 Freescale Semiconductor reset Initialization Application State Machine Check Run Stop Switch done ADC low limit Interrupt ADC Low Limit Interrupt Subroutine ADC high limit Interrupt ADC High Limit Interrupt Subroutine ADC conversion complete Interrupt ADC Interrupt Subroutine ms State Diagram OC Timer for LED interrupt Timer OC LED Subroutine OC Timer for Speed Ramp Interrupt Timer OC Speed Ramp Subroutine PWM A Reload Interrupt PWM Reload A Interrupt Subroutine PWM A Fault Interrupt PWM Fault A Interrupt Subroutine Figure 7 3 State Diagram General Overview 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 31 PC Master Software 7 3 1 Application State Machine This state controls the main application functions depicted in Figure 7 4 Application State Machine Begin Test Drive Fault Status RESET Test Application Mode Enable PWM Calculate V Hz Ramp Disable PWM A
24. nd the natural points of intersection determine the switching points of the power devices of a half bridge inverter This technique is shown in Figure 3 3 The 3 phase voltage waves are shifted 120 to each other and thus a 3 phase motor can be supplied 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 4 Freescale Semiconductor Volts per Hertz Control Generated PWM Carrier Sne Wave Wave 1 Upper Switch cot PWM Output T l l l LI Lower Switch 9 wt Figure 3 3 Pulse Width Modulation The most popular power devices for motor control applications are Power MOSFETs and IGBTs A Power MOSFET is a voltage controlled transistor It is designed for high frequency operation and has a low voltage drop resulting in low power losses However the saturation temperature sensitivity limits the MOSFET application in high power applications An Insulated Gate Bipolar Transistor IGBT is a bipolar transistor controlled by a MOSFET on its base The IGBT requires low drive current has fast switching time and is suitable for high switching frequencies The disadvantage is the higher voltage drop of the bipolar transistor causing higher conduction losses 3 2 Volts per Hertz Control The Volts per Hertz control method the most popular technique of Scalar Control controls the magnitude of such variables as frequency voltage or current The command and feedback signals are DC quantities and are
25. nds on the evaluation module EVM module used The software can run only on the high voltage hardware set described in Section 5 2 Other power module boards will be denied due to the board identification build in the software This feature protects misuse of hardware module The hardware set up is shown in Figure 4 1 but it can also be found in the documentation for the device being implemented 5 2 High Voltage Hardware Set The system configuration is shown in Figure 5 1 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor Inci Baumer Electric BHK16 05A 1024 12 5 High Voltage Hardware Set 12VDC gt GND gt 40w flat ribbon 40w flat ribbon U3 cable gray U2 cable gray U1 JP1 1 P1 2 Lo Bek 000 ud 3ph AC BLDC Now LuhtBe Hr12 High Voltage Optoisolation Controller Board PE 5 Green Yellow Power Stage J14 n Board J2 n ECOPT 913 1 pz T33 i pin conn ck e Rel TY Brak AMP A2510 Qtor 9raxe ECOPTHIVACBLDC i Encoder Conn Table AM40V SG40N E Controler Conn i SGF803 32 e ee i 56F805 323 J5 E 56F807 J4 l Hall Sensor Encoder 00126A remental Encoder Not used in applic
26. om in its configuration enabling efficient control of the AC induction motor The PWM block has the following features e Three complementary PWM signal pairs or six independent PWM signals Features of complementary channel operation Dead time insertion Separate top and bottom pulse width correction via current status inputs or software Separate top and bottom polarity control Edge aligned or center aligned PWM reference signals 15 bits of resolution Half cycle reload capability Integral reload rates from one to 16 Individual software controlled PWM outputs Programmable fault protection Polarity control 20 mA current sink capability on PWM pins Write protectable registers The PWM outputs are configured in the complementary mode in this application 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 3 phase AC Induction Motor Drives 3 Target Motor Theory 3 1 3 phase AC Induction Motor Drives The AC induction motor is a workhorse with adjustable speed drive systems The most popular type is the 3 phase squirrel cage AC induction motor It is a maintenance free less noisy and efficient motor The stator 1s supplied by a balanced 3 phase AC power source The synchronous speed n of the motor is calculated by 120 x f 2 P rpm EQ 3 1 n where f is the synchronous stator frequency in Hz and p is the number of stator poles The load torque is produced by slip f
27. or Table 7 2 Beans Used in Implementation the 56F8346 Continued Bean Modules Bean name Bean type Description TimerLED Timerlnt This timer controls the LED s blinking It uses the on chip timer TMRBO Events Onlnterrupt Toggles the LED on and off TimerlD FreeCntr16 The timer used to identify hardware Uses the TMRAO on chip device Methods Enable Starts the timer Disable Disables the timer TimerRamp Timerlnt The timer controlling the acceleration decceleration ramp Uses the TMRA1 on chip device Methods Enable Starts the timer Events Onlnterrupt Sets the speed as needed 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 27 Software implementation Table 7 2 Beans Used in Implementation the 56F8346 Continued Bean name Bean type Description PwmFD PWMMC Controls the state of PWM module for motor application Frequency of the PWM output is 16kHz Dead time is 2 5us Pulse width is controlled by the application Uses the PWM B on chip device Methods Enable Enables PWM output Disable Disables PWM output SetDuty Sets duty on the appropriate PWM channel Load Updates control registers Swap Swaps PWM pairs e OutputPadEnable Enables signal output onto CPU pins OutputPaaDisable Disables signal output onto CPU pins Events Onreload Thi
28. pecifications e Targeted for 56F800 E EVM platforms Running on 3 phase ACIM motor control development platform at variable line voltage 115 230V AC e Control technique incorporates motoring and generating mode bi directional rotation V Hz speed closed loop e Manual interface Start Stop switch Up Down push button speed control LED indication e PC master software interface motor start stop speed set up e Power stage identification e Overvoltage undervoltage overcurrent and overheating fault protection The AC drive introduced here is designed as a system that meets the general performance requirements in Table 4 1 Table 4 1 Motor Drive Specification Motor Characteristics Motor Type Four poles 3 Phase star connected squirrel cage AC motor standard industrial motor Speed Range 5000rpm Base Electrical Frequency 50Hz Max Electrical Power 180W Delta Voltage rms 200V Star Drive Characteristics Transducers IRC 1024 pulses per revolution Speed Range 2250 rpm 230 V 1200 rpm Q 115 V Line Input 230V 50Hz AC 115V 60Hz AC Maximum DCBus Voltage 400V Control Algorithm Closed Loop Control Optoisolation Required Load Characteristic Type Varying The controller runs the main control algorithm and generates 3 phase PWM output signals for the motor inverter according to the user s interface input and feedback signals 3 Phase AC Motor Control with V
29. pplication State Machine End Figure 7 4 State Application State Machine 7 3 2 Check Run Stop Switch In this state the Run Stop switch is checked according to the Application Mode setting and is set to RUN or STOP as directed Individual driver functions are provided by special PE function calls found under the Processor Expert tab 8 PC Master Software PC master software was designed to provide a debugging diagnostic and demonstration tool for the development of algorithms and applications It runs on a PC connected to the EVM via an RS 232 serial cable A small program resident in the controller communicates with the PC master software to parse commands return status information to the PC and process control information from the PC PC master software uses part of Microsoft s Internet Explorer as the user interface To enable PC master software operation on the controller target board application add the PC master software bean to the project and configure it This automatically 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 32 Freescale Semiconductor State Diagram includes the SCI driver and installs all necessary services The SCI communication s default baud rate is 9600bd It is set automatically by the PC master software driver and can be changed if needed A detailed description of PC master software is provided in a dedicated User s Manual The 3 phase AC Motor V Hz Speed Open Loop application utili
30. requency The motor speed is characterized by a slip s ee ny _ E EQ 3 2 S where n is the rotor mechanical speed and ng is the slip speed both in rpm Figure 3 1 illustrates the torque characteristics and corresponding slip As can be seen from EQ 3 1 and EQ 3 2 the motor speed is controlled by variation of a stator frequency with the influence of the load torque Working Point Figure 3 1 Torque Speed Characteristic at Constant Voltage and Frequency 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 3 Target Motor Theory In adjustable speed applications the AC motors are powered by inverters The inverter converts DC power to AC power at required frequency and amplitude The typical 3 phase inverter is illustrated in Figure 3 2 DGc Bus Phase AC Molar Figure 3 2 3 Phase Inverter The inverter consists of three half bridge units the upper and lower switches are controlled complementarily which means that when the upper one is turned on the lower one must be turned off and vice versa As the power device s turn off time is longer than its turn on time some dead time must be inserted between the turn off of one transistor of the half bridge and the turn on of its complementary device The output voltage is mostly created by a Pulse Width Modulation PWM technique where an isosceles triangle carrier wave is compared with a fundamental frequency sine modulating wave a
31. s event Measures actual speed MeasuredSpeed Eliminates DCBus voltage ripples mcgenDCBVoltRippleElim function Calculate waveform generator mcgen3PhWaveSine3rdHintp function Updates PWM value registers Starts ADC conversion OnFaultO Switches the motor off and sets the Overvoltage error flag OnFault1 Switches the motor off and sets the Overcurrent error flag Primary UNI 3 PinlO Accesses the Primary Serial COM signal of the Primary UNI connector Uses the GPIOEG input bit Methods e GetVal Reads the input value BrakeFD PinlO Accesses the signal for switching the break on and off on GPIOD7 Methods SetVal Switches brake on CirVal Switches brake off 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 28 Freescale Semiconductor Bean Modules Table 7 2 Beans Used in Implementation the 56F8346 Continued Bean name Bean type Description QuadFD QuadratureDecoder Computes the position and speed of the motor Uses the Quad Decoder1 on chip device Methods e CoeficientCalc Computes parameters settings GetScalePositionDifference computes position and speed mc gen MC WaveGenerate Algorithm used for determining the state of phases for motor control mc lut MC LookUpTable Look up table algorithm Methods lutGetValue Gets the desired value from the table MC ramp MR Ramp Sets the acceleration deccelera
32. t Switches brake off 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 21 Software implementation Table 7 1 Beans Used in Implementing the 56F805 Continued Bean name Bean type Description FC1 FreeCounter This timer bean watches the 100ms minimum delay between presses of the Up and Down buttons The bean uses the on chip device TMRD23 TimerLED Timerlnt This timer controls the LED s blinking It uses the on chip timer TMRAO Events Oninterrupt Toggles the LED on and off TimerlD FreeCntr16 The timer used to identify hardware Methods Enable Starts the timer Disable Disables the timer TimerRamp Timerlnt The timer controlling the acceleration decceleration ramp Methods Enable Starts the timer Events Onlnterrupt Sets the speed as needed 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 22 Freescale Semiconductor Bean Modules Table 7 1 Beans Used in Implementing the 56F805 Continued Bean name Bean type Description PwmFD PWMMC Controls the state of the PWM module for motor applications Frequency of the PWM output is 16kHz dead time is 2 5us Pulse width is controlled by the application Methods Enable Enables PWM output Disable Disables PWM output SetDuty Sets duty on the appropriate PWM channel Load Updates control registers Swap Swaps PWM pairs e OutputP
33. ting the 56F805 Bean name Bean type Description PC Master PC Master Provides serial communication with the PC master software running on a PC using the SCIO on chip device Communication speed is 9600bps UpButtonFD Button Buttons are used for motor speed settings with a 75rpm step DownButtonFD Buttons are connected to IRQA and IRQB inputs Events e OnButton Invoked by pressing the button LED1 LED2 LED Green LED Red Beans control the LEDs on the EVM connected to pins LED3 LED_Yellow GPIOBO GPIOB1 and GPIOB2 Methods On Switches the LED on On Switches the LED on Toggle Reverses the state of the LED SwitchFD Switch RUNSTOP Sets the application state to RUN STOP The bean uses the GPIOD5 input bit Methods GetVal Reads the switch state Adc ADC Measures the DCBus voltage and temperature The bean uses channels ADO voltage and ADA5 temperature of the ADCA on chip device Methods Measure Start of the measurement length of the measurement is 1 7us e GetChanValue Reading of the measured value from given channel SetHighChanLimit Sets the upper limit value for a given channel SetLowChanLimit Sets lower limit value for a given channel Events OnEnd End of conversion This event watches the values of voltage and temperature When the values overrun the allowed range the motor is disconnected e OnHighLimit Switches brake on OnLowLimi
34. ting the 56F805 application 7 2 Bean Modules Each peripheral on the controller chip or on the EVM board is accessible through a bean Processor Expert generates the source code modules containing the implementation of methods controlling the hardware which provides the bean s functionahty The following steps are required to generate the code e Add the beans to your project Processor Expert tab of CodeWarrior s project panel Set up the beans according to the hardware configuration Generate the source code e Use beans methods in your code generated functions for bean s methods are named beanName MethodName You should not modify generated modules generated code can be found in the Files folder of CodeWarriors s project panel User modules which are meant to be modified by the user are found in the User Modules folder where other user modules could also be added The Events module events c contains the handling routines for beans events those caused by interrupt for example The Main module projectName c contains the function main and all necessary declarations and variables 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 19 Software implementation All enabled methods are generated into appropriate bean modules during the code generation process All Methods of each bean inserted into the project are visible as a subtree of the bean in the Project panel Processor Exp
35. tion ramp Methods rampGetValue Gets the ramp value MC1 MC PlIController Computes motor speed using the PI controller Methods e controllerPItype1 PI controller algorithm PWMMC1 PWMMC Sets the LED s state on the EVM The bean uses LEDs connected to PWM outputs Methods e Mask Switches LEDs on off 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 29 Software implementation 7 2 1 Initialization The Main routine calls the PE low level init function generated by Processor Expert This function pre sets the CPU internal peripherals to the initial state according to the beans settings The main method provides the following application initialization Sets the upper and lower limits of the A D converter e Starts A D conversion e Sets up aplication state e Identifies connected hardware e Establishes Quadrature Encoder settings for speed computation Sets up PI controller The board identification routine identifies the connected power stage board by decoding the identified message sent from the power stage If the wrong power stage is identified the program goes to the infinite loop displaying the fault status on the LED The state can be left only by a reset 7 3 State Diagram The general state diagram incorporates the main routine entered from reset and interrupt states The main routine includes the initialization of the CPU and the main loop The main loop i
36. tor Low Cost 3 phase AC Motor Control System Based On MC68HC908MR24 AN1664 Freescale Semiconductor Processor Expert Embedded Beans Processor Expert Help For more information go to www freescale com 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 34 Freescale Semiconductor State Diagram 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 35 How to Reach Us Home Page www freescale com E mail support freescale com USA Europe or Locations Not Listed Freescale Semiconductor Technical Information Center CH370 1300 N Alma School Road Chandler Arizona 85224 1 800 521 6274 or 1 480 768 2130 support freescale com Europe Middle East and Africa Freescale Halbleiter Deutschland GmbH Technical Information Center Schatzbogen 7 81829 Muenchen Germany 44 1296 380 456 English 46 8 52200080 English 49 89 92103 559 German 33 1 69 35 48 48 French support freescale com Japan Freescale Semiconductor Japan Ltd Headquarters ARCO Tower 15F 1 8 1 Shimo Meguro Meguro ku Tokyo 153 0064 Japan 0120 191014 or 81 3 5437 9125 support japan freescale com Asia Pacific Freescale Semiconductor Hong Kong Ltd Technical Information Center 2 Dai King Street Tai Po Industrial Estate Tai Po N T Hong Kong 800 2666 8080 support asia freescale com For Literature Requests Only Freescale Semiconductor Literature Distribution Cent
37. zes PC master software for remote control from the PC It enables the user to Set the motor speed Set the close loop PC master software reads and displays these variables to the user Required and actual motor speed Application operational mode Start stop status DCBus voltage Temperature Phase voltage amplitude The PC master software Control Page is illustrated in Figure 8 1 Profiles of the required and actual speeds can be seen in the Speed Scope window pRadh Czech Republic 3 Phase AC Ind Drive with V Hz Algorithm Close Loop 1200 mpm 1 200 rpen No faut Hah Votkaos px TIR board Figure 8 1 PC Control Window 3 Phase AC Motor Control with V Hz Speed Closed Loop Rev 0 Freescale Semiconductor 33 References O References 1 2 3 4 5 6 10 DSP56F800 Family Manual DSP56F800FM Freescale Semiconductor DSP56F 80x 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 AC Induction Motor Control V Hz Application Closed Loop 805ACIMTD Freescale Semiconductor 3 Phase AC Induction Motor Control V Hz Application Closed Loop 8346ACIMTD Freescale Semiconduc

Download Pdf Manuals

image

Related Search

Related Contents

  Origin Storage 256GB MLC SATA 2.5"  Brodit Passive Holder,Tilt Swivel  MOTOKRZR™ K1  Gebrauchsanleitung User`s Manual Guide d  効率的な発電をサポート - TMEIC 東芝三菱電機産業システム株式会社  OK HDD Smart 1.0 取扱説明書 © 2006-2010 SOOHO Co  the Instructions  

Copyright © All rights reserved.
Failed to retrieve file