0% found this document useful (0 votes)
98 views66 pages

DSP Chapter8 PDF

This document discusses frequency analysis of signals and systems. It covers discrete time Fourier transform (DTFT), discrete Fourier transform (DFT), and fast Fourier transform (FFT). DTFT represents a discrete-time signal in the frequency domain, DFT computes the frequency spectrum of a finite discrete signal, and FFT computes the same DFT results more efficiently. Frequency analysis has three major uses in digital signal processing: computing frequency spectra, implementing convolution via FFT, and coding signals for transmission.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views66 pages

DSP Chapter8 PDF

This document discusses frequency analysis of signals and systems. It covers discrete time Fourier transform (DTFT), discrete Fourier transform (DFT), and fast Fourier transform (FFT). DTFT represents a discrete-time signal in the frequency domain, DFT computes the frequency spectrum of a finite discrete signal, and FFT computes the same DFT results more efficiently. Frequency analysis has three major uses in digital signal processing: computing frequency spectra, implementing convolution via FFT, and coding signals for transmission.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

Chapter 8

Frequency Analysis of Signals and Systems


Click to edit Master subtitle style
Xuan-Xinh Nguyen, MEng.
[email protected]

Source: Department of Telecommunications Engineering, FEEE, HCMUT.


 Frequency analysis of signal involves the resolution of the signal into
its frequency (sinusoidal) components. The process of obtaining the
spectrum of a given signal using the basic mathematical tools is
known as frequency or spectral analysis.
 The term spectrum is used when referring the frequency content of a
signal.
 The process of determining the spectrum of a signal in practice base
on actual measurements of signal is called spectrum estimation.
 The instruments of software programs
used to obtain spectral estimate of such
signals are known as spectrum analyzer.

Digital Signal Processing 2 Frequency analysis of signals and systems


 The frequency analysis of signals and systems have three major uses
in DSP:
1) The numerical computation of frequency spectrum of a signal.

2) The efficient implementation of convolution by the fast Fourier


transform (FFT)
3) The coding of waves, such as speech or pictures, for efficient
transmission and storage.

Digital Signal Processing 3 Frequency analysis of signals and systems


Content

1. Discrete time Fourier transform DTFT

2. Discrete Fourier transform DFT

3. Fast Fourier transform FFT

Digital Signal Processing 4 Transfer functions


and Digital Filter Realizations
DTFT, DFT, FFT

Ideal sampler
𝑥 𝑡 𝑥 𝑛𝑇
analog signal sampled signal

Continuous-signal
Continuous-signal

Fourier transform Discrete-time Fourier Transform

Continuous-spectrum Continuous-spectrum

Ha H. Kha 5 Transfer functions


and Digital Filter Realizations
DTFT, DFT, FFT
Fourier Transform Discrete-time Discrete Fourier Fast Fourier
Fourier Transform Transform
Transform
+∞ +∞ 𝑁−1
𝟐𝝅𝒌 𝟐𝝅𝒌
𝑋 𝑓 = 𝑥 𝑡 𝑒 −𝑗2𝜋𝑓𝑡 𝑑𝑡 𝑋 𝑓 = 𝑥 𝑛 𝑒 −𝑗𝟐𝝅𝒇𝑛𝑻 𝑋 = 𝑥 𝑛 𝑒 −𝑗 𝑵
𝑛
𝑵
Formulation −∞ 𝑛=−∞
+∞
𝑛=0
𝑁−1
𝟐𝝅𝒌
Same as DFT
−𝑗 𝑛
𝑋 𝜔 = 𝑥 𝑛 𝑒 −𝑗𝝎𝑛 𝑋 𝑘 = 𝑥 𝑛 𝑒 𝑵
𝑛=−∞ 𝑛=0

Time Domain continuous discrete discrete Same as DFT


(can be infinite) (can be infinite) (finite)

Frequency continuous continuous discrete


Same as DFT
Domain

FT

Ha H. Kha 6 Transfer functions


and Digital Filter Realizations
DTFT, DFT, FFT
Fourier Transform Discrete-time Discrete Fourier Fast Fourier
Fourier Transform Transform
Transform
+∞ +∞ 𝑁−1
𝟐𝝅𝒌 𝟐𝝅𝒌
𝑋 𝑓 = 𝑥 𝑡 𝑒 −𝑗2𝜋𝑓𝑡 𝑑𝑡 𝑋 𝑓 = 𝑥 𝑛 𝑒 −𝑗𝟐𝝅𝒇𝑛𝑻 𝑋 = 𝑥 𝑛 𝑒 −𝑗 𝑵
𝑛
𝑵
Formulation −∞ 𝑛=−∞
+∞
𝑛=0
𝑁−1
𝟐𝝅𝒌
Same as DFT
−𝑗 𝑛
𝑋 𝜔 = 𝑥 𝑛 𝑒 −𝑗𝝎𝑛 𝑋 𝑘 = 𝑥 𝑛 𝑒 𝑵
𝑛=−∞ 𝑛=0

