0% found this document useful (0 votes)
56 views

Convolution 18.031, Haynes Miller and Jeremy Orloff

The document defines and provides examples of convolution, which is an integral that produces another function. Convolution is used to represent the response of a linear time-invariant system to an input. Specifically: 1) Convolution is defined as an integral of one function multiplied by the other function shifted in time. 2) Convolution satisfies properties like linearity and commutativity. 3) For a first order differential equation, the variation of parameters formula gives the solution as the convolution of the input and the weight function of the system. 4) Convolution with delta functions follows specific rules, like a delta function shifting the argument of the other function within the integral.

Uploaded by

Prineezy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

Convolution 18.031, Haynes Miller and Jeremy Orloff

The document defines and provides examples of convolution, which is an integral that produces another function. Convolution is used to represent the response of a linear time-invariant system to an input. Specifically: 1) Convolution is defined as an integral of one function multiplied by the other function shifted in time. 2) Convolution satisfies properties like linearity and commutativity. 3) For a first order differential equation, the variation of parameters formula gives the solution as the convolution of the input and the weight function of the system. 4) Convolution with delta functions follows specific rules, like a delta function shifting the argument of the other function within the integral.

Uploaded by

Prineezy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Convolution

18.031, Haynes Miller and Jeremy Orloff

1 Introduction

The convolution product of two functions is a peculiar looking integral which produces
another function. It is found in a wide range of applications, so it has a special name and
a special symbol. The convolution of f and g is denoted f ∗ g and defined by
Z t+
(f ∗ g)(t) = f (s)g(t − s) ds.
0−

We will start studying this formula without any motivation. It’s main properties are rela-
tively easy to deduce from its definition.
The motivation will come in the form of Green’s formula. Green’s formula is an important
tool which tells us how to solve a linear time invariant (LTI) system with any input and
rest IC once we know its unit impulse response (weight function). We have already such a
formula in the frequency domain, i.e. X(s) = G(s)F (s). Green’s formula is an equivalent
formula, but completely in the time domain.
We know that many computations are more complicated in the time domain than in the
frequency domain. So it is not surprising that Green’s formula which involves convolution
feels much more, well, convoluted than the simple formula X(s) = G(s)F (s). We consider
it because it offers some new insights into solutions of LTI systems and because it can be
useful in cases where we don’t know the Laplace transform of the input, but do know it in
the time domain.
Technical Detail: Because we want convolution to work with delta functions we needed
to be careful with the limits of integration. This explains the plus and minus on the limits.
If both functions are continuous or have at most jump discontinuities then the limits can
safely be set to 0 and t.

2 The missing formula

Let’s make a quick summary of what we’ve learned about systems and the connections in
between the time and frequency domains. Suppose we have a system P (D)x = Q(D)f .
Then we know:
L
Frequency domain (s) ←−−−−− Time domain (t)
−−−−1
−−→
L
Q(s)
System function G(s) = ←→ weight function w(t)
P (s)
Response X(s) = G(s)F (s) ←→ Response x(t) = ???
We see that X(s) is given by a formula in terms G(s) and F (s). So we expect that the
missing formula in the last cell in the box should give x(t) in terms of w(t) and f (t). In

1
18.031 Convolution 2

what follows below we will define the convolution of two functions; give it a notation f ∗ g
and show the formula
x(t) = w ∗ f (t).

3 Definition of convolution

We start by defining convolution. We will leave this unmotivated for a few sections, and
for now just learn how to work with it.
The convolution of two functions f and g is a third function which we denote f ∗ g. It is
defined as the following integral
Z t+
(f ∗ g)(t) = f (τ )g(t − τ ) dτ for t > 0. (1)
0−

There are a few things to point out about the formula.

• The variable of integration is τ . We can’t use t because that is already used in the
limits and in the integrand. We can choose any symbol we want for the variable of
integration –it is just a dummy variable.

• The limits of integration are 0− and t+ . This will only be important, when we work
with delta functions. If f and g are continuous or have at worst jump discontinuities
then we can use 0 and t for the limits.

• If we don’t need to worry about delta functions we will often write convolution without
the plus and minus: Z t
f ∗ g(t) = f (τ )g(t − τ ) dτ.
0

