You are on page 1of 57

Sensorless Vector Control and

Implementation: Why and How

Renesas Electronics America Inc.


2012 Renesas Electronics America Inc. All rights reserved.

Renesas Technology & Solution Portfolio

2012 Renesas Electronics America Inc. All rights reserved.

Microcontroller and Microprocessor Line-up


2010

2013

1200 DMIPS, Superscalar

32-bit

Automotive & Industrial, 65nm


600A/MHz, 1.5A standby

1200 DMIPS, Performance


Automotive, 40nm
500A/MHz, 35A deep standby

500 DMIPS, Low Power


Automotive & Industrial, 90nm
600A/MHz, 1.5A standby

165 DMIPS, FPU, DSC


Industrial, 40nm
242A/MHz, 0.2A standby

165 DMIPS, FPU, DSC


Industrial, 90nm
242A/MHz, 0.2A standby

8/16-bit

25 DMIPS, Low Power

Industrial, 90nm
1mA/MHz, 100A standby

Industrial & Automotive, 150nm


190A/MHz, 0.3A standby

44 DMIPS, True Low Power

10 DMIPS, Capacitive Touch

Industrial & Automotive, 130nm


144A/MHz, 0.2A standby

Industrial
Automotive, 130nm
Wide
Format&LCDs
350A/MHz, 1A standby

Embedded Security, ASSP

2012 Renesas Electronics America Inc. All rights reserved.

Enabling The Smart Society


Challenge: Sensorless vector control increases the energy
efficiency of motor control systems that drive the smart
society. However, understanding and implementing
sensorless vector control is a herculean task.

MCU

Solution:
This class will help you understand key challenges associated with
sensorless vector control and how to implement it using Renesas
microcontrollers
4

2012 Renesas Electronics America Inc. All rights reserved.

Agenda
Need for vector control
Theory behind vector control
Challenges in implementing sensorless vector control
RX62T MCU family for sensorless vector control
Renesas motor control solutions

2012 Renesas Electronics America Inc. All rights reserved.

Macro Factors Driving Need for Energy Efficiency

Global
Environmental
Concerns

Energy Efficiency
Policies

New Initiatives

2012 Renesas Electronics America Inc. All rights reserved.

Realizing Energy Efficiency in Motor Control


Industrial 44%

Residential 26%

Others 30%

Motors
(45%)

Electronic Control

Energy Efficient
Motors

Variable speed drives

Motor Design

Vector control

Motor Type

Direct torque control


Power factor correction

15%

20%

Up to ~30% savings
7

2012 Renesas Electronics America Inc. All rights reserved.

Sensorless Vector Control Theory

2012 Renesas Electronics America Inc. All rights reserved.

Permanent Magnet AC Motor


Complex Control
Sinusoidal stator current produces rotating field
Rotor mounted magnetic field is rotating

= k .s r

Maintain stator field orthogonal to rotor field

A
X

X
C
A

2012 Renesas Electronics America Inc. All rights reserved.

Vector Control Challenge


Maintain orthogonality
Error correction feedback loop
In-phase current = 0
Orthogonal current set per torque requirements

What parameters to adjust


Voltage magnitude (PWM duty cycle)

Need to transform current vectors to rotor frame


Stator Field

900

Rotor Field

10

2012 Renesas Electronics America Inc. All rights reserved.

Reference Frame Transformation


Vector control advantages
Maximizing torque (efficiency)
Independent control of flux and torque
Snappy torque control for load variation

2-phase Rotor Frame

Three-phase Stator

iu

iq
0

120

11

iv

2012 Renesas Electronics America Inc. All rights reserved.

Mapping

id

Current Transformation to 2-ph Rotor Frame


Step 1 : 3-ph to 2-ph conversion
Step 2 : 2-ph stationary frame to 2-ph rotor frame (rotating)
Rotor position () needed

stationary frame

uvw
stationary frame

iu

dq
rotatory frame

Id

iv

iw

12

Iq

i
d-axis

Clarke Transformation

i
2
i =
3
0
2

qaxis

1 i
a

2 i

3 b

i
2 c

2012 Renesas Electronics America Inc. All rights reserved.

Park Transformation

I d cos sin i
I =
i

sin
cos

q

Sensorless Vector Control


Lower cost but more complex implementation

Current and motor parameters to estimate rotor position


Increased reliability
Reduced cost of sensor ($3-$20)
Less physical space needed

Need to estimate without sensors


Motor

PI
Controller

i*

i
PI
Controller

PWM
Generation

Speed
Calculation

13

2012 Renesas Electronics America Inc. All rights reserved.

Position
Estimation

i
Speed
/position
sensor

Motor Model in Frame


Voltage Equation

Flux Linkage

