0% found this document useful (0 votes)
27 views539 pages

DSP

Uploaded by

donny8082003
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)
27 views539 pages

DSP

Uploaded by

donny8082003
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/ 539










































1.
2. π

3. ω π


Postulate (3)
ω π π π π π π
▪ π


π

















































π π




















































δ






















Transmitted Signal, x(n)

Reflected Signal,

Distance=‘d’

Tx
Rx

•ʋ

Transmitted Signal, x(n)

Reflected Signal,

Distance=‘d’

Tx
Rx
Transmitted Signal, x(n)

Reflected Signal,

Distance=‘d’

Tx
Rx
Transmitted Signal, x(n)

Reflected Signal,

Distance=‘d’

Tx
Rx


EE-394 Digital Signal Processing
TE (EE) Fall 2020
Resource Persons: Dr. Saad Ahmed Qazi
Nabeel Fayyaz
Muhammad Omar

1
Part-B

Frequency Analysis/Spectral
Analysis/Harmonic Analysis of
Signals

2
Frequency Analysis of Signals
Introduction

Analysis

Analysis means to decompose/disintegrate/de-synthesize any


physical phenomenon into its smaller(simpler) components or
modules to understand that phenomenon

Purpose of Analysis

• To observe
• To examine
• To investigate

3
Frequency Analysis of Signals
Introduction

Synthesis

Synthesis means to combine/to add/to integrate smaller


components to represent some complicated phenomenon

Purpose of Synthesis

To make or to produce something

4
Frequency Analysis of Signals
Example of Analysis and Synthesis

Splitting of white light into its component colors is an Analysis procedure

Addition of seven component colors to represent white light is a Synthesis procedure


Source: https://physics.stackexchange.com/q/228930

5
Frequency Analysis of Signals
Signal Analysis

• Splitting or decomposition of any real-world complicated (non


sinusoidal) signal into the simpler (sinusoidal) representation is
Signal Analysis

• Each sinusoidal component will be having its own unique


frequency

Purpose of Signal Analysis

• To represent/to extract information in the simplest possible


form
• To represent the information at the basic building block level

6
Frequency Analysis of Signals
Signal Analysis

7
Frequency Analysis of Signals
Signal Analysis

8
Frequency Analysis of Signals
Signal Analysis

9
Frequency Analysis of Signals
Signal Analysis

𝑥𝑥 𝑡𝑡 = 𝑏𝑏1 𝑠𝑠𝑠𝑠𝑠𝑠 𝜔𝜔𝜔𝜔 + 𝑎𝑎2 𝑐𝑐𝑐𝑐𝑐𝑐 2𝜔𝜔𝜔𝜔 + 𝑎𝑎3 𝑐𝑐𝑐𝑐𝑐𝑐 3𝜔𝜔𝜔𝜔

𝑥𝑥 𝑡𝑡 = 2 𝑠𝑠𝑠𝑠𝑠𝑠 2𝜋𝜋(1)𝑡𝑡 + 1 𝑐𝑐𝑐𝑐𝑐𝑐 2𝜋𝜋 2 𝑡𝑡 + 0.5𝑐𝑐𝑐𝑐𝑐𝑐 2𝜋𝜋 3 𝑡𝑡


10
Frequency Analysis of Signals
Signal Synthesis

Addition of different simple sine waves in various quantities (amplitudes)


to make a desired non sinusoidal wave

11
Frequency Analysis of Signals
Signal Synthesis

Addition of different simple sine waves in various quantities (amplitudes)


to make a desired non sinusoidal wave

12
Frequency Analysis of Signals
Signal Analysis Signal Synthesis

13
Frequency Analysis of Signals
Techniques for Signal Analysis

1) Discrete Fourier Transform [DFT]

2) Fast Fourier Transform [FFT]

14
Frequency Analysis of Signals

15
Frequency Analysis of Signals

Source: https://gist.github.com/amroamroamro

16
Frequency Analysis of Signals
Time and Frequency Domain Views of a complicated (non sinusoidal)
Signal

17
Frequency Analysis of Signals
Time and Frequency Domain Views of a complicated (non sinusoidal)
Signal

When we see a signal in time domain, we actually observe a composite signal.


Composite signal is a sum of its sinusoidal components which we are unable to see
directly.

In the three-dimensional view, when we look at a signal from the side view, each
component appears as a single vertical line (spike) at its own frequency.

This side view of the signal is called the Frequency Domain. Another name for this
view is the Signal Spectrum

The spectrum is a way to quantify the component frequencies. By quantify we


mean identifying the amplitude of each of the components

18
Frequency Analysis of Signals
Time and Frequency Domain Views of a complicated (non sinusoidal)
Signal

Source: https://commons.wikimedia.org/wiki/File:Fourier_transform_time_and_frequency_domains.gif

19
EE-394 Digital Signal Processing
TE (EE) Fall 2020
Resource Persons: Dr. Saad Ahmed Qazi
Nabeel Fayyaz
Muhammad Omar

1
Discrete Fourier Transform [DFT]

DFT is a technique which is used for


the frequency analysis of discrete
time signals

2
Continuous Time Fourier Transform [CTFT]
Analysis Equation

𝑋𝑋 𝐹𝐹 = � 𝑥𝑥 𝑡𝑡 𝑒𝑒 −𝑗𝑗𝑗𝑗𝑗𝑗𝑗𝑗𝑗 𝑑𝑑𝑑𝑑
−∞

𝑋𝑋 𝐹𝐹 = � 𝑥𝑥 𝑡𝑡 cos 2𝜋𝜋𝜋𝜋𝜋𝜋 − 𝑗𝑗 sin 2𝜋𝜋𝜋𝜋𝜋𝜋 𝑑𝑑𝑑𝑑


−∞

𝑡𝑡 ⤏ 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑠𝑠𝑠𝑠𝑠𝑠


F ⤏ 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝐻𝐻𝐻𝐻

𝑥𝑥 𝑡𝑡 ⤏ 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑖𝑖. 𝑒𝑒. 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠


𝑋𝑋 𝐹𝐹 ⤏ 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑖𝑖. 𝑒𝑒. 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠
𝑋𝑋 𝐹𝐹 ⤏ 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑖𝑖. 𝑒𝑒. 𝑏𝑏𝑏𝑏𝑏𝑏𝑏 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 𝑎𝑎𝑎𝑎𝑎𝑎 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 𝑓𝑓𝑓𝑓𝑓𝑓 𝑒𝑒𝑒𝑒𝑒𝑒𝑒 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓

𝑒𝑒 −𝑗𝑗𝑗𝑗𝑗𝑗𝑗𝑗𝑗 ⤏ 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 𝑜𝑜𝑜𝑜 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠

𝑒𝑒 −𝑗𝑗𝜔𝜔𝜔𝜔 = 𝑐𝑐𝑐𝑐𝑐𝑐 𝜔𝜔𝑡𝑡 − 𝑗𝑗 𝑠𝑠𝑠𝑠𝑠𝑠 𝜔𝜔𝜔𝜔


𝑒𝑒 −𝑗𝑗𝑗𝜋𝜋𝜋𝜋𝜋𝜋 = 𝑐𝑐𝑐𝑐𝑐𝑐 2𝜋𝜋𝜋𝜋𝜋𝜋 − 𝑗𝑗 𝑠𝑠𝑠𝑠𝑠𝑠 2𝜋𝜋𝜋𝜋𝜋𝜋

3
Discrete Fourier Transform [DFT]
Analysis Equation
𝑁𝑁−1
𝑘𝑘
−𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁
𝑛𝑛=0

𝑁𝑁−1
𝑘𝑘 𝑘𝑘
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 [ cos 2𝜋𝜋 𝑛𝑛 − 𝑗𝑗 sin 2𝜋𝜋 𝑛𝑛 ]
𝑁𝑁 𝑁𝑁
𝑛𝑛=0

𝑁𝑁 ⤏ 𝑡𝑡𝑡𝑡𝑡 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑜𝑜𝑜𝑜 𝑡𝑡𝑡𝑡𝑡 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑎𝑎𝑎𝑎𝑎𝑎 𝑡𝑡𝑡𝑡𝑡 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑖𝑖𝑖𝑖 𝑡𝑡𝑡𝑡𝑡 𝐷𝐷𝐷𝐷𝐷𝐷 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜

𝑛𝑛 ⤏ 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 𝑜𝑜𝑜𝑜 𝑡𝑡𝑡𝑡𝑡 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠


𝑛𝑛 = 0, 1, 2, 3, … … . . , 𝑁𝑁 − 1
𝑥𝑥 𝑛𝑛 ⤏ 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑜𝑜𝑜𝑜 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑖𝑖. 𝑒𝑒. 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠

k ⤏ 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 𝑜𝑜𝑜𝑜 𝑡𝑡𝑡𝑡𝑡 𝐷𝐷𝐷𝐷𝐷𝐷 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 𝑖𝑖𝑖𝑖 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑


𝑘𝑘 = 0, 1, 2, 3, … … . . , 𝑁𝑁 − 1
𝑋𝑋 𝑘𝑘 ⤏ 𝑡𝑡𝑡𝑡𝑡 𝑘𝑘𝑘𝑘𝑘 𝐷𝐷𝐷𝐷𝐷𝐷 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑖𝑖. 𝑒𝑒. 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠

𝑘𝑘 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
⤏ 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑜𝑜𝑜𝑜 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑜𝑜𝑜𝑜 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑜𝑜𝑜𝑜 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒
𝑁𝑁 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠
𝑘𝑘
𝑒𝑒 −𝑗𝑗𝑗𝜋𝜋𝑁𝑁𝑛𝑛 ⤏ 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 𝑜𝑜𝑜𝑜 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠

4
Discrete Fourier Transform [DFT]
Analysis Equation

𝑁𝑁−1
𝑘𝑘
−𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁
𝑛𝑛=0

𝑁𝑁−1
𝑘𝑘 𝑘𝑘
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 [ cos 2𝜋𝜋 𝑛𝑛 − 𝑗𝑗 sin 2𝜋𝜋 𝑛𝑛 ]
𝑁𝑁 𝑁𝑁
𝑛𝑛=0

Each DFT output term 𝑋𝑋 𝑘𝑘 is the sum of the term-by-term products of an input
time domain sequence with sequences representing a discrete sine and cosine
wave

The frequency of discrete sine and cosine waves keeps changing on updating the
value of ‘k’

5
Discrete Fourier Transform [DFT]
Analysis Equation
𝑁𝑁−1
𝑘𝑘
−𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁
𝑛𝑛=0
𝑘𝑘 = 0, 1, 2, . . . , 𝑁𝑁 − 1

Synthesis Equation
𝑁𝑁−1
1 𝑘𝑘
+𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑥𝑥 𝑛𝑛 = � 𝑋𝑋 𝑘𝑘 𝑒𝑒 𝑁𝑁
𝑁𝑁
𝑘𝑘=0
𝑛𝑛 = 0, 1, 2, . . . , 𝑁𝑁 − 1

6
Discrete Fourier Transform [DFT]

When no scaling factor 1⁄𝑁𝑁 is used:

𝐷𝐷𝐹𝐹𝐹𝐹 𝐼𝐼𝐷𝐷𝐷𝐷𝐷𝐷
𝑥𝑥 𝑛𝑛 𝑋𝑋 𝑘𝑘 𝑥𝑥 𝑛𝑛

When scaling factor 1⁄𝑁𝑁 is used:

𝐼𝐼𝐷𝐷𝐷𝐷𝐷𝐷
𝑤𝑤𝑤𝑤𝑤𝑤𝑤
𝐷𝐷𝐹𝐹𝐹𝐹 1/𝑁𝑁
𝑥𝑥 𝑛𝑛 𝑋𝑋 𝑘𝑘 𝑥𝑥 𝑛𝑛

7
Discrete Fourier Transform [DFT]
Analysis Equation
𝑁𝑁−1
1 𝑘𝑘
−𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁
𝑁𝑁
𝑛𝑛=0
𝑘𝑘 = 0, 1, 2, . . . , 𝑁𝑁 − 1

Synthesis Equation
𝑁𝑁−1
𝑘𝑘
+𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑥𝑥 𝑛𝑛 = � 𝑋𝑋 𝑘𝑘 𝑒𝑒 𝑁𝑁
𝑘𝑘=0
𝑛𝑛 = 0, 1, 2, . . . , 𝑁𝑁 − 1

8
Discrete Fourier Transform [DFT]

When no scaling factor 1⁄𝑁𝑁 is used:

𝐷𝐷𝐹𝐹𝐹𝐹 𝐼𝐼𝐷𝐷𝐷𝐷𝐷𝐷
𝑥𝑥 𝑛𝑛 𝑋𝑋 𝑘𝑘 𝑥𝑥 𝑛𝑛

When scaling factor 1⁄𝑁𝑁 is used:

𝐷𝐷𝐹𝐹𝐹𝐹
𝑤𝑤𝑤𝑤𝑤𝑤𝑤
1/𝑁𝑁 𝐼𝐼𝐷𝐷𝐷𝐷𝐷𝐷
𝑥𝑥 𝑛𝑛 𝑋𝑋 𝑘𝑘 𝑥𝑥 𝑛𝑛

9
Discrete Fourier Transform [DFT]
Analysis Equation
𝑁𝑁−1
1 𝑘𝑘
−𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁
𝑁𝑁 𝑛𝑛=0
𝑘𝑘 = 0, 1, 2, . . . , 𝑁𝑁 − 1

Synthesis Equation
𝑁𝑁−1
1 𝑘𝑘
+𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑥𝑥 𝑛𝑛 = � 𝑋𝑋 𝑘𝑘 𝑒𝑒 𝑁𝑁
𝑁𝑁 𝑘𝑘=0
𝑛𝑛 = 0, 1, 2, . . . , 𝑁𝑁 − 1

10
Discrete Fourier Transform [DFT]
When no scaling factor 1⁄𝑁𝑁 is used:

𝐷𝐷𝐹𝐹𝐹𝐹 𝐼𝐼𝐷𝐷𝐷𝐷𝐷𝐷
𝑥𝑥 𝑛𝑛 𝑋𝑋 𝑘𝑘 𝑥𝑥 𝑛𝑛

When scaling factor 1⁄𝑁𝑁 is used:

𝐷𝐷𝐹𝐹𝐹𝐹 𝐼𝐼𝐷𝐷𝐹𝐹𝐹𝐹
𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑤𝑤𝑤𝑤𝑤𝑤𝑤
1/ 𝑁𝑁 1/ 𝑁𝑁
𝑥𝑥 𝑛𝑛 𝑋𝑋 𝑘𝑘 𝑥𝑥 𝑛𝑛

11
Discrete Fourier Transform [DFT]
Note

When we analyze signal’s spectra in practice, we are normally more interested in


the relative magnitudes rather than absolute magnitudes of the individual DFT
outputs, so scaling factors aren’t usually that important to us in that case

Suppose the magnitude of 8 point DFT output is given as:

𝑋𝑋 𝑘𝑘 = 8, 4, 2, 0, 0, 0, 2, 4

To find actual or absolute magnitudes, divide by ‘N’

1
𝑋𝑋 𝑘𝑘 = 8, 4, 2, 0, 0, 0, 2, 4
𝑁𝑁

1
𝑋𝑋 𝑘𝑘 = 8, 4, 2, 0, 0, 0, 2, 4
8

𝑋𝑋 𝑘𝑘 = 1, 0.5, 0.25, 0, 0, 0, 0.25, 0.5

12
Discrete Fourier Transform [DFT]
Note
Discrete Fourier Transform (DFT) is one of the most powerful tools in digital
signal processing; it enables us to find the spectrum of a finite-duration discrete-
time signal 𝑥𝑥(𝑛𝑛)

DFT finds out the frequency domain amplitudes and phases of ‘N’ complex
exponentials (containing both sine and cosine components) present in a discrete-
time signal of length ‘N’ samples

The input given to DFT should be of finite length no matter whether it is taken
from some periodic signal or non-periodic signal

We can use DFT for the analysis of both periodic and non-periodic signals

DFT never cares about the signal periodicity. It simply treats all signals as the time
limited or finite length sequence which corresponds to our signal of
interest/region of interest denoted by ‘N’

13
Discrete Fourier Transform [DFT]
Proof

Prove that the output of DFT ‘𝑋𝑋 𝑘𝑘 ’ (i.e. spectrum of


discrete time signal) will repeat after ‘N’ samples where ‘N’
represents the length of DFT

i.e. 𝑋𝑋 𝑘𝑘 + 𝑁𝑁 = 𝑋𝑋 𝑘𝑘

14
Discrete Fourier Transform [DFT]
Proof
Analysis Equation
𝑁𝑁−1
𝑘𝑘
−𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁
𝑛𝑛=0

Replace ‘k’ by ‘k+N’

𝑁𝑁−1
(𝑘𝑘+𝑁𝑁)
−𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 + 𝑁𝑁 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁
𝑛𝑛=0

𝑁𝑁−1
𝑘𝑘
−𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 + 𝑁𝑁 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁 𝑒𝑒 −𝑗𝑗𝑗𝜋𝜋𝑛𝑛
𝑛𝑛=0

15
Discrete Fourier Transform [DFT]
Proof
𝑁𝑁−1
𝑘𝑘
−𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 + 𝑁𝑁 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁 𝑒𝑒 −𝑗𝑗𝑗𝜋𝜋𝑛𝑛
𝑛𝑛=0

𝑒𝑒 −𝑗𝑗𝑗𝜋𝜋𝑛𝑛 = cos 2𝜋𝜋𝑛𝑛 − 𝑗𝑗 sin 2𝜋𝜋𝑛𝑛


𝑒𝑒 −𝑗𝑗𝑗𝜋𝜋𝑛𝑛 = 1 − 𝑗𝑗𝑗
𝑒𝑒 −𝑗𝑗𝑗𝜋𝜋𝑛𝑛 = 1
𝑁𝑁−1
𝑘𝑘
−𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 + 𝑁𝑁 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁 (1)
𝑛𝑛=0

𝑁𝑁−1
𝑘𝑘
−𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 + 𝑁𝑁 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁
𝑛𝑛=0

𝑋𝑋 𝑘𝑘 + 𝑁𝑁 = 𝑋𝑋 𝑘𝑘

16
Discrete Fourier Transform [DFT]
Proof

𝑋𝑋 𝑘𝑘 + 𝑁𝑁 = 𝑋𝑋 𝑘𝑘

It shows that the DFT output ‘𝑋𝑋 𝑘𝑘 ’ will repeat after every ‘N’ samples

For example 𝑁𝑁 = 4, we can compute 𝑋𝑋 0 , 𝑋𝑋 1 , 𝑋𝑋 2 and 𝑋𝑋 3 to get four


frequency domain outputs

𝑋𝑋 4 = 𝑋𝑋 0+4 = 𝑋𝑋 0
𝑋𝑋 5 = 𝑋𝑋 1+4 = 𝑋𝑋 1
𝑋𝑋 6 = 𝑋𝑋 2+4 = 𝑋𝑋 2
𝑋𝑋 7 = 𝑋𝑋 3+4 = 𝑋𝑋 3

17
EE-394 Digital Signal Processing
TE (EE) Fall 2020
Resource Persons: Dr. Saad Ahmed Qazi
Nabeel Fayyaz
Muhammad Omar

1
Discrete Fourier Transform [DFT]
Lecture Objectives

• DFT Frequency axis

• Frequency resolution (∆𝐹𝐹)

• Example of DFT

• Example of IDFT

• Significance of ‘𝐹𝐹𝑠𝑠 ’ and ‘N ’

2
Discrete Fourier Transform [DFT]
DFT Frequency axis
DFT converts a time domain sequence of ‘N ’ samples into ‘N ’ equally spaced
frequency domain samples (harmonic components)

The ‘N’ frequency domain samples represent discrete frequencies of complex


sinusoids i.e. 𝑘𝑘⁄𝑁𝑁 that are integer multiples of the fundamental frequency which
means 𝑘𝑘 ∗ 1⁄𝑁𝑁
𝑘𝑘 = 0, 1, 2, 3, … … . . , 𝑁𝑁 − 1
Divide by ‘N’ on both sides
𝑘𝑘 0 1 2 3 𝑁𝑁 − 1 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
= , , , ……..,
𝑁𝑁 𝑁𝑁 𝑁𝑁 𝑁𝑁 𝑁𝑁 𝑁𝑁 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠
Multiply by ‘𝐹𝐹𝑠𝑠 ’ on both sides
𝑘𝑘𝐹𝐹𝑠𝑠 0𝐹𝐹𝑠𝑠 1𝐹𝐹𝑠𝑠 2𝐹𝐹𝑠𝑠 3𝐹𝐹𝑠𝑠 𝑁𝑁 − 1 𝐹𝐹𝑠𝑠 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
= , , , …….., 𝑜𝑜𝑜𝑜 𝐻𝐻𝐻𝐻
𝑁𝑁 𝑁𝑁 𝑁𝑁 𝑁𝑁 𝑁𝑁 𝑁𝑁 𝑠𝑠𝑠𝑠𝑠𝑠

The exact frequencies ‘Hz’ of the DFT output depend on both the sampling rate ‘𝐹𝐹𝑠𝑠 ’
at which the original signal was sampled and the number of samples ‘N ’
3
Discrete Fourier Transform [DFT]
Frequency resolution (∆𝐹𝐹)

The difference or spacing between two consecutive spectral components in the


DFT output

1 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
∆𝐹𝐹 = Unit:
𝑁𝑁 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠

𝐹𝐹𝑠𝑠
∆𝐹𝐹 = Unit: Hz
𝑁𝑁

4
Discrete Fourier Transform [DFT]
Frequency resolution (∆𝐹𝐹)

𝐹𝐹𝑠𝑠
∆𝐹𝐹 =
𝑁𝑁

𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠⁄𝑠𝑠𝑠𝑠𝑠𝑠
∆𝐹𝐹 =
𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠

1
∆𝐹𝐹 =
𝑠𝑠𝑠𝑠𝑠𝑠

∆𝐹𝐹 = 𝐻𝐻𝐻𝐻
Bin frequencies/Analysis frequencies
𝑘𝑘𝐹𝐹𝑠𝑠
𝐹𝐹𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑘𝑘 = 𝐹𝐹𝑘𝑘 = 𝑘𝑘 × ∆𝐹𝐹 =
𝑁𝑁
𝑘𝑘𝐹𝐹𝑠𝑠
𝐹𝐹𝑘𝑘 =
𝑁𝑁

5
Discrete Fourier Transform [DFT]
Frequency resolution (∆𝐹𝐹)

𝐹𝐹𝑠𝑠
∆𝐹𝐹 =
𝑁𝑁

𝑘𝑘𝐹𝐹𝑠𝑠
𝐹𝐹𝑘𝑘 =
𝑁𝑁