• We are considering one-sided convolution. There is also a two-sided convolution


where the limits of integration are ±∞.

• (Important.) One-sided convolution is only concerned with functions on the interval


(0− , ∞). When using convolution we never look at t < 0.

4 Examples

Example 1 below calculates two useful convolutions from the definition (1). As you will see,
the form of f ∗ g is not easy to guess from the forms of f and g.
eat − ebt
Example 1. Show (i) eat ∗ ebt = if a 6= b; and (ii) eat ∗ eat = t eat .
a−b
answer: We will show (i); the calculation for (ii) is similar. If a =
6 b,
#t
t t
e(a−b)τ e(a−b)t − 1 eat − ebt
Z Z
eat ∗ ebt = eaτ eb(t−τ ) dτ = ebt e(a−b)τ dτ = ebt = ebt = .
0 0 a−b a−b a−b
0
18.031 Convolution 3

Note that because the functions are continuous we could safely integrate just from 0 to t
instead of having to use limits 0− and t+ .
One of our goals is to see that we can use convolution to give a formula for the response of
an LTI system in terms of the weight function and input. The next example illustrates this
for a first order differential equation.
Example 2. Use the variation of parameters formula to give an integral solution to the
following first order constant-coefficient differential equation with rest initial conditions.

ẋ + kx = f (t). (2)

Then rearrange the integral to show that gives the integral for the convolution of the input
f (t) and the weight function for this system.
For this example you can assume f (t) is continuous so we don’t have to worry about 0−
and t+ .
answer: Since f (t) is left unspecified, the best we can hope for is a formula in terms of f .
The variation of parameters formula gives
Z t
x(t) = e−kt f (τ )ekτ dτ.
0

Notes: 1. We won’t derive this formula, but if you don’t know it you can easily look it
up.
2. Because the integral is easy to differentiate you can easily check the formula gives a
solution by substituting it into the differential equation.
3. If you take t = 0 the integral 0 because it is over the interval [0, 0], so x(0) = 0 satisfies
the rest-initial condition.
Next we rewrite the solution to see it is a convolution. The system ẋ + kx = f (t) has system
function 1/(s + k). Thus the weight function is w(t) = L−1 (1/(s + k)) = u(t)e−kt .
Now, since the integral is over τ the factor of e−kt can be brought inside the integral. We
get Z t Z t Z t
x(t) = e−kt f (τ )ekτ dτ. = f (τ )e−kt ekτ dτ. = f (τ )e−k(t−τ ) dτ.
0 0 0

The last expression is a convolution. In fact, since w(t) = e−kt , we have that the last
integral is just w ∗ f (t). That is, we have found the formula x(t) = w ∗ f (t).
This is the simplest case of Green’s formula. It gives the response as the convolution of
the input and weight functions. We will see that this holds for all LTI systems.

5 Properties of convolution

1. Linearity: Convolution is linear. That is, for functions f1 , f2 , g and constants c1 , c2


we have
(c1 f1 + c2 f2 ) ∗ g = c1 (f1 ∗ g) + c2 (f2 ∗ g).
This follows from the exact same property for integration. This might also be called the
distributive law.
18.031 Convolution 4

2. Commutivity: f ∗ g = g ∗ f .
Proof: This follows directly by making the change of variable v = t − τ . Limits: when
τ = 0− we have v = t − τ = t − 0− = t+ . Likewise, when τ = t+ we have v = t − t+ = 0− .
Making the change of variables we get
Z t+ Z t+
(f ∗ g)(t) = f (τ )g(t − τ ) dτ = f (t − v)g(v) dv = (g ∗ f )(t)
0− 0−

3. Associativity: f ∗ (g ∗ h) = (f ∗ g) ∗ h. The proof just amounts to changing the order


of integration in a double integral (left as an exercise).

6 Convolution with delta functions

Our goal in this section is to show that

(δ ∗ f )(t) = f (t) and (δ(t − a) ∗ f )(t) = f (t − a). (3)

The notation for the second equation is ugly, but its meaning is clear.
We prove these formulas by direct computation. First, remember the rules of integration
with delta functions: for b > 0
Z b
δ(τ )f (τ ) dτ = f (0).
0−

Now the formulas follow easily for t > 0:


R t+
(δ ∗ f )(t) = 0− δ(τ ) ∗ f (t − τ ) dτ = f (t − 0) = f (t)
R t+
(δ(t − a) ∗ f )(t) = 0− δ(τ − a) ∗ f (t − τ ) dτ = f (t − a).

7 Convolution is a type of multiplication

You should think of convolution as a type of multiplication of functions. In fact, it is often


referred to as the convolution product. In fact, it has the properties we associate with
multiplication:

• It is commutative.

• It is associative.

• It is distributive over addition.

• It has a multiplicative identity. For ordinary multiplication, 1 is the multiplicative


identity. Formula (3) shows that δ(t) is the multiplicative identity for the convolution
product.
18.031 Convolution 5

8 Green’s Formula

In this section we state Green’s formula for general LTI systems and look at some examples.
We will prove it below.
Suppose that we have the linear time invariant system with rest IC.

P (D)x = Q(D)f (t), x(t) = 0 for t < 0 (4)

• As always, we will consider f (t) to be the input to this system.

• In this context, where we don’t consider functions for t < 0, the initial conditions
mean that x(t) and all its derivatives are 0 at t = 0− .

Theorem. Let w(t) be the weight function for (4). Then, for any input f (t) the solution
to equation (4) is given by Green’s formula
Z t+
x(t) = (w ∗ f )(t) = f (τ )w(t − τ ) dτ. (5)
0−

This is a wonderful formula! It tells us the response to any input once we know the
unit impulse response. Furthermore, it gives us that response as an integral which can be
computed numerically if necessary. For many physical systems the impulse response can be
measured directly or deduced from measurements. So, Green’s formula gives us a method
for predicting the system’s response to any input.

8.1 Examples using Green’s formula

We now try out Green’s formula (5) in a couple of cases where it can be checked against
the solution found using another method.
Example 3. Let f (t) = A be constant input to the system below with rest IC. Compute
the response given by (5) and check this answer by solving the DE directly.

ẍ + x = f (t), x(0) = 0, ẋ(0) = 0.

