0% found this document useful (0 votes)
92 views

Module 15: C28x Digital Motor Control

This document provides an overview of digital motor control using a TMS320F2812 digital signal controller. It summarizes different types of electric motors including DC, AC induction, permanent magnet synchronous, and brushless DC motors. It also describes the operation of 3-phase permanent magnet synchronous motors and brushless DC motors. Finally, it discusses scalar (V/f) control and field oriented control techniques for controlling 3-phase motors with an inverter.

Uploaded by

Ramana Manohar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views

Module 15: C28x Digital Motor Control

This document provides an overview of digital motor control using a TMS320F2812 digital signal controller. It summarizes different types of electric motors including DC, AC induction, permanent magnet synchronous, and brushless DC motors. It also describes the operation of 3-phase permanent magnet synchronous motors and brushless DC motors. Finally, it discusses scalar (V/f) control and field oriented control techniques for controlling 3-phase motors with an inverter.

Uploaded by

Ramana Manohar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 41

Module 15 : C28x Digital Motor Control

32-Bit-Digital Signal Controller


TMS320F2812
Texas Instruments Incorporated
European Customer Training Centre
University of Applied Sciences Zwickau (FH)

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 jt
ic  2
 j t 
ib  I S .e 3

 j t 
4
ic  I S .e 3
N 

S a ea  E.e jpt


ia 
ib  jpt 
2

eb  E.e 3

 jpt 
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

