Professional Documents
Culture Documents
Aidp 03 DFT
Aidp 03 DFT
and
Fast Fourier Transform – FFT
x(n) y(n)
system
X(k) Y(k)
Time-continuous LTI signals and systems - review
∞
𝑿(𝒔) = න 𝒙 𝒕 ∙ 𝒆−𝒔𝒕 𝒅𝒕 LT
−∞
∞
𝑿(𝒋𝝎) = න 𝒙 𝒕 ∙ 𝒆−𝒋𝝎𝒕 𝒅𝒕 FT
−∞
𝑇
2
𝒄𝒌 = 𝑿(𝒌) = 𝐶 න 𝒙 𝒕 ∙ 𝒆−𝒋𝒌.𝝎𝟎 𝒕 𝒅𝒕 FR
𝑇
−
2
Periodic signals!
T=1/f0
Discrete Fourier Transform - DFT
∞
𝑿(𝝎) = න 𝒙 𝒕 ∙ 𝒆−𝒋𝝎𝒕 𝒅𝒕
0
1
𝒄𝒌 = 𝑿(𝒌) = න 𝒙 𝒕 ∙ 𝒆−𝒋𝒌𝝎𝒕𝒅𝒕
𝑇 𝑇
-------------------------------------------------------------------------------------------------------------
2𝜋
𝜔= = 2𝜋 ∙ 𝑓
𝑇
Discrete Fourier Transform - DFT
Consider a periodic sequence 𝑥(𝑛)
with period N:
𝑥 𝑛 = 𝑥 𝑛 + 𝑎. 𝑁 , 𝑎 − 𝑖𝑛𝑡𝑒𝑔𝑒𝑟
𝑁−1 1
1 𝟐𝝅 - only convetion
෩ 𝒌 ∙ 𝒆 𝑵 ∙𝒌∙𝒏
(𝒏) = 𝑿
𝒙 𝒋∙
𝑁
𝑁
𝑘=0
෩ 𝒌 from 𝒙
How to solve 𝑿 (𝒏) ??
Discrete Fourier Transform - DFT
𝑁−1
1 𝟐𝝅
𝒋∙ ∙𝒓∙𝒏 1 for 𝑟 = 𝑚. 𝑁
𝒆 𝑵 =
𝑁 0 otherwise
𝑛=0
𝑁−1
1 𝟐𝝅
෩ 𝒌 ∙ 𝒆 𝑵 ∙𝒌∙𝒏
(𝒏) = 𝑿
𝒙 𝒋∙
𝑁
𝑘=0
𝑁−1 𝑁 −1 𝑁−1
𝟐𝝅
−𝒋∙ ∙𝒓∙𝒏 1 𝟐𝝅
(𝒏) ∙
𝒙 𝒆 𝑵 ෩ 𝒌 ∙ 𝒆 𝑵 ∙(𝒌−𝒓)∙𝒏
= 𝑿 𝒋∙
𝑁
𝑛=0 𝑛=0 𝑘=0
𝑁−1
𝟐𝝅
෩ 𝒌 = 𝒙 −𝒋∙ ∙𝒌∙𝒏
𝑿 (𝒏) ∙ 𝒆 𝑵
𝑛=0
DFT - for discrete periodic signals
- analogy to Fourier series
DFT: IDFT:
𝑁−1
𝑁−1
1 𝒙(𝒏) = 𝑿 𝒌 ∙ 𝑾+𝒌𝒏
𝑿(𝒌) = 𝒙 𝒏 ∙ 𝑾−𝒌𝒏
𝑁 𝑘=0
𝑛=0
Properties of DFT
Periodicity of DFT a IDFT
𝐷𝐹𝑇 𝑥1 𝑛 = 𝑋1 𝑘
𝐷𝐹𝑇 𝑥2 𝑛 = 𝑋2 𝑘 ,
then
𝐷𝐹𝑇 𝑎1 . 𝑥1 𝑛 + 𝑎2 . 𝑥2 𝑛 = 𝑎1 𝑋1 𝑘 +𝑎2. 𝑋2 𝑘
Properties of DFT and IDFT
Time-shift
For periodic sequence x 𝑛 with period N and their spectrum X 𝑘 :
2𝜋
−𝑗 𝑛 𝑘
𝐷𝐹𝑇 𝑥 𝑛 − 𝑛0 =𝑋 𝑘 ∙𝑒 𝑁 0
2𝜋
+𝑗 𝑛 𝑘
𝐷𝐹𝑇 𝑥 𝑛 + 𝑛0 =𝑋 𝑘 ∙𝑒 𝑁 0
2𝜋
−𝑗 𝑛𝑘0
𝐷𝐹𝑇 𝑋 𝑘 + 𝑘0 =𝑋 𝑘 ∙𝑒 𝑁
1.8 15
|X3 |
(k)
1.6 10
1.4 5
1.2
0
0 5 10 15 20
(n)
1
x3
0.8 4
0.6 2
arg(X3 )
(k)
0.4 0
0.2 -2
0 -4
0 5 10 15 0 5 10 15 20
n k
FFT – Fast Fourier Transform
(1965 Cooley and Tukey)
• sequential division to the even and odd parts till the length N=1
– trivial case - spectrum of such signal equals to itself
x(n) ⎯DFT
⎯⎯→ X (k ) = x(n)
visualisation of FFT divisions
𝑵−1 𝑴−1
1
𝑭 𝒖, 𝒗 = 𝒇 𝒙, 𝒚 . 𝒆−𝒋2𝝅(𝒙𝒖Τ𝑵+𝒚𝒗Τ𝑴)
𝑵. 𝑴
𝒙=0 𝒚=0
Low-pass Filtering
HP Filtering
DP Filtering
HP Filtering
Filtering in the Frequency Domain
Filtered Filtered
Picture Fourier Filter Fourier Picture
Low-Pass Filtering
High-Pass Filtering
Band-Pass Filtering
potlačenie rozmazania obrazu
zjednodušením
( ) (
G x , y = F x , y B x , y )( )
kde
(
B x , y ) =
1 T / 2 − j x x0 (t ) − j y y0 (t )
e
T t = −T / 2
e dt
DFT
( ) (
G x , y = F x , y B x , y)( )
g (n1 , n2 ) = f (n1 , n2 ) b(n1 , n2 )
B(1 , 2 ) je funkcia rozmazania – DFT b(n1 , n 2 )
Display Fourier Spectrum as
Picture
1. Compute log( F (u ) + 1)
2. Scale to full range
3. Move (0,0) to center of image (Shift by N/2
F (u )
log( F (u ) + 1)