Environment Potential Field Modeling for Ship Automatic Collision Avoidance in Restricted Waters

The accurate environment potential field (EPF) modeling method and highly efficient collision avoidance (CA) approach are key technologies for maritime autonomous surface ships (MASS). A novel and accurate environment potential field (EPF) model is proposed using electronic navigation chart (ENC) face objects to describe different types of navigable and non-navigable areas, and an improved artificial potential field (APF) method is presented to realize collaborative CA and obstacle avoidance (OA). Implicit equations of complex-shaped face objects were constructed based on $R$ -function theory, and the discrete-convex hull method was introduced to realize automatic EPF modeling. Collaborative CA and OA experiments in restricted waters were conducted on a ship handling simulator. The results show that the improved APF method can obtain a robust and deterministic collision-free path under different weather conditions and in restricted waters, and the track zone width remains within 0.1 nm. The proposed face object EPF model is efficient and accurate, even with numerous vertices and complex shapes, and can drive the ship apart at a relatively safe distance in accordance with the recommended CA parameter. We present a practical CA approach and an effective EPF modeling method for APF-based ship path planning.


I. INTRODUCTION
When considering the maneuverability and motion of maritime autonomous surface ship (MASS), the International Regulations for Preventing Collisions at Sea (COLREGS), static and moving target ships, and restricted water areas, ship automatic collision avoidance (CA) is highly complex and uncertain, and the path planning for MASS is an important challenge [1], [2].
Many types of path planning algorithms have been used and adapted for MASS, and the techniques have been summarized in some literatures [2]- [9]. Vagale et al. [4] adopted a general categorization of path planning algorithms based on Souissi et al. [10] and suggested that such algorithms can take a classical approach, an advanced approach, or a hybrid approach. Vagale categorized the potential field methods as The associate editor coordinating the review of this manuscript and approving it for publication was P. Venkata Krishna . an advanced approach according to Serigstad et al. [11] and indicated that the potential field methods are most often used in path planning owing to their low computational load requirement for trajectory generation, and that the trajectory can be generated effectively in real time. The artificial potential field (APF)-based approach establishes a virtual potential field for the navigation area of the MASS. The attraction between MASS and goal, repulsions between MASS and obstacles, and repulsions between MASS and other ships are all applied on the ship to realize a collision -free path planning.
As a mandatory equipped aid for navigation in up-to-date bridge system, the electronic chart display information system (ECDIS) can present large amounts of accurate environmental data for CA systems, such as the depth of water, obstacles, land areas, the limit of fairways, etc. Therefore, the ideal environment model for automatic CA system should adapt to the data structure of electronic navigation chart (ENC) as much as possible [1]. However, to date, the accurate, highly efficient, and automatic modelling of environment potential fields (EPFs) has not been realized in the APF-based path planning.

