Han-Jin Lee and Key Pyo Rhee. Seoul National ... In this paper, a collision avoidance system is developed using the expert system and action space search.
DEVELOPMENT OF COLLISION AVOIDANCE SYSTEM BY USING EXPERT SYSTEM AND SEARCH ALGORITHM
Han-Jin Lee and Key Pyo Rhee Seoul National University, Department of Naval Architecture and Ocean Engineering, Seoul, Korea
Int. Shipbuild. Progr., 48, no. 3 (2001) pp. 197-212 Received: January 2001 Accepted: March 2001
In this paper, a collision avoidance system is developed using the expert system and action space search. Fuzzy theory is used to reason the degree of collision risk, and the A * search method is used to make an avoidance action plan. The action space searched by the ship is formed in the expert system using the marine traffic rules. Simulation results demonstrate that the collision avoidance system with the expert system takes more reasonable actions than the system without it.
1. Introduction In an effort to increase ship navigation efficiency, efforts to automate ship navigation systems are being made in two directions. One involves the automation of machinery, and the other the automation of the ship’s navigation systems. In this paper, we manage a collision avoidance problem that is one of the essential elements of automatic navigation. Reviewing current research, Hasegawa in 1987 approached the problem of collision risk using fuzzy theory [3], and used time to the closest point of approach (TCPA) and distance of the closest point of approach (DCPA) as input variables. Hara and Hammer approached the same problem in 1990 [1,2], but used relative distance and relative bearing changes. Generally, it is not easy to determine the collision avoidance action when there are many target ships to avoid in a relatively short time span. Generally two approaches have been taken to solve this problem. The first approach involves taking action to avoid the most dangerous ship in pursuance of the special or general traffic rules. The second one involves taking the safest action in the action space that the ship could examine.
198
Development of collision avoidance system
In 1984, Imazu and Koyama examined the collision probability based on the characteristics of radar error and simulated the collision avoidance maneuver using the second approach mentioned above [5,6]. Lee, Woo and Rhee developed a collision avoidance system by combining Imazu's algorithm and Hasegawa's reasoning method for the degree of collision risk [9]. Koyama and Yan built an expert system for a collision avoidance maneuver in 1987 [8]. In 1989, Hasegawa et al. developed a collision avoidance system by combining Koyama's expert system and Hasegawa's reasoning method [4]. On examining previous research, we realized that in an action space search the complex or special traffic rules cannot be fully considered, because the marine traffic rules consider an added weighting value to the degree of collision risk, and in the case of an expert system, because collision avoidance action is taken to avoid only one ship which is determined to be the most dangerous by comparing the degrees of collision risk for target ships, the other possible actions that a ship can take cannot be considered. Therefore, we undertook this work to develop a system capable of overcoming these weak points by combining an action space search and the expert system. In the present paper, the standard of judgment for collision risk is described using fuzzy theory, moreover, the A* search method is used to construct the avoidance action plan [11,12]. To verify this collision avoidance system, we carried out simulations of ships in the several environments.
2. Structure of system Figure 1 shows the flow chart of the developed system. As a first step, the expert system constructs the action space, but it does not determine an action on the basis of avoiding the most dangerous ship. It constructs an action set based upon the marine traffic rules, but then, as a second step, an action space search program examines all actions in the action space and determines safe actions. In this process, the degree of collision risk is reasoned using fuzzy theory. And, as a third step, the system finds the minimum cost course from all the safe actions determined in the second step. If the end point of the course is not the final point of the plan, the system estimates the next situation and repeats the above mentioned procedure. To find the minimum cost course, an A* search method is used. To determine the degree of collision risk and the avoidance action plan, the results of research by Rhee and Lee were used [12]. The degree of collision risk has a value from -1 to 1. The minus sign indicates that TCPA has a negative value. The larger the absolute value of the degree of risk, the more dangerous the situation.
Han-Jin Lee and Key Pyo Rhee
199
Figure 1. Flow chart.
1.2. Degree of collision risk The degree of collision risk was reasoned using the fuzzy reasoning method. TCPA and DCPA are used as input variables and nondimensionalized as described in the following equations, V , L 1 DCPA = DCPA , L where, L = ship length, V = ship speed. TCPA = TCPA
(1)
Figure 2 and Figure 3 show the membership functions of input variables. The part in which the degree of collision risk is determined has two inputs and one output, which allows the reasoning rules (Table 1) to be represented by a twodimensional matrix. For the conclusion, membership functions of the singleton type are used because it is known that this saves computing time compared to the triangular type [7]. For the defuzzification, the center of area method is used. When many ships exist, the degree of collision risk for the given environment takes the largest risk presented by all ships. The defuzzification equation is as follows.
200
Development of collision avoidance system
Figure 2. Membership functions of TCPA.
PS
PMS
1.2
2.4
PM
PMB
PB
3.6
4.8
6
1
0 0
7.2
DCPA / L
Figure 3. Membership functions of DCPA.
Table 1. Reasoning rules of the degree of collision risk.
NB T C P A
D C P A PS PMS –0.2 –0.2
PM –0.2
PMB –0.2
PB –0.2
NM
–0.6
–0.2
–0.2
–0.2
–0.2
NS PS PMS PM
–1.0 1.0 0.8 0.6
–0.6 0.8 0.6 0.4
–0.2 0.6 0.4 0.2
–0.2 0.4 0.2 0.2
–0.2 0.2 0.2 0.2
PMB
0.4
0.2
0.2
0.2
0.2
PB
0.2
0.2
0.2
0.2
0.2
Han-Jin Lee and Key Pyo Rhee
201
n
Collision Risk =
∑ CRi ⋅ αi i =1
n
(2)
∑ αi i =1
where, n= number of reasoning rules, CRi= singleton value of conclusion part of i - th rule, αi = contribution factor of conditional part of i - th rule. 2.2. Expert system The expert system is used to determine an action space but not the action itself. We built the expert system using CLIPS designed at NASA/Johnson Space Center [10]. It is composed of three modules entitled: MAIN, SITUATION and ACTION. The MAIN module controls communication between the expert system and the other parts of the collision avoidance system. It is this module that controls the execution of rules. The SITUATION module classifies each target ship into encounter situations, and marks each target ship as either privileged or burdened. In the ACTION module, defines the action space of own ship for each dangerous target ship in accordance with its encounter situation and the degree of collision risk. Although own ship is a privileged ship against a target ship, if the degree of collision risk is larger than a given criterion, an action space to avoid it is formed. The final action space is the union of each action space. An action space is composed with courses and speeds that own ship can take. 2.3. Determination of collision avoidance action The collision avoidance system searches for the safest action in the action space provided by the expert system. The rules for selection of the safest action are as follows. a. If there are actions that have associated degrees of collision risk below the given criterion of 0.6, the action closest to the planned course and navigation speed is selected. b. If such actions as mentioned in ‘a’ do not exist, the minimum risk action is selected. c. If all actions have a maximum value in terms of the degree of collision risk 1.0, the action with the maximum DCPA is selected.
202
Development of collision avoidance system
The original planned course is a straight line between two way points. In the collision avoidance action steps above, if the degree of collision risk exceeds a given value, 0.4, the alternative course of first choice is parallel to the straight line. If the degree does not exceed value, the planned course is towards the target way point. 2.4. Avoidance action plan When a ship is operating in a congested area, perhaps, it is common practice that a navigator form a long-range plan for collision avoidance, and that in accord with this plan, he executes collision avoidance action. We realized this procedure using the A* search method [11]. A* search is a method that finds the optimal path and minimizes the costs in accord with the following equation, Estimated total cost = Cost from starting node to current node + Estimated cost from current node to final end node.
(3)
Figure 4 shows the application of the A * search method to the avoidance action plan. A node is expanded into three branches, which are selected in descending order from the safest action among several safe actions. These three actions are terminated on the next interface. The search algorithm then estimates the total costs through every unexpanded end node. It finally determines a course in the layer having the smallest cost. Moreover, the above procedures are repeated in the next layer. In this search, five 500m layers are considered, which means that our collision avoidance system uses an avoidance action plan for 2.5 km.
Figure 4. A* search method.
Han-Jin Lee and Key Pyo Rhee
203
The cost between two nodes connected by a branch is as follows. Cost from node A to node B = Degree of collision risk on node A
(4)
× Time from node A to node B. In the case of the estimated cost to the final end node, the time and the degree of collision risk to the last interface are used when the original planned course is selected. The expert system defined in the previous chapter is called upon to find the action space during the expand process. Then, the course of own ship, an input parameter for the expert system, becomes the original planned course.
3. Numerical simulations
3.1. Maneuvering equations Because it is not necessary to use a strict model for ship dynamics, the K-T model was used for maneuvering simulation. The equations of motion are as follows. ˙˙ + ψ˙ = Kδ , Tψ TvV˙ + V = V * ,
(5)
where V * is ordered speed. Furthermore, to keep the course commanded by the navigation system, a controller to determine the rudder angle is needed. We chose a fuzzy controller that uses the difference between current yaw angle and commanded yaw angle and its time derivative as input variables [3]. 3.2. Simulation results To verify the capability of the developed system, we simulated a crossing situation with two tankers. The two ships were identical, and of length 320 m with an approach speed of 10 knots. Figures 5 to 8 show the cases when ship A is controlled by the system developed in this paper and ship B maintains its course with a constant speed of 10 knots, without considering whether the ship is privileged or burdened. Ship A is burdened ship in Figure 5 and privileged ship in Figure 7. In the figures, solid arrows indicate ship positions when collision avoidance action is started. Empty arrows indicate ship
204
Development of collision avoidance system
positions when ship A crosses the original path of ship B. In Figures 5 and 7, the courses of the ships are plotted, and Figures 6 and 8 are the records of the degrees of collision risk of ship A. In Figures 5 and 6, collision avoidance action is initiated on reaching a degree of collision risk of 0.6. In the traffic rules, a burdened ship must avoid a privileged ship by right turn. Therefore, in this case, although the degree of collision risk increases for a short while, ship A makes a right turn by the expert system. Strictly speaking, the expert system composes the action space with the incremental right hand turns, and the system chooses the safest action in the space. In Figure 7, the privileged ship A expects avoidance action to be taken by burdened ship B, however, ship B does not take appropriate action to change its course. In the event, ship A is obliged to commence collision avoidance action. In this case, the expert system composes the action space from right and left turns and speed reduction. The system chooses a right turn as the safest action, although it crosses over the bow of ship B. In Figure 7 and Figure 8, the collision avoidance action was initiated when the degree of collision risk reached 0.8. Figures 9 and 10 demonstrate the effectiveness of the expert system by comparing two cases with and without the adoption of the expert system. In the figures, solid arrows indicate positions at the instant when collision avoidance action is started. Empty arrows indicate the positions of ships at an instant when two ships are passing by each other. In the figures, it is apparent that the ship without the expert system takes smoother action, but in the real world, a navigator must make the largest avoidance action possible to indicate unequivocally his intention to the navigator of the target ship. The gradual course change shown in Figure 7 is not recommended. Figures 11 and 12 show the difference between the two cases with and without the avoidance action plan. The expert system is not included in these cases. In Figure 11, ship A chooses his safest action to avoid ship B, but after a while, this action is restricted by the geographical environment, and because these restrictions were not considered in his the first selection of avoidance, ship A gets in trouble with ship C due to the previous safest action. Figure 12 shows the trajectory of ship A in terms of the avoidance action plan. In comparison with Figure 11, the collision avoidance action is started earlier, and the magnitude of the action is smaller than that adopted in Figure 11. Figure 13 shows the trajectory of ship A using the avoidance action plan and the expert system. Collision avoidance is initiated earlier than that of the system not using the avoidance action plan. Compared with the previous system without the expert system but with the action plan, the magnitude of the action is larger. That is, the collision avoidance system applied in Figure 13 shows the trajectory which fully obeys marine traffic rules. Figures 14 to 17 show a general situation. There are three ships and three way- points in a geographically restricted area. Figures 14, 15 and 16 show the trajectories of ships over a period of one thousand seconds, two thousand seconds, and three
Han-Jin Lee and Key Pyo Rhee
205
thousand seconds, respectively. The figures show that all ships closely follow their original planned courses with the aid of the collision avoidance system. Figure 17 shows the degrees of collision risk of ship A. Because the actions of all ship are limited by their geographical restrictions, the degree of collision risk is generally large, but their maximum values are less than the 0.8 criterion value. 20000
Ship A Ship B 16000
x (m)
12000
8000
4000
0
0
4000
8000
y (m)
12000
16000
20000
Figure 5. Trajectories of burdened ship A and uncontrolled ship B. 1.0 0.8 0.6 0.4
CR
0.2 0.0 -0.2 -0.4 -0.6 -0.8 -1.0
0
500
1000
1500
t (sec)
2000
Figure 6. Degree of collision risk to the burdened ship A.
2500
3000
206
Development of collision avoidance system 20000
Ship A Ship B 16000
x (m)
12000
8000
4000
0
0
4000
8000
y (m)
12000
16000
20000
Figure 7. Trajectories of the privileged ship A and the uncontrolled ship B.
1.0 0.8 0.6 0.4
CR
0.2 0.0 -0.2 -0.4 -0.6 -0.8 -1.0
0
500
1000
1500
t (sec)
2000
Figure 8. Degree of collision risk of the privileged ship A.
2500
3000
Han-Jin Lee and Key Pyo Rhee
207
20000
Ship A Ship B 16000
x (m)
12000
8000
4000
0
0
4000
8000
y (m)
12000
16000
20000
Figure 9. Trajectories of the two controlled ships with the expert system.
20000
Ship A Ship B 16000
x (m)
12000
8000
4000
0
0
4000
8000
y (m)
12000
16000
20000
Figure 10. Trajectories of the two controlled ships without the expert system.
208
Development of collision avoidance system 20000
Ship A Ship B 16000
Ship C
x (m)
12000
8000
4000
Geographical Limit 0
0
4000
8000
y (m)
12000
16000
20000
Figure 11.Trajectory of ship A not considering avoidance action plan and without the expert system.
20000
Ship A Ship B 16000
Ship C
x (m)
12000
8000
4000
Geographical Limit 0
0
4000
8000
y (m)
12000
16000
20000
Figure 12. Trajectory of ship A considering avoidance action plan without the expert system.
Han-Jin Lee and Key Pyo Rhee
209
20000
Ship A Ship B 16000
Ship C
x (m)
12000
8000
4000
Geographical Limit 0
0
4000
8000
y (m)
12000
16000
20000
Figure 13. Trajectory of ship A considering avoidance action plan with the expert system.
20000
Ship A Ship B 16000
Ship C
Way Point
x (m)
12000
8000
4000
Geographical Limit 0
0
4000
8000
y (m)
12000
16000
Figure 14. Trajectories of three ships for one thousand seconds.
20000
210
Development of collision avoidance system 20000
Ship A Ship B 16000
Ship C
Way Point
x (m)
12000
8000
4000
Geographical Limit 0
0
4000
8000
y (m)
12000
16000
20000
Figure 15. Trajectories of the three ships for two thousand seconds.
20000
Ship A Ship B 16000
Ship C
Way Point
x (m)
12000
8000
4000
Geographical Limit 0
0
4000
8000
y (m)
12000
16000
Figure 16. Trajectories of three ships for three thousand seconds.
20000
Han-Jin Lee and Key Pyo Rhee
211
1.0 0.8 0.6 0.4
CR
0.2 0.0 -0.2 -0.4 -0.6 -0.8 -1.0
0
500
1000
1500
t (sec)
2000
2500
3000
Figure 17. Degree of collision risk of ship A in the general case.
4. Conclusion In the developed collision avoidance system, the degree of collision risk is reasoned using fuzzy theory. Collision avoidance action is determined by applying the action space search method, which is performed by the expert system according to the marine traffic rules. Furthermore, the A* search method is used to make the avoidance action plan. In the numerical simulations, the course of a ship equipped with the collision avoidance system with the expert system, looks more legal than those by the collision system without it. The action space search simplifies the design of the expert system because, in action space, the expert system does not need to determine the specific actions. A system incorporating the avoidance action plan gives better performance than one without. In terms of the system that only considers the avoidance action plan, it has been shown that collision avoidance action is taken earlier, and the magnitude of the action is smaller. Generally, the action changes become smaller and smoother. In a general situation such as those described, with way points and a geographically restricted area, the system shows good performance.
212
Development of collision avoidance system
Acknowledgement This work was partially supported by the Brain Korea 21 Project and Research Institute of Marine Systems Engineering, College of Engineering, Seoul National University.
References [1]
Hammer, A. and Hara, K., Knowledge acquisition for collision avoidance maneuver by ship handling simulator, MARSIM & ICSM 90, Tokyo, 1990, pp. 245-252. [2] Hara, K. and Hammer, A., A safe way of collision avoidance maneuver based on maneuvering standard using fuzzy reasoning model, MARSIM 93, St. Johns, 1993, pp. 163-170. [3] Hasegawa, K., Automatic collision avoidance system for ships using fuzzy control, 8th Ship Control System Symposium, Hague, 1987. [4] Hasegawa, K., Kouzuki, A., Muramatsu, T., Komine, H. and Watabe, Y., Ship auto-navigation fuzzy expert system (SAFES), J. of the Society of Naval Architecture of Japan, Vol. 166 (1989). [5] Imazu, H. and Koyama, T., The determination of collision avoidance action, J. of Japan Institute of Navigation, Vol. 70 (1984). [6] Imazu, H. and Koyama, T., The optimization of the criterion for collision avoidance action, J. of Japan Institute of Navigation, Vol. 71 (1984). [7] Isshiki, H., Algorithm for collision avoidance of a ship, J. of Kansai Society of Naval Architecture, No. 222 (1994). [8] Koyama, T. and Yan, J., An expert system approach to collision avoidance, 8th Ship Control System Symposium, Hague, 1987. [9] Lee, H.J., Yoo, W.J. and Rhee, K.P., Development of collision avoidance system by fuzzy theory, The Second Japan-Korea Joint Workshop on Ship & Marine Hydrodynamics, Osaka, 1993, pp. 164-169. [10] Giarratano, J. and Riley, G., Expert systems, PWS Publishing Co., 1994. [11] Gonzalez, A.J. and Dankel, D.D., The engineering of knowledge-based systems, Prentice Hall International, 1993. [12] Rhee, K.P. and Lee, H.J., Development of a collision avoidance system considering the navigation plan, MARSIM 96, Copenhagen, 1996, p p. 341348.