19 Eigenvalues, Eigenvectors, Ordinary Differential Equations, and Control
19 Eigenvalues, Eigenvectors, Ordinary Differential Equations, and Control
1,2
= 2
3,
3
= 1.
If we replace the entry 2 in position (1, 2) of the matrix (7) by any real number strictly smaller
than 1, then the matrix has one pair of complex conjugate eigenvalues. For instance, setting the
(1, 2)-entry to 2 yields the eigenvalues
1
= 2 + i,
2
= 2 i,
3
= 1,
where i =
i(t), (18)
where m is the mass of the ball, r is the resistance of the wire, and is the impedance of the coil.
The gravitational force G is constant. The magnetic force F = ki(t)
2
/h(t) is a nonlinear function
of the distance h(t) and current i(t) (k is a constant).
The nonlinearity of F prevents us from directly setting up a linear control problem of the form
(16). We can, however, assume that the model is approximately linear near the set point h(0), and
9
use the Taylor series approximation:
F F(h(0), i(0)) +
F
h
i(0)
(h(t) h(0)) +
F
i
h(0)
(i(t) i(0))
= F(h(0), i(0)) +
F
h
i(0)
h(t) +
F
i
h(0)
i(t).
Noting that
d
2
dt
2
h(t) =
d
2
dt
2
h(t) = G/mk
1
+ k
2
h(t) + k
3
i(t), (19)
where we have simplied the notation by introducing the constants
k
1
:= F(h(0), i(0))/m, k
2
:=
F
mh
i(0)
, and k
3
:=
F
mi
h(0)
.
Dene the state vector
x(t) :=
_
h(t),
d
dt
h(t),
i(t)
_
T
and let the system output be the deviation from the set point,
y(t) :=
h(t).
Let the constants have the values
k
2
= 1, k
3
= 1, r/ = 10, G/mk
1
= 1, v/ = 1.
The denition of x(t), y(t), and the constants, together with (19) and (18), yield the control system
d
dt
x(t) =
_
_
0 1 0
k
2
0 k
3
0 0 r/
_
_
x(t) +
_
_
0
G/mk
1
v/
_
_
=
_
_
0 1 0
1 0 1
0 0 10
_
_
x(t) +
_
_
0
1
1
_
_
= Ax(t) +b, (20)
y(t) = c
T
x(t)
of the form (16), where c := [1, 0, 0]
T
.
The system output y(t) measures deviation from the desired set position; this value should be
driven to zero in order to suspend the ball at the set position h(0).
10
Exercise 19.17
What are the eigenvalues of the matrix A in (20)? Solve the system of dierential equations (20).
Graph the system output y(t) is a function of time t. 2
You will nd from the above exercise that the system as described is not stable; the system
output diverges over time and the ball will not remain suspended at the set point. We can control
the system output by adding a feedback term f
T
x(t) to equation (20), transforming it into a
linear control problem of the form (16). Specically, we would like to determine a feedback gain
vector f , such that the solution x(t) converges to 0 as t increases.
The matrix A bf
T
may have two complex-valued eigenvalues, say,
1
and
2
, for certain
vectors f . We therefore have to discuss how exp(
j
t) behaves as t increases for complex-valued
j
.
Let R and i =
1. We dene
exp(i) = cos() + i sin(). (21)
We refer to cos() as the real part and sin() as the imaginary part of the complex number exp(i).
Complex numbers can be thought of as vectors in R
2
. They dier from ordinary vectors in R
2
only
in that complex numbers can be multiplied, using a special rule, while vectors in R
2
cannot. Thus,
we may identify the complex number cos() + i sin() with the point (cos(), sin()) in R
2
. This
point lives on the unit circle in R
2
. We dene the magnitude of the complex number cos()+i sin()
to be the length of the corresponding vector (cos(), sin()) in R
2
. We have
| cos() + i sin()| =
_
cos
2
() + sin
2
() = 1.
We therefore say that cos() + i sin() lives on the unit circle in the complex plane.
Returning to the eigenvalues of Abf
T
, express the complex eigenvalue
1
in the form
1
=
1,1
+ i
1,2
,
1,1
,
1,2
R, i =
1,
where
1,1
is the real part and
1,2
the imaginary part of
1
. Using the fact that the exponential
of a sum is the product of the exponential of each term yields
exp(
1
) = exp(
1,1
+ i
1,2
) = exp(
1,1
) exp(i
1,2
).
From (21) we now obtain
exp(
1
) = exp(
1,1
)(cos(
1,2
) + i sin(
1,2
)).
It follows that
| exp(
1
)| = exp(
1,1
)|(cos(
1,2
) + i sin(
1,2
)| = exp(
1,1
),
where we have used that exp(
1,1
) > 0 and |(cos(
1,2
) + i sin(
1,2
)| = 1.
11
When we study the stability of solutions of systems of ODEs, we are interested in whether
expressions of the form | exp(
j
t)| increase or decrease as t increases; cf. (15). Our discussion
above shows that
| exp(
j
t)| = exp(
j,1
t),
where
j,1
denotes the real part of the eigenvalue
j
. We therefore only are concerned with the
sign of the real part of the eigenvalues when determining whether the solution x(t) converges to
zero as t increases.
Let the matrix A and vector b be dened by (20), and let V be the eigenvector matrix and D
the eigenvalue matrix of the A; cf. (10). Introduce the vectors
b = [
b
1
,
b
2
,
b
3
]
T
:= V
1
b,
f := [, 0, 0]
T
, f := V
T
f , (22)
where is a scalar to be determined. Then
Abf
T
= V
_
D
b
f
T
_
V
1
. (23)
Exercise 19.18
Let the vectors
b and
f , as well as the matrix D be the same as in (22). What are the eigenvalues
of the matrix D
b
f
T
? 2
Exercise 19.19
Equation (23) and Exercise 19.18 provide us with an algorithm for solving the linear control problem
associated with this example:
1. Compute [V,D]=eig(A)
2. Let b=[0,1,1] and compute btilde=V\b
3. Let ftilde=[1,0,0]
4. Find a value of alpha so that the eigenvalues of D - alpha*btilde*ftilde are all have
negative real part.
5. Compute f = V\ftilde
Code the above algorithm in MATLAB or Octave, solve the example control problem, and make a
new plot of the system output y(t) over time for your solution. 2
12