high-performance motor control

59
External Use TM High-Performance Motor Control for Space Control Application FTF-ACC-F1373 JUNE.2015 B. Zigmund, L. Chalupa | Systems and Application Engineer

Upload: others

Post on 05-Jan-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: High-Performance Motor Control

External Use

TM

High-Performance Motor Control

for Space Control Application

FTF-ACC-F1373

J U N E . 2 0 1 5

B. Zigmund, L. Chalupa | Systems and Application Engineer

Page 2: High-Performance Motor Control

TM

External Use 1 #FTF2015

Agenda

• Motor Classification

• Field Oriented Control (FOC) Basics

• FOC Current Loop Design Flux control

Torque control

• 3-Phase PMSM FOC Application Current Sensing and Processing

Position Sensing and Processing

Three Phase Voltage Generation

• Special Motor Control Features on S12ZVM

• PMSM Field Oriented Control Using S12ZVM

• S12ZVM Ecosystem — The Complete Solution

• Summary

Page 3: High-Performance Motor Control

TM

External Use 2 #FTF2015

Motor Classification

Asynchronous vs. SynchronousRotor and stator construction, windings, PM magnets

Trapezoidal vs. Sinusoidal PM MachineBLDC, PMSM, flux distribution, Back-EMF shapes, six-step commutation, FOC

Page 4: High-Performance Motor Control

TM

External Use 3 #FTF2015

Electric Motor Type Classification

ELECTRIC MOTORS

AC DC

SYNCHRONOUSASYNCHRONOUS

BrushlessInduction Reluctance StepperSinusoidal

Permanent Magnet

Wound Field

Surface PM

Interior PM

• Stator same

• Difference in rotor construction

If properly controlled

• Provides constant torque

• Low torque ripple

SR

VARIABLE RELUCTANCE

Page 5: High-Performance Motor Control

TM

External Use 4 #FTF2015

Asynchronous vs. Synchronous

• 3-phase winding on the stator

distributed or concentrated

• Assumed sinusoidal flux distribution in air gap

• Different rotor construction & consequences

ACIM

Squirrel cage (rugged, reliable, economical)

No brushes, no PM

Low maintenance cost

Synchronous

Rotor with permanent magnet

High efficiency (no rotor loses)

• Synchronous motor rotates at the same frequency

as the revolving magnetic field

• Asynchronous means that the mechanical speed

of the rotor is generally different from the speed of

the revolving magnetic field

w

Page 6: High-Performance Motor Control

TM

External Use 5 #FTF2015

Trapezoidal vs. Sinusoidal PM Machine

• Sinusoidal” or “Sinewave” machine means Synchronous (PMSM)

• Trapezoidal means brushless DC (BLDC) motors

• Differences in flux distribution

• Six-Step control vs. Field-Oriented Control

• Both requires position information

• BLDC motor control

− 2 of the 3 stator phases are excited at any time

− 1 unexcited phase used as sensor (BLDC Sensorless)

• Synchronous motor

− All 3 phases persistently excited at any time

− Sensorless algorithm becomes more complex

-1.5

-1

-0.5

0

0.5

1

1.5

0 45 90 135 180 225 270 315 360

eA

eB

eC

-1.5

-1

-0.5

0

0.5

1

1.5

0 45 90 135 180 225 270 315 360

eA

eB

eC

Sinusoidal flux distribution — PMSM Motor

Trapezoidal flux distribution — BLDC Motor

Page 7: High-Performance Motor Control

TM

External Use 6 #FTF2015

Field Oriented Control

FOC BasicsTorque production principle, rotating magnetic field, space vector, FOC transformations

FOC DesignDesign of control, model, current controller gain calculation, zero cancelation

Current Sensing and ProcessingShunt current measurement , ADC triggering, delays involved in PWM driven closed loops

Position Sensing, Sensorless MethodsPosition processing, sensorless methods, position estimation, saliency based Back-EMF

Three Phase Voltage GenerationBasic sinusoidal modulation, modulation index, standard Space Vector Modulation, DC-bus ripple compensation

Page 8: High-Performance Motor Control

TM

External Use 7 #FTF2015

Torque Production Principle

• Electromagnetic torque production by the stator magnetic flux and magnet flux

space vectors

g

gsin SRSRe ccT