d
v = Rs i +
dt
d
v = Rs i +
dt

= m cos r + Li
= m sin r + Li

=0

m cos r = Li
m

r
14

m sin r = Li=0

is the rotor flux linked Potential Inaccuracy: If full load or large motor
is the rotor position

2012 Renesas Electronics America Inc. All rights reserved.

Rotor Position and Speed Estimation

m cos r =

m sin r =

r = arctan( )

d
=
dt
Bottleneck: arctan implementation takes several CPU cycles

15

2012 Renesas Electronics America Inc. All rights reserved.

Renesas Flux Observer Model

v , = Rs i , +

d ,
dt

= 0 + (v Rs i )dt
0

Potential inaccuracy: Noise in measuring current and voltage


Potential inaccuracy: Effect of temperature on resistance

16

2012 Renesas Electronics America Inc. All rights reserved.

Flux Observer Implementation


Cascaded low pass filters rather than direct integration
First low pass filter
Derivative
Second low pass filter

Negate the effect of DC offset in measured current/voltage

e ,

yn

yn =

17

Derivative

Low pass filter

1023
yn 1 + e ,
1024

2012 Renesas Electronics America Inc. All rights reserved.

d
dt

d n = yn yn 1

Low pass filter


dn

, ( n )

, ( n )
1023
=
, ( n 1) + d n
1024

Sensorless Vector Control Loop

Park-1

*r
r

Speed
Regulator

Iq*

iq
Regulator
id
Regulator

id*=0
id

dq
To

DC
BUS

Clarke-1

Sine
PWM

to
abc

Flux and Position


Observer

iq

to
dq

abc
to

i
i

Park

Speed
Estimation

18

2012 Renesas Electronics America Inc. All rights reserved.

Clarke

ia
ib

3-ph
Inverter

Implementation Challenges

19

2012 Renesas Electronics America Inc. All rights reserved.

Implementation Challenges
Requirements
1. Computation intensive routines

2. Multiple current/voltage measurement

20

MCU Considerations
High performance CPU, FPU

12Bit Simultaneous Sampling ADC

3. Robust performance

Noise immunity, PWM shut off

4. Cost effective design

On-chip analog, data flash, dual motor

2012 Renesas Electronics America Inc. All rights reserved.

1. Computation Intensive
Clarke/Park Transformations
Flux Estimation
Rotor position and speed

High-performance RX600 Core


100MHz CPU
1-cycle flash access
32x32 H/W multiplier
32/32 H/W divider
32bit Barrel Shifter
Floating point unit

21

2012 Renesas Electronics America Inc. All rights reserved.

Floating Point Unit Advantages


Performance
Wide range and high resolution
No scaling, overflow or saturation
Reduced code size

Ease of Use
Ease of coding, reading, debugging
Compatible with the C/Matlab simulation code

22

2012 Renesas Electronics America Inc. All rights reserved.

Floating Point : Range and Resolution


Single Precision
Floating Point

Fixed Point Q11.21

..0..

..0..

Resolution 10-39

Resolution 2-21
10-7
-210
-103

Range

+210
+103

-1038

23

2012 Renesas Electronics America Inc. All rights reserved.

or

Range

+1038

Fixed-point Calculations Requires Scaling

X(n)

X(n-1)
(32b,Q14.18)

A1

(16b, Q12.4)

E(n)
(16b, Q8.8)

MULT
(32b,Q20.12)
SHIFT
(32b,Q14.18)

(32b,Q14.18)

24

2012 Renesas Electronics America Inc. All rights reserved.

No Scaling Needed

Fixed-Point Implementation

SHIFT

25

2012 Renesas Electronics America Inc. All rights reserved.

FPU Implementation

No Saturation Check
Fixed-Point Implementation

Check for
Saturation

26

2012 Renesas Electronics America Inc. All rights reserved.

Reduced Code Size


FPU instructions make code and the execution time smaller
Fixed-Point Implementation

27

2012 Renesas Electronics America Inc. All rights reserved.

FPU Implementation

Readability
Fixed-Point Implementation
Parameters

Park Transformation Code

28

2012 Renesas Electronics America Inc. All rights reserved.

FPU Implementation
Parameters

Park Transformation Code

FPU Brings Ease of Simulation


Inherently
floating point

Simulation
Platform
Time-consuming
Unidirectional

Fixed Point
Algorithm

Fixed Point
CPU

29

2012 Renesas Electronics America Inc. All rights reserved.

Portable to FPU
Bidirectional

Floating Point
Algorithm

Floating
Point CPU

FPU Implementations
Traditional FPU

Renesas RX FPU

General
Registers

General Registers

No Load/Store
Instructions
Load/Store
Dedicated
Data
Registers
FloatingPoint Unit

