Resolvers

Transcription

Resolvers
An Overview of the Resolver
Interface for Motor Control
Applications
FTF-AUT-F0234
Leos CHALUPA | Automotive MCU Product Group
APR.2014
TM
External Use
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
1
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
2
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
3
Resolver Basics
TM
External Use
4
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
5
Resolvers: Electro-magnetic Induction Angle Sensors
Rotor is put directly on the drive’s shaft
Usin
Stator is fixed on drive’s shield
Simple assembly and maintenance


No bearings – “unlimited” durability
Resist well against distortion, vibration, deviation of operating
temperature and dust
Uref
Ucos
Rotor shaft
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 polepairs (usually 1-3 cycles)
Basic parameters:
TM
External Use
6
−
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
Resolver Types
Traditional Brushless
Brushless Variable Reluctance
Primary side
Rotary coupling
transformers
With variable air-gap
With solid rotor
Primary side
Primary side
stator
θ [°]
stator
θ [°]
rotor
cos
cos
HF
excitation
HF
excitation
sin
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.
TM
External Use
7
cos
HF
excitation
sin
Secondary side
θ [°]
rotor
Secondary Side
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.
sin
Secondary side
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.
Traditional Brushless Resolver
Source: Tamagawa Seiki co., www.tamagawa-seiki.com
TM
External Use
8
Source: Artus, www.psartus.com
Brushless VR Resolver
Source: Tamagawa Seiki co., www.tamagawa-seiki.com
TM
External Use
9
Source: Admotec Inc., machinedesign.com
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
10
Resolver Angle Position Sensing
TM
External Use
11
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.
Δ sin
Angle
Sensor
Ext. circuitry
RDC IC
RC
Network
Analogue demodulation,
PLL
Amplifier
Resolver
excitation
VCO
Counter
Δ cos
Sine
Cosine
Run Time Diagnostic
TM
External Use
12
Angle Tracking Observer Principle
est
LP
Filter
Angle Tracking

Pos. Error
Comparator
Envelope
Extractor
e()


Regulator
Sine
Cosine
Generator
TM
External Use
13
est
Angle Tracking Observer Basics
Implementation Basics:
Angular error evaluation:
sin( )
+
cos( )
-
K1
1
s
1 +
s +
(s)
( )
()
e(Θ - Θ̂ )  sin (Θ - Θ̂ )  Θ - Θ̂
() (
for (Θ - Θ̂ )  7
e Θ - Θ̂  sin (Θ)  cos Θ̂  cos(Θ )  sin Θ̂  sin Θ - Θ̂
)
e( -)
K2
sin ( )
Transfer function:
cos( )
F(s) 
Θ̂(s)
K (1  K 2s )
 2 1