ia A`  The three phase winding


produces three magnetic
C
Fc
B
fields, which are spaced
120° apart physically.
Fa  When excited with three
C
Fb
`
sine waves that are a 120°
B` apart in phase, there are
A three pulsating magnetic
1,50
Phase currents fields.
1,00
ia ib ic
0,50
 The resultant of the three
0,00
1 24 47 70 93 116 139 162 185 208 231 254 277 300 323 346
t magnetic fields is a rotating
-0,50

-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

Upper & lower


devices can not
be turned on
DC - Voltage simultaneously
(dead band)


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

+ Simple to implement: All you need is three sine


waves feeding the motor
+ Position information not required (optional).

– Doesn’t deliver good dynamic performance.


– Torque delivery not optimized for all speeds
15 - 8
Field Oriented Control (FOC)
 Field Oriented Control (FOC) or Vector
Control, is a control strategy for 3-phases
induction motors where the torque
producing and magnetizing components
of the stator flux are separately
controlled.
 The approach consists in imitating the DC
motors’ operation
 FOC will be possible with system
information: currents, voltages, flux and
speed.

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

Some key mathematical components are required!


15 - 10
PARK transform (1929):
vs1 
 (Vs): voltage vector applied (VS )  vs 2 
to motor stator (index s) vS 3 

 Park transform is a referential change


vs 3 vsd  
cos S  sin  S 1
vs1    vsd 
vsq v   cos(  2 )  sin(  2 ) 1  v 
 S  St  s2   S
3
S
3   Sq 
vs 3    v 
4 4  So 
vs1 cos( S  )  sin( S  ) 1 
vso  0  3 3 
vs1  vsd  vsd  vs1 
v    P( ).v  and v    P( ) 1 v 
vs 2  S2 S  sq   Sq  S  S2 
vS 3  v  v  vS 3 
 so   So 
15 - 11
Park Transform key components
vs 3 vsd

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

Three phase rotating Two phase rotating


domain domain Stationary domain
is 2 IS β
d
 Stator phase current
example: Is is moving at θS ISd
and its PARK coordinates q
 S  S  t
are constant in (d,q) rotating ISq
is1
frame. iso  0 α
 Can be applied on any three-
phase balanced variables is 3
(flux…) 15 - 14
Texas Instruments Motor Control Solution

“C2000 - Digital Motor Control Library (DMC)” :

 Single Phase ACI Motor Control Using Constant


V/Hz
 3-Phase ACI Motor Constant V/Hz Control
 3-Phase ACI Motor Field Oriented Control
 3-Phase Sensored Field Oriented Control (PMSM)
 3-Phase Sensorless Field Oriented Control
(PMSM)
 3-Phase Sensored Trapezoidal Control (BLDC)
 3-Phase Sensorless Trapezoidal Control (BLDC)

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

 code size (program and data memory)

 Build Level based code examples

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 *
vs * Ta
PWM2
PI PI PWM3
Space Tb
Inv. PWM PWM4
Vector
ids* vds* Park vs* Driver PWM5
Gen. Tc
PI PWM6
Voltage
Source
r Inverter
ADCIN1
ids is ias
Ileg2_ ADCIN2
iqs Park is 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)

Hardware for Laboratory setup:

• Spectrum Digital eZdsp TMS320F2812


• Spectrum Digital DMC550 drive platform
• 3-phase PMSM with a QEP encoder
• Applied Motion 40mm Alpha Motor
• Type: A0100-104-3-100
• 24V DC power supply ( DC bus voltage )
• load , e.g. DC Motor as Generator
• PC parallel port to JTAG
• 5V DC ( eZdsp )
• RS232 ( optional )
• Oscilloscope

15 - 19
TI Library Solution “PMSM 3-1” (sprc129)

PMSM 3-1

Load

24V
eZdsp

RS232
DMC 550 (optional)

5V DC

PC- parallel port 15 - 20


PMSM 3-1 Laboratory

Student Workbench

15 - 21
Build Level 1
PWM1
Vq_testing vs * Ta
PWM2
Space Tb PWM3
Inv. PWM PWM4
Vd_testing Vector
Park vs* 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

4. Load program to target


(..\pmsm3_1.out)

15 - 25
Code Composer Studio with
Real Time Mode

5. In Debug menu, “Reset CPU” and then set


“Real-time Mode”. Then, click “Yes” when the
message box pops up.

6. Click “Run” icon

15 - 26
Code Composer Studio with
Real Time Mode
7. Right click on watch window. Then, check
“Continuous Refresh”.

8. Set “enable_flg” to 1 in watch window.


(to enable T1UF interrupt and PWM drive on DMC550)
15 - 27
Code Composer Studio Level 1

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 vs * Ta
PWM2
Space Tb PWM3
Inv. PWM PWM4
Vd_testing Vector
Park vs* Driver PWM5
Gen. Tc
PWM6
Voltage
Source
e Inverter
ADCIN1
ids is ia Ileg2_ ADCIN2
iqs Park is Clarke ib Bus
Driver ADCIN3

key module under test


Encoder
Speed_ref PMSM
Ramp Ramp rmp_out
control Gen.

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

1. PMSM should run open-loop smoothly


2. The currents in the motor phases should be
sinusoidal.

15 - 32
Build Level 3 - Tuning of dq-axis current closed loops
key modules under test
PWM1
vs * Ta
Iq_ref vqs* PWM2
PI Space Tb PWM3
Inv. PWM PWM4
ids* Vector
Id_ref vds* Park vs* Driver PWM5
Gen. Tc
PI PWM6
Voltage
Source
rmp_out Inverter
ADCIN1
ids is ia
Ileg2_ ADCIN2
iqs Park is Clarke ib Bus
Driver ADCIN3

Encoder
Speed_ref PMSM
Ramp Ramp
control Gen.

TMS320F28x controller 15 - 33
Instructions: Build Level 3

1. In build.h, #define BUILDLEVEL LEVEL3


2. Compile, Load, start RTM and Run
3. Set “enable_flg” to 1 in watch window.
4. Tune-up the PI
• Observe dq-axis current regulations at PI inputs (i.e., reference and feedback). For
example, “pid1_iq.pid_ref_reg3” and “pid1_iq.pid_fdb_reg3”.
• Try to change motor speed by setting “speed_ref” (p.u.) in watch window . Then,
observe dq-axis current regulations.

ref
P out
fdb I
D

15 - 34
Build Level 4 – Encoder verification
PWM1
vqs *
vs * Ta
Iq_ref PWM2
PI Space Tb PWM3
Inv. PWM PWM4
Vector
Id_ref vds* Park vs* Driver PWM5
Gen. Tc
PI PWM6
Voltage
Source
rmp_out Inverter
ADCIN1
ids is ia
Ileg2_ ADCIN2
iqs Park is Clarke ib Bus
Driver ADCIN3

Speed_ref Ramp Ramp


Encoder
control Gen. Theta_elec PMSM
QEP_A
m QEP QEP_B
THETA
dir QEP_inc
DRV
TMS320F28x controller 15 - 35
Instructions: Build Level 4

1. In build.h, #define BUILDLEVEL LEVEL4


2. Compile, Load, start RTM and Run
3. Set the DC-bus to 24 Volts 1 Amp
4. Set “enable_flg” to 1 in watch window.

15 - 36
Results: Build Level 4

 Emulated angle VS sensed angle

15 - 37
Results: Build Level 4

 Speed reference VS real speed

15 - 38
Build Level 5 – close speed loop
PWM1
iqs * vqs *
vs * Ta
PWM2
PI PI PWM3
Space Tb
Inv. PWM PWM4
Vector
ids* vds* Park vs* Driver PWM5
Gen. Tc
PI PWM6
Voltage
Source
r Inverter
ADCIN1
ids is ias
Ileg2_ ADCIN2
iqs Park is 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

1. In build.h, #define BUILDLEVEL LEVEL5


2. Compile, Load, start RTM and Run
3. Set the DC-bus to 24 Volts
4. Set “enable_flg” to 1 in watch window.

15 - 40
Results: Build Level 5
 Fastest response time with
the closed loop!

15 - 41
Application of PMSM 3-1:

img GmbH Nordhausen

15 - 42

You might also like