0% found this document useful (0 votes)
6 views35 pages

Introduction To SS

The document introduces state space representation in system dynamics, emphasizing the importance of state variables and their role in modeling complex systems. It contrasts traditional transfer function methods with state space techniques, highlighting advantages such as handling non-linear systems and initial conditions. Examples from mechanical and electrical systems illustrate the application of state space representation and the necessity of understanding internal behaviors for effective system analysis.

Uploaded by

Àñùp ÁĐ
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)
6 views35 pages

Introduction To SS

The document introduces state space representation in system dynamics, emphasizing the importance of state variables and their role in modeling complex systems. It contrasts traditional transfer function methods with state space techniques, highlighting advantages such as handling non-linear systems and initial conditions. Examples from mechanical and electrical systems illustrate the application of state space representation and the necessity of understanding internal behaviors for effective system analysis.

Uploaded by

Àñùp ÁĐ
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/ 35

Introduction to State Space Representation

Dr. Manas Kumar Bera


Associate Professor
Department of EE
National Institute of Technology Rourkela

Dr. Manas Kumar Bera (NITS) March, 2020 1 / 34


Outline

1 Introduction to State Space Representation

2 The Concept of State, state-variables and state model

3 Motivating examples: Mechanical Systems & Electrical network

4 Definitions: State, State vector & State Space

5 References

Dr. Manas Kumar Bera (NITS) March, 2020 2 / 34


A Conceptual Model

We regard a system as consisting of inputs u1 , u2 , ..., ur , outputs denoted y1 , y2 , ...,


ym , and internal or state variables denoted by x1 , x2 , ..., xn . Using vector notation

y1 u1 x1
     
 y2  u2  x2 
y := 
 ...  u :=  ...  x :=  ... 
     (1)

ym ur xn

denote the m-output vector, r -input vector and n-state vector respectively.
For example, in a circuit y and u might represent terminal voltages and input
voltages and x the vector of internal currents and voltages across all branches.
Considering human body, the inputs may be food intake, beverages consumed and
medication administered, and the output y may be body temperature, blood
pressure and pulse rate while the internal variables x may be heart rate, blood sugar
concentration, brain activity level and various hormone levels.

Dr. Manas Kumar Bera (NITS) March, 2020 3 / 34


u1 y1
u2 Internal y2
.. Variables ..
. .
ur x1 , x2 · · · xn ym

Figure: A conceptual model

We have learnt about transfer function representation. Analysis of systems and


synthesis of controllers have been done based on this representation.
To represent the dynamical system using transfer function requires to identify
Outputs and Inputs.
Also require to assume all initial conditions are zero.
State space representation requires to identify: Inputs, Outputs and state variables
(or internal variables).
Why do we need state variables?
What wrong can happen if we always assume initial conditions of a dynamical
system zero?
Are these initial conditions are related to state variables/ internal variables?
Dr. Manas Kumar Bera (NITS) March, 2020 4 / 34
Motivating Example

1
Consider a system with transfer function Hf (s) = s−1
.
Which is unstable because of the pole in the right-half s-plane.
s−1
To stabilize it, we can precede Hf (s) with a compensator Hc (s) = s+1
.
1 s−1 1
We get the overall transfer function Hf (s)Hc (s) = s−1 s+1
= s+1
.
This is nice outcome. The overall system looks stable. To verify let us try and
simulate this system on an analog computer.
But unfortunately this technique will not work: After a while the system will tend to
burn out or the output y (t) saturates.

Dr. Manas Kumar Bera (NITS) March, 2020 4 / 34


Components: Analog Computers

Figure: Overall System Block Diagram

Dr. Manas Kumar Bera (NITS) March, 2020 5 / 34


Implementation of the Overall System

U(s) s−1
From the block diagram Hc (s) = V (s)
= s+1

U(s)(s + 1) = V (s)(s − 1) (2)

Taking inverse Laplace Transform of (2),

u̇(t) − v̇ (t) = −u(t) − v (t) (3)


Y (s) 1
Similarly, for second sub system Hf (s) = U(s)
= s−1
.

Y (s)(s − 1) = U(s) (4)

Taking inverse Laplace Transform of (4),

ẏ (t) − y (t) = u(t) (5)

Dr. Manas Kumar Bera (NITS) March, 2020 6 / 34


Implementation of the Overall System

For this system, define the following variables


I Input: v (t)
I Output: y (t)
I x1 (t) = u(t) − v (t)
I x2 (t) = y (t)
Lets called x1 (t) and x2 (t) are states. The relation (3) with these variables can be
rewritten as

ẋ1 (t) = −u(t) + v (t) − 2v (t) (6)


= −(u(t) − v (t)) − 2v (t)
= −x1 (t) − 2v (t)

Similarly, (5) can be written as

ẏ (t) = u(t) + y (t) (7)


