You are on page 1of 6

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 50, NO.

4, AUGUST 2001

965

Performance Analysis and Compensation of M=T -Type Digital Tachometers


Richard C. Kavanagh, Senior Member, IEEE
AbstractNew analyses are presented of the widely used -type digital tachometer. This device incorporates accurate time measurement with pulse counting. It is shown that the accuracy of velocity measurement in real implementations is significantly poorer than indicated previously. Encoder nonidealities are found to introduce a bias in the measured velocity output. A significant rms output error can also result. The insensitivity of the error to the form of the encoder noise model is demonstrated, and two analyses of differing complexity are presented. These permit calculation of the tachometer error measures, based on a knowledge of the magnitude of the error characteristics of the encoder. This facilitates the implementation of a compensation function that will reduce the influence of the bias. Experimental results are presented which demonstrate the existence of the bias, verify the validity of the derived formulae, and show the benefit to be gained by compensation. Index TermsDigital measurements, error analysis, error compensation, optical transducers, optical velocity measurement, probability, quantization, tachometers.

Fig. 1. Operation of the auxiliary counter in an M=T tachometer.

Henceforth, the nominal angular position change between encoder output transitions and the number of such transitions occurring per sample-time are used as the units of position and velocity (rate), respectively. Using these units, the estimated rate is defined by (2) in code changes (transitions) per sample-time (this unit is ab in the figures below). At very low breviated to Transitions speed, when no transition has occurred during a sample-period, the velocity calculation is adapted to (3) where edge. is the number of samples since the previous encoder

I. INTRODUCTION NUMBER of digital tachometers which have been de-type scribed in the literature [1][4] are based on the digital tachometer (MTDT) developed by Ohmae, et al. [5]. The application of this technique is motivated by the fact that the velocity value obtained from a digital position transducer via simple pulse counting (or digital differentiation of the output) will result in poor resolution due to spatial quantization. However, the addition of an auxiliary counter in the MTDT allows compensation for the fact that encoder edges occur asynchronously with the sampling instants of a microprocessor- or DSPbased control or instrumentation system operating with a fixed sample interval. The principle of the tachometer is illustrated in Fig. 1; a highaccurately. This frequency counter can be used to measure counter is reset at an encoder edge. Its use facilitates the calculation of an accurate velocity estimate (in units of code changes per second) (1) (It is worth noting that this concept, which was independently developed for use in high-accuracy motion control applications, has similarities to the work of Nutt [6] and, more recently, Kalisz et al. [7], [8] on time-interval measurement).
Manuscript received May 4, 2000; revised April 6, 2001. The author is with the Department of Electrical and Electronic Engineering, University College Cork, Cork, Ireland (e-mail: r.kavanagh@ucc.ie). Publisher Item Identifier S 0018-9456(01)07353-3.

II. INFLUENCE OF ENCODER ERRORS ON PERFORMANCE Analyses have been presented by Prokin [3] and Ohmae et al. [5] that illustrate the very high potential accuracy of the velocity measurement obtained using an MTDT. These analyses have concentrated on the error that results from the digital nature of the auxiliary counter. The relative error due to this ef, where fect is usually approximated at most rates by is the auxiliary counter frequency (for example, an unms and certainty of the order of 0.01% is expected if MHz). However, the actual performance is usually substantially poorer than indicated in such analyses due to the nonideal nature of the incremental encoders which provide the digital pulse-train inputs. These nonidealities have been well described and categorized by Yien [9]. The variation in encoder-edge locations from the ideal equidistant locations leads to both differential- and integral-type errors [10]. The former appear as high-frequency errors when viewed over the circumference of the encoder disk, while integral-type errors display a low-frequency (usually

00189456/01$10.00 2001 IEEE

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:560 UTC from IE Xplore. Restricon aply.

966

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 50, NO. 4, AUGUST 2001

once-per revolution) characteristic. The differential-type transition-noise will typically be the dominant error source in an MTDT. A first-order analysis, showing that this error can cause a significant rms error in speed measurement was briefly outlined in [11], in which it was also shown that substantial additional hardware is required if this error is to be reduced. More accurate analysis, to be described in this paper, shows that the transition noise introduces a bias into the velocity measurement, which is not removed by linear filtering techniques. This bias occurs because of the nonlinear nature of the MTDT velocity calculation. While usually small in magnitude, this error has potentially important consequences for high-accuracy measurement applications in which the MTDT is likely to be employed. III. TRANSITION NOISE MODEL It was illustrated in [12] that uniformly distributed noise can provide a reasonable model for the transition noise. It was also shown that the parameter describing the width of the transition region (i.e., the range of actual positions at which a change in digital position code occurs) can be obtained, for a particular sensor, by analyzing the error spectrum that results if a simple digital differentiator is used for shaft velocity measurement. However, the actual noise distribution will inevitably differ somewhat from the simple uniform distribution model. To investigate the influence of the noise model chosen, the errors caused by uniformly distributed noise are compared with those due to a truncated Gaussian distribution with the same standard deviation. Such a choice is motivated by the fact that one might expect a high probability that the code change will occur near the nominal position, but a simple Gaussian distribution is not physically realistic because of the ordered sequence of code changes. When the truncated distribution is limited to the range , where represents the standard deviation that would accrue without truncation, this variable can be shown to be related to the actual standard deviation with truncation by (4) where (5) By equating the standard deviation of the uniform and truncated Gaussian distributions, based on the assumption that the uni, formly distributed position error will be in the range the sensitivity of the MTDT error to the error characteristic can be investigated. In Fig. 2, computer simulations are used to illustrate the effects of transition noise error. It is clear from this figure that both models predict very similar velocity error characteristics. Therefore, the simpler uniform distribution can be employed for tachometer analysis. The encoder model used to predict tachometer performance has assumed a simple random distribution of encoder transition location errors. This assumption is not valid in a quadrature deAuthorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:560 UTC from IE Xplore. Restricon aply.

