Metaheuristic Optimization-Based Path Planning and Tracking of Quadcopter for Payload Hold-Release Mission

: Under harsh geographical conditions where manned ﬂight is not possible, the ability of the unmanned aerial vehicle (UAV) to successfully carry out the payload hold–release mission by avoiding obstacles depends on the optimal path planning and tracking performance of the UAV. The ability of the UAV to plan and track the path with minimum energy and time consumption is possible by using the ﬂight parameters. This study performs the optimum path planning and tracking using Harris hawk optimization (HHO)–grey wolf optimization (GWO), a hybrid metaheuristic optimization algorithm, to enable the UAV to actualize the payload hold–release mission avoiding obstacles. In the study, the hybrid HHO–GWO algorithm, which stands out with its avoidance of local minima and speed convergence, is used to successfully obtain the feasible and effective path. In addition, the effect of the mass change uncertainty of the UAV on optimal path planning and tracking performance is determined. The effectiveness of the proposed approach is tested by comparing it with the metaheuristic swarm optimization algorithms such as particle swarm optimization (PSO) and GWO. The experimental results obtained indicate that the proposed algorithm generates a fast and safe optimal path without becoming stuck with local minima, and the quadcopter tracks the generated path with minimum energy and time consumption.


Introduction
Path planning and tracking are the main tasks studied for unmanned vehicles, especially unmanned aerial vehicles (UAVs), unmanned ground vehicles, and unmanned underwater vehicles [1][2][3][4]. UAVs, which have been used extensively in defense industry and academic studies in recent years, perform tasks such as surveillance, target tracking, search and rescue, and payload transportation [4][5][6][7]. The obstacles and their positions in the region where UAVs will operate play an important role in the effective operation of UAVs [8]. Establishing a safe path by determining the risky areas in military operation and natural disaster areas, following the path that has been generated, and releasing the payloads to the predefined regions are critical for the successful performance of the mission [9]. In this study, a new path planning and tracking algorithm based on metaheuristic optimization is developed for the payload hold-release task by avoiding the obstacles at the target points defined around the planned path.
A path planning and tracking is required for the UAV to safely reach the target location from the starting location depending on certain restriction conditions such as minimum flight distance and time [10]. UAVs may be exposed to inconvenient land and weather conditions while performing critical tasks. UAVs try to overcome this problem with their maneuverability and altitude capabilities [1]. This situation causes the UAV to consume more energy [11]. In the presence of obstacles and constraints, optimal path planning is required for the UAV to safely follow the specified path with minimum energy and time consumption [12,13]. The UAV path planning problem is a complex optimization problem that requires efficient algorithms to solve. This optimization problem can be solved with classical algorithms as well as by using quite efficient metaheuristic algorithms. Simple path planning for UAV is performed with the Voroni diagram algorithm [14], the probabilistic roadmaps algorithm [15], the A* algorithm [16], and rapidly discovered tree-based algorithms [17]. However, since the kinematic and dynamic constraints of the UAV are rarely considered, these algorithms are generally not preferred in practical applications. In recent years, various approaches have been proposed for the autonomous path planning of the UAV, including meta-heuristic optimization algorithms. In [18], modeling of the battery performance of the UAV is emphasized. A multi-variable linear regression model has been created for the minimum energy consumption of the UAV on the specified path. The generated energy consumption model is used as a fitness function in the optimization algorithm. The performance of the proposed algorithm has been verified with various scenarios for the minimum energy consumption of the UAV. In [19], a path planning algorithm based on k-degree smoothing is proposed to define the coordinated path planning of the UAV in a safe and efficient manner. In the study, a kdegree smoothing method that aims to obtain a safer path using the ant colony optimization (ACO) algorithm [20] is presented. The proposed algorithm draws attention with its slow convergence speed and high probability of being stuck to local optima. In order to deal with these problems, a hybrid optimization algorithm obtained by combining maximumminimum ACO (MMACO) and Cauchy mutant (CM) operators is recommended in [21]. As paths with faster convergence speed and better solution optimization are preferred in practical applications, swarm-based bio-inspiring optimization algorithms with low computational complexity and high computational speed are used extensively. In [22], an improved particle swarm optimization (PSO) algorithm has been proposed to achieve faster convergence speed and better solution optimization in the path planning of the UAV. The performance of the algorithm has been tested on various UAVs under many environmental constraints with Monte Carlo simulations. In [23], the 3D path planning problem of the UAV in the presence of obstacles is solved with the grey wolf optimization (GWO) algorithm [24] and the performance of the proposed algorithm is compared with metaheuristic algorithms such as PSO, the whale optimization algorithm (WOA), and the sine cosine algorithm (SCA). In the literature, metaheuristic optimization algorithms play an important role in solving different engineering problems, as well as path planning and tracking [25][26][27].
UAVs may encounter various obstacles while performing specified missions by sticking to a path. In [28], an obstacle avoidance algorithm based on ellipsoid geometry is proposed for the UAV to remain loyal to its original path and avoid the obstacles in its environment by creating waypoints in the presence of obstacles that obstruct the UAV flight path. The search for an avoidance path in the proposed algorithm is based on the use of ellipsoid geometry as a limited region containing the obstacle. Considering the geometry of the defined obstacle, a limited ellipsoid zone is created, and new crossing points are calculated within this zone. A convolutional neural network (CNN) approach based on depth estimation using molecular camera data to enable the quadrotor UAV to independently avoid collisions with obstacles in unknown and unstructured environments is presented in [29]. In [30], a new algorithm has been proposed that analytically calculates the path efficiently and effectively to create an environment map with a path without collision. In the developed algorithm, an initial path is created by the intersection of two 3D surfaces. Each obstacle position is shaped around the obstacles by adding a radial function to one of the two surfaces. The developed algorithm ensures that the intersection between deformed surfaces does not intersect with obstacles. The algorithm provides that the safe path is created in real time in the UAV's path tracking. In [31], every point in the motion environment is scanned with the 2D lidar on the UAV and the position of the UAV is estimated using the point cloud correction method. Unlike many studies with lidar, the effects of motion on the point cloud have been taken into account. In the proposed algorithm, point cloud features obtained by laser radar are extracted and a clustering is made based on relative distance and density. A robust nonlinear flight controller framework with six dimensional force and torque estimators that includes a model predictive controller (MPC)-based trajectory plan that considers the trajectory planning problem as an optimal control problem with nonlinear obstacle avoiding limitations is proposed in [32].
The ability of the UAV, which has a payload transportation system, to move around the reference trajectory and hold payloads from a certain point and to release payloads to specified targets with minimum error makes the UAV important for critical missions. In releasing the payloads to the specified targets, the UAV should be able to determine the path on its own or stay loyal to the specified path. In [33], neural-network-based real-time UAV control is performed in order to release the payloads to the marked targets by following a certain path with minimum error. The controller structure includes feature extraction and selection stages. In order for the UAV to release the payloads on the predetermined coordinates with the highest accuracy, the full mathematical model of the UAV, as well as the model of the payload transportation system, is needed. In [34], both the dynamic model parameters and the payload transportation system model of the UAV are handled together with the controller approach based on the law of feedback linearization. It is stated that the stabilization of the UAV, especially when releasing payload, is improved with the proposed controller approach. The controller scheme robust to payload changes in various weights is presented in [35]. The proposed controller provides the stabilization of the UAV in the suspended position by compensating the weight changes in the UAV with payload transportation system. In [36], an optimization-based controller algorithm has been developed for the UAV moving around a certain trajectory to make minimum oscillation at maximum payload. It is emphasized that the developed algorithm performs optimal control, especially in maneuvers.
In this study, a new metaheuristic-optimization-based path planning and tracking algorithm with a very high convergence speed is proposed to the UAV with payload transportation system in order to plan a path by avoiding obstacles under constraints such as mass uncertainty, unknown parameters, and unmeasurable external disturbances and to release the payloads to the target points with minimum error while staying loyal to path. The proposed algorithm is robust as it copes with unknown system dynamics and adverse environmental factors. The main contributions of this study are that the new hybrid Harris hawk optimization (HHO)-GWO algorithm for path planning is proposed, the new path planning and tracking control strategy is developed together, and the path-tracking performance of the quadcopter in payload hold-release mission has been analyzed. In addition, the positional error due to the mass uncertainty can be minimized by the proposed control strategy, as well as the energy function. The results of the study are shown that the mass uncertainty and energy of quadcopter during payload hold-release mission have been minimized using the new proposed path planning and tracking algorithm.
The remainder of this paper is organized as follows. The dynamic model of the quadrotor UAV used in the study is given in Section 2. The proposed controller approach for the path planning and tracking of the UAV is introduced in Section 3, including GWO and HHO algorithms. The generated maps are presented in Section 4. The results obtained with the proposed model are discussed in Section 5. Finally, in Section 6, the main results of the study, and future work are highlighted.

