SlideShare a Scribd company logo
Digital Signal Processing using
Python
Dr.R.Senthilkumar, Assistant Professor, Department of
Electronics and Communication Engineering, Institute of Road
and Transport Technology, Erode, Tamilnadu
SciPy India Conference 2019
Venue: IIT Bombay
Date: 29
th
Novemeber 2019
Software
Packages to be
Installed
For Windows and Ubuntu Linux
Users
● Matplotlib
● NumPy
● SciPy
● Pylab
Windows Users
Download the software
Python3.7 from python.org
● Install the packages: Matplotlib,
Pylab, SciPy, NumPy using pip
command
● Open the software installed
directory, Example
● D:python37
● Using pip command as
● D:python37pip install
matplotlib
Ubuntu Linux
Users
Better Install Python3.7 using
Synaptic Packet Manager
● Since Ubuntu Linux has
Python2.7 by default
● Don’t prefer pip command
● The packages NumPy, SciPy
will be installed in Python2.7
not Python3.7
● From terminal invoke
Python3.7 as,
● $ Python3 program1.py
Android Mobile
Phone Users
Install Pydroid3 using google
play store
● Install the packages except
Pylab using pip command
similar to windows
● Run the programs either in
terminal or Run icon
● Disadvantage- only one figure
window open at a time
● Other usages similar to
windows and Linux
1. Continuous Sine Waveform
2. Discrete Sine Waveform
3. Sine waveform Amplitude
change
4. Stem plot of Sine
Waveform
5. Linear convolution
6. Auto correlation
7. Cross correlation
8. Discrete Fourier Transform
Using fft library in SciPy
9. Magnitude and Phase Spectrum
plot
10. Discrete Fourier Transform
using Formula(own function)
11. Power Spectrum Estimation
12. Window functions used for FIR
Filter Design
13. Low Pass FIR Filter window
Based and Digital Filter
List of Exercises
List of Exercises
14. High Pass FIR Filter window Based and Digital Filter
15. Band Pass FIR Filter window Based and Digital Filter
16. Band Stop FIR Filter window Based and Digital Filter
17. Low Pass IIR Butterworth Filter Analog and Digital Filter
18. High Pass IIR Butterworth Filter Analog and Digital Filter
19. Band Pass IIR Butterworth Filter Analog and Digital Filter
20. Band Stop IIR Butterworth Filter Analog and Digital Filter
References:
[1]. https://spoken-tutorial.org/cdcontent/
[2]. https://python.fossee.in/self_learningcourse/
https://python.fossee.in/spoken-tutorials/
[3]. https://matplotlib.org/3.1.1/gallery/lines_bars_and_markers/stem_plot.html#sphx-glr-
gallery-lines-bars-and-markers-stem-plot-py
[4]. https://matplotlib.org/devdocs/gallery/subplots_axes_and_figures/subplots_demo.html
[5]. https://docs.scipy.org/doc/numpy/reference/generated/numpy.convolve.html
[6]. https://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html
[7]. https://scipy-cookbook.readthedocs.io/items/FIRFilter.html
References:
[9]. http://mpastell.com/pweave/_downloads/FIR_design_rst.html
[10]. http://mpastell.com/pweave/_downloads/FIR_design_rst.html
[11]. http://mpastell.com/2009/05/11/iir-filter-design-with-python-and-scipy/
Sci py india_conference_2019
Sci py india_conference_2019
Sci py india_conference_2019
1. Generation of Sine Waveform
[refer 1_Continuous_sine_wave.py]
𝑥 𝑡 = 𝐴 ∗ 𝑠𝑖𝑛 2 ∗ 𝜋 ∗ 𝑓 ∗ 𝑡
2. Generation of Discrete & Continuous Sine Waveform [refer
2_cont_Discrete_sinewave.py]
3. Amplitude change in Sine waveform [refer Exercise no.3]
4. Stem plot Sine waveform [refer Exercise no.4]
5. Linear Convolution [refer Exercise no.5]
N = Length of Linear convolution result
N1 = Length of x[n]
N2 = Length of h[n]
N = N1+N2-1
𝑦 𝑛
= 𝑥 𝑛 ∗ ℎ 𝑛𝑦 𝑛
=
𝑘=0
𝑁−1
𝑥 𝑘 ℎ 𝑛 − 𝑘
6. Auto correlation [refer Exercise no.6]
N = Length of Auto correlation result
N1 = Length of x[n]
N2 = Length of x[-n]
N = N1+N2-1
𝑦 𝑛
= 𝑥 𝑛 ∗ 𝑥 −𝑛
7. Cross correlation [refer Exercise no.7]
N = Length of Cross correlation result
N1 = Length of x[n]
N2 = Length of h[-n]
N = N1+N2-1
𝑦 𝑛
= 𝑥 𝑛 ∗ ℎ −𝑛
8. Discrete Fourier Transform using fft
library package[refer Exercise no.8]
 Let x[n] is a discrete sequence, the N-point of Discrete Fourier Transform of x[n] is given
