Abstract
The International Regulations for Preventing Collisions at Sea (COLREGS) specify certain navigation rules for ships at risk for collision. Theoretically, the safety of unmanned surface vehicles and traffic boats would be guaranteed when they comply with the COLREGS. However, if traffic boats do not comply with the demands of the convention, thereby increasing the danger level, then adhering to the COLREGS may be dangerous for the unmanned surface vehicle. In this article, a dynamic obstacle avoidance algorithm for unmanned surface vehicles based on eccentric expansion was developed. This algorithm is used to solve the possible failure of collision avoidance when the unmanned surface vehicle invariably obeys the COLREGS during the avoidance process. An obstacle avoidance model based on the velocity obstacle method was established. Thereafter, an eccentric expansion operation on traffic boats was proposed to ensure a reasonable balance between safety and the rules of COLREGS. The expansion parameters were set according to the rules of COLREGS and the risk level of collision. Then, the collision avoidance parameters were calculated based on the aforementioned motion model. With the use of MATLAB and Unity software, a semi-physical simulation platform was established to perform the avoidance simulation experiment under different situations. Results show the validity, reliability and intellectuality of the algorithm. This research can be used for intelligent collision avoidance of unmanned surface vehicle and other automatic driving ships.
Keywords
Introduction
An unmanned surface vehicle (USV) is a ship with an automated or remote control system. Autonomous collision avoidance is the foundation of a USV’s ability to perform tasks and reflects its intelligence. 1,2
The International Maritime Organization approved the International Regulations for Preventing Collisions at Sea (COLREGS) in 1972. 3 The regulations specify certain rules of navigation for ships at risk for collision. Numerous studies show that one of the major causes of marine accidents is the violation of collision regulations. During collision avoidance, USVs should follow the regulations and assume that the obstacles, which refer to traffic boats in this article, comply with the regulations, which have become the consensus for research in intelligent collision avoidance. In this premise, many studies have proposed various algorithms, such as evolutionary algorithm, 4 neural network, 5,6 and 2D grid maps, 7,8 to achieve the obstacle avoidance of USV on the basis of COLREGS. Savkin and Wang 9 proposed a novel biologically inspired reactive algorithm to navigate towards a target avoiding collisions with moving obstacles. The mobile robot is assumed to be a unicycle-like vehicle described by the standard non-holonomic model with a hard constraint on its angular velocity. The navigation strategy is based on switching between moving to the target along straight lines and a sliding-mode obstacle avoidance navigation law. The proposed algorithm is quite simple and computationally efficient for automobiles; however, the navigation in water has certain rules and characteristics that weaken its effect. To make the planned path optimal and smooth, an interpolation method is used to make a connection of three points with curves and the proposed path is rotated using the parametric method. 10 It makes a connection of three points with curves, and the proposed path is rotated using the parametric method. The polynomials expand to the next three points and they merge into the entire path using the membership functions with G2 continuity. However, this method do not operate well in cases of moving obstacles and complex encounter situations. Peng and Xu 11 proposed an online path planning framework in the sense of model predictive control to continuously update the environmental information for the planner. A dynamic multi-objective evolutionary algorithm based on linkage and prediction is proposed to collect and analyse the historical Pareto sets to enhance the performance. As well as the Bayesian network and fuzzy logic are used to quantify the bias to each optimization objective. Akka and Khaber 12 introduce an improved ant colony algorithm that uses a stimulating probability to help the ant in its selection of the next grid and employs new heuristic information based on the principle of unlimited step length to expand the vision field and to increase the visibility accuracy and accelerate the convergence speed, as well as enlarge the search space.
However, these methods do not operate well in cases of multiple obstacles and complex encounter situations. Moreover, existing research focuses mainly on situations in which the movements of obstacles do not pose an extreme threat to the USV. Therefore, when the obstacles do not follow the COLREGS, the aforementioned algorithms may fail. The velocity obstacle (VO) approach was first used in the robotic field and is now widely applied in collision avoidance of USV. 13 The method states that a cone-shaped space is generated on the obstacles, thereby ensuring that the USV outside the space is definitely outside the possibility of collision. The combination of the VO algorithm and the rules of COLREGS is now the direction of many studies because of its efficiency. 14 –17 Kuwata et al. 18 presented a theory to generate a conic obstacle in the velocity space of the USV and measured the risk of collision in different conic zones on the basis of COLREGS. The results of a collision avoidance experiment in a multi-obstacle environment show that the method has a considerable success rate.
Although the COLREGS recommend that USVs avoid obstacles through the side, 13,19 avoidance may be dangerous sometimes due to the uncertainty of motion and the aforementioned problem (i.e. obstacles may not follow the rules of COLREGS) from a security standpoint. Therefore, researchers developed different collision avoidance operations for different risk levels on the basis of the rules of COLREGS. 20 In some studies, the rules were divided up into six different encounter situations and 14 avoidance operations, resulting not only in difficulties in the implementation of rules but also in decreased intelligence of USVs.
In view of the existing shortcomings, this article argues that a unified and efficient strategy should be established for the collision avoidance problem. A USV should be able to decide when and when not to comply with the COLREGS rather than always blindly follow the rules of COLREGS. Rules are the general principle for ships. Thus, the significance of the COLREGS should be that, on the basis of security, the USV should comply with the rules and avoid other boats and reach its destination as soon as possible. However, in the event of an emergency, if the rule-specified operation is likely to put the two vessels at greater risk, then the rules should be waived and the USV must select a more secure side, that is, the order of priority of USV movements should be security > COLREGS > rapidity > purpose.
Given the aforementioned reasons, this article proposes an eccentric expansion operation on the obstacle boats on the basis of the rules of COLREGS. The parameters of the eccentric expansion depend on the level of collision risk and the specific encounter situation. The eccentric expansion circle increases the difficulty of violating the COLREGS for the USV. Rather than requiring the USV to avoid an obstacle through the rule-specified side, the expansion only prioritizes such requirement. Combined with the traditional VO algorithm, the method enables the USV to intelligently pass the obstacle on the basis of a unified motion model.
The second section briefly introduces the motion model based on the VO algorithm and presents the prior avoidance scheme (PAS) and backup avoidance scheme (BAS). The third section illustrates three encounter situations and avoidance regulations in CORLEGS. Subsequently, the eccentric expansion operation is presented based on the calculation of comprehensive collision risk. The process of the overall algorithm is also presented. The fourth section verifies the effectiveness of the algorithm using simulation experiments and presents the results and detailed analysis. The final section concludes this article.
Motion model of the USV and traffic boats
A USV with shape A and a moving ship with shape B and have velocity vectors
The motion model based on VO method is shown in Figure 1.

