A Coordination System between Decision Making and Controlling for Autonomous Collision Avoidance of Large Intelligent Ships

: Large ships are typically with large inertia and longtime delay in motion, in prevailing collision avoidance methods, their maneuverability is generally neglected, there could be a dangerous situation if the system fails to control the ship course as ordered in a timely manner. This paper proposes a coordination system which consists of two algorithms for avoiding risk and then returning to scheduled waypoint. The avoiding risk algorithm are based on VO (velocity obstacle) method, the returning algorithm is derived from LOS (light of sight) guidance. For better performance, the ship model for simulation is a nonlinear Norrbin Model, with the controller improved by CGSA (closed loop gain shaping algorithm) method from traditional PID control, COLREGS (Convention on the International Regulations for Preventing Collisions at Sea) constrains are considered. To test the effectiveness of the proposed system, a series of complex scenarios including Imazu problem are applied.


Introduction
Recently, autonomous vehicles have gained a remarkable amount of attention with a focus on solving collision problems by machines [1]. An integrated collision avoidance works following three steps: perceiving, deciding and controlling [2]. However, the deciding and controlling parts are not always working in synchrony, which, as a sequence, may contribute to urgent situations.
In the domain of decision-making technique, research priorities are risk detecting, encounter situation identifying, avoidance algorithm designing etc., problems in this field are generally classified as single and multiple obstacles, or static and dynamic obstacles. A major defect is that the turning orders output by decision-making module are impulsive and generally regardless of how long the control system will complete the order or whether the range of heading turn will cover the constraints of ship maneuverability.
From the perspective of motion control, the key factors are rapidity, stability and robustness to evaluate an autopilot in a process of adjusting the heading angle. Even though significant progress has been made in decades, a ship will never be flexible enough to change heading course instantaneously to expected direction [3].
The inconsistency between decision-making and controlling could result in problems. The decision system gives the ordered course, which is also the desired course according to current status, when the ship turns to the new heading after a period of time, the situation may have changed a lot and the ship may have missed the timing of changing the course, as a sequence the actual trajectory has deviated from the expected. The problem also contributes to a calculation inaccuracy, the DCPA (distance at the closest point of approach) and TCPA (time to the closest point of approach) are more optimistic calculated by a 1.
The risk avoiding algorithm is proposed based on improved VO (velocity obstacle) algorithm by a series of recursive and predictive steps thus the decision-making

Ship Motion Modelling
The main idea in the manuscript is to deal with the lag between the decision making and controlling part, we define that a cargo ship with its length between perpendiculars is longer than 100 m is "large" enough. Another assumption is that the collision avoidance is completed by heading turning. The selection of ship motion model and its parameters should meet these needs.
We used two nonlinear Norrbin models, one is a responding model from rudder to heading for controller designing, the other is a planar motion model for simulation.
The responding model is as following, where, H r is the angular accelerate, δ is the rudder.
The nonlinear planar motion model is as follows, where u, v and r are surge velocity, sway velocity and yaw rate on ship-attached coordinate. The parameters from a 0 to a 22 as well as b 1 and b 2 are determined by dimensions of a training ship [26,27], In the equations F Non , F Wind , F Wave are the nonlinear forces and disturbances from wind and wave, the experiment does not involve any circumstances noise, thus the simplified model is as follows: where F Non1 , F Non2 are variables depending on the ship's sway (v) and the rolling (r) in real time, the calculation details are from the research by [28]. Small K 0 and large T 0 indicates that ships are high inertia systems with long time lag for heading changing.
The kinematics formulae (as shown in Equation (3)) transforms the ship motion from the ship-attached to the fixed coordinate system.
where x and y define the position on the longitudinal and lateral axis of fixed coordinate, ψ is the heading angle of a ship. Numerical calculations for above differential equations are by the help of fourth order Runge kutta method.
For brief description, we define X 0 = [x 0 , y 0 , ψ 0 , u 0 , v 0 , r 0 , δ 0 ] T as ship status vector, with the Equations (1)-(4), the updated ship status after some time t is X = [x, y, ψ, u, v, r, δ] T . The process of predicting ship status by the motion model above could be defined as a function M(·), the expression is: If there is a control sequence of rudders u = [δ 1, δ 2, . . . δ t, ] T are input during the time t, then the expression is modified as,