answer: The system function is 1/(s2 + 1) so the weight function is w(t) = u(t) sin(t),
i.e. w(t) = L−1 (1/(s2 + 1). Therefore for t > 0, we have
Z t t
x(t) = w ∗ f (t) = A sin(t − τ ) dτ = A cos(t − τ ) = A(1 − cos(t)).
0 0

We check this by directly solving the differential equation ẍ + x = A. It’s easy to see that
xp (t) = A is a particular solution. So the general solution is particular plus homogoneous,
i.e.
x(t) = A + c1 cos(t) + c2 sin(t).
You can easily compute that the rest initial conditions are matched by the solution x(t) =
A − A cos(t), exactly as found by Green’s formula!
18.031 Convolution 6

Example 4. Use Green’s formula (5) to find the response of the following system for t > 0.
As usual, assume rest IC.
(
00 1 for 0 ≤ t ≤ π
x + x = f (t) =
0 elsewhere

answer: As in the previous example we have w(t) = sin(t). The convolution integral has
two cases: 0 ≤ t ≤ π and t ≥ π:
 t
Rt
Z t  sin(t − τ ) dτ = cos(t − τ ) = 1 − cos t, for 0 ≤ t ≤ π;

 0
x(t) = f (τ ) sin(t − τ ) dτ = R 0π
0 π
 0 sin(t − τ ) dτ = cos(t − τ ) = −2 cos t, for t ≥ π .


0

We leave it to you to check this by solving the DE. You can do this directly or by using
Laplace transform methods.

9 Building Green’s formula from scratch

Now we will give a physical exponential decay example. Here we can build the solution from
scratch using only methods from 18.01. This will give you a sense that Green’s formula
arises naturally.
Example 5. (The build up of a pollutant in a lake)
Every good formula deserves a particularly illuminating example, and perhaps the following
will serve for the convolution integral. It is also illustrated by the Convolution: Accumula-
tion Mathlet: http://mathlets.org/mathlets/convolution-accumulation/
Problem: We have a lake, and a pollutant is being dumped into it, at a certain variable
rate f (t) in kg/year. This pollutant degrades exponentially over time with decay rate k. If
the lake begins at time zero with no pollutant, how much is in the lake at time t > 0?
answer: Let x(t) be the amount of pollutant in the lake at time t. The model for this
model is the familiar one of exponential decay
ẋ + kx = f (t),
We will solve for x(t) using the 18.01 methods of slicing the time interval [0, t] into tiny
pieces; computing the contribution of each piece based on a basic formula and totaling the
contributions of all the pieces using an integral.
First the basic formula of exponential decay: If an amount of pollutant A is thrown in the
lake it will start to decay. After T years some of the orginal A will have decayed away. The
amount left will be
x(t) = Ae−kT (6)
In our system pollutant is not being added all at once. Rather, it is dripping continuously
into the lake. Following 18.01 we slice the interval [0, t] into n small pieces of width ∆τ as
shown.

∆τ ∆τ ∆τ τ
... ...
0 = τ0 τ1 τ2 τk τk+1 τn = t
18.031 Convolution 7

Let Ak be the amount of pollutant added in the interval [τk , τk+1 ]. Since ∆τ is small and
f (τ ) is the rate pollutant is being added, we get the approximation

Ak ≈ f (τk )∆τ.

But, we are interested in the contribution Ak makes to the total amount of pollutant in the
lake at time t. Since it’s tossed in the lake at time τk by time t it will have decayed for
t − τk years. So by our basic equation of exponential decay. the amount of Ak left by time
t will be
Ak e−k(τk −t) = f (τk )∆τ e−k(t−τk ) .
This is approximately the contribution to x(t) from the interval [τk , τk+1 ]. To determine
the x(t) we simply sum up the contributions of all the intervals.

x(t) ≈ A1 e−a(t−τ1 ) + . . . + An−1 e−a(t−τn−1 )


 
≈ f (τ1 )e−a(t−τ 1 ) + . . . + f (τn )e −a(t−τ n ) ∆τ.

This is a Riemann sum. Taking the limit as ∆τ → 0 we get the integral


Z t
x(t) = f (τ )e−a(t−τ ) dτ. (7)
0

Finally, notice that the weight function for this system is w(t) = u(t)e−kt so the integral is
indeed the convolution integral for (w ∗ f )(t).

10 Proof of Green’s formula

Green’s Formula: For the linear time invariant equation

P (D)x = Q(D)f (t), with rest IC: x(t) = 0 for t < 0 (8)

the solution for t > 0 is given by


Z t+
x(t) = (w ∗ f )(t) = f (τ )w(t − τ ) dτ, (9)
0−

where w(t) is the weight function (unit impulse response) for the system.
Proof: The proof of Green’s formula is surpisingly direct. We will use the linear time
invariance of the system combined with superposition and the definition of the integral as
a limit of Riemann sums.
To avoid worrying about 0− and t+ we will assume that f (t) is continuous. With appropriate
care, the proof will work for an f (t) that has jump discontinuities or contains delta functions.
We start by reminding ourselves of some basic facts about LTI systems.
Time invariance tells us that since w(t) is the response to input δ(t) then w(t − a) is the
response to input δ(t − a).
18.031 Convolution 8

Linearity or superposition tells us that the response to the linear combination f (t) =
c1 δ(t) + c2 δ(t − a) is x(t) = c1 w(t) + c2 δ(t − a).
Now we will essentially repeat the argument in the polluted lake example to should that
any input signal f (t) can be thought of as a superposition of impulse.
First we partition the time axis into slices of width ∆t. So, t0 = 0, t1 = ∆t, t2 = 2∆t,
etc.

∆t ∆t ∆t t
... ...
0 = t0 t1 t2 tk tk+1
Figure 1: Division of the t-axis into small intervals.

Next we decompose the input signal f (t) into packets over each interval. The kth signal
packet, fk (t) coincides with f (t) between tk and tk+1 and is 0 elsewhere
(
f (t) for tk < t < tk+1
fk (t) =
0 elsewhere.

f (t) fk (t)

∆t ∆t ∆t ∆t ∆t ∆t
... ... t ... ... t
0 = t0 t1 t2 tk tk+1 0 = t0 t1 t2 tk tk+1
Figure 2: The signal packet fk (t).
It is clear that for t > 0 we have f (t) is the sum of the packets
f (t) = f0 (t) + f1 (t) + . . . + fk (t) + . . .

A single packet fk (t) is concentrated entirely in a small neighborhood of tk so it is ap-


proximately an impulse with the same size as the area under fk (t). The area under
fk (t) ≈ f (tk ) ∆t. Hence,
fk (t) ≈ (f (tk ) ∆t) δ(t − tk ).
As we noted above: because of linear time invariance the response to fk (t) is
xk (t) ≈ (f (tk ) ∆t) w(t − tk ).

We want to find the response at a fixed time. Since t is already in use, we will let T be our
fixed time and find x(T ).
Since f is the sum of fk , superposition gives x is the sum of xk . That is, at time T
x(T ) = x0 (T ) + x1 (T ) + . . .
  (10)
≈ f (t0 )w(T − t0 ) + f (t1 )w(T − t1 ) + . . . ∆t
18.031 Convolution 9

However, we can ignore all the terms when tk > T . This is because the input packet fk (t)
has its spike after time T , so it is at rest until after time T , which means so is the response
xk (t). Now, if n is the last index where tk < T we have
 
x(T ) ≈ f (t0 )w(T − t0 ) + f (t1 )w(T − t1 ) + . . . + f (tn )w(T − tn ) ∆t

This is a Riemann sum and as ∆t → 0 it goes to an integral


Z T
x(T ) = x(t)w(T − t) dt
0

Except for the change in notation this is Green’s formula (9).

11 Brief notes

Note on Causality: Causality is the principle that the future does not affect the past.
Green’s formula shows that the system (8) is causal. That is, the output x(t) only depends
on the input up to time t. Real physical systems are causal.
There are non-causal systems. For example, an audio compressor that gathers information
after time t before deciding how to compress the signal at time t is non-causal. Another
example is the system with input f (t) and output x(t) where x is the solution to ẋ = f (t+1).
Example 6. (Resonance
Use Green’s formula to solve the DE with rest inital conditions:

2ẍ + 8x = cos(2t), x(0− ) = 0, ẋ(0− ) = 0

answer: The system function is G(s) = 1/(2s2 + 8), so the weight function is
1
w(t) = L−1 (G(s)) = u(t) sin(2t).
4
Green’s theorem then gives
t
1
Z
x(t) = sin(2(t − τ )) cos(2τ ) dτ.
4 0

This is an easy integral, we sketch the algebra to compute it. It uses the trigonometric
sin(A + B) + sin(A − B)
identity: sin(A) cos(B) = .
2
Rt
x(t) = 14 0 sin(2(t − τ )) cos(2τ ) dτ.
Rt
= 18 0 (sin(2t) + sin(2t − 4τ )) dτ
 it
= 18 τ sin(2t) + cos(2t−4τ
4
)
0
t sin(2t)
= .
8
This is the answer that you found in 18.03 using complex replacement and the extended
exponential response formula.
18.031 Convolution 10

12 Convolution in time and frequency

Now that we have Green’s formula we can fill out the table from above.
L
Frequency domain (s) ←−−−−− Time domain (t)
−−−−1−−→
L
Q(s)
System function G(s) = ←→ weight function w(t)
P (s)
Response X(s) = G(s)F (s) ←→ Response x(t) = (w ∗ f )(t)
Look at the bottom row of the table: it shows a formula for X(s) and one for x(t). Thus, the
Laplace transform of the time domain formula must equal the frequency domain formula.
We state this as a theorem
Theorem: For any two functions f (t) and g(t) with Laplace transforms F (s) and G(s)
we have
L(f ∗ g) = F (s) · G(s). (11)

L(f ∗ g; s) = G(s)F (s)


This is a great new entry for our table: Laplace turns convolution into multiplication.
Comparing equations (??) and (??) we see that

L(w ∗ f ) = W (s) · F (s). (12)

It appears that Laplace transforms convolution into multiplication. Technically, we only


proved equation (12) when one of the functions is the weight function, but the formula holds
in general.
Remarks:
1. This theorem gives us a way to prove that convolution is commutative. It is just the
commutivity of regular multiplication on the s-side.

L(f ∗ g) = F · G = G · F = L(g ∗ f ).

2. We could also prove the commutivity of convolution by writing down the appropriate
double integrals and changing the order of integration.

You might also like