Tip:
Highlight text to annotate it
X
Last time, we learned that vector and
matrix representations can make your life
easier. Specifically when you implement
Euler integration for a complicated
system involving many states. But how do we use vector and
matrix notation to find analytic solutions?
Let's say that we have a spring mass
damper system like this one with three masses.
They can all oscillate relative to each other, and
I've created them by connecting parts of the Slinky together.
How many states would we expect?
We should have six states total, three for the positions
of each spring and three for the velocities of each mass.
This means that the vector in matrix representation
would include a state vector that has six components.
The six states and a matrix that has six rows and six columns.
What type of solution to the differential equation w dot equals Aw do you expect?
I'm hoping that at this point you're expecting an exponential solution, w of t,
is equal to e to the ht times w0.
Keep in mind that this exponential solution
is a vector, because w0 is a vector.
However the exponential term itself is still just a number for any given t.
If I plug this exponential into w dot equals Aw, I get d dt,
of e to the ht w0 is
equal to A times e to the ht w0.
And if I take this time derivative, I get h times e to
the ht times w0, is equal to A times e to
the ht times w0. And the thing to note here, is that
h is a number,
e to the ht is a number, and w0 is a vector.
But on the right-hand side, A is a matrix,
e to the ht is a number, and w0 is a vector.
If
I divide both sides by the exponential term,
which is nonzero, so I know I'm allowed to.
And if I note that w0 is going to be nonzero, then, I find out that
h times w0 is equal to A, times w0.
This is a special situation where a matrix a multiplying the
vector w0 is the same as just multiplying that vector by h.
Such a vector
is called an eigenvector of A and h is called an eigenvalue of A.
If there are n states there will always be n eigenvector, eigenvalue pairs.
The nice thing about this is that you can use
MATLAB or Python to calculate igon vector, igon value pairs easily.
Let's go back to our spring mass damper system.
So we have a wall,
a spring, a damper, and a mass. And assume
that the damping is reasonable high, giving us an A matrix of A equals 0 1,
minus 1 minus 3.
To use an exponential solution we need to solve A times w0 equals h times w0.
So I used MATLAB to compute the eigenvectors and eigenvalues.
On the left of the code output we get one eigenvector, eigenvalue pair and
on the right we get the other. The first eigenvector which I'm going to
write down as w01 is roughly equal to minus 0.4, 1.
The eigenvalue is h equals minus 2.6.
The second eigenvector is w0.2 is
equal to minus 2.6, 1. And then its eigenvalue is minus 0.4.
Note that I've scaled both of these to make
the second component equal to 1 in each case.
I can do this, because any scalar multiple of an eigenvector is also an eigenvector.
What does this tell us? It says that w0 is equal to,
minus 0.4, 1, then that implies
that w of t is equal to e to the minus 2.6
t, times minus 0.4 1.
Similarly, if I had w0 equal to the other eigenvector,
then I would get the exponential with that exponent in it.
Moreover, if w0 is three times one of these vectors,
then I would just multiply that exponential solution by three.
Because of superposition.
Lastly, let's say that w0 is equal to minus 3, 2.
And that's equal to w0,1 plus w0,2. Then that would imply that w
of t is equal to
e to the minus 2.6 t, times minus 0.41,
plus e to the minus 0.4 t, times minus 2.61.
This example suggest that we should be
able to compute any solution of a differential
equation from the exponential solutions for each eigenvector,
eigenvalue pair, and this is in fact true.
What should you remember from today?
Remember that vector and matrix representations are useful
for computing analytical solutions as well as Euler integration.
And for complex systems including MIDI states.
And remember that eigenvectors and eigenvalues
provide the means by which we compute those
solutions as exponential solutions.