Time Domain continuous discrete discrete Same as DFT


(can be infinite) (can be infinite) (finite)

Frequency continuous continuous discrete


Same as DFT
Domain

DTFT

Ha H. Kha 7 Transfer functions


and Digital Filter Realizations
DTFT, DFT, FFT
Fourier Transform Discrete-time Discrete Fourier Fast Fourier
Fourier Transform Transform
Transform
+∞ +∞ 𝑁−1
𝟐𝝅𝒌 𝟐𝝅𝒌
𝑋 𝑓 = 𝑥 𝑡 𝑒 −𝑗2𝜋𝑓𝑡 𝑑𝑡 𝑋 𝑓 = 𝑥 𝑛 𝑒 −𝑗𝟐𝝅𝒇𝑛𝑻 𝑋 = 𝑥 𝑛 𝑒 −𝑗 𝑵
𝑛
𝑵
Formulation −∞ 𝑛=−∞
+∞
𝑛=0
𝑁−1
𝟐𝝅𝒌
Same as DFT
−𝑗 𝑛
𝑋 𝜔 = 𝑥 𝑛 𝑒 −𝑗𝝎𝑛 𝑋 𝑘 = 𝑥 𝑛 𝑒 𝑵
𝑛=−∞ 𝑛=0

Time Domain continuous discrete discrete Same as DFT


(can be infinite) (can be infinite) (finite)

Frequency continuous continuous discrete


Same as DFT
Domain

DTFT DFT

Ha H. Kha 8 Transfer functions


and Digital Filter Realizations
DTFT, DFT, FFT
Fourier Transform Discrete-time Discrete Fourier Fast Fourier
Fourier Transform Transform
Transform
+∞ +∞ 𝑁−1
𝟐𝝅𝒌 𝟐𝝅𝒌
𝑋 𝑓 = 𝑥 𝑡 𝑒 −𝑗2𝜋𝑓𝑡 𝑑𝑡 𝑋 𝑓 = 𝑥 𝑛 𝑒 −𝑗𝟐𝝅𝒇𝑛𝑻 𝑋 = 𝑥 𝑛 𝑒 −𝑗 𝑵
𝑛
𝑵
Formulation −∞ 𝑛=−∞
+∞
𝑛=0
𝑁−1
𝟐𝝅𝒌
Same as DFT
−𝑗 𝑛
𝑋 𝜔 = 𝑥 𝑛 𝑒 −𝑗𝝎𝑛 𝑋 𝑘 = 𝑥 𝑛 𝑒 𝑵
𝑛=−∞ 𝑛=0

Time Domain continuous discrete discrete Same as DFT


(can be infinite) (can be infinite) (finite)

Frequency continuous continuous discrete


Same as DFT
Domain

DTFT FFT

• Gives same results as


DFT
• Compute more efficient

Ha H. Kha 9 Transfer functions


and Digital Filter Realizations
1. Discrete-time Fourier transform (DTFT)

 The Fourier transform of the finite-energy discrete-time signal x(n) is


defined as: ∞ ∞
𝑋(𝜔) = 𝑥(𝑛)𝑒 −𝑗𝜔𝑛 𝑋(𝑧) = 𝑥(𝑛)𝑧 −𝑛
𝑛=−∞
𝑛=−∞

where ω=2πf/fs
 The spectrum X(w) is in general a complex-valued function of
frequency: j (  )
X ( ) | X ( ) | e

where  ( )  arg( X ( )) with -   ( )  


 | X ( ) | : is the magnitude spectrum
  ( ) : is the phase spectrum

Digital Signal Processing 10 Frequency analysis of signals and systems


 Example: Determine and sketch the spectra of the following signal:

a) x ( n )   ( n ) X ( w)    ( n )e  jwn  e  jw 0  1
n  
b) x ( n )  a n u ( n ) with |a|<1
   n

 
1
 a u ( n )e  a e   ae
 jwn  jwn  jw
X ( w)  
n n
 jw
n   n0 n0 1  ae
 X ( ) is periodic with period 2π.
 

 
 j (  2 k ) n  j n
X (  2  k )  x (n )e  x (n )e  X ( )
n   n  

