# Model Predictive Control-Based Collision Avoidance for Autonomous Surface Vehicles in Congested Inland Waters

Authors: Wei Yuan; Pengcheng Gao
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

Compared with open waters, congested inland waters have narrow waterways, many river-crossing bridges, a high density of navigation, and high current velocity in some sections. In this study, an improved collision avoidance algorithm based on model predictive control (MPC) is proposed to solve the problem of collision avoidance for autonomous surface vehicles (ASVs) in congested inland waters. First, considering the influence of current, the collision avoidance problem of ASVs is transformed into a nonlinear programming problem, and the kinematics of ASVs and the boundary of the channel are regarded as its inequality constraints. Next, since ASVs cannot perform large-scale collision avoidance in congested inland waters, the strategy of reducing the speed and slightly changing the yaw angle is adopted to realize collision avoidance. Then, an improved dynamic bumper model is used to model the safe zone of ASVs and dynamic obstacles, which improves the efficiency of the algorithm and the safety of ASVs. Finally, the collision avoidance rules and the evaluation function of the collision avoidance maneuver are constructed in the cost function of the algorithm. The simulation experiments in different encounter scenarios show that the proposed algorithm significantly improves the rationality and compliance of ASVs’ autonomous collision avoidance in congested inland waters.


---

## Body

## 1. Introduction

Autonomous surface vehicles (ASVs) are intelligent robots that can autonomously navigate on the surface of the water and perform many dangerous and time-consuming tasks. In recent years, with the continuous development of computer performance [1], sensing technology [2], and artificial intelligence technology, the related technologies of ASVs have achieved rapid development and become a research focus in robotics. In addition, the strong demand from business, scientific research, and environmental protection has further promoted the application of ASVs in cargo transportation, exploration of marine resources, ecological monitoring, and other fields [3, 4]. Compared with the application of ASVs in open waters of the sea, the application of ASVs in congested inland waters is more closely related to people's daily life, which has a broader application prospect [4]. However, due to the narrow bending of the congested inland waters, many river-crossing bridges, high density of navigation, and high current velocity in some river sections, the autonomous navigation of ASVs becomes very challenging. In addition, most of the accidents are caused by human error in congested waters [5], so how to achieve effective autonomous collision avoidance is the key to ASVs in congested inland waters.The autonomous navigation system of ASVs is usually composed of the navigation module, the guidance module, and the control module [6]. Among them, the guidance module is used to get the collision-free path of ASVs between two different positions according to the environmental information obtained by the navigation module [7]. The guidance module of ASVs usually consists of two parts: global path planning and local path planning. Local path planning is conducted to avoid the dynamic obstacles in real time according to the local environment information around the ASV. It can be divided into two categories: the reactive algorithm and the motion planning algorithm [5, 8]. Among them, the reactive algorithm, which takes the limited information in a short time into consideration, has better real-time performance when coping with sudden changes in the environment [9]. The main reactive algorithms include the dynamic window method [10, 11] and the artificial potential field method [12, 13]. Compared with the reactive algorithm, the motion planning algorithm, which takes more information and a longer time, can provide more optimized paths. The main motion planning algorithms include the velocity obstacle method [14, 15] and the model predictive control (MPC) method [16, 17].Compared with other collision avoidance algorithms, MPC has the characteristics of good robustness and strong anti-interference ability. MPC can adopt a nonlinear ship model to optimize the system and compensate for external disturbances in real time, reducing the system uncertainty caused by disturbances [18]. During the receding horizon optimization of the ship, MPC can simultaneously consider multiple constraints and calculate an optimal path by predicting the movement state of obstacles [19, 20]. Moreover, the assessment of collision avoidance risk, the limitations of the ship, and the navigation objectives can also be formalized in the cost function of the MPC algorithm [17]. Although there were defects in real time for MPC, its performance has been greatly improved in recent years, with the progress of computer performance, the improvement of algorithm structure, and the optimization of computing tools. The MPC algorithm has been widely applied to the path planning of unmanned aerial vehicles [21], autonomous vehicles [22–24], and unmanned surface vehicles [25].The MPC-based collision avoidance algorithm has made many achievements for ASVs in open waters. Eriksen et al. [26] proposed an MPC-based collision avoidance algorithm that considers the influence of the International Regulations for Preventing Collisions at Sea (COLREGs) to realize autonomous collision avoidance of both static and dynamic obstacles. In order to improve the real-time performance of the collision avoidance algorithm, Sun et al. [27] adopted the finite control set model predictive control algorithm (FCS-MPC) according to the assessment of the encounter scene and the collision risk of the ASV in open waters. The COLREGs are adopted in the algorithm as the evaluation standard to realize effective collision avoidance of various dynamic obstacles. When Hagen et al. [17] designed the MPC-based collision avoidance, they adopted the collision avoidance strategy that significantly changed the surge speed and yaw of the ASV under navigation conditions in open waters, which improved the flexibility of the ASV in collision avoidance. However, the speed and yaw of ASVs are selected from a limited number of sets, which may cause discontinuity of control. In order to reduce the risk of collision avoidance, Johansen et al. [19] used a circular area to model the safety zone of the ASV when designing the MPC-based collision avoidance system. In the collision avoidance algorithm based on nonlinear MPC, Abdelaal et al. [16] adopted an elliptical zone to model the safety zone of the ASV and dynamic obstacles. However, using a standard circular or elliptical safety zone will result in many unnecessary parts in the calculation when assessing the collision avoidance risk, which reduces the computation efficiency of the algorithm.However, due to the relatively complicated navigation conditions, there are few studies on collision avoidance in congested inland waters. In order to solve the problem of autonomous collision avoidance of ships under the condition of narrow and curved inland rivers, Cheng [28] proposed a collision avoidance algorithm based on the genetic algorithm to realize the collision avoidance of dynamic and static obstacles. Zhang [29] proposed an improved velocity obstacle method to avoid collision for inland river ferries. However, the maneuverability constraints, collision avoidance safety zone, and inland navigation rules of ASVs in the above methods are not fully considered, and there are still certain limitations in practical applications. In order to solve the problems mentioned above and make the ASVs safely navigate in congested inland waters, an improved collision avoidance algorithm based on model predictive control is proposed. The improved algorithm can effectively avoid collision against multiple obstacles, which can comprehensively consider the influence such as current, channel boundary, the actuator constraints of ASVs, and other factors. Different from open waters, ASVs cannot perform large-scale collision avoidance in congested inland waters, the collision avoidance strategy of slightly adjusting the speed and yaw is adopted. In addition, a dynamic bumper model is used to model the safety zone of ASVs and dynamic obstacles, which improves the efficiency of collision avoidance and the navigation safety of ASVs. Finally, the collision avoidance rules and the evaluation function of the collision avoidance maneuver are added to the cost function of the algorithm to ensure the compliance and rationality of the ASV manipulation during the entire collision avoidance process.The rest of this study is organized as follows. The modeling of ASVs is given in Section2. Section 3 provides the design of an improved collision avoidance algorithm based on MPC. In Section 4, the algorithm is verified by numerical simulation, and the result is analyzed and discussed. Finally, a summary is given in Section 5.


