ONLINE ESTIMATION OF SHIP STEERING DYNAMICS AND
ITS APPICATIONS IN DESIGNING AN OPTIMAL AUTOPILOT
Minh-Duc LE
Shipbuilding Industrial Software JSC.(SHIPSOFT), Hanoi, Vietnam
Hai-Nam Nguyen
Van Viet Electric Co., Ltd. (VAVIE), Hanoi, Vietnam
Keywords: Modelling and simulation, estimation and identification, autoregressive models, least-squares algorithm,
quadratic control, ship steering dynamics.
Abstract: Recursive Least Square (RLS) Algorithm applied to a Multivariate Auto-Regressive (MAR) process is used
to estimate ship steering dynamics online. The estimation method is then linked to the Linear Quadratic
(LQ) Algorithm to design an optimal autopilot for steering ships. The estimation method was applied to
several ships and model ships and in all the cases the estimated parameters converged well. The design
algorithm was used to construct a tracking system for course keeping and course changing maneuvers.
Simulation results for the ships show the robustness of the estimation method and prove that the autopilot
has very good performance.
1 INTRODUCTION
Ship steering dynamics is of interest when
evaluating ship maneuverability as well as when
designing ship autopilots and steering systems.
Designing a computer-based autopilot for ships is
always a challenging task in marine control
engineering. Ships operating in seawater are often
strongly influenced by unpredictable environmental
disturbances such as wind, wave and current.
Therefore to navigate safely and economically, the
ship must have a robust autopilot system with good
steering characteristics. To design such a robust
computer-based autopilot system that can be adapted
well to the changes of the environment a suitable
mathematical model representing ship steering
dynamics should be constructed. And, one of the
challenging problems involved in designing the
computer-based autopilot is to find a suitable
estimation method for a chosen model.
Methods for determining ship steering dynamics
with high accuracy have been of the focus of many
studies over a long period of time. Astrom and
Kallstrom (Astrom, 1976) did the pioneer work in
identification of ship steering dynamics. Abkowitz
(Abkowitz, 1980) presented results of the
identification of ship hydrodynamic characteristics
based on Extended Kalman Filter, the results have
long been seen as excellent. More recently Le, et al.,
(Le, 2000) has proposed a new and effective method
for estimation of ship linear hydrodynamic
coefficients. Since the main parameters in ship
steering dynamics are the linear coefficients in ship
hydrodynamic characteristics, methods for the
estimation of ship hydrodynamic coefficients also
contribute to the development of methods for
estimation of ship steering dynamics.
In modern control theory, identification
algorithms are often combined with appropriate
control laws to construct automatic control systems.
In marine control, much research has been carried
out in this direction. Several authors have applied
stochastic approach to analysis and control of ship
motion ((Astrom, 1976), (Ohtsu, 1979), (Holzhuter,
1990), (Fossen, 1994)). More recently, Wellstead, et
al. (Wellstead, 1991) combined a self-tuning control
algorithm with the RLS algorithm to design control
systems. Since then, the self-tuning control
algorithm has been developed into a route-tracking
controller in the PID form for ships (Mizuno, 1989)
and autopilots for ships (Nguyen, 1998), (Nguyen,
138
LE M. and Nguyen H. (2005).
ONLINE ESTIMATION OF SHIP STEERING DYNAMICS AND ITS APPICATIONS IN DESIGNING AN OPTIMAL AUTOPILOT.
In Proceedings of the Second International Conference on Informatics in Control, Automation and Robotics - Robotics and Automation, pages 138-143
DOI: 10.5220/0001189201380143
Copyright
c
SciTePress
2000a), (Nguyen, 2000b). Besides this, the RLS
algorithm was also combined with an optimal
control law to design an adaptive dynamic
positioning system for vessels (Iida, 1990).
This paper presents a new method for online
estimation of ship steering dynamics and its
application to design an optimal autopilot system for
ships. Ship steering dynamics is expressed by a
MAR model with unknown parameters to be
estimated. The RLS algorithm is used as an online
estimator to estimate the parameters of the assumed
model. The parameters estimated by the RLS
algorithm are then used as the input to calculate
control gain of the LQ optimal control law for
designing the autopilot. The estimation method was
applied to estimate steering dynamics of several
ships and model ships. The design method was
verified by computer simulation of several ships and
model ship during course keeping and course
changing maneuvers.
In this paper, Section 2 describes the method for
estimation of ship steering dynamics and the results
of its application to several ships and model ships.
Section 3 presents the LQ control algorithm and its
applications to design the optimal autopilot using
steering estimated parameters as described in
Section 2. The design procedure is emphasized and a
comprehensive set of application results of the
designing method is included in this section. Finally,
Section 4 highlights some conclusions based on
estimation results and computer simulation results
applying the optimal autopilot, and some directions
for future research.
2 ESTIMATION OF SHIP
STEERING DYNAMICS
This section describes in detail the application of the
RLS algorithm to a MAR process for online
estimation of ship steering dynamics. Several results
of the estimation method applied to various ships
and model ships are also presented.
2.1 A RLS algorithm applied to
estimate parameters of a MAR
model
Ship dynamics can be described by the following
state-space equation (Astrom, 1976):
DeFuExx ++=
&
(1)
, where
x
(t),
u
(t),
e
(t) are state vector,
control vector and disturbance vector, respectively;
E
,
F
,
D
are the corresponding matrices, to be
estimated. In this study both
x
(t), e (t) are
assumed to be measured or at least obtained by state
estimation; in fact they were calculated from
measurement of ship position.
The above equation can be conveniently
expressed by a MAR process of order p, as shown in
(2):
i
p
l
lili
A
ενων
++=
=
1
, (i = p, ..., N) (2)
Here
i
ν
m
R is a time series of state vectors,
observed as equally spaced instant
i ;
ω
m
R is a
parameter vector of intercept terms and is included
to allow for a nonzero mean of time series
i
ν
;
l
A
mm
R
,
are matrices of unknown (constant)
coefficients expressed the process;
i
ε
m
R are
random vectors of noises, with the present of
ω
,
i
ε
can be assumed to have zero mean and covariance
matrix
C . Relations between matrices in formulas
(1) and (2) can be easily derived using Multivariate
Auto-regressive theory or differential formula.
Denote the augmented state vector by (3) (with n
= mp+1) and the augmented coefficient matrix by
(4):
TT
pi
T
i
T
i
]...1[
1
=
ννυ
n
R , (i = p, ..., N) (3)
]...[
1 p
AAA
ω
=
nm
,
(4)
, the MAR(p) model (2) can be rewritten as:
iii
A
ε
υ
ν
+
=
, (i = p, ..., N) (5)
The parameter matrix
A
can then be estimated
using RLS Algorithm with the availability of
measurement
i
ν
and
i
υ
. Introducing the matrices:
=
=
N
pi
T
ii
U
υυ
;
=
=
N
pi
T
ii
W
υν
(6)
, then the best linear unbiased estimate for the
matrix
A
is derived as:
1
ˆ
=WUA (7)
, and an estimate for the covariance matrix
C is
given by:
=
=
N
pi
T
ii
nN
C
εε
ˆˆ
1
ˆ
with
iii
A
υνε
ˆ
ˆ
= (8)
In practice, to progressively reduce the emphasis
placed on past information a forgetting factor (FF)
λ
with value between 0.95 to 0.998 (Wellstead,
1991), (Hang, 1993).
ONLINE ESTIMATION OF SHIP STEERING DYNAMICS AND ITS APPICATIONS IN DESIGNING AN OPTIMAL
AUTOPILOT
139
The RLS algorithm applied to estimate ship
steering dynamics is summarized as follows.
At time interval
i :
(a) Step 1: Form vectors
i
ν
and
i
υ
using
new data according to formulas (2) and (3).
(b) Step 2: Add new values to
U and W
according to (6), noting that the FF can be used.
(c) Step 3: Calculate the estimates for matrices
A
and C using formulas (7) and (8).
(d) Step 4: Wait for the next step to elapse and
loop back to Step 1 until the end of the estimation
process.
2.2 Results of estimation of ship
steering dynamics
Usually the input and control variables of the
state-space equation (1) expressing ship steering
dynamic are chosen as follows:
T
rvx ][
ψ
= where
v ,
r
,
ψ
respectively are ship sway, angular
velocities and heading angle, and
δ
=u
with
δ
is
the rudder deflection. Since the order of the
differential equation (1) is 1, it would be suitable to
choose the parameters in equation (2) as: p = 1, m =
4, n = 5. In this case, expressions of vectors
i
ν
and
i
υ
are derived as follows:
T
iiiii
rv ][
δψν
=
4
R , (i = p, ..., N) (9)
T
iiiii
rv ]1[
δψυ
=∈
5
R , (i = p, ..., N) (10)
Parameters of ship steering dynamics then can be
estimated using the four steps given in 2.2.
Figure 1 shows the time series of the estimated
parameters for SR221B, a model ship. Data for the
estimation was collected from a 10deg. Zigzag test
in a towing tank. Estimation results for a training
ship (the Shioji Maru) are shown in Figure 2 and
data was collected from a 20deg. Zigzag trial. In
these figures, only parameters concerning the input
vector
x
are given, as they are the parameters of
the steering dynamics. From both figures, it is clear
that the estimated parameters of ship steering
dynamics converge very well and this proves the
effectiveness of the estimation method.
3 OPTIMAL AUTOPILOT
DESIGN
In this section the LQ algorithm is briefly presented,
then the combination of the estimation method
described in the previous section and LQ algorithm
for designing an optimal autopilot is discussed in
more detail. The design procedure is emphasized and
a comprehensive set of application results of the
designing method is included.
3.1 The LQ optimal control
algorithm
Suppose that the output y (t) of the control system
(1) is expressed by the following equation:
HuGxy
+
=
(11)
, where
G and
H
are corresponding
matrices.
To design an optimal controller for tracking a
time varying reference (desired) trajectory
d
y (t),
let define
y
~
= y -
d
y the trajectory error vector, and
[]
=
+=
pN
t
TT
uPuyQyJ
0
~~
(12)
, the performance index, where
Q 0 and
P
>0 are weighting matrices. Solution of the LQ
Tracker Problem is a control law that minimizes the
performance index (12) and can be expressed by
following equation (Fossen, 1994):
eGyGxGu
321
+
+
=
(13)
, here gain matrices
1
G ,
2
G ,
3
G are
calculated from:
Figure 1: Time series of estimated parameters for the
model ship SR221B (sampling time = 0.25 sec.).
-0.5
0
0.5
1
1.5
0 20406080
Time (sec.)
A11, A12
A11
A12
-0.5
0
0.5
1
1.5
0 20406080
Time (sec.)
A21, A22
A21
A22
-0.1
-0.05
0
0.05
0.1
0 20406080
Time (sec.)
A13, A14
A13
A14
-0.1
-0.05
0
0.05
0.1
0 20406080
Time (sec.)
A23, A24
A23
A24
-0.1
-0.05
0
0.05
0.1
0 20406080
Time (sec.)
A31, A34
A31
A34
-0.5
0
0.5
1
1.5
0 20406080
Time (sec.)
A32, A33
A32
A33
ICINCO 2005 - ROBOTICS AND AUTOMATION
140
+=
+=
=
RDFGEFPG
QGFGEFPG
RFPG
TT
TTT
T
)(
)(
1
1
3
1
1
2
1
1
(14)
, with
R the solution of the discrete-time
Riccati equation:
0
~
1
=++
QRFPFRREER
TT
(15)
QGGQ
T
=
~
(16)
3.2 Procedure of optimal autopilot
design
From equation (13), it is clear that if the parameters
of the state-space equation (1) have been estimated,
the optimal solution for the control vector u (t) can
be calculated. Therefore, a combination of the
estimation method presented in Section 2 and the
LQ algorithm could give an approach to designing
an optimal autopilot.
To design a control system, the input and output
variables should be chosen. Choosing of the input
variable was described in Section 2. The output
variables (described by vector
y in equation (11))
are usually chosen based on the desirable control
output. For ship steering systems
v
,
r
,
ψ
are
often chosen as the output variables (in simpler
cases, only
ψ
may be chosen, but in more general
tracking controllers some other variables such as
ship position, ship surge velocity and so on can also
be added). Then matrix
G is given as:
=
100
010
001
G
(17)
The procedure for designing the optimal
autopilot can be summarized by following steps:
At time interval
i :
(a) Step 1: Form vectors
i
ν
and
i
υ
using
new data according to formulas (2) and (3), and
output vector
y .
(b) Step 2: Estimate parameters of MAR process
(5) using formulas (6), (7) and (8), then calculate the
ship steering dynamics (matrices
E
,
F
, D in
the state-space equation (1)).
Matrix
G is given by (17) and matrix
H
can
be easily calculated from matrix
A
, which has
already been estimated in (5).
(c) Step 3: Use the results of Step 2 to find
solution
R of the discrete-time Riccati equation
(15) and then calculate gain matrices
1
G ,
2
G ,
3
G
according to formula (14).
(d) Step 4: Substitute new values of
1
G ,
2
G ,
3
G and the current values of input, output and
disturbance vector
i
x ,
i
u ,
i
e into equation (13) for
the new optimal value of the control vector u .
(e) Step 5: Wait for the next step to elapse and
loop back to Step 1 until the end of the control
process.
Among the practical aspects of designing and
implementing such an autopilot, the main task is to
choose design parameters such as proper weightings
(
Q and
P
) in the performance index function,
sampling time and initial parameters during
implementing computer simulations and full-scale
experiments. The values of weighting matrices
(
Q
and
P
) are usually chosen based on the aims of
the designing optimal autopilots. For example, when
considering the energy saving problem one may
choose a large value for
P
(compared to value of
Q ) while if the accuracy of the control process is
emphasized, the large value should be chosen for
Q .
Sampling time could be decided based on the
allowable rate of rudder deflection and also on a
proper sampling rate of measurement equipments.
Parameters of ship steering dynamics can be
estimated with or without knowing the initial values.
Strip theory can be applied to estimate the initial
values for the parameters. Fossen (Fossen, 1994)
gives formulas for this purpose, but he also cautions
that care should be taken when using those formulas
(derived from strip theory) since some rough
approximations have been made. However, the
values are highly useful as a priori information for a
recursive parameter estimator. For using the initial
values of the parameters, formulas for continuous
least-squares estimator were derived and are given in
the Appendix.
3.3 Simulation results of applying
the design method
The RLS algorithm was successfully applied to
estimate ship steering dynamics and can be linked to
the LQ optimal control algorithm for designing an
optimal autopilot as analyzed above. The procedure
of designing an optimal autopilot given in 3.2 was
applied to some ships and model ships. Simulations
of course keeping and course changing maneuvers
using the optimal autopilot were performed for those
ships and model ships.
Figure 3 gives an example of computer
simulation results of the above maneuvers for the
ONLINE ESTIMATION OF SHIP STEERING DYNAMICS AND ITS APPICATIONS IN DESIGNING AN OPTIMAL
AUTOPILOT
141
SR221B model ship. The simulation was performed
for an 80-0-40 maneuver that means the ship starting
from zero-degree course was ordered to change to
80-degree course, then to zero-degree course and
finally to 40-degree course, after each of the
changing course maneuvers, the ship was ordered to
keep the course stable for a period of about 200
seconds. Rudder deflection was limited in the range
of -35 to +35 degrees as usually required for most
ships. The ship changed to the new course properly
and there were only two slight oscillations before
stability has achieved. The overshoot that did occur,
however, was rather small. The course keeping
maneuvers were performed very well.
3.4 Evaluation of the design
algorithm
For a conventional autopilot design approach (such
as the PD control law, the SISO MAR model) ship
heading is often oscillated several times before
achieving stability on the new course. As
mentioned above, using the current design algorithm
the course-changing maneuvers were performed
rather well: there were very few slight oscillations
during each maneuver. That means the autopilot
design based on the current algorithm has performed
better than an autopilot design based on a
conventional approach would have.
In addition, this design algorithm has also proved
its robustness as showed in Figure 4. During each of
the course changing processes, the parameters of the
steering dynamics were changed. At the beginning
of the course changing action especially the largest
variations in the parameters occurred, however they
quickly rebounded (to stable values). This shows
that the autopilots could adapt well to environment
changes.
4 CONCLUSIONS AND FUTURE
RESEARCH
Recursive Least Square (RLS) Algorithm applied to
a Multivariate Auto-Regressive (MAR) process was
successfully used to estimate ship steering dynamics
online. The estimation method was then combined
with the Linear Quadratic (LQ) Algorithm to design
an optimal autopilot for steering ships. The
estimated parameters of steering dynamics for the
ships and ship models converged well and computer
simulation results showed that using the described
design approach, the optimal autopilot had excellent
performance both with keeping and changing the
courses as desired. Since the method for estimation
of ship steering dynamics can be applied both to
scale model tests and full scale ship trials, it
provides a possibility to analyze scaling effects.
Full-scale trials are necessary for verifying the
-0.1
-0.05
0
0.05
0.1
0 500 1000
Time (sec.)
A13, A14
A13
A14
-0.5
0
0.5
1
1.5
0 500 1000
Time (sec.)
A11, A12
A11
A12
-0.5
0
0.5
1
1.5
0 500 1000
Time (sec.)
A21, A22
A21
A22
-0.1
-0.05
0
0.05
0.1
0 500 1000
Time (sec.)
A23, A24
A23
A24
-0.5
0
0.5
1
1.5
0 500 1000
Time (sec.)
A32, A33
A32
A33
-0.1
-0.05
0
0.05
0.1
0 500 1000
Time (sec.)
A31, A34
A31
A34
Figure 4: Time series of estimated parameters for the
model ship SR221B during course keeping and course
changing maneuvers (using autopilot)
Figure 3: Time series of ship responses (course and
deviation) for model ship SR221B during keeping and
changing course maneuvers
-40
0
40
80
120
0 200 400 600 800 1000
Time (sec.)
Course (deg.)
-120
-80
-40
0
40
80
120
0 200 400 600 800 1000
Time (sec.)
Deviation (deg.)
ICINCO 2005 - ROBOTICS AND AUTOMATION
142
optimal autopilot design approach, investigating ship
steering characteristics in practice and its ability to
adapt to the environment. Moreover, it is expected
the optimal autopilot will further be developed into
an optimal route-tracking controller for ships.
ACKNOWLEDGEMENTS
The sincerest acknowledgement is expressed to Mr.
Duc-Hung Nguyen of the Tokyo University of
Mercantile Marine for his valuable discussions on
topics in this paper and for providing the data of the
20deg. Zigzag trial of the training ship Shioji Maru.
Hearty thanks are expressed to people of Houryuji
(Hiroshima, Japan), especially to their leaders, Mrs.
Houmyou Saitou and Mr. Shodo Seta, for their best
mutual and financial support in this study.
APPENDIX – DERIVATION OF
FORMULAS FOR CONTINUOUS
LEAST-SQUARES ESTIMATOR
Continuous Least-squares estimate of a MAR
process (5) can be obtained by minimizing the
integral square error with respect to parameter
matrix
A
ˆ
:
ττυττν
dAI
t
2
0
||)()(
ˆ
)(||min =
(18)
Differentiating
I
with respect to
A
ˆ
gives:
=
=
t
T
dA
A
I
0
)()]()(
ˆ
)([20
ττυτυττν
(19)
Defining the estimator gain matrix K as:
=
t
T
dtK
0
)()()(
ττυτυ
(20)
Differentiating of (19) with respect to time
yields:
=
t
TT
ttAtdA
0
)()](
ˆ
)([])()([
ˆ
υυνττυτυ
&
(21)
Finally, the parameter update law is derived
using notations (8) and (20):
)()()(
ˆ
ˆ
tKttA
T
υε
=
&
(22)
REFERENCES
Astrom, K.J. and C.G. Kallstrom, 1976. Identification of
Ship Steering Dynamics, Automatica, 12, 9-22,
Pergamon Press, UK.
Abkowitz, M. A., 1980. Measurement of Hydrodynamic
Characteristics from Ship Maneuvering Trials by
System Identification, Transactions on SNAME, 88,
283-318, USA.
Le, M.D, D.H. Nguyen and K. Ohtsu, 2000. A New and
Effective Method for Estimation of Ship
Hydrodynamic Coefficients. Proc. of the 4th Vietnam
Conference on Automation, 99-105.
Ohtsu, K, M. Horigome and G. Kitagawa, 1979. A New
Ship's Autopilot Design through a Stochastic Model,
Automatica, 15, 255-268, Pergamon, UK.
Holzhuter, T., 1990. A High Precision Track Controller for
Ships, IFAC 11th Triennial World Congress, 425-430,
Talinn, Estonia, Russia.
Fossen, T.I., 1994. Guidance and Control of Ocean
Vehicles, John Wiley and Sons Ltd., UK.
Wellstead, P.E. and M.B. Zarrop, 1991. Self-tuning
Systems: Control and Signal Processing, John Wiley
and Sons Ltd., UK.
Mizuno, H., T. Okawa, I. Komine, N. Mizuno and K.
Ohtsu, 1989. Route Tracking System by Adaptive
Autopilot, Proc. of CAMS'89, 77-82, Copenhagen,
Denmark.
Nguyen, D.H., J.S. Park and K. Ohtsu, 1998. Designs of
Self-tuning Control Systems for Ships, The Journal of
Japan Institute of Navigation, 99, 235-245, Japan.
Nguyen, D.H., N. Mizuno and K. Ohtsu, 2000a. A
Modified Pole Assignment Typed Autopilot for Ships,
The Journal of Japan Institute of Navigation, 102,
327-337, Japan.
Nguyen, D.H. and M.D. Le, 2000b. A Challenge to
Advanced Autopilot Systems for Ships. Proc. of the
4th Vietnam Conference on Automation, 226-232,
Hanoi, Vietnam.
Iida, T., 1990. On an Adaptive Dynamic Positioning
System for Vessels (in Japanese), Journal of Western
Japan Society of Naval Architects, 213, 89-96, Japan.
Hang, C.C., T.H. Lee and W.K. Ho, 1993. Adaptive
Control, Instrument Society of America, USA
ONLINE ESTIMATION OF SHIP STEERING DYNAMICS AND ITS APPICATIONS IN DESIGNING AN OPTIMAL
AUTOPILOT
143