freescale automotive motor control enablement...

67
External Use TM Freescale Automotive Motor Control Enablement Solutions FTF-AUT-F0233 APR.2014 Marek STULRAJTER | Automotive MCU Product Group

Upload: trinhduong

Post on 14-Jul-2018

224 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

External Use

TM

Freescale Automotive Motor

Control Enablement Solutions

FTF-AUT-F0233

A P R . 2 0 1 4

Marek STULRAJTER | Automotive MCU Product Group

Page 2: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 1

Session Introduction

This session introduces a Freescale solution for

Automotive Motor Control as a complete evaluation

and development package.

This session gives an overview of easy-to-use

hardware, modular software and simple tools

allowing the rapid prototyping and customer

evaluation of the motor control application.

Page 3: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 2

Session Objectives By the end of this session you will:

Be more familiar with Freescale Automotive Motor Control enablement

Know how to use the presented hardware solutions

Know the advantages of the presented software solution, including Motor Control library set and Motor Control Application Tuning tool

Know how and where to look for support, documentation and examples

Page 4: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 3

Agenda

• Motor Control Development Kits series

− Freescale’s out-of-the box experience introduction

• Hardware solution

− Motor Control Development Kit description

• Software solution

− Automotive Math and Motor Control Library

− Reference software and collaterals

− FreeMASTER with MCAT

• Product pricing and availability

Page 5: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 4

Freescale Motor Control Enablement

• Complete evaluation and development package allowing

rapid prototyping and customer evaluation of motor

control applications.

Right Freescale Silicon

Easy to use Hardware

Modular Software

Simple Tools

Technical Expertise

SATISFIED

CUSTOMER

Page 6: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 5

MC Enablement: Complete Solution

MC ToolBox

Rapid prototyping with

Matlab Simulink

FreeMASTER

-Graphical user

interface

-Instrumentation

Autosar

OS

Customer Application Software

Math and Motor Control Libraries

- Math functions

- Optimized algorithms

LIN

2.1

Drive

rs

Freescale production

software

Freescale enablement

software

Third-party production

software

MC Dev Kit

Reference

Software

NV

M D

rivers

CA

N/L

IN S

tack

Device static

configuration

MCAT

Tuning

Tool

Compiler and debugger

Freescale silicon

Hardware (evaluation board, target application)

Page 7: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 6

MC Enablement: Complete Solution

MC ToolBox

Rapid prototyping with

Matlab Simulink

FreeMASTER

-Graphical user

interface

-Instrumentation

Autosar OS

Customer Application Software

Math and Motor Control Libraries

- Math functions

- Optimized algorithms

LIN

2.1

Drive

rs

Freescale production

software

Freescale enablement

software

Third-party production

software

MC Dev Kit

Reference

Software

NV

M D

rivers

CA

N/L

IN S

tack

Device static

configuration

MCAT

Tuning

Tool

Compiler and debugger

Freescale silicon

Hardware (evaluation board, target application)

Page 8: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 7

Automotive Motor Control Development Kit

• An out-of-the-box experience for automotive customers using

Freescale MCUs in electrical motor control domain

Page 9: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 8

Motor Control Development Kit: Composition

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 10: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 9

Automotive Motor Control Development Kit Series

• Addresses Permanent Magnet Synchronous (PMSM) and Brushless DC (BLDC) motors, both widely used in automotive applications

• Supports variety of Freescale 32-bit/16-bit MCUs targeted for electric motor control, while 3-phs low-voltage power stage board is based on MC33937A FET pre-driver

MTRCKTSPS5643L

Motor Control

KT – kit

CB – controller board

NA (CB)

S – single

D – dual

T – triple

P – PMSM

B – BLDC

NA (CB)

S – w/ sensor

N – w/o sensor

Device code name:

5604P – Pictus

5643L – Leopard

5606B – Bolero

5744P – Panther

S12G – S12G128

S12ZVM – Carcassonne

MC Development Kit – Part Number Decoder

Page 11: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 10

Motor Control Development Kit Series

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 12: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 11

