0% found this document useful (0 votes)
23 views

Experiment III

The document outlines an experiment on Discrete Signals Manipulation, detailing expected learning outcomes such as plotting discrete signals, signal manipulation, convolution, and auto-correlation. It includes functions for various operations like signal addition, multiplication, shifting, folding, convolution, and deconvolution, along with homework questions to reinforce understanding. Additionally, it covers the significance of auto-correlation and provides mathematical formulas and applications related to correlation in signal processing.

Uploaded by

moafash
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)
23 views

Experiment III

The document outlines an experiment on Discrete Signals Manipulation, detailing expected learning outcomes such as plotting discrete signals, signal manipulation, convolution, and auto-correlation. It includes functions for various operations like signal addition, multiplication, shifting, folding, convolution, and deconvolution, along with homework questions to reinforce understanding. Additionally, it covers the significance of auto-correlation and provides mathematical formulas and applications related to correlation in signal processing.

Uploaded by

moafash
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/ 4

Experiment Discrete Signals Manipulation

PREPARED BY:

Prof. Ammar M. Abu-Hudrouss


Eng. MuhammadHashim I. Jabr

EXPECTED LEARNING OUTCOME:

Our aim is to become familiar with:


• Plotting different types of Discrete Signals.
• Discrete Signals Manipulation.
• Convolution and Deconvolution of two sequences.
• To compute auto correlation between two sequences.

Part I: Plotting different types of Discrete Signals


• Unit-Sample Sequence: the function impseq takes 3 parameters: the discrete time
n0 where the impulse exists, and both the beginning and the end of the discrete
signal.
function[x,n]=impseq(no,n1,n2)
n=[n1:n2];
x=[(n-no) == 0];
end
• Unit-Step Sequence: the function stepseq takes 3 parameters: the discrete time n0
where the step sequence starts, and both the beginning and the end of the discrete
signal.
function[x,n]=stepseq(no,n1,n2)
n=[n1:n2];
x=[(n-no) >= 0]; 1
end
• Real-Valued Exponential Sequence: consider the function 𝑥𝑥 = 𝑎𝑎𝑛𝑛 , plot the function
given for a different four cases.
1. 0 < a < 1
2. a > 1
3. -1 > a
4. 0 > a > -1

Part II: Discrete Signals Manipulation


• Signal Addition: the sigadd function takes 4 parameters as shown below.
function[y,n]=sigadd(x1,n1,x2,n2)
n=min(min(n1),min(n2)):max(max(n1),max(n2));
y1=zeros(1,length(n));
y2=y1;
y1(find((n>=min(n1))&(n<=max(n1))==1))=x1;
y2(find((n>=min(n2))&(n<=max(n2))==1))=x2;
y=y1+y2;
end
• Signal Multiplication: the sigmult function takes 4 parameters as shown below.
function[y,n]=sigmult(x1,n1,x2,n2)
n=min(min(n1),min(n2)):max(max(n1),max(n2));
y1=zeros(1,length(n));
y2=y1;
y1(find((n>=min(n1))&(n<=max(n1))==1))=x1;
y2(find((n>=min(n2))&(n<=max(n2))==1))=x2;
y=y1.*y2;
end
• Signal Shifting: the sigshift function takes 3 parameters as shown below.
function[y,n]=sigshift(x,n,no)
n=n+no;
y=x;
end

• Signal Folding: the sigshift function takes 2 parameters as shown below.


function[y,n]=sigfold(x,n)
y=fliplr(x);
n=-fliplr(n);
end

2
Part III: Convolution and Deconvolution of two sequences

• Convolution: the conv-m function takes 4 parameters as shown below.


function [y, ny] = conv_m(x1, n1, x2, n2)
nys = n1(1) + n2(1);
nye = n1(length(x1)) + n2(length(x2));
ny = [nys:nye];
y = conv(x1, x2);
end
• Deconvolution: the deconv-m function takes 4 parameters as shown below.
function [y, ny, r] = deconv_m(x1, n1, x2, n2)
nys = n1(1) - n2(1);
nye = n1(length(x1)) - n2(length(x2));
ny = [nys:nye];
[y, r] = deconv(x1, x2);
end

Homework:
1. Explain the significance of convolution.
2. Define linear convolution.
3. Why linear convolution is called as a periodic convolution?
4. Why zero padding is used in linear convolution?
5. What are the four steps to find linear convolution?
6. What is the length of the resultant sequence in linear convolution?
7. How linear convolution will be used in calculation of LTI system response?
8. List few applications of linear convolution in LTI system design.
9. Give the properties of linear convolution.
10. How the linear convolution will be used to calculate the DFT of a
signal?
11. Find the addition, multiplication and linear convolution of given
two signals:
x(n) = [7 5 4 0] and h(n) = [0 3 6 2 9]
without using the functions given in the lab.

3
Part IV: Auto-correlation between two sequences

The cross-correlation function is a measure of similarity between a signal & its time
delayed version. It is represented with R(k). Let, x(n) be a signal, then the cross-correlation

function of x(n) is: 𝑅𝑅(𝑘𝑘) = �𝑛𝑛=−∞ x(n)𝑥𝑥(𝑛𝑛 − 𝑘𝑘) , or as follows for the auto-correlation:

• Let x(n) be the sequence [1,2,3,4], find Rxx(k).

Homework:
1. Write mathematical formula to find auto correlation?
2. Define auto correlation?
3. Define correlation
4. Difference between Auto correlation and convolution?
5. Difference between Auto correlation and cross correlation?
6. Write mathematical formula to find cross correlation?
7. What is the length of the resultant sequence of auto
correlation?
8. List few applications of correlation.
9. Give the properties of auto correlation.
10. Define cross correlation?
11. Find the auto correlation function of ramp sequence for
0≤n≤6.

You might also like