0% found this document useful (0 votes)
22 views65 pages

State Space Modeling Analysis-Pages

The document outlines the principles of State Space Modeling and Analysis, covering basic definitions, state equations, and the relationships between state variables, input, and output in dynamic systems. It discusses the formulation of state space equations, controllability, observability, and provides examples of converting state space models to transfer function models. The lecture is part of a course by Dr. Mohammed Obaid Mustafa at the University of Mosul for the academic year 2021-2022.

Uploaded by

Mohammed Khessro
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)
22 views65 pages

State Space Modeling Analysis-Pages

The document outlines the principles of State Space Modeling and Analysis, covering basic definitions, state equations, and the relationships between state variables, input, and output in dynamic systems. It discusses the formulation of state space equations, controllability, observability, and provides examples of converting state space models to transfer function models. The lecture is part of a course by Dr. Mohammed Obaid Mustafa at the University of Mosul for the academic year 2021-2022.

Uploaded by

Mohammed Khessro
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

State Space Modelling & Analysis

Dr. Mohammed Obaid Mustafa


Department of Electrical Eng.
College of Engineering
University of Mosul
2021-2022
Lecture Outline
– Basic Definitions

– State Equations

– State Diagram

– Transfer Matrix

– Solution of State Equation

– State Controllability

– State Observability

– Output Controllability
Definitions
• State of a system: We define the state of a system at time t0 as
the amount of information that must be provided at time t0,
which, together with the input signal u(t) for t  t0, uniquely
determine the output of the system for all t  t0.

• State Variable: The state variables of a dynamic system are the


smallest set of variables that determine the state of the
dynamic system.

• State Vector: If n variables are needed to completely describe


the behaviour of the dynamic system then n variables can be
considered as n components of a vector x, such a vector is called
state vector.

• State Space: The state space is defined as the n-dimensional


space in which the components of the state vector represents
its coordinate axes.
Definitions
• Let x1 and x2 are two states variables that define the state
of the system completely .

dx
x2 dt
Velocity State (t=t1)
State (t=t1)

State
Vector
x1 Position
x

Two Dimensional State space State space of a Vehicle

4
State Space Equations
• In state-space analysis we are concerned with three types of
variables that are involved in the modeling of dynamic systems:
input variables, output variables, and state variables.

• The dynamic system must involve elements that memorize the


values of the input for t> t1 .

• Since integrators in a continuous-time control system serve as


memory devices, the outputs of such integrators can be
considered as the variables that define the internal state of the
dynamic system.

• Thus the outputs of integrators serve as state variables.

• The number of state variables to completely define the dynamics


of the system is equal to the number of integrators involved in the
system.
State Space Equations
• Assume that a multiple-input, multiple-output system involves 𝑛
integrators.
• Assume also that there are 𝑟 inputs 𝑢1 𝑡 , 𝑢2 𝑡 , ⋯ , 𝑢𝑟 𝑡 and 𝑚
outputs 𝑦1 𝑡 , 𝑦2 𝑡 , ⋯ , 𝑦𝑚 𝑡 .
• Define 𝑛 outputs of the integrators as state variables:
𝑥1 𝑡 , 𝑥2 𝑡 , ⋯ , 𝑥𝑛 𝑡 .
• Then the system may be described by
𝑥1 𝑡 = 𝑓1(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)

𝑥2 𝑡 = 𝑓2(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)

𝑥𝑛 𝑡 = 𝑓𝑛(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)


State Space Equations
• The outputs 𝑦1 𝑡 , 𝑦2 𝑡 , ⋯ , 𝑦𝑚 𝑡 of the system may be given as.
𝑦1 𝑡 = 𝑔1(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)
𝑦2 𝑡 = 𝑔2(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)

𝑦𝑚 𝑡 = 𝑔𝑚(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)


• If we define
𝑥1 𝑓1(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)
𝑥2 𝑓2(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)
𝒙 𝑡 = ⋮ 𝒇 𝒙, 𝒖, 𝑡 =
⋮ 𝑢1
𝑥𝑛 𝑓𝑛(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)
𝑢2
𝒖 𝑡 = ⋮

𝑦1 𝑢𝑟
𝑔1(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)
𝑦2 𝑔2(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)
𝒚 𝑡 = ⋮ 𝒈 𝒙, 𝒖, 𝑡 =

𝑦𝑚 𝑔𝑚(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)
State Space Modeling

• State space equations can then be written as

𝒙 𝑡 = 𝒇(𝒙, 𝒖, 𝑡) State Equation