Motion model of USV and a traffic boat. USV: unmanned surface vehicle.

USV and velocity obstacle. USV: unmanned surface vehicle.
Figure 2 shows that the USV can collide with the obstacle when
The following equation can be derived based on the aforementioned equation set:
Taking a derivative of equation (2), we obtain
Thus, if the obstacle velocity vo
, course β, and their changes
This algorithm aims to adjust γ to satisfy
The collision avoidance schemes are proposed as follows:
PAS
BAS requires a substantial shift in course
An analysis of equations (4) and (5) indicates that avoiding the obstacle in PAS rather than in BAS is easier because PAS requires the USV to avoid the obstacle through the minor arc side of the traffic boat. However, BAS is difficult to achieve because obstacles should be avoided through the major side of the arc. Therefore, the solution is to obtain an optimal
Eccentric expansion of the obstacle
This article mainly considers three types of encounter situations according to COLREGS:
In a head-on situation, the USV should alter its course towards the starboard, thereby passing the traffic boat by its port side. In an overtaking situation, the USV should pass the traffic boat by its port side. In a crossing situation, the USV should avoid the boat from its back. The avoidance courses of USV in different situations are shown in Figure 3.

Avoidance regulations for USV: (a) overtaking, (b) head-on, and (c) crossing. USV: unmanned surface vehicle.
According to the VO algorithm, the prior side for collision avoidance was the minor arc side of the obstacle, which may not coincide with the rules of COLREGS. To meet the requirements of COLREGS, the eccentric expansion of the obstacle was presented in this article, by which the COLREGS-required side for collision avoidance will be consistent with the minor arc side. The radius and centre point of the eccentric expansion were changed and calculated in each movement. Moreover, the radius and centre point of the eccentric expansion are related to the level of collision risk, whereas the level depends on distance to closest point of approach (DCPA) and time to closest point of approach (TCPA). DCPA and TCPA can be described as follows:
DCPA represents the possibility of direct collision. If DCPA = 0, then collision between two ships is inevitable if their trajectories do not change. If 0 <DCPA < d 1, then the risk of collision between two ships exists. d 1 is the secure encounter distance (in this article, d 1 is the domain radius of the traffic boats). TCPA represents the probability of a potential collision. A large TCPA implies a low collision level. Furthermore, the TCPA may be negative sometimes, thereby indicating that the USV is moving away from the traffic boat.
The direct collision probability can be expressed by DCPA as follows
where d 2 is the distance between two ships when the USV must take action to avoid the obstacle. If the actual distance when USV begins to take action is less than d 2, then an emergency situation will occur. In this article, d 2 is set to be the area of the boats.
The potential collision probability can be expressed by TCPA as follows
where
The comprehensive collision probability, which is represented as μ, can be described by the direct collision probability and the potential collision probability as follows
The radius of the eccentric expansion circle is as follows
where R* is the radius of eccentric expansion and R′ is the radius of
Figure 4 shows that
where

