Вы находитесь на странице: 1из 38

External Use

TM
An Overview of the Resolver
Interface for Motor Control
Applications
FTF-AUT-F0234
A P R . 2 0 1 4
Leos CHALUPA | Automotive MCU Product Group
TM
External Use 1
Session Introduction
This session will explain cost-effective solutions to interface the
resolver position sensor directly to Freescale's automotive MCU.
We will discuss basic operation, benefits of saving an external IC,
run time diagnostics and flexible selection of the limp mode.

TM
External Use 2
Session Objectives
By the end of this session you will:
Be more familiar with resolver-based position sensing
Understand the run-time diagnostic principles
Describe how to use Freescale microcontrollers to save an external
IC for Resolver interfacing
Name the advantages of the presented solution
Know where to look for support, documentation and examples

TM
External Use 3
Agenda
Resolver basics
Brief history
Resolver types, constructions and operation principles

Angle position sensing
Principle of resolver position extraction
Sources of position sensing errors

Direct MCU-resolver interface

Freescale support, examples, documentation and
more

TM
External Use 4
Resolver Basics
TM
External Use 5
Brief Resolver History
Developed in 1940s at MIT (Supported by the U.S. military)
Resolvers have been part of electromechanical servo and shaft angle
positioning systems for over 50 years
Resolver position sensor constructions evolved over time
1970s: Brushless resolver
1980s: Hollow shaft brushless resolver
1990s: Variable reluctance resolver
Resolver position conversion methods evolved from phase analog techniques
to tracking observer-based digital techniques with run-time diagnostic
Since 2000, the Freescale Motor Control team has investigated different
approaches of the resolver-to-digital conversion using available MCUs/DSCs.

The first application was the SMT pick and place machine where fast
dynamics and high precision is a key for overall cost effectiveness.

Until today, the method was continuously improved and ported to practically
all el. motor control MCUs, including special CPU autonomous version based
on the eTPU to target ramping EV and HEV markets
TM
External Use 6
Resolvers: Electro-magnetic Induction Angle Sensors
Rotor is put directly on the drives shaft
Stator is fixed on drives shield
Simple assembly and maintenance
No bearings unlimited durability
Resist well against distortion, vibration, deviation of operating
temperature and dust
Worldwide consumption is millions of pieces at present time
Widely used in precise positioning applications
The number of generated sine and cosine cycles per one
mechanical revolution depends on the number of resolver pole-
pairs (usually 1-3 cycles)
Basic parameters:
Electrical Error +/-10, Transformation Ratio 0.5,
Phase Shift +/-10
Input Voltage 4-30V, Input Current 20-100 mA,
Input Frequency 400 Hz 40 kHz

Uref
Usin
Rotor shaft
u
Ucos
e
Uref
Usin
Rotor shaft
u
Ucos
e
TM
External Use 7
Resolver Types
[]
stator
rotor
sin
cos
HF
excitation
Secondary Side
Primary side
[]
stator
sin
cos
HF
excitation
Secondary side
Primary side
rotor
[]
sin
cos
HF
excitation
Secondary side
Primary side
Rotary coupling
transformers
Traditional Brushless
With variable air-gap
Brushless Variable Reluctance
With solid rotor
Rotating magnetic coupling transfers HF
energy from the stator (primary) to the rotor
(secondary), connected directly to the resolver
primary. This generates an AC magnetic field
with a sinusoidal distribution, hence causing HF
voltages in the stator windings (secondary side)
with amplitudes dependent (sine/cosine) on the
rotational angle of the rotor.

The VR solid rotor resolver has primary
and secondary windings in the stator,
therefore it does not need a rotating
magnetic coupling. The rotor contains a
diagonal section of highly permeable
material that varies the magnetic field
across the stator as the rotor turns.
Thus, the induced voltage amplitudes
correspond to the sine and cosine of
the rotor angle.

The VR variable air-gap resolver has
primary and secondary windings in the
stator, therefore it does not need a
rotating magnetic coupling. The contour
of rotor is made as the permeance
of air-gap between the stator and rotor
is varied in sinusoid oscillation. Thus,
the induced voltage amplitudes
correspond to the sine and cosine of
the rotor angle.