Fig. 2. Average and rms errors e and e associated with MTDT, assuming either uniformly distributed noise ( = 0:2), or truncated Gaussian noise (k = 2) (portions of the plots are shown magnified by 360% to aid discrimination of the very similar curves).

coded system if the errors are mainly due to phasing errors between positive and negative transitions of a particular channel and/or between channels (state width errors). The model is still found to give a good approximation to the system behavior, but with reduced accuracy, as demonstrated below. IV. ANALYSIS OF THE MTDT The tachometer is analyzed using the encoder model shown in Fig. 3. A complete and exact analysis is deceptively difficult. Probability of overlap or, otherwise, between the sampling instants and the transition regions, is central to the analysis. When samples of the pulse count and auxiliary timer values are taken at a position that is in the transition region, the values sampled will depend on whether or not the position change has actually already occurred. This is illustrated in Fig. 4. A large number of distinct conditions are possible, particularly when the rate is close to an integer number of transitions per sample time, so that a double overlap condition becomes possible (i.e., when adjacent samples may occur in transition regions). Similar analysis has been undertaken when considering the intercept time problem in radar warning receivers [13]. While possible, a complete analysis yields very cumbersome expressions for both average and rms errors. Two simplified analyses are presented in this paper. The first is a simple firstorder analysis that yields an intuitive insight into the system operation. The second is more accurate and involved and produces

KAVANAGH: PERFORMANCE ANALYSIS AND COMPENSATION OF

-TYPE DIGITAL TACHOMETERS

967

so that the average error is approximated by

(8) and the mean-squared error by


Fig. 3. Encoder model for MTDT analysis.

(9) the error is defined instead by When the corresponding error measures being ,

(10) and

Fig. 4. Relationship between sample interval T and actual encoder transition locations [in (a) the first sample occurs prior to the transition, in (b) it occurs after].

(11) In Fig. 5, these error estimates (Approximation I) are compared with those obtained by a simulation in which the errors are averaged over 60 000 samples for each input rate (the rms error is for , corresponding to the approximation close to , which was utilized in [11]). B. More Accurate Approximation It is clear that the above analysis is not accurate in its estimate of average error. This is because it does not reflect a number of facts. There is a higher probability that a sample instant will occur during an interval in which the transition noise results in a longer than average position variation between transitions. The probability that the digital position change , rather than , is higher when the transitions is and have a wider corresponding to than average separation. This can be related to the random variable . The nature of the probability density function (p.d.f.) govtimer values varies when the sample inerning the stant occurs somewhere in the transition region associated with a particular digital position. The sample instant may occur before the actual transition location, in which case the transition of relevance will have occurred in the previous transition region, approximately one bit previously, as illustrated earlier in Fig. 4(a). This is found to result in the standard triangular p.d.f. However, when the sampling instant has already occurred [as illustrated in Fig. 4(b)], the p.d.f. of the time interval used in the velocity calculation is found to change. Taking these effects into account, it is shown in the Appendix that a more accurate estimate of average measured speed pre-

accurate error prediction formulae at most input rates. However, a simplified linear interpolation is used to yield an approximate expression for sensor bias at those rates for which double overlap is possible. A. Simple Approximation The actual digital position change, as indicated by the main due to the transition noise, counter, is in error by where and are two manifestations of the uniformly distributed transition noise process. Therefore, the error associated with the digital differentiation of the main counter output is represented by a triangular distribution, (6) If the input rate is transitions per sample time, the average value of , the position change per sample will equal the actual speed (rate) of the encoder shaft in code changes per sample , or time (the actual digital position change is usually ) where represents the largest integer number that is less than, or equal to, the argument. The time duration corresponding to the values of the auxiliary counter at successive samples will differ from that expected of a noise-free system by an amount (assuming ), where represented by the variable is the probability density function of . The corresponding velocity measurement error is (7)

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:560 UTC from IE Xplore. Restricon aply.

