Professional Documents
Culture Documents
Ch7 D FFT 2024
Ch7 D FFT 2024
Reference:
S J.Orfanidis, ”Introduction to Signal Processing”, Prentice –Hall , 1996,ISBN 0-13-209172-0
M. D. Lutovac, D. V. Tošić, B. L. Evans, “Filter Design for Signal Processing Using MATLAB
and Mathematica”, Prentice Hall, 2001
But if the replicas overlap they will contribute to the right hand side of spectrum
2
Rectangular window of length L
3
Setting W(n) = 1
Magnitude spectrum
of rectangular window
4
5
Frequency resolution
At its center, n=(L-1)/2, the value of w(n) is 0.54+0.46 = 1, and at its endpoint,
n=0 and n=L-1, its value is 0.54-0.46 = 0.08
6
Hamming window in the time and frequency domain
7
Example:
Solution:
The smallest frequency separation that must be resolved by the DFT is
Df = 2.75-2.5=0.25 kHz, for rectangular window:
8
Example:
A 10ms portion of a signal is sampled at a rate of 10kHz. It is known
that the signal consists of two sinusoids of frequencies f1=1kHz and
f2=2khz. It is also known that the signal contains a third component
of frequency f3 that lies somewhere between f1 and f2.
a. How close to f1 could f3 be in order for the spectrum of the collected
samples to exhibit three distinct peak? How close to f2 could f3 be?
b.What are the answers if the collected samples are windowed by a
Hamming window?
Solution:
9
2. DTFT computation
2.1. DTFT at a single frequency
11
2.3. DFT
The N points DFT of a L-length signal defined the DFT frequency as follows,
The only difference between DFT and DTFT is that the former has its N
frequencies distributed evenly over the full Nyquist interval [0, 2p) whereas
the later has them distributed over any desired subinterval.
12
N-point DTFTs over [0,2p) and over subinterval [wa, wb), for N=10
Evaluation of z-transform
13
2.4. Zeros padding
Note that evaluation at the N frequencies DFT are the same for
the cases of padding D zeros at front or delay D samples
14
The DTFT and DFT
Denoted
15
The twiddle factor defined by
16
And the 2-point and 4-point DFT of a length 2 and length 4 signals will be
Thus, the 2-point DFT is formed by taking the sum and difference of the two time
Samples. It will be a convenience starting point for the merging in FFT by hand.
17
Twiddle factor look up tables for N=2, 4, 8
5. Modulo N reduction
Example L=4N
18
Example: Determine the mod-4 and mod-3 reduction of the length-8 signal vector
19
Periodic extension interpretation of mod-N reduction of a signal
The connection of the mod-N reduction to the DFT is the theorem that the
Length-N wrapped signal x~ has the same N-point DFT as the original
Unwrapped signal x, that is:
20
The DFT matrices A and A~ have the same definition, except they
differ in their dimensions, which are NxL and NxN, respectively.
We can write the DFT of x~ in the compact matrix form:
21
22
N-point DFTs of the full and wrapped signal are equivalent
23
Example: Compute the 4-point DFT of the length-8 signal in two way:
(a) Working with the full unwrapped vector x and
(b) Computing the DFT of its mod-4 reduction
~*
Where IN is the N-dimensional identity matrix and A is the complex
~
~
conjugate of A , obtained by conjugating every matrix element of A.
For example, for N=4, we can verify easily:
25
Similar for FFT
26
In term of the DFT frequencies wk , we have Xk = X(wk ) and
27
7. Sampling of periodic signals and DFT
X~ is periodic in n with period N
Taking the Nyquist interval to be the right-sided one [0, fs], we note that
harmonics within that interval are none other than the N DFT frequencies
28
Given an integer m, we determine its quotient and reminder of the division
29
If the sampled signal x(nT) be reconstructed by an ideal reconstructor,
the aliased analog waveform is
Where f3 = 3 was replaced by its negative version f3-fs = 3-4 = -1. It follows that
the aliased signal will be
30
Similarly, for N=8 corresponding to fs=8 Hz, we perform the 8-point DFT of one
period of the square wave, and divide by 8 to get the aliased amplitudes
31
8. Fast Fourier Transform – FFT
Is a fast implementation of DFT. It is based on a divide and conquer
approach in which the DFT computation is divided into smaller, simpler,
problems and the final DFT is rebuilt from the simpler DFTs.
It is required the initial dimension of N to be power of two
32
The summation index n ranges over both even and odd values
in the range [0,N-1]. By grouping the even-indexed and
odd-indexed terms, we get
0 2n N 2 0 n N / 2 1
Similarly, for the odd-indexed terms, we must have
0 2n 1 N 1
1 2n 1 n 1 0 2n N 2 0 n N / 2 1
33
34
35
The butterfly merging builds
upper and lower halves of
length-N DFT
36
and N=8
37
The typical algorithm consists of three conceptual parts:
1. Shuffling the N-dimensional input into N of 1-D signals
2. Performing N one-point DFTs
3. Merging the N one-point DFTs into one N-point DFT
38
39
Example: Using FFT algorithm, compute the 4-point
wrapped signal (5, 0, -3, 4)
Solution:
The DFT merging stage merges the two 2-DFTs
into the final 4-DFT
40
Example: Using FFT algorithm, compute 8-point DFT of the 8 point signal
41
Example: 8-point Inverse FFT
Note: The last column should be divided by N to create the final result!
42