You are on page 1of 13

Differential Equations

Solving for Impulse Response


Linear systems are often described using differential
equations. For example:
We cannot solve for the impulse response directly so
d2y dy we solve for the step response and then differentiate
+ 5 + 6y = f (t)
dt2 dt it to get the impulse response.
where f(t) is the input to the system and y(t) is the
output. Differential
solve
Equation

We know how to solve for y given a specific input f .


Step response

We now cover an alternative approach:


differentiate
Differential
solve
Equation
Impulse response

Impulse response
Corresponding
Any input convolution
Output
Corresponding
Any input convolution
Output

17 18
Motivation: Convolution Solving for Step Response

If we know the response of a linear system to a step


If we want to find the step response of
input, we can calculate the impulse response and hence
we can find the response to any input by convolution.

dy
+ 5y = f (t)
dt

where f is the input and y is the output. It would be


nice if we could put f (t) = H(t) and solve. Unfortu-
nately we don’t know of a way to do this directly. So
we

1. set f (t) = 1, and solve for just t ≥ 0


Suppose we want to know how a car’s suspension re-
sponds to lots of different types of road surface.
2. set the boundary condition y(0) = 0 (also ẏ(0) =
We measure how the suspension responds to a step
input (or calculate the step response from a theoreti- 0 for second order equations) to imply that f (t)
cal model of the system). was zero for all t < 0.

We can then find the impulse response and use con-


volution to find the car’s behaviour for any road sur- We thus have a complete solution because y = 0 for
face profile. t < 0, and we have found y for all t ≥ 0.
19 20
Boundary Condition Justification
Step Response Example
Prove that y = 0 at t = 0 by contradiction.
Step 1: set f (t) = 1, and solve for just t ≥ 0.
We know that y(t) = 0 for all t < 0. Therefore the
only way for y to equal something other than zero at
t = 0 is if there is a step discontinuity in y at t = 0 . dy
+ 5y = 1
dt
Assume that y has a step of height h at t = 0 . If y
has a step discontinuity at t = 0 then dy
dt must have
a delta function at t = 0.
Complimentary function: ẏ + 5y = 0 ⇒ y = Ae−5t
So we have:
• f (t) is a step function so |f (t)| ≤ 1 for all t. 1
Particular Integral: try y = λ (a const) ⇒ y = 5
• |y| ≤ h at t = 0.
1
General Solution: y = Ae−5t + 5
• dy

dt → ∞ at t = 0.

Which violates the original equation at t = 0. Step 2: set the boundary condition y = 0 at t = 0
dy
= f (t) − 5y 1 = 0 ⇒ A = −1
y(0) = 0 ⇒ A + 5
dt 5
As the RHS is finite but the LHS is infinite. Therefore
So step response is y(t) = 1
 
−5t for t ≥ 0.
y must be continuous at t = 0, and we can use the 5 1−e
initial condition y(0) = 0.
21 22
Find the Impulse Response
d2y dy
+ 13 + 12y = f (t)
dt2 dt
Step → Impulse Response
1. Find the General Solution with f (t) = 1

integrate Complimentary function is y = Ae−12t + Be−t


Impulse Step
Response Response 1
Particular integral is y = 12
differentiate
g(t) 1 + Ae−12t + Be−t
General solution is y = 12

1
 
Step response is y(t) = 5 1 − e−5t for t ≥ 0. 2. Set boundary conditions y(0) = ẏ(0) = 0 to get
the step response.
1
Impulse response g(t) is given by: 12 + A + B = 0
 −12A − B = 0
 0, t < 0 1 and B = − 1
⇒ A = 132 11



g(t) = 1 +e −12t
e −t
d 1 Thus Step Response is y = 12 132 − 11
  


 1−e−5t = e−5t, t ≥ 0
dt 5

3. Differentiate the step response to get the impulse


response.
dy e−t − e−12t
g(t) = = , (t > 0)
dt 11
23 24
Using the Impulse Response

