CS State Variable T
CS State Variable T
Introduction
State Space Analysis is an alternate approach to the Transfer Function approach for the
analysis of a Control System. State Space Model is applicable for the systems with Memory
like Sequential Logic Circuits in case of digital and Networks with Inductors and Capacitors.
The state variables of a systems are defined as a minimum set of variables
x t , x t ,..............x t such that knowledge of these variables at any time t0 and the
1 2 n
information of input excitation subsequently applied, are sufficient to determine the state of
the system of any time t t . Usually we define a state variable for every storage element
0
but that should not be redundant like if two inductors are connected in series they carry
same current so only one state variable is needed for both. The space spanned by these
variables that is space of all possible combinations of these variables is termed as State
Space. A particular combination of State Variables out of State Space is termed as State of
the System.
1) It is applicable for both LTI and LT varying system but linearity is a must.
State Model
The state model for Multiple Input Multiple Output system is represented in terms of two
equations which are State Equation and Output Equation respectively.
Consider a system with ‘k’ inputs U1, U2,….Uk and ‘n’ outputs y1, y2,……yn and let us define ‘m;
state variables x1, x2,…….xm. The equations mentioned below are in time domain and each
variable represents a matrix whose orders are also mentioned.
State Equation
X Ax Bu
x : order m 1
A : order m m
u : order k 1
B : order m k
Output Equation
Y Cx Du
Y order n 1
C order n m
D order n k
These equations when written for a discrete time system translate to:
yx
1
y' x ' x
1 2
y '' x ' x
2 3
y ''' x '
3
x ' 3x 6x 7x 10u
3 3 2 1
x ' 10u 7x 6x 3x
3 1 2 3
x 'x
2 3
x 'x
1 2
State Equation
x ' x
1 0 1 0 1 0
x ' 0 0 1 x 0 u
2 2
x ' 7 6 3 x 10
3 3
yx
1
Output Equation
x
1
y 1 0 0 x 0 u
2
x
3
Solved Examples
y
4 6y3 5y2 10y 2u t
Solution: Number of state variables = order = 4
x y
1
x x ' y'
2 1
x x ' y ''
3 2
x x ' y '''
4 3
x ' y4
4
y 4 x ' 2u t 6x 5x 10x
4 4 3 1
State Equation
x1 ' x
0 1 0
0 1 0
2 0
x ' 0 1 0 x2 0
u
x '
3 0 0 0 1 x 0
10 3
0 5 6 x 0
x 4 ' 4
Output Equation
x1
x2
y 1 0 0 0
x3
x 4
Suppose we wish to represent a series RLC circuit in terms of State Model as shown below:
In this circuit there are two energy elements which are inductor and capacitor so we have to
consider two state variables, Inductor Current and Capacitor Voltage.
Applying KVL
Ldi 1
dt C
V iR idt
in
di
L iR v v
dt c in
di R 1 1
i v v _________________(i)
dt L L c L in
Cdv
i
dt
dv 1
i 0v 0v ___________________(ii)
dt C c in
State Equation
di R 1
i 1
dt L L v
dv 1 v L in
c 0 c 0
dt C
Output Equation
i
v v 0 1 L
0 c v
c
Solved Examples
Problem: Find out state model for the network shown below:
L di
v i R i 1 v
in 1 1 dt c
di v R
1 in 1 i 1 v _____________(i)
dt L L 1 L c
1 1 1
di
v L 2 R i
c 2 dt 22
di R v
2 0v 2 i c _______________(ii)
dt in L 2 L
2 2
i i i ___________(iii)
c 2 1
cdv dv i i i
i c c c 2 1 ______________________(iv)
c dt dt C C C
R 1
1 0
L L 1
i 1 1 i L
1 R 1 1
1
i 0 2 i 0 v
2 L L 2 in
v 2 2 v 0
c 1 1 c
C 0
C
i
1
i i i i 1 1 0 i 0 v
0 c 2 1 2 in
v
c
If we reverse the currents assumed in above problem then we get a different state space
model so state space model of a system is not unique but transfer function is unique.
Before converting a Transfer Function into State Model we first need to realize the system
using Integrators in terms of Signal Flow Graph or a Block Diagram.
Suppose the Transfer Function is given as follows
Y s 3s 5
Us s2 3s 2
This can be represented in terms of Mason Gain Formula as shown below:
3 5
Y s
s s2
U s
1 3 2
s s2
The equivalent Signal Flow Graph for this system is shown below:
Then we have to define one state variable per integrator as shown above and before the
integrator we assume the derivative of State Variable and after the integrator State Variable
appears. So by using Node Equations in a Signal Flow Graph we obtain:
x 3u 3x x
1 1 2
x 5u 2x
2 1
x1 3 1 x1 3
u
x2 2 0 x2 5
x1
y x 1 0
1 x2
The same Transfer Function can be broken in terms of Partial Fraction as shown below:
Y s 2 1
Us s 1 s 2
2U s Us
Y s
s 1 s 2
The state variables are defined same as in previous case as shown above:
x u s x
1 1
x u s 2x
2 2
x1 1 0 x1 1
u
x2 0 2 x2 1
x1
y 2x x 2 1 0 u
1 2 x2
So, we can have different State Models for the same Transfer Function and hence State
Model is not unique for a system. So, we define certain standard forms called as Canonical
Forms for the sake of uniformity.
x1 0 1 0 0 x1 0
d x2 0 0 1 0 x 2 0
u
dt x3 0 0 0 1 x3 0
x 4 a0 a1 a2 a3 x 4 b
x1
x
y(t) c0 c1 c2 c3 2
x3
x 4
The state model in Observable Canonical form for the same Transfer Function is:
x1 0 0 0 a0 x1 c0
d x2 1 0 0 a1 x 2 c1
u
dt x3 0 1 0 a2 x3 c2
x 4 0 0 1 a3 x 4 c3
x1
x
y(t) 0 0 0 b 2
x3
x 4
If the eigenvalues of A matrix are distinct or in other words all poles are of order-1 then
system can be represented in Diagonal Canonical Form as shown below:
Y s s z s z
1 2
U s s p s p s p
1 2 3
Y s b1 b2 b3
Us s p s p s p
1 2 3
x1 p1 0 0 x1 k1
d
x2 0 p2 0 x 2 l1 u
dt
x3 0 0 p3 x3 m1
x1
y(t) k 2 l2 m2 x 2
x3
k1 xk 2 b1
l1 xl2 b2
m1 xm2 b3
If the poles of the system are repeated then instead of Diagonal Form we use Jordan
Canonical Form.
Assuming Poles are –p1, -p2, -p2. The Matrix A is then given by
p 0 0
1
A 0 p 1
2
0 0 p2
The sub-matrices that are enclosed in square brackets are called as Jordan Blocks.
x t Ax t Bu t
y t Cx t Du t
SX s X 0 AX s Bu s
Y s CX s Du s
For Transfer Function X(0) = 0 (initial conditions are neglected in Transfer Function)
sX s AX s Bu s
X s sI A Bu s
X s sI A 1 Bu s
1
Y s CX s Du s C sI A Bu s Du s
Y s
Us
C sI A 1 B D
For a discrete time system, the Laplace Transform is replaced by Z-Transform and the
Transfer Function becomes:
Y z 1
C zI A B D
U z
Solved Examples
Problem: Find the Transfer Function of the system whose State Model is given below:
1 0 1
x x u and Y 1 1 X
0 2 0
s 1 0
Solution: sI A
0 s 2
1
s 1 0
1 s 2 0
sI A 1
s 1 s 2 0 s 1 1
0
s 2
1
1 1
C sI A B 1 1 s 1 Transfer function
s1
0
C Adj sI A B sI A D 0
Poles of the system are given by roots of the equation given below:
sI A 0
Characteristic equation: 1 G s H s 0 or sI A 0
The condition for stability in Laplace Domain is that all poles must lie in Left Half Plane.
The condition for stability in z-domain is that poles must lie inside unit circle.
Solved Examples
Problem: Find the poles of the system whose State Model is given below. Also, judge the
stability of the system.
0 1 0
X X r and C 17 5 X 1 r
20 9 1
sI A 0
s 0 0 1 s 1
sI A
0 s 20 9 20 s 9
s 1
sI A s(s 9) 20
20 s 9
2
Characteristic Equation: s 9s 20 0
Poles: s 4, 5
So, both poles lie in left half plane and hence closed loop system is stable.
If there is no input applied to the system the response of the system is entirely due to initial
conditions existing in the system and such a response is called as Zero Input Response of
Free Response.
x Ax
Taking Laplace Transform, we have
sX s x 0 AX s
sI A X s x 0
1
X s sI A x 0
1 1
x t L1 sI A x 0 L1 sI A x 0
x t t x 0
1
Where, t L sI A
1
t State Transition Matrix
A2 t2
t eAt I At ......
2!
Where, I is Identity Matrix
Properties of Ф(t)
1) 0 eA0 I
1
1 At A t
2) t e
e
t
n n A nt
3) t eAt e
nt
At At
A t t
4) t t e 1 e 2 e 1 2 t t
1 2 1 2
1 2
5) t t t t
e
A t t A tt
1 .e 2
A t t
e 1 2 t1 t2
Forced Response
When an input is applied to the system, the system becomes non-homogeneous and the
response of such a system is called as Forced Response.
X Ax Bu
sX s X 0 AX s Bu s
1 1
X s sI A X 0 sI A Bu s
1 1
x t L1 sI A X 0 sI A Bu s
t
x t t x 0 t Bud
0
The second term in Laplace domain is product of two Laplace Transforms and hence in Time
Domain we replace it by Convolution of State Transition Matrix and Bu(t).
The first term in response is termed as Zero Input Response and second term is called as
Zero State Response.
This solution can also be obtained by solving the State Equation in time domain as shown
below:
x Ax Bu
x Ax Bu
Multiple both sides by e
At
t
eAt x t x 0 eABud = time variable
0
t A t
x t eAt x 0 e
Bud
0
t
x t t x 0 t Bud
0
Solved Examples
Problem: Find the solution of state equation state transition matrix & output of the system
having state model is given below:
1 0 1 T
X x u and Y 1 1 x, x 0 1 0
1 1 1
u = unit step
s 1 0
Solution: sI A
1 s 1
1
0
1 s 1
sI A 1 1 and
2 s 1
s 1
Us 1
s
1
1 s 1
sI A B s
s 1 2
1
s s 1
1
sI A BU s 1
2
s 1
1 1 et 0 1 1 et
x t L1 sI A X 0 L1 sI A Bu s
tet et 0 tet
x t 2et 1
1
x2 t 2tet
Controllability
A system is said to be controllable if the state of the system can be transferred to another
desired state over a given time period by using input.
Consider, x Ax Bu
Q = controllability matrix
c
Rank of matrix, Q n If
c det Q c 0
To determine Rank of Matrix, first we check if Rank = Order and that is true if determinant of
Matrix is non-zero.
If Determinant is zero, then we check if Rank = (n-1) and that is when atleast one cofactor of
order (n-1) is non-zero.
Similarly, we continue to check for decreasing ranks and Rank = 0 if matrix is a Zero Matrix.
a) r 3, if Q 0
c
b) r = 2, if even one of co-factor of any element is non – zero.
c) r = 1, if even one of elements Q is non – zero
c
d) r = 0, if B = 0
Observability
A system is said to be observable if all the states of the system can be determined on the
basis of knowledge of the output of system at a given time.
Kalmann’s Test
C
CA
CA2
Q .
0
.
.
CAn 1
n – order of system
System will be completely observable if rank of Q =r = n which means Q0 0
0
System will be unobservable if r < n
No. of unobservable states = (n - r)
No. of observable states = r
For applying Gilbert’s Test the system must either be in Diagonal Canonical Form or Jordan
Canonical Form.
Then the test for Controllability and Observability is reduced to,
Controllability
Rows of B Matrix that correspond to distinct eigenvalues should not have all zero
elements.
Rows of B Matrix corresponding to last row of Jordan Block should not have all zero
elements.
Observability
Columns of C Matrix that correspond to distinct eigenvalues should not have all zero
elements.
Columns of C Matrix corresponding to first row of Jordan Block should not have all
zero elements.
Solved Examples
Problem: Check controllability & observability & also number of controllable and observable
states for the following system.
0 1 1
X X u and Y 1 1 X
1 2 1
Solution: Controllability:
1 0 1 1 1
B , AB
1 1 2 1 1
1 1
Q
c 1 1
Observability:
0 1
C 1 1 , CA 1 1 1 1
1 2
1 1
Q
0 1 1
Q 0
0
Problem: Determine Controllability and Observability of the system whose State Model is
given below:
2 1 0 x1 0 0 x1
X 0 2 0 x2 4 5 u(t) and y(t) 7 0 5 x2
0 0 3 x3 8 0 x3
Solution: Jordan Blocks for the given system are marked below:
2 1 0
A 0 2 0
0 0 3
The rows of B Matrix corresponding to last row of each Jordan Block are 2nd and 3rd rows and
they are non-zero and hence system is controllable.
The columns of C Matrix corresponding to first row of each Jordan Block are 1st and 3rd
column and they are non-zero and hence system is observable.