You are on page 1of 11

J. Marine Sci. Appl.

(2015) 14: 14-24


DOI: 10.1007/s11804-015-1297-7

Virtual Reality Simulation of Fuzzy-logic Control during


Underwater Dynamic Positioning
Midhin Das Thekkedan1, Cheng Siong Chin1* and Wai Lok Woo2
1. School of Marine Science and Technology, Newcastle University, NE1 7RU, United Kingdom
2. School of Electrical and Electronic Engineering, Newcastle University, NE1 7RU, United Kingdom

Abstract: In this paper, graphical-user-interface (GUI) software for Caccia et al., 2000). The problem includes its inherent
simulation and fuzzy-logic control of a remotely operated vehicle nonlinearities and modelling uncertainties of the ROV.
(ROV) using MATLABTM GUI Designing Environment is Much hydrodynamic and inertial nonlinearity are present
proposed. The proposed ROV’s GUI platform allows the controller
due to the coupling between degrees of freedom. This is due
such as fuzzy-logic control systems design to be compared with
other controllers such as proportional-integral-derivative (PID) and
to the fact that the ROV is asymmetry-shaped by design
sliding-mode controller (SMC) systematically and interactively. (Chin and Lau, 2012; Si and Chin, 2014; Chin et al., 2011;
External disturbance such as sea current can be added to improve Chin and Lum, 2011; Chin et al., 2006; 2008) and sensors
the modelling in actual underwater environment. The simulated are attached to its open-frame structure as compared to its
results showed the position responses of the fuzzy-logic control counterpart, AUV that is more streamlined for faster
exhibit reasonable performance under the sea current disturbance. maneuvering. Besides, the external disturbances such as sea
Keywords: graphical-user-interface (GUI); fuzzy-logic control; current and other uncertainties acting on the ROV affect the
remotely operated vehicle (ROV); proportional-integral-derivative
(PID); sliding-mode controller (SMC); underwater dynamic
control.
positioning Hence, it is important to numerically model and simulate
the ROV’s dynamics and the external disturbance. This is
Article ID: 1671-9433(2015)01-0014-11 crucial to the realization of ROV’s simulators, precision
autopilots and for prediction of performance (Juan et al.,
1 Introduction1 2013; Smallwood and Whitcomb, 2001). However, the
modelling, simulation and control of the ROV is fairly
In the last few decades, the use of underwater robotic difficult and challenging. This spurs some research interests
vehicles (URV) (Fossen, 1994; Yuh, 2000) has experienced in performing the simulation and control analysis on the
tremendous growth. Many are used for underwater ROV’s model before actual deployment. But it is not always
inspection of sub-sea cables, oil and gas installations like possible to obtain an accurate ROV’s model due to the
Christmas trees, structures and pipelines. They are essential uncertainties when ROV works in underwater. Many
at depths where the use of human divers is impractical. different types of control system methods (Corradini et al.,
Generally, the URV can be broadly classified as 2011; Souza and Maruyama, 2007; Li et al., 2005; Chin and
remotely-operated vehicle (ROV) and autonomous Lum, 2011) were designed to solve the problem of
underwater vehicle (AUV), depending on their designed uncertainty, dynamic positioning and trajectory tracking of
tasks and modes of operations. Nevertheless, ROV are best the ROV. The proportional-integral-derivative (PID)
suited for work that involves operating from a stationary controller is the most common used controller. Recently,
point or cruising at relatively slow speeds for inspection anew backstepping tracking control (Sun et al., 2014a) was
tasks. Furthermore, for any tasks involving manipulation proposed for an unmanned submarine vehicle. The
and requiring maneuverability, they are the most simulation results showed the feasibility of the cascaded
cost-effective platform. control using sliding mode and bioinspired filter design to
But deployments of the ROV present several difficulties handle the speed-jump problem. In addition, fuzzy logic
as they are difficult to control remotely. The challenges are control (FLC) was introduced (Zadeh, 1965), and had
as follows. The governing dynamics of underwater vehicles spurred many control applications on underwater robot
are well understood, but they are difficult to handle for (Ollennu and White, 1996; Raimondi and Melluso, 2010;
practical design and control purposes (Juan and Julio, 2011; Guo et al., 2003; Gracanin et al., 1999; Ishaque et al., 2011;
Akkizidis et al., 2007). Lately, a novel fuzzy control method
Received date: 2014-09-11. (Sun et al., 2014b) is presented for an AUV in both static
Accepted date: 2014-11-17.
Foundation item: Supported by the Newcastle University’s Project and dynamic three-dimensional environment to avoid
Account: C0570D2330. dynamic obstacles. The simulation results showed the
*Corresponding author Email: cheng.chin@ncl.ac.uk
effectiveness of the proposed approach for navigation. The
© Harbin Engineering University and Springer-Verlag Berlin Heidelberg 2015
Journalof Marine Science and Application (2015) 14: 14-24 15

merit of using the fuzzy logic is the dynamics of the on the ROV are discussed. Lastly, the conclusions are
controlled system need not be known. However, to obtain drawn.
the position and velocity responses of the ROV model using
the FLC, numerical simulation software with some 2 ROV dynamics modelling
virtualisation is required.
To the best of our knowledge, there exists some software In this section, the dynamic model of the Falcon ROV is
for the URV simulation. The VROV simulator was designed presented. The Falcon ROV (weighted 73.3 kg, 1 m×0.6 m×
and developed by GRI Simulations Inc. as an instructional 0.5 m) is used as a platform for the study of dynamic
tool for ROV pilot training programs. It could be used for positioning control using FLC. It is an inspection class ROV
real-time dynamic simulation of ROV motion and that is meant for marine surveys up to 300 m. In ROV’s
simulation of tethered and un-tethered ROV and AUV dynamic modelling, it is crucial to have an accurate
hardware. Software named AUVSim designed by dynamic model of the ROV to carry out computer
H-Scientific Inc is used to simulate the behavior of an simulation studies. Unfortunately, due to modelling
underwater vehicle, such as the AUV and ROV. AUVSim uncertainties, the model derived from the
was developed to aid the process of designing and computational-fluid dynamic (CFD) software and
optimizing the control system for AUV and ROV. Besides, experimental techniques can be inadequate for control
SubSim software for AUVs and contains a complete 3D system design. These uncertainties are mainly due to the
physics simulation at a much lower level than the driving hydrodynamic forces which are experimentally and
simulator. Lastly, the Marine Systems Simulator (MSS) theoretically difficult to obtain. Nevertheless, experiments
software was developed at the Norwegian University of have been done and published on the hydrodynamic
Science and Technology (NTNU). The Marine Systems parameter estimation of the Falcon ROV (Soylu et al.,
Simulator (MSS) is an environment which provides the 2010). Besides, for control design purpose, there is a need to
necessary resources for rapid implementation of consider a simplified nominal model (Fossen, 1994) with
mathematical models of marine systems with focus on additive perturbation such as ocean current that are adequate
control system design for vessels. The simulator has to represent the ROV dynamic behavior in under water.
different models for vessels and provides examples ready to
simulate different floating structures. The platform adopted 2.1 CAD modelling
for the development of MSS is MATLABTM and SimulinkTM. A CAD model of ROV is required to obtain the inertia
The software allows a modular simulator structure, and the properties (such as mass and moment of inertia data) and to
possibility of distributed development. But the software is create the VRML model for the later animation. Solidworks
mainly for marine vessels and may not be suitable for CAD software was used for the mechanical design of the
submerged vehicles such as ROV. Moreover, a user ROV. The Falcon ROV uses polypropylene for the
interactive platform for simulating and animating a ROV’s construction of the ROV body (Chassis) which is a
control system is not readily available. non-corroding and maintenance free material with a density
Thus the main goal of this paper targets on the simulation of 855 kg/m3.Whilst some of the frame parts uses composite
and FLC systems simulation and animation for an material and the additional fittings that isdirectly bolted to
inspection class ROV called Falcon ROV (Soylu et al., the chassis. This information was then fed into the CAD
2010). A mathematical model of the ROV was coded using software to generate the ROV model.
the MATLABTM and SimulinkTM. The hydrodynamic Besides, the Falcon ROV is propelled with five
parameters were obtained from the published experimental magnetically coupled thruster units, having a diameter of
results of Falcon ROV. A three-dimensional (3D) animation 0.200 m. Four of them are in horizontal plane for the
of the ROV, to visualise the ROV dynamics, was developed horizontal motion and one is in the vertical plane for the
using Virtual Reality Modelling Language (VRML) editor heave motion. Each thruster is able to achieve at least 13 kgf
and 3D animation toolbox of SimulinkTM. All these thruster forces, making it almost 1:1 power to weight ratio.
components will be integrated in a MATLABTM GUI The inertia properties were calculated using the SolidWorks
Designing Environment (GUIDE) to form a commercially mass properties calculation tool (see Fig.1).
applicable dynamic positioning simulator to visualise the
dynamic positioning of the ROV in 3D virtual reality
environment. Besides, an advanced controller such as
sliding mode controller (SMC) (Fossen, 1994), and the
intuitive controller like PID (Fossen, 1994) on the ROV
were compared with the performance of the FLC.
This paper is organized as follows. The ROV dynamics
and kinematics modelling are addressed in Section 2. It is
followed by the dynamic positioning using virtual reality in
Section 3. In Section 4, the FLC and applications of GUIDE Fig. 1 Inertia properties of Falcon ROV (mass, volume,
moment of inertia)
16 Midhin Das Thekkedan, et al. Virtual Reality Simulation of Fuzzy-logic Control during Underwater Dynamic Positioning

The mass and the center of mass obtained from the centripetal matrix for rigid body and added mass
software are as follows: 73.3 kg, xG = −0.28 m, yG = 0.10 m respectively, D ( v ) ∈ℜ6×6 is the linear and quadratic
and zG = 0.08 m respectively. The moment of inertia values
damping matrix respectively. The propulsion force and
computed are namely: IXX = 9 kg·m2, IYY = 11.79 kg·m2, IZZ =
5.45 kg·m2.
moment vector τ = TKu ∈ ℜ 6 relates the thrust output
vector u ∈ ℜ 5 with the thruster configuration matrix
2.2 Dynamic modelling T ∈ ℜ 6×5 , K ∈ ℜ 5× 5 force and moment from each thruster,
Experimenting with a real ROV is time consuming and J (η 2 ) is the Euler transformation matrix which brings the
expensive. A dynamic model is useful for simulation
inertia frame into alignment with the body-fixed frame.
purposes and testing different control algorithms. The ROV
In Eq. (1), g (η) term is used to describe the
model is conventionally represented by six degrees of
freedom (DOF), nonlinear set of first order differential gravitational and buoyancy (Fossen, 1994) vector exerted
equations of motion, which may be integrated numerically on the ROV in water. The gravitational and buoyancy forces
to yield vehicle linear and angular velocities, given suitable are functions of orientation and are independent of vehicle
initial conditions. Two reference frames (see Fig. 2) are motion. When fully submerged, the ROV’s buoyancy is
used to describe the vehicles states: inertial frame (or equal to the weight of water displaced, i.e. B = ρ g ∇
earth-fixed frame) and local body-fixed frame with its where ρ is the fluid density and ∇ is the volume displaced
origin coincident with the vehicle’s center of gravity. For by the submerged ROV. In the body-fixed coordinate
marine vehicles, the six DOF are conventionally defined by system, the restoring force vector becomes:
the following vectors:
 (W − B ) sin θ 
1) η = [η1 η2 ] T = [ x y z | ϕ θ ψ ] T position and  
− (W − B ) cos θ sin ϕ
orientation (Euler angles) in inertia frame;  
 − (W − B ) cos θ cos ϕ 