The frequency range for discrete-time signal is unique over the


frequency interval (-π, π), or equivalently, (0, 2π).
 Remarks: Spectrum of discrete-time signals is continuous and
periodic.
Digital Signal Processing 11 Frequency analysis of signals and systems
Inverse discrete-time Fourier transform (IDTFT)

 Given the frequency spectrum X ( ) , we can find the x(n) in time-


domain as

1 j n
x(n) 
2  X ( ) e d


which is known as inverse-discrete-time Fourier transform (IDTFT)

Example: Consider the ideal lowpass filter with cutoff frequency wc. Find the
impulse response h(n) of the filter.

Digital Signal Processing 12 Frequency analysis of signals and systems


Properties of DTFT

 Symmetry: if the signal x(n) is real, it easily follows that



X ( )  X (  )

or equivalently, | X (  ) || X ( ) | (even symmetry)


arg( X (  ))   arg( X ( )) (odd symmetry)

We conclude that the frequency range of real discrete-time signals can


be limited further to the range 0 ≤ ω≤π, or 0 ≤ f≤fs/2.
 Energy density of spectrum: the energy relation between x(n) and
X(ω) is given by Parseval’s relation:
 
1
 | x(n) | 
2
Ex   X ( ) d 
2

n   2 

S xx ( ) | X ( ) | is called the energy density spectrum of x(n)


2

Digital Signal Processing 14 Frequency analysis of signals and systems


Properties of DTFT

 The relationship of DTFT and z-transform: if X(z) converges for


|z|=1, then 


 j n
X ( z ) | z  e j  x ( n )e  X ( )
n  

 Linearity: if x1 ( n )  X 1 ( )
F

x2 ( n )  X 2 ( )
F

then a1 x1 ( n )  a2 x2 ( n )  a1 X 1 ( )  a2 X 2 ( )
F

 Time-shifting: if x ( n )  X ( )
F

 j k
then x ( n  k )  e X ( )
F

Digital Signal Processing 15 Frequency analysis of signals and systems


Properties of DTFT

 Time reversal: if x ( n )   X ( )
F

then x (  n )  X (  )
F

 Convolution theory: if x1 ( n )   X 1 ( )
F

x2 ( n )  X 2 ( )
F

then x ( n )  x1 ( n )  x2 ( n )  X ( )  X 1 ( ) X 2 ( )
F

Example: Using DTFT to calculate the convolution of the sequences


x(n)=[1 2 3] and h(n)=[1 0 1].

Digital Signal Processing 16 Frequency analysis of signals and systems


Frequency resolution and windowing

 The rectangular window of length  The duration of the data


L is defined as: record is:

Digital Signal Processing 17 Frequency analysis of signals and systems


Rectangular window

Rectangular window width

It is defined through

Frequency resolution limits of the windowed spectrum

Digital Signal Processing 18 Frequency analysis of signals and systems


Impact of rectangular window

 Consider a single analog complex sinusoid of frequency f1 and its


sample version:

Where The spectrum of the analog signal x(t) is the


Fourier transform:

 With assumption , we have


the spectrum of the signal x(n)

Digital Signal Processing 19 Frequency analysis of signals and systems


Double sinusoids
 when x(t) is a linear combination of two complex sinusoids:

 Frequency resolution:

 Minimum number of samples

Digital Signal Processing 20 Frequency analysis of signals and systems


Hamming window

Digital Signal Processing 21 Frequency analysis of signals and systems


Non-rectangular window

 The standard technique for suppressing the sidelobes is to use a


non-rectangular window, for example Hamming window.
 The main tradeoff for using non-rectangular window is that its
mainlobe becomes wider and shorter, thus, reducing the frequency
resolution of the windowed spectrum.
 The minimum resolvable frequency difference will be

Where c ≥ 1: c=1 for rectangular window and c=2 for Hamming


window.

Digital Signal Processing 22 Frequency analysis of signals and systems


Rectangular and Hamming

Digital Signal Processing 23 Frequency analysis of signals and systems


Example 1

 A signal consisting of four sinusoids of frequencies of 1, 1.5, 2.5,


and 2.75 kHz is sampled at a rate of 10 kHz. What is the minimum
number of samples that should be collected for the frequency
spectrum to exhibit four distinct peaks at these frequencies? How
many samples should be collected if they are going to be
preprocessed by a Hamming window and then Fourier
transformed?

Digital Signal Processing 24 Frequency analysis of signals and systems


Example 1

 The smallest frequency separation that must be resolved is Δf =


