BA Waypoint Navigation
BA Waypoint Navigation
BA Waypoint Navigation
Feasibility Algorithms
The main topic of the thesis is path planning for autonomous surface and
ground vehicles. It is assumed that waypoints are given, and the problem is
to find a suitable algorithm that provides a feasible path, given the vehicle
dynamics and constraints.
Four dierent tangent vector calculation methods have been used to develop
smooth, parameterized C 1 -continuous curves as suitable paths between the
successive waypoints. The appurtenant path curvature has been calculated
and compared against the vehicle dynamics and constraints. Minimum ve-
hicle turning radius is mapped directly to maximum trajectory curvature.
When waypoint placement provides infeasible trajectories, three dierent al-
gorithms of moving, adding or removing waypoints have been suggested to
cope with the trajectory curvature.
The work presented in this thesis was carried out during spring 2011 at the
Department of Engineering Cybernetics, NTNU, Trondheim, Norway. Writ-
ing the masters thesis concludes ve years of higher education.
My interest-, competitive spirit- and urge for solving technical problems are
credited to my parents; se and Trygve Jensen, and my siblings Inger Soe
Heggland and Lars Christian Jensen in particular.
I would also like to give thanks to some of my fellow student; Martin Hanger,
Pl Sknberg Lvik, Andreas Jrgensen and Anders Freddy Johansen for in-
sightful input, assistance and motivation on my work with my masters thesis.
Finally, a special thanks goes to my girlfriend Helle Henriksveen for motiva-
tion and kind words when the work load felt staggering.
iii
iv
Table of Contents
1 Introduction 1
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 The Evolution of USVs . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Guidance, Navigation and Control . . . . . . . . . . . . . . . . 3
1.4 Path Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 Path-Following . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.6 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.7 Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Interpolation 9
2.1 Polynomial Interpolation . . . . . . . . . . . . . . . . . . . . . 9
2.2 Path Generation Based on Waypoints . . . . . . . . . . . . . . 10
2.2.1 Path Generation using Straight-Lines and Circles . . . 10
2.3 Spline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.4 Cubic Hermite Interpolation . . . . . . . . . . . . . . . . . . . 13
3 Guidance 17
3.1 Pure Pursuit Guidance Algorithm . . . . . . . . . . . . . . . . 17
3.2 LOS Guidance Algorithms . . . . . . . . . . . . . . . . . . . . 18
3.2.1 Enclosure-Based LOS Steering . . . . . . . . . . . . . . 19
3.2.2 Lookahead-Based LOS Steering . . . . . . . . . . . . . 21
3.3 WP Switching Algorithm . . . . . . . . . . . . . . . . . . . . . 23
3.4 Speed Prole . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.4.1 Speed Prole from Direct WP Layout . . . . . . . . . . 24
3.4.2 Acceptance Circle Radius Based on WP Layout . . . . 26
3.4.3 Curvature . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.4.4 Speed Prole Based on Path Curvature . . . . . . . . . 29
3.5 Feasible Path Selection . . . . . . . . . . . . . . . . . . . . . . 31
3.6 Removing Waypoints Algorithm . . . . . . . . . . . . . . . . . 32
3.7 Inserting Waypoints Algorithm . . . . . . . . . . . . . . . . . 33
3.8 Relocating Waypoints Algorithm . . . . . . . . . . . . . . . . 36
v
4 Models 39
4.1 Choosing the Right Vehicle Model . . . . . . . . . . . . . . . . 39
4.2 2nd Order Nomoto Model . . . . . . . . . . . . . . . . . . . . 40
4.3 1st Order Nomoto Model . . . . . . . . . . . . . . . . . . . . . 40
4.4 Viknes 830 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.4.1 Heading Actuators . . . . . . . . . . . . . . . . . . . . 41
4.5 Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . 42
4.5.1 Actuators . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.5.2 Environmental Aspects . . . . . . . . . . . . . . . . . . 43
4.6 Heading Reference Model . . . . . . . . . . . . . . . . . . . . . 44
5 Control 49
5.1 PID-Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6 Implementation 51
6.1 Waypoint Generator . . . . . . . . . . . . . . . . . . . . . . . 51
6.2 Simulator Structure . . . . . . . . . . . . . . . . . . . . . . . . 52
Bibliography 109
A Continuity 113
vi
B Digital Appendix 115
vii
viii
List of Figures
ix
7.7 Tangent method 1 and 2: Paths with inserted WPs. v = 1.0 . 69
7.8 Tangent method 3 and 4: Paths with inserted WPs. v = 1.0 . 70
7.9 Inserting WPs: Path curvature values for v = 1.0 . . . . . . . 71
7.10 Tangent method 3 and 4: Paths with inserted WPs. v = 0.4 . 72
7.11 Inserting WPs: Path curvature values for v = 0.4 . . . . . . . 73
7.12 Tangent method 1 and 2: Paths with relocated WPs. v = 1.0 76
7.13 Tangent method 3 and 4: Paths with relocated WPs. v = 1.0 77
7.14 Relocating WPs: Path curvature values for v = 1.0 . . . . . . 78
7.15 Tangent method 1 and 2: Paths with relocated WPs. v = 0.4 79
7.16 Tangent method 3 and 4: Paths with relocated WPs. v = 0.4 80
7.17 Relocating WPs: Path curvature values for v = 0.4 . . . . . . 81
7.18 Comparison of dierent guidance strategies . . . . . . . . . . . 84
7.19 Heading, heading reference and rudder values for PP guidance 85
7.20 Path comparison of Nomoto model and the Viknes 830 model 86
7.21 Comparison of minimum turning radius for boat models . . . 87
7.22 Comparison of velocity- and rudder values for boat models . . 88
7.23 Data from comparison of Nomoto and Viknes . . . . . . . . . 89
7.24 Comparison of constant and adapted acceptance circle radius . 90
7.25 Trajectories for dierent vehicle velocities . . . . . . . . . . . . 92
7.26 Heading and velocity values for the trajectories in Figure 7.25 93
7.27 Comparison of trajectories with adapted radius and velocity . 94
7.28 Comparison of adapted and constant velocity/acceptance circle 95
7.29 Path-following vehicle trajectory with constant velocity . . . . 97
7.30 Path-following with constant velocity versus adapted velocity . 99
7.31 Comparison of constant and adapted velocity for path-following100
7.32 Distinction in deviation for original and modied path . . . . 101
7.33 Vehicle trajectory with environmental disturbance . . . . . . . 103
7.34 Heading, velocity and rudder data for trajectory w/disturbance 104
x
Abbreviations
DP Dynamic Positioning
LOS Line-of-Sight
NED North-East-Down
PID ProportionalIntegralDerivative
PP Pure Pursuit
UV Unmanned Vehicle
WP Waypoint
xi
xii
Chapter 1
Introduction
1.1 Motivation
Unmanned vehicles (UVs) have only been used for a limited number of appli-
cation until relatively recently. However, through the last couple of decades,
the technology and research on unmanned vehicles have put on speed. Un-
manned vehicles can be divided into several subcategories depending on the
area of application, that is; Unmanned Surface Vehicles (USVs), Unmanned
Aerial Vehicles (UAVs), Unmanned Ground Vehicles (UGVs) and Unmanned
Underwater Vehicles (UUVs).
1
2 Chapter 1: Introduction
Although the range of applications are wide for unmanned vehicles, this the-
sis will principally deal with applications employing marine waypoint navi-
gation, hence focusing on USVs.
Despite increased focus on USVs from the US Navy after successful missions
in the second Gulf War, other countries expanded the research on Unmanned
Surface Vehicles as well. International Submarine Engineering is a Canadian
company that oers a kit transforming existing manned boats into USVs,
and have successfully developed the semi-submersible vehicle Dolphin MK
[5]. European researchers have also been highly involved in the research
of USVs; e.g. the autonomous catamaran CHARLIE developed for collec-
tion of sea surface microlayer, made by CNR-ISSIA in Genova, Italy [6].
The University of Rostock has developed two USVs; Measuring Dolphin [7]
and Delm [8]. The latter is an ensemble with the UUV INFANTE. Mar-
itime Robotics, a company located in Trondheim, Norway, has developed a
high-speed USV called the Mariner. Its areas of application are intelligence,
surveillance and reconnaissance, due to its video/infrared sensor equipment
and maritime data gathering. For a thorough review of prototype USVs the
1.3 Guidance, Navigation and Control 3
Today, research and development on USVs have come a long way. As opposed
to radio controlled unmanned vehicles from the 1940s, the technology now
support fully autonomous USVs, and is making use of them all over the world.
As an example; the US Navy operates numerous of USVs as target drones
nowadays. To control the movement of the unmanned vehicles, guidance,
navigation and control (GNC) systems applies.
the control system allocates thrust to the actuators to ensure that desired
position and velocity is satised.
Observer
The guidance system keeps track of the desired heading angle that the ob-
ject shall follow. The desired reference is continuously computed based on
current position given by the navigation system and a target dened by the
guidance algorithm. The desired heading is fed to the control system, so that
the operator (human or autopilot) can follow the calculated result. Adding
parameters as input to the guidance system, a path1 or trajectory2 can be
generated by a computer. These parameters can describe craft dynamics,
weather conditions, such as slippery road conditions if the GNC system is
implemented in a land vehicle, or land curvature and obstacles that can have
inuence on a desired trajectory. The computation of the desired heading
is in many cases an advanced optimization problem. However, depending
on the application, simpler methods as dierent line-of-sight (LOS) methods
may be applied [1].
The navigation system supplies the guidance and control systems with po-
sition and attitude of the vehicle. GPS data are the most common way of
determining position, although internal navigation systems (INS) often aid
the navigation in many applications.
The control system allocates force and torque to enforce the craft to satisfy
the given control objective, for instance trajectory tracking/path-following
and speed control. Flags from the guidance system and output from the
1
Path: Pure geometric consideration. No temporal constraints, i.e. time-invariant.
2
Trajectory: A path as a function of time; time-variant. Consider the dynamics.
1.4 Path Planning 5
navigation system are used for feedforward and feedback control respectively
[1].
With the help of GNC, vehicles are able to function autonomously. For the
sake of path-following schemes, the guidance systems have to put special
emphasis on path planning to prepare a feasible trajectory. It follows that
the vehicle dynamics and environments must be taken into consideration.
a) b) c)
A B A B A B
1.5 Path-Following
When vehicles are motivated to follow a predened waypoint setup, there
are many ways to do so. A 3 DOF nonlinear controller for path-following
is suggested by Fossen et al. [10]. Skjetne et al. [11] have put forward the
path-following problem as a maneuvering problem separated into two tasks;
geometric- and speed assignment. Simulations proved good results for the
geometric task, provided a recursive design procedure. An update law was
constructed to satisfy the speed assignment, and indicated satisfactory con-
trol of the vehicle velocity. However, the desired speed was set directly by
the operator and not as a function of the path. Another way of accurate
path-following is suggested by Nelson et al. [12]: A vector eld control law
is developed for various waypoint setups for air vehicles.
A review of guidance laws has been put forward by W. Naeem et al. [13]
stating that LOS guidance is the key element in all guidance systems. At the
MIT Autonomous Vehicles Laboratory, a waypoint-following fuzzy guidance
controller [14] for a small autonomous boat proved to perform well, even on
complex paths and with the presence of large disturbances. Desired heading
was specied in each waypoint, in addition to the geographical coordinates.
J. Osbourne and R. Rysdyk [15] have considered waypoint guidance for UAVs
in wind. Based on a lookup table, a proximity distance at each waypoint is
retrieved. Thus the UAV yields smooth convergence to each new course
without over- over or undershooting. Some of the same principles may be
used in waypoint guidance for unmanned surface vehicles.
1.6 Contributions
In this thesis, four dierent ways of creating splines have been employed to
recreate possible paths for path-following unmanned vehicles. The curva-
ture along the entire path is calculated and compared with the maneuvering
properties of the vehicle. Minimum vehicle turning radius is mapped directly
to maximum trajectory curvature, thus assigning a curvature threshold that
the path can not exceed.
path is yet dened infeasible, three algorithms for moving, adding or remov-
ing waypoints have been suggested to modify the original path to comply
with the vehicle dynamics.
Functions for calculating acceptance circle radius and velocities based on the
angle between the previous, current and next waypoint are also proposed.
Interpolation
9
10 Chapter 2: Interpolation
WP1 x1 y1 z1 U1 R1
WP x y2 z2 U2 R2
2 2
WP = . = . .. (2.1)
. . .. .. . . ..
. . . . . . .
WPn xn yn zn Un Rn
2.3 Spline
A spline curve is a function of piecewise polynomials. Usually a spline curve
is composed of lower order polynomials that are joined together in knots or
control points. Requesting equal value and slope of incoming and outgo-
ing curve in the control point enforces C 0 and C 1 continuity (see Appendix
2.3 Spline 11
1 x1 x21 ... xn1
1 x2 x22 ... xn2
M= 1 x3 x23 ... xn3 (2.2)
.. .. .. .. ..
. . . . .
1 xn+1 x2n+1 . . . xnn+1
To have a spline curve running smoothly through all the control points, the
properties of C 0 , C 1 and possibly C 2 continuity have to be fullled. One way
to solve this is described in [18] and is also repeated here:
1. To begin with, let a curve segment between the control points pi and
pi+1 be denoted by the function fi (x). To enforce C 0 continuity every
curve segment has to pass through its control points, thus fi (xi ) = yi
and fi (xi+1 ) = yi+1 .
bi + 2ci xi+1 + 3di x2i+1 bi+1 2ci+1 xi+1 3di+1 x2i+1 = 0 (2.5)
12 Chapter 2: Interpolation
4. To complete the linear system, slopes at the start and end point must
be provided. These slopes, s0 and sn , may be given by the current
altitude so that f0 (x0 ) = s0 and fn1
(xn ) = sn :
60
Control point
40
1st polynomial
2nd polynomial
20 3rd polynomial
North [m]
20
40
60
80
0 10 20 30 40 50 60 70 80
East [m]
Following this approach for successive control points in ascending order solves
the linear system a = M 1 y, so that the coecients for the cubic curve seg-
ments can be found. However, the suggested solution above is only valid for
ascending or descending values of x.
To cope with the fact that the solution above only is valid for monotonic
increasing or decreasing x-values, each curve segment in 2.1 can be parame-
terized with a parameter t [0, 1], as described in detail in [18]. To create
spline curves for arbitrary control points, consequently for curves in two or
three dimensions, one have to parameterize the equations. It follows that the
x- and y-coordinates have to be functions of a new parameter t, thus
2.4 Cubic Hermite Interpolation 13
x = f (t) (2.9)
y = g(t) (2.10)
This results in curves created from two cubic curves that are function of
t. Employing the same principle thought of having equal values and slopes
in the control points for the arbitrary, parameterized space curves makes it
possible to create smooth splines in higher dimensions as well. Expanding
the linear system for the two-dimensional case results in solving two linear
systems instead of one. The procedure and setup are the same, apart from
solving for both parameters ax and ay . The linear equations become:
Mx ax = x ax = Mx1 x (2.11)
My ay = y ay = My1 y (2.12)
There are several dierent kind of splines. A cubic hermite spline is one
type where the curve segments consists of cubic parameterized polynomials
in the interval t [0, 1]. Hermite interpolation diers from cubic splines in
how the end points are handled [1]. While many other cubic splines require
continuous curvature (C 2 continuity) at the control points, Hermite splines
settles with C 1 continuity. The matrices are obtained as explained by D.
House [18] for two control points pi and pi+1 :
x(t) = ax + bx t + cx t2 + dx t3 (2.13)
y(t) = ay + by t + cy t2 + dy t3 (2.14)
To solve the linear system and force C 0 - and C 1 -continuity through the con-
trol points, the following equations are employed:
14 Chapter 2: Interpolation
1 0 0 0 ax ay pi,x pi,y
1 1 1 1 by p pi+1,y
bx i+1,x
= (2.23)
0
1 0 0 c
x
cy
pi,x
pi,y
0 1 2 3 dx dy pi+1,x pi+1,y
The leftmost matrix is constant and will not change depending on user input.
The matrix on the right-hand side varies with the conguration and the dif-
ferent control points. The preferable slopes, mi = [pi,x , pi,y ] can be dened
in various ways and will be discussed in the next section. This denotes that
the only way the user can dene the shape of the curves between the control
points is by dening the slopes.
There are a few dierent ways of determining the slopes at the control points.
If the waypoint vectors have information about the desirable attitude or
heading at each WP, this can be used as a basis for the slope. Another quite
intuitive way of determining a reasonable slope in a control point to obtain a
smooth spline, is to use the position of the previous- and subsequent point,
pi1 and pi+1 respectively [19]. Using the local denition of the tangent mi
in the control point pi yields:
ui ui1
mi = (2.24)
2
where uj is dened as
2.4 Cubic Hermite Interpolation 15
pj+1 pj
uj = (2.25)
pj+1 pj
Consequently, mi is the tangent vector dened by the unit vectors uj1 and
uj , parallel to the line segments in and out of the control point, respectively.
The unit vector of the rst and last control point (u0 and (un ) respectively)
have to be taken care of individually. The magnitude of the tangent vectors
mi should be chosen so that it increases according to the distance between
the control points [19]. There are several ways of choosing tangent vectors,
and a few of them are listed below:
Method 1
pi+1 pi1
mi = (2.26)
2
Method 2
pi+1 pi (pi+1 pi1 )
mi = (2.27)
pi+1 pi1
Method 3
pi+1 pi (pi+1 pi ui1 + pi pi1 ui )
mi = (2.28)
pi+1 pi1
Method 4
mi = pi+1 pi ui1 + pi pi1 ui (2.29)
In all cases above, the special case for the start and end point has to be
treated individually. Equation (2.26) is known as the Catmull-Rom tangent
and is a popular choice of tangent estimator in many applications [20]. How-
ever, other tangent estimators may yield dierent characteristic that is more
suitable to the current objective.
Although the four dierent paths in Figure 2.2 achieve dierent characteris-
tics in form of curvature and length, they all still fulll the objective of the
Hermite cubic spline. Ergo, they pass through every control point and are
C 1 continuous. In this example, m1 and mn are simply chosen as scaled unit
vectors pointing from p1 and pn to their neighboring control point.
100
Method 1
80 Method 2
Method 3
Method 4
60 Control Points
40
20
North [m]
20
40
60
80
100
50 0 50 100 150
East [m]
Figure 2.2: Paths generated with dierent tangent vectors in the control
points
Chapter 3
Guidance
yk y(t)
tan(d (t)) = (3.1)
xk x(t)
where xk and yk are the positions of the next waypoint pk . The course angle
d can easily be calculated as
17
18 Chapter 3: Guidance
North
pk-1
-1
pk
d
T
[x(t), y(t)]
East
Assuming the craft is at current position p(t) = [x(t), y(t)] and the aux-
iliary setpoint is found at [xlos , ylos ] . The trigonometric relations yields
exactly as for pure pursuit guidance, although pk is exchanged with plos :
yk+1 yk y
tan(k ) = =
xk+1 xk x
(3.7)
ylos yk
= = constant
xlos xk
20 Chapter 3: Guidance
North
pk
pk+2
LOS
setpoint
pk+1
d R
LOS
vector
East
p
k-1
-1
y
ylos = xlos xk + yk (3.8)
x
y
x2los + x(t)2 2xlos x(t) + xlos xk + yk + y(t)2
x
(3.9)
y
2 xlos xk + yk y(t) = R2
x
2
y
a=1+ (3.11)
x
2
y y y
b = 2x(t) 2xk 2y(t)
+ 2yk (3.12)
x x x
2
2 2 2 y 2 y y
c = x(t) + y(t) + xk + yk 2yk xk + 2y(t)xk
x x x (3.13)
2y(t)yk R2
b b2 4ac
xlos = (3.14)
2a
The solution closest to the target waypoint should be chosen. As long as the
vehicle has not passed the waypoint outside the acceptance circle, xlos should
be picked accordingly:
b + b2 4ac
xlos = if x > 0 (3.15)
2a
b b2 4ac
xlos = if x < 0 (3.16)
2a
Inserting this solution into (3.8), ylos is obtained. This solution is valid when
x = 0. For the special case of x = 0, the solution is
When the solutions for xlos and ylos are obtained, equation (3.4) gives the
desired heading, d .
where
p = k (3.21)
e(t)
r (e) = arctan (3.22)
where (3.21) is the path-tangential angle and (3.22) is the course towards
the LOS setpoint relative the lookahead-distance and the cross-track error
e (see Figure 3.3). The lookahead-distance can be chosen arbitrary and
aects the steering sensitivity when the saturating control law yields
1
r (e) = arctan(Kp e(t)) Kp = (3.23)
A shorter lookahead distance results in more aggressive steering. The
North
pk k
pk+2
LOS
e(t) setpoint
pk-1
-1
pk+1
d
LOS
vector
East
where Ki > 0 is the integral gain. However, integral action should be treated
with carefulness to avoid wind-up and overshoots, therefore this should only
be implemented when experiencing a steady-state error which may occur for
crafts following a straight-line path in water with current or wind.
2
xk+1 x(t))2 + (yk+1 y(t) 2
Rk+1 (3.25)
where the target WP is at pk+1 = [xk+1 , yk+1] R2 and p(t) = [x(t), y(t)]
R2 denotes the position of the craft, at time t. The radius of acceptance can
be set to a xed number or chosen accordingly to the angle between WP
pk1 , pk and pk+1 , which will be explained in detail later in this chapter.
The WPs are ordered in a list, so that once you enter the acceptance circle
of pk+1 , the following WP, pk+2, in the list will be set as as the next target.
Special consideration must be taken for the last WP, pn . Entering the ac-
ceptance circle of pn , it may be sensible to decelerate the vehicle and switch
to manual control.
and cars, a mate adjusts the velocity due to visual impression and system of
signs. For autonomous vehicles under a WP/path-following regime however,
this speed adaption can be computed based on the waypoint placement. This
means that the WPs or the entire path can be assigned a reference speed.
When adjusting the speed in time before course-changing maneuvers, it may
minimize cross-track error from the reference path and are therefore highly
desirable.
2
k
vref (k ) = vmin + vmax vmin e 2 (3.30)
3.4 Speed Prole 25
where vmin is the lower bound of the velocity and should be chosen as the
very slowest operating speed of the vehicle. vmax is the upper bound and
should be the nominal velocity. is the input angle dened in (3.29). The
function guarantees symmetry about = 0 which is attractive since course-
changing maneuvers should be independent of turning direction. The design
parameter alters the shape/slope of the curve. The relationship between
the vehicle speed and turning radius is not necessarily linear, therefore it is
favorable that the Gaussian function (3.30) introduces a safety margin: This
is achieved by decreasing the velocity further for sharper turning angles. The
parameter must be chosen to take the vehicle dynamics into consideration,
although = 0.5 can be seen as a rule of thumb. For = 0.5, the reference
velocity is approximately the same for || [90 , 180 ]. Even lower -values
should be set if course-changing maneuvering quality decreases drastically
for increasing .
5.5
=0.5
5
=1
=2
4.5 Upper bound
3.5
Speed [m/s]
2.5
1.5
Lower bound
1
150 100 50 0 50 100 150
[deg]
Figure 3.4: Reference speed vref () for [180 , 180] for dierent -
values
As seen in Figure 3.4, varying the parameter yields dierent reference ve-
locity curves. The lower and upper velocity bounds are set to vmin = 1 m/s
26 Chapter 3: Guidance
The parameters vmin , vmax and are dependent of the vehicle dynamics and
the area of application. Assigning dierent velocities at each WP can be
an applicable solution when the WPs are equidistant distributed and have a
smooth setup. However, if a straight-line path is sampled with a lot of noise
and short waypoint intervals, the reference speed might become too low. A
solution to this is to obtain a speed prole based on the curvature from the
planned path intersecting the waypoints.
and passing far through the waypoint before turning because of slow vehicle
dynamic, larger acceptance circle can in some applications be implemented
based on the angle (3.29) for the consecutive waypoints. For other ap-
plications, the radius is specied by the mission objective. An equation for
calculating a desirable radius is:
22
R() = Rmax Rmax Rmin e
R (3.31)
where Rmax is the desired maximum radius and Rmin is the minimum possible
radius. R is a scaling factor that shapes the acceptance circle prole. The
function is symmetric about = 0 and yields the same protable properties
as equation (3.30).
38
Upper Bound
36
34
32
30
Radius [m]
28
26
24
22
20
18 Lower Bound
3.4.3 Curvature
As explained in Chapter 2, there are several ways to create splines be-
tween waypoints. These splines are C 1 or C 2 continuous, depending on the
interpolant method. Letting the spline represent the desired path opens
for inserting more WPs on the trajectory between the old, original way-
points. Hence, the new WPs are distributed along the curve segment from
pk to pk+1 , and this segment is parameterized and given by the expressions
x(t) = ax + bx t + cx t2 + dx t3 and y(t) = ay + by t + cy t2 + dy t3 . Since there
now is a 3rd order polynomial describing the curve, the curvature along this
curve can be calculated.
1
= (3.32)
For two-dimensional smooth curves, there will always be an unique circle,
called an osculating circle with radius , that approximates the curve near
a point p dened on the curve, as long as = 0; that is, the curve is not a
straight line. If on the other hand the line is straight, it is presumed that
the radius of the osculating circle is innite. For parameterized curves in
R2 , the derivatives of x(t) and y(t) will be investigated, so that a formula for
the curvature can be obtained [22]:
|x y x y |
= 3 (3.33)
(x )2 + (y )2 2
Since the curve is smooth, there are no discontinuities when x (t) = 0 because
y (t) = 0 simultaneously. Looking closer at a cubic spline, the curvature for
the entire curve can be calculated. The curvature for the example path in
Figure 2.2 when method 3 for tangent calculation is employed, can be seen
in Figure 3.7.
3.4 Speed Prole 29
100
80 0.3
60
0.25
40
20 0.2
North [m]
0
0.15
20
40 0.1
60
0.05
80
100 0
60 40 20 0 20 40 60 80 100 120 140
East [m]
Figure 3.7: Curvature for an arbitrary path; (blue = low curvature) (red =
high curvature)
The colorbar in Figure 3.7 spans from low curvature (dark blue) to high cur-
vature (red). Since the interpolation method does not ensure C 2 -continuity,
the curvature at the waypoints is not continuous.
Figure 3.8: The three steps from original curvature to corresponding reference
velocity
max() j
vref = vmin + (vmax vmin ) (3.34)
max()
where vmin is the minimum velocity applied at the point where maximum
curvature takes place. vmax is maximum velocity, typical at straight-lines
where the curvature is low. max() is the maximum curvature value and j
3.5 Feasible Path Selection 31
Due to the time delay in most actuators, the reference velocity should be
time-shifted forward to cope with the transition time it takes to attain the
reference.
Ignoring WPs that causes the infeasibility if the application allows it.
For all vehicles there is a minimum turning radius when applying maximum
deection so that the heading actuators saturates. For marine crafts this
typically denotes maximum rudder deection while it is represented by the
maximum wheel positioning for ground vehicles. Based on the maximum
deection, every vehicle has a minimum turning radius that either can be
calculated theoretically or found by experiments. By applying this system
characteristic, a limit for maximum path curvature can be set, since the
turning radius should not exceed the radius of the osculating circles along the
path. The curvature of the circle path made by maximizing heading actuators
is found from equation (3.32). This curvature value can be compared with
the path curvature. Hence, the feasibility check yields:
1
where vehicle = min and min is the minimum circle radius the vehicle can
complete, constrained by its dynamics, and velocity in particular. is calcu-
lated from equation (3.33), and path is the maximum value of . It follows
that the radius of a turn has to be less than the radius of any osculating
circle along the path. Even though vehicle can be found theoretically from
the specs of a vehicle, the eect of slip increases the turning radius. vehicle
1
should therefore be chosen even smaller than min in many cases. Slip is
discussed in [23].
Algorithm 1 WP Removal
n length(WP )
Require: n > 4
vehicle constant
path 2 vehicle
while path > vehicle and n > 4 do
generateSpline(WP )
path max()
if path > vehicle then
WP removeWPfromAarray(critical WP )
n length(WP )
end if
end while
generateSpline returns the curvature for the entire path in the vector .
The function removeWPfromAarray deletes the entry of critical WP from the
WP array. The critical waypoint is the last WP passed before approaching
the section of the curve where path > vehicle .
There are several dierent possibilities for the WP placement. The number of
inserted WPs yields dierent characteristics. In Figure 3.9, three WPs have
been added to create a feasible path. Originally, the curvature was too high
at the vertex. By inserting additional WPs, thus replanning the path, the
curvature path can be decreased to suit the vehicle dynamics and the min-
1
imum turning radius, min = vehicle . The sequence of the new WPs is also
important. In general, an inward curve should result in a crossing path when
34 Chapter 3: Guidance
adding WPs, while outward curves should not cross. A non crossing setup is
applicable for inward curves as seen in Figure 3.9. Given a ctitious straight
line between the two original WPs surrounding the critical curvature area;
notice that to achieve the desirable decreased curvature eect, the inserted
WPs must be placed on the same side of the line as the critical point (where
the curvature is too high) itself. Pseudocode for WP insertion is presented
next:
Algorithm 2 WP Insertion
n length(WP )
k0
vehicle constant
path 2 vehicle
while path > vehicle and n > k do
generateSpline(WP )
path max()
if path > vehicle then
NEW _WP S generateNewWPs(WP, critical WP )
WP addWPsToArray(NEW _WP S)
end if
k k+1
end while
80 0.12 80 0.12
y [m]
y [m]
0.1 0.1
70 70
0.08 0.08
60 60
0.06 0.06
50 50
0.04 0.04
40 0.02 40 0.02
30 0 30 0
40 20 0 20 40 40 20 0 20 40
x [m] x [m]
]
1
0.5 0.5
Curvature [m
Curvature [m
0.4 0.4
0.3 0.3
0.2 0.2
0.1 0.1
0 0
0 500 1000 1500 0 500 1000 1500
Sample [n] Sample [n]
Relocating a WP
80 6 0.22
0.2
70
0.18
5
60 0.16
50 4 0.14
0.12
y [m]
40 3
0.1
30 0.08
2 0.06
20
0.04
10
0.02
1
0
60 40 20 0 20 40
x [m]
Figure 3.11: Principle of relocation of WPs that causes too high path curva-
ture
Curvature values
0.45
0.4
0.35
0.3
]
1
Curvature [m
0.25
0.2
0.15
0.1
0.05
0
0 100 200 300 400 500
Sample [n]
relocateWP alters the placement of the critical WP: (WPc ). The distance
moved is a fraction of the length from the relevant WP to the midpoint of
the line between WPc1 and WPc+1 . This fraction is a parameter set in the
function relocateWP and may be decided by operator. A small fraction im-
plies a small change in the WP placement. A rule of thumb is to set this
parameter to 14 , thus moving the critical WP 14 closer to the midpoint of
the line. The number of maximum iterations made for the entire curve is
resolved by iter_constant. Generally, the less distance a WP is moved, the
more iteration should be carried out. Shorter relocating distance results in
marginal change in curvature values, while greater distance yields unneces-
sary large safety margin of the curvature compared with vehicle . The number
of iterations is also a matter of computational power.
Chapter 4
Models
This chapter discusses dierent model types; both vehicle models and ref-
erence models. A short overview of Nomoto models and a more complex
mathematical model of Viknes 830 is carried out. A reference model consid-
ering limitation of the vehicle dynamics is discussed towards the end of the
chapter.
The model requirements with respect to complexity of the model are appli-
cation dependent. Sometimes a model with considerable simplications is
sucient for the controlling task. In other applications an accurate model is
essential to capture the dynamic of the system. There is, however, a trade-
o between the complexity and accuracy of the model that has to be taken
into consideration. Nevertheless, a model of the system that describes its
dynamics is essential to control it.
39
40 Chapter 4: Models
A dierent approach is black box modeling based on input and output data.
System identication makes it possible to t model input and output data
to measurements [23].
r K(1 + T3 s)
= (4.1)
(1 + T1 s)(1 + T2 s)
K(1 + T3 s)
= (4.2)
s(1 + T1 s)(1 + T2 s)
where T1 , T2 and T3 are the time constants and K is the gain. Given con-
stant speed V , the vehicle velocity and position are found from the purely
kinematic equations:
x = V cos (4.3)
y = V sin (4.4)
where the velocities x and y are dened in the NED coordinate system.
r K
= (4.5)
1 + Ts
and still noting = r, this can be rearranged as
K
= (4.6)
s(1 + T s)
where T = T1 + T2 T3 . This model is popular in autopilot design because of
its combination of simplicity while still being reasonably accurate. However,
it is important to notice that the model assumes constant thrust and small
rudder angles. The model parameters change when altering the velocity. To
comprise varying thrust a more complex model have to be employed.
The vessel net weight is approximately 3.3 metric tons and the length is
nearly 8.5 meters. Due to a relatively large area of the vessel oating above
the water-line, the Viknes 830 can be subject to considerable drift caused by
wind forces.
The position, orientation and velocity are given by the vectors and in NED
(North-East-Down) and BODY reference frames, respectively. The equations
of motion (4.7) and (4.8) are derived from the seakeeping and maneuvering
model.
= J() + vc (4.7)
M + CRB () + CA (r )r + D(r )r + + G = waves + wind + (4.8)
x u
y v
z w
=
=
(4.9)
p
q
r
The states of are the vehicle position in addition to roll, pitch and yaw,
respectively. For the states are dened as: Surge, sway, heave, roll rate,
pitch rate and yaw rate.
The coecients of equation (4.7) and (4.8) are briey explained next (for
thorough details see [27]). M is the mass matrix and includes both terms
for the rigid physical structure and hydrodynamically added mass. CRB and
CA are the Coriolis and centripetal matrices and contains nonlinear terms.
Damping eects are gathered in the linear matrix D and the matrix G > 0 is
a linear approximation of the restoring forces. deals with the uid memory
eects generated by the waves due to the motion of the vessel. The remaining
terms on the right hand side of (4.8) are the driving forces of the system,
where wind and waves are forces from the environment while are the control
forces.
4.5.1 Actuators
The propulsion is generated by a diesel engine and the force acts only in 1
DOF - along the heading of the vessel. Additional forces in the 4 DOFs of
surge, sway roll and yaw are generated by the rudder which consists of the
rudder servo and the rudder itself. To generate force from the rudder, relative
velocity must be present. Since the tunnel thruster is neglected for simulating
scenarios in this thesis due to its ineciency and superuity at speed greater
than 1 m/s, the vessel needs to have a minimum relative velocity to cope
with maneuvering.
Sea current is a continuous movement of water and arises from the eects
of gravitational pull of the moon, temperature and salinity. Current has the
eect of adding not-propulsion-generated velocity to the vessel, thus the term
vc occurs in the velocity equation (4.7). A constant current velocity leads to
a heading dependent force that can be compensated for by integral action in
the contingency of a PID-controller.
While sea current can be modeled as a constant force, waves on the other
hand are considered to be irregular. Wave spectrum is commonly used to
describe the energy distribution in the frequency domain on the surface of
the ocean. This spectrum is location dependent due to disparities in the
wave frequency distribution and a chosen spectrum is used to excite a re-
sponse amplitude operator to generate either force or motion response [27].
The mean wave height of the one-third highest waves is called the signicant
wave height, and is an important parameter in the environment model for
waves. The waves add randomness in time and space and are considered an
important environmental disturbance. Every boatman knows the importance
of the encountering angle of the waves, therefore the waves aect vessels dif-
ferently depending on the boat attitude relative the waves.
d n3
(s) = (4.10)
r (s + n )(s2 + 2n s + n2 )
4.6 Heading Reference Model 45
In addition, for steps in r the rst and second order derivatives of d are
still smooth and bounded. Using a reference model for smoothing the tra-
jectory of the desired heading is advantageous so that the error between the
desired and actual heading is kept small. It is important that the closed-
loop bandwidth never get exceeded by the cut-o frequency of the reference
model to assure that the craft tracks the desired state. In other words, the
eigenvalues of the desired states should be chosen such that the dynamics of
the reference model is slower than the actual vehicle dynamics.
Because of dynamic restriction in the servo that actuates the rudder, or lim-
itation in the rudder dynamics itself, it is often advantageous to saturate the
yaw rate and yaw acceleration. Saturation can be obtained by implement-
ing a saturating element in the reference model, such that |rd | rmax and
|ad | amax [1] [28]. In general, it is important to create a reference model
that takes the physical limitations of the craft into account.
The state space model on controllable canonical form of the strictly proper
transfer function (4.10) with saturation elements on yaw rate and yaw accel-
eration yields:
1 (2 + 1)n (2 + 1)n2 n3 1 1
= + u(t) (4.12)
2 1 0 0 2 0
3 0 1 0 3 0
y= 0 0 n3 (4.13)
where the input u(t) = r . Proper saturation can now be placed on the
states rd and ad .
Control
5.1 PID-Control
Conventional crafts are often equipped with main propellers for controlling
surge and a rudder for controlling yaw. If no tunnel thrusters or actuators
controlling sway are available, the vehicles are underactuated for 3 DOF
tracking control. The output space of conventional waypoint guidance sys-
tems are usually reduced from 3 DOF to 2 DOF, only emphasizing surge and
yaw [30].
The yaw moment output from the control system for the course control is
allocated to the actuators. For smaller crafts this is usually distributed to
49
50 Chapter 5: Control
the rudder while for larger ships actuators as azimuth thrusters and tunnel
thrusters are commonly used in addition to the rudder. However, for the
dimensions of leisure size boats like Viknes 830 operating at low/medium to
high cruising velocity PID-control of only the rudder is sucient.
where (t) is the error between the reference and the current state. K are
the PID gains. The calculated controller outputs are the moments rudder
and propulsion propulsion forcing the craft to converge to the LOS setpoint
by aecting the rudder and main propellers respectively.
1
n = b (5.3)
1 2 2 + 4 4 4 2 + 2
where b is the closed-loop-bandwidth of the regulated system. b should be
chosen between the bandwidth of the Nomoto model and the rudder band-
width [1].
The proportional gain Kp is set to:
T n2
Kp = (5.4)
K
Computing the D-gain, Kd :
2T n 1
Kd = (5.5)
K
A rule of thumb is to set the integral gain 10 times slower than the
natural frequency n .
n Kp
Ki = (5.6)
10
it follows that the gains Kp , Kd , Ki > 0.
Chapter 6
Implementation
For the case of direct WP following without path generation from cubic
splines, setting waypoints and calculating desired speed and acceptance ra-
dius at each WP are done simultaneously. These parameters are added to
51
52 Chapter 6: Implementation
80 18
17
60 3
2 16
15
40 1
4
13 14
20
North [m]
0
5
12
20
11
40
6 10
60
7
8
9
80
100
80 60 40 20 0 20 40 60 80
East [m]
Basically, the same structure applies for the 6 DOF Viknes boat model sim-
ulator as well. However, machinery and the actuators are modeled in detail,
and environmental disturbances are added. For a thorough explanation on
this the reader is encouraged to see the masters thesis of Kjerstad [27].
The path plotter was originally developed for student assignments in the
course TTK 4190 Guidance and Control at the Norwegian University of Sci-
ence and Technology. The plotter is, however, modied and adopted to
appropriate dimensions pursuant to Viknes 830.
1
The m-file can be found in the digital appendix
Chapter 6: Implementation
Figure 6.2: Overview of the simulator with the Nomoto model implemented
Waypoint Generator Guidance System
Path Generator
Nomoto Model
Heading Reference Model Heading Controller
Constant Speed
54
implemented
Wave Model
6.2 Simulator Structure
Figure 6.3: Overview of the simulator with the 6 DOF Viknes boat model
55
56 Chapter 6: Implementation
Chapter 7
This chapter presents the results of the algorithms for removing, inserting
and relocating waypoints for infeasible paths. A case study with simulations
of direct waypoint-following and path-following, examining the theory put
forward in earlier chapters, is carried out.
Discussion of the results for the path modifying algorithms is done prior to
the respective plots.
57
58 Chapter 7: Results and Discussion
Method 3 and 4 yield more satisfactorily results; removing 2 and none WPs,
respectively, while still complying with the requirement of path > vehicle .
Method 3 removes two WPs at the bendy part towards the end of the path.
The selection of whether these WPs can be ignored or not is up to the opera-
tor to determine, but it is often dened by the area of application. Important
to notice is that after removing two waypoints for method 3, the maximum
curvature is lower than for method 4 which is unaltered; see Figure 7.2.
In the case of vehicle = 0.4 m1 a reasonable path would be the one calculated
from method 3, with only 2 eliminated waypoints. The overall trajectory is
7.1 Removing Waypoints 59
fairly recreated despite the removal of a few WPs. The path generation with
method 3 and method 4 yield generally better result (lower path curvature)
and is usually preferred for path generation. Notwithstanding, Catmull-Rom
tangents can be a good choice if the maneuverability is high and shortest
distance is emphasized.
Tangent method #1
Waypoints removed:32
0.9
60 0.8
40 0.7
20 0.6
0 0.5
y [m]
20 0.4
40 0.3
60 0.2
0.1
80
100 50 0 50 100
x [m]
Tangent method #2
Waypoints removed:26
60 0.8
40 0.7
20 0.6
0 0.5
y [m]
20 0.4
40 0.3
60 0.2
80 0.1
0
100 50 0 50 100
x [m]
Figure 7.1: Paths with removed WPs and tangent calculation method 1 and
2. vehicle = 1.0 m1
7.1 Removing Waypoints 61
Tangent method #3
Waypoints removed:2
0.3
60
0.25
40
20 0.2
0
y [m]
0.15
20
40 0.1
60
0.05
80
100 50 0 50 100
x [m]
Tangent method #4
Waypoints removed:0
0.8
60
0.7
40
0.6
20
0.5
0
y [m]
0.4
20
0.3
40
0.2
60
0.1
80
0
100 50 0 50 100
x [m]
Figure 7.2: Paths with removed WPs and tangent calculation method 3 and
4. vehicle = 1.0 m1
62 Chapter 7: Results and Discussion
1 1
]
]
0.8 0.8
1
1
Curvature [m
Curvature [m
0.6 0.6
0.4 0.4
0.2 0.2
0 0
0 200 400 600 0 500 1000
Sample [n] Sample [n]
1 1
]
0.8 0.8
1
1
Curvature [m
Curvature [m
0.6 0.6
0.4 0.4
0.2 0.2
0 0
0 1000 2000 3000 0 1000 2000 3000
Sample [n] Sample [n]
Figure 7.3: Path curvature values for removing WP algorithm for the four
dierent vector tangent calculation methods for vehicle = 1.0 m1
7.1 Removing Waypoints 63
Tangent method #1
Waypoints removed:35
1.8
60
1.6
40
1.4
20
1.2
0
y [m]
20 0.8
40 0.6
60 0.4
80 0.2
0
100 50 0 50 100
x [m]
Tangent method #2
Waypoints removed:29
0.2
60
0.18
40
0.16
20 0.14
0 0.12
y [m]
0.1
20
0.08
40
0.06
60 0.04
80 0.02
0
100 50 0 50 100
x [m]
Figure 7.4: Paths with removed WPs and tangent calculation method 1 and
2. vehicle = 0.4 m1
64 Chapter 7: Results and Discussion
Tangent method #3
Waypoints removed:2
0.3
60
0.25
40
20 0.2
0
y [m]
0.15
20
40 0.1
60
0.05
80
100 50 0 50 100
x [m]
Tangent method #4
Waypoints removed:4
0.35
60
0.3
40
0.25
20
0 0.2
y [m]
20 0.15
40
0.1
60
0.05
80
0
100 50 0 50 100
x [m]
Figure 7.5: Paths with removed WPs and tangent calculation method 3 and
4. vehicle = 0.4 m1
7.1 Removing Waypoints 65
0.5 0.5
0.4 0.4
]
]
1
1
Curvature [m
Curvature [m
0.3 0.3
0.2 0.2
0.1 0.1
0 0
0 100 200 300 400 0 200 400 600 800
Sample [n] Sample [n]
0.5 0.5
0.4 0.4
]
]
1
1
Curvature [m
Curvature [m
0.3 0.3
0.2 0.2
0.1 0.1
0 0
0 1000 2000 3000 0 1000 2000 3000
Sample [n] Sample [n]
Figure 7.6: Path curvature values for removing WP algorithm for the four
dierent vector tangent calculation methods for vehicle = 0.4 m1
66 Chapter 7: Results and Discussion
For tangent method 1 (Catmull-Rom), too large curvature values were en-
countered at the end of the original path, where there are two sharp turns.
The problem with Catmull-Rom tangents is that since their magnitude is
low, the preturn characteristic is not present in the same way as for the other
tangent calculation methods. Thus, only three inserted waypoints with the
orientation given in this test do not result in a new path with curvature lower
than the threshold of vehicle = 1.0 m1 . As can be seen in Figure 7.9 for tan-
gent method 1, the curvature of the path created by the inserted waypoints
is at path 2.75 m1 . The placement of the inserted WPs are obviously of
importance, and for Catmull-Rom splines even more WPs should have been
added to create a smoother turning circle. A minimum requirement is that
the curvature of the new turning circle is lower than the threshold of the
vehicle; if not, this approach is useless since the algorithm will keep iterating
over the entire curvature and add new WPs that keeps resulting in a path
with path > vehicle . After n 1 iterations, where n is the length of the
original WP array, the algorithm terminates. Owing to the fact that insert-
ing WPs should decrease the curvature between two WPs where the original
path curvature exceeds the curvature limit, a worst-case scenario will be that
the original path curvature is too high between every two consecutive WPs,
therefore adding WPs n 1 times means that the curvature between every
consecutive WPs has been investigated. Evidently, Catmull-Rom tangents
do not yield satisfactory results for the conguration of the inserted WPs.
are inserted, although the new path becomes very bendy and inecient. A
problem for method 2 is the tangent magnitude scaling when changing from
long to short distance between the WPs. As a result of this, the path obtains
unfortunate high curvature where e.g. method 3 and 4 yields satisfactorily
results. Method 2 indicates poor performance when inserting WPs.
Even though both method 1 and 2 fail in this attempt of inserting WPs,
they could benet from a dierent WP conguration. In addition to adding
more WPs, the result is altered with dierent WP placement. Important to
notice is that a dierent placement of the inserted WPs would have yielded
a dierent results. This goes for both the number of WPs added and the
distance from the ctive straight-line between the added waypoints.
The modied path for method 3 and 4 achieves better results. Naturally,
method 4 does not imply any changes of the path since vehicle = 1.0 m1 .
and path < vehicle for the entire path. Method 3 however inserts WPs
according to the WP insertion algorithm with non-crossing arc. It is demon-
strated that the new path has decreased curvature and therefore comply with
the curvature path threshold.
Since method 1 and 2 failed for vehicle = 1.0 m1 , there will be no amend-
ment in the results for vehicle = 0.4 m1 . As for the removing WP algorithm
with the identical WP setup as in this experiment, there was no change in the
paths for method 3 when modifying the vehicle curvature limit from 1 m1
to 0.4 m1 . This is given by the fact the path curvature values for method 3
is beneath the new vehicle threshold (see Figure 7.9).
Method 4 adds 18 WPs to the original path to keep up with the vehicle cur-
vature requirement. Thus, 6 critical areas have been altered. A modication
of the path can easily be observed in Figure 7.10 at the 14th WP (where
WP1 is at the origin). The path at this section, where path originally is too
high, is now altered to make a smoother turn with lower curvature. Even
though the curvature threshold is met, a shorter turn could have been carried
out, thus the placement of new WPs is not ecient with respect to e.g. fuel
eciency. This specic section however demonstrates a good application of
WP insertion; resulting in a smooth directed turn with decreased curvature.
To achieve even better results, more emphasis should be put into the WP
placement when inserting new WPs. In that case, both the number of WPs,
the WP placement and the orientation (see Figure 3.9) should be taken into
account. For the case of removing WPs, method 3 performs most satisfac-
68 Chapter 7: Results and Discussion
Tangent method #1
Waypoints added:111
3.5
60
3
40
2.5
20
2
0
y [m]
20 1.5
40
1
60
0.5
80
0
100 50 0 50 100
x [m]
Tangent method #2
Waypoints added:111
3
60
2.5
40
20 2
0
y [m]
1.5
20
40 1
60
0.5
80
100 0
100 50 0 50 100
x [m]
Figure 7.7: Paths with inserted WPs and tangent calculation method 1 and
2. vehicle = 1.0 m1
70 Chapter 7: Results and Discussion
Tangent method #3
Waypoints added:6
80
0.35
60
0.3
40
20 0.25
0 0.2
y [m]
20
0.15
40
0.1
60
0.05
80
0
100 50 0 50 100
x [m]
Tangent method #4
Waypoints added:0
0.8
60
0.7
40
0.6
20
0.5
0
y [m]
0.4
20
0.3
40
0.2
60
0.1
80
0
100 50 0 50 100
x [m]
Figure 7.8: Paths with inserted WPs and tangent calculation method 3 and
4. vehicle = 1.0 m1
7.2 Inserting Waypoints 71
Figure 7.9: Path curvature values for WP insertion algorithm for the four
dierent vector tangent calculation methods for vehicle = 1.0 m1
72 Chapter 7: Results and Discussion
Tangent method #3
Waypoints added:6
80
0.35
60
0.3
40
20 0.25
0 0.2
y [m]
20
0.15
40
0.1
60
0.05
80
0
100 50 0 50 100
x [m]
Tangent method #4
Waypoints added:18
80 0.35
60 0.3
40
0.25
20
0.2
y [m]
20 0.15
40 0.1
60
0.05
80
0
100 50 0 50 100
x [m]
Figure 7.10: Paths with inserted WPs and tangent calculation method 3 and
4. vehicle = 0.4 m1
7.2 Inserting Waypoints 73
0.5 0.5
0.4 0.4
]
]
1
1
Curvature [m
Curvature [m
0.3 0.3
0.2 0.2
0.1 0.1
0 0
0 1000 2000 3000 4000 0 1000 2000 3000 4000 5000
Sample [n] Sample [n]
Figure 7.11: Path curvature values for WP insertion algorithm for tangent
calculation method 3 and 4 for vehicle = 0.4 m1
74 Chapter 7: Results and Discussion
For this WP setup, relocating waypoints and creating a path with tangent cal-
culation method 1 yield fairly good results compared to removing and adding
WPs. path does not exceed the curvature limit set to vehicle = 1.0 m1 (see
Figure 7.14). The sharp turns are cut to meet the curvature prerequisite,
thus the recreation of the entire path is hardly adequate. All the same, as
far as the algorithms can be compared, this approach yields good results for
Catmull-Rom tangents. Although, if intersection of all the original WPs is
requested, it is given that relocating WPs fails.
Results for vehicle = 0.4 m1 are discussed below. The relocating WP al-
gorithm does not alter the path to comply with the path curvature for the
Catmull-Rom tangents with a lower curvature limit, and so the resulting
path is neither feasible, nor a good approximation of the original path.
As apposed to the cases of removing and inserting WPs, the method of re-
locating WP values yields adequate results for tangent method 2. The char-
acteristic turns halfway through the path are poorly imitated by the newly
7.3 Relocating Waypoints 75
generated path, but apart from that, the result of this tangent method is
good.
Tangent method #1
Relocated WPs: 2 10 13 15 16 17 18 20 21 22 23
24 25 27 28 29 30 31 32 33 34 35 36
60 0.9
0.8
40
0.7
20
0.6
0
y [m]
0.5
20
0.4
40 0.3
60 0.2
80 0.1
0
100 50 0 50 100
x [m]
Tangent method #2
Relocated WPs: 2 10 13 14 20 21 22 23 24 29 30 34 35 36 37
0.9
60
0.8
40
0.7
20
0.6
0
y [m]
0.5
20
0.4
40 0.3
60 0.2
80 0.1
100 50 0 50 100
x [m]
Figure 7.12: Paths with relocated WPs and tangent calculation method 1
and 2. vehicle = 1.0 m1
7.3 Relocating Waypoints 77
Tangent method #3
Relocated WPs: 32 33 35 36
60 0.7
40
0.6
20
0.5
0
y [m]
0.4
20
0.3
40
0.2
60
80 0.1
0
100 50 0 50 100
x [m]
Tangent method #4
Relocated WPs: none
0.8
60
0.7
40
0.6
20
0.5
0
y [m]
0.4
20
0.3
40
0.2
60
0.1
80
0
100 50 0 50 100
x [m]
Figure 7.13: Paths with relocated WPs and tangent calculation method 3
and 4. vehicle = 1.0 m1
78 Chapter 7: Results and Discussion
Figure 7.14: Path curvature values for Relocating WP algorithm for the four
dierent vector tangent calculation methods for vehicle = 1.0 m1
7.3 Relocating Waypoints 79
Tangent method #1
Relocated WPs: 2 10 13 15 16 17 18 20 21 22 23
24 25 27 28 29 30 31 32 33 34 35 36
0.9
60
0.8
40
0.7
20
0.6
0
y [m]
0.5
20 0.4
40 0.3
60 0.2
80 0.1
0
100 50 0 50 100
x [m]
Tangent method #2
Relocated WPs: 2 6 8 10 11 12 13 14 17 20 21 22
23 24 25 27 28 29 30 32 33 34 35 36 37
60 0.35
40 0.3
20
0.25
0
y [m]
0.2
20
0.15
40
0.1
60
0.05
80
0
100 50 0 50 100
x [m]
Figure 7.15: Paths with relocated WPs and tangent calculation method 1
and 2. vehicle = 0.4 m1
80 Chapter 7: Results and Discussion
Tangent method #3
Relocated WPs: 32 33 35 36 37
80
60 0.35
40 0.3
20
0.25
0
y [m]
0.2
20
0.15
40
0.1
60
80 0.05
0
100 50 0 50 100
x [m]
Tangent method #4
Relocated WPs: 13 15 32 33 35 36
0.35
60
0.3
40
20 0.25
0 0.2
y [m]
20 0.15
40
0.1
60
0.05
80
0
100 50 0 50 100
x [m]
Figure 7.16: Paths with relocated WPs and tangent calculation method 3
and 4. vehicle = 0.4 m1
7.3 Relocating Waypoints 81
Figure 7.17: Path curvature values for Relocating WP algorithm for the four
dierent vector tangent calculation methods for vehicle = 0.4 m1
82 Chapter 7: Results and Discussion
The controller gains were set to: Pk = 0.5 and Pi = 0.0001 and the pa-
rameters of the heading reference model were chosen to: n = 1, = 0.85,
rmax = 15 /180 rad/s and amax = 5 /180 rad/s2 .
When investigating Figure 7.18, it becomes obvious how the LOS algorithms
and PP guidance dier. While Line-of-Sight guidance aims for a target LOS
setpoint somewhere along the line between two WPs, pure pursuit guidance
takes the next WP directly in sight. A consequence of this characteristic is
that the path from a pure pursuit scheme often becomes shorter than for
7.4 Case Study 83
The calculation of pure pursuit guidance is less complex than both the LOS-
based guidance schemes. The dierent techniques should be utilized regard-
ing the proper application. When it comes to choosing between lookahead-
and enclosure-based guidance which performed nearly identical in the previ-
ous example, lookahead-based- is both valid for all cross-track-errors and are
less computational intensive than enclosure-based guidance. It is important
to choose a suitable lookahead distance to avoid too aggressive steering while
at the same time not selecting a large distance so that the LOS setpoint is far
behind the target WP. Lookahead distance of 30 m gave good results with
the controller parameters and models given.
84 Chapter 7: Results and Discussion
300
200
100
200
300
East [m]
100
150
Pure Pursuitbased
North [m]
200
Lookaheadbased
250
Enclosurebased
300
East [m]
Figure 7.19: Heading, heading reference and rudder values for pure pursuit
guidance
86 Chapter 7: Results and Discussion
300
200
100
North [m]
100
200
300
Figure 7.20: Path comparison of rst order Nomoto model (blue/solid) and
the Viknes 830 model (red/dashed)
It becomes apparent that the heading response of the two models diers.
A faster response is achieved for the Nomoto model, thus the radius of the
acceptance circles can be set smaller while still avoiding overshoot onto the
7.4 Case Study 87
straight-line from the current WP to the next one, compared to the Viknes
830 model. There is a time constant Trmm = 0.5s in the rudder machinery
model that causes a heading response delay. However, the distinction of the
minimum turning radius becomes the most noticeable factor when setting
the rudder angle to a maximum of 27 (see Figure 7.21).
20
15
10 Nomoto Radius
North [m]
10
5 0 5 10 15 20 25 30 35 40
East [m]
Figure 7.21: Comparing minimum turning radius for rst order Nomoto-
(blue/dashed) and Viknes 830 model (red/solid)
Examining Figure 7.21, the minimum radius for the Nomoto- and Viknes
830 model are found to be nomoto 6 m and viknes 14.5 m. This is a
signicant dierence, therefore it is not expected that the Viknes 830 model
manage the same maneuvering as the Nomoto model for sharp turns. It is
evident that the Nomoto model deviates from the mathematical model of
Viknes 830 when it comes to large rudder angles, which were assumed in
advance.
The rst order Nomoto model is not adequate to make up for a complex
model when varying velocity and large rudder angles applies. By utilizing
gain scheduling, the Nomoto model could have been modied to take varying
88 Chapter 7: Results and Discussion
Figure 7.22: Velocity and rudder values for Nomoto- (blue) and Viknes 830
(red) model with maximum rudder deection
Figure 7.23: Heading, velocity and rudder data from the trajectories of the
validation of Nomoto (blue) and Viknes 830 (red)
90 Chapter 7: Results and Discussion
300
200
100
North [m]
100
200
300
Figure 7.24: The vehicle trajectories for constant (blue/dashed) and varying
(red/solid) acceptance circle radius
By inspection of Figure 7.24, one can clearly see the advantage of having
adapted acceptance circle radius with respect to meet the straight-line to the
next WP as early as possible. However, larger radius can cause greater devi-
ation to the target WP since turning, and WP switching, occurs earlier than
for smaller circles. The circle size should be adapted to the vehicle dynamics
7.4 Case Study 91
The velocities are set to v1 = 2.1 m/s and v2 = 4.0 m/s for the following
test.
300
200
100
North [m]
100
200
300
In Figure 7.25 it becomes clear how increased velocity results in wider turns.
With nearly doubled velocity, the running time is naturally halved, but with
the drawback of greater deviation between new trajectory and original path.
However, straight-line following is approximately the same. This motivates
decreasing the speed only in the waypoints. One way to cope with the over-
shoot is to increase the acceptance circle radius, but other actions can be
made to enhance performance as will become apparent in the next section.
7.4 Case Study 93
Figure 7.26: Heading and velocity values for the trajectories in Figure 7.25
with corresponding color code
94 Chapter 7: Results and Discussion
300
200
100
North [m]
100
200
300
Figure 7.27: Trajectory with adapted velocity and circle of acceptance radius
(red/soid) versus constant values (blue/dashed)
Figure 7.28: Heading, velocity and rudder angle for trajectories with adapted
and constant velocity and acceptance circle
Setting both the WP radius and desired velocity in each waypoint is prefer-
able to obtain a smooth trajectory with a good running time. The advantages
can be seen in the straight-line following properties of Figure 7.27 and the
running time (see Figure 7.28). Despite good performance in the current
96 Chapter 7: Results and Discussion
test, this method does cause the path to deviate from the WP setpoints for
sharp turns. To create trajectories that comprehend preturn and better WP
intersection properties, a cubic spline can be derived in advance. This will
become evident in the next section.
Figure 7.29 indicates low deviation between the generated path and the ve-
hicle trajectory. The generated path is colored with respect to its curvature,
where red means relative high curvature and blue indicates low curvature.
Generally, the error between the generated path and the vehicle trajectory
is small, but the error is, as expected, greatest where the curvature is high.
7.4 Case Study 97
300
0.06
200
0.05
100
0.04
North [m]
0.03
100
0.02
200
0.01
300
0
300 200 100 0 100 200 300 400
East [m]
The same results occur now as for the adaption of velocity (and circle of
acceptance radius) in section 7.4.5. Increasing the velocity where the cur-
vature is low (corresponding to straight-lines section for the non-generated
spline cases) and decreasing velocity where curvature is high (in turns), re-
sults in an ecient run with low deviation from the interpolated path. As
opposed to the the methods without creating paths with the aid of splines,
the trajectory now intersects every original WP within a small radius due to
its preturn property and velocity adaption.
300
200
100
North [m]
100
200
300
350
300
North [m]
250
200
150
50 100 150 200 250 300 350
East [m]
Figure 7.31: Heading, velocity and rudder angle values for path-following
with constant and adapted velocity
7.4 Case Study 101
350
Deviation 1
300
Deviation 2
250
North [m]
200
150
100
50
Figure 7.32: Distinction in deviation for original (blue) and modied path
(red)
A modication of the path where the curvature was too high was carried out
by the principle of moving WPs (see Figure 3.8). The relocation parameter
was set to 2/5. The result yields some improvement with respect to devia-
tion of calculated path, although the decrease in deviation was small. It is
102 Chapter 7: Results and Discussion
worth noticing that with a path curvature so close to the curvature threshold
of the vehicle, it might be more sensible to refrain from path modications
and cope with the minor error as can be seen as Deviation 1 in Figure 7.32.
Relocating a WP in this case does not improve the path-following property
signicantly (Deviation 2 ), thus the original path may be satisfactory.
Relocating WPs should only be carried out when the path is infeasible, since
it alters the original WP setup; which has its layout for a reason. If, however,
the path obtained from the WP placement is far from feasible with respect to
the vehicle dynamics, action must be taken. Nevertheless, altering the path
must be done with care, depending on the area of application. Before altering
the path, minimum velocity in the critical areas should be tested, due to the
change in the maneuvering characteristic at lower velocities. It follows that
moving WPs uncritically before reducing the speed where the path curvature
is too high is less than optimal action. The path curvature path was close to
vehicle for a vehicle velocity of v = 2.1 m/s. As seen in 7.25 and well-known
by empiricism, reducing the speed causes smaller turning radius. A good
solution is therefore to exam the path for low vehicle velocity, and determine
potential path altering based on the vehicle trajectories at low speed.
7.4 Case Study 103
300
200
100
North [m]
100
200 Current
Figure 7.33: Vehicle trajectory including wind-, current- and wave distur-
bance
Figure 7.34: Heading, velocity and rudder angle for trajectory when including
wind-, current- and wave disturbance
To avoid wear and tear, a wave lter should be implemented so that the
rudder does not ap all along during the run. Nevertheless, disregarding
this aspect, the vehicle proved good results even with varying weather dis-
turbances.
Chapter 8
8.1 Conclusion
The main contribution to this thesis is algorithms for generating C 1 -continuous
paths based on a predened waypoint setup and an appurtenant path feasi-
bility check with respect to the dynamics of a vehicle.
By calculating the curvature along the entire path and comparing it with
the vehicle dynamics, a path feasibility check was carried out. It is proven
that speed- and acceptance circle adaption at each waypoint, or altering the
original waypoint setup are suitable solutions to cope with the infeasibility
problem for vehicles with trajectory curvature exceeding the path curvature
limit. Since speed reduction enhances the turning property, it is preferable
to decrease the velocity to a minimum at the critical path sections before
possible modication of the waypoint setup have to be carried out.
Velocity- and acceptance circle radius functions based on the angle between
the succeeding waypoints have been suggested to optimize driving with re-
spect to path-following properties and time. A function for the vehicle ve-
locity, taking path curvature into consideration is also proposed. Results of
ecient path-following with small deviation between vehicle trajectory and
path are apparent.
105
106 Chapter 8: Conclusion and Future Work
For paths failing the feasibility check, algorithms that remove, insert and re-
locate waypoints, thus decreasing the path curvature, have been suggested.
These algorithms alter the original waypoint setup, and should not be used
heedlessly.
Simulations have been carried out both on a simple rst order Nomoto model
and a more complex vehicle model of the Viknes 830. The limitation of
the Nomoto model for large rudder deection is demonstrated. Dierent
guidance principles such as pure pursuit and line-of-sight guidance have been
tested on the models and both methods function well for waypoint-following
in any case.
Improve the algorithm for adding waypoints to take the current way-
point placement and arrival course into consideration, thus dening
whether crossing- or non-crossing added path should be generated. In
addition, determine the number of added waypoints and their place-
ment with respect to minimizing the curvature instead of inserting a
predened xed waypoint setup.
Introduce lters to reduce wear and tear, especially for the rudder when
waves are present.
[4] J. Ebken, M. Bruch, J. Lum, and Space and naval warfare systems
center San Diego CA., Applying unmanned ground vehicle technologies
to unmanned surface vehicles, in Proc. SPIE, vol. 5804, pp. 585596,
Citeseer, 2005.
109
110 BIBLIOGRAPHY
[29] C. Chen, Linear system theory and design. Oxford University Press,
Inc., 1998.
[30] A. Healey and D. Marco, Slow speed ight control of autonomous un-
derwater vehicles: Experimental results with NPS AUV II, in Proc. of
the 2nd Internat. Oshore and Polar Engineering Conf, pp. 523532,
1992.
112 BIBLIOGRAPHY
Appendix A
Continuity
Discontinuous path
113
114 Chapter A: Continuity
Discontinious path
20
20
0 5 10 15 20 25 30 35 40
0
C continuous
20
20
0 5 10 15 20 25 30 35 40
1
C continuous
100
50
0 5 10 15 20 25 30 35 40
C2continuous
20
20
0 5 10 15 20 25 30 35 40
Digital Appendix
The digital appendix contains the Simulink models and the necessary
MATLAB code to run simulations. Notice that the MSS Toolbox have to
be downloaded and installed to run the simulations.
The Misc folder contains MATLAB code for several of the gures in the
masters thesis. boat_animation.m creates an animation of the vehicle tra-
jectory and is also located in the Misc folder.
115