Autopilot Modelling
There are a number of researches which have made good progress in decision making for collision avoidance of large cargo ships, but for the control system they have only a traditional PID controller with manual tuning. We tried another two methods to design the controller and made a comparison.
Anna [29] applied backstepping approach based on a third order differential equation for ship course keeping. We used the second order model to design a controller because it reduces calculating work while does not lose the feature of time delaying between decision making and control.
Given the state-space equations: .
x 1 = r = We define ψ d as the desired course, k 1 , k 2 ∈ R + as the coefficients for constructing Lyapunov functions, then according to the steps of backstepping method by [30], the controller expression is designed as: Another method is the CGSA (closed loop gain shaping algorithm) [30], the control law is as follows: where the e(s) denotes the error between current heading and the desired course, T 1 is the threshold frequency for controlling, according to the Pierson-Moskowitz spectra [31], the general frequencies of wave disturbance are mainly larger than 0.33 rad/s if the height of the wave are smaller than 7 m, thus to filter the disturbance of wave lower than 7 m, we determine T 1 = 10/3. The only argument to tune is ρ, we let ρ = 30 according to the controlling experiment result. The convergence is proved by [32], the structure of the proposed approach is still a PD-shaped controller, which is feasible for engineering application with better performance. In guards to rudder limitation, we set a saturation function for the backstepping and CGSA based controllers is used as following: The δ o is the output of rudder controller, with the limitation δ is the rotation speed of rudder engine, we set it within a rational range R L = 5 • /s, which indicates that rudder change ∆δ will not be quicker than 5 • /s. From Figure 1, the backstepping designed controller could well handle the nonlinear problem of the ship model with the shortest adjusting time among the three but a bit of overshoot; the CGSA method are smoother but a little slower. Pure PID fails in control because the added nonlinear terms on the ship model.
The is the output of rudder controller, with the limitation δ = 35°, is the rotation speed of rudder engine, we set it within a rational range R = 5°/s, which indicates that rudder change Δ will not be quicker than 5°/s. Figure 1, the backstepping designed controller could well handle the nonlinear problem of the ship model with the shortest adjusting time among the three but a bit of overshoot; the CGSA method are smoother but a little slower. Pure PID fails in control because the added nonlinear terms on the ship model. From Figure 2, the Backstepping designed controller has a more aggressive control strategy than the CGSA designed controller does, and the PID controller is not applicable because its rudder angle is beyond the limitation of a ship's range. This comparison indicates the Backstepping method has the advantage of rapidity while the CGSA method is with a better controlling manner with smaller rudder angle. Given the maneuvering practices that small rudder angle does less harm to the rudder device and consume less power, we finally selected the CGSA designed controller. From Figure 2, the Backstepping designed controller has a more aggressive control strategy than the CGSA designed controller does, and the PID controller is not applicable because its rudder angle is beyond the limitation of a ship's range.

From
The is the output of rudder controller, with the limitation δ = 35°, is the rotation speed of rudder engine, we set it within a rational range R = 5°/s, which indicates that rudder change Δ will not be quicker than 5°/s. Figure 1, the backstepping designed controller could well handle the nonlinear problem of the ship model with the shortest adjusting time among the three but a bit of overshoot; the CGSA method are smoother but a little slower. Pure PID fails in control because the added nonlinear terms on the ship model. From Figure 2, the Backstepping designed controller has a more aggressive control strategy than the CGSA designed controller does, and the PID controller is not applicable because its rudder angle is beyond the limitation of a ship's range. This comparison indicates the Backstepping method has the advantage of rapidity while the CGSA method is with a better controlling manner with smaller rudder angle. Given the maneuvering practices that small rudder angle does less harm to the rudder device and consume less power, we finally selected the CGSA designed controller. This comparison indicates the Backstepping method has the advantage of rapidity while the CGSA method is with a better controlling manner with smaller rudder angle. Given the maneuvering practices that small rudder angle does less harm to the rudder device and consume less power, we finally selected the CGSA designed controller.

From
The adjusting time of controlling is not easy to obtain, according to transfer functions, we can only find the satisfied predicted results by the ship motion model in Section 3.1, if the allowable error is denoted by 10%, then the adjusting time will be formulated as: where τ is the controlling time or adjusting time, which is obtained by finding the first time point when the error of current heading to desired course ψ d is smaller than 10%. For brief description in the following parts, the above process of finding controlling time τ and the rudder control sequence u = [δ 1, δ 2, . . . δ t, ] T are defined as a function C(·) over desired course ψ d and current own ship status X 0 .
where, C p = [u, τ] T are the control parameters.

Detection Ranges
It is a consensus among researchers that clear area around the ship is mainly important for safe navigation [33], Fujii [34] initially introduced the concept that the safety domain is the area where other ships cannot enter for safety, since then several types of safety domain have been studied for different purposes. Various shapes of areas have been developed in safety domain study [35].
An effective way is to use the time to determine risk of collision, Jinwan [36] proposed an algorithm where the ship will be safe if TCPA is longer than 5 min or the ship has already passed the CPA (Closest Point of Approach) for more than 5 min.
DCPA (distance at the closest point of approach) is another effective way to help with decision making, Shaobo [37] reports that more than 90% of their respondent seafarers will not take any evasive action with a DCPA larger than 1.5 nm. However, the distance will be reduced lower than 1 nm when in congested waters. To adds up the lengths of own and targeted is a simple way but not practical given the maneuverability of ships. Lyu [38] and Sawada [39] used the area with radius of 0.3 nm as the prohibited zone in their collision avoidance experiments, Sawada also took an effort with 0.5 nm but the performance was not as satisfied.
However, the radius of safety domain is obviously not the distance that decision begin to make at. The own ship will detect in advance whether it is in danger of collision with any targeted ship in sight, while it unnecessary to take any action if the targeted ship is far enough, according to rule 22 in COLREGS (International Regulations for Preventing Collisions at Sea), the masthead light in vessels of 50 m or more in length should have an intensity so as to be visible at the minimum range of 6 nm.
Raphael [40] used collision zone, COLREG application zone and free navigation zone in a concentric circle to define areas with different level of risk. Similarly, in this paper, the detection ranges are comprised of two circular areas, as shown in Figure 3, the smaller one around targeted ship is the safety domain with the assumption that ships are bound to collide within the range 0.5 nm. The larger one around own ship is the detection circle where the own ship should take actions to prevent collision if any risk exists, the radius of which is 6.0 nm. thus, a risk parameter is defined as a Boolean value, R = 1, DCPA ≤ 0.5 nm, DIST < 6 nm 0, DCPA > 0.5 nm or DIST < 6 nm (13) where R = 1 means the danger of collision exists while 0 means safe. DIST is the distance between own ship and the targeted.

