pmsm foc dtc
TRANSCRIPT
UPC
PMSM Control (FOC & DTC) for WECS & Drives
Dr. Antoni Arias. Universitat Politècnica de Catalunya. Catalonia. (Spain)
1/98
UPC
• Introduction & motivation• Permanent Magnet Synchronous Machine (PMSM)
– Dynamic equations– Modeling
• Vector Control Strategies– Field Oriented Control (FOC)
• Current & Speed Loops• PI & IP controllers: root locus, specifications, tuning and DSP C code
Guidelines
–Direct Torque Control (DTC)• VSI review • Flux & Torque Loops• Hysteresis Comparators
• Space Vector Modulation (SVM)
• Case study: Wind Turbine• Experimental approach:
– Platforms– Implementing issues
2/98
UPCIntroduction & Motivation
• An electric drive is an industrial system which performs the conversion of electrical energy to mechanical energy (in monitoring) or vice versa (in generator braking) – Production plants, transportation, home appliances, pumps, air
compressors, computer disk drives, robots, etc…
Regenerative braking
3/98
UPCIntroduction & Motivation
Field Orientated Control (FOC) & Direct Torque Control (DTC) deserve special attention since both are high performance vector controllers.
• Electric drives involves many applications ranging from below 1kW up to several dozens of MW.
High performance means: (i) wide speed range,
(ii) fast and precise response in speed or position.
4/98
UPC
• Electric machines drives absorb a large amount of the electrical energy produced. – 50% of the electrical energy is used in electric drives today (1).– In the industrial countries, EM take around 65% of the entire electrical
energy available (2).(1) I. Boldea, S. A. Nasar. “Electric Drives”. CRC Press. Second Edition. 2006
(2) Kazmierkowski, M. P; Tunia, H. “Automatic Control of Converter-Fed Drives". Elsevier. Studies in Electrical and Electronic Engineering 46. 1994.
• Electric Drives market by 2017: US$ 62.3 billion by 2017 (3). (3) Global Industry Analysts, Inc.
• Sensorless and High Performance Controls are still hot research topics (4).
(4) IEEE Xplore & Elsevier
Introduction & Motivation
5/98
UPC
• AC versus DC: (i) brushless (ii) higher torque density (iii) lower initial and maintenance costs, (iv) power electronics for AC and DC have comparable prices.
AC versus DC electric drives market evolution (1)
(1) I. Boldea, S. A. Nasar. “Electric Drives”. CRC Press. Second Edition. 2006
Introduction & Motivation
6/98
UPC
• DC • AC
– Induction– Switched Reluctance. Stepper. Hybrid.– Permanent Magnet
• PMDC – Brushless• PMSM: SMPMSM, IPMSM
• Linear• Nano• etc...
PMSMs are gaining market becoming a key point for the
sustainable development of the present century.
Introduction & Motivation
SRMs possess potential market. Second machine most used in China !http://green.autoblog.com/2011/06/28/need-rare-earth-
metals-switched-reluctance-motors-dont/
clas
sific
atio
n
7/98
UPCPermanent Magnet Machines
• Magnetic material to establish the rotor flux.– Neodymium-iron-boron (Nd2Fe14B) magnet is the strongest type of
rare-earth permanent magnet, which was developed in 1982 by GM.
• Advantages:– No rotor currents => no rotor losses => higher efficiency => energy
saving capability. Attractive for Wind applications.– Smaller rotor diameters, higher power density and lower rotor inertia.– Higher torque per ampere constant.– Less weight and volume for the same power. Attractive for aerospace
applications such as aircraft actuators.– Other applications: machine tools, position servomotors (replacing the
DC motors).
• Inconvenience: – Synchronous machines => need of rotor position. Sensorless control.– Price.– Permanent magnet is becoming a scarce raw material.
8/98
UPCPermanent Magnet Machines
Mavilor. Might be used in Electrical Vehicles
1,3 - 31,8 (Nm) 6000 - 9000 (rpm)
Unimotor. Emerson. Control Techniques. 0,72-73,2 (Nm) 2000-6000 (rpm) 230/400(V)
General purpose
9/98
UPCPermanent Magnet Machines
PMSG 13.5kWMulti-pole. External rotorWind turbine laboratory rig
(in collaboration with Robotiker - Tecnalia)
4Q Motor Drive System4kW DC – PMSM 1 kW
General purpose laboratory rig
10/98
UPC
• Considering the shape of the back EMF• PMDC – brushless DC (BLDC) - trapezoidal• PMAC – sinusoidal
Surface Mount Permanent Magnet Synchronous Machine (SMPMSM)
Permanent Magnet Machines
Interior Mount Permanent Magnet Synchronous Machine (IMPMSM)
11/98
UPCPMSM Dynamic Equations
• Combines the individual phase quantities into a single vector in the complex plane
• Same transformation is applied to all other magnitudes such as voltages, fluxes, etc…
invariant power invariantpower non
)()()(
32
32
34
32
c
etietiticij
c
j
ba
• Space vector transformation
12/98
UPCPMSM Dynamic Equations
• Basic equation for phase windings voltages
• Total flux linkage
flux produced by the rotor magnet
Leakage inductance
Magnetising inductance
Self inductance
Mutual inductance
c
b
a
c
b
a
s
c
b
a
dtd
iii
Rvvv
)cos()cos(
)cos(
343
2
r
r
r
m
c
b
a
ccbca
bcbba
acaba
c
b
a
ψiii
LMMMLMMML
ψψψ
mψ
lL
mL
mlcba LLLLL
2m
cabcabLMMM baab MM; = cbbc MM; = acca MM; =
a
b
c
i
ib
ic
b
c
a
ava +-
vc+
-
-
+vb
m
r
13/98
UPCPMSM Dynamic Equations
• Voltage vector equation in the stationary - frame
)cos(
)cos(23
2
r
rmmls dt
dψii
dtdLL
ii
Rvv
i
v +-
m
r
i
v
+
-
a
b
c
i
ib
ic
b
c
a
ava +-
vc+
-
-
+vb
m
rClarke
transformation
invariant power invariantpower non
º30cosº30cosº60cosº60cos
32
32
c
xxcxxxxcx
cb
cba
14/98
UPC
i
v +-
m
r
i
v
+
-
a
b
c
i
ib
ic
b
c
a
ava +-
vc+
-
-
+vb
m
r
invariant power
invariantpower non;
23
230
21
211
32
32
cxxx
cxx
c
b
a
invariant power invariantpower non1
;
23
21
23
21
01
32
cxx
cxxx
c
b
a
Clarke-1 Transformation
Clarke Transformation
• Non power invariant versus power invariant. See the comparison.
PMSM Dynamic Equations
15/98
UPCPMSM Dynamic Equations
• Saliency: Variation of the stator phase inductance as function of the rotor position.
)2cos(
)2cos(
)2cos(
32
34
rmmla
rmmlb
rmmla
LLLL
LLLL
LLLL
)2cos(2
)2cos(2
)2cos(2
34
32
rmm
ca
rmm
bc
rmm
ab
LLM
LLM
LLM
m
d
q
mml
rmmla
LLL
)θ2cos(LLLL
Δ-+=
=Δ-+=
m
r
dq
ml
rmmla
LL
)θ2cos(LLLL
+=
=Δ-+=
m
r
d
q
mml
rmmla
LLL
)θ2cos(LLLL
Δ++=
=Δ-+=
16/98
UPCPMSM Dynamic Equations
• voltage vector equation in the stationary - frame considering saliency
• Where
• If there is no saliency and it is obtained the previous equation.
)cos()cos(
)2cos()2sin()2sin()2cos(
2
r
rm
rssrs
rsrsss
dtdψ
ii
LLLLLL
dtd
ii
Rvv
msmls LLLLL 23;
23
0mL
17/98
UPCPMSM Dynamic Equations
• Voltage vector equation in the synchronous reference d/q frame fixed to the rotor • Angle chosen equal to the PM position• Direct axis ( Ld = LS
-ΔLS ) and quadrature ( Lq = LS+ΔLS ) axis inductances
m
r
d
id+
-vd
vq
+
-
iq
q
Parktransformation
i
v +-
m
r
i
v
+
-
10
rmq
d
qrd
rqd
q
ds
q
d ψii
dtdLLLdtdL
ii
Rvv
18/98
UPC
i
v +-
m
r
i
v
+
-
xx
xx
q
d
cossinsincos
m
r
d
id+
-vd
vq
+
-
iq
q
q
d
xx
xx
cossinsincos
PMSM Dynamic Equations
Park Transformation
Park-1 Transformation
19/98
UPC
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35-0.25
-0.2
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
Time [ s ]
[ A ]
ialpha
ibeta
ibiciqid
• Non power invariant • Different constant values. (c=2/3) for Clark & (c=1) for Clarke-1.
• Same amplitudes for (a,b,c) & (α,β) & (d,q).
PMSM Dynamic Equations
20/98
UPC
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
Time [ s ]
[ A ]
ialpha
ibeta
ibiciqidia
• Power invariant • Same constant value. ( c=sqrt(2/3) ) for Clark & Clarke-1.• Different amplitudes for (a,b,c) versus (α,β) & (d,q)
PMSM Dynamic Equations
21/98
UPC
c
b
a
q
d
xxx
cxx
23
230
21
211
cossinsincos
invariant power invariantpower non
;
32sin3
2sinsin3
2cos32coscos
32
32
cwhere
xxx
cxx
c
b
a
q
d
• Direct (Clarke & Park) transformation
PMSM Dynamic Equations
22/98
UPC
q
d
c
b
a
xx
cxxx
cossinsincos
23
21
23
21
01
invariant power invariantpower non1
;
32sin3
2cos3
2sin32cos
sincos
32
cwhere
xx
cxxx
q
d
c
b
a
• Direct (Clarke & Park) Inverse transformation
PMSM Dynamic Equations
23/98
UPCPMSM Dynamic Equations
• Instantaneous torque expression:
qdqdqm
dqqqddm
dqqde
LLiiiPciiLiiLPc
iiPciPcT
fluxmagnet permanent theis psi - andnumber poles'pair theis ,
invariant power 1invariantpower non
where; 23
m
P
c
• First term, usually called as magnet torque, is directly proportional to iq and independent of id .
• Second term, or reluctance torque, is only present in salient machines where ( Ld - Lq ) ≠ 0 and is proportional to the current product ( id ·iq).
24/98
UPC
function transfer;
equation ldiferentia ;
DJsTTw
TTwDdt
dwJ
Lem
Lemm
• Motion equation• Drive Inertia ( J )• Damping constant due to Friction ( D or F )• Load Torque ( TL )
PMSM Dynamic Equations
25/98
UPC
Exercise: Sketch a complete PMSM scheme model• Use the d/q model equations• Find out all the required equations involved• Determine where the Clarke (a,b,c) to (α,β) & Park (α,β) to (d,q)
transformations should be applied to get a more realistic model
PMSM Modeling
26/98
UPCPMSM Modeling
27/98
UPCPMSM Modeling
•The adopted parameters for the model are as follows: Lq=0.009165; Ld=0.006774; R=1.85; psi=0.1461; P=3.(specific motor data is on the next page)
•For the motion equation of the whole drive it can be used: J=0.77e-3; F=1e-3.
28/98
UPC
unimotor fmEmerson Control Techniques
Model: 115E2A300BACAA115190
Number of poles: 6
Rated speed: 3000 (rpm)
Rated torque: 3.0 (Nm)
Rated power 0.94 (kW)
KT: 0.93 (Nm/Arms)
KE: 57.0 (Vrms/krpm)
Inertia: 4.4 (kgcm²)
R (ph-ph): 3.7 (Ohms)
L (ph-ph): 15.94 (mH)
Continuous stall: 3.5 (Nm)
Peak: 10.5 (Nm)
PMSM Modeling
• Ld and Lq values?
• ΔLs can be obtained measuring the inductance for different rotor positions.
• The first order system, composed by an L and R, can be identified by supplying a step voltage in the d and q components.
How to obtain the parameters from a commercial catalogue?
ssdssq
dqdqs
LLLLLL
LLLs
LLL
;2
;2
29/98
UPC
• How to obtain the J and F values? • The first order system, composed by a F and F, can be identified by
supplying a step torque. • Usually, the machine manufacturer provides the J value. In a laboratory
rig composed by two machines, the total J value can be then worked out from the manufacturer data.
• Why KT and KE are not equal? • The units must be in the International System.
• Experimental (taken in the laboratory) KE value is 56.22 instead of 57.
rms
rmsANm
radrevs
rpmV
TE
Fm
Lstar
connectedFm
FmFF
KK
ITV
ITVTIV
929.02
1160
100022.563;3
333;3
min
PMSM Modeling
30/98
UPC
•How to obtain the value?
From the torque expression, and the KT (Nm/Arms) parameter, it can be deduced the following expression:
Finally, the numerical value will be:
And the factor is used to convert the rms to the maximum value.
qme iPcT
PcKPcK
iT T
mmTq
e
WbPc
KTm 1461.0
323
93.0 21
m
21
PMSM Modeling
31/98
UPCPMSM Modeling
Lq=9.1e-3 Ld=6.7e-3R=1.85psi=0.1461 P=3J=0.77 F=1e-3
Ld=Lq=0.016416 R=0.656psi=3.184 P=10J=206.05 F=1.5
32/98
• Parameters are PMSM (L, R, psi, P) and whole drive (J, F) dependent.
UPCTypes of Controllers
33/98
UPCField Oriented Control (FOC) for PMSM
• Instantaneous torque for the PM synchronous machine
m
r
dq
Iq>0
m
r
dq
Iq<0
Te > 0 Te < 0
)( 23
qdqdqme LLiiiψPT
• If id = 0, for not demagnetizing the PMSM, the reluctance torque is 0.• Therefore, the electromagnetic torque will be regulated with iq .
• Duality with the DC Machine control.
qm iψP 23
id = 0
34/98
UPCFOC in PMSM
Four quadrant Motor (Q1 & Q3) Generator (Q2 & Q4) 35/98
UPCFOC Scheme
Typical dynamic values (for a PMSM 0.5 / 10 kW)
discretization time / switching frequency
Closed loop time response / band width
Current 100 µs / 10kHz 5ms / 200HzSpeed 5ms / 200Hz 0.5s / 2Hz (inertia dependent)
• 3 PI control loops: • 2 inner (and faster) current loops.• 1 outer (and slower) speed loop.
Limited by the semiconductors
switching frequencySeparation principle will be applied
36/98
UPCCurrent Controller
• The current loop, for controlling design purposes, can be modeled as a first order system.
s
s
s
RLsRL
Rvi
;1
1
10
emq
d
qed
eqd
q
ds
q
d ψii
sLLLsL
ii
Rvv
11
sRLR
sd
s
11
sRLR
sd
s
11
sRLR
sq
s
11
sRLR
sq
s
• The coupling terms are eliminated, since they are considered as a perturbation.
37/98
UPC
• The current loop can be modeled as a first order system, whose transfer function in Laplace domain is:
)(99.01)(;5)(98.01)(;4)(95.01)(;3)(632.01)(;
)()1(1)(
tvRtittvRtittvRtittvRtit
tveRti
s
s
s
s
t
s
4
1)(1
)()(
sRLR
sVsI
s
s
• Its open loop step time response is:
Current Controller
38/98
UPC
0 0.005 0.01 0.015 0.02 0.025 0.030
0.1
0.2
0.3
0.4
0.5
0.6
0.7
System: gTime (seconds): 0.0172Amplitude: 0.531
System: gTime (seconds): 0.0298Amplitude: 0.54
Step Response
Time (seconds)
Am
plitu
de
• Considering the motor parameters given before:
• Time constant:
• Time response at 98%
• Final value:
)(23.174 ms
185.110·97.785.11
)()(
3 ssV
sI
)(31.485.110·97.7 3
ms
54.085.11
Current Controller
39/98
UPC
0 0.01 0.02 0.030
0.2
0.4
0.6
0.8
-1000 -500 0
-500
0
500
Open loop s = -Rs/L = -232 = L/Rs = 4.3(ms)
KP=1s = -(KP+Rs)/L = -358
= L/(KP+Rs) = 2.8(ms) Final value: KP/(RS+KP) = 0.35
KP=10s = -(KP+Rs)/L = -1486 = L/(KP+Rs) = 0.6(ms)
Final value: KP/(RS+KP) = 0.84
Root locus
Step response
i* i 1
1sRL
R
s
s
PK• P controller always introduces the Position Error E0
E0 = Rs / (Rs+KP)
-Rs / L
• Solution: add a PI controller
Current Controller
40/98
UPC
-3000 -2000 -1000 0
-1000
0
1000
KP = 14.09 KI = 15945 Closed loop poles -1000+1000j
• Specifications:Settling time at 2% = 4ms
Overshoot 4.23% Damping =0.707
Root locus
-Rs / L 0-KI / KP
11
sRLR
s
s
sKsK IP
Current Controller
41/ 98
UPC
Step response
The overshoot (17%) is too large ! The settling time is not fulfilled !
• The integrator makes the Error E0 = 0• The specifications are not fulfilled:
• What is the problem ?
Current Controller
42/98
UPC
LK
LK
LRss
sKK
LK
i
iIPs
I
PI
2
1
*
22
2
2 nn
n
ss
• What is the closed loop transfer function?
• Is it a pure 2nd
order term? NO! There is an unwanted zero !
A pre filter is used to cancel the zero 1
1sRL
R
s
s
sKsK IP
11
sKK IP
LK
LK
LRss
sKK
LK
sKK
i
iIPs
I
PI
I
P
2
1
1
1*
LK
LK
LRss
LK
i
iIPs
I
2*
Current Controller
43/98
UPC
0 1 2 3 4 5 6 7x 10-3
0
0.5
1
Time (s)
LK
LK
LRss
LK
LK
LK
LRss
LK
sKK
LK
LK
LRss
sKK
LK
i
iIPs
I
IPs
I
I
P
IPs
I
PI
222
1
*
11
sRLR
s
s
sKsK IP
11
sKK IP 11
sRLR
s
s
sKsK IP
zero
PIPF+PI
Current Controller
44/98
UPC
+
-
i* i 1
1sRL
R
s
s
sK I +
-
PK+
-
i* is
K I
1
1
sKR
LKR
Ps
Ps
Root locus
-(Rs +KP )/ L 0
KP = 14.09 KI = 15945 Closed loop poles
-1000+1000j
Settling time at 2% = 4msOvershoot 4.23% Damping =0.707
Current Controller
45/98
UPCCurrent Controller
Fixing the settling time at 2% (Ts2%) and the damping factor (ζ) the KP and KI can be calculated
nTs
4%2
22
2
2 nn
n
ss
L
KL
KLRss
LK
i
iIPs
I
2*
LKR Ps
n
2
snP RLK 2
sP RTs
LK
%2
8
LKI
n 2
2nI LK
2%2
216
TsLKI
2nd order TF Current loop TF with PI or IP
Identifying coefficients
4.22 instead of 4 when ζ = 0.707 46/98
UPC
11
sRLR
s
s
sK I
PK 1
1sRL
R
s
s
sKsK IP
11
sRLR
s
s
sKsK IP
i 1
1sRL
R
s
s
sK I
+
+PK
+P-
LK
LK
LRss
sLi
IPs
2
1
P0 2 4 6 8
x 10-3
0
0.01
0.02
0.03
0.04
Step Response
Time (seconds)
Ampl
itude
PI IP
In terms of Perturbation, both solutions (PI & IP) have the same performance
Current Controller
47/98
UPC
11
sRLR
sd
s
11
sKK IP
• Decoupling terms have to be added:
11
sRLR
sq
s
• Current loop with PI + PF (d axis) and IP (q axis)
-
Lq·we·iq
Current Controller
48/98
UPC
• Implementing PI in a DSP– From S to Z domain
– Ts=100us
Step Response
Time (sec)
Am
plitu
de
0 1 2 3 4 5 6 7 8
x 10-3
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1-z)Ts-1(-z
K)z(PIs
sK)s(PI P
IP
IK
K
P
KK
P =→+
=
1-z,920-z
5,5)z(PIs800s
5,5)s(PI =→+
=
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1Root Locus Editor (C)
Real Axis
Imag
Axi
s
0.84 0.86 0.88 0.9 0.92 0.94 0.96 0.98 1-0.2
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2Root Locus Editor (C)
Real Axis
Imag
Axi
sCurrent Controller
49/ 98
UPC
// start iq PI controlleriq_error = iq_ref-iq;
vq_ref = vq_ref_last+c_Kp*(iq_error-c_Ki_Kp*iq_error_last);iq_error_last = iq_error;
if (vq_ref > VPI_MAX) vq_ref = VPI_MAX;if (vq_ref < -VPI_MAX) vq_ref = -VPI_MAX;vq_ref_last = vq_ref;// end iq PI controller
• Implementing a PI Controller in a DSP– From Z to discrete time domain
– C code for the TI DSP 6711
1-z)Ts-1(-z
K)z(error_iq
)z(ref_vq)z(PI P
IK
K
P==
))]Ts-1(-z(K)[z(error_iq)1-z)(z(ref_vq PI
KK
P=
))]K_K_c(z-1(K)[z(error_iq)z-1)(z(ref_vq pi-1
P-1 =
))K_K_c(last_error_iq-error_iq(Klast_ref_vqref_vq piP+=
Current Controller
50/98
UPC
• The plant can be simplified as follows• First order with one pole • Mechanical time constant might be 50 times slower than the
electrical one. Current loop can be neglected.• Typical sampling time 5ms.
JD-s =
PITe*
DsJ1
e* TL
Speed Controller
51/98
UPC
s1
• Windup phenomenon– Limits of the real plant (currents and voltages)– Might end up with instability
• Anti Windup PI
Speed and Current Controller
52/98
UPCExercise
• Sketch a complete FOC scheme for a PMSM. It has to include:
Speed and currents control loops (PI + pre filter) or IP Saturations (software protections) Anti Windup Feed forward (decoupling) terms
• Draw the magnitudes (speed reference, speed response, iqreference and iq response) waveforms for the cases: (i) electrical car & (ii) lift. Indicate, in the drawn waveforms, the motoring or generating operating modes.
• Propose a programming code (any generic language) to implement a PI.
53/98
UPC
PMSM model in a b c All control in s domain Speed and currents control loops with: PI + pre filter,
Saturations (software protections) and Anti Windup. Feed forward (decoupling) terms for the current loops.
54/98
UPC
The PMSM model has been simplified to d q
55/98
UPC
PMSM model in a b c All control in z domain. Two different sampling periods: Tsm, Ts
56/98
UPC
• SISO tool. Matlab• Matlab/Simulink PMSM FOC. Waveforms.• FOC in a DSP
57/98