Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

Lecture 3 : State-Space Representation

Modern Control systems

It Chivorn

Institute of Technology of Cambodia

I4GEE-EA, 2023

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 1 / 26
Table of Contents

1. Introduction

2. Block diagram of LIT system

3. State Space Representation of Differential Equations

4. State Space Variables from Transfer Functions

5. Type of models for purposes

6. Transfer Functions and State-Space Equations

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 2 / 26
Introduction

Table of Contents

1. Introduction

2. Block diagram of LIT system

3. State Space Representation of Differential Equations

4. State Space Variables from Transfer Functions

5. Type of models for purposes

6. Transfer Functions and State-Space Equations

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 3 / 26
Introduction

Introduction

As systems become more complex, representing them with differential equations or


transfer functions becomes cumbersome. This is even more true if the system has
multiple inputs and outputs (MIMO). This lecture introduces the state space method
which largely alleviates this problem.

Figure 1: Systems inputs and output

The state space model can be represented as,



 d x = f (x, u, t), State equation
dt
y = h(x, u, t), Observation equation

x(t) ∈ Rn , u(t) ∈ Rm , y(t) ∈ Rp


x = [x1 , x2 , · · · , xn ]T , y = [y1 , y2 , · · · , yp ]T , u = [u1 , u2 , · · · , um ]T
It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 4 / 26
Introduction

Introduction

