205
1
INTRODUCTION
Movementalongagiventrajectoryisassociatedwith
the solution of the wellknown problem of choosing
the necessaryspeedandcourse of the vessel, taking
into account vessel dynamic characteristics [21]. The
ordinary task of controlling the movement of the
vesselisstabilizationonagivencourse.Keepingthe
vessel on a given trajectory is carried out by
developingin one way or another amendmentsto a
given course, which is supposed to be equal to the
headingangleofthetrajectorysection,andstabilizing
on this corrected course. At the same time, a
sufficiently accurate knowledge of its
model is
necessaryandthesynthesisofahighqualitycontrol
systemrequiresthetask ofparametric identification.
Errors in a priori ideas about the model of vessel
movementcansignificantlyaffectofthevesselmotion
deviation in the process of control. The accuracy of
suchcontrolmaynotbeenough
inconditionsofhigh
trafficintensityand/orrestrictions of the water area.
Even if the model of the vessel’s movement is well
identified on experiments, it’s characteristics can
change significantly during operation, because of
change in the geometry of the hull, change in
displacement,etc.
Thedevelopmentof thetransport
industryinthe
modern world is characterized by theintensification
of the use of Maritime Autonomous Surface Ships
(MASS)[9].The desiredrouteof thisshipisusually
expressedbythesetofwaypoints[6].Thismethodof
explanationis extremely attractivebecause it is easy
tosavetheroute
inthememoryofthecomputeron
board.Crossings canbe markedand planned before
orduringthevoyage,takingintoaccountfactorssuch
as weather conditions, obstacle avoidance and path
planning [6,15,16,19]. Each way point defined in
Global and Local Planning of Ship Route Using MATLAB
and Simulink
O.Kupraty
1
&M.Tomera
2
1
OdessaNationalMaritimeUniversity,Odessa,Ukraine
2
GdyniaMaritimeUniversity,Gdynia,Poland
ABSTRACT:Thisarticleconsidersanewmethodofdecomposingtheshiprouteintoglobalandlocalplanning
using MATLAB and Simulink developed by the authors. The authors propose to create a program code in
MATLAB and operate it into Simulink. Wherein, the corrective coefficientswere
written in MATLAB. Such
trajectoriesareconstructedasasetofpoints,collectedintothespecialmatrix.Indeterminingoftheanglevalue
oftherudderwasusedtheship’sturningabilitysuchas:high(HG),middle(MD)orlow(LW)withregardto
passage area. Moreover, in the article were
analyzed and calculated the ship rudder effectiveness for
ProportionalIntegralDerivative(PID)control.Thepaperisdevotedtotheproblemofsafetynavigation.First
of all is the task of planning the path: the trajectory of the vessel’s movement in the local water area. The
purposeofplanningthevessel
trajectoryinthelocalwaterareaistoensurenavigationsafetyduetomarine
trafficandenvironmentalconditions.Oneofthetasksofthepresentworkiscontrollingfollowingadesired
trajectory.Thearticlenotesaffectofthevesselmotiondeviationintocontrolprocess.
http://www.transnav.eu
the International Journal
on Marine Navigation
and Safety of Sea Transportation
Volume 17
Number 1
March 2023
DOI:10.12716/1001.17.01.23
206
Cartesian coordinates (x
i, yi) is used to create the
desired path in the form of a series of straight line
segmentsconnectingpairsofconsecutivepathpoints.
When the vessel reaches the indicated receiving
circuit surrounding point i, the route moves to the
nextpartofthelineconnectingintersectionsi+1.Ina
more advanced solution, the arcs of the circles
connecting the segments to the road lines are
identified around each point on the route and then
used to determine the desired line at that time [10].
Thefourthlevelofoperationitisafullyautonomous
ship. The fourth level of
operation it is a fully
autonomous ship and it involves managing control
devices without human intervention [9]. Once the
checkpointshavebeenestablished,itisrecommended
tomonitorthewaypointsfromtheseaascloselyas
possible, even in the presence of unknown
environmental circumstances. The works [11,12]
explainedglobal
and local planningof thetrajectory
ofashipasacontrolobject.Animportantfeatureis
the need to increase the capabilities of these vessels
andexpandthescopeoftasks.
In an autonomous vessel, the controls are
connected to the control device, which allows to
increase the relevant
control criteria: centralization,
reliabilityandcontrolcapacity[17].Centralizationof
control is characterized by the number of control
devices using controls. Reliability of management is
characterizedbytheprobabilityoflossofcontrol.The
control capacity is characterizedby the simplicity of
thecontrolalgorithm.Centralizationofthecontrolof
an
autonomous vessel is more effective than
centralizingthe control of a nonautonomous vessel,
because an autonomous vessel uses a controlled
devicethathasa directconnectiontoallcontrols.The
reliability of controlling the electroniccontrol device
is more confident than the reliability of manned
control, because it depends
only on possible
programming errors and does not depend on the
emotional component, especially when duplicating
thecontroldevice.Thecontrolcapacityofthecontrol
device of an autonomous vessel is greater than the
capacity of nonautonomous control, because the
autonomous control algorithm is expressed in the
formofmathematical
modelsanddoesnotdependon
subjectiveperception,andthedecisionisdetermined
objectivelyformathematicalcalculations.
Definitions for this article mentioned below
[11,12]:
path matrix (PM) an incident matrix that
representstherelationshipbetweentheverticesof
theship’spath[11];
routematrix(RM)isamatrixconsistingofaseries
of geographic coordinates, coordinates are taken
fromthedatabaseofthecontroldevice;
scenario is a coincidence of certain conditions,
under the fulfillment of which actions occur at a
settimethatleadtoachangeintheroutematrixor
movement of the vessel in real time, with the
exceptionofactionsofdecelerationoracceleration,
whichdonotaffecttherouteof
thevessel;atthe
same time, these scenarios are executed in
accordance with the International Rules for the
Prevention of Collisions of Ships at Sea [2] and
other mandatory international and state
regulations, as well as taking into account
meteorologicaldata;
set time is the minimum time before a probable
event to determine the scenario and make a
decision in a nonemergency mode, changing the
globalplanningtask;
scenariomatrix(SM)amatrixthatrepresentsthe
relationship between the points (vertices) of the
ship’srouteandthecorrespondingscenarios;
pilotoperatorapersonwhoremotelydownloads
inputdatatothecontroldeviceusingacomputer
ortelephone,whichaffectstherouteormovement
ofthevessel;
thevessel,fromthepointofviewofthetheoryof
ship’s control and automation, is the object of
control;
from the point of view of hydrodynamics, the
vesselisabodywhosebehaviourdependsonthe
landing, stability, measurements, displacement,
hydrodynamiccoefficients, externalfactors,stable
position, characteristics of engines, thruster
devicesandotherdata;
controldeviceadeviceconnectedtotheInternet,
programmedintoa microcontroller,whichcanbe
a computer, smartphone, regulator or navigation
robot;
immediate/emergency scenario is a scenario of
emergency active braking with the possibility of
changingthedirectionofmovementofthevessel,
initiated through a supervising device or pilot
operator, or shipowner, performed in emergency
mode, stopping the implementationof the global
planningtask;
segment[22]andsector[18]methodsaremethods
thatarecombinedfortheconstructionofturns;
segment MH is a segment, which comes from
wheeloverpointHtoturnvertexM;
segment MK is a segment, which comes from
vertexMtocoursestabilisationpointK.
alteration course scenario is a scenario, that
determined in local planning, not in global
planning,asadditionalarcintotheroutetoavoid
somedanger.
Thepurposeofthisstudyisfullyimplementation
globalandlocalplanning[11,12]andsimulationroute
passing only with the help of the MATLAB and
Simulink
environments.Itcanbeusedinports,inland
waters and in open waters, which will significantly
reducethecostofwaternavigation,whileincreasing
its safety, eliminating human errors in the
managementofthevessel.
MATLABandSimulinkenvironmentsareflexible
enough for motion simulation tasks and have the
necessary
tools of builtin functions. These
programming environments have more similarities
withC++,JAVAandC#thanMSExcel,whichinthe
future will facilitate the integration of development
intomodernelectronicsystems.
There are a lot of similar functions in MATLAB,
C++, JAVA and C# environments and this
circumstancehas
themainroleinchoicetheMATLAB
andSimulinkenvironments.
Researchtasks:
6.
Explain the basic control concept of the proposed
autonomouscontrolmethod;
7.
Constructthetrajectoryofthevesselinglobaland
localplanning usingonlyMATLABenvironment,
analyze the features of trajectory changes in
207
accordance with the scenarios, conditions and
parametersofthevessel;
8.
Analyze thefeaturesofcomputermodelingof the
hydrodynamicsofthevessel;
9.
Construction of the path control model for the
vesselB481intheSimulinkenvironmenttokeep
itonlocalplanningtrajectory.
2
BASICCONTROLCONCEPTANDTHE
ESSENCEOFTHEPROPOSEDMETHODOF
AUTONOMOUSCONTROLOFVESSELS
Basic control concept of the proposed method is to
createsuchinteractionbetweencontroldevice,control
sources and vessel, that will eliminate the risks of
collisions with other objects or grounding and give
opportunities to execute
ordinary and critical
operations using simple algorithm in accordance to
the environment conditions in unmanned mode or
almostunmannedmode. 
SP1 is a subprogram that creates global planning
tasks for SP2 and gives basic information about
externalcircumstancestoSP2.
SP2 is a subprogram that creates a smooth
trajectoryin
localplanningbasedonglobalplanning
tasks.
SP3 is a subprogram that responses for keeping
vesselonlocalplanningtrajectory.
The essence of the proposed method of
autonomouscontrolofvesselsaccordingtotheuseof
a control device equipped with a ship’s route
planning algorithm and a database, remotely
observed
or operated by the pilotoperator, using
sensors, including position and Global Positioning
System (GPS), lies in the fact that: a control device
equipped with a microcontroller and subprograms
SP1,SP2andSP3connectedbackto:
an array of sensors and devices monitoring the
ship and its surroundings, whose vision systems
are arranged on board such that the distances
betweenthemarelessthanorequaltotheradiiof
thecircles constituting the fieldsof view of these
systemsandareplacedonarotatingmanipulator
in a configuration such that at least two of them
areonthebowoftheship,atleasttwointhestern
oftheshipandatleastoneoneachsideoftheship;
theengineunit;
database;
steeringgearthroughtheSP1subprogramandon
the basis of information obtained from the
database;
processes,generatesandsamplestheship’s route
fromthestartingpointA1totheendpointBinto
shortersections,andthegeographicalcoordinates
oftheseparatedpointsarestoredintheformofa
matrix,andthen
determinesthesafeinitialspeedofthevesseland
forms of the path matrix and analyzes the
information from the team sensors and devices
monitoring the ship and its surroundings and
creates a scenario matrix (SM), of which at least
one predefined scenario is selected by the pilot
operatororthe
operatororisautomaticallyloaded
bythesubprogramSP1foragivenroutefromthe
database,afterwhich
onthebasis ofthescenariomatrix (SM)modifies
the original path matrix (PM) and creates a
processed route matrix (RM) containing
geographical coordinates and sends it to the
subprogramSP2ofthecontroldevice,
at the same time, the control device using the
subprogramSP1determinestheturningabilityof
the ship (TA), creates matrix of a rudder shift
selection MRSS (Table 1) and sends it to the
subprogram SP2, analyzing hazards and
determines a safe speed of the vessel and initial
turningmodeparameters
forthesubprogramSP3;
the control device through the subprogram SP2
generatesa local planning (LP) matrix and sends
thelocalplanningroutematrixtothesubprogram
SP3,whichthenconvertstheinformationfromthe
subprogramSP1andSP2intooutgoingsignalsand
sends them to the steering machine and engine
unit.
Mainadvantagesof
themethod:
the control device is connected back to the
autopilotandtothesteeringgear;
the control device through the SP2 subprogram
generates (LP) local planning trajectory and
transmits it to the SP3 subprogram, which then
processes the information from the SP1 and SP2
subprograms, creates signals and sends them to
theengineassemblyandtotheautopilotsystem;
the control device receives information from the
steering gear, autopilot system or engine unit of
thefailureofanyofthesecomponents.Itgenerates
through the subprogram SP3 an emergency
scenarioorfunctionslowingdowntheproceeding
oftheship;
thecontroldevicereceivinginformationfroma set
ofsensorsanddevicesmonitoringtheshipandits
surroundings,about the detection ofadangerous
objectand/orthethreatofcollisionand/orchange
of depth and/orchangeof weather conditions,or
damagetooneofthesensorsordevicesbelonging
tothe
sensorassemblyanddevicesmonitoringthe
ship and its surroundings, generates through the
SP3 subprogram an emergency scenario or
function that slows down the movement of the
ship;
thecontrol device receivinginformationfromthe
pilotoperator or the operator through the SP3
subprogram, triggers an emergency scenario or
slows down the movement of the ship or
accelerates its speed, regardless of the processes
andscenariospreviouslyplannedbythisdevice;
when the control device through the SP1
subprogramdetermines passive braking scenario,
itforms adiagonalmatrix of the passive braking
scenarioS1,forexample,atpointA3oftheship’s
routeandaddsthepathmatrixPMtoit,createsa
processedpathmatrixPM’;
when the control device through the SP1
subprogramdeterminesactivebrakingscenario,it
forms a diagonal matrix of the active braking
scenarioS2,forexample,atpointA4oftheship’s
routeandaddsthepathmatrixPMtoit,createsa
processedpathmatrixPM’;
the level of turning ability of the TA vessel is
determinedonthebasisoftheangularvelocityof
208
thepreviousturn,oronthebasisofweatherdata
andseacurrentsatagivenlocation;
the control device, on the basis of information
receivedfromthesensorassemblyanddevicesfor
monitoring the ship and its surroundings about
thechangeintheactualpathoftheshiprelativeto
the previously planned route, changes the initial
manoeuvre ability level TA (turning ability)
establishedtothemanoeuvre
abilitylevelTA’with
ahigherruddershiftforthesameturn.
It is also advantageous if, in the scenario matrix
[11],theactivebrakingandlateralmovementscenario
S4 of the ship occurs, for example, at point A3, the
processedpathmatrixPM’ hasthesameformasfor
theactivebrakingscenarioS2,wherebyintheeventof
a stop of the ship and a lateral deviation from the
specified braking point occurs, the control device
sends to the thrusters control signals with the
appropriatespeedanddirectionofrotation.
It is also advantageous if, for example, in the
scenariomatrixSM,theskippingscenario(S3)orS
An
(inlocalplanning)ofpointoccursatpointA3,using
scenariomatrixS
A3,andthepassivebrakingscenario
S1occursatpointA4,thecontroldevicethroughthe
subprogram SP1 generates filtration matrices that
corrects the path matrix due to the all executed
scenarios.
Itisalsoadvantageousif,forexample,duringthe
generationoflocalplanningtrajectorysometimesitis
necessary to
carry out a course alteration to avoid
danger(alterationcoursescenario),thecontroldevice
through the SP2 subprogram calculates the route
alterationconsistingof:
thewheeloverpointH,atwhichtherudderangle
isadjustedinaccordancewiththeassumedangle
ofturnQ;
theendpointofturnK;
turningmatrixbetweenHandK.
RepresentedbelowonFigures1,2aretwovariants
oftheproposedautonomousshipcontrolmethod.In
thefirstvariant,theAutopilot5usedascontrolmeans
by Control device 1. In the second variant the
autopilotispartofSP3.
Therearethreesubprogramsof
thecontroldevice:
SP1,SP2andSP3. Thosesubprogramstakethe roles
of executive parts, which receive information and
formulate decisions. Therefore, sensors give to the
control device all important information about the
ship’sposition,speed,course,depth,windforceand
winddirection,andvesseltrafficsituationaroundthe
ship.
Global feedback in both variants has packs of
information,thefirst packisaboutcontrolmeanings
work and conditions is sent to SP3, and the second
packisinformationaboutshipmovementandabout
her environment (weather, traffic situation) that is
read by sensors and sent to SP1. Local feedback in
bothvariantscombinesallinformationfromthefirst
and the second pack in one pack and sends to
Autopilot(inthefirstvariant)ortoSP3(inthesecond
variant).
Figure1. Autonomous ship control method (autopilot
worksseparately)
Emergency scenario or
slow down/speed up
Database 4
Set of sensors
of monitoring
ship and her
environment 2
Creation of
PM and
RM
PM + SM=PM’
RM→RM’
Turning ability due to
weather condition and de
p
th
Analyzing of threats
δr selection
information
Pilot-operator
or owner
Estimation or
selection
arrival point
“B”
Emergency scenario or
slow down
Control device 1
Emergency
scenario or
slow down
SP1
SP2
SP3
Steering gear 6
Set of thrust
en
g
ines 3
Ship
Global
feedback
Local
feedback
Figure2. Autonomous ship control method (autopilot is
partofSP3)
Thus, according to the Figures 1 and 2
immediate/emergency scenario (emergency braking
scenario) can be received from tracking/traffic/
environment control sensors (SP1 receives) or from
condition control sensors of control means (SP3
receives).Thisisascenariothatisdefinedintimeless
than set time and stops the global planning
task
execution.
3
CONSTRUCTTHETRAJECTORYOFTHE
VESSELINGLOBALANDLOCALPLANNING
USINGONLYMATLABENVIRONMENT
Theconstructionofthetrajectorybasedonresearches
[11,12],intheseresearcheswereexplainedhowtouse
theory of graphs [11] to create the global planning
taskandhowtoconstructasmoothtrajectoryinlocal
planning using segment method [22] and sector
method[18].So,globalplanningscenariosconnected
tovertex,localplanningtrajectoryhassegmentpoints
(wheeloverpointandstabilisationpoint)andturning
arcs,whicharedividedintosectors.
ThemainadvantageoftheMATLABenvironment
isemptyvalueoption:Emp=[],
thatisveryusefulas
a filtration instrument, when 2/3 of turning points
were calculated, it’s time to stop the turning
calculationusingemptyoption.
In MATLAB environment was written code that
canbeusedminimalfortwodegreessectorstepupto
180° degrees turn, so it is programmed 60
points in
eachturntocalculate(maximum120°is2/3of180°),
so empty value option works when the turn is less
than180°.
One of the advantages of this article is the
demonstration of skipping scenario matrix of points
209
A2, A3 and A4. For global planning initial route
matrix(RM)wastakenasanexample:
RM=[40.06616667,40.10083333,40.13533333,
40.14900000,40.19416667;26.31350000,26.35316667,
26.38966667,26.39283333,26.38716667]
Therefore, when we calculated courses according
to algorithm [13] for this example (Dardanelles
(Canakkale) Strait) the first turn in initial local
planning
is 2.2262°, therefore on Figures 35 it was
simplifiedtoH1andK1andnotvisible.
Theglobal planning trajectoryis constructedas a
setoffivepoints,thereforethereisnoreasontoskip
morethanonepoint.Ifweneedtoexecute2scenarios
braking and skipping,
it will be summarized as:
S=S
An+abs(S2an+i) or S=SAn+S1pn+i, where S1p is the
scenarioof passive braking(scenario1(S1)inglobal
planning),whereS2aisthescenarioofactivebraking
(scenario 2 (S2) in global planning), S
An is skipping
scenario(S3inglobalplanning),seescenariomatrixin
the article [11]. In addition to what was said in the
article [11], we can say that the global planning
scenariois a corrective/filtration matrix that changes
thepathmatrix.Therefore,theformulaforfinalpath
matrixmentionedin
suchwayis:
PM’=PM+S (1)
orPM’=PM+S
An+abs(S2an+i),
orPM’=PM+S
An+S1pn+i,
whereinitialpathmatrixfor5pointsrouteis:
PM=[01000;‐10100;0‐1010;00‐101;
000‐10]
As it was written in article [11] “1” is a link
between
vertex,whichshowsthedirectionsfromone
vertex (on matrix row) to another vertex (on matrix
column), 1” means movement can be only in one
direction, “0” means that there is no link between
vertex.
Skippingscenariomatrixes:
S
A2=[0‐1100;10‐110;‐110‐11;0010‐1;
00‐110](skippingp.2) (2)
S
A3=[00000;00‐110;010‐11;0‐110‐1;
00010](skippingp.3) (3)
S
A4=[00000;00000;000‐11;0010‐1;
00‐110](skippingp.4) (4)
Inpractice,thereisnoneedtoskipmorethanone
pointintheinitialroutewith5points.Ifweneed
to
combine the braking and skipping scenario, we
should just summarize the skipping and braking
matrix. In work [12] coordinates of local planning
trajectory was calculated in MS Excel, longitude
calculation of this work power (e/2) was simplified
due to short distances in calculation, but now in
MATLAB calculation was
used classic formula for
calculation meridional parts (12). Also, a condition
filter was added for turns less than 4 degrees, such
turnsweresimplifiedtopointsHandK.Formulasfor
calculationsegments[22]:
TT
1
22 2


 



