AN1913D Freescale Semiconductor / Motorola, AN1913D Datasheet

no-image

AN1913D

Manufacturer Part Number
AN1913D
Description
3-phase BLDC Motor Control with Sensorless Back-EMF ADC Zero Crossing Detection using DSP 56F80x
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Semiconductor Application Note
3-phase BLDC Motor
Control with Sensorless
Back-EMF ADC Zero
Crossing Detection using
DSP 56F80x
Design of Motor Control Application Based on
the Motorola Software Development Kit SDK
Libor Prokop,
Leos Chalupa
1.
2.
© Motorola, Inc. 2001
MOTOROLA
This Application Note describes the design of a 3-phase
sensorless BLDC motor drive with Back-EMF Zero Crossing
using an AD convertor. It is based on Motorola’s DSP
56F80x family dedicated for motor control applications. The
software design uses the SDK (Software Development Kit)
developed by Motorola.
The concept of the application is that of a speed-closed loop
drive using an AD convertor for Back-EMF Zero Crossing
technique position detection. It serves as an example of a
sensorless BLDC motor control system using Motorola DSP
with SDK support. It also illustrates the usage of dedicated
motor control on chip peripherals, software drivers and
software libraries that are included in the SDK.
This Application Note includes a description of the Motorola
DSP features, basic BLDC motor theory, system design
concept, hardware implementation and software design
including the PC Master visualization tool inclusion.
The Motorola DSP56F80x family are well suited for digital
motor control, combining the DSP’s calculation capability
with the MCU’s controller features on a single chip. These
DSPs offer many dedicated peripherals like Pulse Width
Introduction
Motorola DSP Advantages and
Features
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
1. Introduction ................................... 1
2. Motorola DSP Advantages and
3. Target Motor Theory ..................... 3
4. System Design Concept ............... 10
5. Control Technique ....................... 14
6. Hardware ..................................... 28
7. Software Design .......................... 32
8. PC Master.................................... 49
9. DSP Usage .................................. 49
10. Setting of Software Parameters for
11. References ................................. 55
3.1 BLDC Motor Targeted by This
3.2 3-Phase BLDC Power Stage........... 6
3.3 Why Sensorless Control?................ 6
3.4 Power Stage - Motor System
3.5 Back-EMF Sensing......................... 9
4.1 System Specification .................... 10
4.2 Sensorless Drive Concept ............. 12
5.1 Control Technique - General
5.2 PWM Voltage Generation for
5.3 Back-EMF Zero Crossing Sensing16
5.4 Sensorless Commutation Control . 18
5.5 Speed Control ............................... 28
6.1 System Outline ............................. 28
6.2 Low Voltage Evaluation Motor
6.3 Low Voltage Hardware Set .......... 30
6.4 High Voltage Hardware Set.......... 31
7.1 Main Software Flow Chart ........... 32
7.2 Data Flow ..................................... 35
7.3 State Diagram ............................... 39
10.1 Current and Voltage Settings........ 51
10.2 Commutation Control Settings ..... 51
10.3 Speed setting................................. 54
11.1 Software Development Kit, SDK
11.2 User’s Manuals and
Features .................................... 1
Application...................................... 3
Model .............................................. 7
Overview ....................................... 14
BLDC ............................................ 14
Hardware Set................................. 29
Other Motors .......................... 50
rev.2.3............................................ 55
Application Notes.......................... 55
Contents
(Motorola Order Number)
Order by AN1913/D
Rev. 2.0, 06/2001

Related parts for AN1913D

AN1913D Summary of contents

Page 1

Freescale Semiconductor, Inc. MOTOROLA Semiconductor Application Note 3-phase BLDC Motor Control with Sensorless Back-EMF ADC Zero Crossing Detection using DSP 56F80x Design of Motor Control Application Based on the Motorola Software Development Kit SDK Libor Prokop, Leos Chalupa 1. Introduction ...

Page 2

Freescale Semiconductor, Inc. Motorola DSP Advantages and Features Modulation (PWM) module, Analog-to-Digital Converter (ADC), Multi-function Quadrature Decoder, Timers, communication peripherals (SCI, SPI, CAN), and on-chip Flash and RAM. Generally, all family members are well suited for motor control applications. The ...

Page 3

