A real-time ship encounter collision risk detection approach in close-quarters situation

In order to identify ship collision risk for the security of maritime transportation in a close-quarters situation, a novel real-time ship collision risk awareness approach is proposed by developing a novel non-linear velocity obstacle set, QSD-NLVO. More specifically, the Quaternion Ship Domain model was introduced into the non-linear velocity obstacle algorithm, and the conflict position was reasonably defined. By replacing the conflict position with ship domain, the proposed method can more reasonably assess the safety radius of the conflict in different ship encounter scenarios. The presented model enhanced the accuracy of collision risk identification by replacing the collision position in non-linear velocity obstacle algorithm with quaternion ship domain. Finally, case studies were implemented to illustrate the effectiveness of the QSD-NLVO approach. The developed model may be utilized as a guide for investigating port traffic safety as well as a tool for maritime surveillance operators to monitor port traffic collision risks and increase traffic safety.


Introduction
Marine transport plays a crucial role in global trade and contributes to the development of the international economy.Meanwhile, with the increase in maritime traffic density and complexity, maritime accidents, especially collision accidents, occur frequently. 1,2It is therefore essential for the development of traffic conflict assessment tools to support maritime traffic monitoring and collision accident prevention.
To present, ship collision risk analysis/management research has mostly focused on three distinct topics: (a) semi-empirical risk analysis models, (b) crucial scenarios detection models, and (c) collision avoidance models. 3ased on accident records and expert judgment, semiempirical risk analysis assists in determining collision risk in a specific location.8][9] These models are beneficial for identifying areas where more stringent risk controls could be required and worthwhile for reducing collision risk in a particular maritime area.Using traffic data, research in (b) crucial scenarios detection models and (c) collision avoidance models may assist resolve issues with semi-empirical risk assessments (i.e., AIS data).The techniques used include velocity obstacle, 10,11 ship domain, 12,13 anti-collision action simulation models, 14 DCPA, and TCPA. 15,16Although the aforementioned techniques for assessing collision risk have advanced, there are still certain restrictions in this field.When confronted with significantly increased traffic volume or complexity, monitoring officers observe with subjectivity and at random in the majority of cases, with little knowledge of the global collision risk.Additionally, they could undergo somewhat higher cognitive strain due to complexity or high traffic density, which would reduce monitoring effectiveness and compromise maritime safety.This work created a real-time vessel pairs collision risk measuring model in a closequarters water environment to alleviate the aforementioned issues.The non-linear velocity obstacle algorithm and quaternion ship domain were combined in the presented model.The recommended method can improve the officer's situational awareness while identifying collision danger in real-time.
The remainder of this paper was arranged as follows.In Section ''Related work,'' work related to collision risk detection in encounters was illustrated.Section ''The proposed model for identifying the collision risk of ship encounter'' presented and discussed the suggested model's elaborate development.In Section ''Cases study and discussion,'' case studies were carried out to confirm the effectiveness and feasibility of the proposed model.Additionally, some discussions about the results were also analyzed in this part.In the end, the conclusion was depicted in Section ''Conclusion,'' and future work on this research was also presented.