A. RELATED WORKS
Because the APF controller is easy to construct, intuitive, and effective for handling static and dynamic constraints, and has the ability to obtain an ideal effect in CA and obstacle avoidance (OA) of a MASS, the APF-based approach has been widely applied to intelligent ship CA systems in open and restricted waters [4].
Despite its extensive application in robot path planning and CA researches, the APF-based approaches encounter major technological problems owing to the complicated CA conditions of the MASS [2], [12]. Vagale indicated that potential field methods are most often used in path planning because of their low computational load requirement, and that the trajectory can be generated effectively in real time [4]. Regarding the risk of being trapped in local minima, the derived APF-based algorithms can avoid the local minima trap that exist in the conventional APF algorithm [4].
Currently, the research priorities of the APF-based MASS CA approach are the optimization of the traditional APF method, solutions for goals non-reachable with obstacles nearby (GNRON) and local minima problems [13]- [15], cooperative CA and OA through modeling of the environmental potential field (EPF) [1], [16]- [20], and research on CA problems based on COLREGS [15], [20]- [22].
Based on the traditional APF method, some improved APF approaches have been proposed. Fan et al. [23] presented an improved APF method to solve the inherent shortcomings of local minima, inaccessibility of the target, and the GNRON problem. Lazarowska [24], [25] introduced an algorithm utilizing the discrete APF and path optimization method to realize a collision-free trajectory for ship. Xu et al. [26] proposed a dynamic CA algorithm via the layered APF with collision cone to overcome the shortcomings of the traditional APF. Zhu and Yang [27] designed an APF-based intelligent algorithm for unmanned underwater vehicles, and the effectiveness of optimized path planning was proved. In addition, some researchers proposed the hybrid path planning method based on APF and deep reinforcement learning [15], [22], [28], [29], or A * [30], or H∞ [31].
Lyu and Yin studied the multi-ship automatic CA approach using an improved path guided APF method, and considered the ship motion, rules of COLREGS, maneuverability of ship, and uncoordinated CA actions by target ships (TS) [15], [20], [21]. They overcame numerous drawbacks in traditional APF methods (such as GNRON and local minima problems) and conducted a series of tests in open and restricted waters, including dynamic TSs and complex static obstacles.
When a ship navigating in restricted waters automatically, it is necessary to fully consider the various of ENC data and their attributes, establish the navigation environmental model of the ship, and perform automatic CA and OA. Lyu and Yin presented a method for EPF construction based on point, line, and face vector data and their corresponding characteristic attributes provided by electronic charts [1], [20]. However, in their studies, the concave line segments were replaced with implicit curves in the EPF modeling of the line objects, and the edges of face shaped obstacles were manually obtained. The complicated concave polygon was split into a series of convex polygons, and then all the polygons were reassembled to establish the potential field of the polygon. Therefore, their study did not solve the automatic modeling of complicated line and face objects and has an extremely low efficiency. In engineering applications, the implicit equation of the curve is difficult to obtain, and the manual splitting of the concave polygon may result in different results when using different splitting rules, which may induce distortions or holes in the environmental potential field.
Related researches on EPF modeling are usually based on extremely simple environmental data, and their use of mass assumption and/or simplification renders the navigable area or scope of obstacles distorted. Researches on CA and path planning have rarely been based on official ENC data, and the complicated geometry of EPF modeling problems has not been well resolved. Cooperative CA and OA based on ENC data is still a technical challenge, and related research cannot satisfy the demands of engineering applications.
Because the EPF modeling for point and line objects is relatively simple [20], the research priority in this study is to establish an EPF model based on the face objects provided by ENC data. The face objects provided by electronic chart are extremely high in proportion, such as islands, isobath regions, anchorages, and prohibited areas, and their concave and convex shapes are quite complicated. It is essential to propose a rigorous mathematical analysis to address the potential field modeling of complicated face objects.
To solve the awkward EPF modeling problems of complicated geometry, R-function theory was introduced [32]- [34]. The researches in [35]- [37] studied EPF modeling approaches based on R-function theory; they realized automatic EPF modeling using the discrete-convex hull method and conducted several experiments in APF-based CA projects. Owing to their mathematical properties and natural ability to express complex geometric objects, R-functions have been widely used in computer graphics and geometric modeling [38]- [41].

B. CONTRIBUTIONS
This study proposes a novel EPF modeling approach based on R-function theory to solve the awkward automatic EPF modelling problems in APF-based path planning within the ECDIS framework and presents an improved path-guided APF method for MASS collaborative CA and OA. The contributions of this study can be summarized as follows.
(1) A novel EPF modeling method is proposed based on R-function theory and the discrete-convex hull method, in which different types of navigable and non-navigable areas can be described efficiently and VOLUME 10, 2022 automatically. The relationship between the action ranges of face objects and their α values, as well as the recommended α values are presented. (2) An improved path-guided APF method is proposed to realize collaborative CA and OA by using DCPA-TCPA as the unique adjustable parameter, and the small obstacle crossing problems were resolved accordingly. (3) Collaborative CA and OA experiments for multiple encountering situations and wind and/or current conditions were conducted to verify the effectiveness of the proposed EPF modeling approach and improved path-guided APF method. (4) Through a series of experiments based on ENC data, the proposed EPF modeling approach was proven to be accurate and reliable, and the improved path-guided APF method proved to be robust and effective. This study is significant for research on APF-based EPF modeling and path planning of MASS. The remainder of this paper is structured as follows: Section II builds the EPF model of face objects provided by ENC, studies the implicit function representation of the complicated polygon based on R-functions, and solves the automatic EPF modeling problems using the discrete-convex hull method. Section III presents an improved path-guided hybrid artificial potential field (PGHAPF) method to realize collaborative CA and OA. In Section IV, a series of welldesigned tests are conducted based on ENC data, and the accuracy and reliability of the proposed EPF model and APF-based CA approach are presented. The discussion and conclusions are presented in Sections V and VI, respectively.

