RTO

MP

SCI

202
34

1
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
Control and Simulation of Motion
of an Underwater Vehicle
Fatih
Geridönmez
TÜBİTAK

SAGE,
Modelling and Simulation Division, PK 16, 06261
Ankara Turkey
fgerid@sage.tubitak.gov.tr
Prof. Nafiz Alemdaroğlu
Aer
ospace Engineering Dept., METU, Ankara, Turkey
nafiz@metu.edu.tr
ABSTRACT
In
this paper a simulation package for control and simulation of motion of an underwater vehicle in Six
Degree of Freedom (6DOF) is presente
d. Manual and automatic control capabilities are added to the
simulation package. Manual control of the vehicle is performed by using an external joystick. Depth,
heading and yaw angle controllers are included in the design. Two main controllers are design
ed to
control the depth and the heading of the underwater vehicle. Also, a pitch attitude controller is designed
to keep the vehicle at a constant depth. The parameters needed to write such a simulation package are
obtained from an existing underwater vehi
cle available in the literature.
The simulation package is prepared using the MATLAB environment. S

function hierarchy is developed
using the same platform with C++ programming language. 3

D visualization environment is used to
illustrate the motion of the
underwater vehicle in a 3

D environment using the VRML technology.
MATLAB
–
VRML interaction is used for implementing the full 3

D solid model of the underwater vehicle
into the simulation package.
In order to observe the coupling effects of 6DOF motion,
the behavior of the model for several manual
joystick control commands are investigated. As an example, the effects of yawing motion on the rolling
motion of the vehicle are investigated by means of the hydrodynamic data and the corresponding expected
moti
on
.
1.0
INTRODUCTION
For modelling the dynamics of an underwater vehicle, the vehicle designed and operated by the Naval Post
Graduate School, NPS AUV II is used [1]. This vehicle is used as a workbench to support the physics

based AUV modelling and for visual
ization of the vehicle
behavio
r. The hydrodynamic coefficients
related to this vehicle are adapted from
[1]
. However, all of the work done in this study can easily be
adopted and reconfigured to model any arbitrary underwater v
ehicles.
Mathematical modelling of underwater vehicles is a widely researched area and unclassified information is
available through open literature and Internet. The equations of motion for underwater vehicles are given
in detail in reference
[1]
, including the hydrodynamic stability derivatives of some of the underwater
vehicles.
The generalized six

degree of freedom (6
–
DOF) equations of motion (EOM) for an underwater vehicle is
developed under the following as
sumptions:
•
The v
ehicle behaves as a rigid body
Control and Simulation of Motion of an Underwater Vehicle
34

2
RTO

MP

SCI

202
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
•
The earth's rotation is negligible as far as acceleration components of the center of mass are
concerned and
•
T
he hydrodynamic coefficients or parameters are constant
These assumptions eliminate the considerat
ion of forces acting between individual elements of mass and
eliminate the forces due to the Earth's motion.
The primary forces that act on the vehicle are of inertial, gravitational, hydrostatic and hydrodynamic
origins. These primary forces are combined
to build the hydrodynamic
behavior
of the bo
d
y. The study of
dynamics
can be divided into two parts:
•
T
he kinematics, which treats only the geo
metrical aspects of the motion.
•
The
kinetics, which is the analysis of forces causing the motion.
An outline of th
e coordinate frames, kinematics and dynamic relationships used in mode
l
ling a vehicle
operating in free space is discussed and hydrodynamics are presented. This discussion develops the
foundation for various force and moment expressions representing the ve
hicle’s interaction with its fluid
environment. The control forces, resulting from propellers and thrusters and from control surfaces or fins
that enable the vehicle to
maneuver
are then declared. With the hydrodynamic and control forces and
moments analys
is complete six degree of freedom equations of motion are formed.
The main subject of this paper can be described as the way forward to build up a simulation package using
the models prepared by combining them under the MATLAB

Simulink environment. Gener
ally when
building a simulation, the challenging issues are the speed of computations and the visualization problems.
In this paper, rather than giving the details of the configuration and hydrodynamics of the vehicle, brief
steps to build up the simulatio
n package are given which may be useful for people deciding to build such
systems. As an example some important tips related to the usage of an external joystick to control the
vehicle motion and its motion simulation are given in this paper. Usage of VRML
technology, S