COLREGS Ruling
Basic consensus of actions to avoid collisions is ruled by COLREGS, but without detail positions or directions of encounter situations, which is fundamental at sea for decision making. Tam [41] set up a chart used to determine the encounter types. DING [42] divided all the situation into 12 groups with rights of way. While this is not enough for autonomous collision avoiding, which requires clear choice of starboard or left rudder for a machine to function. The guide of decision under various situations are demonstrated in the diagram Figure 4. The own ship is fixed to head up in the large circle, the sections around it is the bearings from which targeted ships comes. The sections in smaller circle are relative courses with respect to own ship, the colors mean the actions (left or starboard rudder) to take in responding encounter situations. The definitions of different colors and acronyms are explained in Table 1.

COLREGS Ruling
Basic consensus of actions to avoid collisions is ruled by COLREGS, but without detail positions or directions of encounter situations, which is fundamental at sea for decision making. Tam [41] set up a chart used to determine the encounter types. DING [42] divided all the situation into 12 groups with rights of way. While this is not enough for autonomous collision avoiding, which requires clear choice of starboard or left rudder for a machine to function. The guide of decision under various situations are demonstrated in the diagram Figure 4. The own ship is fixed to head up in the large circle, the sections around it is the bearings from which targeted ships comes. The sections in smaller circle are relative courses with respect to own ship, the colors mean the actions (left or starboard rudder) to take in responding encounter situations. The definitions of different colors and acronyms are explained in Table 1.

Basic Principle of VO Algorithm
Many researchers have utilized the velocity obstacle (VO) method to solve avoiding collisions problems [43][44][45]. As is shown in the Figure 5a, , are denoted as the velocity vector of own and targeted ship, targeted ships are set on the assumption that they navigate at a constant velocity in this paper.
= − is the relative velocity with the included angle , L and L are the boundaries lines tangent to the safety domain

Color of Areas Descriptions
autonomous collision avoiding, which requires clear choice of starboard or left rudder for a machine to function. The guide of decision under various situations are demonstrated in the diagram Figure 4. The own ship is fixed to head up in the large circle, the sections around it is the bearings from which targeted ships comes. The sections in smaller circle are relative courses with respect to own ship, the colors mean the actions (left or starboard rudder) to take in responding encounter situations. The definitions of different colors and acronyms are explained in Table 1. Own ship is in an obligation to give way, the starboard rudder should be taken.
a machine to function. The guide of decision under various situations are demonstrated in the diagram Figure 4. The own ship is fixed to head up in the large circle, the sections around it is the bearings from which targeted ships comes. The sections in smaller circle are relative courses with respect to own ship, the colors mean the actions (left or starboard rudder) to take in responding encounter situations. The definitions of different colors and acronyms are explained in Table 1.

Color of Areas Descriptions
Own ship is in an obligation to give way, the starboard rudder should be taken. Own ship should keep course and speed and take necessary actions (starboard or left rudder) when the give-way vessel does not take appropriate actions. Own ship is in the overtaking situation, free to take starboard or left rudder but is always on duty of giving way Acronyms Encounter Situations HO Head on RC Right cross LC Left Cross OT1 Overtaking OT2 Overtaken Own ship should keep course and speed and take necessary actions (starboard or left rudder) when the give-way vessel does not take appropriate actions.
a machine to function. The guide of decision under various situations are demonstrated in the diagram Figure 4. The own ship is fixed to head up in the large circle, the sections around it is the bearings from which targeted ships comes. The sections in smaller circle are relative courses with respect to own ship, the colors mean the actions (left or starboard rudder) to take in responding encounter situations. The definitions of different colors and acronyms are explained in Table 1.

Basic Principle of VO Algorithm
Many researchers have utilized the velocity obstacle (VO) method to solve avoiding collisions problems [43][44][45]. As is shown in the Figure 5a, v 0 , v T are denoted as the velocity vector of own and targeted ship, targeted ships are set on the assumption that they navigate at a constant velocity in this paper. v r = v 0 − v T is the relative velocity with the included angle θ r , L a and L b are the boundaries lines tangent to the safety domain with the angles θ Lb and θ La , if θ Lb is chosen as the candidate relative decision course, according to the trigonometric relation, the angle ψ b of v 0 is one of the candidate decision courses of own ship, another result based on θ La is ψ a , then the final decision course can be formulated as: Note that the decision course is calculated by simple VO algorithm instead of a final output.

Basic Principle of VO Algorithm
Many researchers have utilized the velocity obstacle (VO) method to solve avoiding collisions problems [43][44][45]. As is shown in the Figure 5a, , are denoted as the velocity vector of own and targeted ship, targeted ships are set on the assumption that they navigate at a constant velocity in this paper.
= − is the relative velocity with the included angle , L and L are the boundaries lines tangent to the safety domain with the angles and , if is chosen as the candidate relative decision course, according to the trigonometric relation, the angle of is one of the candidate decision courses of own ship, another result based on is , then the final decision course can be formulated as: Note that the decision course is calculated by simple VO algorithm instead of a final output.
(a) (b)  As regard to situations where multiple ships are encountering with own ship. There are a series of boundary courses to each targeted ship, as shown in Figure 5b, we employed a collection of all the candidate decision courses, CD = {ψ a1 , ψ b1 , ψ a2 , ψ b2 , . . . ψ an , ψ bn }, CD is the acronym of candidate decisions, Then the decision course presents as: Due to minor disturbances of environment, an error correction ∆ ψ will be add to the decision course, thus the actual decision course will be: ∆ ψ is set as 3 • in this paper. For brief description in the following parts, the process above to find the decision course based on VO is defined as a function D(·), thus where the X, X T are statuses of own and targeted ship.

