Online 3D path planning for Tri-copter drone using GWO-IBA algorithm

Robots at present are involved in many parts of life, especially mobile robots, which are two parts, ground robots and flying robots, and the best example of a flying robot is the drone. Path planning is a fundamental part of UAVs because the drone follows the path that leads it to goal with obstacle avoidance. Therefore, this paper proposes a hybrid algorithm (grey wolf optimization-intelligent bug algorithm (GWO-IBA)) to determine the best, shortest and without obstacles path. The hybrid algorithm was implemented and tested in the MATLAB program on the Tri-copter model, and it gave different paths in different environments. The paths obtained were characterized by being free of obstacles and the shortest paths available to reach the target. article under the CC


INTRODUCTION
Recently, mobile robots are starting to take ample space in daily life. They are used in the military, industry, agriculture, exploration, and research, and mobile robots need a pre-tagged target to determine the path to the desired target. So, these robots' path planning process is essential for the robot to reach the target safely and securely [1], [2]. The path planning process for ground robots is done by an algorithm that deals with a two-dimensional environment because the ground robot is moving in two directions (X, Y plane) while flying robots move in a three-dimensional environment [3], [4]. One of the vital mobile robots operating in the 3D environment is the drone [5], where at present, the Drones play an important role in daily life, especially in the military field, in addition to the civilian side of photographing and packages delivered, and in agriculture and discovery field [6], [7]. So, the path planning for the drone trip is crucial to driving the drones to the goal. The choice of the drone route should be fast, safe, and free from obstacles and select the shortest path to reach the desired target [8], [9]. Many researchers have studied methods different to determine the best path for the drones.
Most of the research has dealt with a quadcopter drone model like; (Zhang et al. [10] proposal to plan online route UAV using Various differential development algorithm [10]). (Ragi and Chong [11] proposed UAV Path Planning in a Dynamic Environment via Partially Observable Markov Decision Process [11]). (Chen et al. [12] proposed UAV layout using the artificial domain update method using optimal control theory [12]). (Primetista et al. [13] suggested risk and aware of the planning path of the UAVs in urban environments [13]). (Nguyen et al. [14] proposed online track chart joint detection, tracking multiple objects with wireless markers [14]).

1335
In this paper, a Tri-copter model was used to test a suggested algorithm that determined the best path for a trip in addition to avoiding obstacles in a dynamic 3D environment described in section two. In sections three and four, a hybrid algorithm grey wolf optimization-intelligent bug algorithm (GWO-IBA) was proposed to determine the best and shortest path with obstacles avoidance. The algorithm was applied to a Tri-copter model using the MATLAB program to simulate the model and the algorithm in section five.

PROBLEM STATEMENT
In the beginning, assume that the Tri-copter plane has a radius (r) and is located at the starting point with coordinates (xs, ys, zs). What is required is that the Tri-copter moves from the starting position to the desired target with coordinates (xg, yg, zg) in a 3D environment that has dynamic and static obstacles between the starting point and the target. So, the required is to draw a flight path in a 3D environment from the beginning to the endpoint. This path should be barrier-free (avoid obstacles), be the shortest available paths, and it should choose and calculate the path in real-time and speed during the flight process. The cost function for the algorithm that maps this path is: The cost function is a distance between the current point and target, which minimizes the distance between the starting point and the ending point. Any algorithm that works to reduce the distance between two points will meet the local minimum point's problem, as the algorithm cannot exit from this point as shown in Figure 1, therefore need to propose an algorithm that deals with this problem.

