Week 8 Classroom

Q1:

Eigenvalues of a linear second order systems

Eigenvalues of a state space matrix tells you about stability. The following is best done as a live script (start the editor and select 'new livescript')

>> syms omega zeta

Create a second order system in state space

>> A=[0 1; -omega^2 -2*zeta*omega]

Compute the Eigenvalues

>> ev=eig(A)

and simplify

>> simplify(ev)

If you are not using livescripts you can pretty print the result

>> pretty(simplify(ev))

Look at the equations. Is it possible for any of the real parts of the Eigenvalues to become postive? If so why

Q2

Numerical simulation of a second order systems

A pendulum linearised around the lowest point of the swing has the the following equation for $\omega$

\[ \omega=\sqrt{\frac{g}{l}} \]

Since $\omega=2\pi f$ where $f$ is the frequency of the pendulum, calculate the length of the pendulum needed for a period of 1 second.

Set this up as a numerical simulation

>> g=9.8 % metres per second^2
>> omegaSim=sqrt(g/l)
>> zetaSim=0;
>> A=[0 1; -omegaSim^2 0]

Set up the function to integrate as a state space

>> fn=@(t,x)A*x
>> [t,y]=ode45(fn,[0 10],[.2;0]);
>> plot(t,y)

Is it a one second period? What are the Eigenvalues? Is it stable?

Now try a more practical pendulum where the amplitude will decay

>> zetaSim=somevalue
>> A=[0 1; -omegaSim^2 -2*zetaSim*omegaSim]

Recompute the function, integrate and plot. What happens if zetaSim is large? What are the Eigenvalues?

How about an impossible pendulum. Set zetaSim to a small or a big negative number. Recompute the function, integrate and plot. What are the Eigenvalues?

How do the Eigenvalues predict stability?

Q3

Statespace for a non-linear system

The non-linear equation for a pendulum with damping $B$ is given by

\begin{equation} \ddot\theta=-\frac{g}{l}\sin\theta -\frac{B}{m}\dot\theta \label{eq:pend1} \end{equation}

Write the state space equation of the damped non-linear pendulum equation, in the form

\[ \begin{bmatrix}\dot\theta\\\dot\omega\end{bmatrix} = f(\begin{bmatrix}??\\\omega\end{bmatrix}) \]

You will need to fill in the ?? and work out what the states are.