Uploaded by Tanvir Alam Shifat

DFT FFT and Windowing

advertisement
Presented By:
Abhishek Verma
DTFT
Discrete Time Fourier Transform (DTFT) is Fourier transform of discrete time sequence
represented by complex exponential sequence 𝑒 βˆ’π‘—πœ”π‘› where πœ” is the real frequency
variable. It maps time domain sequence into a continuous and periodic function of
frequency variable.
βˆ’π‘—πœ”π‘›
𝑋(𝑒 π‘—πœ” ) = ∞
π‘₯(𝑛)𝑒
𝑛=βˆ’βˆž
This equation represents DTFT.
It can be applied on any arbitrary sequence.
π‘₯(𝑛) =
This equation represents IDTFT.
1 πœ‹
π‘—πœ” )𝑒 π‘—πœ”π‘› π‘‘πœ”
𝑋(𝑒
2πœ‹ βˆ’πœ‹
DFT
Discrete Fourier Transform (DFT) is a finite duration discrete frequency sequence
which is obtained by sampling one period of Fourier transform. Sampling is done at N
equally spaced points, over the period extending from πœ” = 0 π‘‘π‘œ πœ” = 2πœ‹.
βˆ’π‘—2πœ‹π‘˜π‘›/𝑁
𝑋(π‘˜) = π‘βˆ’1
𝑛=0 π‘₯(𝑛)𝑒
For k=0,1,2….N-1
This equation represents N point DFT.
1 π‘βˆ’1
π‘₯(𝑛) =
𝑋(π‘˜)𝑒 𝑗2πœ‹π‘˜π‘›/𝑁
π‘˜=0
𝑁
For n=0,1,2….N-1
This equation represents N point IDFT.
Twiddle Factor
π‘Šπ‘ = 𝑒 βˆ’π‘—2πœ‹/𝑁
This is called twiddle factor. It makes computation of DFT a bit easy and fast.
π‘˜π‘›
𝑋(π‘˜) = π‘βˆ’1
π‘₯
𝑛
π‘Š
𝑁
𝑛=0
For k=0,1,2….N-1
This equation represents N point DFT.
1 π‘βˆ’1
βˆ’π‘˜π‘›
π‘₯(𝑛) =
𝑋(π‘˜)π‘Š
𝑁
𝑁 π‘˜=0
For n=0,1,2….N-1
This equation represents N point IDFT.
DFT Properties
1. Periodicity
π‘₯ 𝑛 =π‘₯ 𝑛+𝑁
𝑋 π‘˜ = 𝑋[π‘˜ + 𝑁]
2. Linearity
π‘Ž1 π‘₯1 𝑛 + π‘Ž2 π‘₯2 𝑛
π‘Ž1 𝑋1 π‘˜ + π‘Ž2 𝑋2 π‘˜
3. Time Reversal
π‘₯[𝑁 βˆ’ 𝑛]
𝑋[𝑁 βˆ’ π‘˜]
4. Circular time shift
π‘₯[𝑛 βˆ’ 𝑙]𝑁
X[π‘˜]𝑒 βˆ’π‘—2πœ‹π‘˜π‘™/𝑁
DFT Properties
5. Circular frequency shift
π‘₯[𝑛]𝑒 𝑗2πœ‹π‘™π‘›/𝑁
𝑋[π‘˜ βˆ’ 𝑙]𝑁
6. Circular convolution
π‘₯1 [𝑛] βŠ™ π‘₯2 [𝑛]
𝑋1 π‘˜ 𝑋2 [π‘˜]
7. Circular correlation
π‘₯ 𝑛 βŠ™ 𝑦 ⋇ βˆ’π‘›
𝑋 π‘˜ π‘Œ ⋇ [π‘˜]
8. Multiplication
π‘₯1 [𝑛]π‘₯2 [𝑛]
1
𝑋1 [π‘˜] βŠ™ 𝑋2 [π‘˜]
𝑁
DFT Properties
9. Complex conjugate
π‘₯ ⋇ [𝑛]
𝑋 βˆ— [𝑁 βˆ’ π‘˜]
10. Parseval’s Theorem
π‘βˆ’1
π‘₯ 𝑛 𝑦⋇ 𝑛
𝑛=0
π‘βˆ’1
1
𝑁
𝑋 π‘˜ π‘Œβ‹‡ π‘˜
𝑛=0
Computational Complexity in DFT
In direct computation,
𝑋(π‘˜) =
π‘βˆ’1
𝑛=0 π‘₯
𝑛 π‘Šπ‘
For k=0,1,2….N-1
We have
Complex multiplications
𝑁 βˆ— 𝑁 = 𝑁2
Complex additions
𝑁 𝑁 βˆ’ 1 = 𝑁2 βˆ’ 𝑁
π‘˜π‘›
FFT
Fast Fourier Transform is used to reduce number of arithmetic operations involved in
the computation of DFT by using:
1. Radix-2 Decimation in Time(DIT) algorithm
2. Radix-2 Decimation in Frequency(DIF) algorithm
It uses following properties of twiddle factor:
1. Periodic
π‘Šπ‘ π‘˜+𝑁 = π‘Šπ‘ π‘˜
2. Symmetric
𝑁
π‘˜+ 2
π‘Šπ‘
= βˆ’π‘Šπ‘ π‘˜
Radix-2 DIT algorithm
Radix-2 DIF algorithm
Computational Complexity in FFT
π‘‹π‘š+1 [𝑝] = π‘‹π‘š [𝑝] + π‘Šπ‘ π‘Ÿ π‘‹π‘š [π‘ž]
π‘Ÿ
π‘‹π‘š+1 [π‘ž] = π‘‹π‘š 𝑝 βˆ’ π‘Šπ‘ π‘‹π‘š [π‘ž]
We have
Complex multiplications
𝑁
log 2 𝑁
2
Complex additions
𝑁 log 2 𝑁
Resolution in FFT
When using FFT analysis to study the frequency
spectrum of signals, there are limits on resolution
between different frequencies, and on detectability
of a small signal in the presence of a large one.
There are two basic problems:
1. The fact that we can only measure the signal for
a limited time
2. The fact that the FFT only calculates results for
certain discrete frequency values (the 'FFT bins').
The sampled time waveform input to an FFT determines the computed spectrum. If an
arbitrary signal is sampled at a rate equal to 𝑓𝑠 over an acquisition time T, N samples are
acquired. Then Resolution Frequency is given by:
1
𝑇
=
Maximum Resolvable Frequency π‘“π‘šπ‘Žπ‘₯
π‘“π‘šπ‘Žπ‘₯
𝑓𝑠
𝑁
𝑓𝑠
=
2
Minimum Resolvable Frequency π‘“π‘šπ‘–π‘›
π‘“π‘šπ‘–π‘› = 0
The following strategies achieve a finer frequency resolution:
1. Decrease the sampling frequency, fs. Decreasing fs usually is not practical because
decreasing fs reduces the frequency range.
2. Increase the number of samples, N. Increasing N yields an increased number of lines
over the original frequency range.
Analyze a signal that contains two tones at 1,000 Hz and 1,100 Hz, use a sampling
frequency of 10,000 Hz. Acquire data for 10 ms with a frequency resolution of 100 Hz.
The following front panel shows the results of this analysis.
Increase the acquisition time to 1 s to achieve a frequency resolution of 1 Hz. The
following front panel shows the results obtained with a 1 s acquisition time.
Rectangular Window
The rectangular window takes all samples with equal weight into account. The main
lobe of its magnitude spectrum is narrow, but the level of the side lobes is rather
high. It has the highest frequency selectivity.
π‘Šπ‘… 𝑛 =
1 ,0 < 𝑛 < 𝑀 βˆ’ 1
0 , π‘’π‘™π‘ π‘’π‘€β„Žπ‘’π‘Ÿπ‘’
Triangular Window
For an odd window length 2Nβˆ’1 , the triangular window can be expressed as the
convolution of two rectangular windows. The main lobe is wider as for the
rectangular window, but the level of the side lobes decays faster.
2𝑛
π‘Šπ‘‡ 𝑛 = 1 βˆ’
, 𝑛 β‰€π‘€βˆ’1
π‘€βˆ’1
Hanning Window
The Hanning window is a smooth window whose first and last value is zero. It features
a fast decay of the side lobes.
π‘Šβ„Žπ‘›
1
2πœ‹π‘›
𝑛 = 1 βˆ’ cos
2
π‘€βˆ’1
Hamming Window
The Hamming window is a smooth window function whose first and last value is not
zero. The level of the side lobes is approximately constant.
π‘Šβ„Žπ‘š
2πœ‹π‘›
𝑛 = 0.54 + 0.46 cos 𝑀 βˆ’ 1
0 , π‘’π‘™π‘ π‘’π‘€β„Žπ‘’π‘Ÿπ‘’
Blackman Window
The Blackman window features a rapid decay of side lobes at the cost of a wide main
lobe and low frequency selectivity.
2πœ‹π‘›
4πœ‹π‘›
π‘Šπ΅ 𝑛 = 0.42 + 0.5 cos
+ 0.08 cos
π‘€βˆ’1
π‘€βˆ’1
Applications
1. It can be used in spectral analysis.
2. It can be used in signal processing.
3. It can be used in image processing.
Download