You are on page 1of 81

4246 Linear System

xu-week1.docx
1
1. Introduction and Motivation



In this week, we will review classical control, highlight some of the shortcoming of the classical approach,
which motivates the study of state-space models. To prepare for further study, we will also review
knowledge of vectors and matrices.


1.1 Introduction

Linear systems are usually mathematically described in one of two domains: time-domain or
frequency domain. The classical frequency-domain approach results in a system representation in
the form of a transfer function where the initial conditions are assumed to be zero. In the time-
domain approach, the systems representation is in the form of a differential equation. However,
rather than working with the high-order differential equation, we will use a set of 1
st
order
differential equations to describe the equivalent high-order differential equation. Of course if the
orginal differential equation is of 4
th
order, then we will need four 1
st
order differential equations
in order to describe the same system. Using this 1
st
order representation (essentially state
equations), we will see that it provide a convenient time-domain representation that is the same
for systems of any order. Furthermore, state space descriptions do not assume zero initial
conditions, and allow for the analysis and design of system characteristics that are not possible
with frequency domain representations.



A Control System is a system in which some physical quantities are controlled by regulating
certain energy inputs.

A system is a group of physical components assemblied to perform a specific function. It may be
electrical, mechanical, thermal, biomedical, chemical, pneumatic or any combination of the the
above.

A physical quantity may be temperature, pressure, electrical voltage, mechanical position or
velocity, liquid level, etc.

Some applications of automatic control

Space vehicle systems
Missile Guidance Systems
Aircraft autopilot systems
Robotic systems
Weapon control systems
Power systems
Home appliances: aircons, refrigerators, dryers, microwave ovens etc.
Automatic assembly line
Chemical processes controlling pressures, temperature,humidity, pH values, etc.
Manufacturing systems CNC machines, machine tool control, EDM control, etc
Quality control and Inspection of manufactured parts

Classical Control VS Modern Control:

The following are some of the features of Classical Control Theory:
4246 Linear System
xu-week1.docx
2
1. It uses extensively the Laplace operator in the description of a system.
2. It is based on input/output relationship called transfer function. In computing the transfer
function of a system, all initial conditions are set to zero.
3. It was primarily developed for single-input-single-output systems, although extension to multi-
input and multi-output is now possible.
4. It can only describe linear time-invariant differential equation systems.
5. Based on methods like frequency response, root locus etc.
6. Its formulation is not very well suited for digital computer simulation.

The following are some of the features of Modern Control Theory:
1. Uses the time domain representation of the system known as the state space representation.
2. Can be used to describe multi-input-multi-output systems. Extensions to linear time varying,
nonlinear and distributed systems are easy and straight forward.
3. The formulation incorporates initial conditions into descriptions.
4. It is based on time domain approach and is therefore, very well suited for computer
simulations.
5. Provides a complete description of the system.

Open-loop control systems
Typically represented in block diagram form



Output has no effect on the control action.
Examples: washing machine, traffic lights, microwave oven, dryers,
toasters, etc.

Closed-loop control systems
Typically represented as:



Actuating signal, and hence output, depends on the input and the current
state of the output.
4246 Linear System
xu-week1.docx
3
Examples are servo controlled motor, missile, robots etc.

Laplace transformation:
Given a function f(t) where t 0.
Let s be the complex variable defined as s = + j where , are variables.
Then the Laplace transform of f(t), denoted as F(s), is
0
( ) [ ( )] ( )
st
F s L f t f t e dt


= =
}


Transfer Function:
Consider the system given by

where
1
0 1 1 1
1
0 1 1 1
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
n n
n n n n
m m
m m m m
d d d
a c t a c t a c t a c t
dt dt dt
d d d
b r t b r t b r t b r t
dt dt dt


+ + + + =
+ + + +

with . n m >

The transfer function of a linear, time-invariant, differential equation
system is defined

1 2
0 1 2 1
1 2
0 1 2 1
( ) ( )
( ) .
( ) ( )
m m m
m m
n n n
n n
b s b s b s b s b C S L output
G s
R s L input a s a s a s a s a

+ + + + +
= = =
+ + + + +


Poles of a system: The roots of the denominator of the transfer function G(s) are
called the poles of the system.

e.g.,
2
2
2 2
( )
( 3 2)
s s
G s
s s s
+ +
=
+ +

poles of the system are s=0, s=-2. s=-1.

When is a SISO system stable?
Ans: depends on the definition of stability.
Simplest answer: all poles have negative real parts.
However, this leads to some problems, which we will see below.



1.2 Definitions

Dynamic System: A dynamic system (or a system with memory) is one whose output depends
on itself from an earlier point in time. A system whose output depends only on the current time
and the current input is memoryless.

Dynamic Systems most often occur as differential equation (continuous-time), or as difference
equations (discrete-time) because closed-form solutions of such systems require integration or
4246 Linear System
xu-week1.docx
4
summation, of a quantity over past time. The system equation will be algebraic if the system is
memoryless.

Causality: A system is said to be causal if the value of the output at time t
o
depends on the values
of the input and output for all time t up to and including t
o
(i.e for tst
o
).

Systems that are not causal are called anticipatory, because they violate the seemingly impossible
conditoin that they depend on some future values for use at the current time. Physical systems
obviously must be causal but non-causal systems are often used in data filtering and image
processing applications. In those cases, an entire data set is first acquired so that at any given
time, you have data available for processing at a time ahead of the present time.

If a system is causal, then its transfer function will be proper, i.e the degree of its numerator
polynomial must be no greater than its denominator polynomial.

Time-invariance: A time-invariant system is one whose output depends only on the difference
between the initial time and the present time, i.e. y = y(t-t
0
) where t is the present time and t
0
is the
initial time. Otherwise the system is time-varying.

Time-varying systems are typically systems in which time appears as an explicit variable in the
differential, difference or algebraic equation that describe the system. A time-invariant
differential equation must, by necessity, be one with constant coefficients.

Example: For a system with output y and input u,

u u u y y y + + = + + 6 2 8 6 is time-invariant

u u d u c by y a y + + = + + is time-invariant provided a, b, c and d are constants

u u d u c y t b y t a y + + = + + ) ( ) ( is time-varying


Linearity: A linear system is one that satisfies the homogeneity and additivity conditions. A
homogeneous system is one for which, given y(t) = S(u(t)), then S(au(t)) = aS(u(t)) for all a and u,
and an additive system is one for which S(u
1
+ u
2
)= S(u
1
)+ S(u
2
).

Linear systems are thus systems for which the principle of superposition holds, i.e the effect of
each input can be considered independently of one another. In systems with memory, the system
is linear if the nth derivative depends in a linear way on each of the lower derivatives, and also in
a linear way on the input, if any. If the coefficients of the differential equation are functions of
the dependent variable then a nonlinear differential equation results.

Example:



y + a y +by = c u + d u + u is linear time-invariant (LTI)

u u d u c y t b y t a y + + = + + ) ( ) ( is linear time-varying

u u d u c y t b y y y + + = + + ) (
2
is nonlinear, time-varying

1.3 Motivation for State-Space model
4246 Linear System
xu-week1.docx
5
Consider an unstable plant G s
s
( ) =

1
1
. In order to design a compensator for such a plant,
one might use a compensator
1
1
) (
+

=
s
s
s H as shown in the block diagram Figure 2.1.
V(s)
U(s)
Y(s)
Y(s)
V(s)
G(s) H(s)
GH(s)


1
1
) ( ) (
+
=
s
s H s G

Now, as far as the input/output is concerned the transfer function from V(s) to Y(s) is now stable.
In fact, the solution is:


) ( *
) ( ) (
0
) (
t v e
d v e t y
t
t
t


=
=
}
t t
t


which looks completely stable.

But this controller will not work because the system will tend to saturate or burn out. To see this,
instead of just looking at the input/output alone, we really need to analyze the complete
representation of the cascaded system and not only look at the input and output. In fact, the
actual system consists of the two cascaded systems as shown below:


Y s
s
U s
sY s Y s U s
sY S Y s U s
( ) ( )
( ) ( ) ( )
( ) ( ) ( )
=

=
= +
1
1

Let x t y t
2
( ) ( ) = , therefore we get
( ) ( ) ( ) x t x t u t
2 2
= + (2.1)

Consider
4246 Linear System
xu-week1.docx
6

or
U s
s
V s ( ) ( ) =
+

(
1
2
1



(2.2)

Multiply throughout by e
t
, we get




e x t e v d x
x t e e v d e x
x t e v d e x
x t e v x e
t
t
t
t
t
t
t
t
t t
1
0
1
1
0
1
1
0
1
1 1
2 0
2 0
2 0
2 0
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( ) * ( )
( )
= +
= +
= +
= +
}
}
}



t
t
t
t t
t t
t t
(2.3)

From (2.1),
( ) ( ) ( ) x t x t u t
2 2
= +

The solution is given by (multiply by
t
e

)
2 2 2
( ) ( ) ( )
t t t
d
e x x e x e u t
dt

= =

2 2
0
2 2
0
( )
2 1 2
0
( ) ( ) (0)
( ) ( ) (0)
( ) [ ( ) ( )] (0)
t
t
t
t t
t
t t
e x t e u d x
x t e e u d e x
x t e v x d e x
t
t
t
t t
t t
t t t

= +
= +
= + +
}
}
}

If you worked this through, youll get

x t e x e e x e v
t t t t
2 2
1
2
1
0 0 ( ) ( ) ( ) ( ) * = + +

(2.4)


U
V
s
s
=

+
1
1
Let sothat X s
s
V s
U s V s X s
Now sX s X s V s
1
1
1 1
2
1
2
( ) ( )
( ) ( ) ( )
, ( ) ( ) ( )
=

+
= +
+ =
( ) ( ) ( ) x t x t v t
1 1
2 + =
e x x e x e v
t
d
dt
t t
( ) ( )
1 1 1
2 + = =
4246 Linear System
xu-week1.docx
7
Therefore, because of the term e
t ,
unless the initial conditions can be guaranteed to be zero or
x x
1 2
0 2 0 ( ) ( ) = , the output will grow without bounds! In practice, it is impossible to guarantee
such initial conditions as noise exists invariably in all physical systems and any small noise will
cause the system to go unstable.

If you had used Laplace to solve the equation, things would be much easier!!
From (2.2),


1 1
( ) ( ) 2 ( ) x t x t v t + =

Taking the Laplace Transform, we get,

sX s x X s V s
1 1 1
0 2 ( ) ( ) ( ) ( ) + =

i.e.
X s
x
s
V s
s
1
1
0
1
2
1
( )
( ) ( )
=
+

+
(2.5)

Also,
( ) ( ) ( ) x t x t u t
2 2
= +

so that
( ) ( ) ( ) ( ) x t x t x t v t
2 1 2
= + +
Taking Laplace,

sX s X s X s V s x
2 1 2 2
0 ( ) ( ) ( ) ( ) ( ) = + + +

