freescale powerpoint templatecache.freescale.com/files/training/doc/dwf/dwf14_techday_cn... · sbc...

42
Confidential and Proprietary TM Freescale Automotive Motor Control Solution SEPT.2014 Jason Yang | Business Development

Upload: lamkien

Post on 06-Mar-2018

228 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

Confidential and Proprietary

TM

Freescale Automotive

Motor Control Solution

S E P T . 2 0 1 4

Jason Yang | Business Development

Page 2: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 1

Agenda

• Different Motor Application in Vehicle

• Freescale Solution for Different Motor Types

− DC Motor

− BLDC

− PMSM

• Freescale Motor Control Enablement

− Motor Control Development Kits

− Motor Control Software/Tools

• Freescale Motor Control Reference Design

Page 3: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 2

Different Motor Application in Vehicle

Page 4: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 3

Up to 70 Motors per car

Source :

Page 5: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 4

Electric Motor Type Classification

ELECTRIC MOTORS

AC DC

SYNCHRONOUS ASYNCHRONOUS

Brushless Induction Reluctance Stepper Sinusoidal

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 6: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 5

Typical Electric Motor Auto Applications

Body/Security Chassis/Safety

Powertrain

HVAC Blower

HVAC Flappers ME/HE EPS

Steer by wire

Fuel Pump

Dual-Clutch Trans.

EV – Water Pump Seatbelt pre-tens.

EV - Propulsion

Window Lift

Wipers

Seat Control

Sliding Door

Sunroof

EV – A/C Compr.

Going BLDC Brushed DC

Convertible Roof

ABS fluid pump

Oil Pump

Mostly PMSM

Low End EPS

Dashboard

ME Cluster

Stepper Motor

Page 7: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 9

Freescale Solution for Different Motor Types

Page 8: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 10

Brush DC Motor Principle

• Brush DC motor commutation

Rotor flux is perpendicular to stator regardless of rotor position

Commutator performs mechanical “Vector” Control

S

N

Page 9: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 11

Brushed DC Motor Control

• Target Applications:

− Wipers, Door locks,

Window lift, HVAC, etc.

Freescale Solutions Device Type Product Feature

MCU 32-bit KEA 32bit MCU with ARM Cortex M0+

16-bit S12Gxx 16-bit performance with low cost

S12 VR MCU, smart analog integration

8-bit S08xx Broad motor application

Analog Monolithic H-Bridge Driver MC33926 DC or any bi-direction solenoid driver, Slow Rate selection for improved

EMC

Monolithic H-Bridge Driver MC33931 Low cost DC or any bi-direction solenoid driver

Monolithic Dual H-Bridge Driver MC33932 Dual Low cost DC or any bi-direction solenoid driver

Top Half Bridge Driver MC33981 High Side Driver and Low side Pre-Driver, can drive with very high load.

SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer

LIN Physical Layer MC33662 LIN 2.1 / J2602-2 Physical Layer

CAN I/F

LIN I/F

Power Supply

and Physical I/F

Page 10: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 12

S12 Microcontroller

LIN Transceiver

12V Power Section

Low Side Driver

MagniV Example: Integrated Window Lift

S12VRxx 48-64k

S12

core

Win Wdog 12V Vreg

5Vout

6ch. 10bit

ADC + 8 int. Ch.

SCI 0

Temp

Sense

4 HV

Input

s

LIN

Physical

Interface

Vbat

sense

2 HS

Drivers

48kB

/ 64kB

Flash

2 kB RAM 512Bytes

EEPROM

PLL Rcosc.

Pierce Osc.

Vsu

p

sen

se

4ch 16bit TIM

PWM 2ch 8bit

2 Low

Side

Drivers

SCI 1

BDM

SPI

Key Wakeups

Hall Supp

Tomar

Page 11: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 13

BLDC Motor Control

0 V

A

C B

A B C Control Objectives:

•Speed •Trapezoidal or Sinusoidal

•Position •Position sensor

•Sensorless (Back-EMF)

Design Challenges:

•Commutation •One phase is un-

powered at any given

time

•Dead Time Distortion

