Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit...

44
6.003: Signals and Systems Applications of Fourier Transforms November 17, 2011 1

Transcript of Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit...

Page 1: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

6.003: Signals and Systems

Applications of Fourier Transforms

November 17, 2011 1

Page 2: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Filtering

Notion of a filter.

LTI systems

• cannot create new frequencies.

• can only scale magnitudes and shift phases of existing components.

Example: Low-Pass Filtering with an RC circuit

+−

vi

+

vo

R

C

2

Page 3: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

0.01

0.1

1

0.01 0.1 1 10 100ω

1/RC

|H(jω

)|

0

−π20.01 0.1 1 10 100

ω

1/RC

∠H

(jω

)|

Lowpass Filter

Calculate the frequency response of an RC circuit.

+−

vi

+

vo

R

C

KVL: vi(t) = Ri(t) + vo(t)

C: i(t) = Cv̇o(t)

Solving: vi(t) = RC v̇o(t) + vo(t)

Vi(s) = (1 + sRC)Vo(s) Vo(s) 1

H(s) = = Vi(s) 1 + sRC

3

Page 4: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Lowpass Filtering

x(t) =

Let the input be a square wave.

t

12

−12

0 T

T π2=0ω;kt 0jωe

jπk 1

odd k

0.01

0.1

1

0.01 0.1 1 10 100ω

1/RC

|X(jω

)|

0

−π20.01 0.1 1 10 100

ω

1/RC

∠X

(jω

)|

4

Page 5: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Lowpass Filtering

x(t) =

Low frequency square wave: ω0 << 1/RC.

t

12

−12

0 T

T π2=0ω;kt 0jωe

jπk 1

odd k

0.01

0.1

1

0.01 0.1 1 10 100ω

1/RC

|H(jω

)|

0

−π20.01 0.1 1 10 100

ω

1/RC

∠H

(jω

)|

5

Page 6: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Lowpass Filtering

x(t) =

Higher frequency square wave: ω0 < 1/RC.

t

12

−12

0 T

T π2=0ω;kt 0jωe

jπk 1

odd k

0.01

0.1

1

0.01 0.1 1 10 100ω

1/RC

|H(jω

)|

0

−π20.01 0.1 1 10 100

ω

1/RC

∠H

(jω

)|

6

Page 7: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Lowpass Filtering

x(t) =

Still higher frequency square wave: ω0 = 1/RC.

t

12

−12

0 T

T π2=0ω;kt 0jωe

jπk 1

odd k

0.01

0.1

1

0.01 0.1 1 10 100ω

1/RC

|H(jω

)|

0

−π20.01 0.1 1 10 100

ω

1/RC

∠H

(jω

)|

7

Page 8: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Lowpass Filtering

x(t) =

High frequency square wave: ω0 > 1/RC.

t

12

−12

0 T

T π2=0ω;kt 0jωe

jπk 1

odd k

0.01

0.1

1

0.01 0.1 1 10 100ω

1/RC

|H(jω

)|

0

−π20.01 0.1 1 10 100

ω

1/RC

∠H

(jω

)|

8

Page 9: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Source-Filter Model of Speech Production

Vibrations of the vocal cords are “filtered” by the mouth and nasal

cavities to generate speech.

buzz fromvocal cords

speechthroat and

nasal cavities9

Page 10: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Filtering

LTI systems “filter” signals based on their frequency content.

Fourier transforms represent signals as sums of complex exponen­

tials. ∞1 jωtdωx(t) = X(jω)e2π −∞

Complex exponentials are eigenfunctions of LTI systems. jωt → H(jω)e jωt e

LTI systems “filter” signals by adjusting the amplitudes and phases

of each frequency component. ∞ ∞1 1jωtdω jωtdωx(t) = X(jω)e → y(t) = H(jω)X(jω)e2π −∞ 2π −∞

10

Page 11: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Filtering

Systems can be designed to selectively pass certain frequency bands.

Examples: low-pass filter (LPF) and high-pass filter (HPF).

LPF HPF

LPF

HPF

t

t

t

11

Page 12: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Filtering Example: Electrocardiogram

An electrocardiogram is a record of electrical potentials that are

generated by the heart and measured on the surface of the chest.