DD
Q
MH L tg
(5)
2
2
Q
MK L tg




, (6)
whereL
1isadvanceofturningcircle,L2istransferof
turning circle for appropriate rudder angle, D
T is
turningcircletacticaldiameter,Qisturningangle.
Formulas for turning circle manoeuvring
parameters[3]:
1
6.41 0.7 0.93Ltrim

(7)
2
5.84 0.68 2.15Ltrim

(8)
T
11.75 1.35 3.9
Dtrim
(9)
whereΦisrudderandholdfactor,δisrudderangle,
trimtakenindegrees.Itisimportanttosay,thatδis
ordinarily different for calculation MH and MK of
turn.MHisalsoaminimumsafedistancetostopthe
vesselbyvertexinsuchaway
thatitwillbepossible
to turn and continue to execute the global planning
task. Any other position for stop before point H is
calculatedfrompointHwithregardtocircumstances.
Simulationwasexecutedbasedontheparametersof
vesselB481[7].
Figure3. Initial ship route in WGS84 geographical
coordinatesystem
Onfigure4illustratedselectedpartofthepassage
plan on the electronic chart for show the realistic of
theresearch.
210
Figure4. Initial ship route on OpenCPN Ver. 5.0.0.
(Dardanellespassing)
Coefficientkdis[12]replacedbycoefficientkdt,that
determined according to the trajectory conditions:
ifD
on<=3.5LOA/1852andthedirectionsofTurnn1and
Turn
n are same, kdt = 0.3, if not kdt = 1. When the
distancebetweenpoints D
on<MKn1+MHn,itwill be
necessary to use additional filtration for these two
turns by skipping points K
n1, Hn and the first two
pointsoftheTurning
narc.
Lat
{1,2}=Lat{H,1}+khkdtkturn1kturn2kdid0cos(TCn+1π/180)/60
(10)
Lat
{3,4,...,n}=Lat{2,3,...,n}+kturn1kdid0cos(TCn+1π/180)/60 (11)
whereTC
n+iistruecoursethatischangingbythesize
ofthesectorstep.Longitudeswerecalculatedbythe
formula:
1
2
1
1
1sin
180
7915.70447 45
2
180
1sin
180
1sin
180
7915.70447 45
2
180
1









