We will typically deal with the time-invariant case Linear Time-Invariant (LTI) state
dynamics (
ẋ = Ax + Bu, State equation
y = Cx + Du, Observation equation

▶ t ∈ R denotes time
▶ x(t) ∈ Rn is the state (vector)
▶ u(t) ∈ Rm is the input or control
▶ y(t) ∈ Rp is the output
▶ f (·, ·) is a nonlinear vector function that describes the dynamics.
▶ A ∈ Rn×n is the dynamics matrix
▶ B ∈ Rn×m is the input or control matrix
▶ C ∈ Rp×n is the output or sensor matrix
▶ D ∈ Rp×m is the feedthrough matrix (most D = 0)
So that now, A, B, C, D are constant and not depend on t.

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 5 / 26
Introduction

Introduction

Definition
State Vector: A n-dimensional vector whose components are n state variables that
describe the system completely.
State Space: are models that use state variables to describe a system by a set of
first-order differential or difference equations, rather than by one or more nth-order
differential or difference equations
Note: For any dynamical system, the state space remains unique, but the state
variable are not unique.

State Space Representation


▶ Nonlinear System (
ẋ = f (x, u, t)
y = h(x, u, t)
▶ Linear System (
ẋ = Ax + Bu
y = Cx + Du
n
x(t) ∈ R , u(t) ∈ Rm , y(t) ∈ Rp
It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 6 / 26
Introduction

Introduction

Why State space representation is used?


▶ Wide class of systems can be represented.
(Linear time varying system, Nonlinear systems)
Behavior of system can be interpreted geometrically
▶ Rich design methods are developed.
(Numerical algorithm can be implemented easily)
▶ System model can easily used or realization
(Anti-causal systems cannot be represented)
System simulation
Controller realization
▶ Some information may be lacked by transfer function
(Controllability, Observability)

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 7 / 26
Block diagram of LIT system

Table of Contents

1. Introduction

2. Block diagram of LIT system

3. State Space Representation of Differential Equations

4. State Space Variables from Transfer Functions

5. Type of models for purposes

6. Transfer Functions and State-Space Equations

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 8 / 26
Block diagram of LIT system

Block diagram of LIT system

Figure 2: System block diagram


(
ẋ = Ax + Bu
y = Cx + Du

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 9 / 26
Block diagram of LIT system

Example : 1

Example
Consider an 3th order system represented by a single 3th order deferential equation
with input f and output q.
...
q + a1 q̈ + a2 q̇ + a3 q = b0 f

Express the state space model represented of the system.

Solution
We can define 3 new variables, x = [x1 , x2 , x3 ]T → ẋ = [ẋ1 , ẋ2 , ẋ3 ]T where,

x1 = q ẋ1 = q̇ = x2
x2 = q̇ → ẋ2 = q̈ = x3 (1)
...
x3 = q̈ ẋ3 = q

but
...
ẋ3 = q = −a1 q̈ − a2 q̇ − a3 q + b0 f
(2)
= −a1 x3 − a2 x2 − a3 x1 + b0 u

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 10 / 26
Block diagram of LIT system

Example : 1

Solution
from (1) and (1) we can now rewrite

ẋ1 = 0x1 + x2 + 0x3


ẋ2 = 0x1 + 0x2 + x3 (3)
ẋ3 = −a3 x1 − a2 x2 − a1 x3 + b0 u

This is compactly written in state space format as


      
ẋ1 0 1 0 x1 0
ẋ = Ax + Bu = ẋ2  =  0 0 1  x2  +  0  u (4)
ẋ3 −a3 −a2 −a3 x3 b0
 
  x1  
output: y = q = x1 = 1 0 0 x2  + 0 u
x3
   
0 1 0 0    
A= 0 0 1 , B = 0, C = 1 0 0 , D = 0
−a3 −a2 −a3 b0
It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 11 / 26
Block diagram of LIT system

Example : 1 (Alternate state space representations)

Solution
We can define 3 new variables, x = [x1 , x2 , x3 ]T → ẋ = [ẋ1 , ẋ2 , ẋ3 ]T

x1 = q + q̇ ẋ1 = q̇ + q̈ = x1 + x3
x2 = q̇ → ẋ2 = q̈ = x3 + q = x3 + x1 − x2 (5)
...
x3 = q̈ − q ẋ3 = q − q̇

but ...
ẋ3 = q − q̇ = −a1 q̈ − a2 q̇ − a3 q + b0 f − q̇
(6)
= −a1 x3 − (1 + a2 )x2 − a3 x1 + b0 u

Written in state space model: ẋ = Ax + Bu


      
ẋ1 1 0 1 x1 0
ẋ2  =  1 −1 1  x2  +  0  u (7)
ẋ3 −a3 −(1 + a2 ) −a3 x3 b0
 
 x
1 0 0  1  
  
x1
output: y = = x2 + 0 u
x3 0 0 1
x3
It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 12 / 26
State Space Representation of Differential Equations

Table of Contents

1. Introduction

2. Block diagram of LIT system

3. State Space Representation of Differential Equations

4. State Space Variables from Transfer Functions

5. Type of models for purposes

6. Transfer Functions and State-Space Equations

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 13 / 26
State Space Representation of Differential Equations

State Space Representation of Differential Equations

nth order of differential equation

y (n) + an1 y (n−1) + · · · + a1 ẏ + ao y = b0 u

Choose output y(t) and its (n − 1) derivatives as state variable

x1 = y ẋ1 = ẏ = x2
   
 x2 = ẏ   ẋ2 = ÿ = x3 
 ..  → differentiating →  ..
   

 .   . 
(n−1) (n)
xn = y ẋn = y

ẋn = y (n) = −an−1 y (n−1) − · · · − a1 ẏ − ao y + b0 u

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 14 / 26
State Space Representation of Differential Equations

State Space Representation of Differential Equations

Controllable Canonical Form


    x1   
ẋ1 
0 1 0 ··· 0 0 0
 ẋ2   0 0 1 ··· 0 0  x2  0
      
 ẋ3   .. .. .. .. ..   x3
  0
= . . . . 0 .  +  . u
     
 .  .
 ..   ..
 .
 .   .. 
     
ẋn−1  0 0 0 . 0 1 
xn−1  0
ẋn −a0 −a1 −a2 ··· −an−2 −an−1 xn b0
 
x1
   x2 

  
y= 1 0 ··· 0  . + 0 u
 .. 
xn

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 15 / 26
State Space Variables from Transfer Functions

Table of Contents

1. Introduction

2. Block diagram of LIT system

3. State Space Representation of Differential Equations

4. State Space Variables from Transfer Functions

5. Type of models for purposes

6. Transfer Functions and State-Space Equations

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 16 / 26
State Space Variables from Transfer Functions

State Space Variables from Transfer Functions

Consider the n th order differential transfer function


Y (s) bn sn + bn−1 sn−1 + · · · + b1 s + b0
H(s) = = n
U (s) s + an−1 sn−1 + · · · + a1 s + a0

Let V (s) be an auxiliary variable where


Input U (s) = (sn + an−1 sn−1 + · · · + a1 s + a0 )Z(s) = D(s)Z(s)
Output Y (s) = (bn sn + bn−1 sn−1 + · · · + b1 s + b0 )Z(s) = N (s)Z(s)

Figure 3: System block diagram

Convert into differential equation


Input equ : u = z (n) + an−1 z (n−1) + · · · + a1 ż + a0 z
Output equ : y = bn z (n) + bn−1 z (n−1) + · · · + b1 ż + b0 z

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 17 / 26
State Space Variables from Transfer Functions

State Space Variables from Transfer Functions

Let
x1 = z ẋ1 = ż = x2
   
 x2 = ż   ẋ2 = z̈ = x3 
 ..  → differentiating →  ..
   

 .   . 
(n−1)
xn = z ẋn = z (n)

ẋn = z (n) = −an−1 z (n−1) − · · · − a1 ż − ao z + u


= −an−1 xn − · · · − a1 ẋ2 − ao x1 + u

Controllable Canonical Form


     x1   
ẋ1 0 1 0 ··· 0 0 0
 ẋ2   0 0 1 ··· 0 0  x2   0
      
 ẋ3   . .. .. .. .. x3   0
  .
= . . . . 0 .  + . u
    
 . ..
 ..    .. 
..  .
  
     
ẋn−1  0 0 0 . 0 1  xn−1   0
ẋn −a0 −a1 −a2 ··· −an−2 −an−1 xn 1

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 18 / 26
State Space Variables from Transfer Functions

State Space Variables from Transfer Functions

y = bn z (n) + bn−1 z (n−1) + · · · + b1 ż + b0 z

Relate to input : z (n) = −an−1 z (n−1) − · · · − a1 ż − ao z + u

y = (bn−1 − bn an−1 )z (n−1) + · · · + (b1 − bn a1 )ż + (b0 − bn a0 )z + bn u


 
x1
 x2   

 
y = (b0 − bn a0 ) (b1 − bn a1 ) · · · (bn−1 − bn an−1)  .  + bn u
 .. 
xn

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 19 / 26
Type of models for purposes

Table of Contents

1. Introduction

2. Block diagram of LIT system

3. State Space Representation of Differential Equations

4. State Space Variables from Transfer Functions

5. Type of models for purposes

6. Transfer Functions and State-Space Equations

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 20 / 26
Type of models for purposes

Type of models for purposes

1. Ideal Physical Model


(Assumptions for analytically models)
2. Ideal Mathematical Model
(Model for numerical simulation)
3. Approximated Mathematical Model
(Model for controller design)

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 21 / 26
Type of models for purposes

Example : 2

1. Ideal physical mode


▶ Rigidity
▶ Linear viscosity
▶ No change of mass
2. Ideal mathematical model

(ml2 + I)θ̈ = −αθ̇ − mgl sin(θ) + τ

3. Approximated mathematical model


Figure 4: Pendulum System
(ml2 + I)θ̈ = −αθ̇ − mglθ + τ
State Equation
  " 0 1
#  " #
θ̇ θ 0
= −mgl −α + 1 τ
θ̈ θ̇
ml2 + I ml2 + I ml2 + I
Output Equation  
    θ  
y= θ = 1 0 + 0 τ
θ̇

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 22 / 26
Transfer Functions and State-Space Equations

Table of Contents

1. Introduction

2. Block diagram of LIT system

3. State Space Representation of Differential Equations

4. State Space Variables from Transfer Functions

5. Type of models for purposes

6. Transfer Functions and State-Space Equations

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 23 / 26
Transfer Functions and State-Space Equations

Transfer Functions and State-Space Equations

In what follows we shall show how to derive the transfer function of a single-input,
single-output system from the state-space equations.
Let us consider the system whose transfer function is given by
Y (s)
H(s) = (8)
U (s)
This system may be represented in state space by the following equation:
(
ẋ = Ax + Bu
(9)
y = Cx + Du

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 24 / 26
Transfer Functions and State-Space Equations

Transfer Functions and State-Space Equations

The Laplace transform of (9)

sX(s) − x(0) = AX(s) + BU (s)


(10)
Y (s) = CX(s) + DU (s)

Set the initial x(0) to be zero. The we have

X(s) = (sI − A)−1 BU (s)


(11)
Y (s) = [C(sI − A)−1 B + D]U (s)

∴ H(s) =C(sI − A)−1 B + D


Q(s) (12)
H(s) =
|sI − A|
Where Q(s) is a polynomial in s.Notice that|sI − A| is equal to the characteristic
polynomial of G(s). In other words, the eigenvalues of A are identical to the poles of
G(s).

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 25 / 26
Transfer Functions and State-Space Equations

THANK YOU ...

It Chivorn (ITC - GEE Department) Modern Control systems Oct, 22, 2023 26 / 26

You might also like