## 2. Mathematical Model of the ASV

This study takes the kinematic model of the 3DOF ASV into consideration. The motion coordinate system is shown in Figure1. η=x,y,ψT and vc, respectively, represent the pose of the ASV and current in the Earth-fixed reference frame. v=u,rT represents the velocity of the ASV in the body-fixed frame under the assumption of zero relative sway motion, where u is the surge speed, and r is the yaw rate of the vessel. Rψ represents the rotation matrix from the body-fixed to the Earth-fixed frame. ψ is the yaw angle of the ship. χ=ψ+β is the course of the ASV. Assuming that the sideslip β of the ASV is zero, the kinematic equation of underactuated ASV can be defined as follows:(1)η˙=Rψυ+υc,χ˙=r,Rψ=cosψ0sinψ001.Figure 1
The Earth-fixed and body-fixed frames.


## 3. Design of Improved Collision Avoidance Algorithm Based on MPC

This section presents the mathematical principle and implementation process of the improved collision avoidance algorithm. The proposed collision avoidance algorithm is shown in Figure2.Figure 2
Block diagram of improved collision avoidance algorithm based on MPC.


### 3.1. Modeling of the Safety Zone

In this study, an improved bumper model is applied for modeling the safety zone of the ASV and obstacle ships [30]. The bumper model is obtained by statistical analysis of the vessel traffic flow data [31]. It can characterize the collision risk of the ship in the safety zone around the vessel. The bumper model is shown in Figure 3, consisting of two parts: the front and the back. The front half part is half of an ellipse; the parameters A and B represent the long and short semiaxes of the ellipse, respectively. The second half part is a semicircle with a radius of B. In order to comply with the actual navigation conditions, the size of the safety zone should vary with the velocity of the ASV or the obstacle ship [32]. As shown in Figure 4, when the surge speed of the ASV or the obstacle ship is zero, the size of the safety zone is a circular area with a radius of B = 0.8 L. When the surge speed of the ASV or the obstacle ship is at its maximum, A=5.2L and B=0.8L in the safety zone, where L is the length of the vessel. When the surge speed of the ASV or the obstacle ship is another value, A=0.8L+4.4Lu/umax and B=0.8L in the safety zone, where umax is the maximum surge speed of the ASV.Figure 3
The bumper model.Figure 4
The dynamic safety zone. The blue arrow is the actual surge speed of ASV. (a)u=0; (b) 0≤u≤umax; and (c) u=umax.
(a)(b)(c)


### 3.2. Kinematic Constraints

When ASVs navigate in congested inland waters, they can be constrained by their velocity, acceleration, and waterway’s boundary, namely,(2)umin≤u≤umax,(3)rmin≤r≤rmax,(4)0≤Δu≤Δumax,(5)0≤Δr≤Δrmax,(6)xmin≤x≤xmax,(7)ymin≤y≤ymax.whereumin represents the minimum surge speed of the ASV; rmax and rmin represent the maximum and minimum yaw rates of the ASV, respectively; Δu represents the surge speed increment of the ASV per unit time; Δr represents the yaw rate increment of the ASV per unit time; Δumax represents the maximum surge speed increment, that is, the ASV per unit time; Δrmax represents the maximum yaw rate increment of the ASV per unit time; xmax and xmin represent the maximum and minimum values in the horizontal of the channel, respectively; ymax and ymin are the maximum and minimum values in the longitudinal direction of the channel, respectively.Additionally, due to the limitation of congested inland waterway navigation conditions, the ASV usually adopts no more than a 40° turn when avoiding obstacles [33], namely,(8)ψ≤2∗pi9.


### 3.3. Rule Compliance

This study takes ASVs navigating in the congested waters of the Zhenjiang section of the Yangtze River as an example. ASVs must abide by the “Regulation of the People’s Republic of China on Inland River Collision Avoidance” (RPRCIRCA) and the “Regulations on Ship Routing System in Jiangsu Section of the Yangtze River” (RSRSJSYR) when navigating in the waters. The most relevant rules for designing collision avoidance algorithms can be summarized as follows:RPRCIRCA:Rule 9: Any actions to prevent a collision shall be taken effectively, early, and with good driving skill until the vehicle has passed.Rule 10: In a tidal stream, a lake, a reservoir, or an advection area, two vessels shall come close to meet on the port side of each other except in special circumstances.Rule 11: When a motorized vessel catches up or overtakes another motorized vessel in a direction greater than 22.5° behind its sway direction, which may pose a danger of collision, it shall be deemed overtaking.RSRSJSYR:Rule 10: Vessels shall travel at a safe speed to avoid collision.Rule 12: When overtaking another vessel, a vessel shall overtake from the port side of the overtaken vessel as far as possible under the condition that safety is guaranteed.Rule 20: Any vessel that needs to cross the navigable lane or the recommended route shall pay attention to the condition of the waterway and the surrounding environment and, without hindering the safe sailing of other vessels, carry out the crossing as near as possible to the navigable lane or recommended route at a large angle.Rule 28: A vessel that fails to navigate in the prescribed navigable lane or recommended route shall take the initiative to give way to vessels that usually navigate in the defined passable lane or recommended course.The encounter situation between the ASV and the obstacle ship in the Zhenjiang section of the Yangtze River is mainly divided into three conditions: head-on, overtaking, and crossing. The graphic diagram of the encounter situation is shown in Figure5. According to the requirements of the regulations, the avoidance direction of the ASV when evading an encounter scene is demonstrated in Figure 6.Figure 5
Graphic illustration is used to categorize encounters based on collision avoidance rules. The blue ship is own ASV; the red ship is an obstacle vessel.Figure 6
Avoidance direction according to collision avoidance rules. The blue ship is the ASV; the red ship is an obstacle ship. (a) Head-on; (b) overtaking; (c) crossing from port; and (d) crossing from starboard.
(a)(b)(c)(d)


### 3.4. Division of Encounter Situations

The primary information used to divide the encounter situation of the ASV is shown in Figure7. The specific description is as follows:(1)
The blue ship is the ASV, and the green ship is the obstacle ship. The red dashed line represents the given path of the ASV. The blue dashed line represents the navigation path of the ASV. The green dashed line represents the navigation path of the obstacle ship.(2)
The blue vectorU⟶owt represents the surge speed of the ASV at time t. The green vector U⟶obst represents the surge speed obstacle ship at time t. The red vector L⟶t represents the unit vector of the ASV to the obstacle ship at time t.(3)
ψ represents the yaw angle of the ASV in the Earth-fixed frame at time t.(4)
At timet, when doit≤dcloset, the obstacle ship is considered to be close to the ASV, and avoiding manipulation needs to be performed. Here, doit represents the Euclidean distance between the ASV and the obstacle ship at time t; dcloset represents the minimum distance that the ASV needs to avoid manipulation at time t, and its size depends on factors such as the relative velocity between the ASV and the obstacle ship, the encounter situation, and environmental conditions.Figure 7
The primary information used to classify the encounter situation of ASVs.Whendoit≤dcloset, U⟶obst≠0, and(9)U⟶owt⋅U⟶obst<−cosθ1U⟶owtU⟶obst,U⟶obst⋅L⟶t>cosθ2U⟶obst.The ASV is considered to have a head-on encounter with the obstacle ship.Whendoit≤dcloset, U⟶owt>U⟶obst, and(10)U⟶owt⋅U⟶obst>cosθ3U⟶owtU⟶obst,The ASV is behind the obstacle ship, and the ASV is considered to be overtaking the obstacle ship.Whendoit≤dcloset,(11)U⟶owt⋅U⟶obst<cosθ4U⟶owtU⟶obst.The ASV is facing the obstacle ship, and the ASV is considered to be crossing the obstacle ship.θ1, θ2, θ3, and θ4 are the angles that meet the requirements of the collision avoidance rules. The specific parameters are shown in Table 1.Table 1
Value ofθ that meets the requirements of collision avoidance rules.
ParameterValueθ140°θ27.5°θ368.5°θ468.5°


