*Article* **An Efficient Ship Automatic Collision Avoidance Method Based on Modified Artificial Potential Field**

**Zhongxian Zhu <sup>1</sup> , Hongguang Lyu <sup>2</sup> , Jundong Zhang 1,\* and Yong Yin <sup>2</sup>**

	- bushyin@dlmu.edu.cn (Y.Y.)

**Abstract:** A novel collision avoidance (CA) algorithm was proposed based on the modified artificial potential field (APF) method, to construct a practical ship automatic CA system. Considering the constraints of both the International Regulations for Preventing Collisions at Sea (COLREGS) and the motion characteristics of the ship, the multi-ship CA algorithm was realized by modifying the repulsive force model in the APF method. Furthermore, the distance from the closest point of approach-time to the closest point of approach (DCPA-TCPA) criterion was selected as the unique adjustable parameter from the perspective of navigation practice. Collaborative CA experiments were designed and conducted to validate the proposed algorithm. The results of the experiments revealed that the actual DCPA and TCPA agree well with the parameter setup that keeps the ship at a safe distance from other ships in complex encountering situations. Consequently, the algorithm proposed in this study can achieve efficient automatic CA with minimal parameter settings. Moreover, the navigators can easily accept and comprehend the adjustable parameters, enabling the algorithm to satisfy the demand of the engineering applications.

**Keywords:** artificial potential field; collision avoidance; maritime autonomous surface ships; path planning

## **1. Introduction**

The automatic collision avoidance (CA) of maritime autonomous surface ships (MASS) is highly complex and uncertain. When considering the motion of the ship, the International Regulations for Preventing Collisions at Sea (COLREGS), and the restricted water areas, the automatic CA and path planning of ship are important challenges [1,2].

In recent years, a series of artificial potential field (APF)-based CA approaches for MASS have been proposed [3]. The APF-based approach established a virtual potential field near the navigating area of MASS. The attraction between MASS and the goal, repulsions between MASS and obstacles, and repulsions between MASS and other ships were comprehensively studied. The sum of these potential fields determines the resultant virtual force to guide the motion of the MASS [2]. Because the APF controller is easy to construct, intuitive, effective for handling static and dynamic constraints [4], and can obtain an ideal effect on the CA and obstacle avoidance of MASS, the APF-based approach has been widely applied to the intelligent ship CA system in open and restricted waters.

Despite its extensive applications in robot path planning and unmanned aerial vehicle CA, the APF-based approach is faced with major technological problems, owing to the complicated CA conditions of MASS [2,3]. Presently, the research priorities of the APFbased CA approach are optimization of the traditional APF method, solving local minima problems [4–6] and the goals non-reachable with obstacles nearby (GNRON), cooperative CA, and obstacle avoidance, through modeling of the environment potential field [7–12], and solving the CA problems based on COLREGS [6,12–14].

**Citation:** Zhu, Z.; Lyu, H.; Zhang, J.; Yin, Y. An Efficient Ship Automatic Collision Avoidance Method Based on Modified Artificial Potential Field. *J. Mar. Sci. Eng.* **2022**, *10*, 3. https://doi.org/10.3390/ jmse10010003

Academic Editors: Haitong Xu, Lúcia Moreira, Carlos Guedes Soares and Kostas Belibassakis

Received: 5 November 2021 Accepted: 16 December 2021 Published: 21 December 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

Li [15] and Cheng-Bo [16] proposed a path planning method with CA function, based on deep reinforcement learning and APF, in which the APF method was utilized to improve the action space and reward function of the deep Q-learning network algorithm. Fan [17] presented an improved APF method to solve the inherent shortcomings of local minima, the inaccessibility of the target, and the GNRON problem. Sang [18] proposed a hybrid path planning algorithm based on improved A\* and APF for unmanned surface vehicle formations.

Lyu systematically studied the intelligent multi-ship CA algorithm using an improved APF method, and considered the rules of COLREGS, maneuverability of the ship, and uncoordinated CA actions for the target ships (TS). Lyu overcame numerous drawbacks of the traditional APF methods (such as local minima and the GNRON problems), and performed a series of tests in open and restricted waters, including dynamic TSs and complex static obstacles [13,14].

To trigger the autonomous system, the CA parameters are introduced to determine whether and when to take evasive action [19]. Many risk indicators are introduced into the CA system, such as relative distance [20], relative bearing [21], ratio of speed [22], and ship domain [23]. Some researchers are aware that the risk measurement needs to consider different scenarios [24], such as the nature environment conditions, wave conditions, visibility, day/night, navigation areas, etc., and different encounter types. Because DCPA–TCPA is the most popular method to measure the risk of collision in practice, some researchers utilize DCPA–TCPA as a risk indicator.