𝒚 𝑡 = 𝒈(𝒙, 𝒖, 𝑡) Output Equation

• If vector functions f and/or g involve time t explicitly, then


the system is called a time varying system.
State Space Modeling
• If above equations are linearised about the operating
state, then we have the following linearised state
equation and output equation:

x(t)  A(t)x(t) B(t)u(t) y(t)  C(t)x(t) D(t)u(t)


State Space Modeling
• If vector functions f and g do not involve time t explicitly then
the system is called a time-invariant system.

• In this case, state and output equations can be simplified to


x(t)  Ax(t) Bu(t) y(t)  Cx(t) Du(t)

B C

A
Example-1
• Consider the mechanical system shown in figure. We assume that
the system is linear. The external force u(t) is the input to the
system, and the displacement y(t) of the mass is the output. The
displacement y(t) is measured from the equilibrium position in the
absence of the external force. This system is a single-input, single-
output system.

• From the diagram, the system equation is

𝑚𝑦(𝑡) + 𝑏𝑦(𝑡) + 𝑘𝑦(𝑡) = 𝑢(𝑡)

• This system is of second order. This means that


the system involves two integrators. Let us
define state variables 𝑥1(𝑡) and 𝑥2(𝑡) as

𝑥1 𝑡 = 𝑦(𝑡)
𝑥2 𝑡 = 𝑦(𝑡)
Example-1
𝑥1 𝑡 = 𝑦(𝑡) 𝑥2 𝑡 = 𝑦(𝑡) 𝑚𝑦(𝑡) + 𝑏𝑦(𝑡) + 𝑘𝑦(𝑡) = 𝑢(𝑡)

• Then we obtain
𝑥1 𝑡 = 𝑥2(𝑡)
𝑏 𝑘 1
𝑥2 𝑡 = − 𝑦 𝑡 − 𝑦 𝑡 + 𝑢 (𝑡)
𝑚 𝑚 𝑚
• Or
𝑥1 𝑡 = 𝑥2(𝑡)
𝑏 𝑘 1
𝑥2 𝑡 = − 𝑥2 𝑡 − 𝑥1 𝑡 + 𝑢 (𝑡)
𝑚 𝑚 𝑚
• The output equation is
𝑦 𝑡 = 𝑥1 𝑡
Example-1
𝑏 𝑘 1
𝑥1 𝑡 = 𝑥2 (𝑡) 𝑥2 𝑡 = − 𝑥2 𝑡 − 𝑥1 𝑡 + 𝑢 (𝑡) 𝑦 𝑡 = 𝑥1 𝑡
𝑚 𝑚 𝑚

• In a vector-matrix form,

 x1 (t)   0 1  x (t)  0 

 x (t)  k
1
b   (t)  1 u(t)
  x   
 2   m m  2 m 


y(t)  1 0 x1 (t) 


 x (t) 
 2 

Example-1

• State diagram of the system is

𝑥1 𝑡 = 𝑥2(𝑡)
𝑏 𝑘 1
𝑥2 𝑡 = − 𝑥2 𝑡 − 𝑥1 𝑡 + 𝑢 (𝑡)
𝑚 𝑚 𝑚

𝑦 𝑡 = 𝑥1 𝑡

-k/m

-b/m
𝑥2
𝑢(𝑡) 1/m 1/s 1/s
𝑥1
𝑦(𝑡)
𝑥2 = 𝑥1
Example-1
• State diagram in signal flow and block diagram format

-k/m

-b/m
𝑥2
𝑢(𝑡) 1/m 1/s 1/s
𝑥1
𝑦(𝑡)
𝑥2 = 𝑥1
Transfer Matrix (State Space to T.F)
• Now Let us convert a space model to a transfer function model.
x(t) Ax(t) Bu(t) (1)

y(t ) Cx(t ) Du(t ) (2)

• Taking Laplace transform of equation (1) and (2) considering initial


conditions to zero.
sX (s) AX (s) BU (s) (3)

Y (s)  CX (s) DU (s) (4)

• From equation (3)

(sI  A) X (s) BU (s)

X (s)  (sI  A)1 BU (s) (5)


Transfer Matrix (State Space to T.F)
• Substituting equation (5) into equation (4) yields

Y (s)  C(sI  A)1 BU (s) DU (s)

 
Y (s)  C(sI  A)1 B D U (s)

Y (s) 1
 C(sI  A) B  D
U (s)
Example#3

• Convert the following State Space Model to


