Predictive control


A high order system is controlled with the aid of a fast model.
The simulations here consist of three and four cascaded integrators.
At each step, the state of the fast model is set to correspond to that of the system.
The fast model is run with maximum and minimum value of the input u.
At some point the error and all the state derivatives of the model will have the same sign as the input.
It can be said that they are then all 'onside'.
At this point the iteration ceases.
While the model runs, tests are made to determine the drive to be applied to the plant.

In the first example, the drive is chosen for which the iteration lasts longest - taking longest for all variables to come 'onside'.  The model is run with a coarser step length than the plant.

The second example has the original strategy of choosing the drive for which the position error is 'offside' furthest ahead in time.  It can be seen that a sequence of overshoots will occur.

In the third example, 'slugging' has been added.  The values of derivatives are exaggerated when applied to the model initial conditions.

The fourth example stretches the 'all offside' strategy to control a fourth-order system.  There are some overshoots.

The fifth example adds 'slugging' to the 'all offside' control of a fourth order system to avoid the overshoots, at some expense in settling time.

The next example shows that even a five-integrator system can be controlled!

Try tuning a simple nonlinear controller to match the performance!