function
builder and controller design tools of MATLAB

Simulink (i.e. usage of signal constraint blocks to
determine controller gains) are discussed.
Another important issue while building up the simulation package is the unit testing. We pr
eferred to make
tests for the main engine of the
simulation which is considered
to be the 6

DOF equations of motion which
is named as the “vacuum test” in literature. The vacuum test is an efficient way of making sure that the
equations of motion are writt
en correctly. The results of the vacuum test is compared with the results of
another simulation test prepared using the MATLAB

Simulink’s 6

DOF equations of motion block.
Another important item to be considered is the investigation of the motion
behavior
o
f the model under
various control commands. This investigation is to figure out the coupling effects of the 6

DOF motion of
rigid bodies. Two main advantages can be directly obtained from this investigation. One is the
understanding of the details of model
behavior
in 6

DOF and the other is again the testing issue. One can
figure out the problems if the
behavior
of the model is not matching with the expected by investigating the
coupling effects.
2.0
DYNAMIC EQUATIONS OF
MOTION
In the open source literature
[1]
,
[2]
general
representation of the dynamics equations of motion is
represented by leaving the external forces and moments at the right hand side and the other body
accelerations, inertial, mass and
added mass terms at the left hand side:
Control and Simulation of Motion of an Underwater Vehicle
RTO

MP

SCI

202
34

3
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
Hydrostatic Forces and Moments
Mass
Body fixed
Inertia Hydrodynamic Forces and Moments
accelerations
Added Mass
Thruster Forces and Moments
(
1
)
There are three translational and three rotational equations, and s
ix unknown velocities
( and )
v
. This set
of equations written in expanded form is
[1]
:
2 2
[ ( ) ( ) ( )]
G G G
mu vr wq x q r y pq r z pr q X
(
2
)
2 2
[ ( ) ( ) ( )]
G G G
mv ur wp x pq r y p r z qr p Y
(
3
)
2 2
[ ( ) ( ) ( )]
G G G
m w uq vp x pr q y qr p z p q Z
(
4
)
2 2
( ) ( ) ( ) ( )
[ ( ) ( )]
x z y xy yz xz
G G
I p I I qr I pr q I q r I pq r
m y w uq vp z v ur wp K
(
5
)
2 2
( ) ( ) ( ) ( )
[ ( ) ( )]
y x z xy yz xz
G G
I q I I pr I qr p I pq r I p r
m x w uq vp z u vr wq M
(
6
)
and
2 2
( ) ( ) ( ) ( )
[ ( ) ( )]
z y x xy yz xz
G G
I r I I pq I p q I pr q I qr p
m x v ur wp y u vr wq N
(
7
)
Control and Simulation of Motion of an Underwater Vehicle
34

4
RTO

MP

SCI

202
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
3.0
SIM
ULATION ARCHITECTURE
Top Package
::
AUV Operator
Thrust
Fins
Generate Control Signals
Control AUV
Thruster
Fins
Hydrodynamics
Kinematics
View AUV in
3
D
ViewPoint
(
AUV
)
Viewpoint
(
AUV
)
VRML Viewer
ViewPoint
(
AUV
)
ViewPoint
(
AUV
)
Hysdrostatics
Depth and Heading
Controller
Fins
Control AUV
Use cases
Simulation
packages
Visualization
packages
Monitor
Figure
1
:
Simulation Architecture
The VRML model used in the simulations is adapted from the VRML literature given in
[2]
which gives
various types of
VRML models that can be used for visualizing the underwater environment and for
different kind of vehicles. For development environment the adaptation of the model to MATLAB is done
by using VRML Builder 2.0. Viewpoints, translational and rotational state
of the Simulink model is fed to
VRML model by the addition of new child nodes.
VRML viewer block of the Simulink model is given in
Figure
2
.
Control and Simulation of Motion of an Underwater Vehicle
RTO

MP

SCI

202
34