30

2012 Renesas Electronics America Inc. All rights reserved.

FloatingPoint Unit

2. Accurate Analog Signal Measurement


Estimates based on current and voltage
Integration for flux estimation
Multiple simultaneous measurements

Simultaneous sampling ADC

4 ADC Samples

Oversampling current waveform


Filtering to mitigate noise
Dual registers for 1-shunt

U
V
W
5us
50us

31

2012 Renesas Electronics America Inc. All rights reserved.

Current Measurement Techniques


1-shunt

3-shunt

1-Shunt Advantages
Cost reduction (Res, PGA)
No need for 3-ph calibration
Reliability

1-shunt Challenges
ADC samples twice quickly

U
V
W
IW,V,U

Reconstruction of current

IW
32

2012 Renesas Electronics America Inc. All rights reserved.

IW+IV

Support for 3-shunt and 1-shunt Detection


12-bit ADCs with 1us conversion time
Double register for 2 samples
3S/H for one-shot sampling of three phase currents
Self-diagnostic capability for UL/IEC safety requirements

ADC Set 1

Double register for 1-shunt

3 S/H for 3 shunt current detection


PGA

S/H

AN1

PGA

S/H

AN2

PGA

S/H

AN03/CVref L

Multiplexer

AN0

ch0
Register 1
Register 2
Register CH1
S/H

A/D
Register CH2

External Reference
Register CH3

CPU Interrupt
Window Comparators

33

2012 Renesas Electronics America Inc. All rights reserved.

PWM Shut off (POE)

3. Robust Performance
Susceptibility to noise
Hardware shut off

Noise immune MCU design


Careful power/ground layout
Pin noise filtering
5V option

On-chip hardware
POE circuit
Fast window comparators

34

2012 Renesas Electronics America Inc. All rights reserved.

4. Cost Effectiveness
On-chip integration
Scalability

Complete solution for driving two 3-ph


motors
6 programmable gain amplifiers

Scalability

6 window comparators
2 x 3ph cPWM timers
2 x quadrature encoder inputs

63TH

32-512KB

Data flash

Scalability
RX6xT package, ROM
RX200 - performance
35

2012 Renesas Electronics America Inc. All rights reserved.

62T
63TL
48-144 pins

Implementing Sensorless Vector Control Using


RX62T

36

2012 Renesas Electronics America Inc. All rights reserved.

RX62T Motor Timer Set (MTU3)


100MHz, 16bit Timers
Protection Features
PWM shut down (Ext, Comparator,
Clock)
Mode registers inaccessible during
operation

ch0
ch1
ch2
ch3

Quadrature Encoder1
A,B,Z
Quadrature Encoder2
A,B,Z

3-phase cPWM O/P


U,V,W

ch4
ch5
ch6
ch7

MTU3
37

2012 Renesas Electronics America Inc. All rights reserved.

3 Input Captures

3-phase cPWM O/P


U,V,W

Hardware Implementation

RX62T

MTU CH3/4
6

PWM Generation
PWM Shut Off

RX600
CORE

Gate Driver
3-phase
inverter

Comparator

x3

3-phase BLDC
Motor
12-bit ADC

S/H

Analog Unit 0

38

2012 Renesas Electronics America Inc. All rights reserved.

PGA

Motor
Current

Software Implementation
Initialization
PWM
Interrupt
VBUS/Current
Measurement

(u,v,w) ->
(,) ->(d,q)

Current
Reconstruction

Last

Actual
Current
Reference
Current

Last &
Reference

Speed PI

Current PI

Voltage (d,q)

New Speed
Estimation

New
Estimation

V(u,v,w) ->
PWM Duty

(d,q) -> (,)


(u,v,w) <Last

39

2012 Renesas Electronics America Inc. All rights reserved.

Fixed point vs. FPU Comparison

Algorithm: Sensor less Vector Control with 1-Shunt Current Detection


PWM Carrier Frequency: 20kHz
Current Loop: 10kHz

RX62T
Starter Kit

40

2012 Renesas Electronics America Inc. All rights reserved.

Renesas
Inverter Board

CPU Bandwidth Usage

Look-up Table

Floating Point
Fixed point
Sine,Cosine,Atan Functions

0%

41

2012 Renesas Electronics America Inc. All rights reserved.

5% 10% 15% 20% 25% 30% 35% 40%

CPU BW

CPU Bandwidth Usage


Floating-point code 40% faster

Overall
Current Measurement
Position Estimation

Floating Point
Fixed point

Clarke and Park


PI Loop

42

2012 Renesas Electronics America Inc. All rights reserved.

10

20

30

40 us

Code Size
Floating-point code size is 45% lower