0 10 20 30 40 50 60−1

012

t [s]

x(t) [mV]

ECG and analysis by T. F. Weiss 12

Page 13: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Filtering Example: Electrocardiogram

In addition to electrical responses of heart, electrodes on the skin

also pick up other electrical signals that we regard as “noise.”

We wish to design a filter to eliminate the noise.

filterx(t) y(t)

13

Page 14: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Filtering Example: Electrocardiogram

We can identify “noise” using the Fourier transform.

0 10 20 30 40 50 60−1

012

t [s]

x(t) [mV]

0.01 0.1 1 10 100

1000

100

10

1

0.1

0.01

0.001

0.0001

f = ω

2π [Hz]

|X(jω

)|[µ

V]

low-freq.noise cardiac

signal high-freq.noise

60 Hz

14

Page 15: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Filtering Example: Electrocardiogram

Filter design: low-pass flter + high-pass filter + notch.

0.01 0.1 1 10 100

1

0.1

0.01

0.001

f = ω

2π [Hz]

|H(jω

)|

15

Page 16: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Electrocardiogram: Check Yourself

Which poles and zeros are associated with

• the high-pass filter?

• the low-pass filter?

• the notch filter? s-plane

( )( )( )222

16

Page 17: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Electrocardiogram: Check Yourself

Which poles and zeros are associated with

• the high-pass filter?

• the low-pass filter?

• the notch filter? s-plane

( )( )( )222 high-passlow-pass

notch

notch

17

Page 18: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Filtering Example: Electrocardiogram

Filtering is a simple way to reduce unwanted noise.

Unfiltered ECG

0 10 20 30 40 50 600

1

2

t [s]

x(t

)[mV

]

Filtered ECG

0 10 20 30 40 50 600

1

t [s]

y(t

)[mV

]

18

Page 19: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Fourier Transforms in Physics: Diffraction

A diffraction grating breaks a laser beam input into multiple beams.

Demonstration.

19

Page 20: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Fourier Transforms in Physics: Diffraction

Multiple beams result from periodic structure of grating (period D).

gra

tin

g

θ

λ

D

sin θ = λ

D

Viewed at a distance from angle θ, scatterers are separated by D sin θ.

nλConstructive interference if D sin θ = nλ, i.e., if sin θ = D → periodic array of dots in the far field

20

Page 21: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Fourier Transforms in Physics: Diffraction

CD demonstration.

21

Page 22: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Check Yourself

CD demonstration.

laser pointer

λ = 500 nm

CDscreen

3 feet

1 feet

What is the spacing of the tracks on the CD?

1. 160 nm 2. 1600 nm 3. 16µm 4. 160µm

22

Page 23: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Check Yourself

What is the spacing of the tracks on the CD?

500 nm grating tan θ θ sin θ D = manufacturing spec. sin θ

1CD 0.32 0.31 1613 nm 1600 nm3

23

Page 24: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Check Yourself

Demonstration.

laser pointer

λ = 500 nm

CDscreen

3 feet

1 feet

What is the spacing of the tracks on the CD? 2.

1. 160 nm 2. 1600 nm 3. 16µm 4. 160µm

24

Page 25: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Fourier Transforms in Physics: Diffraction

DVD demonstration.

25

Page 26: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Check Yourself

DVD demonstration.

laser pointer

λ = 500 nm

DVDscreen

1 feet

1 feet

What is track spacing on DVD divided by that for CD?

1. 4× 2. 2× 3. 12× 4. 1

26

Page 27: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Check Yourself

What is spacing of tracks on DVD divided by that for CD?

500 nm grating tan θ θ sin θ D = manufacturing spec. sin θ

1CD 0.32 0.31 1613 nm 1600 nm3

DVD 1 0.78 0.71 704 nm 740 nm

27

Page 28: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Check Yourself

DVD demonstration.

laser pointer

λ = 500 nm

DVDscreen

1 feet

1 feet

What is track spacing on DVD divided by that for CD? 3

1. 4× 2. 2× 3. 12× 4. 1

28

Page 29: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Fourier Transforms in Physics: Diffraction

Macroscopic information in the far field provides microscopic (invis­

ible) information about the grating.

θ

λ

D

sin θ = λ

D

29

