417
1 INTRODUCTION
The everincreasing modern technologies often
demand a promising solution of highly demanding
controlproblems.Althoughconventionalapproaches
are proposed for many control problems, however
thesuccessfulapplicationscanonlybefoundwithin
wellconstrained environment. Therefore, numerous
advancements have been made in developing
intelligent systems like artificial neural network
(ANN). ANN consists of several interconnected
simplenonlinearsystemtha
taretypicallymodelled
bythetransferfunction.Therefore,ANNissuitable
enough for system without clear and known
structure.Regardingthepotentialofneuralnetwork
forlearningcomplicatedbehaviourofanynonlinear
multiinput multioutput system, researchers from
several disciplines are now designing the ANN to
solve different problems in pa
ttern recognition,
prediction, optimisation, associative memory or
control. Yamato et al. (1990) was the first who
considered the application of ANN as a controller
andheuseditforautomaticshipberthing.Lateron,
Fujii and Ura (1991) confirmed the effectiveness of
ANNasacont
rollerusingbothsupervisedandnon
supervised learning system for autonomous
underwatervehicles(AUVs).ANNwasalsotriedas
a controller in different controlling aspects like
temperature control, wastewater treatment control,
engine air/fuel ratio control, process control, etc.
Regarding ship berthing, after Ya
mato, Hasegawa
andKitera(1993)andImandHasegawa(2001,2002)
had continued the research. Hasegawa and Kitera
proposedANNcombinedwiththeexpertsystemto
assist ANN, while Im and Hasegawa proposed
separate controller instead of a centralised one for
command rudder and propeller revolution output
respectively. Both proposals played a vita
l role
Consistently Trained Artificial Neural Network for
Automatic Ship Berthing Control
Y.A.Ahmed&K.Hasegawa
OsakaUniversity,Osaka,Japan
ABSTRACT:Inthispaper,consistentlytrainedArtificialNeuralNetworkcontrollerforautomaticshipberthing
is discussed. Minimum time course changing manoeuvre is utilised to ensure such consistency and a new
concept named ‘virtual window’ is introduced. Such consistent teaching data are then used to train two
separate multilayered feed forwardneural networks for comma
nd rudder andpropeller revolution output.
After proper training, several known and unknown conditions are tested to judge the effectiveness of the
proposedcontrollerusingMonteCarlosimulations.Aftergettingacceptablepercentagesofsuccess,thetrained
networksareimplementedforthefreerunningexperimentsystemtojudgethenetwork’srealti
meresponsefor
EssoOsaka3mmodelship.Thenetwork’sbehaviourduringsuchexperimentsisalsoinvestigatedforpossible
effectofinitialconditionsaswellaswinddisturbances.Moreover,sincethefinalgoalpointoftheproposed
controller is set at some distance from the act
ual pier to ensure safety, therefore a study on automatic tug
assistanceisalsodiscussedforthefinalalignmentoftheshipwithactualpier.
http://www.transnav.eu
the International Journal
on Marine Navigation
and Safety of Sea Transportation
Volume 9
Number 3
September 2015
DOI:10.12716/1001.09.03.15
418
individuallyforfurtherdevelopmentofthisresearch.
However, the teaching data used for these research
studieswerenotconsistent,i.e.notinsimilarpattern.
Asaresult,inthepresenceofwinddisturbances,the
ANNoftenfailedtoguidetheship.
Ontheotherside,Ohtsu et al.(2007)proposed
a
newminimumtimeshipmanoeuvringmethodusing
nonlinear programming. The method is used to
createteachingdataconsistentandaconceptnamed
‘virtual window’ is proposed by Ahmed and
Hasegawa (2013a). Such window consists of
gradually changing ship’s positionas well asship’s
heading. To ensure minimum time manoeuvre,
a
shipwithitsinitialheadingisexpectedtostartfrom
a desired starting point of that window. Then by
taking the calculated rudder as proposed by the
optimalmethod,itisguaranteedforeachship with
different heading to reach the socalled imaginary
line. Such line is usually imagined
by most ship
operators during the berthing manoeuvre to ensure
safeguidanceoftheirships.Forthefirsttime,Koseet
al. (1986) mentioned about such strategy when he
analysedthemanoeuvringofshipsinharbours.This
imaginary line servesas a goal during optimisation
andactsasareference
lineforfurtherdescent.Inthis
research, four of such virtual windows are
constructedforminimumtimecoursechanging.Each
window has its limitation of maximum usage of
rudderangleusedasnonequalityconstraintduring
optimisation.Followingtheimaginaryline,shipwill
drop propeller revolution according to speed
response equation
and stop at the end of it.
Considering the effect of wind disturbances during
slowspeedrunningalongtheimaginaryline,inthis
research a modified version of PD controller is
chosentodealwithit.Suchcontrollercancorrectnot
only ship’s heading, but also the distance between
the
ship’s CG (centre of gravity) and the imaginary
line.Finally,bycombining thecoursechangingand
trackkeepingtrajectories,acompletesetofconsistent
teaching data are created. Using the set of teaching
data, two multilayered feed forward neural
networksaretrainedfortheminimummeansquared
error(MSE)value.
Severalsimulationsarethendone
tojudgetheeffectivenessofthetrainedcontrollerfor
windupto1.5m/sforanEssoOsakamodelshipthat
wouldbe15m/sforfull scaleconsideringthesame
Froude number. To analyse the success of the
proposed controller, Monte Carlo simulations are
alsoperformed.
Although neural network is becoming widely
used in complex control problems, however the
effectivenessofsuchcontrollercannotbejudgedonly
bydoingsimulations.Manyunknownsituationsmay
arisewhichcannotbesimulatedwellbeforetojudge
the behaviour of controller. The first attempt to
perform automatic ship berthing
experiment using
ANNwasmadebyNakataandHasegawa(2003)but
unfortunately the success rate was very low due to
improper training. Considering this fact and to
demonstrate the virtual window concept, the
consistently trained neural networks are then
implementedforthefreerunningexperimentsystem
to perform automatic ship
berthing experiment.
Initially, a few experiment results are published by
Ahmed and Hasegawa (2013b) in a scattered way.
Later on, more experiments are done in different
unknownsituationsandgathereddependingonthe
network’s behaviour. This paper contains such
interestingexperimentresultsthatwillalsofocuson
how the ANN behaves
in different situations. To
understand the possible causes of network’s
behaviour, the effect of initial conditions and wind
disturbancesarethentriedtodiscuss.Moreover,the
goal point of the proposed controller is set at 1.5L
distance from actual pier. Therefore, to execute the
crabbingmotionasalaststage
ofberthingoperation,
automaticsidethrustersarealsointroduced.
2 MODELSHIPANDMATHEMATICALMODELS
2.1 ModelShip
Inthisresearch,amongthedifferenttypesofmodel
available, ‘Esso Osaka’ 3m model is chosen. The
mainreasonofchoosingthismodelistheavailability
oflargeamountsofcaptivemodel
testresultsaswell
as a physical model itself. Its details are given in
Table1.
Table1.Principalparticularsofmodel
______________________________________________
HullPropellerRudder
______________________________________________
L(m) 3.0Dp(m) 0.084 b(m) 0.0830
B(m) 0.48 P*(m) 0.06 h(m) 0.1279
D(m) 0.20 Z5.0A
R(m
2
) 0.0106
C
b 0.831  P_ratio 0.7151Λ 1.5390
______________________________________________
*Pitch
Here, the Esso Osaka ship model used for
berthingexperimentismadeofFRP(fibrereinforced
plastic)andscaledas1:108.33.
2.2 Mathematicalmodels
Inthisresearch,amodifiedversionofmathematical
model based on manoeuvring mathematical group
(MMG) is used todescribe the ship hydrodynamics
inthreedegreesof freedoms.
ThisMMGmodel can
predict both forward and astern motion of ship for
anyparticularrudderangleandpropellerrevolution.
ThecorrespondingequationsofmotionsattheCGof
theshipareexpressedintheEquation1.
()()
()()
()
x
yHPRW
yxHPRW
ZZ ZZ H P R W
mmu mmvr X X X X
mmv mmurY Y Y Y
I JrNNNN