Correction

•EMC

– Trapezoidal Back-EMF

Page 12: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 14

Six Step Commutation

14

1.

2.

3.

4.

5.

6.

A B C 0

%

0

%

BLDC Ø A

Ø B Ø C

• Voltage applied on two phases only

• It creates 6 flux vectors

• Phases are power based on rotor position

• The process is called Commutation

Phases voltage

off

off

off

off

off

Page 13: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 15

DC Bus Voltage & Current

Sensing

3 Phase Back EMF Sensing

3 Phase Inverter 3 Phase BLDC Power Stage

FlexTimer Module ADC Module

3 Phase

BLDC

Motor

GPIO

Module

SCI

Module

Speed

PI Controller

Zero Crossing Period &

Position Recognition

Commutation

Control

1/T

MC9S08MP16

BDM

Duty cycle

Actual Speed

Comm.

sequence

Required Speed + -

Current

PI Controller

Actual DC

Bus Current

DC Bus

Voltage

Back EMF

Voltages

- Required DC Bus

Current Limit

Limitations

MC33937 SP

I

SPI

Drive

r

Se

tup

& S

tatu

s

S08MP16/KEAZ128 -- Sensorless BLDC Control

Device Table

S08MP16/

KEAZ128

48MHz CPU

16k/128k Flash

13 channels / 16 channels ADC

with 12-bit resolution

High Speed Comparator

Programmable Delay Block with

ADC and HSCMP

Up to 8 channels / 10 channels

Flextimer with 48MHz operation

Up to 48 LQFP/80LQFP

MC33937 Three phase MOSFET pre-driver

1.0A gate driver capability with

protection

Programmable dead time

Simultaneous output capability

Block Diagram

Page 14: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 16

Dedicated Peripherals Needed for 3ph Motor Control

• Command − PWM input, LIN or CAN

• PWM − PWM signals

− Dead time insertion

− ADC triggering

− Fault control

• Delay block − Set ADC measurement at

specific times within PWM cycle

• ADC − BEMF zero-crossing detection

− Measure current in motor

• Comparator − Over-current detection

6 ch PWM

12 bit ADC

Fault inputs

Prog delay

SCI/CAN

Comparator

Page 15: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 17

MC33937: 3-phase Power FET Pre-driver

Page 16: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 18

Magniv Example: 3-phase HVAC Blower

3ph Gate

Driver

PWM

PWM

SBC

w/

LIN

phy

Power MOSFETs : always external

for power dissipation reasons

S12ZVMxx 32-128k

Page 17: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 19

VREG (8pin)

LIN phy (8pin)

MCU

or

DSC (48pin)

Gate

Driver (48pin)

Op-amps

Discrete Solution

20+

3+

2+

S12ZVM Solution:

• ~ 50 fewer solder joints

• - 4 to 6 cm2 PCB space

1- S12ZVM Concept : Replace up to 5 IC

4cm

~1 ½ in.

64pin

Page 18: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 20

1- S12ZVML Application Use Case (simplified schematics)

VBAT

G

P

I

O

S12Z

core

SPI

Wdog

TIM 4ch/16b

Vregs (5V VDD, VLS, VDD sensor)

PMF

6-ch

PWM

SCI

Temp

Sense

GDU

3 phase

H-Bridge

Predriver

LIN

Physical

Interface

Charge Pump 128 kB

Flash

8 kB RAM

512Bytes

EEPROM

SCI

PTU

PLL IRC

Ext Osc BDM

KWU

RTI

VBS1

VBS0

HG0

HS0

HS1

HS2

EVDD

VHD

M M

AMR/

GMR/

Hall

Sensor

AMRsin

AMRcos

Hallout VBS2

HG1

HG2

VL

SO

UT

+11V

D

S

HD

CP

VCP XTAL

EXTAL

LIN

LIN

GN

D

IO/ MISO

IO/ MOSI

IO/ SCLK

IO/ SS

IO/IOC0

IO/IOC1

IO/ RXD0

IO/ TXD0

IO/ KWP0

IO/ KWP1

0V

+11V

BS

T

