0% found this document useful (0 votes)
17 views6 pages

Precise method for linearizing sine and cosine signals in resolvers and quadrature encoders applications

The document presents a converter designed to linearize sine and cosine signals from resolvers and quadrature encoders for precise angle measurement. It introduces a new linearization technique that significantly improves the accuracy and reduces non-linearity errors compared to previous methods. The converter has been successfully tested and shows excellent agreement with theoretical predictions and simulations.

Uploaded by

VKB Library iisu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views6 pages

Precise method for linearizing sine and cosine signals in resolvers and quadrature encoders applications

The document presents a converter designed to linearize sine and cosine signals from resolvers and quadrature encoders for precise angle measurement. It introduces a new linearization technique that significantly improves the accuracy and reduces non-linearity errors compared to previous methods. The converter has been successfully tested and shows excellent agreement with theoretical predictions and simulations.

Uploaded by

VKB Library iisu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

-

The 3Mh Annual Conference of the IEEE industrial Electronics Society, November 2 6,2004, Busan,Korea

Precise method for linearizing sine and cosine signals in resolvers and
quadrature encoders applications

Mohd. A. Avlamadi', Member,IEEE,M. Benammar2, Member+IEEEand L. Ben-brahim3,SeniorMember, IEEE


'Qatar College of Technology, PO Box 36007, Doha, Qatar, e-mail : [email protected]
*Universityof Qatar, College of Technology, PO Box 36007, Doha, Qatar, e-mail : m.benammar9ieee.org
3Universityof Qatar, College of Technology, PO Box 36007, Doha, Qatar, e-mail : [email protected]

Abstract-Resolvers and quadrature encoders prottde angle. Another approach, based upon the absolute values of
electrical signal related to the sine and cosine of the me. the sine and cosine signals was proposed in [ 141. However
chanical shaft angle over the full 360 degree range. A con- this converter was characterized by a residual non-linearity
verter is described for the linearization of these signals, ena- resulting in a theoretical precision of0.12". In this paper, we
bling the angle to be determined using simple linear equations. present a converter incorporating a new linearization tech-
The converter is based upon the difference between the absw
nique, and characterized by a significantly better linearity
lute values of the transducer signals, together with a dedicated
linearization technique. The converter proiqdes a nearly per- and precision. The proposed converter, shown in Fig. 1, i s
fect triangular signal from which the angle is determined based upon the computation of the difference between the
unambiguously over the full range. The theoretical error of absolute values of the sine and cosine signals, followed by a
non-linearity may be cut down to 7x104 degree. The principle dedicated linearization technique applied to this difference.
and theory of operation, and computer simulation are given. This results in a triangular signal from which the angle is
The converter, full details of which are ghen, has been im- computed using an appropriate simple linear equation. In
plemenled using analogue electronic circuitW. The practical this paper, two forms of linearization techniques are pre-
performance of the converter has been evalualed using a sented and discussed. These are simpler andlor result in
PC-based test rig. T h e converter was successfully tested with a
lower residual error than the expressions described previ-
commercial resolver. The experimental results obtained are in
excellent agreement wilh theory and simulation. ously 1141, 1151.

The converter based on these two new techniques of lin-


1 INTRODUCTION earization, provides an instantaneous response. A prototype
converter was implemented using simple electronic building
Resolvers and quadrature encoders, used for mechanical blocs. A PCI-compatible multifunction card, equipped with
angle measurement, find applications in motion control. 12-bit-resolution analogue inputhutput channels, was used
Resolvers are highly rugged and reliable devices, suitable for to assess the experimental residual error of non-linearity of
harsh industrial environment; while quadrature optical en- the proposed converter. The converter was also tested using
coders are best suited to precision positioning applications. a resolver.
Both types of transducers provide sine and cosine electrical
signals in which the angle, to be measured, is encoded.
These signals may be fed into suitable converters in order to
determine the angle information from the transducer. Ideally
the converter should produce an output proportional to the
input angle. For encoder applications, a technique based
upon the numerical approximation of the arctangent from
the ratio of the sine and cosine signals of the transducer has 'P
been described [I], [2]. The information obtained kom these
techniques is combined with the crude position estimated Fig. 1: Schematic diagram of the proposed converter applied to a resolver
from the encoder pulses to yield a fine position resolution. In
resolver applications, various converter schemes, with dif- THEORY
AND SIMULATION
ferent degrees of complexity and precision, have been pro-
posed [3]-[15]. Most of these converters are based on Phase For simplicity reasons, the analysis below is given for ideal
Locked Loop (PLL)technique. With this method an esti- and normalized transducer signals. The difference between
mated angle is made to track the resolver angle through a the absolute values of perfect sine and cosine signals, noted
feedback Imp. This requires the COmpUVdtiOn of the sine and Vi(@), is given by:
cosine of the estimated angle, for example using look-up
tables. Other converters are based upon ratiometric tech-
niques and provide either the tangent or cotangent of the
shaft angle from resolver signals; their highly non-linear
Basic trigonometry applied to (1) reveals a piecewise
output requires look-up tables for the computation of the
pseudo-linear signal V@) as depicted in Fig. 2. The rdW
02004 IEEE
0-7803-8730-9/04/$20.00
1935