### 3.5. Optimization Problem Construction

In this study, multiple shooting methods are applied to transform the optimal control problem of ASV collision avoidance into a nonlinear programming problem (NLP) and consider the changes in the speed and pose of the ASV during optimization. The general form of NLP is as follows:(12)minωϕω,s.t.gω=0,hω≤0.where ω represents the decision variable; gω represents the equation constraint of kinematics; hω represents the inequality constraint; and ϕω represents the objective function. ϕω is defined as follows:(13)ϕω=∑k=1NpKppk−pdk22+Kuuk−ud2+Krrk−rd2+∑k=2NpKu˙∗uk−uk−12+Kr˙∗rk−rk−12+ϕrules.Among them,Kp, Ku, Kr, Ku˙, and Kr˙ are the adjustment parameters; pd represents the reference path of the ASV at the sampling time k; ud represents the reference surge speed of the ASV, rd represents the reference yaw rate of the ASV; uk represents the surge speed of the ASV at the sampling time k; rk represents the yaw rate of the ASV at the sampling time k; ϕrules is the cost function used to evaluate the rule compliance for collision avoidance of the ASV; and its specific form is as follows:(14)ϕrules=ϕheading∨ϕovertaking∨ϕcrossing,ϕheading=∑k=1NpKgm∗erk+n∗e−rk+Koii∗e−doi_zk−dsafe_heading,ϕovertaking=∑k=1NpKgm∗erk+n∗e−rk+Koii∗e−doik−dsafe_overtaking,ϕcrossing=∑k=1NpKgm∗erk+n∗e−rk+Koii∗e−doik−dsafe_crossing.where Kg and Koi are the adjusting parameters; m, n, and i are parameters with values of 0 or 1; doi_zk represents the distance between the ASV and the obstacle ship in the sway direction of the ship in the Earth-fixed frame at sampling time k; dsafe_heading, dsafe_overtaking, and dsafe_crossing, respectively, represent the safe distance that the ASV required to conduct collision avoidance manipulation in the situation of head-on, overtaking, and crossing.In NLP, the constraint of velocity and acceleration in equations (2)-(5) are defined as follows:(15)hu1:Np=umin−u1:Npu1:Np−umax≤0,hr1:Np=rmin−r1:Npr1:Np−rmax≤0,hΔu2:Np=Δu2:Np−Δumax≤0,hΔr2:Np=Δr2:Np−Δrmax≤0.where u1:Np=u1,u2…,uNp and r1:Np=r1,r2…,rNp, respectively, represent the surge speed and yaw rate of the ASV at each NLP step. Δu2:Np=u2−u1,u3−u2,…,uNp−uNp−1 and Δr2:Np=r2−r1,r3−r2,…,rNp−rNp−1, respectively, represent the increment of the surge speed and yaw rate of the ASV at each NLP step.In NLP, the constraint of the waterway’s boundary in equations (6) and (7) is defined as follows:(16)hx1:Np+1=xmin−x1:Np+1x1:Np+1−xmaxymin−y1:Np+1y1:Np+1−ymax≤0,where x1:Np+1=x1,x2…,xNp+1 and y1:Np+1=y1,y2…,yNp+1 represent the position of the ASV at each NLP step.In NLP, the constraints of course in equation (8) are defined as follows:(17)hχχ1:Np+1=χ1:Np+1−2∗pi9≤0,where χ1:Np+1=χ1,χ2…,χNp+1 represents the course of the ASV at the time related to each NLP step.As shown in Figure8, the position of the ASV is A, and the position of the obstacle is B in the Earth-fixed frame at time t. The intersection point of the AB connection and the safety zone of the ASV is C. The intersection point of the AB connection and the safety zone of the obstacle is D. The distance of AC is Rowt, and the distance of BD is Robst. When it is a static obstacle, Robst is a constant value. In order to ensure that the ASV effectively avoids obstacles during navigating, it must be guaranteed that, at time t, the Euclidean distance between the ASV and the obstacle is greater than or equal to the sum of AC and BD, that is, Lt≥Rowt+Robst.Figure 8
The obstacle avoidance principle of ASVs.In NLP, in order to ensure that the ASV effectively avoids static obstacles, for a set ofS static obstacles os=os1,os2,…,osS, the inequality constraint is as follows:(18)hsiLsit1:Np+1=Rsi+Rowt1−Powt1−Psi2Rsi+Rowt2−Powt2−Psi2⋮Rsi+RowtNp+1−PowtNp+1−Psi2≤0,where Rsi represents the radius of the safety zone of the static obstacle i; Powt1:Np+1 is the position vector of the ASV at the sampling time t1:Np+1; and Psi is the position vector of the static obstacle i.Similarly, in order to ensure that the ASV effectively avoids dynamic obstacles, for a set ofM dynamic obstacle om=om1t,om2t,…,omMt, the inequality constraint is as follows:(19)hLmit1:Np+1=Rmit1+Rowt1−Powt1−Pmit12Rmit2+Rowt2−Powt2−Pmit22⋮RmitNp+RowtNp+1−PowtNp+1−PmitNp+12≤0,where Rmit1:Np+1 is the value of the safety zone of the dynamic obstacles at the sampling time of t1:Np+1; Pmit1:Np+1 is the vector of the position of the dynamic obstacle i at the sampling time of t1:Np+1.


## 3.1. Modeling of the Safety Zone

In this study, an improved bumper model is applied for modeling the safety zone of the ASV and obstacle ships [30]. The bumper model is obtained by statistical analysis of the vessel traffic flow data [31]. It can characterize the collision risk of the ship in the safety zone around the vessel. The bumper model is shown in Figure 3, consisting of two parts: the front and the back. The front half part is half of an ellipse; the parameters A and B represent the long and short semiaxes of the ellipse, respectively. The second half part is a semicircle with a radius of B. In order to comply with the actual navigation conditions, the size of the safety zone should vary with the velocity of the ASV or the obstacle ship [32]. As shown in Figure 4, when the surge speed of the ASV or the obstacle ship is zero, the size of the safety zone is a circular area with a radius of B = 0.8 L. When the surge speed of the ASV or the obstacle ship is at its maximum, A=5.2L and B=0.8L in the safety zone, where L is the length of the vessel. When the surge speed of the ASV or the obstacle ship is another value, A=0.8L+4.4Lu/umax and B=0.8L in the safety zone, where umax is the maximum surge speed of the ASV.Figure 3
The bumper model.Figure 4
The dynamic safety zone. The blue arrow is the actual surge speed of ASV. (a)u=0; (b) 0≤u≤umax; and (c) u=umax.
(a)(b)(c)