Suppose 𝐹𝐹𝑠𝑠 = 100 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠/𝑠𝑠𝑠𝑠𝑠𝑠 and 𝑁𝑁 = 4 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠

100
∆𝐹𝐹 = = 25 𝐻𝐻𝐻𝐻
4

𝐹𝐹𝑘𝑘 = 𝑘𝑘 × ∆𝐹𝐹

𝐹𝐹𝑘𝑘 = 25 [0,1, 2, 3 ]

𝐹𝐹𝑘𝑘 = 0, 25, 50, 75 𝐻𝐻𝐻𝐻


6
Discrete Fourier Transform [DFT]
Example of DFT

Compute 4-point DFT of the given discrete time signal

0 1 2 3
𝑥𝑥 𝑛𝑛 = 1, 1 , 0 , 0

The discrete signal was captured at 100 samples/sec.

𝑁𝑁 = 4 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠

7
Discrete Fourier Transform [DFT]
Solution
0 1 2 3
𝑥𝑥 𝑛𝑛 = 1, 1 , 0 , 0

Apply analysis equation of DFT:


𝑁𝑁−1
𝑘𝑘
−𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁
𝑛𝑛=0

𝑁𝑁−1
𝑘𝑘 𝑘𝑘
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 [ cos 2𝜋𝜋 𝑛𝑛 − 𝑗𝑗 sin 2𝜋𝜋 𝑛𝑛 ]
𝑁𝑁 𝑁𝑁
𝑛𝑛=0

4−1
𝑘𝑘 𝑘𝑘
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 [ cos 2𝜋𝜋 𝑛𝑛 − 𝑗𝑗 sin 2𝜋𝜋 𝑛𝑛 ]
4 4
𝑛𝑛=0

3
𝑘𝑘 𝑘𝑘
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 [ cos 2𝜋𝜋𝑛𝑛 − 𝑗𝑗 sin 2𝜋𝜋𝑛𝑛 ]
4 4
𝑛𝑛=0

Since 𝑁𝑁 = 4, both ‘𝑘𝑘’ and ‘𝑛𝑛’ will go from 0 to 3

8
Discrete Fourier Transform [DFT]
0 1 2 3
Solution 𝑥𝑥 𝑛𝑛 = 1, 1 , 0 , 0

3
𝑘𝑘 𝑘𝑘
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 [ cos 2𝜋𝜋𝑛𝑛 − 𝑗𝑗 sin 2𝜋𝜋𝑛𝑛 ]
4 4
𝑛𝑛=0

The first DFT output term corresponding to 𝑘𝑘 = 0 ,

𝑋𝑋 0
0 0 0 0
= 𝑥𝑥 0 cos 2𝜋𝜋. 0 . − 𝑗𝑗 𝑥𝑥 0 sin 2𝜋𝜋. 0 . + 𝑥𝑥 1 cos 2𝜋𝜋. 1 . − 𝑗𝑗 𝑥𝑥 1 sin 2𝜋𝜋. 1 .
4 4 4 4
0 0 0 0
+ 𝑥𝑥 2 cos 2𝜋𝜋. 2 . − 𝑗𝑗 𝑥𝑥 2 sin 2𝜋𝜋. 2 . + 𝑥𝑥 3 cos 2𝜋𝜋. 3 . − 𝑗𝑗 𝑥𝑥 3 sin 2𝜋𝜋. 3 .
4 4 4 4

𝑋𝑋 0 = 1 1 − 𝑗𝑗 1 0 + 1 1 − 𝑗𝑗 1 0
+ 0 1 − 𝑗𝑗 0 0 + 0 1 − 𝑗𝑗 0 0

𝑋𝑋 0 = 1 − 0 + 1 − 0 + 0 − 0 + 0 − 0

𝑋𝑋 0 = 2

9
Discrete Fourier Transform [DFT]
0 1 2 3
Solution 𝑥𝑥 𝑛𝑛 = 1, 1 , 0 , 0

3
𝑘𝑘 𝑘𝑘
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 [ cos 2𝜋𝜋𝑛𝑛 − 𝑗𝑗 sin 2𝜋𝜋𝑛𝑛 ]
4 4
𝑛𝑛=0

The second DFT output term corresponding to 𝑘𝑘 = 1 ,

𝑋𝑋 1
1 1 1 1
= 𝑥𝑥 0 cos 2𝜋𝜋. 0 . − 𝑗𝑗 𝑥𝑥 0 sin 2𝜋𝜋. 0 . + 𝑥𝑥 1 cos 2𝜋𝜋. 1 . − 𝑗𝑗 𝑥𝑥 1 sin 2𝜋𝜋. 1 .
4 4 4 4
1 1 1 1
+ 𝑥𝑥 2 cos 2𝜋𝜋. 2 . − 𝑗𝑗 𝑥𝑥 2 sin 2𝜋𝜋. 2 . + 𝑥𝑥 3 cos 2𝜋𝜋. 3 . − 𝑗𝑗 𝑥𝑥 3 sin 2𝜋𝜋. 3 .
4 4 4 4

𝑋𝑋 1 = 1 1 − 𝑗𝑗 1 0 + 1 0 − 𝑗𝑗 1 1
+ 0 −1 − 𝑗𝑗 0 0 + 0 0 − 𝑗𝑗 0 −1

𝑋𝑋 1 = 1 − 0 + 0 − 𝑗𝑗 + 0 − 0 + 0 − 0

𝑋𝑋 1 = 1 − 𝑗𝑗

10
Discrete Fourier Transform [DFT]
0 1 2 3
Solution 𝑥𝑥 𝑛𝑛 = 1, 1 , 0 , 0

3
𝑘𝑘 𝑘𝑘
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 [ cos 2𝜋𝜋𝑛𝑛 − 𝑗𝑗 sin 2𝜋𝜋𝑛𝑛 ]
4 4
𝑛𝑛=0

The third DFT output term corresponding to 𝑘𝑘 = 2 ,

𝑋𝑋 2
2 2 2 2
= 𝑥𝑥 0 cos 2𝜋𝜋. 0 . − 𝑗𝑗 𝑥𝑥 0 sin 2𝜋𝜋. 0 . + 𝑥𝑥 1 cos 2𝜋𝜋. 1 . − 𝑗𝑗 𝑥𝑥 1 sin 2𝜋𝜋. 1 .
4 4 4 4
2 2 2 2
+ 𝑥𝑥 2 cos 2𝜋𝜋. 2 . − 𝑗𝑗 𝑥𝑥 2 sin 2𝜋𝜋. 2 . + 𝑥𝑥 3 cos 2𝜋𝜋. 3 . − 𝑗𝑗 𝑥𝑥 3 sin 2𝜋𝜋. 3 .
4 4 4 4

𝑋𝑋 2 = 1 1 − 𝑗𝑗 1 0 + 1 −1 − 𝑗𝑗 1 0
+ 0 1 − 𝑗𝑗 0 0 + 0 −1 − 𝑗𝑗 0 0

𝑋𝑋 2 = 1 − 0 + (−1) − 0 + 0 − 0 + 0 − 0

𝑋𝑋 2 = 0

11
Discrete Fourier Transform [DFT]
0 1 2 3
Solution 𝑥𝑥 𝑛𝑛 = 1, 1 , 0 , 0

3
𝑘𝑘 𝑘𝑘
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 [ cos 2𝜋𝜋𝑛𝑛 − 𝑗𝑗 sin 2𝜋𝜋𝑛𝑛 ]
4 4
𝑛𝑛=0

The fourth DFT output term corresponding to 𝑘𝑘 = 3 ,

𝑋𝑋 3
3 3 3 3
= 𝑥𝑥 0 cos 2𝜋𝜋. 0 . − 𝑗𝑗 𝑥𝑥 0 sin 2𝜋𝜋. 0 . + 𝑥𝑥 1 cos 2𝜋𝜋. 1 . − 𝑗𝑗 𝑥𝑥 1 sin 2𝜋𝜋. 1 .
4 4 4 4
3 3 3 3
+ 𝑥𝑥 2 cos 2𝜋𝜋. 2 . − 𝑗𝑗 𝑥𝑥 2 sin 2𝜋𝜋. 2 . + 𝑥𝑥 3 cos 2𝜋𝜋. 3 . − 𝑗𝑗 𝑥𝑥 3 sin 2𝜋𝜋. 3 .
4 4 4 4

𝑋𝑋 3 = 1 1 − 𝑗𝑗 1 0 + 1 0 − 𝑗𝑗 1 −1
+ 0 −1 − 𝑗𝑗 0 0 + 0 0 − 𝑗𝑗 0 1

𝑋𝑋 3 = 1 − 0 + 0 + 𝑗𝑗 + 0 − 0 + 0 − 0

𝑋𝑋 3 = 1 + 𝑗𝑗

12
Discrete Fourier Transform [DFT]
Solution

0 1 2 3
𝑋𝑋 𝑘𝑘 = 2 , (1 − 𝑗𝑗) , 0 , (1 + 𝑗𝑗)

0 1 2 3
𝑋𝑋 𝑘𝑘 = 2, 2 , 0 , 2

0 1 2 3
∠𝑋𝑋 𝑘𝑘 = 0° , −45° , 0° , 45°

13
Discrete Fourier Transform [DFT]

Alternate Method

14
Discrete Fourier Transform [DFT]
Solution
0 1 2 3
𝑥𝑥 𝑛𝑛 = 1, 1 , 0 , 0

Apply analysis equation of DFT:


𝑁𝑁−1
𝑘𝑘
−𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁
𝑛𝑛=0
Substitute 𝑁𝑁 = 4
4−1
𝑘𝑘
−𝑗𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 4
𝑛𝑛=0

3
𝑘𝑘
−𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 2
𝑛𝑛=0

15
Discrete Fourier Transform [DFT]
Solution 0 1 2 3
𝑥𝑥 𝑛𝑛 = 1, 1 , 0 , 0

3
𝑘𝑘
−𝑗𝑗𝜋𝜋 𝑛𝑛
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 2
𝑛𝑛=0

𝑘𝑘 𝑘𝑘 𝑘𝑘 𝑘𝑘
−𝑗𝑗𝜋𝜋 (0) −𝑗𝑗𝜋𝜋 (1) −𝑗𝑗𝜋𝜋 (2) −𝑗𝑗𝜋𝜋 (3)
𝑋𝑋 𝑘𝑘 = 𝑥𝑥 0 𝑒𝑒 2 + 𝑥𝑥 1 𝑒𝑒 2 + 𝑥𝑥 2 𝑒𝑒 2 + 𝑥𝑥 3 𝑒𝑒 2

𝑘𝑘 𝑘𝑘 𝑘𝑘 𝑘𝑘
−𝑗𝑗𝜋𝜋 (0) −𝑗𝑗𝜋𝜋 (1) −𝑗𝑗𝜋𝜋 (2) −𝑗𝑗𝜋𝜋 (3)
𝑋𝑋 𝑘𝑘 = 1𝑒𝑒 2 + 1𝑒𝑒 2 + 0𝑒𝑒 2 + 0𝑒𝑒 2

𝑘𝑘
−𝑗𝑗𝜋𝜋
𝑋𝑋 𝑘𝑘 = 1(1) + 1𝑒𝑒 2 +0+0

𝑘𝑘
−𝑗𝑗𝜋𝜋
𝑋𝑋 𝑘𝑘 = 1 + 𝑒𝑒 2

16
Discrete Fourier Transform [DFT]
Solution
𝑘𝑘
−𝑗𝑗𝜋𝜋
𝑋𝑋 𝑘𝑘 = 1 + 𝑒𝑒 2 … (𝐴𝐴)

Put 𝑘𝑘 = 0, 1, 2 𝑎𝑎𝑎𝑎𝑎𝑎 3 in equation (A)

0
−𝑗𝑗𝜋𝜋
𝑋𝑋 0 = 1 + 𝑒𝑒 2 =1+1=2=2
1 𝜋𝜋
−𝑗𝑗𝜋𝜋 −𝑗𝑗
𝑋𝑋 1 = 1 + 𝑒𝑒 2 = 1 + 𝑒𝑒 2 = 1 − 𝑗𝑗

2
−𝑗𝑗𝜋𝜋
𝑋𝑋 2 = 1 + 𝑒𝑒 2 = 1 + 𝑒𝑒 −𝑗𝑗𝜋𝜋 = 1 + −1 = 1 − 1 = 0
3 3𝜋𝜋
−𝑗𝑗𝜋𝜋 −𝑗𝑗
𝑋𝑋 3 = 1 + 𝑒𝑒 2 = 1 + 𝑒𝑒 2 = 1 + 𝑗𝑗

17
Discrete Fourier Transform [DFT]
Solution

𝑘𝑘
−𝑗𝑗𝜋𝜋
𝑋𝑋 𝑘𝑘 = 1 + 𝑒𝑒 2 … (𝐴𝐴)

0 1 2 3
𝑋𝑋 𝑘𝑘 = 2 , (1 − 𝑗𝑗) , 0 , (1 + 𝑗𝑗)

0 1 2 3
𝑋𝑋 𝑘𝑘 = 2, 2 , 0 , 2

0 1 2 3
∠𝑋𝑋 𝑘𝑘 = 0° , −45° , 0° , 45°

18
Discrete Fourier Transform [DFT]
Solution

0 1 2 3
𝑋𝑋 𝑘𝑘 = 2, 2 , 0 , 2

19
Discrete Fourier Transform [DFT]
Solution

20
Discrete Fourier Transform [DFT]
Solution

21
Discrete Fourier Transform [DFT]
Solution

22
Discrete Fourier Transform [DFT]
Solution

23
Discrete Fourier Transform [DFT]
Solution

24
Discrete Fourier Transform [DFT]
Solution

25
Discrete Fourier Transform [DFT]
Solution

26
Discrete Fourier Transform [DFT]
Key Concept: Spectrum for real valued signals

The spectrum of every real valued signal will always be a double sided spectrum [a
spectrum comprises of both +ve frequency phasors and –ve frequency phasors]

−𝐹𝐹𝑠𝑠 +𝐹𝐹𝑠𝑠
≤ 𝐹𝐹 ≤
2 2
−ve frequency +ve frequency
phasors phasors
−𝐹𝐹𝑠𝑠 +𝐹𝐹𝑠𝑠
−−−− − 0 −−−− −
2 2
+𝐹𝐹𝑠𝑠
0 −−−− − −−−− −𝐹𝐹𝑠𝑠
2
+ve frequency −ve frequency
phasors phasors

27
Discrete Fourier Transform [DFT]
Key Concept: Spectrum for real valued signals

The spectrum of every real valued signal will always be a double sided spectrum [a
spectrum comprises of both +ve frequency phasors and –ve frequency phasors]

−1 +1
≤ 𝑓𝑓𝑑𝑑 ≤
2 2
−ve frequency +ve frequency
phasors phasors
−1 +1
−−−− − 0 −−−− −
2 2
+1
0 −−−− − −−−− −1
2
+ve frequency −ve frequency
phasors phasors

28
Discrete Fourier Transform [DFT]
Key Concept: Spectrum for real valued signals

The spectrum of every real valued signal will always be a double sided spectrum [a
spectrum comprises of both +ve frequency phasors and –ve frequency phasors]

−𝜋𝜋 ≤ ω𝑑𝑑 ≤ +𝜋𝜋

−ve frequency +ve frequency


phasors phasors

−𝜋𝜋 −−−− − 0 −−−− − + 𝜋𝜋

0 −−−−− +𝜋𝜋 −−−− −2𝜋𝜋


+ve frequency −ve frequency
phasors phasors

29
Discrete Fourier Transform [DFT]
Characteristics of various DFT frequency axis representations

DFT Frequency Frequency Frequency Repetition Frequency axis


axis variable resolution of interval of DFT range
representation DFT output output
𝑋𝑋 𝑘𝑘 𝑋𝑋 𝑘𝑘

Frequency in F 𝐹𝐹𝑠𝑠 𝐹𝐹𝑠𝑠 −𝐹𝐹𝑠𝑠 +𝐹𝐹𝑠𝑠


to
Hz 𝑁𝑁 2 2

Frequency in 𝐹𝐹 1 1 −1 +1
𝑓𝑓𝑑𝑑 = to
𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐⁄𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝐹𝐹𝑠𝑠 𝑁𝑁 2 2

Frequency in ω𝑑𝑑 = 2𝜋𝜋𝑓𝑓𝑑𝑑 2𝜋𝜋 2𝜋𝜋 −𝜋𝜋 to + 𝜋𝜋


𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟⁄𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑁𝑁
Bits
𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳𝑳 = 𝟐𝟐𝒃𝒃𝒃𝒃𝒃𝒃𝒃𝒃

30
Discrete Fourier Transform [DFT]
Key Concept: Useful harmonic components
For real valued signals

𝐹𝐹𝑠𝑠
0 −−−− −
2
𝑁𝑁
0 −−−− −
2

31
Discrete Fourier Transform [DFT]
Key Concept: Useful harmonic components
For real valued signals

𝐹𝐹𝑠𝑠
0 −−−− −
2
𝑁𝑁
0 −−−− −
2

Total unique components:


𝑁𝑁
+1
2

+ve frequency
phasors

32
Discrete Fourier Transform [DFT]
Example of IDFT

Compute 4-point IDFT of the given frequency domain spectrum

0 1 2 3
𝑋𝑋 𝑘𝑘 = 2 , (1 − 𝑗𝑗) , 0 , (1 + 𝑗𝑗)

33
Discrete Fourier Transform [DFT]
Example of IDFT

Compute 4-point IDFT of the given frequency domain spectrum

0 1 2 3
𝑋𝑋 𝑘𝑘 = 2 , (1 − 𝑗𝑗) , 0 , (1 + 𝑗𝑗)

Answer

0 1 2 3
𝑥𝑥 𝑛𝑛 = 1, 1 , 0 , 0

34
Discrete Fourier Transform [DFT]
Practice Problem

Compute 8 point DFT of

𝑥𝑥 𝑡𝑡 = sin 2𝜋𝜋𝜋𝜋𝜋𝜋𝜋𝜋 + 0.5 sin 2𝜋𝜋2000𝑡𝑡 + 3𝜋𝜋/4

Draw magnitude and phase spectrum.

samples
Take 𝐹𝐹𝑠𝑠 = 8000
sec

35
Discrete Fourier Transform [DFT]
Practice Problem
Compute 8 point DFT of

𝑥𝑥 𝑡𝑡 = sin 2𝜋𝜋𝜋𝜋𝜋𝜋𝜋𝜋 + 0.5 sin 2𝜋𝜋2000𝑡𝑡 + 3𝜋𝜋/4

Draw magnitude and phase spectrum.

samples
Take 𝐹𝐹𝑠𝑠 = 8000
sec

Answer

X k = 0∠0°, 4∠ − 90°, 2∠45°, 0∠0°, 0∠0°, 0∠0°, 2∠ − 45°, 4∠90°

36
Discrete Fourier Transform [DFT]
Significance of ‘𝐹𝐹𝑠𝑠 ’ and ‘N ’
𝐹𝐹𝑠𝑠
∆𝐹𝐹 =
𝑁𝑁

The higher the value of ‘Fs ’, the higher will be the value of ‘Fs /2’

It means we can observe a signal’s information up to a higher frequency value

‘N’ will define the number of components present in the range of 0 to Fs /2

In other words, ‘N’ will decide with what particular resolution we can observe
signal information or it represents how much detailed information can be
observed

The higher the value of ‘N’, the better will be the frequency resolution. The
finer resolution value is an indication of the detailed information of our signal

37
EE-394 Digital Signal Processing
TE (EE) Fall 2020
Resource Persons: Dr. Saad Ahmed Qazi
Nabeel Fayyaz
Muhammad Omar
Discrete Fourier Transform [DFT]

Computational Analysis of N-point


DFT

2
Discrete Fourier Transform [DFT]

Computational Factors:

1) Number of Multiplications

2) Number of Additions

3
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

Nature of Computations:

Complex Multiplications
Complex Computations
Complex Additions

Real Multiplications
Real Computations
Real Additions

4
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

Nature of Computations:

2+3 →

2∗3 →

2 2+3 →

5
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

Nature of Computations:

2 + 3 → 1 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎

2 ∗ 3 → 1 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚

2 2 + 3 → 1 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 & 1 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚

6
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

Nature of Computations:

𝑎𝑎 + 𝑗𝑗𝑗𝑗 + 𝑐𝑐 + 𝑗𝑗𝑗𝑗 → 1 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎

7
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

Nature of Computations:

𝑎𝑎 + 𝑗𝑗𝑗𝑗 + 𝑐𝑐 + 𝑗𝑗𝑗𝑗 → 1 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎

𝑎𝑎 + 𝑐𝑐 + 𝑗𝑗 𝑏𝑏 + 𝑑𝑑 → 2 real additions

𝑒𝑒 + 𝑗𝑗𝑗𝑗

8
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

Nature of Computations:

𝑎𝑎 + 𝑗𝑗𝑗𝑗 ∗ 𝑐𝑐 + 𝑗𝑗𝑗𝑗 → 1 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚

9
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

Nature of Computations:

𝑎𝑎 + 𝑗𝑗𝑗𝑗 ∗ 𝑐𝑐 + 𝑗𝑗𝑗𝑗 → 1 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚

𝑎𝑎𝑐𝑐 − 𝑏𝑏𝑏𝑏 + 𝑗𝑗 𝑎𝑎𝑎𝑎 + 𝑏𝑏𝑏𝑏 → 4 real multiplications & 2 real additions

𝑒𝑒 + 𝑗𝑗𝑗𝑗

10
Discrete Fourier Transform [DFT]
DFT Analysis Equation
𝑋𝑋𝑁𝑁 = 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 𝑥𝑥𝑁𝑁

0 0 0 1 0 𝑁𝑁−1
𝑋𝑋 0 𝑊𝑊𝑵𝑵 𝑊𝑊𝑵𝑵 ⋯ 𝑊𝑊𝑵𝑵 𝑥𝑥 0
1 0 1 1 ⋯ 1 𝑁𝑁−1
𝑋𝑋 1 𝑊𝑊𝑵𝑵 𝑊𝑊𝑵𝑵 𝑊𝑊𝑵𝑵 𝑥𝑥 1
𝑋𝑋 2 = 𝑊𝑊𝑵𝑵 2 0
𝑊𝑊𝑵𝑵 2 1 ⋯ 𝑊𝑊𝑵𝑵 2 𝑁𝑁−1 𝑥𝑥 2
⋮ ⋮ ⋮ ⋱ ⋮ ⋮
𝑋𝑋 𝑁𝑁 − 1 𝑁𝑁−1 0 𝑥𝑥 𝑁𝑁 − 1
𝑊𝑊𝑵𝑵 𝑊𝑊𝑵𝑵 𝑁𝑁−1 1 ⋯ 𝑊𝑊𝑵𝑵 𝑁𝑁−1 𝑁𝑁−1

