Professional Documents
Culture Documents
Module 15: C28x Digital Motor Control
Module 15: C28x Digital Motor Control
Module 15: C28x Digital Motor Control
15 - 1
Electrical Motor families
Motor Classification:
Direct Current Motors (DC)
Alternating Current Motors (AC)
Asynchronous Induction Motor (ACI)
Permanent Magnet Synchronous Motor
(PMSM)
Synchronous Brushless DC Motor (BLDC)
15 - 2
3 – Phase - Motor (PMSM)
c
ia I s .e jt
ic 2
j t
ib I S .e 3
j t
4
ic I S .e 3
N
eb E.e 3
jpt
4
e E.e 3
b c
For most three phase machines, the winding is stationery, and
magnetic field is rotating
Three phase machines have three stator windings, separated
120° apart physically
Three phase stator windings produce three magnetic fields,
which are spaced 120°in time
15 - 3
3 – Phase - Motor
Three stationary pulsating magnetic fields
-1,00
magnetic field.
-1,50
15 - 4
Synchronous Motor
Rotor field
A` Rotor is carrying a constant
magnetic field created either
C
F
N by permanent magnets or
B current fed coils
N The interaction between the
rotating stator flux, and the
S rotor flux produces a torque
C` which will cause the motor to
S Stator field
B` rotate.
F
A
The rotation of the rotor in this case will be at the same exact
frequency as the applied excitation to the rotor.
This is synchronous operation.
60. f
Rotor speed (rad/s) : gives (r.pm) Example: a 2 poles pair
p p synchronous motor will
run at 1500 r.pm for a
f : AC supply frequency (Hz) 50Hz AC supply
frequency
p : motor poles pair per phase
15 - 5
Synchronous Motors: BLDC and PMSM
Both (typically) have permanent-magnet rotor and a
A wound stator
CF N` BLDC (Brushless DC) motor is a permanent-magnet
B brushless motor with trapezoidal back EMF
PMSM (Permanent-magnet synchronous motor) is a
permanent-magnet brushless motor with sinusoidal
C back EMF
S F
B `
` A
Back EMF of BLDC Motor
Back EMF of PMSM
300 900 1500 2100 2700 3300 300 900
00 600 1200 1800 2400 3000 3600 600 Ea 1,50
Phase A ia
e 1,00
ea eb ec
Hall A
0,50
Phase B
ib e 0,00
1 24 47 70 93 116 139 162 185 208 231 254 277 300 323 346
t
-0,50
Hall B
-1,00
Phase C
ic e -1,50
Hall C
15 - 6
3 – Phase Voltage Inverter
Six PWM signals
to control
Power Switches
3 - phase
outputs to motor
terminals
Power
Switching
Devices
15 - 7
Scalar Control Scheme ( “ V/f ” )
* PI V PWM1
+ PWM2
PWM PWM3
3-
Command PWM4
PWM5 Phase
V/f profile f PWM6
Inverter
Speed scaling
Speed calculator
15 - 9
FOC control scheme
Inverse Park
IQ VQ Vq
PID PID D,Q Space
PWM1
+ + PWM2
Vector PWM3
3-
ID VD Vd PWM4
PWM PWM5 Phase
PID d,q PWM6
+ Inverter
Field Weakening
Controller
qr
r
IQ Iq ia
D,Q d,q ib
ID ic†
Id
d,q a,b,c
Park T Clarke T
Speed
Calculator
qr
†: ia + ib + ic = 0
vsq
S St vS 1 vS 2 vS 3 0 (tri - phases balanced system)
vSd .vSq 0
vso 0 vs1 vSd .vSo 0
v .v 0
Sq So
vs 2
(vsd, vsq, vso) are called the Park coordinates
vsd: direct Park component
vsq: squaring Park component
vso: homo-polar Park component
Vso is null for a three-phases balanced system
Each pair of components is perpendicular to each other
15 - 12
CLARKE – Transformation
Transform is usually split into CLARKE transform and one rotation
CLARKE converts balanced three phase quantities into balanced two
phase orthogonal quantities
CLARKE
v v v1
v2 vd
2.v2 v1
v
3
vq S St
+
v1= v Rotation
v cos( ) sin( ) v
d S S
v sin( ) cos( ) v
q S S
v3 PARK TRANSFORM 15 - 13
PARK Transform summary
v
v1
Vd
v2 Clarke Park
v
v3 Vq
15 - 15
Digital Motor Control Library (DMC-Lib)
The DMC-Library is a collection of most
commonly used algorithms and function
blocks for motor control systems
For every algorithm and function:
Essential theoretical background information
Data types for input/output parameters with
numerical range and precision
Function prototypes and calling conventions
15 - 16
Digital Motor Control Library (DMC-Lib)
The DMC-Lib contains
PID regulators,
Clarke transformers,
Park transformers,
Ramp generators,
Sine generators,
Space Vector generators,
Impulse generators,
and more…
15 - 17
Laboratory: FOC for PMSM
PWM1
iqs * vqs *
vs * Ta
PWM2
PI PI PWM3
Space Tb
Inv. PWM PWM4
Vector
ids* vds* Park vs* Driver PWM5
Gen. Tc
PI PWM6
Voltage
Source
r Inverter
ADCIN1
ids is ias
Ileg2_ ADCIN2
iqs Park is Clarke ibs Bus
Driver ADCIN3
Encoder
QEP_A PMSM
r SPEED QEP
FRQ e QEP_B
THETA
dir QEP_inc
DRV
TMS320F28x controller 15 - 18
TI Library Solution “PMSM 3-1” (sprc129)
15 - 19
TI Library Solution “PMSM 3-1” (sprc129)
PMSM 3-1
Load
24V
eZdsp
RS232
DMC 550 (optional)
5V DC
Student Workbench
15 - 21
Build Level 1
PWM1
Vq_testing vs * Ta
PWM2
Space Tb PWM3
Inv. PWM PWM4
Vd_testing Vector
Park vs* Driver PWM5
Gen. Tc
PWM6
rmp_out
speed_ref Ramp Ramp
control Gen.
key modules under test
TMS320F28x controller
15 - 24
Code Composer Studio with
Real Time Mode
1. Load a workspace file ‘pmsm3_1.wks’
2. In build.h, #define BUILDLEVEL LEVEL1
3. Rebuild all
15 - 25
Code Composer Studio with
Real Time Mode
15 - 26
Code Composer Studio with
Real Time Mode
7. Right click on watch window. Then, check
“Continuous Refresh”.
Changing !!
watch window
for build 1
15 - 28
Results: Build Level 1
rmp_out
Ta
15 - 29
Build Level 2 – Current verification
PWM1
Vq_testing vs * Ta
PWM2
Space Tb PWM3
Inv. PWM PWM4
Vd_testing Vector
Park vs* Driver PWM5
Gen. Tc
PWM6
Voltage
Source
e Inverter
ADCIN1
ids is ia Ileg2_ ADCIN2
iqs Park is Clarke ib Bus
Driver ADCIN3
TMS320F28x controller 15 - 30
Instructions: Build Level 2
1. Tune the 24V Power Supply to 10 Volts with 1 Amp limit
2. Load a workspace file ‘pmsm3_1.wks’
3. In build.h, #define BUILDLEVEL LEVEL2
4. Reset CPU, Compile, Load, start RTM and Run
5. Switch on 24V Power Supply
6. Set variable “enable_flg” to 1 in watch window.
7. Try to change motor speed by setting “speed_ref” (p.u.)
in watch window. Then, motor should change its speed
accordingly.
15 - 31
Results: Build Level 2
15 - 32
Build Level 3 - Tuning of dq-axis current closed loops
key modules under test
PWM1
vs * Ta
Iq_ref vqs* PWM2
PI Space Tb PWM3
Inv. PWM PWM4
ids* Vector
Id_ref vds* Park vs* Driver PWM5
Gen. Tc
PI PWM6
Voltage
Source
rmp_out Inverter
ADCIN1
ids is ia
Ileg2_ ADCIN2
iqs Park is Clarke ib Bus
Driver ADCIN3
Encoder
Speed_ref PMSM
Ramp Ramp
control Gen.
TMS320F28x controller 15 - 33
Instructions: Build Level 3
ref
P out
fdb I
D
15 - 34
Build Level 4 – Encoder verification
PWM1
vqs *
vs * Ta
Iq_ref PWM2
PI Space Tb PWM3
Inv. PWM PWM4
Vector
Id_ref vds* Park vs* Driver PWM5
Gen. Tc
PI PWM6
Voltage
Source
rmp_out Inverter
ADCIN1
ids is ia
Ileg2_ ADCIN2
iqs Park is Clarke ib Bus
Driver ADCIN3
15 - 36
Results: Build Level 4
15 - 37
Results: Build Level 4
15 - 38
Build Level 5 – close speed loop
PWM1
iqs * vqs *
vs * Ta
PWM2
PI PI PWM3
Space Tb
Inv. PWM PWM4
Vector
ids* vds* Park vs* Driver PWM5
Gen. Tc
PI PWM6
Voltage
Source
r Inverter
ADCIN1
ids is ias
Ileg2_ ADCIN2
iqs Park is Clarke ibs Bus
Driver ADCIN3
Encoder
QEP_A PMSM
r SPEED QEP
FRQ e QEP_B
THETA
dir QEP_inc
DRV
TMS320F28x controller 15 - 39
Instructions: Build Level 5
15 - 40
Results: Build Level 5
Fastest response time with
the closed loop!
15 - 41
Application of PMSM 3-1:
15 - 42