5
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
VR Sink
UnderwaterVehicle
.
rotation
UnderwaterVehicle
.
translation
From
6
BodyTranslation
2
VRML
From
5
BodyRotation
2
VRML
double
(
4
)
double
(
3
)
Figure
2
:
VR Sink Block
During the simulation if VR sink block
given in
Figure
2
is clicked twice; Virtual Reality Toolbox Viewer
is opened automatically.
Figure
3
shows a screen capture of the VR viewer. Using this viewer, user is able
to
s
tart and
stop the simulation, navigate between viewpoints previously defined, capture, zoom in and
zoom out over the view, record the whole or scheduled simulation as Audio Video Interleave (AVI) or
VRML format.
Figure
3
:
A screen capture
of Virtual Reality Toolbox Viewer
4.0
CONTROL SYSTEM DESIG
N
Two main controllers are designed, the heading and the depth controller. Depth controller includes the
inner controller loop; pitch attitude controller used to keep the vehicle at the desired pitch a
ngle which is
designed separately. Also inner loop of heading controller includes the yaw angle controller which is used
to keep the vehicle’s yaw angle at zero degree. As a result, four controllers are used for different mission
types.
4.1
Heading Control Sys
tem design
This section describes the
method
of controlling the heading of AUV in a horizontal plane. The need for
a
heading controller
arose
during trial tests when the nonlinear model of the system is simulated and tried to
manually
control
by
a
joystick
. The precise control of
the A
UV in horizontal plane is getting harder if
vertical
maneuver
s are performed during the mission (3

D motion).
Control and Simulation of Motion of an Underwater Vehicle
34

6
RTO

MP

SCI

202
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
The requirement for the heading control system is to keep the
value
of the vehicle at th
e commanded
reference heading
,
ref
.
ψ
0
X
0
Y
X
Y
Figure
4
:
Heading of the vehicle illustrated in horizontal plane
First t
he lateral nonlinear dynamics of the UV
will be
given
which will be
f
ollowed by the control system
design. The tools used for determination of
the
linear controller gains are given including the requirements
that dictate the gain determination procedure. After develop
ing the heading controller in horizontal plane
for the ve
hicle
some simulation tests are performed for
determining the
final performance
of the
controller.
4.1.1
Lateral Dynamics
Lateral equations of motion of NPS AUV II can be written as
[
[6]
]
:
2
4 3 2
G r v r v r r
m v ur x r D Y r D Y v Y ur D Y uv Y u
(
8
)
2
5 4 3
z G G r v r v r r
I r mx v mx ur D N r D N v N ur D N uv N u
(
9
)
Here;
2
2
3
3
4
4
5
5
1
2
1
2
1
2
1
2
D L
D L
D L
D L
(
10
)
Control and Simulation of Motion of an Underwater Vehicle
RTO

MP

SCI

202
34

7
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
Assuming that the steady state linear velocity component of u0 is constant
[1]
, the three term matrix
representation of the linearized horizontal plane equations of motion can be written a
s
[4]
:
11 12 11 12
21 22 21 22
0 0
0 0
0 0 1 0 1 0 0
r
a a v b b v Y
a a r b b r N
(
11
)
Where
11
12
21
22
11 0
12 0
21 0
22
v
G r
G v
zz r
v
r
v
r G
a m Y
a mx Y
a mx N
a I N
b Y u
b Y m u
b N u
b N mx
(
12
)
To develop the heading controller, the vehicle’s forward speed
(u0) is assumed to be constant. The
nominal speed for the controller design is assumed to be u0 = 3.0 m/s.
In order to get
the
state equation
,
matrix
inversion and multiplication
operations
are
performed as:
1 1 1
[ ][ ] [ ]
[ ] [ ][ ] [ ] [ ][ ] [ ] [ ][ ]
[ ] [ ][ ] [ ][ ]
a x b x d u
a a x a b x a d u
x A x B u
(
13
)
0.4462 1.0563 0 0.337
0.09 0.939 0,0.413
0 1 0 0
A B
(
14
)
The tra
nsfer function of the system, defined in equation
(
11
)
, can be obtained by MATLAB function
belo
w
:
% obtain transfer function of the system
sys = ss(A,B,C,D)
tf(sys)
Where
C and D matrices are defined as:
Control and Simulation of Motion of an Underwater Vehicle
34

8
RTO

MP

SCI

