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

Download Report

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

FOURIER ANALYSIS
PART 1: Fourier Series
Maria Elena Angoletta,
AB/BDI
DISP 2003, 20 February 2003
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
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
2 / 24
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
analysis
General Transform as
problem-solving tool
frequency, f
F
S(f) = F[s(t)]
s(t)
s(t), S(f) :
Transform Pair
synthesis
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
3 / 24
Fourier analysis - applications
Applications wide ranging and ever present in modern life
• Telecomms - GSM/cellular phones,
• Electronics/IT - most DSP-based applications,
• Entertainment - music, audio, multimedia,
• Accelerator control (tune measurement for beam steering/control),
• Imaging, image processing,
• Industry/research - X-ray spectrometry, chemical analysis (FT
spectrometry), PDE solution, radar design,
• Medical - (PET scanner, CAT scans & MRI interpretation for sleep
disorder & heart malfunction diagnosis,
• Speech analysis (voice activated “devices”, biometry, …).
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
4 / 24
Fourier analysis - tools
Input Time Signal
Frequency spectrum
2.5
2
1.5
1
0.5
Periodic
0
0
1
2
3
4
5
6
7
8
time, t
Continuous
2.5
2
(period T)
Aperiodic
1.5
1
FS
Discrete
FT
Continuous
T
1
ck    s(t)  e j k ω t dt
T
0
 j2 π f t

S(f)   s(t)  e
dt

0.5
0
0
2
4
6
8
10
12
time, t
2.5
2
1.5
Periodic
1
0.5
1
2
3
4
5
6
7
DFS** Discrete
(period T)
0
0
2πkn
N

1

j
1
~
N
ck   s[n]  e
N
n 0
8
time, tk
Discrete
DTFT
2.5
Continuous
Aperiodic
2
1.5
1
0.5
0
0
2
4
6
time, tk
8
10
12
DFT** Discrete
Note: j =-1,  = 2/T, s[n]=s(tn), N = No. of samples
**

S(f)   s[n]  e j 2 π f n
n 
2πkn
j
1 N1
~
N
ck   s[n]  e
N
n 0
Calculated via FFT
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
5 / 24
A little history
 Astronomic predictions by Babylonians/Egyptians likely via trigonometric sums.
 1669: Newton stumbles upon light spectra (specter = ghost) but fails to
recognise “frequency” concept (corpuscular theory of light, & no waves).
 18th century: two 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). BUT peers’ consensus is that sum of sinusoids only represents smooth
curves. Big blow to utility of such sums for all but Fourier ...
 1807: Fourier presents his work on heat conduction  Fourier analysis born.
 Diffusion equation  series (infinite) of sines & cosines. Strong criticism by peers
blocks publication. Work published, 1822 (“Theorie Analytique de la chaleur”).
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
6 / 24
A little history -2
 19th / 20th century: two paths for Fourier analysis - Continuous & Discrete.
CONTINUOUS

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)

1805 - Gauss, first usage of FFT (manuscript in Latin went unnoticed!!!
Published 1866).

1965 - 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.
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
7 / 24
Fourier Series (FS)
A periodic function s(t) satisfying Dirichlet’s conditions * can be expressed
as a Fourier series, with harmonically related sine/cosine terms.
s(t)  a0 

 ak  cos (k ω t)  bk  sin(k ω t)
k 1
For all t but discontinuities
a0, ak, bk : Fourier coefficients.
k: harmonic number,
T: period,  = 2/T
T
1
(signal average over a period, i.e. DC term &
a0    s(t)dt
zero-frequency component.)
T
0
T
2
ak    s(t)  cos(k ω t) dt
Note: {cos(kωt), sin(kωt) }k
T
0
form orthogonal base of
T
function space.
2
- bk    s(t)  sin(k ω t) dt
T
0
* see next slide
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
8 / 24
FS convergence
Dirichlet conditions
(a) s(t) piecewise-continuous;
(b) s(t) piecewise-monotonic;
In any period:
(c) s(t) absolutely integrable ,
T

s(t) dt  
0
Example:
square wave
Rate of convergence
T
if s(t) discontinuous then
|ak|<M/k for large k (M>0)
s(t)
T
(a)
(b)
(c)
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
9 / 24
FS analysis - 1
T  2π  ω  1
2π
π

1 

a0 
   dt   ( 1)dt   0
2π 

π
0

2π
π

1 

ak     cos kt dt   cos kt dt   0
π 

π
0

(zero average)
(odd function)
2π
π

1 
2

- bk     sinkt dt   sinkt dt   ... 
  1 cos kπ  
π 
k

π

π
0

 4
 k  π , k odd

 
 0 , k even


