Copyright @ IF AC Manoeuvring and Control of Marine Craft, Aalborg, Denmark, 2000
ADAPTIVE NEURO CONTROLLER FOR A PRECISE MANEOUVRING OF UNDERWATER VEHICLE
Zoran Vukic 1 , Bruno BoroyiCZ , Boris ToyornikJ
'Department of Control and Computer Engineering in Automation, University of Zagreb. ZControl Engineering Department, Brodarski institute d.o.o. J Institute of Automation, University of Maribor, Faculty of Electrical Engineering and Computer Science
Abstract: A neuro controller for high precision manoeuvring of underwater vehicles require special attention to a number of factors including thruster and vehicle's nonlinearities, couplings which exist between various degrees of freedom as well as effects of the sea currents. The neuro control system for underwater vehicle maneouvring described here is based on the conventional controller supported with the so called adaptive neural network. Copyright © 2000 IFAC Keywords: neural networks, underwater, vehicle, trajectory, guidance.
of the proposed solution are described in Section 4. Simulation results are given in Section 5.
I. INTRODUCTION Use of underwater vehicles in the inspection of the sea areas requires a high precision trackkeeping along the specified route. Consequently the underwater vehicle is required to have good manoeuvring capabilities and the control system is characterized by use of adequate position sensors and generally by the adoption of the advanced control approaches. The goal of this paper is to present the main aspects, of the design of a controller for precise maneouvring based on the adaptive neural network which is embedded in a dynamic positioning controller of the underwater vehicle. The paper demonstrates the feasibility of the proposed approach. The organization of the paper is the following. In Section 2 the basic formulation of the problem is given. The adaptive neural network is described in Section 3. The control system and the basic structure
2. PROBLEM FORMULATION The problem of underwater vehicle's precise manouvring can be considered as a problem consisting of a dynamic positioning which is extended with the problem of guidance the vehicle along the prescribed trajectory  reference position as a function of time. The mathematical model of the underwater vehicle in 6DOF is given by the following well known matrix expression (Fossen, 1994):
Mv + C(v)v + D(v)v + g(17) = r,. where :
•
173
M  inertial matrix,
(I)
•
c(v)  Coriolis and centripetal matrix,
•
D(v) matrix of hydrodynamic damping,
• • •
g(T7) gravitational vector, 1', 
•
1] =
v
T[
yw . 1 ] u(Vx) where:
external forces vector,
= [u v
[x
y
p
w
z
~
q
r
Bw . ,
r velocity vector,
B If!
(2)
r position and Euler
w=
 network parameter matrix (see Fig. I),
Bw .m
8",·.1
W ,.I
w /,}
w,.",
W .?.1
W.?.?
W.\m
angles vector. W
WN".I
There are several problems related with the low speed manoeuvring of the underwater vehicle. We will mention the following : • thrusters are highly non linear subsystems and their uncertain dynamics have a significant influence to the control system dynamics overall, • the hydrodynamic couplings between thrusters can be very strong, • the effect of the sea current is very important, especialy when the speed of a sea current is comparable to the vehicle speed, • the vehicle mathematical model is complex and usually difficult to estimate (with eXistIng nonlinearities and couplings between particular degrees offreedom).
W
_\ ".!
'\ ~. m
 network parameter matrix (see Fig.
V! .n
I),
dimension  dim(V)= Nh x(n+1),
o{z)  vector of activation function outputs dimension dim(oo) = Nh x 1,
x = [1 x,
x]
... xn
r network input vector,
dimension dim(x) = (n + l)x 1,
y=[y, y] ... yJT  network output vectorNh
The conventional approach adopted for the dynamic positioning controller design is the LQG control and PID control. The manoeuvring performance is influenced by control of vehicle's linear and angular velocities. The problem can be resolved by use of the proposed adaptive neural network together with the conventional LQG or PO controller.

dim(y) =mxl, number of hidden neurons,
m  number of network outputs,
n  number of network inputs. Feedforward neural network shown in Fig. I is trained with the backpropagation alghoritm. Learning alghoritms are given by the following expressions (Fierro and Lewis, 1998):
W = Foo(V T X~T
3. ADAPTIVE NEURAL NETWORKS
(3) (4)
V = GX[oo'(Vx)j' wef The neural network could be described as a signal processor which maps input(s) to output(s). It could be trained according to the training criteria. The neural network used in this paper is of the multi layer feed forward type and is shown in Fig. I.
where:  training parameter matrix for matrix W ,
 training parameter matrix for matrix V ,
e
= le,
e]
. ..
eJ T 
error
(criteria)
vector
network training, Fig. l . Feedforward neural network The input output relationship of neural network shown in Fig. I is given by the following expressions:
174
0
0
0
00;
0
0
0
00;
0
0
0
<7~~
 activation function gradient matrix, dimension dim(u'} = (N h + f}x V h
for
(for instance for sigmoidal activation function gradient is given by: u'(z) = U(z)(1  u(z)} ).
as something like varyIng proportional and integral behaviour.
Note that the neural network could act in some way similar to the model reference adaptive controller, justifiing the word adaptive in the title of this section. The difference between the neural network (classical) learning and neural network compesating (adapting) could be found in the quantity of the training coefficients F and G . If they become larger the neural network become closer to the adaptive network. More details about neural network properties, stability analysis and more could be found in the work of Fierro and Lewis (\998) and K wan and Lewis ( \998).
Underwater vehICle
From the previous consideration we can conclude that the adaptive neural network does not learn but instead, adapt itself to the criteria.
Fig.2 Velocity controller structure Precise guidance and control of underwater vehicle are shown in the example of underwater vehicle in 6 DOF taken from Lauvdal and Fossen (1994):
4. CONTROLLER STRUCTURE
v = f(v, r.}
To illustrate the adaptive properties of neural network an example will be given. The proposed control system will ensure high precise velocity and position tracking of the underwater vehicle treated in the 6DOF.
(5)
The first step of finding an adequate approximative linear and decoupled dynamic mathematical model for each of six control channels gives: T.u=kuXu; T,v=k.Y v ; Tww=kwZw ; Tpp=kpKp ;
The synthesis procedure consists of couple of steps. The first step is to find approximate linear and decoupled vehicle's mathematical model from force vector to velocities. The assumption is that the vehicle dynamics is known up to some level and that it is possible to find simplified approximative first order mathematical model. The second step is to define the linear velocity controller (P, PD or PID type, or some other linear controller) for that approximated model and to find the closed loop linear model. The third step is the definition of the neural network. The neural network is positioned in the velocity feedback and commanded velocity feedforward (it has twelve inputs, six velocities and six commanded velocities). The criteria to be minimized is the velocity tracking error. The fourth step consist of valuation (preestimation) of maximum and minimum values of state variables, velocities and commanded velocities. It is desirable that all state variables entering the neural network are of similar value range. That is because the neural network inputoutput relationship and training process are nonlinear and the big difference among normalized network inputs could bring neural network in some kind of saturation (Borovic, 1999). The fifth step consists of the design of the position linear controller for the reference linear model. Synthesis could be implemented with one of the well known linear design methods (Fig. 3). Coordinate transformation are avoided due to simplicity. The sixth step is implementation of a neural network parallel to the position linear controller (see fig.3). The input is position error, the criteria is also position error. Additional act of neural network could be seen
(6)
Til=kqMq; T/=k,Nr ;
For each particular approximative model of the first order, the synt~esis of linear controller is done.
xC; yC;
'.
", ",
Underwater
vehde ... velocity
.. C;
..
Fig. 3. Position controller structure Linear part of control signal, under assumption of proportional control law, is given by the following expression: Xw=Ku(udu}; YLd=K,(vdv}; ZLd = KJwJ  w} ; KLd = Kp(Pd  p};
(7)
Mw=Kq(qdq}; NLd=K,(rd r};
The linear part of controller could also have a derivative behaviour. The synthesis of proportional control law is done in order to achieve the dynamics of the closed loop reference model which is going to be base for position controller design:
175
desired and actual surge position signal in the case of linear and neuro controller is given. The errors between this two signals in all six OOFs are given on Fig.S. Desired surge velocity and actual surge velocity are given on Fig. 6 and errors between all six desired and actual velocities are given on Fig. 7.
T,umod=kuXu ; T,vrnod=k,Yv ; T.wmod = kwZ  w; TpjJmod = k pK  p ; TAmod
= kqM 
q; T;rmod
= k,N 
(8)
r;
The difference between the desired and actual velocity fonn the criterion for 2nd neural network (see Fig. 2) adaptation:
e•. =
WJ 
w; ep = Pd  p;
(9)
eq=qd q ; e,=rd  r ;
~L j ____~___ L_ _~~_ _ L_ _~~_ __L~
o
10
20
30
.0
50
60
70
80
90
100
t{sl
The neural network contribution to total control signal is added to the contribution of the linear part of a controller:
: . , 
LJnear (tontro/ltr ... Neural Netwonl
2 ~   :"R~:C
 I
'
r
,
,~,
,
~ o~ ~   ~  ~  ~  ~
X J = X dL +Xdnn ; Yd = YdL + Ydnn ; Zd = ZdL + ZdM; K J = KJL + K Jnn ;
2
(10)
_ _ ', _
I
~, A,~t~al! I,__
_ _ __ i
I
I
10


, 


,


,
,
J
 :   :   ,  :   J _ ,'_
 I,   I,  1:
I
!
' t
!
o
Md = MdL + M dnn ; Nd = NdL + N dnn ;
"
I
...c l
,
20
30
40
50
60
I
70
80
90
100
1)$1
After the velocity controller design the positIOn controller design based on linear closed loop model (8) is done and the 151 neural network is added to give adaptive behaviour to linear, for instance, PI controller (see fig 3).
Fig. 4. Track keeping with and without neural networks (example: surge OOF)
.' ~ ' : :: : •• : . ' : : JI ,   ,1 Ci\J~~
E·
2
 , 
;..:[ ~ : ~ ; \J' l;M"~ ; : ~ v;4
In the position and velocity tracking implementation of the neural network compensates for the change of vehicle's dynamics and OOF couplings due to vehicle speed different from zero.
0"
o
Apart from "perfect" velocity and positIOn tracking neural network could also be used in other control schemes. For instance by applying the difference between referent model and actual velocity vector as a criteria for adaptation (see fig. 2), neural network will ensure the linearization and decoupling of vehicle control channels in all six OOF. The method is similar as MRAC scheme. The greatest advantage of using the multi layer feedforward neural network instead of conventional MRAC system is in the fact that MRAC for MIMO system with six input and six output is very complex for design and also in the final controller structure. It is also possible to use nonlinearities in referent models
I
I
,
I
,
10
20
)0
40
50
60
!
.
I
70
80
90
100
 ;~
!
0
_
.
\

I
··,1 __ :_ __ ,_ _ _ :__ _ :_ __ :_ __ :_ _ _ ~~ "
~
.'
,
,
:
I
~~
.
,~~,..'~I'~ I .~c
: 1.  :
:
:  :~ 0:.' 
j  :v f~~ :~~n~i ,
" .~ .'   :   ;   '  
~ f•
~
~
w
•
~
.~
~
n
_
~
_
 
,. ,,;;,....,.,.,.,'''T''~;,,:~.,,
!. :~  ~!/ ~ '~9 : %,ii : ~S ,~f
S. SIMULATION RESULTS
,:~  t: (~,~.; ~ ,  ~I
Due to illustration of high precise tracking some results will be given. First it is going to be shown that it is easy to achieve "perfect" tracking by linear controller with two neural networks in adaptive mode of work. The mass of the underwater vehicle is 185 kg. The desired signal is prefiltered squared signal with different frequency and amplitude for every particular OOF. It is given only for surge OOF but it looks similar for every other OOF. On FigA the
C
10
20
)0
.0
SO
60
10
eo
90
lO O
I I' i
Fig. S. Difference between reference and actual position and Euler angles for all six OOFs It could be seen the better tracking perfonnance in the case of neuro controller.
176
:'
r.
Llf'le.ar
The control forces and torque are given on fig. 8 for both cases. There is no big difference between the control signal in the case of linear and neuro controller but the tracking error is much more less in the case of neuro controller.
i
Conl r~lIef
! o:[~~~~y~~ ~J~;~ ~~DI .: I . I !: V I~
~.: :
~
:: ~.~:n~
o
10
20
u
30
~tJ1 AC!~~
040
50
60
:. 
j
70
50
90
' ~..'~r~ , L ~ne a r C ~ nt ro N er I I
100
~ ~ ~ ~ D~"~'\ ~ ~ ~ ~ ~ :~\ 'GT: ~ ~ ~ ~ ~ ~ ~.~ ~  : 
1('1
o5 ~
l
:
. linear Controller + Nt,ural;
:
i
; :: ;~~  . 1
~ ?~ ~
 . :  .
I :
I
~twortt
., 1 :
:
w
m
o
2 ;'" 
m
~
:
~
;ctUaI:
ro
~
o
 ~ ~
__
~
m
~
,
.
  .
~
4
, I
.
__L__ L________
m
w
:
tActua l u  r   ~
;
 ,   :   i
~
__
~ '
__
~
ro
~
____L _ _ _
90
60
100
ti l l
: ;
00
~
I

____
~
:v,: :.. ;. 1[
Ref;enIU !   :
,
!
° v;V~ · ~ v~ /.\7~  :  \J1 ~ 51  . ;   .... :   ,  
_
!
_
ri ;Actu;. :  
lIne.ar Conltouar • r  
2
1($1
  r  
1


,

0: : ~  :~  . :. ;   ,. :  ',: i  r  1,   'r
I
Fig. 6. Reference and actual velocity in surge DOF
Ne~al Network
I
I
I
I
.2
Oes lr!lCl u
r   :   ,
~ ~ '
 ,   ,
 .;
__~__~____~__i __L__ L__~________~~
o
10
20
30
40
50
60
70
80
90
10 0
IIsj
Fig. 9. Reference and actual position in surge DOF for vehicle mass of 110 kg
,
~.J I':~ ' ." .rL. 
. '0 .
,~
L



L
_ _ 1_
>~
10
": .
__ L
_ _ L ..{
.~
••
.~
I
'I "
~.j
~~
L
_
,~
..
O.
,
)
i.::~ldj(f1 . , ,~~~ o
t.
,.
,.
oQ
to
••
' 0
H
. 0
'00
~
:h
__ ~ __ ~ __~ _~ 'i~ /_~.~~.:. __ ~ ___;___:___ ~
i '~_~~~">_~,,,,~~~""~~~~J :· .1~   I   I   .J.. .... I _ _ I _ _ I _ _ ,,~_......_ _~_ _..; I...
•
~
1~
'
I
Fig. 7. Difference between reference and actual velocities for all six DOFs
"0
.... ..
I
'0
" , !  
It;
"' ~~' ":',..... ' ~'" t '
•
_
~' .
_
 r ,.
_
~ Jt
 
~••
'
_
~ .
• t
••
;
~~
_
 ;' .: ;   ;
    ..
.f
I
...
i
I
,; ~~= ==t. === =~ =~.= ..=:===rT=T1 i. U
It
• •
tt
"
It
"
: 

I


,
1\.'
"it
l ..... '
f\ I
,
,
i

1
I
f\
~ ~~ ~Vj  ~  ~:J~
.~
u
....
 . ~  ,  ;  ~ .~
, '.
,~
,I,
,l.
Fig. 10. Difference between reference and actual position for six DOFs for vehicle mass of 110 kg
i
I
~
I
,',
1 
1It(  r •.~~~~A
,~v 1~
' i
f
s . ;  Ir
~  'I !~ ,
r :~  r  ~r 
: :: :  
.~
l '
fr'~~./'>~"v~_·7
I
!
A
I
i
'
I
I
i
Linear Cont rQMer
.
i
,
I
i
O :~~~\l±~ : ~i~V~~ ~ ~J, : 'YJ ' I
·0 5
~
' t.
I
I
 
., .
o
r


r



I


r
/:



'
:
I
I
'
10
20
30
40
50 lis)
..
_
")' cluil
u
r   ...   ~
_I
Oe s l ~ed u
~
:
:
60
70
SO
90
100
' r . ,_~~~_~~~
:
•
I
O S .... 
!
I 
I
,
I Llneen Con trofler + Ne ural Networ1l 

>

~


....


...
_

....


, ...
I 

;...

..
rV',,",:"; ~ '
. ,
r  
~
 ;   r  Ac tual u
D.sl~
'
o
10
20
30
40


~
;
 J., ,/Y   i f ~vl ~ ~ ~ ~ ~i
o~  '\/~ ~/V~
o5 ~~
I
' 
50
60
U ,
I
'
70
80
90
10 0
115J
Fig. 11. Reference and actual velocity in surge DOF for vehicle mass of 110 kg
Fig. 8. Forces and torque control vector during the simulation
177
6. CONCLUSIONS After the presentation of neural network's adaptive mode of work some conclusions could be given. Neural network, in combination with conventional controller can, without any significant problems ensure almost perfect position and velocity tracking which is required during the specific vehicle manuouvers. Presented control scheme is easily added to existing conventional vehicle dynamic positioning system. Neuro controller is robust and is not sensitive to vehicle dynamics changes.
REFERENCES Borovic 8., Modem guidance and control systems of floating vehicles, M.S thesis, FER, Zagreb, 1999. Fierro, R., Lewis, F. L. (1998). Control of
Nonholonomic Mobile Robot Using Neural Networks . IEEE Trans. on Neural Networks, Vo!.
Fig. 12 Difference between reference and actual velocities for all six DOFs for vehicle mass of
9, No. 4, July 1998. pp 589600 Fossen, T . I., (1994), Guidance and Control of Ocean Vehicles, John Wiley and Sons, 1994. Kwan, R., Lewis, F. L., Dawson, D. M., (1998).
110 kg
Rosbust NeuralNetwork Control of RigidLink Electrically Driven Robots. Vo!. 9, No. 4, July 1998. pp 58\588. Lauvdal, T., Fossen, T. I., (1994), Documentation for
Matlab Simulation Programfor Marine and Flight Vehicles, NTH report nr. 9443W. Vukic Z., Omerdic E. and Kuljaca Lj., "Improved Fuzzy Autopilot for TrackKeeping", 1FAC
Conference on Control Applications in Marine Systems (CAMS '98), Fukuoka, Japan, (1998).
Fig. 13. Forces and torque control vector during the simulation This contro\1er is very robust. Process dynamics could be changed in wide range and closed loop dynamics would be the same, defined by reference signal prefilters. For illustration, the mass is changed from 185 to 110 kg and the same simulation experiment is repeated. Desired and actual velocities are given on Fig. 9 and the difference between them on Fig. 10. Desired and actual velocity are given on Fig. 11. Velocity tracking errors on Fig. 12 and control forces and torque on Fig. 13. The performances of tracking system contro\1ed by linear controller are less sensitive on mass change but in the case of neuro controller.
178