*Article* **Research on Early Warning of Ship Danger Based on Composition Fuzzy Inference**

#### **Zhiying Guan, Yan Wang, Zheng Zhou and Hongbo Wang \***

State Key Laboratory on Integrated Optoelectronics, College of Electronic Science and Engineering, Jilin University, Changchun 130000, China; guanzy18@mails.jlu.edu.cn (Z.G.); yanwang20@mails.jlu.edu.cn (Y.W.); zhouzheng20@mails.jlu.edu.cn (Z.Z.) **\*** Correspondence: wang\_hongbo@jlu.edu.cn; Tel.: +86-0431-85148242

Received: 10 November 2020; Accepted: 4 December 2020; Published: 8 December 2020

**Abstract:** Ship collision avoidance measures are important for reducing marine accidents caused by human factors and various natural environmental factors and can also prevent property loss and casualties. In recent years, various methods have been used to study collision avoidance, including ship domain models. This paper proposes a ship domain model based on fuzzy logic aimed at providing early warning of ship collision risk and a reasonable reference that can be used in combination with the International Regulation for Preventing Collisions at Sea (COLREGs). The composition fuzzy inference combining more than one fuzzy inference process is first used to introduce as many factors as possible related to ship collision risk for calculating the ship domain. In this way, the calculation of the ship domain size is more accurate, and a more accurate reference can be provided to sailors, which could save both time and labor by reducing errors. A fuzzy inference system based on if-then fuzzy rules was established in MATLAB and simulation experiments were conducted. The simulation results suggest that the proposed method is feasible and can help sailors make subjective decisions to effectively avoid the occurrence of collision accidents.

**Keywords:** collision avoidance; ship domain; fuzzy inference; collision risk; early warning system

#### **1. Introduction**

In recent years, with advances in science and technology, maritime traffic has increased and brought many conveniences to human life. However, the increasing complexity of maritime traffic has gradually led to more safety problems. Frequent ship collisions cause serious economic losses and threaten the safety of passengers and crew members. Furthermore, worsening environmental pollution caused by ship collisions cannot be neglected. Despite a large body of research and methods devoted to reducing collisions at sea, ship collision accidents are inevitable. Thus, ship collision avoidance has become a research hotspot.

To minimize ship collisions, thereby increasing the safety of ships sailing at sea and reducing the associated losses, researchers in various countries have explored a range of methods for ship collision avoidance. According to the European Maritime Safety Agency's review [1] of maritime casualties in 2017, EU member states reported 3145 maritime accidents in 2016. More than half of these accidents were caused by ship collisions, and more than 60% of the collisions were caused by human error. Thus, reducing human errors during navigation at sea has become an important focus of research, with an emphasis on improving the navigator decision-making processes.

Algorithms such as the genetic algorithm, neural network, and distributed algorithm have been applied to ship collision avoidance problems. In addition, automatic radar plotting aid (ARPA) and automatic identification system (AIS) have been used to help make collision avoidance decisions. ARPA offers accurate information about the bearing and distance of nearby obstacles, while AIS provides important information about the ship's course, speed, and position. These data provide

a powerful basis for effective ship collision avoidance. By far, many researchers have studied the ship domain in different waters with the help of AIS data. For example, Xiang et al. [2] proposed a calculation method for ships in restricted waters based on AIS data. Hansen M.G. et al. [3] used AIS data to study the ship domain in the bridge area and crossing waters and Zhang et al. [4] develop an effective big AIS data-driven approach to determine the probabilistic ship domain. Ding et al. [5] used AIS data to make statistics on the ship domain of different types of ships and ships of different sizes in open waters. Although research using AIS is now common, these systems can only be used as assistant tools to identify obstacles and offer additional navigation information. While these tools provide accurate and reliable information for navigators as the basis for decision-making, sailors cannot use this information to make navigation decisions.

Some algorithms have been used to aid ship navigation decision-making systems. For example, Li et al. [6] used an improved multiobjective algorithm to plan the collision avoidance trajectory of ships and to suggest safe navigation routes. In addition, Li et al. [7] studied ship collision avoidance using distributed algorithms for preventing multi-ship collisions at sea. Tsou and Hsueh [8] combined the ant colony algorithm with onboard AIS and geographic information system (GIS) systems for safe and economical collision avoidance route planning. The algorithms mentioned above, and others, can be used to plan the general ship collision avoidance route for multiple ships in the same water area, but the management of temporary accidents has not been well studied.