Motor Control Development Kit Series: Content

• Out-of-the-box experience offers:

− Complete schematics of the development kit hardware

− Complete source code of the development kit software application

− Math and Motor Control libraries (MCLib) in object code

− FreeMASTER & MCAT interface to easy application visualization / control

− Extensive documentation including User Guide, Quick Start Guide and Fact Sheet

HTML-based Control Page FreeMASTER Scope

www.freescale.com/AutoMCDevKits

Page 13: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 12

Development Kit Requirements In general, the control theory is based on the idea of controlling the output

(load) based on the input (commands, feedbacks). MC Development Kit is

a “sensor - actuator” setup with an electric motor as a load.

Sensor Current, position/speed, voltage/backward EMF measurement / estimation

Actuator 3-phase low-voltage power stage generates 3-phase voltages

Load Electric motor, transformer, coil, etc ….

Page 14: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 13

Sensor: Current Measurement

Functional properties:

• Three-phase current measurement

• Two-phase current measurement

• DCbus current measurement

• Single shunt current reconstruction

Key features:

• Default current range 10A

• Scalable current range

‒ Up to 15A without cooling

‒ Up to 50A with cooling

Page 15: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 14

Sensor: Position and Speed Measurement

Functional properties:

• Sine-wave excitation signal generation

• Position measurement

• Speed measurement

• Revolution measurement

Key features:

• Adjustable magnitude of excitation signal

• Adjustable frequency of excitation signal

• Sensor fault state detection

ADC measurement

Uref

Usin

Rotor shaft

Ucos

Uref

Usin

Rotor shaft

Ucos

Resolver

Encoder

Incremental Encoder Pulses

Source: Heidenhain

Page 16: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 15

Sensor: Back EMF Estimation

Functional properties:

• Phase voltage measurement

• Back EMF estimation

• Zero crossing detection

Key features:

• Phase and DCbus voltage dividers

Page 17: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 16

Actuator: Voltage Generation

Functional properties:

• Several modulation techniques

• DC-bus ripple elimination

• Several switching patterns

‒ Complementary (PWM…)

‒ Independent (DTC, 6-step…)

Key features:

• 3-phase H-bridge pre-driver

• Extended operating range from 6.0V to 50V

• Fault reporting (SPI), over current

detection, phase shift, desaturation fault,

under voltage detection

Page 18: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 17

Electric Motor Load

DC motor BLDC motor AC IM motor

Different motors have different constructions and operating principles.

Therefore, different control approaches are required.

AC PM motor

Page 19: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 18

MC Enablement: Complete Solution

MC ToolBox

Rapid prototyping with

Matlab Simulink

FreeMASTER

-Graphical user

interface

-Instrumentation

Autosar

OS

Customer Application Software

Math and Motor Control Libraries

- Math functions

- Optimized algorithms

LIN

2.1

Drive

rs

Freescale production

software

Freescale enablement

software

Third-party production

software

MC Dev Kit

Reference

Software

NV

M D

rivers

CA

N/L

IN S

tack

Graphical Init

Tool (PE)

MCAT

Tuning

Tool

Compiler and debugger

Freescale silicon

Hardware (evaluation board, target application)

Page 20: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 19

MC Enablement: Complete Solution

MC ToolBox

Rapid prototyping with

Matlab Simulink

FreeMASTER

-Graphical user

interface

-Instrumentation

Autosar OS

Customer Application Software

Math and Motor Control Libraries

- Math functions

- Optimized algorithms

LIN

2.1

Drive

rs

Freescale production

software

Freescale enablement

software

Third-party production

software

NV

M D

rivers

CA

N/L

IN S

tack

Device static

configuration

MCAT

Tuning

Tool

Compiler and debugger

Freescale silicon

Hardware (evaluation board, target application)

MC Dev Kit

Reference

Software

Page 21: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 20

General Motor

Control

Library

General

Function

Library General

Digital

Filters

Library

Mathematical

Library

Advance

Motor Control

Library

Advance

Control Library

Automotive Math and Motor Control Library Set

