This preview shows pages 1–3. Sign up to view the full content.
Page 1  9
Convolution
Recall that the convolution of two functions
f
1
(
t
) and
f
2
(
t
) is written
f
1
*
f
2
(t) and is defined by the convolution integral:
f
1
*
f
2
(
t
)
=
f
1
(
!
)
"#
+
#
$
f
2
(
t
"
)
d
In Maple this integral can be found using:
> f1*f2(t) = int( f1(tau)* f2(ttau) , tau=infinity .
. infinity);
However, even Maple often has trouble evaluating such integrals in closed form. It can however, always evaluate the integral
numerically and create a graph of the resulting convolution. Thus you will always be able to create an accurate graph of the convolution
of any two functions.
Step 0 
Set up our usual definitions and aliases for the singularity functions
u
and
r
. (unit step and ramp)
alias(u=Heaviside): r := t > t*u(t):
Exercise 1 
Define and plot the two piecewiselinear functions
x
(
t
) and
h
(
t
) using these pictures as guides.
x
(
t
)
h
(
t
)
x := t > 2*u(t2) 2* u(t4): h:= t > u(t) 2*u(t1) + u(t2):
Plot them both to be sure they have been entered correctly.
plot( [x(t), h(t) ], t=4.
.6, color = [red, green], thickness =[1,2], ytickmarks=4,
font=[TIMES, 18,BOLD]);
Now obtain the convolution
c
(
t
) using the convolution integral and then plot it.
c := t > int( x(tau)* h(ttau), tau=infinity .
. infinity); c(t);
plot(c(t), t=4.
.8, thickness=2, color=blue, font=[TIMES, PLAIN,24], gridlines=true);
You can specify the font
for the graph.
Specify whatever
thickness you want for
each graph.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document Page 2  9
Notice Maple did not evaluate the integral in a simple closed form. However, you can write out the answer by inspecting the above
graph and using our expansion for any piecewise linear function. Express the convolution
c
(
t
) in terms of ramp and/or unit step
functions. Note the slope jumps at
t
= 2, 3, 5 and 6. We will denote your visually determined answer as
Y
(
t
) to distinguish it from
c
(
t
).
Y
(
t
) = ………………………………………………………………………………………………….
.
Then plot your exact expression
Y
(
t
) simultaneously with
c
(
t
), (determined by numerical integration), and confirm they are identical.
Y := t > 2*r(t2)  4*r(t3) + 4* r(t5)  2*r(t6);
plot( [Y(t), c(t)], t=4.
.8, thickness=2, color=[blue,red], thickness=[4,1],
font=[TIMES, PLAIN,24], title="Double Check");
Convolution Animation
Create an animation to illustrate the convolution process. Just enter the following code. We will start from scratch.
Step 1: Define the two functions and find their convolvution.
restart;
alias(u=Heaviside): r := t > t*u(t):
x := t > 2*u(t2) 2* u(t4): h:= t > u(t) 2*u(t1) + u(t2):
y := t > int( x(tau)* h(ttau), tau=infinity .
. infinity);
Step 2: Create the convolution animation. The first line gives the range for the tau and t variables.
Adjust the range as desired.
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 09/22/2009 for the course ECES 302 taught by Professor Carr during the Spring '08 term at Drexel.
 Spring '08
 CARR

Click to edit the document details