fourier analysis part 1: fourier series

24
FOURIER ANALYSIS PART 1: Fourier Series Dr.M.a.Kashem Asst. Professor,CSE,DUET

Upload: faolan

Post on 17-Jan-2016

120 views

Category:

Documents


9 download

DESCRIPTION

FOURIER ANALYSIS PART 1: Fourier Series. Dr.M.a.Kashem Asst. Professor,CSE,DUET. TOPICS. 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. analysis. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: FOURIER ANALYSIS PART 1: Fourier Series

FOURIER ANALYSISPART 1: Fourier Series

Dr.M.a.Kashem

Asst. Professor,CSE,DUET

Page 2: FOURIER ANALYSIS PART 1: Fourier Series

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 PART 1: Fourier Series

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)]

analysianalysiss

synthesissynthesis

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

General Transform General Transform as problem-solving as problem-solving

tooltool

Page 4: FOURIER ANALYSIS PART 1: Fourier Series

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

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

lifelife

• 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 PART 1: Fourier Series

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

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

spectrum

1N

0n

Nnkπ2

jes[n]

N

1kc~

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 12

time, tk

0

0.5

1

1.5

2

2.5

0 1 2 3 4 5 6 7 8

time, tk

1N

0n

Nnkπ2

jes[n]

N

1kc~

**

**

Calculated via FFT**

dttfπj2

es(t)S(f)

dtT

0

tωkjes(t)T

1kc 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 PART 1: Fourier Series

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

A little historyA little history Astronomic 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 century century: 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 PART 1: Fourier Series

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

A little history -2A little history -2 1919thth / 20 / 20thth century century: two paths for Fourier analysis - Continuous & Discrete.two paths for Fourier analysis - 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 PART 1: Fourier Series

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

Fourier Series (FS)Fourier Series (FS)

** see next slide see next slide

A A periodicperiodic function s(t) satisfying Dirichlet’s conditions function s(t) satisfying Dirichlet’s conditions ** can be can be

expressed as a Fourier series, with harmonically related sine/cosine expressed as a Fourier series, with harmonically related sine/cosine

terms.terms.

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

a0, ak, bk : Fourier coefficients.

k: harmonic number,

T: period, = 2/TFor all t but For all t but

discontinuitiesdiscontinuities

Note: {cos(kωt),

sin(kωt) }k form orthogonal base of function space.

T

0

s(t)dtT

10a

T

0

dtt)ωsin(ks(t)T

2kb-

T

0

dtt)ωcos(ks(t)T

2ka

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

analysis

analysis

synthesis

synthesis

Page 9: FOURIER ANALYSIS PART 1: Fourier Series

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

0

dts(t)

(a)

(b)

(c)

Dirichlet conditions

In any period:

Example: square wave

T

(a)

(b)

T

s(t)

(c)

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

Rate of Rate of convergenceconvergence

Page 10: FOURIER ANALYSIS PART 1: Fourier Series

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

sq

ua

re s

ign

al,

sw

(t)

0

π

1)dt(dt2π

10a

0

π

dtktcosdtktcosπ

1ka

kπcos1πk

2...

π

0

π

dtktsindtktsinπ

1kb-

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 PART 1: Fourier Series

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

FS analysis - 2FS analysis - 2

-π/ 2

f 1 3f 1 5f 1 f

f 1 3f 1 5f 1 f

rk

θk

4/π

4/ 3π

fk=k /2

rK = amplitude,

K = phase

rk

k

ak

bkk = arctan(bk/ ak)

rk = ak2 + bk

2

zk = (rk , k)

vk = rk cos (k t + k)

Polar

Fourier spectrum Fourier spectrum representationsrepresentations

0k(t)kvs(t)

Rectangular

vk = akcos(k t) - bksin(k t)

4/π

f 1 2f 1 3f 1 4f 1 5f 1 6f 1 f

f 1 2f 1 3f 1 4f 1 5f 1 6f 1 f

4/ 3π

ak

-bk

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

Page 12: FOURIER ANALYSIS PART 1: Fourier Series

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

7

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

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

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

sq

ua

re s

ign

al,

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

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

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

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

11

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

FS synthesisFS synthesisSquare wave Square wave

reconstruction from reconstruction from spectral termsspectral terms

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 PART 1: Fourier Series

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

sq

ua

re s

ign

al,

sw

(t)

79

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

Overshoot exist @ Overshoot exist @ each discontinuityeach discontinuity

• 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.

Page 14: FOURIER ANALYSIS PART 1: Fourier Series

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

sq

ua

re s

ign

al,

sw

(t)

FS of even function:FS of even function: /2-advanced square-/2-advanced square-

wavewave

π

f 1 3f 1 5f 1 7f 1 f

f 1 3f 1 5f 1 7f 1 f

rk

θk

4/ π

4/ 3π

00a

0kb-

even.k,0

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

4

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

4

ka

(even function)

(zero average)

phas

phas

ee

ampl

itude

ampl

itude

Note: amplitudes unchanged BUTBUT phases advance by k/2.

Page 15: FOURIER ANALYSIS PART 1: Fourier Series

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.

r

a

b = arctan(b/ a)

r = a2 + b2

z = r ej

2

eecos(t)

jtjt

j2

eesin(t)

jtjt

Euler’s notation:

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

NoteNote: c-k = (ck)*

kbjka2

1kbjka

2

1kc

0a0c Link to FS real Link to FS real

coeffs.coeffs.

k

tωkjekcs(t)

T

0

dttωkj-es(t)T

1kc

analysis

analysis

synthesis

synthesis

Page 16: FOURIER ANALYSIS PART 1: Fourier Series

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

FS propertiesFS properties Time 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)

