AN1931D Freescale Semiconductor / Motorola, AN1931D Datasheet

no-image

AN1931D

Manufacturer Part Number
AN1931D
Description
3-Phase PM Synchronous Motor Vector Control
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
© Motorola, Inc., 2003. All rights reserved.
3-Phase PM Synchronous
Motor Vector Control using
DSP56F80x
Design of Motor Control Application Based
on Motorola’s Software Development Kit
Libor Prokop, Pavel Grasblum
Motorola Czech System Laboratories
1.
This Application Note describes the design of a 3-phase
Permanent Magnet (PM) synchronous motor drive based on
Motorola’s DSP56F80x dedicated motor control device. The
software design takes advantage of the SDK (Software
Development Kit) developed by Motorola.
PM synchronous motors are very popular in a wide
application area. The PM synchronous motor lacks a
commutator and is therefore more reliable than the DC motor.
The PM synchronous motor also has advantages when
compared to an AC induction motor. Because a PM
synchronous motor achieves higher efficiency by generating
the rotor magnetic flux with rotor magnets, a PM
synchronous motors is used in high-end white goods (such as
refrigerators, washing machines, dishwashers); high-end
pumps; fans; and in other appliances which require high
reliability and efficiency.
The concept of the application is a speed closed-loop PM
synchronous drive using a Vector Control technique. It serves
as an example of a PM synchronous motor control design
using a Motorola DSP with SDK support. It also illustrates
the use of the SDK’s dedicated motor control libraries.
This Application Note includes basic motor theory, system
design concept, hardware implementation and software
design, including the PC master software visualization tool.
Introduction of Application
Benefit
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
1.0 Introduction of Application
2.0 Motorola DSP Advantages and
3.0 Target Motor Theory................... 4
4.0 System Concept ......................... 16
5.0 Hardware Implementation ......... 28
6.0 Software Design ........................ 30
7.0 Implementation Notes ............... 46
8.0 SDK Implementation ................ 52
9.0 DSP Memory Use ..................... 55
10.0 References ............................... 56
3.1 Permanent Magnet Synchronous
3.2 Mathematical Description of PM
3.3 Digital Control of PM Synchronous
4.1 System Specification .............. 16
4.2 Vector Control Drive Concept 17
4.3 System Blocks Concept .......... 19
5.1 Hardware Set-up ..................... 28
6.1 Main Software Flow Chart ..... 30
6.2 Data Flow ............................... 35
6.3 State Diagram ......................... 41
7.1 Scaling of Quantities .............. 46
7.2 PI Controller Tuning............... 49
7.3 Subprocesses Relation and State
7.4 Run/Stop Switch and Button
8.1 Drivers and Library Function . 52
8.2 Appconfig.h File..................... 52
8.3 Drivers’ Initialization ............. 53
8.4 Interrupts................................. 53
8.5 PC Master Software................ 53
Benefit ...................................... 1
Features .................................... 2
Motor......................................... 4
Synchronous Motor................... 5
Motor......................................... 9
Transitions............................... 49
Control .................................... 50
Contents
(Motorola Order Number)
Order by AN1931/D
Rev. 1, 3/03

Related parts for AN1931D

AN1931D Summary of contents

Page 1

Freescale Semiconductor, Inc. 3-Phase PM Synchronous Motor Vector Control using DSP56F80x Design of Motor Control Application Based on Motorola’s Software Development Kit Libor Prokop, Pavel Grasblum Motorola Czech System Laboratories 1. Introduction of Application Benefit This Application Note describes the ...

Page 2

Freescale Semiconductor, Inc. Motorola DSP Advantages and Features 2. Motorola DSP Advantages and Features The Motorola DSP56F80x family is well suited for digital motor control, combining the DSP’s calculation capability with the MCU’s controller features on a single chip. These ...

Page 3

