SlideShare a Scribd company logo
ELEG 320L – Signals & Systems Laboratory /Dr. Jibran Khan
Yousafzai Lab 4
1
LAB 4: CONVOLUTION
Background & Concepts
Convolution is denoted by:
�[�] = �[�] ∗ ℎ[�]
Your book has described the "flip and shift" method for
performing convolution. First, we
set up two signals �[�] and ℎ[�]:
Flip one of the signals, say ℎ[�], to form ℎ[−�]:
ELEG 320L – Signals & Systems Laboratory /Dr. Jibran Khan
Yousafzai Lab 4
2
Shift ℎ[−�] by n to form ℎ[� − �]. For each value of �, form
�[�] by multiplying and
summing all the element of the product of�[�]ℎ[� − �], −∞ <
� < ∞. The figure
below shows an example of the calculation of�[1]. The top
panel shows�[�]. The
middle panel showsℎ[1 − �]. The lower panel shows�[�]�[1 −
�]. Note that this is a
sequence on a � axis. The sum of the lower sequence over all k
gives �[1] = 2.
We repeat this shifting, multiplication and summing for all
values of � to get the
complete sequence �[�]:
ELEG 320L – Signals & Systems Laboratory /Dr. Jibran Khan
Yousafzai Lab 4
3
The conv Command
conv(x,h) performs a 1-D convolution of vectors � and ℎ. The
resulting vector �
has length length(�) = length(�) + length(ℎ) − 1. Imagine
vector � as being
stationary and the flipped version of ℎ is slid from left to right.
Note that conv(x,h) =
conv(h,x). An example of the convolution of two signals and
plotting the result is
below:
>> x = [0.5 0.5 0.5]; %define input signal x[n]
>> h = [3.0 2.0 1.0]; %unit-pulse response h[n]
>> y = conv(x,h); %compute output y[n] via convolution
>> n = 0:(length(y)-1); %for plotting y[n]
>> stem(n,y) % plot y[n]
>> grid;
>> xlabel('n');
>> ylabel('y[n]');
>> title('Output of System via Convolution');
ELEG 320L – Signals & Systems Laboratory /Dr. Jibran Khan
Yousafzai Lab 4
4
Deconvolution
The command [q,r] = deconv(v,u), deconvolves vector u out of
vector v, using long
division. The quotient is returned in vector q and the remainder
in vector r such that
v = conv(u,q)+r. If u and v are vectors of polynomial
coefficients, convolving them is
equivalent to multiplying the two polynomials, and
deconvolution is polynomial
division. The result of dividing v by u is quotient q and
remainder r. An examples is
below:
If
>> u = [1 2 3 4];
>> v = [10 20 30];
The convolution is:
>> c = conv(u,v)
c =
10 40 100 160 170 120
Use deconvolution to recover v.
>> [q,r] = deconv(c,u)
q =
10 20 30
r =
0 0 0 0 0 0
This gives a quotient equal to v and a zero remainder.
Structures
Structures in Matlab are just like structures in C. They are
basically containers that
allow one to group together more than one type of data under
the umbrella of one
variable name. As we mentioned previously, Matlab always
assumes that the index
of the first element of an array is 1. So, when we just say:
>> x = [1 2 3 4 5];
ELEG 320L – Signals & Systems Laboratory /Dr. Jibran Khan
Yousafzai Lab 4
5
This means that �[1] = 1, �[2] = 2, and so on. But, what if we
want to express a
sequence �[−1] = 1, �[0] = 2, . ..? We obviously need to
provide the user with some
additional information in addition to the array data, namely an
offset. An offset of -1
tells the user that "we want you to interpret the first point in the
Matlab array as
corresponding to �[−1]. We can use structures for this purpose.
The form of a
structure is variable Name.field. For example:
>> x.data = [1 2 3 4 5];
>> x.offset = -1;
>> x
x =
data: [1 2 3 4 5]
offset: -1
We have declared a variable x, with two fields. The data field
contains an array; the
offset field contains another number. Structures of this type can
be useful for us in
expressing sequences in Matlab.
ELEG 320L – Signals & Systems Laboratory /Dr. Jibran Khan
Yousafzai Lab 4
6
EXERCISES
Exercise 1:
Let
�[�] = �[�] – �[� − 4]
�[�] = �. �[�] – 2(� − 4). �[� − 4] + (� − 8). �[� − 8]
Make stem plots of the following convolutions using MATLAB.
1. �[�] ∗ �[�]
2. �[�] ∗ �[�] ∗ �[�]
3. �[�] ∗ �[�]
4. �[�] ∗ �[�]
5. �[�] ∗ �[�]
Exercise 2:
Consider the interconnection of the LTI systems depicted in the
following figure:
Generate the impulse response of the overall system when:
ℎ1[�] = 2� {�[�] − �[� − 4]}, 0 ≤ � ≤ 4
ℎ2[�] = �[�] − 4�[� − 4], 0 ≤ � ≤ 5
ℎ3[�] = ℎ4[�] = �[� − 5], 0 ≤ � ≤ 6
Exercise 3:
Using structures & conv command, find out the convolution of
two sequences with
arbitrary starting points.