2) v = [v1 v 2 ] T = [u v w | p q r ] T linear and g ( η) =  
 − ( y GW − y B B ) cos θ cos ϕ + ( z GW − z B B ) cos θ sin ϕ 
angular velocities in body-fixed frame;  ( z GW − z B B ) sin θ + ( x GW − x B B ) cos θ cos ϕ 
3) τ = [τ 1 τ 2 ] T = [τ x τ y τ z | τ ϕ τ θ τ ψ ] T forces  
 − ( x GW − x B B ) cos θ sin ϕ − ( y GW − y B B ) sin θ 
and moments acting on the vehicle in body-fixed frame. (3)
The simplified buoyancy and gravitational force
hydrodynamic damping matrix, g ( η ) was obtained using
the following design rules. As the ROV was made to be
neutrally buoyant by adding additional float or balancing
mass, the gravitational force due to the ROV weight can be
made equal to the buoyancy force, that is W=B. And by
placing the additional mass on the ROV on the appropriate
location, the XY coordinates of the center of buoyancy
coincide with the XY coordinate of the center of gravity, that
is xG= xB and yG= yB. Eq. (3) becomes:

 0 
 0 
Fig. 2 ROV’s Inertial and body-fixed reference frames  
 0 
The mathematical model (Fossen, 1994) of an underwater g ( η) =   (4)
(
 G z − z B )W cos θ sin ϕ 