TM
External Use 8
Traditional Brushless Resolver
Source: Artus, www.psartus.com
Source: Tamagawa Seiki co., www.tamagawa-seiki.com
TM
External Use 9
Brushless VR Resolver
Source: Tamagawa Seiki co., www.tamagawa-seiki.com Source: Admotec Inc., machinedesign.com
TM
External Use 10
Basic Resolver Terms
Excitation The winding powered by high frequency (e.g. 10 kHz) sine
wave
Number of multiples/poles The multiplied speed ratio of the output
angle signal is indicated. The number of poles is twice that of shaft angle
multiplication
Transformation ratio Ratio of output voltage amplitude to the excitation
voltage amplitude
Phase shift Phase difference between the excitation voltage and output
voltage
Electrical error The difference between electrical angle (presented by
the ratio of resolver outputs) and theoretical angle value
Input impedance The impedance of the excitation side
Output impedance The impedance of the output windings

TM
External Use 11
Resolver Angle Position Sensing
TM
External Use 12
Resolver Based Angular Sensing Methods
Phase Analog Technique
The two stator windings are excited by signals that are in phase quadrature to each
other. This induces a voltage in the rotor winding with an amplitude and frequency that
are fixed and a time-phase that varies with shaft angle. This has been the most widely
used technique because it can easily be converted to produce a digital signal by
measuring the change in phase shift with respect to the reference signal.
Angle Tracking Resolver to Digital Conversion (RDC)
A tracking converter contains a phase demodulator. Therefore, frequency variation and
incoherent noise do not affect accuracy. Tracking converters can operate with any
reference excitation, sine or square wave, with only minor accuracy variations.
This technique is implemented by most of the RDC ICs.
More will be discussed further in this presentation.

RDC IC Ext. circuitry
Analogue demodulation,
PLL
RC
Network
Amplifier
Resolver
excitation
Angle
Sensor
sin
cos
VCO Counter
Sine
Cosine
Run Time Diagnostic
TM
External Use 13
Angle Tracking Observer Principle
Pos. Error
Comparator
Regulator
Angle Tracking
e
u
e
e(u)
Envelope
Extractor
LP
Filter
e
est
u
est
Sine
Cosine
Generator
TM
External Use 14
+ +
K
1
1
s
1
s
K
2
- +
sin ( ) O
cos( ) O
sin( ) O
cos( ) O
(s) O + +
K
1
1
s
1
s
1
s
K
2
1
s
1
s
K
2
- +
sin ( ) O
cos( ) O
sin( ) O
cos( ) O
(s) O
e(O -O)
Angle Tracking Observer Basics
Features:
Non-sensitivity to disturbance and harmonic distortion of the carrier
Non-sensitivity to voltage and frequency changes
High accuracy of the angle extraction

( )
1 2 1
2
2 1
K s K K s
s K 1 K
(s)
(s)

F(s)
+ +
+
= =
Implementation Basics:
Transfer function:
Angular error evaluation:
( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) s ~ =
= =
7

- for

- sin

- e

- sin

sin cos

cos sin

- e
TM
External Use 15
400
600
800
1000
1200
1400
0.5
1
1.5
2
0
5
10
15
20
25
30
35
Damping factor [-]
Natural frequency [rad/s]
P
e
a
k

o
v
e
r
s
h
o
o
t

[
%
]
400
600
800
1000
1200
1400
0.5
1
1.5
2
0
0.005
0.010
0.015
0.020
0.025
0.030
0.035
0.040
0.045
0.050
Damping factor [-]
Natural frequency [rad/s]
S
e
t
t
l
i
n
g

t
i
m
e

[
s
]
Transfer function of the General
Second Order System:
BASICS OF ANGLE EXTRACTION 5/6
TUNNING THE ANGLE TRACKING OBSERVER
Transient responses:
O
v
e
r
s
h
o
o
t

2
%

