3-D Path Planning for Multi-UAVs with Full Area Surveillance Based on Particle Swarm Optimization

: Collision-free distributed path planning for the swarm of unmanned aerial vehicles (UAVs) in a stochastic and dynamic environment is an emerging and challenging subject for research in the ﬁeld of a communication system. Monitoring the methods and approaches for multi-UAVs with full area surveillance is needed in both military and civilian applications, in order to protect human beings and infrastructure, as well as their social security. To perform the path planning for multiple unmanned aerial vehicles, we propose a trajectory planner based on Particle Swarm Optimization (PSO) algorithm to derive a distributed full coverage optimal path planning, and a trajectory planner is developed using a dynamic ﬁtness function. In this paper, to obtain dynamic ﬁtness, we implemented the PSO algorithm independently in each UAV, by maximizing the ﬁtness function and minimizing the cost function. Simulation results show that the proposed distributed path planning algorithm generates feasible optimal trajectories and update maps for the swarm of UAVs to surveil the entire area of interest.


Introduction
Unmanned Aerial Vehicles (UAVs), known as drones, gained much popularity in the area of surveillance due to their capability in vertical take-off and landing, and high maneuverability, which provides various benefits in various platforms or environments. UAVs can be also used for surveilling [1] providing security to the larger government or private area known as estates [2], and also can be used for sensing and data collection [3,4]. However, when defining a mission, path planning plays a basic and crucial role in the whole system. Generally speaking, when designing a path for UAV, it should reflect various factors, including dynamic target point, obstacles avoidance both statically and dynamically, the shortest pathfinding, as well as mission planning while surveilling. Nowadays, UAVs are widely used for various purposes, especially for surveilling because of the small size and lightweight, easy operational procedure, and tremendous benefits of easy access from one place to another place. UAVs are gaining more popularity in surveillance. For this reason, path planning for UAVs is more crucial, and it plays a fundamental role in the autonomous flight system for unmanned aerial vehicles (UAVs). It refers to the optimal path planning problem of an unmanned aircraft, which can be formulated as an optimization problem of finding the most compatible path from source to destination. The feasible trajectory is usually correlated with the path minimizing certain optimization indexes, for example, energy consumption, flight risk, path length, etc. of certain path planning missions.

Related Work
While thinking about generating path planning for UAVs, we have to consider the scenario, whether it is a two-dimensional (2-D) environment or a three-dimensional (3-D) environment. There are various path planning strategies regarding both 2-D and 3-D environments. As we are working with UAVs, which are related to the 3-D environment, we have focused mainly on path planning in the 3-D environment. There are so many path planning algorithms regarding the 3-D environment, which can be categorized into five categories [5]. These include, (i) Sampling-Based Algorithms, like, visibility graph, corridor map [6], Rapidly-exploring Random Tree (RRT) [7], 3-D Voronoi [8] (ii) Node Based Optimal Algorithms, such as, Dijkstra's Algorithm [9], A* algorithm [10], D* algorithm [11], (iii) Mathematics Model-Based Algorithms, like, Linear Programming and Optimal Control [12], Binary Linear Programming [13], Nonlinear Programming [14,15], (iv) Bio-inspired Algorithms, which can be divided into two types, Evolutionary Algorithm [16], and Neural Network [17], and (v) Multi-fusion Based Algorithms [18]. There are various types of Evolutionary Algorithm, such as, Genetic Algorithm [19], Memetic Algorithm [20], Particle Swarm Optimization (PSO) [21], and Ant Colony Optimization (ACO) [22], which are notable for the path planning of UAVs in the 3-D environment. Evolutionary Algorithms are the algorithms that update the results in iteration-by-iterations. In our proposed 3-D path planning methodology, we used Particle Swarm Optimization (PSO), due to its benefits like the advantages of easy implementation, simple parameter settings, fast convergence speed, and for which the PSO algorithm has been widely used in various fields, such as, functions optimization, neural networks training, and fuzzy logic system control are notable. However, it has some limitations too, like premature convergence, route self-crossing. The authors in [23] suggest that this problem can be solved by using the following techniques, (1) adjust important parameters iteratively; (2) random grouping inversion strategy for avoiding premature convergence. In terms of area coverage, various techniques have been suggested by various authors, such as the authors in [24] decomposed the concave region into a convex sub-region, then the flight direction was determined based on the width of the convex polygon. Some adjacent sub-areas were merged to avoid unnecessary repetitive movement. In [25], the authors proposed a new approach relative to UAVs' capabilities assessment by using hierarchical fuzzy inference and established a cost model for UAVs' mission execution. The authors in [26], believed that a rectangle can be circumscribed by any polygon. The idea of polygon region segmentation was adopted by the authors in [27]. The sweeping technique was used for area decomposition by the authors in [28], to minimize the number of UAV, turns inside the subareas by generating the optimal number of lanes. In [29], for moving targets, the formation coverage search method was proposed. The authors in [30][31][32][33] discussed distributed path planning using the PSO algorithm and the designing of the quadrotor control.