Related work
Collision risk identification is the crucial step that may decrease accidents and enhance navigational safety in collision avoidance.Given this, a large number of scholars have conducted various studies regarding the recognition of collision danger.The Closest Point of Approach (CPA) idea, which is used in marine and aviation research, is a noteworthy methodology. 17istance to CPA (DCPA) shows the shortest distance between two ships, while Time to CPA (TCPA) shows how much time is left until CPA.Goerlandt et al. 18 included several indicators, such as the DCPA and TCPA, to develop their CRIs.
These approaches performed well in recognizing collision risk and taking the necessary safeguards.Zhang et al. 19,20 suggested a unique approach for identifying probable ship-ship near misses using AIS data.They created the Vessel Conflict Ranking Operator (VCRO) to determine the severity of a close call by taking into account the separation between the two ships, their respective speeds, and their divergent directions.
The ship safety domain is an additional concept aimed at mitigating the aforementioned threats.Ship domain is a generalization of safe distance that was developed based on the fact that safe distance is often longer or shorter in certain directions. 21,22Fujii and Tanaka 23 presented the domain for the first time as ''a two-dimensional region around a ship that other ships must avoid-it might be regarded the evasive area.''The ship domain by Fuji is an ellipse with the ship in its central point with major and minor axes specified in ship length.Goodwin suggested in reference 24 a domain comprised of discontinuous circular forms partitioned into three distinct sectors encompassing the ship.Another ship domain offered by Davis et al. 25 is a circular form that is off-center (to represent an important COLREGs requirement).Furthermore, Coldwell 26 presented a similar off-centered elliptic domain. 26Liu et al. 27 presented dynamic ship domain models for the capacity study of restricted water channels.Wang et al. 28 developed expanded analytical models of the domain, and they subsequently established the notion of dynamic Quaternion Ship Domain. 29,30Zhang and Meng 31 presented a model of the domain of probabilistic ships.Combining ship domain with CPA, this work 32 proposes a better approach for quantitatively determining the CR in ship navigation.Utilizing an affiliation function to indicate the magnitude of collision risk, fuzzy logic is also utilized to ship collision risk detection. 33,34Emerging machine learning algorithms estimate the danger of collision between boats.Park 35 suggested an improved machine learning approach for estimating ship collision risk and facilitating more reliable ship collision risk decisionmaking.Rawson and Brito 36 presented a thorough analysis of the academic literature in the marine realm on the subject of supervised machine learning and big data applications.
The velocity obstacle (VO) considers the target ship's velocity as a dynamic obstacle, taking into account both static and dynamic information, and provides real-time risk visualization. 14The non-linear velocity obstacle was employed in the maritime domain, 37 enabling the following functions: judging whether own ship is in danger and finding a suitable collision-free path.Using historical AIS data, an improved Time Discrete Non-linear Velocity Obstacle (TD-NLVO) method was presented to identify numerous ship contact scenarios. 38Huang et al. 39 summarized the Linear-VO, Non-linear VO, and Probabilistic VO, which are applied to support collision avoidance with target ships whose trajectories are non-linear (with time-dependent velocities) and (probabilistically) predictable.Additionally, Huang et al. 40 developed a collision avoidance system and provided a GVO algorithm for ship collision avoidance (GVO-CAS).The officer on watch can use this system to help prevent collisions by seeing the changes in course and speed on one ship that leads to them.

The non-linear velocity obstacle algorithm
In the beginning, the Non-linear Velocity Obstacle (NLVO) method was established in literature. 41This method assumes that the TS will travel in a straight path at a constant speed, but it also assumes that the TS's trajectory will be known in advance.The VO algorithm's primary goal is to pinpoint the velocity that causes a collision.The VO set is collection of velocityleading collision.The collision-free solution is the velocity out of VO set. 25The majority of collision risk measurements typically choose two ships in the current flow of traffic to assess the danger.Similar to the previous research, this one built the VO algorithm using two-ship situations.In this part, the VO algorithm's basic idea and its variants are described using the shipship encountering situation seen in Figure 1.Ship OS is set as the own ship under our control, and its position and velocity are denoted as P O (t) and V O (t).Ship TS is an encountering target ship, and its position and velocity are denoted as P T (t) and V T (t).
The velocity obstacle is a set of OS's velocities which is induced TS, noted as VO OjT .Consider two ships OSfL O , P O (t), V O (t)g and TSfL T , P T (t), V T (t)g in an encounter situation shown in Figure 1, both of which are represented by a circle with a diameter of their lengths.L, P(t), V(t) denotes length, position, and velocity of each ship at time step t.To obtain VO OjT , the length of the own ship is reduced to a point while the target ship was expanded into a circular area with a radius R = (L O + L T )=2.This area describes all the possible position of the own ship when a collision happens, which is also termed as ''conflict position (ConfP)'' 27,42 as equation ( 1) indicate: where : k k is the Euclidean distance.A collision is likely if the distance between two ships is less than the threshold.As a result, equation ( 2) can be used to express the need for a collision occurring at time slice t c .
Where È is Minkowski addition which means the elements in ConfP adds with P T (t).
Based on ship kinematics, we can expand the According to the equation (3), we have If OS maintains its current velocity for time t c , it will collide at that time if equation ( 4) is satisfied.Equation ( 4) can be satisfied by a set of velocities, which we can identify as VO: The linear VO algorithm is one of the VO algorithms.
The principle of the LVO algorithm is shown in Figure 1 and the detailed formula derivation procedure can be found in Goodwin. 24The main idea of the LVO algorithm is to assume target ship moves in a straight line at a constant speed.Thus, we have . The set of velocity obstacle is defined as LVO which can be written as: Where d OT