Dynamic Model of Quadcopter
Quadcopter is an underactuated type of UAV with four motors and six degrees of freedom (three translational and three rotations) and capable of landing and taking off in limited areas [37]. The evaluation of translation and rotation dynamics together in the motion control of a quadcopter is an important control problem. In the solution of this control problem, it is very important to take into account the non-linear parameters in the dynamics of the quadcopter. The main components of the quadcopter, Euler angles (roll, pitch, yaw), body frame, and global frame are illustrated in Figure 1. are assumed in the model of quadcopter [38]. Position changes during quadcopter flight are measured in the frame, accelerometer, and gyro values are measured in the body frame. For this reason, it is necessary to define the transformations between body and coordinate systems. In this study, cos(.), sin(.), and tan(.) are represented by c(.), s(.), and t(.), respectively. Considering these transformations, the velocity expression in the frame is obtained by using the velocity in body frame as: whereẊ G ,Ẏ G ,Ż G velocities (m/s) (X, Y, Z) in global frame, φ, θ, ψ (roll, pitch, yaw angles), (rad), andẋ b ,ẏ b ,ż b velocities (X, Y, Z) in the body frame [38,39]. The equations of motion of the quadcopter consist of two main components, dynamic and kinematic. Dynamic components explain the motion of the quadcopter according to Newton's second laws, while kinematic components explain the quadcopter's transformation equations. The rotational kinematics of the quadcopter describe the relationship between the angular rate and Euler angles. According to this rotation kinematics, since the angular rate is given in the body frame and the Euler angles are given in the frame, the relation between each other is obtained as: by using the transformation matrix, where p, q, r roll, pitch, yaw rates (rad/s) andφ,θ,ψ, and (rad/s) time derivatives of Euler angles, respectively [38,40]. Translational s describes the linear motion of all forces acting on the quadcopter during flight according to the coordinate frame. Equations of motion resulting from translational s of the quadcopter are obtained as in Equation (3), according to Newton's second law: whereẌ G ,Ÿ G ,Z G accelerations (m/s 2 ) X, Y, Z in the coordinates, m mass of quadcopter (kg), K dx , K dy , K dz drag coefficients,Ẋ G ,Ẏ G ,Ż G velocities X, Y, Z in the coordinates, and u 1 is total thrust of all motors, respectively [41]. The rotational s of quadcopter describes the relationship: between the second derivatives of Euler angles (φ,θ,ψ) (rad/s 2 ) on each axis depending on the square of its motor speeds (w 1 , w 2 , w 3 , w 4 ) (rad/s), namely, torques, and J x , J y , and J z (kg m 2 ) quadcopter moments of ineartia on each axis. u 2 refers roll control input, u 3 describes pitch control input, u 4 indicates yaw control input, K T is the thrust coefficient, K d is the drag torque proportionality constant, and l is the arm length of quadcopter (m) as in Equation (4) [38,41]. The quadcopter moments of inertia on each axis and mass of quadcopter are expressed [41]: where m c is the center mass of quadcopter (kg), R is the radius of center mass (m), m m is the motor mass (kg), and m l is the payload mass (kg). In this study, the total mass in the system model of the quadcopter is changed during the payload hold-release mission depending on the weight of the payload carried, and the moment of inertia in each axis is directly related to this mass change. To summarize, the dynamic and kinematic model of the quadcopter with six degrees of freedom is represented as Equations (1)- (4). The relationship between motor speeds and control variables is defined as: Note that the control variables are directly proportional to the squares of the motor speeds.

