367
1 INTRODUCTION
In the beginning of the 21st century the researchers in
the field of ship motion control engineering started to
focus on the concept of an autonomous cargo vessel.
Vessel which will be able to, autonomously or semi-
autonomously, pass the route “berth to berth” in
a safe, economical and reliable way. This concept is
complex enough by its nature and has to integrate
multiple aspects of economy, management, law and
engineering to accomplish tasks specific to such
a process.
Designing and building a control system for any
of the above tasks requires multiple repetitions of
verification and testing cycles on every step of the
prototyping process.
Performing such verification on a real controlled
object (ship) is extremely expensive and due to the,
usually, international nature of sea voyages also very
time consuming. To overcome these difficulties it is
common practice to perform verification of the
control system using simulated model instead of a
controlled object. Following sections of this paper
describe both the method as well as hardware and
software tools that allow simulation, testing and
verification of designed ship motion control systems
in a convenient manner. The tool is built in a
standard programming environment for modelling,
analysis and multi-domain simulations of dynamic
systems: Matlab-Simulink.
Matlab, along with its extensions, is a platform
commonly used for simulating and design of control
systems. In a field of ship motion control it is often
used for ship dynamics identification (Miller 2016,
Perez & Fossen 2011), ship motion simulation (Perez
& Blanke 2003, Perez et al. 2006) and controller
synthesis (Fossen 2002, Tomera 2015), or even multi-
task complex, marine control systems. (Łebkowski
2018)
Prototyping and Simulation Environment of Ship
M
otion Control System
M. Rybczak & A. Rak
Gdynia Maritime University, Gdynia, Poland
ABSTRACT: Authors of this paper describe the test-bench used for ship motion control system prototyping.
This tool is built with the PC-type hardware and the Matlab-Simulink software. The scale model of the VLCC
tanker was chosen as a control object. This model is used on a lake as a shiphandling training vessel. The
complex, nonlinear mathematical model of this training vessel was used in the test-bench simulations. Authors
describe two types of them: the non-real-time (software) and the real-time (harware-in-the-lop) one. As an
example of usability, results of the MIMO LMI controller tests of the ship velocities in 3DOF were shown.
http://www.transnav.eu
the
International Journal
on Marine Navigation
and Safety of Sea Transportation
Volume 14
Number 2
June 2020
DOI:
10.12716/1001.14.02.13
368
2 SETUP OF THE SIMULATION AND
PROTOTYPING ENVIRONMENT
One of the assumptions of the described project was
that it will be done on a universal, cost effective,
hardware platform and with the use of standard
simulating software. The next section describes the
controlled object for which the testing environment
and controlled system were designed.
Software simulations were the first step of
components’ verification. The main advantage of this
step was the possibility to perform experiments in an
accelerated time scale and without the need for
specialized equipment. A computer with simulation
software installed was only necessary equipment.
In the next step HIL simulations were performed.
They allowed components to be tested in the
presence of disturbances, delays and inaccuracies of
sampling and quantization introduced by hardware
components of measurement systems. During HIL
simulations the controlled object was simulated on
a separate computer using a complex nonlinear
mathematical model. This model and simulation
methods are described, in more detail, in the next
sections of the paper.
2.1 Scale model of the VLCC tanker
State space controller synthesis was performed for
a multidimensional object; a floating, isomorphous
manned model of a VLCC (Very Large Crude
Carrier) tanker, built in 1:24 scale. It is a training ship
used for deck officers and harbour pilots
shiphandling exercises. Main particulars of this ship
model are shown in Table 1.
Table 1. Main particulars of the shiphandling training
model „Blue Lady”
_______________________________________________
Parameter Symbol Value
_______________________________________________
Length over all LOA 13.78 [m]
Length between pp. L 13.50 [m]
Beam B 2.38 [m]
Average draft (loaded) T
l 0.86 [m]
Average draft (ballast) T
b 0.50 [m]
Displacement (loaded) Δ
l 22.83 [T]
Displacement (ballast) Δ
b 12.46 [T]
Speed V 3.1 [kn]
_______________________________________________
Figure 1. Blue Lady silhouette on the Silm Lake;
navigational equipment layout on board and actuators’
locations.
Model actuators are driven by DC electric motors
and powered by a batteries packs. They are:
one main engine,
one aft rudder,
two tunnel thrusters (fore and aft),
two rotating pump thrusters (fore and aft).
Ship motion parameters and environmental
disturbances are measured by navigational
equipment installed on board:
LEICA DGPS System 500 receiver working in
HPN (High Precision Network) mode,
Anschütz Standard 20 gyrocompass,
GILL WindObserver II ultrasonic anemometer.
This equipment communicates with the
measurement system using serial communication
links in NMEA-0183 standard.
Simulation model of the training ship was created
using well known ship motion equations in 3DOF
space (Abkowitz 1964). It was assumed that heave,
roll and pitch may be neglected while the ship goes
on the lake (Eq. 1).
(
)
( )
( )
( )
x tot
y x tot
z zz tot
M m u Mvr X
Mmv MmurY
I irN
+ −=
+ ++ =
+=
(1)
Dynamics described by equations (1) have been
supplemented with the ship’s kinematical terms and
both dynamic and kinematic models of all actuators.
Block diagram of the subsequent, complex, nonlinear
model of the training ship is shown on Figure 2.
369
Figure 2. Block diagram of complex, nonlinear model of the
training ship.
Reference signals: ngc, δc, sstdc, sstrc, ssodc, αdc,
ssor
c, αrc, are connected to dynamic modelling blocks
of specific actuators: rudder, forward and aft tunnel
thrusters, forward and aft pump rotating thrusters.
Next column of blocks calculates forces and moments
based on transient values of their input signals. These
are then fed to the block responsible for calculating
dynamic ship parameters based on equations (1).
Final model output signals are:
u : ship’s longitudinal velocity,
v : ship’s lateral velocity,
r : ship’s angular velocity,
x : position coordinate in North axis of the local
reference frame,
y : position coordinate in East axis of the local
reference frame,
ψ : ship’s heading.
Detailed description of this model along with the
values of hydrodynamic coefficients of “Blue Lady
ship model can be found in the paper by Gierusz
(2002).
2.2 Non real-time software simulation and testing
Software simulations for the described system have
been done entirely in Matlab-Simulink software
environment.
In the above diagram (Fig. 3), the large block on
the left represents the mathematical model of ship
dynamics, built accordingly with the description
from section 2.1. The large, grey block in lower right
corner contains the controller elements. The smaller
blocks model operation of AD/DA converters of the
actual measurement system and communication
delays. In the real hardware configuration these
delays have random values from a certain range. In
this model a mean value of these delays was applied.
The navigational equipment measurements were not
simulated since the mathematical model of the ship
delivers these signals directly.
Layout of the main Simulink diagram was
designed in such a way that its left side corresponds
to the block diagram of the simulator from Figure 6
and its right side to the controller arrangement from
Figure 5. Therefore, users who change the type of
simulator used in their work can easily operate it.
2.3 Real-time HIL simulation and testing
Real time simulations have been managed in Matlab-
Simulink environment too. Main module of this
system is an industrial PC, marked on the Figure 4
with the bold line.
Figure 4. Block diagram of hardware components
arrangement of HIL simulation.
This computer is fitted with a multiport serial
interface card which is connected to the on-line serial
transmission inspection device that is also
responsible for serial signal conversion between RS
232 and RS 422/485 standards on selected channels.
These hardware elements, as well as their
configuration, are taken directly from the final ship
motion control system. This is why the system can be
considered a HIL - Hardware-In the Loop system.
The industrial computer, which works as a
controller, has real time software running that was
created based on Simulink block diagram from
Figure 5. This diagram was converted into the code
of C programming language with Simulink Coder
and Simulink Real Time libraries and then compiled
by an external C language compiler. The industrial
computer is connected by four serial links (Fig. 4) to
the ship motion simulator.
370
Figure 3. Block diagram of hardware components arrangement of HIL simulation.
Figure 5. Simulink block diagram for HIL controller simulations.
Similarly to the controller, simulator source file
has the form of a Simulink diagram, as shown on
Figure 6.
Comparing the model ship simulation diagram
from the Figure 6 with the one shown on Figure 3
one may notice additional blocks that model
navigational devices, drivers responsible for NMEA
0183 communication and blocks for serial binary
transmission. Thanks to this, when the controller
code tests is successfully finished the software can be
transferred to the real life control system without
reconfiguration.
Simulator code is created in a similar fashion to
the controller code with the difference that after
compilation, the simulator is started from local drive
in standalone mode, while controller software is
uploaded via Ethernet from an external workstation
with Matlab-Simulink software installed. Main
Simulink diagram of the controller is executed on this
workstation in external mode and implements the
functionality of an interface for the software running
on the industrial computer.
371
3 MIMO SHIP MOTION CONTROL SYSTEM
When considering a ship navigating open waters,
accuracy of its motion control (heading and position)
is not a key factor in control quality evaluation.
Usually the relevant factors are derived from the
voyage economical parameters as fuel consumption
or total voyage costs. In that case, control system
action is usually limited to heading stabilization with
an assumed accuracy, with the use of only the stern
rudder. Then the whole heading control is SISO
(Single Input Single Output) system only.
On the other hand, when the ship is maneuvering
at low velocities, for example in a harbour, or
performs DSP operations, then stern rudder action
has marginal impact on a hull motion. Active devices
are used and usually all ship’s velocities are
controlled in a 3DOF system.
While heading control systems for open water
navigation are quite well examined, MIMO systems
are still subject to studying and investigation (Erol, B.
& Delibasi, A. 2018).
Next sections of this paper present example of
implementation of the above described simulation
and prototyping environment for building a
multidimensional control system for longitudinal,
lateral and rotational velocities of the shiphandling
training vessel “Blue Lady”.
3.1 General arrangement of the ship MIMO control
A multidimensional dynamic system is described by
operators relative to at least two input and two
output variables. It is then commonly called MIMO
(Multiple Input, Multiple Output).
Building such a control system requires the
integration of its three main components:
measurement subsystem with signal filters;
control subsystem, consisting of a positioning
system, controller and thrust allocation system;
propulsion subsystem, consisting of stern rudder,
main propeller and thrusters.
In case of the “Blue Lady” training ship, described
in section 2.1, measurement and propulsion systems
are integral parts of the model and cannot be
modified. Thus in the HIL simulation system,
described in section 2.3, only signal filtering
components, controller and thrust allocation systems
have been modelled and tested, as marked with grey
colour on Figure 7. These components have been
modelled in the “Controller” block (Fig. 5) and after
compiling their base elements, they have been
executed on an industrial computer (Fig. 4).
Figure 6. Simulink block diagram for ship motion simulator.
The environment described above was used for
investigation of several types of ship motion control
systems, i.e. MPC (Miller & Rybczak 2015), LMI
(Rybczak 2018), PID-type (Tomera 2015) controllers.
Figure 7. Block diagram of MIMO control system fitted to
“Blue Lady” training ship.
372
3.2 Ship slow speed controller using LMI technique
“Blue Lady” ship model is a highly nonlinear object.
During ship dynamics identification, for controller
synthesis purposes, linearization near the operating
point was used. This process took into consideration
thruster dynamics, hull construction, thrust
allocation module and a Kalman filter.
As a case-study this paper shows results of testing
and simulations of a multidimensional controller for
ship motions in a 3DOF space with the use of Linear
Matrix Inequalities. After taking into account average
values of coefficients a state space model of the
controlled object was created that is a nominal
(average) model. State space equations and output
equations of that model are presented below:
11
22
33
00 00
00
uu uu x
vv rv vv rv y
ur vr rr ur vr rr p
xa xb
x aa x bb
x aaa x bbb
τ
τ
τ

 

 
= ⋅+

 

 
 

