geol 491: spectral analysis
DESCRIPTION
Geol 491: Spectral Analysis. [email protected]. Purpose of the class. Explore ways of introducing some advanced mathematical concepts to students in such a way as to increase their interest in higher level math. To learn new and useful analytical tools. To have fun!. Grade. - PowerPoint PPT PresentationTRANSCRIPT
Purpose of the class
Explore ways of introducing some advanced mathematical concepts to students in such a way as
to increase their interest in higher level math.
To learn new and useful analytical tools
To have fun!
Grade
• Computer lab assignments – 30%• Lesson plan development (2 teams): initial and final
drafts, 10% each for 20% of the semester grade• Class presentation 30%• Final report: revision of lesson plan with discussion of
what additional activities you think would be useful to undertake. 20%
• Final report should include a brief half page to page discussion of what you got out of the class. Was it useful? Why or why not?
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-8
-6
-4
-2
0
2
4
6
8
5*sin (24t)
Amplitude = 5
Frequency = 4 Hz
seconds
Fourier said that any single valued function could be reproduced as a sum of sines and cosines
Introduction to Fourier series and Fourier transforms
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-8
-6
-4
-2
0
2
4
6
8
5*sin(24t)
Amplitude = 5
Frequency = 4 Hz
Sampling rate = 256 samples/second
seconds
Sampling duration =1 second
We are usually dealing with sampled data
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-2
-1.5
-1
-0.5
0
0.5
1
1.5
2sin(28t), SR = 8.5 Hz
Faithful reproduction of the signal requires adequate sampling
If our sample rate isn’t high enough, then the output frequency will be lower than the input,
The Nyquist Frequency
• The Nyquist frequency is equal to one-half of the sampling frequency.
• The Nyquist frequency is the highest frequency that can be measured in a signal.
1
2Nyft
Where t is the sample rate
Frequencies higher than the Nyquist frequencies will be aliased to lower frequency
The Nyquist Frequency
1
2Nyft
Where t is the sample rate
Thus if t = 0.004 seconds, fNy =
Fourier series: a weighted sum of sines and cosines
• Periodic functions and signals may be expanded into a series of sine and cosine functions
0 1 1
2 2
3 3
( ) cos sin
cos 2 sin 2
cos3 sin 3
... +...
f t a a t b t
a t b t
a t b t
This applet is fun to play with & educational too.
Experiment with http://www.falstad.com/fourier/
Try making sounds by combining several harmonics (multiples of the fundamental frequency)
An octave represents a doubling of the frequency.220Hz, 440Hz and 880Hz played together produce a
“pleasant sound”Frequencies in the ratio of 3:2 represent a fifth and
are also considered pleasant to the ear.220, 660, 1980etc.
Pythagoras (530BC)
You can also observe how filtering of a broadband waveform will change audible waveform properties.
http://www.falstad.com/dfilter/
Fourier series
• The Fourier series can be expressed more compactly using summation notation
01
( ) cos sinn nn
f t a a n t b n t
You’ve seen from the forgoing example that right angle turns, drops, increases in the value of a function
can be simulated using the curvaceous sinusoids.
Fourier series
• Try the excel file step2.xls
01
( ) cos sinn nn
f t a a n t b n t
The Fourier Transform
• A transform takes one function (or signal) in time and turns it into another function (or signal) in frequency
• This can be done with continuous functions or discrete functions
01
( ) cos sinn nn
f t a a n t b n t
The Fourier Transform
• The general problem is to find the coefficients: a0, a1, b1, etc.
01
( ) cos sinn nn
f t a a n t b n t
Take the integral of f(t) from 0 to T (where T is 1/f).
Note =2/T
0
1( )
Tf t dt
T What do you get? Looks like an average!
We’ll work through this on the board.
Getting the other Fourier coefficients
To get the other coefficients consider what happens when you multiply the terms in the
series by terms like cos(it) or sin(it).
0 1 1
2 2
3 3
( ) cos cos cos cos sin cos
cos 2 cos sin 2 cos
cos3 cos sin 3 cos
... +...
cosi
f t i t a i t a t i t b t i t
a t i t b t i t
a t i t b t i t
a
cos sin cos
... +...ii t i t b i t i t
Now integrate f(t) cos(it)
0 1 10 0
2 2
3 3
( ) cos ( cos cos cos sin cos
cos 2 cos sin 2 cos
cos3 cos sin 3 cos
... +...
T Tf t i tdt a i t a t i t b t i t
a t i t b t i t
a t i t b t i t
cos cos sin cos
... +... ) i ia i t i t b i t i t
dt
00cos 0
Ta i tdt This is just the average of i
periods of the cosine
Now integrate f(t) cos(it)
10cos cos ?
Ta t i tdt
1 1cos cos cos( ) cos( )
2 2A B A B A B
Use the identity
If i=2 then the a1 term =
11 cos cos (cos 2 cos0)
2
aa t t t
1 110 0 0cos cos cos 2 cos0
2 2
T T Ta aa t tdt tdt dt
What does this give us?
110
0
cos cos 02
TT a
a t tdt
And what about the other terms in the series?
2 220 0 0
cos 2 cos cos3 cos2 2
T T Ta aa t tdt tdt tdt
In general to find the coefficients we do the following
0 0
1( )
Ta f t dt
T
0
2( )cos
T
na f t n tdtT
0
2( )sin
T
nb f t n tdtT
and
The a’s and b’s are considered the amplitudes of the real and imaginary terms (cosine and sine) defining
individual frequency components in a signal
Arbitrary period versus 2
Sometimes you’ll see the Fourier coefficients written as integrals from - to
0
1( )
2a f t dt
1
( )cosna f t n tdt
1( )sinnb f t n tdt
and
Exponential notation
cost is considered Re eit
cos sinn te t i t
where
The Fourier Transform
• A transform takes one function (or signal) and turns it into another function (or signal)• Continuous Fourier Transform:
dfefHth
dtethfH
ift
ift
2
2
• A transform takes one function (or signal) and turns it into another function (or signal)• The Discrete Fourier Transform: The Fourier Transform
1
0
2
1
0
2
1 N
n
Niknnk
N
k
Niknkn
eHN
h
ehH
We’ll do some work with mp3 files. See http://soundmachine.gooddogie.com/sounds4.htm
Tiger.mp3
Amplitude versus time on the sound track
tiger.mp3
Classic view
Spectral plots
Low to high frequency content in the sound file as a function of time
Spectral filtering
Doppler shift
Cut out specific parts of a sound file
Various spectral views under windows>classic, vertical, horizontal
Change spectral display format in individual windows
Try filtering everything out above 375 Hz
Design spectral filters to see how sounds change when certain frequencies are removed. Try this with a
recording of your own voice
Get a view of the spectrum
Lowpass filter
Highpass filter
Some useful links
• http://www.falstad.com/fourier/– Fourier series java applet
• http://www.jhu.edu/~signals/– Collection of demonstrations about digital signal processing
• http://www.ni.com/events/tutorials/campus.htm– FFT tutorial from National Instruments
• http://www.cf.ac.uk/psych/CullingJ/dictionary.html– Dictionary of DSP terms
• http://jchemed.chem.wisc.edu/JCEWWW/Features/McadInChem/mcad008/FT4FreeIndDecay.pdf– Mathcad tutorial for exploring Fourier transforms of free-induction decay
• http://lcni.uoregon.edu/fft/fft.ppt– This presentation
Meeting times?
Other questions?
laugh2.mp3