n
n
n
nn
n
e
n
eLat
Lat
lg tg
eLat
Long Long
eLat
Lat
lg tg
e
1
1
2
sin
180
/60
180




































n
e
n
tg T
Lat
C
(12)
Derive the formula for converting coordinates in
degrees to meters based on rhumb line distance
calculation(partlyinMATLABformat):
180
meters
Lat Lat b
 (13)
mod mod , min
Long
Long fix Long
(14)
mod cos . 60 1852 min
180
meters long Long
Long Lat

(15)
where
/180 /180
long
min cos fix min Lat fix min Long a


Matlab function fix() rounds down a module of
value to integers and then returns an initial sign of
thisvalue,functionfix()inthewestpartoftheEarth
givesopportunitiestocalculatethemaximumvalueof
longitude,forexample:‐5,thenitwillbedetermined
byfunctionmod()the
remainders,mod(5.6,5)=‐0.6
&etc.Theabbreviationmod
Longmeansremaindersof
longitude matrix division by the rounded down
minimalintegervalueoflongitudeforthisroute,the
abbreviation min
Long means distance in meters from
Greenwich meridian to the rounded down minimal
integer value of longitude for this route, which is
calculated on rhumb line (not Cartesian scale). In
MATLAB operator: (.*)‐times matrixes; (*) times
values; and constantπis written as (pi); a=6378137
meters (semimajor axis); b=
6356752 meters (semi
minor axis). Below you can see trajectory in global
andlocalplanning(Figures5and6)
Figure5. Initial ship route in metrical coordinate system:
globalandlocalplanning(ordinaryview)
Ontable1youcanseetheruddershiftmatrixfor
different turning ability. Therefore, in accordance
withtable1executecalculationofMH,butδforMK
takesfromanothermatrix:
Delta
mk=[151010101015] (16)
The calculation of MH and MK as it comes from
formulas (5,6) depends also on the loading/ballast
conditionofthevessel.
As mentioned above (16), rudder shift for
calculationMK changesnotsofrequently,because it
will be rudder shift to another
side for course
stabilizationanddependsonlyonshiploadcondition
and turning angle. This matrix (16) can be modified
according to the calculated vessel (taking from
practice).AndSo,inaccordancewiththeresearchesof
[11,12,13,18,22]trajectorywasconstructedusingonly
theMATLABenvironment.
Figure 6. Initial ship route in metrical coordinate system:
globalandlocalplanning(zeropointcenteredview)
211
OnFigures7,8illustratedexecutionoftheskipping
scenarioinpointA2andthebrakingscenarioinpoint
A4. So, it is PM’=PM+S
A2+S1p4, path matrix can be
writtenas:
PM=[00100;00010;‐10001;00010;
00‐100], (17)
asresult,theroutematrixwillbe:
RM=[40.06616667,40.13533333,40.14900000;
26.31350000,26.38966667,26.39283333]
But for calculating wheel over point H2 in local
planning(initialpointofsecondturn)werealsoused
the coordinates of the fifth point of the initial route
matrix.
Figure7.Brakingscenarioinpoint4+skippingscenarioin
point2withoutregardtoshoreline(WGS84format)
Figure8.Brakingscenarioinpoint4+skippingscenarioin
point2(zeropointcenteredview)
On Figures 7,8 illustrated the execution of two
scenarios: passive braking and skipping point, it
shows that in MATLAB environment there is an
opportunitytoprocesstwoscenariosforoneroutein
thesametime.
Formula (18) explains the basic principle of
calculationofinitiallengthofarcbetweentwopoints
[12].
d
0=DTπ/(Δψ’),(innauticalmiles) (18)
whereΔψ‐thisisastep,
Δψ‐it’sanattitude360˚/Δψ
Table1.Rudderangleshiftselectiontablefortrajectory
constructioncalculations(MHcalculation)
________________________________________________
Turningability AngleofturnQ Rudderangleδ
________________________________________________
HG<Q110°δ1=
(high)20°<Q
230°δ2=10°
30°<Q
340°δ3=15°
40°<Q
450°δ4=20°
50°<Q
555°δ5=25°
55°<Q
660°δ6=30°
60°<Q
7δ7=35°
________________________________________________
MD<Q110°δ1=
(middle)10°<Q
220°δ2=10°
20°<Q
330°δ3=15°
30°<Q
440°δ4=20°
40°<Q
545°δ5=25°
45°<Q
655°δ6=30°
55°<Q
7δ7=35°
________________________________________________
LW<Q1δ1=
(low)<Q
210°δ2=10°
10°<Q
320°δ3=15°
20°<Q
430°δ4=20°
30°<Q
540°δ5=25°
40°<Q
645°δ6=30°
45°<Q
7δ7=35°
________________________________________________
Figure9illustratestheturningsetofpointsfromH
to K [12]. As mentioned in [14] the sector step is
course step and changes at the same time. Thus,
globalandlocalplanningtrajectoryconstructionand
changes were executed based on scenario matrixes
andpathmatrix.Routematrixchangeswere
executed
duetothelogicalbasis(globalplanning)anddueto
the ship parameters and voyage conditions (local
planning).
Figure9.Constructionofaturntrajectory[12]
Point calculation of turning matrix executed in
such way: first of all,need to calculate points to2/3
arcoftheturn(Fig.9),thenitdirectedtopointK,for
thispurposeadoptedturnstepinturningmatrix,and
using MATLAB function length(unique(Turning
i)),
turning matrices are correlated by coefficients 1/3
(starboard side turn, calculation oriented on next
course)and2/3(portsideturn,calculationorientedon
previous course), such coefficients come from
ordinary practice, when turn executed on 2/3 of
coursedifference,therudderpositionstartschangeto
another side, to midships
(Bring rudder angle to 0
degrees) and then rudder angle changes the sign; if
turn is less than 4degrees, the trajectory of turn is
212
simplifiedtopointHandpointKoftheturn.Thenext
paragraph explains the basic principles of ship
hydrodynamics linearization, which is necessary for
shippathsimulation.
4
ANALYZINGTHEFEATURESOFCOMPUTER
MODELINGOFTHEMODELOFVESSEL
4.1
Kinematics
Inkinematics,onlythegeometricaspectofmotionis
considered. Kinematic relationships are established
only between different types of coordinate systems
[20].Todescribetheshipmotioninthreedegreesof
freedom,tworeferenceframesareusedinsimplified
versions limited to two dimensions: the fixed
coordinatesystem(X
N,YN)associatedwiththewater
map,andthereferenceframe(X
B,YB)attachedtothe
movingship(Figure10).
Thestatevariablesdescribingtheshipmotionare
collectedintwovectors
=[x,y,

]
T
andv=[u,v,r]
T
,
where(x,y)aretheshippositioncoordinates,
isthe
shipheading,(u,v)arethelinearbodyfixedvelocities
(surge,sway),andristheyawrate. TheEarthfixed
velocityvectordefinedintheinertialframe(X
N,YN)is
related to the bodyfixed velocity vector determined
inthereferenceframe(X
B,YB)throughthefollowing
kinematicrelationship[6],
ην
R
(19)
whereR(
)isthematrixofrotationaroundZNaxisby
angle
,calculatedfromtheformula:

cos sin 0
sin cos 0
001







R
(20)
u
v
x
V
y
r
X
N
Y
N
X
B
Y
B
c
Figure10.Referenceframes,usedtodescribethemotionof
theship
4.2 Hydrodynamics
When determining the mathematical model of ship
dynamics,thefollowingshallbeconsidered:thehull
of the ship as a moving rigid body immersed in a
liquid and the forces of the liquid acting on that
moving rigid body [20]. In hydrodynamics, it is
generally accepted that hydrodynamic forces and
moments acting on a rigid body can be linearly
superimposed[4].Theτ
Hvectorisasuperpositionof
severalhydrodynamicinteractions,whichincludethe
problems of energy dissipation on the waves
produced by a ship moving on the surface of the
waterandtheproblemofdiffractionofthesewaves.
The forces and moments caused by propagating
wavesarethesumofthree
components[5]:
added mass associated with the inertia of the
surroundingfluid;
potential attenuation associated with the
dissipation of energy generated by waves on the
surfaceofthewater;
restorativeforcesassociatedwithArchimedes’law
(weightandbuoyancy).
Basedonworks[14,23]usefollowingsystem:


vHR 22y x
x
11
1.8 1
1



TX X m kVrF
Vx
mk
(21)

HRB y
y
22
1



YYTF
Vy
mk
(22)