Freescale Semiconductor, Inc. The PWM has the following features: • Three complementary PWM signal pairs independent PWM signals • Features of complementary channel operation • Deadtime insertion • Separate top and bottom pulse width correction via current status ...

Page 4

Freescale Semiconductor, Inc. Target Motor Theory • Each timer module consists of four 16-bit counters/timers • Count up/down • Counters are cascadable • Programmable count modulo • Maximum count rate equals peripheral clock/2 when counting external events • Maximum count ...

Page 5

Freescale Semiconductor, Inc. Figure 3-1. PM Synchronous Motor - Cross Section In this respect, the PM synchronous motor is equivalent to an induction motor, where the air gap magnetic field is produced by a permanent magnet, so the rotor magnetic ...

Page 6

Freescale Semiconductor, Inc. Target Motor Theory phase Figure 3-2. Stator Current Space Vector and Its Projection The space vector defined by (EQ 3-2.) space vector is equal to the instantaneous value of the direct-axis stator current component, ...

Page 7

Freescale Semiconductor, Inc. For a description of the PM synchronous motor, the symmetrical three-phase smooth-air-gap machine with sinusoidally-distributed windings is considered. The voltage equations of stator in the instantaneous form can then be expressed as: where and ...

Page 8

Freescale Semiconductor, Inc. Target Motor Theory Besides the stationary reference frame attached to the stator, motor model voltage space vector equations can be formulated in a general reference frame, which rotates at a general speed general reference frame is used, ...

Page 9

Freescale Semiconductor, Inc. stator flux-linkage space vector, the rotor flux-linkage space vector or the magnetizing space vector. The most popular reference frame is the reference frame attached to the rotor flux linkage space vector, with direct axis (d) and quadrature ...

Page 10

Freescale Semiconductor, Inc. Target Motor Theory The inverter consists of three half-bridge units where the upper and lower switches are controlled complementarily, meaning when the upper one is turned on, the lower one must be turned off, and vice versa. ...

Page 11

Freescale Semiconductor, Inc. In this method, we must break down the field-generating and torque-generating parts of the stator current to be able to separately control the magnetic flux and the torque. In order to do so, we need to set ...

Page 12

Freescale Semiconductor, Inc. Target Motor Theory 3.3.3 Vector Control Transformations Transforming the PM synchronous motor into a DC motor is based on points of view. As shown in Section 3.3.2, a coordinate transformation is required. The following transformations are involved ...

Page 13

Freescale Semiconductor, Inc. To transfer the graphical representation into mathematical language: In most cases, the 3-phase system is symmetrical, which means that the sum of the phase quantities is always zero – 2 ...

Page 14