vehicle can be expressed, with respect to a local body-fixed  ( z G − z B )W sin θ 
reference frame, by nonlinear equations of motion in  
compact form:  0 

Mv + C (v )v + D ( v ) v + g (η) = τ (1) Since the ROV is quite symmetric about the XZ plane and
close to symmetric about YZ plane, we assumed that the
η = J ( η 2 ) v (2) motions in surge, sway, pitch and yaw are decoupled
(Fossen, 1994). Although it is not symmetric about the XY
where v is the body-fixed velocity vector, η is the
plane, the surge and heave motions are considered to be
earth-fixed vector, M = M RB + M A ∈ ℜ 6× 6 is the inertia decoupled because the vehicle is operated at a relative low
matrix for rigid body and added mass respectively, speed in which the coupling effects can be negligible. With
g(η)∈ℜ 6 is the gravitational and buoyancy vector, this assumption, the drag matrix becomes
C (v ) = C RB (v ) + C A (v ) ∈ℜ6×6 is the Coriolis and D = −diag { X u , Yv , Z w , K p , M q , N r } (5)
Journalof Marine Science and Application (2015) 14: 14-24 17

The relationship between the hydrodynamic forces and where C = (b / 2)sin α + ( a / 2) cos α and α is the angle
moments and accelerations can be represented by the added of the thruster as shown in Fig. 3.
mass. For example, if there is acceleration u in the
X-direction, the hydrodynamic force X arising from that
motion can be given as: X = X u u where X u = ∂X ∂u is
the hydrodynamic derivative. The effects of the off-diagonal
elements in MA on an underwater vehicle in (1) are small
compared to the diagonal elements. For most low speed
underwater vehicles, these off-diagonal terms are often
neglected. This approximation is found to hold true for
many applications (Fossen, 1994). Hence, MA is simplified
to a diagonal form as follows:
M A = −diag{ X u ,Yv , Z w , K p , M q , N r } (6)
Fig. 3 Thruster’s arrangement
where X u is the added mass along X-axis due to an
The forces and moments generated by the thrusterson the
acceleration u in X-direction, X v is the added mass
ROV depend on the input voltage signals. It is given by
along X-axis due to an acceleration v in Y-direction and so forces and moments, K from each thruster, i as shown.
forth. K = RT f i (10)
The negative signs present in MA arise as the pressure
forces on the ROV would tend to retard the vehicle motion. where RT ∈ ℜ 5×5 is vector pointing from the origin to the
The real mass (or the rigid body mass) and the virtual added location of the thruster, f i = 2.98 ×10−4 ui3 − 0.016 ui ui +
mass are originally on opposite sides of the equation; one is 0.32u i is the force from each thruster, i and u i is the
a rigid body property, while the other is related to the measured input signal to each thruster i. A series of
(pressure) force experienced by the vehicle when the virtual experimental tests (Soylu et al., 2010) were performed to
mass is “subtracted” from the real mass. The net effect has verify the damping and added mass coefficients used.
greater apparent mass in most DOF, hence the virtual mass
is “added mass”. As the off-diagonal elements in MA are 2.3 Environmental disturbance modelling
neglected, the corresponding Coriolis and centripetal added The environmental disturbances are disturbances caused
mass matrix C A (v ) becomes: to the system due to the action of waves, winds and ocean
current. For a fully submerged object, the disturbance
 0 0 0 0 − Z w w Yvv  caused by the wind is quite negligible. The wave
 0 0 0 Z w w 0 − X u u 
  disturbance is only significant when the ROV is near to the
 0 0 0 −Yv v X uu 0  surface and at a depth lesser than 10 m (Fossen, 1994).