= u(t) − v (t) + y (t) + v (t)
ẋ2 (t) = x1 (t) + x2 (t) + v (t)

Dr. Manas Kumar Bera (NITS) March, 2020 7 / 34


Implementation of the Overall System

Sate Equations
So, the system is represented by the following two first order equations

ẋ1 (t) = −x1 (t) − 2v (t) (8a)


ẋ2 (t) = x1 (t) + x2 (t) + v (t) (8b)

Output Equation

y (t) = x2 (t) (9)

Dr. Manas Kumar Bera (NITS) March, 2020 8 / 34


Analog Computer Simulation

It can be readily verified that these simulations have the desired transfer function.
If you actually implement this on analog computer in laboratory, you will find that
the output y (t) saturates or the system burns out.
1
The overall transfer function s+1
did not say anything about this!
To find out why this happens look at the differential equation involved in the
diagram above.
Dr. Manas Kumar Bera (NITS) March, 2020 9 / 34
Analysis

To analyze the behavior of this realization, it is natural to consider the evolution of


the major variables in the realization, which are clearly the integrator outputs, say
x1 (t) and x2 (t). It is to be noted that the output of the system y (t) = x2 (t).
The variables x1 (t) and x2 (t) are the solutions of the differential equations (8a) and
(8b).
To solve these differential equations, we need to know the initial conditions x1 (0)
and x2 (0).
Suppose that x1 (0) = x10 6= 0 and x2 (0) = x20 6= 0.
How to solve these differential equations? Hint: Use Laplace transform

Dr. Manas Kumar Bera (NITS) March, 2020 10 / 34


Solutions of Differential Equations

Taking Laplace transform of (8a)

sX1 (s) − x1 (0) = −X1 (s) − 2V (s)


x10 2V (s)
X1 (s) = − (10)
s +1 s +1
Taking Laplace transform of (8b),

sX2 (s) − x2 (0) = X1 (s) + X2 (s) + V (s)


x20 X1 (s) V (s)
X2 (s) = + + (11)
(s − 1) (s − 1) (s − 1)
Substituting (10) in (11)

x20 x10 2V (s) V (s)


X2 (s) = + − +
s −1 (s − 1)(s + 1) (s − 1)(s + 1) (s − 1)
x20 x10 V (s)
Y (s) = + + (12)
s −1 (s − 1)(s + 1) (s + 1)

Dr. Manas Kumar Bera (NITS) March, 2020 11 / 34


Solutions of Differential Equations

Taking Inverse Laplace transform of (12)


1 t
y (t) = x2 (t) = e t x20 + (e − e −t )x10 + e −t ∗ v (t)(∗denotes convolution) (13)
2
The ‘actual’ transfer function matches the ‘original’, only when x10 = x20 = 0.
Unless the initial conditions can always be kept zero, y (t) will grow without bound.
almost all initial conditions will excite the unstable mode of oscillation.
For what initial condition the output does not saturate?
I Ans
1
e t x20 = − e t x10
2
x10 = −2x20

Dr. Manas Kumar Bera (NITS) March, 2020 12 / 34


Conclusion

Internal behavior of systems are complicated. Transfer function cannot describe the
internal behavior.
We require a more generic representation of the system.
STATE SPACE REPRESENTATION!

Dr. Manas Kumar Bera (NITS) March, 2020 13 / 34


The Concept of State, state-variables and state model

Introduction
A mathematical abstraction to represent or model the dynamics of a system, utilizing
three types of variables called the
Inputs
Outputs
State variables

Advantages of State Space Techniques


This approach can be applied to linear or nonlinear, time variant or time invariant,
SISO or MIMO Systems.
The nth order differential equation can be expressed as n number of equations of
first order whose solutions are easier.
It is a time domain approach.
This method is suitable for digital computer computation because this a time
domain approach.
Modern Controllers with optimization tecnique can be designed.

Dr. Manas Kumar Bera (NITS) March, 2020 14 / 34


Example 1: A Mechanical System

Figure: Mechanical System

Dynamics
Consider the mechanical system shown in figure, where mass M is acted upon by the
force F (t) = u(t). The system is characterized by the relation

d 2 x (t) dv (t)
F (t) = M =M (14)
dt 2 dt
where x (t) and v (t) is the position and velocity of the cart. The above equation can be
written as
d 1
v (t) = F (t) (15a)
dt M
d
x (t) = v (t) (15b)
dt
Dr. Manas Kumar Bera (NITS) March, 2020 15 / 34
Example 1: A Mechanical System

Objective
Compute the displacement x (t) (output variable) of the mechanical system at any time
t ≥ t0 if we know the applied force F (t) (input variable) from t = t0 onwards.

Q:
To do this, any additional information are required to compute the displacement x (t)
(output variable) of the mechanical system ?