Proposed Control Approach for Path Planning and Tracking
The control strategy of this study consists of path planning and tracking. The hybrid HHO-GWO algorithm, which has high convergence speed and swarm intelligence that can avoid local minimum points, is proposed in this study in determining the optimum path. The path planning performances of the proposed optimization algorithm are compared with metaheuristic optimization algorithms such as PSO and GWO. The payload holdrelease path determined by these optimization algorithms is generated with the shortest distance and avoiding the areas where there are obstacles. By analyzing the multi-objective function with metaheuristic optimization algorithms, waypoints to be followed by the UAV are generated. As seen in Figure 2, after the waypoints that the quadcopter are to follow are generated, the following of these waypoints, namely, the path tracking, is carried out with controller in a nested structure. The main idea of the study is that a new control strategy is proposed to carry out path planning and tracking together for the quadcopter's payload hold-release mission. The section includes not only controller design of quadcopter but also metaheuristic algorithms such as PSO, GWO, and HHO.

Controller Design
The control strategy proposed in this study consists of two main steps: path planning and the tracking of the path. Path planning, which is the first step of the control strategy, is the process of determining the waypoints that the quadcopter is desired to track during payload transportation mission. Metaheuristic optimization algorithms such as PSO, GWO, and hybrid HHO-GWO are used to identify these waypoints. After determining the waypoints that the quadcopter is desired to track, path tracking is performed as the second step of control strategy. The path tracking process consists of four control structures: translational position, attitude-altitude, angular velocity controllers, and the system model of quadcopter. This path tracking controller is nested with each other. The motion control on the X and Y axes, attitude-altitude control and the angular velocity control of quadcopter are performed on the outer part, the inner part, and the innermost part, respectively. In the study, noise that occurs as a disruptive effect in attitude, altitude, and angular velocity control is suppressed by Kalman filter [42]. The position errors of quadcopter in X, Y, and Z axes are indicated as: where e x , e y , and e z refer the position errors; X G d , Y G d , and Z G d denote the desired positions; and X G , Y G , and Z G define the measured positions in the X, Y, and Z axes, respectively. The errors of quadcopter in orientation angles are specified as: where e φ , e θ , and e ψ describe the orientation errors; φ d , θ d , and ψ d define the desired orientation angles; and φ, θ, and ψ represent the measured orientation angles in the roll, pitch, and yaw angle, respectively. The angular velocity error is stated as: where e p , e q , and e r are the angular velocity errors; p d , q d , and r d define the desired angular velocity; and p, q, and r express the measured angular velocity along x b , y b , z b , respectively.