2.75 − 2.5 = 0.25 kHz. For rectangular window, we get:

 Because the mainlobe width of the Hamming window is twice as


wide (c = 2) as that of the rectangular window, it follows that twice
as many samples must be collected, that is, L = 80 samples.

Digital Signal Processing 25 Frequency analysis of signals and systems


Example 2

 The following analog signal consisting of three equal-strength


sinusoids at frequencies

where t (ms), is sampled at a rate of 10 kHz. We consider four


data records of L=10, 20, 40, and 100 samples. They
corresponding of the time duarations of 1, 2, 4, and 10 msec.

Digital Signal Processing 26 Frequency analysis of signals and systems


Example 2

The minimum frequency separation is


Applying the formulation:

The minimum length L to resolve all threesinusoids show be L =


20 samples for the rectangular window, and L = 40 samples for the
Hamming case.

Digital Signal Processing 27 Frequency analysis of signals and systems


Example 2

Digital Signal Processing 28 Frequency analysis of signals and systems


Example 2

Digital Signal Processing 29 Frequency analysis of signals and systems


2. Discrete Fourier transform (DFT)

 X ( ) is a continuous function of frequency and therefore, it is not a


computationally convenient representation of the sequence x(n).
 DFT will present x(n) in a frequency-domain by samples of its
spectrum X ( ) .
 A finite-duration sequence x(n) of length L has a Fourier transform:
L 1

 x ( n )e
 j n
X ( )  0    2
n0
2𝜋
Sampling X(ω) at equally spaced frequency , k=0, 1,…,N-1 𝜔𝑘 =
𝑁
𝑘

where N ≥ L, we obtain N-point DFT of length L-signal:


2 k L 1


 j 2  kn / N
X (k )  X ( ) x ( n )e (N-point DFT)
N n0

 DFT presents the discrete-frequency samples of spectra of discrete-


time signals.
Digital Signal Processing 30 Frequency analysis of signals and systems
Example 1

Let x(n)=[1+2j,-2+2j,1-2j,-2-2j]. X(w) is Fourier


transfer of x(n). Find:
a. X(0)
b. X(π)

L 1

 x ( n )e
 j n
X ( )  0    2
n0

Digital Signal Processing 31 Frequency analysis of signals and systems


Example 2

Let x(n)=[0,1,2,3].
a. Calculate 4-DFT.
b. Calculate 8-DFT

L 1


 j n
X ( )  x ( n )e 0    2
n0

2 k L 1

 x ( n )e
 j 2  kn / N
X (k )  X ( )
N n0

Digital Signal Processing 32 Frequency analysis of signals and systems


2. Discrete Fourier transform (DFT)

2 k L 1


 j 2  kn / N
X (k )  X ( ) x ( n )e (DFT)
N n0

 With the assumption x(n)=0 for n ≥ N, we can write


N 1

 x ( n )e
 j 2  kn / N
X (k )  , k  0,1, , N  1. (DFT)
n0

 The sequence x(n) can recover form the frequency samples by inverse
DFT (IDFT)
1 (IDFT)
 k  0 X k e
N 1 j 2  kn / N
x(n)  , n  0 ,1,..., N  1
N

Example: Calculate 4-DFT and plot the spectrum of x(n)=[1, 0, 2, 1]


Example: Calculate 4-IDFT of X(k)=[10,-2+2j,-2,-2-2j]

Digital Signal Processing 33 Frequency analysis of signals and systems


Matrix form of DFT

 By defining an Nth root of unity W N  e  j 2 / N , we can rewritte DFT


and IDFT as follows
N 1
X (k )   x ( n )W , k  0,1, , N  1. (DFT)
kn
N
n0

Example: Calculate 4-DFT of x(n)=[x(0), x(1), x(2), x(3)] and convert to


matrix form.

Digital Signal Processing 34 Frequency analysis of signals and systems


Matrix form of DFT

 By defining an Nth root of unity W N  e  j 2 / N , we can rewritte DFT


and IDFT as follows
N 1
X (k )   x ( n )W , k  0,1, , N  1. (DFT)
kn
N
n0

N 1
1

 kn
x(n)  X ( k )W N , n  0,1, , N  1. (IDFT)
N n0

 Let us define:  x (0)   X (0) 


   
x (1) X (1)
xN   XN  
   
   
 x ( N  1)   X ( N  1) 

The N-point DFT can be expressed in matrix form as: X N  WN x N

Digital Signal Processing 35 Frequency analysis of signals and systems


Matrix form of DFT

1 1 1 1 
 2 N 1 
1 WN WN WN
 