Collision Avoiding Algorithm
Due to the maneuverability of ships, the actual trajectory will not always be as expected, the deviation generally varies by ship status and decision course. A practical coordination approach for further modifying the decision course is proposed as followed.
In respond to the ends at each Sections 3.2 and 5.1, with the Equations (6), (12) and (17), the problem to find the best collision avoidance decision course could be formulated as: Which subjects to, The equations comprise of many unknown quantities and nonlinear functions, traditional approaches will involve heavy computation requirements. The proposed collision avoiding steps are demonstrated in the diagram below in Figure 6a, while the flow chart of every single iteration is shown in Figure 6b.
(Step 1) The simple VO algorithm initially calculates the candidate desired course ψ k+1 under current ship status X k and the targeted ship X Tk . 2. ( Step 2) The controller and the ship model calculate the control parameters C pk+1 = [u k+1 , τ k+1 ] T and predicted own ship status X k+1 , u k+1 = [δ 1, δ 2, . . . δ t, ] T is rudder control sequence and τ k+1 is adjusting time of the ship when heading to the desired course ψ k+1 . 3. ( Step 3) The danger detection function (R = 1) indicates that own ship will be in a danger of collision if gets into the predicted status X k+1 by following the desired course ψ k+1 . 4.
(Step 4~Step 6) The VO algorithm recalculates a new desired ψ k+2 under the predicted own ship status X k+1 and predicted targeted ship X Tk+1 (assuming that the targeted ship steers in a constant speed), the controller and the ship model, on the bases of ψ k+2 and X k+1 , will update the adjusting time τ k+2 and predicted own ship status X k+2 . 5.
(Output) According to X k+2 if the value of the detection function turns to R = 0, the final desired course will be ψ k+2 , the adjust time τ k+2 , and the predicted own ship status X k+2 , otherwise R = 1 and the collision avoiding algorithm will repeat the steps 1~3.
Note: The safety domain of the targeted ship is assumed as a circular area, the candidate desired course will update after each iteration by increasing gradually but not larger than ±90 • , the iteration will not stop until there is an appropriate desired course and a safe predicted status (R = 0) for the own ship. The above procedures will converge in limited time, otherwise the procedures will throw an error indicating that the initial distance to the obstacle is so short that large course changing will not help even with a hard over rudder all the time.
J. Mar. Sci. Eng. 2021, 9, x FOR PEER REVIEW 10 of 25 5. (Output) According to if the value of the detection function turns to R = 0, the final desired course will be , the adjust time , and the predicted own ship status , otherwise = 1 and the collision avoiding algorithm will repeat the steps 1~3.
Note: The safety domain of the targeted ship is assumed as a circular area, the candidate desired course will update after each iteration by increasing gradually but not larger than 90°, the iteration will not stop until there is an appropriate desired course and a safe predicted status ( = 0) for the own ship. The above procedures will converge in limited time, otherwise the procedures will throw an error indicating that the initial distance to the obstacle is so short that large course changing will not help even with a hard over rudder all the time.

Returning to Waypoint Algorithm
For own ship returning to the scheduled route when the targeted ship is past and the clear, the LOS (light of sight) method is used to determine the desired course for returning. the angle to the next waypoint is the initial desired course . The problem is that the ship will not change its course immediately due to its maneuverability and thus may intrude the safety domain of the targeted ship. the method in part 3.1 for collision are applied, the returning problem expression can be obtained as to find the feasible desired course .
Subject to,

Returning to Waypoint Algorithm
For own ship returning to the scheduled route when the targeted ship is past and the clear, the LOS (light of sight) method is used to determine the desired course for returning. the angle to the next waypoint is the initial desired course ψ LOS .
The problem is that the ship will not change its course immediately due to its maneuverability and thus may intrude the safety domain of the targeted ship. the method in Section 3.1 for collision are applied, the returning problem expression can be obtained as to find the feasible desired course ψ LOS .
Subject to, The process of finding desired course ψ LOS based on LOS method is defined as a function of L(X 0 , X w ), Where the X 0 is the current status of own ship, X w is the position of the waypoint. M C p , ψ LOS is the ship model function predicting the future status X of own ship with the control variables C p = [u, t] T calculated by the controller function C(ψ LOS , X 0 ), u = [δ 1, δ 2, . . . δ t, ] T is the rudder sequences during the controlling time t (also called adjust time). X T is the predicted position of targeted ship from its initial status X T0 and velocity V T . The risk detection function will verify if the predicted X, X w and X T are in safe (R = 0) or not (R = 1).
As shown in the diagram (Figure 7), the algorithm steps are as follows: 1.
The returning desired course ψ k+1 is generated by LOS method (in the Figure 7a). 2.
The ship model as well as the controller model calculate the predicted status X k+1 of own ship and the targeted ship based on initial status X k (in the Figure 7b). 3.
The detection function finds that R = 1 based on predicted status, indicating that a collision accident is about to happen if the desired course ψ K+1 is followed (in the Figure 7b). The own ship then keeps on its initial course not returning to the way point for an interval. (in the Figure 7b,c), after that interval the own ship repeats Step 1~2 with the current status X k+1 , and then check the value of R this time, if it indicates safety, the own ship will return following the desired course ψ k+2 (in the Figure 7d-e).
The process of finding desired course based on LOS method is defined as a function of L( , ), Where the is the current status of own ship, is the position of the waypoint. is the predicted position of targeted ship from its initial status and velocity . The risk detection function will verify if the predicted , and are in safe (R = 0) or not (R = 1). As shown in the diagram (Figure 7), the algorithm steps are as follows: 1. The returning desired course is generated by LOS method (in the subfigure (a)). 2. The ship model as well as the controller model calculate the predicted status of own ship and the targeted ship based on initial status (in the subfigure (b)). 3. The detection function finds that = 1 based on predicted status, indicating that a collision accident is about to happen if the desired course is followed (in the subfigure (b)). The own ship then keeps on its initial course not returning to the way point for an interval. (in the subfigure from (b) to (c)), after that interval the own ship repeats Step 1~2 with the current status , and then check the value of R this time, if it indicates safety, the own ship will return following the desired course (in the subfigures (d-e)). The procedures above prevent the own ship from returning to the scheduled route when it is not safe and let the own ship keep its initial course waiting for next attempt, the waiting time is equal to the cycling interval of the whole collision avoidance system. The iteration will not stop until it finds the appropriate desired course ( = 0) to follow. The flowchart of each iteration is illustrated in Figure 8.  The procedures above prevent the own ship from returning to the scheduled route when it is not safe and let the own ship keep its initial course waiting for next attempt, the waiting time is equal to the cycling interval of the whole collision avoidance system. The iteration will not stop until it finds the appropriate desired course (R = 0) to follow. The flowchart of each iteration is illustrated in Figure 8. is the predicted position of targeted ship from its initial status and velocity . The risk detection function will verify if the predicted , and are in safe (R = 0) or not (R = 1). As shown in the diagram (Figure 7), the algorithm steps are as follows: 1. The returning desired course is generated by LOS method (in the subfigure (a)). 2. The ship model as well as the controller model calculate the predicted status of own ship and the targeted ship based on initial status (in the subfigure (b)). 3. The detection function finds that = 1 based on predicted status, indicating that a collision accident is about to happen if the desired course is followed (in the subfigure (b)). The own ship then keeps on its initial course not returning to the way point for an interval. (in the subfigure from (b) to (c)), after that interval the own ship repeats Step 1~2 with the current status , and then check the value of R this time, if it indicates safety, the own ship will return following the desired course (in the subfigures (d-e)). The procedures above prevent the own ship from returning to the scheduled route when it is not safe and let the own ship keep its initial course waiting for next attempt, the waiting time is equal to the cycling interval of the whole collision avoidance system. The iteration will not stop until it finds the appropriate desired course ( = 0) to follow. The flowchart of each iteration is illustrated in Figure 8.