by,
 Inverse Discrete Fourier Transform is given by,
𝑋 𝐾
=
𝑛=0
𝑛=𝑁−1
𝑥 𝑛 𝑒
−𝑗∗2∗𝜋∗𝐾∗𝑛
𝑁
𝑥 𝑛
=
1
𝑁
𝐾=0
𝐾=𝑁−1
𝑋 𝐾 𝑒
𝑗∗2∗𝜋∗𝐾∗𝑛
𝑁
9. DFT – Magnitude and Phase Spectrum
[refer Exercise no.9]
 Let x[n] is a discrete sequence, the N-point of Discrete Fourier Transform of x[n] is given by,
 Magnitude spectrum = |X(K)|
 Phase spectrum = tan-1(Image part (X(K))/Real Part(X(K))
𝑋 𝐾
=
𝑛=0
𝑛=𝑁−1
𝑥 𝑛 𝑒
−𝑗∗2∗𝜋∗𝐾∗𝑛
𝑁
Sci py india_conference_2019
10. DFT – using own formula based
function [refer Exercise no.10]
* Use cmath Library for complex number
Manipulations
* Initialize X(K) with complex zeros ‘0+0j’
* Initialize X(K) with numpy zeros cause float type
assign to complex type error
* This problem will not occur in fft() built-in
function
11. Power Spectrum Estimation [refer
Exercise no.11]
𝑃𝑥𝑥 𝐾
=
1
𝑁
𝑋 𝐾 2
𝑋 𝐾
=
𝑛=0
𝑛=𝑁−1
𝑥 𝑛 𝑒
−𝑗∗2∗𝜋∗𝐾∗𝑛
𝑁
The power spectrum of a discrete sequence x[n] is given by,
Where X(K) is the
Discrete Fourier
Transform of x[n]
Sci py india_conference_2019
12. Windowing techniques used for FIR
Filter Design [refer Exercise no.12]
*Rectangular window
*Hamming Window
*Hanning Window
*Blackmann Window
*Bartlett window
13. FIR- Low Pass Filter-Windowing
technique [refer Exercise no.13]
h[n] = hd [n]*W[n]
hd [n] = FIR LPF impulse response
W[n] = Hamming window function
hd [n] = sin(wc*(n-(N-1)/2)) / (π*(n-(N-1)/2))
Sci py india_conference_2019
Assignments
1. Generate LPF, HPF, BPF, BSF responses for even length and odd length
both symmetric and Asymmetric filter impulse responses. Show that the odd
length symmetric FIR filter is suitable for designing all kind of filters such as
LPF, HPF, BPF, BSF.
2. Generate Chebyshev IIR digital filter and compare its frequency response
characteristics with Butterworth IIR digital filter for the same filter order.
3. Generate Chebyshev IIR digital filter for both odd order and even order.
Compare their gain in frequency response characteristics
Any Queries regarding assignment problems
senthilkumar@irttech.ac.in

More Related Content

PPT
Fpga 13-task-and-functions
Malik Tauqir Hasan
 
PPTX
Object Detection with Tensorflow
ElifTech
 
PDF
Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021
Peng Cheng
 
PDF
Brief Introduction to Cython
Aleksandar Jelenak
 
PDF
Permute
Russell Childs
 
PPTX
Tensorflow in practice by Engineer - donghwi cha
Donghwi Cha
 
PDF
Introduction to Gura Programming Language
Yutaka Saito
 
PDF
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from...
Edge AI and Vision Alliance
 
Fpga 13-task-and-functions
Malik Tauqir Hasan
 
Object Detection with Tensorflow
ElifTech
 
Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021
Peng Cheng
 
Brief Introduction to Cython
Aleksandar Jelenak
 
Tensorflow in practice by Engineer - donghwi cha
Donghwi Cha
 
Introduction to Gura Programming Language
Yutaka Saito
 
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from...
Edge AI and Vision Alliance
 

What's hot (20)

PPTX
Using Parallel Computing Platform - NHDNUG
North Houston .NET Users Group
 
PDF
Buzzwords Numba Presentation
kammeyer
 
PDF
A peek on numerical programming in perl and python e christopher dyken 2005
Jules Krdenas
 
PDF
Permute
Russell Childs
 
DOC
Computer hw1
Dũng Nguyễn Đức
 
PDF
Introduction to cython: example of GCoptimization
Kevin Keraudren
 
PDF
Garbage Collection
Eelco Visser
 
PDF
A New Method for Vertical Parallelisation of TAN Learning Based on Balanced I...
Anders L. Madsen
 
PDF
C Programming: Pointer (Examples)
Joongheon Kim
 
PDF
Set Transfomer: A Framework for Attention-based Permutaion-Invariant Neural N...
Thien Q. Tran
 
PPTX
Java parallel programming made simple
Ateji Px
 
DOCX
Actividad N° 6 - Unidad 4
Pablo Agustin Novillo Audicio
 
PPTX
Tail call optimization (TCO) - Lecture
Jesse Frankley
 
PDF
Scientific Python
Eueung Mulyana
 
PDF
Lec16-CS110 Computational Engineering
Sri Harsha Pamu
 
PDF
Use the Matplotlib, Luke @ PyCon Taiwan 2012
Wen-Wei Liao
 
PDF
Cocoaheads Meetup / Alex Zimin / Swift magic
Badoo Development
 
PDF
Memory efficient pytorch
Hyungjoo Cho
 
PDF
A Simple Communication System Design Lab #4 with MATLAB Simulink
Jaewook. Kang
 
Using Parallel Computing Platform - NHDNUG
North Houston .NET Users Group
 
Buzzwords Numba Presentation
kammeyer
 
A peek on numerical programming in perl and python e christopher dyken 2005
Jules Krdenas
 
Computer hw1
Dũng Nguyễn Đức
 
Introduction to cython: example of GCoptimization
Kevin Keraudren
 
Garbage Collection
Eelco Visser
 
A New Method for Vertical Parallelisation of TAN Learning Based on Balanced I...
Anders L. Madsen
 
C Programming: Pointer (Examples)
Joongheon Kim
 
Set Transfomer: A Framework for Attention-based Permutaion-Invariant Neural N...
Thien Q. Tran
 
Java parallel programming made simple
Ateji Px
 
Actividad N° 6 - Unidad 4
Pablo Agustin Novillo Audicio
 
Tail call optimization (TCO) - Lecture
Jesse Frankley
 
Scientific Python
Eueung Mulyana
 
Lec16-CS110 Computational Engineering
Sri Harsha Pamu
 
Use the Matplotlib, Luke @ PyCon Taiwan 2012
Wen-Wei Liao
 
Cocoaheads Meetup / Alex Zimin / Swift magic
Badoo Development
 
Memory efficient pytorch
Hyungjoo Cho
 
A Simple Communication System Design Lab #4 with MATLAB Simulink
Jaewook. Kang
 
Ad

Similar to Sci py india_conference_2019 (20)

PDF
Solutions Manual to accompany Digital Signal Processing: A Computer Based App...
gatsoudranka79
 
PDF
(Original PDF) Applied Digital Signal Processing Theory and Practice
eskeskropik
 
PDF
(Original PDF) Applied Digital Signal Processing Theory and Practice
ssmmmqtw711
 
PPTX
Design of Filters PPT
Imtiyaz Rashed
 
PDF
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
dosonjunice
 
PDF
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
comiganeew
 
PPT
1-DSP Fundamentals.ppt
KrishnaveniManickam3
 
PDF
Digital Signal Processing Summary
op205
 
PDF
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
silcerausch
 
PDF
Digital Signal Processing-Digital Filters
Nelson Anand
 
PDF
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
azaniatilcka
 
PDF
Dsp lab manual
Mukul Mohal
 
PDF
DSP - Realization of Finite Impulse Response Filter
Shiny Christobel
 
PPTX
YOUR_PASSWORDYOUR_SSIDYOUR_PASSWORDYOUR_SSIDYOUR_SSID
8055darkwizard
 
PDF
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
fcskvvyj377
 
PDF
Advanced_DSP_J_G_Proakis.pdf
HariPrasad314745
 
PDF
Course-Notes__Advanced-DSP.pdf
ShreeDevi42
 
PDF
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
kvakdydula82
 
PDF
Matlab fair-record-model
ajaydev1111
 
Solutions Manual to accompany Digital Signal Processing: A Computer Based App...
gatsoudranka79
 
(Original PDF) Applied Digital Signal Processing Theory and Practice
eskeskropik
 
(Original PDF) Applied Digital Signal Processing Theory and Practice
ssmmmqtw711
 
Design of Filters PPT
Imtiyaz Rashed
 
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
dosonjunice
 
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
comiganeew
 
1-DSP Fundamentals.ppt
KrishnaveniManickam3
 
Digital Signal Processing Summary
op205
 
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
silcerausch
 
Digital Signal Processing-Digital Filters
Nelson Anand
 
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
azaniatilcka
 
Dsp lab manual
Mukul Mohal
 
DSP - Realization of Finite Impulse Response Filter
Shiny Christobel
 
YOUR_PASSWORDYOUR_SSIDYOUR_PASSWORDYOUR_SSIDYOUR_SSID
8055darkwizard
 
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
fcskvvyj377
 
Advanced_DSP_J_G_Proakis.pdf
HariPrasad314745
 
Course-Notes__Advanced-DSP.pdf
ShreeDevi42
 
Solution Manual for Introduction to Digital Signal Processing, 1st Edition, D...
kvakdydula82
 
Matlab fair-record-model
ajaydev1111
 
Ad

More from Electronics and Communication Engineering, Institute of Road and Transport Technology (9)

Recently uploaded (20)

PDF
Health-The-Ultimate-Treasure (1).pdf/8th class science curiosity /samyans edu...
Sandeep Swamy
 
PPTX
Basics and rules of probability with real-life uses
ravatkaran694
 
PPTX
Kanban Cards _ Mass Action in Odoo 18.2 - Odoo Slides
Celine George
 
PPTX
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
PPTX
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
PPTX
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
PDF
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PDF
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
PPTX
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
PPTX
Virus sequence retrieval from NCBI database
yamunaK13
 
PPTX
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
DOCX
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
PDF
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
DOCX
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
PPTX
How to Apply for a Job From Odoo 18 Website
Celine George
 
PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
PDF
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
PPTX
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
PDF
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
Health-The-Ultimate-Treasure (1).pdf/8th class science curiosity /samyans edu...
Sandeep Swamy
 
Basics and rules of probability with real-life uses
ravatkaran694
 
Kanban Cards _ Mass Action in Odoo 18.2 - Odoo Slides
Celine George
 
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
Virus sequence retrieval from NCBI database
yamunaK13
 
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
How to Apply for a Job From Odoo 18 Website
Celine George
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 

Sci py india_conference_2019

  • 1. Digital Signal Processing using Python Dr.R.Senthilkumar, Assistant Professor, Department of Electronics and Communication Engineering, Institute of Road and Transport Technology, Erode, Tamilnadu SciPy India Conference 2019 Venue: IIT Bombay Date: 29 th Novemeber 2019
  • 2. Software Packages to be Installed For Windows and Ubuntu Linux Users ● Matplotlib ● NumPy ● SciPy ● Pylab
  • 3. Windows Users Download the software Python3.7 from python.org ● Install the packages: Matplotlib, Pylab, SciPy, NumPy using pip command ● Open the software installed directory, Example ● D:python37 ● Using pip command as ● D:python37pip install matplotlib
  • 4. Ubuntu Linux Users Better Install Python3.7 using Synaptic Packet Manager ● Since Ubuntu Linux has Python2.7 by default ● Don’t prefer pip command ● The packages NumPy, SciPy will be installed in Python2.7 not Python3.7 ● From terminal invoke Python3.7 as, ● $ Python3 program1.py
  • 5. Android Mobile Phone Users Install Pydroid3 using google play store ● Install the packages except Pylab using pip command similar to windows ● Run the programs either in terminal or Run icon ● Disadvantage- only one figure window open at a time ● Other usages similar to windows and Linux
  • 6. 1. Continuous Sine Waveform 2. Discrete Sine Waveform 3. Sine waveform Amplitude change 4. Stem plot of Sine Waveform 5. Linear convolution 6. Auto correlation 7. Cross correlation 8. Discrete Fourier Transform Using fft library in SciPy 9. Magnitude and Phase Spectrum plot 10. Discrete Fourier Transform using Formula(own function) 11. Power Spectrum Estimation 12. Window functions used for FIR Filter Design 13. Low Pass FIR Filter window Based and Digital Filter List of Exercises
  • 7. List of Exercises 14. High Pass FIR Filter window Based and Digital Filter 15. Band Pass FIR Filter window Based and Digital Filter 16. Band Stop FIR Filter window Based and Digital Filter 17. Low Pass IIR Butterworth Filter Analog and Digital Filter 18. High Pass IIR Butterworth Filter Analog and Digital Filter 19. Band Pass IIR Butterworth Filter Analog and Digital Filter 20. Band Stop IIR Butterworth Filter Analog and Digital Filter
  • 8. References: [1]. https://spoken-tutorial.org/cdcontent/ [2]. https://python.fossee.in/self_learningcourse/ https://python.fossee.in/spoken-tutorials/ [3]. https://matplotlib.org/3.1.1/gallery/lines_bars_and_markers/stem_plot.html#sphx-glr- gallery-lines-bars-and-markers-stem-plot-py [4]. https://matplotlib.org/devdocs/gallery/subplots_axes_and_figures/subplots_demo.html [5]. https://docs.scipy.org/doc/numpy/reference/generated/numpy.convolve.html [6]. https://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html [7]. https://scipy-cookbook.readthedocs.io/items/FIRFilter.html
  • 13. 1. Generation of Sine Waveform [refer 1_Continuous_sine_wave.py] 𝑥 𝑡 = 𝐴 ∗ 𝑠𝑖𝑛 2 ∗ 𝜋 ∗ 𝑓 ∗ 𝑡
  • 14. 2. Generation of Discrete & Continuous Sine Waveform [refer 2_cont_Discrete_sinewave.py]
  • 15. 3. Amplitude change in Sine waveform [refer Exercise no.3]
  • 16. 4. Stem plot Sine waveform [refer Exercise no.4]
  • 17. 5. Linear Convolution [refer Exercise no.5] N = Length of Linear convolution result N1 = Length of x[n] N2 = Length of h[n] N = N1+N2-1 𝑦 𝑛 = 𝑥 𝑛 ∗ ℎ 𝑛𝑦 𝑛 = 𝑘=0 𝑁−1 𝑥 𝑘 ℎ 𝑛 − 𝑘
  • 18. 6. Auto correlation [refer Exercise no.6] N = Length of Auto correlation result N1 = Length of x[n] N2 = Length of x[-n] N = N1+N2-1 𝑦 𝑛 = 𝑥 𝑛 ∗ 𝑥 −𝑛
  • 19. 7. Cross correlation [refer Exercise no.7] N = Length of Cross correlation result N1 = Length of x[n] N2 = Length of h[-n] N = N1+N2-1 𝑦 𝑛 = 𝑥 𝑛 ∗ ℎ −𝑛
  • 20. 8. Discrete Fourier Transform using fft library package[refer Exercise no.8]  Let x[n] is a discrete sequence, the N-point of Discrete Fourier Transform of x[n] is given by,  Inverse Discrete Fourier Transform is given by, 𝑋 𝐾 = 𝑛=0 𝑛=𝑁−1 𝑥 𝑛 𝑒 −𝑗∗2∗𝜋∗𝐾∗𝑛 𝑁 𝑥 𝑛 = 1 𝑁 𝐾=0 𝐾=𝑁−1 𝑋 𝐾 𝑒 𝑗∗2∗𝜋∗𝐾∗𝑛 𝑁
  • 21. 9. DFT – Magnitude and Phase Spectrum [refer Exercise no.9]  Let x[n] is a discrete sequence, the N-point of Discrete Fourier Transform of x[n] is given by,  Magnitude spectrum = |X(K)|  Phase spectrum = tan-1(Image part (X(K))/Real Part(X(K)) 𝑋 𝐾 = 𝑛=0 𝑛=𝑁−1 𝑥 𝑛 𝑒 −𝑗∗2∗𝜋∗𝐾∗𝑛 𝑁
  • 23. 10. DFT – using own formula based function [refer Exercise no.10] * Use cmath Library for complex number Manipulations * Initialize X(K) with complex zeros ‘0+0j’ * Initialize X(K) with numpy zeros cause float type assign to complex type error * This problem will not occur in fft() built-in function
  • 24. 11. Power Spectrum Estimation [refer Exercise no.11] 𝑃𝑥𝑥 𝐾 = 1 𝑁 𝑋 𝐾 2 𝑋 𝐾 = 𝑛=0 𝑛=𝑁−1 𝑥 𝑛 𝑒 −𝑗∗2∗𝜋∗𝐾∗𝑛 𝑁 The power spectrum of a discrete sequence x[n] is given by, Where X(K) is the Discrete Fourier Transform of x[n]
  • 26. 12. Windowing techniques used for FIR Filter Design [refer Exercise no.12] *Rectangular window *Hamming Window *Hanning Window *Blackmann Window *Bartlett window
  • 27. 13. FIR- Low Pass Filter-Windowing technique [refer Exercise no.13] h[n] = hd [n]*W[n] hd [n] = FIR LPF impulse response W[n] = Hamming window function hd [n] = sin(wc*(n-(N-1)/2)) / (π*(n-(N-1)/2))
  • 29. Assignments 1. Generate LPF, HPF, BPF, BSF responses for even length and odd length both symmetric and Asymmetric filter impulse responses. Show that the odd length symmetric FIR filter is suitable for designing all kind of filters such as LPF, HPF, BPF, BSF. 2. Generate Chebyshev IIR digital filter and compare its frequency response characteristics with Butterworth IIR digital filter for the same filter order. 3. Generate Chebyshev IIR digital filter for both odd order and even order. Compare their gain in frequency response characteristics Any Queries regarding assignment problems [email protected]