Main Contributions
The objective of this paper is to develop a distributed path planner for multi-UAVs with full coverage for certain operational areas with a priority-based mechanism. For this, we propose a distributed trajectory planner based on Particle Swarm Optimization (PSO) and Bresenham Algorithm. PSO is used to generate the optimal trajectory, while the Bresenham algorithm is used for ensuring the full coverage of the operational area. To generate the optimal trajectory, we propose a multi-objective fitness function, where energy consumption and flight risk are taken care of, as well as the maneuverability and feasibility of the paths are taken into consideration. This paper is organized as follows, we provide a System Model for UAVs Path Planning and representation of the operational area in Section 2. In Section 3, we discuss the mathematical model for optimal trajectory planning. In this section, we design the Dynamic Fitness Function of the Objective and Constraint function of UAVs. In Section 4, we propose a distributed trajectory planner based on PSO and Bresenham algorithm. Section 5 contains Simulation results and discussions about our implementation of the proposed trajectory planner. In Section 6, we conclude our paper.

System Model for UAV Path Planning
We have built a Matlab-based operational environment where we mimicked a real-life environment like terrain and flat surfaces to represent the 3-D environment. This work is a continuation of our previous work [1], where we derived the optimal surveillance trajectory for multiple UAVs and detected the existence of any illegal UAVs, which had a centralized control system. In that scenario, the trajectory planner did not have the functionality of full coverage for a certain operational area. In this paper, we developed a system model for full coverage of the operational area for multi-UAVs in a distributed manner along with a priority-based mechanism.

Problem Description
In our operational scenario, which is a 3D operational space with local maxima was surveilled by the monitoring drones with specifications mentioned by Hu Teng et al. [1], which were employed to detect the existence of illegal drones. During the surveillance, we explain that the monitoring drone cannot infiltrate any sensitive or important area, which is restricted by regulations. To avoid complexity or being destroyed as a hostile drone, we stipulate that the monitoring drone cannot also access the ground-base station (GBs) area, which is equipped with ground-based drone detection systems. Furthermore, the communication between monitoring drones is done with each other in an ad-hoc manner or UAV-to-ground link communication system. Therefore, monitoring drones can share information mutually during the execution of flight assignments. In our implementation, we set our operational area into a 20 × 20 grid matrix and differentiated the whole operational space into several small unit areas, known as cells, where some cells are considered as restricted areas. Operational area representation and proposed trajectory planning are discussed in the following sections.

Operational Area Representation
To resemble a real-life environment, we adopt a variation of the Foxhole Shekel function in our paper to represent the terrain, shown in Figure 1, which is formulated as expressed in Equation (1) [34], where parameters η and γ are used to vary the shape of the terrain. We adopted this terrain because there is a shortage of widely-accepted benchmarks in the field of trajectory planning for UAVs. Therefore, the local maxima of the landscape can be considered mountains [34].