202
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
0 1 0 0
,
0 0 1 0
C D
(
15
)
The output of the
MATLAB
command given above
defines the transfer function
s r(s) and the heading
deflection
to rudder deflection as f
ollows:
the transfer function of r to rudder deflection:
2
0.4131  0.2147
1.385 0.324
r
r s
s
s
s s
(
16
)
and the
response
to rudder deflection:
3 2
0.4131  0.2147
1.385 0.324
r
s
s
s s s s
(
17
)
To he
lp the operator to maintain an ordered heading during long range missions, a heading controller can
be designed as
[6]
:
1 2
r error
K K
(
18
)
Where
error ref
is the error signal between the reference (desired) yaw (
ref
) and the current yaw
angle setting of the underwater vehicle.
In order to use heading controller
given with equation
(
18
)
,
ref
has to be between ±180 degrees.
For heading controller the transfer function can be obtained by combining the Equatio
n
(
16
)
and the
control law given by Equation
(
18
)
as
[6]
:
1 2
1 1 2
2
1
1
1 2
1
1 2
1
r
ref
ref
ref
ref
ref
r n r n
d d
K K r
rd K K K r n
r d K n
K n
K n
r s
K n r d K n
K n
K K s n sd
(
19
)
Here, n is the numerator and d is the denominator of the transfer function given by Equation
(
16
)
.
Control and Simulation of Motion of an Underwater Vehicle
RTO

MP

SCI

202
34

9
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
1
2
1 2
0.1033  0.02684
0.1033  0.02684 0.6927 0.08099
ref
s K s
s
K K s s s s s
(
20
)
The control architecture of the mo
del
is
illustrated as in
Figure
5
.
Underwater
Vehicle Lateral Dynamics
x'
=
Ax
+
Bu
y
=
Cx
+
Du
kl
1
kl
2
Demux
psi
r
ref yaw
rudder
K
1
K
2
Figure
5
:
Heading controller
Design
block diagram
Using the MATLAB Simulink’s Single Input Single Output (SISO) tool, system
given in
Figure
5
is
converted into compensator control architecture for analyzing the system
behavior
and
for
determin
ing
the
gains satisfying the design specifications that will be discussed later.
MATLAB’s control and estimation tools manager allows designer to choose one of its different predefined
control architectures. The suitable architecture chosen for the heading controller design is given in
Figure
:
6
.
G
H
C
2
C
1
ref yaw
rudder
Figure
:
6
Control architecture chosen from MATLAB Control and Estimation Tools Manager
C1 and C2
in
Figure
:
6
are the controller compensators for the heading controller. G and H are the plants
simulat
ing the dynamic model.
According to the control system given
Figure
5
, the transfer functions for the SISO tool’s control
architecture given in
Figure
:
6
can be written as:
H=1, G =
r
s
s
, C2 = s, C1 = 1, since C2 and C1 are the
compensators to be determined.
The aim is to reduce the steady

state error after a step change in yaw angle or a step change in rudder
deflection
.
The inner and outer loop gains
are determined as: K1 = 7.3 and K2 = 15.7.
The s
tep response of the vehicle from initial heading of zero to 10 degrees of heading is shown in
Figure
7
. In about 22 meters of distance, the vehicle turned exactly 10
degrees of heading with maximum
Control and Simulation of Motion of an Underwater Vehicle
34

10
RTO

MP

SCI

202
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
overshoot of 0.7 degrees. It must be noted that the steady state error is very close to zero (0.0001 deg) in
heading after 22 meters of range.
0
2
4
6
8
10
12
14
16
18
20
22
2
0
2
4
deflection [m]
0
2
4
6
8
10
12
14
16
18
20
22
20
0
20
rudder deflection
[deg]
0
2
4
6
8
10
12
14
16
18
20
22
0
5
10
RANGE [m] for all graphs
yaw angle (psi)
[deg]
Figure
7
:
Vehicle response to 10 degrees of heading ch
ange.
According to the test results mentioned above it can be said that 10 degrees heading chan
ge occurs at an
acceptable range with acceptable rudder deflections.
The following test is performed in order to visualize the zigzag
maneuver
and
the
rudder per
formance
of
the vehicle
. First 60 seconds of the mission 30 degrees of heading is commanded to
the
vehicle
.
Then from
60

120 seconds of simulation time
,

