Chapter 1 - Introduction
Chapter 1 - Introduction
INTRODUCTION
ancient history, the industrial revolution, and into the early twentieth
century of ingeniously designed systems that employed feedback mech-
anisms in various forms. Ancient water clocks, south-pointing chariots,
Watt’s flyball governor for steam engine speed regulation, and mecha-
nisms for ship steering, gun pointing, and vacuum tube amplifier stabiliza-
tion are but a few. Here we are content to survey important developments
in the theory and practice of control engineering since the mid-1900s in
order to provide some perspective for the material that is the focus of this
book in relation to topics covered in most undergraduate controls courses
and in more advanced graduate-level courses.
In the so-called classical control era of the 1940s and 1950s, systems
were represented in the frequency domain by transfer functions. In addi-
tion, performance and robustness specifications were either cast directly in
or translated into the frequency domain. For example, transient response
specifications were converted into desired closed-loop pole locations or
desired open-loop and/or closed-loop frequency-response characteristics.
Analysis techniques involving Evans root locus plots, Bode plots, Nyquist
plots, and Nichol’s charts were limited primarily to single-input, single-
output systems, and compensation schemes were fairly simple, e.g., a
single feedback loop with cascade compensation. Moreover, the design
process was iterative, involving an initial design based on various sim-
plifying assumptions followed by parameter tuning on a trial-and-error
basis. Ultimately, the final design was not guaranteed to be optimal in
any sense.
The 1960s and 1970s witnessed a fundamental paradigm shift from the
frequency domain to the time domain. Systems were represented in the
time domain by a type of differential equation called a state equation.
Performance and robustness specifications also were specified in the time
domain, often in the form of a quadratic performance index. Key advan-
tages of the state-space approach were that a time-domain formulation
exploited the advances in digital computer technology and the analysis
and design methods were well-suited to multiple-input, multiple-output
systems. Moreover, feedback control laws were calculated using analytical
formulas, often directly optimizing a particular performance index.
The 1980’s and 1990’s were characterized by a merging of frequency-
domain and time-domain viewpoints. Specifically, frequency-domain per-
formance and robustness specifications once again were favored, coupled
with important theoretical breakthroughs that yielded tools for handling
multiple-input, multiple-output systems in the frequency domain. Further
advances yielded state-space time-domain techniques for controller syn-
thesis. In the end, the best features of the preceding decades were merged
into a powerful, unified framework.
STATE EQUATIONS 3
xn (t)
4 INTRODUCTION
ẋn (t)
Finally, for a specified initial time t0 , the initial state x(t0 ) = x0 is a
specified, constant n-dimensional vector.
The state vector x(t) is composed of a minimum set of system variables
that uniquely describes the future response of the system given the current
state, the input, and the dynamic equations. The input vector u(t) contains
variables used to actuate the system, the output vector y(t) contains the
measurable quantities, and the state vector x(t) contains internal system
variables.
Using the notational convention M = [mij ] to represent the matrix
whose element in the ith row and j th column is mij , the coefficient
matrices in Equation (1.1) can be specified via
A = [aij ] B = [bij ] C = [cij ]
D = [dij ]
having dimensions n × n, n × m, p × n, and p × m, respectively. With
these definitions in place, we see that the state equation (1.1) is a compact
representation of n scalar first-order ordinary differential equations, that is,
ẋi (t) = ai1 x1 (t) + ai2 x2 (t) + · · · + ain xn (t)
+ bi1 u1 (t) + bi2 u2 (t) + · · · + bim um (t)
for i = 1, 2, . . . , n, together with p scalar linear algebraic equations
yj (t) = cj 1 x1 (t) + cj 2 x2 (t) + · · · + cjn xn (t)
+ dj 1 u1 (t) + dj 2 u2 (t) + · · · + dj m um (t)
EXAMPLES 5
D
x0
1.3 EXAMPLES
y(t)
m f(t)
c
ky(t)
m f (t)
cy(t)
y(t) = x1 (t)
u(t) = f (t)
x1 (t) = iL (t)
x2 (t) = v(t)
1
x2 (t) + x1 (t) + C ẋ2 (t) = u(t)
R
These relationships can be rearranged so as to isolate state-variable
time derivatives as follows:
1
ẋ1 (t) = x2 (t)
L
1 1 1
ẋ2 (t) = − x1 (t) − x2 (t) + u(t)
C RC C
iL(t) +
i(t) R L C v(t)
−
Here, the energy-storage elements are the two springs and the two masses.
Defining state variables in terms of mass displacements and velocities
10 INTRODUCTION
y1(t) y2(t)
f(t)
k1 k2 c
m1 m2
yields
x1 (t) = y1 (t)
x2 (t) = y2 (t) − y1 (t)
x3 (t) = ẏ1 (t)
x4 (t) = ẏ2 (t)
we could have defined the second state variable based on the absolute
mass displacement, that is x2 (t) = y2 (t), and derived an equally valid
state-space representation. Making this one change in our state variable
definitions, that is,
x1 (t) = y1 (t)
x2 (t) = y2 (t)
x3 (t) = ẏ1 (t)
x4 (t) = ẏ2 (t)
yields the new A and C matrices
0 0 1 0
0 0 0 1
(k1 + k2 ) k2
A = − 0 0
m1 m1
k2 −k2 c
0 −
m2 m2 m2
1 0 0 0
C=
0 1 0 0
The B and D matrices are unchanged.
In addition, Kirchoff’s current law applied at the top node of the induc-
tor gives
iL (t) = i1 (t) − i2 (t)
12 INTRODUCTION
+ vC1(t) − + vC2(t) −
R1
C1 C2
vin(t) + iin(t)
L iL(t) R2
−
i1(t) i2(t) i3(t)
Calculating and multiplying through by the inverse and yields the state
differential equation, that is,
1 −1 R2
(R1 + R2 )C1 (R1 + R2 )C1 (R1 + R2 )C1
ẋ1 (t) x1 (t)
−1 −1 −R1
ẋ2 (t) = x2 (t)
(R + R )C (R + R )C (R + R )C
ẋ3 (t) 1 2 2 1 2 2 1 2 2 x3 (t)
−R2 R1 −R1 R2
(R1 + R2 )L (R1 + R2 )L (R1 + R2 )L
1 −R2
(R1 + R2 )C1 (R1 + R2 )C1
1 −R u1 (t)
+
2
(R + R )C (R1 + R2 )C2
1 2 2 u2 (t)
R2 R1 R2
(R1 + R2 )L (R1 + R2 )L
which is in the required format from which coefficient matrices A and B
can be identified. In addition, the associated output equation y(t) = Lẋ3 (t)
can be expanded to the algebraic output equation as follows
x1 (t)
−R2 R1 −R1 R2
y(t) = x2 (t)
(R1 + R2 ) (R1 + R2 ) (R1 + R2 ) x (t) 3
R2 R1 R2 u1 (t)
+
(R1 + R2 ) (R1 + R2 ) u2 (t)
Now, the key observation is that a state equation describing the rela-
tionship between input u(t) and output w(t) can be written down using
the approach of the preceding example. That is, in terms of state variables
x1 (t) = w(t)
x2 (t) = ẇ(t) = ẋ1 (t)
x3 (t) = ẅ(t) = ẍ1 (t) = ẋ2 (t)
we have
ẋ1 (t) 0 1 0 x1 (t) 0
ẋ2 (t) = 0 0 1 x2 (t) + 0 u(t)
ẋ3 (t) −a0−a1 −a2 x3 (t) 1
x1 (t)
w(t) = [ 1 0 0 ] x2 (t) + [0]u(t)
x3 (t)
As the final step, we recognize that an equation relating the true system
output y(t) and our chosen state variables follows from
where x(t), u(t), and y(t) retain their default vector dimensions and
f (·, ·, ·) and h(·, ·, ·) are continuously differentiable functions of their
(n + m + 1)-dimensional arguments. Linearization is performed about a
nominal trajectory defined as follows.
Definition 1.1 For a nominal input signal, ũ(t), the nominal state tra-
jectory x̃(t) satisfies
˙
x̃(t) = f [x̃(t), ũ(t), t]
for all t.
Deviations of the state, input, and output from their nominal trajectories
are denoted by δ subscripts via
xδ (t) = x(t) − x̃(t)
uδ (t) = u(t) − ũ(t)
yδ (t) = y(t) − ỹ(t)
Under the assumption that the state, input, and output remain close to
their respective nominal trajectories, the high-order terms can be neglected,
yielding the linear state equation
approximates the behavior of the nonlinear state equation provided that the
deviation variables remain small in norm so that omitting the higher-order
terms is justified.
If the nonlinear maps in Equation (1.4) do not explicitly depend on t,
and the nominal trajectory is an equilibrium condition for a constant nom-
inal input, then the coefficient matrices in the linearized state equation are
constant; i.e., the linearization yields a time-invariant linear state equation.
in which p(t) is the ball position, θ (t) is the beam angle, and τ (t) is the
applied torque. In addition, g is the gravitational acceleration constant, J
is the mass moment of inertia of the beam, and m, r, and Jb are the mass,
radius, and mass moment of inertia of the ball, respectively. We define
state variables according to
x1 (t) = p(t)
x2 (t) = ṗ(t)
x3 (t) = θ (t)
x4 (t) = θ̇ (t)
)
p(t
q(t)
t(t)
In addition, we take the input to be the applied torque τ (t) and the
output to be the ball position p(t), so
u(t) = τ (t)
y(t) = p(t)
The resulting nonlinear state equation plus the output equation then are
ẋ1 (t) = x2 (t)
ẋ2 (t) = b[x1 (t)x4 (t)2 − g sin x3 (t)]
ẋ3 (t) = x4 (t)
−2mx1 (t)x2 (t)x4 (t) − mgx1 (t) cos x3 (t) + u(t)
ẋ4 (t) =
mx1 (t)2 + J + Jb
y(t) = x1 (t)
x̃˙ 1 (t) = v0
x̃˙ 2 (t) = 0
x̃˙ 3 (t) = 0
x̃˙ 4 (t) = 0
with
x̃2 (t) = v0
b(x̃1 (t)x̃4 (t)2 − g sin x̃3 (t)) = b(0 − g sin(0)) = 0
x̃4 (t) = 0
22 INTRODUCTION
we see that x̃(t) is a valid nominal state trajectory for the nominal input
ũ(t). As an immediate consequence, the nominal output is ỹ(t) = x̃1 (t) =
p̃(t). It follows directly that deviation variables are specified by
p(t) − p̃(t)
ṗ(t) − p̃(t)
˙
xδ (t) =
θ (t) − 0
θ̇ (t) − 0
uδ (t) = τ (t) − mg p̃(t)
yδ (t) = p(t) − p̃(t)
With
x2
f1 (x1 , x2 , x3 , x4 , u)
b(x1 x4 2 − g sin x3 )
f2 (x1 , x2 , x3 , x4 , u)
f (x, u) = =
x4
f3 (x1 , x2 , x3 , x4 , u) −2mx1 x2 x4 − mgx1 cos x3 + u
f4 (x1 , x2 , x3 , x4 , u)
mx1 2 + J + Jb
where
[(−2mx2 x4 − mg cos x3 )(mx1 2 + J + Jb )]−
∂f4 [(−2mx1 x2 x4 − mgx1 cos x3 + u)(2mx1 )]
=
∂x1 (mx1 2 + J + Jb )2
0
0
∂f
(x, u) = 0
∂u 1
mx1 2 + J + Jb
LINEARIZATION OF NONLINEAR SYSTEMS 23
∂h
(x, u) = [ 1 0 0 0]
∂x
∂h
(x, u) = 0
∂u
Evaluating at the nominal trajectory gives
∂f
A(t) = [x̃(t), ũ(t)]
∂x
0 1 0 0
0 0 −bg 0
=
0 0 0 1
−mg −2mp̃(t)v0
0 0
mp̃(t)2 + J + Jb mp̃(t)2 + J + Jb
0
0
∂f
B(t) = [x̃(t), ũ(t)] =
0
∂u 1
mp̃(t) + J + Jb
2
∂h
C(t) = [x̃(t), ũ(t)] = [ 1 0 0 0]
∂x
∂h
D(t) = [x̃(t), ũ(t)] = 0 (1.6)
∂u
which, together with the deviation variables defined previously, specifies
the linearized time-varying state equation for the ball and beam system.
A special case of the nominal trajectory considered thus far in this
example corresponds to zero ball velocity v0 = 0 and, consequently, con-
stant ball position p̃(t) = p0 . The beam must remain steady and level, so
the nominal state trajectory and input reduce to
x̃1 (t) = p̃(t) = p0
˙
x̃1 (t) = p̃(t) =0
x̃1 (t) = θ̃ (t) = 0
x̃ (t) = θ̃˙ (t) = 0
1
ũ(t) = τ̃ (t) = mg p0
nominal state trajectory and input are constant and characterize an equi-
librium condition for these dynamics, the linearization process yields a
time-invariant linear state equation. The associated coefficient matrices
are obtained by making the appropriate substitutions in Equation (1.6)
to obtain
0 1 0 0
0 0 −bg 0
∂f
A=
(x̃, ũ) = 0 0 0 1
∂x
−mg
0 0 0
m p0 + J + Jb
2
0
0
∂f
B=
(x̃, ũ) = 0
∂u
1
m p0 + J + Jb
2
∂h
C= (x̃, ũ) = [ 1 0 0 0]
∂x
∂h
D= (x̃, ũ) = 0
∂u
SysName = ss(A,B,C,D);
SysName = tf(num,den);
SysName = zpk(z,p,k);
[num,den] = tfdata(SysName);
[z,p,k] = zpkdata(SysName);
[A,B,C,D] = ssdata(SysName);
set(SysName,PropName,PropValue);
PropValue = get(SysName,PropName);
SysName.PropName = PropValue;
% equivalent to ‘set’ command
CONTROL SYSTEM ANALYSIS AND DESIGN USING MATLAB 27
PropValue = SysName.PropName;
% equivalent to ‘get’ command
In the preceding, SysName is set by the user as the desired name for
the defined linear time-invariant system. PropName (property name) rep-
resents the valid properties the user can modify, which include A, B, C, D
for ss, num, den, variable (the default is ‘s ’ for a continuous system
Laplace variable) for tf, and z, p, k, variable (again, the default is
‘s ’) for zpk. The command set(SysName) displays the list of proper-
ties for each data type. The command get(SysName) displays the value
currently stored for each property. PropValue (property value) indicates
the value that the user assigns to the property at hand. In previous MATLAB
versions, many functions required the linear time-invariant system input
data (A, B, C, D for state space, num, den for transfer function, and z, p,
k for zero-pole-gain notation); although these still should work, MATLAB’s
preferred mode of operation is to pass functions the SysName linear time-
invariant data structure. For more information, type help ltimodels and
help ltiprops at the MATLAB command prompt.
b
kR
q(t) t(t)
b q(t) kRq(t)
t(t)
%-------------------------------------------------
% Chapter 1. State-Space Description
%-------------------------------------------------
J = 1;
b = 4;
kR = 40;
30 INTRODUCTION
a =
x1 x2
x1 0 1
x2 -40 -4
b =
u1
x1 0
x2 1
c =
x1 x2
y1 1 0
CONTROL SYSTEM ANALYSIS AND DESIGN USING MATLAB 31
d =
u1
y1 0
Continuous-time model.
Transfer function:
1
--------------
s^2 + 4 s + 40
Zero/pole/gain:
1
---------------
(s^2 + 4s + 40)
num =
0 0 1
den =
1.0000 4.0000 40.0000
z =
Empty matrix: 0-by-1
p =
-2.0000 + 6.0000i
-2.0000 - 6.0000i
k =
1
a =
x1 x2
x1 -4 -5
x2 8 0
32 INTRODUCTION
b =
u1
x1 0.25
x2 0
c =
x1 x2
y1 0 0.5
d =
u1
y1 0
y1(t) y2(t)
u1(t) u2(t)
k1 k2
m1 m2
c1 c2
u1(t) u2(t)
x1 (t) = y1 (t)
x2 (t) = ẏ1 (t) = ẋ1 (t)
x3 (t) = y2 (t)
x4 (t) = ẏ2 (t) = ẋ3 (t)
so that
C = [1 0 0 0] D=0
L R
J
+ b
v(t) i(t)
−
(s) kT
=
V (s) (Ls + R)(J s 2 + bs)
This equation is the mathematical model for the system of Figure 1.13.
Note that there is no rotational mechanical spring term in this equation,
i.e., the coefficient of the θ (t) term is zero.
x1 (t) = θ (t)
x2 (t) = θ̇ (t) = ẋ1 (t)
x3 (t) = θ̈ (t) = ẋ2 (t)
C = [1 0 0] D=0
We refer the reader to the Preface for a description of the four classes of
exercises that will conclude each chapter: Numerical Exercises, Analytical
Exercises, Continuing MATLAB Exercises, and Continuing Exercises.
Numerical Exercises
NE1.1 For the following systems described by the given transfer func-
tions, derive valid state-space realizations (define the state vari-
ables and derive the coefficient matrices A, B, C, and D).
Y (s) 1
a. G(s) = = 2
U (s) s + 2s + 6
Y (s) s+3
b. G(s) = = 2
U (s) s + 2s + 6
40 INTRODUCTION
Y (s) 10
c. G(s) = = 3
U (s) s + 4s + 8s + 6
2
Y (s) s 2 + 4s + 6
d. G(s) = = 4
U (s) s + 10s 3 + 11s 2 + 44s + 66
NE1.2 Given the following differential equations (or systems of differ-
ential equations), derive valid state-space realizations (define the
state variables and derive the coefficient matrices A, B, C, and D).
a. ẏ(t) + 2y(t) = u(t)
b. ÿ(t) + 3ẏ(t) + 10y(t) = u(t)
¨˙ + 2ÿ(t) + 3ẏ(t) + 5y(t) = u(t)
c. y(t)
d. ÿ1 (t) + 5y1 (t) − 10[y2 (t) − y1 (t)] = u1 (t)
2ÿ2 (t) + ẏ2 (t) + 10[y2 (t) − y1 (t)] = u2 (t)
Analytical Exercises
AE1.1 Suppose that A is n × m and H is p × q. Specify dimensions for
the remaining matrices so that the following expression is valid.
A B E F AE + BG AF + BH
=
C D G H CE + DG CF + DH
AE1.2 Suppose that A and B are square matrices, not necessarily of the
same dimension. Show that
A 0
0 B = |A| · |B|
|In − XY | = |Im − Y X|
HOMEWORK EXERCISES 41
Continuing Exercises
m1 m2 m3
c1 c2 c3 c4
m2
Y
g q(t)
L
X
f(t)
m1
w(t)
L R n
JL(t)
bL
+ + bM
tL(t)
vA(t) iA(t) vB(t) JM
wL(t)
− −
tM(t) qL(t)
wM(t)
qM(t)
q(t)
M
n(t)
k f(t)
e
J
q(t) m