Freescale Semiconductor, Inc. • Deadtime distortion correction using current status inputs or software • Separate top and bottom polarity control • Edge-aligned or center-aligned PWM reference signals • 15-bit resolution • Half-cycle reload capability • Integral reload rates from one ...

Page 4

Freescale Semiconductor, Inc. Target Motor Theory . Figure 3-1. BLDC Motor - Cross Section The motor can have more then just one pole-pair per phase. The pole-pair per phase defines the ratio between the electrical revolution and the mechanical revolution. ...

Page 5

Freescale Semiconductor, Inc. Figure 3-3 shows the number of waveforms, the magnetic flux linkage, the phase Back-EMF voltage and the phase-to-phase Back-EMF voltage. The magnetic flux linkage was measured by calculating the integration phase Back-EMF voltage, which was measured on ...

Page 6

Freescale Semiconductor, Inc. Target Motor Theory 3.2 3-Phase BLDC Power Stage The voltage for a 3-phase BLDC motor is provided by a 3-phase power stage. The 3-phase power stage is controlled by the DSP on-chip PWM module; which creates the ...

Page 7

Freescale Semiconductor, Inc. 3.4 Power Stage - Motor System Model In order to explain and simulate the idea of Back-EMF sensing techniques, a simplified mathematical model based on the basic circuit topology (see Figure 3-5. Power Stage - Motor Topology ...

Page 8

Freescale Semiconductor, Inc. Target Motor Theory 3.4.1 Mathematical Model The following set of equations is valid for the presented topology where: are “branch” voltages between one power stage output and its ...

Page 9

Freescale Semiconductor, Inc. The internal torque of the motor itself is defined as: T where internal motor torque (no mechanical losses rotor speed, rotor position x - phase index, it stands for A,B,C - magnetic flux ...

Page 10

Freescale Semiconductor, Inc. System Design Concept There are two necessary conditions which must be met: • Top and bottom switch (in diagonal) have to be driven with the same PWM signal • No current is going through the non-fed phase ...

Page 11

Freescale Semiconductor, Inc. The introduced BLDC motor control drive with Back-EMF Zero Crossing using AD convertor is designed as a DSP system that meets the following general performance requirements: Motor Characteristics: Drive Characteristics: Load Characteristic: Table 4-1. Low Voltage Evaluation ...

Page 12

Freescale Semiconductor, Inc. System Design Concept Motor Characteristics: Drive Characteristics: Load Characteristic: Table 4-3. High Voltage Evaluation Hardware Set Specifications 4.2 Sensorless Drive Concept The chosen system concept is shown below. The sensorless rotor position detector detects the Zero Crossing ...

Page 13

Freescale Semiconductor, Inc. 3 phase Voltages, DC Bus Current & DC Bus Voltage Power line 3 phase BLDC Power Stage 3 Phase Voltages DC-Bus Voltage/Current Temperature Zero Crossing PC Master Zero Crossing SCI Period, Position Recognition START STOP Required Speed ...

Page 14

Freescale Semiconductor, Inc. Control Technique The divided phase voltages are connected to the AD convertor module on the DSP and are processed in order to get the Back-EMF Zero Crossing signal. The Back-EMF Zero Crossing detection enables position recognition, as ...

Page 15

Freescale Semiconductor, Inc. 3-PHASE POWER STAGE PWM1 S AT POWER SOURCE DC VOLTAGE PWM2 S AB MOSFET/IGBT DRIVERS PWM1 PWM2 PWM3 PULSE WIDTH MODULATOR (PWM) MODULE Figure 5-1. PWM with BLDC Power Stage commutation commutation A-off PWM1 S At A-off ...

Page 16

Freescale Semiconductor, Inc. Control Technique PWM1 S At PWM2 S Ab PWM3 S Bt PWM4 S Bb PWM5 S Ct PWM6 Figure 5-3. BLDC Commutation with Bipolar (Hard) Switching Figure 5-3 shows ...

Page 17

Freescale Semiconductor, Inc. conversion is then two’s compliment data. The other feature associated to the Offset Registers is the Zero Crossing interrupt. The Zero Crossing interrupt is asserted whenever the ADC conversion result changes the sign compared to the previous ...

Page 18

Freescale Semiconductor, Inc. Control Technique Figure 5-4. Back-EMF Zero Crossing Synchronization with PWM The non-fed phase “branch” voltage U presented BLDC Motor Control application synchronizes the Back-EMF Zero Crossing detection with PWM. The AD conversion of phase branch voltages is ...

Page 19

Freescale Semiconductor, Inc. Figure 5-5. Commutation Control States 5.4.1 Alignment Before the motor starts, there is a short time (which depends on the motor’s electrical time constant) when the rotor position is aligned to a known position by applying PWM ...

Page 20

Freescale Semiconductor, Inc. Control Technique 5.4.2 Running The commutation process is the series of states which is assured when the Back-EMF Zero Crossing is successfully captured. The new commutation time is calculated after Back-EMF Zero Crossing is captured and the ...

Page 21

Freescale Semiconductor, Inc. The flow chart explaining the principle of BLDC Commutation control with Back-EMF Zero Crossing Sensing is shown in Figure 5-7. Commutation Done BEMF Zero Crossing detected between previous commutations? Yes Service of Commutation: Preset commutation Wait for ...

Page 22

Freescale Semiconductor, Inc. Control Technique 5.4.2.2 Running - Commutation Times Calculation Commutation times calculation is provided by algorithm bldcZCComput described in T_Cmt0[n-2] T_Cmt0[n-1] n-2 Zero Crossing Detection Signal Zero Crossing Detection Signal Per_ZCros0[n] = Per_ZCros[n-2] Per_ZCros[n-1] T_ZCros[n-1] Zero Crossing Detection ...

Page 23

Freescale Semiconductor, Inc. Per_ZCros[n] = T_ZCros[n] - T_ZCros[n-1] = T_ZCros[n] - T_ZCros0 Per_ZCrosFlt[n] = (1/2*Per_ZCros[n]+1/2*Per_ZCros0) HlfCmt[n] = 1/2*Per_ZCrosFlt[n]- Advance_angle = = 1/2*Per_ZCrosFlt[n]- C_CMT_ADVANCE*Per_ZCrosFlt[n]= Coef_HlfCmt*Per_ZCrosFlt[n] The best commutation was get with Advance_angle: 60Deg*1/8 = 7.5Deg which means Coef_HlfCmt = 0.375 at ...

Page 24

Freescale Semiconductor, Inc. Control Technique In order to start the BLDC motor, the adequate torque must be generated. The motor torque is proportional to the multiplication of the stator magnetic flux, the rotor magnetic flux and the sine of angle ...

Page 25

Freescale Semiconductor, Inc. Motor is Running at steady-state condition with regular Back-EMF feedback Rotor magnetic Stator magnetic field field (created by PM) Border of stator pole Rotor movement during one Direction of commutation Phase current Zero Crossing Phase winding edge ...

Page 26

Freescale Semiconductor, Inc. Control Technique Phase Back-EMF’s Back-EMF Zero Crossings Ideal Commutation Pattern when position is known B C TOP TOP C A BOT BOT Real Commutation Pattern when position is estimated B TOP C A BOT BOT st nd ...

Page 27

Freescale Semiconductor, Inc. The following figure illustrates the sequence of the commutations during the Starting (Back-EMF Acquisition) state. [1] [2] T_Cmt0 T_Cmt0 T2[1] n=2 n=1 2* Per_CmtStart Per_CmtStart Zero Crossing Detection Signal T_ZCros[0] Zero Crossing Detection Signal Zero Crossing Detection ...

Page 28

Freescale Semiconductor, Inc. Hardware 5.5 Speed Control The speed-closed loop control is provided regulator as described in speed (Omega_Actual) is computed from the average of two Back-EMF Zero Crossing periods (time intervals) gained from sensorless commutation control ...

Page 29

... U1 CONTROLLER BOARD for DSP56F803: — supplied as: DSP56803EVM — described in: DSP56F803EVMUM/D DSP Evaluation Module Hardware User’s Manual Information of all above mentioned boards and documents can be found on: http://mot-sps.com/motor/devtools/index.html BLDC control with BEMF Zero Crossing using ADC For More Information On This Product, Figure 6-1 Go to: www ...

Page 30

... MEMC3PBLDCLVUM/D 3-phase Brushless DC Low Voltage Power Stage • MB1 - Motor-Brake SM40N + SG40N — supplied as: ECMTRLOVBLDC Information of all above mentioned boards and documents can be found on: http://mot-sps.com/motor/devtools/index.html 30 BLDC control with BEMF Zero Crossing using ADC For More Information On This Product, Figure 6-2. ...

Page 31

Freescale Semiconductor, Inc. 6.4 High Voltage hardware set The system configuration is shown in Figure 6-3. High Voltage hardware System Configuration All the system parts are supplied and documented according the following references: • Controller Board for DSP56F805: ...

Page 32

... Freescale Semiconductor, Inc. Software Design Information of all above mentioned boards and documents can be found on: http://mot-sps.com/motor/devtools/index.html 7. Software Design This section describes the design of the software blocks of the drive. The software is described in the following terms: • Main Software Flow chart • Data Flow • ...

Page 33

Freescale Semiconductor, Inc. Reset Initialize Application State Machine: proceeds/sets requirements of: Drive Fault Status Application Mode Omega Required Mechanical Control Speed Control Alignment Current Zero Crossing Offset Commutation Control proceed Status_Commutation: Running Starting Alignment Stopped Check Run/Stop Switch Interrupt ADC ...

Page 34

Freescale Semiconductor, Inc. Software Design Interrupt Up Button Up Button ISR: increment Omega Required Mechanical Reture Interrupt ADC Low Limit ADC Low Limit ISR: set Undervoltage Fault set Overheating Fault Emergency Stop Reture Figure 7-2. Main Software Flow Chart - ...

Page 35

Freescale Semiconductor, Inc. 7.2 Data Flow The control algorithm process values obtained from the user interface and sensors, generates 3-phase PWM signals for motor control (as can be seen on the data flow analysis). DC-Bus Current Manual Speed Setting (A/D) ...

Page 36

Freescale Semiconductor, Inc. Software Design The control algorithm of the BLDC motor drive with Back-EMF Zero Crossing using AD convertor, is described in Figure 7-3 and Figure Manual Speed PC Setting Master Omega_Required_Mech ApplicationMode Process Application State Machine Status_Commutation Cmd_Application ...

Page 37

Freescale Semiconductor, Inc. Protection processes are shown in sub-sections. DC-Bus Current Temperature (A/D) I_Dc_Bus Temperature Process Fault Control DriveFaultStatus Process Application State Machine 7.2.1 Process Application State Machine This process controls the application subprocesses by status and command words Figure ...

Page 38

Freescale Semiconductor, Inc. Software Design 7.2.3 Process ADC Zero Crossing Checking This process is based on the ADC Zero Crossing feature. When the free (not energized) phase branch voltage changes the sign comparing previous conversion results, the Zero Crossing interrupt ...

Page 39

Freescale Semiconductor, Inc. The speed controller works with a constant execution (sampling) period. The request is driven from a timer interrupt with the constant PER_SPEED_SAMPLE_S. The PI controller proportional and integral constants were set experimentally. 7.2.6 Process Current PI Controller ...

Page 40

Freescale Semiconductor, Inc. Software Design 7.3.2 Initialize The Main software initialization provides the following actions: • CmdApplication = 0 • DriveFaultStatus = NO_FAULT • PCB Motor Set Identification — boardId function is used to detect one of three possible hardware ...

Page 41

Freescale Semiconductor, Inc. Reset Up Button Increment Required Speed (Switch = Stop) || (abs (Required Speed) <= Minimal Speed) BLDC Stop (Switch = Run) & (abs (Required Speed) > Minimal Speed) Drive Fault Drive Fault Emergency Stop Figure 7-7. State ...

Page 42

Freescale Semiconductor, Inc. Software Design The drive starts by setting the Alignment state where the Alignment commutation step is set and Alignment state is timed. After the time-out the Starting state is entered with initialization of Back-EMF Zero Crossing algorithms ...

Page 43

Freescale Semiconductor, Inc. Running - Begin No Zero Crossing get during last commutation period Calculate Next Commutation after No Zero Crossing Corrective Calculation 1. Preset Next Commutation settings and timing Zero Crossing Missed during Per_Toff Figure 7-9. Substates - Running ...

Page 44

Freescale Semiconductor, Inc. Software Design 7.3.4.3 Commutation Control - Set Running This state serves the transition from the Starting (Back-EMF Acquisition) state to Running state by the BLDC Zero Crossing algorithms (Section 11.1) according to the following actions: • T_Actual ...

Page 45

Freescale Semiconductor, Inc. 7.3.5 State Diagram - Process ADC Zero Crossing Checking Reset Zero Crossing Disabled Commutation Control states: Stop/Alignment Figure 7-10. State Diagram - Process ADC Zero Crossing Checking The status of the ADC Zero Crossing checking depends on ...

Page 46

Freescale Semiconductor, Inc. Software Design 7.3.6 State Diagram - Process ADC Zero Crossing Offset Setting measure U_Dc_Bus and free phase average U_Phx Commutation status: Alignment Commutation status: Stopped Zero Crossing Offset Setting Disabled Reset Figure 7-11. State Diagram - Process ...

Page 47

Freescale Semiconductor, Inc. 7.3.7 State Diagram - Process Speed PI Controller U_Desired = PI (Reference Speed - Actual Motor Speed) Speed Control Request Figure 7-12. State Diagram - Process Speed PI Controller The Speed PI controller algorithm controllerPItype1 is described ...

Page 48

Freescale Semiconductor, Inc. Software Design 7.3.8 State Diagram - Process Current PI Controller U_Desired = PI (Reference Current - Actual Current) Current Control Request PWM Reload (PWM period) Start ADC Conversions Figure 7-13. State Diagram - Process Speed PI Controller ...

Page 49

Freescale Semiconductor, Inc. 7.3.9.2 ADC Low Limit Interrupt Subroutine This subroutine is called when at least one ADC low limit is detected. In this interrupt subroutine, the following low limit exceeds are processed: • The undervoltage of the DC-Bus voltage ...

Page 50

Freescale Semiconductor, Inc. Setting of Software Parameters for Other Motors . Memory (in 16 bit Words) Program FLASH Data RAM Figure 9-1. RAM and FLASH Memory Usage for SDK2.2 10. Setting of Software Parameters for Other Motors The software was ...

Page 51

Freescale Semiconductor, Inc. 10.1 Current and Voltage Settings 10.1.1 DC-Bus Voltage, Maximal and Minimal Voltage and Current Limit Settings For the right regulator settings required to set the expected DC-Bus voltage in bldcadczcdefines.h: #define x_VOLT_DC_BUS The current voltage ...

Page 52

Freescale Semiconductor, Inc. Setting of Software Parameters for Other Motors 10.2.1 Alignment Period The time duration of the Alignment state must be long enough to stabilize the motor, before it starts. This duration is set in seconds in bldcadczcdefines.h. #define ...

Page 53

Freescale Semiconductor, Inc. 10.2.3 Minimal Zero Commutation of Starting (Back-EMF Acquisition) State #define x_MIN_ZCROSOK_START This constant x_MIN_ZCROSOK_START determines the minimal number of Zero Crossing OK commutation to finish the BLDC starting phase. Notes recommended to use only the ...

Page 54

Freescale Semiconductor, Inc. Setting of Software Parameters for Other Motors this final Coef_CmtPrecomp determines the interval between motor commutations when no Back-EMF Zero Crossing Coef_CmtPrecomp with commutation period. Coef_HlfCmt determines Commutation advancing (retardation) - the interval between Back-EMF Zero Crossing ...

Page 55

Freescale Semiconductor, Inc. used to count x_SPEED_PI_PROPORTIONAL_GAIN, x_SPEED_PI_PROPORTIONAL_GAIN_SCALE x_SPEED_PI_INTEGRAL_GAIN, comments! 11. References 11.1 Software Development Kit, SDK rev.2.3 • Targetting_DSP56805_Platform.pdf — located at: Embedded SDK\help\docs\sdk\targets\Targetting_DSP56805_Platform\content • Targetting_DSP56803_Platform.pdf — located at: Embedded SDK\help\docs\sdk\targets\Targetting_DSP56803_Platform\content • Motor Control.pdf, chapter BLDC motor commutation with ...

Page 56

Freescale Semiconductor, Inc. TM OnCE is a registered trademark of Motorola, Inc. Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the suitability of its products for ...

Related keywords