International Journal
on Marine Navigation
and Safety of Sea Transportation
Volume 3
Number 1
March 2009
105
Identification of Ship Maneuvering Model
Using Extended Kalman Filters
C. Shi, D. Zhao, J. Peng & C. Shen
Merchant Marine College, Shanghai Maritime University, Shanghai, China
1 INTRODUCTION
Ship maneuvering models are the keys to the re-
search of ship maneuverability, design of ship mo-
tion control system and development of ship han-
dling simulators (Shi et al 2006). For various frames
of ship maneuvering models, determining the pa-
rameters of the models is always a tedious task. The
usual approach to determine the ship model parame-
ters is the ship model test. Ship model test is a relia-
5
The research work in this paper is partially sponsored by the Shang-
hai Leading Academic Discipline Project (grant number: S30602), and
the Hi-Tech Research and Development Program of China (grant
number: 2007AA11Z249).
ble and accurate method for this purpose. The test is,
however, expensive and time-consuming, and usual-
ly dependent on some specific model frame, which
limits the application of the valuable data (Li 1999).
System identification theory can be used to establish
system mathematical models by the system’s input
data and output data. And it has been effectively
used in the fields of space technology (Lacy et al
2005), robotic engineering and underwater engineer-
ing (Liu et al 2002). Various methodologies have
been employed for system identification tasks,
which include neural network (Naren-
dra&Parthasarathy 1990), wavelet analysis (Shi et al
2005), and genetic algorithm (Nyarko&Scitovski
2004). Most of the methodologies prove quite effec-
tive with the linear system identification.
ABSTRACT: Ship maneuvering models are the keys to the research of ship maneuverability, design of ship
motion control system and development of ship handling simulators. For various frames of ship maneuvering
models, determining the parameters of the models is always a tedious task. System identification theory can
be used to establish system mathematical models by the system’s input data and output data. In this paper,
based on the analysis of ship hydrodynamics, a nonlinear model frame of ship maneuvering is established.
System identification theory is employed to estimate the parameters of the model. An algorithm based on the
extended Kalman filter theory is proposed to calculate the parameters. In order to gain the system’s input and
output data, which is necessary for the parameters identification experiment, turning circle tests and Zig-zag
tests are performed on shiphandling simulator and the initial data is collected. Based on the Fixed Interval
Kalman Smoothing algorithm, a pre-processing algorithm is proposed to process the raw data of the tests.
With this algorithm, the errors introduced during the measurement process are eliminated. Parameters identi-
fication experiments are designed to estimate the model parameters, and the ship maneuvering model parame-
ters estimation algorithm is extended to modify the parameters being estimated. Then the model parameters
and the ship maneuvering model are determined. Simulation validation was carried out to simulate the ship
maneuverability. Comparisons have been made to the simulated data and measured data. The results show
that the ship maneuvering model determined by our approach can seasonably reflect the actual motion of ship,
and the parameter estimation procedure and algorithms are effective.
106
To most applications, the linear ship maneuvering
models present limitations because of lack of accu-
racy. The Kalman filter is an efficient recursive filter
that estimates the state of a dynamic system from a
series of noisy measurements (Kalman 1960). It is
able to provide solutions to what probably are the
most fundamental problems in control theory. The
extended Kalman filter (EKF) is the nonlinear ver-
sion of the Kalman filter and is often considered the
de facto standard in the theory of nonlinear state es-
timation (Leondes et al 1970). EKF is widely used in
areas of state estimation, object tracking and naviga-
tion(Beides&Heydt 1991, Farina et al 2002).
Base on EKF and augmented state equation, this
paper intended to tackle identification of non-linear
ship maneuvering models.
2 EQUATIONS OF SHIP HORIZONTAL
MOTION
Two coordinates are set for the description of ships
horizontal motion, as shown in Figure 1.
E
ξη
−−
is
the space coordinate, and the plane E
ξη
lies on the
water plane.
Oxy−−
is the ship coordinate. Plane
Oxy
is parallel to E
ξη
. The origin of the coordinate,
O, is attached on the ships center of gravity. It is so
oriented that Ox is aligned with ships fore and aft
line with forward as positive direction, and Oy is
aligned abeam and with starboard side as positive di-
rection. Let
U
be ships velocity, and
β
be the drift
angle.
Figure1. Ships horizontal motion coordinates
Then the motion equations of ship on water sur-
face can be established as,
() ( () () ) ()
() () ()
t t tt t
t tt
x = f x ,s , + w
y = Hx + e
(1)
where
[ ]
T
() () () ()t ut vt rt=x
,
[ ]
T
() () ()t t nt
δ
=s
,
33×
=HI
,
[ ]
T
123
fff=f
. And
u
denotes ships
longitudinal velocity,
v
, the lateral velocity,
r
, the
turning rate of ships heading,
δ
, the rudder angle
and
n
, the propeller RPM.
Based on the standard state of the straight motion
of ship with constant speed along
x
axis, the func-
tions
f
in Equation 1 can be expanded into Taylor
series. Compromising the accuracy of the modes and
the complexity of the computation of parameter
identification, Only are the second and lower order
series preserved. Further assumptions are made that
the ship is symmetrical with x axis and nearly sym-
metrical with y axis, and that the origin of the coor-
dinate of ship motion is on the gravity center of the
ship. With these assumptions, some of the partial de-
rivatives in the Taylor series would be zeros and the
equations can be further simplified. Because the
longitudinal resistance is proportional to
2
u
, the zero
order, the first order and the second order items of
u
can be combined and represented as
2
1
()au t
(Li
1999). Then we have,
222 2
11234 5
2
6789
21 2 3 4
31 2 3
() () () () () ()
() () () () () () ()
() () () () ()
() () ()
fautavtartatavtrt
avttarttautntant
fbvtbrtbtbutrt
fcvtcrtct
δ
δδ
δ
δ
=+++ +
++ + +
=+++
=++
(2)
where
( 1, 2, , 9)
i
ai=
,
( 1,2,3,4)
i
bi=
,
( 1, 2, 3)
i
ci=
are
the parameters of the model. The identification task
is to determine these parameters.
3 CALCULATION OF MODEL PARAMETERS
USING EKF
In order to identify the parameters,
i
a
,
i
b
and
i
c
, of
ship maneuvering model, the extended Kalman filter
(EKF) algorithm is employed. The parameters of the
model are also taken as the state variables and then
the augmented state space contains the model pa-
rameters as well as the original state variables.
Hence, the augmented state equation can be estab-
lished. Our algorithm of parameter identification is
based on the EKF method and the augmented state
equation.
Take the parameters,
i
a
,
i
b
and
i
c
, in Equation 2
as state variables and expand Equation 1, then the
augmented state equation and the observation equa-
tion are established as,
() ( (), (),) ()
() () ()
a aa
a
t t tt t
t tt
= +
= +
x fx s w
y Hx e
(3)
where
[ ]
T
1 19
() () () () () () ()
a
iii
t utvtrtatbtct
×
=x
3 19
1000 0
0100 0
0010 0
×


