24
FOURIER ANALYSIS PART 1: Fourier Series Maria Elena Angoletta, AB/BDI DISP 2003, 20 February 2003

Fourier Analysis

Embed Size (px)

DESCRIPTION

Fourier Analysis

Citation preview

Page 1: Fourier Analysis

FOURIER ANALYSISPART 1: Fourier Series

Maria Elena Angoletta, AB/BDI

DISP 2003, 20 February 2003

Page 2: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 2 / 24

TOPICSTOPICS

1. Frequency analysis: a powerful tool

2. A tour of Fourier Transforms

3. Continuous Fourier Series (FS)

4. Discrete Fourier Series (DFS)

5. Example: DFS by DDCs & DSP

Page 3: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 3 / 24

Frequency analysis: why?Frequency analysis: why?• Fast & efficient insight on signal’s building blocks.

• Simplifies original problem - ex.: solving Part. Diff. Eqns. (PDE).

• Powerful & complementary to time domain analysis techniques.

• Several transforms in DSPing: Fourier, Laplace, z, etc.

time, t frequency, fF

s(t) S(f) = F[s(t)]

analysisanalysis

synthesissynthesis

s(t), S(f) : Transform Pair

General Transform as General Transform as problemproblem--solving toolsolving tool

Page 4: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 4 / 24

Fourier analysis - applicationsFourier analysis - applicationsApplications wide ranging and ever present in modern lifeApplications wide ranging and ever present in modern life

•• TelecommsTelecomms - GSM/cellular phones,

•• Electronics/ITElectronics/IT - most DSP-based applications,

•• EntertainmentEntertainment - music, audio, multimedia,

•• Accelerator controlAccelerator control (tune measurement for beam steering/control),

•• Imaging, image processing,Imaging, image processing,

•• Industry/researchIndustry/research - X-ray spectrometry, chemical analysis (FT spectrometry), PDE solution, radar design,

