3-Phase AC Induction Vector Control Drive with Single Shunt Current Sensing Designer Reference Manual
568000 Digital Signal Controller
DRM092 Rev. 0 7/2007
freescale.com
3-Phase AC Indudction Vector Control Drive with Single Shunt Current Sensing Designer Reference Manual
by: Petr Stekl Freescale Czech Systems Laboratories Roznov pod Radhostem, Czech Republic
To provide the most up-to-date information, the revision of our documents on the World Wide Web will be the most current. Your printed copy may be an earlier revision. To verify you have the latest information available, refer to: http://www.freescale.com The following revision history table summarizes changes contained in this document. For your convenience, the page number designators have been linked to the appropriate location.
Revision History
Revision Page Date Description Level Number(s) July, 0 Initial release 74 2007
3-Phase AC Indudction Vector Control Drive with Single Shunt Current Sensing, Rev. 0
Freescale Semiconductor 3 3-Phase AC Indudction Vector Control Drive with Single Shunt Current Sensing, Rev. 0
4 Freescale Semiconductor Table of Contents
Chapter 1 Introduction 1.1 Introduction ...... 11 1.2 Freescale Controller Advantages and Features ...... 11
Chapter 2 Control Theory 2.1 Three-Phase AC Induction Motor ...... 15 2.2 Mathematical Description of AC Induction Motors ...... 16 2.2.1 Space Vector Definition ...... 17 2.2.2 AC Induction Motor Model ...... 18 2.3 Vector Control of AC Induction Motor ...... 21 2.3.1 Fundamental Principal of Vector Control ...... 21 2.3.2 Description of the Vector Control Algorithm ...... 22 2.3.3 Rotor Flux Estimator ...... 24 2.3.4 Rotor Time-Constant Correction ...... 25 2.3.5 Stator Voltage Decoupling ...... 27 2.3.6 Space Vector Modulation...... 28
Chapter 3 System Concept 3.1 System Specification ...... 33 3.2 Application Description ...... 33 3.3 Control Process ...... 34
Chapter 4 Hardware 4.1 Hardware Implementation ...... 37 4.2 MC56F8013/23 Controller Board ...... 38 4.3 3-Phase AC/BLDC High Voltage Power Stage ...... 40 4.4 Motor Specifications — Example ...... 42
Chapter 5 Software Design 5.1 Introduction ...... 43 5.2 Application Variables Scaling...... 43 5.2.1 Fractional Numbers Representation ...... 43 5.2.2 Scaling of Analogue Quantities ...... 43 5.2.3 Scaling of Angles ...... 44 5.2.4 Scaling of Parameters ...... 44
3-Phase AC Indudction Vector Control Drive with Single Shunt Current Sensing, Rev. 0
Freescale Semiconductor 5 Table of Contents
5.3 Application Overview ...... 45 5.3.1 ADC End of Scan and PWM Reload Interrupts Timing ...... 46 5.3.2 Three-Phase Current Reconstruction ...... 48 5.3.3 Speed Sensing...... 53 5.4 Software Implementation ...... 55 5.4.1 Initialization ...... 55 5.4.2 Application Background Loop ...... 56 5.4.3 Interrupts ...... 56 5.4.4 PI Controller Parameters ...... 59 5.5 FreeMASTER Software ...... 59 5.5.1 FreeMASTER Serial Communication Driver ...... 59 5.5.2 FreeMASTER Recorder ...... 60 5.5.3 FreeMASTER Control Page...... 61
Chapter 6 Application Setup 6.1 MC56F8013 Controller Board Setup ...... 64 6.2 Demo Hardware Setup ...... 65 Appendix A References Appendix B Glossary of Symbols Appendix C Glossary of Abbreviations
3-Phase AC Indudction Vector Control Drive with Single Shunt Current Sensing, Rev. 0
6 Freescale Semiconductor List of Figures
2-1 Three-Phase AC Induction Motor — Cross Section ...... 15 2-2 AC Induction Motor Speed-Torque Characteristic ...... 16 2-3 Stator Current Space-Vector and Its Projection ...... 17 2-4 Application of the General Reference Frame ...... 19 2-5 Induction Motor Space-Vector Diagram ...... 21 2-6 Induction Motor Equivalent Circuit ...... 21 2-7 Vector Control Transformations ...... 22 2-8 Vector Control Algorithm Overview ...... 23 2-9 Rotor Mag. Flux Estimator ...... 27 2-10 Power Stage Schematic Diagram...... 29 2-11 Basic Space Vectors and Voltage Vector Projection ...... 30 3-1 System Concept ...... 34 4-1 Hardware System Configuration...... 37 4-2 MC56F8013/23 Controller Board Top View ...... 39 4-3 Block Diagram of the MC56F8013/23 Controller Board ...... 39 4-4 3-Phase AC/BLDC High Voltage Power Stage ...... 40 4-5 3-Phase AC/BLDC Power Stage Block Diagram ...... 41 5-1 Main Data Flow...... 46 5-2 ADC Triggering...... 47 5-3 ADC End Of Scan and PWM Reload Interrupts ...... 48 5-4 DC-Link Current Shunt ...... 49 5-5 Current Amplifier for DC-Link Current ...... 49 5-6 Current Sampling Timing ...... 50 5-7 Passing Active Vector...... 51 5-8 Low Modulation Index...... 51 5-9 Edge Moving when Passing Active Vector ...... 52 5-10 Edge Moving when Low Modulation Indexes ...... 52 5-11 Quadrature Encoder Signals ...... 53 5-12 QuadTimer Channels Configuration ...... 53 5-13 Speed Processing ...... 55 5-14 State Diagram — General Overview ...... 56 5-15 FreeMASTER Control Screen ...... 61 6-1 Demo Application Setup ...... 63 6-2 MC56F8013/23 Controller Board View...... 65 6-3 Demo Application Connection Overview ...... 66
3-Phase AC Indudction Vector Control Drive with Single Shunt Current Sensing, Rev. 0
Freescale Semiconductor 7 List of Figures
3-Phase AC Indudction Vector Control Drive with Single Shunt Current Sensing, Rev. 0
8 Freescale Semiconductor List of Tables
Table 1-1 Memory Configuration...... 12 Table 2-1 Switching Patterns and Resulting Instantaneous Line-to-Line and Phase Voltages ...... 29 Table 4-1 Electrical Characteristics of 3-Phase AC/BLDC Power Stage ...... 41 Table 4-2 Specifications of the Motor and Incremental Sensor ...... 42 Table 5-1 Measured Currents ...... 50 Table 6-1 MC56F8013/23 Controller Board Jumper Setting...... 64
3-Phase AC Indudction Vector Control Drive with Single Shunt Current Sensing, Rev. 0
Freescale Semiconductor 9 List of Tables
3-Phase AC Indudction Vector Control Drive with Single Shunt Current Sensing, Rev. 0
10 Freescale Semiconductor Chapter 1 Introduction
1.1 Introduction This paper describes the design of a direct vector control algorithm for a three-phase AC induction drive based on Freescale’s MC56F8013/MC56F8023 dedicated motor control devices. Three-phase AC induction motors (ACIM) are popular in industry for a number of reasons. Their construction is extremely optimized, since they have been produced for years. They are very simple and manufacturing costs are favorable. They have no brushes and require minimum maintenance. The robustness of the motor is another strong advantage. We would find induction motors mostly in applications such as water pumps, compressors, fans and air-conditioning systems. In order to achieve variable speed operations in a three-phase AC induction motor, a variable voltage and variable frequency needs to be supplied to the motor. Modern three-phase variable speed drives (VSD) are supplied with digitally controlled switching inverters. The control algorithms can be sorted into two general groups. The first group is referred to scalar control. The constant Volt per Hertz control is a very popular technique representing scalar control. The other group is called vector or field oriented control (FOC). The vector oriented techniques brings overall improvements in drive performance over scalar control. Let’s mention the higher efficiency, full torque control, decoupled control of flux and torque, improved dynamics, etc. The reference design deals with the design of a vectors control algorithm for a three-phase AC induction motor implemented on Freescale Semiconductor digital signal controllers MC56F8013/MC56F8023. The presented design is targeted mainly at consumer and industrial applications. This cost-effective solution and high reliability were two key requirements considered. Minimizing system cost the algorithm implements a single-shunt current sensing eliminating three current sensors to one. The high range of motor operating speeds up to 18000RPM is another advantage of the presented design. An adaptive closed loop rotor flux estimator enhances control performance and increases the overall robustness of the system. Sensitivity of the parameter drift can be considerably minimized in this way. The reference design manual describes basic motor theory, the system design concept, hardware implementation, and the software design, including the FreeMASTER software visualization tool.
1.2 Freescale Controller Advantages and Features The Freescale MC56F80xx family is well suited to digital motor control, combining the DSP’s calculation capability with the MCU’s controller features on a single chip. These hybrid controllers offer many dedicated peripherals such as pulse width modulation (PWM) modules, analogue-to-digital converters (ADC), timers, communication peripherals (SCI, SPI, I2C), and on-board Flash and RAM.
3-Phase AC Indudction Vector Control Drive with Single Shunt Current Sensing, Rev. 0
Freescale Semiconductor 11 Introduction
The MC56F80xx family members provide the following peripheral blocks: • One PWM module with PWM outputs, fault inputs, fault-tolerant design with dead time insertion, supporting both centre-aligned and edge-aligned modes • 12-bit ADC, supporting two simultaneous conversions; ADC and PWM modules can be synchronized • One dedicated 16-bit general purpose quad timer module • One serial peripheral interface (SPI) • One serial communications interface (SCI) with LIN slave functionality • One inter-integrated circuit (I2C) port • On-board 3.3V to 2.5V voltage regulator for powering internal logic and memories • Integrated power-on reset and low voltage interrupt module • All pins multiplexed with general purpose input/output (GPIO) pins • Computer operating properly (COP) watchdog timer • External reset input pin for hardware reset • JTAG/On-Chip Emulation (OnCE™) module for unobtrusive, processor-speed-independent debugging • Phase-locked loop (PLL) based frequency synthesizer for the hybrid controller core clock, with on-chip relaxation oscillator Table 1-1 Memory Configuration
Memory Type MC56F8013 MC56F8023 Program Flash 16 KByte 32 KByte Unified Data/Program RAM 4 KByte 8 KByte
The three-phase ACIM vector control a with single shunt sensor benefits greatly from the flexible PWM module, fast ADC, and quad timer module. The PWM offers flexibility in its configuration, enabling efficient three-phase motor control. The PWM module is capable of generating asymmetric PWM duty cycles in centre-aligned configuration. We can benefit from this feature to achieve a reconstruction of three-phase currents in critical switching patterns. The PWM reload SYNC signal is generated to provide synchronization with other modules (Quadimers, ADC). The PWM block has the following features: • Three complementary PWM signal pairs, six independent PWM signals (or a combination) • Complementary channel operation features • Independent top and bottom 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 centre-aligned PWM reference signals • 15-bit resolution • Half-cycle reload capability • Integral reload rates from one to sixteen periods
3-Phase AC Indudction Vector Control Drive with Single Shunt Current Sensing, Rev. 0
12 Freescale Semiconductor Freescale Controller Advantages and Features
• Mask/swap capability • Individual, software-controlled PWM output • Programmable fault protection • Polarity control • 10mA or 16mA current sink capability on PWM pins • Write-protectable registers The ADC module has the following features: • 12-bit resolution • Dual ADCs per module; three input channels per ADC • Maximum ADC clock frequency of 5.33MHz with a 187ns period • Sampling rate of up to 1.78 million samples per second • Single conversion time of 8.5 ADC clock cycles (8.5 x 187ns = 1.59μs) • Additional conversion time of six ADC clock cycles (6 x 187ns = 1.125μs) • Eight conversions in 26.5 ADC clock cycles (26.5 x 187ns = 4.97μs) using parallel mode • Ability to use the SYNC input signal to synchronize with the PWM (provided the integration allows the PWM to trigger a timer channel connected to the SYNC input) • Ability to sequentially scan and store up to eight measurements • Ability to scan and store up to four measurements on each of two ADCs operating simultaneously and in parallel • Ability to scan and store up to four measurements on each of two ADCs operating asynchronously to each other in parallel • Interrupt generating capabilities at the end of a scan when an out-of-range limit is exceeded and on a zero crossing • Optional sample correction by subtracting a pre-programmed offset value • Signed or unsigned result • Single-ended or differential inputs • PWM outputs with hysteresis for three of the analogue inputs The application uses the ADC block in simultaneous mode scan. It is synchronized to the PWM pulses. This configuration allows the simultaneous conversion of the required analogue values for the DC-bus current and voltage within the required time. The quad timer is an extremely flexible module, providing all required services relating to time events. It has the following features: • Four 16-bit counters/timers • Count up/down • Counters are cascadable • Programmable count modulus • Maximum count rate equal to the peripheral clock/2, when counting external events • Maximum count rate equal to the peripheral clock/1, when using internal clocks • Count once or repeatedly • Counters are preloadable
3-Phase AC Indudction Vector Control Drive with Single Shunt Current Sensing, Rev. 0
Freescale Semiconductor 13 Introduction
• Counters can share available input pins • Each counter has a separate prescaler • Each counter has capture and compare capability The application uses four channels of the quad timer for: • One channel for PWM-to-ADC synchronization • Two channels for reading a quadrature encoder signals • One channel for system base of slow control loop (1ms period)
3-Phase AC Indudction Vector Control Drive with Single Shunt Current Sensing, Rev. 0
14 Freescale Semiconductor Chapter 2 Control Theory
2.1 Three-Phase AC Induction Motor The AC induction motor is a rotating electric machine designed to operate from a 3-phase source of alternating voltage. For variable speed drives, the source is normally an inverter that uses power switches to produce approximately sinusoidal voltages and currents of controllable magnitude and frequency. A cross-section of a two-pole induction motor is shown in Figure 2-1. Slots in the inner periphery of the stator accommodate 3-phase winding a,b,c. The turns in each winding are distributed so that a current in a stator winding produces an approximately sinusoidally-distributed flux density around the periphery of the air gap. When three currents that are sinusoidally varying in time, but displaced in phase by 120° from each other, flow through the three symmetrically-placed windings, a radially-directed air gap flux density is produced that is also sinusoidally distributed around the gap and rotates at an angular velocity equal to the angular frequency of the stator currents. The most common type of induction motor has a squirrel cage rotor in which aluminum conductors or bars are cast into slots in the outer periphery of the rotor. These conductors or bars are shorted together at both ends of the rotor by cast aluminum end rings, which also can be shaped to act as fans. In larger induction motors, copper or copper-alloy bars are used to fabricate the rotor cage winding.
Stator Rotor
b c'