Translational Position Control
This controller is responsible for minimizing the measurement difference obtained from the desired position and the quadcopter system model output. As specified in Equations (10) and (11): the desired roll and pitch values are identified by the translational position controller as a result of the minimization of this error with the proportional-integral-derivative (PID) controller, and where K PX , K IX , K DX express PID gains that control the movement of the quadcopter in the X position, and K PY , K IY , K DY indicate PID gains that control the movement of quadcopter in the Y position, respectively. The inputs of the translational position controller are desired the position (X G d , Y G d ), the output of the quadcopter system model (X G , Y G ), and the controller's output are the desired pitch (θ d ) and roll angles (φ d ).
The proposed controller also performs the tracking of waypoints specified in the X, Y plane with metaheuristic path planning algorithms [38].

Attitude-Altitude Control
The height and orientation angles (roll, pitch, yaw) of the quadcopter are controlled by the attitude-altitude controller. As stated in Equations (12)-(15): K PZ , K IZ , K DZ express PID gains that control the movement of quadcopter in the Z position; K Pφ , K Iφ , K Dφ specify PID gains that control the roll angle; K Pθ , K Iθ , K Dθ describe PID gains that control the pitch angle; K Pψ , K Iψ , K Dψ denote PID gains that control the yaw angle. The inputs of the controller are desired and measured height, roll, pitch, and yaw angles; the outputs are u 1 ; and the desired angular velocities are (p d , q d , r d ). u 1 obtained at the controller output is input into the quadcopter system, and this control variable enables the quadcopter to increase [38].

Angular Velocity Control
This controller performs angular velocity control, the main task of the controller is the minimization of error between desired and measured angular velocity components. The angular velocity control is denoted as: where K PP , K IP , K DP express PID gains that control the angular velocity along x b ; K PQ , K IQ , K DQ indicate PID gains that control the angular velocity along y b ; and K PR , K IR , K DR refer to PID gains that control the angular velocity along z b . The outputs of controller constitute the orientation control variables (u 2 , u 3 , u 4 ) of the quadcopter [38].

Motor Control
Using the height and orientation control variables obtained from attitude-altitude and angular velocity controller outputs, the angular velocities required for the motors are obtained as in Equations (19) and (20) [38]. Thus, the thrust required for the movement of the quadcopter in the specified path is obtained by controlling the speed of the motors w i , i = 1, 2, 3, 4 as: The power consumed by each motor of quadcopter is indicated as: where P m k denotes the power consumed by the kth motor, P h k explains the hovering power consumed by the kth motor, ρ is air density (kg/m 3 ), A p refers to the propeller cross-section (m 2 ), K v is the back electromotive force (EMF) constant, K τ is the torque proportionality constant, and K T is the thrust coefficient.

