<< Chapter < Page | Chapter >> Page > |
This integral defines the convolution operator $*$ and provides a way of finding the output $y\left(t\right)$ of any linear system, given its impulse response $h\left(t\right)$ and the input $x\left(t\right)$ .
M
atlab has several functions that simplify the numerical
evaluation of convolutions. The most obvious of these is
conv
, which is
used in
convolex.m
to calculate the convolution
of an input
x
(consisting of two delta functions at times
$t=1$ and
$t=3$ ) and a system with impulse response
h
that is an exponential pulse. The convolution gives
the output of the system.
Ts=1/100; time=10; % sampling interval and total time
t=0:Ts:time; % create time vectorh=exp(-t); % define impulse response
x=zeros(size(t)); % input is sum of two delta functions...x(1/Ts)=3; x(3/Ts)=2; % ...at times t=1 and t=3
y=conv(h,x); % do convolution and plotsubplot(3,1,1), plot(t,x)
subplot(3,1,2), plot(t,h)subplot(3,1,3), plot(t,y(1:length(t)))
convolex.m
example of numerical convolution
(download file)
[link] shows the input to the system in the top plot,the impulse response in the middle plot, and the output of the system in the bottom plot. Nothing happens before time $t=1$ , and the output is zero. When the first spike occurs,the system responds by jumping to 3 and then decaying slowly at a rate dictated by the shape of $h\left(t\right)$ . The decay continues smoothly until time $t=3$ , when the second spike enters. At this point, the output jumps up by 2, andis the sum of the response to the second spike, plus the remainder of the response to the first spike. Since there are no more inputs,the output slowly dies away.
Suppose that the impulse response $h\left(t\right)$ of a linear system is the exponential pulse
Suppose that the input to the system is $3\delta (t-1)+2\delta (t-3)$ . Use the definition of convolution [link] to show that the output is $3h(t-1)+2h(t-3)$ , where
How does your answer compare to [link] ?
Suppose that a system has an impulse response that is an exponential pulse.
Mimic the code in
convolex.m
to find its output
when the input is a white noise (recall
specnoise.m
).
Mimic the code in
convolex.m
to find the output of
a system when the input is an exponential pulse and theimpulse response is a sum of two delta functions at times
$t=1$ and
$t=3$ .
The next two problems show that linear filters commute with differentiation, and with each other.
Use the definition to show that convolution is commutative (i.e., that ${w}_{1}\left(t\right)*{w}_{2}\left(t\right)={w}_{2}\left(t\right)*{w}_{1}\left(t\right)$ ). Hint: Apply the change of variables $\tau =t-\lambda $ in [link] .
Suppose a filter has impulse response $h\left(t\right)$ . When the input is $x\left(t\right)$ , the output is $y\left(t\right)$ . If the input is ${x}_{d}\left(t\right)=\frac{\partial x\left(t\right)}{\partial t}$ , the output is ${y}_{d}\left(t\right)$ . Show that ${y}_{d}\left(t\right)$ is the derivative of $y\left(t\right)$ . Hint: Use [link] and the result of Exercise [link] .
Let $w\left(t\right)=\Pi \left(t\right)$ be the rectangular pulse of [link] . What is $w\left(t\right)*w\left(t\right)$ ? Hint: A pulse shaped like a triangle.
Redo Exercise
[link] numerically by suitably modifying
convolex.m
. Let
$T=1.5$ seconds.
Notification Switch
Would you like to follow the 'Software receiver design' conversation and receive update notifications?