( ) ( ) ( ) ( ) ( ) s X s X s V s x = + + 1 0
2 1 2



) 1 (
) (
) 1 )( 1 (
) 0 (
) 1 (
) 0 (
) (
) 0 ( ) (
1
) ( 2
1
) 0 (
) ( ) 1 (
1 2
2
2
1
2
+
+
+
+

=
+ +
+

+
=
s
s V
s s
x
s
x
s X
x s V
s
s V
s
x
s X s
(2.6)

From Inverse Laplace Table, the solution is

x t e x e e x e v
t t t t
2 2
1
2
1
0 0 ( ) ( ) ( ) ( ) * = + +



Q: What went wrong in the previous analysis which concluded that the system is stable?
Ans: Only the input/output was considered, not the whole system (i.e., internal behavior).


We are able to see why the solution is unbounded because we write the equations as

( ) ( ) t f = x x, v

This is called a state-space equation which is a system of 1st order differential equation. Note
that the variables x and v are written as bold to signify that they are vectors, ie.

4246 Linear System
xu-week1.docx
8
x =

(
(
(
(
x
x
x
n
1
2

where x
1
, x
2
are state variables.
In the example above, we see that we cannot just look at the external (input/output) behavior of
the system alone. We need to know the internal behavior as well. Only by knowing the internal
behavior will we able to understand why the system goes unstable. This is the advantage of the
state-space approach because it gives us the internal behavior of the system. But, compared to the
transfer function approach, it is more difficult to design and implement. Note that any controller
that is obtained using state space can also be found using the transfer function approach, and
usually easier too. However, state-space gives us the insight into why a controller is designed as
such, which we may not know if we only use the transfer function approach.

1.4 Review of vector and matrix properties

Linear Independence of vectors : A set of vectors
n
R e
m 2 1
,...x x , x is said to be linearly
dependent if and only if there exist scalars
i
c not all zero, such that
0 ...
2 1
= + + +
m 2 1
x x x
m
c c c
If the only set of c
i
for which the above equation hold is 0
2 1
= = =
m
c c c , then the
set of vectors
n
R e
m 2 1
,...x x , x is said to be linearly independent.

Alternatively, a set of vectors are linearly dependent if and only if x
i
can be expressed as a linear
combination of x
j
(j=1,2,....m, j=i).

Examples:

(

=
(

+
(

0
0
1
2
2
1
2 1
c c

0
2 1
= = c c

We introduce the notation

| | 0
1
2 1
=
(
(
(

= + + +
m
m
c
c
c c c
m 1 m 2 1
x x x x x
4246 Linear System
xu-week1.docx
9

Hence, if | |
m 1
x x are linearly independent, then 0
2 1
= = =
m
c c c

Matrices:

Transpose of a matrix A.
If
n m
R A

e is given by


(
(
(
(

mn m m
n
a a a
a
a a a

2 1
21
1 12 11

then the transpose of A, denoted by A
T

n m
R

e , is given by



(
(
(
(

mn n n
m
a a a
a
a a a

2 1
12
1 21 11


Note that (A+B)
T
=A
T
+B
T
and (AB)
T
=B
T
A
T

Symmetric Matrix:
A matrix A is said to be symmetric if


T
A A =

Skew-symmetric Matrix.
A matrix A is said to be skew-symmetric if

4246 Linear System
xu-week1.docx
10
T
A A =

Remarks:
(i) Given any square matrix A, then
T
A A+ is symmetric and
T
A A is skew-symmetric.
(ii) For any matrix A, A A B
T
= is a symmetric matrix.

Properties of Determinant of a square matrix.


2 1 2 1
2 1
2 1
a b b a
b b
a a
A = =


2 1
2 1
3
3 1
3 1
2
3 2
3 2
1
3 2 1
3 2 1
3 2 1
c c
b b
a
c c
b b
a
c c
b b
a
c c c
b b b
a a a
A + = =

1.1.1. If any two row or any two columns of a square matrix A are linearly dependent, then
det(A)=0.
1.1.2. If det(A)=0, A is a singular matrix ( inverse does not exist). Otherwise, it is nonsingular.
1.1.3. det(A)=det(A
T
).
1.1.4. det(AB)=det(A)det(B) if A and B are both square matrices.
1.1.5. det(A)=
n
....
2 1
where s are the eigenvalues of A.
1.1.6. If a matrix is singular, at least one of its eigenvalues is zero. (why?)
1.1.7. det(A
-1
) =
) det(
1
A
.
1.1.8. If two rows ( or two columns ) of the determinant are interchanged, only the sign of the
determinant is changed.
1.1.9. If a row (or a column ) is multiplied by a scalar k, then the determinant is multiplied by k.
1.1.10. If
n m m n n n
R C R B R A

e e e , ,
and
m m
R D

e
, then

4246 Linear System
xu-week1.docx
11
) det( ) det(
0
det
0
det D A
D C
A
D
B A
=
|
|
.
|

\
|
=
|
|
.
|

\
|


Rank of a matrix.
The rank of A is the maximum number of linearly independent columns or rows in A. If
n m
R A

e , then
{ } n m A rank , min ) ( s .
{ } ) ( ), ( min ) ( B rank A rank AB rank s .
Remarks:
(i) If rank(A) is equal to the number of columns or the number of rows of A, then A is said
to be full rank.
(ii) If A is square and full rank, then A is nonsingular.


Derivatives:

1 If
x eR
n
, then


d
dt
x(t) =
d
dt
x
1
(t)
.
.
d
dt
x
n
(t)






(

(
(
(
(

2
dA
dt
=
da
ij
dt



(

(
and Adt
}
= a
ij
dt
}
| |
.

3 If J(x) is a scalar function of
x eR
n
, then

4246 Linear System
xu-week1.docx
12

c
2
J
cx
2
=
c
2
J
cx
1
2
. .
c
2
J
cx
1
cx
n
. . . .
. . . .
c
2
J
cx
n
cx
1
. .
c
2
J
cx
n
2






(

(
(
(
(


Trace:
If AeR
nn
, then Tr(A)= Trace of A=
a
ii
i =1
n
.
Tr(A+B)=Tr(A)+Tr(B).
Tr(AB)=Tr(B
T
A
T
)=Tr(BA)=Tr(A
T
B
T
).

Eigenvalues and Eigenvectors:

A scalar ( which can be complex ) is called an eigenvalue of A if there exists a nonzero
vector x ( which can be complex ) such that Ax = x. Any nonzero vector x satisfying
Ax = x is called an eigenvector of A associated with the eigenvalue .

If AeR
nn
, the determinant
det( I-A)
is called the characteristic polynomial of A. It is an nth-degree polynomial in . The
characteristic equation is given by
det( I-A)=0
If the determinant det( I-A) is expanded, the characteristic equation becomes
det( I-A)=
n
+a
1

n1
+ ... +a
n
= 0
The n roots of the characteristic equation are called the eigenvalues of A.

Note : Eigenvectors are unique up to a non-zero scalar multiple

Cayley-Hamilton Theorem:
4246 Linear System
xu-week1.docx
13
Suppose AeR
nn
and det( I-A)=
n
+a
1

n1
+ ... +a
n
= 0 is the characteristic
polynomial of A. Then
A
n
+a
1
A
n1
+ ... +a
n
I = 0

Positive and Nonnegative definite matrices.
A square matrix AeR
nn
is said to be positive definite if for all
x eR
n
, x = 0 ,
x
T
Ax
>0.

A square matrix AeR
nn
is said to be non-negative definite ( or positive semi-definite )
if for all
x eR
n
, x = 0, x
T
Ax > 0.

Remarks:
(i) For A to be positive definite, all leading minors must be positive; i.e.,
a
11
> 0 ,
a
11
a
12
a
21
a
22
> 0 ,
a
11
a
12
a
13
a
21
a
22
a
23
a
31
a
32
a
33
> 0 ,....
(ii) A symmetric matrix A is positive definite if and only if its eigenvalues are
positive. It is positive semi-definite if all eigenvalues are non-negative.

(iii) If DeR
nm
, then DD
T
= A is always positive semi-definite. Furthermore,
it is positive definite if and only if D has full rank n.

Negative and Non-positive definite matrices.
A square matrix AeR
nn
is said to be negative definite if for all
x eR
n
, x = 0 ,
x
T
Ax
<0.

A square matrix AeR
nn
is said to be non-positive definite ( or negative semi-definite )
if for all
x eR
n
, x = 0, x
T
Ax s 0.


4246 Linear System
xu-week2
1
2 System Modelling


In this chapter, we will look at physical modeling of systems, i.e. using known laws of physics to derive the
underlying state equations that described the system. Whether the system is mechanical, electrical,
chemical or biological, a mathematical description should be written in a unified manner so that a single
theory of stability, control or analysis can be applied to the model. This mathematical description that we
will use is a set of equations known as the state equations.

2.1 Modeling of dynamical system

Example 2.1 Mechanical System Equations

Derive the equations of motion for the spring-mass-damper system shown in Figure 2.1. In the
system, the mass is M, the spring constant K and the damping constant B. An externally applied
force f is applied to the mass.

Solution:

Applying Newtons law

= F ma

we get

M
d z t
dt
f t B
dz t
dt
kz t
2
2
( )
( )
( )
( ) =

This is a second order ODE. If we want to write this as a set of 1
st
order ODE, we can
choose
x z
x z
1
2
=
=


then


( ( ) )
x z x
x z M f t Bx kx
1 2
2
1
2 1
= =
= =



i.e.

x x
x
k
M
x
B
M
x
M
f
1 2
2 1 2
1
=
=
|
\

|
.
|
|
\

|
.
| +
|
\

|
.
|


or, in matrix form

x
x
k
M
B
M
x
x
M
f
1
2
1
2
0 1 0
1

(
=

(
(

(
+

(
(
(3.1)
If we are interested in finding the position of the mass, then the output is y(t), is then y(t)=x
1
(t),
or
force f
M
B
K
z
4246 Linear System
xu-week2
2
| | y
x
x
=

(
1 0
1
2

(Q: what is the physical meaning of
2
x ?)
More compactly we can write,


) ( ) ( ) (
) ( ) ( ) (
t D t C t
t B t A t
u x y
u x x
+ =
+ =
(3.2)


where
| |
0
0 1
1
0
1 0
=
=
(
(

=
(
(


=
D
C
M
B
M
B
M
k
A


Equation (3.2) is known as a state-space equation or simply state equations and the variables x
1

and x
2
are known as state variables. In the equation, A is known as the state matrix, B the input
matrix, C the output matrix and D the feedthrough matrix.

Definition: State Equation: The state equations of a system are the set of n first-order
differential equations, where n is the number of independent states.

If we are interested in the force acting on the spring, then the output y(t) will become

| | y t kx t k
x
x
f ( ) ( ) . = =

(
+
1
1
2
0 0
If we are interested in both the force acting on the dashpot as well as the force acting on the
spring, then our output becomes


| |
| |
y t Bx t B
x
x
f
y t kx t k
x
x
f
1 2
1
2
2 1
1
2
0 0
0 0
( ) ( ) .
( ) ( ) .
= =

(
+
= =

(
+


or
y( )
( )
( )
. t
y t
y t
B
k
x
x
f =

(
=

(
+
1
2
1
2
0
0
0

or if we want to know about the total force acting on the mass, then the output is


|
1
2
( ) 1
x
y t k B f
x
(
= +
(




4246 Linear System
xu-week2
3
Example 2.2: Electrical Systems Equations: Series RLC circuit

v
i
(t)
R L
C
v(t)
i(t)



It will be shown later that the choice of state variables is not unique. In general, then number of
state variables will depend on the number of energy storage elements in the system. Only
independent state variables can be chosen. In this example, there are 2 energy storage elements
in the circuit, the inductor and the capacitor. Therefore we can choose i(t) and Vo(t) as our state
variables.

i
dt
dv
C
v v Ri
dt
di
L
i
=
= + +

or, we can write as


i
v
L
t v
t i
C
L L
R
t v
t i
(
(

+
(

(
(
(


=
(

0
1
) (
) (
0
1
1
) (
) (



If we now let x
i
=i, x
2
=v and u=v
i
, then we can write the state equation as

x
x
R
L L
C
x
x
L
u
1
2
1
2
1
1
0
1
0

(
=

(
(
(

(
+

(
(


or in a more compact form

u A b x x + =

where x is a nx1 state vector
A is an nxn matrix
b is a nx1 vector

What about the output quantity? If, in this circuit example, we are interested in the output voltage
across the capacitor, then we let the output, y(t) to be

| | y t
x
x
x v ( ) =

(
= = 0 1
1
2
2

4246 Linear System
xu-week2
4


again, in a more compact form, we get

y=c
T
x


Example 2.3 DC Motor













On the electrical side, by KVL,

e-Ri=v
b
(KVL)
t=k
i
i (Torque-current relation)
v
b
=k
2
e (back emf)

On the mechanical side, using Newtons law
t
e
= J
d
dt


Hence, we have,


J
d
dt
k i k
R
e v
J
d
dt
k
R
e k
i i b
i
e
e
e
= =
=
1
2
( )
( )



J
k k
R
k
R
e
k k
JR
k
JR
e
i i
i i

e e
e e
= +
= +
2
2


Since e
u
=
d
dt
, therefore we have

u e =
e e = +
k k
JR
k
JR
e
i i 2

or

+
-
e
R
i
e
J
+
-
v
b
4246 Linear System
xu-week2
5

u
e
u
e

(
=

(
(

(
+

(
(
0 1
0
0
2
k k
JR
k
JR
e i i

The above 2 examples illustrate the form of the final expressions of the system, ie. the state-space
equations. Note that the general form is


( ) ( ) ( )
( ) ( ) ( )
x Ax Bu
y Cx Du
t t t
t t t
= +
= +

where

A B C D e e e e

R R R R
n n n r m n m r
, , , and
x u e e

R R
n r 1 1
,

Both x and u are function of time, i.e. we should write x(t), and u(t). However, for the sake of
notational simplicity, we normally write it as x and u. In the above cases,
A B C D e e e e

R R R R
n n n r m n m r
, , , are constant matrices and the state equation is a
linear-time-invariant (LTI) system.

If A B C D e e e e

R R R R
n n n r m n m r
, , , are themselves time-varying, then the system
is known as linear time-varying system, and so the state equations are given by


( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
x A x B u
y C x D u
t t t t t
t t t t t
= +
= +


A more general form the above is

, )
( , )
( , )
( , , )
x f(x, u
x, u
x, u
y g x u
= =

(
(
(
=
t
f t
f t
t
n
1


This represents a class of nonlinear time varying state equations.

2.2 State Concepts

State: The state of a system is a mathematical structure containing a set of n variables x
1,
x
2

...x
n
(t), called the state variables such that knowledge of these variables at t=t
0
, together
with the input for t>t
0
completely determines the behavior of the sytem for any time t>t
0
.
There is a minimum set of state variables which is required to represent the system
accurately. The initial starting time is normally taken as zero.
Note: state variables need not be physically observable and measurable quantities (in
fact, in most cases they are not).
Example:

dx
dt a
x
a
u t x t x
x t e x
a
e u d
a
t
a
t t
+ = =
= +


}
1 1
1
0 0
0
1
0
( ) ( )
( ) ( )
( )
( ) t
t t
(2.3)
4246 Linear System
xu-week2
6
Here x(t) is the state variable, and given the input u(t) and the initial value of x(t)
at t= t
0
, x(t
0
) Eq(2.3) completely define the trajectory of x(t) for all time t>t
0
.

State Variable: The state variables of a dynamical system are the variables making up the
smallest set of variables that determine the state of the system. If at least n variables x
1
, , x
n
are
needed to completely describe the behavior of a dynamical system (so that once the input is given
for t t >
0
and the initial state at t=t
0
is specified, the future state of the system is completely
determined), then such n variables are a set of state variables.
As noted above, the state variables need not be physically measurable or observable quantities.
Variables that do not represent physical quantities and those that are neither measurable nor
observable can be chosen as state variables.

State Vector: If n state variable x
i
(t) , i=1,...n, are needed to completely describe the behavior
of a given system, then these n state variables can be considered as the elements or
components of the n-dimensional vector x(t). Such a vector x(t) is called a state vector.

State Space: State space is defined as the n-dimensional space in which the components of the
state vector (i.e., state variables) represent its' coordinate axes. Eg. phase plane.

State Trajectory: The path produced in the state space by the state vector x(t) as it
changes with the passage of time. Eg. phase trajectory

The first step in applying these definitions is the selection of the state variable, given a physical
system. NOTE that the state variables are NOT unique.


What is the relationship of a same system represented using different sets of state variables?

Now, the state of a system at any given time can be seen as a point in the state space. Suppose we
set up three coordinate systems (U, I, II). Let a , a , a
1 2 3
eR
3
be the unit vector of the axes of
coordinate system I and b , b , b
1 2 3
eR
3
be the unit vector of coordinate system II. Then the
point P can be described using coordinate I as




















O
1
U

O

I

II

x
1
x
2
x
3
x
1
_

x
2
_

x
3
_
P

4246 Linear System
xu-week2
7
| |
(
(
(

+ =
+ + + =
3
2
1
3 2 1 1
x
x
x
O
x x x O P O
3 2 1
3 2 1
a a a
a a a

Alternatively, P can also be described by using coordinate II as

| |
(
(
(

+ =
+ + + =
3
2
1
3 2 1
1
x
x
x
O
x x x O P O
3 2 1
3 2 1
b b b
b b b

The above equations show that
a
1
a
2
a
3
| |
x
1
x
2
x
3





(

(
(
(
= b
1
b
2
b
3
| |
x
1
x
2
x
3





(

(
(
(

or

| | | |
x
x
x
x
x
x
T
x
x
x
1
2
3
1
1
2
3
1
2
3

(
(
(
=

(
(
(
=

(
(
(

a a a b b b
1 2 3 1 2 3


provided that the inverse exists. The equation shows that the coordinate of a point can always be
obtained from another coordinate system through a nonsingular square matrix T! Extending the
argument to n dimension,

x Tx =

relates the coordinate of a point in one coordinate system to another. We now look at the effect of
a coordinate change when applied to the state-space model.


( ) ( ) ( )
( ) ( ) ( )
x Ax Bu
y Cx Du
t t t
t t t
= +
= +


Since x T x =
1
,

) ( ) ( ) ( ) ( ) (
) ( ) ( ) ( ) ( ) (
t t t t t
t t t t t
Du x CT Du Cx y
Bu x AT Bu Ax x T x
+ = + =
+ = + = =


or

) ( ) ( ) (
) ( ) (
1 1
t t t
t t
Du x CT y
Bu T x AT T x
+ =
+ =



Note that these two equations are the state space equations of the same system! In general, one
can define as many different coordinate system as can be by specifying a different T (as long as it
is nonsingular), it is obvious that there are many different state space representations of the same
4246 Linear System
xu-week2
8
system. In summary, the state-space representation of a system is non-unique and we have an
infinite choice of state vectors!

Example:

| |

x
x
x
x
x
x
1
2
1
2
1
2

(
=

(
+

(
=

(
1 2
0 2
0
1
1 0
u
y


Let

x
x
x
x
1
2
1
2

(
=

(
2 0
0 5

then,

| |

.
x
x
x
x
x
x
1
2
1
2
1
2

(
=

(
+

(
=

(
1
0 2
0
5
05 0
4
5
u
y


Since there are infinite representations of the same physical system, a natural question is whether
there are some representations that are more useful or more insightful than others. It turns out that
there are: eg controllable canonical forms, observable canonical forms and diagonal forms, as we
shall see later.

2.3 Selection of state variables

Consider the following SISO nth order system,



Now, if we know the values of all the initial conditions for y and its derivatives, then we can find
the future behaviour of the system completely. Recall the definition of states! Hence, we can
take y and all its' differentials as the state variables

We therefore, now define state variables as



then, we can rewrite the equation as:

y a y a y a y u
n
n
n ( ) ( )
+ + + + =
1
2 1

x y
x y
x y
n
n
1
2
1
=
=
=

( )

4246 Linear System
xu-week2
9


in matrix form, we get

( ) ( ) ( ) x Ax Bu t t t = +
where


A =

(
(
(
(
(
(
0 1 0 0
0 0 1 0
0 0 0 1
1 2 3

a a a a
n

Output is




Example: (from Ogata)



Choose


then,




x x
x x
x x
x a x a x u
n n
n n n
1 2
2 3
1
1 1
=
=
=
= +

y = 1 0 0 0 x
or
x y =c
T
y y y y u + + + = 6 11 6 6
x y
x y
x y
1
2
3
=
=
=

.
x x
x x
x x x x u
ie
1 2
2 3
3 1 2 3
6 11 6 6
=
=
= +
4246 Linear System
xu-week2
10

| |

x
x
x
x
x
x
u
y
x
x
x
1
2
3
1
2
3
1
2
3
0 1 0
0 0 1
6 11 6
0
0
6
1 0 0

(
(
(
=

(
(
(

(
(
(
+

(
(
(
=

(
(
(
(3.4)

Since state variables are not unique, someone else using a different representation can come up
with a different state variables that can describe the same system. Of course the solution though
will be the same.

Example: For the same system above, we can choose





so that


| |
(
(
(

=
(
(
(

+
(
(
(

(
(
(


=
(
(
(

3
2
1
3
2
1
3
2
1
0 0 1
6
0
0
6 10 0
1 0 1
0 1 0
x
x
x
y
u
x
x
x
x
x
x

(3.5)

Although equations (3.4) and (3.5) do not look the same, the solution is the same.

For the general differential equation:

) (
) ( ) (
) (
) ( ) ( ) (
0 1 0 1
1
1
1
t u b
dt
t du
b
dt
t u d
b t y a
dt
t dy
a
dt
t y d
a
dt
t y d
n
n
n
n
n
n
n
n
+ + + = + + + +



if we follow the same method to get the state equations, we will find that we would need the
derivatives of u(t) in the state equations. However, this will then not be in the standard format of
(3.2). Instead, there are other commonly used formulations for state equations. In such cases, the
state variables are chosen so that the matrices A, B, C, and D have particular forms. We call such
standard forms canonical forms. We illustrate one such canonical form using an example.

Example:

x y
x y
x y y
1
2
3
=
=
= +

x x
x x x
x x x u
1 2
2 3 1
3 3 2
6 10 6
=
=
= +
4246 Linear System
xu-week2
11
Given a system described by the following differential equation, find an appropriate state space
formulation.

) ( 2
) (
3 ) (
) (
2
) (
2
2
t u
dt
t du
t y
dt
t dy
dt
t y d
+ = + + (3.6)

If we take the Laplace Transform of (3.6) and assuming zero initial conditions, we get


2
( ) 2 ( ) ( ) 3 ( ) 2 ( ) s Y s sY s Y s sU s U s + + = +

so that the transfer function from U(s) to Y(S) is

G s
s
s s
( ) =
+
+ +
3 2
2 1
2


=
Y s
U s
( )
( )


We could rewrite this as:

Y s
s
s s
U s ( ) ( ) =
+
+ +
3 2
2 1
2






(this gives us back the nice form of the previous example)

Let


then we get,


and the state equation is



Also, the output is given by



Let X s
s s
U s ( ) ( ) =
+ +
1
2 1
2
+ + = s X sX X U
2
2
x x
x x x
1
2 1
=
= =
x x x u
2 2 1
2 + + =

x x
x x x U
1 2
2 2 1
2
=
= +
y t x t x t
x x
( ) ( ) ( ) = +
= +
3 2
3 2
2 1
4246 Linear System
xu-week2
12
| |

x
x
x
x
u
y
x
x
1
2
1
2
1
2
0 1
1 2
0
1
2 3

(
=

(
+

(
=

(




In general, for the general differential equation given by

) (
) ( ) (
) (
) ( ) ( ) (
0 1 0 1
1
1
1
t u b
dt
t du
b
dt
t u d
b t y a
dt
t dy
a
dt
t y d
a
dt
t y d
n
n
n
n
n
n
n
n
+ + + = + + + +



(Q: why the right hand side is at most order n?)

the transfer function is

1
1 1 0
1
1 1 0
1
1 1 1 1 0 0
1
1 1 0
( )
( )
( ) ( ) ( )

n n
n n
n n
n
n
n n n n n
n n n
n
b s b s b s b Y s
U s s a s a s a
b b a s b b a s b b a
b
s a s a s a

+ + + +
=
+ + + +
+ + +
= +
+ + + +



A simulation diagram for the above realization is

u(t)
a
n-1
a
n-2
a
0
b
n
b
n-1
b
1
b
0
} } }
x
n
x
n-1
x
1 x
2
1 n
x

y(t)
-
-
-


and a representation of the state equation is

4246 Linear System
xu-week2
13
u
x
x
x
a a a a
x
x
x
n
n n
n
(
(
(
(

+
(
(
(
(

(
(
(
(
(
(


=
(
(
(
(


1
0
0
1 0 0
0 0 0
0 1 0
2
1
1 2 1 0
2
1



| |x
1 1 0
=
n
c c c y +b
n
u

where
c
0
= b
0
a
0
b
n
c
1
= b
1
a
1
b
n
.

and c
n-1
= b
n-1
- a
n-1
b
n

This is known as the controller canonical form. In this form, the feedback coefficients a
i
only
and appears in the final state equation. The significance of the controller canonical form will be
make known later when you study controllability of a system. A simulation diagram of the
controller canonical form is given in Figure 2.1. (Sometimes this diagram is preferable to the one
given earlier because in this case, the output is taken directly from the states while earlier there is
a output from
n
x which has to be calculated.)


























Figure 2.1 Simulation Diagram for controllable canonical form


u(t)
a
n-1
a
n-2
a
0
b
n
c
n-1
c
1
c
0
} } }
x
n
x
n-1
x
1 x
2
1 n
x
y(t)
-
-
-
4246 Linear System
xu-week2
14
If we define
C B
A A
B C
D D
T
T
T
T
=
=
=
=
, then, we get another realization given by

( ) ( ) ( )
( ) ( ) ( )
x Ax Bu
y Cx Du
t t t
t t t
= +
= +


then we get the observable canonical form below:


| | u b
x
x
x
y
u
c
c
c
x
x
x
a
a
a
a
x
x
x
n
n
n n
n
n
n
+
(
(
(
(

=
(
(
(
(

+
(
(
(
(

(
(
(
(
(
(

=
(
(
(
(

2
1
1
1
0
2
1
1
2
1
0
2
1
1 0 0 0
1 0 0
0
1 0
0 0 1
0 0 0


The simulation diagram for the observable canonical form is shown in Figure 2.6.























Figure 3.6 Simulation Diagram for observable canonical form


c
0
} } }
1
c
1
c
2
b
n
-a
0
-a
1
-a
2
-a
n-1
c
n-1



y

u

4246 Linear System
xu-week2
15
An important realization is the diagonal form. It can be shown that the diagonal form is best from
the viewpoint of sensitivity, ie it will be not as sensitive to roundoff errors, truncation errors or the
finite word length in a computer.



The analog simulation for the diagonal realization is











































For Y s
B s
A s
U s
g
s
U s g b c
i
i
i i i
i
n
( )
( )
( )
( ),
( ) :
=
=

=
=


1
}
c
1
b
1

1
}
c
n
b
n

n
1/(s-
2
)
c
2
b
2
y
u
4246 Linear System
xu-week2
16
Diagonal forms are useful from the viewpoint of sensitivity and also in solving the equations.
This is because with state equations, the problem in solving is the coupling between the state
variables. Now in diagonal form, we only have a set of independent 1st order differential
equations and that can be solved easily. But it is not always possible to obtain a diagonal form. It
is only possible if and only if A has n linearly independent eigenvectors.

2.4 Relation between Transfer Function and State Equation representations

It would be reasonable to ask how the state space description, in time domain, is related to the
transfer function representation of a system. In this section, we will show the relationship
between the system matrices (A,B, C, D) and the transfer function. Since the transfer function
typically refers to a single-input-single output system, we will consider state-space representations
that are single-input-single-output, ie. for the case where B R C R D R
n n
e e e
1 1 1 1
, ,

Given a system with transfer function given by



and the state-space description given by


( ) ( ) ( )
( ) ( ) ( )
x t Ax t B t
Cx
= +
= +
u
y t t Du t (11.1)

From the state equation (11.1), taking the Laplace Transform, we get

(11.2)

Since transfer function is obtained with zero initial conditions, therefore, setting x(0)=0 and
rearranging, (11.2) becomes

(11.3)

Comparing (11.3) with Y(s)=G(s)U(s), we get


D B A sI C s G + =
1
) ( ) ( (11.4)

Note that since B R C R A R
n n n n
e e e
1 1
, , , therefore the product C sI A B R ( ) e
1 1 1

is a scalar.

We now take a closer look at equation (11.4). Since, in general, the inverse of a matrix H can be
expressed as

G s
Y s
U s
( )
( )
( )
=
sX s x AX s BU s
Y s CX s DU s
( ) ( ) ( ) ( )
( ) ( ) ( )
= +
= +
0
X s sI A BU s
and
Y s C sI A B D U s
( ) ( ) ( )
( ) ( ) ( )
=
= +

1
1
4246 Linear System
xu-week2
17

) det(
) ( adj
1
H
H
H =



where adj(H) refers to the adjoint of A, therefore the inverse of (sI-A) is given by


) det(
) ( adj
) (
1
A sI
A sI
A sI

=



From (11.4), we get

] ) det( ) ( adj [
) det(
1
) ( D A sI B A sI C
A sI
s G +

=
In the case of a SISO system, the expression ] ) det( ) ( adj [ D A sI B A sI C + is a polynomial in
s. Also, det(sI-A) is a polynomial and so we would get


) (
) (
) det(
) (
) (
s D
S N
A sI
S N
s G =

=

From classical control, the characteristic roots (or poles) of the system are the values of s such
that D(s)=0. Clearly this is also the same as the values of s such det(sI-A)=0. From this, we can
clearly see that the eigenvalues of A are the poles of the system G(s)! (Q: what does that imply in
terms of stability of the system?)

Example:
From the earlier example, we have the state equations:


| |

x
x
k
M
B
M
x
x
M
f
y
x
x
1
2
1
2
1
2
0 1 0
1
1 0

(
=

(
(

(
+

(
(
=

(


Using G s C sI A B D ( ) ( ) = +
1
, we get


(
(

=
(
(

=
M
B
s
M
k
s
M
B
M
k
s
s
A sI
1 1 0
0
0


( )
( )
sI A
s s
s
B
M
k
M
s
B
M
k
M
=
+ +
+

(
(
(
1
1
1








4246 Linear System
xu-week2
18
Example:
Given the state equations


( ) ( ) ( )
,
x x t A t Bu t
A B
= +
=

(
=

(
where
0 1
2 3
0
1


and
| |
( ) 3 1 ( ) y t t = x


then using , we get


| |
3 1
0 ( 1)( 2) ( 1)( 2)
( ) 3 1
2 1
( 1)( 2) ( 1)( 2)
3
( 1)( 2)
s
s s s s
G s
s
s s s s
s
s s
+ (
(
+ + + + (
(
=
(
(

(
+ + + +

+
=
+ +


As an exercise, check that the state equation from this transfer function is the same as above.
Note that the above is in controller canonical form.
Write out the observable canonical form of the transfer function, and compute the related transfer
function. It should be the same.

2.5 Notes:
The matrix (sI-A) is sometimes called the characteristic matrix of A. Its determinant,


is known as the characteristic polynomial of A, and its roots [
i
] are the eigenvalues or
characteristic values of A (recall that they are the poles of the system). An important
property of a(s) is that



This is called the Cayley-Hamilton theorem, which we will need to use later.

Example:
Given an A matrix A=[ 1 2; 0 3], show that it satisfies the Cayley-Hamilton theorem.

(

=
3 0
2 1
A
and

G s C sI A B D ( ) ( ) = +
1
a s sI A s a s a s a
s s s
n
n
n
n
( ) det( )
( )( ) ( )
= = + + + +
=
1
2 1
1 2


a A A a A a I
n
n
n
( ) = + + + =
1
1
0
4246 Linear System
xu-week2
19
(


=
(

=
3 0
2 1
3 0
2 1
1 0
0 1
) (
s
s
s A sI

3 4 ) 3 )( 1 ( ) det( ) (
2
+ = = = s s s s A sI s a

and so

(

+
(

= + =
1 0
0 1
3
3 0
2 1
4
3 0
2 1
3 0
2 1
3 4 ) (
2
I A A A a

0
1 0
0 1
3
3 0
2 1
4
9 0
8 1
=
(

+
(



We have stated earlier that state-space equations are not unique and so there are infinite state-
space representations of a physical system. However, there is only one transfer function
representation of the same system. Hence in the next section, we will now show that no matter
what state-space forms describing a system are found, the eigenvalues of the state space equations
will be the same. We call this the invariant of eigenvalues under similarity transform.


2.6 Invariant of eigenvalues under similarity transform

Given ( ) ( ) ( ) t t t = + x Ax Bu

Let = x Px (Similarity Transform)

Now for P non-singular, we have


-1 -1
P x = AP x +Bu



i.e.,
-1
x = PAP x + PBu




To show invariant of eigenvalues (ie for different state space representation of the same system,
the eigenvalues are the same), we need to show that are identical.
To do that, we consider




I A and I PA P
-1

I PA P PA
P I A
P I A
P I A
P I A
I A
=
=
=
=
=
=
P P P
P
P
P
P
-1 -1 -1
-1
-1
-1
-1
( )
4246 Linear System
xu-week2
20
Therefore, the eigenvalues are invariant under a similarity transform



Appendix: Inverse of Matrix
(the following taken from www.mathwords.com)
Cofactor
The determinant obtained by deleting the row and column of a given element of a matrix
or determinant. The cofactor is preceded by a +or sign depending whether the element
is in a +or position.




Cofactor Matrix - Matrix of Cofactors
A matrix with elements that are the cofactors, term-by-term, of a given square matrix.





4246 Linear System
xu-week2
21

Adjoint
The matrix formed by taking the transpose of the cofactor matrix of a given original
matrix. The adjoint of matrix A is often written adj A.

Example: Find the adjoint of the following matrix:

Solution: First find the cofactor of each element.
As a result the cofactor matrix of A is

Finally the adjoint of A is the transpose of the cofactor matrix:



Inverse of matrix
A
-1
= (adjoint of A) or A
-1
= (cofactor matrix of A)
T

4246 Linear System
xu-week2
22
Example: The following steps result in A
-1
for .
The cofactor matrix for A is , so the adjoint is
. Since det A =22, we get

4246 Linear System
xu-week3.docx
1
3 Solutions to State Space Models

In this week we will discuss the methods to solve linear systems represented using state-space
models. We will also address the issue of handling non-linearity in modeling.

3.1 Linearization

The utility of the linear-time-invariant (LTI) model goes beyond systems that are described by
linear model. Although most physical systems encountered in the real world are nonlinear, linear
techniques can still be used to analyze the local behaviour of a nonlinear system about small
deviations about an operating point. While this may appear restrictive, in practice it is not too bad
as most control systems are designed to maintain variables close to a particular operating point
anyway. In order to obtain a linear model from a nonlinear system, we introduce a linearization
technique based on Taylor series expansion of a function.

Specifically, if a nonlinear time invariant system is given by

( , ) x f x u =
We can linearize about any given operating point using Taylors series expansion about a
particular operatin point. Suppose we wish to find the linear equation about the operating point
(x
0
, u
0
), then at the operating point, we get

( , ) x f x u
0 0 0
= (3.1.1)

Consider
x x x
u u u
0
0
= +
= +
o
o


then


( , )
x x x
f x x u u
0
0
= +
= + +
o
o o


Expanding using Taylors series expansion, we get,

( , )
, ,
x x f x u
f
x
x
f
u
u
0 0
x u x u
+ = + + o
c
c
o
c
c
o
0
0 0 0 0

and so
o
c
c
o
c
c
o
, ,
x
f
x
x
f
u
u
x u x u
= +
0 0 0 0
(3.1.2)

Equation (3.1.2) is the state space equation with A corresponding to
c
c
f
x
x u
0 0
,
. i.e.

4246 Linear System
xu-week3.docx
2
A =
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
f
x
x , u
x , u
0 0
0 0
=

(
(
(
(
(
(
(
f
x
f
x
f
x
f
x
f
x
f
x
f
x
f
x
n
n
n n n
n
1
1
1
2
1
2
1
2
1 2


and

B =
0 0
0 0
u , x
u , x
u
f
(
(
(
(
(
(
(
(

=
n
n n n
n
n
u
f
u
f
u
f
u
f
u
f
u
f
u
f
u
f
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c

2 1
2
1
2
1
2
1
1
1


Example: Inverted Pendulum

As an example, consider the classical inverted pendulum problem. The system consists of a cart
with an inverted pendulum attached. This system is also commonly known as pole-balancer
because the problem of applying a force u(t) to keep the pendulum upright is similar to that of
balancing a pole on one's hand. It has more practical interpretation in terms of launching of a
rocket but we will look at this system because it can illustrate certain control concepts very
clearly.













Figure Pole Balancing cart system

Define the center of gravity of the mass as (x
G
, y
G
), then,
x
G
= x + l sin u
y
G
= l cos u

Applying Newtons law in the x -direction, we get

M
d x
dt
m
d x
dt
u
G
2
2
2
2
+ =
ie.
Force u(t)
M
m
l
u
P
x
y
4246 Linear System
xu-week3.docx
3
M
d x
dt
m
d x l
dt
u
2
2
2
2
+
+
=
( sin ) u
(3.1.3)
Since

d
dt
d
dt
d
dt
d
dt
sin (cos )

sin (sin )

(cos )

cos (sin )

cos (cos )

(sin )

u u u
u u u u u
u u u
u u u u u
=
= +
=
=
2
2
2
2
2
2


Eq. (3.1.3) can be written as

( ) (sin )

(cos )

M m x ml ml u + + = u u u u
2
(3.14)

The equation of motion of the mass m in the y direction will also contain terms related to the
motion of the mass in the x direction. Instead, we consider the rotational motion of the mass m
around point P. Applying Newtons second law to the rotational motion, we get

m
d x
dt
l m
d y
dt
l mgl
G G
2
2
2
2
cos sin sin u u u =
(3.15)

Substituting for x
G
and y
G
, we get

m
d x l
dt
l m
d l
dt
l mgl
2
2
2
2
( sin )
cos
( cos )
sin sin
+

(
=
u
u
u
u u

m x l l l m l l l mgl [ (sin )

(cos )

] cos [ (cos )

(sin )

] sin sin + = u u u u u u u u u u u
2 2


Simplifying by using cos
2
+ sin
2
= 1, we get

mxl ml ml mgl cos (cos )

(sin )

sin u u u u u u + + =
2 2 2 2
or

mx ml mg cos

sin u u u + = (3.16)

The nonlinear equations of motion are then given by Eqs. (3.14) and (3.16), i.e.

( ) (sin )

(cos )

M m x ml ml u + + = u u u u
2

mx ml mg cos

sin u u u + =



4246 Linear System
xu-week3.docx
4

4246 Linear System
xu-week3.docx
5


4246 Linear System
xu-week3.docx
6

4246 Linear System
xu-week3.docx
7













4246 Linear System
xu-week3.docx
8

u
Ml
M
x
Ml
g m M
M
mg
x o o o
(
(
(
(
(
(

+
(
(
(
(
(
(

=
1
1
0
0
0 0
) (
0
0 0 0
1 0 0 0
0 1 0 0


4246 Linear System
xu-week3.docx
9
3.2 Solution of time-invariant state equation


Consider the scalar homogeneous differential equation

(7.1)

Assume the solution of the form



Substitute in (7.1) to get



Now, this must hold for all t, so equating the coefficients, we get




At t=0, x(0)=b
0
, so that we get


As an exercise, substitute back this into (7.1) to check it indeed is the solution.

Now, we will use a similar method to try and solve the state equation. Consider

) ( ) ( t A t x x = where x: n-dimensional vector
A: n by n matrix

By analogy with the scalar case, we can assume the solution in the form of a vector power series
in t, or

+ + + + =
k
t t t t
k 2 1 0
b b b b x
2
) (

By substituting for ) (t x in the state equation, we get
) ( 3 2
2 1 2
3
+ + + + = + + + +
k k
t t t A t k t t
k 2 1 0 k 2 1
b b b b b b b b


This must hold for all t, so

x ax =
x t b b t b t
k
k
( ) = + + + +
0 1
b b t kb t
a b b t b t
k
k
k
k
1 2
1
0 1
2 + + + +
= + + + +

( )
b ab
b ab a b
b a b
k k
k
1 0
2
1
2 1
1
2
2
0
1
0
=
= =
= =
!
x t at a t a t x
x t e x
k
k k
at
( ) ( ) ( )
( ) ( )
! !
= + + + + +
=
1 0
0
1
2
2 2
1
4246 Linear System
xu-week3.docx
10

0 k
0 1 2
0 1
b b
b b b
b b
k
A
k
A A
A
!
1
2
1
2
1
2
= =
= =
=




At t=0,
0
b x = ) 0 ( ,
) 0 ( )
!
1
! 2
1
( ) (
2 2
x x + + + + + =
k k
t A
k
t A At I t

We call the power series in the parenthesis the matrix exponential because of its similarity to the
infinite power series for a scalar exponential. ie.


At k k
e t A
k
t A At I = + + + + +
!
1
! 2
1
2 2


Therefore, the solution to the state equation is

) 0 ( ) ( x x
At
e t =

where
At
e is also known as the state transition matrix





3.3 Properties of State Transition Matrix

1.


The convergence of the series can be proven for any finite t.That is,
At
e always
exists.


2.

Proof:

e
A t
j
I At
At
n
j j
A t
n
= = + + +

lim
!
!
2 2
2
0
d
dt
e Ae e A
At At At
= =
4246 Linear System
xu-week3.docx
11
At
At
Ae
t
A
t
A At I A
t
A
t
A t A A
t
A
t
A At I
dt
d
e
dt
d
=
+ + + + =
+ + + + + =
+ + + + =
]
! 3 ! 2
[
]
! 3 ! 2
0 [
]
! 3 ! 2
[ ] [
3
3
2
2
3
4
2
3 2
3
3
2
2




3.
As At s t A
e e e =
+ ) (

Proof:


=

=
=
0 0
! !
k
k k
k
k k
As At
k
s A
k
t A
e e

By direct expansion, well get

) (
2 2
2
2
2
2
2
2
3
3
2
2
3
3
2
2
)
! 2
2
( ) (
! 2 ! 2
) (
)
! 3 ! 2
)(
! 3 ! 2
(
s t A
As At
e
s ts t
A s t A I
ts A
s
A
t
A s t A I
s
A
s
A As I
t
A
t
A At I e e
+
=
+
+ +
+ + + =
+ + + + + + =
+ + + + + + + + =




More rigorous derivation:
0 0
0 0
0
( )
! !

!( )!
( )

!

k k k k
At As
k k
i k i
k
k i
k
k
k
A t s
A t A s
e e
k k
t s
A
i k i
t s
A
k
e

= =

= =

=
+
| || |
=
| |
\ .\ .
| |
=
|

\ .
+
=
=



4. exp At is nonsingular and [ exp At ]
-1
= exp ( -At)

Proof:
Since
2 1 2 1
) ( At At t t A
e e e =
+
, therefore if we let t t =
1
, and t t =
2
, then


4246 Linear System
xu-week3.docx
12
At At
At At
At At t t A
e e e i
e e I
e e e


=
=
=
1
) (
] [ . .


Since
At
e

always exists, therefore inverse of e


At
always exists and so e
At
is nonsingular.


5.
Bt At t B A
e e e =
+ ) (
if AB=BA

Bt At t B A
e e e =
+ ) (
if AB=BA
Proof:

+ + + + + + + =
+
! 3
) (
! 2
) ( ) (
3
3
2
2 ) (
t
B A
t
B A t B A I e
t B A
(4.3.1)


! 3 ! 2 ! 2 ! 3
! 2 ! 2
) (
)
! 3 ! 2
)(
! 3 ! 2
(
3
3
3
2
3
2
3
3
2
2 2
2
2
3
3
2
2
3
3
2
2
t
B
t
AB
t
B A
t
A
t
B ABt
t
A t B A I
t
B
t
B Bt I
t
A
t
A At I e e
Bt At
+ + +
+ + + + + + =
+ + + + + + + + =
(4.3.2)
Subtracting (4.3.2) from (4.3.1), we get

+ + + + + =
+
! 3
) 2 2 (
! 2
) (
3
2 2 2 2
2
) (
t
AB B A BAB A B ABA BA
t
AB BA e e e
Bt At t B A


so that if AB=BA (this is called A and B commute), then the right hand terms vanish and so

Bt At t B A
e e e =
+ ) (


3.4 Solution of inhomogenous state equation (ie. with input)

Consider the scalar case,



Integrating w.r.t t, we get

[ ]
. . [ ( )]
x ax bu
x ax bu
e x ax e bu
i e
d
dt
e x t e bu
at at
at at
= +
=
=
=


4246 Linear System
xu-week3.docx
13

}

+ =
t
a at
d bu e x t x e
0
) ( ) 0 ( ) ( t t
t


}

+ =
t
t a at
d bu e x e t x
0
) (
) ( ) 0 ( ) ( t t
t


The former term is the free response (zero input response) and the latter term known as the forced
response (zero state response).

We will again extend the result to the matrix case. Consider the state equation,



Following the scalar case, we get



Integrating from 0 to t,


0
( ) (0) ( )
t
At A
e x t x e Bu d
t
t t

= +
}



}

+ =
t
t A At
d u B e x e t x
0
) (
) ( ) 0 ( ) ( t t
t

(4.4.1)


3.5 How to find e
At

?

Computing e
At
by summing up infinite terms is impossible. So we discuss how to compute it
more conveniently. In this section, we illustrate the method using inverse Laplace transforem.

Again we will look at the scalar case to get an idea of what to do. Consider the scalar 1st order
differential equation,



( ) ( ) ( )
:
:
: tan
: tan
x t Ax t Bu t
where
x n vector
u m vector
A n n cons t matrix
B n m cons t matrix
= +

1
1
[ ]
. . [ ( )]
x Ax Bu
x Ax Bu
e x Ax e Bu
i e
d
dt
e x t e Bu
At At
At At
= +
=
=
=


x ax =
4246 Linear System
xu-week3.docx
14
Taking the Laplace Transform, we get


1
( ) (0) ( )
(0)
( )
( ) (0)
sX s x aX s
x
X s
s a
s a x

=
=

=



Taking the Inverse Laplace Transform, we get



Compare with the solution we obtained earlier, ie



Hence, we get



Similarly, for the matrix case,



It can be shown that,



Hence, we have just shown that




The importance of this equation is that it provides a convenient means to compute the matrix
exponential: compute
1
( ) sI A

first, then take inverse Laplace transform (on each of its entries).



For the case of the state equation with input,we get

x t L s a x ( ) {( ) } ( ) =
1 1
0
x t e x
at
( ) ( ) = 0
e L s a
at
=
1 1
{( ) }
X s sI A x
x t L sI A x
( ) ( ) ( )
( ) {( ) } ( )
=
=


1
1 1
0
0
( )
{( ) }
!
sI A
I
s
A
s
A
s
L sI A I At
A t
e
At
= + + +
= + + +
=


1
2
2
3
1 1
2 2
2
L sI A e
At
=
1 1
{( ) }
4246 Linear System
xu-week3.docx
15


From the previous result for e
At
, we get


X s L e x L e BU s
At At
( ) { } ( ) { } ( ) = + 0


Taking the inverse Laplace Transform,



x(t) = e
At
x(0) + e
A(t t)
Bu(t)dt
0
t
}
(4.4.2)





If the initial time is not zero but at t
0
, then the solution becomes



x(t) = e
A(t t
0
)
x(t
0
) + e
A(t t)
Bu(t)dt
t
0
t
}
(4.4.3)
We can see this because from (4.4.2), the solution at time t
0
is given by



x(t
0
) = e
At
0
x(0) + e
A(t
0
t)
Bu(t)dt
0
t
0
}

so that



x(0) = e
At
0
x(t
0
) e
At
0
e
A(t
0
t)
Bu(t)dt
0
t
0
}

But the solution at time t for zero initial condition is given by (4.4.1)



x(t) = e
At
x(0) + e
A(t t)
Bu(t)dt
0
t
}

Therefore, substituting for x(0), we get


x(t) = e
At
(e
At
0
x(t
0
) e
At
Bu(t)dt
0
t
0
}
) + e
A(t t)
Bu(t)dt
0
t
}
x(t) = e
A(t t
0
)
x(t
0
) + e
A(t t)
Bu(t)dt
t
0
t
}

Another way to think of it is that if the intial time is t
0
, consider some one (observer 2) else who
has a watch pointed at zero. From the view point of observer 2, the intial value is x(t
0
), and the
system will evolve for a time t-t
0
. Solving the equation of observer 2, one get (4.4.3). Notice that
the system is independent to the observer.


( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
x t Ax t Bu t
sX s x AX s BU s
sI A X s x BU s
X s sI A x sI A BU s
= +
= +
= +
= +

0
0
0
1 1
4246 Linear System
xu-week3.docx
16
Example:

Solve u
x
x
x
x
(

+
(

=
(

1
0
2 1
1 0
2
1
2
1



Solution:


(

=
2 1
1 0
0
0
s
s
A sI


(

+
=
2 1
1
s
s


Hence we get


(

+
+ +
=

s
s
s s
A sI
1
1 2
1 2
1
) (
2
1



(
(
(
(

+ +
+

+
+
=
2 2
2 2
) 1 ( ) 1 (
1
) 1 (
1
) 1 (
2
s
s
s
s s
s


Therefore, using the Inverse Laplace Table,


(
(

+
= =



t t
t t
At
e t te
te e t
A sI L e
) 1 (
) 1 (
} ) {(
1 1


and so
t t
t
t
t
t
d u
e t
e t
x
e t te
te e t
t x
t
t
t
t t
t t
) (
)] ( 1 [
) (
) 0 (
) 1 (
) 1 (
) (
0
) (
) (
}
(
(



+
(
(

+
=








3.6 Other methods to compute
At
e

It was shown previously that
At
e can be obtained using the Inverse Laplace Transform. This is
the most common way to find
At
e in closed-form, i.e.

( ) } {
1 1
= A sI L e
At


Other methods are as follows:

3.6.1 Series expansion
4246 Linear System
xu-week3.docx
17

Since
At
e was defined as an infinite series, that can be used to compute
At
e to any degree of
accuracy required. This is used in most computer code (MATLAB for example). Recall that



Since the series converges,
At
e can be approximated by evaluating up to N terms only.

3.6.2 Using similarity transform

If we can transform the matrix A into either a diagonal or Jordan (discuss later) canonical form,
then
At
e can be easily evaluated. We shall first consider the case where A has only distinct
eigenvalues. In that case, A can be transformed into a diagonal matrix using similarity transform.
If A has repeated eigenvalues, then it may not always be able to be diagonalized, but it may be
transformed into a form called the Jordan canonical form using similarity transform.

Case 1: Matrix A is diagonalizable

Consider a diagonal matrix A where


(
(
(
(

= A
n

0 0
0
0
0 0
2
1



We will now show that it is possible to obtain A from matrix A by a similarity transform, i.e. we
will show that it is possible to get A =
1
PAP .

Similarity transform:
Let A =
1
PAP , then premultipy by P
-1
(assuming that the inverse exists) on both side to get

A =
1 1
P AP

or
| | | |
1
2
0 0
0
0
0 0
n
A

(
(
(
=
(
(

1 2 n 1 2 n
c c c c c c

where c
I
are the columns of P
-1
then

| | | |
1 2 n
A A A =
1 2 n 1 2 n
c c c c c c

It is easy to see that this is equivalent to the following set of equations



Ac
1
=
1
c
1

e
A t
j
I At
At
n
j j
A t
n
= = + + +

lim
!
!
2 2
2
0
4246 Linear System
xu-week3.docx
18


Ac
2
=
2
c
2
(4.7.2.1)

and so on.

But, recall the definition of eigenvector: Any nonzero vector x satisfying Ax = x is called an
eigenvector of A associated with the eigenvalue . Hence, from the equation above, we can see
that c
1
is the eigenvector associated with eigenvalue 1

, c
2
is the eigenvector associated with
eigenvalue 2

and so c
i
is the eigenvector associated with eigenvalue i

. This shows that by


selecting the eigenvectors as columns of the P
-1
matrix, and if the n eigenvectors are independent
(which will be the case if the eigenvalues are unique), then it is possible to diagonalize the matrix
A.




We can use similarity transform to find
At
e as we will now show.

Consider the state space equation


A Bu
y C Du
= +
= +
x x
x


where the solution is given by



x(t) = e
At
x(0) + e
A(t t)
Bu(t)dt
0
t
}
(4.7.2.2)

Using the P defined earlier, if we let

x = Px, then


1
1
PAP PBu
y CP Du

= +
= +
x x
x


We have shown earlier that A =
1
PAP , and so we get


Bu
y C Du
= A +
= +
x x
x

The solution to this state equation would be



x (t) = e
At
x (0) + e
A(t t)
B u(t)dt
0
t
}
(4.7.2.3)
and using

x = Px, we get



x(t) = P
1
e
At
Px(0) + P
1
e
A(t t)
B u(t)dt
0
t
}
(4.7.2.4)

Comparing (4.7.2.4) with (4.7.2.2), we can see that

P e P e
t At A
=
1

4246 Linear System
xu-week3.docx
19

Since Ais diagonal, i.e.


(
(
(

= A
n

0
0
1


and


(
(
(
(
(

=
A
t
t
t
t
n
e
e
e
e

0 0
0
0
2
1



At
e can be easily evaluated as

P
e
e
e
P e
t
t
t
At
n
(
(
(
(
(

0 0
0
0
2
1
1



Note: From (4.7.2.4), if we assume that the input u(t) is zero, then we get




x(t) = P
1
e
At
Px(0)
or


x(t) = P
1
e
At
x (0)

so that

| |
1
2
1
2
(0) 0
(0)
( )
0
(0) 0 0
n
t
t
t
n
x e
x e
t
x e

( (
( (
( (
=
( (
( (

1 2 n
x c c c

i.e.
1 2
1 2
( ) (0) (0)
t t
t e x e x

= + +
1 2
x c c

This shows that the solution x(t) is a combinations of the responses ) 0 (
i
t
i
x e c
i

and hence is a
combination (superposition) of the eigenmodes
t
i
e

. We will discuss this later in this chapter.




Example:

4246 Linear System
xu-week3.docx
20
Given
(

=
2 0
1 0
A , find
At
e using the diagonalization method.

Solution:

The first thing we need to do is to find the eigenvalues. This can be found by solving the
characteristic polynomial det(sI-A)=0.

0 ) 2 (
2 0
1
) det( = + =
+

= s s
s
s
A sI

hence the eigenvalues are s=0, -2.

Next, we need to find the eigenvectors associated with the eigenvalues. Considering s=0, we need
to seek solution of x such that

(0I-A)x=0;

i.e. 0
2 0
1 0
2
1
=
(


x
x


and so x
1
=k, where k is a constant and x
2
=0. Normalizing, we get the eigenvector associated with
s=0 as x=[1 0]
T
.

Similarly for the other eigenvalue,

(-2I-A)x=0

i.e. 0
0 0
1 2
2
1
=
(


x
x


so that 0 2
2 1
= + x x or
1 2
2x x = . Hence the eigenvector associated with s=2 is given by
x=[1 -2]
T
, or if we normalized it, we get


(
(

=

5
2
5
1
x

Hence, using the eigenvectors as columns of the matrix P
-1
, we get


(
(

5
2
0
5
1
1
1
P

and
(
(

=
2
5
0
2
1
1
P

4246 Linear System
xu-week3.docx
21
therefore, since P e P e
t At A
=
1
, we get


(
(

(
(

(
(

=

2
5
0
2
1
1
0
0
5
2
0
5
1
1
2
0
t
t
At
e
e
e


(
(


=
(
(

(
(

t
t
t
t
At
e
e
e
e
e
2
2
2
2
0
) 1 (
2
1
1
2
5
0
2
1
1
5
2
0
5
1
1


end




Example 2:
Given A = x x where
(

=
3 1
2 0
A , find x(t) for the intial conditions [1 1]
T
and [2 1]
T

respectively.

Solution:

The eigenvalues of the A matrix are s=-2,-1 and the associated eigenvectors are (not normalized)



c
1
=
1
1



(

(
and c
2
=
2
1



(

(
(notice conincide with the initial conditions)

Hence we form


(

1 1
2 1
1
P

and so


(

=
1 1
2 1
P

Since ) 0 ( ) (
1
x e P t x
t A
= or

x(t) =c
1
e

1
t
x
1
(0) +c
2
e

2
t
x
2
(0), i.e. we get

) 0 (
1
2
) 0 (
1
1
) (
2 1
2
x e x e t
t t
(

+
(

= x

4246 Linear System
xu-week3.docx
22
If
(

=
1
1
) 0 ( x , then
(

=
(

=
0
1
1
1
1 1
2 1
) 0 ( x and so


t
e t
2
1
1
) (

(

= x

If
(

=
1
2
) 0 ( x , then
(

=
(

=
1
0
1
2
1 1
2 1
) 0 ( x , and so


t
e t

(

=
1
2
) ( x
Hence we can conclude that if the initial point lies on the eigenvector, it will remain on that line
forever. A phase plane plot (x
2
vs x
1
) for the two initial condistions is shown in the figure below.




















For arbitrary initial points, a series of phase plots can be found as shown below:

















x
2
x
1
(2,1)

(1,1)

x
2
4246 Linear System
xu-week3.docx
23





Example 3:

Given
(



=
3 2
1 2
A ,find the phase portrait.

Solution (as an exercise, please fill out the details):

The eigenvalues of the A matrix are s=-1,-4 and the associated eigenvectors are (not normalized)


(

=
(

=
2
1
1
1
2 1
c and c

and the corresponding phase-plane plot is




Case 2: Matrix A is not diagonalizable

We will not be going into the details of this case for this course. Suffice to say that in case where
A has repeated eigenvalues, then A may or may not be diagonalizable. In such cases, it can be
shown that thebest one can do is to reduce the matrix A to a form known as the Jordan canonical
form which has the following structure:
x
2
x
1
4246 Linear System
xu-week3.docx
24


(
(
(
(
(
(

=
1
1
1
1
0 0
1
0 0
1 0
0 0 1

J

The above shows the Jordan form for the case where the eigenvalues are repeated n times. The
matrix
Jt
e is then given by


(
(
(
(
(
(
(
(
(

t
t
n
t t
t
n
t t t
Jt
e
e
n
t
te e
e
n
t
e
t
te e
e
1
1 1 1
1 1 1 1
0 0
0
)! 2 (
0
)! 1 ( ! 2
2
1 2



{ Review:

Examples of eigenvalues and eigenvectors

Find the eigenvalues and eigenvectors of the matrix
(


=
4 1
2 3
A

Solution:

Using the determinant rule,


10 7
2 ) 4 )( 3 (
4 1
2 3
2
+ =
=

=
s s
s s
s
s
A sI


so that 0 = A sI gives the eigenvalues as s
1
=2, and s
2
= 5.

To find the eigenvectors associated with the eigenvalues, first consider the eigenvalue s
1
=2. To
determine the eigenvector, we must find x such that

x x
1
s A =

ie. 0
2 1
2 1
) (
1
=
(

= x x A I s
4246 Linear System
xu-week3.docx
25
and therefore
(

=
1
2
o x is a solution for any scalar o. We can choose the solution o=1 or the
normalized solution
(
(
(

=
5
1
5
2
x

Similarly, the eigenvector associated with s
2
=5 is given by
(

=
1
1
| x for any scalar |. We can
choose the solution |=1 or the normalized solution
(
(
(

=
2
1
2
1
x
It is understood that any scalar multiples of such normalized eigenvectors will also be an
eigenvector.

}


Example:

Consider the matrix



A =
1 3 2
0 4 2
0 3 1





(

(
(
(

Using the determinant rule,



sI A =
s 1 3 2
0 s 4 2
0 3 s +1
= (s 1)[(s 4)(s +1) +6]
= (s 1)(s
2
3s +2)
= (s 1)
2
(s 2)


so that 0 = A sI gives the eigenvalues as s
1
=1, and s
2
= 2.

To find the eigenvectors associated with the eigenvalues, first consider the eigenvalue s
1
=1. To
determine the eigenvector, we must find x such that



Ax = x

ie.

sI A | |x =
0 3 2
0 3 2
0 3 2





(

(
(
(
x = 0

4246 Linear System
xu-week3.docx
26
i.e.

3x
2
+2x
3
=0
We get 1 equation (i.e. 1 constraint) with 3 unknowns and so we can get 2 linearly independent
eigenvectors such as:


1 0 0
| |
T
and
1 2 3
| |


For eigenvalue s
2
= 2, we get the eigenvector

1 1 1
| |
T
and so the matrix can be diagonalized.
(Prove this!)

Example:

Consider the matrix



A =
2 1 2
0 2 1
0 0 1





(

(
(
(

The eigenvalues are: s
1
=1, and s
2
= 2 (solving
2
( 2) ( 1) 0 s s = ).

Eigenvector associated with s
1
=1 is given by:



sI A | |x =
1 1 2
0 1 1
0 0 0





(

(
(
(
x = 0

so that the eigenvector is

1 1 1
| |
T


Eigenvector associated with s
1
=2 is given by:



sI A | |x =
0 1 2
0 0 1
0 0 1





(

(
(
(
x = 0

so that the eigenvector is

1 0 0
| |
T


For this example, there are only one linearly independent eigenvector of the repeated eigenvalue
s
1
=2, hence it is not diagonalizable. Instead, we can only convert it into Jordan canonical form

2 1 0
0 2 0
0 0 1
(
(
(
(





4246 Linear System
xu-week3.docx
27
Example:

Consider the matrix

A =
3 2
4 1



(

(

Characteristics equation is given by:



sI A =
s 3 2
4 s +1
= s
2
2s +5


so that 0 = A sI gives the eigenvalues as

s
1,2
=
2 i 16
2
=1 2i
.

Eigenvectors associated with the eigenvalue s
1
= 1+2i is given by:



(s
1
I A)x =
2 +2i 2
4 2 +2i



(

(
x = 0

or



(2 +2i)x
1
+2x
2
= 0
4x
1
+(2 +2i)x
2
= 0


Note that the 2 equations are the same since

(2+2i) (2+2i) = 8

So that the eigenvector is given by

x =
1
1i



(

(
.
The other eigenvector is

x =
1
1+i



(

(



3.7 Modes of the System

Consider the time invariant linear system


0
) 0 ( , x x Ax x = =
where
n n n
R A R x

e e , .

For simplicity, let use assume that all the eigenvalues of A are distinct. Let the
eigenvectors of A be
n
p p ,...,
1
associated with the eigenvalues
n
,...,
1
. As these
eigenvectors are linearly independent, they form a basis.

Let us define the nonsingular matrix

PeR
nn
as
4246 Linear System
xu-week3.docx
28

| |
1
1 2 n
P p p p

=
where the columns of P
-1
are the eigenvector of A. Let us also denote

PeR
nn
as

1
2
n
q
q
P
q
(
(
(
=
(
(


where
n
q q ,...,
1
are the row vectors of

P. Therefore,



q
i
p
j
=
1 i = j
0 i = j






We know that

0
) ( x e t x
At
= for 0 > t , and


x(t) = P
1
e
At
Px
0
, for 0 > t ,

where ). ,..., , (
2 1 n
diag A = Hence, the solution of x(t) can be rewritten as


0
1
) ( x q p e t x
n
i
i i
t
i

=
=

, for 0 > t ,
or

=
=
n
i
i i
t
p e t x
i
1
) (

, (5.1)
where
0
x q
i i
= , i=1,..,n.

(1) The above (5.1) shows that the response of the system is a composition of motions along the
eigenvectors of A. We call such a motion a mode or eigenmode of the system. A particular
mode of the system can be excited by choosing the initial state
0
x as a component along the
corresponding eigenvector.

(2) Each mode of the system varies in time according to the exponential function of
t
i
e

.

(3) An arbitrary initial condition will in general excite all n modes of the system. The amount of
excitation of each mode depends on the value of
0
x q
i i
= .

(4) For example, suppose
1 0
kp x = where k is a constant, then
1
1
) ( p ke t x
t
= .
This implies that the solution x(t) consists of only the response of only the first mode. In state
space, this response can be seen to move along the eigen direction of
1
p . The other modes
are suppressed.


Example:
Given a system x x
(


=
5 4
1 0

4246 Linear System
xu-week3.docx
29
The eigenvalues of A are 1 and 4 respectively. The eigenvectors are
(

1
1
and
(

4
1
.
Therefore,


P
1
=
1 1
1 4



(

(
and

P =
q
1
q
2



(

(
=
4
3
1
3
1
3
1
3





(

(
(
(

Therefore,
2 2 1 1
2 1
) ( p e p e t x
t t
+ = where

(

=
20
10
1 1
x
x
q and
(

=
20
10
2 2
x
x
q and

20 10 1
3
1
3
4
x x + = and
20 10 2
3
1
3
1
x x + = . Thus

t t
e x x e x x t x
4
20 10 20 10 1
)
3
1
3
1
( )
3
1
3
4
( ) (

+ + = and
t t
e x x e x x t x
4
20 10 20 10 2
)
3
1
3
1
( 4 )
3
1
3
4
( ) (

+ + + =


4246 Linear System
xu-week4.docx
1
4 Controllability and Observability

In this week, we are interested in qualitative features of state-space representation of
system. Specifically, we will be discussing two ideas known as controllability and
observability of a system.

4.1 Introduction and Motivation

While many features in state-space analysis of system have their parallels in frequency
domain analysis or classical analysis, Controllability and Observability are unique
features of state-space analysis. These ideas were first introduced by E.G.Gilbert and R.F.
Kalman in the early 1960s. They give a clear explanation as to why cancellation of
unstable poles are undesirable even if perfect cancellation is possible. ( c.f. the very first
example given in the introduction to state-space system ). Using these ideas, it can be
shown that the overall system is unstable although the transfer function of the system is
stable. Hence, the idea of controllability and observability is an important concept in the
state-space analysis of the system. Before we proceed with the definitions of
controllability and observability, let us look at some motivating examples.

Example 1 : Consider

=
=
u x
u x
2
1

,
If ) 0 ( ) 0 (
2 1
x x = , then for all time t and all control u. So, there are no
possible u and t to make say
1 2
( ) ( ) 1 x t x t = + .

Example 2 : Consider

=
=
=
2
2
2 1
0
x y
x
x x


The above shows that y(t) will always be a constant. Hence, observing y(t) does not tell us
what is doing.

A more interesting example is one given by the following diagram. It consists of two carts
coupled by a passive spring. In addition to the spring force, an active control force f is to
be provided by some means within the system, so that f acts on both cart 1 and 2.

Example 3.
x 1
x 2
m1 m2
f f
k

Figure: Example of two-cart system
x t x t
1 2
( ) ( ) =
x
1
4246 Linear System
xu-week4.docx
2

The equations of motion of the system can be shown to be






The state equation using the state vector is given by


(
(
(
(

=
0 0 / /
0 0 / /
1 0 0 0
0 1 0 0
2 2
1 1
m k m k
m k m k
A ,
(
(
(
(

=
2
1
/ 1
/ 1
0
0
m
m
B

It is well known from the law of physics that the force can change the relative distance
between the two carts. i.e., but it cannot change the variables or
independently. However, if only the matrices A and B are given, based on what we have
learnt so far, we have no way of knowing that such a constraint exists. The problem is
even more pronounce since state-space representation of system is not unique. The
question is: is it possible to identify such constraints bsed on the matrices A and B?

Example 4

Consider the system given below:

1
R
2
R
0
0 R =
1
C
2
C
3
R
1
v
2
v
V

Figure: An uncontrollable system

By Physics, we know
1 2 1
1 1
1 3
2 1 2
2 2
2 3
;
V v v v
C v
R R
V v v v
C v
R R

= +

= +

dx
dt
x
1
1
=
dx
dt
x
2
2
=
dx
dt
k
m
x x
f
m
( )
1
1
1 2
1
=
dx
dt
k
m
x x
f
m
( )
2
2
2 1
2
= +
x x x x x
T
=
1 2 1 2
x x
2 1
x
1
x
2
4246 Linear System
xu-week4.docx
3
Hence, the differential equation can be described by
V
R C
v
R R C
v
R C
v
2 2
2
3 2 2
1
3 2
2
1 1 1 1 1
+
|
|
.
|

\
|
+ =

Consider the voltage across
3
R ,
2 1
v v v = then

V
R R C C
C R C R
v
R R C R C
v
R C R R C
v
2 1 2 1
1 1 2 2
2
3 2 2 3 1
1
3 2 3 1 1
1 1 1 1 1 1 1 1
+
(

|
|
.
|

\
|
+ + +
(

+
|
|
.
|

\
|
+ =



If
2 2 1 1
C R C R = , then the coefficient of V vanishes and

1 2 3
1 1 3
R R R
v v
C R R
( + +
=
(



This implies that v is not influenced by V and the voltage v decays from whatever initial
voltage to zero, i.e., v is not controllable.

The above examples illustrate the concept of controllability of system.
Practical examples of unobservability are also easily available. Typically examples of
unobservability of system occur when two systems are connected in tandem. If the output
consists of the output from the first system only, then the states of the second system are
unobservable.

Controllability and Observability are concerned with providing an analysis
tool to the above situations. For a given system of the form


x = Ax +Bu
y = Cx +Du
(1)

where , and matrices. Concept of Controllability
and Observabilty are useful in answering the following questions.

Can we drive x(t) wherever we want using some u?
Can we cause x(t) to follow a given path?
Can the measurement of y(t) tell us what x(t
0
) was?
Can we track x(t) by observing y(t)?

The concepts of controllability and observability are defined under the assumption that
we have complete knowledge of a dynamical equation; i.e., matrices A, B, C and D are
known.

4.2 Controllability

A R B R
n n n r
e e

, C R
m n
e

D R
m r
e

V
R C
v
R C
v
R R C
v
1 1
2
3 1
1
3 1 1
1
1 1 1 1 1
+ +
|
|
.
|

\
|
+ =
4246 Linear System
xu-week4.docx
4
Definition : A Linear Time-invariant system is said to be controllable if there exists an
input, u(t),
1
0 t t s s which drives the system from any initial state
0
) 0 ( x x = to any
other state
1 1
) ( x t x = in a finite time
1
t .

The key to the above definition are the words "any" and "finite". If the
input is only possible to make the system go from some states to some other states, the
system is not controllable. Moreover, if it takes an infinite amount of time to go from the
arbitrary initial state to the arbitrary final state, the system is likewise uncontrollable.

It is possible to define the concept of controllability to accommodate time-
varying systems, in which it may happen that the possibility of reaching
1
x may depend
on the initial time
0
t (in that case
0
t may not be 0 anymore). For our case, we will
confine our studies on time-invariant systems. In that case, there is no loss of generality in
taking the initial time
0
t to be zero.


Theorem 1 - Controllability
The n-dimensional linear time-invariant state equation in (1) is controllable if and only if
the following condition is satisfied:

1) The nr n controllability matrix
| | B A AB B U
n 1
=
is full row rank (i.e., rank(U)=n).

Proof:
( ) and ( ) : .
There are various ways of showing this. The following is a more direct proof showing
the connection to the Cayley-Hamilton principle.

For the system


x = Ax +Bu
y = Cx +Du
(2)

The time solution of the system given in (2) at time
1
t is

}

+ =
1
1 1
0
) (
0 1
) (
t
t A At
d Bu e x e x t t
t
(3)
or

}

=
1
1
0
0 1
) (
t
A At
d Bu e x x e t t
t
(4)
Note that ( From Cayley-Hamilton Theorem and infinite series expansion of )


(5)


e
A t
e A
A
k
k
n
k
=

=

t
o t ( )
0
1
4246 Linear System
xu-week4.docx
5
Substituting (5) into (4) gives

}

=
1
1
0
1
0
0 1
) ( ) (
t
k
n
k
k At
d u B A x x e t t t o (6)
If we denote


}
=
1
0
) ( ) (
t
k k
d u t t t o |
then
| |
(
(
(
(

= =

1
1
0
1
1
0
0 1
1
n
n
k
n
k
k At
B A AB B B A x x e
|
|
|
|

(7)
For the system to be controllable, it means that for any and , it must be possible to
find a u(t) (or identically
k
| ). This can only happen if and only if we can find the inverse
of
1 n
B AB A B

(
,
. Hence that means that the matrix
1 n
B AB A B

(

has full
row rank ( i.e., has at least n linearly independent columns ).


The matrix
1 n
B AB A B

(

is commonly known as the controllability
matrix and we shall denote it by U. In the case of single-input system i.e., r=1, then U is
a square matrix and controllability follows when rank U is n.

Example. Consider the system given by

u
x
x
x
x
(

+
(

=
(

0
1
1 0
1 1
2
1
2
1



To check if the system is controllable, we can form the controllability matrix U to get
| |
(

=
0 0
1 1
AB B

Since this is singular, therefore the system is not controllable.

Note: We do not distinguish between controllability and reachability. In actual fact,
controllability refers only to the case when the final state is the origin while reachability is more
general. For the continuous case, there is no difference between controllability and reachability
while for the discrete case, a system can be controllable but not reachable.

4.2.1 Controllability under Similarity Transformation

We now look at controllability of the system under similarity
transformation. It has been shown that if a transformation of the form x T x = is used for
(1), the new state equations are
x
0
x
1
n nr
4246 Linear System
xu-week4.docx
6

1 1
x = T ATx +T Bu
y = CTx +Du
(8)
Note that T is a nonsingular matrix so that its inverse exists.

The new controllability matrix is
1 1 1 1 1 1 1
... ...
n n
U T B T AB T A B T B AB A B T U

( ( = = =



and the rank of is the same as the rank of U since T is nonsingular. Hence,
controllability is not affected by similarity transformation.

Physically, controllability refers to the fact that the state of the system can
be moved from any one point to another using a control. However, we have assumed that
there is no constraint to the size of the input. In real life, there is always a limit to the
maximum control effort allowable. Hence, controllability is a mathematical concept. It
tells us whether a system can be controlled in the absence of any constraints on the
system. Knowing that a system is controllable does not mean that it can be controlled in
practice. However, knowing that a system is not controllable means that one should not
even try to control the physical system.

Note also that controllability is concerned only with matrices A and B. The output
equation or matrices C and D have no effect.

4.3 Observability

We will now discuss a closely related concept of controllability. It is
observability of the system. Roughly speaking, contollability studies the possibility of
steering the states using the input; observability studies the possibilities of estimating the
states from the output.

The concept of observability is important because, in practice, the
difficulty encountered with state feedback control ( we will be covering this in the second
part of this module) is that some of the state variables are not accessible for direct
measurement, with the result that it becomes necessary to estimate the unmeasurable state
variables in order to construct the control signals. It will be shown later in this section
that such estimates for state variables are possible if and only if the system is completely
observable.

Note that there is a more general definition for observability of linear
system. However, we will use a simpler definition as we are concerned with linear time-
invariant system only.

Definition : A linear time-invariant system is observable if every initial state x(0) can be
determined from the observation of y(t) over a finite time interval.

Again, the terms "every" and "finite" are important. For a system to be
observable, all initial states x(0) can be determined using a finite time interval. If only a
subset of the initial states can be determined or it takes infinite amount of time to
determine all the initial states, the system is not observable.
n n
U
4246 Linear System
xu-week4.docx
7

The study of observability of the system is usually done on an unforced system.
i.e.,


x = Ax
y = Cx
(9)

This is a consequence of the assumption that the input u(t) is completely known.
Specifically, the time solution of the system (1) is given by


}

+ =
t
t A At
d Bu e x e t x
0
) (
) ( ) 0 ( ) ( t t
t

and the output equation is given by

Du d Bu e C x Ce y
t
t A At
+ + =
}

0
) (
) ( ) 0 ( t t
t
(10)
Since the last two right terms of equation (10) are known function of time ( u(t), A, B, C
and D are assumed known ), they can be subtracted from the observed value of y(t).
Hence, it is sufficient to consider the system described by (9) in the study of observability
of the system.

Theorem 2 - Observability
The n-dimensional linear time-invariant system (1) is observable if and only if the
following condition is satisfied:

1) The observability matrix defind by the n mn matrix
(
(
(
(

=
1 n
CA
CA
C
O


is full column rank (i.e., rank(O)=n).

Proof:

We have
) 0 ( ) ( x Ce t y
At
= (11)

i.e.

=
=
1
0
) 0 ( ) (
n
k
k
k
x CA t y o

so that for any y(t), in order to obtain x(0), we must have

4246 Linear System
xu-week4.docx
8

(
(
(
(

=
1 n
CA
CA
C
O

be of full column rank.



Another way to look at the observability problem is to consider the LTI system


x = Ax
y = Cx
(9)

When we say a system is observable, what we mean is that we can find the state x(t) given the
input and output. In the observability problem, the known quantities are the matrices/vectors
A,b,c and the input u(t) and output y(t). The unknown is the state vector x(t).

From (9), we can get



) (
) ( ) (
) (
) ( ) (
) ( ) (
2
t x CA
t x CA t y
t CAx
t x C t y
t Cx t y
=
=
=
=
=

By defining Y(t) we get.

) ( ) (
1
t x
CA
CA
C
t
n

(
(
(
(

= Y



i.e. ) ( ) ( t Ox t = Y

so that for any given vector Y(t), if O is nonsingular, then the states can alway be found. If O is
nonsingular, that means that its rank must be full.

4.3.1 Observability under change of states.

Referring to equation (8), we see that the new observability matrix is

OT
T CA
AT CTT
CT
A C
A C
C
O
n n
=
(
(
(

=
(
(
(

1
1
1


Hence observability is not affected by similarity transformation.

= y t y t y t
T
( ) ( ) ( )
4246 Linear System
xu-week5.docx
1
5 Controllability/Observability (contd) & Stability
We continue discussing controllability and observability. Furthermore, we will introduce how to determine
the stability of the LTI system given its state-space representation

5.1 Computation examples of Controllability and Observability

Example 1:

Q: Consider the system

u
x
x
x
x
(

+
(


=
(

1
0
1 2
1 1
2
1
2
1


| |
(

=
2
1
0 1
x
x
y

Is the system controllable and observable?

Solution:

Form the controllability matrix U to get

| |
(

=
1 1
1 0
AB B

Since the rank of U is 2, therefore the system is completely controllable.

Form the observability matrix O to get


(

=
(

1 1
0 1
CA
C


Since the rank is 2, therefore the system is completely observable.


Example 2:

Recall the 2-cart system that was introduced earlier:

4246 Linear System
xu-week5.docx
2
x 1
x 2
m1 m2
f f
k


The state equation using the state vector is given by


(
(
(
(

=
0 0 / /
0 0 / /
1 0 0 0
0 1 0 0
2 2
1 1
m k m k
m k m k
A
,
(
(
(
(

=
2
1
/ 1
/ 1
0
0
m
m
B

The controllability matrix is given by:


(
(
(
(
(
(
(
(
(
(


+

+
=
0 0
1
0 0
1
0
1
0
0
1
0
2 1
2
2
2
2 1
2
1
1
2 1
2
2
2
2 1
2
1
1
m m
k
m
k
m
m m
k
m
k
m
m m
k
m
k
m
m m
k
m
k
m
U
It can be seen that column 4 is just a multiple of column 2 and so the rank of U is less
than 4 (you can check that det(U)=0) and so the system is uncontrollable.



5.2 Relationship between controllability, observability and transfer function

The transfer function has no cancellation if and only if the system is completely
controllable and completely observable (minimal system).
x x x x x
T
=
1 2 1 2
4246 Linear System
xu-week5.docx
3

If cancellation occurs, then the system could either lose controllability or observability.

Example:

Consider the following system


) ( ) ( ) (
) ( ) ( ) (
t D t C t
t B t A t
u x y
u x x
+ =
+ =


where
(
(
(

=
3
2
1
x
x
x
x ,
(
(
(


=
6 11 6
1 0 0
0 1 0
A ,

(
(
(

=
1
0
0
B , | | 1 5 4 = C D=0

The controllability matrix is given by


(
(
(

=
36 6 1
6 1 0
1 0 0
U
which is clearly of rank 3 and so the system is controllable.


The observability matrix is given by


(
(
(

=
1 5 6
1 7 6
1 5 4
O
Since the determinant of O is zero, therefore the rank is less than 3. Hence, the system is
not observable.

Looking at the sub-matrix
(

7 6
5 4
, the determinant is equal to 2 and so there are
at least 2 linearly independent vectors and so the rank of O is 2.
4246 Linear System
xu-week5.docx
4

To find the transfer function, use

D B A sI C s G + =
1
) ( ) (

we get


) 3 )( 2 (
4
) (
+ +
+
=
s s
s
s G

which is 2
nd
order while we would expect a third order system since there are 3 states.

Consider the transfer function between X
1
(s) to U(s), we get


) 3 )( 2 )( 1 (
1
) (
) (
1
+ + +
=
s s s s U
s X


(take C=[1 0 0] and then use D B A sI C s G + =
1
) ( ) ( )

the transfer function between Y(s) and X
1
(s) is

) 4 )( 1 (
) (
) (
1
+ + = s s
s X
s Y


(because y=Cx, i.e.
3 2 1
5 4 x x x y + + = , but

3 2
2 1
x x
x x
=
=



and so


1
2
2 3
1 2
X s sX X
sX X
= =
=


so that


1
2
) 5 4 ( ) ( X s s s Y + + =
)

4246 Linear System
xu-week5.docx
5
hence the transfer function from U(s) to Y(s) is


) 3 )( 2 )( 1 (
) 4 )( 1 (
) (
) (
+ + +
+ +
=
s s s
s s
s U
s Y


i.e., there is a pole-zero cancelation happening.




5.3 Tranformation to controllable canonical form

We next explain how to use similarity transformation to transfer a matrix to its
controllable canonical form (i.e., find the correct T)

Given a controllable system. Consider the following tranformation matrix:


T =UM

where

2 1 n
U B AB A B A B

( =

is the controllability matrix and

1 2 1
2 3
1
1
1 0
0
1
1 0 0 0
n
n
a a a
a a
M
a

(
(
(
( =
(
(
(

,

where the

a
i
(i=0 to n-1) are the coefficients of the characteristic equation of A, i.e.

1 2
1 2 1 0
det( ) 0
n n
n
sI A s a s a s a s a

= + + + + + = .

Then, for a given system with state space equation

( ) ( ) ( )
( ) ( ) ( )
t A t B t
t C t D t
= +
= +
x x u
y x u


we can show that


T
1
AT = A
cr
(5.3.1)

where

A
cr
is the controllable canonical form.

(Q: Why we need the system to be controllable?)
4246 Linear System
xu-week5.docx
6

Proof: For simplicity, we will show this for the case when n=4, so that



A
cr
=
0 1 0 0
0 0 1 0
0 0 0 1
a
0
a
1
a
2
a
3






(

(
(
(
(


and the characteristic equation is given by



det(sI A) = s
4
+a
3
s
3
+a
2
s
2
+a
1
s +a
0
=0

From (5.3.1), we need to show



AT =TA
cr


or


AB A
2
B A
3
B A
4
B
| |
a
1
a
2
a
3
1
a
2
a
3
1 0
a
3
1 0 0
1 0 0 0






(

(
(
(
(
= B AB A
2
B A
3
B
| |
a
1
a
2
a
3
1
a
2
a
3
1 0
a
3
1 0 0
1 0 0 0






(

(
(
(
(
0 1 0 0
0 0 1 0
0 0 0 1
a
0
a
1
a
2
a
3






(

(
(
(
(

(5.3.2)

The LHS becomes

2 3 4 2 3 2
1 2 3 2 3 3
, , , a AB a A B a A B A B a AB a A B A B a AB A B AB ( + + + + + +

(5.3.3)

Using Cayley-Hamilton theorem (the matrix satisfy its own characteristic equation)



A
4
+a
3
A
3
+a
2
A
2
+a
1
A+a
0
I
4
=0,

we can substititue the first term in (5.3.3), the LHS becomes



a
0
B a
2
AB+ a
3
A
2
B+ A
3
B a
3
AB+ A
2
B AB
| |
.

Expanding, the RHS of (6.4.2) becomes


B AB A
2
B A
3
B
| |
a
0
0 0 0
0 a
2
a
3
1
0 a
3
1 0
0 1 0 0






(

(
(
(
(


or



a
0
B a
2
AB+ a
3
A
2
B+ A
3
B a
3
AB+ A
2
B AB
| |

which is equal to the LHS! (You can show it for a general n, but it will be messy.)
4246 Linear System
xu-week5.docx
7
5.4 Stability

We give some basic definitions of stability and introduce the concept of Lyapunov
functions.

Definitions:

Equilibrium Point

Consider the nonlinear system

f(x) x = ,
where f(x) is a vector field of n components. If f(0)=0 , then we say that the origin is an
equilibrium point. If f(c)=0 for some vector c, then c is an equilibrium point. Then one
can do a linear transformation y=x-c, and get a new representation where the origin is an
equilibrium point:
y = g(y)

Stability

The origin is stable if and only if, for any 0 > c , there exist 0 ) ( > c o such that

o < ) 0 ( x implies that c < ) (t x for all 0 > t



Basically a system is stable is small perturbations in the initial conditions results in small
perturbations from the equilibrium point.


x(0)
c
o
4246 Linear System
xu-week5.docx
8


Asymptotic Stability

The origin is asymptotically stable if and only if there exists 0 > o , such that

o < ) 0 ( x implies that 0 ) ( t x as t

In other words, asymptotic stability means that if the system is slightly perturbed away
from the equilibrium point, it will return asymptotically to the equilibrium point. If this
holds for arbitrary initial conditions, then the system is said to be globally asymptotically
stable. That is, 0 ) ( t x when t , regardless of the value of x(0).

The linear system,

Ax x =

will be globally asymptotically stable provided that all eigenvalues of the matrix A lie in
the open left half of the complex plane. For non-liner systems, stability cannot be so
easily determined. One common method is the Lyapunov approach (this is a sufficient but
not necessary condition).

Lyapunov Functions

A function V(x) is called a Lyapunov function candidate if V(0)=0 and 0 ) ( > x V for
0 = x .


Lyapunov Stability

Given a system

f(x) x = (5.4.1)

if there exists a Lyapunov function candidate V such that along solution trajectory of
(5.4.1),

0 ) ( < x V



then the equilibrium point is said to be asymptotically stable. The strict inequality means
that V is actually decreasing along solution trajectories of (5.4.1) and hence the
trajectories must be converging to the equilibrium point.

If we can only guarantee that 0 ) ( s x V

, then we can only say that the equilibrium point


is stable and not asymptocially stable.


4246 Linear System
xu-week5.docx
9
Lyapunov Stability for Linear Systems

Quadratic form:

Given a symmetric matrix P, the scalar function

x x x P V
T
= ) (

is said to be a quadratic form.

V(x) is said to be positive definite if and only if

0 ) ( > x V

for 0 = x . Note that V(0)=0. Hence, V is a Lyapunov function candidate.

V(x) will be positive definite if and only if the matrix P is a positive definite matrix, i.e. it
has all eigenvalues positive.


Consider the linear system

A = x x

and let

x x x P V
T
= ) (

be a Lyapunov function candidate, where P is symmetric and positive definite. Taking
the derivative of V along the solutions of (7.1) gives


x x
x x
x x x x
Q
PA P A
P P V
T
T T
T T
=
+ =
+ =
) (



where we define

PA P A Q
T
+ = (5.4.2)

Note that Q is symmetric since P is symmetric. The linear system is asymptotically stable
if Q is positive definite.

Indeed, the sytem is asymptotically stable if and only if for any positive definite Q, one
can find a symmetric and positive definite P that solves (5.4.2).

You might also like