4.4 Adaptive control
If the time variant behaviour of a process is changing only slowly with respect to the
dynamics of the transfer itself, adaptive control techniques can be applied, that try to
`adapt' the controller to the changing conditions. In Fig. 4.21 we sketched the principle
again. Some estimation algorithm updates on line a model of the process based on the

inputs and the outputs of the process. Most often it compares the measured outputs with
the outputs of the model and tunes the parameters in the model until the difference in the
outputs is minimized. If the process changes it takes at least several impulse responses
to _t the new model if the disturbance is not too big. Next, based upon the renewed
model the controller can be adapted. In principle any control design method could be
used here. Very popular nowadays is a kind of LQG-criterion where the process is forced
to follow the response of a reference model the so called MRAC (Model Reference Adaptive
Control). By means of this reference model one can keep the response modest so that the
total control is sufficiently `cautious'. In a sampled version, for each sample instant the
`optimal' control is computed in the momentary status but only the first sample output is
transmitted and the next sample instant the whole procedure is repeated . This is done to
insert as many new information in the momentary design as possible. Nevertheless because
of the noise one has to be careful in order not to rely too much on disturbed signals and
because of the changing dynamics the robustness of the control has to be guarded as well.
These two effects force designers to build in all kinds of safety margins and to keep the
resultant control `cautious'. As a consequence there is an abundant collection of adaptive
control design techniques available nowadays where each designer has its own taste in
estimation and control principles, the way the safety margins are implemented and how
reference models are being chosen. On top of that it is rather complicated to guard the
robustness of the total closed loop system as it is after all a nonlinear system.
     A good introduction into the various methods is given in [1]. We cannot show an
application of the inverted pendulum because the change of the dynamics due to the
mouse can be expected to be at least as fast as the process dynamics. Nevertheless we
may give some idea of the procedure by changing the mouse's vertical movements into
a very slow sinusoidal swinging. Furthermore a prestabilizing PID-controller has been
applied in order to facilitate the estimation. For estimation it is necessary to sample the
plant in this case with a sampling time of .01s. Then the parameters of a second order
transfer in z-domain :
                                  b1 z-1 + b2 z-2
                    P(z) = ------------------
                               1 + a1 z-1 + a2 z-2
have been estimated using a recursive least squares algorithm with a forgetting factor of
.95. This means that the importance of a sample k instances before, is weighted by .95k
in order to account for the changing dynamics. Finally the controller is simply a pole
placement algorithm that forces the poles of the closed loop system to be located at 0.3,
0.6 and 0.6. Next the resultant signals for the nonlinear closed loop system are given
together with the on-line estimation of the plant parameters. The influence of the slow,
vertical swinging of the mouse is clearly visible.


 

4.5 MPC
A model predictive control will not be analyzed here as the performance would be very
low for this simple plant. The merits of MPC become evident for very large systems only.
 

4.6 Neural network controllers
Essentially a neural network is a static, black box that contains a lot of tunable parameters
(weights) that can be adjusted (trained) such that a desired nonlinear function results.
If a general dynamic transfer is needed the necessary time dependence has to be built
around the actual neural net. As an example this can lead to the structure as shown in
Fig. 4.24 for the inverted pendulum. First of all , almost all of the present-day neural nets

are implemented on digital computers or digital chips. So the computation of its output
based on the offered inputs takes some time. Ergo we can only apply the neural net in
a sampled system environment. That's why the AD- and DA-converters with necessary
holds and samplers can be distinguished as building blocks. It can also be seen that the
inputs of the network are formed by the output measurement y itself and its approximate
derivative dy/dt realized by the filter:

where T is the sampling time. This structure has been inspired by the classic control
where a kind of PD-controller was found. Of course we inevitably had a pole in the
controller as well but this one was only disturbing and not essential for the effect of the
controller. Consequently the idea behind this structure is that if the neural net were just
a linear transfer the controller would certainly stabilize with appropriate coefficients. But
possibly a nonlinear transfer can add something better e.g. by introducing more than
linear feedback if the states ( and d/dt) are too far from the equilibrium (0,0).
Let us next analyze what the neural net box contains as depicted in Fig. 4.25. Four