Eccentric expansion based on COLREGS. COLREGS: International Regulations for Preventing Collisions at Sea.
Equation (13) shows that ψ stands for the angle of vector
As previously mentioned, as long as the AIS system and the radar on the USV detect the obstacle, the obstacle is eccentrically expanded to instruct the USV to avoid the obstacle through the COLREGS-required side. If the comprehensive collision probability between the USV and the traffic boats increases, then the expansion reduces gradually until the traffic boats overlap with the domain of the obstacle, thereby indicating that the influence of the COLREGS decreases accordingly, whereas the requirement to remain safe increases. With the eccentric expansion, the USV is able to intelligently avoid the traffic boat instead of blindly following the rules of COLREGS.
The entire process of collision avoidance based on COLREGS is shown in Figure 5.

Collision avoidance flow.
Simulation
With the use of the numerical simulation software MATLAB and the 3D development software Unity, a series of simulations of the collision avoidance of USVs in different situations was performed. In these simulations, the situations of single/multiple traffic boats were included, thereby enabling the analysis of the effectiveness and the intelligence of the proposed method. The cycle of the simulations lasted 5 s; thus, the location information of the USV and the traffic boats was recorded every 5 s. To reduce the complexity of figures, the positions of the obstacles are shown every three cycles instead of each cycle. All symbols in the simulations are illustrated in Figure 6(a).

