N INTRODUCTION TO SPECTRL FUNCTIONS Revision B By Tom Irvine Email: tomirvine@aol.com March 3, 000 INTRODUCTION This tutorial presents the Fourier transform. It also discusses the power spectral density function, which is calculated from the Fourier transform. Each of these functions represents a signal in terms of its spectral components in the frequency domain. The Fourier transform is a complex exponential transform which is related to the Laplace transform. The Fourier transform is also referred to as a trigonometric transformation since the complex exponential function can be represented in terms of trigonometric functions. Specifically, exp[ jωt] = cos( ωt) + jsin( ωt) (a) exp[ jωt] = cos( ωt) jsin( ω t) (b) where j = The Fourier transform is often applied to digital time histories. The time histories are sampled from measured analog data. FOURIER TRNSFORM THEORY Formulas The Fourier transform X(f) for a continuous time series x(t) is defined as [ π ] X(f) = x(t)exp -j f t dt () - where - < f < Thus, the Fourier transform is continuous over an infinite frequency range.
The inverse transform is [ π ] x(t) = X(f)exp +j f t df (3) - Equations () and (3) are taken from Reference. Note that X(f) has dimensions of [amplitude time]. lso note that X(f) is a complex function. It may be represented in terms of real and imaginary components, or in terms of magnitude and phase. The conversion is made as follows for a complex variable V. V = a + jb (4) Magnitude V = a + b (5) Phase V = arctan( b / a) (6) Example Consider a sine wave [ ] x( t) = sin π f$ t (7) where - < t < The Fourier transform of the sine wave is { ( f f) ( f f )} j X( f ) = δ $ + δ $ (8) where δis the Dirac delta function. The derivation is given in ppendix. The Fourier transform is plotted in Figure.
δ $ ( f f ) Imaginary X(f) $ f $f f f δ $ ( ) f Figure. Fourier Transform of Sine Wave The transform of a sine wave is purely imaginary. On the other hand, the Fourier transform of a cosine wave is { ( f f ) ( f f )} X( f ) = δ $ + δ $ (9) The Fourier transform is plotted in Figure. δ $ ( f f ) Real X(f) ( ) f f δ $ $ f $f Figure. Fourier Transform of Cosine Wave The transform of a cosine wave is purely real. 3
Characteristics The plots in Figures and demonstrate two characteristics of the Fourier transforms of real time history functions:. The real Fourier transform is symmetric about the f = 0 line.. The imaginary Fourier transform is antisymmetric about the f = 0 line. DISCRETE FOURIER TRNSFORM Formulas The following equation set is taken from Reference. The Fourier transform F k for a discrete time series x n is Fk N = x n exp N n = 0 π j nk, N for k = 0,,...,N (0) where N is the number of time domain samples, n is the time domain sample index, k is the frequency domain index. Note that the frequency increment f is equal to the time domain period T as follows f = T () The frequency f k is obtained from the index parameter k as follows f k = k f () Note that F k has dimensions of [amplitude]. n alternate form which has dimensions of [amplitude time] is given in ppendix B. The corresponding inverse transform is x n N = Fk exp + k 0 = π j nk, N for n = 0,,..., N (3) 4
characteristic of the discrete Fourier transform is that the frequency domain is taken from 0 to (N-) f. The line of symmetry is at a frequency of N f (4) This is equivalent to one-half the sampling rate. Example The discrete Fourier transform of a sine wave is given in Figure 3. IMGINRY DISCRETE FOURIER TRNSFORM OF x(t) = sin [ π ( Hz) t ].0 N = 6384 t = ( / 3 ) sec T = 5 sec f = ( / 5 ) Hz Dashed line is line of symmetry. 0.5 MPLITUDE 0-0.5 -.0 0 3 4 5 6 7 8 9 0 3 4 5 6 7 8 9 0 3 4 5 6 7 8 9 30 3 3 FREQUENCY (Hz) Figure 3. Fourier Transform of a Sine Wave Note that the sine wave has a frequency of Hz. The total number of cycles is 5, with a resulting period of 5 seconds. gain, the Fourier transform of a sine wave is imaginary and antisymmetric. 5
Nyquist Frequency Note that the line of symmetry in Figure 3 marks the Nyquist frequency. The Nyquist frequency is equal to one-half of the sampling rate. Shannon s sampling theorem states that a sampled time signal must not contain components at frequencies above the Nyquist frequency, from Reference 3. Spectrum nalyzer pproach Spectrum analyzer devices typically represent the Fourier transform in terms of magnitude and phase rather than real and imaginary components. Furthermore, spectrum analyzers typically only show one-half the total frequency band due to the symmetry relationship. The spectrum analyzer amplitude may either represent the half-amplitude or the fullamplitude of the spectral components. Care must be taken to understand the particular convention of the spectrum analyzer. The one-sided, full-amplitude Fourier transform magnitude would be calculated as Fˆ k= magnitude N magnitude N n= 0 N x n N n = 0 exp n { x } for k = 0 π N j nk for k =,..., N with N as an even integer. Note that k = 0 is a special case. The Fourier transform at this frequency is already at fullamplitude. For example, a sine wave with an amplitude of volt and a frequency of 00 Hz would simply have a full-amplitude Fourier magnitude of volt at 00 Hz. Fast Fourier Transform The discrete Fourier transform requires a tremendous amount of calculations. Fast Fourier transform should be used if the number of time history samples is greater than 5000. The Fast Fourier transform is described in References 3 and 4. (5) 6
POWER SPECTRL DENSITY FUNCTION Dimensions The power spectral density function has dimensions of [amplitude time]. Furthermore, the amplitude is in terms of it RMS value. Calculation Method The power spectral density function may be calculated via three methods:. Measuring the RMS value of the amplitude in successive frequency bands, where the signal in each band has been bandpass filtered.. Taking the Fourier transform of the autocorrelation function. This is the Wierner- Khintchine approach. 3. Taking the limit of the Fourier transform X(f) times its complex conjugate divided by its period T as the period approaches infinity. This report focuses on the third method. Formal Definition Recall the Fourier transform X(f) for a continuous time series x(t) [ π ] X(f) = x(t)exp -j f t dt (6) - where - < f < The power spectral density S(f) for a continuous Fourier transform is defined as S ( f ) lim = T T X ( f ) X * ( f ) (7) where - < f < Note that the * symbol denotes complex conjugate. 7
Practical pplication Recall the double-amplitude spectrum analyzer version of the Fourier transform, Fˆ k= magnitude N magnitude N n= 0 N x n N n = 0 exp n { x } for k = 0 π N j nk for k =,..., N with N as an even integer. (8) The single-sided power spectral density function PSD k for a discrete series is Fˆ 0 Fˆ 0*, for k = 0 f PSD k = (9) Fˆ k Fˆ k * N, for k =,..., f Recall that the frequency increment f is equal to the time domain period T as follows f = T (0) Recall that the frequency is obtained from the index parameter k as follows f k = k f () The ½ factor in equation (9) is required to convert [amplitude peak] to [amplitude RMS], per the convention of a power spectral density function. The k = 0 case does not require this peak-to-rms conversion. Note that the RMS amplitude is equal to the peak amplitude for a signal with zero frequency. This signal is often called a DC signal. 8
Statistical Properties Mean Square The area under the power spectral density curve is equal to the mean square value. The square root of this area is the RMS value. The mean square value can also be calculated directly from the time history. The mean square value X is given for a continuous signal by equation () and for a digital signal by equation (3). X = lim T T [ x(t) ] dt T 0 () X = lim N x N N i (3) i Note that the RMS value is simply the square root of the mean square value. Standard Deviation The fluctuation about the mean is described by the variance σ. The variance formulas are given for continuous and digital signals in equations (4) and (5), respectively. Note that the square root of the variance is the standard deviation σ. lim σ = T T [ x(t)-x] dt T 0 (4) σ = lim N N N x i X i (5) Relationship between Standard Deviation and RMS Values By substitution, the following relationships can be derived: X = [ X] σ + (6) 9
[ ] σ = X X (7) FURTHER PROCESSING CONCEPTS Discrete Fourier transforms calculated from finite data records can suffer from an error called leakage. This error causes energy to be smeared into adjacent frequency bands. The leakage error is reduced by applying a window to the data. Typically, the window is applied to a segment of the data. The segments are taken with an overlap in order to recover statistical degrees of freedom lost as a result of the window. These concepts are explained in References 3 through 5. REFERENCES:. W. Thomson, Theory of Vibration with pplications, nd Ed, Prentice-Hall, 98.. GenRad TSL5 Time Series Language for 500-Series Systems, Santa Clara, California, 98. 3. R. Randall, Frequency nalysis 3 rd edition, Bruel & Kjaer, 987. 4. F. Harris, Trigonometric Transforms, Scientific-tlanta, Technical Publication DSP-005, San Diego, C. 5. T. Irvine, Statistical Degrees of Freedom, 998. 0
PPENDIX Consider a sine wave [ ] x( t) = sin π f$ t (-) where - < t < The Fourier transform is calculated indirectly, by considering the inverse transform. Note that the sine wave is a special case in this regard. Recall [ π ] x(t) = X(f)exp + j f t df (-) - Thus [ π ] = [ + π ] sin f$ t X( f ) exp j f t df (-3) [ π ] = { [ π ] + [ π ]} sin f$ t X( f ) cos f t jsin f t df (-4) Let X(f) = P(f) + j Q(f) (-5) where and P(f) and Q(f) are both real coefficients - < f <. [ π ] = { + } { [ π ] + [ π ]} sin f$ t P( f ) j Q( f ) cos f t jsin f t df (-6) [ π ] = { [ π ] [ π ]} + { ( ) sin [ π ] + ( ) cos[ π ]} sin f$ t P( f ) cos f t Q( f )sin f t df j P f f t Q f f t df (-7)
Equation (-7) can be broken into two parts [ π ] = { [ π ] [ π ]} sin f$ t P( f )cos f t Q( f )sin f t df (-8) { ( ) sin [ π ] ( ) cos[ π ]} 0 = j P f f t + Q f f t df (-9) Consider equation (-8) [ π ] = { [ π ] [ π ]} sin f$ t P( f )cos f t Q( f )sin f t df (-0) Now assume P(f)=0 (-) With this assumption, [ π ] = [ π ] sin f$ t Q( f )sin f t df (-) Now let Q(f)= q (f) + q (f) (-3) [ π ] = [ + ] [ π ] sin f$ t q ( f ) q ( f ) sin f t df (-4) [ πfˆt ] = [ q (f )] sin[ πf t] df [ q (f )] sin[ πf t] sin df (-5) [ πfˆt ] = [ q (f )] sin[ πf t] df + [ q (f )] sin[ πf t] sin df (-6)
Equation (-4) is satisfied by the pair of equations q( f ) = δ ( f f $ ) (-7) q ( f ) = δ ( f f$ ) (-8) where δis the Dirac delta function. By substitution, Q( f ) = δ ( f f $ ) + δ ( f f$ ) (-9) Verification must be made that equation (-9) is satisfied. Recall { ( ) sin [ π ] ( ) cos[ π ]} 0 = j P f f t + Q f f t df (-0)? 0 = 0sin [ ] + ( $ j πf t δ f f ) + δ ( f f$ ) cos[ π f t] df (-) 0? = [ πf t] + [ πf t] j cos $ cos $ (-) 0? = [ πf t] + [ πf t] j cos $ cos $ (-3) 0 = 0 (-4) Recall the time domain function [ ] x( t) = sin π f$ t (-5) where - < t < 3
The Fourier transform is thus j j X( f ) = δ ( f f $ ) + δ ( f f$ ) (-6) { ( f f) ( f f )} j X( f ) = δ $ + δ $ (-7) 4
PPENDIX B n alternate form of the discrete Fourier Transform is Fˆ k N = t x n n= 0 exp π j nk, N for k = 0,,..., N (B-) Fˆ k has dimensions of [amplitude time]. The corresponding inverse transform is x n N = f Fˆ k n= 0 exp + π j nk, N for n = 0,,..., N (B-) These alternate equations are based on the following reference: MC/RN IV pplications Manual, Revision, University Software Systems, Los ngeles, California, 99. 5