Transfer Function Model if K=3, B=1 and
M=10;
 x  0 1   x   0 
B    
 v  K  v  1 f (t )

   M M     
M 


 x 
y(t)  0 1 v 
 

Example#3

• Substitute the given values and obtain A, B, C


and D matrices.


x  0 1   x   0 
 v   3 1     1  f (t)
   v   
   10 10   10 


 x 
y(t)  0 1 v 
 

Example#3
 0 1   0 
A 3 1  B   1 
 
10

 10 

 10

D0
C  0 1

Y (s) 1
 C(sI  A) B  D
U (s)
Example#3
 0 1   0 
A 3 1  B   1 
 
10
 

 10 

 10

D0
C  0 1

1
s 0  0 1    0 
 0 1  1 
Y (s)
  3  1 
U (s)  0 s     10 
   10 10 
Example#3
1
s 0  0 1    0 
 0 1  1 
Y (s)
 3  1 
U (s)  0 s     10 
   10 10 
1
 s 1    0 
Y (s)
 0 1 3 1    1 
U (s)  s    10
 10 10 

 1 
s  10 1  0 
 0 1
Y (s) 1
  1 
3
s 10 
U (s) 1 3
s(s  )   
10 10  10 
Example#3
 1 
s  10 1  0 
 0 1
Y (s) 1
  1 
3
s 10 
U (s) 1 3
s(s  )   
10 10  10 

Y (s)  1  3  1 
 0
  s   
U (s) s(s  1 )  3  10  10 
10 10

Y (s)  1 s

U (s) s(s  1 )  3 10
10 10
Example#3
Y (s)  1 s

U (s) s(s  1 )  3 10
10 10

Y (s) s

U (s) s(10s 1)  3
Home Work
• Obtain the transfer function T(s) from
following state space representation.

Answer
Solution of State Equations
• Consider the state equation given below
x(t)  Ax(t) (1)

• Taking Laplace transform of the equation (1)


sX (s) x(0) AX (s)
sX (s) AX (s) x(0)

sI  AX (s) x(0)


X (s)  sI  A x(0)
1

1 x(0)
X (s) 
sI  A
Solution of State Equations
1 x(0)
X (s) 
sI  A
• Taking inverse Laplace

x(t)  e x(0)
At

 (t)  e At
State Transition Matrix
Example-4
• Consider RLC Circuit obtain the state transition matrix ɸ(t).

 1  Vo
 C vc   
1 iL
 c
v  0
 C u(t )

  + +

i   1 R  i    Vc

 L   
   L   0  - -
L L 

R  3, L  1 and C  0.5

2
vc  1
0  2vc   u(t )
 i    3 i  0
 L   L   
Example-4 (cont...)

2
vc  1
0  2vc   u(t )
 i    3 i  0

 L   L   
• State transition matrix can be obtained as
0  0  2  
1
 S 
(t ) � 1[(SI  A)1] � 1        
 S  1  3   

 0 
• Which is further simplified as

 S  3 2 

 (S  1)(S  2)
(t )  � 
1 (S  1)(S  2)  

 1 S 
(S  1)(S  2) (S  1)(S  2) 

Example-4 (cont...)
 S  3  
2 

1 (S  1)(S  2) (S  1)(S  2) 
(t )  �  
 1 S 
(S  1)(S  2) (S  1)(S  2) 

• Taking the inverse Laplace transform of each element

t t 2t
( )  (2e  e2t ) (2e  2e )
t  t 
2t t 2t
 (e  e ) (e  2e ) 
Home Work
• Compute the state transition matrix if

1 0 0 

A  0 2 
0 
 0 0  3

Solution

1 1
 (t)  � [(SI  A) ]
State Space Trajectories
• The unforced response of a system released from any initial
point x(to) traces a curve or trajectory in state space, with
time t as an implicit function along the trajectory.

• Unforced system’s response depend upon initial conditions.

x(t)  Ax(t)
• Response due to initial conditions can be obtained as

x(t)  (t)x(0)
State Transition
• Any point P in state space represents the state of the system
at a specific time t.
x2
P(x1, x2)

x1

• State transitions provide complete picture of the system


x2
t0
t1
t6 t2

t3
x1
t5 t4
Example-5
• For the RLC circuit of example-4 draw the state space trajectory
with following initial conditions.
vc (0)  1

i (0) 2 
• Solution  L   

x(t)  (t)x(0)
t t 2t
v 
 c  (2e  e ) (2et  2e2t )1
2t
i   (et 2t (e  2e )  
e ) 2
 L   

 t
   3e  3e2t 