Large Angle Crossing Problem
Due to the characteristics of the VO algorithm and the returning algorithm, an obvious defect exists that when the encountering ships are in a situation of large angle crossing with similar velocity on the beam of the own ship, the own ship will not return to the next waypoint for quite a long time. As shown in Figure 9 the two ships are almost parallel with no risk of collision, the VO algorithm will not function, but it is difficult for the own ship to return to the waypoint, the returning algorithm in will stop own ship's each attempt to return because when the ship changes its heading a small DCPA will generate. The own ship will keep its course for very long time until its LOS course is free out of the safety domain. General practice in navigation is to change course to the other side of the targeted ship with a large angle as is shown in the Figure 9.
, are velocities of own and targeted ship, = − is the relative velocity with respect to targeted ship, is the angle of , is the bearing angle, is the projection on D towards the targeted ship, it can be interpreted as approaching rate (departing rate if points to the other side) towards the targeted ship, we employ as the approaching time along the distance D (or departing time), it can be formulated as: So, the difficult large angle crossing situation exists when, where , , and are edge parameters of the approaching time, relative heading and distance, here we set = 100 , = 330°, = 30°, = 3 nm.  We proposed a method to identify the situation and let the ship change its course to the other side sharply enough for returning.
As shown in the Figure 10, where D is the distance between own and targeted ship, v o , v T are velocities of own and targeted ship, v r = v o − v T is the relative velocity with respect to targeted ship, θ r is the angle of v r , θ b is the bearing angle, v d is the projection on D towards the targeted ship, it can be interpreted as approaching rate (departing rate if v d points to the other side) towards the targeted ship, we employ T d as the approaching time along the distance D (or departing time), it can be formulated as: So, the difficult large angle crossing situation exists when, where t L , θ L , and d L are edge parameters of the approaching time, relative heading and distance, here we set t L = 100 s, θ La = 330 • , θ Lb = 30 • , d L = 3 nm.

Large Angle Crossing Problem
Due to the characteristics of the VO algorithm and the returning algorithm, an obvious defect exists that when the encountering ships are in a situation of large angle crossing with similar velocity on the beam of the own ship, the own ship will not return to the next waypoint for quite a long time. As shown in Figure 9 the two ships are almost parallel with no risk of collision, the VO algorithm will not function, but it is difficult for the own ship to return to the waypoint, the returning algorithm in will stop own ship's each attempt to return because when the ship changes its heading a small DCPA will generate. The own ship will keep its course for very long time until its LOS course is free out of the safety domain. General practice in navigation is to change course to the other side of the targeted ship with a large angle as is shown in the Figure 9.
We proposed a method to identify the situation and let the ship change its course to the other side sharply enough for returning.
As shown in the Figure 10, where D is the distance between own and targeted ship, , are velocities of own and targeted ship, = − is the relative velocity with respect to targeted ship, is the angle of , is the bearing angle, is the projection on D towards the targeted ship, it can be interpreted as approaching rate (departing rate if points to the other side) towards the targeted ship, we employ as the approaching time along the distance D (or departing time), it can be formulated as: So, the difficult large angle crossing situation exists when, where , , and are edge parameters of the approaching time, relative heading and distance, here we set = 100 , = 330°, = 30°, = 3 nm.  If the criterion in Equation (23) are satisfied, the system will report a large crossing situation problem and the decision course of own ship will be set to ψ d = ψ d ± 30 • (positive for starboard, and negative for left rudder).
The in Equation (23) means that if the targeted ship is near enough (D ≤ d L ), on the beam to the own ship (θ r ≥ θ La or θ r ≤ θ Lb ) and the approaching time for the two ships are relative long T d ≥ t L , the large angle crossing problem exits.