II. EPF MODELING FOR COMPLICATED FACE OBJECTS PROVIDED BY ENC
The type and degree of danger of any object can be defined by examining on the attributes of each face object. The corresponding safe distances were then selected to ensure that the MASS could safely pass through.

A. MODELING FOR FACE OBJECTS
For the i-th face objects in the 2D plane, if we can obtain its mathematical expression F i (x, y) and let the points inside the polygon fulfil the expression F i (x, y) < 0, let the points on the edge fulfil the expression F i (x, y) = 0, and the points outside the polygon fulfil the expression F i (x, y) > 0, the potential field of the face objects f face (p) can then be expressed as: where N is the sum of face objects, α i is the positive parameter of the i-th face object. The smaller the value of α i , the flatter the potential field and the larger the action range of the face object. Otherwise, the larger the value of α i , the steeper the potential field and the smaller the action range of the face.
is on the edge of the face object, and the potential value is 0.5.
is outside the face object, the potential value is smaller, and the minimum is 0. If F i (x, y) < 0, p(x, y) is inside the face object, the potential value is larger, and the maximum value is 1.
The MASS must maintain a safe distance from islands, anchorages, and prohibited areas when navigating. Occasionally, the ship must navigate within certain navigable regions and maintain a safe distance from the edges of the region, such as channels, traffic separation schemes, or other safe navigable areas. The potential field of the face object can then be expressed as: where, the inside of the face is navigable, the potential field is smaller, and the minimum is 0, whereas the outside of the face is non-navigable; the potential field approaches 1.0 if it is far away from the face object.

B. R-FUNCTION REPRESENTATION FOR GEOMETRIC OBJECT
For a geometry object in the 2D plane, the equation for each edge can be expressed by an implicit function f i (x, y) = 0. The implicit function separates the plane into two halfspaces. The points on the line can fulfil the expression f i (x, y) = 0, and the points in the half-space can fulfil the expression f i (x, y) > 0 or f i (x, y) < 0. For an arbitrary closed shape, if the vertices are sort anticlockwise, the interior of the shape can be expressed by the left half-space of each edge (f i (x, y) < 0). Therefore, the R-function can be used to express the region enclosed by two inequalities as function operations. Through algebraic operations to the implicit function f i (x, y) of each edge, we can obtain the expressions F(x, y) < 0, F(x, y) = 0, and F(x, y) > 0 to express the point p(x, y) is on the inside, boundary, and outside of the geometric object, respectively. The R-function is a real-value function characterized by a property that is completely determined by the sign of its arguments rather than its value. The theory of R-functions was proposed by the former Soviet Union scholar Rvachev in the 1960s [42]. Rvachev presented a series of R-functions with sufficient completeness [43], where R a is an R-function system.
where, a = a(x, y) is an arbitrary continuous and symmetric function that is fulfilled by the expression −1 < a(x, y) ≤ 1; the symbol ± denotes R-conjunction and R-disjunction. For a = 0, the widely used R 0 system is:

C. EPF MODELING PROCEDURE FOR A COMPLEX FACE OBJECT
A polygon region can be automatically divided into sidechains with the intersection of the convex hull vertices. The intersection of the half-space defined by side-chains can then be adopted to express a polygon region, whereas the half-space is represented by the intersection or union of the edges. If the intersection of the two edges is concave, the half-space is the union; otherwise, it is the intersection. The aforementioned approach for dealing with a geometric object is referred to as the discrete-convex hull method. As mentioned previously, the face objects in this study are in the 2D plane, their implicit functions are accurate for expressing geometric objects. Therefore, the implicit function of a geometric object has a value of 0 at the boundary of the object, and the internal and external points have values < 0 and > 0, respectively.
The EPF modeling procedure for complex face objects can be summarized as follows.
EPF Modeling Procedure for Complex Face Object Input: face objects and attributes provided by ECDIS. Output: EPF value at any position.
Step 1: obtain face objects data from ECDIS, pick out the CA involved objects; Step 2: set appropriate α value for each object according to Tab. 1 to specify its action range.
Step 3: preprocess the vertices of face object by deleting collinear and duplicate points, sorting anticlockwise, and numbering; Step 4: obtain the implicit functions of each edge; Step 5: obtain the hierarchical structure of the polygon by applying the discrete-convex hull method; Step 6: obtain the implicit function of the face object by applying conjunction and/or disjunction operations bottom-up for each edge based on the R-function; Step 7: obtain the EPF of face object according to formula (1) and (2); Step 8: obtain the total EPF of the navigating area by adding up all the EPFs of each face objects; Step 9: obtain the EPF value at any position; Step 10: repeat Step 1-9 to obtain the EPF value at another position.
Each spatial face object has its unique attribute for navigation. As shown in formula (1) and (2), α is a positive parameter to specify the action range of face object. The relationship between the action ranges and the values of α is shown in Fig. 1, and the recommended α values for face objects and the safe distances to be maintained are listed in Tab

