25
Geol 491: Spectral Analysis 1 0 2 1 0 2 1 N n N ikn n k N k N ikn k n e H N h e h H [email protected]

Geol 491: Spectral Analysis

  • Upload
    lucas

  • View
    56

  • Download
    0

Embed Size (px)

DESCRIPTION

Geol 491: Spectral Analysis. [email protected]. Fourier said that any single valued function could be reproduced as a sum of sines and cosines. Introduction to Fourier series and Fourier transforms. 5*sin (2 4t). Amplitude = 5. Frequency = 4 Hz. seconds. - PowerPoint PPT Presentation

Citation preview

Page 1: Geol 491: Spectral Analysis

Geol 491: Spectral Analysis

1

0

2

1

0

2

1 N

n

Niknnk

N

k

Niknkn

eHN

h

ehH

[email protected]

Page 2: Geol 491: Spectral Analysis

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 3: Geol 491: Spectral Analysis

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 4: Geol 491: Spectral Analysis

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 5: Geol 491: Spectral Analysis

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.

12Nyf

t

Where t is the sample rate

Frequencies higher than the Nyquist frequencies will be aliased to lower frequency

Page 6: Geol 491: Spectral Analysis

The Nyquist Frequency

12Nyf

t

Where t is the sample rate

Thus if t = 0.004 seconds, fNy =

Page 7: Geol 491: Spectral Analysis

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 ta t b ta t b t

Page 8: Geol 491: Spectral Analysis

This applet is fun to play with & educational too.

Experiment with http://www.falstad.com/fourier/

Page 9: Geol 491: Spectral Analysis

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 10: Geol 491: Spectral Analysis

You can also observe how filtering of a broadband waveform will change audible waveform properties.

http://www.falstad.com/dfilter/

Page 11: Geol 491: Spectral Analysis

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 12: Geol 491: Spectral Analysis

Fourier series• Try the excel file step2.xls

01

( ) cos sinn nn

f t a a n t b n t

Page 13: Geol 491: Spectral Analysis

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 14: Geol 491: Spectral Analysis

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 ( )T

f t dtT

What do you get? Looks like an average!

We’ll work through this on the board.

Page 15: Geol 491: Spectral Analysis

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 ta t i t b t i ta t i t b t i t

a

cos sin cos

... +...ii t i t b i t i t

Page 16: Geol 491: Spectral Analysis

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 ta t i t b t i t

cos cos sin cos ... +... )

i ia i t i t b i t i tdt

00cos 0

Ta i tdt This is just the average of i

periods of the cosine

Page 17: Geol 491: Spectral Analysis

Now integrate f(t) cos(it)

10cos cos ?

Ta t i tdt

1 1cos cos cos( ) cos( )2 2

A B A B A B

Use the identity

If i=2 then the a1 term =

11 cos cos (cos 2 cos0)

2aa t t t

1 110 0 0cos cos cos 2 cos0

2 2T T Ta aa t tdt tdt dt

Page 18: Geol 491: Spectral Analysis

What does this give us?

110

0

cos cos 02

TT aa 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 19: Geol 491: Spectral Analysis

In general to find the coefficients we do the following

0 0

1 ( )T

a f t dtT

0

2 ( )cosT

na f t n tdtT

0

2 ( )sinT

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 20: Geol 491: Spectral Analysis

Arbitrary period versus 2

Sometimes you’ll see the Fourier coefficients written as integrals from - to

01 ( )

2a f t dt

1 ( )cosna f t n tdt

1 ( )sinnb f t n tdt

and

Page 21: Geol 491: Spectral Analysis

Exponential notation

cost is considered Re eit

cos sinn te t i t

where

Page 22: Geol 491: Spectral Analysis

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 23: Geol 491: Spectral Analysis

• 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 24: Geol 491: Spectral Analysis

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 25: Geol 491: Spectral Analysis

Meeting times?

Other questions?

laugh2.mp3