90)max( geT

gg

Page 9: High-Performance Motor Control

TM

External Use 8 #FTF2015

FOC for PMSM

• Controlling currents in phase A,B,C amplitude and position of stator flux vector is controlled as well

• Maintaining the angle between stator and rotor flux at 90° torque is maximized

A

B

C

gsin SRSRe ccT

90)max( geT

g

120

120

S

A

B- C

iA

iB

iC

R

Page 10: High-Performance Motor Control

TM

External Use 9 #FTF2015

Creation of Rotating Magnetic Field

• The space-vectors can be defined for all motor quantities

0

p 2p

is

A

B

C

3-ph currents / MMF

A B C

2401200 j

C

j

B

j

As eieieii

1

-1

Page 11: High-Performance Motor Control

TM

External Use 10 #FTF2015

2401200 j

C

j

B

j

As eieieii

Creating Space Vector

• Because the space vector is defined in the plain (2D), it is sufficient to describe

space vector in 2-axis (a,b) coordinate system

a

b

A

B

C

A

B

C

iA

iB

-iC

is

Page 12: High-Performance Motor Control

TM

External Use 11 #FTF2015

Transformation to 2-ph Stationary Frame

3-ph quantities

0

p 2p

a

b

0

p 2p

Stationary

2-ph quantities

1

-1

1.5

-1.5

is

3-ph currents / MMF

A B C

a b

Forward Clark

Transformation

a,b,c->alpha,beta

Is_a_compIs_b_compIs_c_comp

Is_beta

Is_alpha

Page 13: High-Performance Motor Control

TM

External Use 12 #FTF2015

Transformation to 2-ph Synchronous Frame

• Position and amplitude of the stator flux/current vector is fully controlled by two DC

values

is

b

0

p 2p

Stationary

2-ph quantities

1

-1

0

p 2p

Rotating

2-ph quantities

1

-1

iq

a b

d qa

Page 14: High-Performance Motor Control

TM

External Use 13 #FTF2015

Transformations Summary

2-phase Stationaryto 3-phase Stationary

(Reverse Clark Transform)

sc

sb

sa

s

s

i

i

i

i

i

2

3

2

3

23

0

00

b

a

b

a

s

s

rfrf

rfrf

sq

sd

i

i

i

i

cossin

sincos

b

a

s

s

sc

sb

sa

i

i

i

i

i

3

131

3

131

32 0

sq

sd

rfrf

rfrf

s

s

i

i

i

i

b

a

cossin

sincos

3-phase Stationaryto 2-phase Stationary

(Forward Clark Transform)

2-phase Stationaryto 2-phase Synchronous

(Forward Park Transform)

2-phase Synchronousto 2-phase Stationary

(Reverse Park Transform)

rf

ia

ib

iA

iB

iC

iq

id

wr

Page 15: High-Performance Motor Control

TM

External Use 14 #FTF2015

FOC Transformation Sequencing

Phase A

Phase B

Phase C

a

b

Phase A

Phase B

Phase C

d

q

d

q

a

b

3-Phaseto

2-Phase

Stationaryto

RotatingSVM

3-PhaseSystem

3-PhaseSystem

2-PhaseSystem

AC

Rotatingto

Stationary

ACDCC

on

tro

lP

roc

es

s

Stationary Reference Frame Stationary Reference FrameRotating Reference Frame

From measurement ?

Page 16: High-Performance Motor Control

TM

External Use 15 #FTF2015

Field Oriented Control in StepsMeasure and obtain state, variables and quantities (e.g., phase currents, voltages, rotor position, rotor speed)

Transform quantities from 3-phase system to 2-phase system (Forward Clark Transform) to simplify the math — lower number of equations

Transform quantities from stationary to rotating reference frame “rectify” AC quantities, thus in fact transform the AC machine to DC machine

Calculate control action (when math is simplified and machine is “DC”)

Transform the control action (from rotating) to stationary reference frame

Transform the control action (from 2-phase) to 3-phase system

Apply 3-phase control action to electric motor

Page 17: High-Performance Motor Control

TM

External Use 16 #FTF2015

PMSM FOCDesign of control, model, current controller gain calculation, zero

cancelation

Page 18: High-Performance Motor Control

TM

External Use 17 #FTF2015

3-phase PMSM Model

Considering sinusoidal 3-phase distributed winding and neglecting effect of magnetic

saturation and leakage inductances.

C

B

A

C

B

A

s

C

B

A

dt

d

i

i

i

R

u

u

u

Stator voltage equations

p

p

3

2cos

3

2cos

cos

e

e

e

PM

C

B

A

cccbca

bcbbba

acabaa

C

B

A

i

i

i

LLL

LLL

LLL

Stator linkage flux

A

B

C

PM

Forward Clarke

)iuiui(uω

p

ω

PT CiCBiBAiA

e

p

m

ii

Internal motor torque

π))(θiΨπ)(θiΨ)(θiΨ(pT eCPMeBPMeAPMpi 32

32 sinsinsin

Page 19: High-Performance Motor Control

TM

External Use 18 #FTF2015

2-phase PMSM Model

Considering sinusoidal 2-phase distributed winding and neglecting effect of magnetic

saturation and leakage inductances.

b

a

b

a

b

a

dt

d

i

iR

u

us

Stator voltage equations

Stator linkage flux

APM

a

b

re

re

iPM

S

S

S

S

Sdi

i

L

L

b

a

b

a

sin

cos

0

0

0

Forward Park

Internal motor torque

)(2

3)(

2

3abbabbaa

wiΨiΨpiuiu

pT pii

e

p

i

Page 20: High-Performance Motor Control

TM

External Use 19 #FTF2015

Sinusoidal PM Motor Model in dq Synchronous Frame

Salient machine model in dq synchronous frame aligned with the rotor.

• Stator Voltage Equations

• Stator Flux Linkages of Salient Machine

• Resulting stator voltage equations

• Internal motor torque

q

d

e

e

q

d

s

q

d

s

s

i

iR

u

u

w

w

0

1

0

0PM

q

d

q

d

q

d

i

i

L

L

1

0

0

0PMe

d

q

d

q

e

q

d

q

d

q

d

s

q

d

i

i

L

L

i

i

sL

sL

i

iR

u

uww

R-L circuit cross-coupling backEMF

qPMpdqqdpqiqdid

e

p

i iΨpiΨiΨpiuiup

T 2

3)(

2

3)(

2

3

w

Page 21: High-Performance Motor Control

TM

External Use 20 #FTF2015

PMSM Current Control

1

0

0

0PMe

d

q

d

q

e

q

d

q

d

q

d

s

q

d

i

i

L

L

i

i

sL

sL

i

iR

u

uww

id*

iq*

Controller

Controller

id

iq

-

-

wePMweLdid

weLqiq

M

Motorola

Dave’sControlCenter

3ph PMSM

ud

uq

we e

id

iq

Two axis components of

required current vector

R-L circuit cross-coupling backEMF

Independent control of DQ currents

???

Page 22: High-Performance Motor Control

TM

External Use 21 #FTF2015

id*

iq*

Controller

Controller

id

iq

-

-

tRL

tRL

uq_RL

ud_RL

RLssG

s

KsKsG

RL

IPPI

1)(

)(

Transfer functions of PI controller

and RL model in ‘s’ domain

PMSM Current Control

1

0

0

0PMe

d

q

d

q

e

q

d

q

d

q

d

s

q

d

i

i

L

L

i

i

sL

sL

i

iR

u

uww

R-L circuit cross-coupling backEMF

Page 23: High-Performance Motor Control

TM

External Use 22 #FTF2015

id*

iq*

Controller

Controller

id

iq

-

-

tRL

tRL

uq_RL

ud_RL

L

Ks

L

RKs

L

Ks

L

K

sGIP

IP

2

)(

Resulting Transfer function

in ‘s’ domain

PMSM Current Control

1

0

0

0PMe

d

q

d

q

e

q

d

q

d

q

d

s

q

d

i

i

L

L

i

i

sL

sL

i

iR

u

uww

R-L circuit cross-coupling backEMF

Page 24: High-Performance Motor Control

TM

External Use 23 #FTF2015

id*

iq*

Controller

Controller

id

iq

-

-

tRL

tRL

uq_RL

ud_RL

L

Ks

L

RKs

L

Ks

L

K

sGIP

IP

2

)(

Resulting Transfer function

in ‘s’ domain

PMSM Current Control

1

0

0

0PMe

d

q

d

q

e

q

d

q

d

q

d

s

q

d

i

i

L

L

i

i

sL

sL

i

iR

u

uww

R-L circuit cross-coupling backEMF

Page 25: High-Performance Motor Control

TM

External Use 24 #FTF2015

Zero Cancelation

• Design of the controller gains can be done by matching coefficients of characteristic polynomial with those of an ideal 2nd order system.

Transfer function of current loop

Transfer function of ideal 2nd order system

• “Zero” introduced by PI controller at –KP/KI adds derivative behavior to the closed loop, creating overshoot during step response

L

Ks

L

RKs

sK

K

L

K

L

Ks

L

RKs

L

Ks

L

K

sGIP

I

PI

IP

IP

22

1

)(

2

00

2

2

0

2)(

ww

w

sssGideal

zero

– is damping factor

w0 – is natural frequency

Page 26: High-Performance Motor Control

TM

External Use 25 #FTF2015

Zero Cancellation placed in the feed-forward path shall be designed to compensate

the closed loop zero with unity DC gain.

Controller

id-tRL

ud_RLid_ZC

Zero

Cancellation

id*

Controller

iq

-tRL

uq_RLiq_ZC

Zero

Cancellation

iq*

L

Ks

L

RKs

L

K

L

Ks

L

RKs

sK

K

L

K

sK

KsG

IP

I

IP

I

PI

I

P

22

1

1

1)(

GZC(s) GCL(s) G(s)

Zero Cancelation

Page 27: High-Performance Motor Control

TM

External Use 26 #FTF2015

PI Controller Gain Calculation

• Implementation of zero Cancellation allows precise matching of characteristic

polynomial coefficients

• Enables simple tuning of the current loop bandwidth and attenuation

LK I

2

0w

PI controller gains

L

Ks

L

RKs

L

K

sGIP

I

2

)(

2

00

2

2

0

2)(

ww

w

sssGideal

RLKP 02w

Page 28: High-Performance Motor Control

TM

External Use 27 #FTF2015

PMSM FOCCurrent Sensing and Processing

Page 29: High-Performance Motor Control

TM

External Use 28 #FTF2015

Current Sensing

• Bottom transistor must be switched on at least for a critical pulse width to get stabilized current shunt resistor voltage drop

• At any time, this rule needs to be accomplished for the legs where the shunts are located.

• Minimum pulse width defined by system delays and ADC sampling time

critical pulse width0 60 120 180 240 300 3600

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Phase A

Phase B

Phase C

duty

cycle

ratios

Sector 1 Sector 2 Sector 3 Sector 4 Sector 5 Sector 6

Desired PWM

ADC sampling point

PWM Bt PWM CtPWM At

Phase A Phase B Phase C

+U/2

- U/2

PWM Bb PWM CbPWM Ab

uI_S_A uI_S_B

Page 30: High-Performance Motor Control

TM

External Use 29 #FTF2015

Delays Involved in PWM Driven Closed Loops

• Delays are chained and are caused by:

− Dead time insertion

− MOSFET driver propagation delay

− MOSFET turn ON/OFF times

− Amplifier slew rate

− Low-pass filter delay

− ADC delays

microcontroller

microcontroller

i+

PWM1

50 A

+

-

GND

+5V

LPF ADC

Dri

ve

r

Overall delay: ~0.4 6 us

Page 31: High-Performance Motor Control

TM

External Use 30 #FTF2015

Delays Involved in PWM Driven Closed LoopsCurrent Sensing Shunts in Inverter Legs

CMP1

CMP2

Internal counter

Desired PWM

Complementary pair

with dead time inserted

(signals at pins)

DT2

Motor phase terminal

IGBT/MOSFET gate signals

top / bottom

Mid point shifts

Delay1

Rising edge is

shifted by DT

Delay2

Motor phase current

— shunts in legs

Mid point shifts

Amplifier slew rate

Low pass filter delay

Freescale note — in our ref designs this is close to 0Real feedback signal

at ADC pin

Page 32: High-Performance Motor Control

TM

External Use 31 #FTF2015

PMSM FOCPosition Sensing and Processing, Sensorless methods

Page 33: High-Performance Motor Control

TM

External Use 32 #FTF2015

Rotor Position Sensor Elimination: Introduction

• FOC requires accurate position and velocity signals

• Sensorless FOC application uses

− Estimated position

− Estimated speed

• Position/speed is estimated from measured currents and

measured/estimated voltages

Page 34: High-Performance Motor Control

TM

External Use 33 #FTF2015

Classification of Sensorless Methods

• Model-based methods

− Based on the electrical model of PM

− Presets good results in medium and high speed operation (starting from 5% of

nominal speed)

− Broadly commercialized for low-end applications

• Methods relaying on magnetic saliency

− Based on inherent characteristic of PM motor called magnetic saliency

− Presets good results in standstill or very low speed region (up to 10% of nominal

speed)

− Commercialized for certain types of PM motors designed accordingly

Page 35: High-Performance Motor Control

TM

External Use 34 #FTF2015

Saliency Based Back-EMF Observer

• Saliency based back-EMF voltage is generated due to Ld≠Lq

• Because back-EMF term is not modeled, observer actually acts as a back-EMF state filter

• Observer is designed in synchronous reference frame; i.e. all observer quantities are DC in steady state, making the observer accuracy independent of rotor speed

voltagedt

dcauses

dt

dwithcombinedwhenwhich

d

dcauses

d

dL

,,

Page 36: High-Performance Motor Control

TM

External Use 35 #FTF2015

Position Estimation Using Saliency Based Back-EMF

Position estimation steady state error at constant speed

Position estimation steady state error during speed ramp change

Page 37: High-Performance Motor Control

TM

External Use 36 #FTF2015

PMSM FOCThree Phase Voltage Generation

Page 38: High-Performance Motor Control

TM

External Use 37 #FTF2015

Three Phase Voltage Generation

UBus

PWM1

PWM4PWM2

PWM3 PWM5

PWM6

Three-phase PWM waveforms and harmonic spectrum.Source: Power Electronics, by Ned Mohan, Tore Undeland, and William Robbins, John Wiley & Sons, 1995

Page 39: High-Performance Motor Control

TM

External Use 38 #FTF2015

Sinusoidal Modulation — Limited in Amplitude

• In sinusoidal modulation the amplitude is limited to half of the DC-

bus voltage

• The phase-to-phase voltage is then lower than the DC-bus voltage

(although such voltage can be generated between the terminals)

UD

C-B

US

Up

ha

se

-phase B

C

A

PWM3PWM1

PWM4PWM2

PWM5

PWM6

Can such a modulation technique be found that wouldgenerate full phase-to-phase voltage?

Page 40: High-Performance Motor Control

TM

External Use 39 #FTF2015

How to Increase Modulation Index

• Modulation index is increased by adding the “shifting” voltage u0 to

first harmonic

• “Shifting” voltage u0 must be the same for all three phases, thus it

can only contain 3r harmonics!

B C

A

15%

Page 41: High-Performance Motor Control

TM

External Use 40 #FTF2015

Standard Space Vector Modulation

• Transforms directly the stator voltage vectors

from the two-phase coordinate system fixed

with stator to PWM signals

• Output voltage vector is created by continuous

switching of two adjacent vectors and the

“NULL” vectors

• Generates maximum phase voltage 0.5773

VDC

• Both nulls O000 and O111 are generated at

each cycle

0 60 120 180 240 300 36000.10.20.30.40.50.60.70.80.91

Phase A

Phase B

Phase C

Standard Space Vector Modulation Technique

angleduty

cycle

ratios

0 60 120 180 240 300 360-1

-0.5

0

0.5

1

Components of the Stator Reference Voltage Vector

alpha

beta

angle

am

plit

ude

Input & Output waveforms

ub

ua

Maximal phase voltage magnitude = 1

a-axis

b-axis

II.

III.

IV.

V.

VI.

U

(110)

60U

(010)

120

U

(011)

180

U

(001)

240 U

(101)

300

U

(100)

0

[2/3,0][-2/3,0]

[1/3, 1]

[-1/3,1]

[1/3,-1]

[-1/3,-1]

T /T*0 U0

T /T*U60 60

US

30 degrees

Page 42: High-Performance Motor Control

TM

External Use 41 #FTF2015

DC-bus Ripple Compensation

• Compensates the ripple of the output

voltages from Power Stage caused by

DC-bus voltage ripples

• Improves performance of the drive

DC-Bus Ripple

Compensation

Us_alpha

Us_beta

U_dcb

Us_alpha_comp

Us_beta_comp

Standard Space Vector Modulation with Elimination

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10

5

10

15

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10

0.5

1

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

-100

0

100

200

Minimal and Measured Voltage on the DC-bus

time

time

time

voltage

voltage

velo

city

Angular Velocity of the PMSM with/without Elimination

uDcBus

Phase A

Phase BPhase C

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10

5

10

15

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10

0.5

1

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

-100

0

100

200

time

time

time

voltage

voltage

velo

city

Standard Space Vector Modulation with Elimination

uDcBus

Phase A

Phase BPhase C

le

ipple

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10

5

10

15

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10

0.5

1

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

-100

0

100

200

time

time

time

voltage

voltage

velo

city

uDcBus

Phase A

Phase BPhase C

Phase A

Phase BPhase C

le

ipple

Angular Velocity of the PMSM with Eliminating of the DC_BUS Ripp

Angular Velocity of the PMSM without Eliminating of the DC_BUS R

Page 43: High-Performance Motor Control

TM

External Use 42 #FTF2015

Special Motor Control Features

on S12ZVM

Single Chip Solution3-ph Motor Control Drive can be done by one IC + power bridge

Feature Set OverviewPeripherals, operating voltage ranges, application schematic, ...

Motor Control FeaturesS12Z Core, autonomous peripherals, current measurement & overcurrent protection, ...

PMSM Field Oriented ControlSingle vs. dual shunt current measurement ...

Page 44: High-Performance Motor Control

TM

External Use 43 #FTF2015

VREG(8 pin)

LIN phy(8 pin)

MCU

or

DSC(48 pin)

Gate

Driver(48 pin)

Op-amps

Discrete Solution

20+

3+

2+

S12ZVM Solution:

• ~ 50 fewer solder joints

• - 2 to 3 cm2 PCB space

S12ZVM — Single Chip Solution for 3-ph Motor Control

4 cm

~1 ½ in.

64 pin

Optimize system cost

Optimize system efficiency

Vector Control

Page 45: High-Performance Motor Control

TM

External Use 44 #FTF2015

Overview of S12ZVM Feature Set

S12Z

core

128 KB

Flash

8 KB RAM

512 Bytes

EEPROM

VREG (5 V VDDX, VLS, VDD sensor)

GDU

3-phase /

H-Bridge

Predriver

Charge Pump

G

P

I

O

SPI

Wdog

TIM 4ch/16b

PMF

6 ch.

PWM

SCI

SCI

PTU

PLLIRC

Ext Osc BDM

KWU

RTI

Dual 12-bit ADC

5 + 4 ch. Ext.(Mux‘d with Op-Amps)

+ 8 ch. Int.

MSCAN

New S12Z CPU • Up to 100 MHz

• 32-bit ALU & 32-bit MAC unit,

• Optimized 32-bit math. operations

Safe RAMECC

Voltage Regulator• Boost Option

• Support for external

ballast transistor

• Vbat sense

Charge Pump• Optional to support

100% duty cycle

Gate Drive Unit• Operational from

3.5 V to 26 V

• Bootstrap circuit

based

• 11 V Vreg

• Phase comparators

• Desaturation comp.

for HS/LS protection

• Under-/Over-

voltage detection

• DC-link and phase

voltage internally

accessible on ADC

• Selectable HS/LS

slew rate

PWM Module• Complementary mode

with deadtime ctrl.

• Fault protection

• Double-Switching

Internal RC osc.• +/-1.3% over tmp

2 UARTs• ne linked to LIN Phy

• 2nd as test interface

CAN Option• CAN controller

Window Watchdog• independent RC osc

Two 12-bit ADC• List-based

Architecture allows

flexible definition of

order and number

of conversions

• 2.5 µs conv. time

Programmable Trigger

Unit• Synchronize ADC to PWM

• Trigger Command list with

up to 32 triggers per cycle

Multiple timers • IOC/periodic wake-up

Sensor Supply• 20 mA I/O for sensor

Temp

Sense

LIN

Physical

Interface

Current Sense

(2 x Op-Amp)Separate 5 V

VREG (VDDC)

Flash& EEPROM• ECC

• Memory Protection

• Margin Read

Current Sense Amplifiers• 2-shunt system supported

with additional selectable

over-current protection

comparator

CAN Support• 5 V Vreg

controller for

external

transceiver

LIN Physical

Interface• 250 kb/s fast

mode

• +/-6 kV

Page 46: High-Performance Motor Control

TM

External Use 45 #FTF2015

Operating Voltage Ranges

Vsup MCU GDU

20 V...40 V Full Disabled

9.5 V...20 V Full Boost OFF for

Vsup > 11 V

Vgs = 9.6 V

6 V…9.5 V Full Boost ON

Vgs >9 V

3.5 V...6 V Full

Iddx = 25 mA

max if no

external PNP

Boost ON

Vgs >9 V

<3.5 V Reset Disabled

Vsup MCU GDU

20 V…40 V Full Disabled

7 V…20 V Full Enabled

Vgs> Vsup —

2*Vbe

(5 V min)

6 V...7 V Full Disabled

3.5 V...6 V Full

Iddx = 25 mA

max if no

external PNP

Disabled

<3.5 V Reset Disabled

Without Boost With Boost

Page 47: High-Performance Motor Control

TM

External Use 46 #FTF2015

S12ZVML Application Schematic VBAT

G

P

I

O

S12Z

core

SPI

Wdog

TIM 4ch/16b

PMF

6 ch.

PWM

SCI

Temp

Sense

LIN

Physical

Interface

Charge

Pump

128 kB

Flash

8 kB RAMSCI

PTU

PLLIRC

Ext Osc BDM

KWU

RTI

VBS1

VBS0

HG0

HS0

HS1

HS2 MM

VBS2

HG1

HG2

VLSOUT

HD

VS

UP

VD

DX

Dual 12-bit ADC

5+4 ch. Ext.(Mux‘d with Op-Amps)

+ 8 ch. Int.

MSCAN

LG0

LG1

LS0

Shunt1

LG2

LS1

LS2

Current Sense

(2 x Op-Amp)

Shunt0

Optional

AM

P0

AM

PM

1

AM

PP

1

AM

P1

AM

PM

0

AM

PP

0

512 Bytes

EEPROM

5 V VDDX, 5 V CAN supply

Boost mode

EVDD sensor

11 V VLS

Voltage regulators

VLSx

EV

DD

5V

Sen

so

r

su

pp

ly

AMR/

GMR/

Hall

Sensor

AMRsin

AMRcos

Hallout

AN0_x

AN1_x

Hallout

AMRsin

AMRcos

IO/IOC

EVDD

BS

T

Boost option

VCP

CP option

CP

Reverse protection

LIN

LIN

GN

D

LIN / PWM Bus

GDU

3 phase

H-Bridge

Predriver

BC

TL

Bypass option

Page 48: High-Performance Motor Control

TM

External Use 47 #FTF2015

S12Z Core: An Optimized Powerful Machine

• Harvard Architecture — Parallel data & code

accesses

• CPU operates at 100 MHz

• Fractional math support

• Instructions/addressing optimized for C

programming

• Multiple length register set optimized for less

memory access

• 32-bit data paths, ALU, data registers

• 24-bit address bus, stack pointer, program

counter and X/Y index registers

• It has a 16-bit I/O data path

• Handles 8-bit data and indices

D7D6

D5D4D3D2

D1D0

YX

PCSP

CCR

07152331Expanded programmer’s model

24-bit address bus maps up to 16 MB (no paging needed!)

Attribute S12Z

Shifter 32-bit multi-bit 1 cycle

Multiplier 32*32 2.5 cycles

16*16 1 cycle

Divider 32 = 32/32 18.5 cycles

MAC 32 += 32*32 3.5 cycles

Fractional math Yes

Bus speed 50 MHz

Page 49: High-Performance Motor Control

TM

External Use 48 #FTF2015

Autonomous Motor Control Loop Implementation

PMFPulse Width

Modulation

With Fault

Fault Inputs

PWM signals

reload

TIMTimer

Commutation Event

Conversion

Result

Command

List (s)

(<=64)

RAM / NVM Result

List (s)

(<=64)

Trigger

List(s)

(<=32)

Conversion

Command

ADC0Analog

Digital

Converter

trigger

ADC1Analog

Digital

Converter

PTU

Programm

-able

Trigger

Unit

glb_ldok

GDUGate Drive

Unit

BackEMF

DCBus Volt.

DCBus Curr.

BackEMF

DCBus Volt.

DCBus Curr.

+-

Current Sense

OpAmps

DC link &

Phase

Dividers

Phase

Mux

trigger

NO CPU involvement & interrupt during motor control cycle

Page 50: High-Performance Motor Control

TM

External Use 49 #FTF2015

Pulse Width Modulator Module (PMF)

• 6 PWM channels, 3 independent counters

− Up to 6 independent channels or 3

complementary pairs

• Based on core clock (max. 100 MHz)

• Complementary operation:

− Dead time insertion

− Top and Bottom pulse width correction

− Double switching

− Separate top and bottom polarity control

• Edge- or center-aligned PWM signals

• Integral reload rates from 1 to 16

• 6-step BLDC commutation support, with

optional link to TIM Output Compare

• Individual software-controlled PWM outputs

(+ easy masking feature per output)

• Programmable fault protection

Double-Switching Mode for single shunt system

Complementary Mode with / without dead time insertion

Page 51: High-Performance Motor Control

TM

External Use 50 #FTF2015

2 x 12-bit Analog Digital Converter

DMA

Takes commands from

SRAM /NVM and stores

results back into SRAM

From PTU

Interrupt

Trigger Control Unit

Analog

Mux

Sample & Hold

RVL

RAM / NVM

Command

Sequence List

(CSL)Command 1Command 2

Command 64

...

...

RAM

Result Value List

(RVL)

Result 1Result 2

Result 64

...

...

ADC

clock

DMA

ANx_8

ANx_2

ANx_1

ANx_0

SAR & C-DAC+

-

TriggerRestart

PRSCLR

Sys Clock

Abort

.

.

.

...

Internal ADC channels

LoadOKSeq_abort

Sample Time

Selectable: 480 ns to 2.88 µs

Command and Result List

Double buffered

Flexible conversion sequence and

oversampling

Fully autonomous motor control

cycle which unloads CPU

Conversion Time

1.8 µs @ max. ADC clock for 12-bit

Automatic Trigger

Can be triggered by PTU, for

accurate synch with PWM

Up to 32 triggers per control

cycle per ADC

From External

or OpAmp

External & OpAmp Inputs

9 external channels ( 5 to ADC0

and 4 to ADC1)

OpAmp output shared with ADC

external channel

Monitoring Internal Signals

DC link, phase voltages, Vsup

Vreg & ADC temp sensors

Bandgap voltage

DMA integrated

Page 52: High-Performance Motor Control

TM

External Use 51 #FTF2015

Programmable Trigger Unit (PTU)

• One 16-bit counter as time base

• Two independent trigger generators (TG)

• Up to 32 trigger events per trigger generator

• Trigger Value List stored in system memory

• Double buffered list, so that CPU can load new values in the background

• Software generated “Reload” & trigger event

• Synchronized with PMF and ADC to guarantee coherent update of all control loop modules

RAMTrigger Value Lists

Trigger1Trigger 2

Trigger 32

...

...

Trigger Generator

(TG) 0

Trigger Generator

(TG) 1

PTU

Time base

CounterControl

Bus Clock

PWM Reload

Event

ADC0

X

XPTUT0

PTURE

XPTUT1

ADC1

Async Com-

mutation Event

Completely avoids CPU involvement to trigger ADC during the control cycle

Trigger1Trigger 2

Trigger 32

...

...

Page 53: High-Performance Motor Control

TM

External Use 52 #FTF2015

Gate Driver Unit (GDU) Topology

Turn-off Resistor

80 kOhm pull down

integrated

Slew Rate Control

Output current limitation of Iout via

selectable Iref

8 selectable slew rates

Max. PWM Frequency

Min driver pulse width = 2 µs

Drive Strength

Typ 100-150 nC

Typ. 6.3 Ohm Switch on

Typ. 16 Ohm Switch off

HG / HS /LG /LS

Max. rating: -5 .. 42 V

Voltage Monitoring

HD High Voltage Monitor @ typ. 21/27.3 V

VLS Low Voltage trip point: 6.2 .. 7 V Charge Pump

Vref

+

-

11V LDO

Gate Driver

11 V LDO

supplies the LS drivers

charges bootstrap cap for the HS drivers

Phase

Comp

Phase

Mux

HD Div &

Monitor

ADC

INT

ADC

INT

Integrated Dividers

HD: divider 12; HS: divider 6

Phase Comparators

Compares HS against DCbus/2 in

hardware

Phase Multiplexer

Switched in each sector

HS Topology

Bootstrap for HS Gate supply

Charge Pump

Supplies HS Gate Drive

Supports 100% duty cycle

Page 54: High-Performance Motor Control

TM

External Use 53 #FTF2015

Current Measurement & Overcurrent Protection

Measure negative currents

By adding an external offset

Offset compensation

+/-5mV to +/-15 mV software

selectable

Overcurrent Comparator

Flexible programmable with 6-bit DAC

Voltage range: 3.82 V .. VDDA

Current measurement

Two current sense amplifiers

Supports 2-shunt systems

Measures voltage across shunt

Gain

Selectable via external resistors

Output voltage

Range 0 V .. VDDA

measured on ADC via external

channel AMP(0/1)

Page 55: High-Performance Motor Control

TM

External Use 54 #FTF2015

FOC with Two Shunts on S12ZVML VBAT

Temp

Charge

Pump

PTU

VBS1

VBS0

HG0

HS0

HS1

HS2 MM

VBS2

HG1

HG2

VLSOUT

HD

VS

UP

VD

DX

12-bit

ADC

LG0

LG1

LS0

Shunt1

LG2

LS1

LS2

Shunt0

AM

P0

AM

PM

1

AM

PP

1

AM

P1

AM

PM

0

AM

PP

0

VLSx

CP

GDU

3 phase

H-Bridge

Predriver

Reverse protection

LIN

LIN

GN

D

LIN / PWM Bus

LIN

Physical

Interface

LIN

Drv Voltage

regulators

5 V VDDX,

11 V VLS

12-bit

ADC

RAM

Val0

Val2

Val4

Res

List

0

Res

List

1

PMF

6-ch

PWM

ia

ib

iaib

ua

ub

ua

ub

id

iq

ud

uq

ia

ic

ib

id

iqw

id*=0

Iq*

w

w*

w*

ia

ib

udcb

udcb

t

ia

ib-

-

-

--

Current Sense

(2 x Op-Amp)

S12ZVML

ADC1 EOC ISR

Page 56: High-Performance Motor Control

TM

External Use 55 #FTF2015

S12ZVM EcosystemThe Complete Solution

Page 57: High-Performance Motor Control

TM

External Use 56 #FTF2015

S12ZVM Ecosystem — The Complete Solution

Hardware (Evaluation board, target application)

MC ToolBox:

Rapid prototyping with

Matlab Simulink

FreeMASTER:

-Graphical User

Interface

-Instrumentation

AUTOSAR

OS

Customer Application Software

Math and Motor Control Libraries:

- Standard optimized math functions and motor control algorithms

- Includes Matlab Simulink Models

LIN

2.1

Drivers

Freescale production

SoftwareFreescale

enablement Software

Third-party

production Software

MC Dev Kit

Reference

Software

NV

M D

rivers

CA

N/L

IN S

tack

Graphical Init Tool

MCAT

Tuning

Tool

Compiler and Debugger

Page 58: High-Performance Motor Control

TM

External Use 57 #FTF2015

Summary: Simplify Your Design

• Minimized system cost: Small PCB, minimum external components

• Scalable approach (memory, boost, bypass, communication interface )

• CPU offloaded from motor control timing tasks due to autonomous motor control peripherals

• Complete software & hardware enablement with ready to use reference design and library

• Higher reliability