Sie sind auf Seite 1von 3

LINEAR CONVOLUTION OF TWO

SEQUENCES
INTRODUCTION

Convolution is the process used to find the response of a Linear Time Invariant system to a
given input, assuming we already know the impulse response of that system. In case of
continuous-time signals, we can find the system response using the Convolution Integral,
while in case of discrete-time systems, the response can be calculated using the Convolution
Sum

Let x 1(n) and x 2(n) be two discrete time signals. The convolution sum of the two signals

can be calculated using the formula:



y ( n )=x 1 ( n )x 2 ( n )= x 1 ( k ) x2 (nk )
k=

If x 1(n) is a M point sequence and x 2(n) is an N point sequence, then the convolved

sequence, y(n) is a (M+N-1) point sequence.

We can perform the convolution by different methods:

1. Using MATLABs conv function:


MATLAB has a built-in function called conv function, which basically performs a linear
convolution of any two given sequences.

2. Using the Linear Convolution Sum formula:


Here, we use the convolution sum formula and substitute values o f n a nd k in the
expression, and calculate the values of the convolved signal. Alternatively, we can perform
the signal inversion-time shift-superposition method, by which we can calculate the
resultant signal values.

x1 x2
Assume two discrete-time sequences and in a Linear Time
Invariant System, given by:

x 1 ( n ) ={1, 2,1, 3} and x 2 ( n ) ={2, 3,2 }

Digital Signal Processing


College of Engineering
PAF Karachi Institute of Economics and Technology
x1 x2
We see that length of sequence is (M = 4) and that of sequence is
(N = 3). Therefore, the length of the convolved sequence will be (M+N-1 =
6).
Using any of the above given methods, we see that the resultant
convolved sequence can be given by:

y ( n )=x 1 ( n )x 2 ( n )={2 7 21 116 }

CORRELATION:
A signal operation similar to signal convolution, but with completely different physical
meaning, is signal correlation. The signal correlation operation can be performed either with
one signal (autocorrelation) or between two different signals (cross correlation). Physically,
signal autocorrelation indicates how the signal energy (power) is distributed within the
signal, and as such is used to measure the signal power. Signal cross correlation can be also
considered as a measure of similarity of two signals.

Given two discrete time real signals (sequences) x[k] and y[k].the autocorrelation and cross
correlation functions are respectively defined by

R xx [ k ]= x [ m ] x [ mk ] , R yy [ k ] = y [ m ] y [ mk ] ,
m= m =


R xy [ k ] = x [ m ] y [ mk ] , R yx [ k ] = y [ m ] x [ mk ] ,
m= m=

Where the parameter K is any integer, k

TASK:

Digital Signal Processing


College of Engineering
PAF Karachi Institute of Economics and Technology
Write a MATLAB code to apply cross correlation and autocorrelation on the
following signal.

x (n)=2n [u ( n1 ) u(n4 )]

h ( n )=u (n+5 )u(n1)

Digital Signal Processing


College of Engineering
PAF Karachi Institute of Economics and Technology

Das könnte Ihnen auch gefallen