Models of Linear Systems
Models of Linear Systems
Models of Linear Systems
coming from outside the system) and the dependent quantities that result from the
action or effect on those external quantities. We use the term “input” or u to refer
to the independent quantity, although we indeed may have no control over it at
all. It merely represents an excitation for the system. The response of the system
will be referred to as the output y. These input and output signals may be constant,
defined as functions over continuous-time or discrete-time, and may be either
deterministic or stochastic. The system that relates the two may be defined in
many ways, so for the time being, we depict it as in Figure 1.1, simply a block
that performs some mathematical operation.
Input Output
System
u y
Systems that are not causal are sometimes called anticipatory, because they
violate the seemingly impossible condition that they can anticipate future values
of a signal, predicting it at some future time for use at the current time.
Anticipatory systems are often used in data filtering and image processing
applications, wherein an entire data set is first acquired, then processed in batch
mode. In such situations, the “next data” is already available for processing at any
given time.
It is known that for a system to be causal, its transfer function (if it has one)
must be proper. That is, the degree of its numerator polynomial must be no greater
than its denominator polynomial. This is true in both continuous-time systems (s-
domain) and discrete-time systems (z-domain).
Linear systems are thus systems for which the principle of superposition
holds. We will later consider so-called multivariable systems, which have more
6 Part I. Mathematical Introduction to State Space
than one input and more than one output. When such systems are linear, the effect
of each input can be considered independently of one another. In systems with
memory, the term linear refers to systems that are linear in all of the variables on
which they depend. Therefore, for example, a linear nth order differential equation
is one whose nth derivative depends in a linear way on each of the lower
derivatives, and also in a linear way on the forcing function, if any.
Nonlinear systems are notoriously difficult to analyze and solve, partly
because they exist in such an infinite variety of forms, preventing any cohesive
theory for analysis.
In the next section, we will review the process by which models of linear
systems are derived, followed by some examples for practical physical systems.
Physical Variables
We start by categorizing the physical quantities of interest to us. The first
quantities available in any problem specification are the constants. These are, of
course, constant numerical values specifying the dimensions, ranges, amounts,
and other physical attributes of the masses in the system. These are often available
as known quantities, but are sometimes unknown or poorly known and are subject
to a process known as system identification. System identification is also useful
when the physical attributes of a system are not constant, but vary with time. For
example, the weight of a vehicle may change as its fuel is consumed, and the
resistance of a resistor may change with temperature. In this chapter and for most
of this book, we will not consider time-varying quantities in much detail.
The second class of number to be considered is the variables, which are of
interest to us because they do usually vary with time. Some variables, i.e., those
considered inputs, are known a priori, while others (the outputs) are to be
determined. We separate these into two broad categories: flow variables and
potential variables. Flow variables are quantities that must be measured through
the cross-section of the medium through which they are transmitted. The easiest
flow variable to imagine is a fluid (nonviscous, incompressible). The flow of such
a fluid through a conduit must be measured by breaking the pipe and “counting”
Chapter 1. Models of Linear Systems 7
the amount (mass) of fluid passing through the cross-section.* For electrical
systems, the analogous flow variable can be considered to be the current. Because
current is defined as the amount of charge per unit area flowing across a cross-
section per unit time, we can equally well consider charge to be a flow variable.
In mechanical systems, force is a flow variable. Although it may not conform to
the fluid analogy, it is nevertheless a quantity that must be measured by breaking
a connection and inserting a measurement device.
The second type of variable is the potential variable. Potential variables are
physical quantities that must be measured at two locations; the value of the
measurement is the relative difference between the locations. Pressure, voltage,
and displacement (position or velocity) are all potential variables because their
definitions all require a reference location. Although we speak of a voltage
appearing at a particular location in a circuit, it is always understood that this
measurement was taken relative to another point.
Physical Laws
For many simple systems, there are only a few basic physical laws that must be
obeyed in order to generate a sufficient set of equations that describe a system. If
we consider only the basic necessities (i.e., using finite-dimensional, lumped-
parameter, Newtonian dynamics rather than relativistic mechanics), we can
categorize these into two types of laws: mass conservation and circuit
conservation laws. Mass conservation laws are defined on nodes, and circuit
conservation laws are defined on closed paths. A node is an interconnection point
between two or more conduits transmitting a flow variable. In mechanical
systems, nodes are associated with masses so that applied forces are shown to be
acting on something. These circuit laws are integrally related to the two types of
variables above: flow and potential.
Mass conservation laws take the basic form:
For an electrical network, this type of law translates to Kirchoff’s current law
(KCL), which states that the sum of all currents entering a node must equal zero,
ii 0 . For a mechanical system, the mass conservation law takes the form of
Newton’s law: Fi ma . Note that in Newton’s law, the sum of flow variables
need not equal zero but must be proportional to the net acceleration of the object
on which the forces act. In electrical and fluid systems, the net equivalent flow is
* In reality, clever fluid flow measurement systems have been devised that can measure
flow variables without interrupting them, e.g., ultrasonic flowmeters and inductive
ammeters.
8 Part I. Mathematical Introduction to State Space
Such laws enforce the intuitive notion that if a potential variable is measured at
one location relative to a fixed reference, and if relative changes are added as
components are traversed in a closed path, then the potential measured at the
original location upon returning should not have changed. Thus, Kirchoff’s
voltage law (KVL) specifies that around any closed path in a network, v i 0 ,
being careful to include the appropriate algebraic signs in the terms. In mechanical
systems, circuit conservation allows us to measure what we consider absolute
position by summing a sequence of relative displacements (although in truth all
positions are relative to something). For fluids, the sum of pressure drops and
rises throughout a closed network of pipes and components must equal zero.
These laws go a long way toward generating the equations that describe
physical systems. We are ignoring a great many physical quantities and processes,
such as deformation, compressibility, and distributed parameters, that usually
provide a more complete and accurate model of a system. Usually, though, it is
best to attempt a simple model that will suffice until its deficiencies can be
discovered later.
Constitutive Relationships
The physical laws above are not by themselves sufficient to write complete
equations. Flow variables and potential variables are not unrelated, but their
relationship depends on the physical device being considered. Aside from
sources, which provide, e.g., input forces, voltages, currents, and flows to
systems, we also have components, which we assume to be lumped, i.e., their
effects are modeled as being concentrated at a single location as opposed to being
distributed over space. Each type of component has associated with it a
constitutive relationship that relates the flow variable through it and the potential
variable across it.
Electrical Components
The three most basic linear components common in electrical networks are the
resistor (R, measured in ohms, ), capacitor (C, measured in farads, F), and
inductor (L, measured in henrys, H). These are pictured in Figure 1.2.
Chapter 1. Models of Linear Systems 9
iR iL iC
R vR L vL C vC
Figure 1.2 Electrical components: resistor, inductor, and capacitor (left to right).
For each component, we define reference directions for the flow variable
(indicated by an arrow) and the potential variable (indicated by / signs), so
that the appropriate algebraic sign can be defined for the component.
For these three components, the constitutive relationships are:
diL dvC
v R iR R vL L iC C (1.7)
dt dt
Mechanical Components
For mechanical systems, the fundamental components are the mass, damper, and
spring. These are pictured in Figure 1.3 below.
FM FK FB
M
xM K xK B xB
Figure 1.3 Mechanical components: mass, spring, and damper (left to right).
In the figure, a displacement is shown which indicates that one side of the
component is displaced relative to the other side, except for the mass, which is
10 Part I. Mathematical Introduction to State Space
d 2x M dx B
FM M FK Kx K FB B (1.8)
dt 2 dt
where F is the force applied to (or resulting from) the component. It should be
noted that these equations do not appear entirely analogous to those of the
electrical system (1.7). Most notably, these equations have a second derivative,
and are all expressions of the flow variables in terms of the potential variable.
This is partly based on convention so that the requisite computations are more
convenient, and partly natural, since electrical and mechanical quantities are
perceived differently by the systems on which they act. Nevertheless, the
mathematical analogies remain. For fluid systems, the analogy becomes even
weaker, with tanks and valves being the primary components. These components
have somewhat more complex, sometimes nonlinear constitutive relationships. In
truth, though, all constitutive relationships become nonlinear when the limits of
their capacity are approached.
x1
F K
m1
m2
B
x2
Figure 1.4 Two-mass system containing a spring and damper, and a forcing
function.
Chapter 1. Models of Linear Systems 11
Solution:
As mass 1 moves in the direction of positive x1 , the spring will compress and
react with a force K ( x1 x 2 ) against the motion. Likewise, the damper will resist
motion with viscous friction force B( x1 x 2 ) . The free-body diagram of the
system in Figure 1.5 shows the two masses and all of the forces acting on them.
K ( x1 x 2 )
F m1
B ( x1 x 2 )
K ( x1 x 2 )
m2
B ( x1 x 2 )
Figure 1.5 Free-body diagrams showing the masses in Figure 1.4 and the forces that
act on them.
b g b
x1 F K x1 x2 B x1 x 2
m1 g (1.9)
For the second mass, only the spring and damper provide forces, which are equal
and opposite to the forces seen in (1.9). Therefore,
b g b
x2 K x1 x2 B x1 x 2
m2 g (1.10)
b g b
x1 B x1 x 2 K x1 x2 F
m1 g
x Bb x x g K b x x g0
(1.11)
m
2 2 2 1 2 1
These simple linear equations will be used for further examples later.
vx
R1
vR
C
ic i
R2
v vC L vL
Solution:
In this example, the sum of the three currents entering node 1 must be zero. While
Ohm’s law v iR may be used for the resistor, the current through the capacitor
is given by ic C dvc dt . Thus,
vc dv
C c i 0 (1.12)
R1 dt
where care has been taken to use only the desired variables v c ( t ) and i( t ) . For a
second relationship, we note that the sum of all voltages around the main loop of
the circuit must be zero. The voltage across the inductor is given by v L di dt ,
so
di
v vc R2i L 0 (1.13)
dt
where v ( t ) is the forcing function provided by the voltage source in the circuit.
Rewriting (1.12) and (1.13) in a more convenient form,
dvc 1 di
C vc i 0 L R2i vc v (1.14)
dt R1 dt
Chapter 1. Models of Linear Systems 13
State Variables
Consider a nth-order linear, time-invariant differential equation:
d n x( t ) d n 1x( t ) dx( t )
n
a n 1 n 1
a1 a0 x( t ) b0u( t ) (1.15)
dt dt dt
The most straightforward method for choosing n state variables to represent this
system is to let the state variables be equal to x ( t ) and its first ( n 1) derivatives.
Thus, if the state variables are denoted by , then
1 ( t ) x ( t )
dx ( t )
2 (t )
dt
d n 1 x ( t )
n (t )
dt n 1
14 Part I. Mathematical Introduction to State Space
These definitions of state variables are also called phase variables. The n
differential equations resulting from these definitions become
1 ( t ) 2 ( t )
( t ) ( t )
2 3
(1.16)
n 1 ( t ) n ( t )
n ( t ) a0 1 ( t ) a1 2 ( t ) a n 2 n 1 a n 1 n b0u( t )
LM OP LM 00 1 0 0 OP L O L 0 O
MM PP MM 0
1
0 1 0 PP MM PP MM PP
1
PP MM PP MM 0 PPu(t )
2
2
MM PP MM 0
0 0 0 (1.17)
0 0 1
N Q MNa
n
0 a1 a2 a n 1 PQ N Q Nb Q
n 0
LM OP
1
0 M P
y( t ) 1 0
MM PP
2
(1.18)
N Q
n
More generally, we may designate as the output a weighted sum of the state
variables and sometimes also a sum of state variables and input variables.
Defining x( t ) 1 n , the two equations (1.17) and (1.18) are together
M
written as
x Ax bu
(1.19)
y cx du
ss(a,b,c,d)
ssdata(sys) where the matrices A, b, c, and d are the corresponding matricesM in (1.17) and
Chapter 1. Models of Linear Systems 15
(1.18). These will be referred to as the state matrix (A), the input matrix (b), the
output matrix (c), and the feedthrough matrix (d) (so named because it is the gain
through which inputs feed directly into outputs). These equations are expressed
for a single input, single output (SISO) system. For multi-input, multioutput
(MIMO) or multivariable systems, the equations in (1.19) can be written exactly
the same except that the input matrix is a capital B, the output matrix is a capital
C, and the feedthrough matrix is a capital D. These changes indicate that they are
matrices rather than simple columns (b), rows (c), or scalars (d). The equations in
(1.19) will become quite familiar, as they are the format used for studying the
properties of linear systems of equations throughout this book.
Of course, if the original Equation (1.15) were time-varying, then the
coefficients might be functions of time, i.e., ai ( t ) and bi ( t ) . In that case, (1.19)
might contain A( t ), b( t ), c( t ) and d ( t ) .
Solution:
In the mechanical system, we derived two separate equations, each being second
order (1.11). To generate state equations, we will introduce the variables
1 x1 , 2 x1 , 3 x2 , and 4 x 2 . Then, by inspection of (1.11), the state
equations are:
LM OP LM K0 1 0 0 OP L O L 0 O
PP MM PP MM 1 m PP F (t )
1 1
MM PP MM 0 m B
m1
K
m1
B
m1
PP MM PP MM 0 PP
2 1 2
1
MM PP MM K
3
0 0 1 3
N Q N m K m Bm
Q N Q MN 0 PQ
B
4 2 m2 2 2 4
(1.20)
LM OP 1
0 M P
y ( t ) 1 0 1
MM PP
2
N Q 4
Solution:
In this system, the two equations in (1.14) are each first order. The total system is
then second order. Using v c and i( t ) as the two state variables, i.e.,
1 ( t ) vc ( t ) and 2 ( t ) i( t ) , we can immediately write the equations:
1
Q 2
(1.21)
y ( t ) 1 R2
LM OP b1gv(t )
1
N Q
2
The output equation in this result comes from the KVL equation v L v v c iR2
.
d n x( t ) d n 1x( t ) dx( t )
n
a n 1 n 1
a1 a0 x ( t )
dt dt dt
(1.22)
d n u( t )
bn b0u( t )
dt n
both sides of the equation are integrated twice with respect to the time variable.
This would result in:
zz
t s
x ( ) a1x ( ) a0 ( ) x( ) d ds
zz
t s
b2u( ) b1u( ) b0 ( )u( ) d ds
giving
z zz
t t s
x ( t ) a1x( s ) ds a0 x ( ) d ds
z zz
t t s
b2u( t ) b1u( s ) ds b0u( ) d ds
or
z zz
t t s
x ( t ) b2 u( t ) b1u( s ) a1 x ( s ) ds b0 u( ) a 0 x ( ) d ds
z R|ST| U| (1.24)
z
t s
b2 u( t ) b1u( s ) a1 x ( s ) b u( ) a x ( ) d V ds
0 0
W|
For higher-order systems, this process continues until an equation of the form of
(1.24) is derived. From the form of (1.24), the simulation diagram shown in Figure
1.8 can be drawn, with the associated state equations appearing in Equation
(1.26). Note that in this formulation, the integrators in the network are not
connected end-to-end. Thus the state variables are not simply derivatives of one
another as are phase variables. Instead, the state equations are written as in (1.26).
The state variables are, however, still defined as the outputs of the integrators.
This is commonly done, but is not necessary. Additional examples will be shown
in Chapter 9.
18 Part I. Mathematical Introduction to State Space
bn
bn 1
b1
u (t ) xn x n 1 x2 x1
-
+
xn
x n 1 x1
b0 + y (t )
- -
a n 1
an 2
a0
LM x 1 OP LM 0 1 0 0 OP LM x 1 OP LM0OP
MM PP MM 0 PP MM PP MM PPu(t )
MNxx
n 1
n
PQ MN0a 0
0
a1 a n 1
1
PQ MNxx
n 1
n
PQ MN10PQ
LM x 1 OP (1.25)
y ( t ) b0 bn a 0 b1 bn a1 bn 1 bn a n 1 MM PP b u(t )
n
MNxx
n 1
n
PQ
Figure 1.7 Simulation diagram and state equations for phase variable definitions of
state variables.
These special choices are examples of different ways in which state variables
can be assigned to a particular system. They have some convenient properties that
we will examine in later chapters. Such special forms of equations are known as
canonical forms.
It should be noted that there are an infinite number of other ways in which to
derive definitions for state variables, a fact that will soon become readily
apparent. It is also important to realize that in our simple physical system
examples, the variables we choose are physically measurable or are otherwise
meaningful quantities, such as voltages or displacements. Often, variables will be
selected purely for the effect they have on the structure of the state equations, not
for the physical meaning they represent. State variables need not be physically
meaningful. This is one of the primary advantages to the state variable technique.
Chapter 1. Models of Linear Systems 19
bn
b1
xn + x n 1 x1 +
y (t )
+ + +
b0
u (t ) xn x n 1 x1
a n 1
a1
a0
LM x 1 OP LMa n 1 1 OP LM x OP LMb a b OP
0 0 1 n 1 n 1 n
MM PP MM 0 PP MM PP MM PPu(t )
MNxx
n 1
n
PQ MN aa
1
0
0 1 x
P M P
0 0Q N x Q N b a b Q
M b a b
P n 1
n
1
0
1 n
0 n
LM x OP 1
(1.26)
0 M
P
y(t ) 1 0
MMx PP b u(t ) n 1
n
Nx Q n
In order to get each equation to contain second derivatives in only one of the
20 Part I. Mathematical Introduction to State Space
m1
x1 Bx 2 Kx 2 F
m2
FG m IJ m FGm
x 2 B 1 2 x 2 K 1 2 x 2 2 F
IJ
H m1 K m1 Hm1 K
Now using new state variables 1 x1 , 2 x1 , 3 x 2 and 4 x 2 , the
new state equations are readily apparent:
LM OP LM0 1 0 OP L O L 0 O
0
MM PP MM0 PP MM PP MM 1 PP
1 1
K B
PP MM PP MM m PP F
0
MM PP MM0
2 m1 m 1 2 1
MM PP MM 0 0 1
P MM PP MM 0 PP
3
F 1 1 IJ BFG 1 1 IJ PP M P MM 1 PP 3
MN PQ MN0
4
0 KG
H m m K H m m K Q MN PQ N m Q
1 2 1 2 4 1
LM OP
1
MM PP
1 0 M P
2
y 0 0
MM PP
MM PP
3
N Q
4
v R R2i
(1.28)
v x vc R2i
Chapter 1. Models of Linear Systems 21
MN v x
PQ MN1 PM P
R QN i Q
2
(1.29)
If we use the notation v C i 1 2 for the state vector already
v
introduced in (1.21) and R vx 1 2 for the new state vector,
then we can write (1.30) symbolically as
M (1.31)
where matrix M is defined in (1.30). Likewise, the symbolic form for (1.21) is as
given in (1.19), i.e.,
A bv
(1.32)
y c dv
M
Equation (1.31) directly implies that , so substituting into (1.32),
bv
M AM
(1.33)
y cM dv
or
M 1bv A
bv
M 1 AM
(1.34)
dv c
y cM
dv
where
22 Part I. Mathematical Introduction to State Space
N CR CR
1 2 CR1
L 0 R OL 0 O M P
LR O 2
b M b M M P L
MN1 R PPQ MMN 1 LPPQ MM R PP
2
1
MN L PQ
2
2
LM 1 1OP
c cM 1 R M 1 P
0 1 (1.35)
MN R PQ
2
0
2
d d 1
This gives a new system of state equations that are equivalent to those in (1.21)
but appear quite different. Notice that the feedthrough matrix, d, is the same in
each case.
The procedure we have just introduced will be considered from a different
perspective in later chapters. The important points here are:
• nth-order linear differential equations (or several coupled systems
constituting an nth-order system) can be written as n first-order state
equations.
• State equations are entirely equivalent to the original differential
equations but are not unique.
• State equations can be changed with matrix-vector operations, resulting
in a new form for each of the four system matrices.
In future chapters, we will see what conveniences can be realized with
different choices of state vector definition and what insight might be gained into
the original physical system by using the state variable notation. There will be
certain characteristics of differential equations and control systems that are more
apparent in state space (time-domain) than in transfer function form (frequency-
domain). In order to understand these properties, some details of linear vector
spaces and linear algebras will be necessary.
Chapter 1. Models of Linear Systems 23
x ( kT 2T ) a1 x ( kT T ) a0 x ( kT ) b0 u( kT ) (1.36)
x k 2 a1 x k 1 a0 x k b0 uk (1.37)
With this difference equation, we may define a state vector in any of the ways
discussed above for continuous-time systems. For example, if we let
xk x k 1 , then we will obtain the discrete-time state equation
k 1
LM 0 1 OP LM 0 OPu
N a 0 a1 Q Nb Q
k
0
k
(1.38)
Ad k bd uk
24 Part I. Mathematical Introduction to State Space
x k n a n 1 x k ( n 1) a1 x k 1 a0 x k bn uk n b0 uk (1.39)
then the simulation diagrams of Figures 1.7 and 1.8 (and all other possibilities)
may also be used, with the exception that the integrators are replaced with unit-
time delays, i.e., delay blocks representing one sample period, T, in length. When
such a system is time-varying, the coefficients a i and bi above may be replaced
with ai ( k ) and bi ( k ) . (The inclusion of this extra time argument is the
motivation for the subscript notation; writing ai ( k , kT T ) would be
cumbersome.)
The following examples illustrate a number of ways a difference equation
can be used to model physical systems. The first two examples illustrate the
derivation of difference equations by direct discrete-time modeling, and in the
third example, a method is given for approximating a differential equation by a
discrete-time system. Another method for representing discrete-time systems as
approximations of continuous-time systems is given in Chapter 6.
Solution:
The balance, after compounding, in month k is denoted x ( k ) . Then x ( k ) will be
equal to the previous month’s balance plus the interest for month k and the net
total of the owner’s deposits and withdrawals, which we will denote by u( k ) .
Then we have the difference equation
x ( k ) x ( k 1) i 12 x ( k 1) u( k 1)
e j
1 i 12 x ( k 1) u( k 1)
time origin and that x(1) is the first balance that must be computed. Because the
system is time-invariant, this is merely a notational convenience:
e j
x ( k 1) 1 i 12 x ( k ) u( k )
Solution:
Several assumptions must be made to derive a suitable model. First, we will
assume that the birthrate of the piranhas is directly proportional to their food
supply, which of course is the population of guppies. Further, we assume that
because piranhas are large, their death rate is proportional to overcrowding, i.e.,
to the level of their own population. Therefore, we can write the relationship
Pp ( d 1) Pp ( d ) k1Pg ( d ) k2 Pp ( d )
b g
1 k2 Pp ( d ) k1Pg ( d )
(1.40)
Pg ( d 1) Pg ( d ) u( d ) k3 Pp ( d ) (1.41)
Together, these two equations can be combined into the state space difference
equation model
g 3
P M P M Pu( d )
1 Q N P ( d )Q N1Q
g
(1.42)
26 Part I. Mathematical Introduction to State Space
x ( t ) 2 x ( t ) u( t )
(1.43)
Solution:
At time t kT , where T is a sampling time, the approximation of the first
derivative is
x ( kT T ) x ( kT )
x ( kT )
T
This implies that the approximation for the second derivative would be:
x ( kT T ) x ( kT )
x ( kT )
T
x ( kT 2T ) x ( kT T ) FG
x ( kT T ) x ( kT ) IJ
T
H T K
T
x ( kT 2T ) 2 x ( kT T ) x ( kT )
T2
x( kT 2T ) 2 x( kT T ) x( kT )
2
2 x( kT ) u( kT )
T
e j
x ( k 2) 2 x ( k 1) 2T 2 1 x ( k ) T 2u( k ) (1.44)
LM x ( k 1) OP LM 0
1 1OP LM x ( k ) OP LM 0 OP
1
If we now wish to draw a simulation diagram for this system that is similar to the
one in Figure 1.7, we must remember that instead of integrators, we must use the
unit delay operator, z 1 . Because (1.45) has the same form as (1.39), which itself
is similar in form to (1.22), the simulation diagram of Figure 1.9 is obtained.
u(k ) x 2 ( k 2) x1 ( k 1)
z 1 z 1 T2 x (k )
x2 (k ) x1 ( k )
2
2 T 2 1
Figure 1.9 Simulation diagram for a discrete-time state space system. The unit delay
1
operator is signified by the symbol z .
x Ax bu
(1.46)
y cx du
sX ( s ) AX ( s ) bU ( s )
(1.47)
Y ( s ) cX ( s ) dU ( s )
b g
sX ( s ) AX ( s ) sI A X ( s ) bU ( s )
or
b
X ( s ) sI A g 1
bU ( s ) (1.48)
b
Y ( s ) c sI A g 1
b d U ( s)
or, for a SISO system in which Y ( s ) and U ( s ) are scalar quantities and the
division operation exists,
Y ( s)
U ( s)
b
c sI A g 1
b d P( s ) (1.49)
2s 4 2
P( s ) 2 (1.50)
s 1 s 1
Converting this system to state space representation will always give d 2 as the
feedthrough term, regardless of the choice of variables. Recall that if the transfer
function is improper, then positive powers of s would divide out of such a fraction,
and a noncausal system would be apparent.
Equation (1.49) shows how it is possible to obtain a transfer function from
the matrices given in a state variable representation.M To get a state variable tf2ss(num,den)
representation from a transfer function,M we usually return to the original ss2tf(a,b,c,d)
Chapter 1. Models of Linear Systems 29
differential equation or use the simulation diagrams in Figures 1.7 and 1.8. This
subject is complicated by controllability and observability issues introduced in
Chapters 8 and 9.
We have asserted that no matter which (valid) state variables we choose, the
state equations represent the original system exactly. One may than ask if a
change of variables is performed as in (1.31), how is the transfer function (1.49)
altered? Suppose in the equation for the transfer function in terms of system
matrices in (1.49), we substitute the “transformed” matrices from (1.35). Then we
obtain
1
e
P ( s ) c sI Aj b d
1
e
cM sI M 1 AM j M 1b d
1
cM e sM 1
M M 1 AM j M 1b d (1.51)
b
cMM 1 sI A g 1
MM 1b d
cb sI Ag
1
b d
P( s )
So we have shown that the same transfer function results regardless of the choice
of state equations. Note that this same result holds for discrete-time systems in
exactly the same form; simply replace the s operator in this section with the z
operator.
1 d n f (x)
f (x) n! dx n
( x x0 ) n (1.52)
n0 xx 0
30 Part I. Mathematical Introduction to State Space
df ( x ) 1 d 2 f (x)
f ( x ) f ( x0 ) ( x x0 ) ( x x0 )2
dx x x0 2 dx 2
xx 0
(1.53)
For functions that are relatively smooth, the magnitudes of the terms in this series
decrease as higher order derivatives are introduced, so an approximation of a
function can be achieved by selecting only the low-order terms. Choosing only
the first two, for example, we obtain
f ( x ) f ( x 0 ) f '( x 0 )( x x 0 )
(1.54)
f '( x 0 ) x f ( x 0 ) f '( x 0 ) x 0
It can be seen from (1.54) that by keeping only the first two terms of the
Taylor series, an equation of a line results. The approximation of (1.54) will be
referred to as the linearization of f ( x ) . This linearization is illustrated in Figure
1.10. In the figure, the original curve f ( x ) appears as the wavy line. The point
of expansion, x x 0 , is the point at which the curve is approximated as a straight
line by (1.54). For most curves, it is important that the straight-line approximation
not be used if the value of x strays too far from x 0 . However if x remains close
to x 0 , the Taylor series approximation is sometimes a very good one for practical
purposes. The accuracy and so-called “linear region” depend, of course, on the
particular function f ( x ) .
Chapter 1. Models of Linear Systems 31
f ( x ) f ( x0 ) f ' ( x0 ) x x0
f ( x)
“linear region”
f ( x0 )
x
x0
f ( x1 , x 2 , x n ) f ( x10 , x 20 , x n 0 )
FG
( x1 x10 )
( x n x n0 )
IJ
f ( x1 , x 2 ,, x n )
H x1 x n K xi xi 0
1 FG
( x1 x10 )
( x n x n0 )
IJ 2
f ( x1 , x 2 , x n )
2! H x1 x n K xi xi 0
Of course, for a linear approximation, only the first two terms of this series need
be retained.
It is also quite common that several functions of several variables need to be
linearized, such as
32 Part I. Mathematical Introduction to State Space
f1 ( x1 , x2 , x n )
f 2 ( x1 , x2 , x n )
(1.55)
f m ( x1 , x2 , x n )
LM f ( x , x , x ) OP
1 1 2 n
f ( x) M
f ( x , x , x ) P
MM PP
2 1 2 n
(1.56)
N f ( x , x , x )Q
m 1 2 n
where f f1 f2 fm and x x1 x2 x n . Using this notation,
the linearized version of the nonlinear functions are (by taking the first two terms
of the Taylor series):
f ( x )
f ( x ) f ( x0 ) ( x x0 ) (1.57)
x x0
bg
In this expression, the derivative of f x is a derivative of an m1 vector with
respect to an n 1 vector, resulting in an m n matrix whose ( i, j )th element is
f i x j . See Appendix A.
applied, provided that the approximation is taken sufficiently near the operating
point.
2
( t )
mg
F
M
x (t )
It can be shown that the two coupled differential equations that describe the
motion of this system are:
(1.58)
e I m j mx cos mg sin 0
2
Linearize these two equations using the first two terms of the Taylor series.
34 Part I. Mathematical Introduction to State Space
Solution:
Although only x ( t ) and ( t ) are considered “coordinate variables,” when
linearizing we consider their respective derivatives to also constitute independent
variables. Likewise, the input force F is a variable (although the equations already
happen to be linear in terms of F). We therefore are linearizing two equations,
each in terms of the seven independent variables ( t ), ( t ), ( t ), x ( t ), x ( t ),
x( t )
, and F.
To begin, we select an operating point. For convenience, we choose the
“zero” position of 0 ( t ) 0 ( t )
0 ( t ) 0 , x0 ( t ) x 0 ( t )
x0 ( t ) 0 , and
F0 0 . We should note that these values are not all independent of one another.
If we arbitrarily select the first six values, then substitution into (1.58) allows us
to determine F0 0 . If, for example, the cart and pendulum were moving up a
wall, then a different F0 (nonzero) would have to be chosen in order to counteract
gravity. The equations in (1.58) must hold at all times.
We will apply (1.54) to the four terms in the first equation of (1.58) and leave
the details of the second equation as an exercise.
b
For m M x,g
bm M gx bm M gx bm M gb x x g
0 0
0 b m M g
x
b m M g
x
which of course returns the original expression since it was linear to begin with.
For m
cos ,
m
cos m
0 cos 0
m
cos d i b g
0 0
0
dm
cos i d i
0 0
0
0 m bg
0 sin 0 m cos 0
di
m
m 2 sin m 0 2 sin 0
e
m 2 sin j b g
0 0
0
e
m 2 sin j d i
0 0
0
bg
0 m 0 2 cos 0 2m 0 sin 0 di
0
It may at first seem somewhat surprising that this term should disappear entirely.
However, recalling that the equilibrium point we have chosen has 0 0 , the
“linear” region in this problem will include only small velocities. Because the
velocity in this term appears only as the square, and we are assuming that second
order and higher terms are negligible, this entire term should be negligible near
the equilibrium.
As for the final term, F, it is clear that this is already linear, and we will leave
it as is. The “linearized” version of the first of Equations (1.58) is therefore:
Note that this equation has two second-order derivatives in it, which are the
highest derivatives of each variable ( t ) and x ( t ) . The second equation will
linearize to
( I m 2 )
m
x mg 0 (1.60)
f ( x )
x f ( x0 ) ( x x0 ) (1.61)
x x0
36 Part I. Mathematical Introduction to State Space
If in (1.61) we have
f ( x )
f ( x0 ) ( x0 ) 0
x x0
then (1.61) is not linear! It has a constant offset and will therefore violate the
homogeneity and additivity conditions required for linearity. Equation (1.61) will
indeed look like a straight line on the x versus x plane, but it will not pass
through the origin of this plane. Such a system is called affine.
In order to make the system linear, one must choose an appropriate operating
value for the variable x . In particular, choose as the operating point the
equilibrium value x e such that f ( x e ) 0 . Then to eliminate the constant term
in (1.61), we must make a change of variable x xe . Then, x x e and
x . Substituting these values into (1.61), we get
f ( x ) f ( x )
f ( xe ) () (1.62)
x xe x xe
This equation is then truly linear. If after solving for , we desire to know the
value of x , then the change of variables may be reversed.
1.3 Summary
In this chapter we have introduced the state space notation to simple models of
physical systems. Our purpose has been to establish terms and definitions that are
both common to and different from the transfer function descriptions with which
the reader may be more familiar. Using the state variable technique, our main
points have been as follows:
• State variables are simply regarded as a set of variables in which the
behavior of a system may be mathematically modeled.
• Mathematical models for use in state variable systems may be derived,
simplified, linearized, and discretized just as any other mathematical
model is produced. It is only the choice of state variables that is new so
far.
• State variables and state variable equations together constitute the same
information about a physical system as do the original differential
equations derived from familiar conservation and constitutive laws.
Chapter 1. Models of Linear Systems 37
1.4 Problems
1.1 A system has an input u( t ) and an output y ( t ) , which are related by the
information provided below. Classify each system as linear or nonlinear
and time-invariant or time-varying.
a) y ( t ) 0 for all t .
b) y ( t ) a , a 0 , for all t .
c) y ( t ) 3u( t ) 2 .
d)
y(t )
a
u (t )
a
e)
y (t )
u (t )
f) y ( t ) 3e t y ( t ) y ( t ) u( t ) .
g) y ( t ) (1 y 2 ( t )) y ( t ) 2 y ( t ) u( t ) , constant 0 .
38 Part I. Mathematical Introduction to State Space
h) y ( t ) u( t 3) .
i) y ( t ) u( t ) y ( t ) 0 .
z
t
j) y( t ) e u( t )d .
0
k) y ( k 2 ) 0.4 y ( k 1) y ( k ) 3u( k 2 ) u( k ) .
k
l) y( k ) sin( iT ) e iT u( k i ) , T constant 0 .
i0
1.2 Figure P1.2 shows a model commonly used for automobile suspension
analysis. In it, the uneven ground specifies the position of the wheel’s
contact point. The wheel itself is not shown, as its mass is considered
negligible compared to the mass of the rest of the car. Write a differential
equation and a state variable description for this system, considering the
height of the car, x ( t ) , to be the output, and the road height, y ( t ) , to be
the input.
M x (t )
B K
y (t )
y0
P1.2
1.3 The motor in Figure P1.3 exerts a torque on the shaft of a motor, which
has inertia J m and bearing friction Bm (assumed viscous). This motor is
attached to a load inertia J L , which itself has a viscous friction BL . The
motor coupling is slightly flexible and is modeled as a torsional spring K
Chapter 1. Models of Linear Systems 39
. Write the equations of motion and a set of state equations for the system,
taking ( t ) as the input, and L ( t ) as the output.
( t ) m (t ) L (t )
K
Jm JL
Bm BL
P1.3
1.4 For the mechanical system in Figure P1.4 with a spring, friction forces, and
an external force, write state equations using the following sets of
variables:
a) State variables 1 x1 , 2 x1 , 3 x 2 , and 4 x 2 ; and output
variable y x 2 .
b) State variables 1 x1 , 2 x1 , 3 x 2 x1 , and 4 x 2 x1 ;
and output variable y x 2 x1 .
x2 x1
K
F
m2 B2
B1
m1
P1.4
1.5 For the circuit shown in Figure P1.5, choose appropriate state variables and
write state equations, taking as output the voltage across the resistor.
40 Part I. Mathematical Introduction to State Space
L C
R v R (t )
v (t )
P1.5
1.6 For the circuit shown in Figure P1.6, write a single second-order
differential equation in terms of the voltage v x ( t ) and the input x ( t ) . Then
write state equations using state variables v C ( t ) and iL ( t ) , where the
output of the system is considered to be v x ( t ) , and the input is x ( t ) .
C
i L (t )
v C (t ) R
x (t ) L v x (t )
P1.6
1.7 For the circuit shown in Figure P1.7, with ideal OP-AMPS, find a state
variable representation, using the capacitor voltages as state variables, and
the signal x ( t ) as the output. What will be the zero-input solution for x ( t )
?
Chapter 1. Models of Linear Systems 41
R
R 10F
10F
u( t ) 10k
10k
x (t )
R
P1.7
1.8 Write two differential equations that describe the behavior of the circuit of
Example 1.2, using v L ( t ) and v C ( t ) as the state variables.
1.9 Given the state variable description of the system in terms of x i ( t ) below,
change the state variables and write new state equations for the variables
1 ( t ) 3x1 ( t ) 2 x2 ( t ) , and 2 ( t ) 7 x1 ( t ) 5x 2 ( t ) .
LM x (t )OP LM 11
1 OP LM x (t ) OP LM0OPu(t )
10 1
Nx (t )Q N21
2 18Q N x ( t )Q N1Q
2
y(t ) 2
L x (t )OP u(t )
2 M
1
Nx (t )Q
2
LM x (t )OP LM 18
1 9 OP LM x (t ) OP LM1OP
13 1
N x (t )Q N65
3 3
LM x (t )OP1
y( t ) 5 5 5 M x ( t )P
MN x (t )PQ
2
3
change the state variables and write new state equations for variables
1 ( t ) 4 x1 ( t ) 2 x2 ( t ) 3x3 ( t )
2 ( t ) 15 x1 ( t ) 7 x2 ( t ) 10 x3 ( t )
and
42 Part I. Mathematical Introduction to State Space
3 ( t ) 5 x1 ( t ) 2 x2 ( t ) 3x3 ( t )
1.11 The robot shown in Figure P1.11 has the differential equations of motion
given. Symbols m1 , m2 , I1 , I 2 , 1 , and g are constant parameters,
representing the characteristics of the rigid body links. Quantities
1 and d 2 are the coordinate variables and are functions of time. The inputs
are 1 and 2 . Linearize the two equations about the operating point
1 1 0, d 3 , and d d 0 .
1 2 2 2
d2
1 m2
m1 1
P1.11
1.12 For the system in Example 1.8, the nonlinear equations of motion are given
in (1.58). Show that (1.60) is the linear approximation of the second of
these equations, and combine the two linearized equations (1.59) and
(1.60) into state space form.
R L
V (t )
e(t ) J f
i (t )
P1.13
44 Part I. Mathematical Introduction to State Space