VS

UP

VS

SB

AN0_3

AN0_4

AN1_3

Hallout

AMRsin

AMRcos

VD

D

BK

GD

VS

S1

Reset

VS

S2

VS

SX

1

VD

DX

1

VD

DA

VD

DF

BC

TL

Dual 12bit ADC

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

+ 8ch. Int.

MSCAN

LG0

LG1

LS0

Shunt1

LG2

LS1

LS2

AM

PM

1

AM

PP

1

AM

P1

Current Sense

(2 x Op-Amp) A

MP

M0

AM

PP

0

Shunt0

AM

P0

Optional

VS

SA

IO/IOC2

IO/IOC3

VD

DX

2

VL

S0

VL

S1

VL

S2

Integrated inside

S12ZVM32/16

Page 19: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 21

1- S12ZVM Family Feature Set Summary

Flash /RAM Size 128 / 8 KB 64 / 4 KB 32 / 4 KB 16 / 2 KB

Connectivity LIN CAN LIN CAN LIN PWM PWM PWM PWM

Product Name S12ZVML128 S12ZVMC128 S12ZVML64 S12ZVMC64 S12ZVML32 S12ZVM32 S12ZVM32 S12ZVM16 S12ZVM16

Package 64LQFP-EP 64LQFP-EP 64LQFP-EP 64LQFP-EP 64LQFP-EP 64LQFP-EP 48LQFP-EP 64LQFP-EP 48LQFP-EP

EEPROM (bytes) 512 512 512 512 512 128 128 128 128

PHY LIN 0 LIN 0 LIN HV HV HV HV

2nd VREG 0 1 0 1 0 0 0 0 0

GDU (HS / LS) 3 / 3 3 / 3 3 / 3 3 / 3 3 / 3 3 / 3 3 / 3 3 / 3 3 / 3

Bootstrap Diodes 0 0 0 0 0 3 3 3 3

Op Amp 2 2 2 2 2 2 1 2 1

ADC (ext. channels) 4 + 5 4 + 5 4 + 5 4 + 5 4 + 5 4 + 5 1 + 3 4 + 5 1 + 3

MSCAN 1 1 1 1 1 0 0 0 0

SCI 2 2 2 2 2 2 1 2 1

SPI 1 1 1 1 1 1 0 1 0

TIM IC/OC channels 4 4 4 4 4 4 3 4 3

External FET

Nominal Total Gate

Charge (nC)

100-150 100-150 100-150 100-150 100-150 50-80 50-80 50-80 50-80

Package Size 10mm x 10mm 10mm x 10mm 10mm x 10mm 10mm x 10mm 10mm x 10mm 10mm x 10mm 7mm x 7mm 10mm x 10mm 7mm x 7mm

Samples availability Now Now Now Now Now Emulated by

S12ZVMLxxx Q3 2015

Emulated by

S12ZVMLxxx Q3 2015

Production release Q1 2014 Q1 2014 Q1 2014 Q1 2014 Q1 2014 Q1 2016 Q3 2016 Q1 2016 Q3 2016

Page 20: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 22

BLDC vs. PMSM

The prinsipal difference between PMSM and BLDC is, a PMSM motor

uses sinusoidally distributed stator windings, whereas a BLDC motor are

salient type field coils.

Magnetic flux is

evenly distributed

Magnetic flux is

sinusoidally distributed

Page 21: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 23

EPS Demo in Shanghai Lab

Page 22: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 24

32-bit Low-end: MPC5604P Key Features

Power Architecture® Core

• Up to 60 MHz e200 zen0h core

Memory

•512 KB Program Flash with ECC

•4 x 16 KB DataFlash® with ECC

•40 KB SRAM with ECC

I/O

•1 x FlexCAN with 32MB

•1 x Safety port (can be used as additional FlexCAN – 32 MB)

•1 x FlexRay Dual Channel with 32 MB

•2 x LinFlex

•4 x DSPI (4 independent chip selects each)

•1 x FlexPWM (4 channels with 4 fault inputs)

•1 x eTimer (6 channels incl. quad decode)

