High Accuracy Analog Measurement via Interpolated FFT

10
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. IM-28, NO. 2, JUNE 1979 High-Accuracy Analog Measurements via Interpolated FFT VIJAY K. JAIN, SENIOR MEMBER, IEEE, WILLIAM L. COLLINS, JR., MEMBER, IEEE, AND DAVID C. DAVIS, MEMBER, IEEE Abstract-By use of an interpolated fast-Fourier-transform (FFT) algorithms are developed for multiparameter measurements upon periodic signals. Eight pertinent measurements, such as fun- damental frequency, phase, and amplitude, are made with enhanced accuracy compared to existing algorithms, including tapered- window-FFT algorithms. For the more general case of nonharmonic multitone signals also the method is shown to yield exact amplitudes and phases if the tone frequencies are known beforehand. These measurements are useful in a variety of applications ranging from analog testing of printed-circuit boards to measurement of Doppler signals in radar detection. I. INTRODUCTION CONSIDERABLE interest is in evidence in the measure- ment of analog parameters from the sampled values of a signal [1], [2]. It arises from a desire for greater accuracy, repeatability, and simultaneous determination of several parameters. Rapid advances in hardware technology, in particular large-scale integration (LSI) implementation of digital algorithms [3]-[5], have indeed spurred vigorous activity and, as a result, we are perhaps on the verge of a new era in instrumentation concepts, designs and capabilities. In the past, the algorithms used for amplitude, phase and frequency information have been primarily of the time- domain type. For instance, the amplitude was determined via peak-to-peak measurement, the frequency via zero cros- sings, and the dc value through window averaging. Such formulas possess the advantage of conceptual and practical simplicity. And they are quite effective when moderate accuracy say 1 percent or worse, can serve the purpose. Only recently, the use of discrete-Fourier transform (DFT) or its algorithmic version fast-Fourier transform (FFT),1 has been proposed by some researchers with a view toward higher resolution and accuracy. However, these methods also produce somewhat erroneous results [1] due to the well- known spill (or leakage) effect, despite the use of tapered- window multipliers [6], [18]. Therefore, when a high degree of accuracy is desired or if the signal quality is poor (manifested by a low SNR or the presence of a nonperiodic component), the usual time-domain methods as well as the tapered window DFT methods prove to be unsatisfactory. Manuscript received July 29, 1977; revised November 27, 1978 and February 26, 1979. V. K. Jain is with the Department of Electrical Engineering University of South Florida, Tampa, FL 33620. W. L. Collins, Jr., and D. C. Davis are with the Honeywell Information Systems, Inc., Tampa, FL 33684. 1 The terms "discrete Fourier transform" and "fast Fourier transform" will be used interchangeably in this paper. In this paper we propose certain FFT-based algorithms to achieve high accuracy measurement of the following parameters: a) Va, b) c) fi Al d) &l e) AM, OtM, M = 2, ... f) Vdc g) Vrms h) THD average voltage over the window fundamental frequency amplitude of the fundamental frequency phase of the fundamental frequency amplitudes and phases of the harmonics true dc voltage level of the signal root-mean-square value of the signal total harmonic distortion. The proposed algorithms require simple calculations beyond the DFT of the signal. Software implementation is therefore straightforward. However, recognizing the distinct possibility of complete implementation in hardware, the paper also considers the effect of arithmetic roundoff for small word-lengths [7], [8]. For the sake of brevity, the effect of roundoff is presented only for parameters a), b), c), and d). The more general case of a multitone signal, with nonhar- monically related tones, is also considered. It is shown by use of interpolated FFT that the amplitudes and phases of the constituent sinusoids can be determined with high accuracy. Exactly, if the arithmetic roundoff errors can be ignored. We shall begin with this general case in Section II. The remain- der of the paper is devoted to periodic signals, where, as stated above, all of the eight pertinent parameters are determined, including the fundamental frequency. A brief discussion of the DFT and the effect of finite word-length upon it is given in Appendix A. II. AMPLITUDES AND PHASES OF MULTITONE SIGNALS Consider the sampled multifrequency signal M x(kA)= E x.(kA) m=1 M Z Amsin (2ltfmkA+4Jm), k0O, 1, , N-1 m =1 (1) 0018-9456/79/0600-0113$00.75 1979 IEEE 113

description

Methods for determination of analog measurements via interpolated DFT (high accuracy)

