Software-Based Resolver-to-Digital
Software-Based Resolver-to-Digital
net/publication/3219673
CITATIONS READS
136 14,597
3 authors, including:
All content following this page was uploaded by Santanu Sarma on 02 September 2014.
Software-Based Resolver-to-Digital
Conversion Using a DSP
Santanu Sarma, Member, IEEE, V. K. Agrawal, and Subramanya Udupa
Abstract—A simple and cost-effective software-based resolver- is used, which requires two low-pass filters to reject noise from
to-digital converter using a digital signal processor is presented. the R/D conversion loop. Consequently, this also results in a
The proposed method incorporates software generation of the re- considerable hardware requirement, in addition to that of the
solver carrier using a digital filter for synchronous demodulation
of the resolver outputs in such a way that there is a substantial amplitude demodulators, tracking errors at high speeds and
savings on hardware like the costly carrier oscillator and associ- out-of-lock conditions of the PLL. In [5], a low-cost solution
ated digital and analog circuits for amplitude demodulators. In for measuring the position by means of a standard resolver
addition, because the method does not cause any time delay, the and its implementation on a combined analog–digital board
dynamics of the servo control using the scheme are not affected. is proposed. The method uses a digital clock, and filtering
Furthermore, the method enables the determination of the angle
for a complete 360◦ shaft rotation with reasonable accuracy using of the harmonics from the digital clock is implemented to
a lookup table that contains entries of only up to 45◦ . Computer generate the carrier of the resolver. The method compromised
simulations and experimental results demonstrate the effective- the need for an accurate sinusoidal oscillator, resulting in a
ness and applicability of the proposed scheme. harmonic content in the resolver carrier and deterioration of the
Index Terms—Angle measurement, resolver converter, resolver- measurement performance. In [6] and [7], high-accuracy 360◦
to-digital (R/D) conversion. linearized converters are proposed. However, these techniques
also use considerable hardware, including analog amplitude
demodulators, analog multipliers, and glue logic for imple-
I. I NTRODUCTION menting the arcsine function, which are generally affected by
nonideal behaviors like offset and nonlinearity.
R ESOLVERS are very robust and cost-effective angular
position sensors that are extensively used in applications
like robots, machine tools, and radars. They are also used in
In this paper, a novel and cost-effective 360◦ linearized con-
verter is proposed, which includes software generation of the
many safety critical systems like aircraft, satellite antennas, resolver carrier using a single-multiplier sine–cosine generator
and electromechanical braking systems [1], [2]. They resemble and synchronous demodulation of the output quadrature signals
small motors and have magnetically coupled rotor and stator using the generated carriers. This allows saving on the costly
windings. The analog output of the resolver contains the angu- oscillator and hardware-efficient demodulation of the resolver
lar position information that is obtained in digital form using output, even in the presence of wide variations in the resolver
a resolver-to-digital (R/D) converter. Different methods [1]–[7] carrier. In addition, because the method does not cause any
exist in the literature, focusing on ways to improve the mea- time delay, the dynamics of the servo control system using
surement accuracy of the R/D converter; however, techniques the method is not affected. The delayless demodulation of the
that are cost effective and reasonably accurate and that can resolver output is achieved by accurately sampling the positive
be implemented using less hardware to reduce the weight and peak of the sinusoidal carrier using simple peak detection logic.
size, as preferred in space applications, are rarely found. For The obtained analog sine and cosine envelopes that contain
instance, in [3], a method for reducing the position error caused the angle information are digitized using an analog-to-digital
by the existence of nonideal resolver signal characteristics is converter (ADC). The digitized envelopes are divided to obtain
introduced by calibrating each resolver and R/D converter; the tangent of the angle. The corresponding angle is searched
then, correction of the R/D converter output is performed in from a lookup table (LUT) that contains values of only up to 45◦
real time. Although this method corrects most of the errors, using the quadrant, octant, and tangent or cotangent relations to
including those with an origin in the R/D converter, it is also determine the angle for a complete 360◦ shaft rotation without
very labor intensive and time consuming, requiring excessive any singularity in the arctangent computation. Apparently, these
signal processing and hardware. In [4], an R/D conversion types of logic can easily be accommodated in the processor that
method that uses a bang-bang type phase comparator for fast controls the servo system without the need for a separate R/D
tracking is proposed. The concept of a phase-locked loop (PLL) converter card, saving cost, weight, and space.
Manuscript received April 9, 2005; revised June 19, 2007. II. P RINCIPLE OF O PERATION OF A R ESOLVER
The authors are with the Control Systems Group, Indian Space Re-
search Organization (ISRO) Satellite Centre, Bangalore 560017, India (e-mail: This angular displacement sensor, which is widely used for
[email protected]). its fine resolution and accuracy, low output impedance, wide
Color versions of one or more of the figures in this paper are available online
at http://ieeexplore.ieee.org. temperature range of operation, small size, weight, and power
Digital Object Identifier 10.1109/TIE.2007.903952 consumptions, and simple and robust construction, operates
Fig. 1. (a) Operating schematic diagram of the resolver. (b) Resolver output signals.
on the principle of mutual induction, as in a transformer. It where A = gv V . The induced voltage in the other pair of
also provides the advantage of very high noise immunity when windings is given by
combined with synchronous demodulator, as well as very long
distance transmission of the output data, without severe corrup- vos1 = gv vref sin(θ) = A sin(θ) sin(ωc t). (3)
tion by noise, before being converted to a digital format in the
vicinity of the processor at a reasonable cost. A simplified block These two output signals voc1 and vos1 are called quadra-
schematic diagram of a resolver and the associated signals is ture signals. As the excitation or the carrier signal vref is
shown in Fig. 1. The rotor contains the primary coil, which an ac signal, clearly, the output voltages from the two-stator
consists of a single two-pole winding energized by an ac supply windings are amplitude modulated, as shown in Fig. 2. In
voltage given by other words, the carrier signal vref is modulated by the angu-
lar displacement motion θ of the rotor. The determination of
vref = V sin(ωc t) (1)
the angular position in the first quadrant (0◦ ≤ θ ≤ 90◦ ) can
where ωc is the frequency of the excitation or carrier signal to be obtained by using a constant gain. However, both signals
the rotor. The rotor is directly attached to the motor shaft whose are needed to determine the angular displacement (direction
rotation is measured. The stator consists of two sets of windings as well as magnitude) in all four quadrants (0◦ ≤ θ ≤ 360◦ )
placed 90◦ apart. In an ideal case, if the angular position of the without causing any ambiguity. If the angular speed of the
rotor with respect to one pair of stator windings is denoted by rotor is denoted by ω such that θ = ωt, the differentiation of
θ, then the induced voltages in the pair of windings is given by the quadrature signals gives the parameter gv that depends
primarily on the geometric and material characteristics of the
voc1 = gv vref cos(θ) = A cos(θ) sin(ωc t) (2) device and, without loss of generality, can be taken as unity.
SARMA et al. : SOFTWARE-BASED RESOLVER-TO-DIGITAL CONVERSION USING A DSP 373
vc1 = V cos(θ)
vs1 = V sin(θ) (6)
5) performance and accuracy improvements as the effects of Equations (9) and (10) can be rewritten in matrix form
parameter and environmental variations are reduced; using (8) as
6) an LUT-based arctangent computation using quadrant and
α
octant logic to avoid singularities and computationally s1 [n + 1] cos(ωc ) β sin(ωc ) s1 [n]
= (11)
efficient implementation of a 360◦ linear converter. s2 [n + 1] −α
β
sin(ωc ) cos(ωc ) s2 [n]
It may be noted that the DAC that converts the digital carrier
which is the state-space representation of the sine–cosine gen-
to its analog equivalent and the ADC used for acquiring the sine
erator with a zero input. This representation requires many
and cosine envelopes after demodulation should be selected
multipliers and can be implemented using five of them. To
based on the performance and the accuracy requirements. High-
arrive at a computationally efficient structure of the sine–cosine
resolution DACs and ADCs can produce further improvement
generator, a general second-order structure with no delay-free
in the performance and accuracy of the method.
loops [8] is considered, which is characterized by the following
The following subsection briefly describes the method of
equations:
generation of the sine carrier, associated peak detection logic
for synchronous demodulation, and arctangent computation us-
s1 [n + 1] 0 a s1 [n + 1] c d s1 [n]
ing quadrant and octant logic for full shaft angle measurement. = +
s2 [n + 1] 0 0 s2 [n + 1] e f s2 [n]
∗ ∗
a e + c a f + d s1 [n]
A. Carrier Generation = . (12)
e f s2 [n]
The carrier signal to the resolver is generated by using a
digital sine–cosine generator [6], which is basically a second- By comparing (11) and (12), one gets
order digital filter with its pole on the unit circle. There are β
many possible representations of this sine–cosine generator. e= − sin(ωc )
α
However, a single-multiplication structure with three associ- f = cos(ωc )
ated addition steps is used for computation-efficient software
a ∗ e + c = cos(ωc )
implementation. α
Let s1 [n] and s2 [n] be the two outputs of a digital sine–cosine a ∗ f + d = sin(ωc ). (13)
β
generator given by
By expressing the multiplier constants a and d as a func-
s1 [n] = α∗ sin(nωc )
tion of the multiplier constant c, and with some simple
s2 [n] = β ∗ cos(nωc ). (8) manipulation, one obtains the following five-multiplier repre-
sentation [8]:
From these equations, one can arrive at
s1 [n + 1] = α sin ((n + 1)ωc )
s1 [n + 1] 0 α(c−cos ωc ) s1 [n + 1]
= β sin ωc
s2 [n + 1] 0 0 s2 [n + 1]
α(1−c cos ωc )
=α sin(nωc ) cos(ωc ) + α cos(nωc ) sin(ωc ) (9)
s2 [n + 1] = β cos ((n + 1)ωc ) c β sin ω s1 [n]
+ c . (14)
=β cos(nωc ) cos(ωc ) − β sin(nωc ) sin(ωc ). (10) −αβ
sin ωc cos ωc s2 [n]
SARMA et al. : SOFTWARE-BASED RESOLVER-TO-DIGITAL CONVERSION USING A DSP 375
oscillator with zero-crossing detectors is used, the presence of Fig. 4. These singularities are avoided by suitably selecting
noise in the carrier will produce ambiguity in accurate peak the quadrant, octant, and the tangent or cotangent part of θ
detection, thereby introducing deviations from the expected that is always bounded by ±1, as shown in Fig. 4. In addition,
envelopes. The software-based approach can overcome these symmetrical properties exist between the tangent and cotangent
problems of noise and environmental degradation effects with curves in Fig. 5 that can be exploited to use an LUT that
the added flexibility of easily configuring the carrier frequency contains either arctangent or arccotangent values of only up to
and amplitude. Furthermore, the change in the carrier frequency 45◦ and to use suitable reverse indexing to get θ for a full shaft
and amplitude does not limit the method of demodulation and rotation. These conditions for selecting the quadrants are shown
R/D conversion. in Fig. 5.
Care needs to be taken so that boundary points in the
quadrants will not be repeated. The octant selection logic
C. Angular Position and Rate Computation for a
and the computation of θ using only the arctangent function
Full Shaft Rotation
values are shown in Fig. 6. The values of the arctangent
The sine and cosine envelopes that were obtained after function from 0◦ to 45◦ are stored in equal steps in an LUT
demodulation of the resolver quadrature signal are used to that determines the resolution of shaft angle measurement. By
compute the angular rotation θ. The division of the sine en- increasing the number of points in the table, the resolution
velope by the cosine envelope gives tan(θ), and the tangent can be improved. Furthermore, the computation of the rate can
inverse of that provides θ. It is to be noted that any amplitude be performed from the computed angular position either using
imbalance in the demodulated envelopes will cause error in forward or backward derivative operation. A better estimate of
the computed shaft angle, which can be avoided by calibrating position, as well as speed, can be achieved by canceling the
the resolver. Furthermore, the computation of tan(θ) will have systematic errors as in [9] and automatically calibrating the
singular points at multiples of π/2 that will create numerical system using adaptive techniques like recursive least squares
problems while implementing in the processor, as shown in filters [10].
SARMA et al. : SOFTWARE-BASED RESOLVER-TO-DIGITAL CONVERSION USING A DSP 377
Fig. 8. Error for different ADC and DAC resolutions with (a) and (c) 12-bit ADC and DAC, 16-bit LUT, and (b) and (d) 10-bit ADC and DAC, 16-bit LUT, at
300 and 600 rpm, respectively.
Fig. 9. Experimental setup used for the proposed software-based R/D converter.
Fig. 10. Experimental results with the proposed R/D converter. (a) Resolver simulator outputs. (b) Demodulation of quadrature signal voc1 . (c) Demodulation
of quadrature signal vos1 . (d) Demodulated envelopes. (e) Angle output with respect to the sine envelope. (f) Angle output with respect to the cosine envelope
at 300 and 600 rpm.
V. C ONCLUSION
peak-to-peak voltage from the resolver simulator output is
±5 V. Fig. 10(b)–(d) illustrates the synchronous demodula- A simple cost-effective software-based R/D converter has
tion of the resolver quadrature outputs. It can be observed in been presented, which requires significantly less hardware and
Fig. 10(c) that there is a negligible delay caused by demodu- computational resources for real-time implementation using a
lating the resolver outputs due to synchronous demodulation. DSP. The method includes processor-based generation of the
Fig. 10(e) and (f) shows the arctangent computation for a full resolver carrier and innovative synchronous demodulation of
360◦ rotation of the shaft in offset binary notations, with −5 V the outputs in such a way that the need for costly hardware
representing 000H and +5 V as FFFH. The plots reveal good like oscillators and amplitude demodulators is avoided. The
linearity of the converter from 0◦ to 360◦ . Furthermore, the sine–cosine carrier generator employs a single-multiplier struc-
error difference between the angles that were measured by the ture to generate both the sine and cosine carriers that allow ac-
proposed R/D converter and that of the actual angle is close to curate peak detection of the sinusoidal carrier by detecting the
the computer simulations, as shown in Fig. 8. zero crossover of the cosine part for synchronous demodulation
SARMA et al. : SOFTWARE-BASED RESOLVER-TO-DIGITAL CONVERSION USING A DSP 379
of the resolver outputs. A simple LUT-based angular position V. K. Agrawal received the M.Tech. degree in elec-
computation provides the shaft angle for a complete 360◦ trical and electronics engineering from the Indian
Institute of Technology, Kanpur, India, in 1978 and
shaft rotation without any singularity in the arctangent com- the Ph.D. degree in computer science from the Indian
putation. Moreover, the proposed method provides increased Institute of Science, Bangalore, India, in 1986.
flexibility and angle measurement with reasonable accuracy He has been with the Indian Space Research Or-
ganization (ISRO) Satellite Center, Bangalore, since
without introducing any additional time delay in the measured 1978, where he is currently the Group Director of the
angle. Simulation and experimental results that illustrate the Control Systems Group. He has worked on the de-
effectiveness of the scheme are presented. sign and development of onboard computer systems
for satellites with the state-of-the-art technology. His
research interests include parallel processing, fault-tolerant computing, VLSI
R EFERENCES design, and microprocessor-based design.
[1] A. Murray, B. Hare, and A. Hirao, “Resolver position sensing system
with integrated fault detection for automotive applications,” in Proc. IEEE
Sensors, Jun. 2002, vol. 2, pp. 864–869.
[2] R. Hoseinnezhad, “Position sensing in brake-by-wire callipers using
resolvers,” IEEE Trans. Veh. Technol., vol. 55, no. 3, pp. 924–932,
May 2006.
[3] D. C. Hanselman, “Techniques for improving resolver-to-digital conver- Subramanya Udupa received the B.Eng. degree in
sion accuracy,” IEEE Trans. Ind. Electron., vol. 38, no. 6, pp. 501–504, electronics and communication from Malnad Col-
Dec. 1991. lege of Engineering, Hassan, India, in 1984 and the
[4] C.-H. Yim, I.-J. Ha, and M.-S. Ko, “A resolver-to-digital conversion M.S. degree in software system from Birla Institue
method for fast tracking,” IEEE Trans. Ind. Electron., vol. 39, no. 5, of Technology and Science, Pilani, India, in 2005.
pp. 369–378, Oct. 1992. From 1985 to 1987, he was an R&D Engineer with
[5] C. Attaianese, G. Tomasso, and D. De Bonis, “A low cost resolver-to- Integrated Process Automation, Bangalore, India. In
digital converter,” in Proc. IEEE IEMDC, 2001, pp. 917–921. 1987, he joined the Indian Space Research Organi-
[6] M. Benammar, L. Ben-Brahim, and M. A. Alhamadi, “A novel resolver- zation (ISRO) Satellite Center, Bangalore, where he
to-360◦ linearized converter,” IEEE Sensors J., vol. 4, no. 1, pp. 96–101, is currently with the Control Systems Group. He has
Feb. 2004. been involved in the design and development of the
[7] M. Benammar, L. Ben-Brahim, and M. A. Alhamadi, “A high precision Attitude and Orbit Control Electronics and bus management unit for the INSAT
resolver-to-DC converter,” IEEE Trans. Instrum. Meas., vol. 54, no. 6, and IRS class of satellites. He is also the Head of the On-Board Software
pp. 2289–2296, Dec. 2005. Section, which is responsible for developing software for spacecraft.
[8] S. K. Mitra and C. S. Burrus, “Digital sine–cosine generator,” in Proc. 2nd
Florence Int. Conf. Digital Signal Process., Florence, Italy, Sep. 1975,
pp. 142–149.
[9] A. Bünte and S. Beineke, “High-performance speed measurement by
suppression of systematic resolver and encoder errors,” IEEE Trans. Ind.
Electron., vol. 51, no. 1, pp. 49–53, Feb. 2004.
[10] R. Hoseinnezhad, A. Bab-Hadiashar, and P. Harding, “Calibration of
resolver sensors in electromechanical braking systems: A modified re-
cursive weighted least-squares approach,” IEEE Trans. Ind. Electron.,
vol. 54, no. 2, pp. 1052–1060, Apr. 2007.
[11] Synchro and Resolver Conversion, G. Boyes, Ed. Norwood, MA: Memory
Devices, Ltd., Analog Devices Inc., 1980.