Authorized licensed use limited to: ISRO - Vikram Sarabhai Space Centre. Downloaded on December 28,2023 at 06:22:42 UTC from IEEE Xplore. Restrictions apply.
waveform Vo(0) compares reasonably with a normalized It is shown below that, by using a suitable linearization
perfect triangular waveform, PY(0). Obviously within each technique, V@) may be modified to give an almost perfect
of the four quadrants of input angle the slope is fit of PT(0). Thus the precision of the linear computation
APT(O)/AO=A/x, with evident application in linear angle of the angle from the linearized signal may be greatly en-
computation. hanced. The fact that E(@) is made up of harmonics pre-
sent in the absolute values of the input sine and cosine sig-
nals, suggests the possibility of finding a combination of
these signals having an expansion similar to (5). This
represents the basis for the proposed linearization tech-
nique: a compensation term C(O), generated from the in-
put signals and ideally equal to - E(@), is combined with
Vo(0) in order to produce a linearized signal VoL(0) as il-
lustrated in Fig. 3. It follows that,

In Fig. 3, the residual error is null at the angles nd4, en-


sured by Vo(S), and at the additional constraint angle,
forced by C(0).The amplitude of C(O), and the non-
linearity of V@) and particularly that of V o ~ ( 0 are )
exaggerated for clarity.

0 90 1BO 270 3M) 1

0 (degree)
Fig. 2: Simulation results of: (a) Nonnalized input sine and cosine
signals. and non-Linearized signal VJQ) :
(b) Raw amr E@)=Vd@)-ZT(@). n

This similarity between Vo(0) and IT(@may


) be illustrated
by comparing the Fourier expansions of both waveforms. A
straightforward but lengthy mathematical analysis shows -1
that the two signals have the same harmonics and compa- 0 45 135 im
rable component coefficients.

Vn(0) -'
=-z-
a
cos(n@)
n2-1
n=2,6,10,14,... (2)
and
n = 2,6,10,14,. .. (3)

The non-linearity of Vo(Q) within each quadrant of input


angle may be evaluated by its deviation from ET(@): 0 45 90 135 t80
E(@)= Vo(0)- Pro) (4)
@ (degree)
Fig. 2 shows a simulation of E(@) within the four quad-
rants of input angle; the maximum amplitude of E(@) is
4.2% of V@). Note that the direct linear computation of Fig. 3: Rinciple of linearization technique. (a) Raw signal. V O W ,perfect
the angle from V o ( 0 ) would result in a non-linearity error triangular wave, PT(@). and campensarion dgnal. C(Q) malching the raw
error E(@) at a suitable constraint angle, and resulting in a zero residual ermr
within kO0.O42xn14=+1 .go. Despite this large error, the sig- at that angle. (b) Result of linearization:&(e)= Vo(@)+C(B).
nal V@), in its simple form and without further lineariza-
tion, has been proposed by some workers I161 for lin- In practice, the raw error E ( 0 ) may not be eliminated com-
eararizing sine and cosine signals. pletely because generating a perfect compensation signal
C(Q) is a challenging task. Thus a minor and tolerable
The Fourier expansion of E(@) is given by the difference non-linearity may remain in V o ~ ( 0 this
) ; is evaluated by the