OPTIMIZATION TECHNIQUE GWO-IBA
In general, the wolves have a robust capacity to catch the victim. Wolves live in social life and, any group of wolves has a rigid social hierarchy, as shown in Figure 2 [15]. The wolves' group leadership hierarchy can be divided into four kinds of wolfs: omega, delta, beta, and alpha, where alpha is the best individual. The alpha wolf is the leader wolf in the group, and all other wolves should follow it. The second-best individual is beta that can be three wolfs. The beta is vassal wolves that assist the alpha in making a decision. The delta is the third-best individual in the group; they are vassal also. Delta wolves depend on the beta and alpha, but they command on the omega, and the rest of the wolf group count as omega. In this optimization method (GWO), the optimal solutions are leading by alpha, beta, and delta [16], [17]. They lead residue wolves (omega) to the optimal point in the searching area, as shown in Figure 2. In the optimization process, as shown in (2) and (3) used to update the locations of wolves [19], [20].
where (n) is an iteration, are vectors can be calculated by use as shown in (4) and (5) where (N max) is a maximum iteration of the searching, 1 and 2 are a random vector [0, 1]. In mathematical calculations of how to catch grey wolves, it was assumed that alpha, beta, and delta knew the possible location of prey. Therefore, the three best solutions are saved, and the other wolf group is obligated to update their positions according to the best research process, as shown in the following as shown in (7)-(13) [21].

1337
The GWO algorithm was chosen to determine the shortest optimal path, with some modifications to the algorithm to deal with the 3D environment. Its ability to avoid obstacles in addition to mixing it with the Intelligent Bug Algorithm (IBA) [22] in case the algorithm reaches the local minimum value of the distance. Where the Bug Algorithm is an algorithm used to avoid obstacles as the robot, after detecting the obstacle, moves Along the boundaries of the obstacle until it reaches the point where the obstacle was detected (completes a cycle around the obstacle) and then calculates the best point to move through it to the target. Then the algorithm was developed into Bug-2 where it relied on the calculation of slope as shown in (14) where the leave point it when the slope equal to the original slope. Some research has been done to make the algorithm smarter, but it still works in a two-dimensional environment [23], [24]. Where ( 1 , 1 ) is the start point and ( 2 , 2 ) is endpoint.

PROPOSED METHOD
The wolf moves in three directions x, y, z, as shown in Figure 3 in a three-dimensional environment. The algorithm is modified to choose the shortest path for prey and avoid obstacles in the way. However, the algorithm stops and cannot return if it reaches a local minimum point because all the solutions proposed by the algorithm will move it away from the target. It means all new proposed points will have a greater distance than the distance of the local (existing) point to the destination. So, it was combined with the Bug algorithm to make it more intelligent. The built-in modified algorithm (hybrid algorithm) can avoid obstructions and exit from the local minimum points of distance from the target. In other words, the grey wolf algorithm selects the shortest obstacle-free path by finding new points for the transport of the Tri-Copter. Suppose this algorithm fails to find points closer to the target and is free of obstacles. In that case, the other algorithm works by drawing a path along with the barrier until it reaches the opposite side of the obstacle where the wolf algorithm can operate. Moreover, the flowchart is illustrated in Figure 4 how the algorithm works and defines it for the shortest path free of obstacles.

SIMULATION RESULTS
The Tri-copter movement was simulated in the MATLAB 2020a program. A three-dimensional environment was painted with different obstacles. The starting point and endpoint specified, and the hybrid algorithm tested according to the parameters list used to run the algorithm are listed in Table 1. The results are shown in Figures 5-8. In Figures 7 and 8, the small red points (red path) refer to the path generated by the GWO algorithm, and the small blue points (blue path) refer to a path generated by the IBA.

DISCUSSION
The previous results showed that the hybrid algorithm was able to solve the problem of the local minimum point that it faced in the GWO or any traditional algorithm that deals with immediate path planning. Thus, its superiority over the traditional algorithms by choosing the shortest path and avoid obstacles. Moreover, the proposed algorithm has achieved suitable results in drawing the path without problems, as shown in Figures 5 and 8, adding to the algorithm has the ability to dealing with various obstacles in the three-dimensional environment.

CONCLUSION
In this paper, a hybrid algorithm (GWO-IBA) was proposed where this algorithm based on grey wolf behaviour and Bug's behaviour. The proposed algorithm draws a path for the movement of the plane in a threedimensional environment. This path is the shortest paths available at present (optimal local path) and is free from obstacles. Moreover, choosing the path was done with a minimum number of search iterations that mean a fast process. The results shown above can observe the (GWO-IBA) algorithm's performance to lead the drone from the starting point to the endpoint (the desired target) without collisions or stopping points. Furthermore, the drone size was taken into account to map a path that avoids collisions with obstacles.