(1)
where, X
H, YH, NH are hydrodynamic forces and
moment acting on a hull, X
R, YR, NR are
hydrodynamicforcesandmomentduetorudder,X
P,
Y
P,NParehydrodynamicforcesandmomentdueto
propeller and X
W, YW, NW are hydrodynamic forces
and moment due to wind. Details of such
mathematicalmodelcan be found inthe 23rd ITTC
meetingreportonEssoOsaka.
Toconsiderthewinddisturbances,Fujiwarawind
model(1998)isadoptedandinsteadofsteadywind,
gustwindisconsidered.
419
3 TEACHINGDATACREATION&TRAININGOF
ANN
3.1 BerthingPlanandExecution
In this research, similar to aircraft landing, the
berthingmanoeuvreisplanned tomake firstcourse
changing from any given initial heading to a final
desired ship heading. This final heading with no
swayspeedandangular
velocitywillaligntheship
to a reference line known as imaginary line. To
imagine such reference line during berthing
operationisusuallyacommonpracticeformostship
operators. After merging to this line, the ship will
keep its path and drop its speed according to the
speed response
equation as proposed by Endo and
Hasegawa(2003).Inthisresearch,theimaginaryline
is assumed 15L of length according to the IMO
standard.Theberthinggoalpointisalsoconsidered
atadistanceof1.5Lfromtheactualpierasproposed
byKoseetal.(1986)toensuresafety.Figure
1shows
the details of the coordinate system used in this
researchtogetherwithothervaluableinformation.
Figure1.Coordinatesystemandotherassumptionsduring
berthing
3.1.1 VirtualWindowConceptforCourseChanging
Maintaining consistency in the course changing
trajectorieswhiletrainingneuralnetwork,wouldbe
a key factor to increase the robustness of the
controller. In this research, nonlinear programming
(NLP) method for minimum time course changing
manoeuvreisutilisedtodoso.Then,consideringthe
repeated optimisation techniques as explained by
Ahmed and Hasegawa (2013a), several course
changing trajectories are constructed for ship’s
different initial heading and one particular final
heading which is 240º with no sway and angular
velocity.Here,thefinalheading240ºmeansmaking
anangle30ºwiththepieri.e.the
shipwillalignwith
theimaginarylineaftercoursechanging.
Figure2.Ideaofvirtualwindow
Duringtheoptimisationprocess,thetimeissetas
objective function and rudder angle as optimal
variable.Moreover,fourdifferentrudderangles±10º,
±15º, ±20º and ±25º are used as nonequality
constraints. The repeated optimisation technique
used in this research is to generate the course
changing trajectories by altering only
the initial
heading and keeping the same starting point.
Therefore,theplotofconsecutivetrajectorieswould
be the same as shown in Figure 2 (a), i.e., each
trajectory ends with a different endpoint. However,
by following the reshuffling process as shown in
Figure2(b),itispossibletoalign
thetrajectoriesfora
particular endpoint that will coincide with the
imaginary line. Such reshuffling process results a
new set of starting points, each belongs to a
particular ship heading and itispossible to draw a
curvature through such points. Such curvature is
named as ‘virtual window’. In this research,
four
differentwindowsareconstructed,eachresultdueto
the constraint rudder angle used during the
optimisationtechnique.
3.1.2 TrackKeepingusingPDController
After making a proper course change using the
calculated command rudder for minimum time
manoeuvre,theshipisexpectedtogostraightifthere
wouldno
winddisturbances.However,inrealcases
such disturbances exist. Therefore, after merging to
the imaginary line while reducing the speed
gradually, slight wind may cause drastic course
changes if no action is taken to compensate such
disturbances. Considering the difficulties in
maintaining the course, especially in low speed
underenvironmentaldisturbances,
inthisresearchas
afeedbackcontrollerPDisusedwhichismentioned
in the Equation 2. The coefficients used for the
controlleraretunedonatrialbasistoensureearlier
responseofthecontrollerinanyslightdisturbances.
1321
**)(* dCCC
dorder
00
00
00
10,0
0,0
10,0
orderorder
orderorder
orderorder
if
(2)
where, ψ
d is desired heading, ψ is current heading,
isyawrate,d1isadeviationfromtheimaginary
line,C
1~C3arecoefficients.
Maintaining a proper telegraph order is also
important to stop the ship within an available
420
distance.Thesequenceoftelegraphmaintainedhere
is half ahead during course changing, then it is
followed by show ahead, dead slow ahead, engine
idling and at last propeller reversing. To judge the
propertimingoftelegraph order without damaging
theengineandpropellershaft,atimeconstantTpis
usedwhichismentionedinEquation3.
()
() ()
PP
dU t
TUtKnt
dt

(3)
where, U(t) is ship velocity, n(t) is propeller
revolution,T
pistimeconstantandKpisgain.
3.2 TeachingDataCreationandTrainingofANN
Combining the course changing and track keeping
trajectoriesalongtheimaginaryline,thewholesetof
teachingdataiscreated.Inordertoincludethewind
effectinteachingdata,eachsuccessfulshipberthing
trajectory is considered under three different
wind
velocities which are 0.2m/s, 0.6m/s and 1.0 m/s for
model ship. Each velocity is again considered for
fourdifferentwinddirectionsthatare45º,135º,225º
and 315º. Therefore, instead of using the wind
informationdirectlyasinputneuron,theinfluenceof
wind is considered in a way of somewhat
deviated
ship trajectories andat the same time using thePD
controllertocorrectthemduringlowspeedrunning.
The resulting set of teaching data considering the
windeffectisgiveninFigure3.
0 5 10 15 20
-2
0
2
4
6
8
10
12
14
16
Y/L position [-]
X/L position [-]
Figure3.Teachingdataincludingwindinfluence
The above mentioned teaching data are then
dividedforlefthandside(LHS)andrighthandside
(RHS) approach to ensure similar course changing
pattern (port or starboard). Using these two sets of
teachingdata,twomultilayeredfeedforwardneural
networks are constructed using Lavenberg
Marquardtalgorithmastrainingfunction
andmean
squared error (MSE) as an evaluation function for
eachcase. Figure 4 showsthe constructed networks
for command rudder and propeller revolution
output. The number of neurons used in the hidden
layers for LHS approach is (10, 6) for command
rudder and (12, 8) for propeller revolution output.
ForRHSapproach,thisnumberwouldbe(12,5)for
commandrudderand(12,8)forpropellerrevolution
output.
Considering Figure 4, input parameters for
command rudder output are u: surge velocity, v:
sway velocity, r: yaw rate, ψ: heading angle, (x, y):
ship’sposition,δ:actualrudder
angle,d1:distanceto
imaginarylineandd2:distancetoberthingpoint.For
propeller revolution, input parameters are u: surge
velocity,ψ:headingangle,(x,y):ship’sposition,d1:
distance to imaginary line and d2: distance to
berthingpoint.
Figure4.Teachingdataincludingwindinfluence
Inthisresearch,theANNcontrollerforrudderis
used only during course changing. Then, it will be
followed up by the PD controller for low speed
straightrunning.Here,thedecisivefactortoalterthe
ANN for PD controller is ship’s position. Once the
PD controller is activated, the rest
of the task
regardingtheruddercontrollerissolelydetermined
by the PD controller itself. On the other hand, the
ANN controller for propeller revolution is used
throughoutthewholeberthingprocess.Therefore,it
would be a combined effort of both ANN and PD
controller while considering the wind disturbances.
Figure5showsthecontrolstrategyduringthewhole
berthingprocess.
Figure5.ControlStrategy
4 SIMULATIONRESULTS
As a next step after successful training of ANNs,
several simulations are done by Ahmed and
Hasegawa (2013a) where the ship starts from its
desiredvirtualwindowpointeitherusedasteaching
dataornonteachingdata.However,theship,staring
from any arbitrary point within the constructed
PD
controllerfor
421
virtualwindowareaisnotyetconsidered.Suchcases
arestudiedinthefollowingsubsection.
4.1 BerthingSimulationsforarbitraryStaringPoint
Several combinations of ship’s initial heading and
startingpointarepossibletojudgetherobustnessof
the proposed controller. Figure 6 illustrates one of
suchresults.
0 5 10 15 20 25
0
5
10
15
X/L position [-]
Y/L position [-]
0 100 200 300 400 500
-10
0
10
20
Time [s]
Rps
0 100 200 300 400 500
-20
0
20
Rudder [deg]
0 100 200 300 400 500
-20
0
20
Rudder [deg]
0 100 200 300 400 500
-20
0
20
Rudder [deg]
Time [s]
(I)
(III)
(I)
(II)
(III)
(II)
(I)
Psi
ship
=200
0
(III)
(II)
(III)
Psi
ship
=160
0
(I)
Psi
ship
=180
0
(II)
Figure6.Shipwithdifferentheadingandsameinitialpoint
Here, the ship starting with initial heading 160º,
180º and 200º respectively is tested for the same
starting point. In case of initial heading 160º as
shown in the first row of Figure 6, the ANN first
decides to take a port turn. Later on, it starts its
expected starboard turn,
but very gradually.
Therefore, the ship follows a long way of course
changing and there exists a large gap between the
shipandtheimaginaryline.Thisis aquietunusual
phenomenon and may sometimes occur due to
starting from unexpected point. However, the PD
controllerworkseffectivelytominimise
suchexisting
gapandatlast,theshipsuccessfullystopswithinthe
expected zone. For the other two cases, the ANN
controller takes proper decision and after a slight
portturn,theshipstartsitsexpectedstarboardturn.
Therefore,ittakesashorterpathtotravelaswellas
lesstime
tocompletetheberthingprocess.Thewind
disturbances considered in all three cases are the
same,whichisaveragewindvelocityof1.5m/sfrom
315ºwinddirection.
0 50 100 150 200 250
-10
0
10
20
Time [ s]
Rps
0 50 100 150 200 250
-20
0
20
Rudder [deg]
0 50 100 150 200 250
-20
0
20
Rudder [deg]
0 50 100 150 200 250
-20
0
20
Time[s ]
Rudder [deg]
0 5 10 15 20 25
0
5
10
15
X/L position [-]
Y/L position [-]
(I)
(II)
(I)
(II)
(III)
(II)
(I)
(III)
Psi
ship
=280
0
(III)
Figure7.Shipwithsameheadinganddifferentinitialpoint
Figure7illustratesthesimulationresultsforship
startingwiththesameinitialheading,butfromthree
different arbitrary points. In all three cases, the
controller takes different decisions based on
surrounding situation and succeeded to guide the
ship up to the expected safety zone. The PD
controller gradually corrects the
error regarding
ship’s position and heading after course changing
during low speed running as mentioned before. In
case 1, the controller also increases the propeller
revolution during idling stage that is similar to
boostingaction.Thewinddisturbancesconsideredin
all three cases arethe same, whichis average wind
velocityof1.5m/sfrom180ºwinddirection.
4.2 MonteCarloSimulations
In any closed loop system, it is very important to
provethestabilityinorder toguaranteethesuccess
of the controller. In this research, to analyse the
stabilityofthesystem, Monte Carlo simulations are
performed. To generate
the random numbers,
uniformly distributed pseudorandom numbers are
chosen. Such random numbers are generated for
ship’s staring points, headings, average wind
velocitiesandangles.Then970casesareinvestigated
whichcoversallvirtualwindowareas.
As a success index, three parameters are
considered.Theseparametersaresufficienttoknow
the
successofthecontrollerineachrun.Theindexes
are: non‐ dimensioned distance with respect to the
ship’s length from the target goal point, heading
errorfromtargetvalue240ºandsurgevelocityerror
from target value 0.05 m/s. Figure 8 shows the
frequency distribution table of these three success
indexes.
Figure8.Frequencydistributionforsuccessindexes
422
4.2.1 NondimensionalizedDistancefromFinalGoal
Point
Inthisresearch,theshipisassumedtobestopped
if the surge velocity becomes less than 0.05 m/s
during reversing. After the termination of each
simulationcase,errorinshipposition,i.e.ΔxandΔy
arecalculatedbasedontargetgoal
point(0,0).Inthis
research,thesuccessofeachshipberthingcountsif
the ship stops within the desired successful zone,
whichis1.5Lareaaroundthegoalpointduetosafety
reason. After that, tugs will assist to align it with
pier.
Here,thedistanceasasuccessindex
iscalculated
as
22
yxd
and nondimensionalised as
/( )ddLship

.Thefrequencydistributionofthis
successindexinFigure8clearlyshowsthemaximum
frequencyoccursat0.1L~0.19Lintervalthatis29.66%
of total samplecases. Then the frequency gradually
decreaseswiththeincrementofnondimensionalised
distancevalue.Beyond1.12L,thepercentagegetsless
than 1.0. Here, the total
success rate is 91.45%.
However, the unsuccessful cases can be solved by
including those initial conditions into the teaching
datawhiletrainingnetsagain.
4.2.2 HeadingError
Theerrorinfinalheadingiscalculatedbasedon
thetargetheadingi.e.
()240final

.Hereit
notedthattheexpectedheadingtobekeptbythePD
controller during low speed running is 240º.
However, due to the hydrodynamic properties that
areactingontheshipduringreversing,theshipwith
single rudder single propeller has the natural
tendencytoturntowarditsstarboard
side.Thus,the
frequency distribution for heading error is shifted
towardsthestarboardside.
Thefrequencydistributionofthissuccessindexin
Figure 8, clearly shows the maximum frequency
occurs at 20º~20.9º interval which is 28.73% of total
samplecases. This will actually make the final ship
heading parallel to
the pier. Beyond that maximum
frequency, in both positive and negative directions
thefrequencygraduallyreduces.
4.2.3 SurgeVelocity
Oneofthecriteriaforconsideringtheberthingas
successful in this research is final surge velocity≤
0.05m/s.Thus,foreachofthesamplecases,thefinal
surge velocity error is
calculated to know its
frequencydistributionbyconsideringtheexpression
as
( ) 0.05surge surge final .
Thefrequencydistributionofthissuccessindexin
Figure8showsthemaximumfrequencyoccurswhen
theerrorisalmostzero.Suchcasesoccuras86.92%of
totalsamplecases.Thisclearlyshows,thecontroller
is effective enough in stopping the ship within a
desired zone. Beyond that maximum frequency,
it
graduallydecreasestoasmallervalue.
5 EXPERIMENTRESULTS
After getting promising simulation results,
experiments are conducted by implementing the
trained nets for free running experiment system.
While performing the experiments, the model is
accelerated first from the pier and then turned to
enter the virtual window. As a
result, every time
while switching to auto mode, the ship experiences
some sway velocity as well as initial yaw rate. For
real ship operation, it is also very difficult to
maintainzero sway and zero yawrate in astraight
course before entering to the virtual window.
Therefore, the fact is
also true for the real ship
operation and it would be quite interesting to
observehowtheANNsbehavetosuchnewsituation
byutilisingtherobustness.
In this research, experiments are carried out for
both LHS and RHS approach. Desired virtual
windowpointsaswellasarbitrarystartingpoints
are
considered to judge the effectiveness of the
controller. While doing such experiments, some
similarities are found in the network’s behaviour.
Basedonthat,theexperimentresultsarepresentedin
some groups where the controller behaves in a
similarwayortheresultingtrajectorieslooklikeit.
For LHS approach, three
types of pattern are
identifiedduringtheexperiments.Therepresentative
trajectory belongs to each pattern is shown in
Figure9.
Forthefirsttype,whileswitchingtoautomode,
theANNdecidestotakethestarboardrudderfirstto
ensuretheship’sapproachfromlefthandside.This
is a
usual case for the left hand side approach and
ANN’s action remains same irrespective of initial
swayvelocityoryawrate.Here,inmostcaseswithin
reasonablewind,theshipmanagestomergewiththe
imaginary line well aheadand proceeds along with
thelinewithoutmuchdeviation.
Forthesecond
type,duetothepresenceofsome
initialswayvelocityandyawratewhileswitchingto
automode,theANNfirstdecidestominimisethem
bytakingthecounterrudder.Doingsooftendistracts
theshipfromitssafestplacetoapproach.Therefore,
theANNrealisessuchsituationandcontinues
with
port rudder until the ship makes a complete port
turn.Atthesametime,ANNalsotriestoadjustthe
ship’spositiontoasaferplace.Thenitdecidestotake
thedesiredstarboardruddertostartthe
approaching. Here, during the turning and course
changing stage, the controller keeps
steady half
aheadspeed.
423
0 5 10 15 20
0
5
10
15
Y/L position [-]
X/L position [-]
0 100 200 300 400
-20
0
20
rudder [deg]
ANN-PD result for command rudder angle
0 100 200 300 400
-10
0
10
20
n [rps]
ANN result for rps
t [sec]
0 100 200 300 400
-20
0
20
rudder [deg]
0 100 200 300 40
0
-20
0
20
t [sec]
rudder [deg]
type1
type2
type2
type3
type2
type1
type3
type1
type2
Figure9.BerthingexperimentsforLHSapproach
For the third type, ANN always tries to oppose
theexistinginitialswayvelocityandyawratewhile
switchingtoautomode.However,sometimes ANN
may go with such existing values by taking the
expected starboard rudder firstlike in type one. By
doing so, if the sway velocity or yaw
rate reaches
some peak value depending on the ship’s position,
thentheANNfinallydecidestotaketheportrudder
toopposethem.Butthistime,unlikeastypetwo,the
ANN prevents the complete turn of ship by taking
thestarboardrudderagainastheshipisbelievedto
bestillinsuitablepositingtostartitsapproachingto
merge with the imaginary line. Therefore, all
trajectoriesbelongtothisgroupisduetosubsequent
starboard to port or port to starboard rudder taken
byANNaccordingtosituationsdemand.
For the RHS approach, separately trained
networks are used and
three different types of
pattern are identified. The representative trajectory
belongstoeachpatternisshowninFigure10.Inthe
followingfigure,theshipstartsfromnearbystarting
point, however due to having different gust wind
and initial conditions the resulting trajectories are
different.
For type one, while switching
to auto mode, the
ANNmaytakestarboardrudder firsttooppose the
existingsurgevelocityandyawrateasshowninthe
figure.However,itmaygowiththeexistingoneby
takingtheportrudder.Whiletakingtheportrudder,
ifsurgevelocityandyawratereachtheirmaximum
value as analysed by ANN, it takes the starboard
ruddertominimisethesevalues.Afterthat,theANN
actuates the desired port rudder to start its final
approach to merge with the imaginary line. The
importantconcernbelongstothisgroupisthatafter
course changing, ANN in most cases
manages to
makeitwithoutmuchdeviation.
0 5 10 15 20
0
5
10
15
Y/L position [-]
X/L position [-]
0 100 200 300
-20
0
20
rudder [deg]
ANN-PD result for command rudder angle
0 100 200 300
-10
0
10
20
t [sec]
n [rps]
ANN result for rps
0 100 200 300
-20
0
20
rudder [deg]
0 100 200 300
-20
0
20
t [sec]
rudder [deg]
type1
type3
type2
type2
type1
type3
type1
type2
type3
Figure10.BerthingexperimentsforRHSapproach
Mostoftheresultsbelongtotypetwoaredueto
the presence of high wind disturbances during
course changing. Therefore, the ship fails to merge
withtheimaginarylineinlargeextent.Afterthat,the
PD controller takes continuous counter rudder to
compensate such deviationand it succeeds in some
extent.
Fortypethree,dependingonANN’sresponseor
duetotheexistenceofwinddisturbances,sometimes
ashipfailstomergewiththeimaginaryline,whichis
similar to type two. However, this time, the PD
controller during steep deceleration successfully
returnsthe ship to the imaginary line by
taking the
starboardrudderandtheshipjustpassesthroughit.
Then for such overshooting, the controller again
takes the port rudder to correct the ship’s heading
andminimiseitsdeviationfromtheimaginaryline.
Finally,thecompletedtrajectorieslooklike‘S’shape.
Figure11showsotherexperimentresultsforLHS
and RHS approach while starting from different
arbitrary points. However, the trajectory patters are
sameasexplainedabove.
0 5 10 15 20
0
5
10
15
Y/L position [-]
X/L position [-]
LHS approach
0 5 10 15 20
0
5
10
15
Y/L position [-]
X/L position [-]
RHS approach
Figure11.Berthingexperimentsforarbitrarystarting
point
6 ANALYSISOFNETWORK’SBEHAVIOUR
In this research, the network’s behaviour for
command rudder is analysed depending on the
initial sway velocity and yaw rate. During the
experimentforLHSapproach,theshipisexpectedto
take a starboard turn to enter
the window. Thus,
while switching to auto mode, the initial sway
velocityandyawratearelikelytohavenegativeand
positivevaluerespectively.Onthecontrary,forRHS
424
approachtheshipexpectedtoaportturntoenterthe
window.Thus,theinitialswayvelocityandyawrate
are likely to have positive and negative value
respectively. To analyse such situations, four
different sway velocities are considered as found
duringtheexperiment.Thenforeachswayvelocity,
the
yaw rate varies in a particular range. The
corresponding plots of such analysis are given in
Figure12forLHSandRHSapproach.
Here, the responses for LHS approach are
illustratedforvaryingyawratefrom1.0deg/sto2.4
deg/s.Althoughineachcase,thenetworkpossessesa
pulsating
characteristic, however the nature of the
curves is almost similar. Here, each of the curves
showaparticularbandofyawrate,forwhichANN
decidestotaketheportruddertoopposetheexisting
swayvelocityandyawrate.Beyondthatmentioned
band, ANN takes the starboard rudder, which is
usual for left hand side approach of a ship.
Moreover, the defined band of yaw rate gradually
shifts towards the right side with the increment of
sway velocity. Although, these curves demonstrate
theresultforanyparticularship’sheadingandinitial
position, however upon altering these values the
ANNshows
similartypesofbehaviour.Ingeneral,it
meansthatifashiphas some drifted sway velocity
whileenteringtothewindow,thendependingonits
initial yaw rate ANN may sometimes take counter
rudderinitiallybeforeactivatingitsexpectedrudder
action.
25
20
15
10
5
0
5
10
15
20
25
0 0.5 1 1.5 2 2.5 3
Delta command by ANN
(deg)
Initial yaw rate (deg/s)
LHSapproach
sway=0
sway=-0.03
sway=-0.067
sway=-0.09
20
15
10
5
0
5
10
15
20
25
3 2 10
Delta command by ANN
(deg)
Initial yaw rate (deg/s)
RHSapproach
sway=0
sway=0.03
sway=0.067
sway=0.09
Figure12.ANN’sresponsefordifferentswayvelocityand
yawrate
On the other hand, for RHS approach, the low
swayvelocitycurvedoesnothavethatmucheffectin
alteringtheANN’sbehaviour.Asaresult,theeffect
of having an initial yaw rate is more prone than
havinganylowswayvelocityinRHSapproach.The
ANNtakestheport
rudderonlyforsmallervaluesof
yaw rate. Otherwise, irrespective of any higher
values of yaw rate as an initial condition, ANN
always takes the starboard rudder. On the other
hand,withtheincrementofswayvelocity,thecurves
aregraduallypulleddown.Thus,theeffectofhaving
high sway
velocity is dominant for small yaw rate.
However,lateronwiththeincrementinyawrate,the
curveturnstowardthepositivevalueandtheANN
starts to take starboard rudder. Each time with the
incrementofswayvelocity,thegraphisalsolittlebit
shifted towards the left. Finally, the
analysis of the
network for RHS approach can be concluded in a
similarwayasforLHSapproach.Thatisifashiphas
a low initial sway velocity while entering to the
window, then in most cases the ANN will take the
starboardruddertoopposetheexpectedturn
except
forlowexistingyawrate.
Here, the analysis of the network’s behaviour
mainly demonstrates how the network behaves
dependingonexistinginitialswayvelocityandyaw
rate. Therefore, no matter how such existing initial
sway velocity or yaw rate results from. Thus, the
network will behave in a similar way
in other
experiment sites depending on the existing initial
conditions.
7 AUTOMATICTUGASSISTANCE
After stopping the ship within the assumed
successful zone as shown in Fig. 1, the final step
wouldbetheactualalignmentoftheshiptothepier.
Inthisresearch,toexecutethecrabbingmotion
fora
big ship like Esso Osaka with single rudder and
single propeller, two lateral and one longitudinal
thrustersareconsidered.First,theANNcontrolleris
triedforthementionedpurposeasproposedbyTran
and Im (2012). However, in the most unpredictable
wind,thereisnoothereasywayto
createconsistent
teaching data that is important to ensure the
effectivenessofANNcontroller. Asaresult,thePD
controllerhasgivensomepreferenceovertheANN.
Equations4to8demonstratethePDcontrollersused
for automatic thrust generation in lateral and
longitudinaldirection.
ifΨ<270
0
anddis_fore>dis_rev
12
123
*(X 1.5 ) *sway
*(X 1.5 ) *sway *diff
fore fore fore
aft fore fore
TC X C
TC X C C


(4)
ifΨ>270
0
anddis_aft>dis_rev
123
12
*(X 1.5 ) *sway *diff
*(X 1.5 ) *sway
fore aft aft
aft aft aft
TC XC C
TC x C


(5)
ifΨ<270
0
anddis_fore<dis_rev
12
123
*( 1.5 ) *sway
*( 1.5 ) *sway *diff
fore fore
aft fore
TC X C
TC X C C


(6)
425
ifΨ>270
0
anddis_aft<dis_rev
123
12
*( 1.5 ) *sway *diff
*( 1.5 ) *sway
fore aft
aft aft
TC XC C
TC X C


(7)
Longitudinalthrust
456
**Ypos*distance
tug
X C surge C C
(8)
where, Ψ is ship’s heading, X
fore and Xaft are x
coordinate of ship’s fore and aft peak respectively,
diff is abs(X
foreXaft), distance is the perpendicular
distance of ship’s CG from the actual pier, dis_fore
and dis_aft are perpendicular distance of ship’s fore
andaftpeakrespectivelyfromtheactualpier,dis_rev
istheperpendiculardistancefromtheactualpierto
startreversethrust,Y
posistheycoordinateofship’s
CG in the earth fixed coordinate, C
1~C6 are the
coefficients.
ConsideringEquation4 and5forprovidingside
thrusts, first part belongs to a constant value
irrespectiveofship’spositiontowithstandthewind
force up to 1.5 m/s. Second part is for controlling
swayvelocityandthirdpartactivatesifacorrection
for ship’s heading is
needed. On the other hand, if
shipreachesthezonetoprovidereversesidethrusts
as given in Equation 6 and 7, the first part is no
longer constant rather increases the thrust value
graduallywiththedecrementofthedistancevalueto
minimise the sway velocity upon reaching the pier.
Other parts remainsame.Here, the value of dis_rev
depends on the steady sway velocity while
approaching to the pier using side thrusters in
presence of wind disturbances form different
direction. Considering longitudinal thrust given in
Equation 8, the first part is for controlling forward
velocity,secondpartisfor
controllingship’sposition
in longitudinal direction and the third part is for
controlling thrust value with respect to ship’s
distance from actual pier. Now, by combining the
proposed controller for side thrusters with the
existingANNPDcontroller,simulationsaredonefor
the different unknown situation. Figure 13 and 14
demonstrate
suchresults.
Considering Fig.13, the combined controller is
testedforfollowingwind.Here,thefollowingwind
bringstheshipmuchclosertothepierthaninFig.14.
Finally,thesimulationendswithashipheading271º
andswayvelocityclosetozero.
Ontheotherhand,forFig.14,the
controlleralso
successfullymanagestomaintaintheship’sheading
against the wind during the crabbing motion.
However,theshiptakesalongtimetoreachthepier
astheswayvelocityisrelativelylowduetoopposite
winddirection.Itisalsonotedthatthereisbarelyin
need of any
longitudinal thruster for position
alignment.Here,theship’sfinalheadingis269ºand
swayvelocityisalmostzero.
0 5 10 15 20
0
5
10
15
Y/L position [-]
X/L position [-]
0 100 200 300 400
-20
0
20
Rudder [deg]
0 100 200 300 400
-20
0
20
Rps
0 100 200 300 400
-0.1
0
0.1
T
fore
[N]
0 100 200 300 400
-0.1
0
0.1
T
aft
[N]
0 100 200 300 400
-0.2
0
0.2
T
long
[N]
Time [s]
-2 0 2
-2
-1
0
1
2
Y/L position [-]
X/L position [-]
Psi
ship
=340
0
Figure13. Initial heading 340º starting from an arbitrary
point
0 5 10 15 20
0
5
10
15
Y/L position [-]
X/L position [-]
-2 0 2
-2
-1
0
1
2
Y/L position [-]
X/L position [-]
0 100 200 300 400 500 600
-20
0
20
Rudder [deg]
0 100 200 300 400 500 600
-20
0
20
Rps
0 100 200 300 400 500 600
-0.1
0
0.1
T
fore
[N]
0 100 200 300 400 500 600
-0.1
0
0.1
T
aft
[N]
0 100 200 300 400 500 600
-0.2
0
0.2
t [sec]
T
long
[N]
Psi
ship
=180
0
Figure14. Initial heading 180º starting from an arbitrary
point
Simulations are also done considering the end
conditionofdifferentexperimentresultstojudgethe
capabilityofthe proposed PD controller in aligning
theshiptothepier.Fig.15illustratessuchresults.
-1 0 1
-1.5
-1
-0.5
0
0.5
1
Y/L position [-]
X/L position [-]
-1.5 -1 -0.5 0 0.5 1
-2
-1.5
-1
-0.5
Y/L position [-]
X/L position [-]
-1.5 -1 -0.5 0 0.5 1
-1.5
-1
-0.5
0
Y/L position [-]
X/L position [-]
-1 0 1 2
-1.5
-1
-0.5
0
0.5
1
Y/L position [-]
X/L position [-]
Figure15. Simulations with different experiment end
condition
Consideringthe abovefigure, in spite of dealing
with the ship having different final heading and
position,thecontrolleriseffectiveenoughtoguideit
426
uptothepier.Onlyforthefollowingwind,itposes
somedifficultiesincorrectingtheshipheading.
8 CONCLUSIONS
In this research, repeated optimisation technique is
utilisedtocreateconsistentteachingfortrainingthe
ANNcontroller.Theproposedrepeatedoptimisation
technique also demonstrates a new idea named
‘virtual window’,
which is to start a ship with its
particularheadingfromadesiredpointforminimum
timecoursechanging.
Following the control strategy mentioned in this
research, several simulations are done for desired
andarbitrarystartingpointtojudgetherobustnessof
thecontrollerundergustwinddisturbances.Stability
of
the closed loop system is also analysed using
Monte Carlo simulations. This gives 91.45% success
over 970 arbitrarily chosen cases. However, the
successratecanbeincreasedbyincludingtheinitial
conditionsoftheunsuccessfulcasesintotheteaching
datawhiletrainingthenetagain.
After getting satisfactory percentages of success,
shipberthingexperimentsareconductedandresults
are included in this paper. While performing the
experiments, the controller has found to behave in
some particularways depending on different initial
conditions and wind disturbances. Therefore, the
experimentresultsaretriedtogatherinsomegroups
dependingonthesimilaritiesof
network’sbehaviour
ortrajectoriespattern.Suchbehavioursarealsotried
to analyse for different initial sway velocities and
yawrates.
The controller in this paper is proposed to stop
the ship at some safe distance from actual pier.
Therefore, as a final approach to the berthing
operation,thePDcontrolledside
thrustsisproposed
and coupled with the current controller. Several
simulationsaredonetocheckthecompatibilityofthe
controllersandfoundquitepromisingresults.
Finally, it is clearly said that the existing
environmental disturbance plays a vital role while
using the proposed controller for automatic ship
berthing.Ifthe
windblowsbeyondpermittedlimit,
thenevenusingtheproposedPDcontroller,itwillno
longer possible to keep the track due to reduced
manoeuvrabilityatlowspeed.
ACKNOWLEDGMENT
We would like to acknowledge KyoungGun Oh,
Zobair Ibn Awal and other undergraduate students
fortheirdedicatedhelpduringtheexperimentsetup
andexecution.
REFFERENCES
Ahmed, Y. A. and Hasegawa, K. 2013a. Automatic Ship
Berthing using Artificial Neural Network Trained by
Consistent Teaching Data using NonLinear
Programming Method. Journal of Engineering
Applications of Artificial Intelligence, vol. 26, issue 10,
pp.22872304.
Ahmed,Y.A.andHasegawa,K.2013b.Implementationof
Automatic Ship Berthing using
Artificial Neural
NetworkforFreeRunningExperiment. Proc. ofthe 9th
IFAC Conference on Control Applications in Marine
Systems,vol.9,pp.2530,Osaka,Japan.
Endo,M.andHasegawa,K.2003.PassagePlanningSystem
forSmallInlandVesselsBasedonStandardParadigms
andManoeuvresofExperts.MARSIM’03,vol._,pp.RB
19
1RB199.
Fujiwara,T.,Ueno,M.andNimura,T.1998.Estimationof
Wind Forces and Moments acting on Ships. Journal of
theSocietyofNavalArchitectsofJapan,vol.183,pp.7790.
(InJapanese)
Fujii,T.andUra,T.1991.NeuralNetworkBasedAdaptive
Control Systems for AUVs. Journal
of Engineering
ApplicationsofArtificialIntelligence,vol.4,pp.309318.
Hasegawa, K. and Kitera, K. 1993. Automatic Berthing
Control System using Network and Knowledgebase.
JournalofKansaiSocietyofNavalArchitectsof Japan,vol.
220,pp.135143.(inJapanese).
IM, N.K. and Hasegawa, K. 2001. A Study on
Automatic
ShipBerthingUsingParallelNeuralController.Journal
ofKansaiSocietyofNavalArchitectsofJapan,vol.236,pp.
6570.
IM, N.K. and Hasegawa, K. 2002. A Study on Automatic
Ship Berthing Using Parallel Neural Controller (2nd
Report). Journal of Kansai Society of Naval Architects of
Japan,vol.237,
pp.127132.
Kose,K.,Hinata,H.,Hashizume,Y.andFutagawa,E.1986.
On a Computer Aided Manoeuvring System in
Harbors. Journal of Society of Naval Architects of Japan,
vol.160,pp.103110.(inJapanese)
Nakata,M.andHasegawa,K.2003.AStudyonAutomatic
BerthingUsingArtificialNeuralNetwork‐Verification
of
Model Ship Berthing Experiments. Journal of Kansai
SocietyofNavalArchitectsofJapan,vol.240,pp.145150.
Ohtsu, K., Mizuno, N., Kuroda, M. and Okazaki, T. 2007.
Minimum Time Ship Manoeuvring Method Using
Neural Network and Nonlinear Model predictive
Compensator.JournalofControlEngineeringPractice,vol.
15,issue
6,pp.757765.
TheSpecialistCommitteeonEssoOsaka.FinalReportand
Recommendations to the 23rd ITTC. Proc. of the 23rd
ITTC,vol.2,pp.573609.
Yamato, H.,Uetsuki,H. and Koyama, T. 1990. Automatic
Berthing by Neural Controller. Proc. Of Ninth Ship
ControlSystemsSymposium,vol.3,pp.3.183201.