Sensored Field Oriented Control of A Permanent Magnet Synchronous Motor (PMSM)

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 35

From MATLAB® and Simulink® to

Real Time with TI DSPs


Sensored Field Oriented
Control of a Permanent Magnet
Synchronous Motor
(PMSM)
Content developed in partnership with
Tel-Aviv University

© 2007 Texas Instruments Inc,

0-1
Learning objectives
• Review of Electromagnetic laws

• Rotating magnetic fields

• Structure of synchronous motors

• Features of synchronous motors

• BLDC and PMSM synchronous motor types

• BLDC and PMSM control overview

• Electro-mechanical parameters for a synchronous


motor

© 2007 Texas Instruments Inc, Slide 2


Field generated by a current

Field
I
B = k*n*I
• A conductor carrying a current produces a magnetic field around it.

I
• A conductor that is wound into a coil produces a magnetic field
along the axis of the coil.

• The flux produced is proportional to the current through the coil


and the number of turns in the coil.

© 2007 Texas Instruments Inc, Slide 3


The Current in a Coil

F1 • A coil carrying a current,


placed in a magnetic field
experiences a force that
will cause it to rotate.
d
• This force is given as the
vector cross product of
the flux produced by the
coil and the flux that is
impressed by the
B1 external magnetic field.

I
F1  F2  B1 x B2
F2 T   B1  B2   d
B2
© 2007 Texas Instruments Inc, Slide 4
Back EMF generation

(rad / s )
Magnet flux 

N a

S B e A

 Magnet rotating in front of winding “a” create an inductive


voltage between A and B, e = VA-VB called Bemf (Back
electromotive force)
 Magnetic flux seen by the winding is given by:    2 cos t
 Bemf is then equal to:  d
e (t )     2 sin(t )  E sin(t )
 dt
 E   2

© 2007 Texas Instruments Inc, Slide 5


Pole pairs

1 pole pair 2 pole pairs

N
N S N

SN e
N S e

e(t )  E sin(t ) with    e(t )  E sin(t ) with   2


 For a motor with p poles pairs we have   p
is the electrical frequency (rad/s)
is the mechanical frequency (rad/s) or simply
the speed of the machine.
© 2007 Texas Instruments Inc, Slide 6
Three phases winding

c
ia  I s .e jt
 2
ic  jt 
ib  I S .e 3

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

S a ea  E.e jpt


ib ia  2
 jpt 
eb  E.e 3

 4
b e  E.e
jpt 
3
 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
© 2007 Texas Instruments Inc, Slide 7
Application to Three Phases Machine
Operation Fundamentals
Three stationary pulsating magnetic fields
 The three phase winding
ia A`
produces three magnetic
Fc fields, which are spaced 120°
C B apart physically.
 When excited with three sine
Fa waves that are a 120° apart
C in phase, there are three
Fb
B` ` pulsating magnetic fields.
A
Phase currents
1.50  The
resultant of the three
ia ib ic
1.00
magnetic fields is a rotating
magnetic field.
0.50

0.00

-0.50
1 24 47 70 93 116 139 162 185 208 231 254 277 300 323 346
t
-1.00

-1.50

© 2007 Texas Instruments Inc, Slide 8


Synchronous operation

Three
Three
phase
phaseACAC
current
current

Phase
Phase11
Coil
Coil11

Phase
Phase22
Coil
Coil22
Phase3
Phase3
Phase3
Phase3
Coil 3333
Coil
Coil
Coil

© 2007 Texas Instruments Inc, Slide 9


Theory of operation:
Rotor field
A`
  Rotor is carrying a constant
C

F
N magnetic field created either by
B permanent magnets or current fed
N coils
 The interaction between the
S rotating stator flux, and the rotor
C flux produces a torque which will
S Stator field
B` ` cause the motor to 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 50Hz AC
f : AC supply frequency (Hz) supply frequency
p : motor poles pair per phase

© 2007 Texas Instruments Inc, Slide 10


Electromechanical Parameters

i V

estator uL Es
v I uL

 Simplified equivalent electrical scheme of a


winding of a three phases synchronous motor
Note: stator resistance neglected

Tem : electromechanical torque ( N .m)


V : phase voltage (V )
3VI cos  
Tem  
  I : phase current ( I )

 : motor rotation speed (rad / s )
© 2007 Texas Instruments Inc, Slide 11
Synchronous Motor Rotor
Construction

non-salient rotor non-salient rotor salient rotor pole


pole (p=1) pole (p=2) (p=2)

© 2007 Texas Instruments Inc, Slide 12


