EE 590 B (PMP): Numerical Examples #5 1 State

EE 590 B (PMP): Numerical Examples #5
Introduction to State-Space Analysis
Wednesday, November 23, 2016
Tamara Bonaci
Department of Electrical Engineering
University of Washington, Seattle
1
State Space Representation
A continuous time state-space model of a linear time-invariant system is defined as:
ẋ
= Ax + Bu
y
= Cx + Du
where x ∈ Rn represents a state vector, u ∈ u ∈ Rm an input vector, and y ∈ Rp an output vector.
Knowing a state space representation of a system, we can find system’s transfer function (matrix) the
following formula1 :
H(s) = C(sI − A)−1 B + D
where I denotes an n × n identity matrix. In order to find a transfer function (matrix), we need to find an
inverse of a matrix (sI - A). A general formula for finding matrix inverses is:
M −1 =
adj(M )
det M
where adj(M ) represents a matrix adjunct (adjugate), and det(M ) the determinant.
For matrices of size 2 × 2 (and 3 × 3, using the rule of Sarrus), such as matrix M =
a
c
b
d
, we can
easily find its inverse by hand using the following formula:
1
d −b
M −1 =
ad − bc −c a
Example 1: Let’s consider an example matrix A =
−2
1
3
0
, and let’s find an inverse of a matrix (sI −A).
Solution:
We can write:
(sI − A)
(sI − A)
−1
=
=
s+2
−1
−3
s
1
2
s + 2s − 3
s
3
1 s+2
Example 2: Find transfer functions G1 (s) and G2 (s) of the following state-space representations of continuoustime LTI systems:
0
1
1
(a) ẋ(t) =
x(t) +
u(t)
−1 −2
2
3 3 x(t) + 0 · u(t)
y(t) =
(1)
1 The
presented formula can easily be derived by taking an unilateral Laplace transform of the given state space representation
1
(b)
ẋ(t)
=
y(t)
=
0
−1
3
1
1
x(t) +
u(t)
−2
2
−3 x(t) + 0 · u(t)
(2)
Solution:
Let’s recall that a transfer function of a LTI system can be found as:
G(s) := C(sI − A)−1 B + D
(3)
where I denotes an n × n identity matrix.
(a) Using equation (3), we thus first find the inverse of the matrix (sI − A1 ):
(sI − A1 )−1 =
s
1
−1
s+2
−1
=
1
s(s + 2) + 1
We now compute transfer function G1 (s):
s+2
s2 +2s+1
3 3
G1 (s) =
−1
s2 +2s+1
=
1
s2 +2s+1
s
s2 +2s+1
s+2
−1
1
2
1
s
=
h
=
1
s2 + 2s + 1
3(s+2)−3
s2 +2s+1
s+2
−1
1
s
i
1
2
3+3s
s2 +2s+1
3s + 3
6s + 6
9(s + 1)
9
+
= 2
=
s2 + 2s + 1 s2 + 2s + 1
s + 2s + 1
s+1
(b) We note that matrices A1 and A2 are equal, hence inverses (sI − A1 )−1 = (sI − A2 )−1 . Thus, we can
immediately find transfer function G2 (s):
h
i 1 s+2
1
s2 +2s+1
1
3(s+2)+3
3−3s
s2 +2s+1
3 −3
G2 (s) =
=
−1
s
s2 +2s+1
s2 +2s+1
2
2
s2 +2s+1
s2 +2s+1
6 − 6s
−3s + 15
3s + 9
+
= 2
=
s2 + 2s + 1 s2 + 2s + 1
s + 2s + 1
2
Characteristic Polynomial of a Matrix
Let’s recall the definition of a characteristic polynomial of a matrix, p(λ). The characteristic polynomials of
a matrix, p(λ), is a monic polynomial (its leading coefficient is 1) of degree n with real coefficients:
p(λ) = αn λn + αn−1 λn−1 + · · · + α1 λ + α0
It can be computed as:
∆(λ) = det(λI − A)
2
(4)
Example 3: Find a characteristic polynomial ∆(λ) of a matrix:


−2 −3 −1
A =  −3 −2 −1 
1
1
−3
2
2
Solution:
Using (4), we find the characteristic polynomial of matrix A as:
 
 
 λ + 2
3
−2 −3 −1
1 0 0






λ+2
∆(λ) = det(λI − A) = det λ 0 1 0 − −3 −2 −1
= 3
1
1
−1
0 0 1
−3
− 21
2
2
2
λ + 2
1 1 1+2 3
1+3 3
+
3
·
(−1)
+
1
·
(−1)
= (λ + 2) · (−1)1+1 1
1
− 1
−2
λ+3
−2 λ + 3
2
1
1
3 λ
= (λ + 2) (λ + 2)(λ + 3) +
− 3 3(λ + 3) +
+ − + +1
2
2
2
2
λ
λ
= λ3 + 2λ2 + 5λ2 + 10λ + 6λ + 12 + + 1 − 9λ − 27 − 2 +
2
2
= λ3 + 7λ2 + 8λ − 16
3
1 1 λ + 3
λ + 2
− 21 Controllability and Observability
Example 4 Consider the following continuous-time system:
−1 10
−2
ẋ =
x+
u
0
1
0
−2 3 x − 2u
y =
(5)
Is it controllable and observable? Check by finding the controllability and the observability matrices.
Solution:
A linear time-invariant system is controllable if its controllability matrix, C, defined as:
C = B | AB | A2 B | . . . | An−1 B
(6)
has rank equal to the number of states in the system, rank(C) = n. Similarly, a system is observable if its
observability matrix, O:


C
 CA 


2


O =  CA
(7)



..


.
CAn−1
has rank equal to n. Let’s find the controllability and the observability matrices of the given system and
let’s check their ranks:
−2 2
B | AB =
C =
0 0
C
−2
3
O =
=
CA
2 −17
We observe the second column of matrix C is equal to the first column multiplied by (-1). Thus, these two
columns are linearly dependent and the rank of the controllability matrix is equal to 1. The system is not
controllable.
3
We observe the rows of matrix O are linearly independent (cannot be represented as a linear combination
of each other). Thus, the rank of the observability matrix is equal to 2 and the given system is observable.
Example 5 Consider the following continuous-time system:



0 1 0
0
ẋ =  0 0 1  x +  1
0 2 −1
0
1 0 1 x − 2u
y =

1
0 u
0
(8)
Is it controllable and observable? Find its controllability and the observability matrices.
Solution:
In order to determine if
observability matrices:

0 1
AB =  0 0
0 2

0 1
A2 B =  0 0
0 2
C
=
B
the given system is controllable and observable, let’s find its controllability and

0
1 
−1

0
1 
−1
AB
 
1
1
0 = 0
0
2

0 1 0
0 0 1 
0 2 −1

0 1 1
A2 B =  1 0 0
0 0 2
0
1
0

0
0 
0
 
1
0
0 = 0
0
0

0 0 0
0 2 0 
0 −2 0
0
1
0

1
0
−1   1
3
0
0
2
−2
 
1
0
0 = 2
0
−2

0
0 
0
We observe that the first, the second and the third column of the controllability matrix are linearly independent. Thus, matrix C has rank 3 and the given system is controllable.

CA =
CA2
=
O
=

0 1 0
1 0 1  0 0 1  = 0 3 −1
0 2 −1



0 1 0
0 1 0
1 0 1  0 0 1  0 0 1  = 1
0 2 −1
0 2 −1


C




1 0 1


 CA  =  0 3 −1 




0 2 −4
2
CA

0
1
0
 0
0
0
2
−2

1
−1  = 0
3
2
−4
Rows of matrix O are linearly independent (cannot be represented as linear combinations of each other).
Thus, the rank of matrix O is equal to 3 and the system is observable.
4