3
464 1000 Hz Range Voltage Inputs Effect Error I50 V 150VI 15V 2 ppm 300 V 300Vl 30V 1 ppm IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 31, NO. 3, SEPTEMBER 1988 10 KHZ Voltage Inputs Effect Error l50Vl 30V 9 ppm 3WVl 30V 9 ppm 0.0999990 -4 I 1 15 V 15 1 1.OOOWO I 31.5 1 0.499998 1 TABLE I11 VOLTAGE EFFECT UNDER AC VOLTAGE I I I - I 1 450 V I 450’41 1% I 1 ppm I 300V~I30V 1 9 ppn I ! 600 V j 6oOVl 1% I 5 ppm 1 3Wv=/3OV 1 1 ppm I 1- I I I I * In the experiment we have to do the calibration under 300V, due to the unsufficient power supply under 450V and 600V at 10 KHZ . angle errors at all required ratios are less than 200 ppm and 200 prad for 40 Hz-IO kHz), a high maximum voltage of 600-V rms., very low output impedance, small size, and light weight. Such an ac resistance voltage divider has been used in an ac stan- dard measurement system for more than a year. REFERENCES T. Guangqiu, “A composite amplifier with high accuracy,” Acta Me- trologica Sinica, vol. 6, no. 1, pp. 59-62, 1985. Z. Youfeng, “Principle analysis of ac high-voltage resistance di- vider,” NIM Monograph, 1975. L. Lingxiang, “Use of ac current comparator in ac resistance mea- surement,” Master’s thesis, 1981. Improved Data-Acquisition System for Microprocessor-Based Applications Using a Least Significant Word Algorithm MARIO BENEDETTI, VERONICA M. MORGENSTERN, AND DANIEL OSCAR CARRICA Abstract-A new technique to compress and expand a digitized sig- nal is presented in this paper. The proposed methodology allows the Manuscript received September 3, 1987; revised April 1, 1988. This work was supported in part by grants from CIC PBA, CONICET, and SUBCYT. The authors are with the Laboratorio de Instrumentacion y Control (LIC), Universidad National de Mar del Plata, Mar del Plata, Argentina. IEEE Log Number 8821910. storage memory to be cut in half and the sample frequency of the ac- quisition system to be doubled. It is useful in those cases in which the number of bits of the analog-to-digital converter is greater than the databus length of the microprocessorand the signal slew-rate is known. The proposed method also permits the clipping of unwanted spikes pre- sent in the signal. An application using a 12-bit analog-to-digital con- verter and an 8-bit microprocessor is given. 1. INTRODUCTION The use of microprocessors or personal computers in conjunc- tion with high-resolution analog I/O systems for the acquisition and subsequent processing of signals is a technique widely used today [I]-[14]. Due to the existence of very fast ADC’s, the sampling frequency is limited mainly by the speed of the microprocessor [ 151, [16]. Therefore, it is important to reduce the throughput time in order to obtain a higher sampling frequency. External memories can be a suitable solution [17]; however, the storage process must be done twice when the signal has been digitized with a higher resolution than the microprocessor databus word length. The knowledge of both the maximum slew-rate of the signal and the least significant word (LSW) suffices to estimate the remain- ing most significant bits (MSB) of the samples. This compression procedure reduces in half the required memory because only one storage action per sample is necessary and it allows the sampling frequency to be increased without changing the system resolution. This paper presents the theory and applications of this novel management procedure for a digitized signal. The suitable algo- rithms for off-line estimation using commercially available com- puters and microprocessors are given. 11. METHODOLOGY Let us assume that the acquisition system is built around an N- bit analog-to-digital converter and an m-bit databus microproces- sor, where N is greater than m. Then, the data compression of the acquired signal is achieved by storing the whole first sample, with length equal to N, and the rn least significant bits of all the other samples. In order to reproduce the original two-word data, the ev- olution of the signal between two consecutive samples is tracked. This is accomplished by performing the two’s complement differ- ence (A) between consecutive LSW that gives the true jump of the signal. Since the most significant bit of the result is used to indicate the sign, the absolute value of this difference must be less than In the case of an 8-bit microprocessor, if the actual LSW (PL2) minus the preceding LSW (PL1) is between 0 and + 127 (00 to 7F in HEX) the signal has increased; if A is between - 128 and 0 (80 to 00 in HEX), the signal has decreased (Fig. 1). If PH is the MSB of the samples, the new two-word data (02 = PH2 + PL2) can be estimated from both the previous two-word data (D1 = PH1 + PL1) and A: it is necessary only to do algebraic additions. 2”-1 For a decreasing signal PL2 E [PLl - 128 PLl] . Therefore, -128 5 A < 0 and 02 = 01 - (-A). For an increasing signal PL2 E [PLI PLl + 1271 Therefore, 0 5 A < 127 0018-9456/88/0900-0464$01 .OO O 1988 IEEE

Improved data-acquisition system for microprocessor-based applications using a least significant word algorithm

  • Upload
    do

  • View
    217

  • Download
    4

Embed Size (px)

Citation preview

464

1000 Hz

Range Voltage Inputs Effect

Error

I50 V 1 5 0 V I 15V 2 ppm

300 V 3 0 0 V l 3 0 V 1 ppm

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 31, NO. 3, SEPTEMBER 1988

10 K H Z

Voltage Inputs Effect

Error

l 5 0 V l 30V 9 ppm

3 W V l 30V 9 ppm

0.0999990

- 4 I 1 1 5 V 1 5 1 1.OOOWO I 3 1 . 5 1 0.499998 1 TABLE I11

VOLTAGE EFFECT UNDER AC VOLTAGE

I I I - I 1 4 5 0 V I 450’41 1% I 1 ppm I 3 0 0 V ~ I 3 0 V 1 9 ppn I ! 600 V j 6 o O V l 1 % I 5 ppm 1 3 W v = / 3 O V 1 1 ppm I 1- I I I I

* In the experiment we have to do the calibration under 3 0 0 V ,

due to the unsufficient power supply under 4 5 0 V and 6 0 0 V at 10

KHZ .

angle errors at all required ratios are less than 200 ppm and 200 prad for 40 Hz-IO kHz), a high maximum voltage of 600-V rms., very low output impedance, small size, and light weight. Such an ac resistance voltage divider has been used in an ac stan- dard measurement system for more than a year.

REFERENCES

T. Guangqiu, “A composite amplifier with high accuracy,” Acta Me- trologica Sinica, vol. 6, no. 1, pp. 59-62, 1985. Z. Youfeng, “Principle analysis of ac high-voltage resistance di- vider,” NIM Monograph, 1975. L. Lingxiang, “Use of ac current comparator in ac resistance mea- surement,” Master’s thesis, 1981.

Improved Data-Acquisition System for Microprocessor-Based Applications Using a Least

Significant Word Algorithm MARIO BENEDETTI, VERONICA M. MORGENSTERN, AND

DANIEL OSCAR CARRICA

Abstract-A new technique to compress and expand a digitized sig- nal is presented in this paper. The proposed methodology allows the

Manuscript received September 3, 1987; revised April 1, 1988. This work was supported in part by grants from CIC PBA, CONICET, and SUBCYT.

The authors are with the Laboratorio de Instrumentacion y Control (LIC), Universidad National de Mar del Plata, Mar del Plata, Argentina.

IEEE Log Number 8821910.

storage memory to be cut in half and the sample frequency of the ac- quisition system to be doubled. It is useful in those cases in which the number of bits of the analog-to-digital converter is greater than the databus length of the microprocessor and the signal slew-rate is known. The proposed method also permits the clipping of unwanted spikes pre- sent in the signal. An application using a 12-bit analog-to-digital con- verter and an 8-bit microprocessor is given.

1. INTRODUCTION The use of microprocessors or personal computers in conjunc-

tion with high-resolution analog I/O systems for the acquisition and subsequent processing of signals is a technique widely used today [I]-[14]. Due to the existence of very fast ADC’s, the sampling frequency is limited mainly by the speed of the microprocessor [ 151, [16]. Therefore, it is important to reduce the throughput time in order to obtain a higher sampling frequency. External memories can be a suitable solution [17]; however, the storage process must be done twice when the signal has been digitized with a higher resolution than the microprocessor databus word length.

The knowledge of both the maximum slew-rate of the signal and the least significant word (LSW) suffices to estimate the remain- ing most significant bits (MSB) of the samples. This compression procedure reduces in half the required memory because only one storage action per sample is necessary and it allows the sampling frequency to be increased without changing the system resolution.

This paper presents the theory and applications of this novel management procedure for a digitized signal. The suitable algo- rithms for off-line estimation using commercially available com- puters and microprocessors are given.

11. METHODOLOGY Let us assume that the acquisition system is built around an N-

bit analog-to-digital converter and an m-bit databus microproces- sor, where N is greater than m. Then, the data compression of the acquired signal is achieved by storing the whole first sample, with length equal to N , and the rn least significant bits of all the other samples. In order to reproduce the original two-word data, the ev- olution of the signal between two consecutive samples is tracked. This is accomplished by performing the two’s complement differ- ence ( A ) between consecutive LSW that gives the true jump of the signal. Since the most significant bit of the result is used to indicate the sign, the absolute value of this difference must be less than

In the case of an 8-bit microprocessor, if the actual LSW (PL2) minus the preceding LSW (PL1) is between 0 and + 127 (00 to 7F in HEX) the signal has increased; if A is between - 128 and 0 (80 to 00 in HEX), the signal has decreased (Fig. 1).

If PH is the MSB of the samples, the new two-word data ( 0 2 = PH2 + PL2) can be estimated from both the previous two-word data (D1 = PH1 + PL1) and A: it is necessary only to do algebraic additions.

2”-1

For a decreasing signal

PL2 E [PLl - 128 PLl] . Therefore,

-128 5 A < 0

and

0 2 = 01 - (-A).

For an increasing signal

PL2 E [PLI PLl + 1271 Therefore,

0 5 A < 127

0018-9456/88/0900-0464$01 .OO O 1988 IEEE

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL

DECREASE + INCREASE

0 7F HEXADECIMAL eo

-128 0 127 DECIMAL

f255 A Fig. 1. Possible intervals of two's complement difference ( A ) between two

LSW when IAI I 128.

NOISE SIGNAL NOISE

DECREASE INCREASE

b I 1 , PL2-PLl I

' 0 : @ ' a ; 0 ' 80 7F HEXADECIMAL

- 128 127 DECIMAL

- A M A M

Fig. 2. Possible intervals of two's complement difference ( A ) between two LSW when 1A1 < A M .

and

0 2 = D1 + A

where ( - A ) is the two's complement of A . In order to keep the absolute value of A lower than 128, it is

necessary to know the relation between the minimum sampling fre- quency allowed (A,,,) and the maximum signal slew-rate (SR,,,). If we use an ADC of N bits, the maximum jump voltage permitted (V,,,) between the two samples is

V,,, = 127 * Vfy /2N

where VfT is the ADC full-scale voltage. Therefore,

f r m m = SRmax * 2" / ( f s * v') < 127.

When the above inequality is satisfied, it is possible to make a selective filtering operation of the acquired signal. As shown in Fig. 2 , there are four possible intervals where PL2 can be found when the absolute value of A M is less than 127

Interval 1: PL2 E [PLI - 128; PLI - A M ]

Interval 2: PL2 E [PLI - A M ; P L l ]

Interval 3: PL2 E [ P L l ; PL1 + A M ]

Interval 4: PL2 E [PLI + A M , PLI + 1271.

Within intervals 2 and 3 the sampled values are the correct ones, because they satisfy the limits imposed by the signal slew-rate. It is obvious that this is not the case for those values lying in intervals 1 and 4, since here the jump between two consecutive samples is greater than A M . In this instance it appears that the signal was affected by some disturbance which has to be accounted for. One possible strategy is to perform a clipping action by giving to the jump the maximum allowed variation, which is equal to A M

Interval 1 : 0 2 = D1 - A M where A < - A M

Interval 2: 0 2 = D1 - ( - A ) where A 2 - A M ; A < 0

Interval 3: 0 2 = 0 1 + A where A 5 A M ; A > 0

Interval 4: 0 2 = DI + A M where A > A M .

37, NO. 3, SEPTEMBER 1988 465

LOAD FIRST Ptii AND PLi

1

I LOAD PL2 1 *;~=--.-. No PLl-R2 No PL2-Rl

M7

IpLI1pL2p*.pHIl INC.SWCH POINTER

Fig. 3 . Flowchart of the proposed algorithm.

P(KBAR) SERIE:PIRUM TEST I 2.5

PMAX = 2074 BAR

00 I O 2 0

(a)

P(K8AR) SERlE PlRUM TEST I 2 5

PMAX.2074 BAR

T(MS)

00 I O 2 0 I

(b) Fig. 4. (a) Acquired signal with an unwanted superimposed jump. (b) Es-

timated signal using an LSW algorithm.

If an unwanted jump of duration t, is superimposed on the signal, the proposed method does not lose its ability to follow the signal as long as t , is less than or equal to t,,,,, where

trma = 2N * T s / ( A M * 127)

where T, = l / f , .

3. A flowchart describing the proposed algorithm is given in Fig.

111. RESULTS The experimental work was implemented using a 12-bit ADC,

Type 7572 with conversion time of 5 ps along with the 8502 mi- croprocessor working with a 2-MHz clock. The throughput time was 6.5 ps, which means an improvement of 5.5 ps with respect to the conventional methodology.

The algorithm was applied to analyze pressure signals from pi-

466 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 31, NO. 3, SEPTEMBER 1988

ezoelectric sensors. A pressure versus time plot with an unwanted superimposed jump is shown in Fig. 4(a). The estimated signal using the LSW algorithm is presented in Fig. 4(b). This figure re- veals how the algorithm attenuates the positive unwanted jump without affecting the data. The same results were obtained when negative instead of positive spikes were present.

IV. CONCLUSIONS

A new technique to compress and expand a digitized signal is presented in this paper. The proposed methodology allows halving the storage memory and doubling the sample frequency of the ac- quisition system without losing the system resolution. It is useful in those cases in which the number of bits of the analog-to-digital converter is greater than the databus length of the microprocessor and the signal slew-rate is known.

In cases where the sampling time or the memory capacity are tradeoff variables, the present method affords an interesting option.

In addition, the algorithm allowed the attenuation of the un-

Multistage Digital Prefiltering of Noisy Tachometer Signals

SEPPO J. OVASKA

Abstract-In this paper, a multistage digital prefiltering concept is discussed. The prefilter is implemented by using multirate signal pro- cessing techniques, and it contains both linear and nonlinear sub-fil- ters. Firstly, the impulsive and wide-band noise components are atten- uated by a cascade of a standard median filter {SMF} and a low-order Hanning window {HW}. Secondly, a multirate digital filter is used to attenuate the 50/60-Hz power line frequency and its harmonics. The multirate principle with oversampling and decimation is used to reduce the complexity of the required analog anti-aliasing filter. The multi- stage filter was tested in a simulation environment and the results were satisfactory.

wanted signal without affecting the useful one, making possible a pre-processing clipping action. I . INTRODUCTION The quality of measurements can usually be improved by using

ACKNOWLEDGMENT accurate sensors, e .g . , a precision tachometer for measuring the angular velocity of a rotating motor shaft. However, different types of electrical interferences distort the analog output signal in an in-

The authors are grateful to Prof. John D. Landes for his help with the English revision.

REFERENCES

C. K. Chow, S. S. M. Wang, T. Kancko, and T. R. Perry, “An experimental data-acquisition system for ultrasound imaging,” IEEE Trans. Instrum. Meas. , vol. IM-28, 1979. S. A. Tyuluman, D. C. Schroder, and M. E. Austin, “A micropro- cessor based system for the monitoring and control of a solar instal- lation,” IEEE Trans. Ind. Electron. Contr. Instrum., vol. IECI-27, Feb. 1980. Y. Kunura, K. I. Hasegawa, and A. Sekiguchi, “A microprocessor- based system for processing redundant instrumentation signals,” IEEE Trans. Ind. Electron. Contr. Instrum., vol. IECI-27, Aug. 1980. G. A. Alameda, J. A. Bennet, and R. R. Birge, “General purpose microcomputer-based data-acquisition and laser control circuitry for use in one-photon and two-photon laser spectroscopy,” Rev. Sci. In- s tr . , vol. 52, Nov. 1981. R. M. Williams, J. R. Haumann, and R. V. White, “A battery-op- erated data-acquisition system,” IEEE Trans. Instrum. Meas. , vol. IM-32, June 1983. G. P. Rao, D. C. Saha, T. M. Rao, K. Aghoramurthy, and A. Bhaya, ‘‘A microprocessor-based system for on-line parameter identification in continuous dynamical systems,” IEEE Trans. Ind. Electron. , vol.

“CMOS-pP compatible 8-bit ADC, AS7574,” in Data-Acquisition Components and Subsystems Catalog, Analog Devices, Inc., MA, 1980. SDK 85 System Design Kit User’s Manual, Intel Corp., CA, 1978. MCS-85 User’s Manual, Intel Corp., CA, Jan. 1978. “Fast, Complete Converter with Microprocessor Interface, AD574,”

IE-29, Aug. 1982.

Data-Acquisition Components and Subsystems Catalog, Analog De- vices, Inc., MA, 1980.

[ 111 G. Sridharan, “Microcomputer-based synchronous multichannel data- acquisition system,” IEEE Trans. Ind. Appl . , vol. IA-31, Nov. 1984.

[ 121 “Analog-to-digital conversion techniques with the M6800 micropro- cessor system,’’ Application Note, AN 757, Motorola Inc., 1981.

[I31 “CMOS analog digital converter chips easily interface to 8080A mi- croprocessor systems,” National Semiconductors Application Note 200, 1980.

[ 141 Data Translation 1987, Application Handbook. [I51 “12-bit ADC chips offer speed and easy microprocessor interface,”

Electron. D e s . , vol. 30, no. 5, 1982. [16] B. Gillings, “New design techniques yield very high-speed bipolar

8- and 12-bit microprocessor compatible analog-to-digital convert- ers,” Electro 82.

[ 171 M. Benedetti and D. Fernandez, “Fully programmable microproces- sor controller Mossbauer spectrometer,” Rev. Sci. Instr. , vol. 52, no. 9, 1981.

dustrial operating environment. The distortion can be divided into four main classes:

1 ) Wide-band ripple (e.g., white noise); 2 ) Impulsive noise (e.g., high voltage spikes); 3) Power line frequency (50 or 60 Hz) and its harmonics; 4) Narrow-band noise (e.g., system resonances). A large number of contributions have appeared in the literature

concerning the implementation of various noise filtering schemes,

The nonlinear filtering algorithms (e.g., the standard median filter and its extensions) are already well-known/proven in such areas as speech processing [ 11 and 2-D image processing [SI. There is also much potential in applying nonlinear filtering algorithms to automatic control and instrumentation. However, these areas cur- rently prefer conventional linear filters (e.g., lowpass or band- stop), although they do not always give satisfactory results with impulsive and wide-band noise.

In this paper, we present a complete prefiltering approach that can be used in different types of measurement applications [6]. This approach is application-independent and almost hardware-indepen- dent, with the exception of an optional first-order analog anti-al- iasing filter. The independence is achieved by using a multirate digital filter with oversampling and decimation, instead of a com- plex and inflexible analog anti-aliasing filter [7].

e.g. , [11-[41.

11. CLASSIFICATION OF VARIOUS NOISE TYPES In this section, we will give a brief definition of the four main

classes of noise introduced in the previous section: wide-band rip- ple, impulsive noise, power line frequencies, and narrow-band noise. The examples of this section are taken from [6] and they describe the characteristics of the feedback signal in an elevator car positioning servo.

A. Wide-Band Ripple The output of a real tachogenerator always contains a certain

amount of wide-band ripple which is seen as a random measure- ment error in each individual output sample. The variance of such ripple is usually constant over longer time periods. One measure

Manuscript received September 23, 1987; revised February 22, 1988. The author is with the Kone Corporation, Lift Group, Research Center,

IEEE Log Number 8821909. SF-05801 Hyvinkaa, Finland.

0018-9456/88/0900-0466$01 .OO 0 1988 IEEE