Professional Documents
Culture Documents
ch4 Solnltisys PDF
ch4 Solnltisys PDF
The polynomial p is said to have degree r (or sometimes called order r). Given p(λ) we can
define a polynomial function of a n × n matrix A as
Ak = A
| · A{z· · · A}, k≥1
k factors
A0 = I.
69
70 CHAPTER 4. SOLUTIONS TO LTI SYSTEMS IN STATE SPACE FORM
then
2 0 −2 3 0 4
A = , A =
0 4 0 −8
and so
0 4 0 −2 1 0 −6 0
p(A) = +2 −6 = .
0 −8 0 4 0 1 0 −6
Cayley-Hamilton’s theorem [Bay99, Page 209] states that every A ∈ Rn×n satisfies its char-
acteristic equation φ(A) = 0 where φ(λ) = det(λI − A).
φ(λ) = λ2 + 2λ
Example 26 Given
0 0
A=
1 0
compute f (A) if f (λ) = sin λ.
Since the Taylor series for sin is
we have
f (A) = sin A = A − A3 /3! + A5 /5! + · · ·
Since Ak = 0, k ≥ 2 we have
0 0
f (A) = sin A = A =
1 0
We remark that for any matrix A = [aij ] we cannot compute f (A) element-wise, i.e., the
ijth element of f (A) is not equal to f (aij ), where aij denotes the ijth element of A. This
fact was shown in Example 26. However, for some special types of matrices (e.g. diagonal
matrices) we can compute functions of matrices element-wise.
we have
Âk = diag(ak11 , ak22 , . . . , aknn ).
Assuming a function f has a convergent Taylor series about λ = 0
∞
X di f λi
f (λ) = i
(0)
i=0
dλ i!
the function of a diagonal matrix f (Â) is readily obtained by evaluating the function element-
wise:
∞ ∞
X 1 di f i
X 1 di f
f (Â) = diag(f (a11 ), . . . , f (ann )) = i
(0)Â = i
(0) diag(ai11 , . . . , ainn ).
i=0
i! dλ i=0
i! dλ
Next we remark that when  is similar to A, i.e., there exists an nonsingular matrix M such
that
 = M −1 AM
then for any function f we have
∞ ∞
X 1 di f i
X 1 di f
f (A) = i
(0)A = i
(0)M Âi M −1 = Mf (Â)M −1 . (4.3)
i=0
i! dλ i=0
i! dλ
72 CHAPTER 4. SOLUTIONS TO LTI SYSTEMS IN STATE SPACE FORM
Example 27 Given
0 1
A=
0 −2
compute exp(At) using the diagonalization method.
Since the matrix is triangular, we can read the eigenvalues off the diagonal entries of A.
Hence, the eigenvalues of A are λ1 = 0, λ2 = −2. Since A has distinct eigenvalues we can
compute two linearly independent eigenvectors to diagonalize A. This set of eigenvectors is
1 1
{ , }
0 −2
Hence
 = M −1 AM = diag(0, −2)