Three-Dimensional Path Planning Model of the Quadcopter
The 3D path planning algorithm proposed in this study is operated to define the optimum path by avoiding the obstacle region after the starting and ending point are determined. There are two limit values of the objective function, the starting (x s , y s , z s ) and the ending points (x t , y t , z t ). The number of waypoints to be generated, including starting, ending, payload hold, and payload release points, are entered. Afterwards, the locations of the spherical barriers on the map are defined as central positions (x obs , y obs , z obs ) and the radius (r obs ), and these locations are given as an input to the algorithm. The 3D pathplanning algorithm presented in this study consists of three different objective functions. In the first part, the length of the generated path is indicated as: where d x , d y , d z are the infinitesimal lengths traversed by the quadcopter along X, Y, Z axes, respectively, and N p is the number of generated points [43]. In the second part, the total energy consumed by the quadcopter is expressed as: where 3 , and ∆t is the sampling period. Motor speeds w k (k = 1, 2, 3, 4) have been calculated in order to obtain d xi , d yi , d zi in each i by using Equation (6) to obtain u 1 , u 2 , u 3 , u 4 , as well as the UAV model Equations (3) and (4). The collision of the quadcopter with obstacles is represented as violation function. The violation function is calculated as indicated in Algorithm 1. In the third part, the distance of each point on the pathway to a specific obstacle is expressed as: where X i , Y i , Z i are the generated points, and ∆l is the propeller radius. If this distance is greater than the radius of the obstacle, then it is assumed that the obstacle is outside the quadcopter's field of view. The feasible constraint takes the following form: in Equation (26) [44]. The points chosen on the map representing the flight path attain a value calculated as: in Equation (27). The average value of v i with respect to a particular obstacle is obtained. Subsequently, the average of v i with respect to the other obstacle is obtained, and the total violation function is expressed as: in Equation (28). The objective function is calculated by combining Equation (22), Equation (23), and Equation (28): where ξ and V are the violation coefficient and function, respectively.
Initialize starting X, Y, Z point (x s , y s , z s ) Initialize ending X, Y, Z point (x t , y t , z t ) Initialize holding X, Y, Z point (x h , y h , z h ) Initialize releasing X, Y, Z point (x r , y r , z r ) Input: The number of measurements (N p ) Input: Determine the position of obstacle on Map (x obs , y obs , z obs , r obs ) Input: The number of obstacles (n obs ) Initialize waypoints between starting and ending point randomly.
for Optimization Algorithms (PSO, GWO, hybrid HHO-GWO) do for k = 1: number of obstacles (n obs ) do Calculate the distance of randomly generated path to sperical obstacles using Equation (24).
Calculate the distance of generated path using Equation (22). (d) Calculate the energy of generated path using Equation (23). (E t ) Calculate objective function using Equation (29),

Proposed Path Planning and Tracking Optimization Algorithm
In recent years, many metaheuristic optimization algorithms that imitate living things in nature have been used extensively to solve complex nonlinear engineering problems. These algorithms stand out compared to traditional optimization techniques such as stochastic and deterministic approaches, with their flexibility, simplicity, avoidance of local optima, and ability to search randomly. In this study, in order to overcome the problem of planning the optimum path and tracking this path for the quadcopter, a swarm-based hybrid optimization approach is proposed, which contains GWO and HHO [45] algorithms and has high convergence speed and is capable of avoiding local minima. The proposed optimiza-tion algorithm allows the quadcopter to not only avoid obstacles but also to follow the planned path for payload holding-releasing with minimum error. The performance of the proposed algorithm is compared with PSO and GWO algorithms. The PSO, GWO, and hybrid GWO-HHO algorithms used for the quadcopter's path planning and tracking are described in this section.

Particle Swarm Optimization
PSO is a population-based metaheuristic optimization algorithm developed in 1995 by Kennedy and Eberhart, inspired by the behavior of birds living in flocks in nature [46]. Generally, PSO is a population-based probability optimization method, which is preferred to produce solutions for multivariable and multiparameter optimization problems. It is frequently used in different optimization problems due to its high convergence speed and solutions. In adapting to various environmental conditions, such as avoiding predators or finding a rich food source, many animal swarms such as fish and birds communicate with each other, increasing their probability and speed of finding the real target. The essence of the PSO algorithm is a swarm and each particle is a part of it. In this swarm-based optimization algorithm, each particle consists of a position and velocity component, and an update is made in their positions by changing the velocity of the particles. Depending on the optimization problem, the updated positions of the particles are substituted in the objective function [46]. In the minimization process of the objective function, if the position value of the particle is smaller, than the best position value obtained, the new solution is kept in the memory in each iteration as shown in Algorithm 2. The position and velocity vectors of these particles are initially determined randomly, depending on the constraints. The velocities of randomly generated particles are computed as: in the next iteration, where X i , the position of i. particle, rand, is a uniformly random number between [0, 1]; p best is the best position of the swarm; g best is the best position within the group; and c 1 , c 2 are two constants which determine the weights of p best and g best , respectively. The position of the particles is obtained by adding the expression of velocity V i (t + 1) to the current position X i as: In this optimization process, the position of each particle in the population is updated by changing the velocity vector. This update process consists of both the experimental knowledge of the particle and the knowledge it has socially acquired from neighboring particles.