30
degrees
of heading angle is commanded. The response of the
vehicle
to these commands
is shown in
Figure
8
.
Control and Simulation of Motion of an Underwater Vehicle
RTO

MP

SCI

202
34

11
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
0
50
100
150
200
250
300
50
0
50
100
Range
Deflection [m]
Range vs deflection
0
50
100
150
200
250
300
40
20
0
20
40
Range
Yaw [deg]
Range vs yaw angle
0
50
100
150
200
250
300
20
10
0
10
20
Range [m]
Rudder deflection [deg]
Figure
8
:
Response of the vehicle for zigzag
maneuver
command.
As can be seen from
Figure
8
, yaw angle of the vehicle is settled at 30 de
grees without any overshoot in
about 20 meters and it must be noted that the first full deflection of the rudder is given
at
6th meter of the
range.
A
s
it is
expected, the steady state rudder deflections become zero when the desired yaw angle is
reached.
D
uring
the second part of the mission, at
t =
60 s, total turning of 60 degrees (from 30 to

30) in
heading is needed. The vehicle performed this turning
maneuver
in about 30 meters, again without any
overshoot, and after reaching the desired yaw angle the
rudders have zero deflections. This performance
seems to be acceptable.
4.2
Yaw Angle Controller Desig
n
Yaw angle controller is part of
the
heading controller. The difference of
the
two models is
the
absence of
addition of reference yaw (or it can be said the
reference yaw angle is always zero for yaw angle
controller). So yaw angle controller block diagram reduces to control architecture as given in
Figure
9
.
T
his controller tries to make the yaw angle of the vehicle z
ero. The controller gains k1 and k2 given in
Figure
9
are
the
same as the heading controller gains (k1=7.3 and k2=15.7).
Control and Simulation of Motion of an Underwater Vehicle
34

12
RTO

MP

SCI

202
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
Underwater
Vehicle Lateral Dynamics
x'
=
Ax
+
Bu
y
=
Cx
+
Du
k
1
k
2
Demux
psi
r
Figure
9
:
Yaw angle controller block diagram
4.3
Pitch Attitude Contro
l System Design
Since
the
underwater vehicle used in this simulation
has stern planes for depth change
maneuver
s, the
underwater vehicle
’s
attitude control is mostly done by the use of elevators.
For simplicity bow planes of
the vehicle are assumed to be a
t zero position during all the maneuvers.
As given in
[1]
, the vehicle’s centre of gravity is not at the centre of buoyancy. So, the met
a

centric height
(difference between the CB and the CG position in vertical plane) produces
restoring moment to any
change in pitch angle of the vehicle (See
Figure
10
).
x
z
G
C
B
C
G
Gravity
Buoyancy
Figure
10
:
Buoyancy and Gravity forces acting
at
the CB and the CG position
s
res
pectively
This restoring moment is not enough to compensate the coupling effect of yawing motion to the heave
motion of the vehicle. Since,
neglecting the cross flow added mass terms
,
it can be seen from the
hydrodynamic equations given in
[1]
,
r
K
,
v
K
and
v
K
are non zero hydrodynamic parameters causing
rolling motion against yawing, on the other hand,
pp
Z
,
pr
Z
,
rr
Z
,
vp
Z
,
vv
Z
are the non zero hydrodynamic
parameters causing heave motion against rolling and yawing motion.
Changes in depth of the vehicle, caused by coupling motion can be com
pensated by manual control by
using
a joystick generally causing a relatively high oscillatory motion in depth
. D
uring the test cases with
Control and Simulation of Motion of an Underwater Vehicle
RTO

MP

SCI

202
34