Trajectory Planning
In our proposed path planning, we generated a trajectory in a sequence of waypoints in three-dimensional space using the particle swarm optimization algorithm [1]. Therefore, vector form is used for encoding feasible path where the vector element T i = (a i , bi, c i ) can be used for representing the ith waypoint, which can be shown as, where N w is known as the number of waypoints in a feasible trajectory, r and w are positive integer numbers, and the number of trajectories is proportional to the number of waypoints.

Mathematical Model for Optimal Trajectory Planning
A technique in this paper is introduced based on a distributed path planning, where each UAV is equipped with a PSO optimization algorithm. The trajectories are, thus, not computed in a central unit, but in a distributed manner on the swarm of UAV. Therefore, the communication between the swarm of UAV is only used to share position and location among themselves, which is considered as a target to be tracked; each UAV then computes its trajectory. Therefore, this results in a distributed path planning. To design a mathematical model for an optimal trajectory planner we designed the required functions to get dynamic fitness values. The design of function consists of three types, such as fitness function, objective function, and constraint function. The mathematical model for these optimal functions is discussed in the following sections.

Dynamic Fitness Function Design
In this section, we propose a multi-objective fitness function consisting of eight optimization indexes to assess the trajectories generated by the proposed multi-UAVs path planning algorithm. We divided optimization indexes into two groups and assign different priority levels. This is due to the different importance of optimization indexes during the optimization process. They are known as, (1) the optimization objectives, which need to maximize their value to derive an optimal trajectory, and (2) the constraints which must satisfy by UAVs due to their physical limitations. Table 1 shows these classifications and the equations to calculate them. Therefore, we formulate the dynamic fitness function as, where F obj is the objective function, focusing to gain maximum values in terms of other parameters, F const is the physical and environmental limitations, should be accomplished before trajectory planning.

Objective Function Design
We defined the objective function as an optimization criterion to improve the quality of path planning [1]. Therefore, we define the objective function as a weighted component of energy consumption, flight risk estimation, and important area surveillance and formulated the objective function as in Equation (4), where F EC , F FRE , and F SAI are defined to be in the range of [0, 1] and w i (i = 1, 2, 3) were used for expressing the weight of the objective component. Our main focus was on generating the optimum path with less energy consumption, environmental flight risk, but higher surveillance. Therefore, we designate surveillance area importance as the positive and the rest areas negative values.

Energy Consumption (EC)
Due to the physical limitations of small UAV, like battery power management, we need to design the path for UAV carefully so that it can surveille the path within its limited battery power. Therefore, it is always preferable to a path with less fuel consumption. Assuming the UAV having constant velocity during the operation time, then we formulated energy consumption, EC as, where, where EC i is the energy consumption from the ith waypoint to (i + 1)th waypoint. P w the energy consumption of the UAV at velocity v for unit time, while t i,i+1 is the duration of flight time taken by UAV from ith waypoint to (i + 1)th waypoint. d i,i+1 is the Cartesian distance of a flight from ith waypoint to (i + 1)th waypoint. We normalized the energy consumption and formulated it as, max EC, where, where X, Y, and Z are the boundary condition of operation space in the 3-D environment.

Flight Risk Estimation (FRE)
Some physical limitations need to be overcome during flight time as those limitations make the UAV vulnerable to harsh weather conditions during the surveillance, like rain, strong winds or snow, etc. Additionally, flying at high altitudes can be another big risk as higher altitudes pose stronger winds, which may increase the risk or uncertainty of being accidentally destroyed. Based on the above scenario, we define two kinds of flight risks: The environment consists of a wide range of random characteristics variables which makes it difficult to build a model that precisely measures the environmental risk. Therefore, for removing complexity, we randomly generated an environmental risk value for each waypoint. That is, environmental risk, r er i, i + 1 , between the ith waypoint and (i + 1)th waypoint is defined as the sum of their environmental values.

