0% found this document useful (0 votes)
30 views21 pages

CS State Variable T

The document discusses state variable analysis for control systems. It defines state variables as a minimum set of variables needed to determine the state of a system at any time given its initial conditions and input. The state model represents systems using state equations that define how the state variables change over time and output equations that define system outputs. The document provides examples of converting differential equations and physical systems to state space models and extracting state models from transfer functions. The objectives are to analyze multi-input multi-output systems using state variable analysis and determine properties like controllability and observability.

Uploaded by

Prasun Singhal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views21 pages

CS State Variable T

The document discusses state variable analysis for control systems. It defines state variables as a minimum set of variables needed to determine the state of a system at any time given its initial conditions and input. The state model represents systems using state equations that define how the state variables change over time and output equations that define system outputs. The document provides examples of converting differential equations and physical systems to state space models and extracting state models from transfer functions. The objectives are to analyze multi-input multi-output systems using state variable analysis and determine properties like controllability and observability.

Uploaded by

Prasun Singhal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Control Systems (State Variable Analysis)

State Variable Analysis


Objectives

Upon completion of this chapter you will be able to:

 Represent a system in terms of its State Model.


 Analyse a MIMO system in terms of State Variable Analysis.
 Find Transfer Function from State Model.
 Find the solution of State Model to determine time response of the system.
 Determine Controllability and Observability of the system from its State Model.

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.

Advantages of State Space Analysis

1) It is applicable for both LTI and LT varying system but linearity is a must.

2) It takes initial conditions into account.

3) All the internal states of the system can be determined

4) Applicable for multiple input multiple output systems.

5) Controllability & observability can be determined easily.

© Kreatryx. All Rights Reserved. 1 www.kreatryx.com


Control Systems (State Variable Analysis)

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:

xn1  Axn  Bun


yn  Cxn  Dun

Where, n indicates nth sample for discrete time system.

Representing a differential equation in State Space Model

Most physical systems can be modelled in terms of differential equations so we need to


devise a method to convert differential equations into State Variable form so that analysis of
such a system can be carried out.

© Kreatryx. All Rights Reserved. 2 www.kreatryx.com


Control Systems (State Variable Analysis)

Suppose we are given a differential equation as shown below:


d3 y 3d2 y 6dy
   7y  10u
dt3 dt2 dt

Number of state variable = order of system

yx
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

yx
1

Output Equation

x 
 1
y  1 0 0  x   0 u
 2
x 
 3

© Kreatryx. All Rights Reserved. 3 www.kreatryx.com


Control Systems (State Variable Analysis)

Solved Examples

Problem: Describe the following system in terms of State Model

y
 4   6y3  5y2  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 

Physical variable representation in terms of State Model

If a physical system is given to us to be represented in terms of State Model then first we


need to identify the Storage Elements in the system. Then, we define State Variables for
different storage elements like for Inductors we use Inductor Current and for Capacitors we
use Capacitor Voltage.

© Kreatryx. All Rights Reserved. 4 www.kreatryx.com


Control Systems (State Variable Analysis)

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.

State variables i & v


c

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

© Kreatryx. All Rights Reserved. 5 www.kreatryx.com


Control Systems (State Variable Analysis)

Solved Examples

Problem: Find out state model for the network shown below:

Solution: State variables i ,i , V


1 2 c

Apply KVL in loop 1

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

Apply KVL in loop 2

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

© Kreatryx. All Rights Reserved. 6 www.kreatryx.com


Control Systems (State Variable Analysis)

 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.

State Model from Transfer Function

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

Us 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:

© Kreatryx. All Rights Reserved. 7 www.kreatryx.com


Control Systems (State Variable Analysis)

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
 
Us s  1 s  2

2U  s  Us
Y s  
 s  1 s  2

This can be represented in terms of Block Diagram shown below:

The same Block Diagram can be written in terms of Integrators as shown:

© Kreatryx. All Rights Reserved. 8 www.kreatryx.com


Control Systems (State Variable Analysis)

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.

Controllable Canonical Form

Suppose the Transfer Function is given as mentioned below:

Y s c3s3  c2s2  c1s  c0


b
Us s4  a3s3  a2s2  a1s  a0

The state model in Controllable Canonical form is:

 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 

© Kreatryx. All Rights Reserved. 9 www.kreatryx.com


Control Systems (State Variable Analysis)

Observable Canonical Form

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 

The A matrix in Observable Canonical form is Transpose of A matrix in Controllable Canonical


Form. The B matrix in Observable Canonical form is Transpose of C matrix in Controllable
Canonical Form. The C matrix in Observable Canonical form is Transpose of B matrix in
Controllable Canonical Form.

Diagonal Canonical Form

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

By Partial Fraction it can be written as:

Y s b1 b2 b3
  
