19
EXTERNAL USE MATEJ PACHA SYSTEMS & APPLICATIONS ENGINEER NXP SEMICONUCTOR, ROZNOV POD RADHOSTEM NXP MBD TOOLBOX MODEL BASED DESIGN OF SENSORLESS CONTROL OF PMSM DRIVES

Model Based Design of Sensorless control of PMSM Drives

  • Upload
    others

  • View
    25

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE

MATEJ PACHA

SYSTEMS & APPLICATIONS ENGINEER

NXP SEMICONUCTOR, ROZNOV POD RADHOSTEM

NXP MBD TOOLBOX

MODEL BASED DESIGN OF

SENSORLESS CONTROL OF

PMSM DRIVES

Page 2: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE2

Electric Motors in Automotive

Circular pump for heating

and cooling water circuit

Engine cooling fan

Starter

Alternator, generator

Steering wheel adjustment

Scavenging pump,

high-pressure pump

Headlight range adjustment unit

Heating fan

Cooling fan for air conditioning system

Circular pump for stationary heating systemMotor for stationary heating system

Heating and air conditioning system

ABS pump

Window winder

Arial drive

Idle position adjustment system

Tailgate closing

Rear windscreen wiper

Fuel pump

Ergonomic backrest, headrest adjustment

Headlight cleaning

Headlight tilting

Wipers

Mirror adjustment

Central locking system

Door closing

Belt system

Seat control

Headrest adjustment

Backrest adjustment

Rear seat adjustment

Convertible/Sliding roofs

Active suspension

EPS drive

Turbocharger

Water pump

Oil pump

Performance related motors Comfort related motors

High Efficiency High Performance/Safety

Page 3: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE3

Challenges in Automotive

Motor ControlReliability & Safety

• Failures

• Errors

• Parameter changes

• Aging

• Errors

Efficiency

• High efficiency

• High performance

Low cost

• Technology

• Materials

• Parameters variation

• Sensor elimination

• Space limits

Environment

• High temperature

• High vibrations

Page 4: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE4

High Performance Motor Control

• Permanent magnet synchronous motor

• Field-oriented control (vector control)

• Sensorless algorithm

• Field-weakening

• Wind-milling

• MTPA

• MTPV

Page 5: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE5

From Principles to Product

• Know the principles

• Control algorithm design

• Modelling & Simulation

• HW settings & handling

• Prototyping

• Productization

Page 6: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE6

Field oriented control of PMSM

A

B

C

120

120

s

A

B- C

iA

iB

iC

R

• 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

sin SRSRe ccT

