45 Eigenvalues, eigenvectors
In the previous chapters, you’ve seen how linear dynamics, when unstable, lead trajectories off to infinity. Chapter Chapter 43 looked at some ways that nonlinearity can tame instability, as in the simple models of linear growth.
In this chapter, we return to linear dynamics to develop a quantitative theory of stability. Such theory is important in many engineering and design applications. For instance, a building exposed to earthquake risk can be economically designed to be strong specifically against the type of shaking produced by earthquakes. An electronic circuit can be designed to be sensitive to certain kinds of communication signals while still resisting noise or jamming.
Cruise control is a feature of many modern automobiles. It enables a driver to set a desired speed for the car to follow automatically, thus reducing cognitive load on the driver. Early models of cruise control introduced in the 1970s (and still common in 2020) had an extremely simple logic. The speedometer constantly monitors the car’s speed
You can see that when
A simple model is that the throttle input is proportional to
A modern cruise control system adds an important feature: the car slows down automatically if it gets too close to the car in front. Let’s call the distance to the leading car
To solve this system, define
Result: The simple car-following control system oscillates. That is not a very good experience for the driver! By constructing a theory of stability, we may be able to figure out a re-design that will cause the oscillations to go away.
45.1 Vector solutions to linear differential equations
The form in which we have been writing linear differential equations in two state variables is
A key part of constructing a theory of stability is finding a set of mathematical ideas that enable us to view dynamics in a simpler way. The idea we will introduce here is thinking about the state and trajectory of a differential equation in terms of vectors. We will work here with systems with a two-variable dynamical state, but the results apply just as well to higher dimensional states. That is important in applied work, where the systems being modeled are complicated with many state components.
We can re-write the linear differential equation using vector and matrix notation. Suppose that we collect the
Now imagine that we pick two non-colinear vectors,
For the moment, we won’t worry about how best to choose
As a running example, we will work with the pair of first-order differential equations
Imagine that we choose, arbitrarily,
For the example, we will calculate a trajectory starting at the initial condition
<- integrateODE(dx ~ x + y, dy ~ 2*x, x=-1.1, y=2.1, domain(t=0:2))
traj traj_plot(y(t) ~ x(t), traj)
The initial condition (marked “0” in Figure 45.1 is, like any other point in the state space, a linear combination of qr.solve()
:
<- cbind(rbind(1,-3), rbind(1,0))
M <- rbind(-1.1, 2.1)
w0 qr.solve(M, w0)
## [,1]
## [1,] -0.7
## [2,] -0.4
So,
We can use integrateODE()
to find the solution starting at any initial condition. In particular, we can find the solution
<- integrateODE(dx ~ x + y, dy ~ 2*x, x=1, y=-3, domain(t=0:2))
traj_u1 <- integrateODE(dx ~ x + y, dy ~ 2*x, x=1, y= 0, domain(t=0:2)) traj_u2
Figure 45.2 shows these trajectories.
At first glance, the two trajectories
To state the situation more generally, any solution to the differential equations can be written as a linear combination of the solutions starting at
We can see this algebraically. Since
Taking a linear combination of these equations gives
The same will be true in general, that is, for the matrix
45.2 Eigenvectors and eigenvalues
In the previous section, we saw that the solution to any linear differential equation starting at any initial condition can be written as a linear combination
In this section, we will demonstrate that there is a particular way of selecting
Our task in this section is to show how to compute the eigenvectors eigen()
to do the calculations for us.
eigen()
applied to the abcd matrix that defines the linear differential equation.
For the system of first-order differential equations
Carrying out the eigenvector calculation is straightforward:
<- cbind(rbind(1,2), rbind(1,0))
M eigen(M)
## eigen() decomposition
## $values
## [1] 2 -1
##
## $vectors
## [,1] [,2]
## [1,] 0.7071068 -0.4472136
## [2,] 0.7071068 0.8944272
The eigenvectors are the two columns of the matrix labeled vectors
returned by the calculation. Here, that is
The calculation also produces eigenvalues. Here that is
We can see what’s special about
The eigenvectors mark the directions where the flow is either directly toward the fixed point or directly away from it. Here, the flow on the subspace of
The consequence of this alignment of the flow with the eigenvectors is that the trajectory from any initial condition
As we did in the previous section, let’s calculate the trajectories
<- integrateODE(dx ~ x + y, dy ~ 2*x,
traj_eigen1 bounds(t=0:1),
x=0.7071, y=0.7071)
## Solution containing functions x(t), y(t).
<- integrateODE(dx ~ x + y, dy ~ 2*x,
traj_eigen2 bounds(t=0:1),
x=-0.4472, y=0.8944)
## Solution containing functions x(t), y(t).
traj_plot(y(t) ~ t, traj_eigen1, color="magenta") %>%
traj_plot(y(t) ~ t, traj_eigen2, color="blue") %>%
gf_refine(scale_y_log10(
breaks=c(0.3290, 0.7071, 0.8944, 5.2248)))
We have marked the
To find
Look back at the results from the eigen(M)
calculation. These values for M
. In standard notation, rather than
The scalar coefficients
45.3 Exercises
Exercise 45.01
Using an angle from -90 to 90 degrees to specify directions, say in what directions each of the eigenvectors is pointed. (Your answer should be good to
Exercise 45.02
The exercise is based on the interactive applet shown below. Click on the image to open up the applet in another tab of your browser. Then arrange so that the applet’s tab is side by side with this one. That way you can see the questions and figure out the answer at the same time.
We will look at trajectories that go round and round: oscillating solutions to the linear dynamics around a fixed point.
In the applet, click on the left-hand graph to set the
You can create an oscillatory flow by clicking anywhere in the blue parabolic region in the left-hand graph. Play around with clicking in different spots in the parabolic region. Set the number of time steps for the red trajectory until you can see at least two full revolutions around the origin.
Part A Click near (but not on) the fixed point. Which of these best describes the shape of the trajectory?
- A tightly wound spiral
- A loosely wound spiral
- A rectangular shape
- Alternating between heading toward the fixed point and heading away from it.
Part B Leaving the a and b values the same as when you answered the previous question, start the trajectory about half-way from the fixed point. How does the new trajectory compare to the one from the previous problem?
- A more tightly wound spiral
- A more loosely wound spiral
- A spiral that goes the other way round
- A rectangular shape
Part C Find some
- b is close to zero
- a is close to zero
- both a and b are close to zero
- a is bigger than b
Part D Drawing on your experience from the previous question in vary ing
Part E Drawing on your experience from the previous question in varying
Part F Now you should be pretty good at navigating the a-b space to make differently-shaped round-and-round trajectories. Focus for the moment on whether the spirals head in to the fixed point (stable) or away from it (unstable). What is the relationship between the eigenvalues and whether the trajectory is stable or not?
- real part is negative for stable flow
- real part is positive for stable flow
- imaginary part is negative for stable flow
- imaginary part is positive for stable flow
Part G Explore close to the edges of the parabolic zone in a-b space. What happens to the trajectories compared to when a-b is in the middle of the parabolic zone?
- the speed of rotation slows down
- the speed of rotation is unchanged
- the speed of rotation increases
Part H Look at the eigenvalues when you move around the a-b space. What aspect of the eigenvalues corresponds to the speed of revolution?
- the magnitude of the imaginary part
- the magnitude of the real part
- whether the imaginary part is positive or negative
- whether the real part is positive or negative.
Exercise 45.03
Part A What are the numerical values of the eigenvalues of the matrix
and and and and
Part B What are the numerical values of the eigenvalues of the matrix
Exercise 45.04
We will work with the linear dynamical system
Using integrateODE()
find the solution
Trajectory 1)
Trajectory 2)
Trajectory 3)
<- integrateODE( ...., x=1, y=-1, bounds(t=0:10))
T1 <- integrateODE( ...., x=0, y=1, bounds(t=0:10))
T2 <- integrateODE( ...., x=1, y=0, bounds(t=0:10)) T3
The three solutions will be the functions T1$x()
, T2$x()
, and T3$x()
.
Since the dynamics are linear, there will be a simple relationship between the three solutions, just as there is a simple relationship between three vectors in a 2-dimensional vector space.
Find this simple relationship and make a graph that demonstrate it.
Exercise 45.05
The only fixed point of the rabbit-fox system is
The linearized dynamics around this fixed point are: $$_t r =
(+ ) [r - r^] + \ _t f = - + (+ ) [f - f^]$$
Using the formula for eigenvalues, calculate the eigenvalues symbolically and report on the stability of the fixed point.
Exercise 45.06
In this exercise, you will be using an app that allows you to set
Open up the app in another browser tab and arrange it side-by-side with this document, so you can see both at the same time.
You used a somewhat similar app when exploring linear, two-dimensional finite-difference equations. Here’s a link, but you don’t need to open that app for this exercise.
This new app does a few things differently:
- In the old app, you had four number-entry boxes to set the values of the [abcd] matrix. Here, because we are using the [ab10] format, you need only set
and . You can do this by clicking within the left-hand graph. - The a-b selector graph is annotated with the type of generic behavior that the differential-equation system will show for any combination of
and . This allows you to reason backward from the behavior you are interested in to the corresponding values of and . Since the type of behavior is encoded in the eigenvalues, you are effectively inverting the eigenvalue formula to find and . - The flow field (right-hand graph) shows stream-lines of continuous-time motion. Imagine you had a bunch of glitter which you cast out over a pool of water with a given flow pattern. If you took a time-exposure photo, you would see each piece of glitter as it moved along with the water in which it is embedded.
- You can click in the flow field to start a trajectory at that point. You can control the time domain—that is, how long is the time exposure of the photo—with the radio buttons at the bottom.
- There is a thin, green line annotating the flow field. This line runs from the fixed point (right in the center) in the direction of the point on which you click to start a trajectory. A vector with the same orientation as the green line is given numerically below the graph. This orientation is also described using an angle measurement in degrees.
- There is no display of the solution, that is,
versus . This is because we want you to understand the geometry of the flow.
First, play around with the app. Choose miscellaneous values of
When coming from a stable direction, click near the periphery of the graph to get a good view, since the red trajectory will naturally be heading in towards the origin. When estimating the orientation of an eigenvector, try to get the green line heading straight down the middle of the red trajectory. This often requires a bit of fiddling, moving the starting point just a tiny amount to find one that is just right.
When you are on an eigenvector, the trajectory will be dead straight on the green line. Any trajectory not starting on an eigenvector will be curved to a greater or lesser extent, depending on the relative sizes of the eigenvalues.
In the following questions, pick the choice closest to the answer you found. The exact choice of
Part A Set
-149.7 -63.6 -31.7 69.1 73.5 106.6 143.7 149
Part B Which of these best describes the eigenvalue corresponding to the unstable eigenvector?
- Negative and real
- Zero and real
- Positive and real
- Complex with a negative real part
- Complex with a positive real part
Part C Keeping
-149.7 -63.6 -31.7 69.1 73.5 106.6 143.7 149
Part D Set
-149.7 -63.6 -31.7 69.1 73.5 106.6 143.7 149
Part E Keeping
-149.7 -63.6 -31.7 69.1 73.5 106.6 143.7 149
Part F Staying with the flow from
- Both are real and positive
- Both are real and negative
- One is complex, the other real
- Both are complex, one has negative real part
Part G Set
-149.7 -63.6 -31.7 69.1 73.5 106.6 143.7 149
Part H Keeping
-149.7 -63.6 -31.7 69.1 73.5 106.6 143.7 149
Part I Staying with the flow from
- Both are real and positive
- Both are real and negative
- One is complex, the other real
- Both are complex, one has negative real part
- Both are complex, both have negative real part
Part J Set
- stable
- unstable
- neither stable nor unstable
Part K Keeping
- They have almost the same orientation
- There is only one eigenvector
- There are no eigenvectors
Part L Staying with the flow from
- Both are real and positive
- Both are real and negative
- One is complex, the other real
- Both are complex, one has negative real part
- Both are complex, both have negative real part
Part M Set
- There is no relationship between
and speed of oscillation. - When
is closer to zero, the speed is higher. - When
is further from zero, the speed is higher.
Part N we will look at the relationship between the eigenvalues and the speed of oscillation. Keep
- The larger the magnitude of the imaginary part of the eigenvalues, the faster the oscillation.
- The two eigenvalues have the same imaginary part, except one is positive and the other negative.
- The speed of oscillation relates to the difference between the imaginary part of the eigenvalues.
- The real part of the eigenvalues is the same for both when there is oscillatory motion.