13
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
the model developed in Simulink, it is observed that to control the vehicle at a certain depth is quite hard
when the
operator has to give a turning command to a desired position in yaw. It becomes harder to
perform a desired mission if both
a
depth change and
a
turn
maneuver
are needed
at the same time
.
Figure
11
illustrates thr
ee different test missions of the vehicle including manual control, attitude control,
and without any control. Both of them are trying to keep the vehicle’s initial depth of 3 meters. These
three tests are performed with a propeller speed of 750 rpm.
It ca
n be seen from t
his
figure that the attitude controller has the most efficient
behavior
which settles the
depth in
a
range of 120 meters and with an error of 20 cm while the other manual and free controls are
settled the vehicle in its desired depth in 300
and 600 meters respectively. On the other hand as discussed
in
the second paragraph, initial negative pitching moment causes the vehicle to settle at a depth of 9 meters
if no control is applied.
0
20
40
60
80
100
120
2.98
2.99
3
3.01
3.02
3.03
Range [m]
Depth [m]
0
100
200
300
400
500
600
700
2
4
6
8
10
Range [m]
Depth [m]
0
50
100
150
200
250
300
350
2.8
3
3.2
3.4
3.6
Range [m]
Depth [m]
Manually controllled depth
Without control
Attitude controller
Figure
11
:
Depth change of vehic
le during its mission for manual, automatic attitude controller
and without any control.
Pitch attitude controller design considers the pitch angle and the pitch rate of the system as feedback. And
the control law that computes elevator deflection can be i
llustrated a
s
[7]
:
Control and Simulation of Motion of an Underwater Vehicle
34

14
RTO

MP

SCI

202
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
gain
2
gain
1
gain
3
Underwater
Vehicle Vertical Plane Dynamics
x'
=
Ax
+
Bu
y
=
Cx
+
Du
kdtheta
ktheta
kq
Integrator
1
s
Demux
q
elevator
theta
theta
Commanded Theta
Figure
12
:
Block diagram of pitch attitude controller
Assuming that the steady state linear velocity
component of u0 is constant
,
[1]
t
hree term matrix
representation of the linearized vertical plane equations of motion can be written as
[4]
:
11 11 12
32
0 0 0
0 1 0 1 0 0 0
0 0 1 0 0 0
e
a q b b q M
z b z
(
21
)
Where
11
11 0
12
32 0
( )
yy q
q G
G B G B
a I M
b M mx u
b (z W z B) W z z
b u
(
22
)
Applying the same procedure given
for
equation
(
13
)
,
A and B matrices can be found as:
0.2231 0.5282 0 0.0843
0.0450 0.4696 0, 0.1033
0 1.0000 0 0
A B
(
23
)
Since this pitch attitude controller is also part of the depth controller,
the
state coefficient matrix C is
chosen as to take all the state variables as output. So
the
C matrix becomes:
Control and Simulation of Motion of an Underwater Vehicle
RTO

MP

SCI

202
34

15
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
1 0 0
0 1 0
0 0 1
C
(
24
)
The transfer function of the system defined by equation
(
21
)
can be obtained
by
using t
he MATLAB
function
already
given at
4.1
in section 4.1 for
depth, q
,
and is obtained
as follows
:
2
0.08433 s + 0.09415
+ 0.6927 s + 0.08099
e
z s
s
s
(
25
)
2
0.1033 s  0.02684
+ 0.6927 s + 0.08099
e
q s
s
s
(
26
)
3 2
0.1033 s  0.02684
0.6927 s + 0.08099s
e
s
s
s
(
27
)
An iterative process is performed during the gain determination for the pitch attitude controller (
Figure
14
). The main requirement for the g
ains is to shorten the settling time and to lower the overshoots.
Considering this requirement, the optimization started with a rise time of 0.3 seconds and settling time of
5 seconds from total simulation time of 10 s
, and the
set of
gains
for
:
1.3,83.6,0.097
q d
k k k
is
determined.
Using the control law of
[7]
:
e q d
k k q k dt
(
28
)
The vertical pl
ane response of the system with the controller gains given above is shown in
Figure
13
.
Control and Simulation of Motion of an Underwater Vehicle
34

16
RTO

MP

SCI

