∀t, ytr(t) = ∑ Rkepktu(t),
k=1
∀t, yss(t) = R eiωtu(t).
ω
Since Re{pk} < 0 for k = 1, · · · , N,
lim ytr(t) = 0.
t→∞
Thus, the steady-state response yss is eventually all that is left.
Finally, the residue R
is obtained by multiplying both sides of (13.19) by s − i
ω
ω and
evaluating at s = iω to get R = ˆ
H(i
ω
ω) = H(ω), so that
∀t, yss(t) = H(ω)eiωtu(t).
This analysis reveals several interesting features of the total response y. First, from (13.20)
we see the poles p1, · · · , pN of the transfer function contribute to the transient response
ytr, and the pole of the input ˆ
X at iω contributes to the steady state response. Second we
can determine how quickly the transient response dies down. The transient response is
∀t, ytr(t) = R1ep1tu(t) + ··· + RNepNtu(t).
The magnitude of the terms is
|R1|eRe{p1}t,··· ,|RN|eRe{pN}t.
Each term decreases exponentially with t, since the real parts of the poles are negative.
The slowest decrease is due to the pole with the least negative part. Thus the pole of
the stable, causal transfer function with the least negative part determines how fast the
transient response goes to zero. Indeed for large t, we can approximate the response y as
y(t) ≈ Riepit + H(ω)eiωt,
where pi is the pole with the largest (least negative) real part.
There is a similar result for discrete-time systems, and it is obtained in the same way.
Suppose an exponential input
∀n ∈ Z, x(n) = eiωnu(n),
570
Lee & Varaiya, Signals and Systems
13. LAPLACE AND Z TRANSFORMS
is applied to a stable and causal system with impulse response h, transfer function ˆ
H, and
frequency response H. Then the output y = h ∗ x can again be decomposed as
∀n, y(n) = ytr(n) + yss(n),
where the transient ytr(n) → 0 as n → ∞, and the steady state response is
∀n, yss(n) = ˆH(eiω)eiωnu(n) = H(ω)eiωnu(n).
For large n, the transient response decays exponentially as pn, i.e.
i
y(n) ≈ Ri pn +
i
yss(n),
where pi is the pole with the largest magnitude (which must be less than one, since the
system is stable).
13.7
Linear difference and differential equations
Many natural and man-made systems can be modeled as linear differential equations or
difference equations. We have seen that when such systems are initially at rest, they
are LTI systems. Hence, we can use their transfer functions (which are Z transforms or
Laplace transforms) to analyze the response of these systems to external inputs.
However, physical systems are often not initially at rest. Dealing with non-zero initial
conditions introduces some complexity in the analysis. Mathematicians call such systems
with non-zero initial conditions initial value problems. We can adapt our methods to
deal with initial conditions. The rest of this chapter is devoted to these methods.
Example 13.19: In example 13.8 we considered the LTI system described by the
difference equation
y(n) − 0.9y(n − 1) = x(n).
The transfer function of this system is ˆ
H(z) = z/(z − 0.9). If the system is initially
at rest, we can calculate its response y from its Z transform ˆ
Y = ˆ
H ˆ
X . For instance,
if the input is the unit step, ˆ
X (z) = z/(z − 1),
z2
−9z
10z
ˆ
Y (z) =
=
+
,
(z − 0.9)(z − 1)
z − 0.9
z − 1
Lee & Varaiya, Signals and Systems
571
13.7. LINEAR DIFFERENCE AND DIFFERENTIAL EQUATIONS
and so y(n) = −9(0.9)n + 10, n ≥ 0.
We cannot use the transfer function, however, to determine the response if the initial
condition at time n = 0 is y(−1) = ¯y(−1), and the input is x(n) = 0, n ≥ 0. The
response to this initial condition is
y(n) = ¯
y(−1)(0.9)n+1, n ≥ −1.
We can check that this expression is correct by verifying that it satisfies both the
initial condition and the difference equation.
If the initial condition is y(−1) = ¯y(−1) and the input is a unit step, the response
turns out to be the sum of the response due to the input (with zero initial condition)
and the response due to the initial condition (with zero input),
y(n) = [−9(0.9)n + 10] + [ ¯y(−1)(0.9)n+1], n ≥ 0.
For small values of n the response depends heavily on the initial condition, espe-
cially if ¯
y(0) is large. Because this system is stable, the effect of the initial condition
becomes vanishingly small for large n.
An LTI difference equation has the form
y(n) + a1y(n − 1) + · · · + amy(n − m) = b0x(n) + · · · + bkx(n − k), n ≥ 0.
(13.21)
We interpret this equation as describing a causal discrete-time LTI system in which x(n)
is the input and y(n) is the output at time n. The ai and b j are constant coefficients that
specify the system.
We have used difference equations before. In section 8.2.1 we used this form and the
discrete time Fourier transform to find the frequency response of this system. In section
9.5 we showed how to realize such systems as IIR filters. In example 13.19 we used the
transfer function to find the response. But in all these cases, we had to assume that the
system was initially at rest. We now develop a method to find the response for arbitrary
inital conditions.
We assume the input signal x starts at some finite time, which we take to be zero, x(n) =
0, n < 0. We wish to calculate y(n), n ≥ 0. From (13.21) we can see that we need to be
given m initial conditions,
y(−1) = ¯y(−1), · · · , y(−m) = ¯y(−m).
572
Lee & Varaiya, Signals and Systems
13. LAPLACE AND Z TRANSFORMS
Given the input signal and these initial conditions, there is a straightforward procedure to
calculate the output response y(n), n ≥ 0: Rewrite (13.21) as
y(n) = −a1y(n − 1) − · · · − amy(n − m) + b0x(n) + · · · + bkx(n − k),
(13.22)
and recursively use (13.22) to obtain y(0), y(1), y(2), · · · . For n = 0, (13.22) yields y(0)
=
−a1y(−1) − ··· − amy(−m) + b0x(0) + ··· + bkx(−k)
=
−a1 ¯y(−1) − ··· − am ¯y(−m) + b0x(0).
All the terms on the right are known from the initial conditions and the input x(0), so we
can calculate y(0). Next, taking n = 1 in (13.22),
y(1) = −a1y(0) + · · · + amy(1 − m) + b0x(1) + · · · + bkx(1 − k).
All the terms on the right are known either from the given data or from precalculated
values—y(0) in this case. Proceeding in this way we can calculate the remaining values
of the output sequence y(2), y(3), · · · , one at a time.
We now use the Z transform to calculate the entire output sequence. Multiplying both
sides of (13.21) by u(n), the unit step, gives us a relation that holds among signals whose
domain is Z:
y(n)u(n) + a1y(n − 1)u(n) + · · · + amy(n − m)u(n)
= b0x(n)u(n) + · · · + bkx(n − k)u(n), n ∈ Z.
We can now take the Z transforms of both sides. We multiply both sides by z−n and sum,
∞
∞
∞
∑ y(n)z−n + a1 ∑ y(n − 1)z−n + · · · + am ∑ y(n − m)z−n
n=0
n=0
n=0
∞
∞
= b0 ∑ x(n)z−n + ··· + bk ∑ x(n − k)z−n.
(13.23)
n=0
n=0
Define
∞
∞
ˆ
X (z) = ∑ x(n)z−n,
ˆ
Y (z) = ∑ y(n)z−n.
n=0
n=0
Lee & Varaiya, Signals and Systems
573
13.7. LINEAR DIFFERENCE AND DIFFERENTIAL EQUATIONS
Each sum in (13.23) can be expressed in terms of ˆ
Y or ˆ
X . In evaluting the Z transforms
of the signals y(n − 1)u(n), y(n − 2)u(n), · · · we need to include the initial conditions:
∞
∞
∑ y(n − 1)z−n = ¯y(−1)z0 + z−1 ∑ y(n − 1)z−(n−1) = ¯y(−1)z0 + z−1 ˆ
Y (z),
n=0
n=1
∞
∞
∑ y(n − 2)z−n = ¯y(−2)z0 + ¯y(−1)z−1 + z−2 ∑ y(n − 2)z−(n−2)
n=0
n=2
=
¯
y(−2)z0 + ¯y(−1)z−1 + z−2 ˆ
Y (z),
···
∞
∞
∑ y(n − m)z−n = ¯y(−m)z0 + · · · + ¯y(−1)z−(m−1) + z−m ∑ y(n − m)z−(n−m)
n=0
n=m
=
¯
y(−m)z0 + · · · + ¯y(−1)z−(m−1) + z−m ˆ
Y (z).
Because x(n) = 0, n < 0, by assumption, the sums on the right in (13.23) are simpler:
∞
∑ x(n − 1)z−n = x(−1)z0 + z−1 ˆ
X (z) = z−1 ˆ
X (z)
n=0
∞
∑ x(n − 2)z−n = x(−2)z0 + x(−1)z−1 + z−2 ˆ
X (z) = z−2 ˆ
X (z)
n=0
···
∞
∑ x(n − k)z−n = x(−k)z0 + · · · + x(−1)z−(k−1) + z−k ˆ
X (z) = z−k ˆ
X (z).
n=0
(If there were non-zero initial conditions for x(−1), · · · , x(−k), we could include them in
the Z transforms of x(n − 1)u(n), · · · , x(n − k)u(n).) Substituting these relations in (13.23)
yields
ˆ
Y (z)
+
a1[z−1 ˆ
Y (z) + ¯
y(−1)z0]
+
···
+
am[z−m ˆ
Y (z) + ¯
y(−m)z0 + · · · ¯y(−1)z−(m−1)]
=
b ˆ
ˆ
0X (z) + b1z−1 ˆ
X (z) + · · · bkXz−k,
(13.24)
from which, by rearranging terms, we obtain
[1 + a1z−1 + · · · + amz−m] ˆ
Y (z) = [b0 + b1z−1 + · · · + bkz−k] ˆ
X (z) + ˆ
C(z),
where ˆ
C(z) is an expression involving only the initial conditions
¯
y(−1), · · · , ¯y(−m).
574
Lee & Varaiya, Signals and Systems
13. LAPLACE AND Z TRANSFORMS
Therefore,
b
ˆ
C(z)
ˆ
0 + b1z−1 + · · · bkz−k
Y (z) =
ˆ
X (z) +
.
1 + a1z−1 + · · · + amz−m
1 + a1z−1 + · · · + amz−m
We rewrite this relation as
ˆ
C(z)
ˆ
Y (z) = ˆ
H(z) ˆ
X (z) +
.
(13.25)
1 + a1z−1 + · · · + amz−m
where
b
ˆ
0 + b1z−1 + · · · + bkz−k
H(z) =
.
(13.26)
1 + a1z−1 + · · · + amz−m
Observe that if the initial conditions are all zero, ˆ
C(z) = 0, and we only have the first term
on the right in (13.25); and if the input is zero—i.e., x(n) = 0 for all n, then ˆ
X (z) = 0, and
we only have the second term.
By definition, ˆ
Y (z) is the Z transform of the causal signal y(n)u(n), n ∈ Z. So its RoC =
{z ∈ C | |z| > |p|} in which p is the pole of the right side of (13.25) with the largest
magnitude. The inverse Z transform of ˆ
Y can be expressed as
∀n ≥ 0, y(n) = yzs(n) + yzi(n),
where yzs(n), the inverse Z transform of ˆ
H ˆ
X , is the zero-state response, and yzi(n), the
inverse Z transform of ˆ
C(z)/[1 + a1z−1 + · · · + amz−m], is the zero-input response. The
zero-state response, also called the forced response, is the output when all initial condi-
tions are zero. The zero-input response, also called the natural response, is the output
when the input is zero.
Thus the (total) response is the sum of the zero-state and zero-input response. We first
encountered this property of linearity in Chapter 5.
By definition, the transfer function is the Z transform of the zero-state impulse response.
Taking ˆ
C = 0 and ˆ
X = 1 in (13.25) shows that the transfer function is ˆ
H(z). From (13.26)
we see that ˆ
H can be written down by inspection of the difference equation (13.21). If the
system is stable—all poles of ˆ
H are inside the unit circle—the frequency response is
∀
b0 + b1e−iω + · · · + bke−ikω
ω,
H(ω) = ˆ
H(eiω) =
.
1 + a1e−iω + · · · + ame−imω
We saw this relation in (8.21).
Lee & Varaiya, Signals and Systems
575
13.7. LINEAR DIFFERENCE AND DIFFERENTIAL EQUATIONS
Example 13.20: Consider the difference equation
1
y(n) − 5 y(n − 1) + y(n − 2) = x(n), n ≥ 0.
6
6
Taking Z transforms as in (13.24) yields
1
ˆ
Y (z) − 5 [z−1 ˆ
Y (z) + ¯
y(−1)] + [z−2 ˆ
Y (z) + ¯
y(−2) + ¯y(−1)z−1] = ˆ
X (z).
6
6
Therefore
1
5 ¯y(−1) + 1 ¯y(−2) + 1 ¯y(−1)z−1
ˆ
Y (z)
=
ˆ
X (z) + 6
6
6
1 − 5 z−1 + 1 z−2
1 − 5 z−1 + 1 z−2
6
6
6
6
z2
[ 5 ¯
y(−1) + 1 ¯y(−2)]z2 + 1 ¯y(−1)z
=
ˆ
X (z) + 6
6
6
,
z2 − 5 z + 1
z2 − 5 z + 1
6
6
6
6
from which we can obtain ˆ
Y for a specified ˆ
X and initial conditions ¯
y(−1), ¯y(−2).
The transfer function is
z2
z2
ˆ
H(z) =
=
,
z2 − 5 z + 1
(z − 1 )(z − 1 )
6
6
3
2
which has poles at z = 1/3 and z = 1/2 (and two zeros at z = 0). The system is
stable. The zero-state impulse response h is the inverse Z transform of ˆ
H(z), which
we obtain using partial fraction expansion,
−2
3
ˆ
H(z) = z
+
z − 1
z − 1
3
2
so that
n
n
∀
1
1
n ∈ Z,
h(n) = −2
u(n) + 3
u(n).
3
2
We can recognize that the impulse response consists of two terms, each contributed
by one pole of the transfer function.
Suppose the initial conditions are ¯
y(−1) = 1, ¯y(−2) = 1 and the input x is the unit
step, so ˆ
X (z) = z/(z − 1). Then the zero-input response, yzi, has Z transform
[ 5 ¯
y(−1) + 1 ¯y(−2)]z2 + 1 ¯y(−1)z
ˆ
Y
6
6
6
zi(z)
=
(z − 1 )(z − 1 )
3
2
z2 + 1 z
−3
4
=
6
= z
+
,
(z − 1 )(z − 1 )
z − 1
z − 1
3
2
3
2
576
Lee & Varaiya, Signals and Systems
13. LAPLACE AND Z TRANSFORMS
so
n
n
∀
1
1
n,
yzi(n) = −3
u(n) + 4
u(n).
3
2
The zero-state response, yzs, has Z transform
z3
ˆ
Yzs(z) =
ˆ
H(z) ˆ
X (z) = (z− 1)(z− 1)(z−1)
3
2
1
−3
3
=
z
+
+
,
z − 1
z − 1
z − 1
3
2
so
n
n
∀
1
1
n,
yzs(n) =
u(n) − 3
u(n) + 3u(n).
3
2
The (total) response
∀n ∈ Z, y(n) = yzs(n) + yzi(n) = 3u(n) + [−2(1/3)n + (1/2)n]u(n),
can also be expressed as the sum of the steady-state and the transient response with
yss(n) = 3u(n) and ytr(n) = −2(1/3)nu(n) + (1/2)nu(n). Note that the decompo-
sition of the response into the sum of the zero-state and zero-input responses is
different from its decomposition into the steady-state and transient responses.
13.7.1
LTI differential equations
The analogous development for continuous time concerns systems described by a LTI
differential equation of the form
dmy
dm−1y
dy
(t) + am−1
(t) + · · · + a1
(t) + a0y(t)
dtm
dtm−1
dt
dkx
dx
= bk
(t) + · · · + b1
(t) + b0x(t), t ≥ 0.
(13.27)
dtk
dt
We interpret this equation as describing a causal continuous-time LTI system in which
x(t) is the input and y(t) is the output at time t. The constant coefficients ai and b j specify
the system.
Lee & Varaiya, Signals and Systems
577
13.7. LINEAR DIFFERENCE AND DIFFERENTIAL EQUATIONS
In section 8.2.1 we used this form to find the frequency response. In example 13.11, we
used the Laplace transform to find the transfer function of a tuning force. But in both
cases, we assumed that the system was initially at rest. We now develop a method to find
the response to arbitrary initial conditions. We begin with a simple circuit example.
Example 13.21: A series connection of a resistor R, a capacitor C, and a voltage
source x, is described by the differential equation
dy
1
(t) +
y(t) = x(t),
dt
RC
in which y is the voltage across the capacitor. The differential equation is obtained
from Kirchhoff’s voltage law. The transfer function of this system is ˆ
H(s) = 1/(s +
1/RC). So if the system is initially at rest, we can calculate the response y from its
Laplace transform ˆ
Y = ˆ
H ˆ
X . For instance, if the input is a unit step, ˆ
X (s) = 1/s,
1
−RC
RC
ˆ
Y (s) =
=
+
,
(s + 1/RC)s
s + 1/RC
s
therefore, y(t) = −RCe−t/RC + RC, t ≥ 0.
We cannot use this transfer function, however, to determine the response if the
initial capacitor voltage is y(0) = ¯
y(0) and x(t) = 0,t ≥ 0. The response in this case
is
y(t) = ¯
y(0)e−t/RC, t ≥ 0.
We can check that expression is correct by verifying that it satisfies the given initial
condition and the differential equation.
If the initial condition is y(0) = ¯
y(0) and the input is a unit step, the response turns
out to be the sum of the response due to the input (with zero initial condition) and
the response due to the initial condition (with zero input),
y(t) = [−RCe−t/RC + RC] + [ ¯y(0)e−t/RC], t ≥ 0.
For the general case (13.27) we assume that the input x starts at some finite time which
we take to be zero, so x(t) = 0,t < 0. We wish to calculate y(t),t ≥ 0. From the theory of
578
Lee & Varaiya, Signals and Systems
13. LAPLACE AND Z TRANSFORMS
differential equations we know that we need to be given m initial conditions,
y(0) = ¯
y(0), dy (0) = ¯y(1)(0), · · · , dm−1y (0) = ¯y(m−1)(0),
dt
dtm−1
in order to calculate y(t),t ≥ 0.
Because time is continuous, there is no recursive procedure for calculating the output
from the given data as we did in (13.22). Instead we calculate the output signal using the
Laplace transform. We define the Laplace transforms of the signals y(t)u(t), y(1)(t)u(t), · · · , y(m)(t)u(t), x(t)u(t):
Z
∞
Z
∞
ˆ
Y (s)
=
y(t)u(t)e−st dt =
y(t)e−st dt
−∞
0
Z
∞
Z
∞
ˆ
Y (i)(s)
=
y(i)(t)u(t) =
y(i)(t)e−st dt, i = 1, · · · , m
−∞
0
Z
∞
Z
∞
ˆ
X (s)
=
x(t)u(t)e−st dt =
x(t)e−st dt.
−∞
0
Here we use the notation y(i)(t) = dit y(t),t ≥ 0. We now derive the relations between
dti
these Laplace transforms.
The derivative y(1)(t) = dy (t) and y are related by
dt
Z t
Z t
y(t)u(t) = y(0)u(t) +
y(1)(τ)u(?