Grey Wolf Optimization
The GWO algorithm, inspired by the hunting hierarchy of grey wolves that live as a swarm in nature, is proposed by Mirjalili et al. [24]. As illustrated in Figure 3, the alpha wolf makes all hunting decisions in the herd, leads the swarm, and is located at the top of hunting pyramid. According to the order of social hierarchy in the herd, the top three wolves are alpha, beta, and omega, respectively. The candidate solutions are randomly generated in optimization process as with other metaheuristic optimization algorithms as shown in Algorithm 3. Among these candidate solutions, the best, the second, and the third candidate solution refers to to alpha (X α ), beta (X β ), and delta (X δ ) positions, respectively. The other low candidate solution refers to the omega (ω) position. The hunting mechanism of grey wolves consists of following the prey and approaching, encircling, and attacking the prey. In the grey wolf optimization algorithm, the process of encircling the prey is carried out: where t specifies the current iteration, − → A and − → C are constant vectors, − → X p is the position vector of the prey, and − → X defines the position vector of a grey wolf.

− →
where − → a is linearly decreased from 2 to 0 over the course of the iterations, and − → r 1 and − → r 2 are random values generated between 0 and 1. The hunting process of grey wolves is expressed as: where the positions of the best three agents are indicated by − → are the updated positions of the search agents; and − → X (t + 1) is the next iteration position.  Initialize the grey wolf population X i (i = 1, 2, ..., n) Initialize a, A and C Calculate the fitness of each search agent X α = the best search agent X β = the second best search agent X δ = the third best search agent while (t<Max number of iterations) do for each search agent do Update the position of the current search agent by Equation (37) Update a, A and C Calculate the fitness of all search agents Update X α , X β and X δ t = t + 1 return X α

Harris Hawk Optimization
In this section, the exploration, transition from exploration to exploitation, and exploitation phases of the HHO component of the hybrid GWO-HHO algorithm proposed in the study are explained. In this algorithm, the hunting strategy of Harris hawks, one of the smart birds in nature, is imitated. Harris hawks act as a swarm, especially during the rabbit-hunting process. Each swarm has a leader. The leader and other members of the swarm primarily make exploration flights. After the prey is detected, the hunting process begins. HHO is gradient-free optimization method; hence, it can be applied to many nonlinear engineering problems depending on a suitable formulation [45]. Harris hawks' main tactic in hunting is called the "surprise attack". In this clever strategy, several hawks collaboratively try to attack from different directions and simultaneously approach the prey that has been found to have fled outside the shelter. The attack can be completed quickly, with the hawks catching their prey in a matter of seconds. All phases of the HHO's exploration and exploitation processes are shown in Figure 4. • Exploration phase: Although Harris hawks have strong eyes, sometimes they may not be able to detect their prey easily. In this situation, Harris hawks often wait in the desert area and observe their surroundings. This process continues in a loop. Harris hawks in each loop are identified as candidate solutions. The hawk, who is in the best position in relation to the rabbit in the loop, represents the optimum solution. The HHO algorithm uses two different strategies in the hunt search process. These strategies can be described by [45]: where X(t + 1) represents the position of Harris hawks in the next iteration t; X(t) denotes the current position of Harris hawks; X rabbit indicates the position of the rabbit; X m (t) is the average position of the current population of Harris Hawks; X rand (t) represents a randomly selected Harris hawk from the current population; r 1 , r 2 , r 3 , r 4 , and q are random numbers between [0, 1]; and UB and LB show the upper and lower bounds of the variables, respectively. The average position of hawks is determined by: (40) where N represents the total number of Harris hawks, and X i (t) indicates the location of each Harris hawk in iteration t.

•
Transition from exploration to exploitation phase: Harris hawks begin the exploitation phase by developing different attack models according to the energy of the prey after the exploration process is completed. This process is modelled in [45] as: where E 0 is the initial energy value of the prey randomly defined in the range of [0, 1], E is the energy of the escaping prey, and T is the maximum number of iterations. • Exploitation phase: At this phase, the Harris hawk attacks its prey and makes the surprise attack move. In response to this situation, the prey tries to escape. In this case, the Harris hawk basically develops four different strategies. The energy of the prey and the chance of catching the escaping prey are indicated by E and r, respectively: -Soft besiege (r ≥ 0.5 and |E| ≥ 0.5) In this strategy, the Harris hawk makes misleading jumps at its prey and tries to reduce the energy of its prey. This soft besiege strategy is mathematically described by: where ∆X(t) is the difference between the current position in the t-th iteration and the current position of the prey, and J is a value that changes with each iteration to simulate the natural motion of the prey.
-Hard besiege (r ≥ 0.5 and |E| < 0.5) In this strategy, the energy of the prey is very low. The hawk hardly makes any besiege to throw his surprise claws on its prey. This strategy can be mathematically modeled as: where X rabbit (t) represents the current position of prey, ∆X(t) is the difference between the current position in the t-th iteration and the current position of the prey.
-Soft besiege with progressive rapid dives (r < 0.5 and |E| ≥ 0.5) In this strategy, the prey has enough energy to escape. The Harris hawk is still performing the soft besiege strategy before the surprise jump. This process is smarter than the previous strategy. Before the hawks start their soft besiege, they decide their next move based on the following calculation: where X rabbit (t) indicates the current position of the prey, and J is a value that changes with each iteration to simulate the natural motion of the prey. This situation is compared with the previous dive to decide whether such a move would be a good dive. If the situation is unfavorable, the hawks dive into their prey suddenly. When deciding on this, a Levy-flight-based movement structure is used. This situation is defined by: where Z is the variable that decides whether the hawk will make a move on its prey, Y indicates its position in relation to the decreasing energy of the prey, D is the size of the problem, S is a random vector of size 1 x D, and LF is the Levy flight function and is defined by: where u and v are the random numbers between (0, 1), and β is 1.5. Note that the Levy flight algorithm is added to the exploitation phase to ensure that the local search process can be continued without becoming stuck at local optimum points. The positions of the hawks in the soft besiege phase are updated by: where Y and Z are obtained using Equations (40) and (41).