• High Altitude Risk
High altitude risk is an absolute difference in flying altitude between the two waypoints. High altitude risk, r har i, i + 1 , can be formulated as, where η represents a constant parameter control.
Since the flying risk a location-dependent parameter, it changes accordingly to the environment depending only on the weather conditions and flying altitude during the flight time. Therefore, flight risk estimation can be formulated as from Equations (12)-(14), where FRE i is the flight risk estimation from the ith waypoint to the (i + 1)th waypoint, ϕ H AR is the total high altitude risk, and ϕ ER is total environmental risk. We normalized the flight risk estimation and formulated it as, max FRE: where maxr er represents the maximal environmental risk.

Surveillance Area Important (SAI)
We divided the whole operational area into three different important levels, which are considered the cell edge area, middle area, and center area of the total operational area. Cell edge areas are the areas that are located in the boundary line of operational areas, and the middle areas are the adjacent cells or inner cells of our operational area. Since the penetration of any illegal drones directly come from the edge area, we have assigned the highest priority of surveillance to those areas, which means the cell edge area should be surveilled first in our implementation. Whereas the center cells are the most secured area among the total operational area, we assigned the least SAI Value for the center area. In this way, we have assigned the order of priority to surveille whole area coverage. The normalized SAI value can be calculated by Equations (15)-(17), where SAI i (t) the SAI values of the ith waypoint, v cellx (t) is the cell value of x at the tth flight time, N i is the supervised cell set from the ith waypoint, v max is the maximal SAI value.

Constraint Function Design
A negative constraint function was designed to evaluate the feasibility of generated path. This is due to the regulations of the external environment, which the UAV has to follow like UAV cannot through a military base, sensitive govt. area etc. When they fulfill the conditions, each constraint is set to be equal to 0, otherwise, a negative penalty value P is given. A brief description of the constraint function is given below. We formulated the constraint function as:

Aerial Constraint (AC)
While generating a feasible path, monitoring drones should consider terrain areas as monitoring drones cannot go through the terrain area to avoid collisions with mountains. To avoid collisions, the flying altitude of monitoring drones should be higher than the terrain altitude. We represented terrain in aerial constraint which can be described as: where, For some specific areas (e.g., government-sensitive regions), monitoring drones cannot be allowed to enter due to the regulations. A legal path should be carefully designed to avoid those forbidden areas. For simplicity, we assume that those forbidden areas are rectangles. Therefore, the forbidden area constraint can be formulated as: where, where N w is the number of waypoints, l x , l y are the lower bounds of x and y, u x , u y is the upper bounds of x and y.

Turning Angle Constraint (TAC)
The turning angle explains the maneuverability of a UAV during the flight from the previous and current directions [1,35,36]. The Path for UAVs should be adequately smooth to maneuver through easily [37]. Therefore, the turning angle of the UAV is required to be less than the maximum turning angle [35]. This constraint can be formulated as follows, where, where θ defines the turning angle of the UAV in 3-D directions (x i , y i , z i ), and θ max is the maximum tolerable turning angle.

Operational Area Constraint (OAC)
For feasible path planning, the UAV must stay inside the operational area to avoid ambiguity. Thus, a negative penalty P is added in the constraint function if any unwanted event occurs. The operational area constraint of a mission can be formulated as follows: where, where N w is the number of waypoints, l x , l y are the lower bounds of x and y, u x , u y is the upper bounds of x, and y, respectively.

Coverage Range Constraints (CRC)
For the whole coverage, UAV needs to surveille all the areas. If the path planning includes the coverage area, no penalty is given. Otherwise, a negative value is given as a penalty. When the trajectory is generated for each particle, its waypoint values are compared with the important area's waypoint value. The important area's waypoints value are divided into 4 sub-areas. If any value falls between those ranges, no penalty is given. Otherwise, a negative penalty is given. Then, that waypoint's value is updated accordingly. Coverage range constraint can be formulated as: where, where N w is the number of waypoints, l x , l y are the lower bounds of x and y, u x , u y is the upper bounds of x and y.