11
Discrete Fourier Transform [DFT]
DFT Analysis Equation

𝑋𝑋𝑁𝑁 = 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 𝑥𝑥𝑁𝑁

0 0 0 1 0 𝑁𝑁−1
𝑋𝑋 0 𝑊𝑊𝑵𝑵 𝑊𝑊𝑵𝑵 ⋯ 𝑊𝑊𝑵𝑵 𝑥𝑥 0
1 0 1 1 ⋯ 1 𝑁𝑁−1
𝑋𝑋 1 𝑊𝑊𝑵𝑵 𝑊𝑊𝑵𝑵 𝑊𝑊𝑵𝑵 𝑥𝑥 1
𝑋𝑋 2 = 𝑊𝑊𝑵𝑵 2 0
𝑊𝑊𝑵𝑵 2 1 ⋯ 𝑊𝑊𝑵𝑵 2 𝑁𝑁−1 𝑥𝑥 2
⋮ ⋮ ⋮ ⋱ ⋮ ⋮
𝑋𝑋 𝑁𝑁 − 1 𝑁𝑁−1 0 𝑥𝑥 𝑁𝑁 − 1
𝑊𝑊𝑵𝑵 𝑊𝑊𝑵𝑵 𝑁𝑁−1 1 ⋯ 𝑊𝑊𝑵𝑵 𝑁𝑁−1 𝑁𝑁−1

The nature of ‘W’ matrix is complex

DFT can take a complex valued input as well. We will assume a complex
valued input 𝑥𝑥(𝑛𝑛) in order to cover the maximum possible number of
computations

12
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

Total number of Complex Multiplications

𝐹𝐹𝐹𝐹𝐹𝐹 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑅𝑅𝑅𝑅𝑅𝑅 → 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚

𝐹𝐹𝐹𝐹𝐹𝐹 ‘𝑁𝑁’ 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 → 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚

13
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

Total number of Complex Multiplications

𝐹𝐹𝐹𝐹𝐹𝐹 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑅𝑅𝑅𝑅𝑅𝑅 → 𝑁𝑁 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚

𝐹𝐹𝐹𝐹𝐹𝐹 ‘𝑁𝑁’ 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 → 𝑁𝑁 𝑁𝑁 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚

𝑁𝑁 2 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚

14
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

Total number of Complex Additions

𝐹𝐹𝐹𝐹𝐹𝐹 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑅𝑅𝑅𝑅𝑅𝑅 → 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡

𝐹𝐹𝐹𝐹𝐹𝐹 ‘𝑁𝑁’ 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 → 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡

15
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

Total number of Complex Additions

𝐹𝐹𝐹𝐹𝐹𝐹 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑅𝑅𝑅𝑅𝑅𝑅 → 𝑁𝑁 − 1 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡

𝐹𝐹𝐹𝐹𝐹𝐹 ‘𝑁𝑁’ 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 → 𝑁𝑁 𝑁𝑁 − 1 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡

𝑁𝑁 2 − 𝑁𝑁 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖

16
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 =


𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀 + 𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴

𝑁𝑁 2 + 𝑁𝑁 2 − 𝑁𝑁

2𝑁𝑁 2 − 𝑁𝑁

17
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

Total number of Real Multiplications

𝐹𝐹𝐹𝐹𝐹𝐹 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑅𝑅𝑅𝑅𝑅𝑅 → 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚

𝐹𝐹𝐹𝐹𝐹𝐹 ‘𝑁𝑁’ 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 → 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚

18
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

Total number of Real Multiplications

𝐹𝐹𝐹𝐹𝐹𝐹 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑅𝑅𝑅𝑅𝑅𝑅 → 4𝑁𝑁 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚

𝐹𝐹𝐹𝐹𝐹𝐹 ‘𝑁𝑁’ 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 → 𝑁𝑁 4𝑁𝑁 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚

4𝑁𝑁 2 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚

19
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

Total number of Real Additions

𝐹𝐹𝐹𝐹𝐹𝐹 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑅𝑅𝑅𝑅𝑅𝑅 → 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡

𝐹𝐹𝐹𝐹𝐹𝐹 ‘𝑁𝑁’ 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 → 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡

20
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT
Total number of Real Additions
𝐹𝐹𝐹𝐹𝐹𝐹 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑅𝑅𝑅𝑅𝑅𝑅 → {2 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 + 2 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 }
𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡

𝐹𝐹𝐹𝐹𝐹𝐹 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑅𝑅𝑅𝑅𝑅𝑅 → 2 𝑁𝑁 + 2 𝑁𝑁 − 1 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡

𝐹𝐹𝐹𝐹𝐹𝐹 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑅𝑅𝑅𝑅𝑅𝑅 → 2𝑁𝑁 + 2𝑁𝑁 − 2 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡

𝐹𝐹𝐹𝐹𝐹𝐹 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑅𝑅𝑅𝑅𝑅𝑅 → 4𝑁𝑁 − 2 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡

𝐹𝐹𝐹𝐹𝐹𝐹 ‘𝑁𝑁’ 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 → 𝑁𝑁 4𝑁𝑁 − 2 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡

4𝑁𝑁 2 − 2𝑁𝑁 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖


21
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 =


𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀 + 𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴

4𝑁𝑁 2 + 4𝑁𝑁 2 − 2𝑁𝑁

8𝑁𝑁 2 − 2𝑁𝑁

22
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂 𝑜𝑜𝑜𝑜 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑖𝑖𝑖𝑖 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝐷𝐷𝐷𝐷𝐷𝐷 =

𝑁𝑁 2

23
Discrete Fourier Transform [DFT]
Computational Analysis of N-point DFT

𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂 𝑜𝑜𝑜𝑜 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑖𝑖𝑖𝑖 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝐷𝐷𝐷𝐷𝐷𝐷 =

𝑁𝑁 2

𝑁𝑁 2 is a very higher order of computations. It suggests that when ‘N’


increases linearly, the required computational workload will increase
in a quadratic order

24
Discrete Fourier Transform [DFT]
Example-1
How many complex and real computations are required to
perform 1024 point DFT ?

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 = 2𝑁𝑁 2 − 𝑁𝑁

2
= 2 1024 − 1024

= 2096128 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 = 8𝑁𝑁 2 − 2𝑁𝑁

2
= 8 1024 − 2(1024)

= 8386560 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
25
Discrete Fourier Transform [DFT]
Example-2
The incoming data rate is 512 samples/sec and the length of DFT
operation is also 512 samples. If the processor can handle one real
computation in one clock cycle. Suggest the minimum processor speed
that can handle DFT operation in real-time?

26
Discrete Fourier Transform [DFT]
Example-2
The incoming data rate is 512 samples/sec and the length of DFT
operation is also 512 samples. If the processor can handle one real
computation in one clock cycle. Suggest the minimum processor speed
that can handle DFT operation in real-time?

27
Discrete Fourier Transform [DFT]
Example-2
The incoming data rate is 512 samples/sec and the length of DFT
operation is also 512 samples. If the processor can handle one real
computation in one clock cycle. Suggest the minimum processor speed
that can handle DFT operation in real-time?

Solution

𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 = 𝐴𝐴 ∗ 𝐵𝐵 ∗ 𝐶𝐶

𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝐷𝐷𝐷𝐷𝐷𝐷 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐


𝑜𝑜𝑜𝑜 𝐻𝐻𝐻𝐻 = ∗ ∗
𝑠𝑠𝑠𝑠𝑠𝑠 𝐷𝐷𝐷𝐷𝐷𝐷 𝑠𝑠𝑠𝑠𝑠𝑠 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

28
Discrete Fourier Transform [DFT]
Example-2
Solution

𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 = 𝐴𝐴 ∗ 𝐵𝐵 ∗ 𝐶𝐶

𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝐷𝐷𝐷𝐷𝐷𝐷 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐


𝑜𝑜𝑜𝑜 𝐻𝐻𝐻𝐻 = ∗ ∗
𝑠𝑠𝑠𝑠𝑠𝑠 𝐷𝐷𝐷𝐷𝐷𝐷 𝑠𝑠𝑠𝑠𝑠𝑠 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

𝐴𝐴 = 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜

𝐵𝐵 = 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝐷𝐷𝐷𝐷𝐷𝐷 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 𝑝𝑝𝑝𝑝𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠

𝐶𝐶 = 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑡𝑡𝑡𝑡 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑜𝑜𝑜𝑜𝑜𝑜 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

29
Discrete Fourier Transform [DFT]
Example-2
𝐴𝐴
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑝𝑝𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 = 8𝑁𝑁 2 − 2𝑁𝑁

2
= 8 512 − 2(512)

𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
= 2096128
𝐷𝐷𝐷𝐷𝐷𝐷

B
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝐷𝐷𝐷𝐷𝐷𝐷 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 𝑝𝑝𝑝𝑝𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 =

30
Discrete Fourier Transform [DFT]
Example-2
𝐴𝐴
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑝𝑝𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 = 8𝑁𝑁 2 − 2𝑁𝑁

2
= 8 512 − 2(512)

𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
= 2096128
𝐷𝐷𝐷𝐷𝐷𝐷
B
𝐹𝐹𝑠𝑠 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠/𝑠𝑠𝑠𝑠𝑠𝑠 𝐷𝐷𝐷𝐷𝐷𝐷
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝐷𝐷𝐷𝐷𝐷𝐷 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 𝑝𝑝𝑝𝑝𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 = = =
𝑁𝑁 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠/𝐷𝐷𝐷𝐷𝐷𝐷 𝑠𝑠𝑠𝑠𝑠𝑠

512
=
512

𝐷𝐷𝐷𝐷𝐷𝐷
=1
𝑠𝑠𝑠𝑠𝑠𝑠
C
𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 1
𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

31
Discrete Fourier Transform [DFT]
Example-2

𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 = 𝐴𝐴 ∗ 𝐵𝐵 ∗ 𝐶𝐶

= 2096128 ∗ 1 ∗ 1

= 2096128 Hz

32
Discrete Fourier Transform [DFT]
Example-3

If the ADC speed is 4096 samples/sec and the length of DFT operation
is 512 samples. The processor can handle one real computation in one
clock cycle. Suggest the minimum processor speed that can handle
DFT operation in real-time?

33
Discrete Fourier Transform [DFT]
Example-3
𝐴𝐴
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑝𝑝𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 = 8𝑁𝑁 2 − 2𝑁𝑁

2
= 8 512 − 2(512)

𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
= 2096128
𝐷𝐷𝐷𝐷𝐷𝐷
B
𝐹𝐹𝑠𝑠
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝐷𝐷𝐷𝐷𝐷𝐷 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 𝑝𝑝𝑝𝑝𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 =
𝑁𝑁
4096
=
512

𝐷𝐷𝐷𝐷𝐷𝐷
=8
𝑠𝑠𝑠𝑠𝑠𝑠
C
𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 1
𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

34
Discrete Fourier Transform [DFT]
Example-3

𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 = 𝐴𝐴 ∗ 𝐵𝐵 ∗ 𝐶𝐶

= 2096128 ∗ 8 ∗ 1

= 16.769 𝑀𝑀Hz

35
Discrete Fourier Transform [DFT]
Example-4

If the ADC speed is 4096 samples/sec and the length of DFT operation
is 512 samples. The processor can handle one real computation in two
clock cycles. Suggest the minimum processor speed that can handle
DFT operation in real-time?

36
Discrete Fourier Transform [DFT]
Example-4
𝐴𝐴
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑝𝑝𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 = 8𝑁𝑁 2 − 2𝑁𝑁

2
= 8 512 − 2(512)

𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
= 2096128
𝐷𝐷𝐷𝐷𝐷𝐷
B
𝐹𝐹𝑠𝑠
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝐷𝐷𝐷𝐷𝐷𝐷 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 𝑝𝑝𝑝𝑝𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 =
𝑁𝑁
4096
=
512

𝐷𝐷𝐷𝐷𝐷𝐷
=8
𝑠𝑠𝑠𝑠𝑠𝑠
C
𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 2
𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

37
Discrete Fourier Transform [DFT]
Example-4

𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 = 𝐴𝐴 ∗ 𝐵𝐵 ∗ 𝐶𝐶

= 2096128 ∗ 8 ∗ 2

= 33.538 𝑀𝑀Hz

38
Discrete Fourier Transform [DFT]
Key Concept
We have done calculations in our numerical by taking length of DFT equal to
512 samples. If we do the same exercise for a higher values of ‘N’ like 1 million
point DFT then we will need a very high speed computing machine because
requirement of computations will be in a order of 1 ∗ 1012

There are also some cases where we might end up with some impractical
processor speeds or a very costly digital system

Since standard DFT implementation needs a lot of computations which


overall increases the cost of system. We, therefore must have some
mechanism for the optimized implementation of DFT

Any algorithm which implements DFT equation in a faster or optimized


manner is called ‘Fast Fourier Transform’ which will definitely reduce the cost
of system
39
EE-394 Digital Signal Processing
TE (EE) Fall 2020
Resource Persons: Dr. Saad Ahmed Qazi
Nabeel Fayyaz
Muhammad Omar

1
Discrete Fourier Transform [DFT]

• DFT Analysis and Synthesis equations

• DFT Frequency axis

• Frequency resolution (∆𝐹𝐹)

• Significance of ‘𝐹𝐹𝑠𝑠 ’ and ‘N ’

• Example of DFT

• Periodicity Property

• Conjugate Symmetry Property

2
Discrete Fourier Transform [DFT]

Matrix formulation of N-point DFT

or

DFT as Linear Transformation

3
Discrete Fourier Transform [DFT]
Analysis Equation

𝑁𝑁−1
𝑗𝑗𝑗𝜋𝜋𝑘𝑘𝑛𝑛

𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁
𝑛𝑛=0

Synthesis Equation

𝑁𝑁−1
1 +
𝑗𝑗𝑗𝜋𝜋𝑘𝑘𝑛𝑛
𝑥𝑥 𝑛𝑛 = � 𝑋𝑋 𝑘𝑘 𝑒𝑒 𝑁𝑁
𝑁𝑁
𝑘𝑘=0

4
Discrete Fourier Transform [DFT]
Matrix formulation of N-point DFT

DFT Analysis Equation


𝑁𝑁−1
𝑗𝑗𝑗𝜋𝜋𝑘𝑘𝑛𝑛

𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁
𝑛𝑛=0

𝑗𝑗𝑗𝜋𝜋 𝑘𝑘 0 𝑗𝑗𝑗𝜋𝜋 𝑘𝑘 1 𝑗𝑗𝑗𝜋𝜋 𝑘𝑘 𝑁𝑁−1


− − −
𝑋𝑋 𝑘𝑘 = 𝑥𝑥 0 𝑒𝑒 𝑁𝑁 + 𝑥𝑥 1 𝑒𝑒 𝑁𝑁 + ……. + 𝑥𝑥 𝑁𝑁 − 1 𝑒𝑒 𝑁𝑁

𝑗𝑗𝑗𝜋𝜋 0 0 𝑗𝑗𝑗𝜋𝜋 0 1 𝑗𝑗𝑗𝜋𝜋 0 𝑁𝑁−1


− − −
𝑋𝑋 0 = 𝑥𝑥 0 𝑒𝑒 𝑁𝑁 + 𝑥𝑥 1 𝑒𝑒 𝑁𝑁 + ……. + 𝑥𝑥 𝑁𝑁 − 1 𝑒𝑒 𝑁𝑁

𝑗𝑗𝑗𝜋𝜋 1 0 𝑗𝑗𝑗𝜋𝜋 1 1 𝑗𝑗𝑗𝜋𝜋 1 𝑁𝑁−1


− − −
𝑋𝑋 1 = 𝑥𝑥 0 𝑒𝑒 𝑁𝑁 + 𝑥𝑥 1 𝑒𝑒 𝑁𝑁 + ……. + 𝑥𝑥 𝑁𝑁 − 1 𝑒𝑒 𝑁𝑁

𝑗𝑗𝑗𝜋𝜋 2 0 𝑗𝑗𝑗𝜋𝜋 2 1 𝑗𝑗𝑗𝜋𝜋 2 𝑁𝑁−1


− − −
𝑋𝑋 2 = 𝑥𝑥 0 𝑒𝑒 𝑁𝑁 + 𝑥𝑥 1 𝑒𝑒 𝑁𝑁 + ……. + 𝑥𝑥 𝑁𝑁 − 1 𝑒𝑒 𝑁𝑁

⋮ ⋮ ⋮
𝑗𝑗𝑗𝜋𝜋 𝑁𝑁−1 0 𝑗𝑗𝑗𝜋𝜋 𝑁𝑁−1 1 𝑗𝑗𝑗𝜋𝜋 𝑁𝑁−1 𝑁𝑁−1
𝑋𝑋 𝑁𝑁 − 1 = 𝑥𝑥 0 𝑒𝑒 − 𝑁𝑁 + 𝑥𝑥 1 𝑒𝑒 − 𝑁𝑁 + ……. + 𝑥𝑥 𝑁𝑁 − 1 𝑒𝑒 − 𝑁𝑁

5
Discrete Fourier Transform [DFT]
Matrix formulation of N-point DFT

𝑗𝑗𝑗𝑗𝑗 0 0 𝑗𝑗𝑗𝑗𝑗 0 1 𝑗𝑗𝑗𝑗𝑗 0 𝑁𝑁−1


− − −
𝑋𝑋 0 𝑒𝑒 𝑁𝑁 𝑒𝑒 𝑁𝑁 ⋯ 𝑒𝑒 𝑁𝑁
𝑥𝑥 0
𝑗𝑗𝑗𝑗𝑗 1 0 𝑗𝑗𝑗𝑗𝑗 1 1 𝑗𝑗𝑗𝑗𝑗 1 𝑁𝑁−1
𝑋𝑋 1 𝑒𝑒 −
𝑁𝑁 𝑒𝑒 −
𝑁𝑁 ⋯ 𝑒𝑒 −
𝑁𝑁 𝑥𝑥 1
𝑋𝑋 2 = −
𝑗𝑗𝑗𝜋𝜋 2 0

𝑗𝑗𝑗𝜋𝜋 2 1 ⋯ −
𝑗𝑗𝑗𝜋𝜋 2 𝑁𝑁−1 𝑥𝑥 2
𝑒𝑒 𝑁𝑁 𝑒𝑒 𝑁𝑁 𝑒𝑒 𝑁𝑁
⋮ ⋱ ⋮
𝑋𝑋 𝑁𝑁 − 1 ⋮ ⋮ ⋮ 𝑥𝑥 𝑁𝑁 − 1

𝑗𝑗𝑗𝑗𝑗 𝑁𝑁−1 0

𝑗𝑗𝑗𝑗𝑗 𝑁𝑁−1 1 ⋯ −
𝑗𝑗𝑗𝑗𝑗 𝑁𝑁−1 𝑁𝑁−1
𝑒𝑒 𝑁𝑁 𝑒𝑒 𝑁𝑁 𝑒𝑒 𝑁𝑁

2𝜋𝜋
−𝑗𝑗
Let 𝑊𝑊𝑁𝑁 = 𝑒𝑒 𝑁𝑁

2𝜋𝜋 𝑘𝑘𝑛𝑛
𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 = 𝑒𝑒 −𝑗𝑗 𝑁𝑁

2𝜋𝜋𝑘𝑘𝑛𝑛
𝑘𝑘𝑛𝑛 −𝑗𝑗
𝑊𝑊𝑁𝑁 = 𝑒𝑒 𝑁𝑁

Transformation Matrix

6
Discrete Fourier Transform [DFT]
Matrix formulation of N-point DFT

0 0 0 1 0 𝑁𝑁−1
𝑋𝑋 0 𝑊𝑊𝑵𝑵 𝑊𝑊𝑵𝑵 ⋯ 𝑊𝑊𝑵𝑵 𝑥𝑥 0
1 0 1 1 ⋯ 1 𝑁𝑁−1
𝑋𝑋 1 𝑊𝑊𝑵𝑵 𝑊𝑊𝑵𝑵 𝑊𝑊𝑵𝑵 𝑥𝑥 1
𝑋𝑋 2 = 𝑊𝑊𝑵𝑵 2 0
𝑊𝑊𝑵𝑵 2 1 ⋯ 𝑊𝑊𝑵𝑵 2 𝑁𝑁−1 𝑥𝑥 2
⋮ ⋮ ⋮ ⋱ ⋮ ⋮
𝑋𝑋 𝑁𝑁 − 1 𝑁𝑁−1 0 𝑥𝑥 𝑁𝑁 − 1
𝑊𝑊𝑵𝑵 𝑊𝑊𝑵𝑵 𝑁𝑁−1 1 ⋯ 𝑊𝑊𝑵𝑵 𝑁𝑁−1 𝑁𝑁−1

Let
𝑋𝑋 𝑘𝑘 → 𝑿𝑿𝑁𝑁
𝑥𝑥 𝑛𝑛 → 𝒙𝒙𝑁𝑁

𝑿𝑿𝑁𝑁 = 𝑾𝑾𝑁𝑁 𝑘𝑘𝑛𝑛 𝒙𝒙


�𝑁𝑁

−1
�𝑁𝑁 = 𝑾𝑾𝑵𝑵 𝑘𝑘𝑛𝑛
𝒙𝒙 𝑿𝑿𝑁𝑁

7
Discrete Fourier Transform [DFT]
Analysis and Synthesis equation of DFT in Matrix form

DFT Analysis equation

𝑿𝑿𝑁𝑁 = 𝑾𝑾𝑁𝑁 𝑘𝑘𝑛𝑛 𝒙𝒙𝑁𝑁 (1)

DFT equation is expressed as a matrix-vector product

DFT Synthesis equation

𝑘𝑘𝑛𝑛 −1
𝒙𝒙𝑁𝑁 = 𝑊𝑊𝑁𝑁 𝑿𝑿𝑁𝑁 (2)

8
Discrete Fourier Transform [DFT]
DFT Synthesis Equation

𝑁𝑁−1
1 +
𝑗𝑗𝑗𝜋𝜋𝑘𝑘𝑛𝑛
𝑥𝑥 𝑛𝑛 = � 𝑋𝑋 𝑘𝑘 𝑒𝑒 𝑁𝑁
𝑁𝑁
𝑘𝑘=0

We know that
−𝑗𝑗
2𝜋𝜋 2𝜋𝜋 2𝜋𝜋
𝑊𝑊𝑁𝑁 = 𝑒𝑒 𝑁𝑁 = cos − 𝑗𝑗 sin
𝑁𝑁 𝑁𝑁

∗ +𝑗𝑗
2𝜋𝜋 2𝜋𝜋 2𝜋𝜋
𝑊𝑊𝑁𝑁 = 𝑒𝑒 𝑁𝑁 = cos + 𝑗𝑗 sin
𝑁𝑁 𝑁𝑁