968

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 50, NO. 4, AUGUST 2001

Fig. 6. Comparison between uncompensated and compensated experimental bias measurements, simulation predication, and theoretical approximation (a portion of the plot is shown magnified by 360% to aid discrimination of the very similar curves).

mates of the average error that are very close to those generated . by time-domain simulation, particularly when V. EXPERIMENTAL VERIFICATION A low-cost, 500-cycle per revolution encoder was tested using a low-velocity, high-inertia rig in quadrature-decoder ms, mode (given 2000 transitions per revolution and corresponds to 1.5 rpm). Examination of the a rate of error spectrum of a simple digital differentiator applied to the digital position derived from the encoder pulses can be used to estimate the magnitude of the encoder transition noise [12]. . This analysis yielded The average error is measured experimentally by rotating the encoder at close to constant speed1 . In Fig. 6, the measured error derived using Approxiis compared with the estimate of mation II, and with that predicted by a time-domain computer simulation of an encoder with the error characteristics assumed in this paper. The curves match very well, except at those rates that are close to multiples of four, and at very low rates. The former rates equate to an integer number of encoder cycles per sample-time (and compensation can be turned off at these rates). The deficiency of the model at these rates can be explained by the deterministic variation in state widths that exists in a quadrature decoded system. However, the approximation is good at most rates and can be used to reduce the steady-state bias in systems where such bias would be significant. method at Based on the velocity estimated using the each sample, and a knowledge of the transition noise figure of the sensor, compensation is achieved by simply subtracting the error measure obtained using an appropriate formula. (12), which is used to achieve the compensated output displayed in , Fig. 6, is accurate when is greater than approximately while (8) and (10) can be used at lower rates. When the rate is , it is found heuristically that reasonably large approximates very closely to (12) and is therefore suitable for simplified real-time implementation.
1The use of a high-inertia test-rig ensures that the speed variation is very small during each test. The unavoidable variation will cause a slight integral error that will alter the error measure at close to integer rates [10]. However, its effect is usually much less than that of differential error.

Fig. 5. Comparison between error measures (rms and average errors) obtained using computer simulation and estimated by Approximations I and II (the latter employed to estimate e only).

dicted by the MTDT can be derived. This derivation produces the following rate estimate when the actual rate is

(12) , and , where represents the when fractional value of . This latter condition guarantees that two adjacent sample instants will not both be in transition regions. is close to zero To avoid a more cumbersome analysis when or one, use is made of the experimental observation that (12) is . A linear interpolation for accurate when the average velocity error is postulated for other rates

(13) is the integer closest to . It is shown where in Fig. 5 that this approximation (Approximation II) yields estiAuthorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:560 UTC from IE Xplore. Restricon aply.

KAVANAGH: PERFORMANCE ANALYSIS AND COMPENSATION OF

-TYPE DIGITAL TACHOMETERS

969

TABLE I POSSIBLE OPERATING CONDITIONS AND THEIR RESPECTIVE PROBABILITIES WHEN 2" < s < 1

hi

0 2"

VI. CONCLUSION The widespread use of the tachometer is justified by the much higher accuracy achieved relative to a simple pulsecounting technique. However, it has been shown in this paper that the nonideal characteristics of the optical (or other) encoder used are likely to have a detrimental effect on the measurement accuracy, greatly increasing the rms error and introducing a bias into the measurement. Such errors tend to be accentuated in quadrature decoded systems when phasing error between the two encoder channels can represent a sizeable error source. The plots presented of the error measures as a function of shaft rate show that the relative error measures are significant at low input rates. Besides gaining a new insight into the operation of this measurement, the approximations presented in this paper can be used to implement a compensation routine that can reduce the bias term at the sensor output. However, reduction of rms error requires use of an improved sensor or additional filtering. While the use of quadrature decoding in encoder-based systems can improve positional resolution, an MTDT operating on a single transition per encoder cycle will usually yield significantly lower velocity estimation errors. APPENDIX Table I shows all possible conditions that can occur when the rate is not close to an integer value. When this assumption is not valid, the double overlap condition, in which consecutive samples may occur in transition regions of the encoder, leads to further cases. The entries in the table are explained by taking one of the more complicated casesCase 4as an example. Then, the is in the transition region. sample corresponding to The position of the sample relative to the nearest nominal transition location (nearest integer when using units of bits and bits . The probper sample time), denoted by , is in the range ability that it is to the left of (i.e., occurs before) the actual tranand this is covered by Case 3. The probsition is ability of either Cases 3 or 4 occurring is , equally divided between the two cases.
Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:560 UTC from IE Xplore. Restricon aply.