More Related Content

Similar to ELEG 320L – Signals & Systems Laboratory Dr. Jibran Khan Yous.docx

matlab_tutorial.ppt
matlab_tutorial.pptmatlab_tutorial.ppt
matlab_tutorial.ppt
aboma2hawi
 
Basics of matlab
Basics of matlabBasics of matlab
Basics of matlabAnil Maurya
 
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docxMATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
andreecapon
 
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
Ravikiran A
 
Tutorial 2
Tutorial     2Tutorial     2
Tutorial 2
Mohamed Yaser
 
Matlab 1
Matlab 1Matlab 1
Matlab 1asguna
 
Reachability Analysis Control of Non-Linear Dynamical Systems
Reachability Analysis Control of Non-Linear Dynamical SystemsReachability Analysis Control of Non-Linear Dynamical Systems
Reachability Analysis Control of Non-Linear Dynamical SystemsM Reza Rahmati
 
Reachability Analysis "Control Of Dynamical Non-Linear Systems"
Reachability Analysis "Control Of Dynamical Non-Linear Systems" Reachability Analysis "Control Of Dynamical Non-Linear Systems"
Reachability Analysis "Control Of Dynamical Non-Linear Systems" M Reza Rahmati
 
BASIC OF ALGORITHM AND MATHEMATICS STUDENTS
BASIC OF ALGORITHM AND MATHEMATICS STUDENTSBASIC OF ALGORITHM AND MATHEMATICS STUDENTS
BASIC OF ALGORITHM AND MATHEMATICS STUDENTS
jainyshah20
 
Lecture two
Lecture twoLecture two
Lecture two
Mahmoud Hussein
 
Dsp manual completed2
Dsp manual completed2Dsp manual completed2
Dsp manual completed2bilawalali74
 
signal and system
signal and system signal and system
signal and system
SAURAV DAYAL SING
 
MATLAB-Introd.ppt
MATLAB-Introd.pptMATLAB-Introd.ppt
MATLAB-Introd.ppt
kebeAman
 
Dsp 1recordprophess-140720055832-phpapp01
Dsp 1recordprophess-140720055832-phpapp01Dsp 1recordprophess-140720055832-phpapp01
Dsp 1recordprophess-140720055832-phpapp01
Sagar Gore
 
Digital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE studentsDigital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE students
UR11EC098
 
Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual
Amairullah Khan Lodhi
 
Unit 2 signal &amp;system
Unit 2 signal &amp;systemUnit 2 signal &amp;system
Unit 2 signal &amp;system
sushant7dare
 
A New Approach to Design a Reduced Order Observer
A New Approach to Design a Reduced Order ObserverA New Approach to Design a Reduced Order Observer
A New Approach to Design a Reduced Order Observer
IJERD Editor
 