-
Hard besiege with progressive rapid dives (r < 0.5 and |E| < 0.5) In this strategy, the prey does not have enough energy to escape. The Harris hawk makes a fierce siege before its surprise jump to catch its prey. The hard besiege situation is expressed by: where Y and Z are defined as:

The Proposed Optimization Algorithm
In this study, a hybrid HHO-GWO algorithm is proposed by combining the HHO algorithm with its random search capability and high convergence speed and the GWO algorithm, which has a high performance in avoiding local optima, so that the quadcopter can both avoid obstacles and track the planned path with minimum error. This algorithm ensures the robustness of the controller, even with sudden mass changes in the quadcopter during payload hold and release. The pseudo-code of the proposed algorithm for this study is presented in Algorithm 4.

Algorithm 4: Pseudo-code of hybrid HHO-GWO algorithm
Input: The population size N and maximum number of iterations T Output: The location of rabbit and its fitness value Initialize the random population X i (i = 1, 2, ..., N) while (stopping condition is not met) do Calculate the fitness values of hawks. Set X rabbit as the location of rabbit (best position). for (each hawk (X i )) do Update the initial energy E 0 and jump strength J Update the E using Equation (41) if |E | ≥ 1 then Update the location vector using Equation (39) (37) Update a, A and C Calculate the fitness of all search agents Update X α , X β and X δ end t = t + 1 end return X α

Payload Hold-Release Mission Planning
In this study, a path planning and tracking algorithm is proposed on three different maps. In order to guarantee that the algorithms run do not memorize the path, three maps with different starting and ending points, containing obstacles at different locations, are generated. On the first map, there are obstacles of equal size with a radius of 2 m. On the second map, there are obstacles of two different sizes with radii of 1 m and 2 m. On the third map, there are obstacles in three different sizes with radii of 1 m, 1.5 m, and 2 m. The environmental difficulty level of Map 1, Map 2, and Map 3 range from weak to strong, respectively, in performing the payload hold-and-release mission by coping with obstacles. Seven separate spherical obstacles are placed on each of the maps. The locations of these spherical barriers on three different maps are given in Table 1. As stated in the Table 1, the location of each obstacle in 3D space is expressed as the X, Y, Z positions and radius R. These spherical barriers are positioned in 3D space, as shown in Figure 5. Here, the point where the quadcopter starts its mission, holds and releases the payload is shown as star, square and circle, respectively. In addition, the numbers on the figure are used to label the obstacles. The numbers on the figure are used to name the obstacles. Considering the safe and shortest path conditions of the quadrotor on these generated maps, waypoints are determined by metaheuristic optimization algorithms such as PSO, GWO, and hybrid HHO-GWO. By following this determined path, the payload hold-release performance of the quadrotor has been analyzed.