HRBz
zz 66
ψ
1



M
MMM
r
Yk
(23)
where:
V is the longitudinal component of ship
speed,
V
y
isthetransversalcomponentofshipspeed,
risyawrate,
𝑇
𝑣
ispropellerthrust,𝑇Bisbowthrust,𝑋
ʀ
is longitudinal component of rudder force,
𝑌
ʀ
is
transversal component of rudder force, steering
forces,
𝑀
ʀ
ismomentofrudderforce,𝑀вismomentof
bow thrust,
𝑋н is longitudinal component of
hydrodynamic force,
𝑌н is traversal component of
hydrodynamicforce,
𝑀нismomentofhydrodynamic
force,
𝐹
𝑥
,𝐹
𝑦
,𝑀
z
areexternalforcesandmomentsthat
act on the hull (wind and sea waves),
x
V
,
y
V
are
longitudinal and traversal components of ship
acceleration.Makelinearization forsimulation,write
initialdata:V(t)≡
𝑉
(forthisrpm),
𝑦
(t)≡0,

≡0,r(t)
≡0,δ≡0(rudderangle),
𝐹
𝑥
≡0,𝐹
𝑦
≡0,𝑀
𝑧
≡0.
SimulationwasexecutedforshipmodelB481.The
most important parameters that were used for
simulationresearchare inTable 2, which were used
for calculatingkinematics and hydrodynamics using
formulas and parameters, mentioned above in the
text.
213
Table2.ThemainparametersoftheshipB481forfull
loading[7]
________________________________________________
No. Variable Unit DescriptionValue
________________________________________________
1. LOA m Overall length181
2. L
PPm Lengthbetween165
perpendiculars
3. Lwm Lengthonwaterline173.15
4. Bm Breadth28.2
5. T
dm Draftonthebow9.64
6. T
rm Sterndraft9.64
7. Tm Overagedraft9.64
8. Q‐Conductivitycoefficient 0.626
9. B
md‐Fullnesscoefficient0.965
10. x
Gm Longitudinalpositionofthe 5.6
centerofgravity
11. K1‐Mainpropellercoeff.‐0.05
12. K
2m Mainpropellercoeff.4.5
13. dH
max 1/s Maxincrementofthe0.08
propellerangle
14. Hmax‐Maxpropellerangle1.0
15. n
max rpm Maxspeedrotationofmain 2.33
propeller
16. dnmax rps Maxincrementofthespeed 0.1
rotationofprop.
17. Dm Propellerdiameter5.6
18. T
SGs  Timeconstant4
19. S
pm
2
 Ruderbladesurface23.5
