Freescale PowerPoint Template

Download Report

Transcript Freescale PowerPoint Template

January 22th, 2010
3-Phase Sensorless BLDC Motor Control
Using MC9S08MP16
Presentation
Libor Prokop
System Application Engineer
TM
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
Presentation Outline
► BLDC
Motor Control Generally
► Sensorless BLDC with BEMF Zero Crossing
► DRM117 Sensorless BLDC Motor Control Application
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
2
120o
60o
A
B
C
BLDC Motor Control Generally
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
3
6 - Step Commutation Diagram
►Six
•
•
•
•
Step BLDC Motor Control
A
0
%
Voltage applied on two phases only
It creates 6 flux vectors
Phases are power based on rotor position
The process is called Commutation
1.
0
%
2.
B
C
3.
5.
4.
6.
BLDC
ØA
ØC
ØB
Phases voltage
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
4
6 step (120 Degree) 3-phase BLDC Motor Control
► Stator field is maintained 60° to 120° relative to
► Therefore the rotor position must be estimated
•
Right Before Commutation
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
•
rotor field
Right After Commutation
TM
5
Power Stage – Motor Topology
3-PHASE POWER STAGE
PWM1
SAT
PWM3
S BT
B
PWM5
SCT
POWER
SOURCE
DC VOLTAGE
A
PWM2
SAB
PWM4
S BT
PWM6
SCT
C
3-PHASE BLDC MOTOR
MOSFET/IGBT DRIVERS
PWM1
PWM2 PWM3
PWM4
PWM5
PWM6
PULSE WIDTH MODULATOR
(PWM) MODULE (FLEX TIMER)
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
Controller
TM
6
Second Quadrant
negative speed-positive torque
“reverse-braking”
Current
(Torque)
Quadrants of Operation
Generating
Motoring
I
Motoring
First Quadrant
positive speed-positive torque
“forward-accelerating”
II
III IV
Third Quadrant
negative speed - negative torque
“reverse-accelerating”
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
Voltage
(Speed)
Generating
Fourth Quadrant
Positive speed - negative torque
“forward-braking”
TM
7
Bipolar BLDC Commutation
(3 Complementary PWM pairs)
► Allows energy recuperation
► BOTTOM is opposite of TOP
► Requires sophisticated PWM
commutation
commutation
commutation
120o
support
commutation
commutation
commutation
commutation
SAt
A - Off
A - Off
SAb
A - Off
A - Off
SBt
B - Off
B - Off
SBb
B - Off
B - Off
SCt
C - Off
SCb
C - Off
commutation
60o
C - Off
C - Off
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
SAt
SBt
SCt
SAb
SBb
SCb
C - Off
3phase
Brushless
DC motor
C - Off
ØB
ØA
ØC
TM
8
Bipolar BLDC Commutation (Complementary PWMs) Detail
►BOTTOM
is opposite of TOP
Dead Dead Dead Dead Dead Dead
Time Time Time Time Time Time
SAt
A - Off
SAb
A - Off
SBt
B - Off
SBb
B - Off
SCt
B - Off
C
SCb
B - Off
C
Dead Dead
Time Time
Dead Dead
Time Time
Swap
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
9
Unipolar BLDC Commutation
(3 Complementary PWM pairs)
► Allows energy recuperation
► BOTTOM is opposite of TOP
► Requires sophisticated PWM
commutation
commutation
commutation
120o
support
commutation
commutation
commutation
commutation
SAt
A - Off
A - Off
SAb
A - Off
A - Off
SBt
B - Off
B - Off
SBb
B - Off
B - Off
SCt
C - Off
SC
C - Off
commutation
60o
C - Off
C - Off
SAt
SAt
SCt
SAb
SBb
SCb
C - Off
3phase
Brushless
DC motor
C - Off
ØB
ØA
ØC
b
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
10
Sensorless BLDC with BEMF Zero Crossing
TM
Synchronous PM Motors
► Stator
Field needs to be close to orthogonal (90°) to rotor field to get
maximal torque and energy efficiency:
+Vp (PWM)
La
Running
Direction
Motor
Torque
90`
Lc
LbStator Flux
GND (PWM)
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2007.
TM
12
BLDC Motor Back-EMF Shape
Phase A-B Voltage
Phase B-C Voltage
Phase A
Phase C-A Voltage
Phase B
Phase C
A
CH4
0V
C
B
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2007.
TM
13
BLDC Commutation Specifics
A
B
C
0
%
1.
3.
5.
4.
6.
0
%
2.
BLDC
ØA
ØC
ØB
USc = UbackEMFc
► After
•
the commutatation current transient:
Ic = 0 and so UC = BEMFC
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
14
Sensorless BLDC Motor Control with BEMF Zero-Crossing Detection
Appropriate Phase
Comparator Output
selected
Zero Crossing event
detected
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
15
Sensorless Commutation and BEMF
0
60
120
180
240
300
360
Rotor Electrical Position (Degrees)
Phase R
Phase S
Phase T
Zero
crossings
PWM 1
PWM 3
PWM 5
PWM 2
PWM 4
PWM 6
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
16
BLDC Central Point Is Not Accessible
► 3-phase
invertor and DC bus current measurement
Inverter Stage
Udcbus
Not Accessible
Rshunt
Phase c
Idcbus
Phase b
BLDC
Motor
Phase a
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
17
BLDC Motor Voltages at Bipolar Switching Phases
1
-
+
Regeneration
2
-
I
+
-V
2
1
+
-
+
-
V
Q2 Q1
Q3
3
-
4
+
-
Regeneration
4
Q4
3
+
+
-
+
-
-I
PhC
PhA
PhB
VDCB
Motor Phase A Voltage
1
Motor Central Point
Voltage V0
1(4) Top Bottom
in diagonal on
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
2
3
4
VDCB/2
GND
2(3) Top Bottom
in (inverse) diagonal on
TM
18
BLDC Motor Voltage at Unipolar Switching Phases
1
1 Top Bottom
in diagonal on
+
2
-
2 Two Bottoms on
+
3
3 Top Bottom
in diagonal on
-
One cycle
in Quadrant 1
-
4
+
4 Two Bottoms on
(inverse current)
-
One cycle
in Quadrant 3
+
Motor Phase Voltage
PhC
PhA
PhB
1
2
3
4
VDCB
Gnd
Motor Central Point
Voltage U0
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
VDCB/2
TM
19
Zero Crossing Sensing Reference
HB1
•
A
V0
B
HB2
HB3
HB3
+
-
C
+
-
HB3
HB1
+
-
+
-
C
+
-
•
HB2
B
+
-
+
-
V0
+
-
Udcb
A
A
HB1
V0
HB2
B
+
-
½ UDCB reference
•
GND reference
Virtual CP reference
Udcbus
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
HB1
HB3
V0
Idcbus
HB2
A
Rshunt
C
Motor
Central Point is
not accessible
B
► BLDC
BLDC
Motor
TM
20
Bipolar Commutation (Complementary PWMs) Detail
► BOTTOM
is opposite of TOP
Top and Bottom
in diagonal on
Top and Bottom
negative in diagonal on
SAt
A - Off
SAb
A - Off
SBt
B - Off
SBb
B - Off
SCt
B - Off
C
SCb
B - Off
C
Dead
Time
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
Dead
Time
TM
21
Unipolar Commutation (Complementary PWMs) Detail
► BOTTOM
is opposite of TOP
Top and Bottom
in diagonal on
Two Bottoms on
SAt
A - Off
SAb
A - Off
SBt
B - Off
SBb
B - Off
SCt
B - Off
C
SCb
B - Off
C
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
22
Zero Crossing Detection Measurement Window
► BOTTOM
is opposite of TOP
Top and Bottom
in diagonal on
Two Bottoms on
SAt
SAb
SBt
SBb
SCt
C - Off
SCb
C - Off
Zero-Crossing
Sampling
Window
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
23
Back-EMF Zero Crossing Sensing Circuit
►½
UDCB reference
Phase Selection
According to PWM Sector
Sampling
Phase c
+
-
ZC Sampling
Window
Sampling
Window
Generator
C
Cout
Phase b
B
Positive
MUX
Udcb
V0
A
Phase a
Udcb/2
Negative
MUX
Ud/2
PWM Sync
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
24
Back-EMF Detection Window
CMT
CMT
ZC
Zero Crossing
Detected
BLDC
Commutation
Current
Recirculation
Zero
Crossing
Detection
Process
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
BLDC
Commutation
TM
25
BLDC Commutation with Back-EMF Zero Crossing Sensing
Commutation Done
commutation overtook
zero-crossing
No
BEMF Zero-Crossing
detected between previous
commutations?
Corrective Calculation 1.
with timeZC(k-1) = timeCmt(k-1)
Yes
Service of Commutation:
preset new pwm sector
Wait for periodZCToff until
phase current decays to zero
Preset commutation
time
Yes
BEMF Zero-Crossing
Detected?
Service of received BEMF
Zero-Crossing:
Calculation and corrected
commutation time setting
No
No
has commutation
time expired?
has commutation
time expired?
Yes
Yes
No
Make motor Commutation
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
26
Calculation of the Commutation Timing
timeCmt[n-2] timeCmt[n-1]
T2[n-3]
T2[n-2]
n-1
n-2
timeCmt[n]
T2[n-1]
T2[n]
n
pe riodC mtPres et[n- 1]
COMMUTATION IS PRESET
ZERO-CROSSING
DETECTIONSIGNAL
p eriod ZC[n]
COMMUTATEDATPRESETTIME NO
BACK-BMF FEEDBACK WAS RECEIVED
CORRECTIVE CALCULATION 1.
t imeCm t*[n+ 1]
ZERO-CROSSING
DETECTON SIGNAL
peri odZC[ n-2]
period ZC0[n ] =
p eriod ZC[n- 1]
per iodZC [n]
t imeZC [n-1]
BACK-EMF FEEDBACK
RECEIVEDANDEVALUATED
perZc ToCmt [n]
tim eZC[n ]
perZCT off[n ]
timeC mt**[n +1]
COMMUTATEDWHEN BACK-EMF
ZERO-CROSSING IS MISSED DURING
ZERO-CROSSING
DETECTION SIGNAL
peri odZC[ n]
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
per ZcToCm t[n]
TM
27
Sensorless Commutation - Forced PLL
2nd algorithm implemented on 3-phase Sensorless BLDC Motor Control Using MC9S08MP16
t CMT  t ZCForced  cZCtoCMT  TForced
t
t ZCForced   TForced
Vmotor
TZCerror
0
Regulator
+
tCMT
PWM
DutyCycle
3-phase
Power Stage
Motor
ZC
Detector
t
t ZC   TZC
0
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
28
Sensorless Commutation Control States
STARTMOTOR
► Sensorless
commutation needs three
commutation states :
•
•
•
Alignment
Open-Loop Start
Sensorless Run
► Alignment
ALIGNMENT
must be performed before every
ALIGNMENTTIME
EXPIRED?
start.
► Alignment duration and current is dependent on
motor electrical and mechanical time constant.
► Because after alignment, motor is not spinning,
there is state a Open-Loop Start between
Alignment and Running, in which no Zero
Crosses are detected and commutation must
be performed manually.
NO
YES
OPENLOOPSTART
velocityRampAct > velocityOLtoRun
NO
YES
SENSORLESSRUN
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
29
Alignment Vector
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
30
BLDC Motor Vectors at the Start-up
►Regular
Running Mode
– Close Loop:
► Starting
Mode
Open Loop Ramp:
•
no feedback
•

q
Position estimation fedback

q
supposed rotor position
M
d
 Field
M
S
M
S
M
 Field
M

Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
d
M

TM
31
Open Loop Start
Velocity
Open Loop
Commutation velocity
Ramp Acceleration OL
Velocity
Desired
Alignment
Open Loop Start
Run
Velocity
Threshold
OLtoRun
Closed Loop
Commutation velocity
Ramp Acceleration CL
real speed
time
Alignment
Period
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
32
3-ph
BLDC
Motor
Idc
Control
BLDC Current Control and Limitation
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
33
Speed Controller with Current Limitation
► Current
•
(torque) limitation provided with:
“slow current limitation control” - 2 ms sampling
Desired DC Bus
+
Current Limit
Actual DC
Bus Current
1/T
Period
Zero Crossing
Filtered/Estimated
Current Limitation
PI Controller
-
Velocity Required +
Speed
PI Controller
To
PWM
Velocity Actual
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
34
Current Control/Limitation
►Technique
• SW current limitation with slow control loop
►Issue:
• Problematic current sensing during commutation transient
Controller
SW
current
control
HW
OVC
3-ph
BLDC
Motor
ADC
Idc
+
-
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
35
Current Sampling at Back-EMF Zero-crossing
► Commutation Transient:
• Current not sensed during commutation transient
Back-EMF
Zero-crossing
Phase Voltage
Phase Current
DC Bus Current Envelope
DC Bus Shunt Current
Current
Sampling
At Back-EMF
Zero Crossing
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
36
Freescale Reference Design DRM117
3-phase Sensorless BLDC Motor Control
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
37
Freescale Applications for Sensorless BLDC Motor Control
► DRM117:
3-phase Sensorless BLDC Motor Control using
MC9S08MP16:
•
Uses MC9S08MP16 MCU device with 8-bit S08 core

Some peripheral of the MC9S08MP16 are similar with MCF51AG128
–
•
•
•
Application s/w written in C-language with some S08 assembler
subroutines
Design Reference Manual DRM117 document
Modular h/w design:


•
•
FlexTimer module for 3-phase PWM
3-phase BLDC/PMSM Low Voltage Motor Control Drive board – 36V, 4A
The MC9S08MP16 daughter board module can be replaced with
MCF51AG128 daughter board
Application demo available
New application - Released November 2009
► MCF51AG128
application can be based on existing DRM117
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
38
3-Phase Sensorless BLDC Motor Control Using MC9S08MP16
•
Application Usage:





•
Fans
Compressors
Pumps
Industrial drives
Appliances
Application Features:








Targeted at the MC9S08MP16 8-bit
microcontroller
Sensorless 3-phase trapezoidal BLDC motor
control with six-step commutation (60, 120
degree control)
Three sensorless synchronized commutation
control algorithms incorporating
One of unipolar or bipolar PWM commutation
techniques possible
Back-EMF zero crossing used to synchronize
six-step commutation with rotor position
Running on a Three-phase low voltage (24V)
power board
MC9S08MP16 daughter controller board
FreeMASTER software control interface and
monitor
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
•
Main application components



s/w - written in C-code using some library
algorithms - available for the
MC9S08MP16
h/w - based on Freescale universal
motor control h/w modules
documentation - DRM
TM
39
3-Phase Sensorless BLDC
Motor Control
Using MC9S08MP16
Application Code
Control page
Design Reference
Manual
Demo Hardware
TM
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
3-Phase BLDC/PMSM Low-Voltage Motor Control Drive
3 Phase Inverter
DC Bus Voltage &
Current Sensing
24V
DC Power
Input
3 Phase
BLDC
Motor
3 Phase Voltages
Vdcb, Idcb
Vphasea,b,c
Over-current
FAULT
PWM1..6
FTM
ADC
Module
PDB1
Synchronization
ADC to PWM
ADC
Sensing
I/O
Ports
Superior
System
Application
Monitoring
and Control
USB to
COM
Convertor
HSCMP2
ZC Comparator
FTM2
PWM 3pps Generator
PDB2
ZC to PWM
Synchronization
MC33927
driver
Config.
Commutation
And PWM
Control
Sensorless
Commutation
GPIO
Module
SPI
FTM1
Timer Cmt
(and) ZC
Zero Crossing
Period & Position
Recognition
Simmilar
Peripheral
to
MCF51AG
128
PWM
Duty
cycle
Zero-crossing
Period
Application
Control
1/T
Desired
speed
SCI
Module
Freemaster
Ramp
Generation
Actual
speed
+
Required
speed
MTIM
Time Base
DC Bus
Current
Freescale™ and the Freescale logo are trademarks
of Freescale Semiconductor, Inc. All other product or service names are
Required
PI
+
the property of their respective owners. © Freescale Semiconductor,
Inc. 2008.
torque
On Board
Programmi
ng
Speed
PI Controller
BDM
Limitations
Torque
Controller
MC9S08MP16
41
TM
FreeMASTER
(PC Computer - Superior
system)
rampAccelOL
S/W - Data Flow
rampAccelCL
FreeMASTER
(S08MP16)
regSpeedPIparams
uDdcbFilt
regCurrentPIparams
appControlFlags
regForcedPLLParams
temperatureFilt
velocityDesired
regSyncPLLParams
BLDC (Application Main)
Process
temperature
appFaultFlags
adcSensingStateIndex
appFaultPendingFlags
iDcbLimit
ADC Sensing
Process
Fault Checking
Process
iDcbZcFilt
uDcb
iDcb
velocityAct
bldcMainFlags,
bldcStateIndex
bldcIntTimBFlags
regSpeedPIparams
Align, Ramp, Speed
Regulator
Process
pwm3ppsSector
Zero-Crossing
Detection
Process
regCurrentPIparams
periodBLDCZcFlt
velocityRampAct
zcDetectStateIndex
Sensorless
Commutation
Process
coefCmtPresetHlf
rampAccelCL
coefZcToCmt
timeBLDCCmt timeBLDCCmtNext pwm3ppsSector
coefZcOff
dutyCycleU16
FTM2SYNC_TRIG2
regForcedPLLParams
PWM 3pps Driver
regSyncPLLParams
MC33927Config
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
mc33927ModeCommands,
mc33927MaskInterrupts
TM
42
S/W - BLDC Control State Diagram
appFaultFlags!=0
BLDC MCUInit
BLDC Fault
Done
appFaultPendingFlags = 0 &
appControlFlags.Bits.FaultClear
BLDC AppInit
FaultPin
(over-current)
appFaultFlags!=0
BLDC Fault ISR
BLDC Sensorless Run
Forced PLL
(Forced Cmt)
BLDC Sensorless Run
Synchronized PLL
bldcFlags.ForcedPLLModeRq=0 &
bldcFlags.CurLimit=1
Done
SL_TECHNIQUE_SYNC_PLL &
bldcFlags.SyncPLLModeRq=1 &
appControlFlags.BldcStart=0
SL_TECHNIQUE_FORCED_PLL &
bldcFlags.ForcedPLLModeRq=1 &
bldcFlags.CurLimit=0
bldcFlags.SyncPLLModeRq=0
BLDC Stop
BLDC Sensorless Run
Direct Cmt
(Low Speed Ramp)
appControlFlags.BldcStart=1 &
velocityDesired !=0
Done
velocityRampAct < velocityThresholdRuntoOL
BLDC Alignment
velocityRampAct > velocityThresholdOLtoRun
timBExtendedCntr>alignmentPeriodTimB
BLDC Start Vector
BLDCShift Vector
(Make 1.5(1, 2) steps)
Done
BLDCOpen Loop Start
(Ramp)
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
43
S/W – Application Flow chart (1)
Periodically
50us
at 20kHz PWM
Periodically
3ms
at default sw setting
ADC
ADC Sensing
Complete ISR
MTIM
TimB
Overflow ISR
Read Current
Sample
ADCR
Time alignment/
Speed close
/open loop ramp
MC Reset
Calculate
velocityAct from
periodBLDCZcFlt
iDcb =
ADCR-iDcboffset
MCUInit
Start Secound
Sample
Conversion
(uDcb or
temperature)
ZC Detection
Process
Sensorless
Commutation
Process
Calculate
Speed/Current
Regulator
BLDCProcessState
PWM 3pps Driver
Read
Secound Sample
(one of uDcb,
temperature )
Set PWM Duty
Cycle
Fault Control/
Clear
Background
Loop
Set HW trigger
ADHWT
Preset Next
Current
Conversion
FreeMASTER
Poll
ADC Sensing
Process
Voltage
Temperature
Filter/Average
Alignment/Ramp/Sp
. Reg.
Process
FreeMASTER
recorder
Application and
Fault Control
Watchdog
RTI
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
RTI
TM
44
S/W – Application Flow chart (2)
HSCMP
ZC Comparator
Cur. Recirc. Done ISR
FTM1 ch0
Timer Cmt Zc
OC ISR
Set ZC Detection
Sampling:
Enable Set ZC Input
Capture Edge sensing
ZC Detection State
=Current recirculation
No
Calculate
periodBLDCZcToff
Time Preset CMT:
timeBLDCCmt =
timeBLDCCmt +
periodBLDCCmtPreset/
timeBLDCCmt =
timeBLDCzcEstimated +
periodBLDCZcToCmt
RTI
yes
Calcul ate
timeCmtPreset/
Set ZC Detection
Sampling:
Enable Set ZC
Input Capture
Edge sensing
timeBLDCzcEsti
mated
Set ZC Detection
Curr Recirculation:
Enable Set HSCM
sensing
FTM1 ch1
TimerZc
ZC IC ISR
FTM2
pwm3pps
Fault ISR
Set ZC off
load timeBLDCZc
Switch 3pps off
Calculate
periodZC
timeCmt/
Set Fault
Sync/Forced PLL
closed loop
RTI
ZC Detection
Process
Time Next CMT:
timeBLDCCmt =
timeBLDCzc+
periodBLDCZcTo
Cmt
Sensorless
Commutation
Process
PWM 3pps Driver
RTI
ADC Sensing
Process
Preset Next Cmt
Vector
Alignment/Ramp/Sp
. Reg.
Process
RTI
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
Application and
Fault Control
TM
45
Sensorless BLDC Motor Control Using MC9S08MP16 –
Assumptions:
HCS08 Core Load
Core speed 20MHz
(slow speed control loop is not considered)
Motor Speed 4000rpm,
8 poles =>
625us commutation period
sensorless BLDC motor
direct commutation using
comparators
PWM frequency – 20kHz
Sensorless Run BLDC Direct Commutation
Timer Cmt
Commutation
Timeout
Timer Cmt
Current dec
Timeout
Timer ZC
Zero-Crossing
Detected
25us (*)
10us (*)
20us (*)
55usec -> 10% (*)
100%
625us
Ca 300us
12 bit Analog Variables Sensing and Filtering Service
ADC
service
14us
55usec -> 30% (*)
ADC
service
14us
50us (*)
ADC
service
14us
ADC
service
14us
ADC
service
14us
ADC
service
14us
100%
50us
Sensorless BLDC Commutation using HSCMP comparators occupies around 10 % and ADC service
occupies around 30 % (*) of HCS08 8bit processor computational power at 4000rpm with 8-pole motor
and 50kHz pwm.
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
46
Thanks for Your Attention
►Questions
and answers
►Contact:
•
Libor Prokop
Freescale
1.maje 1009
75661Roznov pod Radhostem
Czech Republic
• E-mail:[email protected]
•
www.freescale.com/motorcontrol
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
47
Back-up slides
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
48
3-ph
BLDC
Motor
Idc
Control
BLDC Current Control and Limitation 2
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
49
SW Current Control
► Commutation Transient:
• Current not sensed during commutation transient
Phase Voltage
Phase Current
DC Bus Current Envelope
Current Current Current
Control Sampling Control
DC Bus Shunt Current
Tregulator
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
50
HW Current Limitation
► Commutation Transient:
• Problematic current sensing
Phase Voltage
Phase Current
HW
Current
Limitation
DC Bus Current Envelope
DC Bus Shunt Current
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are
the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
TM
51
TM