Settling time
Tuning the Angle Tracking Observer
TM
External Use 16
Direct MCU R-D Conversion
There are two basic approaches to performing resolver-to-digital
conversion using on-chip resources
Case 1) Based on the synchronous rectification of the high
frequency carrier of the feedback signals:
This requires synchronized triggering of the ADC S&H circuit with respect to
the resolver excitation signal
This is mostly approached by using RSD ADC + triggering timer channels +
angle tracking software algorithm
Case 2) Demodulation of the oversampled feedback signals:
This does not require synchronized triggering, however it requires fast ADC
capable to over-sample two high-frequency feedback signals
This is mostly approached by using Sigma-Delta ADC + high-frequency
digital demodulation + angle tracking software algorithm (with phase-delay
compensation)
Improves dynamics
TM
External Use 17
Case 1: Sin/Cos Envelope Extractor
Timer OC
ADC Trigger
ADC
sampling
ADC
sampling
Resolver excitation
signal at 10 kHz
Resolver feedback
sin signal
Resolver feedback
cos signal
sin envelope
cos envelope
Detail view
TM
External Use 18
Case 2: Over-sampling of Resolver Signals
Timer OC
SDADC sampling
Resolver excitation
signal at 10 kHz
Resolver feedback
sin signal
Resolver feedback
cos signal
sin envelope
cos envelope
Detail view
TM
External Use 19
Direct MCU-Resolver Interface
TM
External Use 20
Direct MCU R-D Conversion vs. RDC IC
Peripherals CPU Ext. circuitry
A/D Demodulation ATO PD
RC
Network
Output
H/W layer
eTIMER
Angle
Sensor
sin
cos
Application
s/w
SW RDC
MPCxxxxX
S
y
n
c
.

RDC IC
Run Time Diagnostic
RDC IC MCU Ext. circuitry
Analogue demodulation,
PLL
RC
Network
Amplifier
SWG -
Resolver
excitation
Angle
Sensor
sin
cos
Application
s/w
Run Time Diagnostic
VCO Counter
Sine
Cosine
Run Time Diagnostic
TM
External Use 21
MPCxxxxX
Direct MCU R-D Conversion: Application Example
Resolver
S1 S3
S2
S4
R2 R1
Cosine
Sine
Excitation
Amplifier
LP Filter,

DC
Common
Mode
Shift
Detection
SDADC 2+3
2xch. s. ended mode
SDADC 0+1
2xch. s. ended mode
SDADC 4+5
2xch s. ended mode;
optional excitation
monitoring
PWM
(eTPU)
2
nd
order
LP Filter
CPU
12 V
Angle Tracking
Observer
ATO
Angular position
Angular speed
INIT values
Diagnostic
s
i
n
,

c
o
s

T
r
a
c
k
i
n
g

e
r
r
.

Fault diagnostic
Angular speed
TM
External Use 22
Resolver Differential Excitation Stage
Excitation Amplifier existing solution
Low-pass filter
MPCxxxxX
PWM
(eTPU)
TM
External Use 23
Resolver Input Stage (Phy. Layer)
MPCxxxxX
SDADC 0+1
2xch. s. ended mode
SDADC 2+3
2xch. s. ended mode
SDADC 4+5
2xch s. ended mode;
optional excitation
monitoring
TM
External Use 24
Position accuracy 0.13 deg. 12bit 2LSB
External hardware
Excitation amplifier
LP Filter, DC Common Mode Shift Detection

True 12-bit resolution without noise
Repeatability 0.07 deg.

