Escolar Documentos
Profissional Documentos
Cultura Documentos
1 Propulsion 5
1.1 Thruster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.1 Power . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.2 Thrust . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1.3 kt and kq input data . . . . . . . . . . . . . . . . . . . 7
1.1.4 Fixed Pitch Propellers (FPP) . . . . . . . . . . . . . . 8
1.1.5 Controllable Pitch Propellers (CPP) . . . . . . . . . . 9
1.1.6 Propeller dynamics. . . . . . . . . . . . . . . . . . . . . 9
1.1.7 Force and torque . . . . . . . . . . . . . . . . . . . . . 10
1.1.8 Thruster P3D configuration . . . . . . . . . . . . . . . 11
1.1.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.2 Rudder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.2.1 Thruster induced velocity . . . . . . . . . . . . . . . . 15
1.2.2 Thruster shadow effect . . . . . . . . . . . . . . . . . . 16
1.2.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.3 Dynamic Positioning . . . . . . . . . . . . . . . . . . . . . . . 16
1.3.1 Thrust Allocation . . . . . . . . . . . . . . . . . . . . . 17
1.3.2 Control . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2 Vessel 21
2.1 Squat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.2 Coordinate transformations . . . . . . . . . . . . . . . . . . . 21
2.3 Wandering Ships . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.4 Tugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3 Line 25
3.1 The catenary equation . . . . . . . . . . . . . . . . . . . . . . 25
3.2 Force on the catenary end-points . . . . . . . . . . . . . . . . 27
3
4 CONTENTS
4 Environment 31
4.1 Wind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.1.1 Wind vector field . . . . . . . . . . . . . . . . . . . . . 31
4.1.2 Wind force . . . . . . . . . . . . . . . . . . . . . . . . 32
4.2 Wave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.2.1 Spreading . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.2.2 Forces . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.2.3 Input data . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.3 Current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.3.1 Input data . . . . . . . . . . . . . . . . . . . . . . . . . 34
A Appendix 37
A.1 Mathematical review . . . . . . . . . . . . . . . . . . . . . . . 37
A.1.1 Linear interpolation . . . . . . . . . . . . . . . . . . . . 37
A.1.2 Bilinear interpolation . . . . . . . . . . . . . . . . . . . 37
A.1.3 Rotations . . . . . . . . . . . . . . . . . . . . . . . . . 38
A.1.4 Calculus of variations . . . . . . . . . . . . . . . . . . . 39
A.1.5 Newton Raphson . . . . . . . . . . . . . . . . . . . . . 39
Chapter 1
Propulsion
1.1 Thruster
In this document we make a detailed review of the latest develoments
made in the mathematical and physical model of thrusters used in the sim-
ulator. We also give a detailed description on how to configure a thruster
from a p3d file.
1.1.1 Power
The power demanded by the thruster is modeled by
2nQ
P = , (1.1)
where denotes the water density, kq = kq (J, p) is the torque coefficient and
p = pitch/D, where D is the thruster diameter.
The advance ratio J is defined as J(v, n) = v/nD, where v is the water
velocity incident in the thruster. To avoid numerical instabilities at n = 0,
we restrict the value of J in the range J [2, 2].
5
6 CHAPTER 1. PROPULSION
1.1.2 Thrust
The thrust T produced by the thruster is modeled according to the formula
where is the azimuth angle (in the case of azimuthal thrusters). This
expression is general, and can also be used to model the interaction between
the main propeller and the hull, that gives a smaller thrust when in reverse
operation (negative thrust).
Behaviour of P T 2 . In the force allocation model used, it is assumed
that power and thrust obey equation
P = CT 2 + P0 . (1.6)
1.1. THRUSTER 7
1 vm =2
vm =3
vm =4
0.8
vm =5
vm =6
0.6
f (v )
0.4
0.2
0 1 2 3 4 5 6
v (m/s)
Figure 1.1: Thruster reduce due to transversal water for various values of
vm .
If we work out equations (1.3) and (1.1), we see that for our model
2kq
C= 2
and P0 = 0. (1.7)
kt |n|D3
We use two ways of providing input data for kt and kq . For FPP the curves
kt and kq are provided as tables and linear interpolation is used to estimate
intermediate values. The tables have the form shown in table 1.1a.
For CPP we use polynomial interpolation to estimate the function kq and
8 CHAPTER 1. PROPULSION
Where the data ai , bi , ci and di are read from a table displayed as shown in
table 1.1b.
where
1
A= , (1.11)
1 + 5t/tm
where nsp denotes the rotation set point as explained in the previous section,
t is the simulation time step and tm is the time to reach 99% of steady
rotation if nsp remains constant.
The pitch and angular variable obey a constant velocity dynamics, where
to go from step k to k + 1, we do
where vp is the actuation velocity, defined by the user. Formula (1.12) is also
used for the azimuthal angle alpha.
vp = vs vc + r (1.13)
From this velocity we can calculate the water velocity incident in the
propeller i.e. along its axis and perpendicular to it. Denoting by vk and v
the radial and perpendicular component we have
vk = vp rp , (1.14)
where rp is a unit vector along the propeller axis. From that we take the
perpendicular component
=rf (1.16)
1) MAX PERP VEL: Specifies the transversal water velocity on the thruster
above which the generated thruster is always zero (see equation 1.4 and
the graphs in figure 1.1). It defaults to 3 m/s.
2) ALPHA PROP: Thruster angle in the range [180, 180], where 0 is aligned
with the vessel longitudinal axis and points bow. The tag is read only for
propeller for fixed thrusters (i.e. non-azimuthal).
5) P D: If provided sets the P/D value for FPP or maximum P/D, for CPP.
is set to 0, if it cannot, its value is set to the value of the tag ROTATION.
Similarly for P/D, if it can be commanded, its initial state is set to 0,
otherwise it is set to the value provided in P D.
12) KRE: Accounts the effect given by equation 1.5 (i.e. when operating in
reverse ration).
13) TMAX TURN: Time for an azimuthal thruster perform a 360 revolution.
(s)
14) TIME TO FULL PITCH: Informs the time taken for a CPP to go from
P/D = 0 to its maximum value. (s)
17) PROP POLY: Used to specify the thruster functions kt and kq for CPP.
For the mathematical formulation see section 1.1.3. The table must have
N > 2 rows and 4 columns ordered as shown in table 1.1b. For how to
input this tables in a p3d file see the example in the end of this section.
18) PROP TABLE: Use to specify the thruster functions kt and kq for non
CPP. For the mathematical formulation see section 1.1.3. The table must
have N > 2 rows and 3 columns ordered as shown in table 1.1a. For how
to input this tables in a p3d file see the example in the end of this section.
19) TABLE POLY: Allows a switch between PROP POLY and PROP TABLE.
Its values are one of PROP or TABLE. Note however that we do not ac-
cept the value TABLE for CPP.
1.1. THRUSTER 13
An example use of the tags described above for a FPP can be seem on
list 1.1.
14 CHAPTER 1. PROPULSION
1 PROP
2 {
3 ID = 0 ,
4 POSITION TYPE = AZIMUTE FIXED ,
5 CONTROL TYPE = VARIABLE ROTATION ,
6 X PROP = 127 ,
7 Y PROP = 0
8 Z PROP = 4 . 5 ,
9 ALPHA PROP = 0
10 ROTATION = 1 . 3 7 ,
11 DIAMETER = 8 . 3 ,
12 P D = 0.76 ,
13 POT MAX = 2 2 0 0 0 ,
14 EFFIC = 0 . 6 ,
15 INVERSION KEY = YES ,
16 TMAX THROTTLE = 5 5 ,
17 TABLE POLY = TABLE ,
18 KRE = 0 . 7 5 ,
19 PROP POLY = { { 0 , 0 , 0 . 0 0 0 0 , 0 . 0 1 6 7 }
20 , { 0 , 1 , 0.6000 , 0 . 0 0 0 0 }
21 , {1 , 0 , 0.5981 , 0.0000}
22 , { 1 , 1 , 0 . 0 0 0 0 , 0.1000}
23 , {2 , 0 , 0.0000 , 0.0344}
24 },
25 PROP TABLE = { { 1.0 , 0 . 0 3 0 , 0 . 2 0 }
26 , { 0.5 , 0 . 0 5 0 , 0 . 3 4 }
27 , { 0.0 , 0.046 , 0.32}
28 , { 0.7 , 0.020 , 0.15}
29 , { 1.0 , 0.000 , 0.00}
30 }
31 } ,
1.1.9 Exercises
1) Assume that v is the precision we can estimate ships translational ve-
locity, c the precision we can estimate the current velocity, the precison
on the angular velocity and r the precison on the position of the propeller.
What precision do we have on the values of values of v|| and v ?
2) Assume that we can command the propeller rotation, pitch and angle with
precision n , p , repectivelly. Calculate how the estimated thrust, power
1.2. RUDDER 15
and toque, given by equations 1.1, 1.3 and 1.16 are affected. In other words,
what is the error in P and T and ? Use the results of exercise 1, for the
values of v|| and v .
3) Prove that the equations that govern propeller dynamics, cannot cause it
to be in and invalid state, that is, a state where its power is greater than its
configured maximum power.
4) In section 1.1.1 we said that currently we are limiting the values of J in
the interval [3, 3]. Use these values and the tolerance in rotation n and
pitch over diameter p to estimate the maximum and mnimum forces that
our thrust model allows? Is this a reasonable value? What acceleration do
these values produce in a ship with mass m?
1.2 Rudder
This section is dedicated to many important facts about our modeling of
rudders on the simulator.
1.2.3 Exercises
1) Prove that the rudder shadow function given by equation (1.20) is con-
tinuous on its domain.
vx
O
Figure 1.2: The rudder shadow region function. On the red regions it has
value 1, on the blue region 0, on the yellow and green regions a value in
the range [0, 1] to avoid descontinuity. Finally in the orange region we use
bilinear interpolation to connect the four points.
where fi is the force of the ith propeller and ri its position relative to the
vessel center of mass.
Equations (1.21) and (1.22) can be significantly simplified if we take into
account that we are interested in controlling only translational motion in
surge and sway, and angular motion in Yaw.
As an example we work out the allocation problem for a ship with two
fixed and two azimuthal thrusters. The generalization for more thrusters is
straightforward and can be carried out by the reader if there is interest.
Using matrix notation, we denote the force and torque produced by an
azimuthal thruster as
fx fx 1 0
fy = fy = 0 1 fx . (1.23)
fy ,
z yfx + xfy y x
where is the thruster axis angle. For a main propeller for example, = 0 .
For a tunnel thruster = 90 .
With this notation we can cast equations (1.21) and (1.22) as
f1x
f1y
fx 1 0 c2 1 0 c4
f2 (, 1.25)
fy = 0 1 s2 0 1 s4 f3x
z y1 x1 y2 c2 + x2 s2 y3 x3 y4 c4 + x4 s4
f3y
f4
where ci = cos i and si = sin i . Equation above has the general form
f = Bu and can be solved by the Moore-Penrose pseudoinverse
u = B T (BB T )1 f (1.26)
total power since in that case, each thruster contribute a different weight as
assumed in equation (1.6). These weights can be easily included in the least
squares method by scaling the vector u in the form
f1x 1/c1 c1 f1x
f1y 1/c1 c1 f1y
f2 1/c2 c2 f 2
=
c3 f3x . (1.27)
f3x 1/c3
f3y 1/c3 c3 f3y
f4 1/c4 c4 f 4
This equation has the form u = W 1 us . With this notation, we can write
(1.25) as f = BW 1 us . Its solution now reads
us = W 1 B T (BW 1 B T )1 f (1.28)
1.3.2 Control
20 CHAPTER 1. PROPULSION
Chapter 2
Vessel
2.1 Squat
The Squat effect is a force that acts on a vessel when it navigates on shallow
waters. It is formulated as follows. Let D be the water depth, the vessel
weight, L the vessel length and Fr the Froude number. First we define the
vessel the vertical displacement sq and the Froude number Fr
Fr2
sq = 2.4 p , (2.1)
L2 1 Fr2
Vx
Fr = , (2.2)
gD
where g is the gravity acceleration. The squat force is defined by
F sq = LBsq g, (2.3)
21
22 CHAPTER 2. VESSEL
A) The cs fixed on the Earth. Its origin is such that z = 0 is at sea level.
B) At rest relative to A and with the same orientation. Its origin is at the
vessel wamit center r BA . It has the same orientation as A.
C) Shares its origin with B, is at rest relative to B but is rotated by the
Euler angles (, , )BA .
D) Always coincident with C (shares origin and axis) but has translational
velocity v DC and angular velocity DC relative to C. This cs is fixed on the
vessel. Its x axis is aligned with the vessel longitudinal axis.
E) At rest relative to D and with the same orientation. Its position relative
to D is r ED .
F) Shares its origin and Z axis with E, but has a yaw angle. This is usually
a cs fixed on the propeller or rudder.
We want to answer the question: If we know there is current on the sea,
what is its value as seem on reference F?
where L is the ship length. The first condition is for deep water and the
second for shallow. When the ship is evolving its state from (vn , n )
(vm , m ) we consider that its current heading is perpendicular to the line
segment that connects the ship to the center of a circle with diameter Dt and
impose that n+1 is also perpendicular to the new line segment that connects
the new ship position to the center of that circle. Therefore, each time we
calculate the next velocity we have also to correct the heading by the angle
= tan1 (2S/Dt ), where the sign depends on the new direction being
clockwise or counter-clockwise.
2.4 Tugs
Tugs on the simulator are instantiated with the TUGCR nmea command
(see the iospec SMH4.txt file). The configuration of tugs on the p3d file is
made as follows
1 MODEL
2 {
3 ...
4 TUG
5 {
6 ID = 1 ,
7 PROP { . . . },
8 PROP { . . . },
9 ...
10 }
11 }
desired. The force generated by the tug is passed to the on-ship by means of
nmea commands (S5XFS).
The total force is calculated as the sum of all forces produced by the
individual thrusters. The orientation of the thrusters is not accounted for,
only the total intensity is used to calculate the final force this tug produces.
The direction of the force passed to the on-ship is directed along the line that
connects both ships.
Chapter 3
Line
25
26 CHAPTER 3. LINE
where is the Lagrange multiplier. We see that equation (3.7) has no de-
pendency on x, therefore a constant of motion immediately follows from the
Euler-Lagrange equation. We have
y+
c= p (3.8)
1 + y02
or
Z
dy
x= p , (3.9)
((y )/c)2 1
Equation (3.10) is the general form of the catenary equation. To find the
constants , x0 and c we have to impose appropriate boundary conditions,
the subject of the next section. Before that however, let us find the equation
that gives the length of the catenary
Z bp
l = 1 + y 0 2 dx
a
Z bq
= 1 + sinh2 ((x x0 )/c)dx
a
Z b
= cosh ((x x0 )/c)dx
a
b
= c sinh ((x x0 )/c) (3.11)
a
3.2. FORCE ON THE CATENARY END-POINTS 27
Where the solution of is obtained by noting that the equation for and
are invariant under a swap of h and l and change c ic. To write the final
form of the catenary equation we note by the first derivative test in equation
(3.12) that x0 is an extremum point and when c > 0 this point is a minimum.
We also have the condition |h| < l. The final form of the catenary equation
is therefore
r
h l 4c2 x x0
y(x) = 1+ 2 + c cosh . (3.19)
2 2 l h2 c
We also have
x0 h lp
c cosh = + 1 + 4c2 /(l2 h2 ), (3.20)
c 2 2
x0 l hp
c sinh = + 1 + 4c2 /(l2 h2 ), (3.21)
c 2 2
To find the constant c we have to find the zero of equation (3.13). To calculate
the forces on the catenary endpoints we have the to calculate the angles a
and b defined by y 0 (0) = tan a and y 0 (d) = tan b . We have
0
y (x) = sinh((x x0 )/c). (3.22)
where
The force vectors above are written in the global coordinate system. (Warning:
Pay attention the the signs when calculating a and b ).
30 CHAPTER 3. LINE
Chapter 4
Environment
4.1 Wind
This section is dedicated to show details of how we model the wind vector
field and what force it causes on the vessel.
However, for the purpose of simplifying the simulation of the vessel we make
two important simplifications, namely
1. The velocity along the z axis does not cause any measurable effect on
the ship motion, therefore we use vz = 0 on (4.1).
31
32 CHAPTER 4. ENVIRONMENT
where ai is the amplitude of the ith frequency, i is the ith circular frequency
and (i ) its phase.
Since we work with the energy contained in the signal for a given fre-
quency i we denote
1 2
a = S(i )i , (4.4)
2 i
We have therefore
n
X p
v(t) = a0 + 2S(i )i cos(i t + (i )). (4.5)
i=1
The choise of i and i is made as follows. We first choose the band limit
of the signal i.e. the frequency such that S(i ) = 0 if i > max . Once we
have max we choose n frequencies randomly in the interval [0, max ]. The
phases (i ) are also chosen randomly, in the interval [0, 2].
Lets see the models we use for S(i ). API. This spectrum is given by
the formula 5/3
238.73i
S(i ) = 4.2806 1 + v0 . (4.6)
v0
4.2 Wave
This section is dedicated to the mathematical theory used to model waves in
TPN.
4.2.1 Spreading
The general form of the sea energy spectrum is a function that depends on
the direction we observe and on its frequency . Experiments show that di-
rectional characteristics are indenpendent of frequency and vice versa. That
4.2. WAVE 33
means the general form of the wave spectrum can be written as S(, ) =
D()S(), where D() is called wave spreading. To ensure that the spread-
ing
R does not change the wave energy we impose the normalization condition
D()d = 1.
Santos basin. The most used spreading function for the Santos basin is
given by
2s
D() = C(s) cos , for ( ) . (4.7)
2
where
(s + 1)
C(s) = (4.8)
2 (s + 1/2)
The parameter s calculated for the Santos basin is given by
4.2.2 Forces
We consider four kinds of forces acting on a ship due to waves, namely first
order, mean drift, slow drift and wave drift damp. In the following we will use
S() to denote the sea energy spectrum, with being the circular frequency.
Lets talk about each one of forces.
Mean drift. The mean drift force and torque for a wave with frequency
incident with angle is given by fi (, ) = S()Qi (, ), when i = roll or
pitch f is a force and when i = yaw f is the torque around the z axis. The
function Qi (, ) is the quadratic transfer function.
R To calculate the total
mean drift force we have to integrate fi () = 0 fi (, ).
Wave Drift Damp. The formulation of the wave drift damp is more com-
plex than the other forces.
behaviour. For example, in regions where the pier arm protects the region
where ships are loading and unloading or for example when there is a plat-
form between the ship and the incident wave. We this effect as the shadow
effect.
Input data for the shadow region is provided in the following form in the
.p3d input file
1 SHADOW WAVE POSITION X = { 3 , 1 0 , 1 3 } ,
2
3 SHADOW WAVE POSITION Y = { 3 , 1 0 , 1 3 } ,
4
5 SHADOW WAVE INTENSITY = { { 0 . 2 , 0 . 7 }
6 , {0.3 , 0.5} } ,
7
8 SHADOW WAVE INTENSITY = { { 1 . 2 , 1 . 3 }
9 , {1.4 , 1.5} } ,
10
11 These t a g s come i n s i d e t h e node
12 FORCE FIELD
The meaning of the example data used can be seem in figure 4.1. For
example, in the region colored in red the new intensity and angle used are
0.2 and 1.2. In the green region 0.7 and 1.3.
4.3 Current
The reasons that leads us to provide support for wave shadow regions, are
also valid for the current. Therefore, changing the current intensity and
direction for a grid region is also supported.
x
O
Figure 4.1: Example of shadow region. The grid is pictured in blue and the
shadow regions in red, green, yellow and brown.
6 , {...} },
7
8 SHADOW CURRENT VELOCITY Y = { { . . . }
9 , {...} },
10
11 These t a g s come i n s i d e t h e node
12 VELOCITY FIELD
36 CHAPTER 4. ENVIRONMENT
Appendix A
Appendix
y[i + 1] y[i]
y= (x x[i]) + y[i], (A.1)
x[i + 1] x[i]
where i is the greatest i such that x[i] < x. In our implementation, if x < x[0]
or x > x[n 1], y[0] or y[n 1] is returned respectively.
37
38 APPENDIX A. APPENDIX
A.1.3 Rotations
In simulations of rigid bodies we often make coordinate transformations to
change the representation of vectors from one system to another. This pro-
cedure involves rotations, which is the subject of the current section.
We adopt the following conventions, rotations are performed counter-
clockwise, in a right-handed system by pre-multiplication (matrix first). The
sequence of rotations is performed in the following order yaw, pitch and roll,
which will be denoted by XYZ. We will ue the angle for roll, for pitch
and for yaw. The matrices that accomplish this rotations are given by
1 0 0
X() = 0 cos sin , (A.2)
0 sin cos
cos 0 sin
Y () = 0 1 0 , (A.3)
sin 0 cos
cos sin 0
Z() = sin cos 0 . (A.4)
0 0 1
These matrices perform an active rotation, that means the resulting vec-
tor has its components expressed in the same coordinate it was expressed
before, but now it is rotated by the respective angle (active view). We can
also interpret the resulting vector as the same vector but expressed in a
coordinate systems that is rotated by the negative of the passed angle.
Another important property of the matrices above is that their inverse
are obtained by passing the negative angle, for example X 1 () = X() =
X T (). A rotation by the three Euler angles in the convention XYZ is given
A.1. MATHEMATICAL REVIEW 39
cos cos cos sin sin
sin sin cos + cos sin sin sin sin + cos cos sin cos .
cos sin cos + sin sin cos sin sin + sin cos cos cos
(A.5)
We see that
R1 (, , ) = [X()Y ()Z()]1
= Z 1 ()Y 1 ()X 1 ()
= Z()Y ()X()
= Z T ()Y T ()X T ()
= [X()Y ()Z()]T
= RT (, , ). (A.6)
Let us make a review. Say we have a coordinate system (C) whose ori-
entation with respect to (B) is given by the Euler angles (, , ) in the
XYZ convention and the vector ~vA expressed in (B). To obtain ~vC we do
~vC = R(, , )~vA . On the other hand, if we have ~vC and want to
obtain ~vB we do ~vB = RT (, , )~vC