2.1. Problem Statement
Waypoints (WPTs) are the points described by latitude and longitude values. In navigation, WPTs are connected by straight line segments. They are a natural way to determine a ship’s trajectory used by the navigator and sufficient for the helmsman when a ship is in the manual control mode. A human, due to experience and prediction ability, begins the turn before the WPT is passed and finishes it on the next trajectory segment. But for MASS this way of a trajectory description is infeasible and gives the overshoot in automatic control. Moreover, it requires the turn starting position definition in order to ensure turn finishing on the next trajectory segment.
Model Predictive Ship Control requires a reference trajectory. Providing reference as a set of WPTs leads to big prediction errors in their vicinity. So, there is a need to model a reference ship’s path with a curve instead of straight line segments. A simple, fast and reliable feasible path generator, which can predict a future trajectory consistent with dynamics of the ship, is required.
So, there is a need to connect a human-friendly description with feasible input for the trajectory tracking system. We propose Bézier curve path modeling, in which a curve order will be as low as possible. It simplifies and speeds up computations. We decided to use Bézier rational curves, because not every trajectory may be approximated by a Bézier polynomial curve. The only polynomial conic curve is a parabola, while ship’s circulation in the steady state is approximated by a circle. Moreover, the ship’s turn is an ellipse segment. Unfortunately, these curves are not accurately approximated by polynomial Bézier curves. The second reason why we decided to use rational Bézier curves is the ability to involve ship parameters in coefficients estimation. In our approach, we are able to take into account ship’s leeward tendency, velocities and dimensions. It was assumed that the maneuver is not trivial. A feasible path is modeled as composition of straight line motion, arc movement and straight line motion. Curve parametrization avoids setting control points based on optimization procedures and allows WPTs to become Bézeir curve control points.
2.2. Bézier Curves
We now briefly present the notion of de Casteljau algorithm and Bézier curves to provide some information about our main geometrical tool. Let , and let us select a finite sequence of different points on a plane . Let l be a polygonal chain with vertices at . For any , let us divide every segment of l in the proportion . The resulting points we denote by .
We repeat the described process as long as only one point
is left, which is the point of our desired curve. The above described algorithm is called the Casteljau algorithm (see
Figure 1), where the obtained points form the Bézeir curve
. The points
are called the control points of
, while the polygonal chain
l is called the Bézier chain or control chain
The Bézier curve is a polynomial curve, that is, if is described by control points then its coordinates are described by some polynomials of the variable t of the degree not exceeding n. Moreover, is contained in the convex hull of the control points , and is invariant under any affine transformation of the plane .
Let us now consider the polynomials
We also define
for
and
.
’s are called the Bernstein polynomials (see
Figure 2).
One can observe [
19] that the control points of a Bezier curve
determine the coefficients of this curve in the Bernstein polynomial basis, that is
In further considerations it occurs that polynomial Bezier curves are flexible not enough for our purpose, so let us now dive into the notion of rational Bezier curves.
Let us choose points
in the 3-dimensional space
. Every curve
can be identified with a system of three functions
, that is
Let
E denote the 2-dimensional plane in
defined by
and let
be the curve on
E defined by
If we change the coordinate system translating the
X and
Y axes by the vector
, we can treat the curve
as a curve on a 2-dimensional plane, once again denoted by
, defined as
Thus, if are polynomial functions, then the coordinates of are rational.
Now, any point
of
(which we identify with
E) can be described by a vector
so that
Note that this description is not unique. Multiplication of by a positive constant gives us the same point .
Now, let , , be points on the 2-dimensional plane. Having weights , one can define points , , so that defines the rational Bézeir curve with s as the control points via the procedure described above.
Let
. Let us recall that every
. These points define some polynomial Bézier curve in
by
Since the points
define some points
, we can define a rational Bézier curve
by
Obviously [
19], rational Bézier curves generalize the notion of a polynomial Bézier curves. Moreover, similarly to the polynomial ones, rational Bézier curves are invariant under any affine transformation.
2.4. Method of Rational Bézier Curve Coefficient Determination
Modeling using the rational Bézier curve requires curve order, control points’ position and values of weights estimation. We started the approximation procedure with the square rational curve due to the standard way of arc and circle modeling. WPTs were chosen as the control points, because we wanted to use the standard ship’s trajectory description, which consists of a set of consecutive WPTs. The first set of weights was selected empirically. The preliminary test results, with the empirically chosen weights, showed that it is possible to model a feasible ship’s trajectory using the second order rational Bézier curve. The whole procedure was iterative one. Initial guess weights were modified and a modeled trajectory was compared with the one registered during the real-time lake trial. After the whole procedure, it turned out that it is possible to find the coefficients of the second order rational curve, enabling accurate modeling of ship trajectories. Modeling errors were less than ship’s breadth, which is acceptable for a control purpose.
The obtained preliminary results showed that there is no need for higher order curve usage due to ship trajectory modeling potential. Our motivation was to generalize the trajectory modeling method for all ship types. So we decided to find the relationship between values of rational Bézier curve coefficients and particular ship dimensions and motion parameters. We connected them according to the procedure described below.
Curve coefficients were estimated in an experimental way, knowing that the ship’s movement is affected by parameters such as: drift, longitudinal, transversal and angular velocities, displacement and length overall. Displacement and length overall are static parameters. Drift and all three velocities (longitudinal, transversal and angular) are dynamic ones, because they change during a trajectory tracking process and depend on one another. We expected that input and output rational curve coefficients depend on her coefficient on the arc. We also expected the quadratic or square root relationship between them due to the order of a selected rational Bézier curve.
Ship’s inertia and the turning radius depend on ship’s length and displacement. The ship’s movement method during her turn may be defined by the angular and drift path. The angular path is defined by
where
r denotes angular velocity, and describes ship’s angle of turn. Combined with the circulation radius
R, it determines length of the path traveled by the ship in the longitudinal axis (in an arc) which is defined by
is used for ship’s position is modeled curve prediction. Its combination with the measured longitudinal speed allows determining the current position on the approximated trajectory and predicting future ship’s position. One can predict longitudinal ship’s speed based on the past and current values of angular and transversal velocities combined with the distance traveled along a curve or a straight line.
The drift path is defined by
and it determines length of the path traveled by the ship in the transversal axis due to centrifugal force.
The coefficient on arc (
) depends on ship’s length, displacement, angular and drift path lengths. It is defined by
where:
L—length overall, ∇—displacement,
r—angular velocity,
v—transversal velocity,
c—dimensionless coefficient. The coefficient
c value is a ratio of trajectory approaching time (
) and the whole maneuver time (
)
Ship dynamics is independent of the performed motion and ship inertia does not change with changing angular velocity. So, input (
) and output (
) coefficients have the same value and they depend only on the coefficient on arc value. They are the inverse of a square root of the arc coefficient
:
It was proved by the computer simulations that these values give the best Bézier curve trajectory approximation results.
According to the methodology described above, ship’s path modeling is based on a set of known WPTs and requires two coefficient values calculation.