1
2
3
100
0 1 0*
001
ux
vx
rx


=



(2)
In the identification, process, numerical values of
coefficients were calculated for “Blue Lady” vessel
based on the real object experiments. Then they were
included in equations (2)
11
22
33
x
y
p
xx
x Ax B
xx
τ
τ
τ

 

 
= +⋅

 

 
 

(3)
1
2
3
ux
v Cx D
rx


=⋅+



(4)
Values of matrices A, B and C of the controlled
object, ”Blue Lady” have the below form:
5
34
32 3
3.36 10 0 0
0 9.0 10 2.0 10 ,
3.0 10 1.0 10 7.75 10
A
−−
−−

−⋅

= −⋅ −⋅


−⋅ −⋅

(5)
3
35
55 3
3.62 10 0 0
0 2.06 10 1.28 10 ,
3.00 10 1.15 10 8.00 10
B
−−
−−


= −⋅


⋅⋅

(6)
100 000
010, 000
001 000
CD


= =



(7)
The next step after the controlled object
linearization is the controller synthesis with the use
of Linear Matrix Inequalities. They are applied,
among others, in synthesis of controllers in different
configurations. For example, as static state space
controller, dynamic controller placed in main line or
in feedback loop (Duan & Yu 2013, Boyd et al. 1994,
Tapia et al. 2017). Based on mathematical description
of the controlled object (2), taking into consideration
a controller designed using Linear Matrix
Inequalities a simplified block diagram of the control
system can be presented as Figure 8.
Figure 8. Simplified block diagram of controlled object and
controller based on mathematical LMI construction.
Due to the complexity of the controller synthesis
this procedure have not been printed in this paper,
but can be founded in (Rybczak 2018). Finally, gain
matrix for the controller synthesized using Linear
Matrix Inequalities has the below form:
3
1532 0.010 0.000 772 0.000 0.100
10 0.01 1664 3.60 0.00 897 2.0
5.90 2.801 435 3.40 1.600 234
−−


