Physics 434 Module 4-FFT – Thanks to Prof. Toby Burnett for writeups & lab 1 Physics 434: Continuing Module 4 week 2: the Fourier Transform Explore Fourier Analysis and the FFT
Physics 434 Module 4-FFT 2 The Fourier Transform & its inverse
Physics 434 Module 4-FFT 3 Exploration VI
Physics 434 Module 4-FFT 4 The resonance function: a damped harmonic oscillator Note that this is the response function to driving the system at a frequency .
Physics 434 Module 4-FFT 5 Now, go from continuous sample to discrete-time sample (equal time intervals) (“Nyquist” …) Sampling parameters: total digitizing time T, sample frequency f s implies time interval t = 1/ f s, number of samples n = T f s
Physics 434 Module 4-FFT 6 Some details from FFT help The input sequence is real-valued. The Real FFT VI executes fast if the size of the input sequence is a valid power of 2 (there is magic in computation speed of the number of points is a power of 2) (I, personally, don’t worry about it). size = 2m. m = 1, 2,…, 23. If the size of the input sequence is not a power of 2 but is factorable as the product of small prime numbers, the VI uses a mixed radix “Cooley-Tukey” algorithm to efficiently compute the DFT of the input sequence. The output sequence Y = Real FFT[X] is complex and returns in one complex array Y = Re(Y) + j*Im(Y)
Physics 434 Module 4-FFT - T. Burnett 7 Comments There are n real numbers input, but n complex numbers output, twice as many real numbers. They cannot all be independent! Think about which frequencies can be measured, from smallest to largest. Smallest: DC, or average! Frequency is 0 Hz Next: period is T f=1/T. all are harmonics of this Largest: period is 2 t f N =n f/2. (This is the “Nyquist frequency”!) How many are there? 0, f, 2 f, 3 f … (n/2) f or 1+n/2 different frequencies (assume m is even). That is, for n=4, there are 3 different frequencies. What is missing?
Physics 434 Module 4-FFT - T. Burnett 8 Counting frequencies, cont. (explanation for subtle details) The FT is complex to keep track of two integrals: sine and cosine! Remember Only one component for zero frequency since sin(0)=0. (No phase if no wiggles) The sine also vanishes for the Nyquist frequency! Plot is for 4 measurements: red for f, blue 2 f (Nyquist) The linear combinations for the 4 frequency components
Physics 434 Module 4-FFT 9 Table from the help Negative frequencies! If h(f) is real, then H(f)=H(-f) Phase information for each of these
Physics 434 Module 4-FFT - T. Burnett 10 Plot from the help
Physics 434 Module 4-FFT 11 Homework using demo VI (1) Demonstrate the relationship of the positive and negative frequencies. (2) What is the phase at zero and Nyquist frequencies? (3) If not enough samples (Nyquist frequency <= actual frequency, you get aliasing (show this in the demo VI)? Demonstrate this aliasing.
Physics 434 Module 4-FFT 12 Don’t forget that… This last part of the Module is due this Friday There will likely be extensive analysis in your document section. The main deliverable is comparing to the previous module “response function”. You’ll the need to convert your FFT output to amplitude for the resonance fit, then compare with the Module 3 results