•1 x eTimer (6 channels for general purpose)

•2 x ADC

•2 x 12 ch.(4 shared channels), 10-bit, conversion time

760 nsec ( 2x 6 ch., 4shared on 100-pin package)

•1 x ADC triggering unit: 8 events

System

•2 x PLL (one FM-PLL, one for FlexRay™)

•16-ch. eDMA

•Fault collection unit

•16 MHz internal RC OSC

•Junction temperature sensor

•JTAG (2 pin or 5 pin) / Nexus Class 2+

•3.3V single supply (5V mask option) with external ballast

transistor

•100- and 144-pin thin quad flat pack (TQFP)

I/O

Bridge SRAM

e200

Core

VReg

Co

mm

un

icati

on

s

I/O

Syste

m

Crossbar Slaves

Crossbar Masters

2

AT

D

Nexus

JTAG

Debug

PROGRAM

Flash

1

eF

lexC

AN

eDMA VLE

Boot Assist

Module (BAM)

Osc/PLL

CROSSBAR SWITCH

System

Integration

FlexRay™

Controller

Fle

xP

WM

DATA

Flash

2

LIN

Fle

x

2

eT

imer

4 x

DS

PI

Safe

ty

CT

U

Interrupt

Controller

Page 23: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 25

• 25

32-bit High-end: MPC5643L

Power Architecture® Core • up to 120MHz PowerPC ISA Dual e200 zen4 core, 240DMIPS • 4K 2-way / 4-way I-cache • FPU • Safety enhanced Cores + FPU + VLE + MMU • Dual Parallel or Lock Step configuration + HW/SW monitoring

Memory • Up to 1MByte RWW Flash with ECC • Up to 128 KByte SRAM with ECC • EE emulation • Dual crossbar with MPUs I/O • 2 x FlexCAN (32 message buffers each) • 1 x FlexRay (64 msg. buffers) • 2 x LINFlex • 3 x DSPI • 1 x External clock output • 2 x FlexPWM (2 x 12 channels) • 3 x eTimer modules (3 x 6 channels) • Dual ADC (16 channels each, 12bit, 650ns), 1 S/H per ADC • 1 x Cross-triggering unit for motor control

System • 16 Channels eDMA • Autonomous Fault Collection and Control Unit • CRC computing unit • Software watchdog timer (inc. window mode, flow monitoring) • 2 x Junction temperature sensor • Nexus debug interface (up to N3) • FM-PLL + FlexRay PLL • 3.3 V Single supply with external and internal ballast transistor • 3.3 V I/Os (ADC 5 V capable) • 144 LQFP / 257 MAPBGA • Tj = 150°C

Cross Bar Switch

I/O

Bridge

Memory Protection Unit

Cross Bar Switch

Memory Protection Unit

FlexRay

RC

RC RC

1M

FLASH

(ECC)

128K

SRAM

(ECC)

RC

I/O

Bridge

PMU

SWT

MCM

STM

INTC

eDMA CACHE

PowerPC™

e200

MMU

VLE

CACHE

FPU Nexus

JTAG

Debug PMU

SWT

MCM

STM

INTC

eDMA CACHE

PowerPC™

e200

MMU

VLE

CACHE

FPU

Co

mm

un

icati

on

s

I/O

Syste

m

2 x

LIN

Fle

x

3 x

DS

PI

2 x

A

DC

2

Fle

xC

AN

3 x

eT

imer

FC

CU

2 x

F

lexP

WM

CT

U

TS

EN

S

2x

Page 24: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 26

57P4 2.5 MB Core • Dual up to 200 MHz PowerTM ISA e200 zen4 core ( Z420) • 32 bit Reg File, 64 bit BIU with E2E ECC, • 64kB RAM of D-LMEM with MPU for fast context switch + local data • 8KB 2-way I-cache / 4KB 2-way D-Cache • 1x Scalar FPU (compiler supported) per core • Safety enhanced Cores – VLE only • No Signal processing unit extension + NO MMU • Delayed Lock Step configuration only