Transcript of High Accuracy Analog Measurement via Interpolated FFT

  • IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. IM-28, NO. 2, JUNE 1979

    High-Accuracy Analog Measurementsvia Interpolated FFT

    VIJAY K. JAIN, SENIOR MEMBER, IEEE, WILLIAM L. COLLINS, JR., MEMBER, IEEE,AND DAVID C. DAVIS, MEMBER, IEEE

    Abstract-By use of an interpolated fast-Fourier-transform(FFT) algorithms are developed for multiparameter measurementsupon periodic signals. Eight pertinent measurements, such as fun-damental frequency, phase, and amplitude, are made with enhancedaccuracy compared to existing algorithms, including tapered-window-FFT algorithms. For the more general case of nonharmonicmultitone signals also the method is shown to yield exact amplitudesand phases if the tone frequencies are known beforehand. Thesemeasurements are useful in a variety of applications ranging fromanalog testing of printed-circuit boards to measurement of Dopplersignals in radar detection.

    I. INTRODUCTIONCONSIDERABLE interest is in evidence in the measure-

    ment ofanalog parameters from the sampled values ofasignal [1], [2]. It arises from a desire for greater accuracy,repeatability, and simultaneous determination of severalparameters. Rapid advances in hardware technology, inparticular large-scale integration (LSI) implementation ofdigital algorithms [3]-[5], have indeed spurred vigorousactivity and, as a result, we are perhaps on the verge of a newera in instrumentation concepts, designs and capabilities. Inthe past, the algorithms used for amplitude, phase andfrequency information have been primarily of the time-domain type. For instance, the amplitude was determinedvia peak-to-peak measurement, the frequency via zero cros-sings, and the dc value through window averaging. Suchformulas possess the advantage of conceptual and practicalsimplicity. And they are quite effective when moderateaccuracy say 1 percent or worse, can serve the purpose. Onlyrecently, the use of discrete-Fourier transform (DFT) or itsalgorithmic version fast-Fourier transform (FFT),1 has beenproposed by some researchers with a view toward higherresolution and accuracy. However, these methods alsoproduce somewhat erroneous results [1] due to the well-known spill (or leakage) effect, despite the use of tapered-window multipliers [6], [18]. Therefore, when a high degreeof accuracy is desired or if the signal quality is poor(manifested by a low SNR or the presence of a nonperiodiccomponent), the usual time-domain methods as well as thetapered window DFT methods prove to be unsatisfactory.

    Manuscript received July 29, 1977; revised November 27, 1978 andFebruary 26, 1979.

    V. K. Jain is with the Department of Electrical Engineering Universityof South Florida, Tampa, FL 33620.W. L. Collins, Jr., and D. C. Davis are with the Honeywell Information

    Systems, Inc., Tampa, FL 33684.1 The terms "discrete Fourier transform" and "fast Fourier transform"

    will be used interchangeably in this paper.

    In this paper we propose certain FFT-based algorithms toachieve high accuracy measurement of the followingparameters:

    a) Va,b)c)

    fiAl

    d) &l

    e) AM, OtM, M = 2, ...

    f) Vdcg) Vrms

    h) THD

    average voltage over thewindowfundamental frequencyamplitude of the fundamentalfrequencyphase of the fundamentalfrequencyamplitudes and phases of theharmonicstrue dc voltage level ofthe signalroot-mean-square value of thesignaltotal harmonic distortion.

    The proposed algorithms require simple calculationsbeyond the DFT of the signal. Software implementation istherefore straightforward. However, recognizing the distinctpossibility of complete implementation in hardware, thepaper also considers the effect of arithmetic roundoff forsmall word-lengths [7], [8]. For the sake of brevity, the effectof roundoff is presented only for parameters a), b), c), and d).The more general case of a multitone signal, with nonhar-

    monically related tones, is also considered. It is shown by useof interpolated FFT that the amplitudes and phases of theconstituent sinusoids can be determined with high accuracy.Exactly, if the arithmetic roundoff errors can be ignored. Weshall begin with this general case in Section II. The remain-der of the paper is devoted to periodic signals, where, asstated above, all of the eight pertinent parameters aredetermined, including the fundamental frequency. A briefdiscussion of the DFT and the effect of finite word-lengthupon it is given in Appendix A.

    II. AMPLITUDES AND PHASES OFMULTITONE SIGNALS

    Consider the sampled multifrequency signalM

    x(kA)= E x.(kA)m=1M

    Z Amsin (2ltfmkA+4Jm), k0O, 1, , N-1m =1

    (1)0018-9456/79/0600-0113$00.75 ( 1979 IEEE

    113

  • IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. IM-28, NO. 2, JUNE 1979

    where it is assumed that the sampling frequency is greaterthan two times the highest constituent frequency. Supposethat the frequency resolution (fo = 1/NA) is fine enoughthat the frequencies of the signal lie in separate bins. Thus

    Lmfo 20. Let A = 1 + ( where0 < ( < 1 and I is an integer.By use of the defining relation (Al), or by settingM = 1 in

    (3), the DFT of (13) is found to be

    S(i) =-0.5jA,1 exp [j(a(Q - i) + 0)] sin r( - i)/N

    sin irQA + i)exp[-j(a( + i)+0j]sn(+) (14)sin 7rQA + i)/N]_14

    where a = r(N - 1)/N. The largest two spectrum lines are,as one would expect, I S(l) and I S(l + 1)1 where theinterval [1, 1 + 1) encloses A. To proceed further, we willmake an approximation. We shall ignore the second term in(14)when evaluating it at i = land at i = I + 1. WhenXA > 20and N = 1024 or higher, this approximation can be shown

    14

  • JAIN et al.: HIGH-ACCURACY ANALOG MEASUREMENTS VIA INTERPOLATED FFT

    to contribute no more than 0.04 percent error in frequency.Then the largest two spectral components are given by

    S(l) =-jO.5A1 exp [j(ab + kA)] sin nr/N (15a)

    S(l + 1)-

    -jO.5A1 exp [j(a(b- 1) + &)] s-in(l-)(15b)

    From (14) and (15) we observe that a single sinusoid resultsin a single line (plus negative image) spectra only when i is aninteger, i.e., when the signalfrequency is an integer multiple of1/NA.2 In general, however, the spectrum possesses asin v/sin (v/N) profile. This phenomenon is commonly referredas spillover or leakage effect [6]. To counter leakage we willuse interpolation between the Ith and (I + 1)th DFT com-ponents. First a further approxinmation is made. For N equalto 1024 or greater, the sine terms in the denominators of(iSa) and (15b) may be replaced by their respective argu-ments incurring an error of no more than 0.015 percent.Thus

    I S(l) =05A I sin n6i (16a)

    IS(l 1)0(1 - )/N 5A I(1 -3)/N(16b)

    D. Phase of FundamentalFrom (15) we obtain

    01 = Phase {S(l)} - ab + rc/201 = Phase {S(l + 1)}-a(b- 1) + r/2.

    (20a)(20b)

    Recall that a = ir(N - 1)/N. Clearly, either ofthe above twoequations can be used to compute 1. We recommend usingthe one corresponding to the largest spectral line.

    E. Harmonic Amplitudes and Phases (AM, I'M)Consider the Mth harmonic with frequency

    fM - Mf1= AM fo (21)

    where AM = MA and m . AM < m + 1. That is the frequencyfm is contained in the interval [mfo, (m + 1)fO) wherefo = 1/T was defined to be the frequency resolution of theFFT. Then proceeding analogous to subsections C and Dabove we can show that

    21bM IS(m)N Isinl nMI

    27r(1- M) IS(m+ 1)AM=- N Isin r(1 - bM)IO'M= Phase {S(m)}- abM + i/2

    (22a)

    (22b)(23a)

    OmM= Phase {S(m + 1)}- a(bM- 1) + /2. (23b)Denoting the ratio of the two magnitudes as Lx, i.e.,

    _ IS(I+ 1)i S(1) t

    it follows immediately from (16) that3=

    Thus we obtain the fundamental frequency as

    f,= )fo = (11:I )t1 fo ( 1 + L) NA'C. Amplitude of FundamentalFrom (16) we obtain3

    Al = 2rb IS(l) IN Isin nb

    27r(1 - )A= N IS(l + 1)IIsin r(1- 3)1

    The amplitude AM and the phase O'M can be computed using(22) and (23). We recommend using (22b) and (23b) only

    (17a) when IS(m + 1)1 is greater than IS(m)I.It should be noted that the highest harmonic is given by

    (17b)

    (18)

    (19a)

    (19b)

    Mmax= ( (Note = integer part of y) (24)whereft is the fundamental frequency.

    F. True dc Level (Vdc)In general, the true dc level ofthe analog signal x(t) will be

    different from the average of x(k) over the N-point windowk =O, ", N -i1. To demonstrate this, consider for themoment that the signal x(t) is a biased monotone, i.e.,

    x(t) = Vdc+ A, sin (2nf1t + I'). (25)Assume that f1, A1, and 01 have been determined asdiscussed in Sections III-B-III-D. Now

    x(k) = Vdc + A1 sin (2rf1kA + I1) (26)Either of the above equations can be used to compute A 1.We recommend using (19b) only when S(l + 1) 1 is largerthan IS(l)L.

    2 Note that as -* 0, the limit of sin 7rb/sin (7rb/N) approaches N.I When 6 -O 0, 7r3/sin nrb approaches 1.

    so thatA N-1

    Vav = Vdc + N E Imag. exp [j(2irf1kA + '1)]k=O

    = Vdc + A1 sin 7rf1NAs (7rmf(N - 1)A + I1). (27)=VcN sin 7rf1A

    115

  • IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. IM-28, NO. 2, JUNE 1979

    .... S1 (l )+S3 ( i)s1 ( i )

    ---- s (i )3

    Fig. 1. Effect of harmonic interference.

    TABLE IFFT OF A SIGNAL WITH dc, FUNDAMENTAL ANDTHIRD HARMONIC COMPONENTS (SECTION V)

    Frequency |S(i) Phase S(i)Index iI

    0 492.648 0.01 83.377 -0.0500

    19 960.053 -0.804820 5749.332 -0.836321 1435.643 2.2747

    59 197.037 0.485460 518.243 0.377561 775.002 -2.868962 222.902 -2.9688

    Thus we find that the true dc level is related to the windowaverage V5,, by

    Vdc=VSVN- isin sinVdc-V"N sin nION sin" (aA~+ 0ti) (28)where, we recall, a = r(N - 1)/N, A= f1!]fo. More gen-erally, when the signal x(t) contains harmonics in additionto the fundamental,

    1 Mmax sin 7rAVdc= VavN AM sin , N sin(a. M + QM)

    (29)

    G. Root-Mean-Square Value (Vrms)The rms value of the periodic signal is given by

    Vrms = [Vd, + '(A' + ... + AMx)]112. (30)H. Total Harmonic Distortion (THD)The THD is computed as follows:

    Mmax //V 1Mmax 1/2THD-~2 E2 / 2 M- 2 (THD= - Am:1Ac(~ +i Am4). (31)IV. HARMONIC INTERFERENCE

    In Sections III-B-III-E, it was tacitly assumed that theeffect of harmonic interference in the FFT components isnegligible. Specifically, it was assumed that the largest twospectral lines S(l) and S(l + 1) were the contributions ofonlythe fundamental frequency. In truth, S(l) and S(l + 1) con-tain minor spillovers from the second, third, and possiblyhigher harmonics (see Fig. 1). It is shown in [10] that evenwith a 33 percent third harmonic, the error in the fundamen-tal frequency caused by ignoring the spill at 1 and 1 + 1 is nogreater than 0.025 percent. Similarly A 1 and 4

    ,are relatively

    insensitive to the harmonic spillover. However, the compu-tation of the harmonic amplitudes and phases is not robustrelative to the spillover from the fundamental. A simple

    remedy is to modify S(m) and S(m + 1) (used in SectionIII-E) as follows:

    SM(m) = S(m) - S(m)= S(m) + 0.5jA1

    sin ir(1A - m)exp [j(a(. - m) + 01)] sin r(A - m)/N

    (32a)SM(m+ 1)=S(m+ 1)+0.5jA,

    exp U((A m- 1) + sin ir(A - m - 1exP[j(a(.. -m-1) + 1)] sin r(A - m - 1)/N

    (32b)where S 1(m) denotes the spillover of the fundamental atfrequency mf0. Now the formulas (22) and (23) may be usedto compute Ak, Ok, k = 2, . . A more rigorous method is tosolve for A1, 1, A2, 42, etc., simultaneously as shown inSection II. This, however, involves inversion of a 2Mmaxdimensional square matrix so that the gain in accuracycould well be offset through computational roundoff. Unlessa large word-length, say 32 bits, were available, the simplerapproach (corrections via (32) and use of (22) and (23)) isrecommended.

    V. AN EXAMPLEConsider that

    x(t) = 0.2 + 6.0 sin [27r(20.2)fot + 0.1] + sin [27r(60.6)fot]wherefo = 1/2.048 Hz; A = 0.001 s and N = 2048. The FFTof x(kA) is given in Table I for some ofthe frequencies wherethe spectrum amplitude is significant.

    a) Vav = S(O)/N = 0.2406.b) The largest spectrum lines are found to occur at 1 = 20

    and 1 + 1 = 21.

    116

  • JAIN et al.: HIGH-ACCURACY ANALOG MEASUREMENTS VIA INTERPOLATED FFT

    TABLE IICOMPARISON OF PARAMETERS OBTAINED FROM RAW FFT,

    TAPERED-WINDOW FFT, AND INTERPOLATED-FFT

    From tapered-window FFT FromFrom Blackman- Blackman- Interpolatedraw FFT Hamming Harris 74dB Harris 92db FFT

    X 20.0 20.0 20.0 20.0 20.1998

    A1 5.6140 5.8124 5.8857 5.9097 6.001

    1 0.734 0.7292 0.7283 0.7283 0.1071A3 0.7568 0.8795 0.9257 0.9411 0.9977

    13 -1.2981 -1.2619 -1.2568 -1.2566 -0.0029

    * See reference [18] for window weights

    Formulas (17) and (18) givea = 0.2497 3 = 0.199811 A = 20.199811.

    c) From (19a),A1 = 6.001.

    d) From (20),= A TAN2(-4310.5156, 3810.2954)

    -_r (2047) (0.19926) +2048 2- 0.1071 radian.

    e) Since the spectrum shows significant values onlyaround the third harmonic, we compute only A3, 03. Firstnote that

    A3 = 3(i) = 60.59943.Since the spectral line S(61) is larger than S(60) 1, we

    shall use it to compute A3 and 43. From (32b) we obtainS3(61) = S(61) = S1(61)

    = (-746.3538- j208.7312)- (- 12.0314 + j31.3065)

    = 772.5590 /-2.8256 radian.Then from (22b) and (23b),

    A3 = 0.997743 = -0.00294 radian.

    The remaining three parameters f), g), h) are calculatedroutinely via (24), (29), (30), and (31).

    Remarks: Let us compare this method with some alterna-tive procedures. We can employ the spectral lines directly,i.e., use the local maxima at i = 20 and 61. Or, we couldpremultiply the data with a tapered window, such as theHamming window Xk = WkXk,

    Wk = 0.54 + 0.46 cos ir(k - N/2)/(N/2)

    [17], and then utilize the sharpened spectral lines. A compar-ison of the frequency and amplitude estimates is given inTable II. Although the use of tapered-windows (Hammingand Blackman-Harris windows) yields an improvementover the raw FFT results, the scalloping loss [18] issignificant enough to cause large errors. The present methodclearly yields the best results. The reader interested innon-FFT based techniques, such as maximum entropymethod, demodulation algorithms, and the pencil-of-functions method is referred to references [2] and [16].

    VI. ARITHMETIC ROUNDOFF ERRORS

    As stated in Section II, the effect of arithmetic roundofferrors becomes significant when the algorithms of SectionIII, or any alternative ones, are implemented with a smallword length (with a mantissa of under 16 bits). Since highaccuracy in measurement is of concern, the effect of arith-metic roundoff errors on computed parameters must beevaluated carefully. Indeed, if the accuracies desired areprespecified, these considerations may well determine theminimum word length and window size for the particularapplication. It should be noted that the effect of arithmeticroundoff depends, to some extent, upon the nature of thesignal under consideration. For the analysis presented here,we will pick either the worst case signal (one that produceslargest arithmetic roundoff) or a signal that is deemed to beof greater interest than others. Also, for reasons of space,only the first four parameters will be considered. Thediscussion of each is rather brief; however, the details can befound in [10].A. Average Over the Window (VYa)

    If an exact representation of the number 1.0 is used in thearithmetic [8] then, as stated in Appendix, the noise-to-signal power ratio (NSR) given by (A5) is invalid for the zerofrequency. For a worst case signal, consisting ofa predomin-ant dc component plus a small ripple, it is shown in [10] thatthe NSR is given by

    VarS(0) 22NSR S(0) 12 - (33)For example, if b = 11 bits, the fractional error from (33)turns out to be 0.04 percent. Let us compare this error withthat obtained for a conventional consecutive summationand division by N. To examine arithmetic roundoff inconsecutive addition note that4

    (xo + X1) = (Xo + xl)(1 + 1)((Xo + Xl) + X2) = (XO + X1 + X2)(1 + 2) + (Xo + X1)1

    N-1 N-1 N-1kSUM = E X=k Xk + xi/k

    k=0 k0= k=i1 i=O

    4 Throughout, a prime on a variable or expression denotes its roun-dedoff value.

    117

    (33)

  • IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. IM-28, NO. 2, JUNE 1979

    where gk are independent E-distributed random variables.Since division by N = 2n changes only the characteristic ofthe number, there is no additional roundoffinvolved, so that[14]

    N

    Var {Vd} N2 Z (kVdc)%SE

    1 N(N - 1)(2N - 1) V2 (2N2 6

    The noise-to-signal ratio is, therefore,Var {Vd} N_ (34)

    NSR- 2 3U.(4For b = 11 and N = 1024, the fractional error from (34)turns out to be 0.521 percent-versus 0.04 percent computedabove via the FFT method. Indeed, a comparison of (33) and(34) shows that the FFT method is superior to consecutivesummation and division by N.B. Fundamental Frequency (f])For this analysis we assume that the signal consists of a

    single sinusoid. Now,S'(l) = (1 + CJ)S(l)

    S'( + 1)= (I + C2)S(l + 1)where C and 2 are uncorrelated, zero mean and have avariance equal to 2.5nU2 [7] (n = Log2 N; see Appendix).Then

    X=

    '( +1(()) = 1+ S3) +51()|) 1+ WIS'(lH IS(l)I(35)

    where C3 has a variance equal to 5no2, the sum of thevariances of 1 and C2. In turn [15]

    Var 6' = Var(1 + (1 1 Var (x')< 5na?. (36)

    Since the fundamental frequency is given byf1 = (1 + 6)foand since 1 . 20, we have

    Var {f'} 5na (37f2N 400

    For example, if b = 11 and N = 1024, the fractional error infrequency turns out to be 0.01 percent. This error comparesquite favorably with that produced by simpler methods. Thelatter, typically consist in locating the crossings ofthe signalat the estimated "true dc level" and counting the number ofsamples for an integer number of cycles. Errors for thissimple method range from 0.1 to 1 percent and may increaseif the signal is masked by noise. It is shown in Section VIIIthe interpolated FFT method (of computing the fundamen-tal frequency) is quite robust relative to additive white noise[10].

    C. Amplitude of Fundamental (A1)For this analysis also, we assume that the signal consists of

    a single sinusoid. Now, from (19a)27r IS'(l) IA'1= A1(1 + '1 + 12)

    where 4 has a variance of 2.5nU2 and 42 has a variance nogreater than nU2. We have made use of the fact that(sin 7rb'/b') - (sin rb/b) .< 0.27r2(6'- 6) and that 6 does

    not exceed 0.5 (for otherwise (19b) will be used). Then thenoise-to-signal ratio is given by [15].

    VarA'2NSR= 2 = 22.9n 2.Al (38)For b = 11 and N = 1024, the fractional error in fundamen-tal amplitude, as given by (38), is 0.89 percent. Higheraccuracy can, of course, be achieved with larger wordlengths. No attempt will be made to compare this accuracywith that of simple methods such as the one consisting of useof A1 = (Vmax - Vmin)/2. The latter method leads to erron-eous results when harmonics are present, and is also highlysusceptible to errors caused by additive noise. The FFT-based method, not surprisingly, yields A 1 that is quite robustrelative to the influence of harmonics as well as additivenoise.D. Phase of Fundamental (&)

    Again, we assume that the signal consists of a singlesinusoid. Now from (20a)

    01 = Phase {S'(l)}- ab' + 7r/2where

    S'(l) = U'(l) + jV'(1) = S'(l) exp [j0'(l)].(39)(40)

    For convenience of discussion, and without loss ofgenerality,5 we assume that 0 < 0'(l) < r/4 holds. Thentan 0'(l) = V'(l) - V(l) (1 + q1l + q12) = tan 0(l)(1 + 13)U'(l) -U(l)

    (41)where 1 and 12 are random variables accounting forcomputational roundoff in V'(l) and U'(l), respectively. Thevariance of the equivalent sum random variable n3 can beshown to be 2.5na'. Now using the Taylor seriesapproximation

    tan (0 + A0) - tan 0 + O2 0or

    A0 < [tan (0 + AO) - tan 0]we obtain from (41)

    0'(l) - 0(l) < tan 0(1)13< .3. (42)

    5 If 0 < U'(l) < V'(l), then tan- ' 0'(1) = 7t/2 - tan- 1 U'(l)/V'(1). Otherquadrants can be taken care of in the usual way.

    118

  • JAIN et al.: HIGH-ACCURACY ANALOG MEASUREMENTS VIA INTERPOLATED FFT

    Reflecting upon (39), it is recognized thatVar 11 = Var 0'(l) + Var (ab'),

    so that using (33) and (27) we haveVar 01 = 2.5na2 + 7r2(5na2)

    _ 52n 2For b = 11 andN = 1024, the rms value ofthe error in phasecomputation is (less than) 0.0064 radian. This represents 0.2percent of one cycle. Needless to say, the presence ofharmonics does not influence the computation of the fun-damental phase (because the spillover is generally notsignificant). However, in a conventional approach to phasemeasurement consisting of locating the crossing of the truedc level, the effect of harmonics can be disastrous; with a10-percent third harmonic, a phase error of up to 0.1 radiancan accrue.

    VII. SIMULATION RESULTSA simulation example will be presented in this section.

    The purpose is to demonstrate the effect ofthe presence ofa)an initial transient and b) an additive white noise. That is thesignal x(t) is taken to be of the form

    x(t) = y(t) + p(t) + w(t)or, in the sampled form

    x(k) = y(k) + p(k) + w(k).Here, y is the periodic signal, p the transient component, andw the additive white noise. Both the transient part and thenoise part are so scaled that their rms value is approximatelyfive percent of the rms value of the periodic signal.Specifically, let N = 2048 and

    y(k) = 0.2 + 6.0 sin [ (20.2)k + 0.1 + sin [N (60.6)kjp(k) = 1.9293e- k50w(k) = (0.05)(4.3058)u(k)where u(k) is a zero mean, unit variance, uncorrelatedsequence. The FFT of the signal is shown in Fig. 2(a) and apartial listing given in Table III. The results of computa-tions, as described in Sections III and IV, are presented inthe second column ofTable IV. The true values are indicatedparenthetically in the first column. Clearly, the parametervalues obtained are quite accurate despite the effect of noiseand the initial transient.One more experiment was conducted in which we let

    p(k) = 0, and w(k) = (1.0)(4.3058)u(k) while y(k) remainedthe same as before. That is, now the corrupting influence is a100-percent additive noise while the transient term is set tozero. The FFT of the corresponding signal is shown in Fig.2(b). The computed parameters, listed in column three ofTable IV, demonstrate the noiseworthiness of the algo-rithms developed in the paper.The simulation was carried out on an Interdata 8/32

    computer wherein the FFT of the signal was computed via a

    TABLE IIIFFT OF A SIGNAL WITH A FUNDAMENTAL SINUSOID,THIRD HARMONIC, dc, INITIAL TRANSIENT AND NOISE

    (SECTION VII)Frequency |S(i)| Phase SO)Index I

    0 590.117 0.01 189.587 -0.1025

    19 978.818 -0.823920 5785.969 -0.838321 1412.702 2.2776

    59 179.873 0.491260 520.271 (532.764) 0.3655 (0.3168)61 768.884 (755.324) -2.8704(-2.8384)62 229.564 -2.9030

    Note: The values within parentheses are obtainedafter subtracting the contribution ofthe fundamental component S1(i).

    TABLE IVCALCULATED PARAMETERS FOR A SIMULATED SIGNAL

    (SECTION VII)Calculated Parameter Values

    Experiment 1 Experiment 2y(k) + 5% noise y(k) + 100% noise

    + 5% transient

    V 0.288 0.2405av

    f 1 (20. 2f0) 20.196f 20.204fA1 (6.0) 6.025 6.2016

    1 (0.1 rad) 0.116 rad 0.0928 rad

    A3 (1.0) 0.9913 0.8295

    03 (0.0) 0.0237 -0.3979

    VDC (0.2) 0.2307 0.2091

    v (44.3062) 4.3236 4.4290THD (0.1707) 0.17068 0.1324

    * Because of the presence of theis not possible to compute theaccurately in Experiment 1.

    initial transient, ittrue D.C. level

    Fortran routine. However, Honeywell, Inc., have imple-mented the FFT algorithm in hardware; the overall system,designed for high accuracy measurement of analog pa-rameters from dc to 5 MHz, uses the algorithms presentedin the paper.

    VIII. EFFECT OF ADDITIVE NOISEAlthough the simulation example has demonstrated the

    robustness ofcalculated parameters, it is useful to have some

    119

  • IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. IM-28, NO. 2, JUNE 1979

    0

    5000 F-

    4000 H

    LLLL

    (04

    3000 F-

    2000 k

    1000 F0

    ....eee000@S00**to

    .

    0S 0

    *.0...20

    2 9+1

    30 40

    FREQUENCY INDEX(a)

    S

    5000 k

    4000 _-

    3000 _-

    2 000 -

    000 _

    0

    . 000. *0

    ........ I.. 1 010 20

    Q k+l

    0

    0~~~~~~~~

    3'0 40

    FREQUENCY INDEX(b)

    Fig. 2. Magnitude FFT of signals considered in a simulation study (Section VII).

    theoretical estimates of the bias and standard deviation inthe presence of noise. Let us assume a signal of form

    x(t) = A1 sin (2irnf t + &1) + w(t)where w(kA) is zero-mean white noise with mean power U2.Then, using afirst-order analysis [15], validfor rms noise-to-signal ratios ofup to 0.1, thefollowing bounds can be obtained.

    Fractional bias Fractional S.D.

    Frequency 0 2 a/AIX>N:Amplitude 2ao/(2NA2) 4.203a/A l N

    IX. CONCLUSIONSAccurate measurement of the parameters of a periodic

    signal is important in many practical applications. We haveshown that a high accuracy measurement of the fundamen-tal frequency, amplitude and phase, and five other param-

    eters can be accomplished via interpolation of the FFT ofthe digitized signal. For general multifrequency signals alsothe interpolation approach leads to an explicit formula forthe true amplitudes and phases provided the tone frequen-cies are known beforehand. It was demonstrated further thatthese algorithms are more robust to computational round-off, to additive white noise in the signal as well as to aninitial transient, compared to some commonly used time-domain formulas. Potentially, another benefit ofthe discreteFourier approach appears to be the following. Before actualmeasurement, the signal must generally pass through stagesof preamplification and prefiltering, which introduce smallbut unavoidable distortion. Assuming it is characterized bya known frequency function H(f ), nonzero over the range- 1/2A

  • JAIN et al.: HIGH-ACCURACY ANALOG MEASUREMENTS VIA INTERPOLATED FFT

    density known, then certain minimum variance estimatesmay be obtained for the magnitude ofthe true FFT compon-ents [11], [12]. Certain alternative methods, such as themaximum entropy method [2] and Pisarenko's method [2],do yield optimal estimates in the presence ofnoise. However,their computations are involved, for example requiringcorrelation functions, inversion ofa matrix and finding rootsof a polynomial, and they do not yield phase values. Asecond possible improvement in our method pertains to thetransient may perhaps be assessed and its undesirable effectsubtracted from the signal. Work on these topics isunderway.

    APPENDIXDFT, FFT, AND ARITHMETIC ROUNDOFF

    Let x(kA) = x(k), k = 0, , N- 1 be the samples of aband-limited signal x(t). It is assumed that the samplingfrequency exceeds the Nyquist rate so that aliasing of spectradoes not occur. The DFT ofthe N-point sequence is given as[7], [9],

    S(i) = I x(k) exp(-j j ik)Ik 0 i N

    while the inverse relationship is

    = - (Al)

    IN -1 S e N1) () e p ' i (A2)

    Note that the ith DFT coefficient refers to a frequency ifowhere A = 1/T is the frequency resolution achieved;T = NA is the total duration of the signal. We assume thatN = 2", i.e., N is an integral power of two. As is well known,this permits a fast implementation of either of the aboverelationships through a radix-2 FFT. Often, this algorithm iscarried out in hardware which results in very high-speed ofcomputation, typically 20 ms for a 1024-point DFT. Higherspeeds are currently possible and still higher ones willundoubtedly be achieved in the future.

    In the paper the complex DFT coefficients S(i), i = 0, ,N/2 are used to measure the analog parameters ofthe signal.Since high accuracy in measurement is of concern, it isnecessary to recognize the arithmetic roundoff errors accru-ing in the FFT implementation of (1). To avoid discussingvarious types of number representations and arithmeticsthat can be employed, we restrict attention to only oneimportant case. The case of interest involves i) floating-pointnumber representation and ii) 2's complement arithmetic.With this assumption, the following observations can bemade

    a) Let z be a number stored in floating-point form with ab-bit mantissa. Then the stored number is given by [13]

    z = z(1 + c) (A3)where E is a zero-mean random variable with a uniformprobability density function6

    p() = {2(b- 1) for < 2 b and 0 otherwise.

    6 Experimental evidence indicates some departure from this ideal [7];however, for our purposes the assumption of uniform distribution isadequate.

    p (E)

    2 ( b - )

    - b - b-2 0 2

    Fig. 3. Probability density of the roundoff error fraction (E-distribution).

    This is shown in Fig. 3. For convenience we call this ass-distribution. Note that the noise-to-signal power ratio is

    a2= Variance (e) = 2 -2b/3. (A4)b) The computed spectra S'(i) consists of the sum of the

    true spectra S(i) plus computational noise S(i). The varianceof the noise term S(i) is of course dependent upon the natureof the signal x(k). If the signal is assumed to have uniformspectra, then it is shown by Oppenheim et al. [7] that7

    NSR = Var IS(i) 2 2I S(i)1-I lE (A5)When the signal is sinusoidal, simulation experiments showa 15 percent higher NSR. We assume a pessimistic NSR of2.5nU2 for all signals considered.

    c) The addition or multiplication of two numbers resultsin roundoff error:

    (y + z) = (y + z)(1 + c1)(yz)' = (yz)(1 + 22)

    (A6)(A7)

    where e, and 22 each have the c-distribution.

    REFERENCES[1] D. C. Rife and G. A. Vincent, "Use of the discrete Fourier transform

    in the measurement of frequencies and levels of tones," Bell Syst.Tech. J., vol. 49, pp. 197-228, February 1970.

    [2] Proc. RADC Workshop on Spectrum Estimation, Rome Air Develop-ment Center, Rome, NY, May 1978.

    [3] J. R. Mick, "Fast computational devices for digital signal proces-sing," in Proc. National Telecom. Conf., pp. 10.4-1 to 10.4-5, Dec.1976.

    [4] H. L. Logan and D. G. Forney, "A MOS/LSI multiple configuration9600 bps data modem," in ICC Conf. Rec. (Philadelphia, PA), 1976.

    [5] P. J. VanGerwen, A. M. Verhoeckx, H. A. Van Essen, and F. A. M.Snijders, "Microprocessor implementation of high-speed datamodems," IEEE Trans. Commun., vol. COM-25, pp. 238-250, Feb.1977.

    [6] I. Koval and G. Gara, "Digital MF receiver using discrete Fouriertransform," IEEE Trans. Commun., vol. COM-21, pp. 1331-1335,Dec. 1973.

    [7] A. V. Oppenheim and C. J. Weinstein, "Effects of finite register lengthin digital filtering and the fast Fourier transform," Proc. IEEE, vol.60, pp. 957-976, Aug. 1972.

    [8] D. V. James, "Quantization errors in the fast Fourier transform,"IEEE Trans. Acoust., Speech Signal Processing, vol. ASSP-23, pp.277-283, June 1975.

    [9] B. Gold and C. M. Rader, Digital Signal Processing. New York:McGraw-Hill, 1969.

    7 An exception to formula (A5) arises when i = 0 and exact representa-tion of the number 1.0 is utilized in the arithmetic.

    121

  • IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. IM-28, NO. 2, JUNE 1979

    [10] V. K. Jain, W. L. Collins, and D. C. Davis, "High accuracy measure-ment of analog signal parameters via IFFT," Honeywell Res. Rep.,1979.

    [11] B. P. Agrawal and V. K. Jain, "Bandwidth compression of noisyimages," J. Comput. Elec. Eng., vol. 2, pp. 275-284, Oct. 1975.

    [12] B. P. Agrawal, "Digital processing of two-dimensional signals,"Ph.D. dissertation, Univ. South Florida, 1974.

    [13] W. R. Bennett, "Spectra of quantized signals," Bell Syst. Tech. J., vol.27, pp. 446-472, 1948.

    [14] H. G. Tucker, An Introduction to Probability and Mathematical Sta-

    tistics. New York: Academic Press, 1962.[15] M. Eisen, Introduction to Mathematical Probability Theory. Engle-

    wood Cliffs, NJ: Prentice-Hall, 1969.[16] V. K. Jain, "Filter analysis by Grammian method," IEEE Trans.

    Audio Electroacoust., vol. AU-21, pp. 120-123, Apr. 1973.[17] R. B. Blackman and J. W. Tukey, The Measurement ofPower Spectra

    from the Point of View of Communications Engineering. New York:Dover, 1958.

    [18] F. J. Harris, "On the use of windows for harmonic analysis with thediscrete Fourier transform," Proc. IEEE, vol. 66, pp. 51-83, Jan. 1978.

    Special Purpose Ammonia FrequencyStandard A Feasibility StudyDAVID J. WINELAND, DAVID A. HOWE, MICHAEL B. MOHLER,

    AND HELMUT W. HELLWIG, SENIOR MEMBER, IEEE

    Abstract We have investigated the feasibility of a special pur-pose frequency standard based on microwave absorption in ammoniagas (N"5H3). Such a device would potentially fill a need in certaincommunications and navigation applications for an oscillator whichhas medium stability, greater accuracy ( -O10- 9) than that providedby crystal oscillators, but a cost significantly smaller than that ofmore sophisticated atomic frequency standards. A device was con-structed using a stripline oscillator near 0.5 GHz whose multipliedoutput was frequency-locked to the absorption of the 3-3 line inN15H3 (' 22.8 GHz). Output between 5 and 10 MHz was providedby direct division from the 0.5-GHz oscillator. Observed stabilitywas 2 x 10- " from 10 to 6000 s, and reproducibility (accuracy) isestimated to be + 2 x 10- 9. The unique features of this device, whichinclude 1) high-performance stripline oscillator, 2) digital servotechniques, 3) unique oscillator-cavity servo, 4) pressure shift com-pensation scheme, and 5) acceleration insensitivity, are discussed.Areas for further study are noted.

    I. INTRODUCTIONT HE SPECIAL purpose ammonia frequency standard

    has grown out of a need for a frequency standardsatisfying specific requirements not found in other precisionoscillators. Briefly, these currently available oscillators canbe divided into two classes: the quartz-crystal oscillatorsand atomic "clock" oscillators. The quartz-crystal oscilla-

    Manuscript received February 13, 1978; revised November 27, 1978 andFebruary 26, 1979. This work was supported by the Advanced ProjectsAgency of the Department of Defense and was monitored by ARPA underContract # 3140.

    D. J. Wineland, D. A. Howe, and M. B. Mohler are with the Frequencyand Time Standards Section, National Bureau of Standards, Boulder, CO80302.

    H. W. Hellwig was with the Frequency and Time Standards Section,National Bureau of Standards, Boulder, CO. He is now with Frequencyand Time Systems, Inc., Danvers, MA.

    tors, while having good short-term stability and low cost(- $500 to - $2000) suffer three major drawbacks: 1) Thefrequency is not invariant between units and is related to themacroscopic parameters such as the dimensions ofthe quartz crystal. Therefore, calibration is required initiallyand subsequent recalibration is required due to "aging" ofthe crystal. 2) The crystal oscillator is sensitive to vibrationand shock. These environmental factors affect the macro-scopic dimensions of the crystal, and therefore can causestep shifts in frequency. 3) The quartz-crystal oscillator istemperature dependent and when oven-controlled requireslong warm-up time.Atomic oscillators provide stabilities from one part in

    1010 to one part in 1013 per year. Their cost ranges fromapproximately $4000 to above $20000 depending uponperformance. Their excellent frequency stability and intrin-sic accuracy make recalibration unnecessary for most appli-cations, however this higher level of performance is notneeded in many applications. In addition, their warm-uptime is generally long and their performance under severeenvironmental conditions (acceleration, vibration, tempera-ture, barometric pressure, and magnetic fields) is inadequatein some cases.

    Presently there exists a need in many communication andnavigation systems applications for low-cost oscillators withaccuracy better than that provided by crystal oscillators, butnot as high as available atomic standards. With these needsin mind, we investigated the possibility of constructing anoscillator with 10-9 accuracy and 10-1o stability, whichcould also be made environmentally insensitive, have quickwarmup and the potential for small size, weight, powerconsumption and low cost.

    U.S. Government work not protected by U.S. copyright.

    122