C A (v ) =   (7) Since the ROV operates beyond this depth, only the ocean
 0 − Z ww Y v v 0 − N r r M q q 
 Z w w current disturbance will be considered.
0 − X uu N r r 0 − K p p 
  The current velocity can be written as
 −Y v v X u u 0 − M q q K p p 0 
v c = v t + v tw + v S + v m + v s + v d (11)
For control, the Falcon ROV is underactuated with four where v t is the tidal component, v tw is the local wind
horizontal thrusters to provide maneuvering in surge, sway component, v S is the non-linear wave component, v m is
and yaw directions and one vertical thruster is dedicated for
the component due to major ocean circulation, v s is the
the heave motion of ROV. But the roll and pitch motions are
self-stabilized by design, and hence the controllable motions component due to set-up phenomena and storm surges, v d
are surge, sway, heave and yaw. The propulsion forces and is the local density driver current components governed by
moments acting on the ROVcan be described as: strong density jumps in the upper ocean. The current
τ = TKu (8) velocity is modelled based on the model (Fossen, 1994) that
suggested the forces and moments due to current can be
where u is a unit vector pointing in the direction as the considered by modelling the ROV non-linear equation of
thruster exerts its force and T is the thrusters’ motion in terms of relative velocity.
configuration matrix given as: vr = v − vc (12)
cos α cos α cos α cos α 0
where, v c = [u c vc wc 0 0 0] T is the current
 sin α − sin α sin α − sin α 0
  velocity vector in body fixed frame. As the earth-fixed
 0 0 0 0 1 current velocity vector is given by
T =  (9)
 0 0 0 0 0 v cE = [u cE vcE wcE 0 0 0] T , the body-fixed velocity
 0 0 0 0 0
  can be determined by Euler’s transformation.
 C −C −C C 0
18 Midhin Das Thekkedan, et al. Virtual Reality Simulation of Fuzzy-logic Control during Underwater Dynamic Positioning

u cE = u c cos α 1 cos β (13a) computed control signal in six DOF into the five available
thrusters. The thrust configuration on the ROV is
v = v c sin β
E
c (13b)
determined by the thrust configuration matrix. The total
w = wc sin α 1 cos β
E
c (13c) forces to the ROV body dynamics is characterized by the
where α1 is the angle of attack and β is the sideslip angle. rigid body and added mass matrix, Coriolis and centripetal
Hence, the dynamic equation of ROV in (1) becomes: forces, damping forces and gravitational and buoyancy
forces. The sum of all these forces that is multiplied by the
Mv r + C (v r )v r + D ( v r ) v r + g (η) = τ (14) inverse of the rigid body and added mass matrix gives the
The overall view of the ROV dynamic model can be seen in acceleration of the vehicle. With the integration function,
Fig. 4. The desired dynamic positions of the ROV are: xd = the velocities are computed and loop back for the next time
yd = 3 m, zd = 2 m, ψ d = 2 rad. One can visualize this as a iteration until the simulation time have reached. Besides
obtaining the body-fixed velocities, the earth-fixed position
joystick inputs to move the ROV manually. The error signal
or the ROV positions with respect to the inertial frame can
can be computed by finding the difference between the
be found by the Euler’s transformation block. The Euler’s
desired inputs and actual feedback of the ROV positions.
angle is used for the calculation of the gravitational and
The signal is then passed to the controller to control the
buoyancy forces required in the ROV dynamics.
ROV through the pseudo-inverse which optimize the

Fig. 4 Open-loop ROV model


The dynamic model of ROV was modelled using
SimulinkTM. To evaluate the model, an open-loop
simulation was performed. Current velocity was assumed
to be 0.02 m/s at a 45° angle of attack. The simulation time
was set to 20 s and variable-step type ordinary differential
equation (ODE), ODE45 (Dormand-Prince solver and
relative tolerance of 0.001) was used to solve the
differential equations. The simulation results for the
(a) Surge (b) Sway open-loop simulation are shown. As shown in Fig. 5, it is
observed that the ROV is unable to achieve the desired
positions despite the roll and pitch response are small and
stable. Hence, a controller is required to achieve the desired
positions.