2 ( N 1)
W N  1 W N 
2 4
WN WN
 
 
1 W NN 1 WN
2 ( N 1)
WN
( N 1)( N 1)


 Let us define:  x (0)   X (0) 


   
x (1) X (1)
xN   XN  
   
   
 x ( N  1)   X ( N  1) 

The N-point DFT can be expressed in matrix form as: X N  WN x N

Digital Signal Processing 36 Frequency analysis of signals and systems


Matrix form of DFT

For L = N and N = 2, 4, 8, we have:

Digital Signal Processing 37 Frequency analysis of signals and systems


Example

 Determine the DFT of the four-point sequence x(n)=[1, 1, 1, 1] using matrix


form.

Digital Signal Processing 38 Frequency analysis of signals and systems


Example

 Determine the 8-DFT of sequence x(n)=[1,0,1,0,1,0,1,0].

Digital Signal Processing 39 Frequency analysis of signals and systems


Properties of DFT

Properties Time domain Frequency domain


 Notation x(n) X (k )

 Periodicity x(n  N )  x (n) X (k )  X (k  N )

 Linearity a1 x1 ( n )  a2 x2 ( n ) a1 X 1 ( k )  a2 X 2 ( k )

 j 2  kl / N
 Circular time-shift x (( n  l )) N e X (k )
N N 1
1
 Parveval’s theorem Ex   | x(n) |  
2 2
| X (k ) |
n0 N k 0

Digital Signal Processing 40 Frequency analysis of signals and systems


Properties of DFT

X ( N  k )  X (k )
*

Given the first 5 samples of 8-DFT of real value x(n) are:


[0.25, 0.707-j0.707, 0, 0.707 + j0.707,0]
Calculate the value of the remaining 3 samples.

Digital Signal Processing 41 Frequency analysis of signals and systems


4. Fast Fourier transform (FFT)

 N-point DFT of the sequence of data x(n) of length N is given by


following formula:
𝑁−1

𝑋(𝑘) = 𝑥 𝑛 𝑊𝑁𝑛𝑘 , 𝑘 = 0,1,2, . . . , 𝑁 − 1


𝑛=0

 j 2 / N
where W N  e
 In general, the data sequence x(n) is also assumed to be complex
valued. To calculate all N values of DFT require N2 complex
multiplications and N(N-1) complex additions.
 FFT exploits the symmetry and periodicity properties of the phase
factor WN to reduce the computational complexity.
k N /2
 W N
k
- Symmetry: WN
kN
- Periodicity:  WN
k
WN
Digital Signal Processing 47 Frequency analysis of signals and systems
3. Fast Fourier transform (FFT)

𝑁−1

𝑋(𝑘) = 𝑥 𝑛 𝑊𝑁𝑛𝑘 , 𝑘 = 0,1,2, . . . , 𝑁 − 1


𝑛=0

 First we split the computation between odd and even samples:


𝑁/2−1 𝑁/2−1
𝑘(2𝑛+1)
𝑋𝑘 = 𝑥(2𝑛) W𝑁𝑘2𝑛 + 𝑥(2𝑛 + 1) W𝑁
𝑛=0 𝑛=0

 Using the following property: W N  W N


2

2
 The N-point DFT can be rewritten:
𝑁/2−1 𝑁/2−1

𝑋𝑘 = 𝑥(2𝑛) WN𝑘𝑛 + W𝑁𝑘 𝑥(2𝑛 + 1) WN𝑘𝑛


𝑛=0 2 𝑛=0 2

for k=0, 1, …, N-1


Digital Signal Processing 48 Frequency analysis of signals and systems
Fast Fourier transform (FFT)

 Using properties that:


N
k
kN
  WN  WN
2 k k
WN WN
 The entire DFT can be computed with only k=0, 1, …,N/2-1.
𝑁/2−1 𝑁/2−1

𝑋𝑘 = 𝑥(2𝑛) W𝑁𝑘𝑛 + W𝑁𝑘 𝑥(2𝑛 + 1) W𝑁𝑘𝑛


𝑛=0 2 𝑛=0 2

𝑁/2−1 𝑁/2−1
𝑁
𝑋 𝑘+ = 𝑥(2𝑛) W𝑁𝑘𝑛 − W𝑁𝑘 𝑥(2𝑛 + 1) W𝑁𝑘𝑛
2 2 2
𝑛=0 𝑛=0

Digital Signal Processing 49 Frequency analysis of signals and systems


Butterfly
𝑁/2−1 𝑁/2−1

𝑋𝑘 = 𝑥(2𝑛) W𝑁𝑘𝑛 + W𝑁𝑘 𝑥(2𝑛 + 1) W𝑁𝑘𝑛