Experimental Results and Discussion
The performance comparison of the path planning and tracking control strategy is presented in this section. Firstly, the path planning performance of the quadcopter is examined on three different maps. Generating the shortest and safest path of quadcopter on all three maps is performed with the PSO, GWO, and hybrid HHO-GWO algorithms. The quadcopter at origin point (0, 0, 0) rises by 15 m along the Z-axis in all 3 maps. Afterwards, the payload holds the path from the first to the fifth waypoints, and the payload release path from the fifth to ninth waypoints are generated by metaheuristic optimization algorithms such as PSO, GWO, and hybrid HHO-GWO. The mass of payload is 1 kg. Therefore, the total mass of quadcopter has been changed from 3 kg to 4 kg in all missions. The root mean squared error (RMSE) performance criterion in path planning and tracking is denoted as: where Xre f i , Yre f i , and Zre f i are reference positions of the quadcopter; X i , Y i , and Z i are measured positions of the quadcopter in X, Y, and Z axes, respectively; and the total number of measurements is expressed with N m . The energy efficiency can be calculated as: where E b is the total energy of the battery, and E t is the total energy consumed by the quadcopter. The generated waypoints are presented for Scenario 1 in Table 2. The distances of the paths created are 37.53 m, 36.26 m, 35.68 m in Scenario 1 for the PSO, GWO, and hybrid HHO-GWO, respectively. The performance of the payload hold and release path is demonstrated in Figure 6. The path generated by metaheuristic optimization algorithms is illustrated on Scenario 1 with obstacles in Figure 7. When the convergence rate and minimum point are investigated, the maximum convergence rate and minimum point has been obtained for the proposed hybrid HHO-GWO algorithm. The shortest distance path is obtained with the hybrid HHO-GWO on Scenario 1. The generated waypoints are introduced for Scenario 2 in Table 3. The distances of the paths created are 37.47 m, 40.72 m, and 36.73 m in Scenario 2 for the PSO, GWO, and hybrid HHO-GWO, respectively. The performance of the payload hold-and-release path is displayed in Figure 8. The paths generated by the metaheuristic optimization algorithms are indicated in Scenario 2 with obstacles in Figure 9. When the convergence rate and minimum point are investigated, the maximum convergence rate and minimum point has been obtained for the proposed hybrid HHO-GWO algorithm. The generated minimum path distance is obtained for the hybrid HHO-GWO in Scenario 2.      The path tracking performance of the quadcopter is analyzed with these generated waypoints. The payload hold and release are carried out in waypoints 5 and 9, respectively. The performance of the quadcopter under both path tracking and sudden payload change is examined. The path tracking in a payload hold-release mission is illustrated in Figures 12-14 for Scenarios 1, 2, and 3, respectively. The total path, RMSE, target time, and energy efficiency performance criteria of metaheuristic algorithms are presented in  Figure 14 for Scenario 3, which has the highest environmental difficulty level, is evaluated, it is seen that the least change in the Z-axis occurs with the proposed algorithm. This shows that the energy is used optimally. The results show that the hybrid HHO-GWO algorithm has the highest energy efficiency. To summarize, the path planning and tracking control strategy of the quadcopter have been proposed in this study. The path planning has been achieved via PSO, GWO, and the proposed hybrid HHO-GWO algorithms. The results of path planning show that the shortest and safest paths are obtained for all scenarios. After this, the path-tracking performance of the quadcopter in a payload hold-release mission is investigated for all scenarios. The path-tracking results express that the minimum total path, mean square error, target time and energy efficiency of quadcopter in payload transportation mission have been obtained for all scenarios. The path-tracking error due to the mass uncertainty of the quadcopter has been minimized in all scenarios with obstacles. The contributions of this study are the following: • A hybrid HHO-GWO optimization algorithm with high convergence speed for path planning has been proposed, • The position error of the quadcopter caused by the sudden change during payload holding and releasing is examined; • The errors that occur in path tracking under sudden payload changes are minimized with the newly proposed control strategy.

Conclusions and Future Work
In this study, a new metaheuristic path planning and tracking algorithm for payload hold-release mission is proposed to avoid obstacles. A hybrid HHO-GWO algorithm is proposed by combining the HHO algorithm, with high convergence speed, and the GWO algorithm, which has a high performance in avoiding local optima, so that the quadcopter can both avoid obstacles and track the planned path with minimum error. The performance of the proposed path-planning algorithm is compared with PSO and GWO. The minimum path distance and maximum convergence rate have been obtained with the newly proposed hybrid HHO-GWO metaheuristic optimization algorithm. The waypoints that the quadcopter desires to track are generated with the optimization algorithm not only minimizing distance but also energy. The path tracking has been carried out by these generated waypoints. The payload hold-and-release mission has been realized with a path-tracking controller. The mass component in the quadcopter model is changed during payload holding and releasing. The position errors occur in path tracking with the sudden mass change of the quadcopter in this payload holding and releasing task. The results of path tracking are indicated by the minimum total path, mean square error, total time and consumed energy have been obtained for the newly proposed hybrid HHO-GWO. The most important contribution of this study is that the proposed control strategy and the position error caused by this mass uncertainty can be minimized. It is planned to perform environmental tests of the proposed metaheuristic-based approach by embedding it on a single UAV in the future. By comparing the results obtained with the results of our current study, studies will be focused on the optimum solution of path generation and tracking problems with the cooperation of multiple UAVs.