Memory • 2.5 MBytes NVM with ECC (with add. Safety measure for address). • 64kB EEE (Data Flash) available incl. ECC • Up to 384 Kbyte global system SRAM with ECC (Addr + Data) I/O • 3 x FlexCAN (64+2x32 message buffers) • 1 x FlexRay (Dual Channel 64 msg. buffers) • 2 x LINFlex (Uart/Lin protocol driver) • 4 x DSPI (4 cs each) • 2x FlexPWM (2x 12ch for 2 independent Motors Controlled) • 3 x eTimer modules (18 channel total) • 4 x SAR ADC – 1MS/s target 5V input capable • 2 x Cross-triggering unit for motor control automatism • 2x SENT • Ethernet (257BGA only)

System • Interprocessor I/F SIPI (– approx 300Mbaud) • Safe DMA • Fault Collection unit, WDG, T-sens, & CRC computing unit • Nexus debug interface – Aurora • Dual-PLL (Peripheral + System Core) • 3.3 V Single supply: internal regulator with external power stage or

External supply • 3.3 V I/Os (ADC 5 V capable) • 144 LQFP / 257 MAPBGA 0.8 mm pitch • Tj = 150°C . Extended Temperature at 165”C Option (separate P/N)

Cross Bar Switch –E2E ECC (Addr+Data)

Memory Protection Unit – 32 regions

2.5 M

FLASH (I/D)

(A+D ECC)

PMU

SWT

MCM

STM

INTC

CACHE

PowerPC™

e200

VLE

S-FPU

DLMEM Nexus/

Aurora

JTAG

Debug

CACHE

PowerPC™

e200

Safety

Checker VLE

S-FPU

2 x

LIN

Fle

x

4 x

DS

PI

4 x

A

DC

3

Fle

xC

AN

3 x

eT

imer

FC

CU

2 x

F

lexP

WM

2x C

TU

2 x

TS

EN

S

I/D-cache

384 KB

SRAM

(A+D ECC)

FlexRay SIPI

2 x

SE

NT

Safe

eDMA Safety Lake

I/O

Bridge SRAM Ctrl

Multi Ported

Flash ctrl I/O

Bridge

I/O

Syste

m

Crossbar Slaves

Ethernet

Page 25: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 27

Freescale Motor Control Enablement

Page 26: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 28

Freescale Motor Control Enablement

• It is a complete evaluation and development package allowing the

rapid prototyping and customer evaluation of the motor control

application

Knowledge

Functional Hardware

Modular Software

Simple Tools

SATISFIED

CUSTOMER

Automotive Motor Control Enablement

Page 27: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 29

FSL Automotive Motor Control Solutions Offering

Field Oriented Control

Automotive Motor Control

Development Kit Series

Automotive Math &

Motor Control Library Set

MCU

Controller Board

3-ph Low Voltage

Power Stage

PMSM or

BLDC

Motors

Final customer applications, based on Qorivva / MagniV MCUs

FreeMASTER & Motor Control

Application Tuning (MCAT) Tools

freescale.com/AutoMCDevKits freescale.com/FreeMASTER freescale.com/AutoMCLib

Freescale’s:

• technical expertise &

application knowledge

• technical support &

services

• pool of patents

FSL Motor Control know-how

Page 28: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 30

Motor Control Development Kit Series - Members

Dual PMSM w/ MPC5643L

Dual BLDC w/ MPC5643L

BLDC w/ MPC5643L

PMSM w/ MPC5604P

BLDC w/ MPC5604P

BLDC w/ MPC5606B

BLDC w/ S12ZVM

BLDC w/ S12G

PMSM w/ MPC5643L

Page 29: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 31

PMSM Development Kit

MCU

Controller Board

MC33937A

3-phase

Low Voltage

Power Stage

PMSM with

Resolver/Encoder or

BLDC with

Hall/No sensor FET DRIVER

MC33937A

FET 3-phase

Power Stage

3-phase Current

Shunts

Resolver/Sin-Cos

Interface

Incremental

Encoder Interface

Qorivva

MPC5643L MCU

Switches and Pushbuttons

ON/OFF, Up/Down, Reset

SBC

MC33905