Page 30: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Fourier Transforms in Physics: Crystallography

What if the target is more complicated than a grating?

target

image?

30

Page 31: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Fourier Transforms in Physics: Crystallography

Part of image at angle θ has contributions for all parts of the target.

target

image?

θ

31

Page 32: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Fourier Transforms in Physics: Crystallography

The phase of light scattered from different parts of the target un­

dergo different amounts of phase delay.

θx sin θ

x

Phase at a point x is delayed (i.e., negative) relative to that at 0: x sin θ

φ = −2π λ

32

Page 33: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Fourier Transforms in Physics: Crystallography

Total light F (θ) at angle θ is integral of light scattered from each

part of target f(x), appropriately shifted in phase.

−j2π x sin θ F (θ) = f(x) e λ dx

Assume small angles so sin θ ≈ θ.

Let ω = 2π θ , then the pattern of light at the detector is λ

−jωxdxF (ω) = f(x) e

which is the Fourier transform of f(x) !

33

Page 34: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Fourier Transforms in Physics: Diffraction

Fourier transform relation between structure of object and far-field

intensity pattern.

· · ·· · ·

grating ≈ impulse train with pitch D

t0 D

· · ·· · ·

far-field intensity ≈ impulse train with reciprocal pitch ∝ λD

ω0 2π

D34

Page 35: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Impulse Train

The Fourier transform of an impulse train is an impulse train.

· · ·· · ·

x(t) =∞∑

k=−∞δ(t− kT )

t0 T

1

· · ·· · ·

ak = 1T ∀ k

k

1T

· · ·· · ·

X(jω) =∞∑

k=−∞

2πTδ(ω − k2π

T)

ω0 2π

T

2πT

35

Page 36: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Two Dimensions

Demonstration: 2D grating.

36

Page 37: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

An Historic Fourier Transform

Taken by Rosalind Franklin, this image sparked Watson and Crick’s

insight into the double helix.

37

Reprinted by permission from Macmillan Publishers Ltd: Nature.Source: Franklin, R., and R. G. Gosling. "Molecular Configurationin Sodium Thymonucleate." Nature 171 (1953): 740-741. (c) 1953.

Page 38: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

An Historic Fourier Transform

This is an x-ray crystallographic image of DNA, and it shows the

Fourier transform of the structure of DNA.

38

Reprinted by permission from Macmillan Publishers Ltd: Nature.Source: Franklin, R., and R. G. Gosling. "Molecular Configurationin Sodium Thymonucleate." Nature 171 (1953): 740-741. (c) 1953.

Page 39: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

An Historic Fourier Transform

High-frequency bands indicate repeating structure of base pairs.

b1/b

39

Reprinted by permission from Macmillan Publishers Ltd: Nature.Source: Franklin, R., and R. G. Gosling. "Molecular Configurationin Sodium Thymonucleate." Nature 171 (1953): 740-741. (c) 1953.

Page 40: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

An Historic Fourier Transform

Low-frequency bands indicate a lower frequency repeating structure.

h 1/h

40

Reprinted by permission from Macmillan Publishers Ltd: Nature.Source: Franklin, R., and R. G. Gosling. "Molecular Configurationin Sodium Thymonucleate." Nature 171 (1953): 740-741. (c) 1953.

Page 41: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

An Historic Fourier Transform

Tilt of low-frequency bands indicates tilt of low-frequency repeating

structure: the double helix!

θ

θ

41

Reprinted by permission from Macmillan Publishers Ltd: Nature.Source: Franklin, R., and R. G. Gosling. "Molecular Configurationin Sodium Thymonucleate." Nature 171 (1953): 740-741. (c) 1953.

Page 42: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Simulation

Easy to calculate relation between structure and Fourier transform.

42

Page 43: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

Fourier Transform Summary

Represent signals by their frequency content.

Key to “filtering,” and to signal-processing in general.

Important in many physical phenomenon: x-ray crystallography.

43

Page 44: Lecture 20: Applications of Fourier transforms · Example: Low-Pass Filtering with an RC circuit ... An Historic Fourier Transform. Taken by Rosalind Franklin, this image sparked

MIT OpenCourseWarehttp://ocw.mit.edu

6.003 Signals and SystemsFall 2011

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.