Chapter 2 - State Space Fundamentals
Chapter 2 - State Space Fundamentals
STATE-SPACE
FUNDAMENTALS
in which a and b are scalar constants, and u(t) is a given scalar input
signal. A traditional approach for deriving a solution formula for the scalar
50 STATE-SPACE FUNDAMENTALS
d −a(t−t0 )
(e x(t)) = e−a(t−t0 ) ẋ(t) − e−a(t−t0 ) ax(t)
dt
= e−a(t−t0 ) bu(t)
which expresses the state response x(t) as a sum of terms, the first owing
to the given initial state x(t0 ) = x0 and the second owing to the specified
input signal u(t). Notice that the first component characterizes the state
response when the input signal is identically zero. We therefore refer to
the first term as the zero-input response component. Similarly, the sec-
ond component characterizes the state response for zero initial state. We
therefore refer to the second term as the zero-state response component.
The Laplace transform furnishes an alternate solution strategy. For this,
we assume without loss of generality that t0 = 0 and transform the differ-
ential equation, using linearity and time-differentiation properties of the
Laplace transform, into
in which X(s) and U (s) are the Laplace transforms of x(t) and u(t),
respectively. Straightforward algebra yields
1 b
X(s) = x0 + U (s)
s−a s−a
STATE EQUATION SOLUTION 51
where we have used the sifting property of the impulse to evaluate the inte-
gral. Now, for any input signal u(t), the zero-input response component
of y(t) can be expressed as
t t
ce a(t−τ )
bu(τ ) dτ + du(t) = [cea(t−τ ) b + dδ(t − τ )]u(τ ) dτ
0− 0−
t
= h(t − τ )u(τ ) dτ
0−
= h(t) ∗ u(t)
52 STATE-SPACE FUNDAMENTALS
and so the impulse response h(t) and transfer function H (s) form a
Laplace transform pair, as we should expect.
Our approach to deriving state-equation solution formulas for the n-
dimensional case and discussing various systems-related implications in
both the time and Laplace domains is patterned after the preceding devel-
opment, but greater care is necessary to tackle the underlying matrix-
vector computations correctly. Before proceeding, the reader is encouraged
to ponder, however briefly, the matrix-vector extensions of the preceding
computations.
index gives
∞
∞
(k + 1)Xk+1 (t − t0 )k = A Xk (t − t0 )k
k=0 k=0
∞
= A Xk (t − t0 )k
k=0
1
Xk+1 = AXk k≥0
k+1
which, when initialized with X0 = I , leads to
1 k
Xk = A k≥0
k!
Substituting this result into the power series (2.7) yields
∞
1 k
X(t) = A (t − t0 )k
k=0
k!
We note here that the infinite power series (2.7) has the requisite con-
vergence properties so that the infinite power series resulting from term-
by-term differentiation converges to Ẋ(t), and Equation (2.6) is satisfied.
Recall that the scalar exponential function is defined by the following
infinite power series
eat = 1 + at + 12 a 2 t 2 + 16 a 3 t 3 + · · ·
∞
1 k k
= a t
k=0
k!
eAt = I + At + 12 A2 t 2 + 16 A3 t 3 + · · ·
∞
1 k k (2.8)
= At
k=0
k!
54 STATE-SPACE FUNDAMENTALS
X(t) = eA(t−t0 )
eAt = [eaij t ]
Proposition 2.1 For any real n × n matrix A, the matrix exponential eAt
has the following properties:
d At
e = AeAt eAt t=0 = In
dt
2. For any t1 and t2 , eA(t1 +t2 ) = eAt1 eAt2 . As a direct consequence, for
any t
I = eA(0 ) = eA(t−t) = eAt e−At
Example 2.1 Consider the 4 × 4 matrix with ones above the main diag-
onal and zeros elsewhere:
0 1 0 0
0 0 1 0
A=
0 0 0 1
0 0 0 0
eAt = I + At + 12 A2 t 2 + 16 A3 t 3
0 0 1 2
t 0
1 0 0 0 0 t 0 0 2
0 1 0 0 0 0 t 0 0 0 0 1 2
t
= + + 2
0 0 1 0 0 0 0 t 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 16 t 3 1 t 12 t 2 61 t 3
0 0 0 0 0 1 t 1 2
t
+0 0 0 0 = 0
2
0 1 t
0 0 0 0 0 0 0 1
56 STATE-SPACE FUNDAMENTALS
Inspired by this result, we claim the following outcome for the n–di-
mensional case:
1 2 1
1 t t ··· t n−1
0 1 0 ··· 0 2 (n − 1)!
0 0 1 ··· 0 1
. . . .. 0 1 t ··· t n−2
A=
.. .. ..
..
. .
⇒ eAt =
. .
(n − 2)!
0 0 0 . . .. ..
1
..
··· . . . . .
0 0 0 ··· 0 0 0 0 ··· t
0 0 0 ··· 1
the veracity of which can be verified by checking that the first property
of Proposition 2.1 is satisfied, an exercise left for the reader.
Here, the power series (2.8) will contain an infinite number of terms when
at least one λ1 = 0, but since diagonal matrices satisfy
λk1 0 ··· 0 0
0 λk2 ··· 0 0
A = ...
k ..
.
..
.
..
.
..
.
0 0 · · · λkn−1 0
0 0 ··· 0 λkn
∞
1 k k
λt 0 ··· 0 0
k=0 k! 1
∞
0 1 k k
λ t ··· 0 0
k! 2
k=0
.. .. .. .. ..
= . . . . .
∞
0 0 ··· 1 k
λ tk 0
k! n−1
k=0
∞
0 0 ··· 0 1 k k
λ t
k! n
k=0
n−1
eAt = αk (t)Ak (2.9)
k=0
and n−1
n−1
A αk (t)A k
= αk (t)Ak+1
k=0 k=0
n−1
n−2
αk (t)Ak+1 = αk (t)Ak+1 + αn−1 (t)An
k=0 k=0
n−2
n−1
= k+1
αk (t)A − ak αn−1 (t)Ak
k=0 k=0
n−1
= −a0 αn−1 (t)I + [αk−1 (t) − ak αn−1 (t)]Ak
k=1
Using the matrix exponential property eA·0 = I , we are led to the initial
values α0 (0) = 1 and α1 (0) = α2 (0) = · · · = αn−1 (0) = 0 which form the
STATE EQUATION SOLUTION 59
α0 (t) λ t
1 λ1 λ21 · · · λ1n−1 e 1
1 n−1 α1 (t)
λ2 λ22 · · · λ2
e
λ2 t
α (t)
. .. = .
2
.. .. .. ..
. . . . .. ..
.
1 λn λ2n · · · λnn−1 α (t) e λn t
n−1
1 −2 4 −2t
α2 (t) e λ1 t 1
−1 12 e
2
1
= 32 − 2e−t + 12 e−2t
1
2
− e−t + 12 e−2t
which is easily verified using the first two properties of the matrix expo-
nential asserted in Proposition 2.1.
A useful interpretation of this expression is that the matrix exponential
eA(t−t0 ) characterizes the transition from the initial state x0 to the state x(t)
at any time t ≥ t0 . As such, the matrix exponential eA(t−t0 ) is often referred
to as the state-transition matrix for the state equation and is denoted by
(t, t0 ). The component φij (t, t0 ) of the state-transition matrix is the time
response of the ith state variable resulting from an initial condition of 1 on
the j th state variable with zero initial conditions on all other state variables
(think of the definitions of linear superposition and matrix multiplication).
Since the right-hand side above does not involve z(t), we may solve for
z(t) by applying the fundamental theorem of calculus
t
z(t) = z(t0 ) + ż(τ )dτ
t0
t
= z(t0 ) + e−A(τ −t0 ) Bu(τ )dτ
t0
62 STATE-SPACE FUNDAMENTALS
From our original definition, we can recover x(t) = eA(t−t0 ) z(t) and
x(t0 ) = z(t0 ) so that
t
−A(τ −t0 )
x(t) = e A(t−t0 )
z(t0 ) + e Bu(τ ) dτ
t0
t
=e A(t−t0 )
x(t0 ) + eA(t−t0 ) e−A(τ −t0 ) Bu(τ ) dτ (2.12)
t0
t
=e A(t−t0 )
x(t0 ) + eA(t−τ ) Bu(τ ) dτ
t0
The second term is due to the input signal and determines the solution in
the case where the initial state is the zero vector. Accordingly, we refer
to it as the zero-state response xzs (t) and denote
t
xzs (t) = eA(t−τ ) Bu(τ ) dτ (2.14)
t0
We assume without loss of generality that t0 = 0 and set the initial state
x(0) = 0 to focus on the zero-state response, that is,
t
yzs (t) = CeA(t−τ ) Bu(τ ) dτ + Du(t)
0−
t
= [CeA(t−τ ) B + Dδ(t − τ )]u(τ ) dτ
0−
adj(sI − A)
(sI − A)−1 =
|sI − A|
Xzi (s) = (sI − A)−1 x0 Xzs (s) = (sI − A)−1 BU (s) (2.20)
Yzi (s) = C(sI − A)−1 x0 Yzs (s) = [C(sI − A)−1 B + D]U (s) (2.23)
We now derive this same solution using the techniques of this chapter.
First, we must derive a valid state-space description. We define the state
vector as
x1 (t) y(t)
x(t) = =
x2 (t) ẏ(t)
We are given that u(t) is a step input of magnitude 3, and the initial
state is x(0) = [y(0), ẏ(0)]T = [0.10, 0.05]T . We can solve this problem
in the Laplace domain, by first writing
1
where the Laplace transform of the unit step function is . Simplifying,
s
we find the state solution in the Laplace domain:
3
X(s) =
X1 (s)
=
1 0.10s + 0.75 + s
X2 (s) (s + 3)(s + 4)
0.05s + 1.80
0.10s 2 + 0.75s + 3
s(s + 3)(s + 4)
=
0.05s + 1.80
(s + 3)(s + 4)
A partial fraction expansion of the first state variable yields the residues
C1 = 0.25
C2 = −0.55
C3 = 0.40
LAPLACE DOMAIN REPRESENTATION 67
The output y(t) equals the first state variable x1 (t), found by the inverse
Laplace transform:
which agrees with the stated solution. Now we find the solution for the sec-
ond state variable x2 (t) in a similar manner. A partial fraction expansion
of the second state variable yields the residues:
C1 = 1.65
C2 = −1.60
Then the second state variable x2 (t) is found from the inverse Laplace
transform:
x2 (t) = L−1 {X2 (s)}
−1 1.65 1.60
=L −
s+3 s+4
= 1.65e−3t − 1.60e−4t t ≥0
which agrees with the x2 (t) solution. Figure 2.1 shows the state response
versus time for this example.
We can see that the initial state x(0) = [0.10, 0.05]T is satisfied and
that the steady state values are 0.25 for x1 (t) and 0 for x2 (t).
0.2
x1(t) 0.1
0
0 0.5 1 1.5 2 2.5 3
0.2
x2(t)
0.1
0
0 0.5 1 1.5 2 2.5 3
time (sec)
From
s 0 0 1 s −1
sI − A = − =
0 s −2 −3 2 s+3
For the specified initial state, the zero-input response component of the
state and output are
−t
−e
xzi (t) = e x0 =
At
yzi (t) = CeAt x0 = Cxzi (t) = 0 t ≥ 0
e−t
h(t) = e−2t t ≥0
0 1 0 ··· 0 0
0 0 1 ··· 0 0
.. .. .. .. .. ..
A=
. . . . . .
0 0 0 ··· 1 0
0 0 0 ··· 0 1
−a0 −a1 −a2 · · · −an−2 −an−1
0 (2.27)
0
.
.
B= .
0
0
1
C = [ b0 b1 b2 ··· bn−2 bn−1 ] D=0
0
0
..
= .
0
0
s n + an−1 s n−1 + · · · + a1 s + a0
= Ba(s)
72 STATE-SPACE FUNDAMENTALS
 = T −1 AT B̂ = T −1 B Ĉ = CT D̂ = D (2.29)