4
4
4
sw(t)   sin t 
 sin 3  t 
 sin 5  t  ...
π
3π
5π

1.5
square signal, sw(t)
FS of odd* function: square wave.
1
0.5
0
0
2
4
6
8
10
-0.5
t
-1
-1.5
* Even & Odd functions
s(x)
Even :
s(-x) = s(x)
x
s(x)
Odd :
x
s(-x) = -s(x)
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
10 / 24
FS analysis - 2
Fourier spectrum
representations
s(t) 
zk = (rk , k)

bk
 vk (t)
rk = ak2 + bk2
rk
k
k = arctan(bk/ak)
ak
k 0
Rectangular
Polar
vk = akcos(k t) - bksin(k t)
vk = rk cos (k t + k)
rk
ak
-bk
4/π
f1 2f1 3f1 4f1 5f1 6f1
rK = amplitude,
K = phase
f
fk=k /2
4/π
4/3π
f1 2f1 3f1
4f1
5f1
6f1
f
Fourier spectrum
of square-wave.
4/3π
θk
f1
3f 1
5f1
f
f1
3f 1
5f1
f
-π/2
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
11 / 24
FS synthesis
Square wave reconstruction
from spectral terms
1.5
7
3
15
911
 
sw1
(t)
sin(kt)
(t)
sin(kt)
sin(kt)
--b-bkbkksin(kt)
5
7
3
11
9(t)
kk
k111
square signal, sw(t)
1
0.5
0
-0.5
-1
-1.5
0
2
4
t
6
8
10
Convergence may be slow (~1/k) - ideally need infinite terms.
Practically, series truncated when remainder below computer tolerance
( error). BUT … Gibbs’ Phenomenon.
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
12 / 24
Gibbs phenomenon
1.5
sw 79 (t) 
79
 - bk  sin(kt) 
k 1
1
square signal, sw(t)
Overshoot exist @
each discontinuity
0.5
0
-0.5
-1
-1.5
0
2
4
t
6
8
10
• First observed by Michelson, 1898. Explained by Gibbs.
• Max overshoot pk-to-pk = 8.95% of discontinuity magnitude.
Just a minor annoyance.
• FS converges to (-1+1)/2 = 0 @ discontinuities, in this case.
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
13 / 24
FS time shifting
a 0 0
(zero average)
 4
 k  π , k odd, k  1, 5, 9...


ak    4
, k odd, k  3, 7, 11...
 kπ


0
, k even.

1.5
square signal, sw(t)
FS of even function:
/2-advanced square-wave

1
0.5
0
0
2
4
6
8
10
-0.5
t
-1
-1.5
rk
4/π
4/3π
- bk  0
(even function)
Note: amplitudes unchanged BUT
phases advance by k/2.
θk
f1
3f1
5f1
7f1
f
f1
3f1
5f1
7f1
f
π
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
14 / 24
Complex FS
Euler’s notation:
e-jt =
(ejt)*
= cos(t) - j·sin(t)
T
1
ck    s(t)  e- j k ω t dt
T
0
s(t) 

“phasor”
e jt  e jt
cos(t) 
2
Complex form of FS (Laplace 1782). Harmonics
ck separated by f = 1/T on frequency plot.
jk ω t
c

e
k
k 
z=re
Note: c-k = (ck)*
Link to FS real coeffs.
c0  a0
ck 
e jt  e  jt
sin(t) 
2 j
b
r
j

a
r = a2 + b2
 = arctan(b/a)
1
1
 ak  j  bk    a k  j  b k 
2
2
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
15 / 24
FS properties
Time
Homogeneity
a·s(t)
Additivity
s(t) + u(t)
Linearity
a·s(t) + b·u(t)
Time reversal
Time shifting
a·S(k)
S(k)+U(k)
a·S(k)+b·U(k)
s(-t)
S(-k)

Multiplication *
Convolution *
Frequency
s(t)·u(t)
T
1
  s(t  t )  u( t ) dt
T
0
s(t  t )
Frequency shifting e
j
2π m t
T  s(t)
 S(k  m)U(m)
m  
S(k)·U(k)
e
j
2π k t
T
 S(k)
S(k - m)
* Explained in next week’s lecture
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
16 / 24
FS - “oddities”
Orthonormal base
Fourier components {uk} form orthonormal base of signal space:
T
uk = (1/T) exp(jkωt) (|k| = 0,1 2, …+) Def.: Internal product : u  u  u  u* dt
k
m
k m

uk  um = δk,m (1 if k = m, 0 otherwise).
(Remember (ejt)* = e-jt )
o
Then ck = (1/T) s(t)  uk i.e. (1/T) times projection of signal s(t) on component uk
Negative frequencies & time reversal
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.
Careful: phases important when combining several signals!
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
17 / 24
FS - power
Average power W :
1
W
T
T

