Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
Fourier Series
Lecture 14: 27-Aug-12
Dr. P P Das
SourceThis presentation is lifted from:
http://www.ele.uri.edu/courses/ele436/FourierSeries.ppt
ContentPeriodic FunctionsFourier SeriesComplex Form of the Fourier Series Impulse TrainAnalysis of Periodic WaveformsHalf-Range ExpansionLeast Mean-Square Error Approximation
Fourier Series
Periodic Functions
The Mathematic Formulation
Any function that satisfies
( ) ( )f t f t T
where T is a constant and is called the period of the function.
Example:
4cos
3cos)(
tttf Find its period.
)()( Ttftf )(4
1cos)(
3
1cos
4cos
3cos TtTt
tt
Fact: )2cos(cos m
mT
23
nT
24
mT 6
nT 8
24T smallest T
Example:
tttf 21 coscos)( Find its period.
)()( Ttftf )(cos)(coscoscos 2121 TtTttt
mT 21
nT 22
n
m
2
1
2
1
must be a rational number
Example:
tttf )10cos(10cos)(
Is this function a periodic one?
10
10
2
1 not a rational number
Fourier Series
Fourier Series
Introduction
Decompose a periodic input signal into primitive periodic components.
A periodic sequenceA periodic sequence
T 2T 3T
t
f(t)
Synthesis
T
ntb
T
nta
atf
nn
nn
2sin
2cos
2)(
11
0
DC Part Even Part Odd Part
T is a period of all the above signals
)sin()cos(2
)( 01
01
0 tnbtnaa
tfn
nn
n
Let 0=2/T.
Orthogonal Functions
Call a set of functions {k} orthogonal on an interval a < t < b if it satisfies
nmr
nmdttt
n
b
a nm
0)()(
Orthogonal set of Sinusoidal Functions
Define 0=2/T.
0 ,0)cos(2/
2/ 0 mdttmT
T0 ,0)sin(
2/
2/ 0 mdttmT
T
nmT
nmdttntm
T
T 2/
0)cos()cos(
2/
2/ 00
nmT
nmdttntm
T
T 2/
0)sin()sin(
2/
2/ 00
nmdttntmT
T and allfor ,0)cos()sin(
2/
2/ 00
We now prove this one
Proof
dttntmT
T 2/
2/ 00 )cos()cos(
0
)]cos()[cos(2
1coscos
dttnmdttnmT
T
T
T
2/
2/ 0
2/
2/ 0 ])cos[(2
1])cos[(
2
1
2/
2/00
2/
2/00
])sin[()(
1
2
1])sin[(
)(
1
2
1 T
T
T
Ttnm
nmtnm
nm
m n
])sin[(2)(
1
2
1])sin[(2
)(
1
2
1
00
nmnm
nmnm
00
Proof
dttntmT
T 2/
2/ 00 )cos()cos(
0
)]cos()[cos(2
1coscos
dttmT
T 2/
2/ 02 )(cos
2/
2/
00
2/
2/
]2sin4
1
2
1T
T
T
T
tmm
t
m = n
2
T
]2cos1[2
1cos2
dttmT
T 2/
2/ 0 ]2cos1[2
1
nmT
nmdttntm
T
T 2/
0)cos()cos(
2/
2/ 00
Orthogonal set of Sinusoidal Functions
Define 0=2/T.
0 ,0)cos(2/
2/ 0 mdttmT
T0 ,0)sin(
2/
2/ 0 mdttmT
T
nmT
nmdttntm
T
T 2/
0)cos()cos(
2/
2/ 00
nmT
nmdttntm
T
T 2/
0)sin()sin(
2/
2/ 00
nmdttntmT
T and allfor ,0)cos()sin(
2/
2/ 00
,3sin,2sin,sin
,3cos,2cos,cos
,1
000
000
ttt
ttt
,3sin,2sin,sin
,3cos,2cos,cos
,1
000
000
ttt
ttt
an orthogonal set.an orthogonal set.
Decomposition
dttfT
aTt
t
0
0
)(2
0
,2,1 cos)(2
0
0
0
ntdtntfT
aTt
tn
,2,1 sin)(2
0
0
0
ntdtntfT
bTt
tn
)sin()cos(2
)( 01
01
0 tnbtnaa
tfn
nn
n
ProofUse the following facts:
0 ,0)cos(2/
2/ 0 mdttmT
T0 ,0)sin(
2/
2/ 0 mdttmT
T
nmT
nmdttntm
T
T 2/
0)cos()cos(
2/
2/ 00
nmT
nmdttntm
T
T 2/
0)sin()sin(
2/
2/ 00
nmdttntmT
T and allfor ,0)cos()sin(
2/
2/ 00
Example (Square Wave)
112
200
dta
,2,1 0sin1
cos2
200
nntn
ntdtan
,6,4,20
,5,3,1/2)1cos(
1 cos
1sin
2
200
n
nnn
nnt
nntdtbn
2 3 4 5--2-3-4-5-6
f(t)1
112
200
dta
,2,1 0sin1
cos2
200
nntn
ntdtan
,6,4,20
,5,3,1/2)1cos(
1 cos
1sin
2
100
n
nnn
nnt
nntdtbn
2 3 4 5--2-3-4-5-6
f(t)1
Example (Square Wave)
ttttf 5sin
5
13sin
3
1sin
2
2
1)(
ttttf 5sin
5
13sin
3
1sin
2
2
1)(
112
200
dta
,2,1 0sin1
cos2
200
nntn
ntdtan
,6,4,20
,5,3,1/2)1cos(
1 cos
1sin
2
100
n
nnn
nnt
nntdtbn
2 3 4 5--2-3-4-5-6
f(t)1
Example (Square Wave)
-0.5
0
0.5
1
1.5
ttttf 5sin
5
13sin
3
1sin
2
2
1)(
ttttf 5sin
5
13sin
3
1sin
2
2
1)(
Harmonics
T
ntb
T
nta
atf
nn
nn
2sin
2cos
2)(
11
0
DC Part Even Part Odd Part
T is a period of all the above signals
)sin()cos(2
)( 01
01
0 tnbtnaa
tfn
nn
n
Harmonics
tnbtnaa
tfn
nn
n 01
01
0 sincos2
)(
Tf
22 00Define , called the fundamental angular frequency.
0 nnDefine , called the n-th harmonic of the periodic function.
tbtaa
tf nn
nnn
n
sincos2
)(11
0
Harmonics
tbtaa
tf nn
nnn
n
sincos2
)(11
0
)sincos(2 1
0 tbtaa
nnnn
n
12222
220 sincos2 n
n
nn
nn
nn
nnn t
ba
bt
ba
aba
a
1
220 sinsincoscos2 n
nnnnnn ttbaa
)cos(1
0 nn
nn tCC
Amplitudes and Phase Angles
)cos()(1
0 nn
nn tCCtf
20
0
aC
22nnn baC
n
nn a
b1tan
harmonic amplitude phase angle
Fourier Series
Complex Form of the Fourier Series
Complex Exponentials
tnjtne tjn00 sincos0
tjntjn eetn 00
2
1cos 0
tnjtne tjn00 sincos0
tjntjntjntjn eej
eej
tn 0000
22
1sin 0
Complex Form of the Fourier Series
tnbtnaa
tfn
nn
n 01
01
0 sincos2
)(
tjntjn
nn
tjntjn
nn eeb
jeea
a0000
11
0
22
1
2
1
0 00 )(2
1)(
2
1
2 n
tjnnn
tjnnn ejbaejba
a
1
000
n
tjnn
tjnn ececc
)(2
1
)(2
12
00
nnn
nnn
jbac
jbac
ac
)(
2
1
)(2
12
00
nnn
nnn
jbac
jbac
ac
Complex Form of the Fourier Series
1
000)(
n
tjnn
tjnn ececctf
1
10
00
n
tjnn
n
tjnn ececc
n
tjnnec 0
)(2
1
)(2
12
00
nnn
nnn
jbac
jbac
ac
)(
2
1
)(2
12
00
nnn
nnn
jbac
jbac
ac
Complex Form of the Fourier Series
2/
2/
00 )(
1
2
T
Tdttf
T
ac
)(2
1nnn jbac
2/
2/ 0
2/
2/ 0 sin)(cos)(1 T
T
T
Ttdtntfjtdtntf
T
2/
2/ 00 )sin)(cos(1 T
Tdttnjtntf
T
2/
2/
0)(1 T
T
tjn dtetfT
2/
2/
0)(1
)(2
1 T
T
tjnnnn dtetf
Tjbac )(
2
1
)(2
12
00
nnn
nnn
jbac
jbac
ac
)(
2
1
)(2
12
00
nnn
nnn
jbac
jbac
ac
Complex Form of the Fourier Series
n
tjnnectf 0)(
n
tjnnectf 0)(
dtetfT
cT
T
tjnn
2/
2/
0)(1 dtetf
Tc
T
T
tjnn
2/
2/
0)(1
)(2
1
)(2
12
00
nnn
nnn
jbac
jbac
ac
)(
2
1
)(2
12
00
nnn
nnn
jbac
jbac
ac
If f(t) is real,*nn cc
nn jnnn
jnn ecccecc
|| ,|| *
22
2
1|||| nnnn bacc
n
nn a
b1tan
,3,2,1 n
00 2
1ac
Complex Frequency Spectra
nn jnnn
jnn ecccecc
|| ,|| *
22
2
1|||| nnnn bacc
n
nn a
b1tan ,3,2,1 n
00 2
1ac
|cn|
amplitudespectrum
n
phasespectrum
Example
2
T
2
T TT
2
d
t
f(t)
A
2
d
dteT
Ac
d
d
tjnn
2/
2/
0
2/
2/0
01
d
d
tjnejnT
A
2/
0
2/
0
0011 djndjn ejn
ejnT
A
)2/sin2(1
00
dnjjnT
A
2/sin1
002
1dn
nT
A
TdnT
dn
T
Adsin
TdnT
dn
T
Adcn
sin
82
5
1
T ,
4
1 ,
20
1
0
T
dTd
Example
40 80 120-40 0-120 -80
A/5
50 100 150-50-100-150
TdnT
dn
T
Adcn
sin
42
10
1
T ,
2
1 ,
20
1
0
T
dTd
Example
40 80 120-40 0-120 -80
A/10
100 200 300-100-200-300
Fourier Series & Fourier Transform
Lecture 15-16: 28-Aug-12
Dr. P P Das
Example
dteT
Ac
d tjnn
0
0
d
tjnejnT
A
00
01
00
110
jne
jnT
A djn
)1(1
0
0
djnejnT
A
2/0
sindjne
TdnT
dn
T
Ad
TT d
t
f(t)
A
0
)(1 2/2/2/
0
000 djndjndjn eeejnT
A
Fourier Series
Analysis ofPeriodic Waveforms
Waveform Symmetry
Even Functions
Odd Functions
)()( tftf
)()( tftf
Decomposition
Any function f(t) can be expressed as the sum of an even function fe(t) and an odd function fo(t).
)()()( tftftf oe
)]()([)( 21 tftftfe
)]()([)( 21 tftftfo
Even Part
Odd Part
Example
00
0)(
t
tetf
t
Even Part
Odd Part
0
0)(
21
21
te
tetf
t
t
e
0
0)(
21
21
te
tetf
t
t
o
Half-Wave Symmetry
)()( Ttftf and 2/)( Ttftf
TT/2T/2
Quarter-Wave Symmetry
Even Quarter-Wave Symmetry
TT/2T/2
Odd Quarter-Wave Symmetry
T
T/2T/2
Hidden Symmetry
The following is a asymmetry periodic function:
Adding a constant to get symmetry property.
A
TT
A/2
A/2
TT
Fourier Coefficients of Symmetrical Waveforms
The use of symmetry properties simplifies the calculation of Fourier coefficients.– Even Functions– Odd Functions– Half-Wave– Even Quarter-Wave– Odd Quarter-Wave– Hidden
Fourier Coefficients of Even Functions
)()( tftf
tnaa
tfn
n 01
0 cos2
)(
2/
0 0 )cos()(4 T
n dttntfT
a
Fourier Coefficients of Odd Functions
)()( tftf
tnbtfn
n 01
sin)(
2/
0 0 )sin()(4 T
n dttntfT
b
Fourier Coefficients for Half-Wave Symmetry
)()( Ttftf and 2/)( Ttftf
TT/2T/2
The Fourier series contains only odd harmonics.The Fourier series contains only odd harmonics.
Fourier Coefficients for Half-Wave Symmetry
)()( Ttftf and 2/)( Ttftf
)sincos()(1
00
n
nn tnbtnatf
odd for )cos()(4
even for 02/
0 0 ndttntfT
na T
n
odd for )sin()(4
even for 02/
0 0 ndttntfT
nb T
n
Fourier Coefficients forEven Quarter-Wave Symmetry
TT/2T/2
])12cos[()( 01
12 tnatfn
n
4/
0 012 ])12cos[()(8 T
n dttntfT
a
Fourier Coefficients forOdd Quarter-Wave Symmetry
])12sin[()( 01
12 tnbtfn
n
4/
0 012 ])12sin[()(8 T
n dttntfT
b
T
T/2T/2
ExampleEven Quarter-Wave Symmetry
4/
0 012 ])12cos[()(8 T
n dttntfT
a 4/
0 0 ])12cos[(8 T
dttnT
4/
0
00
])12sin[()12(
8T
tnTn
)12(
4)1( 1
nn
TT/2T/2
1
1T T/4T/4
ExampleEven Quarter-Wave Symmetry
4/
0 012 ])12cos[()(8 T
n dttntfT
a 4/
0 0 ])12cos[(8 T
dttnT
4/
0
00
])12sin[()12(
8T
tnTn
)12(
4)1( 1
nn
TT/2T/2
1
1T T/4T/4
ttttf 000 5cos
5
13cos
3
1cos
4)(
ttttf 000 5cos
5
13cos
3
1cos
4)(
Example
TT/2T/2
1
1
T T/4T/4
Odd Quarter-Wave Symmetry
4/
0 012 ])12sin[()(8 T
n dttntfT
b 4/
0 0 ])12sin[(8 T
dttnT
4/
0
00
])12cos[()12(
8T
tnTn
)12(
4
n
Example
TT/2T/2
1
1
T T/4T/4
Odd Quarter-Wave Symmetry
4/
0 012 ])12sin[()(8 T
n dttntfT
b 4/
0 0 ])12sin[(8 T
dttnT
4/
0
00
])12cos[()12(
8T
tnTn
)12(
4
n
ttttf 000 5sin
5
13sin
3
1sin
4)(
ttttf 000 5sin
5
13sin
3
1sin
4)(
Fourier Series
Half-Range Expansions
Non-Periodic Function Representation
A non-periodic function f(t) defined over (0, ) can be expanded into a Fourier series which is defined only in the interval (0, ).
Without Considering Symmetry
A non-periodic function f(t) defined over (0, ) can be expanded into a Fourier series which is defined only in the interval (0, ).
T
Expansion Into Even Symmetry
A non-periodic function f(t) defined over (0, ) can be expanded into a Fourier series which is defined only in the interval (0, ).
T=2
Expansion Into Odd Symmetry
A non-periodic function f(t) defined over (0, ) can be expanded into a Fourier series which is defined only in the interval (0, ).
T=2
Expansion Into Half-Wave Symmetry
A non-periodic function f(t) defined over (0, ) can be expanded into a Fourier series which is defined only in the interval (0, ).
T=2
Expansion Into Even Quarter-Wave Symmetry
A non-periodic function f(t) defined over (0, ) can be expanded into a Fourier series which is defined only in the interval (0, ).
T/2=2T=4
Expansion Into Odd Quarter-Wave Symmetry
A non-periodic function f(t) defined over (0, ) can be expanded into a Fourier series which is defined only in the interval (0, ).
T/2=2 T=4
Fourier Series
Least Mean-Square Error Approximation
Approximation a function
Use
k
nnnk tnbtna
atS
100
0 sincos2
)(
to represent f(t) on interval T/2 < t < T/2.
Define )()()( tStft kk
2/
2/
2)]([1 T
T kk dttT
E Mean-Square Error
Approximation a function
Show that using Sk(t) to represent f(t) has least mean-square property.
2/
2/
2)]([1 T
T kk dttT
E
2/
2/
2
100
0 sincos2
)(1 T
T
k
nnn dttnbtna
atf
T
Proven by setting Ek/ai = 0 and Ek/bi = 0.
Approximation a function
2/
2/
2)]([1 T
T kk dttT
E
2/
2/
2
100
0 sincos2
)(1 T
T
k
nnn dttnbtna
atf
T
0)(1
2
2/
2/
0
0
T
T
k dttfT
a
a
E 0)(1
2
2/
2/
0
0
T
T
k dttfT
a
a
E0cos)(
2 2/
2/ 0
T
Tnn
k tdtntfT
aa
E 0cos)(2 2/
2/ 0
T
Tnn
k tdtntfT
aa
E
0sin)(2 2/
2/ 0
T
Tnn
k tdtntfT
bb
E 0sin)(2 2/
2/ 0
T
Tnn
k tdtntfT
bb
E
Mean-Square Error
2/
2/
2)]([1 T
T kk dttT
E
2/
2/
2
100
0 sincos2
)(1 T
T
k
nnn dttnbtna
atf
T
2/
2/1
22202 )(
2
1
4)]([
1 T
T
k
nnnk ba
adttf
TE
2/
2/1
22202 )(
2
1
4)]([
1 T
T
k
nnnk ba
adttf
TE
Mean-Square Error
2/
2/
2)]([1 T
T kk dttT
E
2/
2/
2
100
0 sincos2
)(1 T
T
k
nnn dttnbtna
atf
T
2/
2/1
22202 )(
2
1
4)]([
1 T
T
k
nnn ba
adttf
T
2/
2/1
22202 )(
2
1
4)]([
1 T
T
k
nnn ba
adttf
T
Mean-Square Error
2/
2/
2)]([1 T
T kk dttT
E
2/
2/
2
100
0 sincos2
)(1 T
T
k
nnn dttnbtna
atf
T
2/
2/1
22202 )(
2
1
4)]([
1 T
Tn
nn baa
dttfT
2/
2/1
22202 )(
2
1
4)]([
1 T
Tn
nn baa
dttfT
Fourier Series
Impulse Train
Dirac Delta Function
0
00)(
t
tt and 1)(
dtt
0 t
Also called unit impulse function, but not actually a function in truesense.
Sifting Property
)0()()(
dttt )0()()(
dttt
)0()()0()0()()()(
dttdttdttt
(t): Test Function
Impulse Train
0 tT 2T 3TT2T3T
n
T nTtt )()(
n
T nTtt )()(
Fourier Series of the Impulse Train
n
T nTtt )()(
n
T nTtt )()(T
dttT
aT
T T
2)(
2 2/
2/0
Tdttnt
Ta
T
T Tn
2)cos()(
2 2/
2/ 0
0)sin()(2 2/
2/ 0 dttntT
bT
T Tn
n
T tnTT
t 0cos21
)(
n
T tnTT
t 0cos21
)(
)0()()(
dttt )0()()(
dttt
Complex FormFourier Series of the Impulse Train
Tdtt
T
ac
T
T T
1)(
1
2
2/
2/
00
Tdtet
Tc
T
T
tjnTn
1)(
1 2/
2/
0
n
tjnT e
Tt 0
1)(
n
tjnT e
Tt 0
1)(
n
T nTtt )()(
n
T nTtt )()(
)0()()(
dttt )0()()(
dttt
Fourier Transform
Impulse Train
Fourier Series / Transform
Fourier Series deals with discrete variable (harmonics of )
Fourier Transform deals with continuous frequency
00 2 f
Fourier Series / Transform
dtetfFtf tj 2)()()}({
deFFtf tj21 )()}({)(
n
tfjnnectf 02)(
2/
2/
2 0)(1 T
T
tfjnn dtetf
Tc
00 2 f
Example
ExampledtetfF tj
2)()(
2/
2/
2
2
1W
W
tjej
A
WjWj eej
A
2
W
WAW
sin
Example
Example: Unit Impulse
dtetF tj
2)()(
1002 ee j
dtettF tj
20 )()(
02 tje
Fourier Series of the Impulse Train
Tdtets
Tc
T
T
tjTn
Tn
1)(
1 2/
2/
2
n
tT
nj
T eT
ts21
)(
n
tT
nj
T eT
ts21
)(
nT Tntts )()(
nT Tntts )()(
Fourier Transform of the Impulse Train
n
n
tT
nj
T
T
n
T
eT
tsS
)(1
}1
{)}({)(2
n
n
tT
nj
T
T
n
T
eT
tsS
)(1
}1
{)}({)(2
)(}{2
T
ne
tT
nj
)(}{2
T
ne
tT
nj
Fourier Transform
Convolution
Convolution
A mathematical operator which computes the “amount of overlap” between two functions. Can be thought of as a general moving average
Discrete domain:
Continuous domain:
Discrete domain
Basic steps1. Flip (reverse) one of the digital functions.
2. Shift it along the time axis by one sample.
3. Multiply the corresponding values of the two digital functions.
4. Summate the products from step 3 to get one point of the digital convolution.
5. Repeat steps 1-4 to obtain the digital convolution at all times that the functions overlap.
Example
Continuous domain example
Continuous domain example
Convolution Theorem
)()()}()({ GFtgtf
)()()}()({ tgtfGF
Fourier Transform
Sampling
Convolution Theorem
Sampling
n
T
Tnttf
tstf
tf
)()(
)()(
)(~
nT Tntts )()(
nT Tntts )()(
Sampling & FT
n
T
T
nF
T
SF
tstftf
F
)(1
)()(
)}()({)}(~
{
)(~
n T
n
TS )(
1)(
n T
n
TS )(
1)(
Sampling & FT
Nyquist Rate
Reconstruction Filter
Aliasing
Discrete & Fast Fourier Transform
Lecture 17: 03-Sep-12
Dr. P P Das
Sampling & FT
n
T
T
nF
T
SF
tstftf
F
)(1
)()(
)}()({)}(~
{
)(~
n T
n
TS )(
1)(
n T
n
TS )(
1)(
Sampling & FT
DFT: How to compute FT?
Tnj
nn
n
tj
tj
n
tj
ef
dteTnttf
dteTnttf
dtetfF
2
2
2
2
)()(
)()(
)(~
)(~
)(
)()(
Tnf
dtTnttffn
Discrete Fourier Transform
Tnj
nnefF
2)(~ )( Tnffn
1,2,1,0,TM
m
T1/ to0 period
over the )(~
of samples spacedequally Obtain
DFTfor the basis theis period one Sampling
period oneover zedcharacteri be toneed )(~
T
1 period withperiodic infinitely and continuous is )(
~
function discretea is
Mm
FM
F
F
fn
Discrete Fourier Transform
Tnj
nnefF
2)(~
)( Tnffn
1,2,1,0,TM
m
Mm
1,2,1,0,
DFT1
0
/2
MmefFM
n
Mmnjnm
1,2,1,0,1
IDFT1
0
/2
MneFM
fM
m
Mmnjmn
DFT: Notations
D-2 in variables transform Discrete:,
D-2 in variablesfunction Discrete:,
D-2 in variables transformContinuous :,
D-2 in variablesfunction Continuous :,
D-1 in variable)(frequency Continuous :
D-1 in variable(time) Continuous :
vu
yx
zt
t
DFT Pair
1,2,1,0,)()(
DFT1
0
/2
MuexfuFM
x
Muxj
1,2,1,0,)(1
)(
IDFT1
0
/2
MxeuFM
xfM
u
Muxj
Discrete Fourier Transform Pair
1
0
/2)()(M
x
MuxjexfuF
1
0
/2)(1
)(M
u
MuxjeuFM
xf
uniformly takensamples discrete
ofset finiteany toapplicable Is
/1 Interval Frequencyoft Independen
Interval Sampling oft Independen
:pair DFT
T
T
DFT: Periodicity
,2,1,0),()(
DFT
kkMuFuF
,2,1,0),()(
IDFT
kkMxfxf
Sampling & Frequency Intervals
T interval sampling theon depends DFTthe
by spanned sfrequencie of Range
sampled. is )( over which duration theon
depends frequency in Resolution
1;
11;
tfT
uT
uMTTM
uTMT
DFT: Example
4)3(;4)2(;2)1(;1)0( ffff
DFT: Example
)23()3();01()2(
23)40()04()20(1
4421
)()1(
114421
)3()2()1()0()()0(
2/32/0
3
0
4/)1(2
3
0
jFjF
jjjj
eeee
exfF
ffffxfF
jjj
x
xj
x
DFT: Example
144
12312311
4
1
)(4
1
)(4
1)0(
3
0
3
0
)0(2
jj
uF
euFf
u
u
uj
M. Wu: ENEE631 Digital Image Processing (Spring'09)
1-D FFT in Matrix/Vector { z(n) } { Z(k) }
n, k = 0, 1, …, N-1, WN = exp{ - j2 / N } ~ complex conjugate of primitive Nth root of unity
)1(
)1(
)0(
)1(
)2(
)1(
)0(
1
1
1
1 1 11
)1(
)2(
)1(
)0(
110
/)1(2/)1(22/)1(2
/)1(22/42/22
/)1(2/22/2
2 NZ
Z
Z
aaa
NZ
Z
Z
Z
eee
eee
eee
Nz
z
z
z
N
NNjNNjNNj
NNjNjNj
NNjNjNj
1
0
1
0
)(1
)(
)(1
)(
N
k
nkN
N
n
nkN
WkZN
nz
WnzN
kZ
UM
CP
EN
EE
631
Sli
des
(cre
ated
by
M.W
u ©
200
1/20
04)
z
a
a
a
Nz
z
z
z
eee
eee
eee
NZ
Z
Z
Z
TN
T
T
NNjNNjNNj
NNjNjNj
NNjNjNj
*1
*1
*0
/)1(2/)1(22/)1(2
/)1(22/42/22
/)1(2/22/2
)1(
)2(
)1(
)0(
1
1
1
1 1 11
)1(
)2(
)1(
)0(
2
DFT: Example
4)3(;4)2(;2)1(;1)0( ffff
4
4
2
1
)3(
)2(
)1(
)0(
f
f
f
f
DFT: By Matrix
)3(
)2(
)1(
)0(
1
1
1
11 11
)3(
)2(
)1(
)0(
2/932/3
32
2/32/
f
f
f
f
eee
eee
eee
F
F
F
F
jjj
jjj
jjj
)3(
)2(
)1(
)0(
00101
010j1 011
00j1 01
11 11
)3(
)2(
)1(
)0(
f
f
f
f
jjj
jj
jj
F
F
F
F
DFT: By Matrix
j
j
jj
jj
jj
jj
f
f
f
f
jjj
jj
jj
F
F
F
F
23
1
23
11
4421
4421
4421
4421
4
4
2
1
11
11 11
1 1
11 11
)3(
)2(
)1(
0(
00101
010j1 011
00j1 01
11 11
)3(
)2(
)1(
)0(
4
4
2
1
)3(
)2(
)1(
)0(
f
f
f
f
IDFT: By Matrix
)3(
)2(
)1(
)0(
1
1
1
11 11
)3(
)2(
)1(
)0(
4
2/932/3
32
2/32/
F
F
F
F
eee
eee
eee
f
f
f
f
jjj
jjj
jjj
)3(
)2(
)1(
)0(
00101
010j1 011
00j1 01
11 11
)3(
)2(
)1(
)0(
4
F
F
F
F
jjj
jj
jj
f
f
f
f
IDFT: By Matrix
16
16
8
4
2312311
2312311
2312311
2312311
23
1
23
11
11
11 11
1 1
11 11
)3(
)2(
)1(
0(
00101
010j1 011
00j1 01
11 11
)3(
)2(
)1(
)0(
4
jj
jj
jj
jj
j
j
jj
jj
F
F
F
F
jjj
jj
jj
f
f
f
f
j
j
F
F
F
F
23
1
23
11
)3(
)2(
)1(
)0(
Inverse Discrete Fourier Transform
1,2,1,0,)()( :DFT1
0
/2
MuexfuFM
x
Muxj
))((1
)(
))((1
)(1
)(
:conjugatecomplex Taking
1,2,1,0,)(1
)( :IDFT
**
*1
0
/2**
1
0
/2
uFDFTM
xf
uFDFTM
euFM
xf
MxeuFM
xf
M
u
Muxj
M
u
Muxj
DFT Complexity
point DFT an in additions
complex ofNumber :)(
point DFT an in tionsmultiplica
complex ofNumber :)(
M
MAdd
M
MMult
DFT / IDFT Complexity
)()1()(
)()(
computed.-pre are that Assume
1,2,1,0,)()(
2
22
/2
1
0
/2
MOMMMAdd
MOMMMult
e
MuexfuF
Muxj
M
x
Muxj
Fast Fourier Transform
KMeW
MuWxfuF
nMjM
M
x
uxM
22
1,2,1,0,)()(
/2
1
0
uM
MuM
uM
MuM
uxK
uxK WWWWWW 222
2 ;;
:Properties
1,2,1,0,)()(1
0
/2
MuexfuFM
x
Muxj
Fast Fourier Transform
1
02
1
0
1
0
)12(2
1
0
)2(2
12
0
)12()2(
)12()2(
)()(
K
x
uK
uxK
K
x
uxK
K
x
xuK
K
x
xuK
K
x
uxM
WWxfWxf
WxfWxf
WxfuF
KMeW nMjM 22/2 ux
Kux
K WW 22
Fast Fourier Transform
uKoddeven
uKoddeven
K
x
uxKodd
K
x
uxKeven
WuFuFKuF
WuFuFuF
WxfuF
WxfuF
2
2
1
0
1
0
)()()(
)()()(
)12()(
)2()(
KM
eWn
MjM
22
/2
uM
MuM
uM
MuM WWWW 22;
FFT Complexity
point FFT 2 an in additions
complex ofNumber :)()(
point FFT 2 an in tionsmultiplica
complex ofNumber :)()(
n
n
M
nAddMAdd
M
nMultMMult
FFT
1
0
1
0
)12()(
)2()(
K
x
uxKodd
K
x
uxKeven
WxfuF
WxfuF
02
02
1
)0()0()1(
)0()0()0(
)1()0(
)0()0(
1;22;1
WFFF
WFFF
fF
fF
KMn
oddeven
oddeven
odd
even
uKoddeven
uKoddeven
WuFuFKuF
WuFuFuF
2
2
)()()(
)()()(
2)1(
1)1(
Add
Mult
FFT
1
0
1
0
)12()(
)2()(
K
x
uxKodd
K
x
uxKeven
WxfuF
WxfuF
14
04
14
04
2
)1()1()21()3(
)0()0()20()2(
)1()1()1(
)0()0()0(
)3(&)1( from point FFT-2)(
)2(&)0( from point FFT-2)(
2;42;2
WFFFF
WFFFF
WFFF
WFFF
ffuF
ffuF
KMn
oddeven
oddeven
oddeven
oddeven
odd
even
uKoddeven
uKoddeven
WuFuFKuF
WuFuFuF
2
2
)()()(
)()()(
4)1(2)2(
2)1(2)2(
AddAdd
MultMult
FFT Complexity
)log(log)()(
)log(log2
1)()(
0;;0
1;2)1(2)(
0;;0
1;2)1(2)(
22
22
1
MMOMMnAddMAdd
MMOMMnMultMMult
n
nnAddnAdd
n
nnMultnMult
n
n
2-D DFT & Images
Lecture 18-19: 04-Sep-12
Dr. P P Das
Kinect Demo in Lecture 19
2-D Impulse
0
0,00),(
zt
ztzt
and
1),(
dzdtzt
2-D Sifting Property
)0,0(),(),( fdzdtztztf
),(),(),( 0000 ztfdzdtzzttztf
2-D Discrete Impulse
01
0,00),(
yx
yxyx
2-D Discrete Sifting Property
)0,0(),(),( fyxyxfx y
),(),(),( 0000 yxfyyxxyxfx y
2-D Impulse
2-D Continuous Fourier Transform Pair
dzdteztfF ztj )(2),(),(
ddeFztf ztj )(2),(),(
2-D FT: Example
2-D FT: Example
)(
)sin(
)(
)sin(
),(),(
2/
2/
2/
2/
)(2
)(2
Z
Z
T
TATZ
dzdtAe
dzdteztfF
T
T
Z
Z
ztj
ztj
2-D Sampling
maxmax
maxmax
2
1
2
1
and for 0),(
limited-band is ),(
ZT
F
ztf
m nZT ZnzTmtzts ),(),(
2-D Sampling
Frequency Aliasing
Signals sampled below Nyquist rate (under-sampled) have overlapped periods.
In aliasing, high frequency components masquerade as low frequency components in sampled function. Hence, ‘aliasing’ or ‘false identity’.
Aliasing
Aliasing
Frequency Aliasing
Most band-limited signals have infinite frequency components in sampled signal due to finite duration of sampling.
n
TnTntcTnf
tfth
HFFtf
/)(sin)(
)(~
)(
)}()(~
{)}({)( 11
otherwise
Ttth
0
01)(
Frequency Aliasing
Aliasing is inevitable while working with sampled records of finite length
Aliasing can be reduced by smoothing the input function to attenuate higher frequencies (defocusing images)
This is known as ‘anti-aliasing’ and has to be done before the function is sampled
Aliasing & Interpolation
n
TnTntcTnftf /)(sin)()(
,function sinc of sum of ioninterpolat
0)(sin and 1)0(sin as ),()(
Tkt
mccTktTkftf
Aliasing in Images
Spatial Aliasing– Due to under-sampling in space
Temporal Aliasing– Due to slow time interval between frames in video– Wagon-Wheel Effect
Aliasing in Spectrum
Sampling: 96X96 Pixels
Interpolation Techniques
Nearest Neighbor Interpolation Bi-Linear Interpolation Bi-Cubic Interpolation
Interpolation & Re-sampling
Zooming – Over-sampling– Pixel Replication / Row-Column Duplication
Shrinking – Under-sampling – Row-Column Deletion– Blur slightly before shrinking
Aliasing Artifact: Jaggies
Block-like image component Common in images with string edge content
Aliasing Artifact: Moiré Patterns
Beat patterns produced between two gratings of approximately equal spacing
Common in images with periodic or nearly periodic content
2-D DFT Properties
Lecture 20: 10-Sep-12
Dr. P P Das
2-D DFT Pair
1
0
1
0
)//(2),(),(
DFTM
x
N
y
NvyMuxjeyxfvuF
1
0
1
0
)//(2),(1
)(
IDFTM
u
N
v
NvyMuxjevuFMN
xf
2-D: Separability
1
0
/2
1
0
/2
1
0
1
0
/2/2
1
0
1
0
)//(2
),(),( where
),(
),(
),(),(
N
y
Nvyj
M
x
Muxj
M
x
N
y
NvyjMuxj
M
x
N
y
NvyMuxj
eyxfvxF
evxF
eyxfe
eyxfvuF
Properties of 2-D DFT:Spatial & Frequency Intervals
ZNv
TMu
1
1
Properties of 2-D DFT:Translation & Rotation
),(),(
sincossincos
:scoordinatepolar In
),(),(
),(),(
00
)//(200
)//(200
00
00
Frf
vuryrx
evuFyyxxf
eyxfvuuFNvyMuxj
NyvMxuj
Properties of 2-D DFT:Periodicity
),(
),(
),(
),(
21
2
1
NkvMkuF
NkvuF
vMkuF
vuF
),(
),(
),(
),(
21
2
1
NkyMkxf
Nkyxf
yMkxf
yxf
Periodicity: Centering the Transform
)2/,2/()1(,
)2/()1(
2/For
)(
D-1 In
0
0/)(2 0
NvMuFy)f(x
MuFf(x)
Mu
uuFf(x)e
yx
x
Mxujπ
Properties of 2-D DFT:Symmetry
),(2
),(),(),(
),(2
),(),(),(
),(),(),(
yxwyxwyxw
yxw
yxwyxwyxw
yxw
yxwyxwyxw
oo
ee
oe
Properties of 2-D DFT:Symmetry
),(),(
),(),(
0),(),(1
0
1
0
yNxMwyxw
yNxMwyxw
yxwyxw
oo
ee
o
M
x
N
ye
Symmetry
),(),(
symmetric-anti conjugate is FT,),(imaginary For
),(),(
symmetric conjugate is FT,),( realFor
*
*
vuFvuF
yxf
vuFvuF
yxf
Fourier Spectrum & Phase Angle
),(),(
),(),( :SpectrumPower
),(
),(arctan :Angle Phase
),(),(),( :SpectrumFourier
),(),(),(),(
22
2
),(
2/122
),(
vuIvuR
vuFvuP
vuR
vuIe
vuIvuRvuF
evuFvujIvuRvuF
vuj
vuj
Fourier Spectrum & Phase Angle
),(),()0,0(
),(),(
symmetry odd has Angle Phase
),(),(
symmetry even has Spectrum
symmetric conjugate is FT,),( realFor
1
0
1
0
yxfMNyxfF
vuvu
vuFvuF
yxf
M
x
N
y
yxyxf )1)(,( ),(log1 vuF
2-D Convolution
)()(),(),(
)()(),(),(
),(),(
),(),(1
0
1
0
HFyxhyxf
HFyxhyxf
nymxhnmf
yxhyxfM
m
N
n
Effect of DFT on Convolution
399
0
)()()()(m
mxhmfxhxf
Wraparound Error needs Zero Padding
2-D: Separability
1
0
/2
1
0
1
0
/2/2
1
0
1
0
)//(2
),(
),(
),(),(
DFT
M
x
Muxj
M
x
N
y
NvyjMuxj
M
x
N
y
NvyMuxj
evxF
eyxfe
eyxfvuF
Thank you