3 Virtual reality model of ROV


A general ROV simulator has been developed in
(c) Heave (d) Roll MATLABTM andSimulinkTM environment. This model
includes the nonlinear model of an ROV with six DoF
motion, propulsion system and disturbance model. In order
to enhance the user interface and improve understanding of
the proposed controller approach, a realistic virtual
underwater world environment was developed. A 3D
animation of the ROV simulation called virtual reality
world (see Fig. 6) was developed using the output signals
from the open-loop model in Fig. 4. This allows the
(e) Pitch (f) Yaw movement and position data to be animated and displayed
Fig. 5 Open-loop simulation results for surge, sway, heave, during the dynamic positioning. To achieve that, a virtual
roll, pitch and yaw
Journalof Marine Science and Application (2015) 14: 14-24 19

reality modelling language (VRML) was used to create the As shown in Fig. 8, the VRML editor has hierarchical
virtual reality for the ROV during the inspection tasks. tree style showing all elements in the virtual world. These
The different stages of 3D animation building process are structure elements are known as nodes. The tree allows
shown in Fig. 7. The CAD model is exported into VRML changing and modifying of the virtual world and allows
file format that allows the V-Realm editor to edit the VRML changing viewpoints to improve the view of the virtual
model of ROV. The V-Realm builder has an extensive object reality world. Necessary lighting and proper coordinate
library where the user can import the 3D background system could also add to make the background and ROV
sceneries and objects to create a virtual world. The more realistic.
backgrounds such as the ocean and offshore structures are After creating the virtual world using V-Realm editor, the
then imported from the VRML editor library. Next, VR-sink SimulinkTM model of the ROV is connected to the virtual
block provided by the 3D animation toolbox in SimulinkTM world through VR- Sink block. By connecting the model to
create the connection between VRML model and the virtual world, the output data form the SimulinkTM
SimulinkTM block diagrams. This enables the visualisation model can be used to control and animate the virtual world
of ROV movement using the output position data (such as as shown in Fig. 9. The sample time for each ROV steps
surge, sway, heave and yaw or even roll and pitch) from was set to 0.1 s. The translational ROV’s motion outputs
SimulinkTM. This allows the translational motion (surge, and the rotational motion outputswere configured to animate
sway and heave) and angular motion (roll, pitch and yaw) of the position of the ROV in the virtual reality world. Fig. 9
the ROV to be displayed and simulated in the 3D shows the final virtual reality animation of the ROV
environment as shown in Fig. 6. together with the block diagram.

Fig. 6 Virtual reality world of ROV during dynamic positioning Fig. 7 Process of virtual reality animation of ROV

Fig. 8 V-Realm builder screenshot Fig. 9 Virtual reality animation of ROV

4 Fuzzy logic controller (FLC) design for ROV defuzzification. Fuzzification process translates the system
inputs from real domain into the fuzzy domain in the form
With the virtual reality established, the control system of linguistic variables. The linguistic variables range from 0
design needs to be performed. The fuzzy logic was used to to 1. Control rules are set based on the designers experience
control the dynamic positioning of the ROV (see Fig. 10). and the control tasks are performed using these rules. The
Unlike the conventional controllers which use the control inference outputs are decoded back into the real domain by
algorithms, described by algebraic or differential equations, the defuzzifier. The controller can be fine-tuned to achieve
FLC requires less mathematical model. There are two types the required task. The typical FLC can be seen in the block
of fuzzy inference techniques called Mamdani and Sugeno. diagram in Fig. 10.
In this paper, the Sugeno method is used. It uses a It is possible to develop the FLC either using
mathematical function of the input variable unlike Mamdani, MATLABTM command line or the Fuzzy Logic Toolbox. In
which uses a rule fuzzy set. The Sugeno method can be this project, Fuzzy Logic Toolbox was used. The Graphical
quite computationally effective and widely used in most User Interface (GUI), provided by the FLC toolbox, is user
control problems. There are three basic steps to develop a friendly platform for the design. The membership function
FLC are namely: fuzzification, inference rules and editor and the rule editor, provided by the toolbox, enables
20 Midhin Das Thekkedan, et al. Virtual Reality Simulation of Fuzzy-logic Control during Underwater Dynamic Positioning

to build, edit and observe the fuzzy inference system. The are, e (error) = {Negative Big (NB), Negative Medium
membership functions need to be qualitatively (the type of (NM), Negative Small (NS), Zero (Z), Positive Small (PS),
function) and quantitatively (give proper values to the Positive Medium (PM), and Positive Big (PB)}. Each term
parameters of membership function) defined before the has a semantic rule that is associated to a membership
fuzzification process. The Sugeno type fuzzy inference function. After creating the membership functions for the e
system has two linguistic input variables. They are error (e), and e , Output membership functions are defined for the
the error between desired and actual value, and change of control voltage to the thruster.
error ( e ). The set of linguistic terms associated with error (e)

Fig. 10 Block diagram of FLC for Falcon ROV