Dr. Manas Kumar Bera (NITS) March, 2020 16 / 34


Example 1: A Mechanical System
From these relations we get

velocity
Using (15a)
Z t Z t0 Z t Z t
1 1 1 1
v (t) = F (t)dt = F (t)dt + F (t)dt = v (t0 ) + F (t)dt
M −∞
M −∞
M t0
M t0
(16)

Displacement
Using (15b)
Z t Z t0 Z t
x (t) = v (t)dt = v (t)dt + v (t)dt
−∞ −∞ t0
Zt0 Z t Z t
1
= v (t)dt + [v (t0 ) + F (t)dt]dt (using(16))
−∞ t0
M t0
Z t Z t
1
= x (t0 ) + (t − t0 )v (t0 ) + dτ F (t)dt (17)
M t0 t0

Dr. Manas Kumar Bera (NITS) March, 2020 17 / 34


Example 1: A Mechanical System

Observation
The displacement x (t) (output variable) of the mechanical system at any time t ≥ t0 can
be computed if we know the applied force F (t) (input variable) from t = t0 onwards,
provided v (t0 ) the initial velocity and x (t0 ) the displacement are known.

Conclusion
The following two variables qualify as the state variables of the system
displacement x (t)
velocity v (t)

Dr. Manas Kumar Bera (NITS) March, 2020 18 / 34


Example 2: An Electrical Network

Figure: RLC Circuit

Dr. Manas Kumar Bera (NITS) March, 2020 19 / 34


Example 2: An Electrical Network

Differential equations
Applying KVL
Z
di(t) 1
vi (t) = u(t) = Ri(t) + L + i(t)dt (18)
dt C

Z
1
v0 (t) = y (t) = i(t)dt (19)
C

Transfer Function
Taking Laplace transform of (18) and (19), assuming all initial conditions are zero
1
U(s) = RI(s) + sLI(s) + I(s) (20a)
Cs
1
Y (s) = I(s) (20b)
Cs
Transfer function
Y (s) 1
G(s) = = 2 (21)
U(s) s LC + sRC + 1
Dr. Manas Kumar Bera (NITS) March, 2020 20 / 34
Example 2: An Electrical Network

Transfer Function of Electrical Network


Substituting R = 3, L = 1, C = 1/2
2 2 2 2
G(s) = = = − (22)
s 2 + 3s + 2 (s + 1)(s + 2) s +1 s +2

Impulse response of the network is the inverse Laplace of the transfer function

g(t) = 2e −t − 2e −2t (23)

Applying an input u[t0 , ∞) to the network, the output is given by


Z t
y (t) = g(t − τ )u(τ )dτ for t ≥ t0 (24)
t0

if the network is relaxed at t0 . (Hint: Y (s) = G(s)U(s). In time domain


y (t) = g(t) ∗ u(t)).

Dr. Manas Kumar Bera (NITS) March, 2020 21 / 34


Example 2: An Electrical Network

System Output
If the network is not relaxed at t0 , the output must be computed
Z t Z t0 Z t
y (t) = g(t − τ )u(τ )dτ = g(t − τ )u(τ )dτ + g(t − τ )u(τ )dτ for t ≥ t0
−∞ −∞ t0
(25)

Effect on output y (t0 , ∞) due to the unknown input u(−∞, t0 )


Z t0 Z t0 Z t0
g(t − τ )u(τ )dτ = 2e −t e τ u(τ )dτ − 2e −2t e 2τ u(τ )dτ
−∞ −∞ −∞

= 2e −t C1 − 2e −2t C2 for t ≥ t0 (26)

where
Z t0 Z t0
C1 , e τ u(τ )dτ and C2 , e 2τ u(τ )dτ (27)
−∞ −∞

Dr. Manas Kumar Bera (NITS) March, 2020 22 / 34


Example 2: An Electrical Network

Observations
Note that C1 and C2 are independent of t. Hence if C1 and C2 are known, the output
after t ≥ t0 excited by the unknown input u(−∞, t0 ) is completely determinable.

From (25) and (26)

y (t0 ) = 2e −t0 C1 − 2e −2t0 C2 (28)

Taking the time derivative of (25) with respect to t


Z t

ẏ (t) = −2e −t C1 + 4e −2t C2 + g(0)u(t) + g(t − τ )u(τ )dτ (29)
t0
∂t

which together with g(0) = 0, implies that

ẏ (t0 ) = −2e −t0 C1 + 4e −2t0 C2 (30)

Dr. Manas Kumar Bera (NITS) March, 2020 23 / 34


Example 2: An Electrical Network

States of Electrical Network


Using (28) and (30), we obtain

C1 = 0.5e t0 (2y (t0 ) + ẏ (t0 ))


C2 = 0.5e 2t0 (y (t0 ) + ẏ (t0 )) (31)

Hence if the network is not relaxed at t0 , the output y (t) is given by