Fig. 7. (a) Case 4: the p.d.f. of the variation in T ; (b) corresponding p.d.f. for Case 6.

In Case 4, the distribution pertaining to the auxiliary-timer value corresponds to the domain , with a uniform probability distribution over that domain [the magni]. The interval has the tude of the p.d.f. being usual triangular p.d.f. about its nominal value. The p.d.f. of the variation in due to the difference of the two random variables ] is denoted by , [where shown in Fig. 7(a). It is clear that the shape of the p.d.f. varies . The probability that the sample is with , where after the transition location is . Therefore, the average velocity estimate is (14) p.d.f. term reflects the fact that the where the probability that the sample instant occurs before the transition varies linearly from 0 to 1 across the transition region.

970

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 50, NO. 4, AUGUST 2001

The average velocity is obtained by adding the integrals related to the various cases above, each integral being multiplied by the probability of occurrence of that case

(15) This equation can be solved using Mathematica to yield (12), after some manual reformulations. REFERENCES
[1] G. Bucci and C. Landi, Metrological characterization of a contactless smart thrust and speed sensor for linear induction motor testing, IEEE Trans. Instrum. Meas., vol. 45, pp. 493498, Apr. 1996. [2] R. C. Kavanagh, J. M. D. Murphy, and M. G. Egan, A high-performance positioning system using improved digital speed sensing, in Proc. 3rd. Euro. Conf. Power Electron. Applicat. (EPE89), Aachen, Germany, Oct. 1989, pp. 9971002. [3] M. Prokin, Double buffered wide-range frequency measurement method for digital tachometers, IEEE Trans. Instrum. Meas., vol. 40, pp. 606610, June 1991. , Extremely wide-range speed measurement using a [4] double-buffered method, IEEE Trans. Ind. Electron., vol. 41, pp. 550559, Oct. 1994. [5] T. Ohmae, T. Matsuda, K. Kamiyama, and M. Tachikawa, A microprocessor-controlled high-accuracy wide-range speed regulator for motor drives, IEEE Trans. Ind. Electron., vol. IE-29, pp. 207211, Aug. 1982.

[6] R. Nutt, Digital time intervals meter, Rev. Sci. Instrum., vol. 39, pp. 13421345, 1968. [7] J. Kalisz, M. Pawlowski, and R. Pelka, Error analysis and design of the nutt time-interval digitiser with picosecond resolution, J. Phys. E, Sci. Instrum., vol. 20, no. 11, pp. 13301341, 1987. [8] J. Kalisz, R. Szplet, J. Pasierbinski, and A. Poniecki, Field-programmable-gate-array-based time-to-digital converter with 200-ps resolution, IEEE Trans. Instrum. Meas., vol. 46, pp. 851856, Aug. 1997. [9] C. Yien, Incremental encoder errors: Causes and ways to reduce them, in Proc. Intl. Incremental Motion Conf. (PCIM 92), Nrnberg, Germany, Apr. 1992, pp. 110121. [10] R. C. Kavanagh, Shaft encoder characterization via theoretical model of differentiator with both differential and integral nonlinearities, IEEE Trans. Instrum. Meas., vol. 49, pp. 795801, Aug. 2000. , Improved digital tachometer with reduced sensitivity to sensor [11] nonideality, IEEE Trans. Ind. Electron., vol. 47, pp. 890897, Aug. 2000. [12] R. C. Kavanagh and J. M. D. Murphy, The effects of quantization noise and sensor nonideality on digital-differentiator-based velocity measurement, IEEE Trans. Instrum. Meas., vol. 47, pp. 14571463, Dec. 1998. [13] I. V. Clarkson, J. E. Perkins, and I. M. Mareels, Number/theoretic solutions to intercept time problems, IEEE Trans. Inform. Theory, vol. IT-42, pp. 959971, May 1996.

Richard C. Kavanagh (M95-SM01) was born in Cork, Ireland, in 1961. He received the B.E., M.Eng.Sc., and Ph.D. degrees in electrical engineering from the National University of Ireland, Cork, in 1984, 1985, and 1998, respectively. He is a College Lecturer at the National University of Ireland, where he directs the Mechatronics Research Laboratory. He has previously worked as a Senior Research Scientist with PEI Technologies and as a Senior Project Engineer with SPS Laboratories, Ltd. His current research interests include improved sensor design through advanced signal processing, the analysis of quantization effects in data acquisition systems, and the design of hardware-in-the-loop test systems.

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:560 UTC from IE Xplore. Restricon aply.

You might also like