BMACC Computational Fourier Analysis Mathematics, Computing and - - PowerPoint PPT Presentation

bmacc
SMART_READER_LITE
LIVE PREVIEW

BMACC Computational Fourier Analysis Mathematics, Computing and - - PowerPoint PPT Presentation

ComputationalPhysicsCurricula BlendedMultimodalAccessto BMACC Computational Fourier Analysis Mathematics, Computing and Nonlinear Oscillations Rubin H Landau Sally Haerer,


slide-1
SLIDE 1

Computational Fourier Analysis

Mathematics, Computing and Nonlinear Oscillations Rubin H Landau

Sally Haerer, Producer-Director Oregon State University with National Science Foundation Support

Course: Computational Physics I (Prerequisite: Intro Computational Science)

BMACC

฀ ฀ ฀ ฀ ฀ ฀ ฀ ฀฀฀Blended฀Multimodal฀Access฀to ฀Computational฀Physics฀Curricula

1 / 1

slide-2
SLIDE 2

Outline

Text: Three Fourier Units Unit I: Fourier series: Review & DFT (Only part of I today!) Unit II: Signal filtering to reduce noise Unit III: Fast Fourier transform (FFT) ⇒ real time DFT Today’s Lecture:

2 / 1

slide-3
SLIDE 3

Problem: Amount of sin ωt in Nonlinear Oscillation?

Example Example (in green): Sawtooth function

t

  • 1

1

y(t)

20

  • 1

1 Y( )

ω

What “frequencies” present? (What does this mean?) Meaning: “Fourier decomposition (right)” Periodic, many sinusoids; yet, one period Only steady state, let transients die out

3 / 1

slide-4
SLIDE 4

Physics Problem (see ODE): Nonharmonic Oscillator

Nonharmonic (nontranditional) oscillator V(x) = k|x|p, p = 2 large p ⇒ square well square well ⇒ sawtooth

V p = 2

x x

V p = 6

Linear Nonlinear Harmonic Anharmonic

Perturbed oscillator V(x) = 1

2kx2

1 − 2

3αx

  • Linear: 1st approximation

All Vs → constant period T Periodic not sinusoidal

x

Linear Nonlinear Unbound Harmonic Anharmonic V(x) 4 / 1

slide-5
SLIDE 5

Math (Theory): Fourier Series

Fourier’s Theorem: Function Representation Single-valued periodic function ("signal") Finite number discontinuities y(t) = a0 2 +

  • n=1

(an cos nωt + bn sin nωt) (1) an ↔ cos nωt “in” y(t) Intensity(ω), Power(ω) ∝ a2

n + b2 n

True frequency ω ≡ ω1 = 2π

T = HO frequency

Need know period T, y(t + T) = y(t) Period may depend on amplitude

5 / 1

slide-6
SLIDE 6

Math: Fourier Series Fit

Fourier Series y(t) = a0 2 +

  • n=1

(an cos nωt + bn sin nωt) (2) Theorem: Series = “Best Fit” Least-squares sense: minimizes

  • i [y(ti) − yi]2

⇒ ∞

i

an cos nωt ≃ y(t) ⇒ miss discontinuities Need infinite number of terms Not exact math fit (power series) Not good numerical solution (∞ terms) Not closed form analytic solution

6 / 1

slide-7
SLIDE 7

Fourier Integrals (Transforms)

Nonperiodic Functions

–1.0 –0.5 0.0 0.5 1.0 –6 –4 –2 2 4 6

t s = 1, τ = 0

y(t) = b0 + b1 cos ω1t + b2 cos 2ω1t + · · ·

Nonperiodic ≡ T → ∞ ⇒ continuous ω Math: →

  • Numerically:

Numerically: the same! Fourier Semantics ω1 = 2π

T = fundamental

nω1 = nth harmonic ω > ω1: overtones b0: DC component normal modes Modes: see next slide

7 / 1

slide-8
SLIDE 8

Fourier Series for Nonlinear Oscillations?

y(t) = a0 2 +

  • n=1

(an cos nωt + bn sin nωt) (3) OK by Theorem if periodic, but Nonlinear oscillators: ω1 = ω(A) = 2π/T Individual terms = solution Linear eqtn ↔ principle of linear superposition y1(t), y2(t) = solutions (4) ⇒ αy1(t) + βy2(t) = solution (5) Useful if not too nonlinear Broadband spectrum ⇒ chaos Many strong overtones

8 / 1

slide-9
SLIDE 9

Determine Fourier Coefficients an, bn

Project Out Components ω|y = 2π dtcos nωt

  • a0

2 +

  • n=1

(an cos nωt + bn sin nωt)

  • (6)

⇒ an bn

  • = 2

T T dt cos nωt sin nωt

  • y(t)

(7) a0 = 2 y(t) Be smart: use Symmetry Odd y(−t) = −y(t) ⇒ an ≡ 0 Even y(−t) = y(t) ⇒ bn ≡ 0 Realistic calculations:

  • → , y(t < 0) =?

⇒ small bn

9 / 1

slide-10
SLIDE 10

Determine Fourier Coefficients an, bn

Project Out Components ω|y = 2π dtcos nωt

  • a0

2 +

  • n=1

(an cos nωt + bn sin nωt)

  • (6)

⇒ an bn

  • = 2

T T dt cos nωt sin nωt

  • y(t)