=



H
107
Equation 3 can be discretized and transformed in-
to the following discrete non-linear state function,
( 1) ( (), (),) ()
() () ()
a aa
m
a
k k kk k
k kk
+= +
= +
x fx s ω
y Hx e
(4)
Where
()
m
ks
denotes the average value of sampled
values of inputs at
()Tk
and
( 1)Tk+
.
T
is the sam-
pling period.
()kω
and
()ke
are white noise series
with variances of
Q
and
R
, respectively. And,
T
1 2 19
a aa a
ff f

=

f
.
Where,
222
11 2 3
2
45 6
2
789
2123
4
3
() ()() ()() ()()
() () ()()() ()() ()
()() () ()() () () ()
() ()() ()() () ()
()()()
()
a
mm
m mm
a
m
a
f u k Ta k u k Ta k v k Ta k r k
Ta k k Ta k v k r k Ta k v k k
Ta k r k k Ta k u k n k Ta k n k
f v k Tb k v k Tb k r k Tb k k
Tb k u k r k
f rk T
δδ
δ
δ
=+++
++ +
++ +
=+++ +
= +
123
41
19 3
()() ()() () ()
()
()
m
a
a
c k v k Tc k r k Tc k k
f ak
f ck
δ
++
=
=
By Equation 4, we have the following EKF recur-
sive equations,
T
T T1
ˆ ˆ
( 1| ) ( ( ), ( ), )
( 1| ) ( )
(1) (1|)[ (1|) ]
(1)[ (1)](1|)
ˆ ˆ ˆ
(1) (1|) (1)[(1) (1|)]
a aa
m
aa
k k k kk
kk k
k kk kk
k k kk
k kk k k kk
+=
+= +
+= + + +
+= + +
+= + + + +− +
a
x fx s
P ΦP Φ Q
KPHHPHR
P I K HP
x x K y Hx
(5)
where
ˆ
()
a
a
aa
k
=
x =x
f
Φ
x
By the recursive Equation 5, the filtered vector,
ˆ
()
a
kx
, of the augmented state equation (Equ. 4) can
be calculated. Thereby the estimated model parame-
ters,
i
a
,
i
b
and
i
c
, are determined. And hence the
ship maneuvering model can be established.
4 IDENTIFICATION PROCEDURES AND
VALIDATION ANALYSIS
Shiphandling simulator is used to perform the identi-
fication experiment. There are several advantages by
using the data retrieved from the shiphandling simu-
lators for the identification purpose. Firstly, simula-
tors can provide the data of ship motion without in-
terference of external factors such as the effect of
wind and current. Secondly, accurate ship parame-
ters and maneuvering characteristic are provided.
And thirdly, ideal environmental conditions, e.g.,
uniform water depth, can be set with the operational
areas.
4.1 Data preprocessing
To get the raw data, Zig-zag test is performed with a
shiphandling simulator. The data are recorded with
sampling period T=2s. The recorded data are: ship
position,
,ss
ξη
, in space coordinate, ships heading
φ
, rudder angle
δ
and propeller RPM
n
. Other data
needed, such as ships longitudinal speed
u
, lateral
speed
v
, and rate of turn r, can be deduced from the
recorded data.
Let
s
ξ
be the displacement of ship position on
E
ξ
, and
u
ξ
,
a
ξ
be the speed and acceleration re-
spectively, which can be calculated using
s
ξ
.
The ship motion along
E
ξ
can be described by the
following state equation and observation equa-
tion,
( 1) () ()
() () () ()
k kk
k kk k
+
+
X=ΦX+ω
Z =H X n
(6)
where,
T
() () () ()k sk uk ak
ξξξ