Design and Analysis of algorithms
Design and Analysis of algorithmsDesign and Analysis of algorithms
Design and Analysis of algorithms
Dr. Rupa Ch
 
Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2
Scilab
 

Similar to ELEG 320L – Signals & Systems Laboratory Dr. Jibran Khan Yous.docx (20)

matlab_tutorial.ppt
matlab_tutorial.pptmatlab_tutorial.ppt
matlab_tutorial.ppt
 
Basics of matlab
Basics of matlabBasics of matlab
Basics of matlab
 
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docxMATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
 
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
 
Tutorial 2
Tutorial     2Tutorial     2
Tutorial 2
 
Matlab 1
Matlab 1Matlab 1
Matlab 1
 
Reachability Analysis Control of Non-Linear Dynamical Systems
Reachability Analysis Control of Non-Linear Dynamical SystemsReachability Analysis Control of Non-Linear Dynamical Systems
Reachability Analysis Control of Non-Linear Dynamical Systems
 
Reachability Analysis "Control Of Dynamical Non-Linear Systems"
Reachability Analysis "Control Of Dynamical Non-Linear Systems" Reachability Analysis "Control Of Dynamical Non-Linear Systems"
Reachability Analysis "Control Of Dynamical Non-Linear Systems"
 
BASIC OF ALGORITHM AND MATHEMATICS STUDENTS
BASIC OF ALGORITHM AND MATHEMATICS STUDENTSBASIC OF ALGORITHM AND MATHEMATICS STUDENTS
BASIC OF ALGORITHM AND MATHEMATICS STUDENTS
 
Lecture two
Lecture twoLecture two
Lecture two
 
Dsp manual completed2
Dsp manual completed2Dsp manual completed2
Dsp manual completed2
 
signal and system
signal and system signal and system
signal and system
 
MATLAB-Introd.ppt
MATLAB-Introd.pptMATLAB-Introd.ppt
MATLAB-Introd.ppt
 
Dsp 1recordprophess-140720055832-phpapp01
Dsp 1recordprophess-140720055832-phpapp01Dsp 1recordprophess-140720055832-phpapp01
Dsp 1recordprophess-140720055832-phpapp01
 
Digital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE studentsDigital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE students
 
Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual
 
Unit 2 signal &amp;system
Unit 2 signal &amp;systemUnit 2 signal &amp;system
Unit 2 signal &amp;system
 
A New Approach to Design a Reduced Order Observer
A New Approach to Design a Reduced Order ObserverA New Approach to Design a Reduced Order Observer
A New Approach to Design a Reduced Order Observer
 
Design and Analysis of algorithms
Design and Analysis of algorithmsDesign and Analysis of algorithms
Design and Analysis of algorithms
 
Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2
 

More from toltonkendal

Elementary CurriculaBoth articles highlight the fact that middle.docx
Elementary CurriculaBoth articles highlight the fact that middle.docxElementary CurriculaBoth articles highlight the fact that middle.docx
Elementary CurriculaBoth articles highlight the fact that middle.docx
toltonkendal
 
Elementary Statistics (MATH220)Assignment Statistic.docx
Elementary Statistics (MATH220)Assignment Statistic.docxElementary Statistics (MATH220)Assignment Statistic.docx
Elementary Statistics (MATH220)Assignment Statistic.docx
toltonkendal
 
Elements of Religious Traditions PaperWritea 700- to 1,050-word .docx
Elements of Religious Traditions PaperWritea 700- to 1,050-word .docxElements of Religious Traditions PaperWritea 700- to 1,050-word .docx
Elements of Religious Traditions PaperWritea 700- to 1,050-word .docx
toltonkendal
 
Elements of MusicPitch- relative highness or lowness that we .docx
Elements of MusicPitch-  relative highness or lowness that we .docxElements of MusicPitch-  relative highness or lowness that we .docx
Elements of MusicPitch- relative highness or lowness that we .docx
toltonkendal
 