Us s  p  s  p  s  p 
1 2 3

The state model in Diagonal Canonical form is:

 x1   p1 0 0   x1   k1 
d      
 x2    0 p2 0   x 2    l1  u
dt
 x3   0 0 p3   x3  m1 
  

© Kreatryx. All Rights Reserved. 10 www.kreatryx.com


Control Systems (State Variable Analysis)

 x1 
 
y(t)  k 2 l2 m2   x 2 
 x3 
 

k1 xk 2  b1
l1 xl2  b2
m1 xm2  b3

Jordan Canonical Form

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.

Transfer Function from state space model

The state model of a system is given by the following equations:

x  t   Ax  t   Bu  t 
y  t   Cx  t   Du  t 

Applying Laplace Transform in both equations

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 

© Kreatryx. All Rights Reserved. 11 www.kreatryx.com


Control Systems (State Variable Analysis)

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
Us 
 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
s1
 0 
 

© Kreatryx. All Rights Reserved. 12 www.kreatryx.com


Control Systems (State Variable Analysis)

Stability from State Model

The Transfer Function using State Model is given by:

Y s CAdj  sI  A  CAdj  sI  A  B  sI  A D


 C  sI  A 1 B  D  B D 
U s sI  A sI  A

Zeroes of this Transfer Function are given by roots of this equation:

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.

Hence, closed loop poles are actually eigen value of matrix A.

Similarly, for a Discrete Time System the characteristic equation is given by zI  A  0

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 

Solution: The characteristic equation of the system is given by

sI  A  0

 s 0  0 1 s 1 
 sI  A        
0 s   20 9  20 s  9 

© Kreatryx. All Rights Reserved. 13 www.kreatryx.com


Control Systems (State Variable Analysis)

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.

Solution of state equation

1. Homogeneous system or free Response (U=0)

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 

Taking inverse Laplace transform, we have

 1   1 
x  t   L1  sI  A  x  0    L1  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

© Kreatryx. All Rights Reserved. 14 www.kreatryx.com


Control Systems (State Variable Analysis)

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 tt
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.

The State Equation is given by”:

X  Ax  Bu

Taking Laplace both sides we have

sX  s   X  0   AX  s   Bu  s 
1 1
X  s    sI  A  X  0    sI  A  Bu  s 

Taking inverse Laplace transform

 1 1 
x  t   L1  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).

© Kreatryx. All Rights Reserved. 15 www.kreatryx.com


Control Systems (State Variable Analysis)

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

eAt x  eAt A  eAtBu


d e At x   e AtBu
dt  

Integrating both sides. We get

t
eAt x  t   x  0    eABud  = time variable
0
t A t
x  t  eAt  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 

© Kreatryx. All Rights Reserved. 16 www.kreatryx.com


Control Systems (State Variable Analysis)

 1 
 0 
1  s  1 
 sI  A    1 1  and
 2 s  1
  s  1  
Us  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   L1  sI  A   X  0   L1  sI  A  Bu  s       
    tet et  0   tet 

 x  t   2et  1
 1  
 x2  t    2tet 
 

y  t   1 1 x   2tet  2et  1


 

Controllability & Observability

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.

© Kreatryx. All Rights Reserved. 17 www.kreatryx.com


Control Systems (State Variable Analysis)

Kalmann’s Test for Controllability

Consider, x  Ax  Bu

Then Q  B : AB : A2B : ...................... : An  1B


c  

Q = controllability matrix
c

Here “:” sign indicates Augmented Matrix.

 System is completely Controllable if rank of matrix Q is equal to order of system ( r = n).


c
 System will not be completely controllable (uncontrollable) if rank of matrix Q
c is less
than order of the system (r < n)

Number of uncontrollable states = (n - r)

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.

As for an example, in a 3rd Order System:

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.

© Kreatryx. All Rights Reserved. 18 www.kreatryx.com


Control Systems (State Variable Analysis)

Kalmann’s Test

 C 
 CA 
 
 CA2 
 
Q  . 
0  
 . 
 . 
 
CAn  1 
 

n – order of system

Q : observability testing matrix.


0


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

Gilbert’s Test for Controllability and Observability

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.

© Kreatryx. All Rights Reserved. 19 www.kreatryx.com


Control Systems (State Variable Analysis)

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 

Q  0 & B  0 so rank = 1 < 2


c

Hence system is not controllable & number of controllable states is 1.

Observability:

0 1
C  1 1 , CA  1 1     1 1
 1 2
1 1
Q 
0  1 1

Q 0
0

So systems is not observable and number of observable states = 1.

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:

© Kreatryx. All Rights Reserved. 20 www.kreatryx.com


Control Systems (State Variable Analysis)

 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.

© Kreatryx. All Rights Reserved. 21 www.kreatryx.com

You might also like