=

X
,
2
2
1
01
00 1
T
T
T


=



Φ
,
[ ]
100=H
,
() ()k sk
ξ

=

Z
.
And
()kω
is the white noise series with zero mean
and variance
Q
,
543
1 11
20 8 6
24 3 2
1 11
8 32
32
11
62
2
a
TTT
T TT
T TT
ασ


=



Q
()kn
is the white noise series with zero mean and
variance
2
R
σ
,
a
ξ
is the acceleration of the ship mo-
tion along
E
ξ
, and
2
a
σ
is its variance.
α
is the oper-
ation parameter and
T
is the sampling period
(
T
=2s). By Equation 6we have the following re-
cursive equations of Kalman filter.
T
T T 2 -1
ˆ ˆ
( 1| ) ( )
( 1| ) () ()
(1) (1|)[ (1|) ]
(1)[ (1)](1|)
ˆ ˆ ˆ
(1) (1|) (1)[(1) (1|)]
R
kk k
kk k k
k kk kk
k k kk
k kk k k kk
σ
+=
+= +
+= + + +
+ −+ +
+= + + + +− +
X ΦX
P ΦP Φ Q
KPHHPHI
P =I K HP
X X K Z HX
(7)
108
and the smoothing equations for fixed intervals,
T -1
ˆ ˆ ˆ ˆ
( | ) () ()[( 1| ) ()]
() () ( 1| )
s
s
kN k k k N k
k k kk
=+ +−
= +
x x Ax Φx
APΦ P
(8)
The initial conditions for the recursive Kalman
filter are,
(2) (1)
ˆ
(2) (2) 0
ZZ
T
Z

=


X
2
2
22
2
2
0
(2) 0
0 00
R
R
RR
T
T
T
σ
σσ
σ



=




