IRF AN-1090

15
Application Note AN-1090
IRMCF3xx Series Controller Dynamics and Tuning
By Eddy Ho, International Rectifier
Table of Contents
Page
Introduction .......................................................................................................... 2
Current Controller................................................................................................. 2
Speed Controller .................................................................................................. 6
Field-Weakening Controller ................................................................................ 10
Critical Over Voltage Protection ......................................................................... 12
Interior Permanent Magnet Motor Control .......................................................... 14
This application note describes how to tune the embedded control loops on the
IRMCF3xx series of control IC’s. This covers the IRMCF312, IRMCF311 and
IRMCF343 digital control IC’s for air-conditioning systems and the IRMCF341 IC
for washing machine applications. The control loops include the ID and IQ current
control loops, the velocity control loop, the field weakening loop, IPM control and
bus voltage protection. The note describes the equations used to derive the
control loop constants and experimental methods to tune control constant
www.irf.com
AN-1090
1
15
Introduction
This application note describes how to tune the embedded control loops on the IRMCF3xx series
of control IC’s. This covers the IRMCF312, IRMCF311 and IRMCF343 digital control IC’s for airconditioning systems and the IRMCF341 IC for washing machine applications. The control loops
include the ID and IQ current control loops, the velocity control loop, the field weakening loop,
IPM control and bus voltage protection. The note describes the equations used to derive the
control loop constants and experimental methods to tune control constants.
There are 3 main control loops associated with IRMCK3xx series products. These control loops
are current control loop, speed control loop and Field-weakening control loop. The following table
summarizes the parameter dependence of each control loop.
Parameters
Current
Speed
Field-Weakening
Controller
Controller
Controller
Motor Inductance
Yes
No
Yes
Motor Resistance
Yes
No
No
Voltage constant (Ke)
No
Yes
Yes
System Inertia
No
Yes
No
Motor parameters are required (Parameter Configurator) for drive setup. These parameters are
normally obtained from motor data sheet. IR Sensorless motor controller can tolerate +/-10 %
motor parameter error without noticeable performance degradation.
Increased parameter mismatch between motor and controller will result in degradation of torque
per Amp capability. The degree of degradation is dependent on the operating conditions (speed,
load) and motor characteristics (motor parameters and saturation).
Current Controller
The iMotion current controller utilizes Field-Oriented synchronously rotating reference frame type
regulators. Field-Orientation provides significant simplification to the control dynamics of the
current loop. There are two current regulators (one for d-channel and one for q-channel)
employed for current regulation. The q-channel (torque) control structure is identical to d-channel
(flux). The current control dynamics of d-channel is depicted in Figure 1. The motor can be
represented by a first order lag with time constant T = L/R. This time constant involves motor
inductance and equivalent resistance (R: cable + winding). For a surface mounted permanent
magnet motor, the d and q channel inductances are almost equal. In the case of Interior
permanent magnet motor, the q-channel inductance is normally higher than the d-channel
inductance.
In the current control dynamic diagram Figure 1, forward gain A translates digital controller output
to voltage (include inverter gain) and feedback gain B translates current feedback (Ampere) to
internal digital counts via A/D converter. The calculation of the controller gains (KxIreg, KpIreg_D)
is done by using pole-zero cancellation technique as illustrated in Figure 2 where the current
controller is rearranged to give transfer function block C(S). Setting KpIreg_D/KxIreg of C(S) to
the time constant of the motor (T), the controller zero will cancel off the motor pole (pole-zero
cancellation). Therefore, the controller dynamics can be further simplified as shown in Figure 3.
The equivalent transfer function of Figure 3 is a first order lag with time constant Tc. By selecting
appropriate current regulator response (typically 0.5 to 1 msec, entry of parameter configurator,
Current Reg BW = 1/Tc) for a particular application, the current regulator gains can be readily
obtained. It may be noticed that using pole zero cancellation technique, motor inductance enters
into proportional gain calculation and resistance enters into integral gain calculation.
www.irf.com
AN-1090
2
15
KxIreg
Current
Command
+
Controller
V
+
1
I
1
A
S
-
Motor
R (1 + S T)
+
KpIreg_D
B
Figure 1. Current Control Dynamics
Controller
Current
Command
+
Motor
V
KxIreg (1 + S (KpIreg_D/KxIreg))
A
I
1
R (1 + S T)
S
-
C(S)
B
Figure 2. Pole Zero Cancellation
Controller
Current
Command +
-
Motor
V
KxIreg
S
A
1
R
I
1
1 + S Tc
B
Tc = R/ (KxIreg*A*B)
Figure 3. Simplified Current Control Dynamics Due to Pole Zero Cancellation
www.irf.com
AN-1090
3
15
Based on the pole-zero cancellation technique, the controller gains are evaluated by:
K plreg =
L q ⋅ Current Re gBW
A ⋅B
K xlreg =
R ⋅ Current Re gBW ⋅ 25 ⋅ T
A ⋅B
Where A and B are the internal digital controller scaling (A*B = .006016) and T is the controller
sampling time introduced for sampling compensation.
The following gain calculation illustrates a drive application setup with Parameter configurator
entries shown below:
The current regulator gains are calculated as:
K plreg =
K plreg _ D
K xlreg =
0.04 ⋅ 1500
= 9973
0.006016
0.04 ⋅ 1500
=
= 9973
0.006016
6.1⋅ 1500 ⋅ 25 ⋅ 0.0001
= 4867
0.006016
The current controller in the Sensorless FOC block module directly uses these gains.
MCE designer provides current loop diagnostic test function. This test provides the response of
the current control loop and also the steady state accuracy.
www.irf.com
AN-1090
4
15
Once current regulator diagnostic is executed, step current response can be observed from trace
function or current probes on w-phase. It is recommended to use current probe to observe step
current response. Figure 4 shows (current probe) the step current response of w-phase when
Current Reg diagnostic function is executed. In this figure, 25% step rated motor current is
commanded. The step level can be controlled by parameter ParkI (inside Current Reg Diagnostic
function). Figure 5 shows the expanded version of Figure 4. The measured current loop response
is critically damped at 0.65 msec time constant (0 – 66.3% of final steady value), which is
approximately equal to the anticipated current regulator bandwidth response (1/1500 =
0.667msec).
25%
0%
Figure 4. Step Current Response
0.65 msec
Figure 5. Step Current Response (Expanded Time Scale)
www.irf.com
AN-1090
5
15
Speed Controller
The speed controller is the most outer-loop controller in a cascaded speed drive system. Figure 6
shows the cascaded control dynamics of the speed control loop. In practice, the inner current
loop has much higher control bandwidth than the speed controller, therefore for speed control
dynamic purpose, the inner current loop can be ignored as shown in Figure 7. Parameter M
(Figure 7) relates command current digital counts to actual current in Amps. The motor
mechanical dynamic is a first order function with mechanical time constant equals to J/F
(Inertia/Friction). Pole-zero cancellation technique (outlined in current regulator tuning section)
can be used to simplify tuning of the speed controller proportional and integral gains (KpSreg,
KxSreg). In practice, information on mechanical friction (F) is difficult to obtain. In addition,
temperature dependent friction characteristic is present in some applications. Therefore, manual
speed tuning may be required to achieve optimal speed response. Some applications cannot
tolerate high speed regulator bandwidth due to mechanical resonance present in mechanical
arrangement.
Controller
Speed
Regulator
KxSreg
Motor
Current
Regulator
KxIreg
Load
-
+
S
Speed
Command
+
+
1
-
+
+
11
S
V
+
A
1
I
1
Kt
R (1 + S T)
1/J
+
Speed
S
+
F
KpIreg
KpSreg
B
Speed
Estimator
Filter
J - Inertia
F - Friction
Kt - Torque constant
A, B, C - Conversion Gains
SpdFiltBW
Figure 6. Cascaded Control Dynamics
controller
Speed
Regulator
KxSreg
+
Load
1
S
Speed
Command
Motor
+
+
M
-
1
1/J
Speed
S
-
+
J - Inertia
F - Friction
Kt - Torque constant
C, M - Conversion Gains
KpSreg
Filter
+
Kt
F
C
SpdFiltBW
Figure 7. Simplified Speed Control Loop Dynamics
www.irf.com
AN-1090
6
15
As mentioned earlier, information on mechanical parameters (Friction and Inertia) may be
inaccurate and Parameter Configurator will output less optimal gains for the controller. Manual
tuning of speed regulator can be used to optimize speed performance. Figure 8 shows speed
response (trace buffer speed feedback signal) of a high inertia fan under speed ramping. As can
be seen, the speed response shows oscillatory behavior due to non optimized gain values.
Ramp Speed response
Speed (Digital counts)
3400
3200
3000
2800
2600
2400
2200
1
100
199
298
397
496
595
694
793
892
991
Time (0.55 sec/Div)
Figure 8. Ramp Speed Response
There are many different approaches of tuning PI regulator for various applications. The following
steps provide an example guide line of speed regulator tuning for fan applications.
1) Tuning of KpSreg. Run drive at a convenient speed say 30% rated rpm. Perform small
step (30 to 35% rated rpm) speed response with KxSreg set to zero. The step response
can be achieved by using a fast speed ramp setting (AccelRate). Under such condition,
first order speed response is expected as shown in Figure 9. This figure shows the speed
responses using 3 different proportional gains (KpSreg = Kp1, Kp2, Kp3).
Step Speed Response
Speed (Digital Count)
3400
3200
Increase
KpSreg
3000
Kp1
Kp2
Kp 3
2800
2600
2400
1
201
401
601
801
1001
Time (0.167 sec/Div)
Figure 9. Step Speed Response under Different KpSreg Gains
www.irf.com
AN-1090
7
15
Adjust KpSreg until the desired transient response (Speed regulator bandwidth) is
obtained. For this fan application with high inertia to friction ratio, Kp3 is selected to yield
approximately 0.2 sec first order time constant.
2) Tuning of KxSreg. After the desired proportional gain (KpSreg) is selected (step 1),
please resume nominal ramp rate and speed regulator integral gain (KxSreg). Under
such circumstance (with KpSreg = Kp3 and KxSreg = Kx1), issue a ramp speed
command under the same speed range (30 to 35%) as illustrated in step 1. Figure 10
shows ramp speed responses under 3 different integral gains (Kx1, Kx2 and Kx3). The
response with the original (imported from Parameter Configurator) integral gain (Kx1)
exhibits oscillatory behavior. The integral gain is being reduced (Kx2 and Kx3) just
enough to remove speed oscillation. For this fan application, the response obtained is
acceptable with KxSreg = Kx3.
Ramp Speed Response
Speed (200 Digital Counts/Div)
3600
3400
3200
Reduce
KxSreg
3000
Kx1
Kx2
Kx3
2800
2600
2400
1
100 199 298 397 496 595 694 793 892 991
Time (0.275 sec/Div)
Figure 10. Ramp Speed Response under Different KxSreg Gains
3) Figure 11 shows ramp speed response with non-optimized (KpSreg = Kp1, KxSreg =
Kx1) and optimized (KpSreg = Kp3, KxSreg = Kx3) speed regulator gains. A tighter
control response is exemplified with the gain optimization.
www.irf.com
AN-1090
8
15
Ramp Speed Reponse
Speed (100 Digital Counts/Div)
3400
3200
3000
2800
Optimized
2600
2400
2200
1
100 199 298 397 496 595 694 793 892 991
Time (0.55 sec/Div)
Figure 11. Comparison of Optimized and Non-optimized Speed Response
4) It may be noticed that there is still slight overshoot on the optimized Ramp Speed
response (Figure 11). Most applications can tolerate a slight overshoot (<10%).
Increasing KpSreg or reducing speed ramp rate as shown in Figure 12 can further reduce
speed overshoot. It is recommended to keep overshoot to minimal possible for
applications (i.e. Washer Spin Mode), which require Field-Weakening range of more than
1.5.
Speed (100 Digital Counts/Div)
Speed Overshoot Reduction
3200
3000
Increase
KpSreg
2800
Reduce
Ramp
2600
2400
2200
1
201
401
601
801
1001
Time (0.275 sec/Div)
Figure 12. Speed Overshoot Reduction
www.irf.com
AN-1090
9
15
Field-Weakening Controller
Motor Voltage
Motor Flux
Field weakening is required for wide speed range applications. Back EMF (BEMF) of a motor
increases with speed up to the point that inverter output voltage reaches its maximum level.
Further increase in motor speed requires flux weakening to maintain the motor terminal voltage at
its maximum possible level as shown in Figure 13.
Inverter
voltage
Limit
Crossover
Speed
Speed
Figure 13. Field-Weakening Characteristics
Figure 14 shows a block representation of the Field-Weakening Controller dynamics. The output
of the controller (Fwk_Id) represents a d-axis current component, which opposed the rotor
magnet flux (Flux). By injecting a negative d-axis current, the resultant flux can be reduced and
hence the motor voltage can be limited to stay within the ceiling voltage of the inverter output.
The control loop gain increases with motor frequency as shown in Figure 14. Inside the FieldWeakening controller, gain modulation is used to decouple the variation of loop gain due to motor
frequency.
Motor
Controller
Motor
Frequency
Flux
Modulation
+
level
-
FieldWeakening
Controller
Fwk_Id
B
Ld
+
+
Voltage to
modulation
conversion
Figure 14. Field-Weakening Control Dynamics
Figure 15 shows the Field-weakening controller. This controller is implemented in the MCE
application. As can be seen from this figure, when modulation exceed a prescribed level specified
by FwkLvl, a negative d-axis current (Fwk_Id) will start and lowering down the main flux. The
Field-Weakening controller acts as a modulation index limiter. The gain modulation block serves
to compensate the increase in loop gain due to increase in motor frequency as mentioned earlier.
www.irf.com
AN-1090
10
15
Gain
Modulation
Speed
FwkKxMod
FwkKi
Fwk_Id
+
FwkLvl
Integrate
and
Output limit
Gain
-
(to Inner-loop IdRefExt)
- FwkLim
Dv (Sensorless Foc
output)
modulation
computation
Qv (Sensorless Foc
output)
Figure 15. Field-Weakening Controller Block
With gain modulation incorporated, the control loop gain is decoupled from motor frequency.
Figure 16 shows a simplified representation of the Field-weakening control dynamic. The
equivalent transfer function of Figure 16 is a first order lag system. Parameter M in Figure 16 is a
function of motor inductance, nominal dc bus voltage and the motor crossover frequency (function
of motor Ke). Parameter configurator sets the field-weakening controller gain (FwkKi) based on
parameter M and a prescribed field-weakening loop response (0.25 sec).
FwkKi
Modulation
+
level
1
M
S
-
Figure 16. Simplified Field-Weakening Control Dynamics
The response of the Field-weakening loop can be observed from the command d-axis current
(using MCEDesigner trace function). Under light Field-weakening condition (-10% rated motor
current on field-weakening controller output current), a step change (-2%) in the modulation limit
level (FwkLvl) is issued. When modulation limit reduces, the Field-Weakening controller
increases d-axis motor current (negative) in order to reduce motor flux and satisfy the modulation
limit (voltage limit). Figure 17 shows a step change in FwkLvl and the response of the command
d-axis current. First order response is exemplified from Figure 17. The tuning of the FieldWeakening controller is straightforward since it only involves one controller gain. The response of
the Field-Weakening controller should be high enough to catch up with speed changes. In
practice, most appliance applications do not require high dynamic speed changes in FieldWeakening region. Therefore the response of Field-weakening can be relaxed (typically: 0.1 to
0.4 sec response time. Parameter configurator preset to 0.25sec).
www.irf.com
AN-1090
11
15
Figure 17. Field-Weakening Control Responses,
Vertical: Id command (digital counts) Horizontal: Time (0.1 sec/ div)
Critical Over Voltage Protection
Motor Flux
In order to achieve high-speed operation under limited voltage capability, motor flux is
suppressed by injection of a negative d-axis current (Field-weakening) to the motor. In case of an
inverter shunt down at high speeds, all inverter devices will be disabled and the negative d-axis
field forcing will be lost. Under such circumstance, the motor flux will resume and motor voltage
will build up according to motor Ke as shown in Figure 18. This is a critical over voltage condition
in which the motor BEMF builds up and charges the dc bus capacitor voltage to an exceedingly
large value.
Motor Voltage
Speed
Voltage
increase
Inverter
voltage
Limit
Speed
Inverter
shunt down
Figure 18. Inverter Shunt Down during Field-Weakening
In iMotion control IC (3xx series), the critical over voltage protection is implemented in MCE
application software. Critical over voltage condition is detected by comparing dc bus voltage
feedback to a configurable voltage level (configurable by Parameter Configurator: dc bus critical
voltage). When critical over voltage is detected, command bit CriticalOv (inputs of MCE module
www.irf.com
AN-1090
12
15
Space Vector PWM) will be set. This will trigger a zero vector (low side devices turn-on) PWM
state independent of any condition (including faults). The use of a zero vector enforces short
circuit to the motor terminal and hence prohibits charging of dc bus capacitors. Figure 19
illustrates critical over voltage condition and the engagement of zero vector protection. Upon
application of the zero vector, motor current will circulate within the motor windings and the
rotational energy of the motor will be dissipated inside the motor (copper and core losses).
Critical dc bus
Over voltage
Nominal dc
bus voltage
Motor
W-phase
Current
Hor: 10 msec/ Div
Inverter
Shut down
Zero Vector
initiation
Figure 19. Critical DC Bus Over Voltage
(top: dc bus voltage, bottom: motor current)
The interface between the critical over voltage detection and the Space Vector PWM module is
shown in Figure 20.
SVPWM module
IC Pwm
Pin Outs
port_Ctrl0[1:0]
pwm_lines[6]
00
01
10
11
= input
= "Z"
= "0"
= "1"
PWMUH
User_U
port_Ctrl0[3:2]
User_V
User_W
PwmPeriodConfig
u
Duty
v
Ratio
Modulator w
UserVuvwEn
PwmDeadTm
pwm_lines[7]
pwmcfg[3]
PwmGuardBand
pwmcfg[2]
Guard
Band
Protect
Gate
Mux
UH
= input
= "Z"
= "0"
= "1"
PWMUL
port_Ctrl0[5:4]
UL
UserVabEn
User_Alpha
00
01
10
11
Guard
Band
Protect
Gate
Mux
VH
Guard
Band
Protect
Gate
Mux
WH
VL
GCChargePD
pwm_lines[8] 00
01
10
11
= input
= "Z"
= "0"
= "1"
PWMVH
GCChargePW
From Sensorless FOC
port_Ctrl0[7:6]
User_Beta
From Sensorless FOC
u
ModScl
TwoPhsCtrl[1]
PwmPeriodConfig
MotorSpeed
Pwm2HiThr
Pwm2LowThr
TwoPhsCtrl[0]
WL
Space
v
Vector
Modulator w
(SVPWM)
u
Bootstrap
v
Precharge
w
00
pwm_lines[9] 01
10
11
= input
= "Z"
= "0"
= "1"
PWMVL
port_Ctrl0[9:8]
pwm_lines[10]
2-phase
PWM
Enable
Logic
00
01
10
11
= input
= "Z"
= "0"
= "1"
PWMWH
port_Ctrl0[11:10]
pwmCtrl
00
01
10
11
= input
= "Z"
= "0"
= "1"
PWMWL
CriticalOv
pwm_lines[11]
CriticalOv
MCE Application
Critical Ov protection
Figure 20. Critical Over Voltage Interface
www.irf.com
AN-1090
13
15
In addition to the iMotion control IC, gate driver IC (IRS2631) of the iMotion chip set also provides
over voltage protection. The gate driver IC can be configured to protect dc bus over voltage in the
event of control IC failure using also the zero vector injection method.
Interior Permanent Magnet Motor Control
The motor torque developed by a permanent magnet motor is given by:
Torque =
P
⋅ (FluxM ⋅ Iq + (L d − L q ) ⋅ Id ⋅ Iq )
2
Cylindrical
Torque
Reluctance
Torque
Where
P
Ld, Lq
Id, Iq
FluxM
number of rotor poles
d and q-axis inductance (d axis aligns to rotor magnet).
d and q-axis current components.
Flux linkage of permanent magnet
There are two torque components associated with the motor torque equation. The first
component (Cylindrical torque) is due to interaction between rotor magnet flux and stator q-axis
current. The second component (reluctance torque) is due to motor saliency (difference in d and
q inductance). This saliency term is negligible (Ld = Lq) in Surface Mounted Permanent magnet
(SPM) motors. In the case of an Interior Permanent Magnet Motor (IPM) where Lq not equal to
Ld, the torque per ampere rating is boosted by the saliency torque term. In motoring operation, a
negative Id injection will contribute to the increase in reluctance torque.
Figure 21a shows the current vector trajectory for optimal torque per ampere generation of an
IPM motor. As current magnitude increases, the current angle advancement also increases which
indicates an increase in d-axis current demand in the negative direction. The required current
angle for optimal torque per ampere generation is depicted in Figure 21b. In iMotion control IC,
this optimal current characteristics is approximated by a linear fit as shown in Figure 21b. Two
parameters (AngDel and AngLim) are used to characterize the behavior of optimal current angle
for generating maximum torque per ampere. Parameter AngDel fixes the slope of the linear line
and parameter AngLim limits the maximum allowable angle advancement. Parameter
configurator computes AngDel with 2 points (zero and rated current point). The implementation of
this linear interpolation and the calculation of command d-q current are shown in Figure 22.
www.irf.com
AN-1090
14
15
q
I
Iq'
Current
Angle
d
id'
(a)
AngLim
Current
Angle
(Deg)
Current
Angle
(Deg)
90
90
0
0
Rated Amps
Current Magnitude
Rated Amps
Current Magnitude
(b)
(c)
Figure 21. Current Angle at Maximum Torque per Ampere
TrqRef
IqRef_C
Vector
Rotator
Id_Decoupler
0
AngDel
To current
regulator
commands
AngLim
+
K
+
-AngLim
90 Deg
Figure 22. Current Decoupler for Optimal Torque per Ampere Operation
www.irf.com
AN-1090
15