Previously, there have been researchers who used fuzzy logic to study navigation issues. Lee et al. [9] proposed a fuzzy logic ship autonomous navigation algorithm based on COLREGs criterion. The VFF (Virtual Force Field) method is improved and applied to the autonomous navigation of ships. However, the fuzzy inference system is mainly based on COLREGs, which lacks sufficient consideration of the interference caused by various factors in navigation. Grinyak et al. [10] proposed a fuzzy decision-making system about the motion's danger level that combines Mamdani and Sugeno fuzzy inference systems, but it mainly considered a model of the relative motion of two vessels and neglected the environmental factors. Namgung [11] proposed a fuzzy inference system that expressed appropriate collision risk index corresponding to level. It can measure the fuzzy risk index, but it cannot play a direct role in the sailor's decision warning. In this paper, composition fuzzy inference is carried out by comprehensively considering the ship's own factors and environmental factors when the ship is sailing at sea, giving the ship early collision warning and reminding the sailor to take measures to avoid collision.

When malfunction occurs or the ship fails to sail along an expected path or at an expected speed, the sailor's timely response is crucial. In the past, sailors' decisions were based on experience but with further research on the behavior of the navigating ships and intelligence science and technology, collision risk warnings can be achieved by other means. For instance, the ship domain model can be used to evaluate collision risk. Ship domains represent a defined area around the ship that other ships should not enter to ensure that the ship navigates safely through waters. Thus, the ship domain can be used as a standard safety measure and a reference parameter for evaluating collision risk, and it is also the basis for taking actions in ship collision avoidance.

The concept of ship domains was first proposed by Japanese scholar Fujii [12] as an elliptical domain proportional to the length of the ship. Goodwin [13], Davis [14], Coldwell [15], and others were inspired to establish other ship domain models' statistical observations. Vander Tak et al. [16] used the ship domain model to calculate the frequency of ship encounters for assessing maritime traffic hazards. Later, the ship domain concept was further extended. Pietrzykowski and Uriasz [17–19] introduced the notion of the fuzzy ship domain and defined ship domains in both open waters and restricted waters. Qu et al. [20] proposed three ship collision risk indicators based on the ship domain to quantitatively evaluate ship collision risk in a strait. Wang et al. [21] proposed a fuzzy quaternion ship domain model (FQSD) and used analytic expressions to describe models. Zhou et al. [22] introduced the dynamic fuzzy ship domain and established a ship domain model to determine collision risk between ships.

In this paper, the ship domain is used as the criterion for assessing collision risk. When other ships enter the ship domain, the situation becomes urgent and the ship must take action to avoid an imminent collision. Therefore, it is necessary to study the range and size of the ship domain. This paper proposes a fuzzy logic approach. The size of the ship domain is regarded as a fuzzy value that varies with the external environmental factors. A fuzzy control method is adopted to obtain a reasonable value of the ship domain by considering the dangerous inviolable area of each ship. Through fuzzification, fuzzy reasoning, and defuzzification, a reference for collision avoidance between ships is provided to effectively assist navigational decision-making.

In view of the fact that there are many factors that affect the ship domain, a single fuzzy inference may not be able to consider as many influencing factors as possible, which limits the number of factors. So, the factors considered in the study of ship collision warning were always limited in the past. Moreover, environmental factors such as navigation density and fairway visibility are always ignored. However, removing too many factors from the model can lead to excessive errors. The proposed composition fuzzy inference method combines the results of multiple fuzzy inferences and then performs fuzzy inference, retaining as many relevant factors as possible, which solves the problem of oversize errors caused by too many factors that need to be deleted in the past, thereby providing a more accurate estimate of the ship domain size, which can be used for more accurate and timely warning of collision danger to reduce the occurrence of collisions.