Synchronous machine
classification: BLDC and PMSM
• Both (typically) have permanent-magnet rotor and
A a wound stator
C
F N ` • BLDC (Brushless DC) motor is a permanent-
B magnet brushless motor with trapezoidal back
EMF

• PMSM (Permanent-magnet synchronous motor) is


S F
C a permanent-magnet brushless motor with
sinusoidal back EMF
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 ea eb ec
1.00
Hall A
0.50
Phase B
e
ib 0.00 t
1 24 47 70 93 116 139 162 185 208 231 254 277 300 323 346
Hall B -0.50

Phase C
ic e -1.00

Hall C -1.50

© 2007 Texas Instruments Inc, Slide 13


BLDC vs. PMSM
BLDC PMSM
• Synchronous machine • Synchronous machine

• Fed with direct currents • Fed with sinusoidal currents

• Trapezoidal BEMF • Sinusoidal BEMF


• Stator Flux position • Continuous stator flux
commutation each 60 degrees position variation
• Only two phases ON at the • Possible to have three
same time phases ON at the same time
• Torque ripple at commutations • No torque ripple at
commutations

© 2007 Texas Instruments Inc, Slide 14


Conclusion
• Synchronous motors use magnetic interaction
to convert electrical energy to mechanical.

• Rotor must be synchronized with the rotating


stator magnetic field in order to produce
torque

• Pole pair numbers and excitation frequency


determine the mechanical rotation speed

• Synchronous motors are classified in two


categories: BLDC and PMSM

• Each type require an appropriate control

© 2007 Texas Instruments Inc, Slide 15


PMSM Control

• Synchronous Motors such as PM motors and SynRMs are


getting more popular because of their high power density
and high efficiency

• PM Assisted SynRM uses advantages of both PM and


Reluctance motor

• The vector control strategy is far more complicated than


control of a DC motor requiring use of multiple control
loops

© 2007 Texas Instruments Inc, Slide 16


Control System Block-Diagram
Inv. Park
Transformation Vdc
ref e*
iqs + e*
v qs
s*
v qs
+ dqse
 PI  PI S
e* 3-phase
- e*
ids - v ds s*
v ds V
PWM Inverter
 PI dqss
+
-
r
e s
iqs iqs
dqse dqss
e s
ids i ds
dqss abc

Park Clarke
Transformation Transformation
PMASynRM
Mechanical Speed and
position of rotor

© 2007 Texas Instruments Inc, Slide 17


Using the DMC Library

PWM1A
Speed ref FC_PWM
setpoint PID Uout ref DRV 3-Phase
PID Uout Ipark_D Ipark_d Vq Ta mfunc_c1 PWM1B Inverter
fb _IQ PARKI SV_GEN
_IQ DQ Q0 / HW
fb
theta _IQ Tb mfunc_c2 PWM2A
_IQ
id_ref =0 ref
PID Uout Ipark_Q Ipark_q Vd Tc mfunc_c3 PWM2B
fb _IQ
mfunc_p PWM3A

PWM3B

park_D park_d clark_d clark_a Ia_out LEG_A


PARK CLARK ILEG2
DRV
_IQ theta _IQ clark_b Ib_out LEG_B
_IQ
park_Q park_q clark_q clark_c
Ia_gain
Q15
Ib_gain
Q15
Ia_offset
Q13
Q13 Ib_offset
QEP

speed_frq shft_angle theta_elec QEP_A PMSM


SPEED QEP
FRQ THETA
theta_mech DRV QEP_A Motor
_IQ
speed_rpm direction dir_QEP _IQ QEP_index

index_sync_flg

© 2007 Texas Instruments Inc, Slide 18


The Equivalent Simulink® Model
PWM1
iqs * vqs v * Ta PWM2
as
PI
PI *
Space Tb PWM3
Inv. PWM PWM4
Vector
ids* vds Park vbs* Gen. Driver PWM5
Tc
PI * PWM6
Voltage
Source
qlr Inverter
ADCIN1
ids ias ias Ileg2_
Bus ADCIN2
iqs Park ibs Clarke ibs Driver
ADCIN3

Encoder
qlr QEP_A PMSM
SMOSPD
wr speed qm Ramp QEP QEP_B
estimation Gen. driver
dir QEP_inc

TMS320F28x controller

© 2007 Texas Instruments Inc, Slide 19


Hardware Setup
analog I/O Power Supply
P6
5V

Synchronous Motor
Permanent Magnet

Parallel Port
Encoder

eZdsp 2812

DMC 550
P7
P3 P4 P5
Motor phases Power Supply
24 Volts 4 Amps
0V
22
+
-
Encoder signal
2 Power inputs:

•5V PSU for the DSP board only (software debug)

•0 - 24V PSU for the power stage

© 2007 Texas Instruments Inc, Slide 23


Synchronous Reluctance Motor

Two pole singly Two pole doubly salient


salient SynRM Switched RM

© 2007 Texas Instruments Inc, Slide 24


Background
d-q axes voltage and flux equations:
d ds  Lls ids  Lmd ids  Lds ids
vd  rs ids  ds   r qs
dt
dqs
vq  rs iqs    r ds qs  Lls iqs  Lmq iqs  m  Lqs iqs  m
dt

rs I s
Torque equation:
Vds
~
3P
 dsiqs  qsids 
Vs
Te  
jX qs I qs
22 q-axis
I qs jX ds I ds Vqs
3P 
Te  ( Lds  Lqs ) I dsI qs I ds
22 ~
Is
d-axis
I ds  I s cos 
I qs  I s sin 

© 2007 Texas Instruments Inc, Slide 25


Output Torque in MASynRM

vds  rs ids  Lds


dids
 r ( Lqs iqs  m ) Te 
3 P
 mids  ( Lds  Lqs ) ids iqs 
2 2
dt
diqs
vqs  rs iqs  Lqs   r Lds ids
dt

© 2007 Texas Instruments Inc, Slide 26


The PMS Motor Model

© 2007 Texas Instruments Inc, Slide 27


Model-Based Design of a PMSM

• Build Level 1 – Space vector generation

• Build Level 2 - Currents/DC-bus voltage


measurement verification

• Build Level 3 - Tuning of dq-axis current closed loops

• Build Level 4 – Encoder verification

• Build Level 5 – Speed closed loop

© 2007 Texas Instruments Inc, Slide 28


Space vector generation - Simulation

© 2007 Texas Instruments Inc, Slide 29


Space vector generation – Real Time
key modules under test
PWM1
Vq_testing v * Ta
s PWM2
PWM3
Space Tb
Inv. PWM PWM4
Vd_testingvds* Vector
Park v s
* Driver PWM5
Gen. Tc
PWM6
Voltage
Source
Inverter
rmp_out
speed_ref Ramp Ramp
control Gen.

PMSM

TMS320F28x controller

© 2007 Texas Instruments Inc, Slide 30


Currents/DC-bus voltage measurement
verification - Simulation

© 2007 Texas Instruments Inc, Slide 31


Currents/DC-bus voltage measurement
verification – Real Time

PWM1
Vq_testing v * Ta
s PWM2
PWM3
Space Tb
Inv. PWM PWM4
Vq_testingvds* Park v * Vector
Driver PWM5
s
Gen. Tc
PWM6
Voltage
Source
e Inverter
ADCIN1
ids is ia
Ileg2_ ADCIN2
iqs Park is Clarke ib Bus
ADCIN3
Driver

Encoder
Speed_ref PMSM
Ramp Ramp rmp_out
control Gen.
TMS320F28x controller

© 2007 Texas Instruments Inc, Slide 32


Tuning of dq-axis current closed loops
- Simulation

© 2007 Texas Instruments Inc, Slide 33


Tuning of dq-axis current closed loops –
Real Time
key module under test
PWM1
v * Ta
Iq_ref vqs* s 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
ADCIN3
Driver

Encoder
Speed_ref PMSM
Ramp Ramp
control Gen.

TMS320F28x controller

© 2007 Texas Instruments Inc, Slide 34


Encoder verification - Simulation

© 2007 Texas Instruments Inc, Slide 35


Encoder verification – Real Time

PWM1
v *
v * Ta
Iq_ref qs s PWM2
PI Space Tb PWM3
Inv. PWM PWM4
v * Vector
Id_ref ds 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
ADCIN3
Driver

Speed_ref Ramp Ramp


control Gen. Encoder
Theta_elec QEP_A PMSM
m Ramp QEP QEP_B

dir Gen. driver QEP_inc

TMS320F28x
controller

© 2007 Texas Instruments Inc, Slide 36


Speed closed loop - Simulation

© 2007 Texas Instruments Inc, Slide 37


Speed closed loop – Real Time
PWM1
i * v *
v * Ta PWM2
qs qs s
PI PI PWM3
Space Tb
Inv. PWM PWM4
ids *
v * Vector
ds 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
ADCIN3
Driver

Encoder
r QEP_A PMSM
r SMOSPD
speed m Ramp QEP QEP_B

estimation dir Gen. driver QEP_inc

TMS320F28x controller

© 2007 Texas Instruments Inc, Slide 38

You might also like