## 3.2. Kinematic Constraints

When ASVs navigate in congested inland waters, they can be constrained by their velocity, acceleration, and waterway’s boundary, namely,(2)umin≤u≤umax,(3)rmin≤r≤rmax,(4)0≤Δu≤Δumax,(5)0≤Δr≤Δrmax,(6)xmin≤x≤xmax,(7)ymin≤y≤ymax.whereumin represents the minimum surge speed of the ASV; rmax and rmin represent the maximum and minimum yaw rates of the ASV, respectively; Δu represents the surge speed increment of the ASV per unit time; Δr represents the yaw rate increment of the ASV per unit time; Δumax represents the maximum surge speed increment, that is, the ASV per unit time; Δrmax represents the maximum yaw rate increment of the ASV per unit time; xmax and xmin represent the maximum and minimum values in the horizontal of the channel, respectively; ymax and ymin are the maximum and minimum values in the longitudinal direction of the channel, respectively.Additionally, due to the limitation of congested inland waterway navigation conditions, the ASV usually adopts no more than a 40° turn when avoiding obstacles [33], namely,(8)ψ≤2∗pi9.


## 3.3. Rule Compliance

This study takes ASVs navigating in the congested waters of the Zhenjiang section of the Yangtze River as an example. ASVs must abide by the “Regulation of the People’s Republic of China on Inland River Collision Avoidance” (RPRCIRCA) and the “Regulations on Ship Routing System in Jiangsu Section of the Yangtze River” (RSRSJSYR) when navigating in the waters. The most relevant rules for designing collision avoidance algorithms can be summarized as follows:RPRCIRCA:Rule 9: Any actions to prevent a collision shall be taken effectively, early, and with good driving skill until the vehicle has passed.Rule 10: In a tidal stream, a lake, a reservoir, or an advection area, two vessels shall come close to meet on the port side of each other except in special circumstances.Rule 11: When a motorized vessel catches up or overtakes another motorized vessel in a direction greater than 22.5° behind its sway direction, which may pose a danger of collision, it shall be deemed overtaking.RSRSJSYR:Rule 10: Vessels shall travel at a safe speed to avoid collision.Rule 12: When overtaking another vessel, a vessel shall overtake from the port side of the overtaken vessel as far as possible under the condition that safety is guaranteed.Rule 20: Any vessel that needs to cross the navigable lane or the recommended route shall pay attention to the condition of the waterway and the surrounding environment and, without hindering the safe sailing of other vessels, carry out the crossing as near as possible to the navigable lane or recommended route at a large angle.Rule 28: A vessel that fails to navigate in the prescribed navigable lane or recommended route shall take the initiative to give way to vessels that usually navigate in the defined passable lane or recommended course.The encounter situation between the ASV and the obstacle ship in the Zhenjiang section of the Yangtze River is mainly divided into three conditions: head-on, overtaking, and crossing. The graphic diagram of the encounter situation is shown in Figure5. According to the requirements of the regulations, the avoidance direction of the ASV when evading an encounter scene is demonstrated in Figure 6.Figure 5
Graphic illustration is used to categorize encounters based on collision avoidance rules. The blue ship is own ASV; the red ship is an obstacle vessel.Figure 6
Avoidance direction according to collision avoidance rules. The blue ship is the ASV; the red ship is an obstacle ship. (a) Head-on; (b) overtaking; (c) crossing from port; and (d) crossing from starboard.
(a)(b)(c)(d)


## 3.4. Division of Encounter Situations

The primary information used to divide the encounter situation of the ASV is shown in Figure7. The specific description is as follows:(1)
The blue ship is the ASV, and the green ship is the obstacle ship. The red dashed line represents the given path of the ASV. The blue dashed line represents the navigation path of the ASV. The green dashed line represents the navigation path of the obstacle ship.(2)
The blue vectorU⟶owt represents the surge speed of the ASV at time t. The green vector U⟶obst represents the surge speed obstacle ship at time t. The red vector L⟶t represents the unit vector of the ASV to the obstacle ship at time t.(3)
ψ represents the yaw angle of the ASV in the Earth-fixed frame at time t.(4)
At timet, when doit≤dcloset, the obstacle ship is considered to be close to the ASV, and avoiding manipulation needs to be performed. Here, doit represents the Euclidean distance between the ASV and the obstacle ship at time t; dcloset represents the minimum distance that the ASV needs to avoid manipulation at time t, and its size depends on factors such as the relative velocity between the ASV and the obstacle ship, the encounter situation, and environmental conditions.Figure 7
The primary information used to classify the encounter situation of ASVs.Whendoit≤dcloset, U⟶obst≠0, and(9)U⟶owt⋅U⟶obst<−cosθ1U⟶owtU⟶obst,U⟶obst⋅L⟶t>cosθ2U⟶obst.The ASV is considered to have a head-on encounter with the obstacle ship.Whendoit≤dcloset, U⟶owt>U⟶obst, and(10)U⟶owt⋅U⟶obst>cosθ3U⟶owtU⟶obst,The ASV is behind the obstacle ship, and the ASV is considered to be overtaking the obstacle ship.Whendoit≤dcloset,(11)U⟶owt⋅U⟶obst<cosθ4U⟶owtU⟶obst.The ASV is facing the obstacle ship, and the ASV is considered to be crossing the obstacle ship.θ1, θ2, θ3, and θ4 are the angles that meet the requirements of the collision avoidance rules. The specific parameters are shown in Table 1.Table 1
Value ofθ that meets the requirements of collision avoidance rules.
ParameterValueθ140°θ27.5°θ368.5°θ468.5°


## 3.5. Optimization Problem Construction