Collision Avoidance (CA)
When multiple UAVs are used for a complex surveillance mission, the paths should be carefully designed for UAVs to remove the collisions among them, which is considered one of the most important tasks for feasible path planning. For separated trajectories, a minimum distance should be kept between UAVs to avoid collisions. Therefore, collision avoidance constraint can be described as, where, where d min is the minimum safe distance to avoid the collision, d uv ij is the Cartesian distance between the ith waypoint of pth UAV trajectory and the jth waypoint of qth UAV trajectory.

Proposed Distributed Trajectory Planner Based on PSO and Bresenham Algorithm
In this section, we have demonstrated the working procedure of the proposed multiple UAV distributed path planning, which is based on PSO and Bresenham algorithm, as we explain in the following sections. We divided the whole operation area into 20 × 20 grids and each cell has a specific cell value to keep the track of historical values of SAI.

Particle Swarm Optimization
Particle Swarm Optimization (PSO), a relatively new family of algorithms that may be used to find optimal or near-to-optimal solutions. It is an optimization technique that provides an evolutionary-based search result on numerical and qualitative problems. It optimizes a problem by iteratively trying to improve a candidate solution. It is inspired by group behaviors in wildlife, for example, bird flocks, honeybees, ant colonies, and fish schooling.
In PSO, all particles are randomly initialized with velocity and position, and each particle keeps finding a candidate solution. Then, in each iteration, the velocity and position of each particle are renewed based on information about the previous velocity, the best position ever occupied by the particle, which is known as a personal influence, and the best position ever occupied by any particle in the swarm, known as a social swarm or global swarm. The mathematical formulations are as follows.
Let, assume the number of the particle is P, D denoting the dimensionality of a particle, and N stands for the iteration number. For any ith particle, position and velocity vector can be represented as x i and v i , respectively. For standard PSO algorithm, there are two kinds of cost values, i.e., p i, best for the individual best value of one particle, and global best value g best of all particles, which can be written as Equations (25) and (26): p i,best = p i1,best , p i2,best , p i3,best , . . . , p iN,best (25) g best = g 1,best , g 2,best , g 3,best , . . . , g N,best After determining the two cost values, the velocity and position of each particle in each dimension are renovated by using Equation (27) In Equation (27), r 1 and r 2 denoting the random values between 0 and 1, w is the inertia coefficient which reflects the influence of the velocity in the previous iteration on the current iteration. n 1 and n 2 are self-cognitive and social cognitive values, which indicate the inheriting abilities from the particle itself and the whole swarm. Pseudocode for dynamic fitness function using PSO can be shown in Algorithm 1. randomly initialize x t and v t ; 14.
initialize P i,best = x t , g best = x Npar ; 15.
Update x t and v t using (26); 16.
Compute the fitness value of x t using (3) to (23); 17.

Bresenham Algorithm
Bresenham's line algorithm is a line drawing algorithm to form a close approximation to a straight line between two points by determining the points of an n-dimensional raster. This algorithm is named after Jack Elton Bresenham who developed it in 1962 at IBM [38]. This algorithm is a well-known earliest developed algorithm in the field of computer graphics. It is used for scan converting a line and involves only sixteenbit integer addition, subtractions, and multiplication operations. The original algorithm extension can be used for drawing circles. In this method, the next point selected is the one that has the least distance from the true line. It can be also called an incremental error algorithm [39]. Some other algorithms are also frequently used in modern computer graphics because they can support antialiasing. Since this algorithm has been used for drawing a line from one particular point to another, we used this technique to ensure we conducted surveillance for the whole operational area. When this algorithm draws a line from one point to another point, it marks up the pixel or points between those two points. Similarly, in our implementation, when monitoring drones surveille from one waypoint to another waypoint (waypoints of best-paths which are generated through PSO algorithm), it made the cell SAI value zero to the corresponding cell SAI values. By making the cell SAI value to zero, we ensured that those cells have been visited by the monitoring drones. Therefore, in the next flight time, monitoring drones were not required to surveille those cells as there was a focus on surveilling the remaining cells. Therefore, we ensured the whole surveillance of the operational area and avoided the repetition of previously surveilled cells.
The working procedure of the Bresenham Algorithm can be described as follows. Once a point is chosen at any step, the next point is,