In addition, the previous research can only obtain the relationships between the ship domain and certain single factors. Here, the fuzzy logic method was used to not only obtain the changes in the ship domain with certain factors but also to simulate the influence of multiple factors on the size of the ship domain, which enables a more accurate description of the ship domain size. The proposed ship domain model could save both time and labor and enable the ship domain concept to be better applied in navigation systems.

The rest of the paper is organized as follows. Section 2 describes the ship domain and its influencing factors, various factors are selected to determine the shape of the ship domain, and less significant factors are removed. In Section 3, a fuzzy inference model of the ship domain is established considering five influencing factors including both own ship factors and environmental factors. In Section 4, the simulation platform and inference system are introduced and the simulation experiments and results compared with the traditional methods are presented. In Section 5, we summarize the advantages of the proposed method and the importance of early warning systems for preventing ship collisions.

#### **2. Ship Domain Model and Influencing Factors**

#### *2.1. Ship Domain*

Fujii [12] defined ship domain as "The area around the previous ship most of the following ship's sailors avoid entering." The dimensions of the ship domain are related to factors such as ship speed, density, and tidal current. The first established ship domain model was oval shaped, as shown in Figure 1. Fujii assigned a specific numerical value to the ship domain size based on observations of maritime traffic, making it no longer an abstract concept, and demonstrated that the range of ship domain varies with the navigation conditions and waters. Later, other scholars introduced ship domains, which were mainly elliptical [2–5]. Therefore, in the present, an elliptical ship domain was selected.

**Figure 1.** Fujii's ship domain model.

#### *2.2. Factors A*ff*ecting the Ship Domain*

The ship domain depends on the sailor's maneuvering, however, the sailor's response is based on objective facts and also influenced by various factors. Therefore, the ship domain is affected by many subjective and objective uncertainties, including human, ship, environment, and management factors, and changes dynamically. The ship domain may also vary with its factors for different research purposes and different types of waters under different environmental conditions. The main factors are as follows:


The influence of various uncertain factors on the ship domain is complex, which makes it difficult to determine the relationships between ship domain and each factor. The influencing factors in the ship domain must, therefore, be analyzed and factors that have an obvious influence on the size of the ship domain should be selected, which can significantly reduce the complexity of studies of the ship domain.

At present, research on the ship domain is mostly aimed at open waters or restricted waters, and ship domains in diverse waters are suitable for different situations. In this study, we consider open waters. Management factors are not considered since they are not highly relevant in opens waters. Zhou's work [22] shows that the type of ship has little effect on the size of the ship domain, and its impact is mainly reflected in the speed of the vessel. Thus, the impact of ship type will not be considered in this study to simplify the ship domain model.

According to previous analyses with multiple sample data, among the many factors affecting the size of the ship domain, there is a clear trend in size, speed, and encounter angle of the ship. The size of the ship domain is also affected by navigation density and fairway visibility, whereas the sailor class and ship type have little effect on the size of the ship domain and no obvious rules have been defined. This paper considers three own ship factors, including ship length, ship speed, and encounter angle between two ships, and two environmental factors, including maritime navigation density and fairway visibility.

#### **3. Composition Fuzzy Inference Based on Ship Domain**

Herein, the influence of various factors on the size of the ship domain are determined. The shape of the ship domain is not discussed. The ship domain was assumed to be an ellipse. Since the position of the ship inside the domain is different in every study, only the size of the ship domain is assessed. The lengths of the major and the minor axes of the ellipse can determine its area. The situation is similar when these lengths are used for fuzzy control. However, the major axis length could better predict collision risk and was therefore selected as the output variable, indicating the impact of each factor on the size of the ship domain.

In this paper, five factors influencing the ship domain are considered: ship length, ship speed, encounter angle between the two ships, navigation density, and fairway visibility. The excessive number of factors make single fuzzy reasoning impossible because the formulation of excessive fuzzy rules is extremely complicated and may produce large errors. Therefore, the composition fuzzy reasoning method is adopted. First, the influence of the ship's own factors on the size of the ship domain is simulated through fuzzy inference to form ship domain model D1. Then, the environmental factors are simulated to form ship domain model D2. Finally, models D1 and D2 are combined. After fuzzy inference, ship domain model D can be defined as the ship domain model simultaneously affected by the ship's own factors and environmental factors, as shown in Figure 2.

