1. Introduction
With the recovery of international trade and the shipping industry, the sailing environment of ships is becoming increasingly more complex, and the incidence of ship collision accidents is always high in global waters. According to the International Maritime Organisation (IMO) survey, human factors are responsible for more than 75% of all maritime accidents worldwide (Levander, Reference Levander2017). The safety of maritime traffic is still grim because of the human factor. Unmanned surface vehicles (USVs) are one of the solutions to reduce the number of ship collision accidents caused by the human factor. At the same time, with the development of modern science and technology, the world is about to enter the era of ‘Industry 4.0.’ Many fast-growing technologies for maritime vessels, especially those in guidance, navigation, and control systems (GNC), promote the evolution of autonomous navigation through ship automation. Therefore, USVs are currently being applied more widely for their safer navigation (Kongsberg Maritime, 2021).
Above all, the development of USVs highly depends on navigation safety. Furthermore, one of the most important advantages of USVs is the autonomous collision avoidance (COLAV) capability. However, it is very challenging for USVs to avoid collisions, especially in close-quarters situations. Most USVs are featured by the underactuations and nonlinearities, and they have to avoid static and dynamic obstacles clearly and timely to comply with the rules of the International Regulations for Preventing Collisions at Sea (COLREGs). Therefore, the COLAV must be agile, and the COLAV algorithms should have low computation complexity and make optimal COLAV decisions.
To date, there are a large number of COLAV algorithms for USVs (Liu et al., Reference Liu, Zhang, Yu and Yuan2016). Some mature algorithms are quite widely used, such as the artificial potential field (APF) method, the velocity obstacle method (VO), the dynamic window approach (DWA), the constant avoidance angle method (CAA) and the model predictive control (MPC) algorithm. Furthermore, the logic-based decision (James, Reference James1986; Zheng, Reference Zheng2000; Perera et al., Reference Perera, Carvalho and Soares2011; Kreutzmann et al., Reference Kreutzmann, Wolter, Dylla and Lee2013), the set-based decision (Benjamin et al., Reference Benjamin, Leonard, Curcio and Newman2006; Moe and Pettersen, Reference Moe and Pettersen2017; Kufoalor et al., Reference Kufoalor, Johansen, Brekke, Hepsø and Trnka2020) and other theories also provide methods and ideas. In addition, some path planning algorithms can also be used to solve the COLAV problem by frequently replanning in a short time, i.e. the COLREGs rapidly exploring random tree (COLREGs-RRT) algorithm (Chiang and Tapia, Reference Chiang and Tapia2018; Enevoldsen et al., Reference Enevoldsen, Reinartz and Galeazzi2021). However, these planning algorithms are not discussed in detail because they are not used as typical COLAV algorithms.
The APF method was first proposed by Khatib (Reference Khatib1986). Lyu and Yin (Reference Lyu and Yin2018) modified this algorithm and applied it to solve the COLAV problem of USVs while ensuring the COLAV decision solutions would not get stuck in the local optimal ones. However, the APF method cannot predict the future situations. When the position of obstacles and the traffic situation are complex, the USVs sometimes have to sail through a very complicated process to converge to planned paths. The long sampling time also reduces the agility of USVs to avoid collision.
The VO method, also known as the velocity cone method, was first proposed by Fiorini and Shiller (Reference Fiorini and Shiller1998), and then extended into many branches, such as the nonlinear velocity obstacle (Martinezgomez and Fraichard, Reference Martinezgomez and Fraichard2009) and the reciprocal velocity obstacle (Snape et al., Reference Snape, Berg, Guy and Manocha2011). Kufoalor et al. (Reference Kufoalor, Brekke and Johansen2018) proposed a dynamic reciprocal velocity obstacle method that incorporates the interactive behaviour of agents and is proactive in dealing with the uncertainty of the future behaviour of obstacles. The advantages of this method lie in that it is intuitive, simple to calculate and easy to apply COLREGs (Zhuang et al., Reference Zhuang, Su, Liao and Sun2011; Kuwata et al., Reference Kuwata, Wolf, Zarzhitsky and Huntsberger2014). Stenersen (Reference Stenersen2015) applied the VO algorithm into the ROS system (Open Robotics, 2021) and built a simulation experimental environment for COLAV of USVs. Huang et al. (Reference Huang, Chen and van Gelder2019) introduced the USV dynamics to the VO algorithm by modifying the generalised VO (GVO) algorithm and applying the GVO algorithm to a human-machine interaction collision avoidance system (Huang et al., Reference Huang, Chen, Negenborn and van Gelder2020). However, the headings of USVs may oscillate, the trajectories may not be optimal and the destinations are sometimes blocked by the velocity cones.
The dynamic window approach is one of the most widely used algorithms in the field of intelligent guidance at present. It was first proposed by Fox et al. (Reference Fox, Burgard and Thrun1997), and has been widely extended and applied (Brock and Khatib, Reference Brock and Khatib1999; Kiss and Tevesz, Reference Kiss and Tevesz2012). Eriksen et al. (Reference Eriksen, Wilthil, Flaten, Brekke and Breivik2018) replaced the robot motion mathematical model in the dynamic window method with a three-dimension-of-freedom (3DOF) ship motion model, enabling the algorithm to consider the underactuated and nonlinear features of USVs. However, predicting the trajectories numerically will increase the computation complexity.
The CAA method was first proposed by Savkin and Wang (Reference Savkin and Wang2013). Wiig et al. (Reference Wiig, Pettersen and Krogstad2019) introduced the hydrodynamics of the USVs into the CAA algorithm, enabling USVs to avoid obstacles only by changing courses. It is suitable for most maritime surface vessels. However, the CAA algorithm is only applicable to the encounter situations where the target ships are sparsely distributed, and the static obstacles in the actual environment are not taken into account at present.
The model predictive control (MPC) algorithm was first proposed by Richalet et al. (Reference Richalet, Rault, Testud and Papon1978). Hagen et al. (Reference Hagen, Kufoalor, Brekke and Johansen2018) and Kufoalor et al. (Reference Kufoalor, Wilthil, Hagen, Brekke and Johansen2019) made the MPC algorithm well applied to the USV COLAV by modifying the objective function. However, to reduce the computation complexity, the search space is sampled sparsely, which may increase the distance between the approached results and the optimal solutions.
Table 1 shows the comparisons of the approaches mentioned above. The VPF and VO methods have low computational complexity and short runtime. However, without the accurate prediction of the USV's trajectory, these algorithms cannot make protective manoeuvres, which means never choosing the dangerous manoeuvres in advance. As a result, there are some difficulties in dealing with local problems in specific environments, such as chattering, being stuck or blocking goals. Although the CAA algorithm can overcome some local problems, it cannot be applied in a complex environment complying with the COLREGs rules at present. Therefore, these kinds of algorithms should still be improved in the aspects of optimality. The above local problems can be well solved by MPC-based algorithms. However, for the underactuated USVs, the trajectory prediction by the numerical method increases the computation complexity.
Notes: symbol ‘?’ means that this subject is not specified or presented clearly in corresponding papers, ‘med’ is the abbreviation of ‘medium’. M, N refer to the number of the static/dynamic obstacles and the number of the candidate velocities. ${T_p}$ and h refer to the prediction horizon and the discretisation time step for the vessel dynamic model. $\alpha$ and $\beta$ are parameters used to distinguish the different influence of M. The time computation complexity of the VO algorithm modified by Huang is noted as $O({\tilde{N} \cdot \beta M} )$ for the method for solving the quadratic problem is not explained in the paper. The time computation complexity of the method solving the quadratic problem noted as $\tilde{N}$.
In conclusion, although the USV COLAV algorithms proposed in recent years are able to deal with the COLAV problem with different advantages, balancing the trade-off between the computational performance and the solution optimality appears intractable. Therefore, the agility of the COLAV algorithm still needs to be improved.
To improve the agility of COLAV, a modified model predictive control (MPC) algorithm is proposed for USVs, named collision shielded MPC (CS-MPC). The innovations of the proposed method can be concluded as the following two aspects:
(1) the computation complexity is reduced by shielding the dangerous velocities in the search space before the trajectory prediction, based on the velocity obstacle method;
(2) better COLAV decisions are obtained by introducing a nonlinear ship motion model and a modified objective function.
Compared with other COLAV algorithms, the CS-MPC has a larger scale of optional COLAV manoeuvres by optimising the search space, which helps to find better manoeuvres to steer around obstacles blocking the goal. Furthermore, because of the reduced computing complexity, it has a longer predicted time, which will help reduce the chance of being sucked. By defining the COLREGs penalty in the objective function, the COLAV manoeuvres comply with the COLREGs and the chattering problem is solved.
Combined with velocity controllers, the CS-MPC algorithm can also guide USVs to destinations. It can be used not only for COLAV but also for trajectory tracking. The safe autonomous navigation in complicated waters can be achieved.
The rest of the paper is structured as follows. Section 2 describes the COLAV problem to be studied. Section 3 proposes the CS-MPC algorithm. To verify the agility improvement of the CS-MPC algorithm, the results of simulation experiments are shown in Section 4. Section 5 discusses the simulation results and possible improvements to the CS-MPC algorithm. Section 6 concludes the whole paper and interprets the implications of the CS-MPC algorithm.
2. Collision avoidance problem
For its rapid-reaction capability, the collision avoidance (also called the local collision avoidance) algorithm is one of the core algorithms of the USV GNC system, ensuring navigation safety. The objective of the COLAV algorithm is to select the optimal desired velocities. It should consider the dynamic constraints of the vessel, such as underactuations and nonlinearities of USV motion and the limitations of controllers.
2.1 Architecture of USVs GNC systems
The local COLAV, mid-level decision-making and global path-planning subsystems are hierarchical algorithms in a USV's guidance system (Larson et al., Reference Larson, Bruch and Ebken2006; Eriksen, Reference Eriksen2019; Yang, Reference Yang2019; Loe, Reference Loe2008). The local COLAV subsystem receives the planed trajectories which are produced by upper algorithms and the information of the USV and environment from the navigation system, which consists of information fusion, environmental perception, state estimation and situation awareness technologies. The architecture of the USV GNC system is shown in Figure 1.
This paper focuses on the COLAV algorithm, so the following assumptions are made.
Assumption 1: The planned trajectories are known, denoted as
where k is the index of the waypoints.
Assumption 2: The positions and velocities of obstacles are known when they enter the detection range ${r_D}$. The positions of static obstacles are denoted as $({{x_i},\; {y_i}} )$ and the positions and velocities of target ships are denoted as ${\left[ {\begin{array}{*{20}{c}} {{\boldsymbol{\eta }_j}}& {{\boldsymbol{\upsilon }_j}} \end{array}} \right]^{\mathrm{\intercal}}}$, where i and j are the indexes of static obstacles and target ships, respectively.
Assumption 3: The trajectories of target ships are known, denoted as
where $\boldsymbol{\eta } = {\left[ {\begin{array}{*{20}{c}} x& y& \psi \end{array}} \right]^\mathrm{\intercal}}$, x and y are the position coordinates, and $\psi$ is the orientation in north-east-down-fixed inertial frame $\{n \}$. Here, $\boldsymbol{\upsilon }$ is the velocity vector in body-fixed frame $\{b \}$, $\boldsymbol{\upsilon } = {\left[ {\begin{array}{*{20}{c}} u& v& r \end{array}} \right]^\mathrm{\intercal}}$, where u, v and r are surge velocity, sway velocity and yaw rate.
2.2 USVs motion model
To accurately express the underactuations and nonlinearities of USVs’ motion, a 3DOF mathematical motion model of the USV (Fossen, Reference Fossen2011) is used:
where $\boldsymbol{M}$, $\boldsymbol{C}(\boldsymbol{\upsilon } )$ and $\boldsymbol{D}(\boldsymbol{\upsilon } )$ are inertia, Coriolis and damping matrixes. The transformation matrix from $\{b \}$ to $\{n \}$ is given as
The vessel of interest in this study is the Viknes830 USV. The parameters of Viknes 830 are shown in Table 2.
2.3 Velocity controller
The COLAV algorithm outputs the desired velocities to the control system which produces switching signals to actuators by controllers and control allocators based on the position and velocity signals. By following the desired velocities, USVs can avoid obstacles and track the planned trajectories.
In this paper, a simple feedback proportional controller is used as an example, and better velocity controllers could be used to improve the performance of the COLAV algorithm in real practice. Considering the input saturation, the control outputs ${\tau _z}$, $z = 1,\;2,\;3$ are defined as
The variables and coefficients above are collected in Table 3.
2.4 COLREGs
To avoid traditional vessels at sea, USVs must comply with the COLREGs.
A collision situation is first identified by computing the closest point of approach (CPA), given the current pose of the USV. The vessel is deemed to be in a collision situation if the distance to the closest point of approach (DCPA) ${d_{\textrm{CPA}}}$ and the time to the closest point of approach (TCPA) ${t_{\textrm{CPA}}}$ are less than the safe threshold ${d_{\textrm{SAFE}}}$ and ${t_{\textrm{SAFE}}}$,
where ${\boldsymbol{p}_\textrm{A}} = \; ({{x_\textrm{A}},\; {y_A}} )$ is the position of the USV's geometry centre, ${\boldsymbol{p}_B} = \; ({{x_B},\; {y_B}} )$ is the position of the obstacle's geometry centre, and ${\textbf{v}_\textrm{A}}$ and ${\textbf{v}_\textrm{B}}$ are the velocities of the USV and the obstacle. Thus, when a possible collision situation is present, it remains to identify the applicable COLREGs rules.
Rules 13–17 in COLREGs stipulate the responsibilities of the give-way vessel and the stand-on vessel in the three encounter situations, namely head-on situation, crossing situation, and overtaking, as shown in Figure 2.
These three encounter situations contain five different scenarios determined by the relative bearing of the target vessel to the USV.
The USV acts as the give-way vessel in three scenarios:
(1) head-on, ${\beta _{BA}} \in [{ { - 15^\circ ,15^\circ } )}$;
(2) the target vessel crossing from starboard side, ${\beta _{BA}} \in [{ {15^\circ ,112.5^\circ } )}$;
(3) the target vessel being overtaken by the USV, ${\beta _{AB}} \in [{ {112.5^\circ ,180^\circ } )} \cup [{ { - 180^\circ , - 112.5^\circ } )}$.
Moreover, the USV acts as the stand-on vessel in two scenarios:
(1) the target vessel crossing from port side, ${\beta _{BA}} \in [{ { - 112.5^\circ ,15^\circ } )}$;
(2) the target vessel overtaking the USV, ${\beta _{BA}} \in [{ {112.5^\circ ,180^\circ } )} \cup [{ { - 180^\circ , - 112.5^\circ } )}$.
As target ships sometimes may violate their responsibilities of the give-way vessel for different practical reasons, the USV should also be able to avoid collisions alone. Therefore, communications between the USV and target ships are not necessary in this paper.
Remark 1: In two-vessel encounter situations, Rule 17 of COLREGs does not require that the stand-on vessel ‘must’ or ‘have to’ always keep its course and speed. The stand-on vessel can also take necessary and understandable manoeuvres to change its course or speed. Since USVs cannot communicate with the target vessel, it is necessary for them to take active, effective and understandable collision avoidance manoeuvres alone.
3. CS-MPC algorithm
The CS-MPC algorithm can produce optimal avoidance manoeuvres in a short runtime to avoid collisions with static and dynamic obstacles while respecting the dynamic constraints of the vessel. The algorithm is based on the MPC and evaluates vessel-feasible trajectories.
Therefore, the CS-MPC algorithm is designed with the short-term perspective of COLREGs in mind, namely situations where the stand-on requirement may need to be ignored to avoid collision in compliance with rule 17.
The CS-MPC algorithm architecture is shown in Figure 3. The initialiser finds the search space of the USV before a voyage. During the voyage, the search space is further trimmed by the dynamic constraints and the collision cone according to the position and velocities of the USV and obstacles. The trajectory predictor produces the trajectories of the velocities in the final restricted search space. The optimiser compares the predicted trajectories, the estimated trajectories of obstacles and the desired trajectory, which can originate from either the upper algorithm of the guidance system or directly from a user, and outputs the desired velocities to the controller based on an objective function.
The CS-MPC algorithm improves the agility of COLAV by modifying the MPC in the following two aspects:
(1) the solutions are closer to the optimal ones for using the dynamic ship motion models. First, the accuracy of the search space is improved by an initialiser considering the nonlinearity of USVs. Second, the accuracy of the trajectory prediction is improved by solving the equations numerically;
(2) the computation complexity is reduced by introducing the collision cone. The dangerous velocities are shielded from the search space using the VO method.
The CS-MPC algorithm is explained in detail as follows.
3.1 Search space
The CS-MPC algorithm makes optimal COLAV decisions based on the hydrodynamic characteristics of USVs, which can be represented as the search space ${\boldsymbol{V}_s}$. It is a set of discrete velocities with which the USV can arrive at within the prediction time. To obtain an accurate search space, the USV motion model in Equations (3)–(5) is used, which retains the underactuated characteristics and the nonlinear relationship between velocities and rudder forces. By setting the initial value ${\boldsymbol{v}_0} = \left[ {\begin{array}{*{20}{c}} 0& 0& 0 \end{array}} \right]$, time step ${t_s} = 0.1\;\textrm{s}$ and discretising ${\tau _i} \in [{{\tau_{i,\textrm{min}}},{\tau_{i,\textrm{max}}}} ]$ averagely, after a sufficient number of iterations (in this paper, 100 steps), the numerical solutions of Equations (3)–(5) are obtained with the fourth-order Runge–Kutta method. These solutions constitute the search space of the USV ${\boldsymbol{V}_s} = \, {\left[ {\begin{array}{*{20}{c}} \boldsymbol{u}& \boldsymbol{r} \end{array}} \right]^\mathrm{\intercal}}$. Putting it more intuitively, the search space can be accurately represented as an irregular pattern, as shown in Figure 4, rather than a simple rectangular space.
Unfortunately, due to the limits of the prediction time ${T_p}$, the current velocity ${\boldsymbol{\upsilon }_{\boldsymbol{a}}} = ({{u_a},{v_a},{r_a}} )$ and the input saturations of the propeller and rudder, the USV can only arrive at a finite set of velocities ${\boldsymbol{V}_d}$, which can be defined as follows:
where $k \in \{{\textrm{min},\, \textrm{max}} \}$. Therefore, the search space is reduced to a subset of ${\boldsymbol{V}_s}$, called feasible velocities ${\boldsymbol{V}_f}$,
For example, in the scenario that the current states of USV are ${\boldsymbol{\eta }_{\boldsymbol{a}}} = \left( {\begin{array}{*{20}{c}} 0& 0& 0 \end{array}^\circ } \right)$, ${\boldsymbol{\upsilon }_{\boldsymbol{a}}} = \left( {\begin{array}{*{20}{c}} {7\;\textrm{m/s}}& 0& 0 \end{array}} \right)$, and the states of target ship are ${\boldsymbol{\eta }_{\boldsymbol{b}}} = \left( {\begin{array}{*{20}{c}} {800\;\textrm{m}}& {800\;\textrm{m}}& { - 90^\circ } \end{array}} \right)$, ${\boldsymbol{\upsilon }_{\boldsymbol{b}}} = \left( {\begin{array}{*{20}{c}} {7\;\textrm{m/s}}& 0& 0 \end{array}} \right)$, the prediction time is ${T_p} = 2.5\;\textrm{s}$, and the resolution of surge speed and yaw rate are 0.2 m/s and 0.01 rad/s. The reduced search space is the intersection area of the blue and red dotted lines shown in Figure 6.
3.2 Collision cone
Another important advantage of the CS-MPC algorithm is the short runtime, which is directly influenced by the scale of the search space. To reduce the runtime, the search space is further reduced by introducing collision cones for static or dynamic obstacles. Given a USV A and an obstacle B, the collision cone takes the position of the USV's geometric centre as its vertex ${\boldsymbol{p}_\textrm{A}}$, and the two tangent lines of a circle from the vertex as its edges, denoted as ${\boldsymbol{p}_{AB}}_{\textrm{left}}^ \bot$ and ${\boldsymbol{p}_{AB}}_{\textrm{right}}^ \bot$. The circle's centre is the position of the obstacle's geometric centre ${\boldsymbol{p}_\textrm{B}}$, and its radius is the sum of the safe range of the USV ${r_\textrm{A}}$ and the obstacle ${r_\textrm{B}}$.
Assumption 4: The state of the USV changes immediately. Therefore, the predicted heading of the USV can be calculated by Equations (15), (20) and (21).
Based on Assumption 4, the collision cone can be expressed as follows:
where ${\boldsymbol{p}_{\textrm{AB}}}$ is the relative position of the obstacle with respect to the USV ${\boldsymbol{p}_{\textrm{AB}}} = {\boldsymbol{p}_\textrm{B}} - {\boldsymbol{p}_\textrm{A}}$, likewise, their relative velocity is ${\textbf{v}_{\boldsymbol{BA}}} = {\textbf{v}_\textrm{A}} - {\textbf{v}_\textrm{B}}$, where $\textbf{v}$ is the velocity vector in the north-east-down-fixed inertial frame $\{n \}$, and u and v are surge velocity and sway velocity as described in Section 2.1. Here, $\; \boldsymbol{J}({\tilde{\psi }} )$ is the rotation matrix rotating a matrix with the angle of $\tilde{\psi }$,
As the velocities ${\textbf{v}_\textrm{A}}$ in $\boldsymbol{V}{\boldsymbol{O}_{\boldsymbol{A}|\boldsymbol{B}}}$ pointing to the collision cone lead the USV to obstacles or target vessels, it should never be chosen. Consequently, these velocities could be shielded from the search space. The runtime is shortened, because the velocities in the shielded search space will not be evaluated in the following steps. For the example in Section 3.1, the collision cone can be visually represented by Figure 5, and the velocities in the final restricted search space are shown in Figure 6 as blue stars. To prevent too many feasible velocities from being shielded, the collision cone should only be calculated when the distance between the USV and an obstacle is less than the safe range, called the collision cone range ${r_C}$ in this paper.
3.3 Trajectory prediction
From the final restricted search space, the optimal solution can be selected based on the situation in a prediction time. Therefore, the trajectory prediction should be as accurate as possible. Meanwhile, to reduce the computation complexity, the small change assumption is made as follows.
Assumption 5: If the length of the iteration step is short enough, the Coriolis matrixes$\boldsymbol{\; C}(\boldsymbol{\upsilon } )$ and damping matrixes $\boldsymbol{D}(\boldsymbol{\upsilon } )$ are constants within the iteration step.
Then the predicted trajectories within a prediction time ${T_p}$ are obtained by solving the 3DOF mathematic motion model of USVs using Equations (3)–(5) numerically with the improved Euler method,
where n is the index of iteration steps, h is the length of the prediction time step, and $\boldsymbol{\tau } = ({\tau _z}|z = 1, \;2, \; 3)$ is the current control force calculated from Equations (6) and (7).
The predicted trajectories for the example in Section 3.1 are shown in Figure 7(a).
3.4 Selecting the desired velocities
Based on the predicted trajectories, the candidate velocities in the final restricted search space can be evaluated by a criterion. Assuming that in the time step k there are N candidate velocities in ${\boldsymbol{V}_r}$ and M obstacles around the USV, the criterion can be represented as the objective function, shown as
where$\; ({{u_r},{r_r}} )$ is regarded as the optimal solution, ${q_\chi } < 0$, ${q_u} > 0$, ${q_d} > 0$, ${q_\mathrm{{\cal T}}} < 0$ are coefficients tuned in different missions, and $d_{i,n}^k$ is the minimum distance between the $n$th discrete position in the $i$th predicted trajectory of the USV $\boldsymbol{p}_{\boldsymbol{A},\boldsymbol{n}}^{\boldsymbol{k}}$ and the predicted positions of the $m$th obstacles $\boldsymbol{p}_{\boldsymbol{B},\boldsymbol{m}}^{\boldsymbol{k}}$. All other variables take the values at the end of each trajectory. The first term ensures the course directing to the destination, where $\chi$, ${\chi _{goal}}$ are the predicted course and the course toward the goal. The second term keeps the USV far away from obstacles, where ${d_{OA}}$ represents the sum of the distances between the USV and obstacles. The third term is to make the USV maintain a high surge speed u. The last term presents the COLREGs penalty, evaluates whether the avoidance manoeuvre complies with the COLREGs and maintains a consistent avoidance manoeuvre. Here, $\mathrm{{\cal T}}$ is the Boolean variable, whose value is true (value ‘1’) if the following conditions are all met.
(1) The USV is in a collision situation with another vessel. The collision situation is determined in Section 2.4.
(2) The COLAV decision violates COLREGs.
Examining whether the USV will pass the other vessel on its port or starboard side is an efficient technique to determine whether the COLAV decision violates COLREGs. As shown in Figure 2, the USV shall turn to starboard passing the other vessel on its port side in scenarios where the target ship is coming from head or crossing from the starboard side. Moreover, the USV shall not turn to port when it has to take action as will best aid to avoid collision. According to the above, turning to port violates COLREGs in these scenarios. It can be described as
(3) The COLAV decision is different from the previous avoidance manoeuvre.
As shown in Figure 2, when the USV is overtaking the other vessel, the USV should keep out of the way of the other vessel and could pass it from either side. Similarly, when the USV is being overtaken by another vessel, it could let the other vessel pass from either side. In the above two scenarios, the USV will chatter when it is close to the other vessel, because it could choose to pass the vessel from different sides at time step $\textrm{k}$ and $\textrm{k} + 1$. To solve this problem, the COLAV decision shall be consistent by adding the penalty when
(4) The collision situation has not cleared yet.
To prevent the second-time risk of collision, the COLREGs rule 8 requires that the effectiveness of the action shall be carefully checked until the other vessel is finally past and clear. As a result, the penalty still should be added when the COLAV decision violates COLREGs, even though the action to avoid collision makes ${t_{\textrm{CPA}}} \ge \; {t_{\textrm{SAFE; }}}$ or ${d_{\textrm{CPA}}} \ge {d_{\textrm{SAFE}}}$, until the bearing $\beta$ of the other vessel crosses 22.5 degrees abaft the beam of the USV. At time steps k and $k + 1$, this condition can be described as
The objective function values for the above example are shown in Figure 7(b). The RGB colour represents the values of the first three terms in Equation (6). Red represents the values of the course term. Green represents the values of the distance term. Blue represents the values of the surge speed term. In addition, as turning port side violates the COLREGs, all the objective function values of these solutions are lower.
Remark 2: The VO method needs to meet the assumption that USVs move at any constant velocity throughout the avoidance manoeuvre. Therefore, the resulting trajectory is linear (straight line movement). However, this assumption cannot be met when predicting the trajectory using the dynamic motion model of USVs. As a result, there are deviations between the two types of trajectories. The comparison between these two types of trajectories of velocities in the collision cone of Figure 6 is illustrated in Figure 8(a). For the above reasons, two issues arise. First, a small number of shielded velocities may move outside the collision cone, generating the optimal collision avoidance trajectory. Second, a small number of velocities from the final restricted search area may fall into the collision cone along nonlinear trajectories.
For the issue of shielding the optimal trajectories, it should be accepted that in some cases, the solution may be suboptimal. However, for the robustness of the MPC algorithm, suboptimal solutions can still be used and be efficient to avoid collisions.
(1) The deviation between the optimum and suboptimal solutions is acceptable and can be ignored. The distance between the end positions of linear and nonlinear trajectories are shown in Figure 8(b). Therefore, if the optimal solution is in a collision cone, it will be near the boundary of the collision cone. In addition, as the local COLAV time step is very short, it will barely affect the COLAV effectiveness.
(2) Because the CS-MPC uses a rolling optimisation strategy, the low-level controller will follow the desired velocity only at the next time step. In most velocity controllers, such as the one used in this paper, the control forces based on optimal and suboptimal solutions for COLAV are almost the same in the early period when the error appears.
(3) If the optimal solution is in the collision cone, the suboptimal solution will be located on the same side of the collision cone. Additionally, the position of the USV predicted by the suboptimal solution is further away from the collision cone. It means the suboptimal solution has a larger DCPA than the optimal solution. Therefore, if the optimal solution is shielded in a collision cone, the chosen suboptimal solution will be safe but more conservative.
For the issue of some velocities outside the collision cone still being dangerous, the objective function values of these velocities are set to ‘−1’ as in Equations (26)–(28). If there are other feasible velocities, these dangerous velocities will not be chosen.
The pseudo-code of the CS-MPC COLAV algorithm is shown as follows.
4. Simulation results
The effectiveness and applicability of the CS-MPC COLAV algorithm were verified by simulation experiments in situations of encountering with a single vessel and multiple vessels. The agility improvement of the CS-MPC was verified by simulation experiments in a more complicated situation, compared with the scenario-based MPC (SB-MPC, Kufoalor et al., Reference Kufoalor, Wilthil, Hagen, Brekke and Johansen2019). A Viknes 830 USV was selected as the research vessel, whose parameters are shown in Table 2. The coefficients of the CS-MPC algorithm were tuned as in Table 4. These experiments have been simulated with a 2.2 GHz i7-8750 CPU and a 16 GB RAM in a single process.
4.1 Encountering a single vessel
Encountering a single vessel is a common situation for ships' COLAV, especially on ocean voyages. As a typical simulation experiment, it can verify the effectiveness of the COLAV algorithm. Assume that the USV is sailing from one waypoint (the initial state) to another waypoint (the destination) in the planned trajectory without disturbance of wind, current and wave.
(1) In the first group of simulations, the USV needs to avoid collision with the target vessel, which does not require coordinated manoeuvres. The simulations are set based on the five scenarios described in Section 2.4. The experimental conditions are shown in Table 5 and the results are shown in Figure 9.
Analysing the experimental results, the runtimes of all iterative steps were within 460 ms, much shorter than the sample time. Therefore, the CS-MPC COLAV algorithm can meet the real-time calculation requirements. In addition, the USV avoided the target vessel, complying with the COLREGs. The USV was able to avoid other vessels even if they did not comply with the COLREGs. Meanwhile, the USV did not oscillate during the COLAV procedures.
(2) In the second group of simulations, both the USV and the target vessel manoeuvre coordinately with the CS-MPC COLAV algorithm. So, both vessels are regarded as USVs. The simulations are set based on the three encounter situations shown in Figure 2. The experimental conditions are shown in Table 6 and the results are shown in Figure 10.
Analysing the experimental results, even though there is no communication between the two USVs, both vessels manoeuvre coordinately to avoid collision, complying with the COLREGs. In addition, each COLAV manoeuvre is slighter than the one in uncoordinated manoeuvre scenarios.
4.2 Encountering multiple vessels
In coastal navigation, USVs are often in multi-vessel encounter situations, requiring the COLAV algorithm to make intelligent decisions.
(1) Taking the USV encounter with two target vessels as an example, simulation experiments were carried out. The simulation conditions in Table 5 were combined to form six groups of encounter situations. The results are shown in Figure 11.
From the results, it can be observed that the USV selected effective COLAV decisions in the two-vessel encounter situations. When the COLREGs were impossible to comply with by both vessels [such as the results in Figure 11(c)], the USV even deviated from the COLREGs rules, so as to select the safest manoeuvre.
(2) It is difficult for a USV to avoid collision when it encounters more than two target vessels. IMAZU from Tokyo University of Marine Science and Technology raised many encounter situations that were difficult for multi-vessel COLAV (called the IMAZU problem). To further verify the effectiveness of the CS-MPC algorithm, 11 relatively difficult situations of the IMAZU problem are simulated, where the USV encounters three target vessels at the same time. Considering the difficulty of the IMAZU problem, every vessel should manoeuvre to help avoid collision based on the CS-MPC algorithm. Therefore, all the four vessels in the simulation were regarded as USVs. The simulation conditions are shown in Table 7, and the results are shown in Figure 12.
The simulation results show that the USVs can avoid collision when they encounter with three other target vessels. As there is a collision risk between either of the vessels, the prerequisite for the success of the COLAV is that every vessel should manoeuvre to avoid collision. However, in some scenarios, although the COLAV is achieved, the trajectories of the USVs may be very winding, such as in the experiments shown in Figures 12(g), 12(j) and 12(k).
4.3 Complicated situation
To further verify the superiority in agility of the CS-MPC algorithm, simulations were carried out in a more complicated situation, where the USV should avoid several static obstacles and two target ships. The CS-MPC algorithm was compared with the SB-MPC algorithm. The experiment conditions and some parameters of the SB-MPC algorithm are shown in Table 8. Other parameters of the SB-MPC are the same as the CS-MPC shown in Table 4. The simulation results are shown in Figure 13.
The USV can avoid the static obstacles and target vessels, guided by either the CS-MPC or SB-MPC algorithm.
From Figure 13(c), the CS-MPS mean runtime is 442.2 ms, which is 9.21% less than the SB-MPC mean runtime of 487.1 ms. Especially in period , the CS-MPC mean runtime is approximately 250 ms, because parts of the search space were shielded by both the static obstacle and the target vessel. Therefore, the USV reacted more quickly, guided by the CS-MPC.
From Figure 13(b), the minimum distance from the USV to obstacles (including target vessels) of the CS-MPC was 143.9 m, which was 35.88% larger than that of the SB-MPC at 105.9 m. Therefore, the USV can avoid obstacles by making safer COLAV decisions guided by the CS-MPC.
From Figure 13(a), the USV guided by the CS-MPC took action earlier in the procedures of both COLAV and returning to the planned trajectory. In addition, the COLAV manoeuvre of the USV guided by the CS-MPC is more obvious. Above all, the COLAV decision of the CS-MPC is better according to the COLREGs rules.
5. Discussion
The proposed CS-MPC COLAV algorithm guides the USV more quickly with better COLAV decisions, which means that it improves the USV's COLAV agility. However, the CS-MPC will not lead the USV precisely to the waypoint, if there are obstacles or target vessels near the waypoint.
The CS-MPC runtime of the worst-case scenario is in the scenarios where there are no static obstacles and target vessels within the collision cone range rc = 160 m, because there are no collision cones to shield the search space. From Figure 13(c), the runtimes of the CS-MPC are almost equal to those of the SB-MPC in some periods. It is because in these periods, the search space is not shielded by collision cones and the numbers of the candidate manoeuvres for both algorithms are initially set to equal. As the worst-case runtime of the CS-MPC is lower than the simulation time step, it could be used in a real-time COLAV.
However, guided by the CS-MPC algorithm, the USV sometimes may not precisely reach the waypoint, just like the results in some simulations above. It is because the velocities leading to the waypoint are in the collision cone. If the USV precisely reaches the waypoint, it may collide with the target ship afterwards or have to make an emergency stop manoeuvre. Fortunately, this problem will not affect the autonomous navigation for the USV, which is combined with a high-level path planning system. As a result of the complicated situation depicted in Figure 13(a), the next one on the planned path would replace the waypoint, and the USV would navigate towards the new waypoint with a better COLAV manoeuvre.
6. Conclusion
In this paper, a collision shielded MPC COLAV algorithm is proposed for USVs, which improves the agility of the COLAV. The optimality of the COLAV decision is improved by an accurate trajectory prediction considering the nonlinear dynamics of the underactuated USVs and a modified objective function based on COLREGs. In addition, the algorithm runtime is reduced by shielding the dangerous velocities in the search space with the collision cone, prior to the trajectory prediction. The effectiveness, applicability and the agility improvement are verified by the simulation experiments in single-vessel, multi-vessel encounter situations and a complicated situation.
As the CS-MPC can also guide USVs to destinations, by combining the CS-MPC with velocity controllers, it can be used not only in the COLAV subsystem, but also for trajectory tracking in the guidance system. The USVs' safely autonomous navigations in complicated waters can be achieved.