• Set of basic trigonometric, general math, filter & motor control functions

• Customer algorithms can be developed independent of target platform peripherals

• Enables easy migration between platforms with minimized effort

Page 22: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 21

MLIB

• Trigonometric Functions

• GFLIB_Sin, GFLIB_Cos,

GFLIB_Tan

• GFLIB_Asin, GFLIB_Acos,

GFLIB_Atan, GFLIB_AtanYX

• Limitation Functions

• GFLIB_Limit,

GFLIB_VectorLimit

• GFLIB_LowerLimit,

GFLIB_UpperLimit

• PI Controller Functions

• GFLIB_ControllerPIr,

GFLIB_ControllerPIrAW

• GFLIB_ControllerPIp,

GFLIB_ControllerPIpAW

• Interpolation

• GFLIB_Lut1D, GFLIB_Lut2D

• Hysteresis Function

• GFLIB_Hyst

• Signal Integration

Function

• GFLIB_IntegratorTR

• Sign Function

• GFLIB_Sign

• Signal Ramp Function

• GFLIB_Ramp

• Square Root Function

• GFLIB_Sqrt

GFLIB

• 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

GDFLIB

• 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

GMCLIB

• Absolute Value, Negative

Value

• MLIB_Abs, MLIB_AbsSat

• MLIB_Neg, MLIB_NegSat

• Add/Subtract Functions

• MLIB_Add, MLIB_AddSat

• MLIB_Sub, MLIB_SubSat

• Multiply/Divide/Add-

multiply Functions

• MLIB_Mul, MLIB_MulSat

• MLIB_Div, MLIB_DivSat

• MLIB_Mac, MLIB_MacSat

• MLIB_VMac

• Shifting

• MLIB_ShL, MLIB_ShLSat

• MLIB_ShR

• MLIB_ShBi, MLIB_ShBiSat

• Normalisation, Round

Functions

• MLIB_Norm, MLIB_Round

• Conversion Functions

• MLIB_ConvertPU,

MLIB_Convert

Delivery Content

Matlab/Simulink Bit Accurate Models

User Manuals

Header Files

Compiled Library File

License File (to be accepted at install time)

ACLIB/AMCLIB

• Angle Tracking Observer

• Tracking Observer

• PMSM BEMF Observer in

Alpha/Beta

• PMSM BEMF Observer in

D/Q

• Further content under

definition

Target Platform GreenHills Multi WindRiver Diab Cosmic

Qorivva MCU RTM Rev 1.0.3 RTM Rev 1.0.3

S12ZVM RTM Rev 1.0.2

Automotive Math and Motor Control Library Set Contents

Product Variant Licensing model

Precompiled object code Free-of-charge for development only

Source code Production version based on licens fee

Page 23: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 22

How is the Library used

• Install Library with MPC564xL_AMMCLIB_LIB.exe (c:\ Freescale\ AMMCLIB\ MPC564xL_AMMCLIB_v1.0.0\..)

• Add the Library path into your development studion settings

• call the functions in the code as needed

e(t) = Des(t)- Real(t)

Err_in = MLIB_Sub(Desired, Real, FLT);

u(t) = KP e(t) + KI e(t) ΔT

PI_out = GFLIB_ControllerPIp(Err_in, &PI_Params, FLT);

PI controller is a non-separable part of all closed loop systems:

Continues time domain expression

dteKKeu (t)IP(t)(t)

KP

KI

PI Controller

u(t) e(t) Des(t)

- Real(t)

Plant

Real(t)

Block scheme explanation

Auto MC Library usage:

Data type representation

KP – proportional gain

KI – integral gain

Page 24: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 23

PMSM Field Oriented Control

• AM & MCLib application example for MPC5643L Development Kit employing

PMSM motor with Field Oriented Control approach

Page 25: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 24

Automotive Motor Control Library Web Page

www.freescale.com/AutoMCLib Features:

• Software details

• Download latest releases

• Extensive documentation with theoretical background, examples, description, etc ...

User’s Guide

Page 26: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 25

