# Event-Based Path-Planning and Path-Following
## 5 Discussion  
The simulation experiments have shown that the developed event-based approach to real-time path planning is practical in most possible situations. However, we are far from the opinion that it provides rational behavior for the AUV in all circumstances. An example of the irrational behavior of the AUV is the simulation scenario 2 (see Figure 14), in which it is more advantageous for the AUV, after getting out of the U-shaped trap, to turn to the right and move along the obstacle, holding it on the right. The irrational behavior arises from the fact that an essential characteristic of the proposed approach is the reactivity of decision making without using global information about the environment, for example, in the form of a map incrementally built during the motion. The application of such models in path planning procedures will be studied further. In general, it is not easy to evaluate a path planning algorithm from a real-time perspective without conducting experimental work on real AUVs. However, extensive simulations can also be used in order to evaluate the algorithm for real-time applicability indirectly. For example, it takes less than 100 s on a computer with the Intel Core i7-8550U 1.8 GHz processor to run the simulation scenario 1 (with a sharp-edged obstacle) of 900 s from Section 4. Computations for this scenario, in addition to integrating the motion equation, generating paths, and updating control signals, also include rendering the scene. The computation time indicates that the proposed method has high potential for working in real-time. The efficiency of path planning is achieved due to some features of the proposed event-based approach. First, the path update regulated by the designed DES occurs when it is vital. Second,  
Figure 14: Simulation results for Scenario 2: U-shaped obstacle environment. The explanation of the figure is the same as that of Figure 9.  
Figure 15: Simulation results for Scenario 3: cluttered environment. The explanation of the figure is the same as that of Figure 9.  
the developed path planning algorithms do not rely on in-depth optimization: the algorithm based on the waypoint guidance method uses only a simple model of the environment built on raw data that were obtained from FLS and is not optimizing in its essence; the algorithm based on Dubins curves moves through only up to four path alternatives to choose the best one. Third, to determine the direction of bypassing detected obstacles, an in-depth analysis of the local environment is not performed: if two obstacle avoidance directions are equal, then the designed DES chooses one of them based on the analysis of forthcoming waypoints of the reference path. Finally, checking all of the triggering conditions does not require significant computing efforts. The developed approach to path planning is ideologically close to (and in many ways inspired by) [4; 14]. However, in contrast to these studies, we consider a more elaborate formulation of the path planning problem, in which the AUV has to move along a reference path, instead of trying to reach a static target point. Besides, we do not divide obstacles into classes and do not use separate planning algorithms for each class. Additionally, the robust convex outline algorithm proposed in the paper produces fewer points compared to the largest polar angle algorithm from [14], which reduces the number of path segments generated by the waypoint guidance method used in both studies. In the proposed event-based approach, a DES determines the obstacle avoidance behavior of the AUV. We designed the DES in such a way as to avoid situations that require the use of energy inefficient emergency modes [14]. These situations arise when any path generated by path-planning algorithms leads to a collision with an obstacle or dangerously approaches it. The logic of the AUV's behavior is described using concepts accepted in the theory of discrete event systems.