The Whole Framework of the System
This section describes the working orders of each modules of the whole system, as shown in the Figure 11, the whole system will start in a fixed interval, the own ship navigates in three shifts, avoiding collisions, keeping course and returning to route, the system will start in equal interval by checking the completion of the previous task by comparing the difference between the current heading and the desired. If the course is close to the desired within an allowable error, indicating the previous task is completed, collision detection starts. The collision avoidance module begins to work when there is any risk of collision, otherwise the returning module checks whether the situation is feasible to return to nest scheduled waypoint. The green colored collision avoidance sub-system is demonstrated in Figure 12, blue sub-system of returning is demonstrated in Figure 13. If the criterion in Equation (23) are satisfied, the system will report a large crossing situation problem and the decision course of own ship will be set to = 30° (positive for starboard, and negative for left rudder). The in Equation (23) means that if the targeted ship is near enough ( ≤ ), on the beam to the own ship ( ≥ or ≤ ) and the approaching time for the two ships are relative long ‖ ‖ ≥ , the large angle crossing problem exits.

The Whole Framework of the System
This section describes the working orders of each modules of the whole system, as shown in the Figure 11, the whole system will start in a fixed interval, the own ship navigates in three shifts, avoiding collisions, keeping course and returning to route, the system will start in equal interval by checking the completion of the previous task by comparing the difference between the current heading and the desired. If the course is close to the desired within an allowable error, indicating the previous task is completed, collision detection starts. The collision avoidance module begins to work when there is any risk of collision, otherwise the returning module checks whether the situation is feasible to return to nest scheduled waypoint. The green colored collision avoidance sub-system is demonstrated in Figure 12, blue sub-system of returning is demonstrated in Figure 13.   If the criterion in Equation (23) are satisfied, the system will report a large crossing situation problem and the decision course of own ship will be set to = 30° (positive for starboard, and negative for left rudder). The in Equation (23) means that if the targeted ship is near enough ( ≤ ), on the beam to the own ship ( ≥ or ≤ ) and the approaching time for the two ships are relative long ‖ ‖ ≥ , the large angle crossing problem exits.

The Whole Framework of the System
This section describes the working orders of each modules of the whole system, as shown in the Figure 11, the whole system will start in a fixed interval, the own ship navigates in three shifts, avoiding collisions, keeping course and returning to route, the system will start in equal interval by checking the completion of the previous task by comparing the difference between the current heading and the desired. If the course is close to the desired within an allowable error, indicating the previous task is completed, collision detection starts. The collision avoidance module begins to work when there is any risk of collision, otherwise the returning module checks whether the situation is feasible to return to nest scheduled waypoint. The green colored collision avoidance sub-system is demonstrated in Figure 12, blue sub-system of returning is demonstrated in Figure 13.   The difference between the collision avoidance and returning module is that the returning module will make sure that own ship is not in a large crossing encounter, if own ship is close to parallel with the targeted ship, a large angle of desired course change will be set.

Single Obstacles
Experiments are conducted by a single static obstacle and a single targeted ship to examine the effectiveness of the coordination between the decision and the controlling systems.
To clearly show that the comparative ship with traditional method enters the safety domain, the radius of all the safety domain is set as 0.5 nautical mile (926 m). For better illustration the unit are set as meter in this section.
The Figure 14 shows the results of avoiding single static obstacle, initial position of own ship is (0, 3000), the center location of the static obstacle is (2000, 3000), the unit is meter. The velocity of own ship is 15.5 kn, initial course 090. The gray area of polygon denotes an obstacle and the red circle is its safety domain. The black solid curve is the trajectory of own ship with coordination system while the dashed with normal method of VO algorithm.
The diagrams indicate that the ship with the proposed algorithm can avoid collision following more propriate course outside of the safety domain in contrast to the ship with simple VO algorithm. This is because the tradition method does not take the maneuverability into consideration. The desired course of proposed method is relatively larger (127.1° in contrast to 117.2°). The control angle is limited within 35°, and does not step too quick.
The Figure 15 presents the results of collision avoidance by single targeted ship with the time point of 40 s, 295 s and 500 s. The initial position of own ship is (0, 3000), the targeted ship starts at (3800, 3000), the unit is meter, the velocity of own ship is 15.5 kn, and the targeted ship 10 kn, the initial course of own ship is 090, the course of the targeted ship is 270. The difference between the collision avoidance and returning module is that the returning module will make sure that own ship is not in a large crossing encounter, if own ship is close to parallel with the targeted ship, a large angle of desired course change will be set.

