=Paper= {{Paper |id=Vol-1623/paperapp4 |storemode=property |title=An Application of Speed Gradient Method to Neural Network Control for Underwater Robot |pdfUrl=https://ceur-ws.org/Vol-1623/paperapp4.pdf |volume=Vol-1623 |authors=Alexander Dyda,Dmitry Oskin,Pavel Dyda |dblpUrl=https://dblp.org/rec/conf/door/DydaOD16 }} ==An Application of Speed Gradient Method to Neural Network Control for Underwater Robot== https://ceur-ws.org/Vol-1623/paperapp4.pdf
     An Application of Speed Gradient Method to Neural
          Network Control for Underwater Robot

                  Alexander A. Dyda1, Dmitry A. Oskin1,2, Pavel A. Dyda1
      1
          Maritime State University, 50a, Verhneportovaya str., Vladivostok, Russia, 690003
                         Department of Automatic and Information Systems
          2
            Far Eastern Federal University, 8, Sukhanova str., Vladivostok, Russia, 690950
                                Dept. of Information Control Systems
                            daoskin@mail.ru, adyda@mail.ru



              Abstract: in this paper the speed gradient method is applied to design an ad-
          justment algorithm for parameters of neural network controller. Local quadratic
          criterion expresses generalized error of desired trajectory tracking. Continuous
          adjustment laws for neural network parameters and their discrete analogies are
          derived on base of speed gradient method. To illustrate an approach, the math-
          ematical model of underwater robot is taken. Numerical experiments had con-
          firmed.

          Keywords: speed gradient method, multilayer neural network, adjustment law,
          control, underwater robot.


1         Introduction
    This paper is devoted to an application of speed gradient method to derive parame-
ter adjustment (adaptation, learning) laws for multilayer neural network (NN) which is
used to implement underwater robot (UR) control.
    Underwater robots (UR) promise great perspectives and have a widest scope of ap-
plications in the area of ocean exploration and exploitation. To provide exact move-
ment along prescribed space trajectory, UR needs a high quality control system. It is
well known that UR can be considered as multi-dimensional nonlinear and uncertain
controllable object. Hence, the design procedure of UR control laws is difficult and
complex problem [4, 10].
    Modern control theory has derived a lot of methods and approaches to solve appro-
priate synthesis problems such as nonlinear feedback linearization, adaptive control,
robust control, variable structure systems etc [1, 5, 6]. However, most of mentioned
methods of control systems synthesis essentially use information about structure of the
UR mathematical model. The nature of interaction of a robot with water environment
is so complicated that it is hardly possible to get exact detailed equations of UR
movement. Possible way to overcome control laws synthesis problems can be found in
the class of artificial intelligence systems, in particular, based on multi-layer neural
networks (NN) [1, 2, 7].

    Copyright © by the paper's authors. Copying permitted for private and academic purposes.
    In: A. Kononov et al. (eds.): DOOR 2016, Vladivostok, Russia, published at http://ceur-ws.org
690            A. A. Dyda, D. A. Oskin, P. A. Dyda


    Recently a lot of publications were devoted to the problems of NN identification
and control, beginning from the basic paper [7]. Many papers are associated, in par-
ticular, with applications of NN to the problems of UR control [1, 2, 8].
    Conventional applications of multi-layer NN are based on preliminary network
learning. As a rule, this process is minimization of criterion that expresses summary
deviations of NN outputs from desirable values with given NN inputs. Network learn-
ing results in NN weight coefficients adjustment. Such approach supposes the
knowledge of teaching input-output pairs [7, 9].
    The feature of NN application as a controller consists in the fact that desirable con-
trol signal is unknown in advance. Desirable movement trajectory (program signal) can
be defined only for the whole control system [1, 2].
    So, application of multi-layer NN in control tasks demands a development of ap-
proaches, which take into account dynamical nature of controllable objects.
    In the paper the intelligent NN based control system for UR is designed. New
learning algorithm for intelligent NN controller that uses speed gradient method is
proposed. Numerical experiments with control system containing designed NN con-
troller were carried out for cases of varying parameters and expressions for viscous
torques and forces. Results of modeling are discussed.
    Note that a choice of NN regulator is connected with principal orientation of neural
network approach to a priori uncertainty that characterizes UR. In fact, matrices of
inertia of UR rigid body are unknown exactly as well, as these of added water masses.
Forces and torques of viscous friction are of unknown functional structure and also
uncertain. Hence, UR can be considered as controllable object with partial parameter
and structure uncertainties.


2        Underwater robot model
      UR mathematical model traditionally consists of differential equations of kinemat-
ics

                                       q1  J (q1 )q2                                (1)

      and dynamics

                       D(q1 )q2  B(q1 , q2 )q2  G(q1 , q2 )  U                    (2)

    where J the kinematical matrix; q1, q2 the vectors of generalized coordinates and
body-fixed frame velocities of UR; U the control forces and torques vector; D the iner-
tia matrix taking into account added masses of water; B the Coriolis – centripetal term
matrix; G the vector of generalized gravity, buoyancy and nonlinear damping forc-
es/torques [4].
    Poor a priori knowledge of mathematical structure and parameters of matrices and
vectors of the UR model can be compensated by intensive experimental research. As a
rule, this way is expansive and takes a long time. One of perspective alternative ap-
proach is connected with usage of intelligent NN control
                                                     An Application of Speed Gradient Method 691


3        Intelligent NN controller and learning algorithm derivation
  Our objective is synthesis of underwater robot NN controller to provide its move-
ment along prescribed trajectory qd1(t), qd2(t).
  First we consider the control task with respect to velocities qd(t). Define error

                                     e2  qd 2  q2                                         (3)

   and introduce the local criterion (performance index) Q as measure of difference
between desirable and real trajectories:

                                           1 T
                                     Q      e2 De2                                         (4)
                                           2
    Further we use the speed gradient method developed by [5, 6]. The main idea of
speed gradient method consist in such adjustment of available controlled parameters
that time derivative of chosen local or integral criterion (or their combina-
tions)calculated along a system trajectory tends to negative value. If this is a case, a
criterion which expresses an aim of control is minimizing. According to the method,
compute time derivative of Q:

                                             1
                              Q  e2T De2  e2T D e2                                     (5)
                                             2
    as

                                     q2  qd 2  e2                                         (6)

    one has

                        D(q1 )q2  D(q1 )qd 2  D(q1 )e2                                 (7)

    Using expression of first term from dynamics equation, one can get the following:

                       D(q1 )e2  D(q1 )q d 2  B(q1 , q2 )qd 2 
                                                                                            (8)
                        B(q1 , q2 )e2  G(q1 , q2 )  U

    and time derivative of function Q can be written in the form

                    Q  e2T ( D(q1 )q d 2  B(q1 , q2 )qd 2 
                                                                                            (9)
                                                          1
                     B(q1 , q2 )e2  G (q1 , q2 )  U )  e2T D e2 .
                                                          2
    After terms reorganization, one get
692           A. A. Dyda, D. A. Oskin, P. A. Dyda


             Q  e2T ( D(q1 )q d 2  (q1 , q2 )qd 2  G (q1 , q2 )  U ) 
                                   1
              e2T B(q1 , q2 )e2  e2T D (q1 )e2 
                                   2
              e2 ( D(q1 )q d 2  B(q1 , q2 )qd 2  G (q1 , q2 )  U ) 
                 T


              1
              e2T ( D (q1 )  B(q1 , q2 )e2 ).
              2
   As known, the matrix in last term is skew-symmetric, hence, this term is equal to
zero and we have simplified expression:

                    Q  e2T ( D(q1 )q d 2  B(q1 , q2 )qd 2  G(q1 , q2 )  U ).          (10)

    We plan to implement intelligent UR control [1] based on neural network. Without
losing of generality of the approach, choose two-layer NN (Fig. 1). Let hidden and
output layers have H and m neurons appropriately (m is equal to dimension of e2). For
the sake of simplicity, one supposes that only summing of weighted signals (without
nonlinear transformation) is realized in output layer. Input vector has N coordinates.

             X0=1                                1

               X1                                                                    Y1
                                                f1
                                                                                
               …                                …                               …
                                                                                     Yk
               Xi                               fj                              

                                                …                               …      Ym
               …
                                                                                
                                                fL
               Xn                                              Wkj
                              wij                                            k = 1…m
            i = 0…n                           j = 1…L
                                              Hidden layer                   Output layer
                Input layer

                                    Fig. 1. Neural network structure

    Define wij as weight coefficient for i-th input of j-th neuron of hidden layer. So the-
se coefficients compose matrix

                                   w11        w12       ... w1N 
                                  w           w22       ... w2 N 
                              w   21                                                      (11)
                                   ...         ...      ... ... 
                                                                  
                                   wH 1       wH 2      ... wHN 
                                                     An Application of Speed Gradient Method 693


    As result of nonlinear transformation f(), hidden layer output vector can be written
in the form

                                           f1 ( w1T x) 
                                                       
                              f ( w, x)   ...                                           (12)
                                           f H ( wHT x)
                                                       
   where wk denotes k-th raw of matrix w.
   By analogy, introduce matrix W which element Wli denotes weight coefficient
from i-th neuron of hidden l-th neuron of output layer.
   With defined NN parameters, the underwater robot control signal (NN output) is
computed as following:

                         U  y(W, w, x)  Wf (w, x)                                        (13)

   Substitution of this control let us to get

                        Q  e2T ( D(q1 )q d 2  B(q1 , q2 )qd 2 
                                                                                           (14)
                         G(q1 , q2 )  Wf ( w, x)).

   To derive NN learning algorithm, apply the speed gradient method [5, 6]. For this,
compute partial derivatives of function Q time derivative with respect to adjustable NN
parameters – matrices w and W.
   Direct differentiation gives

                                 Q
                                      e2 f T ( w, x).                                    (15)
                                 W
   It is easy to demonstrate that choosing of all activation functions in the usual form
                                                     x
                               f  x   1 /(1  e
                                                     
                                                          )                                (16)

   imply property

                   
                       fi ( wi x)  fi ( wi x)[1  f i ( wi x)]x j
                              T            T               T
                                                                                           (17)
                  wij

   Introduce additional functions

                     i ( wiT x)  fi ( wiT x)[1  fi ( wiT x)]                            (18)

   and matrix

                  ( w, x)  diag (1 ( w1 x)...H ( wH x))
                                                 T                    T
                                                                                           (19)

   Direct calculation gives
694             A. A. Dyda, D. A. Oskin, P. A. Dyda


                                      Q
                                           W T e2 xT                             (20)
                                      w
      As a final stage, we can write the NN learning algorithm in following form:

                                                                    (21)
                                                      
     ( is learning step, k is number of iteration).
     Now consider which components should be included in NN input vector. As NN
controller is oriented to compensate an influence of appropriate matrix and vector
functions, in common case the NN input vector must be composed of q1, q2, e2, qd2 and
its time derivative.
     The NN learning procedure leads to reducing of function Q, consequently in ideal
conditions, error e2 tends to zero and the UR movement follows to desirable trajectory

                                      q2 (t )  qd 2 (t )                           (22)

      If UR trajectory is given by qd1(t), one can choose

                     qd 2 (t )  J 1 (q1 )(qd1 (t )  k (qd1 (t )  q1 (t ))      (23)

      (k is positive constant). As follows from kinematics equation,

                          q1 (t )  qd1 (t )  k (qd1 (t )  q1 (t ))             (24)

      and

                                    e1 (t )  ke1 (t )  0                         (25)

      where

                                   e1 (t )  qd1 (t )  q1 (t )                     (26)

      Hence, UR follows to the planned trajectory qd1(t).


4        Simulation results of intelligent NN controller
    To check the effectiveness of the approach, computer simulations have been car-
ried. The UR nominal model parameters were taken from [8]. Parameters of UR are:
 D  DRB  DA , where DRB  [1000 0 200; 0 1000 0; 200 0 11000] - system inertia
matrix for the rigid body, DA  [1000 0 100; 0 1100 80; 100 80 9000] - matrix of
hydrodynamic added mass, B  [210 20 30; 25 200 70; 15 33 1500], G  [0; 0; 0].
   Let consider the nominal model (with added mass) and reduced one.
   Vector q2 consists of following components (linear and angular UR velocities):
                                                           An Application of Speed Gradient Method 695



                                  q2  vx       vz        y T                                  (27)

   Dimensions of NN input (q2 and e2) and output (control forces and torque) are
equal to 6 and 3.

                                 U  Fx        Fz        My    
                                                                T
                                                                                                  (28)

    For the NN controller containing 10 neurons in the hidden layer, the simulation re-
sults are given on Figs. 2 – 10. In the considered numerical experiments, the desired
trajectory was taken as follows:

                        vxd  0.75m / sec,
                       
                        vzd  0.5m / sec, 0  t  250 sec
                         0.15rad / sec,
                        yd

                    vxd  0.5m / sec,
                   
                    vzd  0.75m / sec, 250  t  500 sec
                     0.15rad / sec,
                    yd
   Transient processes and control for taken nominal model are shown on Fig. 2 - 4.
                0.8


                0.7


                0.6


                0.5


                0.4


                0.3


                0.2


                0.1                                                         Vx, m/sec
                                                                            Vz, m/sec
                  0                                                         y, rad/sec
                                                                            Vx d, m/sec

                -0.1                                                        Vz d, m/sec
                                                                            y d, rad/sec
                -0.2
                       0   50   100   150      200      250    300   350   400   450        500
                                                      t, sec

                           Fig. 2. Transient processes (nominal model)
696            A. A. Dyda, D. A. Oskin, P. A. Dyda


               250

               200

               150

               100

               50

                   0

               -50

              -100
                                                                                    Fx, N
              -150                                                                  Fz, N
                                                                                    My, Nm
              -200

              -250
                       0    50      100    150    200      250    300   350   400    450        500
                                                         t, sec


                                  Fig. 3. Control signals (nominal model)

              12
                                                                                            Q

              10



               8



               6



               4



               2



               0
                   0       50     100     150    200      250     300   350   400   450     500
                                                        t, sec


                                 Fig. 4. Performance index (nominal model)

      Fig. 5 - 7 present the same processes for the case of reduced UR added masses.
                                               An Application of Speed Gradient Method 697


   0.8


   0.7


   0.6


   0.5


   0.4


   0.3


   0.2


   0.1                                                            Vx, m/sec
                                                                  Vz, m/sec
       0                                                          y, rad/sec
                                                                  Vx d, m/sec

  -0.1                                                            Vz d, m/sec
                                                                  y d, rad/sec
  -0.2
           0    50      100   150   200     250    300   350    400    450      500
                                          t, sec

                    Fig. 5. Transient processes (reduced model)

250

200

150

100

 50

  0

 -50

-100
                                                                       Fx, N
-150                                                                   Fz, N
                                                                       My, Nm
-200

-250
       0       50     100     150   200     250    300   350     400     450      500
                                          t, sec


                      Fig. 6. Control signals (reduced model)
698          A. A. Dyda, D. A. Oskin, P. A. Dyda


                        1.8
                                                                                                       Q
                        1.6

                        1.4

                        1.2

                         1

                        0.8

                        0.6

                        0.4

                        0.2

                         0
                              0        50     100     150    200       250     300   350   400   450       500
                                                                     t, sec

                                       Fig. 7. Performance index (reduced model)

    The exact description of hydrodynamic forces and torques is practically impossible.
In the nominal model [5] viscous friction was linear with respect to generalized veloci-
ties. The effectiveness of the designed NN controller was also proved and confirmed
for quadratic (Fig. 8 - 10) function of viscous friction forces (torques).

              0.8


              0.7


              0.6


              0.5


              0.4


              0.3


              0.2


              0.1                                                                            Vx, m/sec
                                                                                             Vz, m/sec
               0                                                                             y, rad/sec
                                                                                             Vx d, m/sec

             -0.1                                                                            Vz d, m/sec
                                                                                             y d, rad/sec
             -0.2
                    0             50        100     150     200      250      300    350   400   450       500
                                                                   t, sec


                         Fig. 8. Transient processes (quadratic viscous friction)
                                                           An Application of Speed Gradient Method 699


            250

            200

            150

            100

             50

              0

            -50

           -100
                                                                                    Fx, N
           -150                                                                     Fz, N
                                                                                    My, Nm
           -200

           -250
                  0     50    100    150    200      250      300    350     400     450      500
                                                   t, sec

                        Fig. 9. Control signals (quadratic viscous friction)

             12
                                                                                         Q

             10



              8



              6



              4



              2



              0
                  0     50    100    150   200      250      300    350    400     450      500
                                                  t, sec


                      Fig. 10. Performance index (quadratic viscous friction)

   Computer experiments had demonstrated control system stability and high quality
of transient processes for different situations of parameters and partial structure uncer-
tainties of UR dynamics.
 700            A. A. Dyda, D. A. Oskin, P. A. Dyda


   For all considered cases, as seen from simulation results (Figs. 4, 7. 10), perfor-
 mance index (criterion) Q is reducing during transient processes.


 5       Conclusion
     The approach based on speed gradient method is proposed and applied to design an
 intelligent NN controller for underwater robot control system and to derive its learning
 algorithm. The numerical experiments have shown that high quality processes can be
 achieved with proposed intelligent NN control. The procedure of NN learning makes
 possible for UR control system to overcome parameter and, partially, structural uncer-
 tainties of dynamical object.

 References
 1. Dyda, A.A. (2007) Adaptive and neural network control for complex dynamical objects. -
    Vladivostok, Dalnauka. – 149 p. (in Russian).
 2. Dyda, A.A., Oskin, D.A. (2004) Neural network control system for underwater robots. //
    IFAC conference on Control Application in Marine Systems “CAMS-2004”. - Ancona, Ita-
    ly, 2004., p. 427-432.
 3. Dmitry Oskin, Alexander Dyda. Underwater Robot Intelligent Control Based on Multilayer
    Neural Network. Proceeding of the 7th IEEE International Conference on Intelligent Data
    Acquisition and Advanced Computing Systems: Technology and Applications
    (IDAACS’2013), Berlin, Germany. Page(s): 921 – 924.
 4. Fossen, T.I. (2002) Marine Control Systems: Guidance, Navigation and Control of Ships,
    Rigs and Underwater Vehicles. Marine Cybernetics AS, Trodheim, Norway
 5. Fradkov A.L. (1990) Adaptive control in large-scale systems.- M.: Nauka., (in Russian).
 6. Miroshnik I.V., Nikiforov V.O., Fradkov A.L. Nonlinear and Adaptive Control of Complex
    Dynamical Systems, St.-Petersburg: Nauka, 2000. – 549p. (Series «Analisis and Design of
    Nonlinear Systems»), (in Russian).
 7. Narendra K.S., Parthasaraty K. (1990) Identification and control of dynamical systems using
    neural networks // IEEE Identification and Control of Dynamical System, Vol.1. № 1. 20,
    pp. 1475-1483.
 8. Ross A., Fossen T.and Johansen A. (2004) Identification of underwater vehicle hydrody-
    namic coefficients using free decay tests // Preprints of Int.Conf.CAMS-2004,. Ancona, Ita-
    ly,2004. - pp.363-368.
 9. Sutton,R. and Craven, P.J. (2002) An on-line intelligent multi-input multi-output autopilot
    design study // Journal of Engineering for the Maritime Environment, vol.216 No.M2,
    pp.117-131.
10. Yuh Y. (1990) Modelling and control of underwater vehicles IEEE J. of Trans. Syst., Man,
    Cybern., vol.