Objectives
Students should be able to:
Find a mathematical model, called a state-space
representation, for a linear, time-invariant
system.
Model electrical and mechanical systems in state
space representation.
Convert between transfer function and state-
space models.
INTRODUCTION
Two approaches are available for the analysis and design
in feedback control system.
Classical, or frequency domain technique
Modern, or time domain technique
Classical Modern
Frequency
Time domain
domain
INTRODUCTION
Classical, or frequency domain technique
Convert a system’s differential equation to a transfer
function, thus generating a mathematical model of system
that relates output to input.
Advantage - can rapidly provide stability and transient
response information.
Disadvantage - limited applicability, can be applied only to
linear, time invariant system.
INTRODUCTION
Modern, or time domain technique
Unified method for modeling, analyzing, designing a wide
range of systems.
It can be used to represent non-linear system and can
handle a system with non-zero initial condition.
Time varying system can be represented in state space,
multiple input and multiple output.
SOME OBSERVATIONS
Select a particular subset of all possible system variables and call
the variables in this subset state variables.
For nth order system, we write n simultaneous, first order DE in
terms of state variables called state equations.
If we know the initial condition of all state variables at to to as
well as system input for t >= to, we can solve the simultaneous
DE for state variables for t >= to.
We algebraically combine the state variables with the system’s
input and find all of the other system variables for t >= to, called
as output equation.
The state equations and the output equations is a viable
representation of the system, called as state-space
representation.
DEFINITION
A state space representation is a mathematical model of a
physical system as a set of input, output and state variables related
by first-order differential equations.
To abstract from the number of inputs, outputs and states, the
variables are expressed as vectors.
If the dynamical system is linear and time invariant, the differential
and algebraic equations may be written in matrix form.
The state space representation provides a convenient and compact
way to model and analyze systems with multiple inputs and
outputs.
State space refers to the space whose axes are the state variables.
The state of the system can be represented as a vector within that
space.
THE GENERAL STATE-SPACE REPRESENTATION
A state-space representation consist of
simultaneous first order DE from which the state variables can
be solved.
algebraic output equation from which all other system variables
can be found.
A system is represented in state space by the following equations:
x Ax Bu state equation
y Cx Du output equation
for t >= to and initial conditions, x(to), where
THE GENERAL STATE-SPACE REPRESENTATION
As an example, for a linear, invariant, 2nd order with single input,
v(t) the state equation could be the following:
dx1
a11 x1 a12 x2 b1v (t )
dt
dx2 x Ax Bu
a21 x1 a22 x2 b2 v (t )
dt
dx1
dt a11 a12 x1 b1 v (t )
dx a a x b
2 dt 21 22 2 2
THE GENERAL STATE-SPACE REPRESENTATION
x1 and x2 are the state variables.
If there is a single input, the output equation could take on the
following term:
y c1 x1 c2 x2 d1v (t )
y Cx Du
x1
y c1 c 2 d 1 v ( t )
x2
THE GENERAL STATE-SPACE REPRESENTATION
In this section we apply the state-space formulation to
the representation of more complicated physical system.
Block diagram representation of the state space equations
APPLYING THE STATE-SPACE REPRESENTATION
The first step in representing a system is to select the state
vector, which must be chosen according to the following
considerations:
A minimum number of state variables must be selected as
components of the state vector.
This minimum number of state variables is sufficient to
describe completely the state of the system.
The components of state vector must be linearly
independent.
CONVERTING A TRANSFER FUNCTION TO
STATE SPACE
Example 5.1
Find the state equations for the translational mechanical
system shown in figure.
CONVERTING A TRANSFER FUNCTION TO
STATE SPACE
Example 5.1
Solution:
First draw the FBD for the two masses. Assume zero initial
conditions and obtain the DE equation,
2
d x1 dx1
M1 2 D d Kx1 Kx2 0
dt dt
d 2 x2
Kx1 M 2 2 Kx2 f (t )
t
CONVERTING A TRANSFER FUNCTION TO
STATE SPACE
Example 5.1
Solution:
2 2
Now let d x dv1 and d x2 dv2
2
1
2
dt dt dt dt
and also select x1, v1, x2, v2 as state variables.
CONVERTING A TRANSFER FUNCTION TO
STATE SPACE
Example 5.1
Solution:
Next, form the state equations
dx1
v1
dt
dv1 K D K
x1 v1 x2
dt M1 M1 M1
dx2
v2
dt
dv2 K K 1
x1 x2 f (t )
dt M2 M2 M2
CONVERTING A TRANSFER FUNCTION TO
STATE SPACE
Example 5.1
Solution:
Finally you will get:
0 1 0 0
x1
x1
0 x1
v K M D K 0 0 v
M1 M1 v1
1 1
0 f (t ) y 0 0 1 0 1
x2 0 0 0 1 x2 x2
K v 1
v2 K 0 0 2 M2 v2
M2 M2
if the output is x2.
Example 5.2
Produce the state space representation for the translational mechanical
system shown below where x1 is the output.
dx1
dt v1
dv x1 d 2 x
1 v 21
State variables are given as: dt 1 dt
dx 2 x 2 v 2
dt d 2 x 2
dv v2 2
2 dt
dt
Example 5.2
First, draw the free body diagram and get the simultaneous equations.
Second, write the DE equations.
d 2 x1 dx1 dx 2
M1 2
D ( K 1 K 2 ) x1 D K 2 x2 0
dt dt dt
dx1 d 2 x2 dx 2
D K 2 x1 M 2 2
D ( K 2 K 3 ) x 2 f (t )
dt dt dt
dx1 dv1 ( K1 K 2 ) D K2 D
v1 x1 v1 x2 v2
dt dt M1 M1 M1 M1
dx 2 dv 2 K2 D (K 2 K3 ) D 1
v2 x1 v1 x2 v2 f (t )
dt dt M2 M2 M2 M2 M2
0 1 0 0 0
x1 ( K1 K 2 )
D K2 D 1 x
v 0
1 M1 M1 M1 M 1 v1
x 2 0 0 0 1 x2 0
K2 D (K 2 K 3 ) D 1
v2 v2 M
M2 M2 M2 M 2 2
x1
v
y 1 0 0 0 1
x2
v2
CONVERTING A TRANSFER FUNCTION TO
STATE SPACE
One advantage of the state-space representation is that it
can be used for the simulation of physical systems on the
digital system.
Thus, if we want to simulate a system that is represented by
a transfer function, we must first convert the transfer
function representation to state space.
CONVERTING A TRANSFER FUNCTION TO
STATE SPACE
Consider a differential equation
n n 1
d y d y dy
an1 n1 ... a1 a0 y b0u
dt dt dt
CONVERTING A TRANSFER FUNCTION TO
STATE SPACE
Choosing state variable, xi, we get
x1 y
dy
x2
dt
2
d y
x3 2 …Eq 1
dt
d n1 y
xn n1
dt
CONVERTING A TRANSFER FUNCTION TO
STATE SPACE
and differentiating both side yields
dy
x1
dt
d2y
x2 2
dt
d3y
x3 3 …Eq 2
dt
dny
xn n
dt
CONVERTING A TRANSFER FUNCTION TO
STATE SPACE
Substituting eq. 1 into 2, the state equations are evaluated
as
x1 x2
x2 x3
…Eq 3
xn 1 xn
xn a0 x1 a1 x2 ... an1 xn b0u
CONVERTING A TRANSFER FUNCTION TO
STATE SPACE
n
Eq 3 is obtained from Eq 1 by solving for ny using Eq 2.
d
dt
In matrix form, the state equation becomes
x1 0 1 0 0 0 0 ... 0 x1 0
x x 0
2 0 0 1 0 0 0 ... 0 2
x3 0 0 0 1 0 0 ... 0 x3 0
u
...
x n1 0 0 0 0 0 0 ... 1 xn1 0
-a -a -a
n 0 1 2 3 4 5
x -a -a -a ... -a n 1
xn b0
x1
and the output equation x
2
x3
y 1 0 0 0 ... 0
xn1
xn
CONVERTING A STATE SPACE TO
TRANSFER FUNCTION
Given the state and output equations:
x Ax Bu and y Cx Du
Take Laplace transform, assuming zero initial conditions,
sX ( s ) AX ( s ) BU ( s )
Y ( s ) CX ( s ) DU ( s )
Solving for x
sI AX ( s ) BU ( s ) X ( s ) sI A BU ( s )
1
where I is the identity matrix.
CONVERTING A STATE SPACE TO
TRANSFER FUNCTION
Substitute eq. x( s ) sI A 1 BU ( s ) into eq.
Y ( s ) Cx( s ) DU ( s )
Y ( s ) C sI A BU ( s ) DU ( s ) ( C sI A B D )U ( s )
-1 -1
If u(s) and Y(s) are scalar, we can find the transfer function:
Y( s )
T( s ) C sI A B D
-1 Transfer Function Matrix
U( s )
CONVERTING A STATE SPACE TO
TRANSFER FUNCTION
Example 5.3
Given a state space representation:
x1 0 1 x1 0 x1
x - 2 - 3 x 2u y 1 0
and x2
2 2
x Ax Bu y Cx Du
0 1 0
A B C 1 0 D0
- 2 - 3 2
CONVERTING A STATE SPACE TO
TRANSFER FUNCTION
Example 5.3
Solution:
( sI A) ?
s 0 0 1 s - 1
( sI A)
0 s - 2 - 3 2 s 3
Therefore
s3 1
-2
adj( sI A) s
( sI A) 1 2
det( sI A) s 3s 2
CONVERTING A STATE SPACE TO
TRANSFER FUNCTION
Example 5.3
Solution:
Substituting (sI-A)-1, B, C and D into transfer function
matrix Eq.:
Y (s)
G (s) C sI A -1 B D
U (s)
We obtain the transfer function:
s3 1
-2 s 0
Y ( s)
1 0 2
U (s) s 3s 2 2
CONVERTING A STATE SPACE TO
TRANSFER FUNCTION
Example 5.3
Solution:
Then
0
s 3 1
Y( s ) 2 2
2 2
U( s ) s 3s 2 s 3s 2
CONVERTING A STATE SPACE TO
TRANSFER FUNCTION
Example 5.3
Given a state space representation, find the transfer
function.
0 1 0 10
x 0 0 1 x 0 u y 1 0 0 x
- 1 - 2 - 3 0
Get A, B and C.
CONVERTING A STATE SPACE TO
TRANSFER FUNCTION
Example 5.3
Solution:
s 0 0 0 1 0
( sI A) 0 s 0 0 0 1
0 0 s - 1 - 2 - 3
s -1 0
( sI A) 0 s - 1
1 2 s 3
CONVERTING A STATE SPACE TO
TRANSFER FUNCTION
Example 5.3
Solution:
Now, form (sI - A)-1
(s 2 3s 2 ) s3 1
-1 s(s 3 ) s
1 adj( sI A ) -s -( 2 s 1 ) s 2
( sI A )
det( sI A ) s 3 3s 2 2 s 1
CONVERTING A STATE SPACE TO
TRANSFER FUNCTION
Example 5.3
Solution:
10
As B 0 C 1 0 0 D0
0
Substituting (sI-A)-1, B, C and D into transfer function
matrix eq .
Y( s )
G( s ) C sI A -1 B D
U( s )
CONVERTING A STATE SPACE TO
TRANSFER FUNCTION
Example 5.3
Solution:
(s 2 3s 2 ) s3 1
-1 s(s 3 ) s
2
10
Y( s ) -s -( 2 s 1 ) s
G( s ) 1 0 0 0
0
U( s ) s 3 3s 2 2 s 1
0
We obtain the transfer function:
Y ( s ) 10( s 2 3s 2 )
G( s ) 3
U ( s ) s 3s 2 2 s 1