202
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
0
20
40
60
80
100
120
2
4
6
8
10
12
Range [m]
Depth change [m]
from reference depth of 3
Response of the dynamic system
0
20
40
60
80
100
120
40
30
20
10
0
10
20
Range [m]
Theta [deg]
0
20
40
60
80
100
120
20
10
0
10
20
Range [m]
Elevator deflection [deg]
Figure
13
:
Response of the system with pitch attitude controller
Figure
13
illustrates the dynamic response of the system. Up to 45 meters of distance, the vehicle ke
eps
its
initial commanded depth of 3 meters within about 0.02 meters of maximum overshoot.
A
t a distance of 45
meters a dive command is given to th
e vehicle with maximum elevator deflection for 3 seconds. After
turning the elevators to zero state, vehicle is dived to the depth of 11.9 meters in 4 seconds and ke
eps
its
depth.
The step response optimization for the system is done by the model given in
Figure
12
, and the step
response of the controller can
be seen in
Figure
15
.
theta
r
2
d
1
180
/
pi
r
2
d
180
/
pi
Underwater
Vehicle Vertical Plane Dynamics
x'
=
Ax
+
Bu
y
=
Cx
+
Du
Tunable
Parameters
[
kq ktheta kdtheta
]
Step Response
Step
kdtheta
ktheta
kq
Integrator
1
1
s
Demux
Current
Values
1
.
334
83
.
62
0
.
09745
q
elevator
theta
theta
theta
Figure
14
:
Gain determination block of pitch attitude controller
Control and Simulation of Motion of an Underwater Vehicle
RTO

MP

SCI

202
34

17
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
0
1
2
3
4
5
6
7
8
9
10
0
1
2
3
4
Time (s)
Theta [deg]
Step response of system
Figure
15
:
Step response of system given in
Figure
12
for 3 degrees of pitch angle change
5.0
TESTING
Six DOF Equations of motion given with equations
(
2
)
to
(
7
)
are applicable to any rigid body motion in
free space. On the other hand, these equations need to be modified in order
to reflect the real
behavior
of a
vehicle
operating
under water
environment
. Although the modification that is mentioned above is not
within the core equations of motion but the calculation of forces acting on the vehicle, the equations of
motion code writ
ten needs to be tested against a known trajectory of a rigid body travelling in vacuum
without external forces and moments, except the gravitational force.
For validation purposes, a simple test model is prepared with Simulink 6 DOF Equations of Motion blo
ck
(See
Figure
16
). This test is simply named
as
“Vacuum Trajectory Test”. The motion of the underwater
vehicle (rigid body in this case, since it is in vacuum not under water) just under the influence of
gravitati
onal force is determined by gravity, initial velocity of the body and initial Euler orientation. The
friction is negligible and trajectory describes a parabolic arc as illustrated in
Figure
17
.
X_e
simout
Eval Forces and Moments
Euler angles
Forces
Moments
6
DoF
(
Euler Angles
)
F
xyz
(
N
)
M
xyz
(
N

m
)
V
e
(
m
/
s
)
X
e
(
m
)
(
rad
)
DCM
be
V
b
(
m
/
s
)
(
rad
/
s
)
d
/
dt
A
b
(
m
/
s
2
)
Body
Euler Angles
Fixed
Mass
double
(
3
)
double
(
3
)
3
double
(
3
)
3
double
(
3
)
3
Figure
16
:
Test model prepared with Simulink 6 DOF Equations of Motion block (Aerospace
Block set).
The inputs (initial conditions) used for both model
are as follows
.
Initial velocity in body axis (u, v, w)
[m/s]
=
(100, 0, 0)
,
Initial Euler Orient
ation (Roll, Pitch, Yaw) [deg]
=
(0, 45, 0)
The other inertia matrix and mass properties remained the same as the model used in the
work
. Vacuum
trajectory test can be performed by initializing the test simulation by related MATLAB m

file and running
the m
odel. During the test run, vehicle’s positions are stored directly in Simulink workspace to be
compared with the results of model used in the
work
(See
Figure
17
).
Control and Simulation of Motion of an Underwater Vehicle
34

18
RTO

MP

SCI