Lyu introduced a series of CA parameters into the repulsive force calculation, such as the prohibited zone (using a small adjustable parameter, *τ*, to express a circular area), radius of the ship domain (*d<sup>m</sup>* = *Ros* + *dsafe* + *Rts*, where *Ros* and *Rts* denote the expanded radius to the domain radius of one's own ship (OS) and TS, and *dsafe* is the shortest allowable safe distance), and the influence range of TS (*ρo*). These parameters should be defined by the navigators, according to the navigation area (open or restricted water), dimension and motion of OS, dimension and motion of TS, and visibility. Some CA parameters have no real meaning, and dynamic adjustment of the parameters is extremely difficult. In the applications of the ship, as the CA results have no direct relationship to the CA parameters, the work of Lyu is incomprehensible and unacceptable for navigators.

In various CA algorithms and navigation practices, DCPA–TCPA is the basic criterion for the "risk of collision" and is also the most important CA parameter [2,25]. The ship usually takes CA action when there is an existing "risk of collision" with other ships. In the MAXCMAS (machine executable collision regulations for marine autonomous system) of the Rolls Royce project, the desired DCPA was maintained with all the vessels in the vicinity, and the DCPA–TCPA criterion was set as 2.0 nm and 12.0 min, respectively [26]. This study investigates the multi-ship CA algorithm under the constraint of COLREGS and the motion of the ship by modifying the repulsive force model in the APF method and considering the DCPA–TCPA criterion as the unique adjustable parameter from the perspective of navigation practices. Thereafter, a series of tests were performed to verify the effectiveness and reliability of the proposed approach, as well as the consistency between the CA parameters and the results.

#### **2. Collision Avoidance Based on Modified Artificial Potential Field**

The CA for MASS is a complex system that is constrained by COLREGS, and should cope with the static and dynamic environment in real time. According to the work of Lyu [12,14], we employed the path-guided hybrid artificial potential field method to realize the CA algorithm of a MASS and establish a 6-DOF mathematical model to describe its motion in CA.

### *2.1. Modeling of Motions of MASS*

When planning collision avoidance, the ships maneuverability and hydrometeorological conditions must be taken into account [27]. To describe the motion of MASS in CA, earth- and body-fixed coordinate systems were constructed, as shown in Figure 1. The vector *η* = [*x*, *y*, *z*, *φ*, *θ*, *ψ*] T represents the position and attitude of a MASS in the earth-fixed system, whereas vector *ν* = [*u*, *v*, *w*, *p*, *q*,*r*] T denotes the speed and rotation speed in the body-fixed system. The 6-DOF mathematical model of a MASS [28,29] can be expressed as follows:

$$\begin{cases} \begin{aligned} &(m+m\_{\mathrm{X}})\dot{u} - (m+m\_{\mathrm{Y}})\varpi r + (m+m\_{\mathrm{z}})\varpi q = \mathrm{X}\_{H} + \mathrm{X}\_{G} + \mathrm{X}\_{P} + \mathrm{X}\_{R} + \mathrm{X}\_{\mathrm{Env}} \\ &(m+m\_{\mathrm{y}})\dot{v} + (m+m\_{\mathrm{x}})ur - (m+m\_{\mathrm{z}})\varpi p = \mathrm{Y}\_{H} + \mathrm{Y}\_{G} + \mathrm{Y}\_{P} + \mathrm{Y}\_{R} + \mathrm{Y}\_{\mathrm{Env}} \\ &(m+m\_{\mathrm{z}})\dot{w} - (m+m\_{\mathrm{x}})uq + (m+m\_{\mathrm{y}})\varpi p = \mathrm{Z}\_{H} + \mathrm{Z}\_{G} + \mathrm{Z}\_{P} + \mathrm{Z}\_{R} + \mathrm{Z}\_{\mathrm{Env}} \\ &(l\_{\mathrm{xx}} + l\_{\mathrm{xx}})\dot{p} + (l\_{\mathrm{zz}} + l\_{\mathrm{zz}} - l\_{\mathrm{yy}} - l\_{\mathrm{yy}})q + (m\_{\mathrm{z}} - m\_{\mathrm{y}})\varpi w = \mathrm{K}\_{H} + \mathrm{K}\_{G} + \mathrm{K}\_{P} + \mathrm{K}\_{R} + \mathrm{K}\_{\mathrm{Env}} \\ &(l\_{\mathrm{yy}} + l\_{\mathrm{yy}})\dot{q} + (l\_{\mathrm{xx}} + l\_{\mathrm{xx}} - l\_{\mathrm{zz}} - l\_{\mathrm{zz}})pr + (m\_{\mathrm{x}} - m\_{\mathrm{z}})\omega w = \mathrm{M}\_{H} + \mathrm{M}\_{G} + \mathrm{M}\_{P} + \mathrm{M}\_{R} + \mathrm{M}\_{\mathrm{Env}} \\ &(l\_{\mathrm{xz}} + l\_{\mathrm{zz}})\dot{r} + (l\_{\$$

where *m* = *ρs*∇ represents the mass of the ship; *ρ<sup>s</sup>* is the seawater density; ∇ is the displacement; *mx*, *m<sup>y</sup>* and *m<sup>z</sup>* denote the added masses to the ship; *Ixx*, *Iyy*, *Izz*, *Jxx*, *Jyy*, and *Jzz* denote the moment and added moment of inertia; the subscripts "*H*" and "*G*" denote the viscous hydrodynamics and hydrostatic force exerted on the naked hull ship; the subscripts "*P*" and "*R*" denote the forces and moments generated by the propeller and ruder; the subscript "Env" denotes the external disturbance force induced by the wind, waves, and current.

T1*p***os**

θTOL

North

*d*TOLneg-CPA

*p***ts**

*v*ts

T2*p***os**

East

**Figure 1.** Coordinate systems of ship motions. **Figure 1.** Coordinate systems of ship motions.

θ

*Frd*

**Figure 2.** Modified repulsive forces for a dynamic TS.

*Frd1*

*Frd1***+***Frd2*

*p***os**

*Frd2*

*v***os** *v***ts**

*v***os**

*J. Mar. Sci. Eng.* **2021**, *9*, x. https://doi.org/10.3390/xxxxx www.mdpi.com/journal/jmse

### *2.2. Modified APF Model*

The attractive *F*att and repulsive force *F*rep were established by referring to the work of Lyu [12,14]. As the DCPA–TCPA is the essential criterion rule for the "risk of collision" in navigation, we modify the negotiation CA repulsive force *F*rd and emergency CA repulsive force *F*re as follows:

$$F\_{\text{att}} = \varepsilon d\_{\text{og}} \mathfrak{n}\_{\text{og}} \tag{2}$$

*F*rep(*p*, *v*) = *F*rd1**+***F*rd2**+***F*rd3, *d*emg < *d* ≤ *d*neg, *θ* < *θ*TOL, 0 ≤ *d*CPA ≤ *d*TOLneg-CPA, 0 ≤ *t*CPA ≤ *t*TOLneg-CPA *F*re1**+***F*re2**+***F*re3, *d* ≤ *d*emg, 0 ≤ dCPA ≤ *d*TOLemg-CPA, 0 ≤ *t*CPA ≤ *t*TOLemg-CPA otherwise (3)

$$\begin{split} F\_{\mathrm{td1}} &= -\eta\_{\mathrm{d}}d\_{\mathrm{g}}^{-2} \\ \left[ \left( \frac{1}{d-\mathrm{d}\_{\mathrm{mg}}} - \frac{1}{\mathrm{d}\_{\mathrm{mg}} - \mathrm{d}\_{\mathrm{mg}}} \right) e^{\theta\_{\mathrm{d}} - \theta} \left( \frac{d\mathrm{TOL}\_{\mathrm{mg}\mathrm{G}\mathrm{TA}}}{d\sqrt{d^{2} - \mathrm{d}\_{\mathrm{mg}}}^{2}} + \frac{\sin\theta}{\|\mathrm{u}\|} \right) + \frac{\epsilon^{\theta\mathrm{cof}\mathrm{d}\_{\mathrm{g}} - \mathrm{d}} - 1}{(d-\mathrm{d}\_{\mathrm{mg}})^{2}} - \left( \frac{1}{d-\mathrm{d}\_{\mathrm{mg}}} - \frac{1}{\mathrm{d}\_{\mathrm{mg}} - \mathrm{d}\_{\mathrm{mg}}} \right) \left( \frac{d\_{\mathrm{mg}}}{d\sqrt{d^{2} - \mathrm{d}\_{\mathrm{mg}}}^{2}} + \frac{\sin\theta}{\|\mathrm{u}\|} \right) \right] \mathbf{n}\_{\mathrm{dl}} \end{split} \tag{4}$$

$$\begin{split} F\_{\mathrm{off2}} &= \pm \eta\_{d} d\_{\mathcal{S}}^{2} \\ \left[ \left( \frac{1}{d - \mathrm{d}\_{\mathrm{eff}}} - \frac{1}{\mathrm{d}\_{\mathrm{avg}} - \mathrm{d}\_{\mathrm{mag}}} \right) e^{\theta\_{\mathrm{TU}} - \theta} \left( \frac{1}{\|\boldsymbol{\rho}\_{\mathrm{st}}\|} + \frac{\cos \theta}{\|\boldsymbol{\rho}\_{\mathrm{st}}\|} \right) + \frac{\|\boldsymbol{\rho}\_{\mathrm{off}}\| \left( e^{\theta\_{\mathrm{TU}} - \theta} - 1 \right)}{d(d - \mathrm{d}\_{\mathrm{mag}})^{2}} - \left( \frac{1}{d - \mathrm{d}\_{\mathrm{avg}}} - \frac{1}{\mathrm{d}\_{\mathrm{avg}} - \mathrm{d}\_{\mathrm{mag}}} \right) \left( \frac{1}{\|\boldsymbol{\rho}\_{\mathrm{st}}\|} + \frac{\cos \theta\_{\mathrm{TOL}}}{\|\boldsymbol{\rho}\_{\mathrm{st}}\|} \right) \right] \mathbf{n}\_{\mathrm{tt}} \end{split} \tag{5}$$

$$F\_{\rm rd3} = \eta\_d d\_{\mathcal{S}} \left( \frac{1}{d - d\_{\rm emg}} - \frac{1}{d\_{\rm meg} - d\_{\rm emg}} \right) (e^{\theta\_{\rm TOL} - \theta} - 1) \mathfrak{n}\_{\mathcal{O}} \tag{6}$$

$$F\_{\rm re1} = -2\eta\_{\rm e}d\_{\mathcal{g}}^{-2} \left[ \left( \frac{1}{d \cdot d \text{TOL}\_{\text{emg-CPA}}} - \frac{1}{d\_{\text{emg}}} \right) \times \frac{1}{\left( d \cdot d \text{TOL}\_{\text{emg-CPA}} \right)^{2}} + ||\mathbf{v}\_{\rm of}|| \cos \theta \right] \mathfrak{n}\_{\text{ot}} \tag{7}$$

$$F\_{\rm re2} = 2\eta\_{\rm e} \frac{d\_{\rm g}}{d} (||\boldsymbol{\nu}\_{\rm ot}||^2 \cos\theta \sin\theta) \boldsymbol{n}\_{\rm ot} \,\tag{8}$$

$$F\_{\rm re3} = 2\eta\_{\rm e} d\_{\mathcal{g}} \left[ \left( \frac{1}{d \cdot d \text{TOL}\_{\rm emg-CPA}} - \frac{1}{d\_{\rm emg}} \right)^2 + \left\| \boldsymbol{v}\_{\rm ef} \right\|^2 \cos^2 \theta \right] \mathfrak{u}\_{\rm og} \tag{9}$$

where the direction and significance of each force are listed in Table 1 and illustrated in Figure 2. *η*<sup>d</sup> and *η*<sup>e</sup> are the scaling factors for negotiation and emergency CA, respectively, and *ε* is the scaling factor for the attractive force. The OS is driven by the resultant force, moving to the goal and simultaneously keeping a safe distance with the TSs. The term *nog* denotes a unit vector pointing to the goal from the OS. The term *not* denotes a unit vector pointing to TSs, or obstacles from the OS; *d<sup>g</sup>* is the distance between the OS and the goal; *d* is the distance between the OS and TS; *θ*TOL is the angle between any tangent line (*T1pos* or *T2pos*) and the relative position vector *pospts*; *θ* is the angle between the relative position vector *pot*(*pot* = *pts* − *pos*) and the relative speed vector *vot*(*vot* = *vos* − *vts*). The risk of collision occurs when the extension line of *vos* crosses the circle of radius *d*TOLneg-CPA(*θ* < *θ*TOL); otherwise, the OS can pass through the TS with a safe distance.


**Table 1.** Direction and action of the repulsive force potential field. **Table 1.** Direction and action of the repulsive force potential field.

**Figure 2.** Modified repulsive forces for a dynamic TS. **Figure 2.** Modified repulsive forces for a dynamic TS.

The terms emg *<sup>d</sup>* and neg *<sup>d</sup>* represent the range criterion of emergency CA and negotiation CA, *<sup>d</sup>*TOLneg-CPA and TOLneg-CPA *t* denote the distance and time criteria of negotiation CA, and *<sup>d</sup>*TOLemg-CPA and TOLemg-CPA *t* represent the distance and time criteria of emergency CA, respectively. Because all the CA parameters have actual meanings in navigation, as the CA results correspond to the CA parameters, the modification made to the The terms *d*emg and *d*neg represent the range criterion of emergency CA and negotiation CA, *d*TOLneg-CPA and *t*TOLneg-CPA denote the distance and time criteria of negotiation CA, and *d*TOLemg-CPA and *t*TOLemg-CPA represent the distance and time criteria of emergency CA, respectively. Because all the CA parameters have actual meanings in navigation, as the CA results correspond to the CA parameters, the modification made to the repulsion force model can be comprehended and accepted by navigators.

repulsion force model can be comprehended and accepted by navigators. A flow chart of the modified APF model is given in Figure 3. If there are *N* TSs, the total repulsive force can be obtained by adding the repulsive forces generated by each TS. The ship will take corresponding CA action under the resultant *Fsum* , in varying conditions, and will reach the goal. Based on the calculation of attractive and repulsive forces, A flow chart of the modified APF model is given in Figure 3. If there are *N* TSs, the total repulsive force can be obtained by adding the repulsive forces generated by each TS. The ship will take corresponding CA action under the resultant *Fsum*, in varying conditions, and will reach the goal. Based on the calculation of attractive and repulsive forces, the total virtual force exerted on the ship can be obtained as follows:

$$F\_{sum} = F\_{att} + F\_{rep} \tag{10}$$

**Figure 3.** Flow chart of the modified APF method. **Figure 3.** Flow chart of the modified APF method.

#### **3. Tests and Results**

#### *3.1. Range Criterion and Results*

In this section, we use a container ship, "KangHe" (OS), as a smart ship and two target container ships, named "YinHe" (TS1) and "AnGuangJiang" (TS2), to complete the experiment of collaborative CA. The initial conditions and specifications of the ships are summarized in Table 2. As listed in Table 3, we set the range criterion as *d*emg = 1.0 nm and *d*neg = 3.0 nm in test 1, and *d*emg = 3.0 nm and *d*neg = 6.0 nm in test 2.


**Table 2.** Particulars of ships and initial conditions.



As shown in Figures 4 and 5, the DCPA–TCPA criterion was fulfilled at the beginning of test 1, but the range criterion was not fulfilled. The action time of "KangHe" was later and the CA amplitude was smaller than that in test 2. To fulfill the DCPA–TCPA criterion, "KangHe" needs to take a larger course alteration to the TSs, but the final CA results are unsatisfactory in test 1. *J. Mar. Sci. Eng.* **2021**, *9*, 3 of 12

**Figure 4.** OS tracks under different CA range criteria. **Figure 4.** OS tracks under different CA range criteria.

**Figure 5.** Distances under different CA range criteria.

**Figure 6.** OS speed under different CA range criteria.

**Figure 5.** Distances under different CA range criteria. **Figure 5.** Distances under different CA range criteria.

**Figure 4.** OS tracks under different CA range criteria.

*J. Mar. Sci. Eng.* **2021**, *9*, 3 of 12

Figures 6 and 7 show the OS speed and course, and Figures 8 and 9 show the DCPAs and TCPAs during the CA processes. In test 1, "KangHe" navigated according to the route plan during the first 5 min, as the CA criteria were not fulfilled. At 5 min, the CA criteria were satisfied and "KangHe" turned to starboard; at 12 min, "KangHe" passed and cleared both TSs, and started to turn left to return to its route plan; at 17 min, "KangHe" started to head for the destination. In test 2, "KangHe" turned to starboard at the beginning, as the range and DCPA–TCPA criteria were all satisfied. At 13 min, "KangHe" passed and cleared both TSs and started to turn left to return to its route plan, and at 15 min, "KangHe" started to head for the destination. In both tests, the speed of the ship decreased because of frequent operation of the rudder. As listed in Table 4, the maximum course alteration was 125◦ in test 1 and 65◦ in test 2. **Figure 5.** Distances under different CA range criteria.

**Figure 6.** OS speed under different CA range criteria. **Figure 6.** OS speed under different CA range criteria.

*J. Mar. Sci. Eng.* **2021**, *9*, 4 of 12

*J. Mar. Sci. Eng.* **2021**, *9*, 4 of 12

**Figure 7.** OS course under different CA range criteria. **Figure 7.** OS course under different CA range criteria. **Figure 7.** OS course under different CA range criteria. **Figure 7.** OS course under different CA range criteria.

**Figure 8.** DCPAs under different CA range criteria. **Figure 8.** DCPAs under different CA range criteria. **Figure 8.** DCPAs under different CA range criteria. **Figure 8.** DCPAs under different CA range criteria.

**Figure 9.** TCPAs under different CA range criteria. **Figure 9.** TCPAs under different CA range criteria. **Figure 9. Figure 9.** TCPAs under different CA range criteria. TCPAs under different CA range criteria.


**Table 4.** CA results by "KangHe".

According to the criteria in Table 3, "KangHe" should maintain a distance of 2.0 nm from other ships. In test 1, because the action time was later than that in test 2, even though the largest CA actions were applied, "KangHe" passed and cleared TS2 at a distance of 1.63 nm (as listed in Table 4). In test 2, as the range and DCPA–TCPA criterion were appropriate, "KangHe" passed and cleared TS1 and TS2 at distances of 2.4 and 2.0 nm, respectively. Because of the existence of the DCPA–TCPA criterion, the range criterion is an extra filter for the involved ships, but has no substantial effect on the CA actions and CA results. Therefore, this study considers the DCPA–TCPA criterion as a unique adjustable parameter in the CA algorithm.

## *3.2. DCPA–TCPA Criterion and Results*

The emergency CA range criterion was set as *d*emg= 3.0 nm, the negotiation CA range criterion was set as *d*neg= 6.0 nm, and the DCPA–TCPA criterion was set as the unique adjustable parameter (as listed in Table 5), and the CA tests were performed. The tracks of the ship are shown in Figure 10, the speed and course are shown in Figure 11, the DCPAs and TCPAs between OS and TSs are shown in Figures 12 and 13, and the distances between "KangHe" and TSs are shown in Figure 14; some CA results are listed in Table 6.

**Table 5.** Parameters for CA test.


**Figure 10.** OS tracks under different DCPA–TCPA criteria. **Figure 10.** OS tracks under different DCPA–TCPA criteria.

(**a**) (**b**)

**Figure 11.** OS speed and course under different DCPA–TCPA criteria: (**a**) speed, (**b**) course.

**Figure 11.** OS speed and course under different DCPA–TCPA criteria: (**a**) speed, (**b**) course.

**Figure 10.** OS tracks under different DCPA–TCPA criteria.

**Figure 11.** OS speed and course under different DCPA–TCPA criteria: (**a**) speed, (**b**) course.

**Table 6.** CA results by "KangHe".


In test 1, "KangHe" altered the course to starboard at the beginning, as the CA criteria with TS1 were all fulfilled. At 2 min, the CA criteria with TS2 were fulfilled, while TS1 was avoided; at 13 min, "KangHe" passed and cleared TS2, and started to turn left to return to its route plan; at 17 min, it started to head for the destination. The course alteration of "KangHe" was 55◦ , and it passed and cleared TS1 and TS2 at distances of 2.5 nm and 2.0 nm (in accordance with *d*TOLneg-CPA = 2.0 nm), respectively; it headed for the destination at an angle of 312◦ after finishing the CA procedure.

In test 2, "KangHe" navigated in accordance with its route plan, as the CA criteria were not fulfilled at the beginning of the test. At 1.6 min, "KangHe" altered its course to starboard, as the CA criteria with TS1 were all fulfilled; at 2.8 min, the ship passed and cleared TS1, and returned to its route plan; at 4 min, she started the CA action on TS2, as the CA criteria were fulfilled; at 13.0 min, "KangHe" passed and cleared TS2, and started to turn left to return to its route plan; at 17 min, it started to head for the destination. The course alteration of "KangHe" was 15◦ in the CA procedure with TS1 and 60◦ in the CA procedure with TS2. Finally, it passed and cleared TS1 and TS2 at distances of 2.4 nm and 1.5 nm (in accordance with *d*TOLneg-CPA = 1.5 nm), respectively, and headed for the destination at an angle of 314◦ after finishing the CA procedure.

In test 3, "KangHe" navigated in accordance with its route plan, as the DCPA–TCPA criteria were not fulfilled at the beginning. At 4.5 min, "KangHe" altered its course to starboard, as the CA criteria with TS2 were all fulfilled; at 13.5 min, the ship passed and cleared TS2, and returned to its route plan; at 18 min, it started to head for the destination. The course alteration of "KangHe" was 53◦ , and it passed and cleared TS1 and TS2 at distances of 2.2 nm and 1.0 nm (in accordance with *d*TOLneg-CPA = 1.0 nm), respectively, and, thereafter, headed for the destination at an angle of 314◦ after finishing the CA procedure.

$$\mathbf{(a)}$$

(**b**)

**Figure 12.** DCPAs under different DCPA **Figure 12.** DCPAs under different DCPA–TCPA criteria: ( –TCPA criteria: (**a**) test 1, (**b**) test 2, (**c**) test 3. **a**) test 1, (**b**) test 2, (**c**) test 3.

**Figure 13.** TCPAs under different DCPA–TCPA criteria: (**a**) test 1, (**b**) test 2, (**c**) test 3. **Figure 13.** TCPAs under different DCPA–TCPA criteria: (**a**) test 1, (**b**) test 2, (**c**) test 3.

**Figure 14.** Distances under different DCPA **Figure 14.** Distances under different DCPA–TCPA criteria: ( –TCPA criteria: (**a**) test 1, (**b**) test 2, (**c**) test 3. **a**) test 1, (**b**) test 2, (**c**) test 3.

Through the three aforementioned tests, we observe that, for the same CA scene, the different DCPA–TCPA CA parameters have an immediate effect on the involved ships and the CA results. A smaller DCPA–TCPA parameter leads to a later action time and a smaller action amplitude. The ship can take effective action at the right time according to the set DCPA–TCPA criterion, and finally pass the TSs at a desired safe distance, defined by *d*TOLneg-CPA. The CA results are also in accordance with the DCPA–TCPA criterion.

## *3.3. Onboard Tests*

We provided an auxiliary collision avoidance terminal (as illustrated in Figure 15) for a real ship. As shown in Figure 16, the essential input data (OS static and dynamics information, TS static and dynamics information, route plan, and electronic navigation chart (ENC) data) were collected based on the existing sensors (such as the automatic identification system (AIS), global positioning system (GPS), etc.) and electronic chart display information system (ECDIS) of a ship. The auxiliary CA terminal receives the input data and calculates all the virtual forces exerted on the ship, according to the modified APF model in Section 2.2, and finally generates the CA suggestions (advised path, course and/or speed) for the navigators. As shown in Figure 15, the auxiliary CA terminal provides an integrated information display interface for OS, TS, route plan, and ENC data, as well as CA suggestions. At the present stage, whether the CA suggestions are accepted and sent to the actuator of the ship is decided by the duty officer. *J. Mar. Sci. Eng.* **2021**, *9*, 16 of 20

**Figure 15.** The auxiliary collision avoidance terminal. **Figure 15.** The auxiliary collision avoidance terminal.

**Figure 16.** Frame diagram of the auxiliary collision avoidance terminal.

We conducted the onboard test on a 1868TEU container ship from 2 November to 3 November 2021. Figure 17 shows that the algorithm could give a larger course alteration when a larger DCPA–TCPA criterion was set. Figure 18 shows the suggestions in different situations. The algorithm could give a right turn suggestion in most situations, while in an emergency CA situation, the suggestion might be a left turn. Due to the small range criterion in the tests, neg *d* = 1.5 nm, even though the largest CA actions were applied, the ship could not pass and clear the TSs at the desired distance of 1.6 nm. Figure 19 shows the CA suggestions for an approaching ship. Even though the largest CA actions were applied, the action scope of the ship decreased as the other ship approaches. In Figures

TOLneg-CPA *d*

**Figure 18.** CA suggestions for different situations (

emergency CA suggestion for starboard side ship.

= 0.4 nm, (**b**)

TOLneg-CPA *t*

(**a**) (**b**)

(**c**) (**d**)

port side ship; (**b**) negotiation and emergency CA suggestion for port side ships; (**c**) negotiation CA suggestion for port side ship; (**d**)

= 14.0 min,

TOLneg-CPA *d*

= 1.6 nm): (**a**) emergency CA suggestion for

TOLneg-CPA *t*

**Figure 15.** The auxiliary collision avoidance terminal.

**Figure 16.** Frame diagram of the auxiliary collision avoidance terminal. **Figure 16.** Frame diagram of the auxiliary collision avoidance terminal.

We conducted the onboard test on a 1868TEU container ship from 2 November to 3 November 2021. Figure 17 shows that the algorithm could give a larger course alteration when a larger DCPA–TCPA criterion was set. Figure 18 shows the suggestions in different situations. The algorithm could give a right turn suggestion in most situations, while in an emergency CA situation, the suggestion might be a left turn. Due to the small range criterion in the tests, neg *d* = 1.5 nm, even though the largest CA actions were applied, the ship could not pass and clear the TSs at the desired distance of 1.6 nm. Figure 19 shows the CA suggestions for an approaching ship. Even though the largest CA actions were applied, the action scope of the ship decreased as the other ship approaches. In Figures We conducted the onboard test on a 1868TEU container ship from 2 November to 3 November 2021. Figure 17 shows that the algorithm could give a larger course alteration when a larger DCPA–TCPA criterion was set. Figure 18 shows the suggestions in different situations. The algorithm could give a right turn suggestion in most situations, while in an emergency CA situation, the suggestion might be a left turn. Due to the small range criterion in the tests, *d*neg = 1.5 nm, even though the largest CA actions were applied, the ship could not pass and clear the TSs at the desired distance of 1.6 nm. Figure 19 shows the CA suggestions for an approaching ship. Even though the largest CA actions were applied, the action scope of the ship decreased as the other ship approaches. In Figures 17–19, the green marked TS indicates that there is no risk of collision with OS, and the yellow and red marked ship represents that the ship was fulfilled with the negotiation CA DCPA–TCPA criterion and emergency CA DCPA–TCPA criterion, respectively. *J. Mar. Sci. Eng.* **2021**, *9*, 10 of 12

**Figure 17.** CA suggestions under different DCPA–TCPA criteria: (**a**) TOLneg-CPA *t* = 4.0 min, **Figure 17.** CA suggestions under different DCPA–TCPA criteria: (**a**) *t*TOLneg-CPA = 4.0 min, *d*TOLneg-CPA = 0.4 nm, (**b**) *t*TOLneg-CPA = 8.0 min, *d*TOLneg-CPA = 0.9 nm.

= 0.9 nm.

TOLneg-CPA *d*

= 8.0 min,

TOLneg-CPA *d*

= 0.4 nm, (**b**)

**Figure 17.** CA suggestions under different DCPA–TCPA criteria: (**a**)

= 8.0 min,

TOLneg-CPA *t*

**Figure 18.** CA suggestions for different situations ( TOLneg-CPA *t* = 14.0 min, TOLneg-CPA *d* = 1.6 nm): (**a**) emergency CA suggestion for port side ship; (**b**) negotiation and emergency CA suggestion for port side ships; (**c**) negotiation CA suggestion for port side ship; (**d**) emergency CA suggestion for starboard side ship. **Figure 18.** CA suggestions for different situations (*t*TOLneg-CPA = 14.0 min, *d*TOLneg-CPA = 1.6 nm): (**a**) emergency CA suggestion for port side ship; (**b**) negotiation and emergency CA suggestion for port side ships; (**c**) negotiation CA suggestion for port side ship; (**d**) emergency CA suggestion for starboard side ship. *J. Mar. Sci. Eng.* **2021**, *9*, 11 of 12

(**a**) (**b**)

TOLneg-CPA *d*

= 0.9 nm.

TOLneg-CPA *t*

= 4.0 min,

**Figure 19.** CA suggestions for an approaching ship ( TOLneg-CPA *t* = 4.0 min, TOLneg-CPA *d* = 0.4 nm): (**a**) 0.5 nm< *d* < 1.0 nm; (**b**) 0.5 nm **Figure 19.** CA suggestions for an approaching ship (*t*TOLneg-CPA = 4.0 min, *d*TOLneg-CPA = 0.4 nm): (**a**) 0.5 nm < *d* < 1.0 nm; (**b**) 0.5 nm *d* ≤ 1.0 nm; (**c**) *d* < 0.5 nm.

#### **4. Discussion**

fuzzy rules. *J. Mar. Sci. Eng.* **2021**, *9*, 1321, doi:10.3390/jmse9121321.

*Auton. Syst.* **2012**, *60*, 1520–1527, doi:10.1016/j.robot.2012.08.004.

operations. *Neurocomputing* **2018**, *275*, 1550–1566.

*Mech. Sci. Technol. Aerosp. Eng*. **2016**, *35*, 1330–1336.

*J. Navig.* **2019**, *72*, 588–608, doi:10.1017/s0373463318000796.

*d*

≤ 1.0 nm; (**c**)

**References**

*d*

*Ocean Eng.* **2015**, *97*, 126–144.

doi:10.1016/j.oceaneng.2011.10.011.

2017; Volume 2017; pp. 351–357.

6596/1357/1/012026.

*Probl. Eng.* **2020**, *1*, 1–21.

**2019**, *37*, 94–106.

< 0.5 nm.

1. Hongguang, L.; Yong, Y. Path planning of autonomous ship based on electronic chart vector data modeling. *J. Transp. Inf. Saf.* 2. Huang, Y.; Chen, L.; Chen, P.; Negenborn, R.R.; van Gelder, P.H.A.J.M. Ship collision avoidance methods: State-of-the-art. *Saf. Sci.* **2020**, *121*, 451–473, doi:10.1016/j.ssci.2019.09.018. 3. Chiang, H.-T.; Malone, N.; Lesser, K.; Oishi, M.; Tapia, L. Path-guided artificial potential fields with stochastic reachable sets for motion planning in highly dynamic environments. In Proceedings of the 2015 IEEE International Conference on Robotics and Automation (ICRA), Seattle, WA, USA, 2 July 2015; pp. 2347–2354. Constrained by COLREGS and the motion characteristics of the ship, this study established a multi-ship CA algorithm by modifying the repulsive force model and applying the DCPA–TCPA criterion as the unique adjustable parameter from the perspective of navigation practice. Collaborative CA experiments were designed and conducted in both simulated and real-ship environments. The actual DCPA and TCPA agree well with the DCPA–TCPA criterion in a simulated environment, and the CA suggestions and advised path were presented in a real-ship environment.

7. Pêtrès, C.; Romero-Ramirez, M.-A.; Plumet, F. A potential field approach for reactive navigation of autonomous sailboats. *Robot.* 

8. Wang, S.-M.; Fang, M.-C.; Hwang, C.-N. Vertical obstacle avoidance and navigation of autonomous underwater vehicles with

9. Yuanchang, L.; Richard, B. Efficient multi-task allocation and path planning for unmanned surface vehicle in support of ocean

10. Mousazadeh, H.; Jafarbiglu, H.; Abdolmaleki, H.; Omrani, E.; Monhaseri, F.; Abdollahzadeh, M.-R.; Mohammadi-Aghdam, A.; Kiapei, A.; Salmani-Zakaria, Y.; Makhsoos, A. Developing a navigation, guidance and obstacle avoidance algorithm for an Un-

12. Lyu, H.; Yin, Y. COLREGS-constrained real-time path planning for autonomous ships using modified artificial potential fields.

13. Lyu, H.; Yin, Y. Fast path planning for autonomous ships in restricted waters. *Appl. Sci.* **2018**, *8*, 2592, doi:10.3390/app8122592. 14. Lyu, H.; Yin, Y. Ship's trajectory planning for collision avoidance at sea based on modified artificial potential field. In Proceedings of the 2nd International Conference on Robotics and Automation Engineering (ICRAE), Shanghai, China, 29–31 December

15. Li, L.; Wu, D.; Huang, Y.; Yuan, Z.-M. A path planning strategy unified with a COLREGS collision avoidance function based on deep reinforcement learning and artificial potential field. *Appl. Ocean. Res.* **2021**, *113*, 102759, doi:10.1016/j.apor.2021.102759. 16. Cheng-Bo, W.; Xin-Yu, Z.; Jia-Wei, Z.; Zhi-Guo, D.; Lan-Xuan, A. Navigation behavioural decision-making of MASS based on deep reinforcement learning and artificial potential field. *J. Phys. Conf. Ser.* **2019**, *1357*, 012026, doi:10.1088/1742-

17. Fan, X.; Guo, Y.; Liu, H.; Wei, B.; Lyu, W. Improved artificial potential field method applied for AUV path plan-ning. *Math.* 

18. Sang, H.; You, Y.; Sun, X.; Zhou, Y.; Liu, F. The hybrid path planning algorithm based on improved A\* and artificial potential

field for unmanned surface vehicle formations. *Ocean. Eng.* **2021**, *223*, 108709, doi:10.1016/j.oceaneng.2021.108709.

manned Surface Vehicle (USV) by algorithms fusion. *Ocean. Eng.* **2018**, *159*, 56–65, doi:10.1016/j.oceaneng.2018.04.018. 11. Peng, Y.; Huang, Z.; Tan, J.; Liu, Y. Calculating minimum distance between geometric objects represented with R-functions.

H∞ controller and the artificial potential field method. *J. Navig.* **2019**, *72*, 207–228, doi:10.1017/s0373463318000589.

4. Song, L.; Shi, X.; Sun, H.; Xu, K.; Huang, L. Collision avoidance algorithm for USV based on rolling obstacle classification and

This study innovatively introduced the DCPA–TCPA criterion as the unique CA parameter into the improved APF method, and solved the problems associated with the use of numerous, undefined CA parameters that are difficult for navigators to comprehend and accept. This study also integrated the MASS motion model and improved APF-based CA approach in a simulated environment; the consistency between the CA results and parameters for a large merchantman ship was proved. The improved APF-based CA approach was first applied to a real merchantman ship as an auxiliary system; this system received the same acceptance from the navigators as the personifying intelligent decision making for vessel collision avoidance (PIDVCA) [30] method.

However, there are still some shortcomings in this study. For instance, because the CA suggestions were not sent to the real-ship actuator, the actual CA results for a real MASS were not well presented. This algorithm needs more tests and improvements because of the extremely complicated navigation environment in a real ship, such as the small fishing vessels and their unpredictable motions, the anchorage and anchored vessels, the fact that the ship does not proceed in the channel and does not navigate on the route plan of OS, etc. In addition, the speed suggestion, which is extremely important in restricted waters or channels, was not given in this algorithm, which is also extremely difficult to realize when combining with course suggestions. The input data were collected based on the existing sensors (AIS and GPS) and ECDIS, which is not sufficient and reliable enough for real-ship automatic CA. Although some rules from COLREGS have been considered in the algorithm, more efforts are needed to apply all the COLREGS rules and good seamanship.

#### **5. Conclusions**

This study investigated the CA method of MASS from the perspective of engineering applications. By modifying the repulsive force model in the APF method, and taking the DCPA–TCPA criterion as the unique adjustable parameter, a multi-ship CA algorithm, constrained by COLREGS and the motion characteristics of the ship, is presented in this paper. The proposed method solved the problems associated with the use of numerous, undefined CA parameters that are difficult for navigators to comprehend and accept, due to the inconsistency between the CA results and parameters. As the proposed method is accurate and reliable, and satisfies the demands of engineering applications, this paper has important significance in the study of APF-based CA approaches.

**Author Contributions:** Conceptualization, Z.Z., H.L., J.Z. and Y.Y.; methodology, Z.Z. and H.L.; software, Z.Z.; validation, Z.Z. and H.L.; formal analysis, Y.Y. and J.Z.; data curation, Z.Z.; writing draft preparation, Z.Z.; writing—review and editing, Y.Y. and J.Z.; supervision, Y.Y. and J.Z.; project administration, Y.Y. and J.Z.; funding acquisition, Y.Y. and J.Z. All authors have read and agreed to publish version of the manuscript.

**Funding:** This research was partially supported by: (a) the National Natural Science Foundation of China (no. 52071049); (b) the project of Intelligent Ship Testing and Verification, (2018/473); (c) the Natural Science Foundation Guidance Project of Liaoning Province (no. 2020-BS-070); (d) the Maneuvering Simulation of Yunnan Inland Shipping Ships (no. 851333).

**Data Availability Statement:** The data used to support the findings of this study are available from the corresponding author upon request.

**Conflicts of Interest:** The authors declare that there are no conflict of interest in the publication of this paper. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

## **References**