•• MedicalMedical - (PET scanner, CAT scans & MRI interpretation for sleep disorder & heart malfunction diagnosis,

•• Speech analysisSpeech analysis (voice activated “devices”, biometry, …).

Page 5: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 5 / 24

Fourier analysis - tools Fourier analysis - tools Input Time Signal Frequency spectrum

∑−

=

−⋅=

1N

0nN

nkπ2jes[n]

N1

kc~

Discrete

DiscreteDFSDFSPeriodic (period T)

ContinuousDTFTAperiodic

DiscreteDFTDFT

nfπ2jen

s[n]S(f) −⋅∞+

−∞== ∑

0

0.5

1

1.5

2

2.5

0 2 4 6 8 10 12time, tk

0

0.5

1

1.5

2

2.5

0 1 2 3 4 5 6 7 8

time, tk

∑−

=

−⋅=

1N

0nN

nkπ2jes[n]

N1

kc~

**

**

Calculated via FFT**

dttfπj2

es(t)S(f)−∞+

∞−⋅= ∫

dtT

0

tωkjes(t)T1

kc ∫ −⋅⋅=Periodic (period T)

Discrete

ContinuousFTFTAperiodic

FSFSContinuous

0

0.5

1

1.5

2

2.5

0 1 2 3 4 5 6 7 8

time, t

0

0.5

1

1.5

2

2.5

0 2 4 6 8 10 12

time, t

Note: j =√-1, ω = 2π/T, s[n]=s(tn), N = No. of samples

Page 6: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 6 / 24

A little historyA little historyAstronomic predictions by Babylonians/Egyptians likely via trigonometric sums.

16691669: Newton stumbles upon light spectra (specter = ghost) but fails to recognise “frequency” concept (corpuscularcorpuscular theory of light, & no waves).

1818thth centurycentury: two outstanding problemstwo outstanding problems→ celestial bodies orbits: Lagrange, Euler & Clairaut approximate observation data

with linear combination of periodic functions; Clairaut,1754(!) first DFT formula.

→ vibrating strings: Euler describes vibrating string motion by sinusoids (wave equation). BUTBUT peers’ consensus is that sum of sinusoids onlyonly represents smooth curves. Big blow to utility of such sums for all but Fourier ...

18071807: Fourier presents his work on heat conduction Fourier presents his work on heat conduction ⇒⇒ Fourier analysis born.Fourier analysis born.→ Diffusion equation ⇔ series (infinite) of sines & cosines. Strong criticism by peers

blocks publication. Work published, 1822 (“Theorie Analytique de la chaleur”).

Page 7: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 7 / 24

A little history -2A little history -21919thth / 20/ 20thth centurycentury: two paths for Fourier analysis two paths for Fourier analysis -- Continuous & Discrete.Continuous & Discrete.

CONTINUOUSCONTINUOUS

→ Fourier extends the analysis to arbitrary function (Fourier Transform).

→ Dirichlet, Poisson, Riemann, Lebesgue address FS convergence.

→ Other FT variants born from varied needs (ex.: Short Time FT - speech analysis).

DISCRETE: Fast calculation methods (FFT)DISCRETE: Fast calculation methods (FFT)

→ 18051805 - Gauss, first usage of FFT (manuscript in Latin went unnoticed!!! Published 1866).

→ 19651965 - IBM’s Cooley & Tukey “rediscover” FFT algorithm (“An algorithm for the machine calculation of complex Fourier series”).

→ Other DFT variants for different applications (ex.: Warped DFT - filter design & signal compression).

→ FFT algorithm refined & modified for most computer platforms.

Page 8: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 8 / 24

Fourier Series (FS)Fourier Series (FS)

** see next slidesee next slide

A A periodicperiodic function s(t) satisfying function s(t) satisfying Dirichlet’s Dirichlet’s conditions conditions ** can be expressed can be expressed as a Fourier series, with harmonically related sine/cosine termsas a Fourier series, with harmonically related sine/cosine terms..

[ ]∑∞+

=⋅−⋅+=

1kt)ω(ksinkbt)ω(kcoska0as(t)

a0, ak, bk : Fourier coefficients.

k: harmonic number,

T: period, ω = 2π/TFor all t but discontinuitiesFor all t but discontinuities

Note: {cos(kωt), sin(kωt) }kform orthogonal base of function space.

∫⋅=T

0s(t)dt

T1

0a

∫ ⋅⋅=T

0dtt)ωsin(ks(t)

T2

kb-

∫ ⋅⋅=T

0dtt)ωcos(ks(t)

T2

ka

(signal average over a period, i.e. DC term & zero-frequency component.)

analysis

analysis

synthesis

synthesis

Page 9: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 9 / 24

FS convergence FS convergence

s(t) piecewise-continuous;

s(t) piecewise-monotonic;

s(t) absolutely integrable , ∞<∫T

0dts(t)

(a)

(b)

(c)

Dirichlet conditions

In any period:

if s(t) discontinuous then |ak|<M/k for large k (M>0)

Rate of convergenceRate of convergenceExample:

square wave

T

(a)

(b)

T

s(t)

(c)

Page 10: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 10 / 24

FS analysis - 1FS analysis - 1

* Even & Odd functions

Odd :

s(-x) = -s(x)

x

s(x)

s(x)

x

Even :

s(-x) = s(x)

FS of odd* function: square wave.

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10 t

squa

re s

igna

l, sw

(t)

2 π

0

π1)dt(dt

2π1

0a =

−+⋅= ∫ ∫

0

πdtktcosdtktcos

π1

ka =

−⋅= ∫ ∫

{ }=−⋅⋅

==

−⋅= ∫ ∫ kπcos1πk

2...π

0

πdtktsindtktsin

π1

kb-

=evenk,0

oddk,πk

4

1ω2πT =⇒=

(zero average)(zero average)

(odd function)(odd function)

...t5sinπ5

4t3sinπ3

4tsinπ4sw(t) +⋅⋅

⋅+⋅⋅

⋅+⋅=

Page 11: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 11 / 24

FS analysis - 2FS analysis - 2

-π/2

f1 3f1 5f1 f

f1 3f1 5f1 f

rk

θk

4/π

4/3π

fk=k ω/2π

rK = amplitude, θK = phase

rk

θk

ak

bkθk = arctan(bk/ak)rk = ak

2 + bk2

zk = (rk , θk)

vk = rk cos (ωk t + θk)

Polar

Fourier spectrum Fourier spectrum representationsrepresentations

∑∞

==

0k(t)kvs(t)

Rectangularvk = akcos(ωk t) - bksin(ωk t)

4/π

f1 2f1 3f1 4f1 5f1 6f1 f

f1 2f1 3f1 4f1 5f1 6f1 f

4/3π

ak

-bk

Fourier spectrum Fourier spectrum of squareof square--wave.wave.

Page 12: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 12 / 24

FS synthesisFS synthesisSquare wave reconstruction Square wave reconstruction

from spectral termsfrom spectral terms

[ ]∑=

⋅=7

1ksin(kt)kb-(t)7sw

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

[ ]∑=

⋅=5

1ksin(kt)kb-(t)5sw [ ]∑

=⋅=

3

1ksin(kt)kb-(t)3sw

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

[ ]∑=

⋅=1

1ksin(kt)kb-(t)1sw

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

[ ]∑=

⋅=9

1ksin(kt)kb-(t)9sw

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

[ ]∑=

⋅=11

1ksin(kt)kb-(t)11sw

Convergence may be slow (~1/k) - ideally need infinite terms.Practically, series truncated when remainder below computer tolerance(⇒ errorerror). BUTBUT … Gibbs’ Phenomenon.

Page 13: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 13 / 24

Gibbs phenomenonGibbs phenomenon

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

[ ]∑=

⋅=79

1kk79 sin(kt)b-(t)sw

• Max overshoot pk-to-pk = 8.95% of discontinuity magnitude.Just a minor annoyance.

• FS converges to (-1+1)/2 = 0 @ discontinuities, in this casein this case.

• First observed by Michelson, 1898. Explained by Gibbs.

Overshoot exist @ Overshoot exist @ each discontinuityeach discontinuity

Page 14: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 14 / 24

FS time shifting FS time shifting

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10 t

squa

re s

igna

l, sw

(t)

2 π

π

f1 3f1 5f1 7f1 f

f1 3f1 5f1 7f1 f

rk

θk

4/π

4/3π

00a =

0=kb-

=⋅

=⋅

=

even.k,0

11...7,3,kodd,k,πk

4

9...5,1,kodd,k,πk

4

ka

(even function)

(zero average)

phase

phase

ampli

tude

ampli

tude

Note: amplitudes unchanged BUTBUTphases advance by k⋅π/2.

FS of even function:FS of even function:ππ/2/2--advanced sadvanced squarequare--wavewave

Page 15: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 15 / 24

Complex FSComplex FS

Complex form of FS (Laplace 1782). Harmonics ck separated by ∆f = 1/T on frequency plot.

a

bθ = arctan(b/a)r = a2 + b2

z = r ejθ

2eecos(t)

jtjt −+=

j2eesin(t)

jtjt

⋅−

=−

Euler’s notation:

e-jt = (ejt)* = cos(t) - j·sin(t) “phasor”

( ) ( )kbjka21

kbjka21

kc −⋅−−⋅=⋅+⋅=

0a0c =Link to FS real Link to FS real coeffscoeffs..

∑∞

−∞=⋅=

k

tωkjekcs(t)

∫ ⋅⋅=T

0dttωkj-es(t)

T1

kcanalysis

analysis

synthesis

synthesis

NoteNote: c-k = (ck)*

Page 16: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 16 / 24

FS propertiesFS propertiesTime FrequencyTime Frequency

** Explained in next week’s lectureExplained in next week’s lecture

Homogeneity a·s(t) a·S(k)

Additivity s(t) + u(t) S(k)+U(k)

Linearity a·s(t) + b·u(t) a·S(k)+b·U(k)

Time reversal s(-t) S(-k)

Multiplication * s(t)·u(t)

Convolution * S(k)·U(k)

Time shifting

Frequency shifting S(k - m)

∑∞

−∞=−

mm)U(m)S(k

td)tT