The key fact about the fuzzy decision making system is gravity method was used to obtain crisp values of the output
that all the inputs and outputs should be in fuzzy terms, to from the reference output fuzzy sets. The linguistic output
be used in fuzzy environment. Fuzzification is used to variable is the voltage applied to the thrusters. The output
change all the parameter into fuzzy terms. In this example, membership functions have seven singleton functions
the input membership functions have trapezoidal and asshown in Fig. 14.
triangular shape. PL and NL are the saturation limits
imposed on the fuzzy logic controller (FLC). The input
membership function for error (e) is shown in Fig. 11.
As shown in Fig. 11, when there is an error equals to 0.3,
it will be transformed into fuzzy domain in the form of
linguistic variable, according to the membership function.
The term Z has a membership degree of 0.1; PS has a
membership degree of 0.82, and all other terms have
membership degree equal to zero. The fuzzy inference
operation is then carried out using the pre-set, forty-nine
rules consisting of If-Then statements. These statements can
Fig. 11 Input membership function for error function
be edited using rule editor provided by the toolbox. The
rules can be connected either by ‘OR’ Boolean operation or
by ‘AND’ Boolean operation. In this paper, the rules are
connected by ‘AND’, which expresses the lesser value
between the membership functions of both the inputs. The
‘THEN’ operator stores the results of the previous operation
in the output term. The result of the FLC will be the union
of all the output terms. The forty-nine rules defining the
control action can be edited using the rule editor as shown
in Fig. 12.
The Sugeno control surface can be plotted in 3D to
visualise the output for each input. The control surface is Fig. 12 Rule editor of FLC toolbox
plotted using the MATLABTM plot command by exporting
the values to the MATLABTM workspace. It is clear from the
plot (see Fig. 13) that the control surface can be
approximatedby a linear surface.
Lastly, the defuzzification is the process of converting
fuzzy variables to crisp values, because the output linguistic
terms and output membership degrees cannot be directly
used to govern the action of thrusters to position the ROV.
So the controller output must be defuzzified. The centre of Fig. 13 Sugeno control surface
Journalof Marine Science and Application (2015) 14: 14-24 21

Big). The centre of gravity method is used to calculate the