If we have a system input composed of impulses, More General Input


f (t) = 3δ(t − 1) + 4δ(t − 2)
Suppose our input is composed of lots of delta func-
we can find the corresponding system output using
tions:
superposition. X
f (t) = pn δ(t − qn )
n
y(t) = 3g(t − 1) + 4g(t − 2)
 
Then the corresponding system output will be
e−(t−1) − e−12(t−1) 
= 3 y(t) =
X
pn g(t − qn )
11
  n
e−(t−2) − e−12(t−2)
+4  
11

25 26
Section 2: Summary

Differential Equation
ay + by + cy + d = f(t)

Section 3
solve
ay + by + cy + d = 1
with boundary conditions
y(0) = 0 and y(0) = 0 Convolution

Step response
In this section we derive the convolution integral and
show its use in some examples.
differentiate

Impulse response

Corresponding
Any input convolution
Output

27 28
Convolution

Our goal is to calculate the output, y(t) of a linear sys-


tem using the input, f (t), and the impulse response A scaled impulse at time t = 0 produces a scaled
of the system, g(t). impulse response.

An impulse at time t = 0 produces the impulse re- k δ(t) Linear k g(t)


sponse.
System
t t
δ (t) Linear g(t)
System An impulse that has been scaled by k and delayed to
time t = τ produces an impulse response scaled by
t t k and starting at time τ .

An impulse delayed to time t = τ produces a delayed k δ(t−τ ) Linear k g(t−τ )


impulse response starting at time τ .
System
δ(t−τ ) Linear g(t−τ ) τ t τ t

System

τ t τ t
29 30
Consider the input, f (t) to be made up of a sequence
of strips of width ∆τ . Each of these strips is similar
to a delta function and thus leads to a system out-
put of an appropriately scaled and delayed impulse
response.

f(t) δ (t−τ ) f(τ ) ∆ τ Z t


leads to response y(t) = g(t − τ )f (τ )dτ
g(t−τ ) f(τ ) ∆τ −∞

• Treat t as a constant when evaluating the integral.


∆τ The integration variable is τ .

τ t
The response of the system, y(t) is thus the sum of • t is time as it relates to the output of the system
these delayed, scaled impulse responses. (Provided y(t).
g(t) = 0 for t < 0.)
X
y(t) ≈ g(t − τ )f (τ )∆τ • τ is time as it relates to the input of the system
All f (τ ).
slices

Let the width of the slices tend to zero. The sum turns
into an integral called the convolution integral.
Z t
y(t) = g(t − τ )f (τ )dτ
−∞