E ( @ )= ;
8 z[s
between (2) and (3):
-&-)cos(n@) n = 2,6,10,14, .. .
residual error, e(@)= V~L(0)-pr(O).Once the linearization
is carried out, the angle may be determined from the lin-
earized signal V o ~ ( 0 using
) a simple linear equation angle
-io-' (5) (the slope is A V,L/A @=: *4/lr) within each quadrant of in-
= -[120.19~0~(20)-54.37~0~(6@) put angle. The four quadrants are easity identified by using
x?
- 21.05c*s(10@)- 10.94c0s(l40) +...I

1936

Authorized licensed use limited to: ISRO - Vikram Sarabhai Space Centre. Downloaded on December 28,2023 at 06:22:42 UTC from IEEE Xplore. Restrictions apply.
simple booIean equations employing the signs of the sine (n=0,1,2,3, ...) , the chosen constraint angle e(Oc)=O
and cosine signals as reported previously in [14]. "clamps" the error to zero at further input angles (one in
each of the four quadrants of input). Note that because of
In previous communications [14], 1151the authors described function symmetry it is possible to restrict OCto the open
two compensation signal forms resulting in an improvement interval (0, d4). The relationship between K and 0, may
of linearity of Vo,(O). The compensation signal described in be derived by writing e(@-)= VOLI(OC)-PT(OC)= Va(Oc)+
[14] resulted in a residual error in the determination of 0 C~(OC)-PT(O~) = 0; simple analysis yields:
equivalent to &.12", while in [IS] a more complex lin-
earization signal resulted in an error ten times smaller. In the +cos@,
(4/w)Q, - 1 - S i n 0 ,
following, two forms of linearization signal are presented K= (9)
sin^, -2sinzOc -cos@,
and discussed separately. These are simpler and/or result in
lower residual error than the expressions described previ- Fig. 4 shows the maximum (peak) residual error of non-
ously. linearity versus constraint angle &. The results show that
the peak error is minimized for Qc -17.72", corresponding
to a value for K, approximately equal to 0.252. This result
A. Newly Proposed Method I in excellent agreement with the value of 0.253 estimated
a b v e , with reference to Fourier expansions of Cl@) and
Evidently, the error signal E(@) and the raw signal Vo(0) E(@). By using K=0.252 in (7) and combining with (1)
have the same harmonics, but the terms coefficients are dif- and (61, the residual error in the computation of 0 is equi-
ferent. From (2) and (3,the ratio of the terms coefficients oscillating within G.05" despite the simplicity of the ex-
of E ( @ )to those of V@) may be found as: pression of the compensation term, which is an important
4 1
R ~ r i o ( n ) = - - ( ~ - 1 ) + I ; n = 2 , 6 , 1 0 ,14 ,... consideration in practical implementation particulady
?rn when using analog electronic circuitry.
By computing this ratio for the various values for n, it is
easy to show that except for Rario(2)=0.045, all remaining
Finally Cl(@)and its Fourier expansion, comparable to that
Ratio(n=6, 10, 14, ...) are negative and comparable in
of E(@) given in (3,may be written as follows.
magnitude. Therefore, the first compensation term, Cl(@),
proposed in this work is based upon the manipulation of
= 0.2521sin 01- [cos Oi+ 1- 2sin Q]
C,(0)
Vo(0) in order to match E(@). From the analysis above it
should be possible to obtain a compensation signal, Cl(@), IO-^
= -[I 19.68 cos( 2@)- 57.60 COS( 6 0 )
by adding a cos (20) term to Vo(0) in order to modify the x
sign of the coefficient of the fundamental component of (2) - 2 0 . 3 6 ~ 0 ~1(0 0 ) - 1 0 . 3 4 ~ 0 ~1( 4 0 ) + ...I
without affecting that of the remaining harmonics.

C,(O)= K x + cos(2e)]=
[v,(0) + 1- 2sin 2(0)] (7)
K x [voce,

In this way the signs of the terms coefficients of -Cl(@)and


E(@) should be the same. The scaling factor, K, is used to
match the amplitude of the fundamental of Cl(@)to that of
E(@).

The Fourier expansion of Cl(@)may be obtained by substi-


tuting Vo(Q)from (2) in (7):
0 14

!$
- 012

010
z
5
E
By forcing the amplitude of the fundamental component of .a OM
B
C l ( @ )to match that of E(@), given in equation (3,a suit- OM
5 IO 15 20 25 SJ 35
able value for the scaling factor K may be estimated as Constraint angle, (degree)
K=0.253. The choice of a suitable value for K may be fur-
ther investigated as fallows, The trend of the residual error
curve depends on the value for the coefficient K as shown Fig. 4: Simulation of the residual error (difference between linearly computed
in Fig. 4. If the criterion of approximation is the minimiza- angle and true angle) when using the linearized signal VO,i(Qj=
tion of the maximum error, then the value for K is chosen VO(B)+CI(B).(Upper) Residual mor curves for e~values of 5.00. 10.00,
to force a zero error at a suitabIe constraint angle Oc, ren- 17.72, 20.00. and 25.00 degrees. (Lower) Peak value of the residual error
minimized for 0~-17.729 corresponding to K L-o.252.
dering the error curve qui-oscillating. In addition to the
zero error ensured by Vo(0) at the angles n d4

1937
Authorized licensed use limited to: ISRO - Vikram Sarabhai Space Centre. Downloaded on December 28,2023 at 06:22:42 UTC from IEEE Xplore. Restrictions apply.
B. Proposed Method 2 The result shows that the terms coefficients of C2(0)match
almost perfectly those of E(@) given i n (5). As a conse-
T h e residual error of 0.05" obtained with the first compen-
quence, the curve VoL2(0)=Vo(0)+Cz(O) is an excellent
sation term described above, is a result of slight mismatch
match of a perfect triangular wave WO);and the residual
between the linearization signal, Cl(@), and the raw error
error, as shown in Fig. 5, in the linear computation of 0 is
signal, E(@), it is intended to cancel out. This mismatch
extremely low.
may be demonstrated by the fact that the respective peak
positions of the two signals are located 0.7 degree apart. A
second form of linearizing signal is presented; this is based
ItI EXPERIMENTAL
on the first formula with a modification aiming at match-
ing the peak positions of the compensation signal and raw
error. The new compensation signal is as follows: The converter incorporating the compensation signal 1 was
implemented using simple analogue building blocs as shown
in Fig. 6.

Again the choice of the terms coefficients is made by se-


lecting suitable constraint angles (i.e. two in this case since
we have two coefficients A2 and 8 2 ) at which the residual
error is forced to zero. By choosing to minimize the maxi-
mum residual error, the values for the two coefficients may
be optimized numerically. A simple algorithm was written
to compute the maximum error for a range of values of the
terms coefficients of (1 I). By limiting these coefficients to
three decimal places only for practical implementation rea-
sons, the optimum values found were A2=0.606, &=0.489,
and A2/( 1 +B2)=0.407, and the resulting error in the com-
putation of 0 was within *7x104 degree as shown in Fig.
5. Note that the form of the linearizing signal a b v e (11)
should ensure a zero error at the angles n d 4 (n=O, 1,2,3,..)
independently of the values of A2 and BZ.However, the dis-
continuity of the error for the angles 11x12(blue line in Fig. Fig. 6: Circuit diagram of the sinelcosine linearim incorporating the first
compensationformula 1 described.The circuit was powered from A 5 V .
6 ) is attributed to the fact that the term coefficient
A2/(l+B2) has been rounded to 0.407, in order to use three
decimal places only. As shown in the figure (red line), if The implementation of the linearization signal Cl(@) re-
quired the squaring function, which may easily be carried
the coefficient in question is not rounded, the error is zero
out using analogue translinear techniques. For simplicity,
at the angle values of nd2.
the AD734 multiplier, which requires no external compo-
nents, was used as shown. The circuit was designed to op-
erate with 1SV-pp sine and cosine input signals, and pro-
duces a 9V p-p triangular output, V~LI(@). This is a sensible
choice, particularly because the converter is tested with a
PCI-ADC multifunction card characterized by a maximum
output of +lOV, while its input is limited to 6 V .Moreover
the maximum amplitude of VoLl(0) results in a convenient
and round figure of IOOmVldegree for the converter sensi-
tivity.
0 180
In order to assess the precision of the experimental circuit of
Fig. 6, a XI-compatible multifunction card (XI-ADC from
Fig. 5: Simulationof the residual error (blue line) in the computation of 8 from
Vo&@)= VO(B)+C>(B), where the mm coeficienls in (10) are A1=0.606, Blue Chip Technology) was used to interface the circuit to a
8.~0.489,and A2/(1+B2)=0.407.The curve in red shows the error without PC.The XI-ADC offers various features including eight
rounding the tumAd(ltB2) to three decimal places. differential or sixteen single ended analogue inputs and four
analogue outputs with 1Zbit resolution.
The Fourier expansion of C 2 ( 0 )was determined numeri-
cally, The converter of Fig. 6 was first tested with two quadrature
10" signals obtained from the PCI-ADC card (through two of its
CL(@)= -[120.17~0~(2@) - 5 4 . 3 6 ~ 0 ~ ( 6 0 ) (12)
a four analogue output channels) as shown in the setup of
- 2 1 . 0 7 ~ ~ ~ ( l O-Q
10.95~0~(
) 140) +...I Fig.7. The output, V,L,(0), of the converter was fed back to
the card (via one of the analogue input channels of the

1938
Authorized licensed use limited to: ISRO - Vikram Sarabhai Space Centre. Downloaded on December 28,2023 at 06:22:42 UTC from IEEE Xplore. Restrictions apply.
PCI-ADC) in order to compute the angle from the converter. the theoretical error curve, given in Fig. 5. The experimental
Because the true angle is known to the computer, this pro- error b u n d s are in good agreement with theory and simu-
cedure enables the determination of the experimental re- lation. Note that at 90°,the effect of gains rounding is ob-
sidual error of non-linearity of the converter. Evidently the vious as illustrated by simulation results for formula two
calcuIated error is the overall error of the converter, and (Fig. 5).
XI-ADC interface card. It is worth noting that the quan-
tization error of the 12-bit AID and DIA converters of the
PCI-ADC is equivalent to more than 0.022". This is because
- 0.10 , .
the full swing of VoLI(O)represents a variation of the angle
by 90", and even when using the full input range of the card
for logging VoL1(0) the resulting quantization error of the
A/Tl converter i s 90"/4095.

(I 30 60 90 120 150 180


0 (degree)

Fig.9: Exprrmental data of Fig. 8 plotced together wich the theoretical residual
error (solid line).

After its characterization, the converter was tested using sine


and cosine signals from a resolver (Global Drive MDSKA
071-22, 140) driven by a DC motor through a 10O:l reduc-
tion gear. The motor was operated in open loop (i.e. without
controlling the speed). Evidently the resolver produces
modulated signals which require demodulation in order to be
converted into time-independent sine and cosine signals as
shown in Fig. 10. The demodulation section [15] is
straightforward, and is not shown in the circuit diagram of
Fig. 7:F.xpe.rimenta1setup for the characterization of the converter shown in Fig. 6. Figure 11 depicts the results obtained by converting
Fig. 6. the resolver signals into a Iineitrized output signal, VoL1(@).
The linearity of V,,,(O) is clear, as predicted by theory and
The various offset and gain parameters of the electronic simulation. This enables the determination of the me-
circuit of Fig. 7 have been adjusted prior to the charac- chanical angle using a simple linear equation as described
terization of the converter. Fig. 8 depicts the experimental above.
residual error of the converter obtained by using the setup of
Fig. 7.

Fig. 10 Modulated and demodulated resolver sine and cosine signals. The
resolver was driven at 12 rpm.

Fig. 8: Experimental residual mroftheconvmer of Fig. 7 plotted versus the


true angle, within the range 0 to 180 degree. The horizontal scale i s 20 de- IV CONCLUSIONS
greeNolt. The vertical scale is 0.02 degree/volt.

A converter for linearizing quadrature signals has been de-


The figure was generated by plotting the residual error scribed. This converter is based upon the absolute values of
versus the true angle on the digital oscilloscope, via the two the sine and cosine signals together with a dedicated lin-
redundant output channels of the PCI-ADC card. The same earization technique, and produces a piecewise linear
data is shown i n Fig. 9 for the purpose of comparison with output from which the angle is determined in the full 360"

1939
Authorized licensed use limited to: ISRO - Vikram Sarabhai Space Centre. Downloaded on December 28,2023 at 06:22:42 UTC from IEEE Xplore. Restrictions apply.
range. Two forms of linearization have been proposed; the S. K Kaul, R. Koul. C.L.Bhat, I. K Kad& A KTickm, “Useof
a ‘look-up’ table improves the accuracy Of a lowsost re-
resulting theoretical error of non-linearity in the computa- solver-based absoluk shaft encoder,” Mepruremenr Science and
tion of the angle from the linearized converter output is T k h d o g Y , 1997. VOI8, pp. 329-331
theoretically 5x10” degree with the first technique, and
S.P. Vlahu, “Direct resolver Lo digital converter,” US Parent
below 7x104degree for the second. The converter incorpo- 5912 638,1999.
rating the first linearization technique has been imple-
mented using analogue electronic circuitry. The perform- J. G. Webster. Ed, ‘The Measurement, Instrumentation, and Sen-
ance of the prototype converter has been evduated using a sors Handbwk.” CRC Press and IEEE Press, 1999, pp. 6.128 ~

6141.
FC-based test rig and a commercial resolver. The experi-
mental results showed satisfactory agreement with theory G.A. Woolveg “Digital ”ducers.” Journal offhysics E: Sci.
and simulation. Insirum.,Dec 1982,Vol IS.No12,pp 1271-1280.

M.L. Gasperi & W.G. Onarheim, “Method and apparatus for COT-
recting resolver mors,”US Palent 4 933 674, 1990.

C.H. Yim, 1.1. Ha & M.S.KO,“A resolver-tedigital conversion


method for fast wcking.” IEEE trunsoctions on lndusrriol Elec-
tronics, Oct 1992. Vol39, No 5, pp. 369-378

PI D.C.Hanselman, “Techniques for improving resalver-tcedigital


conversion accuracy.” IEEE Trmsuctionr on Industrial Elec-
Ironics, Dec t991,Vol38,No6,pp501-504

D.C. HanseIman. “Resolver signal requirementsfor high accuracy


resolver-to-digital convenion.” /&E Tmnsactionr on Industrid
Elecrronics, Dec 1990, Vol37. No 6. pp 556-561
P.G. Serev & R.M Bogin. “Programmable limit switch system
using a resolver-tdgital angle converter,” US Purenr 4 51 1 884.
1985.

Eric Fletcher, “Digitalisation method of the value of an angle de-


Fig. 11: Experimental results obtained by feeding the resolva sine andcosine fined by its sine and cosine wigonometric coordinare,” European
signals to the converter described. The results show the inputs and output of Patent. EpO333070, t 989 (in French),
the converter within two full revolutions ofthe mtor of the resolver.
P.G. Serev, “Micrrxonnnller based resolver-tcdigital converter,”
USPareer4989001,1991.
REFERENCES M. Benammar, L. Ben-Brahim & Mohd A. Alhamadi, ” A Novet
Resolver-te360 Degree Linearized Convener” lEEE Sensors
[I] LBurke, 19. Moynihan, K Unterkaflerk, “Extraction of high Jooumol, Va1.4, No 1, 2004, pp. 96-101.
m l u t i o n position information from sinusoidal encoders” Con-
ference (Niimberg)Intelligent Motion Proceedings, PCIM2400, 1151 M. Benammar, L. Ben-Brahim& Mohd A. Alhamadi, “ A high
pp 217-222. precision resolver-bDC converter.” Submitted for publicolion in
IEEE Truns Instrum Meas. May 2003.
[2] D.Jouve & D. Bui, “influence of the motor feedback sensor on ac
brushIess servo drive performances PClM2003 Conference K. Williams & P.M. lacobsen, “Method oflineoriiing a sine and
Numberg May 20-22,2003. cosine signal,“ USparent US6590500B I , SUI, 8, 2003.

I940

Authorized licensed use limited to: ISRO - Vikram Sarabhai Space Centre. Downloaded on December 28,2023 at 06:22:42 UTC from IEEE Xplore. Restrictions apply.

You might also like