35
0 - 0 - 1 © 2007 Texas Instruments Inc, Content developed in partnership with Tel-Aviv University From MATLAB ® and Simulink ® to Real Time with TI DSPs Sensored Field Oriented Control of a Permanent Magnet Synchronous Motor (PMSM)

PMSM Control

Embed Size (px)

DESCRIPTION

a

Citation preview

0 - 0 - 11

© 2007 Texas Instruments Inc,

Content developed in partnership with Tel-Aviv University

From MATLAB® and Simulink® to Real Time with TI DSPs

Sensored Field Oriented Control of a Permanent

Magnet Synchronous Motor (PMSM)

Slide Slide 22© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

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

Slide Slide 33© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Field generated by a current

IField

I

I

• A conductor carrying a current produces a magnetic field around it.

• 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.

B = k*n*I

Slide Slide 44© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

The Current in a Coil

• A coil carrying a current, placed in a magnetic field experiences a force that will cause it to rotate.

• This force is given as the vector cross product of the flux produced by the coil and the flux that is impressed by the external magnetic field.

IB1

B2F2

F1

d

dB2 B1 T

B2 x B1 F2 F1

Slide Slide 55© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Back EMF generation

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: Bemf is then equal to:

t cos2

2

)sin()sin(2)(

E

tEtdt

dte

S

N

e

a

AB

)/( srad

Magnet flux

Slide Slide 66© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Pole pairs

N

S

N

S

S

N

For a motor with p poles pairs we have

with )sin()( tEte

p

1 pole pair 2 pole pairs

is the electrical frequency (rad/s)

is the mechanical frequency (rad/s) or simply the speed of the machine.

2 with )sin()( tEte

e e

N

N

Slide Slide 77© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Three phases winding

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

3

4

3

2

.

.

.

tj

Sc

tj

Sb

tjsa

eIi

eIi

eIi

3

4

3

2

.

.

.

tjp

c

tjp

b

tjpa

eEe

eEe

eEe

N

S a

c

b

ia

ic

ib

Slide Slide 88© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Application to Three Phases MachineOperation Fundamentals

-1.50

-1.00

-0.50

0.00

0.50

1.00

1.50

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

ia ib icPhase currents

A`

A

Fa

B

C`

C

B`

ia

Fb

Fc

Three stationary pulsating magnetic fields

The three phase winding produces three magnetic fields, which are spaced 120° apart physically.

When excited with three sine waves that are a 120° apart in phase, there are three pulsating magnetic fields.

The resultant of the three magnetic fields is a rotating magnetic field.

Slide Slide 99© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Synchronous operation

Three phase AC current

Phase 1

Coil 1

Phase 2

Coil 2

Phase3

Coil 3

Three phase AC current

Phase 1

Coil 1

Phase 2

Coil 2

Phase3

Coil 3

Three phase AC current

Phase 1

Coil 1

Phase 2

Coil 2

Phase3

Coil 3

Three phase AC current

Phase 1

Coil 1

Phase 2

Coil 2

Phase3

Coil 3

Three phase AC current

Phase 1

Coil 1

Phase 2

Coil 2

Phase3

Coil 3

Three phase AC current

Phase 1

Coil 1

Phase 2

Coil 2

Phase3

Coil 3

Slide Slide 1010© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Rotor is carrying a constant magnetic field created either by permanent magnets or current fed coils

The interaction between the rotating stator flux, and the rotor flux produces a torque which will cause the motor to rotate.

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.

Rotor fieldA`

B

C`

AB`

C N

S

F

F Stator field

S

N

Theory of operation:

phaseper pair polesmotor :p

(Hz)frequency supply AC :

(r.pm) .60

:(rad/s) speedRotor

f

p

fgives

p

Example: a 2 poles pair

synchronous motor will run at 1500 r.pm for a 50Hz AC supply frequency

Slide Slide 1111© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Electromechanical Parameters

vestator

uL

i

Simplified equivalent electrical scheme of a winding of a three phases synchronous motor

Note: stator resistance neglected

I

V

uL

Es

)/( speedrotation motor :

)(current phase :

)( voltagephase :

).( torquehanicalelectromec :

cos3

srad

II

VV

mNT

VIT

em

em

Slide Slide 1212© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Synchronous Motor Rotor Construction

non-salient rotor pole (p=1)

non-salient rotor pole (p=2)

salient rotor pole (p=2)

Slide Slide 1313© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

• Both (typically) have permanent-magnet rotor and a wound stator

• BLDC (Brushless DC) motor is a permanent-magnet brushless motor with trapezoidal back EMF

• PMSM (Permanent-magnet synchronous motor) is a permanent-magnet brushless motor with sinusoidal back EMF

300 900 1500 2100 2700 3300 300 900

60000 1200 1800 2400 3000 3600 600

Phase A

Phase B

Phase C

ia

ib

ic

e

e

e

Ea

Hall A

Hall B

Hall C

Back EMF of BLDC Motor

-1.50

-1.00

-0.50

0.00

0.50

1.00

1.50

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

ea eb ec

Back EMF of PMSM

A`

B

C`

AB`

C

S

F

F

Synchronous machine classification: BLDC and PMSM

N

Slide Slide 1414© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

BLDC vs. PMSM

BLDC

• Synchronous machine

• Fed with direct currents

• Trapezoidal BEMF

• Stator Flux position commutation each 60 degrees

• Only two phases ON at the same time

• Torque ripple at commutations

PMSM

• Synchronous machine

• Fed with sinusoidal currents

• Sinusoidal BEMF

• Continuous stator flux position variation

• Possible to have three phases ON at the same time

• No torque ripple at commutations

Slide Slide 1515© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

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

Slide Slide 1616© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

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

Slide Slide 1717© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

PI

PI

PI

SV

PWM3-phaseInverter

PMASynRM

abc

-

i -

-

Vdc

ClarkeTransformation

ParkTransformation

Inv. ParkTransformation

r

+ +

+

Mechanical Speed andposition of rotor

dse*

iqse* vqs

e*

vdse*

vqss*

vdss*

idss

iqss

idse

iqse

dqss

dqse

dqse

dqss

dqss

ref

Control System Block-Diagram

Slide Slide 1818© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Using the DMC Library

3-PhaseInverter

QEP

SV_GENDQ

_IQ

Vq

Vd

Ta

Tb

Tc

PARKI

_IQ

Ipark_D

Ipark_Q

theta

Ipark_d

Ipark_q

CLARK

_IQ

clark_a

clark_b

clark_c

clark_d

clark_q

PARK

_IQ

park_d

park_q

theta

park_D

park_Q

PID_IQ

ref

fb

Uout

PID_IQ

ref

fb

Uout

PID_IQ

ref

fb

UoutSpeedsetpoint

id_ref =0

QEPTHETA

DRV

_IQ

QEP_Atheta_elec

theta_mech

dir_QEP

index_sync_flg

QEP_A

QEP_index

SPEEDFRQ

_IQ

shft_angle

direction

speed_frq

speed_rpm

FC_PWMDRV

Q0 / HWmfunc_c1

PWM1A

PWM1B

PWM2A

PWM2B

PWM3A

PWM3B

mfunc_c2

mfunc_c3

mfunc_p

ILEG2DRV

_IQ

Ia_out

Ib_out

LEG_A

LEG_B

Ia_gain

Ib_gain

Ia_offset

Ib_offset

Q15

Q15

Q13

Q13

PMSM

Motor

Slide Slide 1919© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

The Equivalent Simulink® Model

TMS320F28x controller

vas*

vbs*

Inv. Park

SpaceVector

Gen.

Ta

Tb

Tc

PMSM

ias

ibs

Ileg2_Bus

Driver

ADCIN1

ADCIN2

ADCIN3ibsPark Clarke

ias

QEP_ASMOSPDspeed

estimationdir

vqs*

vds*

PIiqs

*

PI

qlr

vds*

PI

qlrwr

iqs

Encoder

QEP_B

QEP_inc

qm

PWM1

PWM2

PWM3

PWM4

PWM5

PWM6

ids

ids*

RampGen.

QEPdriver

PWMDriver

VoltageSourceInverter

Slide Slide 2323© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Hardware Setup

Per

man

ent

Mag

net

S

ynch

ron

ou

s M

oto

r

Encoder

+-

220V

Power Supply24 Volts 4 Amps

Power Supply5V

2 Power inputs:

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

•0 - 24V PSU for the power stage

P3 P4 P5

analog I/OP6

P7

eZdsp 2812

DMC 550P

arallel Po

rt

Motor phases

Encoder signal

Slide Slide 2424© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Synchronous Reluctance Motor

Two pole singly salient SynRM

Two pole doubly salient Switched RM

Slide Slide 2525© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

dsrqs

qssq

qsrds

dssd

dt

dirv

dt

dirv

mqsqsmqsmqqslsqs

dsdsdsmddslsds

iLiLiL

iLiLiL

dsqsqsdse iiP

T 22

3

qsdsqsdse IILLP

T )(22

3

sin

cos

sqs

sds

II

II

d-q axes voltage and flux equations:

Torque equation:

q-axis

d-axis

dsV

qsV

qsqsIjX

dsdsIjX

ss Ir

sV~

sI~dsI

qsI

Background

Slide Slide 2626© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

)( mqsqsrds

dsdssds iLdt

diLirv

dsdsrqs

qsqssqs iLdt

diLirv

qsdsqsdsdsme iiLLiP

T )(22

3

Output Torque in MASynRM

Slide Slide 2727© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

The PMS Motor Model

Slide Slide 2828© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

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

Slide Slide 2929© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Space vector generation - Simulation

Slide Slide 3030© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Space vector generation – Real Time

vs*

vs*

Inv. Park

SpaceVector

Gen.

PWMDriver

Ta

Tb

Tc

Vq_testing

vds*

rmp_out

Vd_testing

PWM1

PWM2

PWM3

PWM4

PWM5

PWM6

speed_ref RampGen.

Rampcontrol

key modules under test

TMS320F28x controller

VoltageSource

Inverter

PMSM

Slide Slide 3131© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Currents/DC-bus voltage measurement verification - Simulation

Slide Slide 3232© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Currents/DC-bus voltage measurement verification – Real Time

vs*

vs*

Inv. Park

SpaceVector

Gen.

PWMDriver

Ta

Tb

Tc

VoltageSource

Inverter

PMSM

ia

ib

Ileg2_Bus

Driver

ADCIN1

ADCIN2

ADCIN3isPark Clarke

is

Vq_testing

vds*Vq_testing

iqs

Encoder

PWM1

PWM2

PWM3

PWM4

PWM5

PWM6

ids

RampGen.

Speed_ref Rampcontrol

e

rmp_out

TMS320F28x controller

Slide Slide 3333© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Tuning of dq-axis current closed loops - Simulation

Slide Slide 3434© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Tuning of dq-axis current closed loops – Real Time

key module under test

RampGen.

Speed_ref Rampcontrol

Iq_ref vs*

vs*

Inv. Park

SpaceVector

Gen.

PWMDriver

Ta

Tb

Tc

VoltageSource

Inverter

PMSM

ia

ib

Ileg2_Bus

Driver

ADCIN1

ADCIN2

ADCIN3isPark Clarke

is

ids*

PI

PI

rmp_out

iqs

Encoder

PWM1

PWM2

PWM3

PWM4

PWM5

PWM6

ids

Id_ref

vqs*

vds*

TMS320F28x controller

Slide Slide 3535© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Encoder verification - Simulation

Slide Slide 3636© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Encoder verification – Real Time

vs*

vs*

Inv. Park

SpaceVector

Gen.

PWMDriver

Ta

Tb

Tc

VoltageSource

Inverter

PMSM

ia

ib

Ileg2_Bus

Driver

ADCIN1

ADCIN2

ADCIN3isPark Clarke

is

QEP_A

dir

vqs*

vds*

PI

rmp_out

vds*

PI

Theta_elec

iqs

Encoder

QEP_B

QEP_inc

m

PWM1

PWM2

PWM3

PWM4

PWM5

PWM6

ids

RampGen.

QEPdriver

RampGen.

Speed_ref Rampcontrol

Iq_ref

Id_ref

TMS320F28x controller

Slide Slide 3737© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Speed closed loop - Simulation

Slide Slide 3838© © 2007 Texas Instruments Inc, 2007 Texas Instruments Inc,

Speed closed loop – Real Time

vs*

vs*

Inv. Park

SpaceVector

Gen.

PWMDriver

Ta

Tb

Tc

VoltageSource

Inverter

PMSM

ias

ibs

Ileg2_Bus

Driver

ADCIN1

ADCIN2

ADCIN3isPark Clarke

is

QEP_ASMOSPD

speedestimation dir

vqs*

vds*

PIiqs

*

PI

r

vds*

PI

rr

iqs

Encoder

QEP_B

QEP_inc

m

PWM1

PWM2

PWM3

PWM4

PWM5

PWM6

ids

ids*

RampGen.

QEPdriver

TMS320F28x controller