𝑛=0 2 𝑛=0 2

𝑁/2−1 𝑁/2−1
𝑁
𝑋 𝑘+ = 𝑥(2𝑛) W𝑁𝑘𝑛 − W𝑁𝑘 𝑥(2𝑛 + 1) W𝑁𝑘𝑛
2 2 2
𝑛=0 𝑛=0

 Let x(n) = [x(0), x(1)]. 2-FFT of x(n) is:


𝑋 0 = 𝑥 0 𝑊20 + 𝑥 1 𝑊20 = 𝑥 0 𝑊10 + 𝑊20 𝑥 1 𝑊10 = 𝑥 0 + 𝑥(1)
2
𝑋 1 = 𝑋 0 + 2 = 𝑥 0 𝑊20 + 𝑥 1 𝑊21 = 𝑥 0 𝑊10 − 𝑊20 𝑥 1 𝑊10 = 𝑥 0 − 𝑥(1)

(Note: W2 = -1)

2-FFT
(Butterfly)
𝑊20

Digital Signal Processing 50 Frequency analysis of signals and systems


Butterfly
𝑁/2−1 𝑁/2−1 𝑁/2−1 𝑁/2−1
𝑁
𝑋𝑘 = 𝑥(2𝑛) W𝑁𝑘𝑛 + W𝑁𝑘 𝑥(2𝑛 + 1) W𝑁𝑘𝑛 𝑋 𝑘+ = 𝑥(2𝑛) W𝑁𝑘𝑛 − W𝑁𝑘 𝑥(2𝑛 + 1) W𝑁𝑘𝑛
2 2 2
𝑛=0 2 𝑛=0 2 𝑛=0 𝑛=0

 Let x(n) = [x(0), x(1), x(2), x(3)]. 4-FFT of x(n) is:


𝐹 0 𝐹 2

𝑋 0 = 𝑥 0 𝑊20 + 𝑥 2 𝑊20 + 𝑊40 𝑥 1 𝑊20 + 𝑥(3)𝑊20 = 𝒙 𝟎 + 𝑾𝟎𝟐 𝒙 𝟐 + 𝑊40 𝒙 𝟏 + 𝑾𝟎𝟐 𝒙(𝟑)


𝐹 1 𝐹 3

𝑋 1 = 𝑥 0 𝑊20 + 𝑥 2 𝑊21 + 𝑊41 𝑥 1 𝑊20 + 𝑥(3)𝑊21 = 𝒙 𝟎 − 𝑾𝟎𝟐 𝒙 𝟐 + 𝑊41 𝒙 𝟏 − 𝑾𝟎𝟐 𝒙(𝟑)


𝑋 2 = 𝑋 0 + 2 = 𝑥 0 𝑊20 + 𝑥 2 𝑊20 − 𝑊40 𝑥 1 𝑊20 + 𝑥 3 𝑊20 = 𝒙 𝟎 + 𝑾𝟎𝟐 𝒙 𝟐 − 𝑊40 𝒙 𝟏 + 𝑾𝟎𝟐 𝒙(𝟑)
𝑋 3 = 𝑋 1 + 2 = 𝑥 0 𝑊20 + 𝑥 2 𝑊21 − 𝑊41 𝑥 1 𝑊20 + 𝑥 3 𝑊21 = 𝒙 𝟎 − 𝑾𝟎𝟐 𝒙 𝟐 − 𝑊41 𝒙 𝟏 − 𝑾𝟎𝟐 𝒙(𝟑)
𝑭 𝟎
𝑥 0 𝑋 0
𝑊20 𝑭 𝟏
𝑥 2 - 𝑋 1
(Butterfly)
𝑭 𝟐 𝑊40
𝑥 1 - 𝑋 2
𝑊20 𝑭 𝟑 𝑊41
𝑥 3 - - 𝑋 3
Digital Signal Processing 51 Frequency analysis of signals and systems
Butterfly
4-FFT
2-FFT
𝐹 0
𝑥 0 𝑋 0
𝑊20 𝐹 1
𝑥 2 - 𝑋 1
𝑊20
𝐹 2 𝑊40
𝑥 1 - 𝑋 2
𝑊20 𝐹 3 𝑊41
𝑥 3 - - 𝑋 3

𝐹 0
𝑥 0 𝑋 0
2-FFT 𝐹 1
𝑥 2 𝑋 1
𝐹 2 𝑊40
𝑥 1 - 𝑋 2
2-FFT 𝑊41
𝑥 3 𝐹 3
- 𝑋 3