III. COLLABORATIVE CA AND OA ALGORITHM BASE ON IMPROVED PATH-GUIDED HYBRID APF METHOD
The CA for MASS is a complex system that should constrained by COLREGS and must cope with the static and dynamic environments in real time.

A. MODIFIED APF METHOD
Based on the work of Lyu and Yin [15], [21], we realized a multi-ship CA algorithm by modifying the repulsive force model in the APF method from the perspective of navigation and used the distance at closest point of approach-time to closest point of approach (DCPA-TCPA) criterion as the unique adjustable parameter [44] (5)- (12), as shown at the bottom of the next page, where η d and η e 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, moves to the goal, and simultaneously maintains a safe distance with the TSs. The term n og denotes a unit vector that points to the goal from the OS. The term n ot denotes a unit vector that pointing to TSs or obstacles from the OS; d g 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 (T 1 p os or T 2 p os ) and the relative position vector p os p ts ; θ is the angle between the relative position vector p ot (p ot = p ts − p os ) and the relative speed vector v ot (v ot = v os − v ts ). The risk of collision occurs when the extension line of v os crosses the circle of radius dTOL neg-CPA (θ < θ TOL ); otherwise, the OS can pass through the TS at a safe distance. The terms d emg and d neg represent the range criterion of emergency CA and negotiation CA, respectively; dTOL neg-CPA and tTOL neg-CPA denote the distance and time criteria of negotiation CA, respectively; and dTOL emg-CPA and tTOL emg-CPA represent the distance and time criteria of emergency CA, respectively.

B. IMPROVED PATH-GUIDED HYBRID ARTIFICIAL POTENTIAL FIELD METHOD
The course alteration amplitude in one time step is designated as ±θ max (degree), according to the maneuverability of the ship. As shown in Fig. 3, the detection range is d (nm) in the course direction, the scanning line on the current course ψ c is separated into m sample points, and the potential field of each sample point is calculated to obtain the total VOLUME 10, 2022 If f (ψ c ) is larger than the given threshold f TOL , the ship must take action to avoid obstacles in front of the course direction. The arc of ψ c ± θ max (''+'' for starboard side and ''-'' for port side) is separated into n equal parts and n F att = εd og n og (5) scanning lines are obtained on each side. Next, each scanning line is separated into m sample points, and the potential field of each sample point is calculated and added to obtain the total potential field f (ψ c + θ max ) on the starboard side and f (ψ c − θ max ) on the port side. The ship altered the course to a smaller potential field side. The detection and course alteration were repeated for each iteration to enable the ship to pass and clear obstacles. Thus, the ship can detect obstacles in the heading direction, alter its course to a relatively safe side, and ensure that it does not cross small obstacles. In this section, we employed an improved path-guided hybrid artificial potential field method to realize the collaborative CA and OA algorithm, as illustrated in Fig. 4. The improved PGHAPF is illustrated as follows:

IV. TESTS AND RESULTS
To demonstrate the problem-solving capability of the approach proposed in this study, a series of well-designed tests were conducted using a PC with an Intel(R) Xeon(R) CPU E5-1600 v3 @ 3.5 GHz processor, 8 GB RAM, and a 64-bit Windows 10 Professional operating system. Collaborative CA and OA experiments were designed to validate the proposed algorithm based on ENC data and were conducted in a simulated environment.