(7) a0 = 2 y(t) Be smart: use Symmetry Odd y(−t) = −y(t) ⇒ an ≡ 0 Even y(−t) = y(t) ⇒ bn ≡ 0 Realistic calculations:

  • → , y(t < 0) =?

⇒ small bn

10 / 1

slide-11
SLIDE 11

Determine Fourier Coefficients an, bn

Project Out Components ω|y = 2π dtcos nωt

  • a0

2 +

  • n=1

(an cos nωt + bn sin nωt)

  • (6)

⇒ an bn

  • = 2

T T dt cos nωt sin nωt

  • y(t)

(7) a0 = 2 y(t) Be smart: use Symmetry Odd y(−t) = −y(t) ⇒ an ≡ 0 Even y(−t) = y(t) ⇒ bn ≡ 0 Realistic calculations:

  • → , y(t < 0) =?

⇒ small bn

11 / 1

slide-12
SLIDE 12

Determine Fourier Coefficients an, bn

Project Out Components ω|y = 2π dtcos nωt

  • a0

2 +

  • n=1

(an cos nωt + bn sin nωt)

  • (6)

⇒ an bn

  • = 2

T T dt cos nωt sin nωt

  • y(t)

(7) a0 = 2 y(t) Be smart: use Symmetry Odd y(−t) = −y(t) ⇒ an ≡ 0 Even y(−t) = y(t) ⇒ bn ≡ 0 Realistic calculations:

  • → , y(t < 0) =?

⇒ small bn

12 / 1

slide-13
SLIDE 13

Determine Fourier Coefficients an, bn

Project Out Components ω|y = 2π dtcos nωt

  • a0

2 +

  • n=1

(an cos nωt + bn sin nωt)

  • (6)

⇒ an bn

  • = 2

T T dt cos nωt sin nωt

  • y(t)

(7) a0 = 2 y(t) Be smart: use Symmetry Odd y(−t) = −y(t) ⇒ an ≡ 0 Even y(−t) = y(t) ⇒ bn ≡ 0 Realistic calculations:

  • → , y(t < 0) =?

⇒ small bn

13 / 1

slide-14
SLIDE 14

Example: Sawtooth Function, Analytic an, bn

Example

t

  • 1

1

y(t)

20

  • 1

1 Y( )

ω

y(t) =

  • t

T/2,

0 ≤ t ≤ T

2

(7)

t−T T/2 , T 2 ≤ t ≤ T

Periodic, nonharmonic, discontinuous, sharp corners Odd ( ⇒ sine series), obvious shift to left: y(t) = t T/2, −T 2 ≤ t ≤ T 2 (8) bn = 2 T +T/2

−T/2

dt sin nωt t T/2 (above) (9) ⇒ y(t) = 2 π

  • sin ωt − 1

2 sin 2ωt + 1 3 sin 3ωt · · ·

  • (10)

14 / 1

slide-15
SLIDE 15

Exercise: Sawtooth Function Synthesis

1

Sum Fourier series for n = 2, 4, 10, 20 terms.

2

Plot two periods & compare to signal.

3

Check that series gives the mean value (0) at discontinuity

4

Gibbs overshoot: Check that series overshoots discontinuity by about 9%, and that this persists even when summing over a large number of terms.

5

You deserve a break right now!

15 / 1

slide-16
SLIDE 16

Math (Theory): Fourier Transforms

Fourier series = right tool for periodic functions Fourier Integral for Nonperiodic Functions

–1.0 –0.5 0.0 0.5 1.0 –6 –4 –2 2 4 6

t s = 1, τ = 0

Wave packets, pulses Continuous frequencies Signal: y(t) = +∞

−∞

dω Y(ω) eiωt √ 2π (11) Think linear superposition: exp(iωt) = cos ωt + i sin ωt Complex transform Y(ω) ∼ (an, bn) ∼ coefficients 1/ √ 2π, +iωt = physics conventions

16 / 1

slide-17
SLIDE 17

Fourier Transform: y(t) → Y(ω)

t

  • 1

1

y(t)

20

  • 1

1 Y( )

ω

Fourier Amplitudes (an) → Transform Signal, function: y(t) = +∞

−∞

dω Y(ω) e+iωt √ 2π (12) Transform, spectral: Y(ω) = +∞

−∞

dt y(t) e−iωt √ 2π (13) Power Spectrum ∝ |Y(ω)|2, maybe log10 |Y|2

17 / 1

slide-18
SLIDE 18

Math Identity: Inversion of Transform

Substitute for y(t) and rearrange Y(ω) = +∞

−∞

dt e−iωt √ 2π +∞

−∞

dω′ eiω′t √ 2π Y(ω′) (14) Y(ω) = +∞

−∞

dω′ +∞

−∞

dt ei(ω′−ω)t 2π

  • Y(ω′)

(15) Depends on noncomputable Dirac delta function: +∞

−∞

dt ei(ω′−ω)t = 2πδ(ω′ − ω) (16) Don’t try on computer!

18 / 1

slide-19
SLIDE 19

Summary

Most any periodic function “represented” by Fourier series. Most any nonperiodic function “represented” by Fourier integral. Infinite series or integral not practical algorithm or in experiment. Must know actual period. Period depends on amplitude in general. DFT (next): when done is simple, elegant and powerful Fast Fourier transform (FFT) is faster. That’s all folks!

19 / 1