Geol 491: Spectral Analysis
-
Upload
natalie-jacobson -
Category
Documents
-
view
55 -
download
1
description
Transcript of Geol 491: Spectral Analysis
![Page 2: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/2.jpg)
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!
![Page 3: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/3.jpg)
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?
![Page 4: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/4.jpg)
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
![Page 5: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/5.jpg)
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
![Page 6: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/6.jpg)
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,
![Page 7: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/7.jpg)
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
![Page 8: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/8.jpg)
The Nyquist Frequency
1
2Nyft
Where t is the sample rate
Thus if t = 0.004 seconds, fNy =
![Page 9: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/9.jpg)
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
![Page 10: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/10.jpg)
This applet is fun to play with & educational too.
Experiment with http://www.falstad.com/fourier/
![Page 11: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/11.jpg)
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)
![Page 12: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/12.jpg)
You can also observe how filtering of a broadband waveform will change audible waveform properties.
http://www.falstad.com/dfilter/
![Page 13: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/13.jpg)
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.
![Page 14: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/14.jpg)
Fourier series
• Try the excel file step2.xls
01
( ) cos sinn nn
f t a a n t b n t
![Page 15: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/15.jpg)
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
![Page 16: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/16.jpg)
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.
![Page 17: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/17.jpg)
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
![Page 18: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/18.jpg)
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
![Page 19: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/19.jpg)
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
![Page 20: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/20.jpg)
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
![Page 21: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/21.jpg)
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
![Page 22: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/22.jpg)
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
![Page 23: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/23.jpg)
Exponential notation
cost is considered Re eit
cos sinn te t i t
where
![Page 24: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/24.jpg)
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
![Page 25: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/25.jpg)
• 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
![Page 26: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/26.jpg)
We’ll do some work with mp3 files. See http://soundmachine.gooddogie.com/sounds4.htm
![Page 27: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/27.jpg)
Tiger.mp3
Amplitude versus time on the sound track
tiger.mp3
![Page 28: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/28.jpg)
Classic view
Spectral plots
Low to high frequency content in the sound file as a function of time
![Page 29: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/29.jpg)
Spectral filtering
![Page 30: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/30.jpg)
Doppler shift
![Page 31: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/31.jpg)
Cut out specific parts of a sound file
![Page 32: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/32.jpg)
Various spectral views under windows>classic, vertical, horizontal
![Page 33: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/33.jpg)
Change spectral display format in individual windows
![Page 34: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/34.jpg)
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
![Page 35: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/35.jpg)
Lowpass filter
![Page 36: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/36.jpg)
Highpass filter
![Page 37: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/37.jpg)
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
![Page 38: Geol 491: Spectral Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062321/56812d1e550346895d921753/html5/thumbnails/38.jpg)
Meeting times?
Other questions?
laugh2.mp3