Notes on Solving for Impulse Response

Notes on Solving for Impulse Response
1
Impulse Response from Differential Equation
Suppose we have a constant coefficient ordinary differential equation of the form
N
X
i=0
M
X di x
di y
ai i (t) =
bi i (t).
dt
dt
i=0
(1)
The goal is to find the impulse response of this system using x(t) = δ(t) and y(t) = h(t).
(N −1)
The system is assumed to be initially at rest (i.e., h(t) = 0, . . . , ddt(N −1)h (t) = 0 for all t < 0.
At times, we will use the somewhat abusive notation 0− and 0+ which loosely correspond
to considering 0 − and 0 + , respectively, and letting go to zero. We will concentrate on
the case when M = 0.
For the case when N = 0, the impulse response is easy. We have a0 h(t) = b0 δ(t) which
means
h(t) =
b0
δ(t).
a0
(2)
For N > 0, the most important point is to be able to solve the homogeneous equation
for t > 0
N
X
i=0
ai
di y
(t) = 0.
dti
(3)
This is solved by first considering solutions of the form eλt . Plugging this exponential form
in and simplifying gives rise to the characteristic polynomial
p(λ) = a0 + a1 λ + · · · + aN λN .
(4)
The goal is then to find the zeros of this polynomial by solving for all values of λ that give
p(λ) = 0. For N = 1, we get the root λ0 = −a0 /a1 . This means yhomg (t) = Aeλ0 t u(t) for
some constant A. For N = 2, we can use the quadratic equation to get the two roots λ01 , λ02 .
If λ01 6= λ02 , we get yhomg (t) = Aeλ01 t + Beλ02 t u(t) for constants A, B. In the event that
λ01 = λ02 = λ0 , we must use yhomg (t) = Aeλ0 t + Bteλ0 t u(t) for constants A, B.
Now that we understand how to solve the homogeneous equation, we can deal with the
delta function input. There are two possible approaches studied:
Approach 1
In this case, we deal with x(t) = δ(t) directly by using the impulse response to generate
initial conditions. This will involve i) integrating both sides of the differential equation as
many times as needed, ii) integrating both sides from 0− to 0+, and iii) using an argument
(which is admittedly hand-wavy) regarding discontinuities to show integrals of some ”nice”
R 0+
functions have 0− (·)dt = 0.
N = 1: First, consider N = 1. We have a0 h(t) + a1 dh
(t) = b0 δ(t). We will integrate each
dt
side from 0− to 0 + . For the left hand side,
Z
0+
Z
0+
a0 h(t)dt +
0−
0−
dh(t)
a1
dt = a0
dt
Z
0+
h(t)dt + a1 (h(0+) − h(0−))
0−
= 0 + a1 (h(0+) − 0)
= a1 h(0+).
(5)
This used the “facts” that the system is at rest (h(0−) = 0) and that the impulse response
R 0+
will not have any impulsive behavior at the origin ( 0− h(t)dt = 0). The right hand side
evaluates to
Z
0+
b0 δ(t)dt = b0 .
(6)
0−
Combining these two, we get h(0+) = b0 /a1 . Using our homogeneous solution, we have
h(t) = Aeλ0 t u(t) and A must satisfy h(0) = b0 /a1 . Therefore,
h(t) =
b0 λ0 t
e u(t)
a1
(7)
2
(t) + a2 ddt2h (t) = b0 δ(t). First, we integrate
N = 2: Now, consider N = 2. a0 h(t) + a1 dh
dt
2
each side from 0− to 0 + . For the left hand side,
Z
0+
0−
0+
d2 h(t)
a2
a0 h(t)dt +
dt
dt2
0−
0−
Z 0+
dh
dh
h(t)dt + a1 (h(0+) − h(0−)) + a2
= a0
(0+) − (0−)
dt
dt
0−
dh
(0+) − 0
= 0 + a1 (h(0+) − 0) + a2
dt
dh
= a1 h(0+) + a2 (0+)
dt
Z
0+
dh(t)
dt +
a1
dt
Z
(8)
using the same arguments as in the N = 1 case. The right hand side again integrates to b0 .
This means
a1 h(0+) + a2
dh
(0+) = b0 .
dt
(9)
2
Next we integrate both sides of a0 h(t) + a1 dh
(t) + a2 ddt2h (t) = b0 δ(t) to get the expression
dt
Rt
a0 g(t) + a1 h(t) + a2 dh
(t)
=
b
u(t)
with
g(t)
=
h(τ )dτ. Next, we integrate this expression
0
dt
−∞
from 0− to 0 + . For the left hand side,
Z
0+
Z
0+
a0 g(t)dt +
0−
Z
0+
a1 h(t)dt +
0−
a2
0−
dh
(t)dt = 0 + 0 + a2 (h(0+) − h(0−))
dt
= a2 h(0+)
using the same arguments as before. The right hand side is
R 0+
0−
(10)
(11)
b0 u(t)dt = 0. Therefore,
h(0+) = 0.
(12)
dh
b0
(0+) = .
dt
a2
(13)
Combining this with (9) we get
Using (12) and (13), we can then solve for the impulse response using the homogeneous
solution. This involves solving for A and B to give h(0) = 0 and
dh
(0)
dt
(
A0 eλ01 t − eλ02 t u(t), if λ01 6= λ02 ,
h(t) =
B0 teλ0 t u(t),
if λ01 = λ02 = λ0 .
with A0 =
b0
a2 (λ01 −λ02 )
and B0 =
b0
.
a2
3
=
b0
.
a2
Therefore,
(14)
Approach 2
In this approach, we instead work with the unit step response s(t). Recall that h(t) = ds/dt.
In this case, we must deal with finding a particular solution to the differential equation
when t > 0 using that b0 s(t) = b0 for t > 0. A very simple particular solution is yp (t) = b0 /a0
when t > 0 because for t > 0 because dyp (t)/dt = 0 and d2 yp (t)/dt = 0 when t > 0. Therefore,
the particular solution for all values of t (using a zero state argument) is yp (t) = b0 /a0 u(t).
Thus, the full solution to the unit step response is s(t) = yp (t) + yhomg (t) where the constants
in the homogeneous expression must be solved for to satisfy the initial conditions.
N = 1: In this case,
s(t) =
b0
u(t) + Aeλ0 t u(t).
a0
Since the system is at rest, we must have that s(0) = 0. Using this, we get that A = −b0 /a0 .
Therefore,
s(t) =
b0
1 − eλ0 t u(t).
a0
The impulse response is then
ds
(t)
dt
b0
λ0 b0 λ0 t
e u(t)
=
1 − eλ0 t δ(t) −
a0
a0
b0
λ 0 b0 λ 0 t
e u(t)
1 − eλ0 0 δ(t) −
=
a0
a0
λ 0 b0 λ 0 t
=−
e u(t).
a0
h(t) =
(15)
where we used that f (t)δ(t) = f (0)δ(t) for a continuous function at t = 0. Plugging in
λ0 = −a0 /a1 gives the Approach 1 answer.
N = 2: In this case,

 b0 + Aeλ01 t + Beλ02 t u(t), if λ01 6= λ02 ,
a
s(t) = b 0
 0 + Aeλ0 t + Bteλ0 t u(t), if λ01 = λ02 = λ0 .
a0
Using that s(0) = 0 and ds
(0) = 0,
dt
(
b0
λ01 λ02 t
λ01 t
+
A
e
−
e
u(t), if λ01 6= λ02 ,
0
a0
λ02
s(t) =
b0
1 − eλ0 t + λ0 teλ0 t u(t),
if λ01 = λ02 = λ0 .
a0
4
01
−1 .
with A0 = b0 / a0 λλ02
Now,
ds
(t)
dt
(
A0 λ01 eλ01 t − eλ02 t u(t), if λ01 =
6 λ02 ,
= b0 2 λ0 t
if λ01 = λ02 = λ0 .
λ te u(t),
a0 0
h(t) =
(16)
This agrees with the Approach 1 answer if we use a21 = 4a0 a2 in the λ01 = λ02 = λ0 case and
multiply out λ01 λ02 in the λ01 6= λ02 case.
2
Impulse Response from Difference Equation
The discrete-time version of a differential equation is a difference equation. Suppose we have
a constant coefficient difference equation of the form
N
X
ai y[n − i] =
i=0
M
X
bi x[n − i].
(17)
i=0
We wish to understand the output when x[n] = δ[n]. This corresponds to the impulse
response h[n]. Further, the system is assumed to be initially at rest with h[n] = 0 for n < 0.
As before, it is important to first understand how to solve the homogeneous difference
equation
N
X
ai y[n − i] = 0.
(18)
i=0
We first consider solutions of the form y[n] = z n . This corresponds to
N
X
ai z n−i = z n
i=0
N
X
ai z −i .
(19)
i=0
We wish to solve for values of z that give a zero value. This can be done by specifying the
characteristic polynomial
p(z) =
N
X
i=0
and finding values z0 such that p(z0 ) = 0.
5
ai z −i
(20)
For N = 1, p(z) = a0 + a1 z −1 . When z = z0 = −a1 /a0 , the polynomial evaluates to zero.
Therefore, the homogeneous solution is yhomg [n] = Az0n u[n]. The constant A is determined
from initial conditions.
For N = 2, the characteristic polynomial is p(z) = a0 + a1 z −1 + a2 z −2 . We can solve for
−1
−1
n
n
z01
and z02
using the quadratic equation. If z01 6= z02 then yhomg [n] = (Az01
+ Bz02
) u[n].
If z01 = z02 = z0 , then yhomg [n] = (Az0n + Bnz0n ) u[n].
Now we can determine the impulse response. We concentrate again on the case when
M = 0.
N = 0: In this case a0 h[n] = b0 δ[n]. Then
h[n] =
b0
δ[n].
a0
(21)
N = 1: Using the homogeneous solution, we have h[n] = Az0n u[n]. We must determine A
using initial conditions. To determine these, note that a0 h[0] + a1 h[−1] = a0 h[0] = b0 δ[0] =
b0 . Therefore, h[0] = b0 /a0 . From this,
h[n] =
b0 n
z u[n].
a0 0
(22)
N = 2: Using the homogeneous solution, we have
(
n
n
(Az01
+ Bz02
) u[n], if z01 =
6 z02 ,
h[n] =
n
n
(Az0 + Bnz0 ) u[n], if z01 = z02 = z0 .
To determine the initial conditions, note that
a0 h[0] + a1 h[−1] + a2 h[−2] = a0 h[0] = b0 δ[0] = b0
(23)
a0 h[1] + a1 h[0] + a2 h[−1] = a0 h[1] + a1 h[0] = b0 δ[1] = 0.
(24)
and
Combining these means,
h[0] =
b0
a0
(25)
a1 b 0
.
a20
(26)
and
h[1] = −
6
We can then solve for A and B using these initial values and the correct homogeneous
expression.
7