Topic 6. State-Space Approach to
Modeling Dynamic Systems
Instructor: Prof. Kwang-Hyun Cho
Department of Bio and Brain Engineering
Korea Advanced Institute of Science and Technology
Web: http://sbie.kaist.ac.kr
BiS352 System Modeling in Bioengineering
Fall 2013
Introduction
Input and output description (Black box model)
Only the relation between the input and output is considered. Inner states
are not observed.
Input
u(t)
y(t)
M
Output
y( t ) M ( u( t ))
where M(·) is an operator.
State space description (White box model)
Both input/output data and the inner states are considered at the same
time. It can help our understanding on the inner situation of systems.
x h( x ( t ), u( t ))
y g ( x( t ), u( t ))
Kwang-Hyun Cho
1
Introduction
In the previous topics, we have studied the classical analysis approach of
input-output systems both in time and complex frequency domain.
However, real complex systems may have multiple inputs and multiple
outputs. Such systems may be linear or nonlinear and may be timeinvariant or time-varying. The classical approach, based on input-output
relation, was not convenient to analyze and synthesize such systems any
more.
Rudolf Emil Kalman introduced the state-space approach into system
dynamics field, it therefore formed the modern system and control theories.
May, 1930 –
Professor Emeritus at the Swiss
Federal Institute of Technology
Among his many outstanding contributions were the
formulation and study of most fundamental state-space
notions (including controllability, observability, minimality,
realizability from input/output data, matrix Riccati equations,
linear-quadratic control, and the separation principle) that are
today ubiquitous in control. While some of these concepts
were also encountered in other contexts, such as optimal
control theory, it was Kalman who recognized the central role
that they play in systems analysis.
Kwang-Hyun Cho
Introduction
This chapter presents an introductory account of modeling dynamic
systems in state space and analyzing simple dynamic systems with
MATLAB.
If the dynamic system is formulated in the state space, it is very easy to
simulate it on the computer and find the computer solution of the system’s
differential equations, because the state-space formulation is developed
precisely with such a computer solution essentially.
Although we treat only LTI (linear time-invariant) systems in this chapter,
the state-space approach can be applied to both linear and nonlinear
systems and to both time-invariant and time-varying systems.
Kwang-Hyun Cho
2
Introduction - Definitions
State
The state of a dynamic system is the smallest set of variables such that
knowledge of these variables at t = t0, together with knowledge of the input
for t t0, completely determines the behavior of the system for any time t t0
The state of a dynamic system at time t is uniquely determined by the state
at time t0 and the input t t0 and is independent of the state and input
before t0 (this property is called ‘Markov Property’).
State variables
The state variables of a dynamic system are the variables making up the
smallest set of variables that determines the state of the dynamic system.
It is important to note that variables that do not represent physical
quantities can be chosen as state variables, for examples, the i th-order
derivative of output variable (i =1,2,…n-1).
State vector
If n state variables are needed to completely describe the behavior of a
given system, then those state variables can be considered the n
components of a vector x called a state vector.
Kwang-Hyun Cho
Introduction - Definitions
State space
The n-dimensional space whose coordinate axes consist of the x1-axis, x2axis, …, xn-axis is called a state space.
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, output and state
variables.
If a system is linear and time-invariant and if it is described by n state
variables, r input variables, and m output variables, then the state equation
will have the form:
x1 a11 x1 a12 x2 a1n xn b11u1 b12 u 2 b1r u r
x 2 a21 x1 a22 x2 a2 n xn b21u1 b22 u 2 b2 r u r
x n an1 x1 an 2 x2 ann xn bn1u1 bn 2 u 2 bnr u r
Kwang-Hyun Cho
3
Introduction - Definitions
And, the output equation will have the form:
y1 c11 x1 c12 x2 c1n xn d11u1 d12 u 2 d1r u r
y2 c21 x1 c22 x2 c2 n xn d 21u1 d 22 u 2 d 2 r u r
ym cm1 x1 cm 2 x2 cmn xn d m1u1 d m 2 u 2 d mr u r
where the coefficients aij, bij, cij, and dij are constants. If we use vectormatrix expressions, these equations can be written as:
State equation
x Ax + Bu
Dynamical relation
Output equation
y = Cx + Du
Instantaneous relation
x1
a11 a12 a1n
b11 b12 b1r
u1
x
a a a
b b b
u
2n
2r
x 2 , A 21 22
, B 21 22
, u 2
xn
an1 an2 ann
bn1 bn2 bnr
ur
y1
c11 c12 c1n
d11 d12 d1r
y
c c c
d d d
2n
2r
y 2 , C 21 22
, D 21 22
ym
cm1 cm2 cmn
dm1 dm2 dmr
Kwang-Hyun Cho
Introduction - Definitions
Matrices A, B, C and D are called the state matrix, input matrix, output
matrix, and direct transmission matrix, respectively.
Vectors x, u, and y are the state vector, input vector, and output vector,
respectively.
The elements of the state vector are the state variables.
A block diagram representation of state equation and output equation is
shown in Figure 5-1.
Figure 5-1
Kwang-Hyun Cho
4
Introduction
The first step in representing a system is to select the state vector,
which must be chosen according to the following considerations.
1.
2.
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 the state vector (that is, this minimum number of
state variables) must be linearly independent.
How do we know the minimum number of state variables to select?
Typically, the minimum number required equals the order of the
differential equation describing the system.
In most cases another way to determine the number of state variables is
to count the number of independent energy-storage elements in the
system. The number of these energy-storage elements equals the order
of the differential equation and the number of state variables.
If too few state variables are selected, it may be impossible to write
particular output equations, or even impossible to complete the writing of
the state equations.
Kwang-Hyun Cho
Introduction - Example
Example 5-1
Consider the mechanical system shown in Figure 5-2. The displacement y is
measured from the equilibrium position in the absence of the external force.
From the diagram, the system equation is:
m y b y ky u
Figure 5-2
The system is of second order. Thus, we need two state
variables to describe the system dynamics.
Since y ( 0 ) , y ( 0 ) , a n d u ( t ) 0 completely determines the
system behavior for t 0 , we choose y ( t ) , a n d y ( t ) as
state variables, or define:
x1 y
x2 y
Then we obtain:
x1 x2
x2 y
1
1
u
( ky b y )
m
m
Kwang-Hyun Cho
5
Introduction - Example
x1 x2
Or
x2
The output equation is:
In vector-matrix form:
k
b
1
x1
x2
u
m
m
m
y x1
0
x1
k
x
2
m
u
Eq. 5-7
The output equation can be written as:
y 1
0
x1
1
b
x2
m
m
1
x
0 1
x2
Eq. 5-8
Eq. 5-7 is a state equation, and Eq. 5-8 is an output equation for the
system.
Kwang-Hyun Cho
Introduction - Example
Eqs. 5-7 and 5-8 are in the standard form:
x Ax + Bu
y = Cx + Du
where
0
A k
m
1
0
B
,
b
1
m
m
, C 1
0 , D 0
Note that the system equation can be modified to:
u
k
b
y
y y
m
m
m
or
1
k
b
u
x1
x2 x2
m
m
m
Figure 5-3
Kwang-Hyun Cho
6
Transient-response analysis of systems in state-space
form with MATLAB
This section represents the MATLAB approach to obtaining transientresponse curves of systems that are written in a state space form.
Step response
We first define the system with
sys = ss(A,B,C,D)
For a unit-step input, the MATLAB command
step(sys)
step(A,B,C,D)
step(sys,t)
step(A,B,C,D,iu)
step(A,B,C,D,iu,t)
will generate plots of unit-step responses.
Note that the scalar iu is an index into the inputs of the system and
specifies which input is to be used for the response; t is the user-specified
time vector.
Kwang-Hyun Cho
Transient-response analysis of systems in statespace form with MATLAB
Transfer matrix between input and output
We can transfer the state space description of a system into an input and
output description in the complex frequency domain.
Consider a multiple-input-multiple-output system.
Assume there are r inputs u1, u2, …, ur, and m outputs y1, y2, …, ym.
Define
u1
y1
y
u
y 2
u 2 ,
ym
ur
The transfer matrix G(s) relates the output Y(s) to the input U(s), or
Y(s) G(s)U(s)
where
G ( s) C( sI A)1 B D
The derivation of above equation is given as follows.
Kwang-Hyun Cho
7
Transient-response analysis of systems in statespace form with MATLAB
For the system defined by
x Ax + Bu
y = Cx + Du
The transfer matrix G(s) is a matrix that relates Y(s) and U(s) through:
Y(s) G(s)U(s)
Eq. 5-10
Taking Laplace transforms of the state-space equations, we obtain:
sX ( s ) x (0 ) A X ( s ) + B U ( s )
Eq. 5-11
Y (s) = C X (s) + D U (s)
Eq. 5-12
Kwang-Hyun Cho
Transient-response analysis of systems in statespace form with MATLAB
Solve X(s) from Eq. 5-11 and substitute the result into Eq. 5-12. We obtain
X ( s ) = ( s I - A ) -1 x ( 0 - ) + ( s I - A ) -1 B U ( s )
Y ( s ) = C ( s I - A ) -1 x ( 0 - ) + [ C ( s I - A ) -1 B + D ] U ( s )
The time solution can be found by inverse Laplace transformation.
y(t) = CL [(sI - A) ]x(0-)+ {CL [(sI - A) ]B + Dδ(t)}* L [U(s)]
- 1
1
Zero input response
1
1
1
Zero state response
where the notation ‘*’ denotes ‘convolution’.
Kwang-Hyun Cho
8
Transient-response analysis of systems in statespace form with MATLAB
In deriving the transfer matrix, we assume that x(0-) = 0 (only zero state
responses are considered). Then, from Eq. 5-11 we get
X ( s ) ( sI A ) 1 B U ( s )
Substituting this equation into Equation (5-12) yields:
Y ( s ) [C ( s I A ) 1 B D ]U ( s )
Upon comparing this last equation with Eq. 5-10, we see that:
G ( s ) C ( sI A ) 1 B D
The transfer matrix G(s) for the given system becomes:
G ( s ) C ( sI A ) 1 B
Kwang-Hyun Cho
Transient-response analysis of systems in statespace form with MATLAB
Example 5-2
Consider the following system and obtain the unit-step response curves.
x1 1
6 .5
x2
y1
1
y 0
2
1 x1
1
0 x 2
1
0 x1
0
1 x 2
0
1 u1
0 u 2
0 u1
0 u 2
Although it is not necessary to obtain the transfer-function expression for
the system in order to obtain the unit-step response curves with MATLAB,
we shall derive such an expression for reference purposes.
The transfer matrix G(s) for the given system becomes:
G ( s ) C ( sI A ) 1 B
1
0
0 s 1
1 6 . 5
1
s
1
1
1
1
0
Kwang-Hyun Cho
9
Transient-response analysis of systems in statespace form with MATLAB
s
2
1 1
s 1 1
s
1
s 6 . 5 6 . 5
Hence,
s 1
s 2 s 6 .5
Y1 ( s )
Y (s)
s 7 .5
2
s 2 s 6 . 5
1
0
s
2
s 1
1
s 6 . 5 s 7 . 5
s
s 2 s 6 .5
6 .5
s 2 s 6 .5
s
6 . 5
U 1(s)
U 2 (s)
Since this systems involves two inputs and two outputs, four transfer
functions can be defined, depending on which signals are considered as
input and output.
Note that, when considering the signal u1 as the input, we assume that
signal u2 is zero, and vice versa.
G11 ( s )
G21 ( s )
Y1 ( s )
U1 ( s ) U
2 ( s ) 0
Y2 ( s )
U1 ( s ) U
2 ( s ) 0
s 1
s s 6.5
G12 ( s )
s 7.5
s s 6.5
G22 ( s )
2
2
Y1 ( s )
s
U 2 ( s ) U ( s )0 s 2 s 6.5
1
Y2 ( s )
6.5
2
U 2 ( s ) U ( s )0 s s 6.5
1
Kwang-Hyun Cho
Transient-response analysis of systems in statespace form with MATLAB
The MATLAB program 5-1 produces four individual unit-step response
curves, shown in Figure 5-4.
MATLAB program 5-1
Figure 5-4
Kwang-Hyun Cho
10
Transient-response analysis of systems in statespace form with MATLAB
To plot two step-response
curves for the input u1 in one
diagram and two step-response
curves for the input u2 in
another diagram, we may do as
follows:
MATLAB program 5-2
Figure 5-5
Figure 5-6
Kwang-Hyun Cho
Transient-response analysis of systems in statespace form with MATLAB
Impulse response
The unit-impulse response of a dynamic system defined in a state space
may be obtained with the use of one of the following MATLAB commands:
impulse(sys)
impulse(A,B,C,D)
impulse(sys,t)
impulse(A,B,C,D,iu)
impulse(A,B,C,D,iu,t)
The command impulse produces a series of unit-impulse response plots,
one for each input-output combination of the system:
x A x + B u
y = Cx + Du
Response to arbitrary input
The command lsim produces the response of linear time-invariant systems
to arbitrary inputs. If the initial conditions of the system in a state-space
form are zero, then:
lsim(sys,u,t)
If the initial conditions are nonzero in a state-space model, the command
lsim(sys,u,t,x0)
where x0 is the initial state, produces the response of the system.
Recall the final question put forward at the end of Topic 5. Now we can use
the above Matlab command to solve it.
Kwang-Hyun Cho
11
Transient-response analysis of systems in statespace form with MATLAB
Response to initial condition
To find the response to the initial condition x0 given to a system in statespace form, the following command may be used:
[y, t] = lsim(sys,u,t,x0)
Here, u is a vector consisting of zeros having length size(t).
Another way to obtain the response to the initial condition given to a
system in a state-space form is to use the command
initial(A,B,C,D,x0,t)
Example 5-3
Consider the system shown in Figure 5-7.
Figure 5-7
The system is at rest for t <0. At t = 0, the mass is
pulled downward by 0.1 m (x(0) = 0.1) and is released
with an initial velocity of 0.05 m/s (dx(0)/dt = 0.05).
The displacement x is measured from the equilibrium
position.
There is no external input to this system.
Assume that m = 1 kg, b = 3 N-s/m, and k = 2 N/m.
Kwang-Hyun Cho
Transient-response analysis of systems in statespace form with MATLAB
Obtain the response curves x(t) versus t and x ( t ) versus t with MATLAB.
The system equation is:
m x b x kx 0
Substituting the given numerical values for m, b and k yields:
x 3 x 2 x 0
If we define the state variables as:
x1 x
x 2 x
And the output variables as:
Then the state equation becomes:
y1 x1
x 1
0
x 2
2
y2 x2
1 x1
0
u
3 x2
0
The output equation is:
y1
1
y 0
2
0 x1
0
u
1 x 2
0
Kwang-Hyun Cho
12
Transient-response analysis of systems in statespace form with MATLAB
Thus:
0
A
2
1
0
, B , C
3
0
1
0
0
0
0.1
, D , x0
1
0
0.05
MATLAB program 5-3
Figure 5-8
Can you solve Example 4-11 again following the same procedures?
Kwang-Hyun Cho
State-space modeling of systems with no input
derivatives
In this section, we present two examples of the modeling of dynamic
systems in state-space form.
The systems used are limited to the case where derivatives of the input
functions do not appear explicitly in the equations of motion.
Example 5-4
Consider the mechanical system shown in Figure 5-9.
The system is at rest for t <0. That is x(0-)=0 and dx(0-)/dt=0. At t = 0, a
unit-impulse force, which is the input to the system, is applied to the mass.
Assuming that m = 5 kg, b = 20 N-s/m, and k = 100 N/m, obtain the
response curves x(t) versus t and x ( t ) versus t with MATLAB.
The system equation is:
m
y b y k y u ( t )
Figure 5-9
The response of such a system depends
on the initial conditions and the forcing
function u.
Kwang-Hyun Cho
13
State-space modeling of systems with no input
derivatives
The variables that provide the initial conditions qualify as state variables.
Hence, we choose the variables that specify the initial conditions as state
variables x1 and x2.
Thus:
x x
x1 x
2
The state equation then becomes:
x 1 x 2
x 2
1
k
b
1
( u k x b x )
x1
x2
u
m
m
m
m
For the output variables, we choose:
y1 x
y 2 x
Rewriting the state equation and output equation, we obtain:
0
x 1
k
x
2
m
0
x1
b 1
x2
m
m
1
u
Kwang-Hyun Cho
State-space modeling of systems with no input
derivatives
and
y1
1
y 0
2
0 x1
0
u
1 x 2
0
Substituting the given numerical values for m, b, and k into the state space
equations yields:
0
A
20
1
0
1
, B
, C
4
0 .2
0
0
0
, D
1
0
MATLAB program 5-4
Figure 5-10
Kwang-Hyun Cho
14
State-space modeling of systems with no input
derivatives
Example 6-3
Consider the electrical circuit shown in Figure 6-14.
Applying Kirchhoff’s voltage law to the system, we obtain the following
equations:
Ri
Figure 6-14
RI (s)
1
C
id t e
i
1
C
id t e
o
The transfer-function model of the circuit can
be obtained as follows: Taking the Laplace
transforms, assuming zero initial conditions,
we get:
1 1
I (s) Eo (s)
C s
1 1
I (s) Ei (s)
C s
1 1
I (s)
Eo (s)
1
C s
1 1
Ei (s)
RCs 1
R
I (s)
C s
Kwang-Hyun Cho
Assuming the input is ei and
output is eo, the transfer
function of the system is:
State-space modeling of systems with no input
derivatives
This system is a first-order system.
A state-space model of the system may be obtained as follows: First, note
that, from the last equation, the differential equation for the circuit is:
R C e o e o e i
If we define the state variable
x eo
And the input and output variables
u ei
y eo x
Then we obtain:
x
1
1
x
u
RC
RC
y x
These two equations give a state-space representation of the system.
Kwang-Hyun Cho
15
State-space modeling of systems with no input
derivatives
Example 6-4
Consider the electrical circuit shown in Figure 6-15.
Applying Kirchhoff’s voltage law to the system, we obtain the following
equations:
L
di
1
Ri
dt
C
id t e
1
C
i
id t e
o
The transfer-function model of the circuit can be obtained:
L sI ( s ) R I ( s )
1 1
I (s) Ei (s)
C s
1 1
I (s) Eo (s)
C s
Then the transfer function becomes:
Eo (s)
1
2
Ei (s)
LCs RCs 1
Figure 6-15
Kwang-Hyun Cho
State-space modeling of systems with no input
derivatives
A state-space model of the system may be obtained as:
eo
R
1
1
e o
eo
ei
L
LC
LC
Then by defining state variables and the input and output variables
x1 e o
x 2 e o
We obtain:
0
x1
1
x 2
LC
y 1
u ei
y e o x1
1
R
L
0
x1 1
x 2
LC
u
x
0 1
x2
These two equations give a mathematical model of the system in state
space.
Kwang-Hyun Cho
16
State-space modeling of systems with no input
derivatives
Example 5-5
Consider the mechanical system shown in Figure 5-11.
The system is at rest for t < 0. At t = 0, a step force f of newtons is
applied to mass m2.
The displacement z1 and z2 are measured from the respective equilibrium
positions of the carts before f is applied. Therefore, all initial conditions of
states are equal to zeros.
Derive a state-space representation of the system.
Assuming that m1 = 10 kg, m2 = 20kg, b = 20 N-m/s, k1 = 30 N/m, k2 =
60 N/m, and = 10, obtain the response curves z1(t) versus t, z2(t) versus
t, and z1(t) – z2(t) versus t with MATLAB.
Also, obtain z ( ) and z ()
1
2
Figure 5-11
Kwang-Hyun Cho
State-space modeling of systems with no input
derivatives
The equations of motion are:
m 1
z 1 k 1 z 1 k 2 ( z 1 z 2 ) b ( z 1 z 2 )
Eq. 5-13
m 2
z 2 k 2 ( z 1 z 2 ) b ( z 1 z 2 ) u
Eq. 5-14
In the absence of a forcing function, the initial conditions of any system
determine the response of the system.
Hence, we choose the initial conditions as state variables for the system and
thus define:
x1 z1
x3 z2
x 2 z 1
x 4 z 2
Then Eqs. 5-13 and 5-14 can be rewritten as:
x 2
k1 k 2
k
b
b
x1
x2 2 x3
x4
m1
m1
m1
m1
x 4
k2
k
b
b
1
x1
x2 2 x3
x4
u
m2
m2
m2
m2
m2
Kwang-Hyun Cho
17
State-space modeling of systems with no input
derivatives
The state equation now becomes:
x 1 x 2
x 2
k1 k 2
k
b
b
x1
x2 2 x3
x4
m1
m1
m1
m1
x 3 x 4
x 4
k2
b
k
b
1
x1
x2 2 x3
x4
u
m2
m2
m2
m2
m2
Note that z1 and z2 are the outputs of the system; hence, the output
equations are:
y1 z1
y2 z2
In terms of vector-matrix equations, we have:
0
k k
x 1
2
1
m1
x 2
x 3
0
x
k
4
2
m2
1
b
m1
0
k2
m1
0
0
b
m2
k2
m2
0
b x 1
m1 x2
1 x3
b x4
m2
0
0
0
m 2
u
Kwang-Hyun Cho
State-space modeling of systems with no input
derivatives
y1 1
y 0
2
0
0
0
1
x1
x
2 0 u
x 3 0
x4
Next, we substitute the given numerical values into given equation:
x 1
0
x
2
9
x 3
0
3
x 4
0
0
1
2
0
1
0
6
0
3
0
2
1
1
x1 0
x 0
2
u
x3 0
x 4 0 .5
So, we have:
0
9
A
0
3
1
0
2
6
0
1
0
3
0
0
0
2
, C 1
, B
0
0
1
0
.5
1
0
0
0
1
0
0
, D
0
0
Kwang-Hyun Cho
18
State-space modeling of systems with no input
derivatives
The curves are shown
in Figure 5-12.
MATLAB program 5-5
Figure 5-12
Kwang-Hyun Cho
State-space modeling of systems with no input
derivatives
To obtain z1() and z2 () , we set all derivatives of z1 and z2 in Eqs. 5-13
and 5-14 equal to zero, because all derivative terms approach zero at
steady state
0
0
0 in the system.
m 1
z 1 k 1 z 1 k 2 ( z 1 z 2 ) b ( z 1 z 2 )
0
0
0
m 2
z 2 k 2 ( z 2 z 1 ) b ( z 2 z 1 ) u
Eq. 5-13
Eq. 5-14
Then, from Eq. 5-14, we get:
k 2 [ z 2 ( ) z1 ( )] u
From which, it follows that:
z 2 ( ) z1 ( )
From Eq. 5-13, we have:
Hence,
u
k2
10
1
60
6
k 1 z1 ( ) k 2 [ z 2 ( ) z1 ( ) ]
z1 ( )
k2
60 1
1
[ z 2 ( ) z1 ( ) ]
30 6
3
k1
Kwang-Hyun Cho
19
State-space modeling of systems with no input
derivatives
And
Thus,
z 2 ( ) z1 ( )
z1 ( )
1
m,
3
1
1
6
2
z2 ( )
1
m
2
The final values of z1(t) and z2(t) obtained with MATLAB agree with the
result obtained here.
Kwang-Hyun Cho
State-space modeling of systems with input
derivatives
In this section, we take up the case where the equations of motion of a
system involve one or more derivatives of the input function.
In such a case, the variables that specify the initial conditions do not
qualify as state variables.
The main problem in defining the state variables is that they must be
chosen such that they will eliminate the derivatives of the input function
u in the state equation.
For example, consider the mechanical system shown in Figure 5-13.
The displacements y and u are measured from their respective equilibrium.
Or
The motion of equation for this
system is:
m
y k y b ( y u )
y
Figure 5-13
k
b
b
y
y
u
m
m
m
Kwang-Hyun Cho
20
State-space modeling of systems with input
derivatives
If we choose the state variables:
x1 y
x 2 y
Then we get:
x 1 x 2
x 2
k
b
b
x1
x2
u
m
m
m
Eq. 5-18
The right-hand side of Eq. 5-18 involves the derivative term u
Note that, in formulating state-space representations of dynamic systems,
we constrain the input function to be any function of time of order up to the
impulse function, but not any higher order impulse functions such as
d (t ) d 2 (t )
,
, etc
dt
dt 2
To explain why the right-hand side of the state equation should not involve
the derivative of the input function u, suppose that u is the unit-impulse
function.
Kwang-Hyun Cho
State-space modeling of systems with input
derivatives
Then the integral of Eq. 5-18 becomes:
b
b
y
(t )
m
m
Notice that x2 includes the term (k / m) (t ) . This means that x2 (0) ,
x2
k
m
ydt
which is not acceptable as a state variable.
We should choose the state variables such that the state equation will
not include the derivative of u.
Suppose that we try to eliminate the term involving
One possible way to accomplish this is to define:
x1 y
Then
x 2
y
x 2 y
u
from Eq. 5-18.
b
u
m
b
u
m
k
b
b
b
y
y
u
u
m
m
m
m
Kwang-Hyun Cho
21
State-space modeling of systems with input
derivatives
k
b
x1
( x2
m
m
k
b
x1
x2
m
m
b
m
b
m
u)
2
u
Thus, we have eliminated the term that involves u .
The acceptable state equation can now be given by:
0
x1
x k
2
m
b
1
m
x1
b
2 u
x2 b
m
m
, etc. , the choice of state variables
If equations of motion involve u , u , u
becomes more complicated.
Fortunately, there are systematic methods for choosing state variables for a
general case of equations of motion that involve derivatives of the input
function u.
Kwang-Hyun Cho
State-space modeling of systems with input
derivatives
State-space representation of dynamic systems in which
derivatives of the input function appear in the system
differential equations.
(n)
We consider the case where the input function u is a scalar. That is, only
one input function u is involved in the system.
The differential equation of a system that involves derivatives of the input
function has the general form:
( n 1)
(n)
( n 1)
y a1 y an 1 y an y b0 u b1 u bn 1u bn u
To apply the methods presented in this section, it is necessary that the
system be written as a differential equation in the form of above equation,
or its equivalent transfer function:
Y ( s ) b0 s n b1 s n 1 bn 1 s bn
n
U (s)
s a1 s n 1 an 1 s an
We examine two methods when n = 2.
Kwang-Hyun Cho
22
State-space modeling of systems with input
derivatives – Method 1
Method 1
Consider the second-order system:
y a1 y a 2 y b0 u b1u b 2 u
Eq. 5-20
As a set of state variables, suppose that we choose:
x1 y 0 u
Eq. 5-21
x 2 x 1 1 u
Eq. 5-22
where
From Eq. 5-21, we have:
Substituting this last equation into Eq. 5-20, we obtain:
0 b0
1 b1 a 1 0
y x1 0 u
x1 0 u a1 ( x1 0 u ) a 2 ( x1 0 u ) b0 u b1u b 2 u
We can simplify the preceding equation to:
x1 a1 x1 a 2 x1 1u ( b 2 a 2 0 ) u
Eq. 5-26
Kwang-Hyun Cho
State-space modeling of systems with input
derivatives – Method 1
From Eq. 5-22, we have
x 1 x 2 1 u
Eq. 5-27
Substituting Eq. 5-27 to Eq. 5-26, we obtain:
x 2 1u a1 ( x 2 1u ) a 2 x1 1u ( b 2 a 2 0 ) u
which can be simplified to:
x 2 a 2 x1 a1 x 2 2 u
where
Eq. 5-28
2 b 2 a1 1 a 2 2
From Eqs. 5-27 and 5-28, we obtain the state equation:
x1 0
x a
2 2
1
a 1
x1 1
x u
2 2
Eq. 5-30
Kwang-Hyun Cho
23
State-space modeling of systems with input
derivatives – Method 1
From Eq. 5-25, we get the output equation:
y 1
x
0 1 0u
x2
Eq. 5-31
Eqs. 5-30 and 5-31 represent the system in a state space.
Note that, for the case of the nth-order differential-equation system
( n 1)
(n)
( n 1)
(n)
y a1 y a n 1 y a n y b0 u b1 u bn 1u bn u
The state equation and output equation can be given by:
x 1 0
x 0
2
x n 1 0
x n a n
1
0
0
1
0
0
a n 1
an2
0 x1 1
0 x 2 2
u
1 x n 1 n 1
a 1 x n n
Kwang-Hyun Cho
State-space modeling of systems with input
derivatives – Method 1
y 1
x1
x
0 2 0u
xn
and
0
where
0 b0
1 b1 a 1 0
2
b2 a1 1 a 2
3 b3 a1
2
0
a21 a3
0
n
bn a1
n 1
a n 1 1 a n
0
Kwang-Hyun Cho
24
State-space modeling of systems with input
derivatives – Method 2
Method 2
Consider the second-order system:
y a1 y a 2 y b0 u b1u b 2 u
Y ( s ) b0 s 2 b1s b2
2
or its equivalent function
U (s)
s a1 s a2
Eq. 5-32 can be split into two equations as follows (Suppose there is an
intermediate variable z between u and y):
G1 ( s )
Z (s)
1
2
U ( s ) s a1 s a2
G2 ( s )
Y (s)
b0 s 2 b1 s b2
Z (s)
We then have:
If we define:
z a1 z a 2 z u
Eq. 5-33
b0
z b1 z b 2 z y
Eq. 5-34
x1 z
x 2 z
Eq. 5-35
Kwang-Hyun Cho
State-space modeling of systems with input
derivatives – Method 2
Then Eq. 5-33 can be written as:
x 2 a 2 x1 a1 x 2 u
Eq. 5-36
and Eq. 5-34 can be written as:
b0 x 2 b1 x 2 b2 x1 y
Which can be rewritten as:
y ( b 2 a 2 b0 ) x1 ( b1 a1b0 ) x 2 b0 u
Eq. 5-37
From Eqs. 5-35 and 5-36, we get:
x 1 x 2
x 2 a 2 x1 a1 x 2 u
These two equations can be combined into the vector-matrix differential
equation:
x1 0
x 2 a 2
1
a 1
x1 0
x 1 u
2
Eq. 5-38
Kwang-Hyun Cho
25
State-space modeling of systems with input
derivatives – Method 2
Eq. 5-37 can be rewritten as:
y b 2 a 2 b 0
x
b1 a 1 b 0 1 b 0 u
x2
Eq. 5-39
Eqs. 5-38 and 5-39 are the state equation and output equation, respectively.
Note that the state variables x1 and x2 in this case may not correspond to
any physical signals that can be measured.
If the system equation is given by:
(n)
( n 1)
(n)
( n 1)
y a1 y a n 1 y a n y b0 u b1 u bn 1u bn u
or its equivalent transfer function:
Y ( s ) b0 s n b1 s n 1 bn 1 s bn
n
U (s)
s a1 s n 1 a n 1 s a n
Kwang-Hyun Cho
State-space modeling of systems with input
derivatives – Method 2
Then the state equation and the output equation obtained with the use
of Method 2 are given by:
x 1 0
x 0
2
x n 1 0
x n a n
1
0
0
a n 1
0
1
0
an2
and
y b n a n b 0
b n 1 a n 1b 0
0
0
1
a 1
x1 0
x 0
2
u
x n 1 0
x n 1
x1
x
b1 a 1 b 0 2 b 0 u
xn
Eq. 5-40
Eq. 5-41
This form is called the Controllable Canonical Form.
Kwang-Hyun Cho
26
State-space modeling of systems with input
derivatives – Method 3
Method 3
Consider the same system description as the previous one
(n)
( n 1)
(n)
( n 1)
y a1 y a n 1 y a n y b0 u b1 u bn 1u bn u
Let us define another group of state variables as
xn y b0u
xn1 y a1 y b0 u b1u
xn2 y a1 y a2 y b0 u b1 u b2u
( n 1)
( n 2)
( n 1)
( n 2)
x1 y a1 y an1 y b0 u b1 u bn1u
Kwang-Hyun Cho
State-space modeling of systems with input
derivatives – Method 3
Then the state equation and the output equation obtained with the use
of Method 3 are given by:
x 1 0
x2 1
0
x n 1
x n 0
0
0
1
0
0
0
0
1
an
a n 1
an2
a 1
and
y [0
0
0
x1 b n
x 2 b n 1
bn 2
x n 1
x n b1
a n b0
a n 1 b 0
a n 2 b0 u
a 1 b 0
x1
x
1] 2 b 0 u
xn
This form is called the Observable Canonical Form.
Kwang-Hyun Cho
27
State-space modeling of systems with input
derivatives – Examples
Examples 5-6 and 5-7 illustrate the use of the preceding two analytical
methods for obtaining state-space representations of a differentialequation system involving derivatives of the input signal.
Example 5-6
Consider the spring-mass-dashpot system mounted on a cart as shown in
Figure 5-14.
Assume that the cart is standing still for t < 0. In this system, u(t) is the
displacement of the cart and is the input to the system.
At t = 0, the cart is moved at a constant speed, or u co n stan t
The displacement y of the mass is the output.
Assume that the large cart is massless.
We assume that the entire system is a linear
system.
Obtain a state-space representation of the
system based on method 1 and 2.
Figure 5-14
Kwang-Hyun Cho
State-space modeling of systems with input
derivatives – Examples
Assuming that m = 10 kg,
b = 20 N-m/s, k = 100 N/m, and the input is a
ramp function such that u 1 m /s obtain the response curve y(t) versus t
with MATLAB.
First, we shall obtain the system equation. Applying Newton’s second law,
we obtain:
2
m
d y
dy
du
b(
) k(y u)
2
dt
dt
dt
m
d2y
dy
du
b
ky b
ku
2
dt
dt
dt
Or
The transfer function is:
Y (s)
bs k
U ( s ) ms 2 bs k
Method 1. We first compare the differential equation of the system
with the standard form.
y a1 y a 2 y b0 u b1u b2 u
Kwang-Hyun Cho
28
State-space modeling of systems with input
derivatives – Examples
And identify:
a1
b
k
b
k
, a2
, b 0 0 , b1
, b2
m
m
m
m
0 b0 0
b
m
2
k b
2 b2 a1 1 a2 2
m m
1 b1 a1 0
x1 y 0 u y
x 2 x 1 1 u x 1
From above equations and Eq. 5-28, we obtain:
b
u
m
k b 2
k
b
x 2 a 2 x1 a1 x2 2 u x1 x2 u
m
m
m m
x 1 x 2
b
u
m
Eq. 5-44
Eq. 5-45
And the output equation is:
Eq. 5-46
y x1
Kwang-Hyun Cho
State-space modeling of systems with input
derivatives – Examples
Combining Eqs. 5-44 and 5-45 yields the state equation, and from Eq. 5-46,
we get the output equation:
0
x1
x k
2
m
1
b
m
b
m
x1
u
2
x
2 k b
m m
y 1
x
0 1
x2
These two equations give a state-space representation of the system.
Next, we shall obtain the response curve y(t) versus t for the unit-ramp
input. Substituting the given numerical values for m, b, and k into the state
equation, we obtain:
x1 0
x 1 0
2
1
2
x1 2
x 6 u
2
y 1
x
0 1
x2
Kwang-Hyun Cho
29
State-space modeling of systems with input
derivatives – Examples
MATLAB program 5-6
Figure 5-15
Kwang-Hyun Cho
State-space modeling of systems with input
derivatives – Examples
Method 2. Since
b0 0
b2 a 2 b0
b1 a1b0
b
b
b
0
m m
m
From Eqs. 5-38 and 5-39, we obtain:
0
x1
x k
2
m
k
k
k
0
m m
m
1
b
m
x1 0
x 1 u
2
k
y
m
b x1
m x 2
These last two equations give another state-space representation of the
same system.
Substituting the given numerical values for m, b and k, we get:
x1 0
x 1 0
2
1 x1 0
u
2 x 2 1
y 1 0
x
2 1
x2
Kwang-Hyun Cho
30
State-space modeling of systems with input
derivatives – Examples
MATLAB program 5-7
Figure 5-16
Kwang-Hyun Cho
State-space modeling of systems with input
derivatives – Examples
Figure 5-17 (b)
Example 5-7
Consider the front suspension system of a motorcycle.
A simplified version is shown in Figure 5-17 (a).
Point P is the contact point with the ground. The vertical displacement u of
point P is the input to the system. At t = 0, P is given a triangular bump
input as shown in Figure 5-17 (b).
Assume that m1, b1, and k1 represent the front tire and
shock absorber assembly and m2, b2, and k2 represent
half of the body of the vehicle.
Assume also that m1 = 10 kg, m2 = 100 kg, b1 = 50 Ns/m, b2 = 100 N-s/m, k1 = 50 N/m, and k2 = 200 N/m.
Method 1. Applying Newton’s second law to the
system:
m 1
x k 1 ( x u ) b1 ( x u ) k 2 ( y x ) b 2 ( y x )
Figure 5-17 (a)
m 2
y k 2 ( y x ) b2 ( y x )
Kwang-Hyun Cho
31
State-space modeling of systems with input
derivatives – Examples
which can be rewritten as:
m 1
x b1 x k1 x b1u k1u
m 2
y b 2 y k 2 y b 2 x k 2 x
If we substitute the given numerical values and simplify the equations, then
we get:
x 5 x 5 x 5 u 5 u
y y 2 y x 2 x
Eq. 5-47
Eq. 5-48
Laplace transforming Eqs. 5-47 and 5-48, assuming the zero initial
conditions, we obtain:
( s 2 5 s 5) X ( s ) (5 s 5)U ( s )
( s 2 s 2)Y ( s ) ( s 2) X ( s )
Eliminating X(s) from these two equations, we get:
( s 2 5 s 5)( s 2 s 2)Y ( s ) 5( s 1)( s 2)U ( s )
Kwang-Hyun Cho
State-space modeling of systems with input
derivatives – Examples
Or
( s 4 6 s 3 12 s 2 15 s 10)Y ( s ) (5 s 2 15 s 10)U ( s )
Eq. 5-49
Eq. 5-49 corresponds to the differential equation:
y 6
y 1 2
y 1 5 y 1 0 y 5 u 1 5 u 1 0 u
Comparing the last equation with the standard fourth-order differential
equation:
y a1
y a 2
y a 3 y a 4 y b 0
u b1
u b 2 u b3 u b 4 u
We find that:
a 1 6 , a 2 1 2 , a 3 1 5, a 4 1 0
b 0 0 , b1 0 , b 2 5, b 3 1 5, b 4 1 0
Next, we define the state variable as follows:
x1 y 0 u
x 2 x 1 1 u
x 3 x 2 2 u
x 4 x 3 3 u
where
0 b0 0
1 b1 a1 0 0
2 b2 a1 1 a2 0 5
3 b3 a1 2 a2 1 a3 0 15
Kwang-Hyun Cho
32
State-space modeling of systems with input
derivatives – Examples
Hence,
x 1 x 2
x 2 x 3 5 u
x 3 x 4 1 5 u
x 4 a 4 x 1 a 3 x 2 a 2 x 3 a 1 x 4 4 u
1 0 x1 1 5 x 2 1 2 x 3 6 x 4 4 u
where
4
b4 a1 3 a 2
2
a31 a4
0
40
Thus the state equation and output equation become:
x1 0
x 0
2
x 3 0
x 4 10
1
0
0
0
1
0
15
12
0 x1
0 x 2
1 x3
6 x4
0
5
u
15
40
y 1
0
0
x1
x
0 2
x3
x4
Kwang-Hyun Cho
State-space modeling of systems with input
derivatives – Examples
MATLAB program 5-8
Figure 5-18
Kwang-Hyun Cho
33
State-space modeling of systems with input
derivatives – Examples
Method 2. From Eq. 5-49, the transfer function of the system is given
by:
Y (s)
5 s 2 15 s 10
4
U ( s ) s 6 s 3 12 s 2 15 s 10
Figure 5-19 shows a block diagram in which the transfer function is split
into two parts. If we define the output of the first block as Z(s), then:
Z (s)
1
1
4
4
3
2
3
U ( s ) s 6 s 12 s 15 s 10 s a1 s a 2 s 2 a3 s a 4
and
Y (s)
5 s 2 15 s 10 b0 s 4 b1 s 3 b2 s 2 b3 s b4
Z (s)
Figure 5-19
Kwang-Hyun Cho
State-space modeling of systems with input
derivatives – Examples
From which we get:
a 1 6 , a 2 1 2 , a 3 1 5, a 4 1 0
b 0 0 , b1 0 , b 2 5, b 3 1 5, b 4 1 0
Next, we define the state variable as follows:
x 2 x 1
x1 z
x 3 x 2
x 4 x 3
From Eqs. 5-40 and 5-41, we obtain:
x1 0
x 0
2
x 3 0
x 4 10
1
0
0
0
1
0
15
12
0 x1
0 x 2
1 x3
6 x4
0
0
u
0
1
y 10
15
5
x1
x
0 2
x3
x4
Kwang-Hyun Cho
34
State-space modeling of systems with input
derivatives – Examples
MATLAB program 5-9
Figure 5-20
Kwang-Hyun Cho
Transformation of mathematical models with
MATLAB
MATLAB is quite useful in transforming a system model from transfer
function to state space and vice versa.
Let us write the transfer function Y(s)/U(s) as:
Y (s)
numerator polynomial in s
num
U ( s ) denominator polynomial in s den
Once we have this transfer-function expression, the MATLAB command
[A, B, C, D] = tf2ss(num,den)
will give a state-space representation.
Note that the command can be used when the system equation involves
one or more derivatives of the input function.
It is important to note that the state-space representation of any
system is not unique.
The MATLAB command gives one possible such representation.
Kwang-Hyun Cho
35
Transformation of mathematical models with
MATLAB
Transformation from transfer function to state space
Consider the transfer function system:
MATLAB program 5-10
Y (s)
s
3
2
U ( s ) s 14 s 56 s 160
Of the infinitely many possible state-space
representations of this system, one is:
1
0 x1 0
x1 0
x 0
x 1 u
0
1
2
2
x3 160 56 14 x3 14
x1
0 x 2 0 u
x3
Another is:
x1 14 56 160 x1 1
x 1
0
0 x2 0 u
2
1
0 x3 0
x3 0
y 1 0
x1
y 0 1 0 x 2 0 u
x3
For the system considered here, MATLAB Program 510 will produce matrices A, B, C, and D.
Kwang-Hyun Cho
Transformation of mathematical models with
MATLAB
Transformation from state space to transfer function
To obtain the transfer function from state-space equations, use the
command:
[num, den] = ss2tf(A, B, C, D, iu)
Note that iu must be specified for systems with more than one input.
Example 5-8
Obtain the transfer function of the system defined by the following statespace equations:
x1 0
x 0
2
x 3 0
x 4 10
1
0
0
0
1
0
15
12
0 x1
0 x 2
1 x3
6 x4
0
5
u
15
40
y 1
0
0
x1
x
0 2
x3
x4
Kwang-Hyun Cho
36
Transformation of mathematical models with
MATLAB
MATLAB Program 5-11 produces the transfer function of the system:
MATLAB program 5-11
Y (s)
5 s 2 15 s 10
4
U ( s ) s 6 s 3 12 s 2 15 s 10
Example 5-9
Consider a system with multiple inputs and multiple outputs.
When the system has more than one output, the command
[num, den] = ss2tf(A, B, C, D, iu)
produces transfer function for all outputs to each input.
Kwang-Hyun Cho
Transformation of mathematical models with
MATLAB
Let the system be defined by:
x1 0
x 2 5
2
y1 1
y 0
2
MATLAB program 5-12
1 x1 1
4 x 2 0
0 x1 0
1 x 2 0
1 u1
1 u 2
0 u1
0 u 2
This system involves two input and two outputs.
Four transfer functions are involved.
G11 ( s)
G21 ( s )
Y1 ( s)
U1 ( s ) U
2 ( s )0
Y2 ( s )
U1 ( s ) U
2 ( s ) 0
s4
s 2 4s 25
G12 ( s )
25
s 2 4 s 25
G22 ( s )
Y1 ( s )
s 5
U 2 ( s ) U ( s )0 s 2 4s 25
1
Y2 ( s )
s 25
U 2 ( s ) U ( s )0 s 2 4 s 25
1
Kwang-Hyun Cho
37
Transformation of mathematical models with
MATLAB
Nonuniqueness of a set of state variables
A set of state variables are not unique for a given system.
Suppose that x1, x2, …, xn are a set of state variables.
Then we may take as another set of state variables any set of functions:
xˆ1 X 1 ( x1 , x 2 , ..., x n )
xˆ 2 X 2 ( x1 , x 2 , ..., x n )
xˆ n X n ( x1 , x 2 , ..., x n )
provided that, for every set of variables xˆ1 , xˆ 2 , ..., xˆ n , there corresponds
a unique set of values x1, x2, …, xn, and vice versa.
Thus if x is a state vector, then
x̂ = Q x
is also a state vector, provided that the matrix Q is nonsingular. (Note that a
square matrix Q is nonsingular if the determinant |Q| is nonzero.)
Kwang-Hyun Cho
Transformation of mathematical models with
MATLAB
Transformation of a state-space model into another statespace model
A state space model
x A x + B u
Eq. 5-53
y = Cx + Du
Eq. 5-54
can be transformed into another state-space model by transforming the
state vector x into state vector x̂ by means of the transformation
x = P xˆ
where P is nonsingular. Then Eqs. 5-53 and 5-54 can be written as
P xˆ = A P xˆ + B u
y = C P xˆ + D u
Or,
xˆ = P - 1 A P xˆ + P - 1 B u
y = C P xˆ + D u
Eq. 5-55
Eq. 5-56
Eqs. 5-55 and 5-56 represent another state-space model of the same
system.
Kwang-Hyun Cho
38
Transformation of mathematical models with
MATLAB
It is sometimes desirable to transform the state matrix into a diagonal
matrix.
Diagonalization of state matrix A
Consider an n x n state matrix.
0
0
A
0
a n
1
0
0
1
0
0
a n 1
an2
0
0
1
a 1
Eq. 5-58
We first consider the case where matrix A has distinct eigenvalues only.
If the state vector x is transformed into another state vector z with the use
of a transformation matrix P, or
x = Pz
Suppose A has the n (distinct) eigenvalues λ1, λ2, …, λn, and corresponding
eigenvectors e1, e2, …, en, which are independent with each other. Define
the modal matrix of A to be the n × n matrix P = [e1 e2 … en] (Recall the
discussion at the end of Topic 2-2).
Kwang-Hyun Cho
Transformation of mathematical models with
MATLAB
An intermediate way to find matrix P is to construct it as
1
1
P 12
n 1
1
1
1
2
22
3
32
2n 1
1
n
n2
n 1
n
Eq. 5-59
3n 1
Vandermonde Matrix (non-singular)
where P can transform Matrix A into a diagonal matrix
1
0
P -1 A P
0
0
0
2
n
0
0
Note that each column of the transformation matrix P in Eq. 5-59 is an
eigenvector of the matrix A given by Eq. 5-58.
Kwang-Hyun Cho
39
Transformation of mathematical models with
MATLAB
Problem A – 5 - 18
Obtain the eigenvectors of the matrix A, and assume that the eigenvalues
are 1 , 2 , and , 3 ; that is:
1
0
0
A 0
0
1
a3 a2 a1
1
0
I A 0
1
a3
a2
a1
3 a1 2 a 2 a 3
( 1 )( 2 )( 3 )
Kwang-Hyun Cho
Transformation of mathematical models with
MATLAB
Assume also that 1 , 2 , and , 3 are distinct.
Solution: The eigenvector xi associated with an eigenvalue i is a vector
that satisfy the equation
Eq. 5-113
A x i = i x i
which can be written as
1
0 xi1
0
xi1
0
0
1 xi 2 i xi 2
a3 a2 a1 xi 3
xi3
Simplifying this last equation, we obtain:
x i 2 = i x i1
xi 3 = i xi 2
a 3 x i 1 a 2 x i 2 a1 x i 3 = i x i 3
Hence, the eigenvectors are
x11
x ,
1 11
12 x11
x21
x ,
2 21
22 x21
x31
x
3 31
32 x31
Eq. 5-114
Kwang-Hyun Cho
40
Transformation of mathematical models with
MATLAB
Note that if xi is an eigenvector, then axi (where a = nonzero scalar) is also
an eigenvector, because Eq. 5-113 can be written as:
a ( A x i ) = a (i x i )
or
A ( a x i ) = i ( a x i )
Thus, by dividing the eigenvectors given by Eq. 5-114 by x11, x21, and x31,
respectively, we obtain:
1
,
1
2
1
1
,
2
2
2
1
3
2
3
These are also a set of eigenvectors.
Next, consider the case where matrix A involves multiple eigenvalues.
In this case, diagonalization is not possible, but matrix A can be
transformed into a Jordan canonical form.
Kwang-Hyun Cho
Transformation of mathematical models with
MATLAB
For example, consider the 3 x 3 matrix
1
0
0
0
1
A 0
a3 a2 a1
Assume that A has eigenvalues 1 , 1 , and ,
case, the transformation x = Sz, where
1
S 1
12
will yield
1
S -1 AS 0
0
0
1
2 1
1
1
0
3 , where 1 3 . In this
1
3
32
0
0
3
This matrix is in Jordan canonical form.
Kwang-Hyun Cho
41
Transformation of mathematical models with
MATLAB
Example 5-10
Consider a system with the state-space representation
1
0 x1 0
x1 0
x 0
x 0 u
0
1
2
2
x3 6 11 6 x3 6
or
y 1 0
x1
0 x2
x3
x A x + B u
Eq. 5-63
y = Cx + Du
where
1
0
0
A 0
0
1 ,
6 11 6
0
B 0 ,
6
C 1 0 0 ,
D0
The eigenvalues of the state matrix A are -1, -2, and -3, or
1 1,
2 2,
3 3
Kwang-Hyun Cho
Transformation of mathematical models with
MATLAB
We shall show that Eq. 5-63 is not the only possible state equation for the
system.
Suppose we define a set of new state variables z1, z2, and z3 by the
transformation:
1
1 z1 1 1
1 z1
x1 1
x z
2 3 z2
2
3 2 1
2 1
2
2
2
x3 1 2 3 z3 1 4 9 z3
or
Eq. 5-64
x = Pz
where
1 1 1
P 1 2 3
1 4 9
Eq. 5-65
Then substituting Eqs. 5-64 into Equation 5-65, we obtain:
P z A P z + B u
Kwang-Hyun Cho
42
Transformation of mathematical models with
MATLAB
Premultiplying both sides of this last equation by P-1, we get:
z P 1 A P z + P 1 B u
or
1
0 1
1
1 z1 3 2.5 0.5 0
z1 3 2.5 0.5 0
z 3 4 1 0
1 2 3 z 3 4 1 0 u
0
1
2
2
z3 1 1.5 0.5 6 11 6 1
4
9 z3 1 1.5 0.5 6
Simplifying gives:
0 z1 3
z1 1 0
z 0 2 0 z 6 u
2
2
z3 0
0 3 z3 3
Eq. 5-67
Eq. 5-67 is a state equation that describes the system defined by Eq. 5-63.
The output equation is modified to:
y 1 0
1
0 1
1
1
2
4
1 z1
3 z 2 1
9 z 3
1
z1
1 z 2
z 3
Kwang-Hyun Cho
Transformation of mathematical models with
MATLAB
Notice that the transformation matrix P defined by Eq. 5-65 changes the
coefficient matrix of z into the diagonal matrix.
Notice also that the diagonal elements of the matrix P-1AP in Eq. 5-66 are
identical to the three eigenvalues of A.
Problem A – 5 – 20
Prove that the eigenvalues of a square matrix A are invariant under a linear
transformation.
Solution – To prove the invariance of the eigenvalues under a linear
transformation, we must show that the characteristic polynomials
I A
and
I P -1 A P
are identical.
Since the determinant of a product is the product of the determinants, we
obtain:
I P -1 A P P -1 P P -1 A P
P -1 ( I A ) P
Kwang-Hyun Cho
43
Transformation of mathematical models with
MATLAB
P -1 I A P
P -1 P I A
Noting that the product of the determinants |P-1| and |P| is the
determinants of the product |P-1P|, we obtain:
I P -1 A P P -1 P I A
I A
Thus, we have proven that the eigenvalues of A are invariant under a linear
transformation.
Kwang-Hyun Cho
44
© Copyright 2026 Paperzz