1 𝑘𝑘𝑛𝑛 ∗
𝒙𝒙𝑁𝑁 = 𝑾𝑾𝑁𝑁 𝑿𝑿𝑁𝑁 (3)
𝑁𝑁

9
Discrete Fourier Transform [DFT]
Matrix formulation of N-point DFT

Compare equation (2) and equation (3)

𝑘𝑘𝑛𝑛 −1 � 𝑁𝑁
�𝑁𝑁 = 𝑾𝑾𝑁𝑁
𝒙𝒙 𝑿𝑿

1 ∗
�𝑁𝑁 =
𝒙𝒙 𝑾𝑾𝑁𝑁 𝑘𝑘𝑛𝑛 � 𝑁𝑁
𝑿𝑿
𝑁𝑁

𝑘𝑘𝑛𝑛 −1 1 𝑘𝑘𝑛𝑛 ∗
𝑾𝑾𝑁𝑁 = 𝑾𝑾𝑁𝑁
𝑁𝑁

To take conjugate of a matrix is much easier than calculating inverse of a


matrix for a large value of ‘N’
10
Discrete Fourier Transform [DFT]
Example-1

Compute numeric values of 𝑊𝑊4 transformation matrix

0 0 0 1 0 2 0 3
𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒
1 0 1 1 1 2 1 3
𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒
𝑊𝑊4 = 2 0 2 1 2 2 2 3
𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒
3 0 3 1 3 2 3 3
𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒

𝑗𝑗𝑗𝑗𝑗 0 0 𝑗𝑗𝑗𝑗𝑗 0 1 𝑗𝑗𝑗𝑗𝑗 0 2 𝑗𝑗𝑗𝑗𝑗 0 3


− − − −
𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4
𝑗𝑗𝑗𝑗𝑗 1 0 𝑗𝑗𝑗𝑗𝑗 1 1 𝑗𝑗𝑗𝑗𝑗 1 2 𝑗𝑗𝑗𝑗𝑗 1 3
− − − −
𝑊𝑊4 = 𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4
𝑗𝑗𝑗𝜋𝜋 2 0 𝑗𝑗𝑗𝜋𝜋 2 1 𝑗𝑗𝑗𝜋𝜋 2 2 𝑗𝑗𝑗𝜋𝜋 2 3
− − − −
𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4
𝑗𝑗𝑗𝜋𝜋 3 0 𝑗𝑗𝑗𝜋𝜋 3 1 𝑗𝑗𝑗𝜋𝜋 3 2 𝑗𝑗𝑗𝜋𝜋 3 3
− − − −
𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4

11
Discrete Fourier Transform [DFT]
Example-1

Compute numeric values of 𝑊𝑊4 transformation matrix

1 1 1 1

1 −𝑗𝑗 −1 +𝑗𝑗
𝑊𝑊4 =
1 −1 1 −1

1 +𝑗𝑗 −1 −𝑗𝑗

12
Discrete Fourier Transform [DFT]
Example-1
1 1 1 1

1 −𝑗𝑗 −1 +𝑗𝑗
𝑊𝑊4 =
1 −1 1 −1

1 +𝑗𝑗 −1 −𝑗𝑗

Note that there are only 4 unique values in 𝑊𝑊4 matrix. FFT will eliminate or minimize this
redundancy
An N-point DFT will have ‘N’ unique values in 𝑁𝑁x𝑁𝑁 transformation matrix
13
Discrete Fourier Transform [DFT]
Example-1

Compute numeric values of 𝑊𝑊4 transformation matrix

0 0 0 1 0 2 0 3
𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒
1 0 1 1 1 2 1 3
𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒
𝑊𝑊4 = 2 0 2 1 2 2 2 3
𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒
3 0 3 1 3 2 3 3
𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒 𝑊𝑊𝟒𝟒

𝑊𝑊40 𝑊𝑊40 𝑊𝑊40 𝑊𝑊40


𝑊𝑊40 𝑊𝑊41 𝑊𝑊42 𝑊𝑊43
𝑊𝑊4 =
𝑊𝑊40 𝑊𝑊42 𝑊𝑊44 𝑊𝑊46
𝑊𝑊40 𝑊𝑊43 𝑊𝑊46 𝑊𝑊49
14
Discrete Fourier Transform [DFT]
Example-1

Compute numeric values of 𝑊𝑊4 transformation matrix

𝑊𝑊40 𝑊𝑊40 𝑊𝑊40 𝑊𝑊40


𝑊𝑊40 𝑊𝑊41 𝑊𝑊42 𝑊𝑊43
𝑊𝑊4 =
𝑊𝑊40 𝑊𝑊42 𝑊𝑊44 𝑊𝑊46
𝑊𝑊40 𝑊𝑊43 𝑊𝑊46 𝑊𝑊49

𝑗𝑗𝑗𝑗𝑗 0 𝑗𝑗𝑗𝑗𝑗 0 𝑗𝑗𝑗𝑗𝑗 0 𝑗𝑗𝑗𝑗𝑗 0


− − − −
𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4
𝑗𝑗𝑗𝑗𝑗 0 𝑗𝑗𝑗𝑗𝑗 1 𝑗𝑗𝑗𝑗𝑗 2 𝑗𝑗𝑗𝑗𝑗 3
− − − −
𝑊𝑊4 = 𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4
𝑗𝑗𝑗𝜋𝜋 0 𝑗𝑗𝑗𝜋𝜋 2 𝑗𝑗𝑗𝜋𝜋 4 𝑗𝑗𝑗𝜋𝜋 6
− − − −
𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4
𝑗𝑗𝑗𝜋𝜋 0 𝑗𝑗𝑗𝜋𝜋 3 𝑗𝑗𝑗𝜋𝜋 6 𝑗𝑗𝑗𝜋𝜋 9
− − − −
𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4 𝑒𝑒 4

15
Discrete Fourier Transform [DFT]
Example-1

Compute numeric values of 𝑊𝑊4 transformation matrix

1 1 1 1

1 −𝑗𝑗 −1 +𝑗𝑗
𝑊𝑊4 =
1 −1 1 −1

1 +𝑗𝑗 −1 −𝑗𝑗

16
Discrete Fourier Transform [DFT]
Example-2
Compute 4 point DFT of the given discrete time signal

0 1 2 3
𝑥𝑥 𝑛𝑛 = 1 , 1 ,0 ,0

by Matrix vector product

17
Discrete Fourier Transform [DFT]
Example-2
𝑋𝑋𝑁𝑁 = 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 𝑥𝑥𝑁𝑁

𝑘𝑘𝑛𝑛
𝑋𝑋4 = 𝑊𝑊4 𝑥𝑥4

1 1 1 1
𝑋𝑋 0 𝑥𝑥 0
1 −𝑗𝑗 −1 +𝑗𝑗
𝑋𝑋 1 𝑥𝑥 1
=
𝑋𝑋 2 𝑥𝑥 2
1 −1 1 −1
𝑋𝑋 3 𝑥𝑥 3
1 +𝑗𝑗 −1 −𝑗𝑗
18
Discrete Fourier Transform [DFT]
Example-2

𝑋𝑋𝑁𝑁 = 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 𝑥𝑥𝑁𝑁

𝑋𝑋4 = 𝑊𝑊4 𝑘𝑘𝑛𝑛 𝑥𝑥4

1 1 1 1
𝑋𝑋 0 1
1 −𝑗𝑗 −1 +𝑗𝑗
𝑋𝑋 1 1
=
𝑋𝑋 2 0
1 −1 1 −1
𝑋𝑋 3 0
1 +𝑗𝑗 −1 −𝑗𝑗
19
Discrete Fourier Transform [DFT]
Example-2

𝑋𝑋 0 1+1+0+0
𝑋𝑋 1 1 − 𝑗𝑗 + 0 + 0
=
𝑋𝑋 2 1−1+0+0
𝑋𝑋 3 1 + 𝑗𝑗 + 0 + 0

𝑋𝑋 0 2
𝑋𝑋 1 1 − 𝑗𝑗
=
𝑋𝑋 2 0
𝑋𝑋 3 1 + 𝑗𝑗

0 1 2 3
𝑋𝑋 𝑘𝑘 = 2 , (1 − 𝑗𝑗) , 0 , (1 + 𝑗𝑗)

20
Discrete Fourier Transform [DFT]
Example-3
Find 𝑥𝑥 𝑛𝑛 for
0 1 2 3
𝑋𝑋 𝑘𝑘 = 2 , (1 − 𝑗𝑗) , 0 , (1 + 𝑗𝑗)

21
Discrete Fourier Transform [DFT]
Example-3 −1
�𝑁𝑁 = 𝑾𝑾𝑁𝑁 𝑘𝑘𝑛𝑛
𝒙𝒙 � 𝑁𝑁
𝑿𝑿

1 𝑘𝑘𝑛𝑛 ∗
�𝑁𝑁 =
𝒙𝒙 𝑾𝑾𝑁𝑁 � 𝑁𝑁
𝑿𝑿
𝑁𝑁

1 𝑘𝑘𝑛𝑛 ∗
𝑥𝑥4 = 𝑊𝑊4 𝑋𝑋4
4

1 1 1 1
𝑥𝑥 0 𝑋𝑋 0
1 −𝑗𝑗 −1 +𝑗𝑗
𝑥𝑥 1 1 𝑋𝑋 1
=
𝑥𝑥 2 4 𝑋𝑋 2
1 −1 1 −1
𝑥𝑥 3 𝑋𝑋 3
1 +𝑗𝑗 −1 −𝑗𝑗
22
Discrete Fourier Transform [DFT]
Example-3 ∗
1 1 1 1
𝑥𝑥 0 2
1 −𝑗𝑗 −1 +𝑗𝑗
𝑥𝑥 1 1 1 − 𝑗𝑗
=
𝑥𝑥 2 4 0
1 −1 1 −1
𝑥𝑥 3 1 + 𝑗𝑗
1 +𝑗𝑗 −1 −𝑗𝑗

1 1 1 1
𝑥𝑥 0 2
1 +𝑗𝑗 −1 −𝑗𝑗
𝑥𝑥 1 1 1 − 𝑗𝑗
=
𝑥𝑥 2 4 0
1 −1 1 −1
𝑥𝑥 3 1 + 𝑗𝑗
1 −𝑗𝑗 −1 +𝑗𝑗
23
Discrete Fourier Transform [DFT]
Example-3
𝑥𝑥 0 2 + 1 − 𝑗𝑗 + 0 + 1 + 𝑗𝑗
𝑥𝑥 1 1 2 + 𝑗𝑗 − 𝑗𝑗 2 − 0 − 𝑗𝑗 − 𝑗𝑗 2
=
𝑥𝑥 2 4 2 − 1 + 𝑗𝑗 + 0 − 1 − 𝑗𝑗
𝑥𝑥 3 2 − 𝑗𝑗 + 𝑗𝑗 2 − 0 + 𝑗𝑗 + 𝑗𝑗 2

𝑥𝑥 0 4
𝑥𝑥 1 1 4
=
𝑥𝑥 2 4 0
𝑥𝑥 3 0

𝑥𝑥 0 1
𝑥𝑥 1 1
=
𝑥𝑥 2 0
𝑥𝑥 3 0

0 1 2 3
𝑥𝑥 𝑛𝑛 = 1 , 1 ,0 ,0

24
Discrete Fourier Transform [DFT]
Properties of DFT Twiddle factors

Prove that DFT twiddle factors follow:

Periodicity property 𝑾𝑾𝑁𝑁 𝑘𝑘+𝑁𝑁 = 𝑾𝑾𝑁𝑁 𝑘𝑘

𝑁𝑁
𝐾𝐾+
Symmetry property 𝑾𝑾𝑁𝑁 2 = − 𝑾𝑾𝑁𝑁 𝑘𝑘

25
Discrete Fourier Transform [DFT]
Proof of Periodicity property

Periodicity property 𝑾𝑾𝑁𝑁 𝑘𝑘+𝑁𝑁 = 𝑾𝑾𝑁𝑁 𝑘𝑘

2𝜋𝜋
−𝑗𝑗
𝑾𝑾𝑁𝑁 = 𝑒𝑒 𝑁𝑁

2𝜋𝜋 𝑘𝑘+𝑁𝑁
−𝑗𝑗
𝑾𝑾𝑁𝑁 𝑘𝑘+𝑁𝑁 = 𝑒𝑒 𝑁𝑁

2𝜋𝜋 𝑘𝑘+𝑁𝑁
𝑘𝑘+𝑁𝑁 −𝑗𝑗
𝑾𝑾𝑁𝑁 = 𝑒𝑒 𝑁𝑁

2𝜋𝜋𝑘𝑘 2𝜋𝜋𝑁𝑁
𝑘𝑘+𝑁𝑁 −𝑗𝑗 −𝑗𝑗
𝑾𝑾𝑁𝑁 = 𝑒𝑒 𝑁𝑁 . 𝑒𝑒 𝑁𝑁

2𝜋𝜋𝑘𝑘
𝑘𝑘+𝑁𝑁 −𝑗𝑗
𝑾𝑾𝑁𝑁 = 𝑒𝑒 𝑁𝑁 . 𝑒𝑒 −𝑗𝑗𝑗𝜋𝜋

26
Discrete Fourier Transform [DFT]
Proof of Periodicity property 𝑘𝑘+𝑁𝑁 −𝑗𝑗
2𝜋𝜋𝑘𝑘
𝑾𝑾𝑁𝑁 = 𝑒𝑒 𝑁𝑁 . 𝑒𝑒 −𝑗𝑗𝑗𝜋𝜋
2𝜋𝜋𝑘𝑘
𝑘𝑘+𝑁𝑁 −𝑗𝑗
𝑾𝑾𝑁𝑁 = 𝑒𝑒 𝑁𝑁 . cos 2𝜋𝜋 − 𝑗𝑗 sin 2𝜋𝜋

2𝜋𝜋𝑘𝑘
𝑘𝑘+𝑁𝑁 −𝑗𝑗
𝑾𝑾𝑁𝑁 = 𝑒𝑒 𝑁𝑁 . 1 − 𝑗𝑗𝑗

2𝜋𝜋𝑘𝑘
𝑘𝑘+𝑁𝑁 −𝑗𝑗
𝑾𝑾𝑁𝑁 = 𝑒𝑒 𝑁𝑁

𝑾𝑾𝑁𝑁 𝑘𝑘+𝑁𝑁 = 𝑾𝑾𝑁𝑁 𝑘𝑘


Let 𝑁𝑁 = 4 𝑎𝑎𝑎𝑎𝑎𝑎 𝑘𝑘 = 0 Let 𝑁𝑁 = 4 𝑎𝑎𝑎𝑎𝑎𝑎 𝑘𝑘 = 2
𝑾𝑾4 4 = 𝑾𝑾4 0 𝑾𝑾4 6 = 𝑾𝑾4 2

Let 𝑁𝑁 = 4 𝑎𝑎𝑎𝑎𝑎𝑎 𝑘𝑘 = 1 Let 𝑁𝑁 = 4 𝑎𝑎𝑎𝑎𝑎𝑎 𝑘𝑘 = 3


𝑾𝑾4 5 = 𝑾𝑾41 𝑾𝑾4 7 = 𝑾𝑾4 3

27
Discrete Fourier Transform [DFT]
Proof of Symmetry property
𝑁𝑁
𝐾𝐾+
Symmetry property 𝑾𝑾𝑁𝑁 2 = − 𝑾𝑾𝑁𝑁 𝑘𝑘

2𝜋𝜋
−𝑗𝑗
𝑾𝑾𝑁𝑁 = 𝑒𝑒 𝑁𝑁

𝑁𝑁
𝑁𝑁 2𝜋𝜋 𝑘𝑘+ 2
𝐾𝐾+
𝑾𝑾𝑁𝑁 2 = 𝑒𝑒 −𝑗𝑗 𝑁𝑁

𝑁𝑁
𝑁𝑁 2𝜋𝜋 𝑘𝑘+
𝐾𝐾+ −𝑗𝑗 2
𝑾𝑾𝑁𝑁 2 = 𝑒𝑒 𝑁𝑁

𝑁𝑁 𝑁𝑁
2𝜋𝜋𝑘𝑘 2𝜋𝜋
𝐾𝐾+ −𝑗𝑗 −𝑗𝑗 2
𝑾𝑾𝑁𝑁 2 = 𝑒𝑒 𝑁𝑁 . 𝑒𝑒 𝑁𝑁

𝑁𝑁 2𝜋𝜋𝑘𝑘
𝐾𝐾+ −𝑗𝑗
𝑾𝑾𝑁𝑁 2 = 𝑒𝑒 𝑁𝑁 . 𝑒𝑒 −𝑗𝑗𝜋𝜋

28
Discrete Fourier Transform [DFT]
Proof of Symmetry property 𝑁𝑁
𝐾𝐾+ 2𝜋𝜋𝑘𝑘
−𝑗𝑗
𝑾𝑾𝑁𝑁 2 = 𝑒𝑒 𝑁𝑁 . 𝑒𝑒 −𝑗𝑗𝜋𝜋
𝑁𝑁 2𝜋𝜋𝑘𝑘
𝐾𝐾+ −𝑗𝑗
𝑾𝑾𝑁𝑁 2 = 𝑒𝑒 𝑁𝑁 . cos 𝜋𝜋 − 𝑗𝑗 sin 𝜋𝜋
𝑁𝑁 2𝜋𝜋𝑘𝑘
𝐾𝐾+ −𝑗𝑗
𝑾𝑾𝑁𝑁 2 = 𝑒𝑒 𝑁𝑁 . −1 − 𝑗𝑗𝑗

𝑁𝑁 2𝜋𝜋𝑘𝑘
𝐾𝐾+ −𝑗𝑗
𝑾𝑾𝑁𝑁 2 = − 𝑒𝑒 𝑁𝑁

𝑁𝑁
𝐾𝐾+
𝑾𝑾𝑁𝑁 2 = − 𝑾𝑾𝑁𝑁 𝑘𝑘
Let 𝑁𝑁 = 4 𝑎𝑎𝑎𝑎𝑎𝑎 𝑘𝑘 = 0 Let 𝑁𝑁 = 4 𝑎𝑎𝑎𝑎𝑎𝑎 𝑘𝑘 = 2
𝑾𝑾4 2 = −𝑾𝑾4 0 𝑾𝑾4 4 = −𝑾𝑾4 2
Let 𝑁𝑁 = 4 𝑎𝑎𝑎𝑎𝑎𝑎 𝑘𝑘 = 1 Let 𝑁𝑁 = 4 𝑎𝑎𝑎𝑎𝑎𝑎 𝑘𝑘 = 3
𝑾𝑾4 3 = −𝑾𝑾41 𝑾𝑾4 5 = −𝑾𝑾4 3

29
Discrete Fourier Transform [DFT]
Example
Compute numeric values of 𝑊𝑊4 transformation matrix using periodicity
and symmetry properties

𝑊𝑊40 𝑊𝑊40 𝑊𝑊40 𝑊𝑊40


𝑊𝑊40 𝑊𝑊41 𝑊𝑊42 𝑊𝑊43
𝑊𝑊4 =
𝑊𝑊40 𝑊𝑊42 𝑊𝑊44 𝑊𝑊46
𝑊𝑊40 𝑊𝑊43 𝑊𝑊46 𝑊𝑊49

1 1 1 1

1 −𝑗𝑗 −1 +𝑗𝑗
𝑊𝑊4 =
1 −1 1 −1

1 +𝑗𝑗 −1 −𝑗𝑗
30
EE-394 Digital Signal Processing
TE (EE) Fall 2020
Resource Persons: Dr. Saad Ahmed Qazi
Nabeel Fayyaz
Muhammad Omar
Fast Fourier Transform [FFT]
FFT: A faster way to compute DFT

Any algorithm which implements DFT equation in a


faster or optimized manner is called ‘Fast Fourier
Transform’

Note:

Always keep in mind that an FFT algorithm is not a different


mathematical transform: it is simply an efficient means to
compute the DFT

2
Fast Fourier Transform [FFT]
Why FFT is required?

In standard DFT, as the value of ‘N’ increases, it will require a


very higher order of computations (because it depends upon
𝑁𝑁 2 )

DFT implementation is too slow due to enormous redundant


calculations required by DFT

Therefore, some special optimized algorithms are required to


reduce the order of computations

Such algorithms are called ‘Fast Fourier Transform (FFT)’

3
Fast Fourier Transform [FFT]
Need for Speed

To meet real-time processing requirements


during signal processing even with a very
higher value of ‘N’

4
Fast Fourier Transform [FFT]

Radix-2 FFT algorithm

5
Fast Fourier Transform [FFT]
Condition of FFT (Radix-2)

The length of signal is restricted to be in power of ‘2’

i.e. 𝑁𝑁 = 2𝑘𝑘

where 𝑘𝑘 = 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖

Radix-2 FFT algorithm can be applied on the signals having a


length of

𝑁𝑁 = 2, 4, 8, 16, 32, … … … … . , 2𝑘𝑘

6
Fast Fourier Transform [FFT]
Condition of FFT (Radix-2)
If the length of signal is not in a power of 2

For example 𝑁𝑁 = 13 samples

Option-1: Samples Truncation

Select any 8 consecutive samples to apply 8 point FFT and discard the
remaining samples

This option is usually avoided because of:

• Loss of information
• Degradation in the resultant frequency resolution because
𝐹𝐹𝑠𝑠
↑ ∆𝐹𝐹 =
𝑁𝑁 ↓
7
Fast Fourier Transform [FFT]
Condition of FFT (Radix-2)

If the length of signal is not in a power of 2

For example 𝑁𝑁 = 13 samples

Option-2: Zero Padding

Append 3 zeros either at the beginning or end of the sequence to make


signal length equal to 16 samples to apply 16 point FFT

We can pad any number of zeros to get the desired value of 𝑁𝑁 = 2𝑘𝑘

This option is usually preferred practically

8
Fast Fourier Transform [FFT]
Radix-2 FFT algorithm

The algorithm is based on the decomposition of N-point


sequence into smaller point sequences and then apply
smaller point DFTs (instead of applying a higher point DFT
on ‘N’ samples directly)

9
Fast Fourier Transform [FFT]
Radix-2 FFT algorithm

10
Fast Fourier Transform [FFT]
Radix-2 FFT algorithm

11
Fast Fourier Transform [FFT]
Radix-2 FFT algorithm

12
Fast Fourier Transform [FFT]
Radix-2 FFT algorithm

13
Fast Fourier Transform [FFT]
Radix-2 FFT algorithm

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 = 𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁


14
Fast Fourier Transform [FFT]
Radix-2 FFT algorithm

15
Fast Fourier Transform [FFT]
Radix-2 FFT algorithm

𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀 = 𝑁𝑁 2

16
Fast Fourier Transform [FFT]
Radix-2 FFT algorithm

17
Fast Fourier Transform [FFT]
Radix-2 FFT derivation

DFT Analysis Equation


𝑁𝑁−1
𝑗𝑗𝑗𝜋𝜋𝑘𝑘𝑛𝑛

𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁
𝑛𝑛=0

𝑁𝑁−1

𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
𝑛𝑛=0

The above DFT equation is for N-points

18
Fast Fourier Transform [FFT]
Radix-2 FFT derivation
Let 𝑁𝑁 = 8 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠

𝑁𝑁−1

� 𝑥𝑥 𝑛𝑛
𝑛𝑛=0

19
Fast Fourier Transform [FFT]
Radix-2 FFT derivation
Let 𝑁𝑁 = 8 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠

𝑁𝑁−1

� 𝑥𝑥 𝑛𝑛
𝑛𝑛=0

𝑁𝑁
−1
2
� 𝑥𝑥 2𝑛𝑛
𝑛𝑛=0

+
𝑁𝑁
−1
2
� 𝑥𝑥 2𝑛𝑛 + 1
𝑛𝑛=0
20
Fast Fourier Transform [FFT]
Radix-2 FFT derivation
𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑗𝑗𝑗𝜋𝜋𝑘𝑘(2𝑛𝑛) 𝑗𝑗𝑗𝜋𝜋𝑘𝑘(2𝑛𝑛+1)
− −
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 2𝑛𝑛 𝑒𝑒 𝑁𝑁 + � 𝑥𝑥 2𝑛𝑛 + 1 𝑒𝑒 𝑁𝑁
𝑛𝑛=0 𝑛𝑛=0

𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑗𝑗𝑗𝜋𝜋𝑘𝑘(2𝑛𝑛) 𝑗𝑗𝑗𝜋𝜋𝑘𝑘(2𝑛𝑛) 𝑗𝑗𝑗𝜋𝜋𝑘𝑘
− − −
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 2𝑛𝑛 𝑒𝑒 𝑁𝑁 + � 𝑥𝑥 2𝑛𝑛 + 1 𝑒𝑒 𝑁𝑁 𝑒𝑒 𝑁𝑁
𝑛𝑛=0 𝑛𝑛=0

𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑗𝑗𝑗𝜋𝜋𝑘𝑘(2𝑛𝑛) 𝑗𝑗𝑗𝜋𝜋𝑘𝑘 𝑗𝑗𝑗𝜋𝜋𝑘𝑘(2𝑛𝑛)
− − −
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 2𝑛𝑛 𝑒𝑒 𝑁𝑁 + 𝑒𝑒 𝑁𝑁 � 𝑥𝑥 2𝑛𝑛 + 1 𝑒𝑒 𝑁𝑁
𝑛𝑛=0 𝑛𝑛=0
2𝜋𝜋
−𝑗𝑗
Since 𝑊𝑊𝑁𝑁 = 𝑒𝑒 𝑁𝑁

𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 2𝑘𝑘𝑛𝑛 + 𝑊𝑊𝑁𝑁 𝑘𝑘 � 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 2𝑘𝑘𝑛𝑛
𝑛𝑛=0 𝑛𝑛=0

21
Fast Fourier Transform [FFT]
Radix-2 FFT derivation
𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 2𝑘𝑘𝑛𝑛 + 𝑊𝑊𝑁𝑁 𝑘𝑘 � 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 2𝑘𝑘𝑛𝑛
𝑛𝑛=0 𝑛𝑛=0
2𝜋𝜋
−𝑗𝑗
Since 𝑊𝑊𝑁𝑁 = 𝑒𝑒 𝑁𝑁

2𝜋𝜋
−𝑗𝑗
𝑊𝑊𝑁𝑁 = 𝑒𝑒 𝑁𝑁/2
2

and
2𝜋𝜋 2
2 −𝑗𝑗
𝑊𝑊𝑁𝑁 = 𝑒𝑒 𝑁𝑁

2𝜋𝜋 2
2 −𝑗𝑗
𝑊𝑊𝑁𝑁 = 𝑒𝑒 𝑁𝑁

2𝜋𝜋
2 −𝑗𝑗
𝑊𝑊𝑁𝑁 = 𝑒𝑒 𝑁𝑁/2

22
Fast Fourier Transform [FFT]
Radix-2 FFT derivation
𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 2𝑘𝑘𝑛𝑛 + 𝑊𝑊𝑁𝑁 𝑘𝑘 � 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 2𝑘𝑘𝑛𝑛
𝑛𝑛=0 𝑛𝑛=0

2𝜋𝜋
2 −𝑗𝑗
𝑊𝑊𝑁𝑁 = 𝑊𝑊𝑁𝑁 = 𝑒𝑒 𝑁𝑁/2
2
𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 + 𝑊𝑊𝑁𝑁 𝑘𝑘 � 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2 2
𝑛𝑛=0 𝑛𝑛=0

𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 + 𝑊𝑊𝑁𝑁 𝑘𝑘 � 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2 2
𝑛𝑛=0 𝑛𝑛=0
𝑁𝑁 𝑁𝑁
𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 + 𝑊𝑊𝑁𝑁 𝑘𝑘 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷
2 2
23
Fast Fourier Transform [FFT]
Radix-2 FFT derivation

𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 + 𝑊𝑊𝑁𝑁 𝑘𝑘 � 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 → (𝐴𝐴)
2 2
𝑛𝑛=0 𝑛𝑛=0

An 8 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 DFT broken up into two 4 point DFTs

𝑁𝑁 𝑁𝑁
In equation(A), each of the two point DFTs are periodic in ‘𝑘𝑘’ with period
2 2
𝑁𝑁 𝑁𝑁
So we have two summations whose results can be combined to get the first samples of an
2 2
N-point DFT
𝑁𝑁 𝑁𝑁
For the remaining samples of an N-point DFT output, we will run equation (A) for 𝑘𝑘 +
2 2

24
Fast Fourier Transform [FFT]
Radix-2 FFT derivation
𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 + 𝑊𝑊𝑁𝑁 𝑘𝑘 � 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 → (𝐴𝐴)
2 2
𝑛𝑛=0 𝑛𝑛=0
𝑁𝑁 𝑁𝑁
Consider 𝑋𝑋 𝑘𝑘 + output. If we put 𝑘𝑘 + for 𝑘𝑘 in equation(A)
2 2
𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑁𝑁 𝑘𝑘+
𝑁𝑁
𝑛𝑛 𝑘𝑘+
𝑁𝑁
𝑘𝑘+
𝑁𝑁
𝑛𝑛
𝑋𝑋 𝑘𝑘 + = � 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 2 + 𝑊𝑊𝑁𝑁 2 � 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 2
2 2 2
𝑛𝑛=0 𝑛𝑛=0

𝑁𝑁 𝑁𝑁 2𝜋𝜋 𝑁𝑁
𝑘𝑘+ 𝑛𝑛 𝑛𝑛 −𝑗𝑗
𝑊𝑊𝑁𝑁 2 = 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
𝑊𝑊𝑁𝑁 2 = 𝑊𝑊𝑁𝑁 [𝑒𝑒𝑘𝑘𝑛𝑛 𝑁𝑁/2 ] 2 𝑛𝑛 = 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 𝑒𝑒 −𝑗𝑗𝑗𝜋𝜋𝑛𝑛 = 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 [1]=𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2 2 2 2 2 2 2
−𝑗𝑗𝑗𝜋𝜋𝑛𝑛
𝑒𝑒 = cos 2𝜋𝜋𝑛𝑛 − 𝑗𝑗 sin 2𝜋𝜋𝑛𝑛 = 1
𝑁𝑁
𝑘𝑘+ 𝑛𝑛
𝑊𝑊𝑁𝑁 2 = 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2 2
𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑁𝑁 𝑘𝑘+
𝑁𝑁
𝑋𝑋 𝑘𝑘 + = � 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 + 𝑊𝑊𝑁𝑁 2 � 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 → (𝐵𝐵)
2 2 2
𝑛𝑛=0 𝑛𝑛=0

25
Fast Fourier Transform [FFT]
Radix-2 FFT derivation
𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑁𝑁 𝑘𝑘+
𝑁𝑁
𝑋𝑋 𝑘𝑘 + = � 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 + 𝑊𝑊𝑁𝑁 2 � 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 → (𝐵𝐵)
2 2 2
𝑛𝑛=0 𝑛𝑛=0

𝑁𝑁 𝑁𝑁 2𝜋𝜋 𝑁𝑁
𝑘𝑘+ 𝑘𝑘 𝑘𝑘 −𝑗𝑗
𝑊𝑊𝑁𝑁 2 = 𝑊𝑊𝑁𝑁 𝑊𝑊𝑁𝑁 2 = 𝑊𝑊𝑁𝑁 [𝑒𝑒 𝑁𝑁 ] 2 = 𝑊𝑊𝑁𝑁 𝑘𝑘 𝑒𝑒 −𝑗𝑗𝜋𝜋 = 𝑊𝑊𝑁𝑁 𝑘𝑘 [−1]=−𝑊𝑊𝑁𝑁 𝑘𝑘

𝑒𝑒 −𝑗𝑗𝜋𝜋 = cos 𝜋𝜋 − 𝑗𝑗 sin 𝜋𝜋 = −1

𝑁𝑁
𝑘𝑘+
𝑊𝑊𝑁𝑁 2 = −𝑊𝑊𝑁𝑁 𝑘𝑘

𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑁𝑁
𝑋𝑋 𝑘𝑘 + = � 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 −𝑊𝑊𝑁𝑁 𝑘𝑘 � 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 → (𝐶𝐶)
2 2 2
𝑛𝑛=0 𝑛𝑛=0

26
Fast Fourier Transform [FFT]
Radix-2 FFT derivation

𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 + 𝑊𝑊𝑁𝑁 𝑘𝑘 � 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 → (𝐴𝐴)
2 2
𝑛𝑛=0 𝑛𝑛=0

𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑁𝑁
𝑋𝑋 𝑘𝑘 + = � 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 −𝑊𝑊𝑁𝑁 𝑘𝑘 � 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 → (𝐶𝐶)
2 2 2
𝑛𝑛=0 𝑛𝑛=0

𝑋𝑋 𝑘𝑘 = 𝐴𝐴(𝑘𝑘) + 𝑊𝑊𝑁𝑁 𝑘𝑘 𝐵𝐵(𝑘𝑘) → (1)

𝑁𝑁
𝑋𝑋 𝑘𝑘 + = 𝐴𝐴(𝑘𝑘) − 𝑊𝑊𝑁𝑁 𝑘𝑘 𝐵𝐵(𝑘𝑘) → (2)
2

𝑁𝑁
𝑘𝑘 = 0, 1, 2, … … , −1
2

27
Fast Fourier Transform [FFT]
Radix-2 FFT derivation

𝑁𝑁 𝑁𝑁
𝑁𝑁 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 = 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 + 𝑊𝑊𝑁𝑁 𝑘𝑘 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷
2 2

𝑁𝑁 𝑁𝑁
𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷
2 2

28
Fast Fourier Transform [FFT]
Radix-2 FFT derivation
𝑁𝑁 𝑘𝑘 𝑁𝑁
𝑁𝑁 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 = 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 + 𝑊𝑊𝑁𝑁 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷
2 2

𝑁𝑁 𝑁𝑁 𝑁𝑁 𝑁𝑁
𝑁𝑁 𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 = 𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 + 𝑊𝑊𝑁𝑁 𝑘𝑘 𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 + 𝑊𝑊𝑁𝑁 𝑘𝑘 𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 + 𝑊𝑊𝑁𝑁 𝑘𝑘 𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷
4 2 4 4 2 4

𝑁𝑁 𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷
𝑁𝑁 𝑘𝑘 𝑁𝑁 𝑘𝑘 𝑁𝑁 𝑘𝑘 𝑁𝑁
= 𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 + 𝑊𝑊𝑁𝑁 𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 + 𝑊𝑊𝑁𝑁 𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 + 𝑊𝑊𝑁𝑁 𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷
8 4 8 2 8 4 8
𝑁𝑁 𝑁𝑁 𝑁𝑁 𝑁𝑁
+ 𝑊𝑊𝑁𝑁 𝑘𝑘 𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 + 𝑊𝑊𝑁𝑁 𝑘𝑘 𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 + 𝑊𝑊𝑁𝑁 𝑘𝑘 𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷 + 𝑊𝑊𝑁𝑁 𝑘𝑘 𝑝𝑝𝑝𝑝 𝐷𝐷𝐷𝐷𝐷𝐷
8 4 8 2 8 4 8

𝑊𝑊𝑁𝑁 𝑘𝑘 , 𝑊𝑊𝑁𝑁 𝑘𝑘 , 𝑊𝑊𝑁𝑁 𝑘𝑘 are Twiddle factors


2 4

29
Fast Fourier Transform [FFT]
Calculation of Twiddle factors

𝑊𝑊𝑁𝑁 𝑘𝑘 Twiddle factors

If 𝑁𝑁 = 8 ; 𝑊𝑊𝑁𝑁 𝑘𝑘 = 𝑊𝑊8 𝑘𝑘 𝑃𝑃𝑃𝑃𝑃𝑃 𝑘𝑘 = 0 𝑡𝑡𝑡𝑡 7

2𝜋𝜋 0
0 −𝑗𝑗
𝑊𝑊8 = 𝑒𝑒 8 = 1∠0° = 1

2𝜋𝜋 1
1 −𝑗𝑗
𝑊𝑊8 = 𝑒𝑒 8 = 1∠−45° = 0.707 − 𝑗𝑗𝑗.707

2𝜋𝜋 2
2 −𝑗𝑗
𝑊𝑊8 = 𝑒𝑒 8 = 1∠−90° = −𝑗𝑗

2𝜋𝜋 3
−𝑗𝑗
𝑊𝑊8 3 = 𝑒𝑒 8 = 1∠−135° = −0.707 − 𝑗𝑗𝑗.707

30
Fast Fourier Transform [FFT]
Calculation of Twiddle factors

𝑊𝑊𝑁𝑁 𝑘𝑘 Twiddle factors

If 𝑁𝑁 = 8 ; 𝑊𝑊𝑁𝑁 𝑘𝑘 = 𝑊𝑊8 𝑘𝑘 𝑃𝑃𝑃𝑃𝑃𝑃 𝑘𝑘 = 0 𝑡𝑡𝑡𝑡 7

2𝜋𝜋 4
4 −𝑗𝑗
𝑊𝑊8 = 𝑒𝑒 8 = 1∠−180° = −1

2𝜋𝜋 5
5 −𝑗𝑗
𝑊𝑊8 = 𝑒𝑒 8 = 1∠−225° = −0.707 + 𝑗𝑗𝑗.707

2𝜋𝜋 6
6 −𝑗𝑗
𝑊𝑊8 = 𝑒𝑒 8 = 1∠−270° = +𝑗𝑗

2𝜋𝜋 7
−𝑗𝑗
𝑊𝑊8 7 = 𝑒𝑒 8 = 1∠−315° = 0.707 + 𝑗𝑗𝑗.707

31
Fast Fourier Transform [FFT]
Calculation of Twiddle factors

𝑊𝑊8 𝑘𝑘 Twiddle factors

360° 360°
= = 45°
𝑁𝑁 8

32
Fast Fourier Transform [FFT]
Calculation of Twiddle factors
𝑊𝑊𝑁𝑁 𝑘𝑘 Twiddle factors
2

If 𝑁𝑁 = 8 ; 𝑊𝑊𝑁𝑁 𝑘𝑘 = 𝑊𝑊4 𝑘𝑘 𝑃𝑃𝑃𝑃𝑃𝑃 𝑘𝑘 = 0 𝑡𝑡𝑡𝑡 3


2

2𝜋𝜋 0
−𝑗𝑗
𝑊𝑊4 0 = 𝑒𝑒 4 = 1∠0° = 1

2𝜋𝜋 1
1 −𝑗𝑗
𝑊𝑊4 = 𝑒𝑒 4 = 1∠−90° = −𝑗𝑗

2𝜋𝜋 2
2 −𝑗𝑗
𝑊𝑊4 = 𝑒𝑒 4 = 1∠−180° = −1

2𝜋𝜋 3
−𝑗𝑗
𝑊𝑊4 3 = 𝑒𝑒 4 = 1∠−270° = +𝑗𝑗

33
Fast Fourier Transform [FFT]
Calculation of Twiddle factors

𝑊𝑊4 𝑘𝑘 Twiddle factors

360° 360°
= = 90°
𝑁𝑁 4

34
Fast Fourier Transform [FFT]
Calculation of Twiddle factors
𝑊𝑊𝑁𝑁 𝑘𝑘 Twiddle factors
4

If 𝑁𝑁 = 8 ; 𝑊𝑊𝑁𝑁 𝑘𝑘 = 𝑊𝑊2 𝑘𝑘 𝑃𝑃𝑃𝑃𝑃𝑃 𝑘𝑘 = 0 𝑡𝑡𝑡𝑡 1


4

2𝜋𝜋 0
0 −𝑗𝑗
𝑊𝑊2 = 𝑒𝑒 2 = 1∠0° = 1

2𝜋𝜋 1
1 −𝑗𝑗
𝑊𝑊2 = 𝑒𝑒 2 = 1∠−180° = −1

35
Fast Fourier Transform [FFT]
Calculation of Twiddle factors

𝑊𝑊2 𝑘𝑘 Twiddle factors

360° 360°
= = 180°
𝑁𝑁 2

36
Fast Fourier Transform [FFT]
Calculation of Twiddle factors
𝑊𝑊𝑁𝑁 𝑘𝑘 , 𝑊𝑊𝑁𝑁 𝑘𝑘 , 𝑊𝑊𝑁𝑁 𝑘𝑘 Twiddle factors
2 4

𝑊𝑊8 𝑘𝑘 , 𝑊𝑊4 𝑘𝑘 , 𝑊𝑊2 𝑘𝑘 Twiddle factors

37
EE-394 Digital Signal Processing
TE (EE) Fall 2020
Resource Persons: Dr. Saad Ahmed Qazi
Nabeel Fayyaz
Muhammad Omar
Fast Fourier Transform [FFT]
Radix-2 FFT

𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 + 𝑊𝑊𝑁𝑁 𝑘𝑘 � 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 → (𝐴𝐴)
2 2
𝑛𝑛=0 𝑛𝑛=0

𝑁𝑁 𝑁𝑁
−1 −1
2 2
𝑁𝑁 𝑘𝑘+
𝑁𝑁
𝑋𝑋 𝑘𝑘 + = � 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 + 𝑊𝑊𝑁𝑁 2 � 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛 → (𝐵𝐵)
2 2 2
𝑛𝑛=0 𝑛𝑛=0

𝑋𝑋 𝑘𝑘 = 𝐴𝐴(𝑘𝑘) + 𝑊𝑊𝑁𝑁 𝑘𝑘 𝐵𝐵(𝑘𝑘) → (1)

𝑁𝑁 𝑘𝑘+
𝑁𝑁
𝑋𝑋 𝑘𝑘 + = 𝐴𝐴(𝑘𝑘) + 𝑊𝑊𝑁𝑁 2 𝐵𝐵(𝑘𝑘) → (2)
2

𝑁𝑁
𝑘𝑘 = 0, 1, 2, … … , −1
2

2
Fast Fourier Transform [FFT]
Calculation of Twiddle factors
𝑊𝑊𝑁𝑁 𝑘𝑘 , 𝑊𝑊𝑁𝑁 𝑘𝑘 , 𝑊𝑊𝑁𝑁 𝑘𝑘 Twiddle factors
2 4

𝑊𝑊8 𝑘𝑘 , 𝑊𝑊4 𝑘𝑘 , 𝑊𝑊2 𝑘𝑘 Twiddle factors

3
Fast Fourier Transform [FFT]

8- point FFT implementation using


two 4-point DFTs

4
Fast Fourier Transform [FFT]
8- point FFT implementation using two 4-point DFTs

𝑁𝑁
2 −1
� 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2
𝑛𝑛=0

𝑁𝑁
−1
2
� 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2
𝑛𝑛=0

5
Fast Fourier Transform [FFT]
8- point FFT implementation using two 4-point DFTs

𝑁𝑁
2 −1
� 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2
𝑛𝑛=0

𝑁𝑁
−1
2
� 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2
𝑛𝑛=0

6
Fast Fourier Transform [FFT]
8- point FFT implementation using two 4-point DFTs

𝑁𝑁
2 −1
� 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2
𝑛𝑛=0

𝑁𝑁
−1
2
� 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2
𝑛𝑛=0

7
Fast Fourier Transform [FFT]
8- point FFT implementation using two 4-point DFTs

𝑁𝑁
2 −1
� 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2
𝑛𝑛=0

𝑁𝑁
−1
2
� 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2
𝑛𝑛=0

8
Fast Fourier Transform [FFT]
8- point FFT implementation using two 4-point DFTs

𝑁𝑁
2 −1
� 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2
𝑛𝑛=0

𝑁𝑁
−1
2
� 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2
𝑛𝑛=0

9
Fast Fourier Transform [FFT]
8- point FFT implementation using two 4-point DFTs

𝑁𝑁
2 −1
� 𝑥𝑥 2𝑛𝑛 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2
𝑛𝑛=0

𝑁𝑁
−1
2
� 𝑥𝑥 2𝑛𝑛 + 1 𝑊𝑊𝑁𝑁 𝑘𝑘𝑛𝑛
2
𝑛𝑛=0

10
Fast Fourier Transform [FFT]

8- point FFT implementation using


four 2-point DFTs and two 4-point
DFTs

11
Fast Fourier Transform [FFT]
8- point FFT implementation using four 2-point DFTs and two 4-point DFTs

12
Fast Fourier Transform [FFT]
8- point FFT implementation using four 2-point DFTs and two 4-point DFTs

13
Fast Fourier Transform [FFT]
8- point FFT implementation using four 2-point DFTs and two 4-point DFTs

14
Fast Fourier Transform [FFT]
8- point FFT implementation using four 2-point DFTs and two 4-point DFTs

15
Fast Fourier Transform [FFT]
8- point FFT implementation using four 2-point DFTs and two 4-point DFTs

16
Fast Fourier Transform [FFT]
8- point FFT implementation using four 2-point DFTs and two 4-point DFTs

17
Fast Fourier Transform [FFT]
8- point FFT implementation using four 2-point DFTs and two 4-point DFTs

18
Fast Fourier Transform [FFT]
8- point FFT implementation using four 2-point DFTs and two 4-point DFTs

19
Fast Fourier Transform [FFT]

Full decimation-in-time FFT


implementation of an 8-point
DFT

