Presentation is loading. Please wait.

Presentation is loading. Please wait.

FOURIER ANALYSIS PART 2: Technicalities, FFT & system analysis

Similar presentations


Presentation on theme: "FOURIER ANALYSIS PART 2: Technicalities, FFT & system analysis"— Presentation transcript:

1 FOURIER ANALYSIS PART 2: Technicalities, FFT & system analysis
Maria Elena Angoletta AB/BDI DISP 2003, 27 February 2003

2 TOPICS 2. DFT resolution - improvement
1. DFT windows 2. DFT resolution - improvement 3. Efficient DFT calculation: FFT 4. Hints on system spectral analysis M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

3 DFT – Window characteristics
Finite discrete sequence  spectrum convoluted with rectangular window spectrum. Leakage amount depends on chosen window & on how signal fits into the window. Resolution: capability to distinguish different tones. Inversely proportional to main-lobe width. Wish: as high as possible. (1) Peak-sidelobe level: maximum response outside the main lobe. Determines if small signals are hidden by nearby stronger ones. Wish: as low as possible. (2) Sidelobe roll-off: sidelobe decay per decade. Trade-off with (2). (3) Rectangular window Several windows used (application-dependent): Hamming, Hanning, Blackman, Kaiser ... M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

4 In time it reduces end-points discontinuities.
DFT of main windows Some window functions Windowing reduces leakage by minimising sidelobes magnitude. Sampled sequence In time it reduces end-points discontinuities. Non windowed Windowed M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

5 Common windows characteristics
DFT - Window choice Common windows characteristics Far & strong interfering components  high roll-off rate. Near & strong interfering components  small max sidelobe level. Accuracy measure of single tone  wide main-lobe Observed signal Window wish list NB: Strong DC component can shadow nearby small signals. Remove it! M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

6 DFT - Window loss remedial
Smooth data-tapering windows cause information loss near edges. Solution: sliding (overlapping) DFTs. Attenuated inputs get next window’s full gain & leakage reduced. Usually 50% or 75% overlap (depends on main lobe width). Drawback: increased total processing time. M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

7 Zero padding Improves DFT frequency inter-sampling spacing (“resolution”). After padding frequencies NS = original samples, L = padded. M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

8 DFT spectral resolution
Zero padding -2 DFT spectral resolution Capability to distinguish two closely-spaced frequencies: not improved by zero-padding!. Frequency inter-sampling spacing: increased by zero-padding (DFT “frequency span” unchanged due to same sampling frequency) Additional reason for zero-padding: to reach a power-of-two input samples number (see FFT). Zero-padding in frequency domain increases sampling rate in time domain. Note: it works only if sampling theorem satisfied! Apply zero-padding after windowing (if any)! Otherwise stuffed zeros will partially distort window function. NOTE M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

9 DFT - scalloping loss (SL)
kmax bin, k We’re lucky here! Input frequency f0 btwn. bin centres causes magnitude loss SL = 20 Log10(|cr+kmax /ckmax|) ~ Worst case when f0 falls exactly midway between 2 successive bins (|r|=½) SL bin, k |r|  ½ f0 = (kmax + r) fS/N Frequency error: f = r fS/N, relative error: R=f / f0 = r/[(kmax+r)] R  1/(1+2 kmax) kmax f0 Note: Non-rectangular windows broaden DFT main lobe  SL less severe Correction depends on window used. May impact on data interpretation (wrong f0!) M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

10 DFT - SL Example SL remedial • increasing N (?) • improve windowing,
DC bias correction, Rectang. window, zero padding, FFT • increasing N (?) • improve windowing, • zero-padding, • interpolation around kmax. SL remedial DC bias correction, Hanning window, zero padding, FFT M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

11 DFT - parabolic interpolation
Rectangular window Hanning window Parabolic interpolation often enough to find position of peak (i.e. frequency). Other algorithms available depending on data. M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

12 DFT averaging Incoherent averaging Coherent averaging
M = No. of DFT to average k = bin number, k=0, 1 .. N-1 Background noise fluctuations reduced, average noise power unchanged. Coherent averaging Background noise power is reduced. M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

13 Efficient DFT calculation: FFT
WNn,k = twiddle factors k = 0,1 .. N-1 DFT Direct DFT calculation redundancy WNkn periodic function calculated many times. Direct DFT calculation requires ~N2 complex multiplications. complexity O(N2) VERY BAD ! Algorithms (= Fast Fourier Transform) developed to compute N-points DFT with ~ Nlog2N multiplications (complexity O(Nlog2N) ). M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

14 FFT advantages DFT  N2 FFT  N log2N N DFT Radix-2 4 16 32 1024 80 128 16384 448 5120 DSPs & PLDs influenced algorithms design. ‘60s & ‘70s: multiplication counts was “quality factor”. Now: number of additions & memory access (s/w) and communication costs (h/w) also important. NB: Usually you don’t want to write an FFT algorithm, just to “borrow” it !!! Go “shopping” onto the web! M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