Evaluation Results
RDC IC
Position accuracy 0.09 deg. 12bit 1LSB
External hardware
Excitation amplifier
Hardware tuned for given resolver
Differential measurement
Phase difference, offset, gain error uncompensated
LP Filter, DC Common Mode Shift Detection
Noise, repeatability 0.033 deg.
Higher CPU* & ADC load
MPC5746M SW RDC
-0,1
-0,05
0
0,05
0,1
0,15
-180 -135 -90 -45 0 45 90 135 180
r
e
s
o
l
v
e
r
e
r
r
o
r
[
m
e
c
h
.

d
e
g
[
reference position [mech. deg]
angleErr
P
o
s
i
t
i
o
n

a
c
c
u
r
a
c
y


N
o
i
s
e


TM
External Use 25
Diagnostics: Calibratable Fault Thresholds
Fault diagnostic thresholds are implemented in software, therefore
can be easily calibrated.
SIN_POS
COS_POS
SIN_ZERO
COS_ZERO
SIN_NEG
COS_POS
SIN_AMPLS
COS_AMPL
SIN_AMPLS
COS_AMPL
UNIT_CIRCLE_MAX
UNIT_CIRCLE_MIN
OBSERVER
_ERROR
OBSERVER
_ERROR
TM
External Use 26
Fault Example: SIN Short to GND
Sin Cos Means Unit Circle ATO
Calculated
Angle
SIN_Z
ERO
SIN_P
OS
SIN_N
EG
SIN_A
MPL
COS_Z
ERO
COS_P
OS
COS_
NEG
COS_
AMPL
SIN_MEAN
_POS
SIN_MEAN
_NEG
COS_MEA
N_POS
COS_MEA
N_NEG
UNIT_CIRCL
E_MIN
UNIT_CIRCL
E_MAX
OBSERVE
R_ERROR
1.2b SIN Wire(or pin) short to GND ? ? ? 1 ? ? ? ? 1 0 ? ? 1 1 ? +/- 35deg
TM
External Use 27
Fault Example: REFSIN Open
Sin Cos Means Unit Circle ATO
Calculated
Angle
SIN_Z
ERO
SIN_P
OS
SIN_N
EG
SIN_A
MPL
COS_Z
ERO
COS_P
OS
COS_
NEG
COS_
AMPL
SIN_MEAN
_POS
SIN_MEAN
_NEG
COS_MEA
N_POS
COS_MEA
N_NEG
UNIT_CIRCL
E_MIN
UNIT_CIRCL
E_MAX
OBSERVE
R_ERROR
1.3a REFSIN Wire(or pin) open ? 0 1 0 ? ? ? ? 0 1 ? ? 1 1 ? wrong
TM
External Use 28
Fault Example: Shortcut REZ_GEN and REFSIN
Sin Cos Means Unit Circle ATO
Calculated
Angle
SIN_Z
ERO
SIN_P
OS
SIN_N
EG
SIN_A
MPL
COS_Z
ERO
COS_P
OS
COS_
NEG
COS_
AMPL
SIN_MEAN
_POS
SIN_MEAN
_NEG
COS_MEA
N_POS
COS_MEA
N_NEG
UNIT_CIRCL
E_MIN
UNIT_CIRCL
E_MAX
OBSERVE
R_ERROR
2.2
Short between REZ_GEN and
REFSIN ? 1 0 1 ? ? ? ? 1 0 ? ? 1 1 ? wrong
TM
External Use 29
Resolver + R/D IC Comments
Advantages
Position information during MCU initialization stage
High resolution: 12-bit
Simple SPI interface between MCU and RDC IC

Disadvantages
Only simple diagnostic possible (raw signal data not accessible)
No limp operation modes
RDC IC may require up to 30 pins
Larger board area
Higher system cost

TM
External Use 30
Resolver + SW Observer Comments
Advantages
High resolution: 10-12 bit (dependent on the resolution of A/D converter)
Simple hardware
Lower cost than resolver + ASIC
Intelligent diagnostics possible with complex conditioning for fault source
detection
Limp mode operation modes possible

Disadvantages
Intensive calculation needs, higher CPU load easily managed by
Freescale 32-bit Qorivva microcontrollers

TM
External Use 31
Freescale Support, Examples,
Documentation
TM
External Use 32
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
TM
External Use 33
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
u
Ucos
e
Uref
Usin
Rotor shaft
u
Ucos
e
Resolver
Encoder
Incremental Encoder Pulses
Source: Heidenhain
TM
External Use 34
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

FreeMASTER HTML-based Control Page FreeMASTER Scope
www.freescale.com/AutoMCDevKits
TM
External Use 35
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
ACLIB/AMCLIB
Angle Tracking Observer
Tracking Observer
PMSM BEMF Observer in
Alpha/Beta
PMSM BEMF Observer in
D/Q
Content To Be Defined
Target Platform GreenHills Multi WindRiver Diab Cosmic
Qorivva MCU RTM Rev 1.0 RTM Rev 1.0
S12ZVM RTM Rev 1.0
Auto Math and Motor Control Library Set

fbck
wRotElRes
GetPositionElRes()
GetSpeedElRes()
GDFLIB_FilterMA
GFLIB_ControllerPIrA
W
GFLIB_IntegratorTr

err

fbck
-
thRotElRes
GFLIB_Sin
GFLIB_Cos
si
n
cos
TM
External Use 36
MC Development Kits: 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 Freescales YouTube channel
See short promotional video on Freescales YouTube channel
TM
2014 Freescale Semiconductor, Inc. | External Use
www.Freescale.com

Вам также может понравиться