90)max( eT

Page 7: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE7

PMSM FOC Control Flow

Phase A

Phase B

Phase C

Phase A

Phase B

Phase C

d

q

d

q

3-Phaseto

2-Phase

Stationaryto

RotatingSVM

3-PhaseSystem

3-PhaseSystem

2-PhaseSystem

AC

Rotatingto

Stationary

ACDC

Co

ntr

ol

Pro

ce

ss

Stationary Reference Frame Stationary Reference FrameRotating Reference Frame

From measurement ?

Page 8: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE8

PMSM FOC Control Scheme

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

u

id*

iq*

Controller

Controller

id

iq

-

-

ePMeLdid

eLqiq

M

Motorola

Dave’sControlCenter

3ph PMSM

ud

uq

e qe

id

iq

Two axis components of

required current vector

R-L circuit cross-coupling backEMF

Independent control of DQ currents

Page 9: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE9

Basic Control Structure

S32K144

FreeMaster

-

Forward ClarkTransformation

a,b,c >alpha,beta

Current Sensing

Processing

-

Forward ParkTransformationalpha,beta>d,q

SpeedController

Current qPI

Controller

and PWM

Modulation

Inverse Clark

-

Inverse Park

Transformation

d,q >alpha,beta

Current dPI

Controller

-DC bus

ripple

compensation

Is_

a_

co

mp

Us_alpha

Us_beta

Is_

b_

co

mp

Is_

c_

co

mp

Is_beta

Is_alpha

Is_q

Is_d

Us_q

Us_d

Is_q_Req

Us_alpha_comp

Us_beta_comp

Speed_R

eq

Is_a

Is_b

Is_c

U_

dcb

Duty cycleaDuty cyclebDuty cyclec

BEMF

Observer

theta_actual_elsin cos

Application ControlSector

START/STOP

12 V

dc

3-Phase Low Voltage Power Stage

PWM

Isa

Isc

U_Dc bus

Isb

U_D

c b

us

6PMSM6PMSM

Load

Field Weakening Controller

LPUART

Driver Driver

GPIOADCFTM (PWM)GPIO

Driver Driver Driver Driver

Om

ega_atu

al_

mech

Fault

Protection

Faults

Angle Tracking

Observer

TRGMUX

Driver

PDB

Driver

FTM (QUAD)

GFLIB

GDFLIBGMCLIB

ACLIB

AMCLIBMLIB

Automotive Math and

Motor Control Library

Set for S32K144

Is_

alp

ha

Is_

be

ta

Page 10: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE10

Application Control

Page 11: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE11

HW Configuration

• MCU

− Clock settings

− Debugger

• Peripherals

− GPIO

− FlexTimer

− ADC, PDB

− SCI

• SW Drivers

− FreeMASTER

Page 12: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE12

Motor Control Algorithm

Page 13: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE13

Application Control and Realtime Debug

MDB

Toolbox

Page 14: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE14

NXP Motor Control Ecosystem Overview

DevKits AMMCLib

• Motor control dedicated

• Supports BLDC and PMSM

• Encoder / Hall / Resolver

• Sensorless control

• Single / Dual shunt

• 3ph motor included

• Debugger

• USB-UART interface

• CAN / LIN interface

• Buttons / LEDs

• Programmed with software

examples, more available online

www.nxp.com/automcdevkits

• Basic math functions

• General trigonometric and

basic functions

• General motor control

functions

• General digital filters

function

• Advanced motor control

functions

• SPICE L3,

ISO9001/TS16949

• ISO/IEC 9899:1999

• Highly optimized

• Binary evaluation version

• Source code in license

version

• MATLAB/Simulink models

• Various compilers

supported

• http://www.nxp.com/community

Software

• CodeWarrior

• S32 Design Studio

• FreeMASTER

MCAT

• Real-time tuning and

updating of control

parameters

• Loop-by-loop tuning

• Generic output file with

static configuration

• Only as a plug-in tool for

FreeMASTER

• Basic and Expert mode

• Pole placement method for

control parameters

estimation

• Up to three motor

application support

MDB Toolbox

• Generate code for

standalone application

with direct download to

target support

• Optimized AMMCLib

blocks

• I/O blocks including CAN,

SPI, PIT timer, Sine Wave

Generation, eTimer, PWM

and A/D.

• On-target profiling of

functions and tasks

• Data acquisition and

calibration using

FreeMASTER tool

• Boot loader utility

• Seamless integration with

embedded coder including

SIL and PIL test

Page 15: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE15

NXP AMP Model-Based Design Toolboxes Summary

NXP’s Model-Based Design Tools were vetted by Mathworks as the most complete solution in this

market segment and they are promoted on the 1st position for Motor Control 3rd party solutions.

Microcontroller Support Packages:

• S32K1XX: available also via Add-on

Explorer in MATLAB directly

• MPC574xP (Panther)

• MPC, Kinetis, and S12Z devices

RADAR Support Package:

• Model-Based Design Toolbox for

SPT 2.0/2.5 v1.0.0 MATLAB co-

simulation with NXP signal

processing tools

24/7 Online Community Support:

• Rich volume of courses, ready to

use examples and tutorials

FREE OF CHARGE TOOLS & SUPPORT

Page 16: Model Based Design of Sensorless control of PMSM Drives
Page 17: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE17

Model-Based Design Approach

AMP Model-Based Design ToolsCreate & Run on the target or in simulation, complex apps in MATLAB/Simulink, with

ready to use building blocks that hide most of the AMP’s platforms HW & SW gory

details… (unless of course one wants to really dig into them)

Basic & Advanced IP Blocks Ideas & Designs Prototyping

Page 18: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE18

NXP’s AMP Model-Based Design Toolboxes

Covers most of the IP (e.g. S32K1xx, MPC574xP, S12ZVM )

Support for all compiler toolchains supported by AMP SDK

Generates C-code based on AMP’s SDK and AMMCLIB

Build&Run on NXP’s targets directly from MATLAB/Simulink

at the press of a button

Generated code can be debugged/modified/built with

S32 Design Studio like any other project

For every NXP’s IP it provides a Basic functionality (with a

suite of predefined configuration) for ease of use

Supports Advanced mode which exposes most of the SDK

API in easy to configure blocks

Easy to install – comes integrated now also as an Add-On in

MATLAB directly

AMP Model-Based Design Tools are a complete development environment

Page 19: Model Based Design of Sensorless control of PMSM Drives

EXTERNAL USE19

Model Based Design Toolbox for Motor Control

• MATLAB™/Simulink™ model-based design

environment for configuring and generating SW to

execute motor control algorithms on NXP MCUs

• Software-in-the-loop (SIL) and processor-in-the-loop

(PIL) support

• Auto code generation based on the Matlab

Embedded Coder

• Bootloader support built in the tool

• Includes Automotive Math and Motor Control Library

• Integration with FreeMASTER for fine tuning

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

Model-based design & auto code generation

Reduce development & prototyping time

Faster Time to Market

Support migration between platforms

www.nxp.com/MCToolbox