Introduction To Convolution: Definition Convolution Is An Operator That Takes An Input

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 15

Introduction to Convolution

Definition Convolution is an operator that takes an input


signal and returns an output signal, based on knowledge
about the system’s unit impulse response h[n].
x[n] = [n] System y[n] = h[n]

x[n] System: h[n] y[n]

The basic idea behind convolution is to use the system’s


response to a simple input signal to calculate the
response to more complex signals
This is possible for LTI systems because they possess the
superposition property (lecture 3):
x[n]  k ak xk [n]  a1 x1[ n]  a2 x2 [n]  a3 x3 [n]  

y[n]  k ak yk [n]  a1 y1[n]  a2 y2 [n]  a3 y3[n]  

EE-2027 SaS, L4: 1/17


Discrete Impulses & Time Shifts
Basic idea: use a (infinite) set of of discrete time impulses to
represent any signal.
Consider any discrete input signal x[n]. This can be written
as the linear sum of a set of unit impulse signals:
x[1] n  1
x[1] [n  1]  
 0 n  1 x[1]  [n  1]
x[0] n  0
x[0] [n]  
 0 n0
x[1] n  1
x[1] [n  1]   actual value Impulse, time
 0 n 1 shifted signal
Therefore, the signal can be expressed as:
x[n]    x[2] [n  2]  x[1] [n  1]  x[0] [n]  x[1] [n  1]  
In general, any discrete signal can be represented as:

x[n]   x[k ] [n  k ]
k  
The sifting property

EE-2027 SaS, L4: 2/17


Example
The discrete signal x[n]

Is decomposed into the following


additive components
x[-4][n+4] +
x[-3][n+3] + x[-2][n+2] + x[-1][n+1] + …

EE-2027 SaS, L4: 3/17


Discrete, Unit Impulse System Response
A very important way to analyse a system is to study
the output signal when a unit impulse signal is used
as an input
[n] System:  h[n]

Loosely speaking, this corresponds to giving the system


a kick at n=0, and then seeing what happens
This is so common, a specific notation, h[n], is used to
denote the output signal, rather than the more
general y[n].
The output signal can be used to infer properties about
the system’s structure and its parameters .

EE-2027 SaS, L4: 4/17


Types of Unit Impulse Response
Causal, stable, finite impulse response
y[n] = x[n] + 0.5x[n-1] + 0.25x[n-2]
Looking at unit impulse
responses, allows you to
determine certain system
properties

Causal, stable, infinite impulse response


y[n] = x[n] + 0.7y[n-1]

Causal, unstable, infinite impulse response


EE-2027 SaS, L4: y[n] = x[n] + 1.3y[n-1] 5/17
Linear, Time Varying Systems
If the system is time varying, let hk[n] denote the response
to the impulse signal [n-k] (because it is time varying,
the impulse responses at different times will change).
Then from the superposition property (Lecture 3) of linear
systems, the system’s response to a more general input
signal x[n] can be written as:
Input signal 
x[n]   x[k ] [n  k ]
k  

System output signal is given by the convolution sum



y[n]   x[k ]h [n]
k  
k

i.e. it is the scaled sum of impulse responses


EE-2027 SaS, L4: 6/17
Example: Time Varying Convolution
x[n] = [0 0 –1 1.5 0 0 0]
h-1[n] = [0 0 –1.5 –0.7 .4 0 0]
h0[n] = [0 0 0 0.5 0.8 1.7 0]

y[n] = [0 0 1.4 1.4 0.7 2.6 0]

EE-2027 SaS, L4: 7/17


Linear Time Invariant Systems
When system is linear, time invariant, the unit impulse
responses are all time-shifted versions of each other:
hk [n]  h0  n  k 
It is usual to drop the 0 subscript and simply define the
unit impulse response h[n] as:
h[n]  h0  n
In this case, the convolution

sum for LTI systems is:
y[n]   x[k ]h[n  k ]
k  

It is called the convolution sum (or superposition sum)


because it involves the convolution of two signals x[n]
and h[n], and is sometimes written as:
y[n]  x[n] * h[n]

EE-2027 SaS, L4: 8/17


System Identification and Prediction
Note that the system’s response to an arbitrary input signal is
completely determined by its response to the unit impulse.
Therefore, if we need to identify a particular LTI system, we
can apply a unit impulse signal and measure the system’s
response.
That data can then be used to predict the system’s response
to any input signal
x[n] y[n]
System: h[n]

Note that describing an LTI system using h[n], is equivalent to


a description using a difference equation. There is a direct
mapping between h[n] and the parameters/order of a
difference equation such as:
y[n] = x[n] + 0.5x[n-1] + 0.25x[n-2]

EE-2027 SaS, L4: 9/17


Example 1: LTI Convolution
Consider a LTI system with the
following unit impulse response:
h[n] = [0 0 1 1 1 0 0]

For the input sequence:


x[n] = [0 0 0.5 2 0 0 0]

The result is:


y[n] = … + x[0]h[n] + x[1]h[n-1] + …
=0+
0.5*[0 0 1 1 1 0 0] +
2.0*[0 0 0 1 1 1 0] +
0
= [0 0 0.5 2.5 2.5 2 0]

EE-2027 SaS, L4: 10/17


Example 2: LTI Convolution
Consider the problem
described for example 1
Sketch x[k] and h[n-k] for any
particular value of n, then
multiply the two signals and
sum over all values of k.
For n<0, we see that x[k]h[n-k]
= 0 for all k, since the non-
zero values of the two
signals do not overlap.
y[0] = kx[k]h[0-k] = 0.5
y[1] = kx[k]h[1-k] = 0.5+2
y[2] = kx[k]h[2-k] = 0.5+2
y[3] = kx[k]h[3-k] = 2
As found in Example 1

EE-2027 SaS, L4: 11/17


Example 3: LTI Convolution
Consider a LTI system that has a step
response h[n] = u[n] to the unit
impulse input signal
What is the response when an input
signal of the form
x[n] = nu[n]
where 0<<1, is applied?
For n0: n
y[n]    k
k 0

1   n 1

1
Therefore,
 1   n 1 
y[n]   u[n]
 1 

EE-2027 SaS, L4: 12/17


Discrete LTI Convolution in Matlab
In Matlab to find out about a command, you can search the help
files or type:
>> lookfor convolution
at the Matlab command line. This returns all Matlab functions that
contain the term “convolution” in the basic description
These include:
conv()
To see how this works and other functions that may be appropriate,
type:
>> help conv
at the Matlab command line
Example:
>> h = [0 0 1 1 1 0 0];
>> x = [0 0 0.5 2 0 0 0];
>> y = conv(x, h)
>> y = [0 0 0 0 0.5 2.5 2.5 2 0 0 0 0 0]

EE-2027 SaS, L4: 13/17


Lecture 4: Summary
Any discrete LTI system can be completely determined by
measuring its unit impulse response h[n]
This can be used to predict the response to an arbitrary input
signal using the convolution operator:

y[n]   x[k ]h[n  k ]
k  

The output signal y[n] can be calculated by:


• Sum of scaled signals – example 1
• Non-zero elements of h – example 2
The two ways of calculating the convolution are equivalent

Calculated in Matlab using the conv() function (but note that


there are some zero padding at start and end)

EE-2027 SaS, L4: 14/17


Lecture 4: Exercises
Q2.1-2.7, 2.21

Calculate the answer to Example 3 in Matlab, Slide 14

EE-2027 SaS, L4: 15/17

You might also like