You are on page 1of 4
The Use of Fast Fourier Transform for the Estimation of Power Spectra: A Method Based on Time Aver- aging Over Short, Modified Periodograms PETER D. WELCH Abstract—The use of the fast Fourier transform in power spec- trum analysis is described. Principal advantages ofthis method are @ ction in the number of computations and in required core foe, and convenient application in nonstationarity tests. The ‘method involves sectioning the record and averaging. modified evodograms of the sections. Intropuction ‘Tae Mernon Let X(), 20, «+, N—1 be a sample from a sta- tionary, second-order stochastic sequence. Assume for simplicity that E(X) =0. Let X(j) have spectral density P(), [f| $4. We take segments, possibly overlapping, of length L with the starting points of these segments D units apart. Let Xi(),j=0, -- », L—1 be the first such segment. Then HG) = XO Similarly, Xa) = and finally Xe()= Foor XGj+ D) XG+(K=1)D) 5 ‘Manusrip received February 28, 1967 The authori with the IBM Research Center, Yorktown Heights, NY. ¥C. Bingham, M. D. Godfrey, and J, W. Tukey, *Modern tech- ques of power spectrum estimation,” this lay py 56-66. We suppose we have K such segments; Xi), - ++, Xx(j), and that they cover the entire record, ie, that (K—1)D+L=N. This segmenting is illustrated in Fig. 1 ‘The method of estimation is as follows. For each segment of length Z ve caleulate a modified periodo- gram. That is, we select a data window 17(), L=1, and form the sequences Xi)W),-- +, Xx()WG). We then take the finite Fourier transforms Ai(n), «++, An(n) of these sequences. Here Ax) = 7 XuGyW Gyemenre and i=(—1)"%, Finally, we obtain the K modified eriodograms 1g = 4 | axon Le (Ju v Le() where tn 7 b/d and v=tE wg. The spectral estimate is the average of these periodo- grams, ie, = EE MW. P= zh Now one can show that BleG01 = f"aneu soar where 109 =F] E woes and f "ane Reprinted from IEEE Trans. Audio and Eletroscoust, vol. AU-16, pp. 70-73, June 1967, ” WELCH: FAST FOURIER TRANSFORM FOR POWER SPECTRA Fig. 1. Illustration of record segmentation, Hence, we have a spectral estimator P(f) with a resul- tant spectral window whose area is unity and whose width is of the order of 1/L. Cuorce oF Data Waspows We suggest two reasonable choices for the data win- dow W(j); one of them has the shape 1—: —1<¢<1 and gives a spectral window which, when the two are normalized to have the same half-power width, is very Close in shape to the hanning or cosine arch spectral ‘window; the other data window has the shape 1—|!]: wiist} we can show! that a -[Ewowe+in] [Ewe]. Hence, we have the following result which enables us to estimate the variances of P(f,) when f, is not close to 0 or}. Result: If X() is a sample from a Gaussian process, and PO) is fat over the passband of the estimator, and bY —fa)=0 for f<0 and f>5, then woh FO bie A Var { P(f,)} Fourier transform ofthis spectrum. 8 IEBE TRANSACTIONS ON AUDIO AND ELECTROACOUSTICS, JUNE 1967 where 20 ~-[Ewowa rin] /[S wal) aK 142 K For estimating the spectrum of P(f,) at 0 and 4 the variance is twice as great, as given by the following result: Result: If X(j) is a sample from a Gaussian process and P(f)is flat over the passband of the estimator, then Var {P(0 or 1/2} 2P*(0 or 1/2) { i K oli) where p(j) is as defined above. In the above results note that p(j)>0 and that elj)=0 if DEL. Hence, if we average over K segments the best we can do is obtain a reduction of the variance by a factor 1/K. Further, this 1/K reduction can be achieved (under these conditions) if we have nonover- lapping segments. Hence, if the total number of points N can be made sufficiently large the computationally ‘most efficient procedure for achieving any desired vari- ance is to have nonoverlapping segments, ie., to let D=L. In thiscase we have PU)E v Further, under these conditions B{ P(f.)} = Ef = Pf) and, hence, EPG} Var {PG} and the equivalent degrees of freedom of the approxi- mating chi-square distribution is given by EDF. {P()} = 2K. If the total number of points IV cannot be made arbi- trarly large, and we wish to get a near maximum reduc- tion in the variance out of a fixed number of points then a reasonable procedure is to overlap the segments by one half their length, i.e., to let D=L/2. In this case, if we use Wi(j) as the data window we get p(1)~1/9 and Pl 0 for j> 1. Letting Py(f) be the estimate, we have vate) PH fie 2} _ MP) ae. ‘The factor 11/9, compared with the factor 1.0 for non- overlapped segments, inflates the variance. However, an overall reduction in variance for fixed record length is achieved because of the difference in the value of K. For nonoverlapped segments we have K=WN/L; for the overlapping discussed here PA). Var [PUf)} = I(t) } 19 aN L 2 E Therefore, for fixed N and L the overall reduction in variance achieved by this overlapping is by a factor of 11/18, Now again E{ A,(f,)} = P(fa) and, hence, BLP} _ 9K _ 18 Var {Po} ~~ Te Finally, (19) 7 Om TEE Thus, BLA} fA m Law, ote and the equivalent degrees of freedom of the approxi- mating chi-square distribution i EDF. { Pi(f) = 28Nay, Similarly, if we use W,(j) as our data window we get P(t) =1/16 and p(j)=0, j>1. Letting P.(f.) be the estimate in this case we get, by following the above steps and using the result As/=(1.28)/(L+1), that the equivalent degrees of freedom is again approximately EDF. {Pa(fa)} ~ 2.8NAf. Thus, both Wi(j) and Wa(j) yield roughly the same variance when adjusted to have windows of equal half power width. Finally, we should point out that the above variances need to be doubled and the equivalent degrees of freedom halved for the points f.=0 and 4. Deralts IN THE APPLICATION OF THE Fast FourIER TRANSFORM ALGORITHM Ourestimator P() is given by L & 1 En UKE | Ae, Pot) Kz where L is the length of the segments, and K is the number of segments into which the record is broken, and 7 +E wa. u ‘We will frst discuss how the complex algorithm can be used to obtain the summation Daas] As(n)|! two terms at a time with K/2[or (K+1)/2, if K is odd] rather than K transforms. Suppose K’is even and let NaG) = MAOWO) + XD) i XeAGWG) + AX DW) Ven = WELCH: FAST FOURIER TRANSFORM FOR POWER SPECTRA Let y(n) be the transform of ¥¢(j). Then, by the linear- ity property of the finite Fourier transform Bin) = Axim) + iA ne(n), Further, BAN = 0) = Awa(N =n) + iAw(N = 0) TOW + inion Now, | Buln) 8 = (Auesfn) + Gaal) arn) ~ fal) | BY =m) = (Anal) ~ inl ARIO + ital). These equations yield, with some algebra, | Batwy [P+ | Bec =m) ft = 2(| Anat |? + | dale) 9. Hence, ‘at 2 (1) Belo) [2+ | Ba ~ mp [9 Pud UK & If K is odd this procedure can be extended in an obvious fashion by defining Yoeyna(j)=Xx(j) and summing from 1 to (K+1)/2. A second observation on the actual application of the algorithm concerns the bit-inverting, If the algorithm is applied as described here, and one is especially con- cerned with computation time, then the bit-inverting could be postponed until after the summation, Thus, instead of bit-inverting K/2 times, one would only have to bit-invert once. Computanion Trase ‘The time required to perform a finite Fourier trans- form on a sequence of Iength L is approximately WL logs L where 2 is a constant which depends upon the program and type of computer. Hence, if we overlap segments by an amount L/2 we require an amount of, computing time (performing two transforms simul- taneously) approximately equal to (5) erect = EN logs L, plus the amount of time required to premultiply by the data window and average. If we only consider the time required for the Fourier transformation this compares, with approximately &’ (loge N)/2 for the smoothing of the periodogram. Hence, if L-<(N)"* it requires less ‘computing time than the smoothing of the peri RELAtion oF Tuts Meruop 70 Comptex Demoputation {tis appropriate to mention here the process of com- plex demodulation and its relation to this method of spectral estimation. Complex demodulation is discussed. in Tukey, Godfrey’ and Bingham, Godfrey, and Tukey." The functions Ax(n)e-##2/t considered as functions of B are complex demodulates sampled at the sampling period D. In this case the demodulating func- tion is ei, A phase coherency from sample to sample is retained in the complex demodulates. This phase is lost in estimating the spectrum and, hence, as.a method of estimating spectra, complex demodulation is identical to the method of this section. However, additional in- formation can be obtained from the time variation of the phase of the demodulates. ‘Tue SpaciNG oF THE SrecrRaL Estimates ‘This method yields estimates spaced 1/L units apart. If more finely spaced estimates are desired zeros can be added to the sequences X;(j)W() before taking the transforms, If L’ zeros are added giving time sequences L-+L! = M long and we let Ay’(n) be the finite Fourier transforms of these extended sequences, i, te Wn) = x Xe(j) W (je teon then the modified periodogram is given by Pa Ta(fa) = = | Aa! (n) |* i) = i | Auton | where MP2 Everything proceeds exactly as earlier except that we have estimates spaced at intervals of 1/Mf rather than ML. Estimation o¥ Cxoss SprcTRA Let XM, f: WWH1, and YG), j: N=1, be samples from two’ second-order’ stochastic sequences. This method can be extended in a straight- forward manner to the estimation of the cross spectrum, P,,{f). In exactly the same fashion each sample is divided in K segments of length L. Call these segments May -++) Xx) and VAG@),- ++ ,¥x(). Modified cross periodograms are calculated for each pair of seg- ments Xs(), Yo(), and the average of these modified ‘ross periodograms constitutes the estimate P.,(f.). The spectral window is the same as is obtained using this method for the estimation of the spectrum. cin Iuby, “Digi, enphasng she connection betwen analisis of variance and spectrum analysis," Technometrcs, vo pp. 191-219, May 1961 D, Godleey, “An ex sconomic time serien” 1968. study of the bispectrum of Stites vol 1% pp 48-03. Janaaey

You might also like