Physics 434 Module 3

advertisement
Physics 434 Module 4 week 2:
the FFT
Explore Fourier Analysis and the FFT
1
Physics 434 Module 4-FFT - T. Burnett
Exploration VI
2
Physics 434 Module 4-FFT - T. Burnett
The resonance function
The solution t o the damped harmonic oscillator differenti al equation
 d 2 r d
2
 2 
 r  h(t )  0
Q dt
 dt

is (A is an arbitrary constant)
 
1
1  

h(t )  A exp  r t  i 1 

2

4Q
2Q  
 
Its Fourier tr ansform is :
H ( ) 

A
  
1  iQ   r 
 r  
Note that this is the response function to driving
the system at a frequency .
3
Physics 434 Module 4-FFT - T. Burnett
Now, go discrete!

4
Parameters: total digitizing time T, sample
frequency fs implies time interval t = 1/ fs, number
of samples n = T fs
Physics 434 Module 4-FFT - T. Burnett
Details from FFT help








5
The input sequence is real-valued.
The Real FFT VI executes fast radix-2 FFT routines if the size
of the input sequence is a valid power of 2
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.
Refer to the Fast FFT Sizes section of Chapter 4, Frequency
Analysis in the LabVIEW Analysis Concepts manual for more
information about fast FFT input sequence sizes.
The output sequence Y = Real FFT[X] is complex and returns in
one complex array
Y = YRe + jYIm
Physics 434 Module 4-FFT - T. Burnett
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.




6
Smallest: DC, or average! Frequency is 0
Next: period is T  f=1/T. all are harmonics of this
Largest: period is 2 t  fN=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
Counting frequencies, cont.




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
eit  cos(t )  i sin( t )
1
0.8
0.6
0.4
0.2
0
-0.2
0
1
2
3
4
-0.4
-0.6
-0.8
-1
sin(ft)
cos(ft)
sin(2ft)
cos(2ft)
measure here
0 : h0  h1  h2  h3
cos ft : h0  h2
sin ft : h1  h3
cos( 2ft ) : h0  h1  h2  h3
7
Physics 434 Module 4-FFT - T. Burnett
Table from the help
Phase
information
for each of
these
Negative
frequencies!
If h(f) is real,
then H(f)=H(-f)
8
Physics 434 Module 4-FFT - T. Burnett
Plot from the help
9
Physics 434 Module 4-FFT - T. Burnett
Study of the demo VI





10
Verify negative frequencies
See if the phase at zero and Nyquist frequency is 0.
If not enough samples (Nyquist <= actual frequency,
get aliasing
What determines the spacing of frequencies around
the resonance? (I.e., f)
What happens when you adjust the phase of the
input signal? What are reasonable limits for Q
(especially, small)
Physics 434 Module 4-FFT - T. Burnett
Don’t forget that…



11
This Module is due next week at class time
We expect extensive analysis in your document
section.
You need to convert your FFT output to amplitude
for the resonance fit, to compare with the Module 3
results
Physics 434 Module 4-FFT - T. Burnett
A little bonus-time vs frequency in
the news


12
Results from the CDF experiment at the Tevatron
Bs mixing requires measuring a damped sine wave.
Physics 434 Module 4-FFT - T. Burnett
13
Physics 434 Module 4-FFT - T. Burnett
14
Physics 434 Module 4-FFT - T. Burnett
Download