Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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
CONSIDERABLE interest is in evidence in the measurement 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 timedomain type. For instance, the amplitude was determined
via peak-to-peak measurement, the frequency via zero crossings, 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 wellknown spill (or leakage) effect, despite the use of taperedwindow 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.
e) AM,
OtM,
frequency
harmonics
true dc voltage level of the signal
root-mean-square value of the
signal
total harmonic distortion.
f) Vdc
g) Vrms
h) THD
MULTITONE SIGNALS
x(kA)= E x.(kA)
m=1
M
Z Amsin (2ltfmkA+4Jm),
m =1
k0O,
1,
, N-1
(1)
14
where it is assumed that the sampling frequency is greater so that the real and imaginary parts of the constituent
than two times the highest constituent frequency. Suppose sinusoids of x(t) become known. From these the amplitudes
that the frequency resolution (fo = 1/NA) is fine enough and phases can be determined in the usual way:
that the frequencies of the signal lie in separate bins. Thus
Am= X2 +Y2
(hla)
Lmfo <fm = (L + m)f0 Am fo < (Lm + )
(2)
(I lb)
Om= arctan (Ym/Xm).
where 4, are distinct integers and bm are suitable fractions
between zero and one, including zero. By use of the defining
Examples of application to multifrequency signals are
relation (equation (Al)Appendix) the DFT [9] of (1) can given in [10].
be shown to be
III. MEASUREMENT ALGORITHMS FOR
m
- i)
7
r(Am
PERIODIC SIGNALS
=
S(i) -0.5j E 1exp [j(a(m i) + 4m)] sin ir(A,m - i)/N
m=1
Let x(kA), k = 0, .., N - 1 be the samples of a periodic
signal
x(t). Again it is assumed that the sampling frequency
m
sin
+ i)/N]| Am
-exp [-j(a(Q,Z + i) + mr)]
exceeds the Nyquist rate so that aliasing of spectra does not
occur. Since the sampling interval A is considered fixed, we
(3) will simplify the notation and denote the sampled signal
where a = ir(N - 1)/N. To manipulate (3) into a more useful values as x(k) or Xk. Each of the eight parameters
enumerated in Section I is considered here. Derivations of
form let us define the interpolation functions
the algorithms are sketched only briefly for reasons of space;
Ssos (z)= sin (az) sin z/
(4) details may be found in [10].
sin 7rz/N
A. Average over the Observation Window (V,v)
Csos (z) cos (az) sin z/
(5) Letting i = 0 in (Al) one obtains the expected result
~~~~~~~sin
Also let
N-1
(12)
k=O
(6)
S(i) = u+ jvj
Am exp (fjtm) = Xm + jYm.
(7) Note that Va, = S(O)/N is the average over the observation
window; the dc level is determined later in (29).
Then, equating the real and imaginary parts of (4) one
obtains
B. Fundamental Frequency (f1)
M
Suppose the fundamental component is described by
E {[Csos (Am - i) - Csos (Am + i)]Xm
x1(t) = A1 sin (27rf1t + 01)
(13)
- [Ssos (Am - i) - Ssos (Am + i)]Ym} = -2Vj (8a)
wheref1 = 4fo; i.e., the fundamental frequency is A times the
M
frequency resolution achieved from the T = NA second
E {[Ssos (Am i) + Ssos (Am + i)]Xm
observation window. Note that the real number A also
the number of signal cycles contained in the obserdenotes
+ [Csos (Am - i) + Csos (Am + i)]Ym} = 2Ui. (8b)
vation window. For satisfactory accuracies to be achieved, it
Assuming that the frequencies of the constituen^t signals are is recommended that at least twenty cycles of the signal be
known, a set of distinct indices i is chosen. For the frequency obtained so that typically A > 20. Let A = 1 + ( where
fm choose i to be equal to Lm or Lm + 1; if distinctness is not 0 < ( < 1 and I is an integer.
violated choose i = Lm whenever bm < 1. Call this set of
By use of the defining relation (Al), or by setting M = 1 in
indices as I. Note that this set contains M indices.
(3), the DFT of (13) is found to be
Then (8), with i ranging over I, can be written in a matrix
form as
S(0) = Z x(k)-NVav.
Fz= w
(9) S(i) =
where
-0.5jA,1
exp [j(a(Q
- i)
z=[Xl Y, , XM,YM]
w = [-2V1, 2U1, , -2VM, 2UM]T
and the 2M x 2M matrix F is defined in the obvious way.
Assuming that the inverse of this matrix exists one obtains
the solution
z=
F-lw
irQA + i)
i)/N]_14(14)
115
S(l) =
sin
nr/N
S(l + 1)
(l -)
- -jO.5A1 exp [j(a(b - 1) + &)] s -in
(15b)
From (14) and (15) we observe that a single sinusoid results
in a single line (plus negative image) spectra only when i is an
integer, i.e., when the signalfrequency is an integer multiple of
1/NA.2 In general, however, the spectrum possesses a
sin v/sin (v/N) profile. This phenomenon is commonly referred
as spillover or leakage effect [6]. To counter leakage we will
use interpolation between the Ith and (I + 1)th DFT components. First a further approxinmation is made. For N equal
to 1024 or greater, the sine terms in the denominators of
(iSa) and (15b) may be replaced by their respective arguments incurring an error of no more than 0.015 percent.
Thus
I S(l)
05A I
sin n6i
(20a)
(20b)
(15a)
(21)
where AM = MA and m . AM < m + 1. That is the frequency
fm is contained in the interval [mfo, (m + 1)fO) where
fo = 1/T was defined to be the frequency resolution of the
FFT. Then proceeding analogous to subsections C and D
=
AM fo
(16a)
I S(m)
(22a)
Isinl nMI
IS(m + 1)
(22b)
I sin r(1 - bM) I
IS(l 1) 0(1 - )/N 5A I(1 -3)/N
(23a)
O'M = Phase {S(m)} - abM + i/2
(16b)
OmM= Phase {S(m + 1)} - a(bM- 1) + /2. (23b)
Denoting the ratio of the two magnitudes as Lx, i.e.,
The amplitude AM and the phase O'M can be computed using
(22) and (23). We recommend using (22b) and (23b) only
_ IS(I+ 1)
when IS(m + 1)1 is greater than IS(m)I.
(17a)
i S(1) t
It should be noted that the highest harmonic is given by
it follows immediately from (16) that
(Note <y> = integer part of y) (24)
Mmax= (
27r(1 - M)
AM=-
(17b)
3=
as
=
f,=
t1)fo
fo ((11:I
1 + L)) NA'
(18)
C. Amplitude of Fundamental
From (16) we obtain3
Al
A=
(25)
x(t) = Vdc+ A, sin (2nf1t + I').
(19a) Assume that
f1, A1, and 01 have been determined as
discussed in Sections III-B-III-D. Now
(19b)
(26)
x(k) = Vdc + A1 sin (2rf1kA + I1)
Note that
I When 6
-O
as
0,
-*
7rb/sin (7rb/N)
1.
approaches
N.
A 1 sin 7rf1NA s
+
Vdc
sin
=VcN
7rf1 A
[j(2irf1kA + '1)]
(7rmf(N
1)A +
I1).
(27)
116
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. IM-28, NO. 2, JUNE 1979
....
S1 (l
TABLE I
FFT OF A SIGNAL WITH dc, FUNDAMENTAL AND
THIRD HARMONIC COMPONENTS (SECTION V)
)+S3 ( i)
s1 ( i )
--- -
|S(i)
iI
Frequency
Index
492.648
83.377
-0.0500
19
20
21
960.053
5749.332
1435.643
-0.8048
-0.8363
2.2747
59
197.037
518.243
0.4854
0.3775
775.002
-2.8689
-2.9688
s 3 (i )
60
61
62
Phase S(i)
0.0
222.902
(aA~+ 0ti)
(28)
where, we recall, a = r(N - 1)/N, A = f1!]fo. More generally, when the signal x(t) contains harmonics in addition
to the fundamental,
1 Mmax
Vdc= Vav N
AM
sin 7rA
(a. M + QM)
sin , N sin
(29)
Vrms
sin
(32a)
SM(m+ 1)=S(m+
exp
(30)
ir(1A -
m)
[j(a(. - m) + 01)] sin r(A - m)/N
1)+0.5jA,
U((A
m-
1)
exP[j(a(.. -m-1)
sin
+ 1)] sin
ir(A - m - 1
r(A
1)/N
(32b)
:1Ac
From
raw FFT
Hamming
20.0
20.0
20.0
20.0
From
Interpolated
FFT
20.1998
A1
5.6140
5.8124
5.8857
5.9097
6.001
0.734
0.7292
0.7283
0.7283
0.1071
A3
0.7568
0.8795
0.9257
0.9411
0.9977
13
-1.2981
-1.2619
-1.2568
-1.2566
-0.0029
[18] for
See reference
window
weights
A = 20.199811.
3 = 0.199811
c) From (19a),
A1 = 6.001.
d) From (20),
= A TAN2(-4310.5156, 3810.2954)
-_r (2047)
(0.19926) + 2
2048
- 0.1071 radian.
117
[17], and then utilize the sharpened spectral lines. A comparison of the frequency and amplitude estimates is given in
Table II. Although the use of tapered-windows (Hamming
and Blackman-Harris windows) yields an improvement
over the raw FFT results, the scalloping loss [18] is
significant enough to cause large errors. The present method
clearly yields the best results. The reader interested in
non-FFT based techniques, such as maximum entropy
method, demodulation algorithms, and the pencil-offunctions method is referred to references [2] and [16].
VI. ARITHMETIC ROUNDOFF ERRORS
NSR VarS(0)
S(0) 12 - 22
- (- 12.0314 + j31.3065)
= 772.5590 /-2.8256 radian.
0.54 + 0.46
cos
ir(k
N/2)/(N/2)
(33)
(33)
(xo + X1)
((Xo
Xl)
+ X2)
(Xo + xl)(1
(XO
X2)(1
SUM =
N-1
+ X1 +
E X=
k
k=0
N-1
k0=
1)
+
Xk +
2) + (Xo
N-1k
k=i1
i=O
X1)1
xi/k
118
[14]
A'1 =
Var {Vd}
N2 Z
(kVdc)%SE
27r
IS'(l) I
(35)
exp
[j0'(l)].
(40)
(41)
5na?.
(36)
Since the fundamental frequency is given byf1 = (1 + 6)fo
and since 1 . 20, we have
(37
Var {f'} 5na
<
f2N
400
tan 0 +
O2 0
[10].
JAIN et
al.:
119
TABLE III
FFT OF A SIGNAL WITH A FUNDAMENTAL SINUSOID,
THIRD HARMONIC, dc, INITIAL TRANSIENT AND NOISE
(SECTION VII)
Frequency
Index
|S(i)|
I
Phase
0
1
590.117
189.587
-0.1025
19
20
21
978.818
5785.969
1412.702
-0.8239
-0.8383
2.2776
59
179.873
0.4912
60
61
62
520.271 (532.764)
SO)
0.0
0.3655 (0.3168)
768.884 (755.324) -2.8704(-2.8384)
229.564
-2.9030
the second column of Table IV. The true values are indicated
parenthetically in the first column. Clearly, the parameter
values obtained are quite accurate despite the effect of noise
and 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) remained
the same as before. That is, now the corrupting influence is a
100-percent additive noise while the transient term is set to
zero. The FFT of the corresponding signal is shown in Fig.
2(b). The computed parameters, listed in column three of
Table IV, demonstrate the noiseworthiness of the algorithms 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
Note:
TABLE IV
CALCULATED PARAMETERS FOR A SIMULATED SIGNAL
(SECTION VII)
Calculated Parameter Values
Experiment 1
y(k) + 5% noise
+ 5% transient
V
av
f 1 (20. 2f0)
Experiment 2
y(k) + 100% noise
0.288
0.2405
20.196f
20.204f
A1
(6.0)
6.025
6.2016
(0.1 rad)
0.116 rad
0.0928 rad
A3 (1.0)
0.9913
0.8295
(0.0)
0.0237
-0.3979
0.2307
0.2091
4.3236
4.4290
0.17068
0.1324
03
VDC
v
(0.2)
(44.3062)
THD (0.1707)
* Because
Fortran routine. However, Honeywell, Inc., have implemented the FFT algorithm in hardware; the overall system,
designed for high accuracy measurement of analog parameters from dc to 5 MHz, uses the algorithms presented
in the paper.
VIII. EFFECT OF ADDITIVE NOISE
Although the simulation example has demonstrated the
robustness ofcalculated parameters, it is useful to have some
120
rlnr)(
5000 F-
4000 H
LL
LL
3000 F(0
4
2000
1000
0'
.
0
....eee000@S00**
to
*.0...
30
20
5000
INDEX
FREQUENCY
2 9+1
6000
50
40
70
60
m m+1
(a)
4000 _L.
L.
3000 _-
C,
4
2 000
000 _
0. *0
........ I.. 1
-
0
0
0~~~~~~~~
10
3'0
20
k+l
40
FREQUENCY
50
INDEX
(b)
60
70
m m+i
121
p (E)
density known, then certain minimum variance estimates
may be obtained for the magnitude ofthe true FFT components [11], [12]. Certain alternative methods, such as the
2( b- )
maximum entropy method [2] and Pisarenko's method [2],
do yield optimal estimates in the presence of noise. However,
their computations are involved, for example requiring
correlation functions, inversion of a matrix and finding roots
of a polynomial, and they do not yield phase values. A
second possible improvement in our method pertains to the
-b
-b
-2
0
2
transient may perhaps be assessed and its undesirable effect
subtracted from the signal. Work on these topics is Fig. 3. Probability density of the roundoff error fraction (E-distribution).
underway.
APPENDIX
This is shown in Fig. 3. For convenience we call this as
DFT, FFT, AND ARITHMETIC ROUNDOFF
s-distribution. Note that the noise-to-signal power ratio is
Let x(kA) = x(k), k = 0, , N- 1 be the samples of a
band-limited signal x(t). It is assumed that the sampling
a2= Variance (e) = 2 -2b/3.
(A4)
frequency exceeds the Nyquist rate so that aliasing of spectra
b) The computed spectra S'(i) consists of the sum of the
does not occur. The DFT of the N-point sequence is given as
true spectra S(i) plus computational noise S(i). The variance
[7], [9],
of the noise term S(i) is of course dependent upon the nature
=
- (Al) of the signal x(k). If the signal is assumed to have uniform
S(i) = I x(k) exp(-j j ik)I
spectra, then it is shown by Oppenheim et al. [7] that7
N
k 0 i
while the inverse relationship is
NSR = Var IS(i)
2 2
(A5)
N
IN -1 S e
I
S(i)1
-I
lE
i
(A2)
1) () e p
When the signal is sinusoidal, simulation experiments show
Note that the ith DFT coefficient refers to a frequency ifo a 15 percent higher NSR. We assume a pessimistic NSR of
where A = 1/T is the frequency resolution achieved; 2.5nU2 for all signals considered.
c) The addition or multiplication of two numbers results
T = NA is the total duration of the signal. We assume that
in
roundoff error:
N = 2", i.e., N is an integral power of two. As is well known,
this permits a fast implementation of either of the above
(A6)
(y + z) = (y + z)(1 + c1)
relationships through a radix-2 FFT. Often, this algorithm is
(A7)
(yz)' = (yz)(1 + 22)
carried out in hardware which results in very high-speed of
computation, typically 20 ms for a 1024-point DFT. Higher where e, and 22 each have the c-distribution.
speeds are currently possible and still higher ones will
undoubtedly be achieved in the future.
REFERENCES
In the paper the complex DFT coefficients S(i), i = 0, , [1] D. C. Rife and G. A. Vincent, "Use of the discrete Fourier transform
N/2 are used to measure the analog parameters of the signal.
in the measurement of frequencies and levels of tones," Bell Syst.
Tech. J., vol. 49, pp. 197-228, February 1970.
Since high accuracy in measurement is of concern, it is
[2]
Proc. RADC Workshop on Spectrum Estimation, Rome Air Developthe
to
arithmetic
roundoff
errors
accrunecessary recognize
ment Center, Rome, NY, May 1978.
ing in the FFT implementation of (1). To avoid discussing [3] J. R. Mick, "Fast computational devices for digital signal processing," in Proc. National Telecom. Conf., pp. 10.4-1 to 10.4-5, Dec.
various types of number representations and arithmetics
1976.
that can be employed, we restrict attention to only one [4] H.
L. Logan and D. G. Forney, "A MOS/LSI multiple configuration
important case. The case of interest involves i) floating-point
9600 bps data modem," in ICC Conf. Rec. (Philadelphia, PA), 1976.
number representation and ii) 2's complement arithmetic. [5] P. J. VanGerwen, A. M. Verhoeckx, H. A. Van Essen, and F. A. M.
Snijders, "Microprocessor implementation of high-speed data
With this assumption, the following observations can be
modems," IEEE Trans. Commun., vol. COM-25, pp. 238-250, Feb.
made
1977.
a) Let z be a number stored in floating-point form with a [6] I. Koval and G. Gara, "Digital MF receiver using discrete Fourier
transform," IEEE Trans. Commun., vol. COM-21, pp. 1331-1335,
b-bit mantissa. Then the stored number is given by [13]
Dec. 1973.
V. Oppenheim and C. J. Weinstein, "Effects of finite register length
[7]
A.
z = z(1 + c)
(A3)
in digital filtering and the fast Fourier transform," Proc. IEEE, vol.
60, pp. 957-976, Aug. 1972.
where E is a zero-mean random variable with a uniform [8] D.
V. James, "Quantization errors in the fast Fourier transform,"
probability density function6
IEEE Trans. Acoust., Speech Signal Processing, vol. ASSP-23, pp.
277-283, June 1975.
< 2 b and 0 otherwise.
p() = {2(b- 1) for
[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 representation of the number 1.0 is utilized in the arithmetic.
122
[10] V. K. Jain, W. L. Collins, and D. C. Davis, "High accuracy measurement of analog signal parameters via IFFT," Honeywell Res. Rep.,
1979.
[11] B. P. Agrawal and V. K. Jain, "Bandwidth compression of noisy
images," 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-
[18] F. J. Harris, "On the use of windows for harmonic analysis with the
discrete Fourier transform," Proc. IEEE, vol. 66, pp. 51-83, Jan. 1978.
Abstract We have investigated the feasibility of a special purpose frequency standard based on microwave absorption in ammonia
gas (N"5H3). Such a device would potentially fill a need in certain
communications and navigation applications for an oscillator which
10- 9) than that provided
has medium stability, greater accuracy ( -O
by crystal oscillators, but a cost significantly smaller than that of
more sophisticated atomic frequency standards. A device was constructed using a stripline oscillator near 0.5 GHz whose multiplied
output was frequency-locked to the absorption of the 3-3 line in
N15H3 (' 22.8 GHz). Output between 5 and 10 MHz was provided
by direct division from the 0.5-GHz oscillator. Observed stability
was 2 x 10- " from 10 to 6000 s, and reproducibility (accuracy) is
estimated to be + 2 x 10- 9. The unique features of this device, which
include 1) high-performance stripline oscillator, 2) digital servo
techniques, 3) unique oscillator-cavity servo, 4) pressure shift com-
80302.
H. W. Hellwig was with the Frequency and Time Standards Section,
National Bureau of Standards, Boulder, CO. He is now with Frequency
and Time Systems, Inc., Danvers, MA.