Digital Signal Processing 52 Frequency analysis of signals and systems


Butterfly

 This leads to basic building block of the N-FFT, the butterfly.

x(0) X(0)
x(2) X(1)

DFT N/2

x(N-2) X(N/2-1)

x(1) WN0 X(N/2)


WN1 -
x(3) X(N/2+1)
-
DFT N/2

WNN/2-1
x(N-1) X(N-1)
-

Digital Signal Processing 53 Frequency analysis of signals and systems


Recursion
 If N/2 is even, we can further split the computation of each DFT of
size N/2 into two computations of half size DFT. When N=2r this
can be done until DFT of size 2 (i.e. butterfly with two elements).
3rd stage 2nd stage 1st stage
x(0) X(0)
W 20
x(4) - X(1)
W 40
x(2) - X(2)
W 20 W 41
x(6) - - X(3)
W 80
x(1) - X(4)
W80=1 W 20 W 81
x(5) - - X(5)
W 40 W 82
x(3) - - X(6)
W 20 W 41 W 83
x(7) - - - X(7)

Digital Signal Processing 54 Frequency analysis of signals and systems


Shuffling the data, bit reverse ordering

 At each step of the algorithm, data are split between even and odd
values. This results in scrambling the order.

Digital Signal Processing 55 Frequency analysis of signals and systems


Example

 Calculate 4-point FFT of x=[1, 3, 2, 3] ?

Digital Signal Processing 56 Frequency analysis of signals and systems


Example

 Calculate 4-point FFT of x=[1, 3, 2, 3] ?


𝑊20 = 𝑊40 = 1
𝑊41 = −𝑗

𝐹 0
𝑥 0 𝑋 0
𝑊20 𝐹 1
𝑥 2 - 𝑋 1
(Butterfly)
𝐹 2 𝑊40
𝑥 1 - 𝑋 2
𝑊20 𝐹 3 𝑊41
𝑥 3 - - 𝑋 3

Digital Signal Processing 57 Frequency analysis of signals and systems


Example

 Determine the 8-FFT of sequence x(n)=[1,0,2,0,3,0,4,0].

Digital Signal Processing 58 Frequency analysis of signals and systems


Butterfly

Cách thực hiện FFT: giả sử ta cần tính DFT 8 điểm:


x(0) X(0)

x(2) X(1)

x(4) X(2)

x(6) 8-point X(3)

x(1) DFT X(4)

x(3) X(5)

x(5) X(6)

x(7) X(7)

Digital Signal Processing 59 Frequency analysis of signals and systems


Butterfly

Chia khối DFT 8 điểm thành 2 khối DFT 4 điểm:


F1(0)
x(0) X(0)
F1(1) W80
x(2) 4-point W81
X(1)
F1(2)
x(4) DFT W82
X(2)
F1(3)
x(6) X(3)
W83
F2(0)
x(1) X(4)
W84
F2(1)
x(3)
4-point W85
X(5)
F2(2)
x(5)
DFT W86
X(6)
F2(3)
x(7) X(7)
W87

Digital Signal Processing 60 Frequency analysis of signals and systems


Butterfly

Chia khối DFT 4 điểm thành 2 khối DFT 2 điểm:


x(0) X(0)
2-point
W80 W80
DFT
x(4) X(1)
W82 W81
x(2) X(2)
2-point W84 W82
DFT
x(6) X(3)
W86 W83
x(1) X(4)
2-point W84
W80
DFT
x(5) 5
X(5)
W82 W8
x(3) X(6)
2-point W84 W86
DFT
x(7) X(7)
W86 W87

Digital Signal Processing 61 Frequency analysis of signals and systems


Butterfly

Tính các khối DFT 2 điểm


x(0) X(0)
W80 W80 W80
x(4) X(1)
W84
W82 W81
x(2) X(2)
W80 W84 W82
x(6) X(3)
W84
W86 W83
x(1) X(4)
W80 W80 W84

x(5) X(5)
W84 W82 W85

x(3) X(6)
W80 W84 W86

x(7) X(7)
W84 W86 W87

Digital Signal Processing 62 Frequency analysis of signals and systems


Butterfly

Do WNr+N/2=WNr và WNN/2=-WNr, ta rút gọn được:


x(0) X(0)
W80
x(4) X(1)
-1
W80
x(2) X(2)
-1
W80 W82
x(6) X(3)
-1 -1
W80
x(1) X(4)
-1
W80 W81
x(5) X(5)
-1 -1
W80 W82
x(3) X(6)
-1 -1
W80 W82 W83
x(7) X(7)
-1 -1 -1