•
Either the one to its right (lower-bound for the line) • On top, it is right and up (upper-bound for the line).
Bresenham's algorithm is used to implement the construction of a straight-line trajectory [40]. Assuming the initial position is (x 1 , y 1 ), the direction to follow is the endpoint (x end , y end ), which is given by the straight line. The objective of the algorithm is to construct a straight line approximately by deriving the sequence of positions in the grid. This is achieved by moving at each step to the next position along the x-axis (i.e., from x i to x i+1 ) and then by selecting y i or y i+1 which is the closest coordinate to the line. The points in the grid are indicated as (x i , y i ) where i is used for index labeling the points in the grid. Thus, the y coordinate value at each step in the grid is chosen. While a decision parameter p i is chosen, the calculation is done for each time step.
The algorithm is described as follows: i. Start from the two-line, starting point (x 1 , y 1 ) and endpoint (x end , y end ) and then calculate the constants where ∆x = (x end − x 1 ) and ∆y = (y end − y 1 ). ii.
Calculate the first value of the decision parameter by using the equation: iii. For each value of x i along the line, check the following condition, if p i < 0, the next point needs to be selected as (x i+1 , y i ) and: iv. Otherwise, the next point to be selected is (x i+1 , y i+1 ) and: Repeat the steps until the set destination i.e., (x end , y end ) is reached The pseudocode of the Bresenham algorithm is given in Algorithm 2: Current waypoints = x 1 , y 1 , Next waypoints = x 2 , y 2 ; 3. Calculate Consider (x, y) as starting point and (x end , y end ) as maximum possible value of x and y; 6.
Check if the whole line is generated; 20.
Calculate coordinates of the next point; 22. If Draw a point of latest (x, y) coordinates; 26.
End of Algorithm.

Distributed Path Planning for Multi-UAVs
The implementation of the proposed method is as follows: At the very beginning, it initializes the SAI values of each cell and establishes a connection among the monitoring drones. After establishing the connections, they share their positions and locations among themselves. We assumed that drone uses vision-based techniques and communication are done by mobile Ad-hoc manner [1].
After establishing the connections, the monitoring drone starts checking the area by using the historical data of SAI values. If they are not all covered, they divide the whole operation area into different important levels accordingly. Then, the target points are set to surveillance priority according to a different important area. Then, individual trajectories are generated for each monitoring drone, and objective and constraints value will be checked for the feasibility of the paths. The monitoring drones keep communicating with each other continuously and make the trajectory for the whole coverage.
Bresenham's line drawing algorithm was used in this work to check if all the targeted areas have been visited or not. When the monitoring drone flies from a one-way point to another waypoint, the SAI value of those cells becomes zero (0). Therefore, after visiting all the surveillance areas, it will check all the areas have been covered or not; if not, then it will make the new path planning to cover all the areas. Thus, we could ensure the surveillance of the whole operational area. The implementation step of distributive path planning, including Pseudocode and Flowchart (Figure 2) for the whole operational scenario, as shown in Algorithm 3, and Figure 1,