centre of the area formed by the sum of all the output terms
of the fuzzy controller. The following formula was used to
convert the fuzzy variables to crisp values.The input and
output fuzzy variables, inference system, fuzzifier and
Fig. 14 Output membership function defuzzifier can be defined by setting the parameters in
The linguistic variables are NB (Negative Big), NM MATLABTM GUI for FLC. The FLC is finally connected to
(Negative Medium), NS (Negative Small), Z (Zero), PS the ROV model as seen in Fig. 15.
(Positive Small), PM (Positive Medium) and PB (Positive

Fig. 15 Simulation block diagram of FLC

(a) Surge (b) Sway

Fig. 17 Desired and actual trajectory for FLC


The virtual reality sink block was introduced into the
SimulinkTM block diagram to facilitate the 3D animation.
This enables the user to visualise the dynamic positioning of
the ROV in virtual reality environment. To evaluate the
(c) Heave (d) Roll performance of the controller, desired inputs for six DOF of
the ROV was given into the system. The following inputs
were used: xd = yd =3 m, zd = 2 m, ψd = 2 rad. The current
velocity was chosen to be 0.02 m/s with the angle of attack
of 45°. The FLC was designed for the dynamic positioning
of ROV under external disturbance such as ocean current.
The performance of the controller was satisfactory. As seen
in Fig. 16, itindicates that the sway motion takes more time
(e) Pitch (f) Yaw
to reach the desired input value (that is 3 m) than the surge.
Fig. 16 Simulation results using FLC
It may be due to the larger surface area of the ROV (in sway
22 Midhin Das Thekkedan, et al. Virtual Reality Simulation of Fuzzy-logic Control during Underwater Dynamic Positioning

direction) that it had to overcome.In less than 1 000 s, the SimulinkTM. The GUI enables user to input values into the
ROV reached the desired position and the angular motions five thrusters (four horizontal and one vertical) in order to
(that is the roll, pitch, and yaw) converge to zero. The simulate the thruster force during the open loop simulation.
desired trajectory and the actual trajectory of the ROV are Here ‘HT’ is the horizontal thruster and ‘VT’ is the vertical
depicted in Fig. 17. thruster. Once the open loop simulation push button is
pressed, the user can visualise the ROV movement in the
5 Graphical user interface for dynamic positioning virtual reality environment. This 3D real time simulation of
the ROV will provide a better understanding of the ROV
In order to improve the ROV’s performance, the design dynamics and dynamic positioning performance of the
of a suitable user-interface represents an important factor. controllers. As mentioned, the GUI toolbox enables the user
For this reason, the GUI is used to improve the system to analyse the performances of different controllers during
autonomy such that the user effort decreases. In this section, the dynamic positioning of the ROV. The user can select
the GUI using MATLABTM GUIDE is used to analyse the either controller from FLC, SMC or PID controller.
results and display the performance of different controllers The closed-loop simulation of ROV is performed after
such as PID and SMC. The MATLABTM GUIDE is a the user defines the inputs for the six DOF (surge, sway,
commercially applicable dynamic positioning interactive heave, roll, pitch and yaw) values. As different controllers
tool that is widely available in most academic institutions. can be chosen, each controller stabilises the ROV to its final
The dynamic model of Falcon was created in SimulinkTM position. The results are reflected on the GUI screenas
environment, and three controllers such as PID, SMC and shown in Fig. 18. The simulated 3D trajectories of all the
FLC were simulated and compared in the GUIDE platform. three controllers are shown in Fig. 19. For consistency, the
This interactive interface enables the user to input the ROV was assumed to start from origin. The plot shows the
desired values to the system and to observe the effects of position performance of each controller. The performances
different controllers on the ROV responses during different of all the three controllers are considered in each DOF
ocean current speed and direction, without much separately and the comparisons of the position responses are
programming. The GUIDE provides easier interaction performed. It is clear from Fig. 20 that the PID controller
between graphical interface and the model as well as the reached surge position, xd = 3 m before FLC and SMC. In
functions to simplify the standard dialog boxes. The current this case, the PID controller took approximately 200 s and
velocity should range from 0.01 m/s to 0.2 m/s and the while FLC and SMC took longer time to settle to its
direction (angle of attack of current) must be able to vary steady-state surge position. For the sway response in Fig. 21,
from 0 to 360 degree. Besides, it will create an option to SMC has a shorter settling time as compared to other two
choose different controllers and desired values for the ROV. controllers. As observed in Fig. 22, there is some different
The GUI was designed in such a way that to make it user in the settling time for the case of the heave motion.
friendly as well as to meet the above-mentioned objectives. However, both the roll and pitch response were
The required components for the GUI, such as slider, list self-stabilizing without any control action. The yaw
box, textbox and graphs were taken from the toolbox to the response (as seen in Fig. 23) shows satisfactory
GUI layout. The interfacing of SimulinkTM model must be performance in particular, the FLC performs slightly better
done in the GUI programming using m-file editor. Fig. 18 than the PID and SMC. As observed from all the position
shows the final GUI of the dynamic positioning interface responses, the steady-state values are achieved.
and its 3D virtual reality visualisation of the ROV. From the results obtained, it is clear that the SMC
performs better than the FLC and PID controllers. However,
each controller has its own advantages and disadvantages.
For example, SMC has shown good dynamic positioning
performance and rejection of external disturbances, but it
has a more complex mathematical stricture and achattering
phenomenon (due to the fast switching around the sliding
surface). On the other hand, PID controller possesses the
simplest structure of all but it is not as robust as compared
to the SMC when subjected to the disturbance. The FLC
does not require a ROV model that gives a simple structure
as compared to SMC. However, the response of the SMC is
Fig. 18 Final GUI and virtual reality visualisation of ROV
quite noisy due to its switchingor chattering action. In
Since the major external disturbance acting on a ROV summary, the position responses of all controllers were
system is the ocean current force, it is included in the simulated and compared on the ROV under the current
simulation. The velocity of the current as well as the angle disturbances in the proposed virtual reality simulation
of attack can be adjusted by the user (see Fig. 18). The platform.
thruster dynamics described earlier is modelled in
Journalof Marine Science and Application (2015) 14: 14-24 23

6 Conclusions
The building of GUI software for simulation and control
of a ROV using MATLABTM GUI Designing Environment
was proposed. The interactive GUI program allows the user
to animate different disturbance characteristics and the types
of controllers used. Besides, the closed loop control system
design using fuzzy-logic based was designed to achieve
dynamic positioning of the ROV model. The simulation
results of the ROV showed that it was able to perform the
Fig. 19 Performance comparison of three controllers dynamic positioning. When the FLC was compared with
other controllers such as PID and SMC, the simulated
results give reasonable performance under the current
disturbance.
In summary, the three-dimensional (3D) animation has
wide commercial application such as in pilot training. The
ROV motion can be visualised from different points by
setting different viewpoints, and more realistic visualisation
is possible by making the background more realistic.
Though the dynamic positioning tool was designed
particularly for the Falcon ROV, it can be extended to any
Fig. 20 Surge response for controllers other ROV, by changing the hydrodynamic parameters in
the dynamic model.
For future works, the 3D animation developed using the
VRML model will equip with collision detection during
maneuvering. Besides, the proposed dynamic positioning
interactive tool will include more controllers for
comparisons and the tether dynamics.

Acknowledgement
The author would like to express his thanks to the
Fig. 21 Sway response for controllers Newcastle University, for providing the software and
support during the project.

References
Akkizidis IS, Roberts GN, Ridao P, Batlle J (2007). Designing a
fuzzy-like PD controller for an underwater robot. Control
Engineering Practice, 11(4), 471-480.
DOI: 10.1016/S0967-0661(02)00055-2
Caccia M, Indiveri G, Veruggio G (2000). Modeling and
identification of open-frame variable configuration underwater
vehicles. IEEE Journal of Ocean Engineering, 25(2), 227-240.
DOI: 10.1109/48.838986
Fig. 22 Heave response for controllers
Chin CS, Lau MWS (2012). Modeling and testing of
hydrodynamic damping model for a complex-shaped
remotely-operated vehicle for control. Journal of Marine
Science and Application, 11(2), 150-163.
DOI: 10.1007/s11804-012-1117-2
Chin CS, Lau MWS, Low E (2011). Supervisory cascaded
controllers design: Experiment test on a remotely-operated
vehicle. Proceedings of the Institution of Mechanical Engineers,
Part C: Journal of Mechanical Engineering Science, 225(3),
584-603.
DOI: 10.1243/09544062jmes2223
Chin CS, Lau MWS, Low E, Seet G (2008). Robust and decoupled
Fig. 23 Yaw response for controllers cascaded control system of underwater robotic vehicle for
stabilization and pipeline tracking. Proceedings of the
24 Midhin Das Thekkedan, et al. Virtual Reality Simulation of Fuzzy-logic Control during Underwater Dynamic Positioning

Institution of Mechanical Engineers, Part I: Journal of Systems Ollennu AT, White BA (1996). Non-linear robust control designs
and Control Engineering, 222(4), 261-278. for a remotely operated underwater vehicle depth control
DOI: 10.1243/09596518jsce555 system. Proceedings of the Institution of Mechanical Engineers,
Chin CS, Lau MWS, Low E, Seet GG (2006). Robust controller Part I: Journal of Systems and Control Engineering, 210(3),
design method and stability analysis of an underactuated 201-214.
underwater vehicle. International Journal of Applied DOI: 10.1243/PIME_PROC_1996_210_455_02
Mathematics and Computer Science, 16(3), 101-112. Raimondi FM, Melluso M (2010). Fuzzy/Kalman hierarchical
Chin CS, Lum SH (2011). Rapid modeling and control systems horizontal motion control of underactuated ROVs.
prototyping of a marine robotic vehicle with model International Journal of Advanced Robotic Systems, 7(2),
uncertainties using xPC Target system. Ocean Engineering, 139-154.
38(17-18), 2128-2141. DOI: 10.5772/9697
DOI: 10.1016/j.oceaneng.2011.09.035 Si JT, Chin CS (2014). An adaptable walking-skid for seabed ROV
Corradini ML, Monteriu A, Orlando G (2011). An actuator failure under strong current disturbance. Journal of Marine Science
tolerant control scheme for an underwater remotely operated and Application, 13(3), 305-314.
vehicle. IEEE Transactions on Control Systems Technology, DOI: 10.1007/s11804-014-1261-y
19(5), 1036-1046. Smallwood DA, Whitcomb LL (2001). Toward model based
DOI: 10.1109/TCST.2010.2060199 trajectory tracking of underwater robotic vehicles: Theory and
Fossen TI (1994). Guidance and control of ocean vehicles. 2nd simulation. The 12th International Symposium on Unmanned
edition, John Wiley and Sons Ltd., , New York, 5-55. Untethered Submersible Technology, New Hampshire, USA,
Gracanin D, Valavanis KP, Tsourveloudis NC, Matijasevic M 1-13.
(1999). Virtual-environment-based navigation and control of DOI: 10.1.1.15.958
underwater vehicles. IEEE Robotics & Automation Magazine, Souza D, Maruyama EC (2007). Intelligent UUVs: Some issues on
6(2), 53-63. rov dynamic positioning. IEEE Transactions on Aerospace and
DOI: 10.1109/100.774928 Electronic Systems, 43(1), 214-226.
Guo J, Chiu FC, Huang CC (2003). Design of a sliding mode fuzzy DOI: 10.1109/TAES.2007.357128
controller for the guidance and control of an autonomous Soylu S, Buckham BJ, Podhorodeski RP (2010). Dynamics and
underwater vehicle. Ocean Engineering, 30, 2137-2155. control of tethered underwater-manipulator systems. 2010 The
DOI: 10.1016/S0029-8018(03)00048-9 OCEANS Conference , Seattle, USA, 1-8.
Ishaque K, Abdullah SS, Ayob SM, Salam Z (2011). A simplified DOI: 10.1109/OCEANS.2010.5664366
approach to design fuzzy logic controller for an underwater Sun B, Zhu D, Yang SX (2014a). A bio-inspired cascaded tracking
vehicle. Ocean Engineering, 38(1), 271-284. control of 7000m manned submarine vehicle. IEEE
DOI: 10.1016/j.oceaneng.2010.10.017 Transactions on Industrial Electronics, 61(7), 3682-3693.
Juan PJA, Décio CD, Julio CA (2013). Experimental model DOI: 10.1109/TIE.2013.2267698
identification of open-frame underwater vehicles. Ocean Sun B, Zhu D, Jiang L, Yang SX (2014b). A novel fuzzy control
Engineering, 60, 81-94. algorithm for three-dimensional AUV path planning based on
DOI: 10.1016/j.oceaneng.2012.10.007 sonar model. Journal of Intelligent & Fuzzy Systems, 26(6),
Juan PJA, Julio CA (2011). Experimental evaluation of the 2913-2926.
hydrodynamic coefficients of a ROV through Morison’s DOI: 10.3233/IFS-130957
equation. Ocean Engineering, 38(17-18), 2162-2170. Yuh J (2000). Design and control of autonomous underwater
DOI: 10.1016/j.oceaneng.2011.09.032 robots: A survey. Autonomous Robots, 8(1), 7-24.
Li JH, Jun BH, Lee PM, Hong SW (2005). A hierarchical real-time DOI: 10.1023/A:1008984701078
control architecture for a semi-autonomous underwater vehicle. Zadeh LA (1965). Fuzzy sets. Information and Control, 8(3),
Ocean Engineering, 32(13), 1631-1641. 338-353.
DOI: 10.1016/j.oceaneng.2004.12.003

You might also like