!
is the relative distance between own ship and target ship at time t 0 .
Unlike the LVO algorithm, the non-linear VO algorithm assumes that the motion of target ship is nonlinear and known.Figure 2 depicts the NLVO set.
If OS is set as a reference, that is, P O (t 0 ) = 0 0 .Therefore, equation ( 4) can be rewritten as: Hence, the NLVO set can be expressed as: Where P T (t) is the known position of the target ship at time t c after the start point t 0 , and P O (t 0 ) is the position of the own ship at start time t 0 .
is the condition for collision to happen at time t c .In equation ( 7), [ (P T (t c ) È ConfP) represents the trajectory of the target ship.In essence, the NLVO set can be seen as a projection of the target ship's trajectory from geographical space into velocity space with respect to the projection function The QSD-NLVO model for identifying the ship-ship collision risk Since ships are represented by a circle with a diameter of their lengths in VO algorithms, the ConfP is described by the sum of the radius of the two ships in an encounter.Thus, no matter what scenarios the ship encounters, the ConfP is an identical value.However, the urgency of collision danger in various encounter scenarios is different.In this case, the potential collision danger of ships cannot be identified as accurately as possible.To mitigate this problem, the Quaternion Ship Domain (QSD) model was introduced into the nonlinear velocity obstacle algorithm to redefine the dimension of the ConfP.The flow chart of this model is shown in Figure 3.
The model of the Quaternion Ship Domain was first put forward by Zhang et al. 16 The domain size is defined by the quaternion, which includes four radii, that is, front, aft, port, and starboard, which adequately account for variables affecting the domain (i.e., ship maneuverability, speeds, direction, etc.).The QSD is a region delineated by a closed curve connecting these four parts to the inner zone, as detailed below: where f : ð Þ is the function defining the boundary of the QSD and Q = fR fore , R aft , R starb , R port g is the quaternion.
And the boundary functions f q : ð Þ and f ce : ð Þ can be described as follows: The power k determines the shape of the QSD while the quaternion Q (i.e., R fore , R aft , R starb , R port ) identifies the ship domain size.Estimation formulae for parameters of the blocking area are referred to as estimate longitudinal and lateral radii in Q which can be given by:  R fore = 1+1:34 Inspired by the QSD model, the new dimension of the ConfP was redefined, noted as R QSDÀNLVO .And the R QSDÀNLVO is calculated as: Where Consequently, equation ( 8) can be rewritten into equation ( 14): Where P T (t) is the known position of the target ship at time t after the start point t 0 , and P O (t 0 ) is the position of the own ship at the start time point t 0 .
is the condition for collision to happen at time t.By using the aforementioned configuration of ConfP, it is possible to estimate the effect of the target ship on the velocity space of the own ship.Moreover, as the newly constructed ConfP is a function of the sailing velocity, as the ship's speed grows, the collision risk rises and the ConfP increases; conversely, as the ship's speed lowers, the collision risk reduces, and the ConfP decreases.This is in line with common sense.In addition, the QSD has logically taken into account the ship's capacity to maneuver and the encounter scenarios described in COLREGS.As a result, when used in conjunction with the QSD model and the NLVO algorithm, the suggested model may identify the probability of a possible collision during real navigation.The flow chart of the proposed QSD-NLVO method is shown in Figure 3.

Cases study and discussion
In this section, to demonstrate the performance of the presented QSD-NLVO model, three classical encounter scenarios under COLREGs were employed for simulation, that is, head-on scenario, crossing scenario, and overtaking scenario.We assume that throughout the encounter, the own ship travels continually in a straight line, and the target ship replies by avoiding the own ship.This approach recognizes possible collision dangers during ship interactions rather than collision avoidance.The configuration of the case study is shown in Table 1.

Scenario 1: Head-on situation
Two ships are involved in the head-on scenario: the own-ship (OS) and target-ship (TS).The space-fixed  coordinate system, seen in Figure 2(a), is denoted by the letters XOY, with the X and Y axes pointing, respectively, East and North of the earth.Additionally, the heading of ships is determined by the angle of rotation about the Y-axis in a clockwise direction.The simulation experiment was performed in an area of 2 nmi.The layout of the scenario is shown in Figure 4.
The initial position of OS is P O = ½1:4; 0, and her initial velocity is V O = 10kn.While initial position and velocity of TS are P T = ½1:35, 2 and V T = 10kn.A more detailed configuration is given in Table 1.
Moreover, the safety distance between two ships is set as D safe = 0:3NM.Accordingly, a collision will occur when there is less than 0.3 nmi between the two ships.It means that when the relative distance between two ships is less than 0.3 nmi, there will be a risk of collision.
At this time, the ship operator should take immediate measures to mitigate the possibility of collision.We assume that the velocity of TS in each time slice is known in advance.The TS shares her velocity over time with OS.Thereby, the trajectory of TS can be obtained.As can be seen from the Figure 5, when t = 418s, the relative distance between the two ships is minimum, 0.18 nmi, which is less than the set safety distance.It means that the two ships have collided.
By the conventional NLVO method, the collision risk can be detected and mapped in OS's velocity space.In Figure 6(a), the initial velocity of OS (the blue asterisk) is not inside the VO set, which indicates the OS will   not collide with TS.Nevertheless, according to the above mentioned, collision risk has occurred.On the contrary, collision risk had been identified by the QSD-NLVO approach.As observed in Figure 6(b), the blue mark indicating the velocity of the own vessel is inside the red speed barrier region.This implies that there is a possibility of collision between the two boats, and precautions should be made to prevent collision in an emergency.Results indicate that the suggested approach could successfully detect collision risks and offer shipping operators with early warning.This method allowed us to find a solution for ship navigators.Collisions can be avoided by changing the velocity so that the velocity vector is outside the set of velocity obstacle.

Scenario 2: Crossing situation
Scenario 2 was created to evaluate collision risk during crossing encounters.The layout of the scenario is shown in Figure 7.According to Table 1, the initial speed of the own ship and target ship is 14.1 and 10 kN, respectively.The initial heading angle of the own ship and target ship are 315°and 0°.The initial relative distance between two ships is 1.6 nmi, decreasing as the two ships sail.Figure 8 shows the trend of the relative distances of two ships during the crossing situation.And the minimum relative distance is 0.19 nautical miles at time   t = 388s.According to the set safety distance, there is a risk of collision during the crossover encounter.Nevertheless, the conventional NLVO algorithm do not make any warning about the potential collision risk (see Figure 9(a)).In this case, the effectiveness of the QSD_NLVO model was verified again.In Figure 9(b), we can see that the blue asterisk was located in the velocity obstacle set, indicating that collision risk exists.

Scenario 3: Overtaking situation
In the initial status, the initial velocity of the own ship is 13.4 kN, while the initial velocity of the target ship is 9.2 kN.The initial heading angle of the own ship and target ship are 45°and 0°, respectively.As seen in    Figures 10 and 11, the initial relative distance is about 0.61 nmi.And the minimum relative distance is 0.28 nmi at time t = 273s.Likewise, since the minimum relative distance is less than the set safety distance, there is a risk of collision.At this point, the traditional NLVO approach determines that there is no risk of collision between the two vessels, and the result is the opposite.In Figure 12(b), the blue asterisk is in the set of velocity obstacle, and there is a collision risk between two ships in the future.
In general, ship collision risk does not just happen at one moment but lasts for a while.The established QSD-NLVO model can detect the collision risk in real time to avoid collision conflict.Figures 13 to 15 show the duration of collision risk for ships in the above encounter scenarios, respectively.The presence of the collision conflict indicates that there is collision risk.More specifically, the three encounter scenarios above had a collision risk lasting 76, 90, and 218 s, respectively.
For each scenario, four moments were selected to test the proposed QSD-NLVO algorithm.The selection of moments follows this principle: the first moment is selected before the start of the collision conflict; the second and third moments are selected during the collision conflict, and the fourth moment is selected after the end of the collision conflict.Figures 16 to 18  shows the identification result at the selected four moments.When t = 343s and t = 514s, the blue asterisk is out of velocity obstacle set, which means there is no collision risk (see Figure 16(a) and (d)).Nonetheless, as shown in Figure 16(b) and (c), there is a collision risk between the two ships.Similarly, the same results can be obtained by analyzing Figures 17 and 18.On the basis of above analyses, it is obvious that the performance of the developed QSD-NLVO algorithm in this study for perceiving collision risk in the close-quarters situation.

Conclusion
In this work, a real-time collision risk detection model was proposed with the goal of precisely and effectively identifying the collision risk of ship encounters.The Quaternion Ship Domain model was introduced into the non-linear velocity obstacle algorithm, and the conflict position was reasonably defined.Several case-specific experiments were conducted to verify the efficacy of the proposed model.The trials' findings showed that the recommended model may successfully capture the overall collision risk when vessel pairs come into contact.This might help surveillance operators monitor the collision risk and increase maritime safety.Importantly, the model enables surveillance personnel to identify boats or vessel pairs with a relatively high collision risk and get a better comprehension of the overall danger of a collision between two vessels.Likewise, it will lessen their obligations while dealing with issues brought on by complexity or rather high traffic density.
Nevertheless, the proposed model still has a number of drawbacks that need be investigated further.For instance, the established model is relatively limited under the situation that there are few ships in the water area.And this paper focused on the risk identification of two ships in encounters without considering the multi-ship situation.Therefore, for future studies, the model should consider the multi-vessel encountering considering the AIS data.

Figure 1 .
Figure 1.Demonstration of linear velocity obstacle: (a) geographical display of encounter situation, (b) LVO set without considering ship dimension, and (c) LVO considering ship dimension.

Figure 2 .
Figure 2. Demonstration of non-linear velocity obstacle: (a) OS and TS in geographic space and (b) the NLVO set in velocity space.

Figure 3 .
Figure 3. Flow chart of the proposed collision risk detection model.
L = (L O + L T )=2, L O , L T denotes the length of own ship and target ship respectively.k AD and k DT represent gains of the advance A D and the tactical diameter D T respectively, and can be calculated as follows: k AD = A D =L = 10 0:3591 lg V own + 0:0952 k DT = D T =L = 10 0:5441 lg V own À0:0795(

Figure 5 .
Figure 5. Relative distance between OS and TS in scenario 1.

Figure 8 .
Figure 8. Relative distance between OS and TS in scenario 2.

Figure 11 .
Figure 11.Relative distance between OS and TS in scenario 3.

Figure 13 .
Figure 13.Periods of conflict exist in scenario 1.

Figure 14 .
Figure 14.Periods of conflict exist in scenario 2.

Figure 15 .
Figure 15.Periods of conflict exist in scenario 3.

Table 1 .
Configuration of three scenarios.