31 32
Convolution Example 2
Convolution Example 1
For the same system (g(t) = e−5t , t ≥ 0), find the
output for input
Consider a system with impulse response
(
0 ,t<0  f(t)
g(t) =  0, t < 0
−5t v

e ,t≥0 f (t) = v, 0 < t < k
0, t > k

t

Find the output for input f (t) = H(t) (step function). k


Using the convolution integral, the answer is given by
Z t
y(t) = g(t − τ )f (τ )dτ Z t
−∞ y(t) = g(t − τ )f (τ )dτ
Z t −∞
= e−5(t−τ )H(τ )dτ  R
−∞ t g(t − τ ) × 0 dτ, t<0
−∞
Z t 


e−5(t−τ )dτ

=



0
 R0
−∞ Rg(t − τ ) × 0 dτ


1 −5(t−τ ) t
  

+ 0t g(t − τ ) v dτ,

0<t<k

= e

5 0 =
1

 R0
1 − e−5t
  
= −∞ Rg(t − τ ) × 0 dτ



5

+ 0k g(t − τ ) v dτ





+ kt g(t − τ ) × 0 dτ, t > k

 R

33 34
Case (a): t < 0
Rt
−∞ g(t − τ ) × 0 dτ = 0 so y(t) = 0 for all t < 0.
Convolution Example 3
Case (b): 0 < t < k
Z t Z t
y(t) = g(t − τ ) v dτ = e−5(t−τ ) v dτ For the same system (g(t) = e−5t , t ≥ 0), find the
0 0
vh it output for input
= e−5(t−τ )
5 0
v f(t)
(
1 − e−5t 0, t<0

= f (t) =
5 sin(ωt), t > 0
t
Case (c): t > k
Z k Z k Using the convolution integral, the answer is given by
−5(t−τ )
y(t) = g(t − τ ) v dτ = e v dτ
0 0
vh −5(t−τ ) k
i Z t
= e y(t) = g(t − τ )f (τ )dτ
5 0 −∞
v 5k
e − 1 e−5t

=  R
t
5 

 −∞ g(t − τ ) × 0 dτ, t<0


= R0
 −∞ Rg(t − τ ) × 0 dτ
y(t)

+ 0t g(t − τ ) sin(ωτ ) dτ, 0 < t


(a) (b) k (c) t


35 36
Convolution Summary
Differential Equation
Case (a): t < 0 ay + by + cy + d = f(t)
Rt
−∞ g(t − τ ) × 0 dτ = 0 so y(t) = 0 for all t < 0.
solve
ay + by + cy + d = 1
Case (b): 0 < t
with boundary conditions
Z t y(0) = 0 and y(0) = 0
y(t) = g(t − τ ) sin(ωτ ) dτ
0
Z t
= e−5(t−τ ) sin(ωτ ) dτ
0 Step response
Z t 
= Im e−5(t−τ )eiωτ dτ
 0  t  differentiate

 e(5+iω)τ 

= Im e −5t  
 5 + iω 
0
 
Impulse response: g(t)
eiωt − e−5t
( )
= Im
5 + iω Any Corresponding
convolution
5 sin(ωt) − ω cos(ωt) + ωe−5t Input: f(t) Output: y(t)
=
25 + ω 2
Z t
y(t) = g(t − τ ) f (τ ) dτ
−∞

37 38
Complete Example
Find the impulse response of
3. Differentiate the step response to get the impulse
d2y dy response.
+ 3 + 2y = f (t)
dt2 dt dy
hence find the output when the input f (t) = H(t)e−t . g(t) = = e−t − e−2t
dt

1. Find the General Solution with f (t) = 1


4. Use the convolution integral to find the output for
Complimentary function is y = Ae−t + Be−2t the required input.

Particular integral is y = 1
2
The required input is f (t) = e−t , t > 0.
1 + Ae−t + Be−2t
General solution is y = 2 Z t
y(t) = g(t − τ )f (τ )dτ
−∞
Z t 
e−(t−τ ) − e−2(t−τ ) e−τ dτ

2. Set boundary conditions y(0) = ẏ(0) = 0 to get =
the step response. Z0t
= e−t − eτ −2t dτ
1 0
2+A+B =0 h
−t τ −2t t
i
−A − 2B = 0 = τe − e
0
⇒ A = −1 and B = 1
2 = (t − 1) e + e−2t
−t
−2t
Thus Step Response is y = 1
2−e
−t + e
2

39 40
Section 3: Summary

Convolution integral (memorise this): Section 4


f (t) = input
g(t) = impulse response
Evaluating Convolution Integrals
y(t) = output
Z t
y(t) = g(t − τ ) f (τ ) dτ
−∞
A way of rearranging the convolution integral is de-
Way to find the output of a linear system, described scribed and illustrated.
by a differential equation, for an arbitrary input:
The differences between convolution in time and space
• Find general solution to equation for input = 1.
are discussed and the concept of causality is intro-
• Set boundary conditions y(0) = ẏ(0) = 0 to get duced.
the step response.
The section ends with an example of spatial convolu-
• Differentiate to get the impulse response.
tion.
• Use convolution integral together with the impulse
response to find the output for any desired input.

41 42

You might also like