20
Fast Fourier Transform [FFT]
Single Point DFT or 1-point DFT
0
Consider 𝑥𝑥 𝑛𝑛 = 𝑎𝑎

Apply Analysis Equation of DFT
𝑁𝑁−1
𝑗𝑗𝑗𝜋𝜋𝑘𝑘𝑛𝑛

𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 𝑁𝑁
𝑛𝑛=0

0
𝑗𝑗𝑗𝜋𝜋𝑘𝑘.0

𝑋𝑋 𝑘𝑘 = � 𝑥𝑥 𝑛𝑛 𝑒𝑒 1
𝑛𝑛=0

𝑋𝑋 𝑘𝑘 = 𝑎𝑎 (1)

𝑋𝑋 𝑘𝑘 = 𝑎𝑎

𝑋𝑋 𝑘𝑘 = 𝑥𝑥 𝑛𝑛

21
Fast Fourier Transform
Full Decimation in Time (DIT) structure
[FFT]

22
Fast Fourier Transform [FFT]
Full Decimation in Time (DIT) structure

23
Fast Fourier Transform
Full Decimation in Time (DIT) structure
[FFT]

24
Fast Fourier Transform
Full Decimation in Time (DIT) structure
[FFT]

Butterfly
structure

25
Fast Fourier Transform [FFT]
Example

Compute 8 point DFT of

𝑥𝑥 𝑡𝑡 = sin 2𝜋𝜋𝜋𝜋𝜋𝜋𝜋𝜋 + 0.5 sin 2𝜋𝜋2000𝑡𝑡 + 3𝜋𝜋/4

Using Radix-2 FFT algorithm. Draw magnitude and phase spectrum.

samples
Take 𝐹𝐹𝑠𝑠 = 8000
sec

26
Fast Fourier Transform [FFT]
Example
Solution
𝑥𝑥 𝑡𝑡 = sin 2𝜋𝜋𝜋𝜋𝜋𝜋𝜋𝜋 + 0.5 sin 2𝜋𝜋2000𝑡𝑡 + 3𝜋𝜋/4

To make a signal discrete, replace 𝑡𝑡 → 𝑛𝑛𝑇𝑇𝑠𝑠

𝑥𝑥 𝑡𝑡 = sin 2𝜋𝜋𝜋𝜋𝜋𝜋𝑛𝑛𝑇𝑇𝑠𝑠 + 0.5 sin 2𝜋𝜋𝜋𝜋𝜋𝜋𝑛𝑛𝑇𝑇𝑠𝑠 + 3𝜋𝜋/4


samples
𝐹𝐹𝑠𝑠 = 8000
sec

1 sec
𝑇𝑇𝑠𝑠 =
8000 sample

1000 2000
𝑥𝑥 𝑛𝑛 = sin 2𝜋𝜋 𝑛𝑛 + 0.5 sin 2𝜋𝜋 𝑛𝑛 + 3𝜋𝜋/4
8000 8000

1 1
𝑥𝑥 𝑛𝑛 = sin 2𝜋𝜋 𝑛𝑛 + 0.5 sin 2𝜋𝜋 𝑛𝑛 + 3𝜋𝜋/4
8 4

27
Fast Fourier Transform [FFT]
Example
1 1
𝑥𝑥 𝑛𝑛 = sin 2𝜋𝜋 𝑛𝑛 + 0.5 sin 2𝜋𝜋 𝑛𝑛 + 3𝜋𝜋/4
8 4
Put 𝑛𝑛 = 0 − 7 in above equation

𝑥𝑥 0 = 0.3535 𝑥𝑥 1 = 0.3535

𝑥𝑥 2 = 0.6464 𝑥𝑥 3 = 1.0607

𝑥𝑥 4 = 0.3535 𝑥𝑥 5 = −1.0607

𝑥𝑥 6 = −1.3535 𝑥𝑥 7 = −0.3535

28
Fast Fourier Transform [FFT]
Example

29
Fast Fourier Transform [FFT]

30
Fast Fourier Transform [FFT]
Example

𝐴𝐴 0 = 0.707 + 𝑊𝑊4 0 −0.707 = 0.707 + 1 −0.7070 = 0

𝐴𝐴 1 = 0 + 𝑊𝑊41 1.999 = 0 − 𝑗𝑗 1.999 = −2𝑗𝑗 = 2∠ −90°

𝐴𝐴 2 = 0.707 + 𝑊𝑊4 2 −0.707 = 0.707 − 1 −0.707 = 1.414 = 1.414∠0°

𝐴𝐴 3 = 0 + 𝑊𝑊4 3 1.999 = 0 + 𝑗𝑗 1.999 = 2𝑗𝑗 = 2∠90°

𝐵𝐵 0 = −0.707 + 𝑊𝑊4 0 0.707 = −0.707 + 1 0.7070 = 0

𝐵𝐵 1 = 1.414 + 𝑊𝑊41 1.414 = 1.414 − 𝑗𝑗 1.414 = 1.414 − 𝑗𝑗𝑗.414 = 2∠ −45°

𝐵𝐵 2 = −0.707 + 𝑊𝑊4 2 0.707 = −0.707 − 1 0.707 = −1.414 = 1.414∠180°

𝐵𝐵 3 = 4.414 + 𝑊𝑊4 3 1.414 = 1.414 + 𝑗𝑗 1.414 = 1.414 + 𝑗𝑗𝑗.414 = 2∠45°

31
Fast Fourier Transform [FFT]
Example
𝑋𝑋 0 = 𝐴𝐴 0 + 𝑊𝑊8 0 𝐵𝐵 0 = 0 + 1 0 = 0 ∠0°

𝑋𝑋 1 = 𝐴𝐴 1 + 𝑊𝑊81 𝐵𝐵 1 = 2∠ −90° + 1∠−45° ∗ 2∠−45° = 4∠ −90°

𝑋𝑋 2 = 𝐴𝐴 2 + 𝑊𝑊8 2 𝐵𝐵 2 = 1.414∠0° + 1∠−90° ∗ 1.414∠180° = 2∠45°

𝑋𝑋 3 = 𝐴𝐴 3 + 𝑊𝑊8 3 𝐵𝐵 3 = 2∠90° + 1∠−135° ∗ 2∠45° = 0 ∠0°

𝑋𝑋 4 = 𝐴𝐴 0 + 𝑊𝑊8 4 𝐵𝐵 0 = 0 + 1∠−180° ∗ 0 = 0 ∠0°

𝑋𝑋 5 = 𝐴𝐴 1 + 𝑊𝑊8 5 𝐵𝐵 1 = 2∠ −90° + 1∠−225° ∗ 2∠−45° = 0 ∠0°

𝑋𝑋 6 = 𝐴𝐴 2 + 𝑊𝑊8 6 𝐵𝐵 2 = 1.414∠0° + 1∠−270° ∗ 1.414∠180° = 2∠ −45°

𝑋𝑋 7 = 𝐴𝐴 3 + 𝑊𝑊8 7 𝐵𝐵 3 = 2∠90° + 1∠ −315° ∗ 2∠45° = 4∠90°

32
Fast Fourier Transform [FFT]

𝐹𝐹𝑠𝑠 8000
∆𝐹𝐹 = = = 1000 𝐻𝐻𝐻𝐻
𝑁𝑁 8

33
Fast Fourier Transform [FFT]
Data Shuffling and Bit Reversal

In order to obtain the output sequence in natural order i.e. 𝑋𝑋 0 , 𝑋𝑋 1 , 𝑋𝑋 2 ,


𝑋𝑋 3 , 𝑋𝑋 4 , 𝑋𝑋 5 , 𝑋𝑋 6 , 𝑋𝑋 7 , the input sequence had to be stored in a shuffled
order like 𝑥𝑥 0 , 𝑥𝑥 4 , 𝑥𝑥 2 , 𝑥𝑥 6 , 𝑥𝑥 1 , 𝑥𝑥 5 , 𝑥𝑥 3 , 𝑥𝑥 7

The shuffling of the input data is known as bit reversal because the scrambled
order of the input data index can be obtained by reversing the bits of the binary
representation of the normal input data index order

The most significant bit becomes the least significant bit and the least significant
bit becomes the most significant bit

34
Fast Fourier Transform [FFT]
Data Shuffling and Bit Reversal

Input index Bit reversal for an 8-point FFT


Normal Binary bits Reversed Shuffled
order of index Binary bits order index
of index ‘n’ of index ‘n’
‘n’
0
1
2
3
4
5
6
7

35
Fast Fourier Transform [FFT]
Data Shuffling and Bit Reversal

Input index Bit reversal for an 8-point FFT


Normal Binary bits Reversed Shuffled
order of index Binary bits order index
of index ‘n’ of index ‘n’
‘n’
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111

36
Fast Fourier Transform [FFT]
Data Shuffling and Bit Reversal

Input index Bit reversal for an 8-point FFT


Normal Binary bits Reversed Shuffled
order of index Binary bits order index
of index ‘n’ of index ‘n’
‘n’
0 000 000
1 001 100
2 010 010
3 011 110
4 100 001
5 101 101
6 110 011
7 111 111

37
Fast Fourier Transform [FFT]
Data Shuffling and Bit Reversal

Input index Bit reversal for an 8-point FFT


Normal Binary bits Reversed Shuffled
order of index Binary bits order index
of index ‘n’ of index ‘n’
‘n’
0 000 000 0
1 001 100 4
2 010 010 2
3 011 110 6
4 100 001 1
5 101 101 5
6 110 011 3
7 111 111 7

38
EE-394 Digital Signal Processing
TE (EE) Fall 2020
Resource Persons: Dr. Saad Ahmed Qazi
Nabeel Fayyaz
Muhammad Omar
Fast Fourier Transform [FFT]

Computational Analysis of N-point


Radix-2 FFT

2
Fast Fourier Transform [FFT]

3
Fast Fourier Transform [FFT]

4
Fast Fourier Transform [FFT]
Radix-2 FFT 𝑋𝑋 𝑘𝑘 = 𝐴𝐴(𝑘𝑘) + 𝑊𝑊𝑁𝑁 𝑘𝑘 𝐵𝐵(𝑘𝑘) → (1)

𝑁𝑁 𝑘𝑘+
𝑁𝑁
𝑋𝑋 𝑘𝑘 + = 𝐴𝐴(𝑘𝑘) + 𝑊𝑊𝑁𝑁 2 𝐵𝐵(𝑘𝑘) → 2
2
or
𝑁𝑁
𝑋𝑋 𝑘𝑘 + = 𝐴𝐴(𝑘𝑘) −𝑊𝑊𝑁𝑁 𝑘𝑘 𝐵𝐵(𝑘𝑘) → (3)
2
𝑁𝑁
𝑘𝑘 = 0, 1, 2, … … , − 1
2
Substitute 𝑁𝑁 = 8 𝑎𝑎𝑎𝑎𝑎𝑎 𝑘𝑘 = 0
𝑋𝑋 0 = 𝐴𝐴(0) + 𝑊𝑊8 0 𝐵𝐵(0) → (1)

𝑋𝑋 4 = 𝐴𝐴(0) + 𝑊𝑊8 4 𝐵𝐵(0) → 2


Substitute 𝑁𝑁 = 8 𝑎𝑎𝑎𝑎𝑎𝑎 𝑘𝑘 = 1
𝑋𝑋 1 = 𝐴𝐴(1) + 𝑊𝑊81 𝐵𝐵(1) → (1)

𝑋𝑋 5 = 𝐴𝐴(1) + 𝑊𝑊8 5 𝐵𝐵(1) → 2

5
Fast Fourier Transform [FFT]
Computational Analysis of N-point Radix-2 FFT
A single 2-point Butterfly structure: The FFT building block

There are two twiddle factors in each 2-point butterfly structure which
are

𝑘𝑘+𝑁𝑁/2
𝑊𝑊𝑁𝑁𝑘𝑘 𝑎𝑎𝑎𝑎𝑎𝑎 𝑊𝑊𝑁𝑁

6
Fast Fourier Transform [FFT]
Computational Analysis of N-point Radix-2 FFT

A single 2-point Butterfly structure: The FFT building block

7
Fast Fourier Transform [FFT]
Computational Analysis of N-point Radix-2 FFT

A single 2-point Butterfly structure: The FFT building block

Each butterfly contains two complex multiplies and two


complex additions

8
Fast Fourier Transform [FFT]
Property of Twiddle factors

𝑁𝑁
𝑘𝑘 𝐾𝐾+
There are two twiddle factors 𝑾𝑾𝑁𝑁 and 𝑾𝑾𝑁𝑁 2
in each 2-point butterfly structure
which differ from each other by a negative sign only because of
𝑁𝑁
𝐾𝐾+
Symmetry property 𝑾𝑾𝑁𝑁 2 = − 𝑾𝑾𝑁𝑁 𝑘𝑘

For example,

𝑊𝑊21 = −(𝑊𝑊20 ) ⇒ − 1 = −(1)

𝑊𝑊43 = −(𝑊𝑊41 ) ⇒ + 𝑗𝑗 = −(−𝑗𝑗)

𝑊𝑊87 = −(𝑊𝑊83 ) ⇒ 0.707 + 𝑗𝑗𝑗.707 = −(−0.707 − 𝑗𝑗𝑗.707)

9
Fast Fourier Transform [FFT]
Computational Analysis of N-point Radix-2 FFT

A single 2-point Butterfly structure

10
Fast Fourier Transform [FFT]
Computational Analysis of N-point Radix-2 FFT

A single 2-point Butterfly structure

11
Fast Fourier Transform [FFT]
Computational Analysis of N-point Radix-2 FFT
A single 2-point Optimized Butterfly structure

Each butterfly now contains one complex multiplication


and two complex additions
Subtraction is also addition with 2’s complement
12
Fast Fourier Transform [FFT]
Computational Analysis of N-point Radix-2 FFT
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 =

𝑁𝑁𝑢𝑢𝑢𝑢𝑢𝑢𝑢𝑢𝑢𝑢 𝑜𝑜𝑜𝑜 𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 𝑝𝑝𝑝𝑝𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 =

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 𝑖𝑖𝑖𝑖 𝑁𝑁 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 − 2 𝐹𝐹𝐹𝐹𝐹𝐹 =

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀 =

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴 =

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 =

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 =

13
Fast Fourier Transform [FFT]

14
Fast Fourier Transform [FFT]
Computational Analysis of N-point Radix-2 FFT
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 = 𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁

𝑁𝑁
𝑁𝑁𝑢𝑢𝑢𝑢𝑢𝑢𝑢𝑢𝑢𝑢 𝑜𝑜𝑜𝑜 𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 𝑝𝑝𝑝𝑝𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 =
2

𝑁𝑁
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 𝑖𝑖𝑖𝑖 𝑁𝑁 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 − 2 𝐹𝐹𝐹𝐹𝐹𝐹 = 𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁
2
𝑁𝑁
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀 = 𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁
2

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴 = 𝑁𝑁𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁

𝑁𝑁
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 = 𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁 + 𝑁𝑁𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁
2

3𝑁𝑁
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 = 𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁
2
15
Fast Fourier Transform [FFT]
Computational Analysis of N-point Radix-2 FFT

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀 = 4 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀


𝑁𝑁
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀 = 4 𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁
2

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀 = 2𝑁𝑁𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴 = 2 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀 + 2 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴

𝑁𝑁
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴 = 2 𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁 + 2 𝑁𝑁𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁
2

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴 = 3𝑁𝑁𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁

𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 = 2𝑁𝑁𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁 + 3𝑁𝑁𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁


𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 = 5𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁2 𝑁𝑁

16
Fast Fourier Transform [FFT]
Computational Analysis of N-point Radix-2 FFT

𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂 𝑜𝑜𝑜𝑜 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝑖𝑖𝑖𝑖 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 − 2 𝐹𝐹𝐹𝐹𝐹𝐹 =

𝑁𝑁𝑙𝑙𝑙𝑙𝑙𝑙2 𝑁𝑁

17
Fast Fourier Transform [FFT]
Comparison of DFT and FFT Computations (Complex Multiplications)

18
Fast Fourier Transform [FFT]
Computational Analysis of N-point Radix-2 FFT
Speed Improvement Factor {SIF}
𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑖𝑖𝑖𝑖 𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 𝐷𝐷𝐷𝐷𝐷𝐷
SIF =
𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑖𝑖𝑖𝑖 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 2 𝐹𝐹𝐹𝐹𝐹𝐹

𝑋𝑋
SIF =
𝑌𝑌

SIF shows how many times FFT algorithm is faster than DFT. In other words it indicates
the factor by which speed is improved in calculation of Fourier Transform

𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 𝑖𝑖𝑖𝑖 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑜𝑜𝑜𝑜 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐


𝐷𝐷𝐷𝐷𝐷𝐷 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 − 𝐹𝐹𝐹𝐹𝐹𝐹 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
= × 100
𝐷𝐷𝐷𝐷𝐷𝐷 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
𝑋𝑋 − 𝑌𝑌
𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 𝑖𝑖𝑖𝑖 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑜𝑜𝑜𝑜 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = × 100
𝑋𝑋

19
Fast Fourier Transform [FFT]
Example: Computational Analysis of N-point Radix-2 FFT

Calculate SIF and % savings for

a) N= 1024 samples
b) N=2 samples

𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝑜𝑜𝑜𝑜 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑖𝑖𝑖𝑖 𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 𝐷𝐷𝐷𝐷𝐷𝐷


SIF =
𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝑜𝑜𝑜𝑜 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑖𝑖𝑖𝑖 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 2 𝐹𝐹𝐹𝐹𝐹𝐹

𝐷𝐷𝐷𝐷𝐷𝐷 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 − 𝐹𝐹𝐹𝐹𝐹𝐹 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐


%𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑖𝑖𝑖𝑖 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = × 100
𝐷𝐷𝐷𝐷𝐷𝐷 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

𝑋𝑋 − 𝑌𝑌
%𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑖𝑖𝑖𝑖 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = × 100
𝑋𝑋

20
Fast Fourier Transform [FFT]
Example: Computational Analysis of N-point Radix-2 FFT
Solution
a) N= 1024 samples
8𝑁𝑁 2 − 2𝑁𝑁
SIF =
5𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁2 𝑁𝑁

8 1024 2 − 2 1024
SIF =
5 1024 𝑙𝑙𝑙𝑙𝑙𝑙2 1024

8386560
SIF =
51200

SIF = 163.8 times

SIF ≈ 164 times

21
Fast Fourier Transform [FFT]
Example: Computational Analysis of N-point Radix-2 FFT
Solution

a) N= 1024 samples

𝐷𝐷𝐷𝐷𝐷𝐷 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 − 𝐹𝐹𝐹𝐹𝐹𝐹 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐


%𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑖𝑖𝑖𝑖 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = × 100
𝐷𝐷𝐷𝐷𝐷𝐷 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

𝑋𝑋 − 𝑌𝑌
%𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑖𝑖𝑖𝑖 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = × 100
𝑋𝑋

8386560 − 51200
%𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑖𝑖𝑖𝑖 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = × 100
8386560

%𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑖𝑖𝑖𝑖 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 99.37%

22
Fast Fourier Transform [FFT]
Example: Computational Analysis of N-point Radix-2 FFT
Solution
b) N=2 samples
8𝑁𝑁 2 − 2𝑁𝑁
SIF =
5𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁2 𝑁𝑁

8 2 2−2 2
SIF =
5 2 𝑙𝑙𝑙𝑙𝑙𝑙2 2

28
SIF =
10

SIF = 2.8 times

SIF ≈ 3 times

23
Fast Fourier Transform [FFT]
Example: Computational Analysis of N-point Radix-2 FFT

Solution

b) N=2 samples

𝐷𝐷𝐷𝐷𝐷𝐷 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 − 𝐹𝐹𝐹𝐹𝐹𝐹 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐


%𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑖𝑖𝑖𝑖 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = × 100
𝐷𝐷𝐷𝐷𝐷𝐷 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

𝑋𝑋 − 𝑌𝑌
%𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑖𝑖𝑖𝑖 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = × 100
𝑋𝑋

28 − 10
%𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑖𝑖𝑖𝑖 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = × 100
28

%𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑖𝑖𝑖𝑖 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 64.285%

24
Fast Fourier Transform [FFT]

Inverse Fast Fourier Transform


[IFFT]

25
Fast Fourier Transform [FFT]
Computing IFFT using Forward FFT

Method-1: Conjugate Method

26
Fast Fourier Transform [FFT]
Computing IFFT using Forward FFT

Method-1: Conjugate Method

Steps:

a) Take the conjugate of X(k) i.e. 𝑋𝑋 ∗ 𝑘𝑘


b) Take the forward DFT/FFT of 𝑋𝑋 ∗ 𝑘𝑘
c) Take the conjugate of the results of forward DFT/FFT calculated in (b)
d) Divide the result found in (c) by ‘N’ to get x(n)

27
Fast Fourier Transform [FFT]
Computing IFFT using Forward FFT

Method-2: Swapping Method

28
Fast Fourier Transform [FFT]
Computing IFFT using Forward FFT

Method-2: Swapping Method

Steps:

a) Swap the real and imaginary parts of X(k) i.e. 𝑋𝑋𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑘𝑘


b) Apply forward DFT/FFT on the 𝑋𝑋𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑘𝑘
c) Again swap the real and imaginary parts of the result of forward DFT/FFT
found in (b)
d) Divide the results found in (c) by ‘N’ to get x(n)

29
Fast Fourier Transform [FFT]
Computing IFFT using Forward FFT

Example-1:

Find IFFT of the following frequency domain sequence:

X k = 0∠0°, 4∠ − 90°, 2∠45°, 0∠0°, 0∠0°, 0∠0°, 2∠ − 45°, 4∠90°

By

1) Conjugate Method
2) Swapping Method

30
Fast Fourier Transform [FFT]
Computing IFFT using Forward FFT

Example-2:

Find IFFT of the following frequency domain sequence:

X k = 0∠0°, 4∠ − 90°, 2∠45°, 0∠0°, 0∠0°, 0∠0°, 2∠ − 45°, 4∠30°

By

1) Conjugate Method
2) Swapping Method

31
EE-394 Digital Signal Processing
TE (EE) Fall 2020
Resource Persons: Dr. Saad Ahmed Qazi
Nabeel Fayyaz
Muhammad Omar
Part-C

Discrete-time Systems

2
Discrete time Systems
Discrete Systems

• Discrete systems are used to process (manipulate or modify) discrete signals in


meaningful ways

• They take a discrete signal (sequence of numbers) as an input and generate a


discrete signal at their output

• A discrete-time system is a device or algorithm that, according to some well-


defined rule, operates on a discrete-time signal called the input signal or
excitation to produce another discrete-time signal called the output signal or
response

3
Discrete time Systems
Signal-system interaction
Signal-system interaction involving a single-input single-output discrete-time
system is illustrated as:

4
Discrete time Systems
Real-time Processing
• Performs operations on real-time data/live data