15 FFT philosophy General philosophy (to be applied recursively): divide & conquer. cost(sub-problems) + cost(mapping) < cost(original problem) Different algorithms balance costs differently. Example: Decimation-in-time algorithm time frequency Step 1: Time-domain decomposition. N-points signal  N, 1-point signals (interlace decomposition). Shuffled input data (bit-reversal). log2N stages. (*): only first decomposition shown. (*) Step 2: 1-point input spectra calculation. (Nothing to do!) Step 3: Frequency-domain synthesis N spectra synthesised into one. M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

16 FFT family tree Divide & conquer N : GCD(*)(N1,N2) = 1
N1, N2 co-prime. Ex: 240 = 16·3·5 Cost: SUB-PROBLEMS. No twiddle-factors calculations. Easier mapping (permutations). Some algorithms: Good-Thomas, Kolba, Parks, Winograd. (*) GCD= Greatest Common Divisor N : GCD(N1,N2) <> 1 Ex: N = 2n Cost: MAPPING. Twiddle-factors calculations. Easier sub-problems. Some algorithms: Cooley-Tukey, Decimation-in-time / in-frequency Radix-2, Radix-4, Split radix. M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

17 (Some) FFT concepts & notes
Butterfly: basic FFT calculation element. Decimation-in-time  time data shuffling. Decimation-in-frequency  frequency data shuffling. In-place computation: no auxiliary storage needed, allowed by most algorithms. DFT pruning: only few bins needed or different from zero  only they get calculated (ex: Goertzel algorithm). Real-data case: Mirroring effect in DFT coeffs.  only half of them calculated. N power-of-two: Many common FFT algorithms work with power-of-two number of inputs. When they are not  pad inputs with zeroes. Dual approach: data to be reordered in time or in frequency! M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

18 Systems spectral analysis (hints)
System analysis: measure input-output relationship. h[t] = impulse response Linear Time Invariant x[n] h[n] y[n] predicted from { x[n], h[t] } X(f) H(f) Y(f) = X(f) · H(f) H(f) : LTI transfer function Transfer function can be estimated by Y(f) / X(f) M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

19 Estimating H(f) (hints)
Power Spectral Density of x[t] (FT of autocorrelation). Cross Power Spectrum of x[t] & y[t] (FT of cross-correlation). Transfer Function (ex: beam !) Coherence function values in [0,1] assess degree of linear relationship between x[t] & y[t]. It is a check on H(f) validity! M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

20 References - 1 Papers Tom, Dick and Mary discover the DFT, J. R. Deller Jr, IEEE Signal Processing Magazine, pg , April 1994. On the use of windows for harmonic analysis with the Discrete Fourier Transform, F. J. Harris, IEEE Proceedings, Vol. 66, No 1, January 1978. Some windows with a very good sidelobe behaviour, A. H. Nuttall, IEEE Trans. on acoustics, speech and signal processing, Vol ASSP-29, no. 1, February 1981. Some novel windows and a concise tutorial comparison of windows families, N. C. Geckinli, D. Yavuz, IEEE Trans. on acoustics, speech and signal processing, Vol ASSP-26, no. 6, December 1978. Study of the accuracy and computation time requirements of a FFT-based measurement of the frequency, amplitude and phase of betatron oscillations in LEP, H.J. Schmickler, LEP/BI/Note Causes et corrections des erreurs dans la mesure des caracteristiques des oscillations betatroniques obtenues a partir d’une transformation de Fourier, E. Asseo, CERN PS 85-9 (LEA). M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21

21 References - 2 Precise measurements of the betatron tune, R. Bartolini et al., Particle Accel., 1996, vol. 55, pp How the FFT gained acceptance, J. W. Cooley, IEEE Signal Processing Magazine, January 1992. A comparative analysis of FFT algorithms, A. Ganapathiraju et al., IEEE Trans.on Signal Processing, December 1997. Books The Fourier Transform and its applications, R. N. Bracewell, McGraw-Hill, 1986. A History of scientific computing, edited by S. G. Nash, ACM Press, 1990. Introduction to Fourier analysis, N. Morrison, John Wiley & Sons, 1994. The DFT: An owner’s manual for the Discrete Fourier Transform, W. L. Briggs, SIAM, 1995. The FFT: Fundamentals and concepts, R. W. Ramirez, Prentice Hall, 1985. M. E. Angoletta - DISP Fourier analysis - Part 2.2: Technicalities / 21


Download ppt "FOURIER ANALYSIS PART 2: Technicalities, FFT & system analysis"

Similar presentations


Ads by Google