Elevated Blood Lead Levels in Children AssociatedWith the Fl.docx
Elevated Blood Lead Levels in Children AssociatedWith the Fl.docxElevated Blood Lead Levels in Children AssociatedWith the Fl.docx
Elevated Blood Lead Levels in Children AssociatedWith the Fl.docx
toltonkendal
 
Elev ent h EDIT IONREAL ESTATE PRINCIPLESCHARLES F. .docx
Elev ent h EDIT IONREAL ESTATE PRINCIPLESCHARLES F. .docxElev ent h EDIT IONREAL ESTATE PRINCIPLESCHARLES F. .docx
Elev ent h EDIT IONREAL ESTATE PRINCIPLESCHARLES F. .docx
toltonkendal
 
Elements of the Communication ProcessIn Chapter One, we learne.docx
Elements of the Communication ProcessIn Chapter One, we learne.docxElements of the Communication ProcessIn Chapter One, we learne.docx
Elements of the Communication ProcessIn Chapter One, we learne.docx
toltonkendal
 
Elements of Music #1 Handout1. Rhythm the flow of music in te.docx
Elements of Music #1 Handout1. Rhythm  the flow of music in te.docxElements of Music #1 Handout1. Rhythm  the flow of music in te.docx
Elements of Music #1 Handout1. Rhythm the flow of music in te.docx
toltonkendal
 
Elements of Music Report InstrumentsFor the assignment on the el.docx
Elements of Music Report InstrumentsFor the assignment on the el.docxElements of Music Report InstrumentsFor the assignment on the el.docx
Elements of Music Report InstrumentsFor the assignment on the el.docx
toltonkendal
 
Elements of GenreAfter watching three of the five .docx
Elements of GenreAfter watching three of the five .docxElements of GenreAfter watching three of the five .docx
Elements of GenreAfter watching three of the five .docx
toltonkendal
 
Elements of DesignDuring the process of envisioning and designing .docx
Elements of DesignDuring the process of envisioning and designing .docxElements of DesignDuring the process of envisioning and designing .docx
Elements of DesignDuring the process of envisioning and designing .docx
toltonkendal
 
Elements of Critical Thinking [WLOs 2, 3, 4] [CLOs 2, 3, 4]P.docx
Elements of Critical Thinking [WLOs 2, 3, 4] [CLOs 2, 3, 4]P.docxElements of Critical Thinking [WLOs 2, 3, 4] [CLOs 2, 3, 4]P.docx
Elements of Critical Thinking [WLOs 2, 3, 4] [CLOs 2, 3, 4]P.docx
toltonkendal
 
Elements of DesignDuring the process of envisioning and design.docx
Elements of DesignDuring the process of envisioning and design.docxElements of DesignDuring the process of envisioning and design.docx
Elements of DesignDuring the process of envisioning and design.docx
toltonkendal
 
Elements of a contact due 16 OctRead the Case Campbell Soup Co. v..docx
Elements of a contact due 16 OctRead the Case Campbell Soup Co. v..docxElements of a contact due 16 OctRead the Case Campbell Soup Co. v..docx
Elements of a contact due 16 OctRead the Case Campbell Soup Co. v..docx
toltonkendal
 
Elements for analyzing mise en sceneIdentify the components of.docx
Elements for analyzing mise en sceneIdentify the components of.docxElements for analyzing mise en sceneIdentify the components of.docx
Elements for analyzing mise en sceneIdentify the components of.docx
toltonkendal
 
Elements in the same row have the same number of () levelsWhi.docx
Elements in the same row have the same number of () levelsWhi.docxElements in the same row have the same number of () levelsWhi.docx
Elements in the same row have the same number of () levelsWhi.docx
toltonkendal
 
ELEG 421 Control Systems Transient and Steady State .docx
ELEG 421 Control Systems  Transient and Steady State .docxELEG 421 Control Systems  Transient and Steady State .docx
ELEG 421 Control Systems Transient and Steady State .docx
toltonkendal
 
