Professional Documents
Culture Documents
Convolution
Convolution
x(k)(n k)
k=
So let us consider x(n) written in this form to be our input to the LTI system.
"
#
X
x(k)(n k)
y(n) = L [x(n)] = L
k=
This looks like our general linear form with a scalar x(k) and a signal in n, (n k). Recall
that for an LTI system:
Linearity (L): ax1 (n) + bx2 (n) L ay1 (n) + by2 (n)
Time Invariance (TI): x(n no ) L y(n no )
We can use the property of linearity to distribute the system L over our input.
"
#
X
X
y(n) = L
x(k)(n k) =
x(k)L [(n k)]
k=
k=
So now we wonder, what is L [(n k)]? Well, we can figure it out. Suppose we know how
L acts on one impulse (n), and we call it
h(n) = L [(n)]
ENGI 7824 Discrete-Time Systems and Signals
x(k)h(n k)
k=
x(k)h(n k)
k=
1.1
1. A systems impulse response, h(n), completely characterizes the behaviour of the system.
2. The impulse response h(n) can be generated directly from (n) through L, since (n) is
an actual signal in DT. Thus, we can actually find the impulse response experimentally.
3. Compare convolution in DT and CT.
DT convolution has an output variable n and a dummy variable k which causes
a shift and flip.
DT y(n) = x(n) h(n) =
x(k)h(n k)
k=
CT convolution has one signal in terms of the dummy variable, and the other
shifted and flipped on the dummy variable, but centred on the output variable.
Z
CT y(t) = x(t) h(t) =
x( )h(t )d
Examples of Convolution
Convolution is best understood when seen in action. Lets look at a couple of examples,
one using signals and impulse responses defined functionally, and another with an impulse
response defined point-wise.
Example 2.1: DT Convolution: Step Response
Say we are given the following signal x(n) and system impulse response h(n).
n
1
x(n) = u(n) and h(n) =
u(n)
2
We wish to find the step response s(n) of the system (i.e. the response of the
system to the unit step input x(n) = u(n). This is shown below.
x(k)h(n k)
k=
Thus the step response is as follows, found by substituting our actual signals into
the general convolution sum.
nk
1
s(n) =
u(k)
u(n k)
2
k=
Lets look at this step response in smaller ranges to see what happens.
First, consider the case where n < 0.
ENGI 7824 Discrete-Time Systems and Signals
Notice that there is no non-zero overlap of x(k) and h(n k). Since they
are multiplied together, the zero part of one signal cancels out the non-zero
part of the other, and vice versa. Thus, s(n) = 0 for n < 0.
The more interesting case is when n 0.
Recall the convolution sum we are using to determin s(n).
nk
1
u(n k)
s(n) =
u(k)
2
k=
Note that u(k) means we know the summation will be 0 for all values of
k < 0, so we can change the lower limit of the summation to 0. Similarly,
the u(n k) term means that the summation for all values of k > n will
be 0, since that unit step is flipped and extends toward . So, we can
change the upper limit of the summation to n. In the range 0 k n,
both of the unit steps will have a value of 1. This is shown below.
nk
1
u(n k)
s(n) =
u(k)
2
k=
nk
n
X
1
1
1
=
2
k=0
We can pull out any terms only in n
since that is not the summation variable.
n n k
X
1
1
=
2
2
k=0
n X
n k
1
1
=
2
2
k=0
n X
n
1
2k
=
2
k=0
Now we have a form consistent with a geometric series. We can use that to
solve.
n
X
1 2n+1
Recall
2k =
= 2n+1 1
1
2
k=0
So we have s(n) as follows.
s(n) =
=
=
=
s(n) =
n
1
2n+1 1
2
n
1
(2 2n 1)
2
!
n
n
1
1
2
1
2
2
n n
n
1
1
1
2
1
2
2
2
n
1
2
2
We can visualize this, say for n = 2, as shown below. Note how the system
output comes from the overlap of the input signal and the shifted and flipped
impulse response.
The u(n) comes from our first case above since s(n) = 0 for n < 0, and obviously
the other part comes from the expression found in the second case above.
Now consider some variations on this first example.
Example 2.2: Variations on the Step Response
1. How would the system in the previous example react if the input was x(n) =
u(n) u(n 4)?
We could work this through mathematically, using the convolution sum,
but that is not necessary in this case. Remember, our system is LTI. (If the
system is not LTI, there is no valid impulse response). Since the system is
LTI, we can break down its response.
y(n) = L[x(n)]
= L[u(n) u(n 4)]
= L[u(n)] L[u(n 4)]
In the prior example we determined s(n) = L[u(n)] and since the system is
time invariant, we also know that s(n 4) = L[u(n 4)].
So, overall, we have the following system output y(n).
y(n) = s(n) s(n 4)
"
n
n4 #
1
1
= 2
u(n) 2
u(n 4)
2
2
These variations have shown how we can deal with more complex systems as
combinations of simpler systems that are often already known.
Now lets consider an example which is not so nicely mathematically defined.
Example 2.3: Graphical Convolution
Even though the convolution sum is nicely defined, sometimes it cant be nicely
worked out. Thus, it is also useful to understand the concept of how the convolution sum works.
ENGI 7824 Discrete-Time Systems and Signals
0
for n < 0
1
for 0 n 3
h(n) =
2
for 4 n 5
0
for n > 5
X
k=
x(k)h(n k)
u(k 4)h(n k)
k=
X
=
1 h(n k)
k=4
10
When n = 5, y(5) = 2 since it is the sum of the two overlapping points. This is
shown in the figure below.
11
For the case where n 9, y(n) = 1 since it is summing over the entire length of
the impulse response. This is shown in the figure below.
12
Discrete-time convolution has several useful properties that allows us to solve systems more
easily.
3.1
Commutativity
x(k)h(n k) =
k=
3.2
h(k)x(n k)
k=
Associativity
Convolution is associative, meaning that convolution operations in series can be done in any
order.
(x(n) h(n)) g(n) = x(n) (h(n) g(n))
This is significant because it means systems in series can be reordered.
Thus we have
x(n) h(n) g(n) y(n)
is the same as
x(n) h(n) g(n) y(n)
is the same as
x(n) g(n) h(n) y(n)
is the same as
x(n) g(n) h(n) y(n)
and so the systems in series can be reordered.
13
3.3
Distributivity
3.4
Identity
We have previously established that (n) is the identity with respect to discrete-time convolution.
X
Recall x(n) =
x(k)(n k) = x(n) (n)
k=
14
For the above systems, we can apply the same principles as in the first part
of the example. Once we have found the overall impulse response, we can
find the output just as with any other impulse response (albeit with a lot
more tedium).
hoverall (n) = [h1 (n) + h2 (n)] [(h3 (n) [h4 (n) + h5 (n)]) + h6 (n)] h7 (n)
As we have seen, it is possible to build more complex systems from interconnections of simpler ones, and still have an overall impulse response to represent the
system.
15