In this study, multiple shooting methods are applied to transform the optimal control problem of ASV collision avoidance into a nonlinear programming problem (NLP) and consider the changes in the speed and pose of the ASV during optimization. The general form of NLP is as follows:(12)minωϕω,s.t.gω=0,hω≤0.where ω represents the decision variable; gω represents the equation constraint of kinematics; hω represents the inequality constraint; and ϕω represents the objective function. ϕω is defined as follows:(13)ϕω=∑k=1NpKppk−pdk22+Kuuk−ud2+Krrk−rd2+∑k=2NpKu˙∗uk−uk−12+Kr˙∗rk−rk−12+ϕrules.Among them,Kp, Ku, Kr, Ku˙, and Kr˙ are the adjustment parameters; pd represents the reference path of the ASV at the sampling time k; ud represents the reference surge speed of the ASV, rd represents the reference yaw rate of the ASV; uk represents the surge speed of the ASV at the sampling time k; rk represents the yaw rate of the ASV at the sampling time k; ϕrules is the cost function used to evaluate the rule compliance for collision avoidance of the ASV; and its specific form is as follows:(14)ϕrules=ϕheading∨ϕovertaking∨ϕcrossing,ϕheading=∑k=1NpKgm∗erk+n∗e−rk+Koii∗e−doi_zk−dsafe_heading,ϕovertaking=∑k=1NpKgm∗erk+n∗e−rk+Koii∗e−doik−dsafe_overtaking,ϕcrossing=∑k=1NpKgm∗erk+n∗e−rk+Koii∗e−doik−dsafe_crossing.where Kg and Koi are the adjusting parameters; m, n, and i are parameters with values of 0 or 1; doi_zk represents the distance between the ASV and the obstacle ship in the sway direction of the ship in the Earth-fixed frame at sampling time k; dsafe_heading, dsafe_overtaking, and dsafe_crossing, respectively, represent the safe distance that the ASV required to conduct collision avoidance manipulation in the situation of head-on, overtaking, and crossing.In NLP, the constraint of velocity and acceleration in equations (2)-(5) are defined as follows:(15)hu1:Np=umin−u1:Npu1:Np−umax≤0,hr1:Np=rmin−r1:Npr1:Np−rmax≤0,hΔu2:Np=Δu2:Np−Δumax≤0,hΔr2:Np=Δr2:Np−Δrmax≤0.where u1:Np=u1,u2…,uNp and r1:Np=r1,r2…,rNp, respectively, represent the surge speed and yaw rate of the ASV at each NLP step. Δu2:Np=u2−u1,u3−u2,…,uNp−uNp−1 and Δr2:Np=r2−r1,r3−r2,…,rNp−rNp−1, respectively, represent the increment of the surge speed and yaw rate of the ASV at each NLP step.In NLP, the constraint of the waterway’s boundary in equations (6) and (7) is defined as follows:(16)hx1:Np+1=xmin−x1:Np+1x1:Np+1−xmaxymin−y1:Np+1y1:Np+1−ymax≤0,where x1:Np+1=x1,x2…,xNp+1 and y1:Np+1=y1,y2…,yNp+1 represent the position of the ASV at each NLP step.In NLP, the constraints of course in equation (8) are defined as follows:(17)hχχ1:Np+1=χ1:Np+1−2∗pi9≤0,where χ1:Np+1=χ1,χ2…,χNp+1 represents the course of the ASV at the time related to each NLP step.As shown in Figure8, the position of the ASV is A, and the position of the obstacle is B in the Earth-fixed frame at time t. The intersection point of the AB connection and the safety zone of the ASV is C. The intersection point of the AB connection and the safety zone of the obstacle is D. The distance of AC is Rowt, and the distance of BD is Robst. When it is a static obstacle, Robst is a constant value. In order to ensure that the ASV effectively avoids obstacles during navigating, it must be guaranteed that, at time t, the Euclidean distance between the ASV and the obstacle is greater than or equal to the sum of AC and BD, that is, Lt≥Rowt+Robst.Figure 8
The obstacle avoidance principle of ASVs.In NLP, in order to ensure that the ASV effectively avoids static obstacles, for a set ofS static obstacles os=os1,os2,…,osS, the inequality constraint is as follows:(18)hsiLsit1:Np+1=Rsi+Rowt1−Powt1−Psi2Rsi+Rowt2−Powt2−Psi2⋮Rsi+RowtNp+1−PowtNp+1−Psi2≤0,where Rsi represents the radius of the safety zone of the static obstacle i; Powt1:Np+1 is the position vector of the ASV at the sampling time t1:Np+1; and Psi is the position vector of the static obstacle i.Similarly, in order to ensure that the ASV effectively avoids dynamic obstacles, for a set ofM dynamic obstacle om=om1t,om2t,…,omMt, the inequality constraint is as follows:(19)hLmit1:Np+1=Rmit1+Rowt1−Powt1−Pmit12Rmit2+Rowt2−Powt2−Pmit22⋮RmitNp+RowtNp+1−PowtNp+1−PmitNp+12≤0,where Rmit1:Np+1 is the value of the safety zone of the dynamic obstacles at the sampling time of t1:Np+1; Pmit1:Np+1 is the vector of the position of the dynamic obstacle i at the sampling time of t1:Np+1.


## 4. Simulation Results and Discussion

In this section, in order to verify the performance of the proposed collision avoidance algorithm, we give the simulation results under five different situations: 1. standard ellipse domain and dynamic bumper domain; 2. head-on; 3. overtaking; 4. crossing; and 5. collision avoidance against static and dynamic obstacles.


### 4.1. Simulation Setup

In the simulation, we assumed that the ASV navigates in the congested waters of the Zhenjiang section of the Yangtze River, and the specific information of the obstacle ship can be known through AIS. The simulation conditions are CPU of 1.6 GHz Intel Core i5, the operating system of Window10, MATLAB R2020a, and IPOPT solver based on CASADI architecture [34]. According to the requirements of Rule 9 of “RPRCIRCA,” we select the sampling time T as 0.1s and the step size N as 20 to ensure that the prediction range of the collision avoidance algorithm is significantly larger than the response time of the speed and yaw. According to the requirements of Rule 10 of “RSRSJSYR,” the maximum surge speed of the ASV is set to 7.8 m/s, the minimum surge speed is set to 0 m/s in the case of crossing, and 2 m/s in other encounter scenarios. The same tuning parameters are used in all simulations, and the relevant parameters of the collision avoidance algorithm are given in Table 2.Table 2
Parameters of the improved collision avoidance algorithm based on MPC.
ParameterValueParameterValueL5 mdclose_crossing30 mN20dsafe_heading20 mT0.1 sdsafe_overing30 mυc[0.3, 0.1] m/sdsafe_crossing30 mKp0.15χmax(2π/9) radKu0.7uref4 m/sKr0.2rref0 rad/sKg14umin,umax[2, 7.8] m/sKoi0.001rmin,rmax[−π/30, π/30] rad/sKu˙500∆umax1 m/s2Kr˙500∆rmax(π/30) rad/s2dclose_heading60 mxmin,xmax[0, 160] mdclose_overtaking30 mymin,ymax[0, 120] mIn the simulation results, the following symbols and colors are adopted:(1)
The purple dotted line represents the given path of the ASV; the red solid line represents the navigation path of the ASV; and the light blue solid line represents the navigation path of the obstacle ship.(2)
The golden yellow dynamic area represents the dynamic bumper domain of the ASV and obstacle ship, the dynamic green area represents the standard ellipse domain, and the blue-filled circle represents the static obstacle.(3)
The yellow ship represents the ASV, and the blue ship represents the obstacle ship.


### 4.2. Simulation 1: Standard Elliptic Domain and Dynamic Bumper Domain

