208 CHAPTER 6. NEURAL CONTROL
-1-0 .6 -0 .4 -0 .2 0 0.2 0.4 0.6 0.8
-0 .5
0
0.5
1
1.5
Figure 6.5. Original functionëoí versus trained function ë∗í
Referring to Figure 6.5, it is clear that the neural network has learned the
relay characteristic very well and that no further retraining is necessary. If, on
the other hand, the trained response were unsatisfactory, we may have had to
increase the number of neurons in the hidden layer or choose another topology,
perhaps one with an additional hidden layer, as a possible choice for a neural
network that would provide better learning capabilities. We must note from
this discussion that there is no unique design for a neural network.
Matlaballows us to view the error surface created by plotting the sum-
square error as a function of the weights and biases of a single neuron. This
surface gives some indication as to how well the neural network has been trained.
The segment of theMatlabcode used to view the error surface is shown below,
and the error surface is illustrated in Figure 6.6.
wv=-1:0.1:1;
bv=-2.5:.25:2.5;
es=errsurf(p,t,wv,bv,ítansigí);
plotes(wv,bv,es,[60, 30]);
Figure 6.6. Error surface