Element 010 ASSIGNMENT 3000 WORDS (100)Task Individual assign.docx
Element 010 ASSIGNMENT 3000 WORDS (100)Task Individual assign.docxElement 010 ASSIGNMENT 3000 WORDS (100)Task Individual assign.docx
Element 010 ASSIGNMENT 3000 WORDS (100)Task Individual assign.docx
toltonkendal
 
Electronic Media PresentationChoose two of the following.docx
Electronic Media PresentationChoose two of the following.docxElectronic Media PresentationChoose two of the following.docx
Electronic Media PresentationChoose two of the following.docx
toltonkendal
 
Electronic copy available at httpssrn.comabstract=2161742.docx
Electronic copy available at httpssrn.comabstract=2161742.docxElectronic copy available at httpssrn.comabstract=2161742.docx
Electronic copy available at httpssrn.comabstract=2161742.docx
toltonkendal
 

More from toltonkendal (20)

Elementary CurriculaBoth articles highlight the fact that middle.docx
Elementary CurriculaBoth articles highlight the fact that middle.docxElementary CurriculaBoth articles highlight the fact that middle.docx
Elementary CurriculaBoth articles highlight the fact that middle.docx
 
Elementary Statistics (MATH220)Assignment Statistic.docx
Elementary Statistics (MATH220)Assignment Statistic.docxElementary Statistics (MATH220)Assignment Statistic.docx
Elementary Statistics (MATH220)Assignment Statistic.docx
 
Elements of Religious Traditions PaperWritea 700- to 1,050-word .docx
Elements of Religious Traditions PaperWritea 700- to 1,050-word .docxElements of Religious Traditions PaperWritea 700- to 1,050-word .docx
Elements of Religious Traditions PaperWritea 700- to 1,050-word .docx
 
Elements of MusicPitch- relative highness or lowness that we .docx
Elements of MusicPitch-  relative highness or lowness that we .docxElements of MusicPitch-  relative highness or lowness that we .docx
Elements of MusicPitch- relative highness or lowness that we .docx
 
Elevated Blood Lead Levels in Children AssociatedWith the Fl.docx
Elevated Blood Lead Levels in Children AssociatedWith the Fl.docxElevated Blood Lead Levels in Children AssociatedWith the Fl.docx
Elevated Blood Lead Levels in Children AssociatedWith the Fl.docx
 
Elev ent h EDIT IONREAL ESTATE PRINCIPLESCHARLES F. .docx
Elev ent h EDIT IONREAL ESTATE PRINCIPLESCHARLES F. .docxElev ent h EDIT IONREAL ESTATE PRINCIPLESCHARLES F. .docx
Elev ent h EDIT IONREAL ESTATE PRINCIPLESCHARLES F. .docx
 
Elements of the Communication ProcessIn Chapter One, we learne.docx
Elements of the Communication ProcessIn Chapter One, we learne.docxElements of the Communication ProcessIn Chapter One, we learne.docx
Elements of the Communication ProcessIn Chapter One, we learne.docx
 
Elements of Music #1 Handout1. Rhythm the flow of music in te.docx
Elements of Music #1 Handout1. Rhythm  the flow of music in te.docxElements of Music #1 Handout1. Rhythm  the flow of music in te.docx
Elements of Music #1 Handout1. Rhythm the flow of music in te.docx
 
Elements of Music Report InstrumentsFor the assignment on the el.docx
Elements of Music Report InstrumentsFor the assignment on the el.docxElements of Music Report InstrumentsFor the assignment on the el.docx
Elements of Music Report InstrumentsFor the assignment on the el.docx
 
Elements of GenreAfter watching three of the five .docx
Elements of GenreAfter watching three of the five .docxElements of GenreAfter watching three of the five .docx
Elements of GenreAfter watching three of the five .docx
 
