At the end of the Fundamentals module, I left you struggling to find useful feedback parameters for a simplified Segway simulation.
Run it again at segwayfeedback.htm.
Although this simulation is notional, you can rescale the parameters to fit a practical experiment

Fig.1.1 Trolley experiment
But the time-constants will be much shorter and control might be more difficult, so for now we will stick with a rider, one metre above the wheel.
You probably achieved stability, but the movement from one target position to another will have been painfully slow. This module will explore non-linear control strategies for improved performance.
In the Fundamentals module, we looked at the equation
We solved the equation by trying a solution emt, then solving a quadratic equation
(m2 + 5m +6) = 0
We saw that the state equation could be put into a matrix form
as
We discussed the significance of the eigenvalues of A. To find them we equate the determinant to zero
And we find that we have come full circle to the same quadratic equation, but with λ instead of m
λ2 + 5 λ + 6 = 0
So we will follow the same methods to try to analyse the Segway.
In that first module, we found a matrix equation to describe the Segway. When we put in values for g and L it became:
We added feedback
u = k1*(x – target)+k2*v+k3*theta+k4*omega
We can show our love for matrices, by writing this as
and combine it with the matrix equation to get
So now we need to start our search for eigenvalues, by looking at the determinant
We can simplify this by adding the bottom row to the second row, to get
After expanding by the first column we have
- λ (-λ{ λ2+k4 λ+k3-10} - k2{10- λ2}) –(-k1{10-λ2}) = 0
i.e.
λ2{ λ2+k4 λ+k3-10} + k2 λ {10- λ2} +k1{10-λ2} = 0
This sorts out to
λ4 + λ3(k4 - k2) + λ2(k3 - 10 - k1) + λ(10 k2) + (10 k1) = 0
This a fourth-order polynomial. Just what can we do with it?!
One of the easiest criteria is that all the coefficients must be positive. The roots must have negative real parts.
So for a start, k1 must be positive. It might be a surprise that we must apply positive feedback, not negative. The velocity feedback k2 must be positive, too.
Coefficient k4 must be bigger than k2, while k3 must be bigger than k1+10.
But there are more criteria than that.
Do a web search for Routh Hurwitz to see how the determinants of a succession of matrices are involved.
But just determining stability is not enough.
The next topic will present a different way to look at the problem.