Page 30: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 32

Modular Software and Tools

FreeMASTER as well as

CodeWarrior are for free.

freescale.com/FreeMASTER

freescale.com/CodeWarrior

Page 31: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 33

Automotive Math and Motor Control Library Set

General Motor

Control Library

General Function

Library

General Digital

Filters Library

Mathematical

Library

Advance

Motor Control

Library

Advance Control

Library

freescale.com/AutoMCLib

Page 32: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 34

Motor Control Algorithm Functions

► Trigonometric Functions • GFLIB_Sin • GFLIB_Cos • GFLIB_Tan • GFLIB_Asin • GFLIB_Acos • GFLIB_Atan • GFLIB_AtanXY

► Limitation Functions • GFLIB_Limit • GFLIB_LowerLimit • GFLIB_UpperLimit • GFLIB_VectorLimit

► PI Controller Functions • GFLIB_ControllerPIr • GFLIB_ControllerPIrAW • GFLIB_ControllerPIp • GFLIB_ControllerPIpAW

► Linear Interpolation • GFLIB_Lut1D

► Hysteresis Function • GFLIB_Hyst

► Signal Integration Function • GFLIB_IntegratorTR

► Sign Function • GFLIB_Sign

► Signal Ramp Function • GFLIB_Ramp

GFLIB GDFLIB

► Finite Impulse Filter • GDFLIB_FilterFIR

► Moving Average Filter • GDFLIB_FilterMA

► 1st Order Infinite Impulse Filter

• GDFLIB_FilterIIR1init • GDFLIB_FilterIIR1

► 2nd Order Infinite Impulse Filter

• GDFLIB_FilterIIR2init • GDFLIB_FilterIIR2

GMCLIB

► Clark Transformation • GMCLIB_Clark • GMCLIB_ClarkInv

► Park Transformation • GMCLIB_Park • GMCLIB_ParkInv

► Duty Cycle Calculation • GMCLIB_SvmStd

► Elimination of DC Ripples • GMCLIB_ElimDcBusRip

► Decoupling of PMSM Motors • GMCLIB_DecouplingPMSM

Page 33: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 35

Quick Prototype – Motor Control Tool Box

• Including MathWorks Simulink MCU low level driver and motor control lib

• Provide customers integrated environment and tooling chain to generate and configure the software, including: Initialization code

Driver

Motor control lib

• Provide target MCU bootloader and Freescale motor control tuning tool Freemaster。

• Target for IEC 61508 (SIL3) and ISO 26262(ASIL-D)

Page 34: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 36

Motor Control Lib

This library helps quickly create Bit-Accurate

Single Precision floating point models for

simulation in Matlab for accurate verification and

prototyping of Motor Control algorithms.

• Developed in ANSI-C, MISRA compliant

• Single precision floating point implementation optimized for MCU

• Theory and performance results summarized in documentation

Page 35: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 37

Step 1 – 模型在环(MIL):

MBD Simulation Only

Software requirements

Control system requirements

Overall application control strategy

Step 2 – 软件在环(SIL):

MBD Simulation with ANSI C Code using SIL

Control algorithm design

Code generation preparation

Control system design

Overall application control strategy design

Start testing implementation approach

Step 3 – 处理器在环(PIL):

MBD Simulation with ANSI C Code using PIL

Controller code generation

Determine execution time on MCU

Verify algorithm on MCU

See memory/stack usage on MCU

Start testing implementation approach

Target testing controls algorithm on MCU

Step 4 –硬件在环(HIL)

ANSI C Code Running on Target HW & MCU

Validation/verification phase

Controller code generation

Determine execution time on MCU

Start testing implementation on target ECM

Code generate control algorithm +

I/O drivers. Complete implementation on

ECM. Test system in target environment

Utilize calibration tools for data logging and

parameter tuning

Execute code on target MCU

Functional testing in target environment

Ensure execution on target is correct as well

as code generation on target is performing as

desired.

PC Environment PC Environment PC Environment

+ MCU

MCU with

Embedded Control

Module (ECM)

Modeling style guidelines applied

Algorithm functional partitioning