In this simulation, we use the standard elliptic domain and the dynamic bumper domain to model the safety zone of the obstacle ship, respectively. Without considering the constraints of the rules and the safe distance for avoidance, the ASV only completes the collision avoidance of obstacle ships through the limitations of (28). Collision avoidance using standard elliptical domains is shown in Figure9. Figure 10 shows collision avoidance using the dynamic bumper domain. Due to the constraint of (28), when the ASV avoids the obstacle ship, it will prevent the intersection of its safety zone and the safety zone of the obstacle ship. However, it can be seen from Figure 9 that the safety zone of the ASV and the safety zone of the obstacle ship have an intersection, which is caused by the difficulty of the algorithm to calculate the precise distance between the two safety zones in (28). Therefore, we will solve this problem by adding the constraints of the rules and the safe distance of avoidance in simulations 2–5. It can be seen from Figure 10 : (1) that compared with the standard elliptic domain, the dynamic bumper domain makes the ASV consider a smaller avoidance distance when avoiding the second half of the obstacle ship safety zone, which is more in line with the movement of the ship characteristic. (2) Compared with only using the dynamic bumper safety zone for the obstacle ship, the dynamic bumper safety zone is also used for the ASV. The ASV has a sufficient avoidance distance when avoiding the obstacle, which further ensures the safety of the ASV when avoiding. Therefore, in simulations 2–5, we use the dynamic bumper safety zone for the ASV and obstacle ship. Figure 11 shows the speed change of the ASV when avoiding collision with the obstacle ship using the dynamic bumper domain. It can be seen from Figure 11 that the ASV adopts the evasive maneuver of shifting and steering, and because the distance between the ASV and the obstacle ship is too close for the algorithm to calculate a suitable path through (28) during this period, the ASV has a speed oscillation between 10 and 15 s.Figure 9
Collision avoidance using the standard elliptic domains.Figure 10
Collision avoidance using the dynamic bumper domain.Figure 11
The surge speed and the yaw rate of the ASV during the collision avoidance using the dynamic bumper domain.


### 4.3. Simulation 2: Head-On

In this simulation, we take the relative distance between the ASV and the obstacle ship in the sway direction as the evaluation object ofdsafe_heading in equation (18) so that even if the relative position between the ASV and the obstacle ship rapidly changes, it can be ensured that the ASV has enough reaction time to effectively avoid the obstacle ship. Figure 12 shows the simulation of the head-on encounter. As shown in Figure 12(a), in the beginning, the obstacle ship directly approached at a constant speed in front of the ASV, and the ASV usually traveled along the given path. As shown in Figure 12(b), when encountering an obstacle ship, the ASV conducted the manipulation of steering to the right and appropriately decelerating to pass the port side of the obstacle ship. The avoidance manipulation met the requirements of Rule 10 of “RPRCIRCA.” As shown in Figures 12(c) and 12(d), after passing the handicap with the obstacle ship, the ASV manipulated steering to the left and resumed the given path to continue to navigate. Figure 13 displays the changes in the surge speed and the yaw rate of the ASV in the head-on encounter.Figure 12
Simulation 2: head-on.
(a)(b)(c)(d)Figure 13
The surge speed and the yaw rate of the ASV during simulation 2.


### 4.4. Simulation 3: Overtaking

In this simulation, we assume that the ASV is the overtaking ship and the obstacle ship is overtaken. The Euclidean distance between the ASV and the obstacle ship is selected to evaluate thedsafe_overtaking in equation (19). Figure 14 shows the simulation of the ASV overtaking the obstacle ship. As shown in Figure 14(a), in the beginning, the ASV navigated behind the obstacle ship at the surge speed faster than the obstacle ship along the given path. As shown in Figure 14(b), when starting to overtake the obstacle ship, the ASV first conducted manipulation of appropriately decelerating and steering to the left, and then gradually accelerated to complete the overtaking from the port side of the obstacle ship. The avoidance manipulation met the requirements of Rule 12 of the “RSRSJSYR.” As shown in Figures 14(c) and 14(d), after passing the obstacle ship, the ASV performed manipulation of steering to the right and accelerating to resume to the given path and continuing to navigate. It can be seen from Figure 14 that, during the overtaking process, the size of the ASV safety zone changed with the ship’s velocity, which meets the requirements of algorithm design. Figure 15 shows the change in the surge speed and yaw rate of the ASV during the overtaking process.Figure 14
Simulation 3: overtaking.
(a)(b)(c)(d)Figure 15
The surge speed and the yaw rate of the ASV during simulation 3.


### 4.5. Simulation 4: Crossing

In this simulation, we assume that the ASV is a crossing ship, and the obstacle ship is normally navigating on the navigation lane. The Euclidean distance between the ASV and the obstacle ship is selected as the evaluation ofdsafe_crossing in (20). Figure 16 shows the simulation of the ASV crossing the obstacle ship. As shown in Figure 16(a), in the beginning, the obstacle ship approached at a constant surge speed on the left and front of the ASV. As shown in Figure 16(b), when starting to cross the obstacle ship, the ASV first conducted the manipulation of steering to the left and appropriately decelerating, and then gradually accelerated and passed from the stern direction of the obstacle ship. As shown in Figures 16(c) and 16(d), after passing the obstacle ship, the ASV performed manipulation of steering to the right and accelerating to resume to the given path and continuing to navigate. It can be seen from Figure 16 that the avoidance manipulation during the entire crossing process met the requirements of Rule 20 and Rule 28 of “RSRSJSYR.” Furthermore, no matter where the ASV crossed from the obstacle ship, the collision avoidance algorithm can plan a path that meets the requirements of the rules. Figure 17 displays the change in the surge speed and yaw rate of the ASV during the crossing process.Figure 16
Simulation 4: crossing.
(a)(b)(c)(d)Figure 17
The surge speed and the yaw rate of the ASV during simulation 4.


### 4.6. Simulation 5: Collision Avoidance of Static and Dynamic Obstacles

In order to fully verify the effectiveness of the proposed algorithm, in this simulation we let ASV avoid collisions for three different encounter situations at the same time. In addition, ASVs need to avoid static obstacles such as river-crossing bridges and buoys when navigating in congested inland waters. In the simulation, such static obstacles were simplified into circular areas with a fixed size, the radius of which varied with the size of the obstacles. Figure18 shows the simulation of the ASV avoiding collisions with static and dynamic obstacles. As shown in Figure 18(a), in the beginning, the ASV follows the reference path from left to right, and the three obstacle ships decelerate along the fixed course, respectively. As shown in Figures 18(b) and 18(c), when the encounter situation with the first obstacle ship (blue) was formed, the ASV first took the evasive maneuver of turning to the right and decelerating. After the first obstacle ship passed the yield, the ASV turned to the left and resumed navigating on the reference path. The entire avoidance process complied with the requirements of Rule 10 of the “RPCIRCA.” As shown in Figures 18(d) and 18(e), when the overtaking encounter situation with the second dynamic obstacle ship (purple) was formed, the ASV took a left turn and accelerated maneuver, and overtaking from the left side of the obstacle ship. After overtaking, when passing the obstacle ship, the ASV took a right-hand turn to return to the reference path and continue to navigate. The entire overtaking process complied with the requirements of Rule 12 of the “RSRSJSYR.” As shown in Figures 18(f) and 18(g), when the crossing situation was formed with the third obstacle ship (green), the ASV took a right turn and slowed down and passed the stern of the obstacle ship. After giving way, the ASV took the maneuver of turning left and accelerating to resume navigating on the reference path. The entire evasion process complied with the requirements of Rule 20 and Rule 28 of the “RSRSJSYR.” As shown in Figures 18(h)–18(j), when the ASV normally follows the reference path, there is a static obstacle in front of the ASV, and the ASV immediately turns to the right and decelerates to avoid the static obstacle. After passing the static obstacle, the ASV took a left turn and resumed navigating on the reference path. Figure 19 shows the change in the surge speed and yaw rate of the ASV during the collision avoidance process.Figure 18
Simulation 5: collision avoidance of static and dynamic obstacles.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)Figure 19
The surge speed and the yaw rate of the ASV during simulation 5.