202
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
This test guarantees that the model is solving the
dynamic equations of motion of a rigid body correctly.
Once the equations of motion are
derived
,
it is necessary to calculate the
forces and moments
to complete
the dynamic simulation
.
These calculations
can
easily
be validated by comp
aring the simulation
code with
the models
given in the literature
[8]
,
[1]
.
0
200
400
600
800
1000
1200
0
50
100
150
200
250
300
Range [m]
Height [m]
Vacuum Trajectory
Model used in this work
6DOF Simulink Blockset
Figure
17
:
Plot of
trajectories in
vacuum for validation of the model. (Note that the t
rajectories
are exactly equal, so they overlap)
6.0
6 DOF MOTION ANALYSI
S
6 DOF Motion analyses contribute to the understanding of coupling effects. In each of the test cases
hydrodynamic coefficients dictating the coupling effect are set to zero in the input
file describing those
coefficients. By this method we get the expected behaviors to be tested against.
4.2
Pure Pitching Motion Example
In order to investigate the coupling of pitching and rolling motion, a test case is performed. In this test
case the hydrody
namic coefficients dictating the coupling effect of pitching motion to the yawing motion
of the vehicle are all set to zero. Expected behavior of the system against elevator deflections is pure
pitching motion without any change in horizontal plane.
By usi
ng a joystick, different elevator deflections are given throughout the simulation. Under this manual
control, the vehicle is started to make a pitching motion without any change in its yaw angle.
Figure
18
illustra
tes the test case performed.
Control and Simulation of Motion of an Underwater Vehicle
RTO

MP

SCI

202
34

19
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
Figure
18
:
Pure pitching motion example
4.3
Pure Yawing Motion Example
In order to investigate the coupling of yawing and rolling motions, a test case is performed. In this test
case the hydrodynamic coef
ficients dictating the coupling effect of yawing motion to the rolling motion of
the vehicle are all set to zero. So the expected behavior of the vehicle in this case is our yawing motion
without rolling.
Full positive rudder deflection is given first, and
then full negative rudder deflection is given, under this
constant rudder deflection, the vehicle starts to make a turning maneuver describing a circle without any
change in roll angle
Figure
19
:
Pure yawing motion example
Control and Simulation of Motion of an Underwater Vehicle
34

20
RTO

MP

SCI

202
NATO
/PFP UNCLASSIFIED
NATO
/PFP UNCLASSIFIED
7.0
CONCL
USION
One of the most important results of this work is that by means of a 6 DOF simulation, it was possible to
understand the coupling effects between different motions such as the effect of yawing motion on the
rolling motion of the vehicle or the effect
of pitching motion on yawing motion. Finally all these
considerations are tested to prove the quality and the accuracy of the present simulation.
The investigation of these coupling effects is very straight forward by considering the dynamic equations
of
motion and hydrodynamic properties of the underwater vehicle. Various simulations were performed to
visualize these coupling effects by using the reconfigurable initialization file of MATLAB.
A more precise controller design and investigation of different
control strategies for specific mission types
could
be
a
future research
activity
.
D
ifferent vehicle configurations c
ould also
be considered such as
torpedo shaped
vehicles
including bow fins etc. Wave modelling and underwater currents can also be
incorpor
ated
in
to the simulation
package
to see the effects of these
disturbances
on the motion of the
underwater
vehicle.
For
future work the development of a real underwater platform in VRML
is undertaken
to see
its
real
performance against
various
obstacles and
other types of constraints
which
must be avoided
(sense and
avoid)
in real missions for specific undersea operations.
8.0
REFERENCES
[1]
Thor I. Fossen,
Guidance and Control of Ocean Vehicles
, John Wiley, Norway, 1994
[2]
Donald. P. Brutzman,
A Virtual World for an A
utonomous Underwater Vehicle,
Naval Post Graduate
School, Monterey, California,
December 1994
[3]
SAVAGE,
Scenario Authoring and Visualization for Advanced Graphical Environments
,
URL:
http://web.nps.na
vy.mil/~brutzman/Savage/
, 2007
[4]
Lingli Ni,
Fault

Tolerant Control of Unmanned Underwater Vehicles
, Blacksburg, Virginia, June 29
2001
[5]
MATLAB Technical documentation
, URL
:
http://www.mathworks.com
, 2007
[6]
David C. War
ner, Design,
Simulation and Experimental Verification of a Computer Model And
Enhanced Position Estimator for The NPS AUV II
, Naval Post Graduate School, Monterey,
California, December 1991
[7]
Donald McLean,
Automatic Flight Control Systems
, Prentice Hall, UK
, 199
0
[8]
Matlab toolbox for guidance, navigation, and control of marine vessels.
Version 3.1.1,
URL:
http://www.cesos.ntnu.no/mss/MarineGNC.htm
, 2007
Σχόλια 0
Συνδεθείτε για να κοινοποιήσετε σχόλιο