MC Enablement: Complete Solution

MC ToolBox

Rapid prototyping with

Matlab Simulink

FreeMASTER

-Graphical user

interface

-Instrumentation

Autosar

OS

Customer Application Software

Math and Motor Control Libraries

- Math functions

- Optimized algorithms

LIN

2.1

Drive

rs

Freescale production

software

Freescale enablement

software

Third-party production

software

MC Dev Kit

Reference

Software

NV

M D

rivers

CA

N/L

IN S

tack

Device static

configuration

MCAT

Tuning

Tool

Compiler and debugger

Freescale silicon

Hardware (evaluation board, target application)

Page 27: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 26

MC Enablement: Complete Solution

MC ToolBox

Rapid prototyping with

Matlab Simulink

FreeMASTER

-Graphical user

interface

-Instrumentation

Autosar OS

Customer Application Software

Math and Motor Control Libraries

- Math functions

- Optimized algorithms

LIN

2.1

Drive

rs

Freescale production

software

Freescale enablement

software

Third-party production

software

NV

M D

rivers

CA

N/L

IN S

tack

Device static

configuration

MCAT

Tuning

Tool

Compiler and debugger

Freescale silicon

Hardware (evaluation board, target application)

MC Dev Kit

Reference

Software

Page 28: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 27

Motor Control Reference Software and Collateral

Example Source Codes

Application Notes

www.freescale.com/AutoMCDevKits

Page 29: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 28

Motor Control Reference Software and Collateral

www.freescale.com/AutoMCDevKits

MC DevKits documentation

MC DevKits example source code

MC DevKits Hardware

Page 30: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 29

MC Enablement: Complete Solution

MC ToolBox

Rapid prototyping with

Matlab Simulink

FreeMASTER

-Graphical user

interface

-Instrumentation

Autosar

OS

Customer Application Software

Math and Motor Control Libraries

- Math functions

- Optimized algorithms

LIN

2.1

Drive

rs

Freescale production

software

Freescale enablement

software

Third-party production

software

MC Dev Kit

Reference

Software

NV

M D

rivers

CA

N/L

IN S

tack

Device static

configuration

MCAT

Tuning

Tool

Compiler and debugger

Freescale silicon

Hardware (evaluation board, target application)

Page 31: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 30

MC Enablement: Complete Solution

MC ToolBox

Rapid prototyping with

Matlab Simulink

FreeMASTER

-Graphical user

interface

-Instrumentation

Autosar OS

Customer Application Software

Math and Motor Control Libraries

- Math functions

- Optimized algorithms

LIN

2.1

Drive

rs

Freescale production

software

Freescale enablement

software

Third-party production

software

NV

M D

rivers

CA

N/L

IN S

tack

Device static

configuration

MCAT

Tuning

Tool

Compiler and debugger

Freescale silicon

Hardware (evaluation board, target application)

MC Dev Kit

Reference

Software

Page 32: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 31

What is FreeMASTER?

Allows the control of an embedded application from a graphical environment running on a PC.

The application was initially created for developers of hard-real time motor control applications

but many users found it very useful for their custom development.

FreeMASTER features

• real-time debug monitor and data visualization tool

• real-time at ~millisecond resolution with the Oscilloscope (limited by serial comm. speed)

• real-time at ~10μs resolution with the Recorder (Recorder runs on the board with buffer)

• free tool on a wide array of Freescale silicon

Zoom feature shows highly granular details Displays up to 8 variables separately/combined

Page 33: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 32

FreeMASTER - Extensible Data Visualization

Create a comprehensive

support package for your

product

Product shots, collateral,

block diagrams, register

maps

Pre-built scopes

Build your own GUI

Sliders, gauges

Push buttons

Images, indicators

Sounds, videos

Page 34: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 33

Platform and Protocol Support

BDM is near-zero interference with real-time performance But does not support all capabilities (e.g. data recording)

Packet-driven BDM supports all FreeMASTER features E.g. TSA and recorder, but does require driver and cycles

No Driver Target Driver Required