Comparative simulation in overtaking situation. (a) Low initial collision risk. Adopt eccentric expansion. (b) Low initial collision risk. Do not adopt eccentric expansion. (c) High initial collision risk. Adopt eccentric expansion.
Comparative simulation of one obstacle
The overtaking situation was selected for simulation. The traffic boat remained at a fixed course and speed as required by COLREGS. The unit of the distance was metre. The initial position of the USV was [0, 0], and the initial velocity was 38 kn, whereas the initial velocity of the traffic boat was 23 kn, and both velocities were eastward. The collision range of the USV is 1000 m. Two different initial conditions in these three figures exist. Firstly, in Figure 6(a) and (b), the initial position of the traffic boat was [1500, 100], respectively, whereas in Figure 6(c), the position was [1000, 100], thereby indicating a higher risk of collision for the situation in Figure 6(c). Secondly, the VO algorithm and the eccentric expansion in Figure 6(a) and (c) were used. In Figure 6(b), only the VO algorithm was used, thereby indicating that the traffic boat was not eccentrically expanded.
The initial conditions in (a) and (b) are similar, that is, turning right was the PAS for the USV to avoid the obstacle in both simulations, which was easy for the USV to perform but would violate the rules of COLREGS. However, because eccentric expansion was used in simulation (a), turning left was the PAS to avoid the eccentric expansion circle, and the USV passed the traffic boat through its port side, which is consistent with the regulations of the COLREGS in the overtaking case. Turning left may take more work in this case than turning right, but this option was still safe because the collision risk was not too dangerous that the USV would collide with the obstacle during the turning period as calculated. As the simulation results in (a) and (b) show, under the same initial condition, the performance of eccentric expansion led to different results.
The initial condition in (a) and (c) was slightly different, but both simulations used eccentric expansion. Turning right was still the PAS to avoid the obstacle, which violated the rules of COLREGS. Simulation (a) had been already described previously. In (c), as the USV caught up to the obstacle, the collision risk increased accordingly, thereby rapidly shrinking the eccentric expansion circle. Compared with (a), the collision risk was more dangerous, and turning right was still the PAS for the USV to avoid the continuously reducing eccentric expansion. This action still violated the COLREGS but was the most secure strategy for the USV in this case. The results in Figure 6(a) and (c) show that different levels of collision risk led to different results, although both simulations adopted eccentric expansion.
The comparative simulation in Figure 6 shows that with the help of the eccentric expansion, the USV was able to prevent collision preferentially as the rules required and ensured the security of the USV and COLREGS compliance. The same conclusion can be drawn from the comparative simulation under crossing and head-on situations, which are not detailed in this article.
Simulation of multi-obstacles in multiple situations
Figure 6 shows the situation in which a traffic boat maintained a fixed speed and course as required by COLREGS. However, if the obstacles do not move as required by COLREGS, whether the USV acts reasonably will better reflect the intelligence of the algorithm. Collision avoidance for three obstacles under three different encounter situations was simulated. The velocity and course of the traffic boats changed randomly, which caused their motion to violate the requirements of COLREGS. Fuzzy algorithm is used for multi-ship avoidance. Initially, all obstacles are divided into various types according to the potential collision probability based on the TCPA. A USV only needs to avoid the two most urgent obstacles. Based on the fuzzy rules, the priority level of collision avoidance for these two obstacles at the current moment is deduced. Then, the requirements of the collision avoidance operation on the post-adjustment situation and the strategy realization are obtained. These two requirements determine the additional domain of collision avoidance strategy solution. Within the limits of the basic and additional domains, the collision avoidance operation of the unmanned boat can be obtained by optimizing the solution.
For better observation, a 3D view was constructed with Unity on the basis of the simulation in a MATLAB environment. The work was programmed in C# script, where the calculation in MATLAB was linked as the dynamic link library. The development platform is Visual Studio.
The USV has an initial position of (0, 0) and an eastward velocity. Traffic boat I, which is enclosed by the yellow circle, is located at (1500, −500); its velocity points to the north by west. Traffic boat II, which is enclosed by the red circle, is located at (2000, 500); its velocity points to the east by south. Traffic boat III, which is enclosed by the blue circle, is located at (6000, −500); its velocity points to the west by north. The USV performed global path planning in a static obstacle environment, and the next sub-global goal is located at (6500, −800). The relative position of the boats in the first three cycles is shown in Figure 7. The USV was always in the centre of the 3D graph. The dark area around the traffic boat indicates its domain, whereas the light area represents its eccentric expansion.