neurons in one hidden layer are implemented. Each neuron consists of a summation and a
sigmoid function. The arrows to the summation each contain a tunable weight say i. The
summation more or less represents the synapses on real biological neurons where positive
weights refer to excitatory and negative weights to inhibitory synapses. Depending on
the collective excitation the membrane on the biological neuron depolarizes or polarizes
which effect is represented by the kind of switching function afterwards. The `switching'
function has a vague gS"-shape and is a kind of a sigmoid function like the arctangent
function. Effectively for each neuron we can write mathematically:
             zj = arctani,j E x            (4.30)
                              i
where zj is the output and and xi are the inputs. The inputs are the momentary samples
y(k) and dy(k)/dt and a constant reference 1. The last one is meant to offer the opportunity
of a bias for the switching level. Next the outputs zj of the various neurons are added
again with proper weights j to yield the control sample u(k). So in this simple setup we
already have 16 weights to be adjusted to arrive at a nonlinear static transfer of the form:
             u(k) = fN(y(k), dy(k)/dt)                                (4.31)
These weights are then tuned such that we minimize the following criterion:
         1
J = ---- { y(k)2 +0.01Eu(k)2}
        N
where N=2000 is the number of datapoints. This is the training of the network and special
procedures have been developped. For the inverted pendulum process we have given the
neural network initial weights such that we have a simulated, stabilizing PD-controller.
Certainly the function fN is then a linear one as displayed in Fig. 4.26. Next we trained a

6 node neural net in a run with the disturbances and the measurement noise to minimize
the power in the output y. Strangely enough after some time and a retry we obtained
asymmetric function fN as displayed in Fig. 4.27. This can be attributed to either a too
short and thus not representative run or to a local minimum so a failure of the training
procedure. This is often the case. So we retried with different initial values of the weights
and longer training runs and we simply obtained the linear surface as in Fig. 4.26. So
obviously the training mechanism could not find a better surface which can mean two
things:

  E there is no better nonlinear transfer
  E The training algorithm was not able to find an existing better solution
There is no general method to conclude on this dilemma. After some longer training we
obtained the surface of Fig. 4.28 clearly reflecting the saturation of the actuator. Finally
the time signals for the white noise mouse and the worst case mouse are given as well. We
conclude that the disturbance reduction is good but certainly not robust.



 

4.7 Fuzzy control
For the fuzzy controller the same structure can be used as for the neural controller because
it is also a static, nonlinear function with different building blocks but also implemented
on digital computer (chips). So Fig. 4.31 speaks for itself. Depending on our experience

in balancing a broomstick, as we all will have been doing in our youth, we will program
the fuzzy controller box. We first have to define fuzzy sets to quantify the signals y, dy/dt
and u. In Fig. 4.32 an example is given of four sets with their maximum value on 1. The

horizontal axis represents the actual value of the concerned variable. For classic sets the
membership value would either be 0 or 1, so that the membership functions would always
be blocks. In the fuzzy sets here we distinguish membership values in between 0 and
1. For instance a signal value 0 classifies the signal as belonging to SN (small negative)
with membership value .5 and belonging to SP (small positive) with an equal membership
value. The other two sets are named LN (large negative) and LP (large positive). The
scaling factor m can be chosen depending on the variable with some trial and error.
     Next we have to come up with some rules as scheduled in Fig. 4.33. It represents the
action in u that we should take depending on the characterization of inputs y and dy/dt. For
instance entry (4,3) implies:

Contrary to classic logic this conditional command should not be taken as (u = SP) will
finally be either true or false. Some fuzzy logic is applied such that the outcome is more
true as the conditions are more true and vice versa. The trueness of the condition (y = SP)
is simply the membership value of y for set SP. The rule base is then raised based on
the broomstick experience. After we have gone through all the conditional commands the
result will be that u belongs to all sets with certain membership values. E.g. it might

have a high membership value for SP and only small membership values for the other sets.
In a `defuzzification' procedure this is translated into a final signal value for u which will
thus be somewhere close to m=3. In this defuzzification several methods can be used that
take a kind of properly weighted gravity point. So at the end we have a nonlinear transfer
relating y and dy/dt to u:

But this function is far from unique. It depends on the personal broomstick rule base, on
the actual fuzzy logic used and on the particular defuzzification algorithm applied. As an
example can be taken Fig. 4.34. Trial and error might let it work finally but the question

of optimality remains in this environment characterized by arbitrariness. The next figures
show the resultant closed loop signals for the surface of Fig. 4.34.


 

4.8 Epilogue
Several methods have been introduced and tested on the inverted pendulum example. The
results were all comparable. This is due to the fact that not too much effort is put in trying
to obtain the utmost and due to the simplicity of the plant. Furthermore all methods show
their special benefits if the circumstances correspond to their special design. For instance
for the worst case mouse -analysis/synthesis design proved to be the very best. But a
kicking mouse would possibly favor the l1-design and a sleeping mouse would possibly let
the LQG-controller win. Furthermore classic design is rather fast and robust but cannot
be applied to multivariable plants. So every design has to be tailored to the special needs
which makes control design a profession rather than an automatism.
 

REFERENCES
[1] K.J. Astrom and B.Wittenmark, "Adaptive Control", Addison-Wesley, second edition
1995.
[2] D.W.Clarke, C.Mohtadi and P.S.Tu s, "Generalized Predictive Control", parts 1 and
2, Automatica, 23, 137-160.
[3] A. Isidori,"Nonlinear Control Systems: an Introduction", Lecture Notes in Control
and Information Sciences 72, Springer Verlag 1985.
[4] M. Morari and E. Za riou, "Robust Process Control", Prentice Hall 1989.
[5] H. Nijmeijer and A.J.van der Schaft,"Nonlinear Dynamical Control Systems", Springer
Verlag 1990.