35
1 INTRODUCTION
Since2003,Chinahasbeguntodeployedshorebased
AIS stations, which gradually covers all key coastal
waters as well as the important ports along China
coastline.Now,theAISreportscollectedbytheseAIS
stationsarewidelyusedinmarinetrafficsupervising,
marine traffic statistics and marine accident
invest
igations, and so on, by maritime safety
authoritiesorportauthorities.
According to the performance standards of ship
borne Automatic Identification System, ship static
information is broadcast every 6 minutes or when
asked, and the minimum interval of broadcasting
dynamic information reports is 2 seconds and the
maximumis3minutes[1].Accordingtostatisticsin
Shanghai[2],dynamicinformat
ionofabout15%ships
isnotupdatedin3minutes,dynamicinformationof
about 10% ships is not updated in 5 minutes, and
dynamic information of about 5% ships is not
updated in 15 minutes. There are two reasons
contributedtothi
sdelay.Oneisthatthedeployment
ofbasestationsisnotsensible,andanotheristhatthe
crowdedmarine trafficlikeinport of Shanghaimay
result in AIS information transmission blocking. In
consequence, it is necessary to develop a algorithm
forinterpolatingshipAISmotionvectorstoestimate
the lost ship AIS reports when replaying ma
rine
traffic accidents oranalysing themarine trafficwith
AISreportscollectedbyshorebasedAISstations.
In recent years, the research on smoothing and
recoveringthetrajectoryofmovingobjectshasmade
abundant achievements. An Extended Kalman Filter
(EKF)wasproposedfortheesti
mationofvesselstates
and further used for the prediction of vessel
trajectories[3].AdatamodelofHCFMOST(History
CurrentFutureMovingObjectsSpatioTemporal)was
presented and the trajectories of moving objectives
An Algorithm for Interpolating Ship Motion Vectors
Q.Hu,F.Cai,C.Yang&C.Shi
M
erchantMarineCollege,ShanghaiMaritimeUniversity,Shanghai,China
ABSTRACT:InterpolationofshipmotionvectorsisabletobeusedforestimatingthelostshipAISdynamic
information, which is important for replaying marine accidents and for analysing marine traffic data. The
previous methods can only interpolate ship’s position, while not including shipʹs course and speed. In thi
s
paper,vectorfunctionisusedtoexpresstherelationshipbetweentheship’stimeandspacecoordinates,and
the tangent of the vector function and its change rate are able to express physical characteristics of ship’s
course,speedandacceleration.ThegivenAISdynamicinformat
ioncanbeappliedtocalculatetheparameters
ofshipʹsvectorfunctionandthentheinterpolationmodelforshipmotionvectorsisdevelopedtoestimatethe
lost ship dynamic information at any given moment. Experiment results show that the ship motion vector
functionisabletodepictthecharacteristicsofshipmotionsaccuratelyandthemodelcanesti
matenotonlythe
ship’spositionbutalsoship’scourseandspeedatanygivenmomentwithlimiteddifferences.
http://www.transnav.eu
the International Journal
on Marine Navigation
and Safety of Sea Transportation
Volume 8
Number 1
March 2014
DOI:10.12716/1001.08.01.04
36
werestimulatedbyusingcubicHermiteinterpolation
[4]. These methods, however, could not restore or
predictshipmotionatanygiventime.
Thecurvebasedmodelwaspresentedtoprovide
much more accurate trajectory [5]. A generalized
trajectory interpolation model using parametric
trajectory representations was proposed in [6].
Smooth trajectory
tracking interpolation on a robot
simulatorandinterpolationofmobilerobottrajectory
tracking control were presented in [7] and [8].
Piecewise cubic spline interpolation was used for
restoringvesseltrackbasedonAISInformationin[9].
The 5thorder RungeKuttaNystrom method was
presented to interpolate ship positions for
onboard
navigationsystems[10].Aspatiotemporaluncertainty
modelwasproposedforinterpolationofcontinuously
changingdataobjects[1112].Thesemethodsareable
tobeusedforsmoothingtrajectory,however,notfor
movingobjects’velocityanddirection.
In order to depict the physical relationship
between the time and space parameters
of a ship,
vectorfunctionisintroducedinthispaper,thenship
motion vector function is constructed and
interpolationmodelissetup.WithgivenAISreport
information, the parameters of ship motion vector
interpolationmodelcanbedetermined,andthenthe
modelcanbeusedtoestimateshipʹs
position,course
andspeedatanygiventime.
This paper is organized as follows: Section 2 presents
ship motion vector function. Section 3 introduces the
model for interpolating ship motion vectors and the
model’sparametersisoptimized. Section4describes
themethodcalculateshipmovingaccelerationwhich
is not reported by AIS. Section 5 demonstrates an
experiment and related error analysis. Finally,
conclusionsaregiveninsection6.
2 SHIPMOTIONVECTORFUNCTION
ShipsnavigateinatwodimensionalEuclideanspace.
Let vector function r(t) be ship’s motion vector
function,then giventime t
0,radial vector
r(t
0)={x(t0),y(t0)} can express ship’s position. Tangent
vectorr(t
0)={x(t0),y(t0)}candenoteship’sspeedand
ship’scourse.Vectorr(t
0) andvectorr(t0)candepict
ship’smotionstate,asshowninFig1.
y
)}('),('{)('
000
r tytxt
)}(),({)( 000r tytxt
))(),(()( tytxt rr
x
Figure1.Vectorfunctionofshipmovements
3 MODELFORINTERPOLATINGSHIPMOTION
VECTORS
Given vector function which indicates ship’s
movement, interpolation model for ship motion
vectors is set up. Then the physical characteristics
betweenshipandship’sspeed,headingareanalysed.
3.1 Modelforinterpolatingmovingobject’strajectory
In order to make sure that the model expresses
movingobjects’ motion vectors as accurate as
possible,firstly,vectorfunctionmustsatisfythegiven
motion vectors of the movingobject. Secondly, the
model for interpolating movingobject’s motion
vectorsissetup.Themodelforinterpolatingmoving
objects’motionvectorsisdefinedasfollows.
Foranygivenadjacenttime
i
t
and
j
t
)(
ji
tt
and
their interval
[, ]
ij
tt
,coordinate vector and high
order coordinate vector of
i
t
and
j
t
are
() () ()
() { (), ()}
nnn
iii
txtytr
and
() () ()
() { (), ()}
nnn
jjj
txtytr
,
,...)2,1,0( n
respectively,andvectorfunctionofthemovingobject
at time t (
[, ]
ij
ttt
) can be expressed by Equation
(1).
21 21
00
() { (), ()} { , }
nn
kk
kk
kk
txtyt at bt




r (1)
where
,
kk
ab
,
)12,...,2,1,0(
nk
should meet
Equation(2)and(3).
() ()
()
nn
ii
ttrr (2)
() ()
()
nn
jj
ttrr (3)
3.2 Parametersofthemodelforinterpolatingship’s
motionvectors
Inordertodevelopthe model forinterpolatingship
motion vectors, the parameters a
k, bk of the
interpolation model is to be determined in this
section.
According to Equation (1), the order of vector
functionatanytimetisdependedonthevalue ofk
whichisfurtherdependedonthevalueofn.ifn=1,
thenk = 3,andif
n=2,thenk=5.Assumingattimeti
and tj, ship dynamic information includes position,
courseCandspeedv.Whenn=1,theneachorderof
ship radial vector functions are expressed by
Equation(4),(5),(6)and(7).
{(), ()}
iii
tyt
r  (4)
{( ), ( )}
jjj
x
tyt
r
(5)
' {cos( ) ,sin( ) }
ii ii
itttt
Cv Cv
r
(6)
37
'{cos( ) ,sin( )}
jj jj
j
tt tt
Cv Cvr
(7)
Amongthem,r
iand rj show the radialvectorsof
shipattimet
iandtjrespectively,riandrjshowthe
velocityvectorsofshipattimet
iandtjrespectively.
AccordingtoEquation(2),theparametervector a
k
canbeachievedbyEquation(8).
0
1
2
3
1000
0010
()'
33 21
221 1
()'
jii
ji
a
a
tt
a
a
tt













i
j
j
r
r
r
r
(8)
Similarly, if n = 2, suppose r
i’’and rj’’ showthe
acceleration vectors of ship at time t
i and tj
respectively,theparametervectorakcanbeachieved
byEquation(9)

Τ
012345
2
2
100000
0010 0 0
()'
00000.50
()'
10 10 6 4 1.5 0.5
15 15 8 7 1.5 1
()''
66 330.50.5
()''
ji
ji
ji
ji
aaaaaa
tt
tt
tt
tt























i
j
i
j
i
j
r
r
r
r
r
r
(9)
the parameter vector b
k can also be achieved in the
similarway.
FromEquation(8)and(9),itisobviouslythatthe
valuesofthemodel’sparametersaredirectlyrelated
to the distance of the given two motion nodes. In
ordertoacquireidealparametersandaccuratemodel,
the condition as Equation (10) shows should be
satisfiedbeforeint
erpolating[13].

max ' , ' 3 ( ) ( )
ij i j
ttrr r r (10)
3.3 Connectionconditionsofthemodelforinterpolating
shipmotionvectors
Insection3.1and3.2,thispaperdevelopsthemodel
for interpolating ship motion vectors between two
given adjacent ship motion vectors. The trajectory
nearthejointoftwo segments whichare formed by
the given ship motion vectors and int
erpolated
motionvectors,however,isnotcertaintobesmooth.
Inorderto constructatrajectorysatisfying withC
2

[14] standard, two adjacent interpolated trajectories
should be connected in C
2
at the connection point.
Therefore, it is necessary to discuss the connection
conditions of two adjacent interpolated trajectories.
SuBuqinghas presented itsnecessaryandsufficient
conditionsin[14].
Given two intervals
1
[,]
jj
tt
and
1
[, ]
jj
tt
,
interpolated trajectories of ship are
()t
1
r
and
()t
2
r
,
thesufficientandnecessaryconditionsformeetingC
2
standard at the connection point
j
t
is expressed by
Equation(11).
2
() ()
'( ) '( )
''( ) ''( ) '( )
jj
jj
jjj
tt
t α t
t α t β t

12
12
122
rr
rr
rrr
(11)
where
α
and
β
are constants, and usually,
α
and
β
have two kinds of values. One case is
1α
and
0β
, which is suitable for equal time
interval motion vectors, otherwise interpolated
trajectory will be shaking. Another case
is
11
( ) () () ( )
jjjj
α tttt


1122
rrrr
and
0β
,
which is suitable for parametric interpolation. The
latterkindofvaluesisusedinthispaper.
4 CALCULATIONOFSHIP’SACCELERATION
Todevelopamoreaccuratemodelforinterpolateship
motionvectors,itisnecessarytointroducehighorder
parameters, i.e. acceleration of ship motion, into the
modelasEquation(9)shows.However,AISdoesnot
reportship’saccelerationrightnow,soit’snecessary
todevelopamethodtoesti
mateitwithneighbouring
shipmotionvectors.
Obviously, the closer between the estimated
acceleration and actual acceleration, the more
accurate the interpolation model is. Greater time
difference between two adjacent motion nodes will
lead to greater error. Therefore, more timeadjacent
motion nodes will be selected to calculate the
accelerationatagivennode.
For example, given three ship motion nodes at
ti
me t
i1, ti, and ti+1 as shown in Fig. 2, difference of
timeΔt
i1=titi1,Δti=ti+1tianddifferenceofspeedΔ vi
1=vivi1,Δvi=vi+1vi., if Δti>Δti1, then
1
1
i
i
i
a
t
and if
Δt
i<Δti1 then
i
i
i
a
t
, where ai denotes ship
movingaccelerationattime
ti.
x
y
11 111
(, , ,,)
ii iii
x
yCtv

1
(, , ,,)
ii i ii
x
yC tv
1
(, , ,,)
j
ji jj
x
yC tv
Figure2.Distributionofship’sadjacentnodes
38
5 EXPERIMENT
AIS dynamic reports are used to verify the
effectiveness of the model introduced in this paper.
For better demonstration, this paper uses the AIS
dynamic reports, totally 1400 reports or motion
vectors in this paper, of a ship with MMSI of
412049010from1426to2159localtimeonJanuary31,
2013,whenshenavigatednearthemouthofYa
ngzte
Riverwherethetrafficisverycrowdedandshipneed
change course or speed frequently. Fig 3 shows the
trajectory constructed with the given AIS dynamic
reports.
Theexperimentalstepsareasfollows.
1 Extracted Sampling nodes from ship’s AIS
dynamicinformat
ionastheinterpolationnodes,as
showninFig4.
2 Set up the model for interpolating ship’s motion
vectors with determined sampling points. The
stepstointerpolateshipmotionvectorsareshown
intable1.
Interpolated trajectory is shown in Fig 5 while
interpolated courses and speeds are shown in
Fig6.Inordertoanalyzethedifferencesbetween
the esti
mated motion vectors and the observed
motion vectors, the experiment estimates the
motionvectorsforthemomentscorrespondingto
eachobservedmotionvectors.
3 Calculating differences of ship’s position, speed
andcoursebetweentheestimatedmotion vectors
andthecorrespondingobservedvectorsasshown
inFig.8,10,12.
Table1.Stepsforinterpolatingshipmotionvectors
_______________________________________________
step actions
_______________________________________________
1 Construct ship motion vector sequence in time ascending
order with ship AIS dynamic information records, and let
counter i= 0.
2 the ith (if any), (i+1)
th
, (i+2)
th
, and (i+3)
th
(if any) motion
vectors are selected.
3 The model for interpolation of vectors between the (i+1)
th
and (i+2)
th
motion vectors, is set up with given four motion
vectors.
4 Interpolate all ship motion vectors between the (i+1)
th
and
(i+2)
th
motion vectors with designated interval or strategy.
5 Update speed and acceleration of the (i+2)
th
motion vector,
let i=i+1, if i = n-2, then quit, otherwise back to step 2,
where n is the number of all given vectors.
_______________________________________________
Figure3.Motionnodesfromship’sAISdata
Figure4Samplingnodesfromship’sAISdata
Figure5.Observedtrajectoryandestimatedtrajectory
39
Figure6.Interpolatedvelocityvectors
Figure7. Average position differences under different
samplingratios
Figure8.Positiondifferencesofsamplingratio107/1400
Figure9. Average course differences under different
samplingratios
Figure10.Coursedifferencesofsamplingratio107/1400
Figure11. Average speed differences under different
samplingratios
40
Figure12.Speeddifferencesofsamplingratio107/1400
From the above charts, it’s obvious that this
algorithmisfeasibleandwithincreasingofsampling
nodes, the differences between interpolated motion
vectors and the observed motion vectors decreased
significantlyasshowninfigure7,9,11.
6 CONCLUSIONS
Inthispaper,vectorfunctionisintroducedtoexpress
shipmotionvectors,andbased
onit,the model and
the algorithm for interpolating ship motion vectors
aredevelopedtoestimate the lostshipAISdynamic
reports which often arise in crowded waters.
Experiment results show that the estimated ship
motion vectors are very close to the observed
position, course and speed if the given
observed
motion vectors satisfied the introduced condition.
Moreover, the more AIS dynamic reports are given,
theclosertheestimatedva lueandobservedvalueare.
Thealgorithmintroducedinthispapercanplaya
significantrolewhenreplayingthe marineaccidents
oranalysingthemarinetrafficrelatingtothewaters
whereAIS
reportlostoftenoccurs.
REFERENCES
[1]RecommendationITURM.13714,Technical
characteristics for an automatic identification system
using timedivisionmultiple access in the VHF
maritimemobileband2010.4
[2]ShanghaiMaritimeTrafficSafetyIndexRealtimeStudy
Important Waters. Reports, Shanghai Maritime
University20121015.
[3]Perera L POliveira PGuedes Soares
C. Maritime
TrafficMonitoringBasedonVesselDetection,Tracking,
State Estimation, and Trajectory Prediction. Intelligent
TransportationSystems,IEEETransactionson,2012(13):
11881200.
[4]LU Yansheng CHAZhiyong Pan Peng.An
improvequeedspatiotemporaldatamodelformoving
objects.JournalofHuaZhongUniversityofScienceand
Technology:NaturalScience2006(8):3235.
[5]YU B KIM S H BAILEY T etal .CurveBased
Representation of Moving Object Trajectories. IEEE
International Database Engineering and Applications
Symposium2004419425.
[6]YU BKIM S H. Interpolating and Using Most Likely
TrajectoriesinMovingObjectsDatabases.Databaseand
Expert Systems Applications. Springer Berlin
Heidelberg2006718~727.
[7]PACHECO RRHOUNSELL M SROSSO R S Uet
al.SmoothTrajectoryTrackingInterpolationonARobot
Simulator.RoboticsSymposiumandIntelligentRobotic
Meeting (LARS)2010 Latin American. IEEE2010
13~18.
[8]LIU Z ZHAO J ZHANG L et
al. Realization of
Mobile Robot Trajectory Tracking Control Based on
Interpolation.IndustrialElectronics,2009.ISIE2009.IEEE
InternationalSymposiumon.IEEE 2009 648~651.
[9]LingzhiS,XinpingY,ZheM,etal.RestoringMethodof
Vessel Track Based on AIS Information. Distributed
ComputingandApplicationstoBusiness,Engineering&
Science
(DCABES), 2012 11th International Symposium
on.IEEE,2012:336340.
[10]MONTENBRUCK O, GILL E. State Interpolation for
OnBoard Navigation Systems. Aerospace Science and
Technology2001(5)209220.
[11]YU B.A Spatiotemporal Uncertainty Model of Degree
1.5 for Continuously Changing Data Objects.
Proceedings of the 2006 ACM Symposium on
Applied
Computing.ACM2006 11501155.
[12]YUB KIMSH ALKOBAISISetal.TheTornado
Model: Uncertainty Model for Continuously Changing
Data. Advances in Databases: Concepts, Systems and
Applications. Springer Berlin Heidelberg2007624
636.
[13]Pratt M J,FAUX I D.Computational Geometry for
designandmanufacture.
EllisHorwoodLtd,1979.
[14]SU Buqing ZHOU Dingyuan.Computation
Geometry.ShanghaiShanghaiScienceandTechnology
Press.1981.