P
And the initial condition for fixed interval
smoothing is,
ˆ ˆ
( | ) ()NN N=XX
By the optimal smoothed vector
ˆ
(| )kNx
the
ship’s velocity along the
E
ξ
axis,
u
ξ
, can be calcu-
lated.
With similar approaches, the ships velocity
u
η
along the
E
η
axis can be calculated from the dis-
placement,
s
η
, on the
E
η
axis. The rate of turn,
r
,
can be calculated using ship’s heading,
φ
.
The ship’s motion speed is,
22
,U
uu
η
ξ
=
+
And the course made good is,
arctan( )
u
u
ξ
η
ϕ
=
.
And then ship’s longitudinal and lateral velocities
are,
cos ,
sin .
u
v
β
β
=
=
(9)
where
β
is the drifting angle,
βϕφ
=
.
By the preprocessing of the raw data of ship ma-
neuvering tests, we get the smoothed data,
δ
, n,
u
,
v
and
r
, which can be used for model parameter
identification. Figures 2 and 3 illustrate the rate of
turn calculated from the raw data and the smooth re-
sult, respectively.
Figure 2. Rate of turn calculated from raw data.
Figure 3. Smoothed rate of turn.
4.2 Parameter identification
With the augmented state space, the model parame-
ters in the discrete state equation, Equation 4, are
identified. In our experiment, the initial conditions
for recursive Equation 5 are set as,
(0)
α
=PI
, where
5
10
α
=
and
I
,
19 19×
identical
matrix
[ ]
T
ˆ
(0) (0) (0) (0) 0 0
a
uvr=x
Table 1 shows the result of the identification.
109
Table 1. Result of parameter identification
Param
Value
Param
Value
a
1
1.4347×10
-4
a
2
-5.4857×10
-1
a
3
-5.0703×10
-2
a
4
-7.8174×10
-6
a
5
-2.4131×10
-1
a
6
2.0968×10
-4
a
7
1.7521×10
-4
a
8
-3.8163×10
-5
a
9
3.8536×10
-6
b
1
-1.7511×10
-1
b
2
3.3215×10
-2
b
3
-2.1508×10
-4
b
4
-3.125×10
-2
c
1
-1.8988×10
-2
c
2
-2.2555×10
-2
c
3
1.9627×10
-4
4.3 Convergence and verification of the parameters
In the experiment, the parameters converged quite
well after 200 recursive steps. The convergence sta-
tus of some of the parameters are shown in Figures
4-6.
Figure 4. Convergence of the parameters a
1
Figure 5. Convergence of the parameters b
2
Figure 6. Convergence of the parameters c
1
Using the identified parameters,
i
a
,
i
b
,
i
c
, the
non-linear maneuvering model of the target ship can
be established. We verify the identified model by
performing standard maneuvering tests such as turn-
ing circle test, spiral test, zig-zag test, etc., and com-
pare the results. Figure 3 shows the comparison of
the ship’s headings of zig-zag tests of the identified
model and the target ship. Figure 3 is the speed
comparison. The comparison of the turning circle
tests is illustrated in Figure 4, together with the er-
rors of its elements listed in Table 2. From these re-
sults it can be seen that the model output agrees
quite well with that of the target ship. Simulation
tests show that the ship maneuvering model estab-
lished by our approach can represent the ship ma-
neuvering with reasonable accuracy.
Figure 7. Heading comparison in 20/20 Zig-zag test
110
Figure 8. Speed comparison in 20/20 Zig-zag test
Figure 9. Turning circle comparison
Table 2. Errors with turning circle test.
Items Measured Simulated Error(%)
Advance
790.0
805.0
1.90
Transfer
500.0
525.0
5.00
Diameter 980.0 978.0 -0.20
5 CONCLUSIONS
Based on the analysis of ship hydrodynamics, a non-
linear model frame of ship maneuvering is estab-
lished. System identification theory is employed to
estimate the parameters of the model. An algorithm
based on the extended Kalman filter theory is pro-
posed to calculate the parameters. In order to get da-
ta samples for the parameters identification experi-
ment, turning circle tests and Zig-zag tests are
performed on shiphandling simulator and the raw
data is collected. Based on the Fixed Interval Kal-
man Smoothing algorithm, a pre-processing algo-
rithm is proposed to process the raw data of the tests.
With this algorithm, the errors introduced during the
measurement process are eliminated. Parameters
identification experiments are designed to estimate
the model parameters, and the ship maneuvering
model parameters estimation algorithm is extended
to modify the parameters being estimated. Then the
model parameters and the ship maneuvering model
are determined. Simulation validation was carried
out to simulate the ship maneuverability. Compari-
sons have been made to the simulated data and
measured data. The results show that the ship ma-
neuvering model determined by our approach can
reasonably reflect the actual motion of ships, and the
parameter estimation procedure and algorithms are
effective.
REFERENCES
Beides, H.M., G.T. Heydt, 1991, Dynamic State Estimation of
Power System Harmonics Using Kalman Filter Methodolo-
gy, IEEE Transactions on Power Delivery, 6(4): 1663~1670
Farina A. et al, 2002, Tracking A Ballistic Target: Comparison
of Several Nonlinear Filters. IEEE Transactions on Aero-
space and Electronic Systems, 38(3): 854~867.
Kalman, R.E., 1960, A New Approach to Linear Filtering and
Prediction Problems. Transactions of the ASME-Journal of
Basic Engineering, 82 (D): 35~45
Lacy, S.L., et al, 2005, System Identification of Space Struc-
tures. 2005 American Control Conference, 4:2335~2340
Leondes, C.T. et al, 1970, Nonlinear Smoothing Theory. IEEE
Transactions on Systems Science And Cybernetics, 6(1):
63~71
Li, D., 1999, Ship motion and modeling, Harbin University
Publication, Harbin.
Liu, J., et al, 2002, Application of ML to System Identification
for Underwater Vehicle, Journal of Marine Science and
Application, 11(1): 21~25
Narendra, K.S., K.Parthasarathy,1990, Identification and Con-
trol of Dynamical Systems Using Neural Networks.IEEE
Transactions on Neural Networks, 1(1):4~27
Nyarko, E.K., R.Scitovski, 2004, Solving the Parameter Identi-
fication Problem of Mathematical Models Using Genetic
Algorithms. Applied Mathematics and Computa-
tion,153(3)651~658
Shi, C., et al, 2006, Collaboration to Enhance Development
and Application of Shiphandling Simulators, in 12th IAIN
World Congress / 2006 Internatioan symposium on
GPS/GNSS. Jeju, Korea: 459-464.
Shi, H, et al, 2005. Improved System Identification Approach
Using Wavelet Networks. Journal of Shanghai University
(English Edition), 9(2): 159~163