Elements of DesignDuring the process of envisioning and designing .docx
Elements of DesignDuring the process of envisioning and designing .docxElements of DesignDuring the process of envisioning and designing .docx
Elements of DesignDuring the process of envisioning and designing .docx
 
Elements of Critical Thinking [WLOs 2, 3, 4] [CLOs 2, 3, 4]P.docx
Elements of Critical Thinking [WLOs 2, 3, 4] [CLOs 2, 3, 4]P.docxElements of Critical Thinking [WLOs 2, 3, 4] [CLOs 2, 3, 4]P.docx
Elements of Critical Thinking [WLOs 2, 3, 4] [CLOs 2, 3, 4]P.docx
 
Elements of DesignDuring the process of envisioning and design.docx
Elements of DesignDuring the process of envisioning and design.docxElements of DesignDuring the process of envisioning and design.docx
Elements of DesignDuring the process of envisioning and design.docx
 
Elements of a contact due 16 OctRead the Case Campbell Soup Co. v..docx
Elements of a contact due 16 OctRead the Case Campbell Soup Co. v..docxElements of a contact due 16 OctRead the Case Campbell Soup Co. v..docx
Elements of a contact due 16 OctRead the Case Campbell Soup Co. v..docx
 
Elements for analyzing mise en sceneIdentify the components of.docx
Elements for analyzing mise en sceneIdentify the components of.docxElements for analyzing mise en sceneIdentify the components of.docx
Elements for analyzing mise en sceneIdentify the components of.docx
 
Elements in the same row have the same number of () levelsWhi.docx
Elements in the same row have the same number of () levelsWhi.docxElements in the same row have the same number of () levelsWhi.docx
Elements in the same row have the same number of () levelsWhi.docx
 
ELEG 421 Control Systems Transient and Steady State .docx
ELEG 421 Control Systems  Transient and Steady State .docxELEG 421 Control Systems  Transient and Steady State .docx
ELEG 421 Control Systems Transient and Steady State .docx
 
Element 010 ASSIGNMENT 3000 WORDS (100)Task Individual assign.docx
Element 010 ASSIGNMENT 3000 WORDS (100)Task Individual assign.docxElement 010 ASSIGNMENT 3000 WORDS (100)Task Individual assign.docx
Element 010 ASSIGNMENT 3000 WORDS (100)Task Individual assign.docx
 
Electronic Media PresentationChoose two of the following.docx
Electronic Media PresentationChoose two of the following.docxElectronic Media PresentationChoose two of the following.docx
Electronic Media PresentationChoose two of the following.docx
 
Electronic copy available at httpssrn.comabstract=2161742.docx
Electronic copy available at httpssrn.comabstract=2161742.docxElectronic copy available at httpssrn.comabstract=2161742.docx
Electronic copy available at httpssrn.comabstract=2161742.docx
 

Recently uploaded

TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 

Recently uploaded (20)

TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 