m

m)U(m)S(k

td)tT

0

u()ts(tT

1

S(k)e Ttk2π

j

s(t)Ttm2π

je

)ts(t

Page 17: FOURIER ANALYSIS PART 1: Fourier Series

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

FS - “oddities”FS - “oddities”

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

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

CarefulCareful: phases important when combining several signals!

Page 18: FOURIER ANALYSIS PART 1: Fourier Series

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

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 0WkW

10WW

FS - power FS - power

• 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 = 2sMAX sync(k )

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

o

dt2s(t)T

1W

1k

2kb2

ka2

120a

k

2kcW

Parseval’s TheoremParseval’s Theorem

Page 19: FOURIER ANALYSIS PART 1: Fourier Series

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

FS of main waveformsFS of main waveforms

Page 20: FOURIER ANALYSIS PART 1: Fourier Series

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

Discrete Fourier Series (DFS)Discrete Fourier Series (DFS)

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

DFS generate periodic ck with same signal period

1N

0k

Nnk2π

jekcs[n] ~

Synthesis: finite sum band-limited s[n]

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

mk,δ1N

0n

N-m)n(k2π

je

N

1

Kronecker’s delta

Orthogonality in DFS:

synthesis

synthesis

1N

0n

Nnk2π

jes[n]

N

1kc~

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 PART 1: Fourier Series

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

DFS analysis DFS analysis DFS of periodic discreteDFS of periodic discrete

1-Volt square-wave1-Volt square-wave

otherwise,

Nkπ

sin

NkLπ

sin

N

N1)(Lkπ

je

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

L

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 ~

ampl

itude

ampl

itude

phas

e

phas

e

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

-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

Page 22: FOURIER ANALYSIS PART 1: Fourier Series

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

0h

h)-S(h)U(kN

1

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

1N

0m

m]u[ns[m]

S(k)e Tmk2π

j

s[n]Tth2π

je

Page 23: FOURIER ANALYSIS PART 1: Fourier Series

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

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

s[tn] s(t)

cos[LO tn]

II [[ttnn]]

-sin[LO tn]

QQ[[ttnn]]

ADC (f S)

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

LPF &

DECI MATI ON

N = NS/ NT

TO DSP (next slide)

DDII GGII TTAALL DDOOWWNN CCOONNVVEERRTTEERR

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

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

(1)

(1)

(2)

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

(3)

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

0 f

BBB

BBB

f LO f

Page 24: FOURIER ANALYSIS PART 1: Fourier Series

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

... + DSP... + DSP

DDCs with different fDDCs with different fLOLO yield more DFS yield more DFS componentscomponents

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

TN

1*ka

TN

1ppQ

TN

1*kb

Parallel digital input from ADC

TUNABLE LOCAL OSCI LLATOR

(DI RECT DI GI TAL SYNTHESI ZER)

Clock from ADC

sin cos

COMPLEX MI XER fS fS fS/N

Decimation factor N

I

Q

Central frequency

LOW PASS FI LTER

(DECI MATI ON)

Example: Real-life DDC