= ⋅−


−−

K
(8)
Proposed LMI controller output signals are
transformed into actuators reference values by the
thrust allocation block. Operation algorithm of this
block can be found in work of Gierusz & Tomera
(2006).
4 TESTS RESULTS OF THE PROPOSED
CONTROLLER
As mentioned above, the experiments were carried
out on a test-bench in Gdynia Maritime University
using two separate methods:
software simulation
HIL simulation
Four graphs are compared; the first two have been
obtained using SIMULATION SOFT method
373
Figure 9. Reference values of longitudinal u, lateral v
and angular r velocities (dotted lines) and closed loop
system output values (solid lines) in SIMULATION SOFT
mode.
Figure 10. Main propeller and thrusters operation in
SIMULATION SOFT mode.
Figure 9 shows the time histories of the reference
and output values of longitudinal u, lateral v and
angular r velocities in this experiment.
Figure 10 shows “Blue Lady” main propeller and
thrusters’ actions while performing speed changes
depicted on Figure 9. Stern rudder remains inactive
in all slow speed experiments as mentioned in
section 3.
The following two graphs illustrate HIL real time
simulator operation in SIMULATION HIL mode.
Figure 11. Reference values of longitudinal u, lateral v
and angular r velocities (dotted lines) and closed loop
system output values (solid lines) in SIMULATION HIL
mode.
Figure 12. Main propeller and thrusters operation in
SIMULATION HIL mode.
Figure 11 shows the reference values of
longitudinal u, lateral v and angular r velocities.
Lines are marked in the same way like in Figure 9.
Figure 12 illustrates “Blue Lady” main propeller
and thrusters’ actions while performing speed
changes depicted on Figure 11.
The aim of the comparison of the two methods
was to discover potential differences in u,v,r
velocities control and thrusters operation.
Inconsistencies of the results between the two
methods of simulation are clearly seen on the Figures
9-12. Main difference appears in the angular velocity
channel “r” (Figures 9 and 11). In case of HIL test,
during the second turn, overshoot of 100% occurred.
The source of this impermissible performance are
delays in hardware communication channels which
can have random values between 1 and 2 seconds
(maximum is a double fundamental sample time of
the system). Minor disturbances come also from
measurement inaccuracies especially in the angular
velocity channel.
374
The controller which in software simulation
works fine, in practice has to be synthesized once
again taking into account hardware properties before
application to the final control system on the material
ship model.
5 CONCLUSIONS
The paper describes the test-bench for ship motion
control systems verification and validation. This tool
was built with the Matlab-Simulink software and
limited-cost hardware. As a controlled object the
manned model of VLCC tanker, used for
shiphandling training was adopted.
The experiments were based on two types of
simulation: pure software non-real-time and
hardware in the loop, real time one. Analysis of the
differences in the performance of the same maneuver
for both tests allows to identify components of the
control system which needs improvement or
reconstruction.
Results of both type simulations clearly show that
it is beneficial to use and intermediate tests between
pure software computer simulations and real world
trials.
ACKNOWLEDGEMENT
This project is financially supported in part under the
framework of a program of the Ministry of Science and
Higher Education (Poland) as 'Regional Excellence
Initiative' in the years 2019-2022, project num-ber
RID/2019/GA/2, amount of funding 11 870 000 PLN
REFERENCES
Abkowitz, M.A. 1964. Lectures on ship hydrodynamics:
steering and manoeuvrability. Lyngby: Hydrodynamics
Department.
Boyd, S. El Ghaoui, L. Feron, E. & Balakrishnan, V. 1994.
Linear Matrix Inequalities in System and Control
Theory. Philadelphia: SIAM.
Duan, G.R. & Yu, H.H. 2013. LMIs in Control Systems:
Analysis, Design and Applications. Boca Raton: CRC
Press.
Erol, B. & Delibasi, A. 2018. Fixed order H∞ Controller
Design for MIMO Systems Via Polynomial Approach.
Transactions of the Institute of Measurement and
Control
. (OnlineFirst).
doi.org/10.1177/0142331218792411
Fossen, T.I. 2002. Marine Control Systems: Guidance,
Navigation, and Control of Ships, Rigs and Underwater
Vehicles. Trondheim: Marine Cybernetics.
Gierusz, W. 2002. Simulation model of the shiphandling
training boat "Blue Lady". In Katebi, R (ed.) Control
Applications in Marine Systems 2001, Proc. intern.
symp., Glasgow, 18-12 July 2001. IFAC Proceedings
Series, Oxford: Pergamon-Elsevier Science Ltd.
Gierusz, W. & Tomera, M. 2006. Logic Thrust Allocation
Applied to Multivariable Control of the Training Ship.
Control Engineering Practice, 14(5): 511-524.
Łebkowski, A. 2018. Design of an autonomous transport
system for coastal areas. TransNav, the International
Journal on Marine Navigation and Safety of Sea
Transportation. 12(1): 117-124.
Miller, A. 2016. Identification of a multivariable
incremental model of the vessel. In: Proc of 21st
International Conference on Methods and Models in
Automation and Robotics (MMAR). Międzyzdroje. doi:
10.1109/MMAR.2016.75751 36
Miller, A. & Rybczak, M. 2015. Methods of controller
synthesis using linear matrix inequalities and model
predictive control. Scientific Journals of the Maritime
University of Szczecin. 43(115): 22–28.
Perez, T. & Blanke M. 2003. DCMV a matlab/simulink
toolbox for dynamics and control of marine vehicles. In:
Proc. of 6th IFAC Conference on Manoeuvring and
Control of Marine Craft MCMC’03. Girona.
Perez, T. Fossen, T.I. 2011. Practical aspects of frequency-
domain identification of dynamic models of marine
structures from hydrodynamic data. Ocean
Engineering, 38(2-3): 426-435.
Perez, T. Smogeli, Ø.N. Fossen, T.I. & Sørensen, A.J. 2006.
An Overview of the Marine Systems Simulator (MSS):
A Simulink Toolbox for Marine Control Systems.
Modeling, Identification and Control, 27(4): 259-275
Rybczak, M. 2018. Improvement of control precision for
ship movement using a multidimensional controller.
Automatika, 59 (1): 63-70
Tapia, A. Bernal, M. & Fridman, L. 2017. An LMI approach
for second-order sliding set design using piecewise
Lyapunov functions. Automatica. 79: 61-64.
Tomera, M. 2015, A Multivariable Low Speed Controller
for a Ship Autopilot with Experimental Results. In Proc.
of 20th International Conference on Methods and
Models in Automation and Robotics (MMAR),
Międzyzdroje. doi: 10.1109/MMAR.2015.7283699.