Processor BDM Packet-Driven BDM Serial CAN USB MQX IO JTAG

S08

Freescale DSC

Kinetis

S12/S12X/S12Z

Qorriva

ColdFire V1

ColdFire V2

Page 35: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 34

MC Enablement: Complete Solution

MC ToolBox

Rapid prototyping with

Matlab Simulink

FreeMASTER

-Graphical user

interface

-Instrumentation

Autosar

OS

Customer Application Software

Math and Motor Control Libraries

- Math functions

- Optimized algorithms

LIN

2.1

Drive

rs

Freescale production

software

Freescale enablement

software

Third-party production

software

MC Dev Kit

Reference

Software

NV

M D

rivers

CA

N/L

IN S

tack

Device static

configuration

MCAT

Tuning

Tool

Compiler and debugger

Freescale silicon

Hardware (evaluation board, target application)

Page 36: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 35

MC Enablement: Complete Solution

MC ToolBox

Rapid prototyping with

Matlab Simulink

FreeMASTER

-Graphical user

interface

-Instrumentation

Autosar OS

Customer Application Software

Math and Motor Control Libraries

- Math functions

- Optimized algorithms

LIN

2.1

Drive

rs

Freescale production

software

Freescale enablement

software

Third-party production

software

NV

M D

rivers

CA

N/L

IN S

tack

Device static

configuration

MCAT

Tuning

Tool

Compiler and debugger

Freescale silicon

Hardware (evaluation board, target application)

MC Dev Kit

Reference

Software

Page 37: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 36

Concept of Electric Drive

MOTOR

Electric energy

Mechanical energy

Request

command MCU

Control

commands

Feedback signals

Power

Inverter

Pin = UI

Pout = T

Electric Drive

Page 38: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 37

Motor Control Structure

Page 39: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 38

Current/Torque Control Loop

Page 40: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 39

Speed Control Loop

Page 41: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 40

Control Loop Bandwidth & Attenuation

Page 42: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 41

Response Settling Time & Overshoot

Page 43: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 42

Control Loop Controllers

Page 44: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 43

Math Behind the Motor Control Tuning Motor Control Application Tuning (MCAT) Tool

Page 45: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 44

MCAT Introduction

FreeMASTER

MCAT tool

real-time debugging tool

FreeMASTER plug-in

• Basic/Expert tuning mode

MCAT features:

• Up to three motors independent tuning

• Real-time tuning supported by FreeMASTER

• Control scheme

layering

Page 46: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 45

MCAT Features

How does MCAT help?

• Suitable for users and operators of modern electric drives

Enables tuning of control parameters according to the target motor/application

• Suitable for beginners, less experienced users as well as experts

Offers Basic/Expert tuning modes

• Saves the development time

Dynamic tuning & updating of control parameters with no compilation needed

during tuning process

• Static configuration storing

Generation of a header file with parameters and constants of tuned system

• MCU-independent (Kinetis, MPC, DSC, S12 MagniV)

Fits various mainstream industrial and automotive applications

• Independent tuning of three motors supporting different types of motors

Supports: MCAT for PMSM ready / BLDC being prepared / ACIM will follow

Page 47: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 46

Freescale Software & Hardware Modular Concept

• Real-time tuning & updating of control parameters, thanks to FreeMASTER

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

• MCU-independent: suitable for Automotive and Industrial applications

MCAT features:

Page 48: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 47

Steps to Tune Control Loops

Page 49: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 48

Steps to Tune Control Loops

Page 50: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 49

Steps to Tune Control Loops

Page 51: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 50

Steps to Tune Control Loops

Page 52: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 51

Steps to Tune Control Loops

Page 53: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 52

MCAT Control Structure Selector

Open loop control

Voltage control – position required

No need for any current, position or speed feedback

No need for any current and speed feedback

Current control – current, position required No need for any speed feedback

Speed control - current, position and speed

required

Page 54: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 53

MCAT Summary

Freescale has come up with a solution for effective parameter

setting, controller constant calculation and tuning of motor

control applications

• MCAT key features:

− User-friendly and intuitive graphical plug-in tool for FreeMASTER

− Intended for tuning and debugging motor control applications

− Supports real-time tuning & updating of control parameters (no

compilation / re-flashing of the code needed during the tuning process)

− Is MCU-independent (Kinetis, MPC, DSC, S12 MagniV 16-/32-bit,

fix/float)

Page 55: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 54

MCAT Web Page

www.freescale.com/MCAT

Features :

• Promotional video

• Description

• Documentation

Page 56: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 55

MC Enablement: Complete Solution

MC ToolBox

Rapid prototyping with

Matlab Simulink

FreeMASTER

-Graphical user

interface

-Instrumentation

Autosar

OS

Customer Application Software

Math and Motor Control Libraries

- Math functions

- Optimized algorithms

LIN

2.1

Drive

rs

Freescale production

software

Freescale enablement

software

Third-party production

software

MC Dev Kit

Reference

Software

NV

M D

rivers

CA

N/L

IN S

tack

Device static

configuration

MCAT

Tuning

Tool

Compiler and debugger

Freescale silicon

Hardware (evaluation board, target application)

Page 57: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 56

MC Enablement: Complete Solution

MC ToolBox

Rapid prototyping with

Matlab Simulink

FreeMASTER

-Graphical user

interface

-Instrumentation

Autosar OS

Customer Application Software

Math and Motor Control Libraries

- Math functions

- Optimized algorithms

LIN

2.1

Drive

rs

Freescale production

software

Freescale enablement

software

Third-party production

software

NV

M D

rivers

CA

N/L

IN S

tack

Device static

configuration

MCAT

Tuning

Tool

Compiler and debugger

Freescale silicon

Hardware (evaluation board, target application)

MC Dev Kit

Reference

Software

Page 58: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 57

Model Based Design Support

with MC-Toolbox

• Model-based design is very common in motor control development

• Many companies model their controller algorithm and the target motor and use the simulation environment to accelerate algorithm development

• Reduced time-to-market and higher product quality with an executable that can be simulated and implemented directly from the model

• The Motor Control Development Toolbox includes Simulink™ plug-in libraries for an embedded Freescale target

• An integrated environment and tool chain supports configuring and generating the necessary software, including initialization routines, device drivers, and a real-time scheduler to execute algorithms specifically for controlling motors

• For the final stage of this type of integration of control algorithm software with target MCU hardware, the Motor Control Development Toolbox autogenerates 100% of the code from the model MCUs Supported

• MPC5643L/7xK

• MPC574xP

• S12ZVM

• KV10Z

Page 59: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 58

Controller Model

Electric

Motor

Output

Drivers* Input

Drivers*

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

ADC

A/D

Conversion

Simulink Library Blocks

•Peripherals:

PWM, Timer, ADC, CTU.. etc.

•Math & Motor Control Library

blocks

Clark, Park, PI, Mul, Atan, ..etc.

Step 1 : Simulation in PC environment

Step 2 : (SIL) Generated code executes as atomic unit on PC

Step 3 : (PIL) Executes generated code on the target MCU

Step 4 : Execute on Target MCU on ECM/EVB

Execute on Target MCU on ECM/EVB

Model-based Design Steps

Page 60: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 59

Motor Control Enablement

Summary

Page 61: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 60

Get To Production Faster

Field

Weakening

Advanced Math and Motor Control Library Set

Automotive Motor Control Development Kit Series

Automotive Math and Motor Control Library Set

Reference motor control platform

for rapid hardware and software

prototyping

Software libraries level

(with math & motor control algorithms)

Advanced motor control & sensor

topics

Advanced software libraries level

(with adv. math and motor control algorithms)

Zero RPM /

rotor alignment

Torque

ripple

elimination

Noise

reduction

Single-shunt

3−phs currents

reconstruction

PMSM

sensorless

control

Resolver

interface &

diagnostic

Self tuning

Technical Training for Motor Control and MCUs Training

(e.g. motor type X on device A)

Motor Control Focused Technical Support Standard level of technical support