0u()ts(t

T1

∫ ⋅−⋅

S(k)e Ttk2πj

⋅⋅

s(t)Ttm2πj

e ⋅+

)ts(t −

Page 17: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 17 / 24

FS - “oddities”FS - “oddities”

Fourier components {Fourier components {uukk} form orthonormal base of signal space:} form orthonormal base of signal space:

uk = (1/√T) exp(jkωt) (|k| = 0,1 2, …+∞) Def.: Internal product ⊗:

uk ⊗ um = δk,m (1 if k = m, 0 otherwise). (Remember (ejt)* = e-jt )

Then ck = (1/√T) s(t) ⊗ uk i.e. (1/√T) times projectionprojection of signal s(t) on component uk

Orthonormal base

∫ ⋅=⊗T

o

*mkmk dtuuuu

k = - ∞, … -2,-1,0,1,2, …+ ∞, ωk = kω, φk = ωkt, phasor turns anti-clockwise.

Negative k ⇒ phasor turns clockwise (negative phase φk ), equivalent to negative time t,

⇒ time reversal.

Negative frequencies & time reversal

CarefulCareful: phases important when combining several signals!

Page 18: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 18 / 24

FS - power

0 50 100 150 200

k f

Wk/W0

10-3

10-2

10-1

12

Wk = 2 W0 sync2(k δ)

W0 = (δ sMAX)2

=+⋅= ∑

1k 0WkW10WW

•• FS convergence FS convergence ~1/k~1/k

⇒⇒ lower frequency terms

Wk = |ck|2 carry most power.

•• WWkk vs. vs. ωωkk: Power density spectrum: Power density spectrum.

Example

sync(u) = sin(π u)/(π u)

Pulse train, duty cycle Pulse train, duty cycle δδ = 2 = 2 τ τ / T/ T

T

2 τ

t

s(t)

bk = 0 a0 = δ sMAX

ak = 2δsMAX sync(k δ)

Average power WAverage power W : s(t)s(t)T

odt2s(t)

T1W ⊗≡= ∫

∑∑∞

=

++=

−∞==

1k

2kb2ka2120a

k

2kcW

Parseval’s TheoremParseval’s Theorem

FS - power

Page 19: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 19 / 24

FS of main waveformsFS of main waveforms

Page 20: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 20 / 24

Discrete Fourier Series (DFS)Discrete Fourier Series (DFS)DFS generate periodic ckwith same signal period

Band-limited signal s[n], period = N.

N consecutive samples of s[n] N consecutive samples of s[n] completely describe s in time completely describe s in time or frequency domains.or frequency domains.

∑−

=⋅=

1N

0kN

nk2πjekcs[n] ~

Synthesis: finite sum ⇐ band-limited s[n]

synthes

synthes

mk,δ1N

0nN

-m)n(k2πje

N1

=−

=∑

Kronecker’s delta

Orthogonality in DFS:

isis

∑−

=

−⋅=

1N

0nN

nk2πjes[n]

N1

kc~

Note:Note: ck+N = ck ⇔ same period N i.e. time periodicity propagates to frequencies!i.e. time periodicity propagates to frequencies!

DFS defined as:DFS defined as:

~~~~

analysis

analysis

Page 21: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 21 / 24

DFS analysis DFS analysis DFS of periodic discreteDFS of periodic discrete

11--Volt squareVolt square--wavewave

-5 0 1 2 3 4 5 6 7 8 9 10 n 0 L N

s[n] 1

s[n]: period NN, duty factor L/NL/N

−−

±+=

=

otherwise,

Nkπsin

NkLπsin

NN

1)(Lkπje

2N,...N,0,k,NL

kc~

0.6

0 1 2 3 4 5 6 7 8 9 10 k

1

0 2 4 5 6 7 8 9 10 n

θk

-0.4π

0.2 0.24 0.24

0.6 0.6

0.24

1

0.24

-0.2π

0.4π

0.2π

-0.4π

-0.2π

0.4π

0.2π

0.6 ck ~

ampli

tude

ampli

phase

phase

Discrete signals Discrete signals ⇒⇒ periodic frequency spectra.periodic frequency spectra.Compare to continuous rectangular function (slide # 10, “FS analysis - 1”)

tude

Page 22: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 22 / 24

DFS propertiesDFS propertiesTime FrequencyTime Frequency

Homogeneity a·s[n] a·S(k)

Additivity s[n] + u[n] S(k)+U(k)

Linearity a·s[n] + b·u[n] a·S(k)+b·U(k)

Multiplication * s[n] ·u[n]

Convolution * S(k)·U(k)

Time shifting s[n - m]

Frequency shifting S(k - h)

∑−

=⋅

1N

0hh)-S(h)U(k

N1

* * Explained in next week’s lectureExplained in next week’s lecture

∑−

=−⋅

1N

0mm]u[ns[m]

S(k)e Tmk2πj

⋅⋅

s[n]Tth2πj

e ⋅+

Page 23: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 23 / 24

DFS analysis: DDC + ...DFS analysis: DDC + ...s(t) periodic with period Ts(t) periodic with period TREV REV (ex: particle bunch in “racetrack” accelerator)(ex: particle bunch in “racetrack” accelerator)

QQ[[ttpp]]:: ““QQuuaaddrraattuurree””

s[tn] s(t)

cos[ωLO tn]

II[[ttnn]]

-sin[ωLO tn]

QQ[[ttnn]]

ADC (fS)

II[[ttpp]]:: ““IInn--pphhaassee””

LPF &

DECIMATION

N = NS/NT

TO DSP (next slide)

DDIIGGIITTAALL DDOOWWNN CCOONNVVEERRTTEERR

tn = n/fS , n = 1, 2 .. NS , NS = No. samples

(1)

(1)

(2)

(2) I[tn ]+j Q[tn ] = s[tn ] e -jωLOtn

(3)

(3) I[tp ]+j Q[tp ] p = 1, 2 .. NT , Ns / NT = decimation. (Down-converted to baseband).

0 f

BBB

BBB

fLO f

Page 24: Fourier Analysis

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series 24 / 24

... + DSP... + DSP

DDCsDDCs with different with different ffLOLOyield more DFS componentsyield more DFS components

ωLO = ωREV

harmonic 1 harmonic 2 harmonic 3

ωLO = 2 ωREV ωLO = 3 ωREV

DSP

Fourier coefficients a Fourier coefficients a k*k*, b , b k*k*

harmonic k* = ωLO/ωREV

∑=

⋅=TN

1ppI

TN1

*ka ∑=

⋅−=TN

1ppQ

TN1

*kb

Parallel digital input from ADC

TUNABLE LOCAL OSCILLATOR

(DIRECT DIGITAL SYNTHESIZER)

Clock from ADC

sin cos

COMPLEX MIXER fS fS fS/N

Decimation factor N

I

Q

Central frequency

LOW PASS FILTER

(DECIMATION)

Example: Real-life DDC