Proposition 2.2 For the linear time-invariant state equation (2.1) and
coordinate transformation (2.28):
Item 1 states that the system characteristic polynomial and thus the sys-
tem eigenvalues are invariant under the coordinate transformation (2.28).
This proposition is proved using determinant properties as follows:
−1
BDCF = TDCF B, CDCF = CTDCF , and DDCF = D have no particular form.
COORDINATE TRANSFORMATIONS 75
Example 2.7 We now compute the diagonal canonical form via a state
coordinate transformation for the linear time-invariant state equation in
Example 2.5. For this example, the state coordinate transformation (2.28)
given by
1 −1 −1 2 1
TDCF = TDCF =
−1 2 1 1
−1 −1
ADCF = TDCF ATDCF BDCF = TDCF B
2 1 0 1 1 −1 2 1 0
= =
1 1 −2 −3 −1 2 1 1 1
−1 0 1
= =
0 −2 1
CDCF = CTDCF
1 −1
= 1 1 DDCF = D = 0
−1 2
= 0 1 DDCF
Note that this yields a diagonal ADCF matrix so that the diagonal canonical
form represents two decoupled first-order ordinary differential equations,
that is,
ż1 (t) = −z1 (t) + u(t) ż2 (t) = −2z2 (t) + u(t)
We also must transform the initial state given in Example 2.5 using z(0) =
−1
TDCF x(0):
z1 (0) 2 1 −1 −1
= =
z2 (0) 1 1 1 0
76 STATE-SPACE FUNDAMENTALS
which agrees with the result in Example 2.5. Note also from CDCF that
y(t) = z2 (t), which directly gives
t
yzs (t) = e−2(t−τ ) u(τ ) dτ
0
1
h(t) = e−2t t ≥0 ↔ H (s) =
s+2
This agrees with the outcome observed in Example 2.5, in which a pole-
zero cancellation resulted in the first-order transfer function above. Here,
a first-order transfer function arises because the transformed state equation
is decomposed into two decoupled first-order subsystems, each associated
with one of the state variables z1 (t) and z2 (t). Of these two subsystems, the
first is disconnected from the output y(t) so that the system’s input-output
behavior is directly governed by the z2 subsystem alone.
The previously calculated zero-state output responses in both Laplace
and time domains are verified easily. It is interesting to note that the
preceding pole-zero cancellation results in a first-order transfer function
having the one–dimensional state space realization
We can conclude that not only do there exist different state-space real-
izations of the same dimension for a given transfer function, but there
also may exist realizations of different and possibly lower dimension (this
will be discussed in Chapter 5).
COORDINATE TRANSFORMATIONS 77
One way to invoke the MATLAB function lsim with left-hand side argu-
ments is
[y,t,x] = lsim(SysName,u,t,x0)
The lsim function inputs are the state-space data structure SysName,
the input matrix u [length(t) rows by number of inputs m columns], an
evenly spaced time vector t supplied by the user, and the n × 1 initial
state vector x0. No plot is generated, but the lsim function yields the
system output solution y [a matrix of length(t) rows by number of outputs
p columns], the same time vector t, and the system state solution x [a
matrix of length(t) rows by number of states n columns]. The matrices y,
x, and u all have time increasing along rows, with one column for each
80 STATE-SPACE FUNDAMENTALS
component, in order. The user then can plot the desired output and state
components versus time after the lsim command has been executed.
canon MATLAB function for canonical forms (use the modal switch for
diagonal canonical form)
ss2ss Coordinate transformation of one state-space realization to
another.
The canon function with the modal switch handles complex conjugate
eigenvalues using the approach described following Example 2.8 and
returns a states-space realization with purely real coefficient matrices.
%-----------------------------------------------
% Chapter 2. Simulation of State-Space Systems
%-----------------------------------------------
t = [0:.01:4]; % Define array of time
% values
U = [zeros(size(t))]; % Zero single input of
% proper size to go with t
x0 = [0.4; 0.2]; % Define initial state
% vector [x10; x20]
This m-file, combined with the m-file from Chapter 1, generates the
following results for the open-loop characteristic polynomial, poles, eigen-
values, damping ratio ξ and undamped natural frequency ωn , and the value
of the state vector at 1 second. The eigenvalues of A agree with those from
the damp command, and also with roots applied to the characteristic
polynomial.
CharPoly =
1.0000 4.0000 40.0000
Poles =
-2.0000 + 6.0000i
-2.0000 - 6.0000i
EigsO =
-2.0000 + 6.0000i
-2.0000 - 6.0000i
82 STATE-SPACE FUNDAMENTALS
0.4
x1 (rad) 0.2
−0.2
0 1 2 3 4
1
x2 (rad/sec)
−1
−2
0 1 2 3 4
time (sec)
FIGURE 2.2 Open-loop state responses for the Continuing MATLAB Example.
X1 =
0.0457
0.1293
The m-file also generates the open-loop state response of Figure 2.2.
%----------------------------------------------------
% Chapter 2. Coordinate Transformations and Diagonal
% Canonical Form
%----------------------------------------------------
Cdcf = C*Tdcf;
Ddcf = D;
This m-file, combined with the Chapter 1 m-file, produces the diagonal
canonical form realization for the Continuing MATLAB Example:
Tdcf =
-0.0494 - 0.1482i -0.0494 + 0.1482i
0.9877 0.9877
Adcf =
-2.0000 + 6.0000i 0 - 0.0000i
0.0000 - 0.0000i -2.0000 - 6.0000i
Bdcf =
0.5062 + 0.1687i
0.5062 - 0.1687i
Cdcf =
-0.0494 - 0.1482i -0.0494 + 0.1482i
Ddcf =
0
Tm =
0 1.0124
-6.7495 -0.3375
Am =
-2.0000 6.0000
-6.0000 -2.0000
Bm =
1.0124
-0.3375
84 STATE-SPACE FUNDAMENTALS
Cm =
-0.0494 -0.1482
Dm =
0
inv(Tm) =
-0.0494 -0.1482
0.9877 0
The first column of inv(Tm) is the real part of the first column of Tdcf,
which is an eigenvector corresponding to the eigenvalue −2 + 6i. The
second column of inv(Tm) is the imaginary part of this eigenvector.
Case a. For case a, we invoke lsim to numerically solve for the state
vector x(t) given the inputs u(t) and the zero initial state x(0); lsim also
yields the output y(t). The state-space coefficient matrices, with parameter
values from Table 2.1 above, are
0 1 0 0 0 0
−15 −0.75 5 0.25 0.025 0
A= B=
0 0 0 1 0 0
10 0.5 −10 −0.5 0 0.05
1 0 0 0 0 0
C= D=
0 0 1 0 0 0
The plots of outputs y1 (t) and y2 (t) versus time are given in Figure 2.3.
We see from Figure 2.3 that this system is lightly damped; there is sig-
nificant overshoot, and the masses are still vibrating at 40 seconds. The
vibratory motion is an underdamped second-order transient response, set-
tling to final nonzero steady-state values resulting from the step inputs.
The four open-loop system eigenvalues of A are s1,2 = −0.5 ± 4.44i
and s3,4 = −0.125 ± 2.23i. The fourth-order system characteristic poly-
nomial is
s 4 + 1.25s 3 + 25.25s 2 + 10s + 100
0.1
y1 (m)
0.05
0
0 10 20 30 40
0.2
0.15
y2 (m)
0.1
0.05
0
0 10 20 30 40
time (sec)
H (s) =
0.025s 2 + 0.0125s + 0.25 0.0125s + 0.25
s 4 + 1.25s 3 + 25.25s 2 + 10s + 100 s 4 + 1.25s 3 + 25.25s 2 + 10s + 100
0.0125s + 0.25 0.05s + 0.0375s + 0.75
2
s 4 + 1.25s 3 + 25.25s 2 + 10s + 100 s 4 + 1.25s 3 + 25.25s 2 + 10s + 100
Case b. For Case b, we again use lsim to solve for the state vector x(t)
given the zero input u2 (t) and the initial state x(0). The state-space coeffi-
cient matrices, with specific parameters from above, are (A is unchanged
from Case a):
0
0
B= C = [1 0 0 0] D=0
0
0.05
The plots for states x1 (t) through x4 (t) versus time are given in Figure 2.4.
We again see from Figure 2.4 that this system is lightly damped. The
vibratory motion is again an underdamped second-order transient response
to the initial conditions, settling to zero steady-state values for zero
input u2 (t). The open-loop system characteristic polynomial, eigenvalues,
CONTINUING EXAMPLES FOR SIMULATION AND COORDINATE TRANSFORMATIONS 87
0.1
x1 (m)
0
−0.1
0 10 20 30 40
0.2
x2 (m/sec)
−0.2
0 10 20 30 40
0.2
x3 (m)
−0.2
0 10 20 30 40
0.5
x4 (m/sec)
−0.5
0 10 20 30 40
time (sec)
damping ratios, and undamped natural frequencies are all identical to the
Case a results.
In Figure 2.4, we see that states x1 (t) and x3 (t) start from the given initial
displacement values of 0.1 and 0.2, respectively. The given initial veloci-
ties are both zero. Note that in this Case b example, the final values are all
zero because after the transient response has died out, each spring returns
to its equilibrium position referenced as zero displacement.
When focusing on the zero-input response, we can calculate the state
vector at any desired time by using the state transition matrix (t, t0 ) =
eA(t−t0 ) . For instance, at time t = 20 sec:
These values, although difficult to see on the scale of Figure 2.4, agree
with the MATLAB data used in Figure 2.4 at t = 20 seconds.
Although we focus on state-space techniques, for completeness the transfer
function is given below for Continuing Example 1, case b (found from
the MATLAB function tf):
Y1 (s) 0.0125s + 0.25
H (s) = = 4
U2 (s) s + 1.25s 3 + 25.25s 2 + 10s + 100
where the system characteristic polynomial is again the same as that given
in case a above. Note that this scalar transfer function relating output y1 (t)
to input u2 (t) is identical to the (1,2) element of the transfer function
matrix presented for the multiple-input, multiple-output system in case a.
This makes sense because the (1,2) element in the multiple-input, multiple-
output case captures the dependence of output y1 (t) on input u2 (t) with
u1 (t) set to zero.
0.0121 + 0.0014i
0.0121 − 0.0014i
−1
BDCF = TDCF B=
0.0204 + 0.0011i
0.0204 − 0.0011i
CONTINUING EXAMPLES FOR SIMULATION AND COORDINATE TRANSFORMATIONS 89
CDCF = CTDCF = 0.017 + 0.155i 0.017 − 0.155i −0.010 − 0.182i
− 0.010 + 0.182i]
DDCF = D = 0
Note that, as expected, the eigenvalues of the system appear on the diag-
onal of ADCF .
The MATLAB canon function with the switch modal yields
−0.50 4.44 0 0
−4.44 −0.50 0
0
Am =
0 0 −0.125 2.23
0 0 −2.23 −0.125
0.024
−0.003
Bm =
0.041
−0.002
Cm = 0.017 0.155 −0.010 −0.182
Dm = D = 0
vector x(t) given the unit step input u(t) and zero initial state x(0); y(t)
also results from the lsim function. The state-space coefficient matrices,
with parameter values from Table 2.2 above, are
0 1 0 0
A = 0 0 1 B = 0 C = [1 0 0] D = 0
0 −2 −3 2
Plots for the three state variables versus time are given in Figure 2.5.
We see from Figure 2.5 (top) that the motor shaft angle θ (t) = x1 (t)
increases linearly in the steady state, after the transient response has died
out. This is to be expected: If a constant voltage is applied, the motor
angular displacement should continue to increase linearly because there is
no torsional spring. Then a constant steady-state current and torque result.
The steady-state linear slope of x1 (t) in Figure 2.5 is the steady-state value
of θ̇ (t) = x2 (t), namely, 1 rad/s. This x2 (t) response is an overdamped
second-order response. The third state response, θ̈ (t) = x3 (t), rapidly rises
from its zero initial condition value to a maximum of 0.5 rad/s2 ; in steady
state, θ̈(t) is zero owing to the constant angular velocity θ̇ (t) of the motor
shaft. The three open-loop system eigenvalues of A are s1,2,3 = 0, −1, −2.
The third-order system characteristic polynomial is
s 3 + 3s 2 + 2s = s(s 2 + 3s + 2)
= s(s + 1)(s + 2)
5
x1 (rad)
0
0 1 2 3 4 5 6 7
1
x2 (rad/s)
0.5
0
0 1 2 3 4 5 6 7
x3 (rad/s2)
0.5
0
0 1 2 3 4 5 6 7
time (sec)
This was found using the MATLAB function poly(A); the roots of this poly-
nomial are identical to the system eigenvalues. The zero eigenvalue cor-
responds to the rigid-body rotation of the motor shaft; the remaining two
eigenvalues −1, −2 led to the conclusion that the shaft angular velocity
θ̇ (t) = ω(t) response is overdamped. Note that we cannot calculate steady
state values from xss = −A−1 Bu as in Continuing Example 1 because the
system dynamics matrix A is singular because of the zero eigenvalue.
For completeness the scalar transfer function is given below for this
example (found via the MATLAB function tf):
θ (s) 2 2
H (s) = = 3 =
V (s) s + 3s + 2s
2 s(s + 1)(s + 2)
Note the same characteristic polynomial results as reported earlier. The
roots of the denominator polynomial are the same as the eigenvalues of
A. The preceding transfer function H (s) relates output motor angular
displacement θ (t) to the applied voltage v(t). If we wish to consider the
motor shaft angular velocity ω(t) as the output instead, we must differenti-
ate θ (t), which is equivalent to multiplying by s, yielding the overdamped
second-order system discussed previously:
ω(s) 2
H2 (s) = =
V (s) (s + 1)(s + 2)
We could develop an associated two–dimensional state-space realiza-
tion if we wished to control ω(t) rather than θ (t) as the output:
x1 (t) = ω(t)
x2 (t) = ω̇(t) = ẋ1 (t)
0 1 0
ẋ1 (t) x1 (t)
= −Rb −(Lb + RJ ) + kT v(t)
ẋ2 (t) x2 (t)
LJ LJ LJ
0 1 x1 (t) 0
= + v(t)
−2 −3 x2 (t) 2
x1 (t)
ω(t) = 1 0 + [0]v(t)
x2 (t)
Note that the system eigenvalues appear on the main diagonal of diagonal
matrix ADCF , as expected.
The MATLAB canon function with the modal switch yields identical
results because the system eigenvalues are real.
Numerical Exercises
NE2.1 Solve 2ẋ(t) + 5x(t) = u(t) for x(t), given that u(t) is the unit
step function and initial state x(0) = 0. Calculate the time con-
stant and plot your x(t) result versus time.
NE2.2 For the following systems described by the given state equations,
derive the associated transfer functions.
a. ẋ1 (t) −3 0 x1 (t) 1
= + u(t)
ẋ2 (t) 0 −4 x2 (t) 1
x1 (t)
y(t) = [ 1 1 ] + [0]u(t)
x2 (t)
HOMEWORK EXERCISES 93
b. ẋ1 (t) 0 1 x1 (t) 0
= + u(t)
ẋ2 (t) −3 −2 x2 (t) 1
x1 (t)
y(t) = [ 1 0 ] + [0]u(t)
x2 (t)
c. ẋ1 (t) 0 −2 x1 (t) 1
= + u(t)
ẋ2 (t) 1 −12 x2 (t) 0
x1 (t)
y(t) = 0 1 + [0]u(t)
x2 (t)
d. ẋ1 (t) 1 2 x1 (t) 5
= + u(t)
ẋ2 (t) 3 4 x2 (t) 6
x1 (t)
y(t) = 7 8 + [9]u(t)
x2 (t)
NE2.3 Determine the characteristic polynomial and eigenvalues for the
systems represented by the following system dynamics matrices.
a. A = −1 0
0 −2
b. A = 0 1
−10 −20
c. A = 0 1
−10 0
d. A = 0 1
0 −20
NE2.4 For the given homogeneous system below, subject only to the
initial state x(0) = [2, 1]T , calculate the matrix exponential and
the state vector at time t = 4 seconds.
ẋ1 (t) 0 1 x1 (t)
=
ẋ2 (t) −6 −12 x2 (t)
NE2.5 Solve the two-dimensional state equation below for the state vec-
tor x(t), given that the input u(t) is a unit step input and zero
initial state. Plot both state components versus time.
ẋ1 (t) 0 1 x1 (t) 0
= + u(t)
ẋ2 (t) −8 −6 x2 (t) 1
94 STATE-SPACE FUNDAMENTALS
Analytical Exercises
You may wish to use the Leibniz rule for differentiating an inte-
gral:
b(t)
d
X(t, τ ) dτ = X[t, b(t)]ḃ(t)
dt a(t)
b(t)
∂X(t, τ )
− X[t, a(t)]ȧ(t) + dτ
a(t) ∂t
t
Use this to derive an expression for eAτ dτ in the case where
0
A is nonsingular.
AE2.7 For n × n matrices A and Q, show that the matrix differential
equation
specified by
−1
0 1 0 1 0 0 b2
A= 0 0 1
B = a2 1 0 b1
−a0 −a1 −a2 a1 a2 1 b0
C= 1 0 0
HOMEWORK EXERCISES 97
b2 s 2 + b1 s + b0
H (s) =
s 3 + a2 s 2 + a1 s + a0
AE2.9 Verify that the three–dimensional state equation
specified by
0 0 −a0 1
A = 1 0 −a1 B = 0
0 1 −a2 0
−1
1 a2 a1
C = b2 b1 b0 0 1 a2
0 0 1
b2 s 2 + b1 s + b0
H (s) =
s 3 + a2 s 2 + a1 s + a0
AE2.10 Show that if the multiple-input, multiple-output state equation
b. Determine and plot the unit step response for zero initial
state.
c. Determine and plot the zero input response given x0 =
[1, −1]T .
d. Calculate the diagonal canonical form.
Continuing Exercises
CE2.1a Use the numerical parameters in Table 2.3 for this and all ensu-
ing CE1 assignments (see Figure 1.14).
Simulate and plot the resulting open-loop output displacements
for three cases (for this problem, use the state-space realizations
of CE1.1b):
i. Multiple-input, multiple-output: three inputs ui (t) and three
outputs yi (t), i = 1, 2, 3.
100 STATE-SPACE FUNDAMENTALS
case. First, the state variables associated with this realization are
x1 (t) = y1 (t) x3 (t) = y2 (t) x5 (t) = y3 (t)
x2 (t) = ẏ1 (t) = ẋ1 (t) x4 (t) = ẏ2 (t) = ẋ3 (t) x6 (t) = ẏ3 (t) = ẋ5 (t)
0 1 0 0 0 0
(k + k ) (c1 + c2 ) k2 c2
− 1 2
−
0 0
m1 m1 m1 m1
0 0 0 1 0 0
A = k c2 (k2 + k3 ) (c2 + c3 ) k3 c3
2
− −
m2 m2 m2 m2 m2 m2
0 0 0 0 0 1
k3 c3 (k3 + k4 ) (c3 + c4 )
0 0 − −
m3 m3 m3 m3
CE2.1b Calculate the diagonal canonical form realization for the case iii
CE1 system. Comment on the structure of the results.
CE2.2a Use the numerical parameters in Table 2.4 for this and all ensu-
ing CE2 assignments (see Figure 1.15).
Simulate and plot the open-loop state variable responses for
three cases (for this problem use the state-space realizations of
CE1.2b); assume zero initial state for all cases [except Case i(b)
below]:
i. Single-input, single-output: input f (t) and output θ (t).
(a) unit impulse input f (t) and zero initial state.
(b) zero input f (t) and an initial condition of θ (0) = 0.1 rad
(zero initial conditions on all other state variables).
ii. Single-input, multiple-output: impulse input f (t) and two
outputs w(t) and θ (t).
iii. Multiple-input, multiple-output: two unit step inputs f (t)
and τ (t) and two outputs w(t) and θ (t).
Simulate long enough to demonstrate the steady-state behavior.
What are the system eigenvalues? Based on these eigenvalues
and the physical system, explain the system responses.
Since this book does not focus on modeling, the solution for
CE1.2a is given below:
Coupled Nonlinear Differential Equations
CE2.2b For the case i CE2 system, try to calculate the diagonal
canonical form realization (diagonal canonical form cannot be
found—why?).
CE2.3a Use the numerical parameters in Table 2.5 for this and all ensu-
ing CE3 assignments (see Figure 1.16).
Simulate and plot the open-loop state variable responses for
two cases (for this problem, use the state-space realizations of
CE1.3b):
i. Single-input, single-output: input armature voltage vA (t) and
output robot load shaft angle θ L (t).
(a) Unit step input armature voltage vA (t); plot all three state
variables given zero initial state.
(b) Zero input armature voltage vA (t); plot all three state
variables given initial state θL (0) = 0, θ̇L (0) = 1, and
θ̈L (0) = 0.
ii. Single-input, single-output: unit step input armature voltage
vA (t) and output robot load shaft angular velocity ωL (t); plot
both state variables. For this case, assume zero initial state.
Simulate long enough to demonstrate the steady-state behavior.
What are the system eigenvalues? Based on these eigenvalues
and the physical system, explain the system responses.
Since this book does not focus on modeling, the solution for
CE1.3a is given below; the overall transfer function is
L (s) kT /n
G(s) = =
VA (s) LJ s + (Lb + RJ )s 2 + (Rb + kT kB )s
3
JL bL
where J = JM + 2 and b = bM + 2 are the effective polar
n n
inertia and viscous damping coefficient reflected to the motor
104 STATE-SPACE FUNDAMENTALS
x1 (t) = θL (t)
x2 (t) = θ̇L (t) = ẋ1 (t) y(t) = θL (t) = x1 (t)
x3 (t) = θ̈L (t) = ẍ1 (t) = ẋ2 (t)
x1 (t) = ωL (t)
y(t) = ωL (t) = x1 (t)
x2 (t) = ω̇L (t) = ẋ1 (t)
0 1
ẋ1 (t) x1 (t)
= (Rb + kT kB ) (Lb + RJ )
ẋ2 (t) − − x2 (t)
LJ LJ
0
+ kT vA (t)
LJ n
HOMEWORK EXERCISES 105
x1 (t)
y(t) = 1 0 + [0]vA (t)
x2 (t)
CE2.3b Calculate the diagonal canonical form realization for the case i
CE3 system. Comment on the structure of the results.
CE2.4a Use the numerical parameters in Table 2.6 for this and all ensu-
ing CE4 assignments (see Figure 1.8).
Simulate and plot the open-loop state variables in response to
an impulse torque input τ (t) = δ(t) Nm and p(0) = 0.25 m
with zero initial conditions on all other state variables. Simulate
long enough to demonstrate the steady-state behavior. What are
the system eigenvalues? Based on these eigenvalues and the
physical system, explain the system response to these initial
conditions.
A valid state-space realization for this system is given in
Example 1.7, linearized about the nominal trajectory discussed
there. This linearization was performed for a horizontal beam
with a ball trajectory consisting of an initial ball position and
constant ball translational velocity. However, the realization in
Example 1.7 is time varying because it depends on the nominal
ball position p̃(t). Therefore, for CE4, place a further constraint
on this system linearization to obtain a linear time-invariant
system: Set the constant ball velocity to zero (v0 = 0) and set
p̃(t) = p0 = 0.25 m. Discuss the likely real-world impact of
this linearization and constraint.
CE2.4b Calculate the diagonal canonical form realization for the CE4
system.
CE2.5a Use the numerical parameters in Table 2.7 (Bupp et al., 1998)
for this and all ensuing CE5 assignments (see Figure 1.17).