Simulation Results and Discussion
In this paper, we developed a Matlab-based operational environment to evaluate the working performance of the proposed multi-UAV path planning system. The main simulation parameters are listed in Table 2. For PSO algorithm parameter setting, the authors in [41] suggested the value of important parameters, like inertia, is 0.7298 and both the cognitive value as 1.4960. The authors in [42] suggested that inertia value can be selected within the value range from 0.4 to 0.9 and optimal value can be achieved by trial and error methodology, where the cognitive value can be selected as 2.0. We conducted a simulation by using both values and found that the second parameter value set has the better result, in terms of our simulation parameters. Therefore, the resulting values of the parameter have been used in this paper. We demonstrate the comparison between conventional PSO and PSO with modified parameters (mPSO) in Figure 3a. The result shows that the fitness value of the proposed modified-PSO (mPSO) algorithm converges faster to a stable value as the number of iterations increases. In the simulation, mPSO achieved higher Fitness values in a much shorter period of time than the conventional PSO, which led UAVs to surveille full areas in a short period of time. As the fitness value is the major factor for our proposed trajectory planner, we compared PSO and mPSO for their fitness value, in terms of the convergence over the number of iterations. This is the reason why we followed mPSO for further experimentation. These parameter values of PSO and mPSO are given in Table 3. As we increased the number of particles, we observed an improvement in the dynamic fitness function. The observed improvement of the dynamic fitness function is shown in Figure 3b. In the objective function designing, we had to consider the impact of energy consumption, flight risk estimation, and SAI value on each other, where all the values had been normalized. It was supposed to have the optimal flight path, which consists of less energy consumption and flight risk, and a higher SAI value. For this reason, we designed the function by considering energy consumption and flight risk with a minimum value, where the SAI value has to be the maximum value. Figure 4 represents the objective function value curve and total fitness values under EC, FRE, SAI, respectively, where the number of iterations is 100 and the number of particles is 150. It shows the trajectory optimization performance of the flight time, in terms of energy consumption, fight risk, and surveillance area importance. As the number of iterations increased, the energy consumption and flight risk minimized and maintained a stable value, while their surveillance area importance values maximized. From the simulation results shown in Figure 4, it is observed that the simulation begins with the last value achieved from the dynamic fitness function. As the number of iterations increased the energy consumption, flight risk, and SAI value converged quickly and gradually improved the performance of the dynamic fitness function. This ensured that at each iteration, the particles tried to minimize energy consumption and flight risk, while maximizing the SAI value, which proves the effectiveness of our proposed algorithm. The optimization performance of the path planner, in terms of energy consumption and flight risk estimation, can be expressed as a fitness function that indicates the effectiveness of path planning. Fitness function itself consists of two parts, (i) objective value, (ii) constraints value. An optimal path should not have any kind of constraints in its path planning, thus, all constraints should be zero. Figure 5a, demonstrates the effectiveness of our paths where all the constraints are zero. Figure 5b,c show the objective value, and total fitness value, respectively for the different part of fitness values in each waypoint. The SAI weight value has an impact on the total fitness value. Therefore, to find the necessary optimal weight value for SAI we conducted various simulations, as shown in Figure 6. As the weight value of SAI was expected to be positive, we selected a wide range of positive values for our simulation. For a large value of the weight, the impact on EC, FRE, and SAI was less. Therefore, we selected the weight value from a minimal positive value. The weight values and corresponding impact on EC, FRE, and SAI, along with objective values, are shown in Table 4.   In our implementation, a full area coverage was based on distributed path planning. We considered two scenarios of full coverage, with overlapping, and without overlapping, respectively. In overlapping conditions, to cover the whole surveillance area, UAVs take so many steps that are known as waypoints. Sometimes, it takes very high computational time to complete the task. On the other hand, the second scenario is a non-overlapping condition, which requires less computational time and converges faster. To make the environment less complicated and faster and more convenient to converge, we only considered the second scenario, in this study, which involves path planning with the non-overlapping condition. Figure 7a, shows the optimal paths, followed by UAV1, UAV2, UAV3, and UAV4 started from the GBS set as the starting point and denoted by a green rectangular box. After surveilling of the whole area, it again came back to the endpoint, marked as a yellow rectangular box. In Figure 7a, the red rectangle box represents the restricted areas where UAVs are not allowed to fly. With the edge cells having higher SAI value, UAVs need to surveille those edge areas first having level-3 importance, then the inner areas having level-2 priority, and the center having least priority as level-1. We gave the cell edge area more importance by considering that, generally when we design anything, we give more importance to the center as our valuable infrastructure is situated in the center. In that sense, edge areas received less importance, which may pose a great threat. Whenever any threats begin, they commence from the outside region first not from the inside area. Moreover, if we can prevent it earlier, before entering the sensitive area, we will be able to lessen the threat much. That is the reason why we gave cell edge more importance. We observed that the trajectories, generated for each flight time, avoid all the restricted areas and reach the destination safely after full coverage of the surveillance area. Our operational area is based on a 3-D environment, while covering the distance from one waypoint to another waypoint, UAV made changes in the X, Y, and Z-axis. Altitude changes for all the UAVs during flight time are shown in Table 5 and the corresponding flight times for the UAVs can be seen in Table 6. Figure 7b also shows that the ability of UAVs to decide to change in altitude and turning angle when hills or unstructured environment appear in path planning shows that our system has dynamic environment adaptability.  The proposed trajectory planner also ensures that the multiple UAVs do not collide with each other while surveilling. The respective Fitness values of all four UAVs for full coverage are shown in Figure 8. In our simulation, the operating area was assumed to be 1 km × 1 km, with a per cell value of 50 m. During the surveillance, UAVs took off from the starting point and returned to the ending point. Table 6 shows the total distances covered by the UAVs and the necessary flight time for both 2-D and 3-D cases and it is observed that in a 3-D environment, UAVs cover more distance than in a 2-D environment. In our implementation, we assume that a UAV can cover up to four cells from a single location. As a result of this assumption, we can see that all of the UAVs have covered the entire operational region, except the restricted area, which is not allowed to be surveilled.
Distributed Path Planning for Multi-UAVs in the 2-D and 3-D environment for the larger-sized area is shown in Figure 9. To consider a larger size for our simulation we have selected a 30 × 30 grid size having the area of 3 km × 3 km (per cell 100 m). In our simulation where grid size was 20 × 20, each of the four UAV needs 8 waypoints to surveille the whole area. However, as the operational area size increased, the number of the required waypoints also increased; that is, 11 waypoints for each of the UAV.