### 4.7. Simulation Summary

The proposed algorithm solved all conditions of the encounter while complying with Rules 9–11 ofRPRCIRCA and Rules 10, 12, 20, and 28 of RSRSJSYR. From the process of the ASV avoiding obstacles in simulations 2–5, it can be seen that the ASV has sufficient collision avoidance space to avoid obstacles, and there will be no intersection of the safety zone, as shown in Figure 9.It can be seen from the speed curve of the ASV in simulations 2–5 that there are some deviations in the speed of the ASV when avoiding collision. Still, the proposed algorithm can effectively compensate for the influence of the current. After adding the avoidance safety distance, the ASV has enough reaction time to avoid the obstacle ship, and the speed of the ASV will not oscillate, as shown in Figure11 during the collision avoidance process.The average computation times of the proposed algorithm are 0.0181s in simulation 2, 0.0172s in simulation 3, 0.0192s in simulation 4, and 0.0235s in simulation 5. It can be seen that in all interactive scenarios, the average calculation time of the algorithm is less than 0.025s, which meets the real-time requirements.


## 4.1. Simulation Setup

In the simulation, we assumed that the ASV navigates in the congested waters of the Zhenjiang section of the Yangtze River, and the specific information of the obstacle ship can be known through AIS. The simulation conditions are CPU of 1.6 GHz Intel Core i5, the operating system of Window10, MATLAB R2020a, and IPOPT solver based on CASADI architecture [34]. According to the requirements of Rule 9 of “RPRCIRCA,” we select the sampling time T as 0.1s and the step size N as 20 to ensure that the prediction range of the collision avoidance algorithm is significantly larger than the response time of the speed and yaw. According to the requirements of Rule 10 of “RSRSJSYR,” the maximum surge speed of the ASV is set to 7.8 m/s, the minimum surge speed is set to 0 m/s in the case of crossing, and 2 m/s in other encounter scenarios. The same tuning parameters are used in all simulations, and the relevant parameters of the collision avoidance algorithm are given in Table 2.Table 2
Parameters of the improved collision avoidance algorithm based on MPC.
ParameterValueParameterValueL5 mdclose_crossing30 mN20dsafe_heading20 mT0.1 sdsafe_overing30 mυc[0.3, 0.1] m/sdsafe_crossing30 mKp0.15χmax(2π/9) radKu0.7uref4 m/sKr0.2rref0 rad/sKg14umin,umax[2, 7.8] m/sKoi0.001rmin,rmax[−π/30, π/30] rad/sKu˙500∆umax1 m/s2Kr˙500∆rmax(π/30) rad/s2dclose_heading60 mxmin,xmax[0, 160] mdclose_overtaking30 mymin,ymax[0, 120] mIn the simulation results, the following symbols and colors are adopted:(1)
The purple dotted line represents the given path of the ASV; the red solid line represents the navigation path of the ASV; and the light blue solid line represents the navigation path of the obstacle ship.(2)
The golden yellow dynamic area represents the dynamic bumper domain of the ASV and obstacle ship, the dynamic green area represents the standard ellipse domain, and the blue-filled circle represents the static obstacle.(3)
The yellow ship represents the ASV, and the blue ship represents the obstacle ship.


## 4.2. Simulation 1: Standard Elliptic Domain and Dynamic Bumper Domain

In this simulation, we use the standard elliptic domain and the dynamic bumper domain to model the safety zone of the obstacle ship, respectively. Without considering the constraints of the rules and the safe distance for avoidance, the ASV only completes the collision avoidance of obstacle ships through the limitations of (28). Collision avoidance using standard elliptical domains is shown in Figure9. Figure 10 shows collision avoidance using the dynamic bumper domain. Due to the constraint of (28), when the ASV avoids the obstacle ship, it will prevent the intersection of its safety zone and the safety zone of the obstacle ship. However, it can be seen from Figure 9 that the safety zone of the ASV and the safety zone of the obstacle ship have an intersection, which is caused by the difficulty of the algorithm to calculate the precise distance between the two safety zones in (28). Therefore, we will solve this problem by adding the constraints of the rules and the safe distance of avoidance in simulations 2–5. It can be seen from Figure 10 : (1) that compared with the standard elliptic domain, the dynamic bumper domain makes the ASV consider a smaller avoidance distance when avoiding the second half of the obstacle ship safety zone, which is more in line with the movement of the ship characteristic. (2) Compared with only using the dynamic bumper safety zone for the obstacle ship, the dynamic bumper safety zone is also used for the ASV. The ASV has a sufficient avoidance distance when avoiding the obstacle, which further ensures the safety of the ASV when avoiding. Therefore, in simulations 2–5, we use the dynamic bumper safety zone for the ASV and obstacle ship. Figure 11 shows the speed change of the ASV when avoiding collision with the obstacle ship using the dynamic bumper domain. It can be seen from Figure 11 that the ASV adopts the evasive maneuver of shifting and steering, and because the distance between the ASV and the obstacle ship is too close for the algorithm to calculate a suitable path through (28) during this period, the ASV has a speed oscillation between 10 and 15 s.Figure 9
Collision avoidance using the standard elliptic domains.Figure 10
Collision avoidance using the dynamic bumper domain.Figure 11
The surge speed and the yaw rate of the ASV during the collision avoidance using the dynamic bumper domain.


## 4.3. Simulation 2: Head-On

In this simulation, we take the relative distance between the ASV and the obstacle ship in the sway direction as the evaluation object ofdsafe_heading in equation (18) so that even if the relative position between the ASV and the obstacle ship rapidly changes, it can be ensured that the ASV has enough reaction time to effectively avoid the obstacle ship. Figure 12 shows the simulation of the head-on encounter. As shown in Figure 12(a), in the beginning, the obstacle ship directly approached at a constant speed in front of the ASV, and the ASV usually traveled along the given path. As shown in Figure 12(b), when encountering an obstacle ship, the ASV conducted the manipulation of steering to the right and appropriately decelerating to pass the port side of the obstacle ship. The avoidance manipulation met the requirements of Rule 10 of “RPRCIRCA.” As shown in Figures 12(c) and 12(d), after passing the handicap with the obstacle ship, the ASV manipulated steering to the left and resumed the given path to continue to navigate. Figure 13 displays the changes in the surge speed and the yaw rate of the ASV in the head-on encounter.Figure 12
Simulation 2: head-on.
(a)(b)(c)(d)Figure 13
The surge speed and the yaw rate of the ASV during simulation 2.