20. c‐Ruddercoefficient0.74
21.
max deg Maxdeflectionofthe35
rudderblade
22.
max deg/sMaximumincrementof 2.5
rudderbladedeflection
________________________________________________
5 CONSTRUCTIONOFTHEPATHCONTROL
MODELFORTHEVESSELB481INTHE
SIMULINKENVIRONMENTTOKEEPITON
LOCALPLANNINGTRAJECTORY
Using control means managed by subprogram 3 of
electronic control device (Figures 1 and 2).
Determining ship trajectory control algorithms and
theirpositioningonthebasisofamathematical
model
hasbecomeacommonpracticesincetheuseofLQG
(Linear Quadratic Gaussian) regulator and similar
techniquesbasedonthedescriptioninspaceofstates
thatwereintroducedinthe1960s[20].Successeswith
LQGregulatorsinautopilotsanddynamicpositioning
systems, as well as the emergence of
accurate
positioning systems such as GPS, have resulted in
increased interest in control systems along a given
trajectory,consistingofsectionsconnectingsuccessive
turningpoints.Theprocessofanalyzingshipsteering
systems along a given trajectory began in the early
eighties of the last century [20]. Problem solutions
werebasedon
theclassicautopilotmountedonboard
the ship, which was the heading regulator. Control
cascade systems were created by adding an
additional,externalcontrolloop,which,basedonthe
known position of the ship, determined a given
course for the internal loop in which the course
regulator was located [1].
This method of control
alongagiventrajectoryisnowcommonlyknownas
LOS (LineofSight) [8]. The advantage of the LOS
algorithmisthatconventionalautopilotsystemswith
one degree of freedom can be used in the trajectory
tracking algorithm. The nearest turning point to
which the ship
is going, together with its current
position, is converted to a smooth set course of the
vessel.Inmanycases,itisimportanttominimizethe
lateral deviation of the ship from the set trajectory.
Steeringalongapresenttrajectorymeansthatlateral
deviationfromthesettrajectoryshouldbe
minimized.
Furthersolutionsoftrajectoryregulatorsinvolvedthe
use of lateral deviation, which was the input value
takenintoaccountwhendeterminingtheruddershift
angle. The problem of maneuvering control along a
given trajectory is defined by two control objectives
andtworelatedtasksthatneedtobesolved.The
first
of these is to reach and follow the given route,
expressed in the stationary coordinate system
associatedwiththewaterareamap(geometrictask).
The second purpose of control are the requirements
related to the speeds and accelerations of the ship’s
movement, expressed in the Cartesian coordinate
system (X
B, YB), associated with the moving ship
(dynamictask).
Dependingonwhetherthevesselismovingatlow
orhighspeeds,differentsteeringsettingsareused.All
operationscanbedividedasordinaryandcritical.
Ordinaryoperations:
1.
proceedingfromporttoportinopensea;
2.
liedowninadrift;
3.
anchorage without excessive convergence toother
vessels;
Criticaloperations:
1.
proceedinginnarrowchannelsorcanals;
2.
maneuveringintheportwaterarea;
3.
mooringtotheberth,bankorothervessel;
4.
anchorage with excessive convergence to other
vessels;
5.
bunkeringinopensea;
6.
maneuveringinshallowwater;
7.
tuggingoftheship;
8.
maneuveringinstormcondition;
For the realization of those operations, it is
necessarytocreateausefulmodelofshippathcontrol
systemwhichwillexecutethescenariosofglobaland
local planning. The control of the movement of the
ship on the surface of the water is considered, the
description
of the movement of the ship has been
limited to three degrees of freedom: in the
longitudinal directions x, transverse y and angular
rotationr.Assumingmovementonlyinthehorizontal
plane,othervaluesarenegligible.
Simulationstudieswerecarriedoutforthemodel
of the control system shown
in Fig. 13. The
determination of the set trajectory was made in
MATLABwithglobalandlocalpathplanning,while
the entire model of the control system was made in
SimulinkinthesystemshowninFig.11.
Figure11.Blockdiagramofthecontrolsystemmodel
214
Figure12.Blockdiagramofthecontrolsystemmodelledin
Simulink
In this system,the controllerwas usedto control
along the given trajectory described in [21], whose
parameters were manually selected forthe model of
theB481ship.Asaresultofallmentionedabove,the
pathcontrolmodelexecuteslocalplanningtrajectory
basedonhydrodynamicparametersofshipB
481and
regulatorsettings(Fig.11).Onfigure12shownblock
diagramofthecontrolsystemmodelledinSimulink,
which purpose is to execute the ship path control.
Thus, scenarios will be global task scenarios which
will be executed in local planning as trajectory
construction and steering on the trajectory
by
proposedpathcontrolmodel,thatcanbeusedaspart
ofsubprogram3.