ELEG 320L – Signals & Systems Laboratory Dr. Jibran Khan Yous.docx

  • 1. ELEG 320L – Signals & Systems Laboratory /Dr. Jibran Khan Yousafzai Lab 4 1 LAB 4: CONVOLUTION Background & Concepts Convolution is denoted by: �[�] = �[�] ∗ ℎ[�] Your book has described the "flip and shift" method for performing convolution. First, we set up two signals �[�] and ℎ[�]: Flip one of the signals, say ℎ[�], to form ℎ[−�]: ELEG 320L – Signals & Systems Laboratory /Dr. Jibran Khan Yousafzai Lab 4
  • 2. 2 Shift ℎ[−�] by n to form ℎ[� − �]. For each value of �, form �[�] by multiplying and summing all the element of the product of�[�]ℎ[� − �], −∞ < � < ∞. The figure below shows an example of the calculation of�[1]. The top panel shows�[�]. The middle panel showsℎ[1 − �]. The lower panel shows�[�]�[1 − �]. Note that this is a sequence on a � axis. The sum of the lower sequence over all k gives �[1] = 2. We repeat this shifting, multiplication and summing for all values of � to get the complete sequence �[�]: ELEG 320L – Signals & Systems Laboratory /Dr. Jibran Khan Yousafzai Lab 4 3
  • 3. The conv Command conv(x,h) performs a 1-D convolution of vectors � and ℎ. The resulting vector � has length length(�) = length(�) + length(ℎ) − 1. Imagine vector � as being stationary and the flipped version of ℎ is slid from left to right. Note that conv(x,h) = conv(h,x). An example of the convolution of two signals and plotting the result is below: >> x = [0.5 0.5 0.5]; %define input signal x[n] >> h = [3.0 2.0 1.0]; %unit-pulse response h[n] >> y = conv(x,h); %compute output y[n] via convolution >> n = 0:(length(y)-1); %for plotting y[n] >> stem(n,y) % plot y[n] >> grid; >> xlabel('n'); >> ylabel('y[n]'); >> title('Output of System via Convolution');
  • 4. ELEG 320L – Signals & Systems Laboratory /Dr. Jibran Khan Yousafzai Lab 4 4 Deconvolution The command [q,r] = deconv(v,u), deconvolves vector u out of vector v, using long division. The quotient is returned in vector q and the remainder in vector r such that v = conv(u,q)+r. If u and v are vectors of polynomial coefficients, convolving them is equivalent to multiplying the two polynomials, and deconvolution is polynomial division. The result of dividing v by u is quotient q and remainder r. An examples is below: If >> u = [1 2 3 4];
  • 5. >> v = [10 20 30]; The convolution is: >> c = conv(u,v) c = 10 40 100 160 170 120 Use deconvolution to recover v. >> [q,r] = deconv(c,u) q = 10 20 30 r = 0 0 0 0 0 0 This gives a quotient equal to v and a zero remainder. Structures Structures in Matlab are just like structures in C. They are basically containers that allow one to group together more than one type of data under the umbrella of one
  • 6. variable name. As we mentioned previously, Matlab always assumes that the index of the first element of an array is 1. So, when we just say: >> x = [1 2 3 4 5]; ELEG 320L – Signals & Systems Laboratory /Dr. Jibran Khan Yousafzai Lab 4 5 This means that �[1] = 1, �[2] = 2, and so on. But, what if we want to express a sequence �[−1] = 1, �[0] = 2, . ..? We obviously need to provide the user with some additional information in addition to the array data, namely an offset. An offset of -1 tells the user that "we want you to interpret the first point in the Matlab array as corresponding to �[−1]. We can use structures for this purpose. The form of a structure is variable Name.field. For example:
  • 7. >> x.data = [1 2 3 4 5]; >> x.offset = -1; >> x x = data: [1 2 3 4 5] offset: -1 We have declared a variable x, with two fields. The data field contains an array; the offset field contains another number. Structures of this type can be useful for us in expressing sequences in Matlab. ELEG 320L – Signals & Systems Laboratory /Dr. Jibran Khan Yousafzai Lab 4 6 EXERCISES
  • 8. Exercise 1: Let �[�] = �[�] – �[� − 4] �[�] = �. �[�] – 2(� − 4). �[� − 4] + (� − 8). �[� − 8] Make stem plots of the following convolutions using MATLAB. 1. �[�] ∗ �[�] 2. �[�] ∗ �[�] ∗ �[�] 3. �[�] ∗ �[�] 4. �[�] ∗ �[�] 5. �[�] ∗ �[�] Exercise 2: Consider the interconnection of the LTI systems depicted in the following figure: Generate the impulse response of the overall system when: ℎ1[�] = 2� {�[�] − �[� − 4]}, 0 ≤ � ≤ 4 ℎ2[�] = �[�] − 4�[� − 4], 0 ≤ � ≤ 5 ℎ3[�] = ℎ4[�] = �[� − 5], 0 ≤ � ≤ 6
  • 9. Exercise 3: Using structures & conv command, find out the convolution of two sequences with arbitrary starting points.