Θ(s) s  K1K 2s  K1
Features:
• Non-sensitivity to disturbance and harmonic distortion of the carrier
• Non-sensitivity to voltage and frequency changes
• High accuracy of the angle extraction
TM
External Use
14
BASICS OF ANGLE EXTRACTION 5/6
TUNNING THE ANGLE TRACKING OBSERVER
Tuning the Angle Tracking Observer
35
Peak overshoot [%]
Transfer function of the General
Second Order System:
30
25
20
15
10
5
Transient responses:
Overshoot
±2%
0
0.5
1
Dampin
g
1.5
factor []
1400
2
1000
800
600
400
d/s]
ncy [ra
l freque
Natura
1200
0.050
Settling time [s]
0.045
0.040
0.035
0.030
0.025
0.020
Settling time
0.015
0.010
0.005
0
0.5
1
Dampin
g facto 1.5
r [-]
TM
External Use
15
2
1400
1000
800
600
400
d/s
ncy [ra
l freque
Natura
1200
]
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
16
Case 1: Sin/Cos Envelope Extractor
Detail view
Resolver excitation
signal at 10 kHz
“sin” envelope
Resolver feedback
“sin” signal
Timer OC
ADC Trigger
“cos” envelope
Resolver feedback
“cos” signal
ADC
sampling
TM
External Use
17
ADC
sampling
Case 2: Over-sampling of Resolver Signals
Detail view
Resolver excitation
signal at 10 kHz
“sin” envelope
Timer OC
Resolver feedback
“sin” signal
“cos” envelope
Resolver feedback
“cos” signal
SDADC sampling
TM
External Use
18
Direct MCU-Resolver Interface
TM
External Use
19
Direct MCU R-D Conversion vs. RDC IC
MPCxxxxX
SW RDC
Angle
Sensor
Ext. circuitry
Peripherals
RC
Network
∑∆A/D
Output
H/W layer
eTIMER
Δ cos
Δ sin
RDC IC
Angle
Sensor
Ext. circuitry
CPU
Demodulation
Sync.
Δ sin
PD
Analogue demodulation,
PLL
Amplifier
SWG Resolver
excitation
Application
s/w
Run Time Diagnostic
RDC IC
RC
Network
ATO
MCU
VCO
Counter
Application
s/w
Δ cos
TM
External Use
20
Sine
Cosine
Run Time Diagnostic
Run Time Diagnostic
Direct MCU R-D Conversion: Application Example
12 V
2nd order
LP Filter
MPCxxxxX
PWM
(eTPU)
Excitation
Amplifier
CPU
SDADC 4+5
2xch s. ended mode;
optional excitation
monitoring
Cosine
S4
DC
Common
Mode
Shift
Detection
S2
S3
Resolver
SDADC 2+3
2xch. s. ended mode
Sine
SDADC 0+1
2xch. s. ended mode
Angle Tracking
Observer
ATO
Tracking err.
LP Filter,
S1
INIT values
R2
sin, cos
R1
Diagnostic
Angular speed
TM
External Use
21
Angular position
Angular speed
Fault diagnostic
Resolver Differential Excitation Stage
MPCxxxxX
PWM
(eTPU)
Low-pass filter
Excitation Amplifier ≈ existing solution
TM
External Use
22
Resolver Input Stage (Phy. Layer)
MPCxxxxX
SDADC 4+5
2xch s. ended mode;
optional excitation
monitoring
SDADC 0+1
2xch. s. ended mode
SDADC 2+3
2xch. s. ended mode
TM
External Use
23
Evaluation Results
MPC5746M SW RDC
RDC IC
• Position
accuracy ±0.09 deg. 12bit ±1LSB
• Position
accuracy ±0.13 deg. 12bit ±2LSB
• External
hardware
• External
hardware
‒ Excitation
amplifier
‒
Excitation amplifier
‒ Hardware
tuned for given resolver
‒
LP Filter, DC Common Mode Shift Detection
‒ Differential
‒ Phase
‒ LP
measurement
difference, offset, gain error uncompensated
Filter, DC Common Mode Shift Detection
• Noise,
CPU* & ADC load
-180
Position accuracy
angleErr
0,1
Noise
resolver error [mech. deg[
0,15
0,05
0
-135
-90
-45
0
45
90
-0,05
-0,1
reference position [mech. deg]
TM
External Use
24
135
12-bit resolution without noise
• Repeatability ±0.07
repeatability ±0.033 deg.
‒ Higher
• True
180
deg.
Diagnostics: Calibratable Fault Thresholds
•
Fault diagnostic thresholds are implemented in software, therefore
can be easily calibrated.
SIN_AMPLS
COS_AMPL
SIN_POS
COS_POS
SIN_ZERO
COS_ZERO
SIN_NEG
COS_POS
SIN_AMPLS
COS_AMPL
UNIT_CIRCLE_MAX
OBSERVER
_ERROR
UNIT_CIRCLE_MIN
OBSERVER
_ERROR
TM
External Use
25
Fault Example: SIN Short to GND
Sin
Cos
Means
Unit Circle
ATO
SIN_Z SIN_P SIN_N SIN_A COS_Z COS_P COS_ COS_ SIN_MEAN SIN_MEAN COS_MEA COS_MEA UNIT_CIRCL UNIT_CIRCL OBSERVE Calculated
ERO OS
EG MPL ERO OS NEG AMPL _POS
_NEG
N_POS
N_NEG
E_MIN
E_MAX R_ERROR Angle
1.2b SIN Wire(or pin) short to GND
?
?
?
1
TM
External Use
26
?
?
?
?
1
0
?
?
1
1
?
+/- 35deg
Fault Example: REFSIN Open
Sin
Cos
Means
Unit Circle
ATO
SIN_Z SIN_P SIN_N SIN_A COS_Z COS_P COS_ COS_ SIN_MEAN SIN_MEAN COS_MEA COS_MEA UNIT_CIRCL UNIT_CIRCL OBSERVE Calculated
ERO OS
EG MPL ERO OS NEG AMPL _POS
_NEG
N_POS
N_NEG
E_MIN
E_MAX R_ERROR Angle
1.3a REFSIN Wire(or pin) open
?
0
1
0
TM
External Use
27
?
?
?
?
0
1
?
?
1
1
?
wrong
Fault Example: Shortcut REZ_GEN and REFSIN
Sin
Cos
Means
Unit Circle
ATO
SIN_Z SIN_P SIN_N SIN_A COS_Z COS_P COS_ COS_ SIN_MEAN SIN_MEAN COS_MEA COS_MEA UNIT_CIRCL UNIT_CIRCL OBSERVE Calculated
ERO OS
EG MPL ERO OS NEG AMPL _POS
_NEG
N_POS
N_NEG
E_MIN
E_MAX R_ERROR Angle
2.2
Short between REZ_GEN and
REFSIN
?
1
0
1
TM
External Use
28
?
?
?
?
1
0
?
?
1
1
?
wrong
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
29
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
30
Freescale Support, Examples,
Documentation
TM
External Use
31
Motor Control Development Kit: Composition
3-phase Current
Shunts
FET 3-phase
Power Stage
PMSM with
Resolver/Encoder
or
BLDC with
Hall/No Sensor
FET DRIVER
MC33937A
Incremental
Encoder Interface
MC33937A
3-phase
Low Voltage
Power Stage
Qorivva
MPC5643L MCU
SBC
MC33905
MCU
Controller Board
TM
External Use
32
Resolver/Sin-Cos
Interface
Switches and Pushbuttons
ON/OFF, Up/Down, Reset
Sensor: Position and Speed Measurement
Resolver
Usin


Uref
Rotor shaft
Ucos
ADC measurement
Encoder
Incremental Encoder Pulses
Functional properties:
Source: Heidenhain
•
Sine-wave excitation signal generation
• Position measurement
• Speed measurement
• Revolution measurement
TM
External Use
33
Key features:
•
Adjustable magnitude of excitation signal
• Adjustable frequency of excitation signal
• Sensor fault state detection
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 Scope
FreeMASTER HTML-based Control Page
www.freescale.com/AutoMCDevKits
TM
External Use
34
Auto Math and Motor Control Library Set
Target Platform
GreenHills Multi
WindRiver Diab
RTM Rev 1.0
RTM Rev 1.0
Qorivva MCU
Cosmic
S12ZVM
RTM Rev 1.0
MLIB
GFLIB
•
•
•
•
MLIB_Abs, MLIB_AbsSat
MLIB_Neg, MLIB_NegSat
•
•
•
MLIB_Add, MLIB_AddSat
MLIB_Sub, MLIB_SubSat
•
Multiply/Divide/Addmultiply Functions
•
•
•
•
•
•
•
Shifting
•
•
•
•
•
•
•
•
Conversion Functions
•
•
•
•
Moving Average Filter
•
•
•
•
•
•
•
2nd Order Infinite Impulse
Filter
•
•
•
GDFLIB_FilterIIR2init
GDFLIB_FilterIIR2
GMCLIB_Park
GMCLIB_ParkInv
•
•
•
•
Duty Cycle Calculation
•
GDFLIB_FilterIIR1init
GDFLIB_FilterIIR1
GMCLIB_Clark
GMCLIB_ClarkInv
Park Transformation
•
GDFLIB_FilterMA
1st Order Infinite Impulse
Filter
•
Clark Transformation
•
GDFLIB_FilterFIR
GMCLIB_SvmStd
Elimination of DC Ripples
•
•
•
Angle Tracking Observer
Tracking Observer
PMSM BEMF Observer in
Alpha/Beta
PMSM BEMF Observer in
D/Q
Content To Be Defined
GMCLIB_ElimDcBusRip
Decoupling of PMSM
Motors
•
•
GMCLIB_DecouplingPMSM
GFLIB_Hyst
GFLIB_IntegratorTR
ω
GDFLIB_FilterMA
ωfbck
wRotElRes
θfbck
thRotElRes
GetSpeedElRes()
Sign Function
•
MLIB_ConvertPU,
MLIB_Convert
•
GFLIB_Lut1D, GFLIB_Lut2D
Signal Integration
Function
•
MLIB_Norm, MLIB_Round
GFLIB_ControllerPIr,
GFLIB_ControllerPIrAW
GFLIB_ControllerPIp,
GFLIB_ControllerPIpAW
Finite Impulse Filter
•
Hysteresis Function
•
Normalisation, Round
Functions
•
ACLIB/AMCLIB
Interpolation
•
MLIB_ShL, MLIB_ShLSat
MLIB_ShR
MLIB_ShBi, MLIB_ShBiSat
GFLIB_Limit,
GFLIB_VectorLimit
GFLIB_LowerLimit,
GFLIB_UpperLimit
PI Controller Functions
•
MLIB_Mul, MLIB_MulSat
MLIB_Div, MLIB_DivSat
MLIB_Mac, MLIB_MacSat
MLIB_VMac
GFLIB_Sin, GFLIB_Cos,
GFLIB_Tan
GFLIB_Asin, GFLIB_Acos,
GFLIB_Atan, GFLIB_AtanYX
Limitation Functions
•
Add/Subtract Functions
•
GMCLIB
Trigonometric Functions
•
Absolute Value, Negative
Value
•
GDFLIB
•
GFLIB_Sign
Signal Ramp Function
•
•
GFLIB_Ramp
Square Root Function
•
•
GFLIB_Sqrt
si
n
cos
θerr
-
GFLIB_ControllerPIrA
W
GFLIB_Sin
GFLIB_Cos
GetPositionElRes()
TM
External Use
35
GFLIB_IntegratorTr
MC Development Kits: Web Page Summary
Motor Control Development Kits
www.freescale.com/AutoMCDevKits
See short promotional video on Freescale’s YouTube channel
Math & Motor Control Library Set
www.freescale.com/automclib
Motor Control Application Tuning Tool (MCAT)
www.freescale.com/MCAT
See short promotional video on Freescale’s YouTube channel
FreeMASTER
www.freescale.com/freemaster
TM
External Use
36
TM
www.Freescale.com
© 2014 Freescale Semiconductor, Inc. | External Use