Interfaces are defined here Testing of functional components of algorithm

Test harness to validate all requirements

Test coverage of model here

Creates functional baseline of model

Refine model for code generation

Function/File partitioning

Data typing to target environment done here

Scaling for fixed point simulation and code gen

Testing of functional components of algorithm

Test harness to validate all requirements

Test coverage of model here

Creates functional baseline of model

Equivalence testing

Controller Model

Electric Motor Model

PI

Filter

PI

Filter

Reverse

Park

Transform

PWM

Modulation

PWM A

PWM B

PWM C

Zero

+

-

+

-

Torque

Control

IQ

loop

ID

loop

IQ

cmd

ID

cmd

ID

Va

cmd

Vb

cmd

Forward

Park

Transform

Forward

Clark

Transform

IA

IB

IC

Va

Vb

Motor Position

IQ

Controller Model

Electric Motor Model

PI

Filter

PI

Filter

Reverse

Park

Transform

PWM

Modulation

PWM A

PWM B

PWM C

Zero

+

-

+

-

Torque

Control

IQ

loop

ID

loop

IQ

cmd

ID

cmd

ID

Va

cmd

Vb

cmd

Forward

Park

Transform

Forward

Clark

Transform

IA

IB

IC

Va

Vb

Motor Position

IQ

Controller Model

Electric Motor Model

PI

Filter

PI

Filter

Reverse

Park

Transform

PWM

Modulation

PWM A

PWM B

PWM C

Zero

+

-

+

-

Torque

Control

IQ

loop

ID

loop

IQ

cmd

ID

cmd

ID

Va

cmd

Vb

cmd

Forward

Park

Transform

Forward

Clark

Transform

IA

IB

IC

Va

Vb

Motor Position

IQ

Gate

Driver

Controller Model

Electric Motor

PI

Filter

PI

Filter

Reverse

Park

Transform

PWM

Modulation

PWM A

PWM B

PWM C

Zero

+

-

+

-

Torque

Control

IQ

loop

ID

loop

IQ

cmd

ID

cmd

ID

Va

cmd

Vb

cmd

Forward

Park

Transform

Forward

Clark

Transform

IA

IB

IC

Va

Vb

Motor Position

IQ

Gate

Driver

Model Based Design (MBD) – Motor Control

Page 36: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 38

PMSM Field Oriented Control

• MCLib Application Example for MPC5643L Development Kit

Page 37: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 39

MCAT Introduction & Features

• Tool enabling tuning of control parameters according to the target motor / application

• Dynamic tuning & update of control parameters

• Generation of header file with static configuration of the tuned parameters

• MCU independent (Kinetis, MPC, DSC)

• Currently supports PMSM

− MCAT for BLDC motor is being in progress

− MCAT for ACIM motor will follow (2013)

Page 38: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 40

Steps to Tune the Current Loop

1. Parameter Setting-Up 2. Control Loop Tuning

3. Output Control Constant Preview 4. Generated .h file

Page 39: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 41

MCAT Control Structure Selector

Open loop control

Voltage control – position required

no need any current, position or speed feedback

no need any current and speed feedback

Current control – current, position required no need any speed feedback

Speed control - current, position and speed

required

Page 40: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 42

Product Web Page

freescale.com/AutoMCDevKits

Page 41: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

Confidential and Proprietary 43

Reference Design

• Reference Designs are available to expedite

the time to market

− EV Powertrain Motor (MPC5744P)

− EPS (MPC5604P/MPC5643L)

− Anti Pinch (S12VR64)

− BLDC FAN (S12ZVM)

− BLDC Pump (S12ZVM)

− AFS (S12ZVL/MPC560xB)

− Dashboard (S12ZVH)

− Etc.

Page 42: Freescale PowerPoint Templatecache.freescale.com/files/training/doc/dwf/DWF14_TechDay_CN... · SBC MC33903/4/5 Power Supply 3.3V/5V and CAN/LIN Physical Layer LIN Physical Layer MC33662

TM

© 2014 Freescale Semiconductor, Inc. | Confidential and Proprietary

www.Freescale.com