Freescale Semiconductor, Inc. Target Motor Theory Figure 3-8. illustrates this transformation. q Figure 3-8. Establishing the d-q Coordinate System (Park Transformation) The backward (Inverse Park) transformation (from d 3.3.4 PMSM Vector Control and Field-Weakening Controller This section describes ...

Page 15

Freescale Semiconductor, Inc. As demonstrated from PM synchronous motor equations, the maximum efficiency of the ideal PM synchronous motor is obtained when maintaining the current flux-producing component i Therefore, in the drive from Figure operating range. The speed regulator controls ...

Page 16

Freescale Semiconductor, Inc. System Concept A more-progressive method uses a Field-Weakening Controller, which generates a negative current flux-producing component i u_S_max_FWLimit. The field-weakening limit u_S_max_FWLimit is set to be close to the maximum voltage limit of the 3-phase power inverter ...

Page 17

Freescale Semiconductor, Inc. Table 1: High Voltage Hardware Set Specifications (Continued) Drive Characteristics: 4.2 Vector Control Drive Concept A standard system concept is used with this drive; see following hardware parts: • Three-phase PM synchronous motor high-voltage development platform • ...

Page 18

Freescale Semiconductor, Inc. System Concept 8 à  G P€rthfSr„ D†f„fSr„ P€rthfSr„ à t …  r à  ‚ r ‡ ...

Page 19

Freescale Semiconductor, Inc. If any of the previously-mentioned faults occur, the motor control PWM outputs are disabled in order to protect the drive, and the fault state of the system is displayed by the on-board LED. A hardware error is ...

Page 20

Freescale Semiconductor, Inc. System Concept Figure 4-3. Quad Timer Module A Configuration 4.3.1.1 Position Sensing The position and speed sensing algorithm uses all of the timers in module A and an additional timer as a time base. Timers A0 and ...

Page 21

Freescale Semiconductor, Inc. The proposed algorithm combines both methods. The algorithm simultaneously measures the number of quadrature encoder pulses per constant period, and an accurate time interval between the first and last pulse is counted during that constant period. The ...

Page 22

Freescale Semiconductor, Inc. System Concept 4.3.1.2.1 Minimum and Maximum Speed Calculation The minimum speed is calculated with the following equation: where: min N T calc In the application, the quadrature encoder has 1024 pulses per revolution and a calculation period ...

Page 23

Freescale Semiconductor, Inc. 4.3.1.3 Position Reset with Rotor Alignment After reset, the rotor position is unknown, because a quadrature encoder does not give an absolute position until the index pulse arrives. As shown in the d axis of the d-q ...

Page 24

Freescale Semiconductor, Inc. System Concept 4.3.2 Current Sensing Phase currents are measured by a shunt resistor in each phase. A voltage drop on the shunt resistor is amplified by an operational amplifier, and shifted up by 1.65V. The resultant voltage ...

Page 25

Freescale Semiconductor, Inc. the synchronization module TC2 (Quad Timer C, counter/timer 2). A high-true pulse occurs for each reload of the PWM, regardless of the state of the LDOK bit. The intended purpose of TC2 is to provide a user-selectable ...

Page 26

Freescale Semiconductor, Inc. System Concept PWM PERIOD PHASE_A PHASE_B PHASE_C Figure 4-10. Voltage Shapes of Two Different PWM Periods II                  ...

Page 27

Freescale Semiconductor, Inc. Sectors 2 and 3: Sectors 4 and 5: Note: The sector value is used for current calculation only, and has no other meaning in the sinewave modulation. But if we use any type of space vector modulation, ...

Page 28

... The application can run on Motorola’s motor control DSPs using the DSP56F803EVM, DSP56F805EVM, or DSP56F807EVM, Motorola’s 3-Phase AC/BLDC high voltage power stage and the BLDC high voltage motor with a quadrature encoder and integrated brake. All components are an integral part of Motorola’s embedded motion control development tools. Application hardware set-up is shown in Figure 5-1 ...

Page 29

Freescale Semiconductor, Inc. Figure 5-1. High-Voltage Hardware System Configuration All system parts are supplied and documented in these references: • Controller Board for the: — DSP56F803 — Supplied as DSP56F803EVM — Described in the DSP56F803 Evaluation Module Hardware ...

Page 30

Freescale Semiconductor, Inc. Software Design • MB1 Motor-Brake SM40V + SG40N — Supplied as Order #ECMTRHIVBLDC Note: The application software is targeted for a PM synchronous motor with sinewave Back-EMF shape. In this demo application, a BLDC motor is used ...

Page 31

Freescale Semiconductor, Inc. Position and Speed Measurement processes are provided by hardware Timer modules and the functions giving the actual speed and position; see LED Indication Processing is called from Quadrature Timer D0 Interrupt, which provides the time base for ...

Page 32

Freescale Semiconductor, Inc. Software Design Fault Control - Background: if faultCtrlStatus - AnalogFaultEnbl {check Undervoltage, Overheating faults} if Position sensing,Overvoltage, Overcurrent faults {set trigger beginning of Fault State} Application Control - Processing: according to appOpMode: {control/check switch set omega_required_mech} according ...

Page 33

Freescale Semiconductor, Inc. Interrupt ADC Complete Analog Sensing- Processing according to anSensingCtrlStatus sensing/initialization: {sense Temperature calculate Filtered Temperature sense, correct 2 Phase Currents calculate 3 Phase Currents sense Voltage correct Voltage calculate Filtered Voltage} PMSM Control -Current Processing: proceeds according ...

Page 34

Freescale Semiconductor, Inc. Software Design Alignment: Software Timer if Timeout {PMSM Control - End Alignment} Figure 6-3. S/W Flow Chart - General Overview III 34 3-Phase PM Synchronous Motor Vector Control For More Information On This Product, Interrupt D0 QTimer ...

Page 35

Freescale Semiconductor, Inc. 6.2 Data Flow The PM synchronous motor vector control drive control algorithm is described in the data flow charts shown in Figure 6-4 and Figure names. Start/Stop Up/Down Switch Buttons faultCtrlStatus appFaultStatus omega_required_mech PHASEA,PHASEB,INDEX PC Master Position, ...

Page 36

Freescale Semiconductor, Inc. Software Design TEMPERATURE_MAX_F16 temperature_filt u_dc_bus_min_fault_C u_dc_bus_filt u_dc_bus_on_brake Brake Control u_dc_bus_off_brake brakeCtrlStatus IO_BRAKE Pwm_AT The data flows consist of the processes described in the following sections. 6.2.1 Application Control Process The Application Control process is the highest software ...

Page 37

Freescale Semiconductor, Inc. 6.2.2 LED Indication Process This process controls the LED flashing according to appState. 6.2.3 Analog Sensing Process The Analog sensing process handles sensing, filtering and correction of analog variables (phase currents, temperature, DC Bus voltage). 6.2.4 Position ...

Page 38

Freescale Semiconductor, Inc. Software Design omega_required_mech Speed Ramp reloadSWtmrAlignment Control omega_desired_mech omega_actual_mech theta_align_el_C Speed, Align Control theta_actual_el i_SDQ_desired q_axis Sin, Cos Transformation sinCos_theta_el coefBEMF, coefBEMFShift i_Sabc_comp SVM_INV_INDEX, I_SDQ_MAX_F16 u_OverMax Figure 6-6. Data Flow - PMSM Control 6.2.5.1 Current Control Process ...

Page 39

Freescale Semiconductor, Inc. i_Sabc_comp i_SDQ_desired.q_axis i_SDQ.q_axis u_LimitF16 omega_actual_mech u_SDQ_lin.q_axis coefBEMF, coefBEMFShift sinCos_theta_el Voltage Transformation d-q -> alpha, beta pwmABC Figure 6-7. Data Flow - PMSM Control - Current Control The Feed Forward process provides the following calculations: u_SDQ.q_axis = coefBEMF ...

Page 40

Freescale Semiconductor, Inc. Software Design The u_SDQ voltages are transformed into u_SAlphaBeta Transformation process. The Scaling DCBus Ripple Compensation block scales u_SAlphaBeta (according u_dc_bus_filt) to u_Salpha_RipElim, described in the svmlimDcBusRip function in the Motor Control Library. The space vector modulation ...

Page 41

Freescale Semiconductor, Inc. This process also provides voltage limitation i_SDQ_desired.d_axis 2 (I_SDQ_MAX_F16) by setting: PIRegParams_omega_mech.PositivePILimit PIRegParams_omega_mech.NegativePILimit 6.2.6 Brake Control Process The brake control process maintains DCBus voltage level via the IO_BRAKE driver, which controls the brake switch. The voltage comparison ...

Page 42

Freescale Semiconductor, Inc. Software Design 6.3.1 DSP Initialization The DSP Initialization state: • Initializes: — PWM — Application Control — PM Synchronous Motor Control — Analog Sensing — Brake Control — Fault Control — LED Indication — Button Control • ...

Page 43

Freescale Semiconductor, Inc. switchState = Stop & Fault Control: faults cleared Application Control: Fault Fault Control: Begin Fault done Application Control: Fault Begin clear pmsmCtrlStatus.RunFlag clear pmsmCtrlStatus.AlignFlag set appState = APP_FAULT Fault Control: Begin Fault Figure 6-9. State Diagram - ...

Page 44

Freescale Semiconductor, Inc. Software Design In the Run state, the PWM is enabled, so voltage is applied on motor phases. The motor is running according to the state of all subprocesses. If switchState = Stop, the Stop state is entered. ...

Page 45

Freescale Semiconductor, Inc. alignment state provides current control and timeout search. When alignment timeout occurs, End Alignment is entered. In that state, the Position Sensing Zero Position is set, so the position sensor is aligned with the real vector of ...

Page 46

Freescale Semiconductor, Inc. 6.3.5 Analog Sensing State Diagram The state diagram of the Analog Sensing subprocess is shown in state initializes hardware modules like ADC, synchronization with PWM, etc. In Begin Init, Initialization is started, so the variables for initialization ...

Page 47

Freescale Semiconductor, Inc. The following equation shows the relationship between the real and fractional representations: Fractional Value where: Fractional Value is the fractional representation of the real value [Frac16] Real Value is the real value of the quantity [V, A, ...

Page 48

Freescale Semiconductor, Inc. Implementation Notes where: u Fractional representation of voltage quantities Frac u Real voltage quantities in physical units Real VOLT_RANGE_MAX Defined voltage range maximum used for scaling in physical units[V] In the application, the VOLT_RANGE_MAX value is the ...

Page 49

Freescale Semiconductor, Inc. 7.1.3 Speed Scaling Speed quantities are scaled to the defined speed range maximum, which should be set lower than all speed variables in the application was set higher than the maximum mechanical speed of the ...

Page 50

Freescale Semiconductor, Inc. Implementation Notes The functionality will be explained in following example: The “trigger” function Process1StateTrig() is called from process1. The transient functions of process2, process3,etc., which must be triggered by Process1State, are put inside the Process1StateTrig(). 7.4 Run/Stop ...

Page 51

Freescale Semiconductor, Inc. EXWWRQ6WDWXV Figure 7-1. Button Control - IRQ ISR and ButtonProcessing %XWWRQ(GJH Figure 7-2. Button Control - ButtonEdge MOTOROLA 3-Phase PM Synchronous Motor Vector Control For More Information On This Product, %XWWRQ3URFHVVLQJ Go to: www.freescale.com Implementation Notes 51 ...

Page 52

Freescale Semiconductor, Inc. SDK Implementation 8. SDK Implementation The Motorola Embedded SDK is a collection of APIs, libraries, services, rules and guidelines. This software infrastructure is designed to let DSP5680x software developers create high-level, efficient, portable code. The application code ...

Page 53

Freescale Semiconductor, Inc. The appconfig.h file can be divided into two sections. The first section defines which components of SDK libraries are included in the application; the second part overwrites components’ standard setting during their initialization. 8.3 Drivers’ Initialization Each ...

Page 54

Freescale Semiconductor, Inc. SDK Implementation The 3-Phase PM Synchronous Motor Vector Control utilizes PC master software for remote control from a PC. It enables the user to: • Control the PC master software • Start/stop control • Set the motor ...

Page 55

Freescale Semiconductor, Inc. Figure 8-1. PC Control Window 9. DSP Memory Use Table 9-1 shows how much memory is needed to run the 3-phase PM Synchronous Vector Control drive using the quadrature encoder. A part of the DSP memory is ...

Page 56

Freescale Semiconductor, Inc. 10. References [1] Design of Brushless Permanent-magnet Motors, J.R. Hendershot JR and T.J.E. Miller, Magna Physics Publishing and Clarendon Press, 1994 [2] Brushless DC Motor Control using the MC68HC708MC4, AN1702/D, John Deatherage and Jeff Hunsinger, Motorola [3] ...

Related keywords