Z t
y (t) = (2y (t0 ) + ẏ (t0 )) e −(t−t0 ) − (y (t0 ) + ẏ (t0 )) e −2(t−t0 ) + g(t − τ )u(τ )dτ (32)
t0

We see that if y (t0 ) and ẏ (t0 ) are known, the output after t ≥ t0 can be uniquely
determined even if the network is not relaxed at t0 . Hence the set of numbers y (t0 ) and
ẏ (t0 ) qualifies as the state of network at t0 . Clearly, the set {C1 , C2 } also qualifies as the
state of the network.

Dr. Manas Kumar Bera (NITS) March, 2020 24 / 34


Example 2: An Electrical Network

Understanding about States


If following quantities are known
Initial current through the inductor
Initial voltage across the capacitor
Result: For any driving voltage the behavior of the network can be determined uniquely

What are the state variables in this example?


Inductor current
Capacitor voltage

Dr. Manas Kumar Bera (NITS) March, 2020 25 / 34


Definitions: State, State vector & State Space

Definition of State
The state of a dynamical system is the minimum amount of information at t0 that
together with the knowledge of the input u[t0 , ∞), determines uniquely the behavior of
the system for all t ≥ t0 .

Examples
The displacement x (t) and velocity v (t) of the cart are the state variables.
The voltage across the capacitor v (t) and the current through the inductor i(t) are
the sate variables.

Dr. Manas Kumar Bera (NITS) March, 2020 26 / 34


Definitions: State, State vector & State Space

Definition of State vector


The n-th order system have n number of state variables. The n state variables can be
considered as n component of state vector x (t), described in n-dimensional vector space
called the state space.

x1 (t)
 
 x2 (t) 
x (t) = 
 ... 
 x (t) ∈ Rn (33)

xn (t) n×1

Examples
The displacement
  x (t) and velocity v (t) of the cart are the state variables.
x (t)
x (t) = x (t) ∈ R2
v (t)
The voltage across the capacitor
 v
(t) and the current through the inductor i(t) are
i(t)
the sate variables. x (t) = x (t) ∈ R2
v (t)

Dr. Manas Kumar Bera (NITS) March, 2020 27 / 34


Definitions: State, State vector & State Space

Definition of State space


The n-dimensional space whose coordinate axes consist of the x1 axis, x2 axis, · · · , xn
axis where x1 , x2 , · · · , xn are the state variables, is called the state space. The state of
the system can be represented by a point in the state space.

Example
If the state x is considered as an element of an n-dimensional vector space, then this
vector space is also called a state space. The state of a system for time t can then be
represented as a point in the n-dimensional state space. The curve of all these points in
the state space for variable time t in a time interval is also known as a trajectory. see
Figure for an illustration of a trajectory in 3-dimensional state space.

Dr. Manas Kumar Bera (NITS) March, 2020 28 / 34


Definitions: State, State vector & State Space

Figure: trajectory in 3-dimensional state space

Dr. Manas Kumar Bera (NITS) March, 2020 29 / 34


Example

Consider the following system

ÿ (t) + ay (t) = 0 (34)

where a is a constant.
Consider the state variables are chosen as, x1 (t) = y (t) and x2 (t) = ẏ (t). With
these state variables, the above system (34) can be written as

ẋ1 = x2
ẋ2 = −ax1
√ √ √
The solution of the (34) is y (t) = sin at. So, ẏ (t) = a cos at.
With the above solution, the following can be written
√ √
ax12 + x22 = a(sin at)2 + a(cos at)2 (35)
x22
x12 + =1
a

Dr. Manas Kumar Bera (NITS) March, 2020 30 / 34


Example

From, (35), if a = 1, which is a equation of circle, hence, the state trajectory is


circle.
From, (35), if a > 1, which is a equation of ellipse with major axis x2 .
From, (35), if a < 1, which is a equation of ellipse with major axis x1 .
Conclusion: For an n-dimensional LTI system will have a single trajectory in the
state space for a given initial condition.

Dr. Manas Kumar Bera (NITS) March, 2020 31 / 34


State trajectory

Figure: state trajectory in 2-dimensional state space

Dr. Manas Kumar Bera (NITS) March, 2020 32 / 34


References

N. Nise (2008), Control Systems Engineering. Hoboken, NJ: Wiley.


R. Dorf and R. Bishop (2005), Modern Control Systems. Upper Saddle River,
NJ:Pearson Education.
K. Ogata (2002), Modern Control Engineering. Upper Saddle River, NJ: Prentice
Hall.
C. T. Chen, Linear System Theory and Design, The Oxford Series in Electrical and
Computer Engineering.

Dr. Manas Kumar Bera (NITS) March, 2020 33 / 34


Thank you !!

Dr. Manas Kumar Bera (NITS) March, 2020 34 / 34

You might also like