v vc 3et  3e2t
 c    t 2t
2t 
 L  
i  e t
 3e  iL  e  3e
Solution of State Equations
• Consider the state equation with u(t) as forcing function
x(t)  Ax(t)  Bu(t) (1)

• Taking Laplace transform of the equation (1)

sX (s) x(0) AX (s) BU (s)


sX (s) AX (s) x(0) BU (s)

sI  AX (s) x(0) BU (s)


X (s)  x(0)  BU (s)
sI  A
Solution of State Equations
X (s)  x(0)  BU (s)
sI  A

X (s)  x(0)  BU (s)


sI  A sI  A
• Taking the inverse Laplace transform of above equation.
t

x(t)   (t)x(0)   (t   )Bu( )dt


 0

Natural Response
Forced Response
Example#6
• Obtain the time response of the following system:
0
 x1   0 1 
 x1   u(t)
 x   2  3 x  1
 2   2   
• Where u(t) is unit step function occurring at t=0.
consider x(0)=0.
Solution

• Calculate the state transition matrix


1 1
 (t)  � [(SI  A) ]
Example#6
• Obtain the state transition equation of the system
t

x(t)  (t)x(0)   (t   )u( )dt


0
STATE DIAGRAM
From Differential Equations to State
Diagrams
Eigenvalues & Eigenvectors
Example-2
• State space representation of armature Controlled D.C Motor.
Ra La
B 
ia
ea eb T J


• ea is armature voltage (i.e. input) and  is output.

dia
ea Raia  La  eb
dt
T  J B
Example-2 
T  Ktia eb  K b

JB
-K t ia 0
dia
La  Raia  K b  ea
dt
• Choosing 𝜃, 𝜃 𝑎𝑛𝑑 𝑖𝑎 as state variables
10 0
𝐵 𝐾𝑡 0
𝜃
𝑑 𝜃 = 0 −𝐽 𝜃
𝐽 𝜃 + 0 𝑒
𝑑𝑡 𝑖𝑎 1 𝑎
𝐾𝑏 𝑅𝑎 𝑖𝑎
0 − − 𝐿𝑎
𝐿𝑎 𝐿𝑎
• Since 𝜃 is output of the system therefore output equation is given as

𝜃
𝑦 𝑡 = 1 0 0 𝜃
𝑖𝑎
State Controllability
• A system is completely controllable if there exists an
unconstrained control u(t) that can transfer any initial
state x(to) to any other desired location x(t) in a finite
time, to ≤ t ≤ T.

uncontrollable

controllable
State Controllability
• Controllability Matrix CM


CM  B AB A2B An1 B 


• System is said to be state controllable if

rank(CM )  n
State Controllability (Example)
• Consider the system given below

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

• State diagram of the system is


U (s) 1 s-1 x1
1
Y (s)
1
2
 3 x2
s-1
State Controllability (Example)
• Controllability matrix CM is obtained as
CM  B AB
1 AB  1
B     0 
0
    
• Thus

1 1
CM   
0 0 

• Since 𝑟𝑎𝑛𝑘(𝐶𝑀) ≠ 𝑛 therefore system is not completely


state controllable.
State Observability
• A system is completely observable if and only if there exists a finite
time T such that the initial state x(0) can be determined from the
observation history y(t) given the control u(t), 0≤ t ≤ T.

observable
unobservable
State Observability
• Observable Matrix (OM) 
 C 
 CA 
 
Observability Matrix OM   CA 
2

 
 ⁝ 
CA n1 

• The system is said to be completely state observable if

rank(OM )  n
State Observability (Example)
• Consider the system given below
0 1  0
x   x  u
0  2 
1
 
y  0 4x

• OM is obtained as C 
OM  
CA

  

• Where C  0 4


0 1 
CA  0 4  0 12
0  2
 
State Observability (Example)
• Therefore OM is given as
0
4 
OM  
0 12

 

• Since 𝑟𝑎𝑛𝑘(𝑂𝑀) ≠ 𝑛 therefore system is not completely state


observable.

U (s) 1 s-1 x2 s-1 x1 Y (s)

2
Output Controllability
• Output controllability describes the ability of an external
input to move the output from any initial condition to any
final condition in a finite time interval.

• Output controllability matrix (OCM) is given as


OCM  CB CAB CA 2B CAn1B 
Home Work
• Check the state controllability, state observability
and output controllability of the following system

0 1 0
A   0 , B  1, C  0 1
1   

You might also like