A. SIMULATION PLATFORM
A series of well-designed tests were conducted on a semi-physical full mission ship handling simulator developed by Dalian Maritime University (DMU) (as shown in Fig. 5), which includes a 6-DOF (six-degrees-of-freedom) Improved PGHAPF Input: OS initial position, course, speed, and route plan; face objects and attributes provided by ECDIS; TSs initial positions, courses; appropriate CA parameters. Output: recommended course.
Step 1: set appropriate α for each face object according to Tab. I; Step 2: obtain the EPF model according to Section II.
Step 3: obtain the attitudes of TSs and OS; Step 4: obtain the total EPF f (ψ c ) using formula (13); if f (ψ c ) < f TOL , there is no risk of collision exists between OS and face obstacles, go to Step 6; if f (ψ c ) ≥ f TOL , continue to Step 5; Step 5: obtain the total EPF of f (ψ c + θ max ) and f (ψ c − θ max ); apply a port side course alteration of Step 1; Step 6: calculate the attractive force F att according to formula (5); calculate the repulsive forces F rep (p, v) from each TS according to formulas (6-12); obtain the total virtual force exerted on the ship; obtain the recommended course ψ c + ψ c ; continue to Step 1; Step 7: repeat Step 1-6; end the calculation when OS reaches the goal.
ship motion model, path planning module, bridge control system (radar, conning, ECDIS, ship control equipment, etc.), 3D scene module, and instructor station. The structure of the simulation platform is shown in Fig. 6. The simulator provides the own ship information (static, dynamic, and maneuverability), target ship information (static and dynamics), and disturbance (wave, current and wind) for the path planning module. In the 6-DOF MMG ship model, the mass and added mass, moment and added moment of inertia, viscous hydrodynamics and hydrostatic forces, propeller forces and moments, rudder forces and moments, and disturbance forces were all included.
The path planning module works within the ECDIS framework, which provides global route planning and ENC data (points, lines, and face objects). Considering the motion of the own ship, target ships, COLREGS, global path planning, and EPF model based on ENC data, the path planning module provides a collision-free local path planning.  According to the collision-free path, the ship control system provides executable commands to the rudder and propeller, and drives the 6-DOF ship motion model calculation.