Single Obstacles
Experiments are conducted by a single static obstacle and a single targeted ship to examine the effectiveness of the coordination between the decision and the controlling systems.
To clearly show that the comparative ship with traditional method enters the safety domain, the radius of all the safety domain is set as 0.5 nautical mile (926 m). For better illustration the unit are set as meter in this section.
The Figure 14 shows the results of avoiding single static obstacle, initial position of own ship is (0, 3000), the center location of the static obstacle is (2000, 3000), the unit is meter. The velocity of own ship is 15.5 kn, initial course 090. The gray area of polygon denotes an obstacle and the red circle is its safety domain. The black solid curve is the trajectory of own ship with coordination system while the dashed with normal method of VO algorithm.
The diagrams indicate that the ship with the proposed algorithm can avoid collision following more propriate course outside of the safety domain in contrast to the ship with simple VO algorithm. This is because the tradition method does not take the maneuverability into consideration. The desired course of proposed method is relatively larger (127.1 • in contrast to 117.2 • ). The control angle is limited within ±35 • , and does not step too quick.
The Figure 15 presents the results of collision avoidance by single targeted ship with the time point of 40 s, 295 s and 500 s. The initial position of own ship is (0, 3000), the targeted ship starts at (3800, 3000), the unit is meter, the velocity of own ship is 15.5 kn, and the targeted ship 10 kn, the initial course of own ship is 090, the course of the targeted ship is 270. At the time point of 295 s in the Figure 15, the own ship with proposed algorithm passes the safety domain of the targeted ship without entering the domain, while the own ship with normal method intrudes the circle. As shown in the figure of course changing, the heading change by the proposed method is around 6 • larger than that by simple VO.
As in Figure 16, the targeted ship is in a vertical crossing encounter situation with the own ship. The initial position of own ship is (0, 3000), the targeted ship starts at (2000, 3800), the unit is meter. The velocity of own ship is 15.5 kn, the targeted ship 6 kn. Initial course of own ship is 090, the targeted 180. At the time point of 260 s, the experiment shows the similar results to the previous test, the own ship takes a 8 • larger heading change in contrast to the one with normal method, and this leads to intrusion of the safe domain. At the time point of 295 s in the Figure 15, the own ship with proposed algorithm passes the safety domain of the targeted ship without entering the domain, while the own ship with normal method intrudes the circle. As shown in the figure of course changing, the heading change by the proposed method is around 6° larger than that by simple VO.
As in Figure 16, the targeted ship is in a vertical crossing encounter situation with the own ship. The initial position of own ship is (0, 3000), the targeted ship starts at (2000, 3800), the unit is meter. The velocity of own ship is 15.5 kn, the targeted ship 6 kn. Initial course of own ship is 090, the targeted 180. At the time point of 260 s, the experiment shows the similar results to the previous test, the own ship takes a 8° larger heading change in contrast to the one with normal method, and this leads to intrusion of the safe domain.

Multiple Ships
In this section, a series of more complicated scenarios called "Imazu problem" are tested in larger ranges. Imazu problem [46] is a scenario set including tests from basic situations of two ships to complex 3-4 ships in encounter as shown in the following plot.
The starting location of own ship of all the 22 cases is set to the position of (0, −6) the unity of which is nm (nautical mile), initial course 090, the velocities of all the ships are 11.7 kn with the exception in case 3, 7, 15, 20 and 22 where the overtaking situation happens, the targeted ship to be overtaken is set to navigate with the velocity of 7.8 kn. The goal waypoint for the own ship to return to is positioned at (0,6) in each case. The targeted ships are in a distance of 6 nm to the center (0, 0) of the map but in different courses from 000 to 270, the simulation time is set to not more than 6000 s. Different form the former experiments, the unit of the distance is nm (nautical mile), each grid denotes 2 nm in the map. The safety domain radius is set to 0.5 nm much larger than that in former

Multiple Ships
In this section, a series of more complicated scenarios called "Imazu problem" are tested in larger ranges. Imazu problem [46] is a scenario set including tests from basic situations of two ships to complex 3-4 ships in encounter as shown in the following plot.
The starting location of own ship of all the 22 cases is set to the position of (0, −6) the unity of which is nm (nautical mile), initial course 090, the velocities of all the ships are 11.7 kn with the exception in case 3, 7, 15, 20 and 22 where the overtaking situation happens, the targeted ship to be overtaken is set to navigate with the velocity of 7.8 kn. The goal waypoint for the own ship to return to is positioned at (0, 6) in each case. The targeted ships are in a distance of 6 nm to the center (0, 0) of the map but in different courses from 000 to 270, the simulation time is set to not more than 6000 s. Different form the former experiments, the unit of the distance is nm (nautical mile), each grid denotes In the Figure 17, the experiment group one, some of the trajectories indicate that the own ship can avoid all the collisions in a generally reasonable manner. While in case 6, 10, 12, 13, 14 and 17 the own ship fails to return to the waypoint. This situation is caused by large angle crossing problem, the ship is out of collision danger, when it attempts to return, the collision detection function finds it not appropriate to change course, so the ship keeps its course all along the experiment. In case 6 and 10 the own ship is parallel to the targeted ship 1, in case 12, 13, 14 and 17 the ship is parallel to targeted ship 2; in case 9, 11, 18 and 20 the large angle crossing situation also happens, while the own ship is successful in returning to the waypoint because of the relative position change as the ships navigate, while the change is too slow in case 22 that the own ship takes long time to return.  In addition, there are left rudders in 10 cases (1, 4, 6, 9, 11, 12, 14, 16, 18 and 22) out of all the 22 scenarios, which does not match with navigation practices. This is usually caused by the targeted ships coming from the right side. Thus, the COLREGS are necessary to constrain the collision avoidance manners.
The Figure 18 shows the more mature maneuvering manners by the test trajectories. All the collisions are avoided by the own ship with successful returning to the waypoint. The large angle crossing situation problem is eliminated.  The rudder turning are improved according to the collision rule constrains, with only 5 cases (6,12,14,18,20) turning to left. Our analysis is that the targeted ship is on the right side and too close to the own ship (e.g., in case 6, 12, 14, the initial targeted ship is in less than 1 nm, in case 18 and 20 the nearest targeted ship is in less than 2 nm). The own ship is allowed to turn to left if the situation is in an urgent situation without violating the COLREGS.
To make comparison in more details, the comparisons between trajectories before modification by large cross situation and COLREGs constraints and the modified version of case 6 ( Figure 19), case 4 ( Figure 20) and case 22 (Figure 21) are illustrated.
Another two sets of experiments are conducted with more than 4 targeted ships, in Figure 22, we make up a scenario by cases of 2, 3, 4, 6 and 10. In Figure 23 we set a scenario with 7 targeted ships heading in various directions which is different from all the Imazu problems.
The Figure 23 show the most complicated encounter situations with more than 5 vessels encountering. with the simulation time point of 1700s, 3400s and 5100s. The own ship is in various encounter situations with the targeted ships. The own ship turns on starboard rudder. The good manners of autonomous collision avoidance indicate the effectiveness of the proposed approaches. (c) (d) Figure 19. Comparison of case 6 for eliminating the large angle crossing problem. in the subfigure (a), heading of the own ship keeps its course close to the blue trajectory of the targeted ship and fails to return to the waypoint, the problem is solved in subfigure (b), the ship keeps its course firstly and then identify the large crossing situation, with its heading changes to the other side in a large angle, finally return to the way point successfully. The heading angles of subfigure (a,b) are shown in (c,d). (c) (d) Figure 19. Comparison of case 6 for eliminating the large angle crossing problem. in the subfigure (a), heading of the own ship keeps its course close to the blue trajectory of the targeted ship and fails to return to the waypoint, the problem is solved in subfigure (b), the ship keeps its course firstly and then identify the large crossing situation, with its heading changes to the other side in a large angle, finally return to the way point successfully. The heading angles of subfigure (a,b) are shown in (c,d).
(a) (b) (c) (d) Figure 20. Comparison of case 4 for constraining the course change by COLREGS, the course is in a left rudder in subfigure (a), in subfigure (b), it can be found that the own ship takes longer time to return to the waypoint, this is because the initial heading is close to the targeted ship, the large angle crossing situation forms, the ship steers in a large turn on the right side and then finds its way back to the waypoint. The heading angles of (a,b) are shown in (c,d). , it can be found that the own ship takes longer time to return to the waypoint, this is because the initial heading is close to the targeted ship, the large angle crossing situation forms, the ship steers in a large turn on the right side and then finds its way back to the waypoint. The heading angles of (a,b) are shown in (c,d).  (c) (d)