• In real-time data, only present and past values of the signal are available at the
time of processing

Post Processing/Off-line Processing

• Performs operations on recorded data

• In recorded data, all values of the signal are available at the time of processing

5
Discrete time Systems
Difference Equations

• An equation describing the input-output relationship of the discrete-time


system is called difference equation

• Discrete-time systems can be modeled with difference equations involving


current/present, previous/past, or future samples of input and/or output signals

• In difference equations, there are three basic operations:

❖ Addition

❖ Scalar Multiplication

❖ Delay or Advance operation

6
Discrete time Systems
• Time Delay

To access or to read previous/past values of signal

A signal moves to right or origin moves to left

A signal 𝑥 𝑛 is said to be delayed by ‘k’ samples or ‘k’ units if 𝑥 𝑛 is replaced by


𝑥 𝑛−𝑘

𝑥 𝑛 original signal
𝑥 𝑛−𝑘 delayed version of original signal 𝑥 𝑛 by ‘k’ samples

7
Discrete time Systems
• Time Delay
Example

−3 −2 −1 0 1 2 3 4 5
𝑥 𝑛 = 1 , 1 , 2 , 3, 4 , 5 , 5 , 5 , 5

Delay the sequence by 2 samples or calculate 𝑥 𝑛 − 2

−1 0 1 2 3 4 5 6 7
𝑥 𝑛−2 = 1 , 1 , 2 , 3 , 4 , 5 , 5 , 5 , 5

𝑥 𝑛 − 2 means reading the sample values 2 samples before the current one in computer memory (array
or register) of processor

In general,

𝑥 𝑛 − 𝑘 means reading the sample values ‘k’ samples before the current one in computer memory (array
or register) of processor

8
Discrete time Systems
• Time Delay in the case of Recorded data

9
Discrete time Systems
• Time Delay in the case of Real-time data

10
Discrete time Systems
• Time Delay

• Time delay operation is applicable for both real-time and recorded data

• Time delay operation can be used in both real-time processing and post-
processing

11
Discrete time Systems
• Time Advance

To access or to read future (next coming) values of signal

A signal moves to left or origin moves to right

A signal 𝑥 𝑛 is said to be advanced by ‘k’ samples or ‘k’ units if 𝑥 𝑛 is replaced by


𝑥 𝑛+𝑘

𝑥 𝑛 original signal
𝑥 𝑛+𝑘 advanced version of original signal 𝑥 𝑛 by ‘k’ samples

12
Discrete time Systems
• Time Advance
Example

−3 −2 −1 0 1 2 3 4 5
𝑥 𝑛 = 1 , 1 , 2 , 3, 4 , 5 , 5 , 5 , 5

Advance the sequence by 2 samples or calculate 𝑥 𝑛 + 2

−5 −4 −3 −2 −1 0 1 2 3
𝑥 𝑛+2 = 1 , 1 , 2 , 3 , 4 ,5 , 5 , 5 , 5

𝑥 𝑛 + 2 means reading the sample values 2 samples down in the computer memory (array or
register) of processor

In general,

𝑥 𝑛 + 𝑘 means reading the sample values ‘k’ samples down in the computer memory (array or
register) of processor
13
Discrete time Systems
• Time Advance in the case of Recorded data

14
Discrete time Systems
• Time Advance in the case of Real-time data

15
Discrete time Systems
Time Advance

• Time advance operation is applicable only for recorded data

• Time advance operation can be used only in post-processing or offline-


processing

16
Discrete time Systems
Basic components of Discrete systems

The three basic components of discrete systems:

• Adders

• Multipliers

• Delay operators or Advance operators

17
Discrete time Systems
Example

For
𝑛, −3 ≤ 𝑛 ≤ 3
𝑥 𝑛 =ቊ
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Find the sequence of 𝑦 𝑛 for the following systems:

1) 𝑦 𝑛 = 𝑥 𝑛

2) 𝑦 𝑛 = 𝑥 𝑛 − 1

3) 𝑦 𝑛 = 𝑥 𝑛 + 1
1
4) 𝑦 𝑛 = 3 𝑥 𝑛 +𝑥 𝑛−1 +𝑥 𝑛+1

5) 𝑦 𝑛 = 𝑚𝑎𝑥 [ 𝑥 𝑛 , 𝑥 𝑛 − 1 , 𝑥 𝑛 + 1 ]

6) 𝑦 𝑛 = σ𝑛𝑘=−∞ 𝑥 𝑘
18
Discrete time Systems
Example

For
𝑛, −3 ≤ 𝑛 ≤ 3
𝑥 𝑛 =ቊ
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Find the sequence of 𝑦 𝑛 for the following systems:

1) 𝑦 𝑛 = 𝑥 𝑛 Identity System

2) 𝑦 𝑛 = 𝑥 𝑛 − 1 Unit delay system

3) 𝑦 𝑛 = 𝑥 𝑛 + 1 Unit advance system

1
4) 𝑦 𝑛 = 3 𝑥 𝑛 +𝑥 𝑛−1 +𝑥 𝑛+1 Moving average system

5) 𝑦 𝑛 = 𝑚𝑎𝑥 [ 𝑥 𝑛 , 𝑥 𝑛 − 1 , 𝑥 𝑛 + 1 ] Maximum value finder

6) 𝑦 𝑛 = σ𝑛𝑘=−∞ 𝑥 𝑘 Accumulator
19
Discrete time Systems
−3 −2 −1 0 1 2 3
𝑥 𝑛 = 3 , 2 , 1 , 0, 1 , 2 , 3

1) 𝑦 𝑛 =𝑥 𝑛

−3 −2 −1 0 1 2 3
𝑦 𝑛 = 3 , 2 , 1 , 0, 1 , 2 , 3

20
Discrete time Systems
−3 −2 −1 0 1 2 3
𝑥 𝑛 = 3 , 2 , 1 , 0, 1 , 2 , 3

2) 𝑦 𝑛 = 𝑥 𝑛−1

−2 −1 0 1 2 3 4
𝑦 𝑛 = 3, 2, 1 , 0 ,1 ,2 , 3

21
Discrete time Systems
−3 −2 −1 0 1 2 3
𝑥 𝑛 = 3 , 2 , 1 , 0, 1 , 2 , 3

3) 𝑦 𝑛 = 𝑥 𝑛+1

−4 −3 −2 −1 0 1 2
𝑦 𝑛 = 3 , 2 , 1 , 0 ,1, 2 , 3

22
Discrete time Systems
−3 −2 −1 0 1 2 3
𝑥 𝑛 = 3 , 2 , 1 , 0, 1 , 2 , 3

1
4) 𝑦 𝑛 = 𝑥 𝑛+1 +𝑥 𝑛 +𝑥 𝑛−1
3

−4 −3 −2 −1 0 1 2
𝑥 𝑛+1 = 3 , 2 , 1 , 0 ,1, 2 , 3
↑ 1 −4 −3 −2 −1 0 1 2 3 4
𝑦 𝑛 = 3 , 5 , 6 , 3 , 2, 3 , 6 , 5 , 3
−3 −2 −1 0 1 2 3 3

𝑥 𝑛 = 3 , 2 , 1 , 0, 1 , 2 , 3
↑ −4 −3 −2 −1 0 1 2 3 4
𝑦 𝑛 = 1 , 5/3, 2 , 1 , 2/3 , 1 , 2 , 5/3 , 1
−2 −1 0 1 2 3 4 ↑
𝑥 𝑛−1 = 3 , 2 , 1 , 0 , 1 , 2 , 3

23
Discrete time Systems
−3 −2 −1 0 1 2 3
𝑥 𝑛 = 3 , 2 , 1 , 0, 1 , 2 , 3

1
4) 𝑦 𝑛 = 𝑥 𝑛+1 +𝑥 𝑛 +𝑥 𝑛−1
3
1 1
𝑦 −4 = 𝑥 −3 + 𝑥 −4 + 𝑥 −5 = 3+0+0 =1
3 3
1 1
𝑦 −3 = 𝑥 −2 + 𝑥 −3 + 𝑥 −4 = 2 + 3 + 0 = 5/3
3 3
1 1
𝑦 −2 = 𝑥 −1 + 𝑥 −2 + 𝑥 −3 = 1+2+3 = 2
3 3
1 1
𝑦 −1 = 𝑥 0 + 𝑥 −1 + 𝑥 −2 = 0+1+2 = 1
3 3
1 1
𝑦 0 = 𝑥 1 + 𝑥 0 + 𝑥 −1 = 1 + 0 + 1 = 2/3
3 3
1 1
𝑦 1 = 𝑥 2 +𝑥 1 +𝑥 0 = 2+1+0 = 1
3 3
1 1
𝑦 2 = 𝑥 3 +𝑥 2 +𝑥 1 = 3+2+1 = 2
3 3
1 1
𝑦 3 = 𝑥 4 +𝑥 3 +𝑥 2 = 0 + 3 + 2 = 5/3
3 3
1 1
𝑦 4 = 𝑥 5 +𝑥 4 +𝑥 3 = 0+0+3 =1
3 3
24
Discrete time Systems
−3 −2 −1 0 1 2 3
𝑥 𝑛 = 3 , 2 , 1 , 0, 1 , 2 , 3

5) 𝑦 𝑛 = 𝑚𝑎𝑥 𝑥 𝑛 +1 , 𝑥 𝑛 ,𝑥 𝑛 −1

−3 −2 −1 0 1 2 3
𝑥 𝑛 = 3 , 2 , 1 , 0, 1 , 2 , 3

−2 −1 0 1 2 3 4 −4 −3 −2 −1 0 1 2 3 4
𝑥 𝑛−1 = 3 , 2 , 1 , 0 , 1 , 2 , 3 𝑦 𝑛 = 3 , 3 , 3 , 2 , 1, 2 , 3 , 3 , 3
↑ ↑
−4 −3 −2 −1 0 1 2
𝑥 𝑛+1 = 3 , 2 , 1 , 0 ,1, 2 , 3

25
Discrete time Systems
−3 −2 −1 0 1 2 3
𝑥 𝑛 = 3 , 2 , 1 , 0, 1 , 2 , 3

6) 𝑦 𝑛 = σ𝑛𝑘=−∞ 𝑥 𝑘 = 𝑥 𝑛 + 𝑥 𝑛 − 1 + 𝑥 𝑛 − 2 + ⋯

Method-1
• Accumulator is a system which collects all the sample values from −∞ to the current
instant ‘n’ and provides their summation
• Accumulator computes the running sum of all the past input values up to the present
time
−∞ −6 −5 −4 −3 −2 −1 0 1 2 3
𝑥 𝑛 = 0 ……….., 0 , 0 , 0 , 3 , 2 , 1 , 0 , 1 , 2 , 3

26
Discrete time Systems
−3 −2 −1 0 1 2 3
𝑥 𝑛 = 3 , 2 , 1 , 0, 1 , 2 , 3

6) 𝑦 𝑛 = σ𝑛𝑘=−∞ 𝑥 𝑘 = 𝑥 𝑛 + 𝑥 𝑛 − 1 + 𝑥 𝑛 − 2 + ⋯

Method-1
• Accumulator is a system which collects all the sample values from −∞ to the current
instant ‘n’ and provides their summation
• Accumulator computes the running sum of all the past input values up to the present
time
−∞ −6 −5 −4 −3 −2 −1 0 1 2 3
𝑥 𝑛 = 0 ……….., 0 , 0 , 0 , 3 , 2 , 1 , 0 , 1 , 2 , 3

−4 −3 −2 −1 0 1 2 3 4 5
𝑦 𝑛 = 0 , 3 , 5 , 6 , 6 , 7 , 9 , 12 , 12 , 12

27
Discrete time Systems
−3 −2 −1 0 1 2 3
𝑥 𝑛 = 3 , 2 , 1 , 0, 1 , 2 , 3

6) 𝑦 𝑛 = σ𝑛𝑘=−∞ 𝑥 𝑘

Method-2
𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝑜𝑢𝑡𝑝𝑢𝑡 = 𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝑖𝑛𝑝𝑢𝑡 + 𝑃𝑟𝑒𝑣𝑖𝑜𝑢𝑠 𝑜𝑢𝑡𝑝𝑢𝑡

𝑦 𝑛 = 𝑥 𝑛 +𝑦 𝑛−1

−∞ −6 −5 −4 −3 −2 −1 0 1 2 3
𝑥 𝑛 = 0 ……….., 0 , 0 , 0 , 3 , 2 , 1 , 0 , 1 , 2 , 3

−4 −3 −2 −1 0 1 2 3 4 5
𝑦 𝑛 = 0 , 3 , 5 , 6 , 6 , 7 , 9 , 12 , 12 , 12

28
Discrete time Systems
−3 −2 −1 0 1 2 3
𝑥 𝑛 = 3 , 2 , 1 , 0, 1 , 2 , 3

6) 𝑦 𝑛 = σ𝑛𝑘=−∞ 𝑥 𝑘

Method-2
𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝑜𝑢𝑡𝑝𝑢𝑡 = 𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝑖𝑛𝑝𝑢𝑡 + 𝑃𝑟𝑒𝑣𝑖𝑜𝑢𝑠 𝑜𝑢𝑡𝑝𝑢𝑡

𝑦 𝑛 = 𝑥 𝑛 +𝑦 𝑛−1

29
Discrete time Systems
Real-time Processing
• Performs operations on real-time data/live data

• Real time signal processing systems cannot deal with future values of signal i.e.
we can use only present and past values of signal during real-time processing

Post Processing/Off-line Processing

• Performs operations on recorded data

• In recorded data, all values of the signal are available at the time of processing

• In post processing systems, we can access all values of signal including present,
past and future
30
Discrete time Systems
Example

For the following systems, identify which one can process a signal in real-time?

1) 𝑦 𝑛 = 𝑥 𝑛

2) 𝑦 𝑛 = 𝑥 𝑛 − 1

3) 𝑦 𝑛 = 𝑥 𝑛 + 1

1
4) 𝑦 𝑛 = 3 𝑥 𝑛 +𝑥 𝑛−1 +𝑥 𝑛+1

5) 𝑦 𝑛 = 𝑚𝑎𝑥 [ 𝑥 𝑛 , 𝑥 𝑛 − 1 , 𝑥 𝑛 + 1 ]

6) 𝑦 𝑛 = σ𝑛𝑘=−∞ 𝑥 𝑘
31
Discrete time Systems
Example

For the following systems, identify which one can process a signal in real-time?

1) 𝑦 𝑛 = 𝑥 𝑛 Real-time processing

2) 𝑦 𝑛 = 𝑥 𝑛 − 1 Real-time processing

3) 𝑦 𝑛 = 𝑥 𝑛 + 1 Non real-time (Off-line) processing

1
4) 𝑦 𝑛 = 3 𝑥 𝑛 +𝑥 𝑛−1 +𝑥 𝑛+1 Non real-time (Off-line) processing

5) 𝑦 𝑛 = 𝑚𝑎𝑥 [ 𝑥 𝑛 , 𝑥 𝑛 − 1 , 𝑥 𝑛 + 1 ] Non real-time (Off-line) processing

6) 𝑦 𝑛 = σ𝑛𝑘=−∞ 𝑥 𝑘 Real-time processing


32
EE-394 Digital Signal Processing
TE (EE) Fall 2020
Resource Persons: Dr. Saad Ahmed Qazi
Nabeel Fayyaz
Muhammad Omar
Discrete time Systems
Properties of Discrete time Systems

• Memory Requirement

• Causality

• Stability

• Linearity

• Time invariance

2
Memory Requirement

Static Vs. Dynamic Systems

3
Discrete time Systems
• Memory Requirement (Static Vs. Dynamic Systems)

Static/Stationary/Instantaneous/Memoryless System

A system whose current (present) output 𝑦𝑦 𝑛𝑛 depends only on the present values
(samples) of input

𝑦𝑦 𝑛𝑛 = 𝑓𝑓 [𝑥𝑥 𝑛𝑛 ]

There is no need of storing sample values in computer memory because we are


not required to access either previous or future values in order to compute the
present output

Static systems do not include any delay or advance elements (memory)

4
Discrete time Systems
• Memory Requirement (Static Vs. Dynamic Systems)

Static/Stationary/Instantaneous/Memoryless System

Examples

𝑦𝑦 𝑛𝑛 = 3𝑥𝑥 𝑛𝑛

𝑦𝑦 𝑛𝑛 = 𝑥𝑥 3 𝑛𝑛 + 2𝑥𝑥 𝑛𝑛

𝑦𝑦 𝑛𝑛 = 𝑥𝑥 2 𝑛𝑛 + 4𝑥𝑥 3 𝑛𝑛 + 𝑥𝑥 𝑛𝑛

5
Discrete time Systems
• Memory Requirement (Static Vs. Dynamic Systems)

Dynamic System/Memory based System

A system whose current (present) output 𝑦𝑦 𝑛𝑛 depends on the previous (past)


and/or future values (samples) of input

𝑦𝑦 𝑛𝑛 = 𝑓𝑓 [𝑥𝑥 𝑛𝑛 − 𝑘𝑘 , 𝑥𝑥 𝑛𝑛 + 𝑘𝑘 ]

We need to store sample values in computer memory because we have to use


either previous or future values in order to compute the present output

Dynamic systems will definitely include delay or advance elements (memory


blocks)

6
Discrete time Systems
• Memory Requirement (Static Vs. Dynamic Systems)

Dynamic System/Memory based System

Examples

𝑦𝑦 𝑛𝑛 = 2𝑥𝑥 𝑛𝑛 − 1

𝑦𝑦 𝑛𝑛 = 3𝑥𝑥 𝑛𝑛 + 2

𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 1 + 4𝑥𝑥 𝑛𝑛 + 2

𝑦𝑦 𝑛𝑛 = 0.1𝑥𝑥 𝑛𝑛 + 0.5𝑥𝑥 𝑛𝑛 − 1 + 0.6𝑥𝑥 𝑛𝑛 + 2

𝑦𝑦 𝑛𝑛 = 0.1𝑥𝑥 𝑛𝑛 − 0.3𝑥𝑥 𝑛𝑛 − 1 + 0.5𝑥𝑥 𝑛𝑛 − 2 − 0.3𝑥𝑥 𝑛𝑛 − 3 + 0.1𝑥𝑥 𝑛𝑛 − 4

7
Discrete time Systems
• Memory Requirement (Static Vs. Dynamic Systems)

Key Concept

• All static systems can support real-time processing

• All dynamic systems cannot support real-time processing

Only those dynamic systems which depend upon previous values (of input or output) to
compute the current output can support real-time processing

The dynamic systems which depend upon future values of input to compute the current
output cannot support real-time processing

• The higher the order of discrete time (dynamic) system, the more will be the
memory requirement

8
Causality

Causal Vs. Non Causal Systems

9
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)
Causal System

1) A system whose current (present) output 𝑦𝑦 𝑛𝑛 depends on the current (present)


and/or previous (past) samples of input

𝑦𝑦 𝑛𝑛 = 𝑓𝑓 [𝑥𝑥 𝑛𝑛 , 𝑥𝑥 𝑛𝑛 − 𝑘𝑘 ]

2) A system whose output cannot occur before the start of input sequence i.e. output
of system cannot happen before the application of input

3) A system whose impulse response ℎ 𝑛𝑛 exists for 𝑛𝑛 ≥ 0

Note:

• All causal systems can support real-time processing i.e. they can process signal in
real-time. No need to provide recorded data.

10
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)

Causal System

Examples

𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛

𝑦𝑦 𝑛𝑛 = 2𝑥𝑥 𝑛𝑛 − 1

𝑦𝑦 𝑛𝑛 = 0.1𝑥𝑥 𝑛𝑛 + 0.5𝑥𝑥 𝑛𝑛 − 4

11
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)
Non Causal System

1) A system whose current (present) output 𝑦𝑦 𝑛𝑛 depends upon future values of input

𝑦𝑦 𝑛𝑛 = 𝑓𝑓 [𝑥𝑥 𝑛𝑛 + 𝑘𝑘 ]

2) A system whose output can occur before the start of input sequence

3) A system whose impulse response ℎ 𝑛𝑛 exists for 𝑛𝑛 < 0

Note:

• All non causal systems can process recorded data only i.e. processing is done off-line
(non real time)

12
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)

Non Causal System

Examples

𝑦𝑦 𝑛𝑛 = 0.2𝑥𝑥 𝑛𝑛 + 1

𝑦𝑦 𝑛𝑛 = 2𝑥𝑥 𝑛𝑛 − 1 + 3𝑥𝑥 𝑛𝑛 + 2

𝑦𝑦 𝑛𝑛 = 0.1𝑥𝑥 𝑛𝑛 + 0.5𝑥𝑥 𝑛𝑛 − 2 + 0.3𝑥𝑥 𝑛𝑛 + 3

13
Discrete time Systems
Relation between Memory and Causality

Key Concept

• All static systems are causal as well

• Dynamic systems can be causal or non causal

• Causal systems can be either static or dynamic

• All non causal systems will be dynamic as well

14
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)

Example-1

0 1 2
Find the response 𝑦𝑦 𝑛𝑛 of the following systems when 𝑥𝑥 𝑛𝑛 = 3 , 2 , 1 is

applied at the system input:

1) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 𝑥𝑥 𝑛𝑛 − 1

2) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 𝑥𝑥 𝑛𝑛 + 1

15
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)

Example-1

1) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 𝑥𝑥 𝑛𝑛 − 1

0 1 2
𝑥𝑥 𝑛𝑛 = 3 , 2 , 1

0 1 2 3
𝑥𝑥 𝑛𝑛 − 1 = 0 , 3 , 2 , 1

0 1 2 3
𝑦𝑦 𝑛𝑛 = 3 , 5 , 3 , 1

16
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)

Example-1

2) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 𝑥𝑥 𝑛𝑛 + 1

0 1 2
𝑥𝑥 𝑛𝑛 = 3 , 2 , 1

−1 0 1
𝑥𝑥 𝑛𝑛 + 1 = 3 , 2 , 1

−1 0 1 2
𝑦𝑦 𝑛𝑛 = 3 , 5 , 3 , 1

17
Discrete time Systems
• Causality (Causal Vs. Non-Causal Systems)
Impulse Response

It is the output of a system in response to unit impulse signal applied at the


system’s input
0
Unit Impulse function 𝛿𝛿 𝑛𝑛 = 1

Impulse Response ℎ 𝑛𝑛

18
Discrete time Systems
• Causality (Causal Vs. Non-Causal Systems)
Example-2

Calculate the impulse response ℎ 𝑛𝑛 of the following systems :

1) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 𝑥𝑥 𝑛𝑛 − 1

2) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 𝑥𝑥 𝑛𝑛 + 1

19
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)
Example-2

For the calculation of impulse response ℎ 𝑛𝑛

