Identifying, Analyzing and Mitigating Effects on Motor Control

Identifying, Analyzing and Mitigating First-,
Second- and Third-Order Effects on Motor
Control Performance in Vector Control of
PMSM Motor Applications
Renesas Electronics America Inc.
Jeff Shoemaker, Sr. FAE
Date: March 13, 2012
© 2011 Renesas Electronics America Inc. All rights reserved.
00000-A
Agenda
„ PMSM vector control
„ First-Order Effects
z Motor parameters
z Back EMF,
z Reluctance and Cogging torque
„ Second-Order Effects
z
z
z
z
PWM control frequency selection
Dead time impact
Feedback resolution and sensing
Modulation techniques
„ Third-Order Effects
z Fixed point vs. floating point calculations
z MCU/DSP architecture
„ Q&A
2
© 2011 Renesas Electronics America Inc. All rights reserved.
PMSM Vector Control
„ Designers use vector control in PMSM applications to achieve
efficiency and performance
z Requires them to trade off many factors and effects
z A balance is required between system level functionality and
performance and efficiency
„ Renesas has many years of experience working with motor
control, in particular with vector control
z Many control algorithms have been developed and tested
z Showed how this can influence the MCU/DSC selection criteria
„ Our experience has shown us that there are many factors to
consider when developing and designing for optimum
performance and high efficiency
z We have attempted to stratify these considerations into three levels of
effects from overall system level down to the MCU/DSC level
3
© 2011 Renesas Electronics America Inc. All rights reserved.
Permanent Magnet Synchronous Motor
„ Also known as Brushless DC (BLDC) motor
Stator Windings
Stator
Rotor
4
© 2011 Renesas Electronics America Inc. All rights reserved.
Parameter
Value
Motor Pole
4
Phase
3
Voltage
130 V
Current
1.5 A
Power
1/5 hp
Speed
2500 rpm
Inductance
27 mh
Stator Resistor
5.1 ohm
Hall sensors
3
Vector Control
„ Current loop is inside, speed loop is outside
„ Sensorless control has flux and position observer
ω r*
Commanded speed *
iq
Δωr
ωr
id = 0
*
Observed
actual
speed
Inverse
Park transform
*
Uq
iq
Ud
*
α, β
T −1 (θ )
Inverse
Clarke transform
Uα
*
Uβ
*
α, β
id
θ
Park transform
iq
Clarke transform
ia
α, β
iα
id
T (θ )
iβ
α, β
Current loop
ωr
Speed loop
5
© 2011 Renesas Electronics America Inc. All rights reserved.
θ
ib
First-Order Effects
6
© 2011 Renesas Electronics America Inc. All rights reserved.
First-Order Effects: Parameter Mismatch
„ Manifests itself as a gross error in performance
z E.g., Torque or speed off by 50%, instability, etc.
„ A good place to start is the manufacturer’s datasheet or the
ratings listed on the nameplate of the motor
Table I. Motor specifications for Bodine 34B series BLDC motor.
Is there a mismatch between
what is in the datasheet versus
the parameters that are used in
the control algorithm?
Are the order of magnitude and
units correct?
What is the meaning of
specifications and ratings?
7
© 2011 Renesas Electronics America Inc. All rights reserved.
34B Series BLDC Motor Model 3306
Specifications
Model Number
3306 [CAD Drawings]
Category
34B Brushless DC Motor
Speed (rpm)
2500
Rated Torque (oz-in)
81
Rated Voltage
130V
Motor HP
1/5
Torque Constant (oz-in/A)
51
Voltage Constant (V/krpm)
38
Winding Resistance (ohms)
9.2
Winding Inductance (mH)
24
Rotor Inertia (oz-in-sec²)
0.0115
Radial Load (lbs)
42
Length XH (inch)
4.06
Weight (lbs)
6
Product Type
34B3BEBL
Accessory Shaft
NO
Connection Diagram
BLDC Connection
First-Order Effects: Back EMF
„ Back EMF is present in all PM
Motors
„ When the motor rotates, the
magnetic field changes, and this
induces a voltage that opposes
the voltage applied to the motor
z Va = ea +Ra*Ia + La*dia/dt
z where Ra and La are the winding
resistance and winding
inductance respectively
„ The term, ea, is the Back EMF
denoted by
z ea = k E * ωm
z where kE is in units of
V/(rad/sec)
z Typically specified as V/kRPM by
manufacturers
8
© 2011 Renesas Electronics America Inc. All rights reserved.
First-Order Effects: Back EMF Waveform
„ Found in manufacturer’s
datasheet
„ First-order effect is that it limits
the top speed of the motor per a
given amount of applied voltage
because the higher speeds of
the motor a larger Back EMF
„ At some point, the amount of
Back EMF equals the bus
voltage, and there is not
sufficient voltage that can be
applied to the motor to maintain
a certain speed
„ Can be mitigated to some
extent by employing techniques
such as space vector modulation
9
© 2011 Renesas Electronics America Inc. All rights reserved.
U
Ω
V
W
First-Order Effects: Reluctance & Cogging Torques
The reluctance torque is the result of differences between
the q and d axis inductances in a permanent magnet
synchronous motor
„ It manifests itself in the torque performance of the motor
„ Mitigated by employing phase advancing techniques
The cogging torque is created when the magnets in the
rotor interact with the slots in the stator
„ Undesirable first-order effect that is apparent when the
motor is operating at low speed
„ Mitigated by tuning or employing adaptive feed-forward
or current injection techniques
10
© 2011 Renesas Electronics America Inc. All rights reserved.
First-Order Effects: Others To Consider
„ The motor torque constant, Kt, relates the torque produced
by the motor with the current through the motor
z Effective torque constant can be up to 20% lower at peak
current than at lower current
z Mitigate this effect is by properly characterizing Kt as a function
of current and temperature. A lookup table can be used
identify Kt and that can be used for the internal model of the
motor and control algorithm
11
© 2011 Renesas Electronics America Inc. All rights reserved.
Second-Order Effects
12
© 2011 Renesas Electronics America Inc. All rights reserved.
PWM Control Frequency Selection
„ Second-order effects are more pronounced in high
performance algorithms, such as vector control, and dealt
with assuming first-order effects have been satisfied
„ Frequency selection is the result of a tradeoff between
performance, efficiency and available CPU bandwidth
„ The test data shown here is from a sensorless vector control
algorithm implemented on an RX62N CPU board with a
power stage driving a BLDC motor
„ Results show much better control response while
maintaining smooth current at the higher PWM freq at the
cost of double the CPU bandwidth
13
© 2011 Renesas Electronics America Inc. All rights reserved.
Speed Control @10kHz and 16kHz
Motor Speed Using 10kHz Carrier
Motor Speed Using 16kHz Carrier
4010
4010
4008
Accuracy is +/- 5 RPM
4008
Accuracy is +/- 3 RPM
4006
4006
4004
Speed in RPM
Speed in RPM
4004
4002
4000
3998
3996
4000
3998
3996
3994
3994
3992
3992
3990
3990
0
10
20
30
40
50
60
70
Time (units of 10 msec)
26.5 % Bandwidth @10kHz
14
4002
© 2011 Renesas Electronics America Inc. All rights reserved.
80
0
20
40
60
80
Time (Units fo 10 msec)
44.8% Bandwidth @16kHz
100
120
140
Current Control @10kHz and 16kHz
Phase current @10K
26.5 % Bandwidth @10kHz
15
© 2011 Renesas Electronics America Inc. All rights reserved.
Phase current @16K
44.8% Bandwidth @16kHz
Dead-Time Insertion and Mitigation
„ The time inserted between turning OFF the high side and
turning ON the low side, or vice versa
z No power provided to motor during dead time
z Keeps power module from blowing up!
„ As a second-order effect, dead time creates a harmonic
distortion in the current wave form and injects the
disturbance in the current loop affecting the control
performance
„ Mitigated by simple to complex dead-time compensation
techniques to recover performance
„ Cost is CPU utilization but tradeoff may be worth it
A+
Current
ON
A+
A+
Current
ON
A+
Current
A-
ON
A-
Current pass through blows
up power module
16
© 2011 Renesas Electronics America Inc. All rights reserved.
A-
ON
Δt
Dead time prevents the
power module blow up
A-
Dead Time Compensation @10Hz
„ Without compensation, current profile has distinct harmonics
„ With compensation, current profile is smooth
Without dead time compensation
17
© 2011 Renesas Electronics America Inc. All rights reserved.
With dead time compensation
Dead Time Compensation @30Hz
„ Without compensation, current profile has distinct harmonics
„ With compensation, current profile is smooth
Without dead time compensation
18
© 2011 Renesas Electronics America Inc. All rights reserved.
With dead time compensation
Feedback Mechanism Resolution
„ Digital encoders are commonly used in high-end control
where the speed loop is tightly coupled with the current loop
„ Designers must consider the dynamic range, accuracy and
speed loop rate that is required when selecting an encoder
z Examples given in paper
„ Some designers have a dynamic speed loop where the speed
loop rate can change at different speeds
z Must consider how loop dynamics and gains change in this case
19
© 2011 Renesas Electronics America Inc. All rights reserved.
Feedback Mechanism Resolution (2)
„ The ADC is used for current measurement and is available as
a peripheral on an MCU/DSC with 10- or 12-bits resolution
„ 12-bit resolution is better at resolving the zero crossing
region and results in better performance
z e.g, 10 amp max current per phase at 10-bits resolves 20 mA
has much larger step size than 12-bits which resolves down to
5 mA
„ Can also employ over sampling and filtering to increase
resolution of current measurements
„ Be wary of encoder quantization and resolution noise that
can back feed into the speed loop
z Manifests itself as a torque ripple
„ Can be mitigated by employing fixed speed loop if small
counts over speed range are possible or use dynamic loop
rate at speed ranges where performance is critical
20
© 2011 Renesas Electronics America Inc. All rights reserved.
Second-Order Effects: Modulation Techniques
„ High-end control algorithms typically use sinusoidal methods and their
enhancements to continually provide power to all three phases of the motor
10000
8000
6000
4000
Sine value
2000
0
1
40
79
118
157
196
235
274
313
352
-2000
Integer value for u
-4000
Integer value for v
Integer value for w
-6000
-8000
angle
-10000
Three sine waves one for each phase
„ Input voltage to motor is up to max bus voltage per phase
„ Phase to phase voltage is less due to third harmonic being cancelled as a
second-order effect due to the phase voltages shifted 120 degrees apart
PWM @20kHz,
F = 50Hz
2
Vuv < Vbus
U
V
U-V current
W
1
U
Magnitude
Bus Voltage
V
Maximum Line-to-line
Voltage is 86% of Vbus
0
-1
W
-2
0
10
20
30
40
50
time (ms)
Current should be here
21
© 2011 Renesas Electronics America Inc. All rights reserved.
Current not at peak value
Second-Order Effects: Modulation Techniques
„ This second-order effect can be mitigated by injecting the third harmonic
back into the phase voltages before it is applied to the motor
z Known as third harmonic injection or space vector modulation
z Additional scaling is required
Additional scaling
Pure sine wave and 3 rd harmonic
Sine wave plus 3 rd harmonic
„ The modified sine modulation has new PWM values which recover the lost
phase to phase voltage
„ The current value per phase can now achieve the desired maximum value
sin θ +1/6sin3 θ
PWM @20kHz,
F = 50Hz
2
U
V
W
U-V current
Magnitude
1
0
-1
-2
0
10
20
30
time (ms)
Current at peak value
22
© 2011 Renesas Electronics America Inc. All rights reserved.
40
50
Third-Order Effects
23
© 2011 Renesas Electronics America Inc. All rights reserved.
Third-Order Effects: Fixed-Point vs Floating-Point
„ Vector control algorithm requires implementing complex transformations
iu
a-axis
ω
iα
F
iw
Id
ω
b-axis
F
ω
F
Iq
d-axis
iβ
iv
θ
a-axis
b-axis
Clarke Transformation
1
⎡
⎡iα ⎤ ⎢1 − 2
⎢i ⎥ = ⎢
3
⎣ β ⎦ ⎢0
⎢⎣
2
q-axis
1 ⎤ ⎡i ⎤
a
2 ⎥ ⎢i ⎥
⎥
3 ⎥⎢ b ⎥
−
⎢i ⎥
2 ⎥⎦ ⎣ c ⎦
−
Park Transformation
⎡ I d ⎤ ⎡ cos θ
⎢I ⎥ = ⎢
⎣ q ⎦ ⎣− sin θ
sin θ ⎤ ⎡iα ⎤
⎢ ⎥
cosθ ⎥⎦ ⎣iβ ⎦
„ Vector control is typically implemented in a fixed-point DSP or MCU
„ Fixed-point implementation has several issues such as saturation,
continuous normalization and proper accuracy of the variable being used,
especially for the 16-bit DSP devices
24
© 2011 Renesas Electronics America Inc. All rights reserved.
Third-Order Effects: Fixed-Point vs Floating-Point
„
„
„
Renesas implemented both fixed-point and floating-point sensorless vector control
algorithms for BLDC motor control
Results of comparison were presented at the Motor & Drive 2011 conference
Implementation with floating-point uses significantly less code and CPU bandwidth
ω r*
Commanded speed *
iq
Δωr
Speed Regulator
ωr
id = 0
*
Observed
actual
speed
iq
id
Inverse
Inverse
Park transform
Clarke transform
*
Uq
*
iq PI
Uα
d,q
α, β
Regulator
to
id PI
Regulator
Ud
*
α, β
T −1 (θ )
θ
Uβ
*
to
a, b, c
Voltage
Source
3-phase
Inverter
SIN
PWM
Clarke transform
ia
α, β
to
d,q
id
PWM1~6
Motor Model
Based Flux and
Position Observer
Park transform
iq
DC Bus
iα
T (θ )
a,b,c
to
iβ
α, β
ib
Current loop
ωr
θ
3-phase
PMSM
Speed Estimation
Speed loop
Parameter
Fixed-Point
Floating point
Ratio
Comments
CPU bandwidth (μsec)
40
26
0.65
FPU 35% better
Code size (bytes)
13816
7597
0.55
Code reduced by 45%
25
© 2011 Renesas Electronics America Inc. All rights reserved.
Third-Order Effects: Processor Core Architecture
„
Processor utilization and computational performance are third-order effects that can
impact control loop response/performance and ability to perform other tasks
z
„
„
26
Directly influenced by processor architecture and MCU/DSP/DSC selection
Motor control testing by Renesas is done using a RX62x DSC
High performance core with enhanced Harvard architecture, 5-stage pipeline, 64-bit
wide pre-fetch queue minimizes bottlenecks between CPU and memories
© 2011 Renesas Electronics America Inc. All rights reserved.
Third-Order Effects: Processor Core Architecture
„
„
„
„
27
Wait state penalty due to slow flash is another third-order effect that impedes
processor performance
This can be mitigated by selecting a processor that has zero wait states up to the max
CPU clock
To alleviate CPU burden, take advantage of
DMA to automate data transfers such as
current measurement
RX also has DTC (Data Transfer Controller)
peripheral which allows for many more
virtual DMA channels
© 2011 Renesas Electronics America Inc. All rights reserved.
Third-Order Effects: Synchronized ADC/PWM Triggering
„
„
„
„
28
The designer typically wants to have an automatic triggering of A/D conversion start
relative to some point within the PWM timing cycle
Having an advanced timer set with double buffering allows for asymmetric PWM and
flexibility to set A/D conversion start trigger anywhere on the PWM timing cycle
This is especially advantageous when implementing single-shunt sensorless vector
control
Interrupt skipping capability can allow designer to set up current loop interrupt at a
fixed multiple of the PWM frequency to help reduce CPU utilization
© 2011 Renesas Electronics America Inc. All rights reserved.
Summary
„ Renesas motor control team has shared our experiences
within the engineering community
„ A summary of first-, second- and third-order effects has
been presented
z First-order effects are system-level effects all designers must
satisfy in order to have properly functioning motor control
system
z Second-order effects are pronounced in high-performance
motor control implementations such as vector control
z Identifying and mitigating third-order effects results in a more
optimized and robust design
„ The RX62T and RX62N DSC are very well suited for dealing
with second- and third-order effects
29
© 2011 Renesas Electronics America Inc. All rights reserved.
Jeff Shoemaker
Jeffrey.Shoemaker@Renesas.com
Thank you
30
© 2011 Renesas Electronics America Inc. All rights reserved.
Renesas Electronics America Inc.
© 2011 Renesas Electronics America Inc. All rights reserved.