Tidudp 0
Tidudp 0
Tidudp 0
Description Features
This reference design is an excitation amplifier and • Minimalist Approach on 1-in2 Four-Layer PCB
analog front end for resolver sensors. The design • Industry Standardized Components
implements only discrete components and standard • Low Cost
operational amplifiers (op amps) on a 1-in2 printed-
circuit board (PCB). The provided algorithm and code • Example Firmware for TMS320F28069M C2000™
example uses a C2000™ microcontroller (MCU) MCU Including Source Code
LaunchPad™ Development Kit with the • Undersampling Algorithm for Angle Calculation
TMS320F28069M MCU for signal processing and • Allows for Performance Upgrade
angle calculation. The reference design uses an
innovative, scattered-signal processing method (see • ±0.25° Angle Readout Accuracy or ±0.1° Using
Section 3). This method improves the system accuracy Innovative Scattering Signal Processing Method
by 250% while maintaining hardware costs and
complexity to a reasonable level. Applications
• AC Drive Position Feedback
The TIDA-01527 is a low-cost companion design for
the TIDA-00796 and TIDA-00363 reference designs. • HEV/EV - Inverter and Motor Control
These designs are based on the PGA411-Q1 and offer • E-Bike
advanced features such as protections and • Servo Drive Position Feedback
diagnostics.
Resources
ACTIVE LOW-
PHASE
PWM PASS SECOND- ±
SPLITTER
1 ORDER FILTER
PWR EXC+
AMP
Ä
COS
DIFF
ADC1
AMP
COS+
DIFF
ADC2
AMP COS± SIN
CROSSBAR
(OPTIONAL)
SIN+
DIFF
ADC3
AMP SIN±
GPIO
2
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 1
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
System Description www.ti.com
An IMPORTANT NOTICE at the end of this TI reference design addresses authorized use, intellectual property matters and other
important disclaimers and information.
1 System Description
High-performance motor control applications traditionally require a speed or position sensor for the control
loop feedback. Various methods and new algorithms are available which may eliminate the requirement
for a physical sensor; however, many applications cannot achieve the required performance and reliability
through sensorless control. Examples include traction inverters for hybrid-electric vehicles (HEV) and
electric vehicles (EV), electric power steering, motor drives and servos in industrial applications. A resolver
is one of the most popular angular sensors due to its reliability (even in an harsh environment) and the
ratiometric output, which suppresses common-mode noise.
This discrete resolver front-end reference design provides a simple implementation of a resolver interface.
The design uses a small PCB which implements an excitation amplifier for the primary winding and the
analog signal front end for the feedback windings. The PCB connects to the C2000 LaunchPad with the
TMS320F28069M MCU over a flat ribbon cable or by using a small PCB adapter. The provided code
example for the MCU uses the undersampling algorithm for readback signals demodulation and the arc
tangent goniometric function for the angle calculation.
Components used in this design have been rated for automotive applications or have an automotive-
qualified alternative. The guide also suggests more customized components with higher integration for
performance upgrade.
NOTE: The TIDA-01527 reference design has not been tested for any automotive or industrial
requirements (for example, functional safety or electromagnetic compatibility). The design
serves as a practical guidance and inspiration for the customer's system implementation.
2 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com System Overview
2 System Overview
The TIDA-01527 reference design consists of a host MCU and resolver sensor. The host MCU generates
a pulse-width modulated (PWM) signal with a variable duty cycle. The duty-cycle modulation matches the
desired resolver excitation frequency. The second-order active low-pass filter only preserves the excitation
frequency and converts the PWM signal into a harmonic signal. The analog phase-splitter circuit splits the
harmonic signal into two complementary harmonic signals. Two power amplifiers boost these harmonic
signals to match the resolver excitation voltage levels. A set of difference amplifiers monitor all resolver
windings and interface to the analog-to-digital converter (ADC) in the host MCU. The system uses an
optional analog crossbar circuit for advanced analog processing techniques, system calibration, and basic
diagnostics. For details on the scattered signal processing method, see Section 3.
Figure 1 shows the reference design from the top and the bottom side.
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 3
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
System Overview www.ti.com
ACTIVE LOW-
PHASE
PWM PASS SECOND- ±
SPLITTER
1 ORDER FILTER
PWR EXC+
AMP
Ä
COS
DIFF
ADC1
AMP
COS+
DIFF
ADC2
AMP COS± SIN
CROSSBAR
(OPTIONAL)
SIN+
DIFF
ADC3
AMP SIN±
GPIO
2
2.2.1 TLV4171
The TLVx171 family of devices is a 36-V, single-supply, low-noise operational amplifier (op amp) with the
ability to operate on supplies ranging from 2.7 V (± 1.35 V) to 36 V (±18 V). This series is available in
multiple packages and offers low offset, drift, and low quiescent current. The single, dual, and quad
versions all have identical specifications for maximum design flexibility.
Unlike most op amps, which are specified at only one supply voltage, the TLVx171 family of devices is
specified from 2.7 V to 36 V. Input signals beyond the supply rails do not cause phase reversal.
The TLVx171 family of devices is stable with capacitive loads up to 200 pF. The input can operate
100 mV below the negative rail and within 2 V of the top rail during normal operation. The device can
operate with full rail-to-rail input 100 mV beyond the top rail, but with reduced performance within 2 V of
the top rail.
The TLVx171 op amp family is specified from –40°C to +125°C.
4 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com System Overview
2.2.2 TLV431x-Q1
The TLV431x-Q1 device is a low-voltage three-terminal adjustable voltage reference with specified
thermal stability over applicable industrial, automotive, and commercial temperature ranges. The output
voltage can be set to 1.24 V on stand-alone mode or any value between VREF (1.24 V) and 6 V with two
external resistors. These devices operate from a lower voltage (1.24 V) than the widely-used TL431 and
TL1431 shunt-regulator references. When used with an optocoupler, the TLV431 device is an ideal
voltage reference in isolated feedback circuits for 3-V to 3.3-V switching-mode power supplies. These
devices have a typical output impedance of 0.25 Ω. Active output circuitry provides a very-sharp turnon
characteristic, making them excellent replacements for low-voltage Zener diodes in many applications,
including onboard regulation and adjustable power supplies.
3.3
PWM STREAM
MODULATION
0
0
255
0
255
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 5
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
System Overview www.ti.com
Every new period of the PWM triggers an interrupt service routine where the controller calculates a new
duty cycle using the sinus function. The period of the PWM modulator is set as per Equation 1.
TPWM 2n u TSYSCLK (1)
This method allows conversion of the excitation signal into a discrete time signal with an n-bit resolution.
An internal variable-counter counts every interrupt from 0 to 2n – 1 and automatically resets when it
reaches 2n. The software example uses the IQ math library. After casting the internal variable-counter to
IQn number, the result takes the value between 0..1, which corresponds to 0..2π angle on the unity circle.
For this reason, the internal variable-counter is called the excitation angle, or ExcAngle. This variable is
very important because all signal processing refers to it.
The designer can also adjust the PWM duty-cycle modulation index (depth). Typically, the modulation
index is 1.0, which corresponds to a duty cycle from 0% to 100%. When set to 0.5, the duty cycle varies
from 25% to 75%. This variation reduces the output amplitude of the excitation signal. For this reason, the
modulation index variable is called ExcGain and may be used to fine-tune the output amplitude. Note that
lowering the modulation index reduces the effective resolution and increases harmonic distortion of the
excitation signal.
Another important aspect to understand is that the required bit-resolution n and the system clock period
TSYSCLK define the period TPWM of the generated PWM signal, as per Equation 2. A lower resolution
increases the total harmonic distortion (THD) while a lower operating frequency requires a higher-order
low-pass filter.
TEXC
TPWM
2n (2)
Finally, the MCU sets the duty cycle, as per Equation 3:
duty 0.5 u ª¬1 sin ExcAngle u ExcGain º¼
(3)
where,
• duty = 0…1,
• ExcAngle = 0…2π,
• ExcGain = 0…1.
Adding 1 ensures that the duty cycle is always positive with the center at 0.5.
Example calculation for TIDA-01527:
Desired excitation frequency fEXC = 5 kHz → TEXC = 200 µs
System clock fSYSCLK = 80 MHz → TSYSCLK = 12.5 ns
Choosing PWM resolution = 8 b
PWM period as per Equation 4:
TPWM 28 u 12.5 ns 3.2 Ps (4)
The excitation angle variable resolution per Equation 1 then turns into Equation 5
§T · § 200e 6 ·
log ¨ EXC ¸ log ¨ ¸
TPWM
TEXC
on © TPWM ¹ © 3.2e 6 ¹ 5.96 Ÿ 6 bit
2n log 2 log 2 (5)
6 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com System Overview
Magnitude
Resolver Excitation Frequency
1st
Harmonic
2nd
distortion due
to finite PWM 3rd
resolution
4th
...
0
fEXC
fPWM
f [Hz]
A properly-set low-pass filter suppresses the PWM carrier and harmonics to a minimum but passes the
resolver excitation signal content, as Figure 5 shows. This process converts the modulated PWM stream
to a sine wave. Note that increasing the difference between fEXC and fPWM lowers the requirement for filter
rolloff (filter order). Setting the DC gain and the rolloff point is worth the practical experiment. The DC gain
compensates for the excitation frequency attenuation and different combinations provide different results.
Matching the –3-dB cutoff to the excitation frequency is the starting point when designing the filter.
H [dB]
DC Gain
fEXC
fPWM
f [Hz]
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 7
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
System Overview www.ti.com
The reference design uses a second-order low-pass active filter with a multiple feedback topology, as
Figure 6 shows.
VCC
R1 R2
12.0k 10.0k
EXC_P
R5
3.90k
R8
20.0
C3
1000pF
4
U1C
3
PWM R9 R10 9 TLV4171IDR
3.90k 15.0k V+ 8 1 Q3
C
10 V-
fc=9.6 kHz
2
K=-1
11
EXC_N
C4 R11 R12
4700pF 3.00k 10.0k
During development, this topology was proven to be a better solution rather than the popular Sallen-Key
topology. Another benefit is that the resistor divider (R1, R11), which sets the DC offset, connects to the
high-impedance non-inverting input of the op amp. The Sallen-Key filter requires buffering for floating
ground (DC offset), which adds to the circuit complexity. R5 and R9 set the DC gain of the filter as per
Equation 6.
R5 3900
ADC 1
R9 3900 (6)
Equation 7 calculates the –6-dB cutoff frequency of the filter.
1
¦c 6 db
2S R5 u R10 u C4 u C3
1
¦c 6 db
2S 3900 u 15000 u 4.7 e 9 u 1e 9
¦c 6 db +] (7)
Equation 8 calculates the more-common approximation of a –3-dB cutoff from the –6-dB point.
§ 1· § 1·
¨n¸ ¨n¸
¦c ¦c © ¹ © ¹ +]
3 db 6 db (8)
NOTE: The cutoff frequency is typically identified as the point where the transfer function of a filter
drops by –3 dB. This drop corresponds to approximately half of the power transfer. However,
higher-order filters have a steeper rolloff (for example: –40 dB/dek for a second-order filter)
and the cutoff frequency is defined as n(–3 dB) where n is the filter order. This definitionoften
causes confusion because some technical articles or online calculators use formulas
referring to the –3-dB point whereas others use n(–3 dB). TI recommends checking the
calculation using a simulation tool.
8 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com System Overview
As Section 2.3.4 describes, a resolver is a transformer. Eliminating any DC current through the primary
winding is important to avoid magnetic circuit saturation. For this reason, the system uses differential
excitation with two output amplifiers with a phase shift of 180°. The resolver then registers only the
differential voltage VR as per Equation 9:
VR VEXC VDC VEXC VDC (9)
where,
VEXC VEXC (10)
and then,
VR 2 u VEXC (11)
A simple analog phase splitter using the transistor Q3 and resistors (R2, R12) creates well-matched
complementary sine waves, as per Equation 10. The resistor R8 compensates for the intrinsic emitter
resistance of Q3. This compensation helps to roughly match output impedances between the collector and
emitter node.
C1
R3 R4
10.0k 4.70k
3
18pF
C2 1 Q1
EXC_P R6 R7 EXC+ BC817-25,215
100k 470k
2
0.01 µF
3
4
U1A 1 Q2 R15
fc1=160 Hz BC817-25,215 10.0
2 TLV4171IDR
K=-4.7
V+ 1 EXC+
2
fc2=18.8 kHz A
2
VCC/2 3 V-
1 Q4 R24
BC807-40LT1G 10.0
11
1 Q5
BC807-40LT1G
3
R13 R14
10.0k 4.70k
Resistors R3 and R13 create a virtual ground and set the DC offset to the middle of the operating voltage
range. Resistors R6 and R7 set the pass-band gain as per Equation 12 . Note that keeping these resistors
reasonably high is important because R6 also defines the input impedance of the power stage.
R7 470e3
APASS BAND 4.7
R6 100e3 (12)
The power stage is AC-coupled because the virtual ground (DC offset) of the power stage does not match
the EXC_P, EXC_N outputs of the phase splitter. The capacitor C2 and resistor R6 set the lower cutoff
frequency as per Equation 13. The cutoff frequency is set significantly lower than the excitation frequency
to prevent signal of interest attenuation.
1 1
¦low 3 dB +]
2S u R6 u C2 2S u 100e3 u 10e 9 (13)
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 9
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
System Overview www.ti.com
Equation 14 defines the upper cutoff frequency of the amplifier. Similar to the low-pass filter in
Section 2.3.2, the designer must set the cutoff frequency as low as possible to further reduce the PWM
spectral content but high enough to pass the excitation frequency without attenuation.
1
fhigh 3 dB
2S u C1 u R7
1
fhigh 3 dB
2S u 18e 12 u 470e3
fhigh 3 dB 18.81 kHz (14)
Texas Instruments offers integrated power amplifiers that fit this application. An integrated solution solves
many problems, such as:
• Output stage biasing
• Crossover distortion
• Overcurrent protection
• Temperature protection
• Temperature (runaway) stability
Adding these features by using discrete components usually results in very complex circuits which are
typically known for their use in high-end audio amplifiers.
Recommended parts: ALM2402, OPA564-Q1
Verifying the minimal slew rate for the excitation amplifier is also very important. Equation 15 defines the
minimal slew-rate SR.
65min t ¦EXC u S u 9amp (15)
where,
• Vamp is the amplitude (single-ended) of the generated sine wave.
Figure 8 shows the relationship between excitation frequency, resolver excitation voltage, and the
amplifier slew rate for applications using the differential type of an excitation amplifier.
0.33
4-VRMS
0.30 7-VRMS
0.27
0.24
0.21
Slew-Rate (V/Ps)
0.18
0.15
0.12
0.09
0.06
0.03
0.00
1 2 3 4 5 6 7 8 9 10
fexc (kHz) D001
Figure 8. Minimum Required Slew Rate per Amplifier (Single-Ended) for 4-VRMS and 7-VRMS Resolvers
10 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com System Overview
VR
, VR
VS VS
VC
VC
Copyright © 2017, Texas Instruments Incorporated
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 11
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
System Overview www.ti.com
Magnitude
Resolver Excitation Frequency
fEXC -fVELOCITY
fEXC
fEXC -fVELOCITY
f [Hz]
For further details on resolvers, see EMC Compliant Single-Chip Resolver-to-Digital Converter (RDC)
Reference Design or Synchro and Resolver Engineering Handbook.
2.3.5 Crossbar—Optional
A pair of CMOS multiplexers (U5, U6) form an analog crossbar, as Figure 11 shows. This crossbar is an
experimental circuitry further used in the signal processing algorithm. This circuit also allows for swapping
input signals between each difference amplifier or the complete disconnection of resolver windings. This
circuitry, together with an advanced algorithm in the MCU, reduces system error and enables basic
diagnostics features. Transistors Q10A, Q10B and resistors R48, R48 convert logic levels from the MCU.
U5 U6
14 O/I AX OR AY I/O AX 12 ISIN- 14 O/I AX OR AY I/O AX 12 ICOS-
I/O AY 13 ICOS- I/O AY 13 ISIN-
SIN- 11 A
COS- 11 A
CTRL_CMOS 15 O/I BX OR BY I/O BX 2 ISIN+ 15 O/I BX OR BY I/O BX 2 ICOS+
I/O BY 1 ICOS+ I/O BY 1 ISIN+
SIN+ 10 B
COS+ 10 B
4 O/I CX OR CY I/O CX 5 4 O/I CX OR CY I/O CX 5
I/O CY 3 I/O CY 3
9 9
GND C GND C
INH_CMOS 6 INH 6 INH
VEE 7 VEE 7
16 8 16 8
VCC VDD VSS VCC VDD VSS
VCC VCC CD4053BPWRG3 CD4053BPWRG3
GND GND
R48 R49
2.20k 2.20k
CTRL_CMOS INH_CMOS
6
CTRL 2 INH 5
1
Q10A Q10B
DMC564040R DMC564040R
GND GND
Copyright © 2018, Texas Instruments Incorporated
12 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com System Overview
13
OEXC R21 14 V+
D R22
10.0 V- 12 EXC+
U1D 100k
TLV4171IDR
11
C7 R23
15pF 10.0k
GND
VREF1/2
Copyright © 2018, Texas Instruments Incorporated
The other two difference amplifiers monitor the sinus and cosinus windings from the resolver sensor.
Because both amplifiers are identical, this documentation only describes the first one (see Figure 13).
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 13
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
System Overview www.ti.com
VCC
R26
100k
IS IN-
R28 R29 R30 SIN-
DNP
10.0k 51.0k 0
R31 C12
8
100k 1µF
2
OSIN R32 1 V+
A R33 R34
10.0 V- 3 SIN+
DNP
U3A 51.0k 0
IS IN+
TLV2171IDR
4
C15 R35 R36
15pF 10.0k 62.0k
GND
VREF1/2
Copyright © 2018, Texas Instruments Incorporated
Set the DC gain of the difference amplifier per Equation 18. The resistor R32 and capacitor C15 form a
charge bucket filter for the ADC. The difference amplifier uses the DC offset (VREF1/2) to match the
bidirectional signal from the resolver with the single-ended ADC input.
R28 10k
A 0.196 when R28 R35 and R29 R33
R29 51k (18)
The signal from the resolver secondary winding is floating. Resistors R26, R31, and R36 provide the
appropriate DC biasing. Keeping the inputs of the op amps within the specified common mode range is
important. C12 is an optional filtering capacitor (do not assemble). The 0-Ω resistors R30, R34 must be
populated when the analog crossbar circuitry is not in use.
Two inexpensive voltage references U2, U4 create a 1.24 V and 2.48 V for the ADC. Resistor R27
provides biasing and capacitors C13, C14 provide basic filtering.
NOTE: Always check the stability boundary conditions and minimal bias current for the x431 series
of shunt references. The criteria is subject to change between manufacturers.
Texas Instruments recommends the use of integrated difference amplifiers such as the INA1650-Q1 as a
potential performance upgrade. An integrated multichannel solution provides better channel matching and
precise gain setting without the requirement of expensive precision resistors.
14 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com System Overview
TEXC
VR (excitation)
,SAMPLE
VC (COSINE)
TVELOCITY
The physical placement of the secondary windings defines the phase shift between the sine and cosine
signal, which is ideally 90°.
Sampling VS and VC with period TSAMPL = TEXC demodulates the signal and preserves only the signal
envelope that is required for angle calculation, as per the previous Equation 16. The ADC converter is set
in such a way that it always samples the signal when the amplitude reaches the maximum. This setting
increases the signal-to-noise ratio and delivers the best results. The ADC sampling time derives from the
ExcAngle parameter described in Section 2.3.1. For this reason, the code uses the name SamplAngle.
Ideally, the sampling time SamplAngle occurs when ExcAngle is 0.25, 0.75, or both. However, two
sources of phase lag exist for which the system must compensate. The first source of phase lag is on the
active low-pass filter and the excitation amplifier. Resolver impedance, which varies with every model,
defines the second source of phase lag. A diagnostic routine, which sweeps the SamplAngle variable
during the start-up and picks the time point when either VC or VS is highest, makes the system compatible
with various resolvers with different impedance. The ADC samples both resolver signals ideally at the
same time. The MCU offers two independent sample-and-hold circuits which enable this simultaneous
sampling. For this reason, VC and VS connect to ADCINA0 and ADCINB0, respectively.
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 15
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
Scattered Signal Processing Method www.ti.com
§V ·
VC T arctg ¨¨ S ¸¸
ADC1 A © VC ¹
E
V
VOUT(B) = G(B) · VIN(B) + VOFFSET(B)
VS
ADC2 B
Matching the transfer function of the difference amplifiers is critical for system accuracy. Any difference
between the gain or DC offset creates a non-linear error in angle measurement, as per Equation 20.
§V · § G B u VS VOFFSET B ·
4 arctg ¨ S ¸ arctg ¨ ¸
© VC ¹ ¨G u VC VOFFSET A ¸
© A ¹ (20)
The blue trace in Figure 16 shows how a 1% gain imbalance between the amplifiers contributes to the
angle error. The red trace shows the effect of the DC offset on the angle error when VOFFSET(A) = 0.05 ×
VS(MAX).
0.5
0.4
0.3
0.2
Angle Error (q)
0.1
-0.1
-0.2
-0.3
Higher accuracy systems require precision components for the difference amplifiers and system
calibration, which increases system and manufacturing costs. This consideration is valid for discrete as
well as integrated circuits.
The reference design implements a novel method called scattered signal processing. The method uses
the analog crossbar described in Section 2.3.5 and a modified algorithm in the firmware.
16 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com Scattered Signal Processing Method
The scattered signal processing method adds an inexpensive analog multiplexer with an inhibit function
(for example, the CD4053) between each resolver output and difference amplifier. This analog multiplexer
allows disconnecting the resolver outputs or swapping them between the difference amplifiers on-the-fly
when the system is running. Swapping resolver outputs scatters the signal between two signal paths,
which is the key action of this concept.
The system operates in the following three steps, which repeat periodically:
1. DC offset calibration with disconnected resolver sensor
2. Sampling the output of both differential amplifiers with the normally-connected resolver outputs VS, VC
(direct mode)
3. Sampling the output of both differential amplifiers with swapped resolver outputs VS, VC (inversed
mode)
Figure 17 shows the first step, which is DC offset calibration. The resolver sensor is completely
disconnected and the output of each difference amplifier corresponds to the DC offset VOFFSET(A,B).
VOUT(A) = G(A) · VIN(A) + VOFFSET(A)
§V ·
VC T arctg ¨¨ S ¸¸
© VC ¹
ADC1 A
C
EX
V
CTRL
VS
ADC2 B
CTRL
In the next step, the ADC samples the output of both differential amplifiers in direct mode (see Figure 18).
VOUT(A) = G(A) · VIN(A) + VOFFSET(A)
§V ·
VC T arctg ¨¨ S ¸¸
© VC ¹
ADC1 A
C
EX
V
CTRL
VS
ADC2 B
CTRL
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 17
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
Scattered Signal Processing Method www.ti.com
In the last step, the ADC samples the output of both differential amplifiers in inversed mode (see
Figure 19).
VOUT(A) = G(A) · VIN(A) + VOFFSET(A)
§V ·
VC T arctg ¨¨ S ¸¸
© VC ¹
ADC1 A
C
EX
V
CTRL
VS
ADC2 B
CTRL
Table 2 lists the values that the ADC reads during all three steps.
The angle calculation algorithm uses all three results for gain imbalance and DC offset elimination. First,
the algorithm adds the results from step 2 and step 3, as per Equation 21.
§V · § G B u VS VOFFSET B G A u VS VOFFSET A ·
4 arctg ¨ S ¸ arctg ¨ ¸
© VC ¹ ¨ G u VC VOFFSET G B u VC VOFFSET B ¸
© A A ¹ (21)
The system obtains the DC offset information for both channels from step 1 and compensates it. This
compensation results in the simplified formula as per Equation 22.
§V · § G B u VS G A u VS ·
4 arctg ¨ S ¸ arctg ¨ ¸
© VC ¹ ¨ G A u VC G B u VC ¸
© ¹ (22)
Mathematical manipulation eliminates the gain variables from the formula as per Equation 23.
§V u G G ·
§V · ¨ S B A ¸ §V ·
4 arctg ¨ S ¸ arctg ¨ ¸o4 arctg ¨ S ¸
© VC ¹ ¨ VC u G A GB ¸ © VC ¹
© ¹ (23)
At this point note that the gain imbalance and DC offset no longer contribute to the error calculation. Also
note that the method compensates for any imperfections in the ADC transfer function (gain or offest).
NOTE:
• Embedded algorithms typically use Atan2 function which is defined at ±π radians.
• The scattered-signal processing method is effective for signals with a significantly lower
bandwidth than the ADC sampling and algorithm execution frequency.
• The current firmware implementation only performs step 1 during the system start-up.
18 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com Scattered Signal Processing Method
The scattered-signal processing technique has additional positive side effects. The system allows for "limp
mode" operation due to the redundant signal path and allows for additional diagnostics, the process for
which is as follows:
1. The hardware engineer calculates the worst-case tolerances for the DC offset and gain imbalance and
parametrizes the system (for example, a 1.5% tolerance span).
2. The algorithm then periodically checks if readout data are within the given tolerance boundaries,
typically for:
• DC offset for both channels
• Maximum acceptable difference between ADC samples taken in step 2 and step 3
• VS and VC amplitude
3. If one of the diagnostic results fails, the system is able to detect the defective channel and eventually
work in the "limp mode" with reduced performance, using only one analog front-end channel. This
measureis important and beneficial in robust systems and in safety-critical applications (SIL/ASIL).
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 19
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
Hardware, Software, Testing Requirements, and Test Results www.ti.com
4.1.1 Hardware
The following hardware is necessary for exploring the TIDA-01507 reference design:
• The TIDA-01527 discrete resolver front-end board
• The LAUNCHXL-F28069M LaunchPad development board (or similar)
• The adapter board or a custom ribbon cable for interfacing the TIDA-01527 with the LaunchPad
• A resolver sensor matching the system specification
• Laboratory power supply specified at 0 V to 15 V, 0 mA to 200 mA, preferably with current limitation or
overcurrent protection
• A computer capable of running Code Composer Studio™ (CCS) software
Figure 20 shows the reference design pinout and Table 3 lists the connections to the LaunchPad and the
pin mapping. To access the quick start guide for the LAUNCHXL-F28069M including a pins overview, see
TMS320F28069M LaunchPad Development Kit Quick Start Guide.
14:GND 13:CTRL
EXC+
10:GND 9:OCOS
COS-
8:VREF1/2 7:INH
COS+
6:GND 5:OSIN
SIN-
2:GND 1:PWM
Figure 21 shows a properly-assembled TIDA-01527 reference design with the LaunchPad adapter and
LAUNCHXL-F28069M development board.
Figure 21. LAUNCHXL-F28069M Development Board With TIDA-01527 and LaunchPad™ Adapter
20 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com Hardware, Software, Testing Requirements, and Test Results
4.1.2 Software
This reference design comes with a complete example software package with a precompiled binary file
and source codes. The following software tools were used during development with the LAUNCHXL-
F28069M development board.
1. Code Composer Studio v7 with C2000 compiler TI v16.9.1 LTS
2. controlSUITE™ software (optional) – Provides extensive database of schematics, libraries, code
examples, and manuals for C2000-based solutions
3. C2000Ware (optional) – A lightweight version of the controlSUITE package
Texas Instruments also offers a set of free-of-charge online development tools at dev.ti.com that can be
used for programming the MCU or code modifications.
NOTE: For detailed tutorials on how to program, compile, and debug using TI's MCUS, see
processors.wiki.ti.com. Alternatively, TI also offers live support within the E2E™ online
community.
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 21
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
Hardware, Software, Testing Requirements, and Test Results www.ti.com
Figure 22. TIDA-01527 Test Setup Used for Development and Measurements
22 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com Hardware, Software, Testing Requirements, and Test Results
D0 – Input PWM from the C2000 MCU; D1, D2 – Control (CTRL) and Inhibit (INH) signals for the analog crossbar;
CH1, CH2 – Generated sine wave after the analog phase-splitter (EXC_N, EXC_P); CH3, Ch4 – Excitation amplifier
outputs (EXC+, EXC–)
Figure 23. Active Low-Pass Filter and Excitation Amplifier Waveforms
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 23
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
Hardware, Software, Testing Requirements, and Test Results www.ti.com
D0 – Input PWM from the C2000 MCU; D1, D2 – Control (CTRL) and Inhibit (INH) signals for the analog crossbar;
CH1 – Exciter voltage monitoring (OEXC), CH2 – Sine-winding voltage monitoring (OSIN), CH3 – Cosine winding
voltage monitoring (OCOS)
Figure 24. Analog Front-End Waveforms (Steady Operation)
24 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com Hardware, Software, Testing Requirements, and Test Results
CH1 – Exciter voltage monitoring (OEXC); CH2 – Sine-winding voltage monitoring (OSIN); CH3 – Cosine-winding
voltage monitoring (OCOS)
Figure 25. Analog Front-End Waveforms (Resolver Spins at ≈ 2625 RPM)
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 25
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
Hardware, Software, Testing Requirements, and Test Results www.ti.com
CH1 – Exciter voltage monitoring (OEXC); CH2 – Sine-winding voltage monitoring (OSIN); CH3 – Cosine-winding
voltage monitoring (OCOS)
Figure 26. Analog Front-End Waveforms (Resolver Spins at ≈ 2625 RPM With Detail)
26 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com Hardware, Software, Testing Requirements, and Test Results
D0 – Input PWM from the C2000 MCU; D1, D2 - Control (CTRL) and Inhibit (INH) signals for the analog crossbar;
CH1 – Exciter voltage monitoring (OEXC), CH2 – Sine-winding voltage monitoring (OSIN); CH3 – Cosine-winding
voltage monitoring (OCOS).
Note that the provided example performs offset calibration (step 1) during the start-up and then alternates only to step
2 and step 3.
Figure 27. Analog Front-End Waveforms With Scattered Signal Processing Enabled
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 27
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
Hardware, Software, Testing Requirements, and Test Results www.ti.com
Figure 28 shows the result of the diagnostic routine described in Section 2.3.7, which finds the right
sampling time for the envelope detector. The rising edge on the debug pin GPIO3 represents the OSIN
and OCOS sampling, and the falling edge represents the sampling of the OEXC signal.
Figure 28. Sampling Times for OSIN, OCOS, and OEXC Signals
28 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com Hardware, Software, Testing Requirements, and Test Results
Figure 29 shows the accuracy plot. Figure 30 and Figure 31 show the same data in a different format.
0.5
TIDA-01527 (Normal Mode)
0.4 TIDA-01527 (Scattered Mode)
PGA411-Q1 (TIDA-00796)
12-b Resolution (MAX)
0.3 12-b Resolution (MIN)
0.1
0 ± 0.044°
-0.1 Theoretical
minimum error
Normal Mode for 12-b resolution
-0.2 ± 0.24°
PGA411-Q1
± 0.30°
-0.3
-0.4
-0.5
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360
Resolver Angle (°) D002
90 90
135 45 135 45
180 0 180 0
0.2 0.4 0.6 -0.2 0 0.2
Figure 30. TIDA-01527 Unity Circle Accuracy Plot Figure 31. TIDA-01527 Unity Circle Accuracy Plot
(Absolute to Zero)
As mentioned in Section 2.3.1, the system uses the IQ math library in the angle calculation routine. The
plot in Figure 32 shows the calculation error due to the finite Q-number resolution. The reference data use
RAW results from the ADC with post processing (calculation) in the PC using Microsoft® Excel. The error
is negligible and significantly below the system resolution.
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 29
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
Hardware, Software, Testing Requirements, and Test Results www.ti.com
0.03
0.02
0.01
Angle Error (q)
-0.01
-0.02
-0.03
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360
Resolver Angle (q) D003
Figure 33 shows a photo from the thermal imaging camera when the TIDA-01527 reference design drives
the LTN58 resolver at 5 kHz with a 7-VRMS excitation at a 22°C ambient temperature. Not many options
are available for reducing the dissipation of an AB-class amplifier other than lowering voltage drop across
and current through the power stage.
30 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com Design Files
5 Design Files
5.1 Schematics
To download the schematics, see the design files at TIDA-01527.
Figure 34. Top PCB Side and Components Placement Figure 35. Bottom PCB Side and Components
Placement
Figure 36. Internal Layer 1 With Common Ground GND Figure 37. Internal Layer 2 With Power Rail VCC and
and Signals Signals
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 31
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
Design Files www.ti.com
6 Software Files
To download the software files, see the design files at TIDA-01527.
7 Related Documentation
1. Texas Instruments, TLVx171-Q1 36-V, Single-Supply, General-Purpose Operational Amplifier for Cost-
Sensitive Automotive Systems Data Sheet
2. Texas Instruments, TLV431x-Q1 Low-Voltage Adjustable Precision Shunt Regulator Data Sheet
3. Texas Instruments, TMS320F2806x Piccolo™ Microcontrollers Data Manual
4. Texas Instruments, Automotive Resolver-to-Digital Converter for Safety Applications Design Guide
5. Texas Instruments, EMC Compliant Single-Chip Resolver-to-Digital Converter (RDC) Reference
Design
6. Texas Instruments, Reduce system costs with resolver-to-digital conversion implementation on
C2000™ microcontrollers (white paper)
7. Texas Instruments, TMS320F240 DSP Solution for Obtaining Resolver Angular Position and Speed
Application Note
8. Texas Instruments, C28x IQmath Library Module User's Guide
9. (2004) Synchro and Resolver Engineering Handbook . Moog Components Group. Retrieved from
http://www.moog.com/literature/MCG/synchrohbook.pdf
7.1 Trademarks
C2000, LaunchPad, Piccolo, Code Composer Studio, controlSUITE, E2E are trademarks of Texas
Instruments.
Microsoft is a registered trademark of Microsoft Corporation.
R&S is a registered trademark of Rohde & Schwarz USA, Inc..
All other trademarks are the property of their respective owners.
8 Glossary
ADC— Analog-to-digital converter
CCS— Code Composer Studio™
CLA— Control law accelerator
ESD— Electrostatic discharge
EV— Electric vehicle
HEV— Hybrid-electric vehicle
HRPWM— High-resolution pulse width modulator
32 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller TIDUDP0 – March 2018
and ±0.1° Accuracy Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
www.ti.com About the Author
TIDUDP0 – March 2018 Discrete Resolver Front-End Reference Design With C2000™ Microcontroller 33
Submit Documentation Feedback and ±0.1° Accuracy
Copyright © 2018, Texas Instruments Incorporated
IMPORTANT NOTICE FOR TI DESIGN INFORMATION AND RESOURCES
Texas Instruments Incorporated (‘TI”) technical, application or other design advice, services or information, including, but not limited to,
reference designs and materials relating to evaluation modules, (collectively, “TI Resources”) are intended to assist designers who are
developing applications that incorporate TI products; by downloading, accessing or using any particular TI Resource in any way, you
(individually or, if you are acting on behalf of a company, your company) agree to use it solely for this purpose and subject to the terms of
this Notice.
TI’s provision of TI Resources does not expand or otherwise alter TI’s applicable published warranties or warranty disclaimers for TI
products, and no additional obligations or liabilities arise from TI providing such TI Resources. TI reserves the right to make corrections,
enhancements, improvements and other changes to its TI Resources.
You understand and agree that you remain responsible for using your independent analysis, evaluation and judgment in designing your
applications and that you have full and exclusive responsibility to assure the safety of your applications and compliance of your applications
(and of all TI products used in or for your applications) with all applicable regulations, laws and other applicable requirements. You
represent that, with respect to your applications, you have all the necessary expertise to create and implement safeguards that (1)
anticipate dangerous consequences of failures, (2) monitor failures and their consequences, and (3) lessen the likelihood of failures that
might cause harm and take appropriate actions. You agree that prior to using or distributing any applications that include TI products, you
will thoroughly test such applications and the functionality of such TI products as used in such applications. TI has not conducted any
testing other than that specifically described in the published documentation for a particular TI Resource.
You are authorized to use, copy and modify any individual TI Resource only in connection with the development of applications that include
the TI product(s) identified in such TI Resource. NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE TO
ANY OTHER TI INTELLECTUAL PROPERTY RIGHT, AND NO LICENSE TO ANY TECHNOLOGY OR INTELLECTUAL PROPERTY
RIGHT OF TI OR ANY THIRD PARTY IS GRANTED HEREIN, including but not limited to any patent right, copyright, mask work right, or
other intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information
regarding or referencing third-party products or services does not constitute a license to use such products or services, or a warranty or
endorsement thereof. Use of TI Resources may require a license from a third party under the patents or other intellectual property of the
third party, or a license from TI under the patents or other intellectual property of TI.
TI RESOURCES ARE PROVIDED “AS IS” AND WITH ALL FAULTS. TI DISCLAIMS ALL OTHER WARRANTIES OR
REPRESENTATIONS, EXPRESS OR IMPLIED, REGARDING TI RESOURCES OR USE THEREOF, INCLUDING BUT NOT LIMITED TO
ACCURACY OR COMPLETENESS, TITLE, ANY EPIDEMIC FAILURE WARRANTY AND ANY IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL
PROPERTY RIGHTS.
TI SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY YOU AGAINST ANY CLAIM, INCLUDING BUT NOT
LIMITED TO ANY INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON ANY COMBINATION OF PRODUCTS EVEN IF
DESCRIBED IN TI RESOURCES OR OTHERWISE. IN NO EVENT SHALL TI BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL,
COLLATERAL, INDIRECT, PUNITIVE, INCIDENTAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES IN CONNECTION WITH OR
ARISING OUT OF TI RESOURCES OR USE THEREOF, AND REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
You agree to fully indemnify TI and its representatives against any damages, costs, losses, and/or liabilities arising out of your non-
compliance with the terms and provisions of this Notice.
This Notice applies to TI Resources. Additional terms apply to the use and purchase of certain types of materials, TI products and services.
These include; without limitation, TI’s standard terms for semiconductor products http://www.ti.com/sc/docs/stdterms.htm), evaluation
modules, and samples (http://www.ti.com/sc/docs/sampterms.htm).
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2018, Texas Instruments Incorporated