𝑥𝑥 𝑛𝑛 will be replaced by 𝛿𝛿 𝑛𝑛
𝑦𝑦 𝑛𝑛 will be replaced by ℎ 𝑛𝑛

1) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 𝑥𝑥 𝑛𝑛 − 1

ℎ 𝑛𝑛 = 𝛿𝛿 𝑛𝑛 + 𝛿𝛿 𝑛𝑛 − 1

0
𝛿𝛿 𝑛𝑛 = 1

0 1
𝛿𝛿 𝑛𝑛 − 1 = 0 , 1

0 1
h 𝑛𝑛 = 1 , 1

20
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)
Example-2

For the calculation of impulse response ℎ 𝑛𝑛

𝑥𝑥 𝑛𝑛 will be replaced by 𝛿𝛿 𝑛𝑛
𝑦𝑦 𝑛𝑛 will be replaced by ℎ 𝑛𝑛

2) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 𝑥𝑥 𝑛𝑛 + 1

ℎ 𝑛𝑛 = 𝛿𝛿 𝑛𝑛 + 𝛿𝛿 𝑛𝑛 + 1

0
𝛿𝛿 𝑛𝑛 = 1

−1 0
𝛿𝛿 𝑛𝑛 + 1 = 1 , 0

−1 0
h 𝑛𝑛 = 1 , 1

21
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)
Example-3

Determine whether the given discrete time systems support real-time processing or off-line
processing
0 1 2 3
1) ℎ 𝑛𝑛 = 0.9 , 0.8 , 0.7 , 0.6

−1 0 1 2
2) ℎ 𝑛𝑛 = 0.9 , 0.8 , 0.7 , 0.6

0 1 2 3 4
3) ℎ 𝑛𝑛 = 0 , 0.9 , 0.8 , 0.7 , 0.6

−4 −3 −2 −1 0 1 2 3 4
4) ℎ 𝑛𝑛 = 0 , 0 , 0 , 0 , 0 , 0.9 , 0.8 , 0.7 , 0.6

22
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)
Example-3

Determine whether the given discrete time systems support real-time processing or off-line
processing

0 1 2 3
1) ℎ 𝑛𝑛 = 0.9 , 0.8 , 0.7 , 0.6 Causal

−1 0 1 2
2) ℎ 𝑛𝑛 = 0.9 , 0.8 , 0.7 , 0.6 Non Causal

0 1 2 3 4
3) ℎ 𝑛𝑛 = 0 , 0.9 , 0.8 , 0.7 , 0.6 Causal

−4 −3 −2 −1 0 1 2 3 4
4) ℎ 𝑛𝑛 = 0 , 0 , 0 , 0 , 0 , 0.9 , 0.8 , 0.7 , 0.6 Causal

23
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)
Example-3

Determine whether the given discrete time systems support real-time processing or off-line
processing

−5 −4 −3 −2 −1 0 1 2 3 4
5) ℎ 𝑛𝑛 = 1 , 0 , 0 , 0 , 0 , 0 , 0.9 , 0.8 , 0.7 , 0.6

0 1 2 3 4
6) 𝑦𝑦 𝑛𝑛 = 1 , 0.9 , 0.8 , 0.7 , 0.6

24
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)
Example-3

Determine whether the given discrete time systems support real-time processing or off-line
processing

−5 −4 −3 −2 −1 0 1 2 3 4
5) ℎ 𝑛𝑛 = 1 , 0 , 0 , 0 , 0 , 0 , 0.9 , 0.8 , 0.7 , 0.6 Non Causal

0 1 2 3 4
6) 𝑦𝑦 𝑛𝑛 = 1 , 0.9 , 0.8 , 0.7 , 0.6

Since the given output signal is not representing impulse response of a system , we cannot
conclude system characteristics by just looking at 𝑦𝑦 𝑛𝑛 .

For system description, we need input-output pair. In the above example, the given information is
insufficient to answer the question because we do not know what 𝑥𝑥 𝑛𝑛 has been applied

25
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)
Example-3

Determine whether the given discrete time systems support real-time processing or off-line
processing

0 1 2 3 4
7) 𝑦𝑦 𝑛𝑛 = 1 , 0.9 , 0.8 , 0.7 , 0.6

0 1 2 3 4
𝑥𝑥 𝑛𝑛 = 0.1 , 0.2 , 0.3 , 0.4 , 0.5

0 1 2 3 4
8) 𝑦𝑦 𝑛𝑛 = 1 , 0.9 , 0.8 , 0.7 , 0.6

−2 −1 0 1 2
𝑥𝑥 𝑛𝑛 = 0.1 , 0.2 , 0.3 , 0.4 , 0.5

26
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)
Example-3

Determine whether the given discrete time systems support real-time processing or off-line
processing

0 1 2 3 4
7) 𝑦𝑦 𝑛𝑛 = 1 , 0.9 , 0.8 , 0.7 , 0.6

0 1 2 3 4
𝑥𝑥 𝑛𝑛 = 0.1 , 0.2 , 0.3 , 0.4 , 0.5 Causal

0 1 2 3 4
8) 𝑦𝑦 𝑛𝑛 = 1 , 0.9 , 0.8 , 0.7 , 0.6

−2 −1 0 1 2
𝑥𝑥 𝑛𝑛 = 0.1 , 0.2 , 0.3 , 0.4 , 0.5 Causal

27
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)

Example-3

Determine whether the given discrete time systems support real-time processing or off-line
processing

−2 −1 0 1 2
9) 𝑦𝑦 𝑛𝑛 = 1 , 0.9 , 0.8 , 0.7 , 0.6

−1 0 1 2 3
𝑥𝑥 𝑛𝑛 = 0.1 , 0.2 , 0.3 , 0.4 , 0.5

28
Discrete time Systems
• Causality (Causal Vs. Non Causal Systems)

Example-3

Determine whether the given discrete time systems support real-time processing or off-line
processing

−2 −1 0 1 2
9) 𝑦𝑦 𝑛𝑛 = 1 , 0.9 , 0.8 , 0.7 , 0.6

−1 0 1 2 3
𝑥𝑥 𝑛𝑛 = 0.1 , 0.2 , 0.3 , 0.4 , 0.5 Non Causal

29
Stability

FIR Systems Vs. IIR Systems

30
Discrete time Systems
• Stability (FIR Vs. IIR Systems)

Finite Impulse Response (FIR) System

• A system whose impulse response ℎ 𝑛𝑛 exists for finite amount of time i.e.
impulse response contains finite number of samples

• A system whose current (present) output 𝑦𝑦 𝑛𝑛 does not depend upon the
previous (past) output samples

𝑦𝑦 𝑛𝑛 ≠ 𝑓𝑓 [𝑦𝑦 𝑛𝑛 − 𝑘𝑘 ]

• No feedback is required in the implementation of FIR systems

31
Discrete time Systems
• Stability (FIR Vs. IIR Systems)

Finite Impulse Response (FIR) System

Examples

𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑥𝑥 𝑛𝑛 − 1

𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.7 𝑥𝑥 𝑛𝑛 + 1

𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑥𝑥 𝑛𝑛 − 1 + 0.8 𝑥𝑥 𝑛𝑛 − 2

𝑦𝑦 𝑛𝑛 = 0.3𝑥𝑥 𝑛𝑛 − 0.6 𝑥𝑥 𝑛𝑛 − 1 + 0.8 𝑥𝑥 𝑛𝑛 − 2 − 0.6 𝑥𝑥 𝑛𝑛 − 3 + 0.3𝑥𝑥 𝑛𝑛 − 4

32
Discrete time Systems
• Stability (FIR Vs. IIR Systems)

Infinite Impulse Response (IIR) System

• A system whose impulse response ℎ 𝑛𝑛 exists for infinite duration of time i.e.
impulse response contains infinite number of samples

• A system whose current (present) output 𝑦𝑦 𝑛𝑛 depends upon the previous


(past) output samples

𝑦𝑦 𝑛𝑛 = 𝑓𝑓 [𝑦𝑦 𝑛𝑛 − 𝑘𝑘 ]

• Feedback is involved in the implementation of IIR systems

33
Discrete time Systems
• Stability (FIR Vs. IIR Systems)

Infinite Impulse Response (IIR) System

Examples

𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑦𝑦 𝑛𝑛 − 1

𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑥𝑥 𝑛𝑛 − 1 + 0.8 𝑦𝑦 𝑛𝑛 − 2

𝑦𝑦 𝑛𝑛 = 0.3𝑥𝑥 𝑛𝑛 − 0.6 𝑥𝑥 𝑛𝑛 − 1 + 0.8 𝑦𝑦 𝑛𝑛 − 1 − 0.6 𝑥𝑥 𝑛𝑛 − 2 + 0.3 𝑦𝑦 𝑛𝑛 − 4

34
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-1

Calculate the impulse response ℎ 𝑛𝑛 of the following systems :

1) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑥𝑥 𝑛𝑛 − 1

2) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑥𝑥 𝑛𝑛 − 1 + 0.8 𝑥𝑥 𝑛𝑛 − 2

35
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-1

Calculate the impulse response ℎ 𝑛𝑛 of the following systems :

1) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑥𝑥 𝑛𝑛 − 1 Dynamic, Causal, FIR

2) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑥𝑥 𝑛𝑛 − 1 + 0.8 𝑥𝑥 𝑛𝑛 − 2 Dynamic, Causal, FIR

36
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-1

1) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑥𝑥 𝑛𝑛 − 1
ℎ 𝑛𝑛 = 𝛿𝛿 𝑛𝑛 + 0.9 𝛿𝛿 𝑛𝑛 − 1

ℎ −2 = 𝛿𝛿 −2 + 0.9 𝛿𝛿 −3 = 0 + 0.9(0) = 0
ℎ −1 = 𝛿𝛿 −1 + 0.9 𝛿𝛿 −2 = 0 + 0.9(0) = 0
ℎ 0 = 𝛿𝛿 0 + 0.9 𝛿𝛿 −1 = 1 + 0.9(0) = 1
ℎ 1 = 𝛿𝛿 1 + 0.9 𝛿𝛿 0 = 0 + 0.9 1 = 0.9
ℎ 2 = 𝛿𝛿 2 + 0.9 𝛿𝛿 1 = 0 + 0.9 0 = 0
ℎ 3 = 𝛿𝛿 3 + 0.9 𝛿𝛿 2 = 0 + 0.9 0 = 0

0 1
h 𝑛𝑛 = 1 , 0.9

37
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-1

1) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑥𝑥 𝑛𝑛 − 1

0 1
h 𝑛𝑛 = 1 , 0.9

Stable

38
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-1

2) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑥𝑥 𝑛𝑛 − 1 + 0.8 𝑥𝑥 𝑛𝑛 − 2
ℎ 𝑛𝑛 = 𝛿𝛿 𝑛𝑛 + 0.9 𝛿𝛿 𝑛𝑛 − 1 + 0.8𝛿𝛿 𝑛𝑛 − 2

ℎ −2 = 𝛿𝛿 −2 + 0.9 𝛿𝛿 −3 + 0. 8𝛿𝛿 −4 = 0 + 0.9(0) + 0.8(0) = 0


ℎ −1 = 𝛿𝛿 −1 + 0.9 𝛿𝛿 −2 + 0. 8𝛿𝛿 −3 = 0 + 0.9 0 + 0.8(0) = 0
ℎ 0 = 𝛿𝛿 0 + 0.9 𝛿𝛿 −1 + 0. 8𝛿𝛿 −2 = 1 + 0.9 0 + 0.8(0) = 1
ℎ 1 = 𝛿𝛿 1 + 0.9 𝛿𝛿 0 + 0. 8𝛿𝛿 −1 = 0 + 0.9 1 + 0.8(0) = 0.9
ℎ 2 = 𝛿𝛿 2 + 0.9 𝛿𝛿 1 + 0. 8𝛿𝛿 0 = 0 + 0.9 0 + 0.8(1) = 0.8
ℎ 3 = 𝛿𝛿 3 + 0.9 𝛿𝛿 2 + 0. 8𝛿𝛿 1 = 0 + 0.9 0 + 0.8(0) = 0

0 1 2
h 𝑛𝑛 = 1 , 0.9 , 0.8

39
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-1

2) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑥𝑥 𝑛𝑛 − 1 + 0.8 𝑥𝑥 𝑛𝑛 − 2

0 1 2
h 𝑛𝑛 = 1 , 0.9 , 0.8

Stable

40
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-2

Calculate the impulse response ℎ 𝑛𝑛 of the following systems :

1) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑦𝑦 𝑛𝑛 − 1

2) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 0.9 𝑦𝑦 𝑛𝑛 − 1

3) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 𝑦𝑦 𝑛𝑛 − 1

4) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 𝑦𝑦 𝑛𝑛 − 1

5) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 1.1 𝑦𝑦 𝑛𝑛 − 1

6) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 1.1 𝑦𝑦 𝑛𝑛 − 1

41
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-2

Calculate the impulse response ℎ 𝑛𝑛 of the following systems :

1) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑦𝑦 𝑛𝑛 − 1 Dynamic, Causal, IIR

2) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 0.9 𝑦𝑦 𝑛𝑛 − 1 Dynamic, Causal, IIR

3) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 𝑦𝑦 𝑛𝑛 − 1 Dynamic, Causal, IIR

4) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 𝑦𝑦 𝑛𝑛 − 1 Dynamic, Causal, IIR

5) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 1.1 𝑦𝑦 𝑛𝑛 − 1 Dynamic, Causal, IIR

6) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 1.1 𝑦𝑦 𝑛𝑛 − 1 Dynamic, Causal, IIR

42
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-2

1) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑦𝑦 𝑛𝑛 − 1
ℎ 𝑛𝑛 = 𝛿𝛿 𝑛𝑛 + 0.9 ℎ 𝑛𝑛 − 1

ℎ −2 = 𝛿𝛿 −2 + 0.9 ℎ −3 = 0 + 0.9(0) = 0
ℎ −1 = 𝛿𝛿 −1 + 0.9 ℎ −2 = 0 + 0.9(0) = 0
ℎ 0 = 𝛿𝛿 0 + 0.9 ℎ −1 = 1 + 0.9(0) = 1
ℎ 1 = 𝛿𝛿 1 + 0.9 ℎ 0 = 0 + 0.9 1 = 0.9
ℎ 2 = 𝛿𝛿 2 + 0.9 ℎ 1 = 0 + 0.9 0.9 = 0.81
ℎ 3 = 𝛿𝛿 3 + 0.9 ℎ 2 = 0 + 0.9 0.81 = 0.729

0 1 2 3
h 𝑛𝑛 = 1 , 0.9 , 0.81 , 0.729 , ………

h 𝑛𝑛 = 0.9 𝑛𝑛 𝑢𝑢 𝑛𝑛
43
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-2
1) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.9 𝑦𝑦 𝑛𝑛 − 1
0 1 2 3
h 𝑛𝑛 = 1 , 0.9 , 0.81 , 0.729 , ………

𝑛𝑛
h 𝑛𝑛 = 0.9 𝑢𝑢 𝑛𝑛

Stable

44
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-2
2) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 0.9 𝑦𝑦 𝑛𝑛 − 1
ℎ 𝑛𝑛 = 𝛿𝛿 𝑛𝑛 − 0.9 ℎ 𝑛𝑛 − 1

ℎ −2 = 𝛿𝛿 −2 − 0.9 ℎ −3 = 0 − 0.9(0) = 0
ℎ −1 = 𝛿𝛿 −1 − 0.9 ℎ −2 = 0 − 0.9(0) = 0
ℎ 0 = 𝛿𝛿 0 − 0.9 ℎ −1 = 1 − 0.9(0) = 1
ℎ 1 = 𝛿𝛿 1 − 0.9 ℎ 0 = 0 − 0.9 1 = −0.9
ℎ 2 = 𝛿𝛿 2 − 0.9 ℎ 1 = 0 − 0.9 −0.9 = 0.81
ℎ 3 = 𝛿𝛿 3 − 0.9 ℎ 2 = 0 − 0.9 0.81 = −0.729

0 1 2 3
h 𝑛𝑛 = 1 , −0.9 , 0.81 , −0.729 , ………

h 𝑛𝑛 = −0.9 𝑛𝑛 𝑢𝑢 𝑛𝑛
45
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-2
2) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 0.9 𝑦𝑦 𝑛𝑛 − 1
0 1 2 3
h 𝑛𝑛 = 1 , −0.9 , 0.81 , −0.729 , ………

𝑛𝑛
h 𝑛𝑛 = −0.9 𝑢𝑢 𝑛𝑛

Stable

46
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-2
3) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 𝑦𝑦 𝑛𝑛 − 1
ℎ 𝑛𝑛 = 𝛿𝛿 𝑛𝑛 + ℎ 𝑛𝑛 − 1

ℎ −2 = 𝛿𝛿
−2 + ℎ −3 = 0 + (0) = 0
ℎ −1 = 𝛿𝛿
−1 + ℎ −2 = 0 + (0) = 0
ℎ 0 = 𝛿𝛿
0 + ℎ −1 = 1 + (0) = 1
ℎ 1 = 𝛿𝛿
1 + ℎ 0 = 0+ 1 =1
ℎ 2 = 𝛿𝛿
2 + ℎ 1 = 0+ 1 =1
ℎ 3 = 𝛿𝛿
3 + ℎ 2 = 0+ 1 =1
0 1 2 3
h 𝑛𝑛 = 1 , 1 , 1 , 1 , ………

h 𝑛𝑛 = 1 𝑛𝑛 𝑢𝑢 𝑛𝑛

47
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-2
3) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 𝑦𝑦 𝑛𝑛 − 1
0 1 2 3
h 𝑛𝑛 = 1 , 1 , 1 , 1 , ………

𝑛𝑛
h 𝑛𝑛 = 1 𝑢𝑢 𝑛𝑛

Marginally Stable/
Conditionally Stable

48
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-2
4) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 𝑦𝑦 𝑛𝑛 − 1
ℎ 𝑛𝑛 = 𝛿𝛿 𝑛𝑛 − ℎ 𝑛𝑛 − 1

ℎ −2 = 𝛿𝛿 −2 − ℎ −3 = 0 − (0) = 0
ℎ −1 = 𝛿𝛿 −1 − ℎ −2 = 0 − (0) = 0
ℎ 0 = 𝛿𝛿 0 − ℎ −1 = 1 − (0) = 1
ℎ 1 = 𝛿𝛿 1 − ℎ 0 = 0 − 1 = −1
ℎ 2 = 𝛿𝛿 2 − ℎ 1 = 0 − −1 = 1
ℎ 3 = 𝛿𝛿 3 − ℎ 2 = 0 − 1 = −1
0 1 2 3
h 𝑛𝑛 = 1 , −1 , 1 , −1 , ………

h 𝑛𝑛 = −1 𝑛𝑛 𝑢𝑢 𝑛𝑛

49
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-2
4) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 𝑦𝑦 𝑛𝑛 − 1
0 1 2 3
h 𝑛𝑛 = 1 , −1 , 1 , −1 , ………

𝑛𝑛
h 𝑛𝑛 = −1 𝑢𝑢 𝑛𝑛

Marginally Stable/
Conditionally Stable

50
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-2

5) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 1.1 𝑦𝑦 𝑛𝑛 − 1
ℎ 𝑛𝑛 = 𝛿𝛿 𝑛𝑛 + 1.1 ℎ 𝑛𝑛 − 1

ℎ −2
= 𝛿𝛿 −2 + 1.1 ℎ −3 = 0 + 1.1(0) = 0
ℎ −1
= 𝛿𝛿 −1 + 1.1 ℎ −2 = 0 + 1.1(0) = 0
ℎ 0= 𝛿𝛿 0 + 1.1 ℎ −1 = 1 + 1.1(0) = 1
ℎ 1= 𝛿𝛿 1 + 1.1 ℎ 0 = 0 + 1.1 1 = 1.1
ℎ 2= 𝛿𝛿 2 + 1.1 ℎ 1 = 0 + 1.1 1.1 = 1.21
ℎ 3= 𝛿𝛿 3 + 1.1 ℎ 2 = 0 + 1.1 1.21 = 1.331
0 1 2 3
h 𝑛𝑛 = 1 , 1.1 , 1.21 , 1.331 , ………

h 𝑛𝑛 = 1.1 𝑛𝑛 𝑢𝑢 𝑛𝑛

51
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-2
5) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 1.1 𝑦𝑦 𝑛𝑛 − 1
0 1 2 3
h 𝑛𝑛 = 1 , 1.1 , 1.21 , 1.331 , ………

𝑛𝑛
h 𝑛𝑛 = 1.1 𝑢𝑢 𝑛𝑛

Unstable

52
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-2

6) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 1.1 𝑦𝑦 𝑛𝑛 − 1
ℎ 𝑛𝑛 = 𝛿𝛿 𝑛𝑛 − 1.1 ℎ 𝑛𝑛 − 1

ℎ −2 = 𝛿𝛿 −2 − 1.1 ℎ −3 = 0 − 1.1(0) = 0
ℎ −1 = 𝛿𝛿 −1 − 1.1 ℎ −2 = 0 − 1.1(0) = 0
ℎ 0 = 𝛿𝛿 0 − 1.1 ℎ −1 = 1 − 1.1(0) = 1
ℎ 1 = 𝛿𝛿 1 − 1.1 ℎ 0 = 0 − 1.1 1 = −1.1
ℎ 2 = 𝛿𝛿 2 − 1.1 ℎ 1 = 0 − 1.1 −1.1 = 1.21
ℎ 3 = 𝛿𝛿 3 − 1.1 ℎ 2 = 0 − 1.1 1.21 = −1.331
0 1 2 3
h 𝑛𝑛 = 1 , −1.1 , 1.21 , −1.331 , ………

h 𝑛𝑛 = −1.1 𝑛𝑛 𝑢𝑢 𝑛𝑛

53
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Example-2
6) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 1.1 𝑦𝑦 𝑛𝑛 − 1
0 1 2 3
h 𝑛𝑛 = 1 , −1.1 , 1.21 , −1.331 , ………

𝑛𝑛
h 𝑛𝑛 = −1.1 𝑢𝑢 𝑛𝑛

Unstable

54
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Key Concept

• Since impulse response of all FIR systems converge to zero after a finite
amount of time (samples), therefore all FIR systems are stable

• Because of the dependence on previous output samples, the impulse


response of IIR system will be of infinite duration (length) which can
have converging, constant magnitude, or diverging shape. That’s why
IIR systems can be stable or unstable

• For stable IIR systems:

−1 ≤ 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ≤ 1

55
Discrete time Systems
• Stability (FIR Vs. IIR Systems)
Key Concept

• FIR systems usually need

• Higher order
• More memory
• More computations

• IIR systems usually can have

• Less order
• Less memory requirements
• Less computations

56

You might also like