and
f (Â) = exp(Ât) = diag(1, e−2t )
and therefore using (4.3) we have
1
1 2
(1 − e−2t )
f (A) = exp(At) = Mf (Â)M −1
= M exp(Ât)M −1
=
0 e−2t
Example 28 Given
0 −2
A=
2 −2
compute exp(At) using the diagonalization method.
The characteristic polynomial of A is
λ 2
φ(λ) = det(λI − A) = det = λ2 + 2λ + 4
−2 λ − 2
4.1. COMPUTING FUNCTIONS OF SQUARE MATRICES 73
√ √
Hence the eigenvalues of A are complex λ1 = −1 + j 3, λ2 = −1 − j 3 and distinct. We can
therefore use the diagonalization method to compute exp(A). We solve (λ1 I − A)x = 0 to
obtain the eigenvector for λ1 . Since λ1 is complex, its associated eigenvector will be complex:
√
−1 + j 3 2√
(λ1 I − A) = (4.4)
−2 1+j 3
√ √
performing R2 (−1 + j 3) + 2R1 → R2 and R1 (−1 − j 3)/4 → R1 we have the REF of (4.4)
−1−j √3
1 2
0 0
(Why do we expect one row of zeros in REF?) Hence an eigenvector for λ1 is
1+j √3
x= 2 t, t ∈ C
1
The eigenvector for λ2 is the conjugate of that of λ1 :
1−j √3
2 t, t ∈ C
1
Hence the modal matrix is
1+j √3 √
1−j 3
" √ 1
√ #
j 3
−j/ 3 +
M= 2 2 ⇒ M −1 = √ 2
1
6
√
j 3
1 1 j/ 3 2
− 6
We have " √ #
j 3
e 0
f (Â) = e−t √
0 e−j 3
and so
f (A) = exp(At) = Mf (Â)M −1 = M exp(Ât)M −1
" √ √ √ #
√1 sin( 3t) + cos( 3t) − √2 sin( 3t)
= e−t 3 √ √ 3 1 √ .
√2 sin( 3t) cos( 3t) − √ sin( 3t)
3 3
Since not all matrices can be diagonalized, [Bay99, Pages 215–219] provides a more general
but similar method of computing f (A) using a Jordan form. We will not be considering this
procedure due to time constraints.
This series converges for all A and t (i.e., exp is an analytic function on R) and we have
immediately exp(0) = I. If we differentiate (4.5) term by term
∞ ∞ ∞ ∞
d d X (At)k X kAk tk−1 X Ai ti X Ai ti
exp(At) = = =A = A = A exp(At) = exp(At)A
dt dt k=0 k! k=1
k! i=0
i! i=0
i!
we obtain the useful identity
d
exp(At) = A exp(At) = exp(At)A. (4.6)
dt
Using the differentiation property of the Laplace transform
df
L{ (t)} = sF (s) − f (0− ) (4.7)
dt
and taking Laplace transforms of both sides of (4.6), we obtain
sL{exp(At)} − exp(0) = AL{exp(At)} ⇒ (sI − A)L{exp(At)} = I
or
exp(At) = L−1 {(sI − A)−1 }. (4.8)
The relation (4.8) gives a convenient way to compute exp(At) using Laplace transforms.
Example 29 Given
0 −1
A=
1 −2
We compute −1
s 1 1 s + 2 −1
(sI − A) −1
= = .
−1 s + 2 (s + 1)2 1 s
Using the inverse Laplace transform L−1 {1/(s + 1)2 } = te−t and the derivative property of
the Laplace transform (4.7) so that
d
L−1 {s/(s + 1)2 } = (te−t ) = e−t − te−t .
dt
Hence, we obtain
−t
2te − te−t + e−t −te−t (t + 1)e−t −te−t
exp(At) = = .
te−t e−t − te−t te−t (1 − t)e−t
and q
X
n= mi . (4.10)
i=1
Expressions (4.9)–(4.10) are another way of saying that matrix A has q distinct eigenvalues
and that each distinct eigenvalue λi has multiplicity mi .
Given some function f for which we want to compute f (A), we define the (n − 1)th degree
polynomial
g(λ) = α0 + α1 λ + · · · + αn−1 λn−1
where αi are such that the following n independent linear equations in αi are satisfied:
dl f dl g
(λ i ) = (λi ), 1 ≤ i ≤ q, 0 ≤ l ≤ mi − 1. (4.11)
dλl dλl
When (4.11) are satisfied we have
f (A) = g(A) (4.12)
and we say g and f are equal on the spectrum of A. The relation (4.12) allows us a straight-
forward means to compute any function of a matrix f (A) by evaluating an (n − 1)th degree
polynomial g whose coefficients αi satisfy (4.11). This method for computing f (A) will be
referred to as the Cayley-Hamilton method for computing a function of a matrix.
Example 30 Given
0 1
A=
−1 −2
and f (λ) = λ100 , find f (A) using the Cayley-Hamilton method.
Step 1: First we compute the eigenvalues of A. The characteristic polynomial of A is
λ −1
φ(λ) = det(λI − A) = det = λ(λ + 2) + 1 = (λ + 1)2 .
1 λ+2
Example 31 Given
0 0 −2
A = 0 1 0
1 0 3
and f (λ) = eλt , compute f (A) = exp(At) using the Cayley-Hamilton method.
Step 1: We begin by computing the eigenvalues of A. The characteristic polynomial of A is
λ 0 2
φ(λ) = det(λI−A) = det 0 λ − 1 0 = λ(λ−1)(λ−3)+2(λ−1) = (λ−1)2 (λ−2).
−1 0 λ−3
Hence A has an eigenvalue λ1 = 1 with multiplicity m1 = 2 and an eigenvalue λ2 = 2 with
multiplicity m2 = 1.
Step 2: Using (4.11), we solve for the n = 3 coefficients of g(λ) = α0 + α1 λ + α2 λ2 . Since
the multiplicity of λ1 is m1 = 2, we need to compute one derivative in (4.11). Since
dg
(λ) = α1 + 2α2 λ
dλ
df
(λ) = teλt
dλ
the relations (4.11) become
f (1) = g(1) ⇒ et = α0 + α1 + α2
df dg
(1) = (1) ⇒ tet = α1 + 2α2
dλ dλ
f (2) = g(2) ⇒ e2t = α0 + 2α1 + 4α2 .
Solving this linear system for α0 , α1 , α2 we obtain
α0 = e2t − 2tet (4.13a)
α1 = 3tet + 2et − 2e2t (4.13b)
α2 = e2t − et − tet . (4.13c)
4.1. COMPUTING FUNCTIONS OF SQUARE MATRICES 77
Hence
g(λ) = e2t − 2tet + (3tet + 2et − 2e2t )λ + (e2t − et − tet )λ2 .
Step 3: Using (4.12) we can use g to readily evaluate f (A):
f (A) = exp(At) = g(A) = (e2t − 2tet )I + (3tet + 2et − 2e2t )A + (e2t − et − tet )A2
t
2e − e2t 0 2et − 2e2t
= 0 et 0 (4.14)
2t t 2t t
e −e 0 2e − e
where we needed
−2 0 −6
A2 = 0 1 0 .
3 0 7
In MATLAB you can check your hand computations of the matrix exponential using the
Symbolic Math Toolbox function sym/expm
ans =
[ 2*exp(t)-exp(2*t), 0, -2*exp(2*t)+2*exp(t)]
[ 0, exp(t), 0 ]
[ exp(2*t)-exp(t), 0, -exp(t)+2*exp(2*t) ]
Example 32 Given
0 2 −2
A = 0 1 0
1 −1 3
Step 2: We remark that the spectrum (or the set of eigenvalues) of A is the same as in
Example 31. Hence we can reuse the values of αi in that example (see expressions (4.13)):
α0 = e2t − 2tet
α1 = 3tet + 2et − 2e2t
α2 = e2t − et − tet .
Step 3: However, since the matrix A is different, the value of exp(At) will not be the same
as that computed in Example 31:
f (A) = exp(At) = g(A) = (e2t − 2tet )I + (3tet + 2et − 2e2t )A + (e2t − et − tet )A2
t
2e − e2t 2tet 2et − 2e2t
= 0 et 0 .
2t t t 2t t
e − e −te 2e − e
ẋ = Ax + Bu (4.15a)
p m n
y = Cx + Du, y ∈ R ,u ∈ R ,x ∈ R (4.15b)
d
exp(At) = A exp(At) = exp(At)A. (4.16)
dt
We left multiply both sides of (4.15a) by exp(−At):
Note that we have included the dependence of x on t in our notation. We can rewrite (4.17)
as
e−At ẋ(t) − e−At Ax(t) = e−At Bu(t).
Using (4.16) we can write this last expression as
d −At
(e x(t)) = e−At ẋ(t) − e−At Ax(t) = e−At Bu(t). (4.18)
dt
Integrating (4.18) from 0 to t gives
Z t Z t
d −Aτ
(e x(τ ))dτ = e−Aτ Bu(τ )dτ
0 dτ 0
4.2. SOLUTIONS TO LTI SYSTEMS 79
Hence,
t Z t
e−Aτ
x(τ ) = e−Aτ Bu(τ )dτ
0 0
Z t
−At
e x(t) − Ix(0) = e−Aτ Bu(τ )dτ (since exp(0) = I.)
0
The output equation (4.15b) and (4.19) gives the expression for the output response
Z t
At
y(t) = Cx(t) + Du(t) = Ce x(0) +C eA(t−τ ) Bu(τ )dτ + Du(t) (4.20)
| {z } 0
Zero-input response | {z }
Zero-state response
We remark
• The output response (4.20) is the superposition of two terms labeled above as zero-input
response and zero-state response. The zero-state response is a convolution integral.
• The matrix Φ(t, τ ) = exp(A(t − τ )) which appears in the zero-state response is called
the state-transition matrix of the system (4.15).
• To compute the output or state response using (4.20) or (4.19) we need to compute
exp(At) and perform integration.
• Frequency domain models or input/output models (as studied in EE 357) assume the
initial state x(0) = 0 and investigate the zero-state output response:
Z t
y(t) = C eA(t−τ ) Bu(τ )dτ + Du(t). (4.21)
0
Letting u(t) = δ(t) in (4.21) we obtain the expression for the impulse response matrix
in terms of the state space parameters A, B, C, D:
Recall that the transfer matrix G(s) and impulse response matrix g(t) are related by
• Identical expressions to (4.19), (4.20) for x and y can be obtained when B, C, D are
functions of time. However, similar expressions cannot be obtained for time-varying A
matrices.
Example 33 Compute the unit step response for the SIMO system
0 −1 0
ẋ = x+ u
1 −2 1
y = x.
From (4.20), with the zero-input response equal to zero since x(0) = 0, we have
Z t Z t −t
A(t−τ ) −(t − τ )e−(t−τ ) e + te−t − 1
y(t) = I e Bdτ = dτ = (4.22)
0 0 (1 − (t − τ ))e−(t−τ ) te−t
Note that in order to reduce the amount of computation in (4.22) it is best to perform the
product C exp(A(t − τ ))B before performing integration. When computing step responses,
it is actually possible to avoid the convolution integral in the zero-state response when A−1
exists: Z Z t t
eA(t−τ ) Bu(τ )dτ = eAλ dλB (4.23)
0 0
d
exp(At) = A exp(At)
dt
we can integrate this relation to get
Z t Z t
d
exp(Aτ )dτ = exp(At) − I = A exp(Aτ )dτ
0 dτ 0
Hence Z t
eAλ dλ = A−1 (exp(At) − I), if A nonsingular. (4.24)
0
Since A−1 exists, we can obtain the same answer as (4.22) using (4.24):
Z t −t
A(t−τ ) −2 1 −te−t e + te−t − 1
y(t) = e Bdτ = = .
0 −1 0 (1 − t)e−t − 1 te−t
4.3. SYSTEM MODES 81
Hence, using (4.20) with (4.26) and (4.27), the output step response is
−t 1 −t 1 1 −2t
2e − e−2t 2
− e−t + 12 e−2t e + 2 − 2e
y(t) = x(t) = −t + = .
2e − 2e
−2t
e −e
−t −2t
e−2t − e−t
| {z } | {z }
Zero-input response Zero-state response
where ξ = (ξ1 , . . . , ξn )T and M is a modal matrix. Using (4.28) we can put the system (4.15)
into ξ-coordinates:
where B̂ = M −1 B, Ĉ = CM. The equations (4.29) consist of n decoupled linear ODEs and
the ith term of the sum (4.28) is
ξi (t)qi (4.30)
and is called the system mode associated with eigenvalue λi . The representation (the right-
hand side of (4.28)) of x in the basis of eigenvectors is called the modal decomposition of the
state solution.
(At)2
x(t) = exp(At)x(0) = (I + At + + . . . )qi α
2!
(λi t)2
= qi α + λi tqi α + qi α + . . .
2!
= eλi t qi α (4.32)
Hence the zero-input response of (4.15) to an initial condition x(0) = qi is simple: it is the
mode of the unforced system ẋ = Ax associated with λi . The solution x(t) = eλi t qi is a
trajectory which lies in the direction of vector qi . If λi is positive, the mode increases with
time, if λi is negative, the mode decreases with time. Hence, for general initial conditions,
the zero-input response can excite all modes, but for x(0) = qi (or any scalar multiple of qi )
only the mode associated with λi is excited. Of course, since initial conditions must be real,
this discussion is limited to real eigenvalues and eigenvectors.
4.3. SYSTEM MODES 83
However, there is a similar interpretation for complex eigenvalues and eigenvectors. Sup-
posing qi and qi∗ correspond to a complex conjugate pair of eigenvalues λi and λ∗i of A. We
assume the initial state satisfies
Eigenvalues of the system matrix are λ1 = −1 and λ2 = −2. Eigenvectors are q1 = [1, −1]T
and q2 = [1, −2]T . Figure 4.1 shows the phase portrait of the system which a plot of the
components of the system’s state trajectory. Since the eigenvalues of the system matrix
of (4.35) are real, negative, and nonzero, the equilibrium point x = 0 of System (4.35) is
called a stable node. When the eigenvalues are real, nonzero, and have opposite signs, the
equilibrium is called a saddle, and when the eigenvalues are real and positive, the equilibrium
x = 0 is called an unstable node.
For initial conditions proportional to q1 , i.e., x(0) = cq1 , c ∈ R, we only excite the mode
corresponding to λ1 . From (4.32) the solution is
ż = diag(λ1 , λ2 )z (4.36)
84 CHAPTER 4. SOLUTIONS TO LTI SYSTEMS IN STATE SPACE FORM
Phase plot for xdot = [0 1;−2 −3]*x (stable node − original coords)
1
0.6
0.4
0.2
x2
0 Eigenv q1 = [1, −1]T
−0.2
−0.4
−0.6
−0.8
−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
x1
0.8
Eigenv q2 = [0, 1]T
0.6
0.4
0.2
z
2
0
−0.2
−0.4
−0.8
−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
z
1
1 1
with Mz = x where a modal matrix M = [q1 , q2 ] = .
−1 −2
Note that from (5.20) we have z1 (t) = z1 (0)eλ1 t and z2 (t) = z2 (0)eλ2 t , we have
λ /λ2
z2 = cz1 1
and for λ1 /λ2 = 1/2 we have the family of parabolas z22 = cz1 as shown in Figure 4.2. Note
that in JCF the eigenvectors are unit vectors.
The phase plots were generated using Richard Murray’s phaseplot.m and boxgrid.m at
www.ece.ualberta.ca/~ alanl/ee460/x/examples/portrait.zip
Example 36 We consider the system
0 1 0 0
ẋ = −50 0 0 x + 0 u.
0 0 1 1
√ √
This system has two imaginary eigenvalues λ1 = j 50, λ2 = λ∗1 = −j 50 and a real eigen-
vector λ3 = 1. The eigenvector associated with λ1 is
√1
q1 = j 50 = qre + jqim .
0
The eigenvector associated with λ2 is
1
√
q2 = q1∗ = −j 50 = qre − jqim .
0
We choose an arbitrary complex number α = V ejφ , V > 0, V ∈ R and the initial condition
(from (4.33)) as
√cos φ
x(0) = 2ℜ(αq1 ) = 2V − 50 sin φ . (4.37)
0
Then from (4.34) we have
cos ωt sin ωt a
x(t) = 2 exp(σt) qre qim
− sin ωt cos ωt −b
1 √0 √ √
cos( √50t) sin( √50t) cos φ
= 2V 0 50
− sin( 50t) cos( 50t) − sin φ
0 0
√
√cos( 50t
√ + φ)
= 2V − 50 sin( 50t + φ) .
0
As expected, solutions
√ for initial conditions x(0) = 2ℜ(αq1 ) are non-decaying oscillations at
a frequency of 50 rad/s. These oscillations remain in the plane span{qre , qim } for all t ≥ 0,
i.e., the initial condition (4.37) only excites the imaginary modes of the system.
Bibliography
[Bay99] John S. Bay. Fundamentals of linear state space systems. McGraw-Hill, 1999.
[Che99] Chi-Tsong Chen. Linear System Theory and Design. Oxford, New York, NY, 3rd
edition, 1999.
[Max68] J.C. Maxwell. On governors. Proceedings of the Royal Society of London, 16:270–
283, 1868.
123