B. COLLABORATIVE CA AND OA IN RESTRICTED WATER (INSIDE OF THE FACE OBJECT IS UNNAVIGABLE)
In the vector data provided by the shipboard ECDIS, the 20.0 m isobath data around Zhangzidao (Dalian, China) consists of four islands with 511 sampling points (as shown in The potential field around Zhangzidao Island was generated based on the 20.0 m isobath data. As shown in Fig. 8, a larger value of α results in a larger safe navigation region available for the ship, whereas a smaller value of α implies that the ship must maintain a larger distance from the islands. Although numerous data were provided by the electronic chart and the shape of the polygons was extremely complicated, the proposed algorithm successfully solved the environmental potential field modeling. We used one container ship ''KangHe'' (OS) as a smart ship and two target container ships, ''YinHe'' (TS1) and ''AnGuangJiang'' (TS2), to complete the experiment of the collaborative CA and OA. The shapes of the involved    ships are shown in Fig. 9, and the turning information of ''KangHe'' is listed in Tab. 2. The initial conditions and ship specifications are presented in Fig. 10 and Tab. 3. α = 50.0 and α = 5.0 were set for the 20.0 m isobath data, and the CA parameters are listed in Tab. 4. Fig. 11 shows the collaborative CA and OA results obtained by ''KangHe''. Figures 12-14 show the distances, DCPAs, and TCPAs between the OS and TSs for the entire test. Fig. 15 shows the courses of ''KangHe'' in the CA process. A portion of the CA results are presented in Tab. 5. By analyzing the CA results and processes over the tests, we can see that the ship navigated on her route plan at full speed in the first 5 min because there was no risk of collision with the TSs and obstacles. When the distances between the OS and TSs decreased, ''KangHe'' started to alter course to the starboard side according to COLREGS at 5 min as the DCPA-TCPA criterion between the OS and TS2 was fulfilled. The CA procedure with TS2 continued for 9.0 min, and the ship started to return to her route plan when it passed and cleared with TS2 at 14 min. After returned back at 18 min, the ship started to head for her destination.
If no obstacles exist, the maximum course alteration of ''KangHe'' in the CA procedure is 60 • , and the stable course alteration is 52 • , which is sufficiently large according to COLREGS. The ship passed and cleared with TS2 at the desired distance of 0.986 nm (in accordance with the DCPA-TCPA criterion dTOL neg-CPA = 1.0 nm) and headed for her destination with a course of 315 • after completing the CA procedure.
If α = 50.0 is set for the isobath data, the maximum course alteration of ''KangHe'' in the CA procedure is 46 • , and the stable course alteration is 31 • . Even though the course alteration was sufficiently large according to COLREGS, the ship passed and cleared with TS2 with a distance of 0.43 nm (less than the desired 1.0 nm defined by dTOL neg-CPA ) and headed for her destination with a course of 318 • after completing the CA procedure.
If α = 5.0 is set for the isobath data, the maximum course alteration of ''KangHe'' in the CA procedure is 41 • , and the stable course alteration is 28 • . The ship passed and cleared with TS2 at a distance of 0.38 nm (also less than the VOLUME 10, 2022    By analyzing the CA results, we can see that a smaller α value induces a larger effective range around the obstacles while reducing the ship's navigable region and restricting the scope of action. In the three tests, ''KangHe'' could detect the obstacles and the risk of collision with TSs in a timely manner, and apply the largest CA actions, attempting to obtain a safe distance with TSs and obstacles. As the restriction of the obstacles provided by ENC, even though the largest CA actions were applied, the ship passed and cleared with TS2    at a distance of 0.43 nm (α = 50.0) and 0.38 nm (α = 5.0), which were less than the desired distance of 1.0 nm defined by dTOL neg-CPA .
Even though restrictions existed and different α values were applied, the opportunities for detecting the risk of collision with TSs, taking actions, detecting obstacles, and returning to the origin route plan, and the CA trends were approximately the same in the tests. If the dynamic ships and static environment conditions remain unchanged, the CA results provided by this study are reliable when handling a complicated CA scene.
Based on previous work, extensive experiments have been conducted under different encountering situations. As shown in Fig. 16, there were five moving target ships and seven static ships in the scenario, and the encountering situations included crossing, head on, overtaking, and uncoordinated actions by target ships. The CA results are shown in Fig. 17, and the DCPAs, TCPAs and distances between OS and TSs are shown in Fig. 18.
As shown in Figures 17-18, ''KangHe'' navigated on her route plan at first, then altered course to the starboard side when detected risk of collision with the first island. Subsequently, the ship successively took a series of CA actions to the islands, static ships, and dynamics ships. The ship finally passed and cleared all ships and islands at relatively safe distances. Owing to the restriction of the islands, the minimum  distances between the OS and TS1-TS5 were 0.73, 0.45, 0.23, 0.32 and 0.85 nm, respectively, which were smaller than the desired distance of 1.0 nm defined by dTOL neg-CPA .

C. COLLABORATIVE CA AND OA IN RESTRICTED WATER (INSIDE OF THE FACE OBJECT IS NAVIGABLE)
In this section, we selected a traffic separation scheme outside of Tianjin Port (chart number = CN422122, issue   Fig. 19). To keep clear of the traffic separation line and separation zone and not cross the separation line simultaneously, we established an EPF model of the right side of the traffic separation scheme, as illustrated in Fig. 19, where the width of the waterway is 1.0 nm and the length is 10.0 nm.
The potential field of the traffic separation scheme was generated as shown in Figures 20-21. A larger value of α results in a steeper EPF and larger safe region available for ship navigation in the traffic separation scheme, whereas, a smaller value of α indicates a flatter EPF and narrower navigable region in the traffic separation scheme. The width of the navigable waterway was 0.8 nm when α = 50.0 and 0.09 nm around the traffic separation line and the separation zone was unnavigable. However, when α = 10.0, the width of the navigable waterway was 0.14 and 0.43 nm around the traffic separation line and the separation zone was unnavigable.
We used one container ship ''KangHe'' (OS) as a smart ship and two target container ships, ''YinHe'' (TS1) and ''AnGuangJiang'' (TS2) to complete the experiment of collaborative CA and OA under a north wind of force 1.   At the beginning of the two tests, ''KangHe'' navigated on her initial route plan because there was no risk of collision existed with the TSs. At 1.0 min, the ship altered course to starboard to overtake TS1 as the DCPA-TCPA criterion was fulfilled; the overtaking process continued for 9.5 min, and then at 10.5 min, the ship started to return to her route plan when it passed and cleared with TS1. ''KangHe'' started her CA actions with TS2 at 16.5 min; the CA procedure with TS2 continued for 10.0 min, and then at 26.5 min, the ship started to return to her route plan when passed and cleared with TS2. At 29.0 min ''KangHe'' started to head for her destination when passed and cleared with all TSs.
If there were no restrictions, the maximum course alteration of ''KangHe'' in the CA procedure with TS1 was 34.0 • and the stable value was 28.0 • . The ship passed and cleared VOLUME 10, 2022   If there was a restriction of the traffic separation scheme, the maximum course alteration of ''KangHe'' in the CA procedure with TS1 was 24.0 • and decreased to 10.0 • afterwards. The ship passed and cleared with TS1 at a distance of 0.48 nm, which was less than the desired 1.0 nm defined by dTOL neg-CPA . The ship headed for her destination with a   The ship could detect the risk of collision with the TSs and obstacles in a timely manner, and perform effective CA actions at the right time according to the set DCPA-TCPA criterion in both experiments. If no restrictions existed, the ship could pass and clear the TSs with the desired safe distance (agreeing well with the DCPA-TCPA criterion defined by dTOL neg-CPA ). If the traffic separation scheme was restricted, the ship could take effective CA actions for TSs and keep    Although the ship could take a relatively large CA action and remain clear of the traffic separation lines or separation zones, the desired safe distance (dTOL neg-CPA ) may be set a smaller value in accordance with the width of the waterway when navigating in restricted areas.
Following previous work, we conducted a series of extensive experiments under different wind and/or current conditions. The scenarios are listed in Tab. 9, and the results are shown in Figures 27-30.
The results show that the proposed approach can obtain a robust, deterministic, and nearly the same collision-free path   under different wind and/or current conditions, even though the act opportunities, act times, and act amplitudes may be slightly different. As shown in Fig. 27, the track zone width of scenarios #1-13 reached 0.10 nm at the beginning of the experiments owing to the suddenly input environmental force on the ship, and later it remained within 0.05 nm owing to the restriction of the traffic separation line and encountering situations.
By analyzing the results and intermediate processes between scenarios #3 and #5, scenarios #7 and #9, and scenarios #11 and #12, we can see that the beneficial wind and/or current conditions (#5, #9, and #11) resulted in a slightly larger ship course alteration, and the tracks were slightly inclined to the right side accordingly. Otherwise, the unfavorable wind and/or current conditions (#3, #4, and #12) made the ship apply a slightly smaller course alteration, and the tracks were inclined to the left side accordingly.

V. DISCUSSION
This work studied the MASS CA system from the standpoint of engineering applications and proposed a novel EPF modeling method for face objects within the ECDIS framework to solve problems in APF-based path planning. First, this study established the implicit function of complex face objects based on R-function theory and realized automatic EPF modeling using discrete-convex hull technology. Second, this study improved the path-guided APF method and achieved collaborative CA and OA in restricted waters. Finally, a series of tests were conducted based on ENC data and under different wind and/or current conditions, and the proposed approach of EPF modeling method was proven to be accurate and reliable. However, this study some shortcomings. For instance, because the collaborative CA and OA experiment were conducted in a simulated environment, the suggestions were not sent to a real-ship actuator and 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 faced by real-ships, such as small fishing vessels with unpredictable motions, the anchorage and anchored vessels, channels, traffic separation schemes, ships not proceeding in the channel, not navigating on the route plan by OS, etc.. The ship speed suggestion that 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 suggestion; although some rules from COLREGS have been considered in the algorithm, more efforts are needed to apply the entire list of COLREGS rules and practice good seamanship. The CA parameters for ENC data may not be satisfying to navigators, and its dynamic adjustment is impossible.

VI. CONCLUSION
This study systematically solved the EPF modeling problem for complex face objects. Reliable environmental data were provided by official electronic chart data. The proposed EPF modeling method based on R-function theory can establish any potential field of complex face objects even though the objects have a very complex concave-convex structure. The modeling procedure is simple and easy to conduct. Any offline extraction or mesh dividing operation to the electronic chart data is unnecessary. EPF modeling can be realized automatically without any manual intervention within the framework of the ECDIS. The proposed method is also a feasible path planning method for inland river ships. As the proposed method is accurate and reliable and satisfies the demand of engineering applications, this study is significant for research on APF-based CA for MASS.