Figure13. Ship trajectory analyzed in this article
simulationstudies
6 CONCLUSIONS
1.
Based on the explanation of the basic control
concept of the proposed autonomous control
method founded on the two parts: planning and
execution. Figures 1 and 2 show the electronic
controldevicesandtheircollaborationwithcontrol
means. So, the main purpose of the electronic
control device is to construct the
trajectory in
subprogram SP1 and SP2 and to control passage
execution by subprogram SP3, that can contain
autopilot as part of itself or send orders to
autopilotasaresultofinformationprocession.
2.
The construction of the trajectory of the vessel in
globalandlocalplanningusingonlytheMATLAB
environment takes to account executed scenarios,
vessel condition, turning ability, value of turning
angle,distancetonextpoint,anddirectionofnext
turn. The rudder shift angles for MH and MK
ordinary are different
for the same turn, because
theruddershiftforMK isshiftedtoanot herside.
3.
The main features of computer modeling ship
hydrodynamics are the calculation of ship
conditionsonlyinfullloadcondition,inrealityit
can be another picture of trajectory, especially if
thevesselhasdifferenttrim/draughts.
4.
Construction of the path control model for the
vessel B481 in the Simulink environment
illustratedcanbeusedaspartofsubprogramSP3
oftheelectronicdevice.
REFERENCES
[1]J.vanAmerongen, and H.R.V.NautaLemke, “Recent
developmentinautomaticsteeringofships”.Journalof
Navigation,vol.39,no.3,pp.349362,1986.
[2]“COLREGS‐International Regulations for Preventing
Collisions at Sea”. In: Convention on the International
RegulationsforPreventingCollisionsatSea,1972,pp.1–
74.
[3]S. I. Demin, E. I. Zhukov, and N. A. Kubachev,
”Upravlenie sudnom”. Izd. 14. Transport. Moskwa,
1991.(inRussian)
[4]O. M. Faltinsen, Sea loads on ships and offshore
structures.CambridgeUniversityPress,1990.
[5]T. I. Fossen, Marine Control Systems: Guidance,
Navigation,andControlofShips,Rigsand
Underwater
Vehicles. Trondheim, Norway: Marine Cybernetics,
2002.
[6]T.I.Fossen,HandbookofMarineCraftHydrodynamics
andMotionControl.JohnWiley&Sons,2011.
[7]J. Galbas, Synthesis of precision ship control systems
using thrusters. PhD thesis. Technical University of
Gdańsk,1988.(inPolish)
[8]A. J. Healey, and
D. Lienard, “Multivariable sliding
mode control for autonomous diving and steering of
unmanned underwater vehicles”. IEEE Journal of
OceanicEngineering,vol.18,no.3,pp.327339,1993.
[9]IMO. Regulatory Scoping Exercise for the Use of
Maritime Autonomous Surface Ships (MASS); MSC
99/WP.9;IMO:London,UK,2018.
[10]K.S.
Kula,andM.Tomera,“Controlsystemoftraining
shipkeepingthedesiredpathconsistingofstraightlines
andcirculararcs”.TransNav,The InternationalJournal
onMarineNavigationandSafetyofSeaTransportation,
vol.11,no.4,pp.711719,2017.
[11]O. Kupraty, “Mathematical modeling trajectory of a
ship as
a control object in global planning”. Transport
development,vol.1,no.6,pp.4055,2020.
[12]O. Kupraty, “Mathematical modeling of the trajectory
ofashipasacontrolobjectinlocalplanning”.InProc.
MATECWeb of Conferences, vol. 339, 01015, pp. 113,
2021.
[13]O. Kupraty, “Implementation
of the algorithm for
calculation course (bearing) on rhumb line and
constructingthetrajectoryoftheship’sturningcirclein
theMATLABprogrammingenvironment”.Thescientific
heritageNo60(2021),pp.4045,2021.
[14]O.Kupraty,“Mathematicalmodellingofconstructionof
shipturningtrajectory using autonomousbowthruster
work and
research of bow thruster control specifics”.
Scientific Journal of Gdynia Maritime University, no.
118,pp.723,2021.
[15]A.Lazarowska,“Trajectorybasemethodforship’ssafe
pathplanning”.ProcediaComputerScience,vol.96,pp.
1022–1031,2016.
215
[16]J. Lisowski, “Analysis of methods of determining the
safeshiptrajectory”.TransNav,theInternationalJournal
onMarineNavigationandSafetyofSeaTransportation,
vol.10,no.2,pp.223228,2016.
[17]A. Shakhov, and O. Kupraty, “Basic project of
autonomousmainenginecontrolanditimplementation
in C# (C
sharp) environment”. In Proc.IEEE 16
th
International Conference on Computer Sciences and
InformationTechnologies(CSIT),2021,pp.319322
[18]W.Ślączka,andJ.Guziewicz,”Methodsofdetermining
themaneuveringareaofashipusedinsimulationtests”,
in International Scientific and Technical Conference on
Sea Traffic Engineering, M. Jurdzi ński, J. Sitarz (Eds.),
Szczecin:
WyższaSzkołaMorska, 1997,pp.125142.(in
Polish).
[19]R.Śmierzchalski,andA.Łebkowski.“Movingobjectsin
the problem of path planning by evolutionary
computation”.inNeuralNetworksandSoftComputing,
L. Rutkowski, J. Kacprzyk, Eds. Berlin Heidelberg:
SpringerVerlag,2002,pp.382386.
[20]M.Tomera,Switching
BasedMultiOperationalControl
ofShipMotion.Warsaw:EXIT,2018.
[21]M. Tomera, andŁ. Alfuth, “Waypoint path controller
for ships”. TransNav. The International Journal on
Marine Navigation and Safety of Sea Transportation,
vol.14,no.20,pp.375383,2020.
[22]G. B. Vilskiy, A. S. Maltsev, V. V.
Bezdolny, and E. I.
Gonczarov, Navigaczionnaya bezopasnost
priloczmanskoj provodke sudov. OdessaNikolaev:
Feniks,2007.(inRussian)
[23]E. I. Wieriemiej, Sriednie kwadraticznaja
mnogocielewaja optimizacija: uczeb. posobije, SPb, St.
Petersburg,2016.(inRussian)