Consulting & Technical Development in Area

of Motor Control According to Customer Specs / Needs Premium level of technical support

Pro

du

cts

Tools for Embedded Debugging & Motor Control Tuning Tools - FreeMASTER, MCAT, SFIO, …

Se

rvic

es

Page 62: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 61

Freescale 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/MCAT freescale.com/AutoMCLib

Freescale’s:

• Technical expertise &

application knowledge

• Technical support &

services

• Pool of patents

Motor Control know-how

Source: Melexis website

Page 63: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 62

For orders, contact your Freescale representative,

or use Buy Direct at freescale.com/AutoMCDevKits

Device Marketing PN Development Kit Type Available Direct Price

MPC5604P MTRCKTSPS5604P 3-phs PMSM w/ Encoder/Resolver Y $1,563

MPC5604P MTRCKTSBN5604P 3-phs BLDC Sensorless Y $912

MPC5606B MTRCKTSBN5606B 3-phs BLDC Sensorless Y $889

MPC5643L MTRCKTSPS5643L 3-phs PMSM w/ Encoder/Resolver Y $1,687

MPC5643L MTRCKTDPS5643L Dual 3-phs PMSM w/ Encoder/Resolver Y $2,980

MPC5643L MTRCKTSBN5643L 3-phs BLDC Sensorless Y $1,117

MPC5643L MTRCKTDBN5643L Dual 3-phs BLDC Sensorless Y $1,678

S12G128 MTRCKTSBNG128 3-phs BLDC Sensorless Y $649

S12ZVM128 MTRCKTSBNZVM128 3-phs BLDC Sensorless Y $789

S12ZVM128 MTRCKTSPNZVM128 3-phs PMSM Sensorless Q1/Q2 ’14 TBD

MPC5744P MTRCKTSPS5744P 3-phs PMSM w/ Encoder/Resolver Q2 ’14 TBD

MPC5744P MTRCKTDPS5744P Dual 3-phs PMSM w/ Encoder/Resolver Q2 ’14 TBD

MPC5744P MTRCKTSBN5744P 3-phs BLDC Sensorless Q2 ’14 TBD

MPC5744P MTRCKTDBN5744P Dual 3-phs BLDC Sensorless Q2 ’14 TBD

KEA128 TBD 3-phs PMSM Q3 ’14 TBD

KEA128 TBD 3-phs BLDC Sensorless Q3 ’14 TBD

Product Pricing & Availability: Complete DevKits

Page 64: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 63

For orders, contact your Freescale representative,

or use Buy Direct at freescale.com/AutoMCDevKits

Device Marketing PN

Standalone Controller Board Available Direct Price

MPC5604P MTRCCBB5604P Standalone MC Controller Board for BLDC Y $265

MPC5604P MTRCCBP5604P Standalone MC Controller Board for PMSM Y $265

MPC5643L MTRCCBB5643L Standalone MC Controller Board for BLDC Y $389

MPC5643L MTRCCBP5643L Standalone MC Controller Board for PMSM Y $389

MPC5744P MTRCCBB5744P Standalone MC Controller Board for BLDC Q2’14 TBD

MPC5744P MTRCCBP5744P Standalone MC Controller Board for PMSM Q2’14 TBD

Product Pricing & Availability: Controller Boards

Page 65: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 64

Freescale Motor Control Enablement: Web Page Summary

Motor Control Development Kits

Math & Motor Control Library Set

Motor Control Application Tuning Tool (MCAT)

FreeMASTER

www.freescale.com/MCAT

www.freescale.com/FreeMASTER

www.freescale.com/AutoMCLib

www.freescale.com/AutoMCDevKits

See short promotional video on Freescale’s YouTube channel

See short promotional video on Freescale’s YouTube channel

Page 66: Freescale Automotive Motor Control Enablement Solutionscache.freescale.com/files/training/doc/ftf/2014/FTF-AUT-F0233.pdf · Freescale Automotive Motor Control Enablement Solutions

TM

External Use 65

Q&A

Empower Your Motor Control Projects with

Freescale