## 4.4. Simulation 3: Overtaking

In this simulation, we assume that the ASV is the overtaking ship and the obstacle ship is overtaken. The Euclidean distance between the ASV and the obstacle ship is selected to evaluate thedsafe_overtaking in equation (19). Figure 14 shows the simulation of the ASV overtaking the obstacle ship. As shown in Figure 14(a), in the beginning, the ASV navigated behind the obstacle ship at the surge speed faster than the obstacle ship along the given path. As shown in Figure 14(b), when starting to overtake the obstacle ship, the ASV first conducted manipulation of appropriately decelerating and steering to the left, and then gradually accelerated to complete the overtaking from the port side of the obstacle ship. The avoidance manipulation met the requirements of Rule 12 of the “RSRSJSYR.” As shown in Figures 14(c) and 14(d), after passing the obstacle ship, the ASV performed manipulation of steering to the right and accelerating to resume to the given path and continuing to navigate. It can be seen from Figure 14 that, during the overtaking process, the size of the ASV safety zone changed with the ship’s velocity, which meets the requirements of algorithm design. Figure 15 shows the change in the surge speed and yaw rate of the ASV during the overtaking process.Figure 14
Simulation 3: overtaking.
(a)(b)(c)(d)Figure 15
The surge speed and the yaw rate of the ASV during simulation 3.


## 4.5. Simulation 4: Crossing

In this simulation, we assume that the ASV is a crossing ship, and the obstacle ship is normally navigating on the navigation lane. The Euclidean distance between the ASV and the obstacle ship is selected as the evaluation ofdsafe_crossing in (20). Figure 16 shows the simulation of the ASV crossing the obstacle ship. As shown in Figure 16(a), in the beginning, the obstacle ship approached at a constant surge speed on the left and front of the ASV. As shown in Figure 16(b), when starting to cross the obstacle ship, the ASV first conducted the manipulation of steering to the left and appropriately decelerating, and then gradually accelerated and passed from the stern direction of the obstacle ship. As shown in Figures 16(c) and 16(d), after passing the obstacle ship, the ASV performed manipulation of steering to the right and accelerating to resume to the given path and continuing to navigate. It can be seen from Figure 16 that the avoidance manipulation during the entire crossing process met the requirements of Rule 20 and Rule 28 of “RSRSJSYR.” Furthermore, no matter where the ASV crossed from the obstacle ship, the collision avoidance algorithm can plan a path that meets the requirements of the rules. Figure 17 displays the change in the surge speed and yaw rate of the ASV during the crossing process.Figure 16
Simulation 4: crossing.
(a)(b)(c)(d)Figure 17
The surge speed and the yaw rate of the ASV during simulation 4.


## 4.6. Simulation 5: Collision Avoidance of Static and Dynamic Obstacles

In order to fully verify the effectiveness of the proposed algorithm, in this simulation we let ASV avoid collisions for three different encounter situations at the same time. In addition, ASVs need to avoid static obstacles such as river-crossing bridges and buoys when navigating in congested inland waters. In the simulation, such static obstacles were simplified into circular areas with a fixed size, the radius of which varied with the size of the obstacles. Figure18 shows the simulation of the ASV avoiding collisions with static and dynamic obstacles. As shown in Figure 18(a), in the beginning, the ASV follows the reference path from left to right, and the three obstacle ships decelerate along the fixed course, respectively. As shown in Figures 18(b) and 18(c), when the encounter situation with the first obstacle ship (blue) was formed, the ASV first took the evasive maneuver of turning to the right and decelerating. After the first obstacle ship passed the yield, the ASV turned to the left and resumed navigating on the reference path. The entire avoidance process complied with the requirements of Rule 10 of the “RPCIRCA.” As shown in Figures 18(d) and 18(e), when the overtaking encounter situation with the second dynamic obstacle ship (purple) was formed, the ASV took a left turn and accelerated maneuver, and overtaking from the left side of the obstacle ship. After overtaking, when passing the obstacle ship, the ASV took a right-hand turn to return to the reference path and continue to navigate. The entire overtaking process complied with the requirements of Rule 12 of the “RSRSJSYR.” As shown in Figures 18(f) and 18(g), when the crossing situation was formed with the third obstacle ship (green), the ASV took a right turn and slowed down and passed the stern of the obstacle ship. After giving way, the ASV took the maneuver of turning left and accelerating to resume navigating on the reference path. The entire evasion process complied with the requirements of Rule 20 and Rule 28 of the “RSRSJSYR.” As shown in Figures 18(h)–18(j), when the ASV normally follows the reference path, there is a static obstacle in front of the ASV, and the ASV immediately turns to the right and decelerates to avoid the static obstacle. After passing the static obstacle, the ASV took a left turn and resumed navigating on the reference path. Figure 19 shows the change in the surge speed and yaw rate of the ASV during the collision avoidance process.Figure 18
Simulation 5: collision avoidance of static and dynamic obstacles.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)Figure 19
The surge speed and the yaw rate of the ASV during simulation 5.


## 4.7. Simulation Summary

The proposed algorithm solved all conditions of the encounter while complying with Rules 9–11 ofRPRCIRCA and Rules 10, 12, 20, and 28 of RSRSJSYR. From the process of the ASV avoiding obstacles in simulations 2–5, it can be seen that the ASV has sufficient collision avoidance space to avoid obstacles, and there will be no intersection of the safety zone, as shown in Figure 9.It can be seen from the speed curve of the ASV in simulations 2–5 that there are some deviations in the speed of the ASV when avoiding collision. Still, the proposed algorithm can effectively compensate for the influence of the current. After adding the avoidance safety distance, the ASV has enough reaction time to avoid the obstacle ship, and the speed of the ASV will not oscillate, as shown in Figure11 during the collision avoidance process.The average computation times of the proposed algorithm are 0.0181s in simulation 2, 0.0172s in simulation 3, 0.0192s in simulation 4, and 0.0235s in simulation 5. It can be seen that in all interactive scenarios, the average calculation time of the algorithm is less than 0.025s, which meets the real-time requirements.


## 5. Conclusions

In this study, an improved collision avoidance algorithm based on model predictive control is proposed to solve the autonomous collision avoidance of ASVs in congested inland waters. The proposed algorithm can comprehensively consider the influence of constraints such as actuators and waterway’s boundary and can compensate for current disturbances in real time, which has good robustness. The algorithm adopts the dynamic bumper domain to model the safety zone of the ASV and the obstacle ship. It adopts the maneuvering strategy of reducing the speed and slightly changing the yaw in collision avoidance, which meets the requirements of ASVs in congested inland waters. In the simulation scenarios of head-on, overtaking, crossing, and avoiding collisions against static and dynamic obstacles simultaneously, the proposed algorithm can avoid all collisions, while complying with the rules ofRPRCIRCA and RSRSJSYR. In the future, we will realize the hybrid collision avoidance of ASVs by combining the proposed algorithm with the algorithm of global path planning and comprehensively verifying the algorithm’s performance through actual ship experiments.



---

*Source: 7584489-2022-04-30.xml*