**Figure 2.** Composition fuzzy inference model.

#### *3.1. Fuzzy Ship Domain A*ff*ected by Ship's Own Factors*

#### 3.1.1. Fuzzy Control

Fuzzy control is the process that performs fuzzy inference on input variables to transform the fuzzy output values into crisp output values using the following steps:


$$\mathbf{x} = f \mathbf{z}(\mathbf{x}\_0) \tag{1}$$

$$z\_0 = df(z),\tag{2}$$

where *x*<sup>0</sup> is the crisp input value, *x* is the fuzzy set, *f z* represents the fuzzification operator; *z* is the fuzzy value of the control output, *z*<sup>0</sup> is the clarity value of the control output, and *d f* represents the defuzzification operator.

To consider the influence of different factors on the ship domain model, three critical factors are selected as the input linguistic variables, i.e., the ship's own size, the ship speed, and the encounter angle between the two ships. The major axis length of the elliptical ship domain is the output variable. Fuzzy control is performed to obtain a crisp output quantity of the size of the ship domain. A block diagram of the fuzzy control process of the ship domain model is shown in Figure 3.

**Figure 3.** Block diagram of fuzzy control process for ship domain model influenced by ship's own factors.

#### 3.1.2. Fuzzy Linguistic Variables and Fuzzy Sets

Fuzzy linguistic variables are fuzzy sets expressed in fuzzy language, simply referred to as linguistic variables, and can be divided into input linguistic variables and output linguistic variables. Each fuzzy linguistic variable has multiple fuzzy linguistic terms whose names usually have certain meanings, such as very small (VS), small (S), medium small (MS), medium (M), medium big (MB), big (B), very big (VB), etc.

The ship's own size, ship speed, and encounter angle between the two ships are selected as the input linguistic variables. The size of the ship domain is the quantity of fuzzy control selected as the output linguistic variable.

Each linguistic variable is composed of a set of fuzzy linguistic values, which constitutes a fuzzy set. For each linguistic variable, each fuzzy set of values has the same range.

The size of the ship itself can be represented by the length and breadth of the vessel. In this paper, "ship length" (L) is regarded as an input linguistic variable, which is divided into three fuzzy linguistic terms: small (S), medium (M), and big (B). That is to say, the values of the fuzzy set of the input linguistic variable "ship length" are {S, M, B}. By referring to the relevant data of ship size, the range of ship length is [30,400] and the unit of ship length is in meters (m). Similarly, after investigating typical ship speeds, the range of input linguistic variable "ship speed" (V) is [0,30] in kn. The values of the fuzzy set "ship speed" are also {S, M, B}, again representing small (S), medium (M), and big (B).

For the "encounter angle between the two ships" (E), the influence of the encounter angle on the size of the ship domain is more complex, therefore, more fuzzy linguistic terms must be selected, but it is also more precise. The input linguistic variable "encounter angle" is divided into seven fuzzy linguistic terms: very small (VS), small (S), medium small (MS), medium (M), medium big (MB), big (B), and very big (VB). That is, the values of the fuzzy set "encounter angle" are {VS, S, MS, M, MB, B, VB}. The encounter angle is symmetrical to the ship, the bow direction is 0◦, and the stern is 180◦, which is determined as [0,180].

The output linguistic variable is the length of the long axis of the ship domain, represented as D1 here. The range of the output variable can be roughly determined by reviewing existing data on ship domain sizes. The range of output linguistic variable "ship domain size affected by ship's own factors" D1 is [150,3500] and the values of the fuzzy set are {S, MS, M, MB, B}, corresponding to five fuzzy linguistic terms: small (S), medium small (MS), medium (M), medium big (MB), and big (B).

#### 3.1.3. Fuzzy Membership Functions

A linguistic variable has multiple linguistic terms and each linguistic term corresponds to a membership function. In the MATLAB Fuzzy Logic Toolbox, there are Gaussian, triangular, trapezoidal, bell-shaped, sigmoidal, л-type, and Z-type membership functions. Here, the triangular and trapezoidal membership functions are selected to describe the linguistic variables, with *a*, *b*, *c*, and *d* as the parameters, and the formulas are as follows, respectively:

$$f(x,a,b,c) = \begin{cases} 0, & x \le a \\ \frac{\frac{x-a}{b-a'}}{\frac{c-x}{c-b'}}, & a \le x \le b \\ \frac{\frac{c-x}{c-b'}}{0, & x \ge c \end{cases} \tag{3}$$

$$g(\mathbf{x}, a, b, c, d) = \begin{cases} 0, & \mathbf{x} \le a \\ \frac{\mathbf{x} - a}{b - a}, & a \le \mathbf{x} \le b \\ 1, & b \le \mathbf{x} \le c \\ \frac{d - \mathbf{x}}{d - c}, & c \le \mathbf{x} \le d \\ 0, & \mathbf{x} \ge d \end{cases}.\tag{4}$$

The parameters in the formulas are affected by the range of each linguistic value of the linguistic variable.

Figure 4 shows the membership functions of three input linguistic variables and one output linguistic variable. The input linguistic variable "ship speed" (V) selects only the triangular membership function, while the input linguistic variables "ship length" (L) "encounter angle between the two ships" (E), and the output linguistic variable "ship domain size" (D1) not only selects the triangular membership function but also uses the trapezoidal membership function. The Fuzzy Logic Toolbox in MATLAB was used to draw the membership functions, which not only reflects the membership function of the input and output linguistic variables but also clearly shows the linguistic term and range of input and output linguistic variables, as well as the relationship among each linguistic term of each linguistic variable.

**Figure 4.** Fuzzy membership functions: (**a**) ship length (L), (**b**) ship speed (V), (**c**) encounter angle (E), and (**d**) ship domain size affected by ship's own factors (D1).

#### 3.1.4. Fuzzy Inference

The fuzzy inference system applies fuzzy logic to map a given input to the output. In fuzzy inference systems, fuzzy rules can describe human experience and knowledge in the form of fuzzy language. A set of fuzzy logic inference systems is composed of many fuzzy inference rules. The number of fuzzy rules is the Cartesian product of the fuzzy linguistic variables and membership sets.

In the present study, there are three input linguistic variables. The input linguistic variable "ship length" has three membership sets, S, M, and B, "ship speed" also has three membership sets, S, M, and B, and "encounter angle" has seven membership sets, VS, S, MS, M, MB, B, and VB. Therefore, the number of fuzzy rules is 63. The fuzzy rules are presented in Table 1. The Mamdani model is the most commonly used fuzzy inference method and is adopted in the present study.


**Table 1.** Fuzzy rules for ship domain size (D1).

After the input and output linguistic variables are selected, their ranges and fuzzy sets are determined. The membership functions of the input and output linguistic variables are also selected as well as the fuzzy reasoning model. The MATLAB Fuzzy Logic Toolbox was used to establish the fuzzy inference system, taking the ship length (L), ship speed (V), and encounter angle (E) as the input variables and the ship domain size (D1) as the output variable.

#### *3.2. Influence of Environmental Factors on Fuzzy Ship Domain*

#### 3.2.1. Fuzzy Control Process

The influence of environmental factors on the fuzzy ship domain affected are also considered. Two factors, navigation density and fairway visibility, are selected as input linguistic variables and the long axis length of the elliptical ship domain is taken as an output linguistic variable. Fuzzy reasoning can be performed to obtain the ship domain size. A block diagram of the fuzzy control process for the ship domain model is shown in Figure 5.

**Figure 5.** Block diagram of fuzzy control process for ship domain model affected by environmental factors.

#### 3.2.2. Fuzzy Linguistic Variables and Fuzzy Sets

In this paper, "navigation density" N is divided into five fuzzy linguistic terms: small (S), medium small (MS), medium (M), medium big (MB), and big (B). Therefore, the values of the fuzzy set of the input linguistic variable "navigation density" N are {S, MS, M, MB, B}. After consulting relevant data on navigation density, the range of navigation density is determined as [0,600], referring to the number of ships passing per unit time. Generally, 24 h is taken as the unit time.

Similarly, after investigating the visibility in a certain area, the range of the input linguistic variable "fairway visibility" K is [0,25] in km. The values of the fuzzy set "fairway visibility" are {S, MS, M, MB, B}, which represent the five fuzzy linguistic terms of fairway visibility, respectively, small (S), medium small (MS), medium (M), medium big (MB), and big (B). For the output linguistic variable, "ship domain size affected by environmental factors" D2 is selected to distinguish from the ship domain size D1 influenced by the ship's own factors. The range of the ship domain size (D2) is consistent with that of the ship domain size affected by ship's own factors (D1), which is [150,3500], and the values of the fuzzy set are {S, MS, M, MB, B}.

#### 3.2.3. Fuzzy Membership Functions

The triangular membership function and trapezoidal membership function are again selected to describe the linguistic variables, as shown in Figure 6.

**Figure 6.** *Cont.*

**Figure 6.** Fuzzy membership functions: (**a**) navigable density (N), (**b**) fairway visibility (K), and (**c**) ship domain size by environmental factors (D2).

#### 3.2.4. Fuzzy Inference

The fuzzy rules of navigation density, fairway visibility and ship domain size are shown in Table 2, and the Mamdani fuzzy reasoning method is adopted.


**Table 2.** Fuzzy rules for ship domain size (D2).

#### *3.3. Ship Domain of Composition Fuzzy Inference*

#### 3.3.1. Fuzzy Control Process

The fuzzy ship domain is affected by both the ship's own factors and environmental factors. Using the composition inference method, ship domain size affected by the ship's own factors (D1) and ship domain size affected by environmental factors (D2) can be obtained and are taken as the input linguistic variables. The long axis size of the oval ship domain is taken as the output linguistic variable, expressed as D. In other words, under composition fuzzy inference, the size of ship domain is affected by both ship's own factors and environmental factors. A block diagram of the fuzzy control process for the ship domain model is presented in Figure 7.

**Figure 7.** Block diagram of fuzzy control process for ship domain model.

#### 3.3.2. Fuzzy Linguistic Variables and Fuzzy Sets

Both the input linguistic variable and the output linguistic variable are the ship domain size; "ship domain size affected by the ship's own factors" D1 and "ship domain size affected by environmental factors" D2 are the input linguistic variables; and "the ship domain size affected by comprehensive factors" D, which is influenced simultaneously by both the ship's own factors and environmental factors, is the output linguistic variable.

Since the input and output linguistic variables both represent values of the ship domain long axis size, their range and fuzzy linguistic terms are the same and can be divided into five fuzzy linguistic terms: small (S), medium small (MS), medium (M), medium big (MB), and big (B). The values of the fuzzy set are {S, MS, M, MB, B}. The range is [150,3500].

3.3.3. Fuzzy Membership Functions

The membership function is shown in Figure 8.

**Figure 8.** Fuzzy membership functions: (**a**) ship domain size affected by ship's own factors (D1), (**b**) ship domain size by environmental factors (D2), and (**c**) ship domain size affected by comprehensive factors (D).

#### 3.3.4. Fuzzy Inference

The fuzzy rules are presented in Table 3. The Mamdani fuzzy reasoning method is adopted.


**Table 3.** Fuzzy rules (D).

#### **4. Results**

The MATLAB Fuzzy Logic Toolbox was used to construct and then simulate the fuzzy inference system, then the relationships between the size of the ship domain and influencing factors, including ship length (L), ship speed (V), encounter angle (E), navigation density (N), and fairway visibility (K) were obtained, as shown in Figure 9.

**Figure 9.** Variation of ship domain size with influencing factors: (**a**) ship length (L), (**b**) ship speed (V), (**c**) encounter angle (E), (**d**) navigation density (N), and (**e**) fairway visibility (K).

The ship domain shows a trend of gradually increasing with the increase in size and speed of the ship, but gradually decreases with increasing encounter angle. Simultaneously, the size of the ship domain gradually decreases with increasing navigation density and fairway visibility, i.e., the smaller the navigation density, the lower the visibility and the larger the ship domain size. However, the ship domain does not have a linear relationship with these single factors. Thus, it can be seen, the influence result of each factor on ship domain obtained by fuzzy inference is similar to other studies [22].

The comprehensive influence of various two-factor combinations on the size of the ship domain were also simulated, as shown in Figure 10. The surface diagrams illustrate the trends of each set of influencing factors on the size of the ship domain as well as the specific size of the ship domain when concrete values of the two factors are input into the MATLAB simulation platform.

**Figure 10.** Comprehensive influence of various two-factor combinations on the size of the ship domain: (**a**) ship length (L) and ship speed (V), (**b**) ship length (L) and encounter angle (E), (**c**) ship speed (V) and encounter angle (E), and (**d**) navigation density (N) and fairway visibility (K).

The MATLAB Fuzzy Logic Toolbox was used for simulations and the specific size of the ship domain was obtained by determining the input. The results of the fuzzy simulations are shown in Figure 11. When specific values are assigned as inputs, i.e., the values of ship length (L), ship speed (V), encounter angle (E), navigation density (N), and fairway visibility (K) are determined, the size of the ship domain can be obtained. This article makes the simulation when two ships are in the head-on situation as an example, when the "ship length" L = 215 m, the "ship speed" V = 15 kn, the "encounter angle" E = 5, "navigation density" N = 420, and "fairway visibility" K = 10 km, and "the major axis length of the elliptical ship domain" D = 2990 m. If the ship does not encounter any other ships at this time, appropriate actions should be taken according to the length of the semimajor axis and the International Regulation for Preventing Collisions at Sea (COLREGs).

**Figure 11.** *Cont.*

**Figure 11.** Fuzzy simulation results: (**a**) ship domain size affected by ship's own factors (D1), (**b**) ship domain size by environmental factors (D2), and (**c**) ship domain size affected by comprehensive factors (D).

Figure 12 shows the ship domain of the own vessel and the encounter situation between the own vessel and a target vessel sailing in one direction. Taking the major axis of the ellipse as the diameter and the center of the ship as the center of the ship domain, a circle tangent to the ellipse was drawn. From Figure 12, it can be easily observed that when the "encounter angle" E = 5, the two ships are in the head-on situation, the own vessel receives a collision risk warning when the target vessel is 1495 m away and collision avoidance actions according to COLREGs should be taken to avoid an urgent situation.

**Figure 12.** Ship encounter situation.

In other encounter situations, it is also possible to simulate the value of a ship domain, when other ships reach this distance and receive a collision risk warning, the sailor must consider whether or not to take action immediately. There is also a collision risk between the two ships at this time, therefore, the sailor should be on the lookout and be prepared to take measures at any time to avoid a collision. Thus, the length of the major axis of the ship domain can determine the collision risk, which can provide an early warning to help sailors in the subjective decision-making process to avoid collisions.

In the past, most ship domain models have been too complex since many factors affect the ship domain. Researchers have previously chosen to ignore certain factors while retaining more important factors based on experiential knowledge. For most situations, own ship factors such as ship length, ship speed, and encounter angle have an important influence on the size of the ship domain owing to the limitations of the single simulation method. Environmental factors are often viewed as less important and abandoned due to limitations on the number of factors required. Nevertheless, environmental factors have some influence on the ship domain. Although wind and wave have little

influence, factors such as fairway visibility and navigation density have a greater impact on the size of the ship domain. Therefore, the influence of certain environmental factors on the ship domain cannot be ignored. Taking these factors into account undoubtedly reduces experimental errors in determining the size of the ship domain, which makes the ship domain a more valuable warning signal. For example, when only the ship's own factors were considered in the present study, the ship domain size was D1 = 3190 m. In this case, the ship would receive the danger warning at 1595 m, instead of 1495 m, and take unnecessary measures to avoid collision. Premature preventive measures waste time, manpower, and material resources. Fuzzy reasoning can be used to synthesize various factors and produce more accurate simulation results, leading to fewer errors, which can save both time and unnecessary labor.

The traditional early warning methods of ship collision mainly rely on the ship's Collision Risk Index (CRI) to complete. It refers to the possibility of collisions between ships. Generally, when CRI = 0, it means that the ship is far away from the target ship and there is no danger of collision; when CRI = 1, it means that no matter what collision avoidance actions are taken, a collision will occur between the two ships. Most studies took CRI = 0.5 as the basis of whether to take action when establishing a ship collision avoidance decision model. If CRI > 0.5, then collision avoidance action is required. If CRI < 0.5, there is no danger of collision, just lookout.

The calculation of CRI usually depends on the distance of closest point approach (DCPA) and the time of closest point approach (TCPA). Many researchers have adopted different methods to calculate CRI by input DCPA and TCPA. Some of them adopted fuzzy inference methods [23] and some adopted fuzzy comprehensive evaluation [24]. The calculation of TCPA and DCPA is the first thing to do. The calculation process is shown as follows. Figure 13 is a diagram of ship relative motion parameters.

$$D\mathbb{C}PA = R\_l \cdot \sin(\varphi\_\tau - a\_l - \pi) \tag{5}$$

$$T\mathbb{C}PA = R\_l \cdot \sin\left(q\tau\_\tau - a\_l - \pi\right) / \upsilon\_{\tau\_\tau} \tag{6}$$

where *v*<sup>τ</sup> is the relative speed of the target ship, ϕτ is the angle of the relative speed of the target ship, *Rt* is distance between two ships, α*<sup>t</sup>* is the true position of the target ship relative to own ship. The calculation formulas are as follows.

**Figure 13.** Diagram of ship relative motion parameters.

The specific solution process will not be introduced in detail, but the calculation of the relative speed and the relative course between the two ships requires the speed and course of the own ship and the target ship. This means that adopting this method to judge the collision risk index should obtain not only the speed and course of the own ship, but also that of the target ship.

As can be seen from the article and the simulation results, when the composition fuzzy inference based on the ship domain is adopted, only the ship's and environmental information at a certain moment need to be obtained, and there is no need to judge the status of the target ships, even static obstacles. As long as there are obstacles within the danger warning range during sailing, it will receive the collision warning and need to take avoidance actions. This makes the judgment of collision risk simpler and faster, and can also solve the limitation of judging only dynamic obstacles when judging the collision risk based on the CRI.

When judging the collision risk adopting the traditional method, the result obtained is the CRI of the target ship relative to own ship at a certain moment and position, and it can only be known whether it is necessary to take action at this time. However, the collision risk distance of the ship at a certain moment is obtained by the composition fuzzy inference. The method is more intuitive, more applicable, and has a certain predictability, which can give the sailor more reaction time.

At the same time, the data provided by the AIS system required by the traditional method does not contain environmental factors, and to a certain extent the impact of environmental factors on ship collisions is ignored. The composition fuzzy inference method has smaller errors.

The comparison table between composition fuzzy inference and traditional methods is shown in Table 4.


**Table 4.** The comparison table between composition fuzzy inference and traditional methods.

#### **5. Conclusions**

In this paper, the ship domain was regarded as the safe domain for avoiding collisions between vessels. To establish the model, the ship domain was represented as a fixed ellipse and certain factors affecting the ship domain were considered. Not only the ship's own factors that have a greater impact on the ship domain are selected but also the environmental factors that have relatively small impact on the ship domain are added. Then, composition fuzzy inference of the selected factors was used to determine collision risk according to the range of the ship domain. The simulation results provide a reference for implementing collision avoidance actions in different ship encounter situations, which can improve the subjective decision-making of sailors and reduce the probability of collision. Compared with traditional methods of studying ship collision danger warning, the research process of collision danger of composition fuzzy inference is simpler and faster, the result is more intuitive, more applicable, and with fewer errors and has a certain predictability, which can remind the sailor to make preparations in advance.

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

**Funding:** This research received no external funding.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


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

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

MDPI St. Alban-Anlage 66 4052 Basel Switzerland Tel. +41 61 683 77 34 Fax +41 61 302 89 18 www.mdpi.com

*Journal of Marine Science and Engineering* Editorial Office E-mail: jmse@mdpi.com www.mdpi.com/journal/jmse

MDPI St. Alban-Anlage 66 4052 Basel Switzerland Tel: +41 61 683 77 34

www.mdpi.com

ISBN 978-3-0365-5920-9