Conclusions
In this paper, we proposed a distributed 3-D path planning for multiple UAVs, based on Particle Swarm Optimization with Bresenham Algorithm, to make an optimal trajectory for multiple UAVs. We introduced a multi-dynamic fitness function that has optimization indexes, such as energy consumption, flying risk, surveillance area importance (SAI), and UAV maneuverability. Moreover, we also obtained the optimal weight of SAI for an objective value to obtain dynamic fitness to generate a collision-free trajectory for multiple UAVs. To analyze the performance of the proposed optimal trajectory planner, we designed a dynamic fitness function mechanism with a cost function. The numerical results of experiments carried out in this research work show that the PSO, with Bresenham Algorithm, can be applied for multi-UAVs to surveille the whole area of interest by generating an optimal path. Currently, we carry out experiments for the swarm of four UAVs, and we evaluate feasibility, robustness, and dynamic environment adaptability for our three dimensions distributed trajectory planner to analyze the performance and effectiveness of the system. The simulation results prove that our proposals can perform a collision-free distributed trajectory planning for multiple UAVs to surveille the whole area of interest by flight time and flight distance optimized manner. For future work, we will consider an unstructured dynamic environment to perform three dimensions of distributed trajectory planning. We may apply our developed distributed trajectory planner to interface with the drone model for security purposes, to make a real-time application of multiple UAVs for full area surveillance under a dynamic environment.
Author Contributions: Supervision and investigation K.C.; N.A. and C.J.P. are contributed equally in this paper for methodology and writing original draft preparation; writing-review and editing K.C., N.A. and C.J.P. All authors have read and agreed to the published version of the manuscript.