s(t) 2 dt  s(t)  s(t)
o
Parseval’s Theorem

1   2
2
2
W   ck  a0    ak  bk 2 


2
k 
k 1
Example
Pulse train, duty cycle  = 2 t/ T
s(t)
• FS convergence ~1/k
 lower frequency terms
Wk = |ck|2 carry most power.
• Wk vs. ωk: Power density spectrum.
2
1
Wk/W0
Wk = 2 W0 sync2(k )
10-1
2t
10-2
T
kf
10-3
t
bk = 0
a0 =  sMAX
ak = 2sMAX sync(k )
0
50
W0 = ( sMAX)2
sync(u) = sin( u)/( u)
100
150
200
 W 



W  W0  1  k 
W

 k 1 0 

M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
18 / 24
FS of main waveforms
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
19 / 24
Discrete Fourier Series (DFS)
Band-limited signal s[n], period = N.
DFS defined as:
2π k n
N

1

j
1
~
N
ck   s[n]  e
N
n0
~
~
Note: ck+N = ck  same period N
i.e. time periodicity propagates to frequencies!
2π k n
N1
j
s[n]   ~
ck  e N
k 0
DFS generate periodic ck
with same signal period
Orthogonality in DFS:
2π n(k -m)
N

1
j
1
N
e
 δ k,m

N
n 0
Kronecker’s delta
N consecutive samples of s[n]
completely describe s in time
or frequency domains.
Synthesis: finite sum  band-limited s[n]
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
20 / 24
DFS analysis
DFS of periodic discrete
1-Volt square-wave
s[n]: period N, duty factor L/N
L

,
k  0,  N,  2N,...

N



~
ck  
π k (L 1)
 π kL 
 j
sin


N
N 
e


, otherwise

N
π k
sin 


 N 

s[n]
1
-5
0 1 2 3 4 5 6 7 8 9 10
0
L
N
1
ck
0.24
0.24
0.2
0.6
0.6
0.24
0.24
0 1 2 3 4 5 6 7 8 9 10
k
0.4
0.2
Discrete signals  periodic frequency spectra.
Compare to continuous rectangular function
(slide # 10, “FS analysis - 1”)
1
~
0.6
0.6
n
k
0.4
0.2
0
2
4 5 6 7 8 9 10
-0.2
-0.4
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
n
-0.2
-0.4
21 / 24
DFS properties
Time
Frequency
Homogeneity
a·s[n]
Additivity
s[n] + u[n]
Linearity
a·s[n] + b·u[n]
a·S(k)+b·U(k)
s[n] ·u[n]
1 N1
  S(h)U(k - h)
N h0
Multiplication *
Convolution *
N1
a·S(k)
S(k)+U(k)
 s[m]  u[n  m]
S(k)·U(k)
m 0
Time shifting
Frequency shifting
s[n - m]
j
e
2π h t
T  s[n]
e
j
2π k m
T
 S(k)
S(k - h)
* Explained in next week’s lecture
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
22 / 24
DFS analysis: DDC + ...
s(t) periodic with period TREV (ex: particle bunch in “racetrack” accelerator)
B
B
cos[LO tn]
fLO
ADC
(fS)
s(t)
0
f
I[tp]: “In-phase”
I[tn]
(1)
LPF
&
DECIMATION
(2)
s[tn]
Q[tn]
-sin[LO tn]
f
N = NS/NT
(3)
TO DSP
(next slide)
Q[tp]: “Quadrature”
DIGITAL DOWN
CONVERTER
(2)
(1)
tn = n/fS , n = 1, 2 .. NS , NS = No. samples
(3)
I[tp ]+j Q[tp ] p = 1, 2 .. NT , Ns / NT = decimation. (Down-converted to baseband).
I[tn ]+j Q[tn ] = s[tn ] e -jLOtn
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
23 / 24
... + DSP
DDCs with different fLO
yield more DFS components
Example: Real-life DDC
COMPLEX MIXER
Fourier coefficients a
k*,
b k*
Parallel fS
digital
input
from ADC
fS
fS/N
LOW PASS
FILTER
(DECIMATION)
1
ak * 

NT
NT
Ip
p1
1
bk *  

NT
harmonic k* = LO/REV
NT
 Qp
p1
sin
Clock
from
ADC
cos
TUNABLE LOCAL
OSCILLATOR
(DIRECT DIGITAL SYNTHESIZER)
Central
frequency
Decimation factor N
M. E. Angoletta - DISP2003 - Fourier analysis - Part 1: Fourier Series
24 / 24
I
Q