Current Measurement
Position Estimation
Floating Point
Clarke and Park

Fixed point

PI Loop
B
0

43

2012 Renesas Electronics America Inc. All rights reserved.

50

100 150 200 250

Driving Two 3-Phase BLDC Motors


Sensorless Vector Control

www.renesas.com/rxmotorkit

Floating point math


CPU BW used <50%

Motor #2

External Inverter
44

2012 Renesas Electronics America Inc. All rights reserved.

Motor #1

RX600 Motor Kit

Implementation for Two Motor Control


Software Implementation
Control loop executed at Timer underflow interrupt
Both interrupts at same priority level

Alternate Implementations
Control loops at different rates
Interrupt at overflow/underflow

MTU.CH3/4
10KHz

MTU.CH3/4
10KHz
MTU.CH6/7
20KHz

MTU.CH6/7
10KHz

CPU Available
Control
Loop 1
45

Control
Loop 2

2012 Renesas Electronics America Inc. All rights reserved.

Control
Loop 1

Control
Loop 2

Software Implementation
Initialization
PWM
Interrupt
VBUS/Current
Measurement

(u,v,w) ->
(,) ->(d,q)

Current
Reconstruction

PWM
Interrupt2

Last

Actual
Current
Reference
Current

Last &
Reference

Speed PI

Current PI

Voltage (d,q)

New Speed
Estimation

New
Estimation

V(u,v,w) ->
PWM Duty

(d,q) -> (,)


(u,v,w) <Last

46

2012 Renesas Electronics America Inc. All rights reserved.

Performance Comparison with a High-end DSP


RX62T offers tremendous value
Comparable performance
Significantly lower cost

System Cost

Code size

+50%

7.8KB

High-end DSP

7.4KB

RX62T

Loop execution

47

2012 Renesas Electronics America Inc. All rights reserved.

16us
18us

Response to Step Change in Load


1050

1040

1030

1020

High-end DSP

Speed (rpm)

1010

RX62T

1000

990

980

970

960

950
0.265

6.343

time
48

2012 Renesas Electronics America Inc. All rights reserved.

22.906

Renesas Motor Control Solutions

49

2012 Renesas Electronics America Inc. All rights reserved.

Motor Control MCUs


RX63TH

Performance

100MHz, 165DMIPs
256KB 512KB

RX62T

100MHz, 165DMIPs
64KB 256KB

RX Core
RX600 Family
-Dual motor vector control
-Floating point
-RX600 Motor Kit

RX63TL

100MHz, 165DMIPs
32KB 64KB

RX220

32MHz,50DMIPs
32KB-256KB

RL78/G14

RX200 Family
-Single motor vector control
-Entry level RX core

RL78/G14
-Scalar control (low-end
vector control)
-RL78 Motor Kit

32MHz, 44DMIPs
32KB 256KB

R8C/3xM
20MHz

8KB 128KB
50

2012 Renesas Electronics America Inc. All rights reserved.

Oct.2012

Timeline

Evaluation Kits for Vector Control


Extensive Code Support
Flexibility to Evaluate and Develop
GUI
External Inverter Connector

RX600 Motor Kit

51

2012 Renesas Electronics America Inc. All rights reserved.

RL78 Motor Kit

High Voltage Demo Platform (2KW)

Line AC
85-265V

AC to DC
rectifier

IGBTs
RJH60D5DPQ-A0

Interleaved PFC

PWM

Set RPM
RPM
Is
Iq
Vdc

Gate
Driver

LCD

CPU Board

Potentiometer and
Push Buttons

In-circuit Scope
52

2012 Renesas Electronics America Inc. All rights reserved.

Current Sense
Hall and Encoder

2KW Inverter Platform

53

2012 Renesas Electronics America Inc. All rights reserved.

Summary
Sensorless vector control improves the motor system
efficiency
Implementing sensorless vector control requires careful
selection of MCU
Renesas provides several motor control MCUs depending on
the application requirements
RX600 and RL78 motor control kits are available for an easy
evaluation of Renesas solutions
High voltage platforms are also available

54

2012 Renesas Electronics America Inc. All rights reserved.

Questions?

55

2012 Renesas Electronics America Inc. All rights reserved.

Enabling The Smart Society


Challenge: Sensorless vector control increases the energy
efficiency of motor control systems that drive the smart
society. However, understanding and implementing
sensorless vector control is a herculean task

MCU

We discussed key challenges associated with sensorless


vector control and how to implement it using Renesas
microcontrollers
Do you agree that we accomplished the above statement?
56

2012 Renesas Electronics America Inc. All rights reserved.

Renesas Electronics America Inc.


2012 Renesas Electronics America Inc. All rights reserved.

You might also like