The relative position of the boats in the first three cycles.
Figure 8 shows the numerical curves of comprehensive collision probability between the USV and the three traffic boats during the simulation. The yellow solid line, the red dotted line and the blue dashed dotted line represent obstacles I, II and III, respectively. As the avoidance proceeded, the comprehensive collision probabilities changed alternately. The USV passed all the obstacles safely, and the collision risk became 0. Equations (11) and (12) indicate that the size and position of the eccentric expansion circle of each obstacle would be affected by this curve.

Numerical curves of comprehensive collision risk.
Initially, traffic boat no. I (or obstacle no. I) was the first boat that should be avoided according to the collision risk. The USV and traffic boat no. I were in a crossing situation. As required by COLREGS, the USV should have avoided the obstacle from its rear. However, after evaluating the situation based on the eccentric expansion of traffic boat no. I, passing ahead of traffic boat no. I was the PAS against the eccentric expansion, which needed only a slight adjustment of speed and course for the USV and could ensure safety. However, passing through the back of traffic boat no. I became the BAS for the USV, which needed more adjustment. Therefore, as shown in Figure 9, rather than following the COLREGS, the USV violated the rule and passed ahead of obstacle no. I to ensure safety and efficiency.

USV avoids the crossing obstacle. USV: unmanned surface vehicle.
Figure 10 shows that traffic boat no. II entered the avoidance range of the USV. As the distance reduced, the risk of collision increased. Given this overtaking situation, turning right (which violates the COLRESGS) to pass the obstacle will be the PAS against the obstacle circle under the consideration of relative position and speed. However, the eccentric expansion of obstacle no. II increased the difficulty for the USV to pass through the starboard. Turning left to pass traffic boat no. II through its port side tended to be the PAS against the eccentric expansion, which is in accordance with the rules of COLREGS. The result in the eccentric expansion method shows a reasonable balance between safety and compliance with COLREGS during avoidance of traffic boat no. II.

USV avoids the overtaking obstacle. USV: unmanned surface vehicle.
Figure 11 shows that after passing traffic boat no. II successfully, the USV turned to the sub-goal slowly and speeded up. However, after a short period, traffic boat no. III entered its avoidance range, thereby resulting in a head-on situation. The USV and the obstacle should pass each other by their port side as required by COLREGS. The eccentric expansion increased the difficulty for the USV to pass through the starboard of the obstacle. However, traffic boat no. III did not follow COLREGS but conducted the dangerous operation of turning left. In this case, the USV turned to pass traffic boat no. III through its starboard. Although this operation did not meet the requirements of COLREGS, it is more secure.

USV avoids the head-on obstacle. USV: unmanned surface vehicle.
Conclusion and future works
In this article, an obstacle avoidance method based on the VO algorithm and eccentric expansion was proposed. In this method, no mandatory demand to the avoidance strategy exists, and the computation rules as to whether to follow the COLREGS and how the USV moves were simple. To ensure safety, COLREGS should be followed. With only the eccentric expansion operation added to the obstacle in the VO model and with the impact of the COLREGS reflecting on the size and position of this expansion, uniform collision avoidance could be conducted regardless of the conditions or the level of urgency.
The method is simulated and analysed under a MATLAB/Unity co-simulation environment. The semi-physical simulation platform worked perfectly as the trajectory was planned as desired, thereby satisfying the requirements of safety and the COLREGS regardless of the movement of the obstacle. The simulation results, which provide a clear insight into the avoidance process of USVs in a real-world environment, show the validity, reliability and intelligence of the algorithm.
In future, an obstacle avoidance algorithm that takes the moving capacity of the USV and the influence of the control system into consideration will be designed to create an integrated closed loop in the planning and execution of obstacle avoidance.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship and/or publication of this article: This funding of this work was supported by the National Natural Science Foundation of China (Grant Nos. 51809203 and 51709214) and the Fundamental Research Funds for the Central Universities (WUT: 2019IVB011, 2017IVA008 and 2017IVA006).