Discussions
The prediction accuracy is of great importance in the proposed coordination system, which needs the ship motion model and controller model to give the future status of own ship, thus the two models will always involve in the whole system. The prediction error

Discussions
The prediction accuracy is of great importance in the proposed coordination system, which needs the ship motion model and controller model to give the future status of own ship, thus the two models will always involve in the whole system. The prediction error will always exist and contributes to the problem of predictions. To be close to the reality,

Discussions
The prediction accuracy is of great importance in the proposed coordination system, which needs the ship motion model and controller model to give the future status of own ship, thus the two models will always involve in the whole system. The prediction error will always exist and contributes to the problem of predictions. To be close to the reality, we imposed a simple error of 10% on the autopilot so that the ship heading will never be exactly controlled to the ordered course, although the outcomes of the experiment is satisfied, we infer that this is because the disturbance is not large enough. There is not any model that could predict the ship maneuverability with little error, However, the advantage of using models is that instead of searching an optimum in a random space, it could give initial information as references for initial decision making and describe the maneuverability of ships to some extent.
The validation of collision avoidance algorithm will always need reasonable testing scenarios. The Imazu [46] problems offer a bunch of situations. The withdraw is that all the targeted ships will pass through the center of the map, resulting them actually colliding at the center, which will never happen in reality. The initial layout of the targeted ships in case 6, 12, 13, etc. are too close even less than 1 nm to the own ship, leading the experiment starting in an urgent situation. Even though Imazu problem has scenarios as many as 22 cases, much more testing sets are needed to check the effectiveness of the proposed algorithm. All the targeted ships are set on fixed velocity and heading, which is not the situations at sea.
For the collision avoiding manners abiding COLREGs, the own ships in 5 out of the 22 cases turn to left rudder because of the coming targeted ships form the right side with the distance less than 2 nm, this is reasonable in navigation practice. In some cases (e.g., 8,10,11,16) the own ship avoids collision by passing the bow of targeted ship. This implies that crossing the bow will also be carried out if the circumstance is safe enough.
The cycle interval of the system is undetermined in the work, we set that the system will start to function after every 20 s. If the time is too short, the ship will continuously get orders from the decision-making with the previous tasks uncompleted, the ship will not respond immediately because it cannot change status substantially in a very short time and the computation requirement is relatively heavy. On the contrary, if the time is too long, obviously the own ship may neglect potential risk or timing for returning.

Conclusions
Ships may deviate from its expected trajectory when avoiding collisions by changing its heading. If they are in large size with high inertia, there is an obvious lag between the controlling and the decision system. Aimed at the problem, a coordination system is designed to cover the gap and help for effective collision avoidance and returning to the waypoints in various encounter scenarios.
The controller is designed to work in a more practical manner. DCPA and the distance between other ships are involved to detect risk of collision for the timing of decision making; the situation dividing according to COLREGS are simplified to restrict the course changing direction; based on VO and LOS method, the collision avoidance and returning to the scheduled waypoint are accomplished, the VO method is modified by a recursive prediction algorithm while the LOS guidance is improved by large angle crossing function, All the parts above form a coordination system for autonomous collision avoidance system. The series of experiments including Imazu problem are conducted to test the effectiveness of the proposed algorithm.
The future research should be focused on the testing and validating of an autonomous ship, autonomous ship techniques have been developing rapidly, the demand is increasing to check if these algorithms have an extensive coverage of various conditions, this would be related to many other aspects, such as modelling and simulation, software test, performance evaluation, etc.