Digital Signal Processing 63 Frequency analysis of signals and systems


Butterfly

Digital Signal Processing 64 Frequency analysis of signals and systems


Butterfly – Time domain

FFT 4 điểm
x0 X0

x1 X2
1
x2 X1
1 w 0
4

x3 1 X3
1 w1
4

Digital Signal Processing 65 Frequency analysis of signals and systems


Exercise 1

a) Tính toán DFT-4 điểm X(k) của tín hiệu x(n) = {1 ; 2 ; 1 ; 0}.
b) Xác định tín hiệu x(n) có biến đổi DFT 4 điểm là X(k)={8; 0; 4;
0} ?
c) Cho tín hiệu x1(n) = {a1 ; b1 ; c1 ; d1} có DFT-4 điểm X1(k) = {8
; -4j ; 0 ; 4j} và tín hiệu x2(n) = {a2 ; b2 ; c2 ; d2} có DFT-4 điểm
X2(k) = {-8 ; 0 ; -4 ; 0}. Tính toán DFT-8 điểm X(k) của tín hiệu
x(n) = {a1 ; a2 ; b1 ; b2 ; c1 ; c2 ; d1 ; d2}.

Digital Signal Processing 66 Frequency analysis of signals and systems


Exercise 2

Cho hệ thống rời rạc được đặc trưng bởi đáp ứng xung ℎ 𝑛 =
𝛿 𝑛 + 𝛿 n − 1 − 𝛿(𝑛 − 2).
Tín hiệu ở ngõ vào của hệ thống là 𝑥 𝑛 = −1 𝑛 𝑢 𝑛 −
−1 𝑛−2 𝑢(𝑛 − 2).
a. Tính biến đổi Fourier rời rạc (DFT) 4 điểm của x(n).
b. Tính biến đổi Fourier nhanh (FFT) 4 điểm của h(n).

Digital Signal Processing 68 Frequency analysis of signals and systems


Homework 1

a) Tính DFT-4 điểm của tín hiệu x(n) = {@, 1, 1, 2, 19, 11, 19, 11}.
b) Tính IDFT-4 điểm của tín hiệu X(k) = {@, 1 + j, 16, 1 – j}.
c) Vẽ sơ đồ thực hiện và tính FFT-4 điểm của tín hiệu x(n) = {@, 1
– j, 16, 1 + j}.
d) Vẽ 1 sơ đồ tổng quát thực hiện FFT-8 điểm.

Digital Signal Processing 69 Frequency analysis of signals and systems


Homework 2

a) Tính DFT-4 điểm của tín hiệu x(n) = {@, 2, 8}.


b) Vẽ sơ đồ thực hiện và tính FFT-4 điểm của tín hiệu x(n) = {@,
0, 1, 2}.
c) Xác định giá trị của A và B trong tín hiệu x(n) = {–20, –8, 1, 2,
A, B} để DFT-4 điểm của tín hiệu trên có dạng X(k) = {5, 1 +
j2, 1, 1 – j2}.

Digital Signal Processing 70 Frequency analysis of signals and systems


Homework 3

a) Tính DFT-4 điểm của tín hiệu x(n) = {@, 8, 0, 5, 4, 0, 4, 1}.


b) Xác định giá trị của A và B trong tín hiệu x(n) = {1, 2, 3, 4, 5, 6,
A, B} để DFT-4 điểm của tín hiệu trên có dạng X(k) = {12, 1 – j,
–2, 1 + j}.
c) Vẽ sơ đồ thực hiện và tính FFT-4 điểm của tín hiệu x(n) = {@, 8,
4, 6}.

Digital Signal Processing 71 Frequency analysis of signals and systems


Homework 4

a) Tính DFT-4 điểm của tín hiệu x(n) = {@, 2, 1, 0, 1, 1, 1}.


b) Xác định giá trị của A và B trong tín hiệu x(n) = {3, 1, 2, 0, A, B}
để DFT-4 điểm của tín hiệu trên có dạng X(k) = {9, 2 – j3, 3, 2 +
j3}.
c) Chứng minh và vẽ sơ đồ thực hiện tính DFT-4 điểm dựa trên các
DFT-2 điểm.
d) Chứng minh và vẽ sơ đồ thực hiện tính IDFT-4 điểm dựa trên
DFT-4 điểm.

Digital Signal Processing 72 Frequency analysis of signals and systems


Homework 5

Tính DFT-4 điểm: x = [4, -3, 2, 0, -1, -2, 3, 1]

Digital Signal Processing 73 Frequency analysis of signals and systems

You might also like