1 Introduction

Unmanned Aerial Vehicles are becoming popular to carry more payloads for a wide range of applications and navigate dangerous and hazardous environments. They should possess good manoeuvrability and flexibility to adapt in a cluttered environment for effective navigation. In these circumstances with stringent energy requirements, autonomous UAV navigation is a great concern for deploying UAVs in multifaceted environments and applications (Aggarwal and Kumar 2020). Very few instances are traffic monitoring, highway infrastructure assessment (Outay et al. 2020), post-disaster search and rescue operations (Shakhatreh et al. 2019), spraying the pesticides in the vast farm fields (Radoglou-Grammatikis et al. 2020), inspection of mines (Park and Choi 2020) and other long-range surveillance (Valsan et al. 2020) and reconnaissance defence missions (Sigala and Langhals 2020). In this regard, multi-rotor UAVs (MUAVs) are considered to be the prominent solutions due to their inherent hovering capabilities, swift and fast manoeuvring abilities, and nowadays capable of carrying heavier payloads, including transport of human beings (Liu et al. 2021). MUAVs of various sizes with different payload capacities can be effectively deployed by replacing human beings to perform designated tasks. Autonomous navigation in an optimal path by avoiding the obstacles to achieving safe navigation in a 3D environment is a challenging problem. Optimal path planning plays a significant role in enhancing the autonomous capabilities of UAV. During the actual flight conditions of UAV, many static and dynamic obstacles influence the navigation. An efficient path planning strategy is much needed to avoid the obstacles and find the shortest and the safest path to achieve the desired mission. Many pioneering works dealt with a 2D environment (Khan et al. 2021a, b) and very few works focused on path planning in a 3D environment by avoiding the obstacles (Vashisth et al. 2021; Zhang et al. 2021). In the event of low-altitude flight of UAVs, many static obstacles obstruct the UAV and an efficient path planning algorithm is very much needed. Path planning aims to find an optimal path and be of a collision-free path in a dense environment. In order to navigate the UAVs in the desired trajectory for the specific mission, optimal decisions have to be taken to reach the destination in the shortest time. It finds great potential in the delivery of parcels, medical kits, terrain-following flight and disaster relief activities etc. The other issues pertaining to these UAVs are suffering for their flight endurance due to limited battery storage capacity. Hence, energy-efficient optimal path planning (Monwar et al. 2018; Ahmad et al. 2017; Yacef et al. 2020) is a viable solution to achieve the designated missions with a given energy constraint. In order to address these issues, this article focused on developing an energy-efficient path planning algorithm in a global and local sense to navigate in a 3D environment by avoiding the obstacles.

2 State-of-the art

UAV path planning is to find the best possible path in a cluster environment to fly from the source to destination without colliding with obstacles in the airspace. It is an environment-based modeling process, which should consider static obstacles in the given airspace and possible dynamic threats that abruptly intrude the same airspace. In order to find an optimal path in static and dynamic environments, efficient path planning algorithms (Shin and Chae 2020; Qian et al. 2016) is necessary. Many pioneering works on path planning and autonomous navigation of ground vehicles (Lipp and Boyd 2014; Herrmann et al. 2020a, b; Ozatay et al. 2017). They focused on optimising the speed of a vehicle over a fixed path for minimum time traversal, generating optimal trajectory, and determining optimal energy trajectory. However, for the case of UAVs, path planning algorithms are classified into graph-based, population-based evolutionary algorithms, and distributed approaches. Among these categories, Ant Colony Optimization (ACO) (Dorigo and Stützle 2019) and A* algorithms (Debnath et al. 2021) are widely used for various applications including UAV path planning. ACO is well utilized because of the positive feedback mechanism of each and through depositing pheromones on the visited places and nodes. It is very useful for other ants to follow the path defined by other ants and find the destination effortlessly in a short span. ACO has a robust global searching ability to find an optimal path, perform superior computing capabilities in a parallel and distributed sense, quick convergence to the solutions and strong adaptability to the varied environments (Zheng et al. 2017). Based on these advantages, ACO has been used for path planning problems in mobile robot and UAV applications. However, in order to improve the efficiency of ACO further, modified ACO (MACO) algorithm has been developed for various applications (Chowdhury et al. 2019; Ebadinezhad 2020; Hou et al. 2020; Hamad and Hasan 2020). The main drawbacks of the conventional ACO algorithm are local trap and poor convergence. It is effectively addressed in (Wang et al. 2020) by updating heuristic information and ignoring the worst path through implementing the pheromone update strategy. In this work, a similar strategy is considered for finding an optimal path in a global sense. In addition, the grid-based algorithm, namely the A* algorithm, has gained significant interest in UAV path planning to avoid obstacles efficiently. It combines Dijkstra’s Algorithm (Lin et al. 2018) competencies that consider the favoring points near the start point and the greedy best-first search algorithm that accounts for the point that is close to the destination (Zammit and Van Kampen 2018). It is a heuristic search algorithm that computes the cost for each path and the minimum cost function is a determining factor for selecting the next node to move forward and reach the destination point. However, due to its heuristic nature, it may not be able to find an optimal path efficiently in the sense that it may not consider a path even though it is short in nature (Noreen et al. 2019). A* works with respect to tracking the grid cell edges and may not traverse into the complex environment (Noreen et al. 2019). The memory requirement to store the earlier visited nodes is also challenging for intricate surroundings. Hence, in order to overcome the aforementioned issues, several variants of A* algorithms have been presented.

The iterative-deepening A* (IDA*) was proposed (Bu and Korf 2021) to address the vast memory requirements imposed by the A* algorithm. However, the IDA* was not performing well in identifying and selecting subsequent possible nodes. It is used to select the same node multiple times, making slower performance than A*. In addition, in order to resolve the issue of following the grid edges of individual grid cells to determine an optimal path, a Theta* (Daniel et al. 2010; Wu et al. 2020) algorithm was proposed. It was found that Theta* performance is much slower than A* in finding an optimal path. However, another variant of A*, namely Field D* (FD*), was formulated (Ferguson et al. 2006) to avoid following the edges of the grid cell. It was observed that FD* made more unnecessary turns than the A* algorithm (Ferguson et al. 2006; Warren 1993; Botea et al. 2004). Aghababaie et al. (2017) proposed Convolutional Neural Network (CNN) with non-linear multi-layer mapping using super-resolution techniques to improve the image quality for superior UAV navigation. The simulation results show that the proposed method performs much better than the other benchmark techniques in terms of peak signal-to-noise ratio (PSNR). KhazaeiPoul et al. (2017) improved the quality of images collected using UAV by incorporating super-resolution techniques. Khisheh et al. (2016) developed two hybrid algorithms, Ant-lion:Neural Network and Biogeography-Based Optimization Algorithm: Neural network, to select the sensors for improving the performance of Autonomous Underwater Vehicle. Recently, many path planning algorithms have been developed for Unmanned system applications, and Table 1 compares various path planning algorithms with their merits, demerits, and applications.

Table 1 Comparison of various path planning algorithms

The recent survey on various UAV path planning and collision avoidance algorithms can be seen in (Basiri et al. 2022; Khan et al. 2021a, b). In order to solve the high dimensional problems with good accuracy and avoid sudden changes in its path for UAV applications, the aforementioned algorithm may not be an efficient choice. In order to overcome these issues, the Memory Efficient A* (MEA*) algorithm (Noreen et al. 2019) is implemented for efficient path planning. It is becoming popular because it does not require large memory and avoids the edges of the grid cells in contrast to other algorithms as discussed in the aforementioned table for finding an optimal path. It was proven to be an efficient algorithm to determine an optimal path in fewer turns with very minimal execution time and the main advantage is less memory requirement. Hence, in this work combining the competencies of MACO and MEA* algorithms, a hybrid MACO-MEA* algorithm is proposed to avoid obstacles in a 3D environment and efficiently determine an optimal path for UAV applications. In general, UAVs are suffering from less endurance (flight time), and energy-efficient UAVs are in high demand for navigating in the multifaceted environments, including disaster missions, surveillance and reconnaissance operations, an inspection of civil infrastructures and societal applications etc. Energy management is the main concern (Herrmann et al. 2019; Herrmann et al. 2020a, b) in autonomous vehicles. There are quite a few works focused on energy-efficient path planning of Unmanned Surface Vehicle (USVs) using particle swarm optimization (Ding et al. 2018), a deep learning approach for UAV path planning (Nie et al. 2020) and addressed energy constraint of UAVs (Monwar et al. 2018; Abeywickrama et al. 2017; Yang et al. 2018) discussed energy calculation for the forward and hovering flight of UAVs. Hence, the present work envisaged integrating the energy calculation with an optimal path planner for flying and hovering UAV in determining the energy-efficient optimal path. The mission can be planned prior with respect to the optimal energy-efficient conditions by which one can understand the stringent energy requirement for deploying the UAV in real-time.

Based on the state-of-the-art, the main contribution, novelty and application of this work are:

  • Development of Hybrid MACO-MEA* algorithm integrated with the energy requirement to determine an energy-efficient optimal path

  • The novelty of the work lies on the integration of MACO and MEA* algorithm for effective global and local path planning which is not combined in the prior art.

  • The developed framework provides an effective solution for planning and executing critical missions effectively by navigating in a clustered environment, such as in disaster-prone regions, goods delivery, etc.

The rest of the sections are organized as follows. Section 2 discusses briefly about ACO, A* and MEA* algorithms. Section 3 focuses on the energy requirement of UAV during flying and hovering conditions. Section 4 discusses the simulation results of MACO without obstacles and Hybrid MACO-A* and MACO- MEA* with obstacles. Section 5 describes about the experimental platform and implementation of the Hybrid MACO-MEA* and MACO-A* algorithm and a comparative analysis of these algorithms. Section 6 provides concluding remarks and future aspects.

3 UAV path planning algorithms

Path planning in UAV applications (Zhang et al. 2014) is challenging to avoid obstacles in a constrained environment. The present research focused on combining MACO and A*/MEA* algorithms' competencies to find an optimal path to avoid obstacles. The A* /MEA* algorithm is utilized to avoid obstacles and travel with a minimal distance, which is considered a local path planning. MACO is employed to find the shortest path for the entire region and considered as a global pathfinder in the present study. Hence, a hybrid approach is dealt with to find an optimal path by avoiding obstacles and finding the optimal path. An overview of MACO, A* and MEA* algorithms are explained below.

3.1 Modified ACO algorithm

The basic idea of the ant algorithm (Dorigo and Stützle 2019; Zhang et al. 2014) is that in a colony of ants, the individual ants will move in a different directions to find their shortest path. While moving in their path, they deposit pheromone, which will affect other ants' activities. The ant maintains the tabu list, which is nothing but a list of modes the ant has visited. The pheromone deposition will determine the number of ants that have travelled on the path. The shortest path will be completed quickly and more frequently by the ants, and the intensity of the pheromone will also be high. Hence, other ants change their path of travel and start to move on the high-intensity pheromone path. ACO can be well exploited to find an optimal flight trajectory in a large mission area considered a large scale optimization problem. ACO has strong global search ability, can perform parallel and distributed computing, and has fast convergence speed and strong adaptability compared to other algorithms. However, it has poor premature convergence and loss of significant paths to be visited by the ants based on the updated tabu list. Hence, it is challenging to arrive at an efficient path. In order to address these issues, Wang et al. (2020) introduced two frameworks for improving path efficiency.

Firstly, they adopted a modified heuristic function to improve the directional search which is given by

$$\tau_{ij}^{^{\prime}} \left( t \right) = \frac{1}{{w_{ij} \left( t \right) + d_{ij} \left( t \right)}}$$
(1)

where i and j are node locations; \(w_{ij} \left( t \right)\) is the weight of edge ij, \(d_{ij} \left( t \right)\) is the Manhattan distance.

Secondly, they considered a reward/penalty mechanism in which the best path is stored and the worst path is ignored, avoiding the local trap.

The updation of pheromone deposition is given by,

$$\alpha_{ij}^{new} \left( {t + 1} \right) = \alpha_{ij} \left( {t + 1} \right) + N_{r } \times \delta_{1} \left[ {w_{ij} \left( {t,\left( {t + 1} \right)} \right)} \right] - N_{p} \times \delta_{2} \left[ {b_{ij} \left( {t,\left( {t + 1} \right)} \right)} \right]$$
(2)

\(\delta_{1} \left[ {w_{ij} \left( {t,\left( {t + 1} \right)} \right)} \right] = \left\{ {\begin{array}{*{20}c} {\frac{I}{{l_{r} }}, if\left( {i,j} \right) \in the\,best\,path} \\ {0, otherwise} \\ \end{array} } \right.\).

$$\delta_{2} \left[ {w_{ij} \left( {t,\left( {t + 1} \right)} \right)} \right] = \left\{ {\begin{array}{*{20}c} {\frac{I}{{l_{p} }}, if\left( {i,j} \right) \in the\,worst\,path} \\ {0, otherwise} \\ \end{array} } \right.$$

where I is the co-efficient of pheromone intensity, \(\delta_{1} \left[ {w_{ij} \left( {t,\left( {t + 1} \right)} \right)} \right]\) is a rewarding factor and \(\delta_{2} [b_{ij} \left( {t,\left( {t + 1} \right)} \right)\)] is penalizefactor. Nr is the number of ants to be rewarded, and Np is the number of ants to be penalized. lr is the path length for rewarding and lp is the path length for penalizing, respectively. These two tasks are updated in the conventional ACO to improve the algorithm's efficiency for arriving at the best possible path.

3.2 MEA* algorithm

MEA* algorithm is a variant of the A* algorithm that primarily focuses on the stringent memory requirement of the A* algorithm and solving high dimensional grid environment (Noreen et al. 2019). A* also has an issue of tracking the edges of grids, and it may not provide an efficient optimal path. In order to overcome these bottlenecks for determining an optimal path in high dimensional space, the MEA* algorithm is developed. It has three lists, an empty list containing the nodes to be explored, a close list that has already explored nodes, and the parent list has the parent node of the current node. At the initial stage, all lists are set to empty.

Its cost function is given by

$$F\left( n \right) = G\left( n \right) + H\left( n \right)$$
(3)

where \(G\left(n\right)\) is cost from initial to present node and \(H\left(n\right)\) is the heuristic estimation cost from present to end node. Initially, \(G\left(n\right)\) is set to zero for the start point, and all other nodes in the map are assumed to be infinity. The minimum F-Value is considered and added to the open list and other nodes are ignored during each iteration. Due to this, execution time and memory requirements are minimized. However, A* considers all the neighbouring nodes that are unnecessary for an optimal path, which causes more memory requirements and increases execution time. Unlike A*, the MEA* algorithm uses Euclidean distance with a due consideration of obstacles to make a next move which avoids more number of turns as occurs in A* algorithm. Hence, it finds the next best possible node with one iteration itself and other nodes are ignored. Due to which, large memory storage is eliminated and time consumption is minimized.

The UAV path planning with and without obstacles in 2D and 3D environment (Ghambari et al. 2020; Zhang et al. 2020) is a significant concern in real-world applications. Here, in this work path planning in a 3D environment with static obstacles is envisaged for the simulation and experimental studies. The Hybrid algorithms such as MACO-A* and MACO-MEA* are considered for the simulation and their performance is compared. The Fig. 1  shows the schematic of the proposed Hybrid algorithm in determining an optimal path through avoiding the obstacles.

Fig. 1
figure 1

Hybrid MACO with A*/MEA*

4 Energy consumption during forward and hovering flight

Autonomous inspection of large geographical areas is a crucial requirement for landslide monitoring, an inspection of infrastructures, water quality and environmental monitoring. The energy requirement for the UAVs are major bottleneck (Stolaroff et al. 2018). In order to overcome this issue, energy-efficient UAVs have to be deployed (Ahmed et al. 2016; Kumbhare et al. 2017; Pereira de Carvalho 2018). The energy consumed by a UAV is mainly due to the drag force with respect to wind conditions during forward flight and it pitches down at an angle. The following relations are suitable for calculating the energy consumption during forward flight conditions (Ahmed et al. 2016).

Power consumption during forward motion against the drag force is given by

$$P_{\min } = (\tilde{v} + v\sin \beta )T$$
(4)

where \(\tilde{v}\) is induced velocity, \(v\) is the average ground speed of UAV, β is pitch angle and T is the thrust generated from a motor.

$$T = mg + f_{d}$$
(5)

where m is the mass of UAV, including battery, g is the gravitational constant and \(f_{d}\) is a drag force.

The induced velocity is given by,

$$\mathop v\limits^{\sim } = \frac{2T}{{qr^{2} \pi \rho \sqrt {(v\cos \beta )^{2} + (v\sin \beta + \mathop v\limits^{\sim } )^{2} } }}$$
(6)

where r and q are the diameter and number of UAV rotors, ρ is the density of air.

The actual power consumption by a UAV is given by,

$$P_{a} (n) = \frac{{P_{\min } }}{{\eta_{k} }}$$
(7)

\(\eta_{k}\) is the power efficiency of the UAV.

The total flying energy that an arbitrary UAV to traverse distance d is given by,

$$E_{f} = \frac{{P{}_{a}d}}{v}$$
(8)

In order to achieve a hovering flight, the all-up weight of the UAV has to be balanced with the summation of thrust generated by all rotors.

Actual power consumption for hovering of UAV is given by,

$$P_{h} = \frac{T\sqrt T }{{\eta_{k} \sqrt {0.5\pi qr^{2} \rho } }}$$
(9)

5 Comparison of simulation and experimental results

The MACO algorithm is primarily used for finding an optimal path in obstacle-free zones. It has three parameters such as exponent on pheromone (α), exponent on distance (β), and pheromone decay rate (ρ) which influence the algorithm majorly. These parameter settings vary depending on the applications, and the optimal value has to be arrived for each case. In order to obtain optimal parameters in finding the shortest distance, sensitivity analysis is performed through varying these three parameters.

5.1 Sensitivity analysis

The proposed algorithm is analysed by conducting sensitivity analysis by varying these three significant MACO parameters (α, β, and ρ). The parameter α controls the weight on the pheromone deposition, β applies weight on the calculated Euclidean distance and ρ controls the rate of pheromone decay. The prominent intention of varying these parameter values by conducting intense trial and error runs is to find the optimal values of these parameters leading to efficient performance. The sensitivity analysis necessitated to conduct several experiments by considering these parameters to be varied in four different levels as given in Table 2 An orthogonal array of experimental results with the calculated Mean Square Error (MSE) are provided in Table 3 and the level trends of these parameters are shown in Fig. 2

Table 2 Various levels of parameters
Table 3 Experimental results with Mean Square Error
Fig. 2
figure 2

Trend of MSE for various levels

All these three parameters are interrelated with each other in deciding the performance of the entire proposed model. Further, the intention behind choosing the value of parameters α and β to start for 0.25 raises from the fact that, if we choose α = 0 then it signifies that the model will act purely heuristics (distance measure). If we choose β = 0, it signifies that the model depends entirely on pheromone concentration irrespective of the value of ρ. Similarly, the level of ρ is started from assigning 0.5 to bring the contribution of pheromone deposition to a minimum value. All these aspects are found to be beneficial in the present experimental study. In addition, the sensitivity of each parameter with respect to determining an optimal path is depicted in Fig. 3. It is evident that, the best parameter settings to arrive at an optimal path is α = 1, β = 1,and ρ = 0.95.

Fig. 3
figure 3

Sensitivity of model parameters

The Fig. 4 illustrates the 2D box plot analysis to exemplify the performance distribution in terms of percentage with respect to change in three parameters (α, β, and ρ) of the MACO algorithm. The exponent on alpha and exponent of distance parameters are varied evenly from 0 to 2 to showcase their performance distribution on the proposed model. It is apparent that the parameter α has specifically more impact in obtaining performance percentage ranging between 88 to 95% and the parameter β has achieved a performance percentage range between 88 and 93%. It is also observed from the parameter ρ that, the decay rate has more impact on the performance and achieved a low range of 65–69%. The Table 4 provides the list of parameters and their values incorporated for simulation studies.

Fig. 4
figure 4

Distribution of model parameters and its performance

Table 4 Various parameters of proposed model

5.2 Optimal path planning in 3D environment without obstacles

Simulation is performed for the cases of with and without obstacles environment using Python programming. The various parameters of UAV and battery considered for the simulation are given in Table 5. The inspection area of the UAV is selected as 100 × 100 m and the inspection points are randomly distributed in the specified region. The operating system used for simulation was 64-bit ubuntu 18.04.5 on a PC with 16 GB internal RAM and an Nvidia Quadro k620. The simulation environment is considered a 100 × 100 grid, and each cell size is 1 unit. The set of nodal points, hovering points and their coordinates are indicated in Fig. 5. The MACO algorithm is implemented for this obstacle-free environment and an optimal path is found.

Table 5 Various parameters of UAV
Fig. 5.
figure 5

3D obstacle free environment

The simulation is performed by varying the number of ants. It is evident from the Table 6 that, on accounting maximum of six number of ants, the path is optimized. Due to MACO, 18% of reduction in path length and 10% of decrease in execution time are observed in comparison to without ants.

Table 6 Optimal path of MACO algorithm without obstacles environment

5.3 Optimal path planning in 3D environment with obstacles

UAV navigation in obstacle-prone regions, especially in a 3D environment, is challenging (Pereira de Carvalho 2018). An efficient path planning algorithm is necessary to avoid obstacles and find an optimal path. In this work, MEA* algorithm is utilized to avoid obstacles, and the MACO algorithm is employed to determine the optimal path. Recently, energy-efficient path planning for UAV applications has been promising due to the limited storage capacity of batteries. An energy-efficient optimal path planner is identified, and the energy consumption calculated through theoretical relations is compared with experimental work. The number of obstacles is varied in a 3D environment, as shown in Fig. 6, and simulation is performed using these two algorithms for finding an optimal path through avoiding these obstacles.

Fig. 6.
figure 6

3D Environment with obstacles a 5 obstacles, b 10 obstacles, c 15 obstacles

The simulation results are shown in Fig. 7. It is observed that, the Hybrid MACO-A* algorithm tracks the edges of obstacles which is disadvantageous and it will increase path length and execution time. However, Hybrid MACO-MEA* algorithm has not tracked the edges as evident from Fig. 8 and found the optimal path effectively. The comparison between MACO-A* and MACO-MEA* algorithm with respect to various performance measures for avoiding an increase in the number of obstacles are given in Table 7. It is observed that MACO-MEA* is superior in performance than MACO-A* with respect to various parameters such as 3 to 4% less in the distance travelled, 50% less in the number of turns, 20% less in execution time and 21% less in consumption of energy.

Fig. 7
figure 7

Simulation results of hybrid ACO-A* algorithm a 5 obstacles, b 10 obstacles, c15 obstacles

Fig. 8
figure 8

Simulation results of Hybrid ACO-MEA* algorithm a 5 obstacles, b 10 obstacles, c 15 obstacles

Table 7 Comparison between MACO-A* and MACO-MEA* algorithm

6 Real-time implementation of developed algorithms through UAV flight tests

The flight trials are conducted in the outdoor environment using a custom-built UAV platform. The Quadrotor UAV utilized for the proposed experimental work integrated with Digi Xbee module, an on-board computer Raspberry Pi 3 system as companion computer and flight controller is shown in Fig. 9. The on-board processor is used to provide the necessary control commands to the flight control unit for efficient navigation with the help of proposed algorithm. The Xbee module is employed to communicate with UAV via the ground control station. The proposed algorithm is deployed in the companion computer which in turn directs the inbuilt flight controller to effectively choose the optimal path planning strategy. Meanwhile, the performance of the real-time flight mission implementation for monitoring the optimal path travelled by the UAV is visualized in Ground Control Station (GCS). The hardware and software architecture, including the mission planner using a GCS, wherein optimal path is fed in from the simulation environment.

Fig. 9
figure 9

Experimental model

The inspection nodes (Hovering locations of UAV) are given prior to determine the optimal path in real-time. Based on that, the integrated MACO and A*/MEA* algorithms identify the energy-efficient optimal path. The determined optimal path is processed using an on-board computer with a drone kit platform. It sends the positional information, altitude, speed and hovering time to the Pixhawk controller. The controller takes necessary action to realize the energy-efficient optimal path in real-time. The Fig. 10 shows the entire hardware setup with an on-board computer and flight controller. In the event of navigation. GCS provides optimal waypoints, which is determined through an energy-efficient optimal path planning algorithm that will be fed into the flight controller. The latitude and longitude information for each waypoints are obtained from the on-board GPS sensor. GCS software displays the list of waypoints extracted from an optimal path as an output.

Fig. 10
figure 10

Experimental framework for implementing path planning algorithm

Outdoor experiments are performed by implementing the determined optimal path in real-time. The altitude of the UAV is kept at 15 m and vehicle speed is maintained at 2 m/s. The Fig. 11 shows the flight trials conducted in real-time at our university campus. The on-board computer receives the list of waypoints from GCS and executes the path planning algorithm in real-time. The desired position, velocity, and yaw of UAV are obtained based on the waypoints, and the controller sends the control signal to the motor to achieve navigation. In addition, an obstacle avoidance testing of UAV is performed as depicted in Fig. 12.

Fig. 11
figure 11

Navigation of UAV in real time flight trials

Fig. 12
figure 12

Obstacle avoidance of UAV

The stability of UAV during the navigation is considered to be an important factor. The attitude, position and altitude of UAV is controlled with a feedback signal generated from a flight controller. The Roll, pitch and yaw motion of UAV is examined during the manoeuvring. It is evident from Fig. 13a–c. The UAV is flown with most of its good stability and position of UAV in tracking the desired waypoints to reach the destination is also achieved good performance as depicted in Fig. 14a–c. In addition, the voltage and current consumption is also monitored in-flight mode and satisfactory performance is evident from the Fig. 15

Fig. 13
figure 13

Attitude of UAV

Fig. 14
figure 14

Position of UAV

Fig. 15
figure 15

Voltage and Current consumption of UAV

The total energy consumption of UAV is calculated for both the cases, and it is evident from the Table 8 that, Hybrid MACO-MEA* has achieved a 21% reduction in energy in comparison to Hybrid MACO-A* algorithm to reach the destination through avoiding the obstacles in a 3D environment in all three cases of number of obstacles region. The execution time is minimal, which will be very well suited for UAV path planning in a 3D environment. Hence, the Hybrid MACO-MEA* algorithm can be well utilized for navigating in a clustered environment. Table 8 compares the simulation and experimental results of both the algorithms, and it is evident that the Hybrid MACO-MEA* algorithm outperforms with respect to execution time, path length and avoiding the obstacles proficiently. It is observed that the theoretical and practical results are attained 99% coherence. In addition, the execution time for the MACO-MEA* algorithm is about 55% less than the MACO-A*, and hence it can be well suited to find an optimal path through avoiding obstacles in a clustered environment.

Table 8 The simulation and experimental results of MACO-A* and MACO-MEA*

The Fig. 16 depict the obstacles avoided 3D paths of MACO-A* and MACO-MEA* for the various number of obstacles encountered in the navigation and Fig. 17 shows a sample flight trajectory for the case of 15 obstacles for MACO-A* and MACO-MEA* algorithms executed in a QGCS software after successful flight trails. It is evident that Hybrid MACO-MEA* has followed the shortest path through avoiding the obstacles to reach the desired destination. It is evident from these results that, the proposed algorithm has strong global search ability, can perform parallel and distributed computing, has fast convergence speed and strong adaptability to the environments. It avoids tracking of edges and is very well suited for high dimensional space. The weakness of this algorithm is to select the number of ants for finding an optimal path. It needs a lot of trails to finalize the number of ants to be considered. In addition, an increase in the number of obstacles causes more number of iterations which leads to an increase in convergence time. The proposed algorithm can be further improved through incorporating the chimp optimization algorithm (Khishe and Mosavi 2020) by avoiding the local optima by means of adaptive tuning of various parameters which are sensitive to finding an optimal distance and improving the convergent rate of the algorithm with its chaotic behavior for UAV path planning applications. In addition, GWO (Lv et al. 2022), GSA (Wang et al. 2021) and IPO (Mozaffari et al. 2016) algorithms can be integrated with MACO-MEA* for efficient navigation on the dynamic environment, determining the number of ants in prior and improving the searching capability.

Fig. 16
figure 16

Obstacle avoided path of MACO-A* and MACO-MEA*. a 5 obstacles, b 10 obstacles, c 15 obstacles

Fig. 17
figure 17

Flight trajectory for 15 obstacles. a MACO-A*, b MACO-MEA* algorithms

7 Conclusion

The present work focused on combining the competencies of MACO and A* /MEA* algorithms and inculcating the energy consumption of the UAV to find an energy-efficient optimal path in a 3D environment while avoiding obstacles. Simulations are performed for the cases of with and without obstacles using the MACO algorithm. It is found that 18% reduction in path length and 10% decrease in execution time are observed compared to without ants. Further, for the cases of a varied number of obstacles, the proposed Hybrid MACO-MEA* algorithm has attained superior performance in avoiding the obstacles without tracing the grids with minimal path length. It outperformed MACO-A* with respect to various parameters such as 3 to 4% shorter in the distance travelled, 50% less in the number of turns avoiding the obstacles, 20% small in execution time, and 21% or less consumption of energy.

On the other hand, the real-time UAV flight tests at the outdoor environment by implementing an optimal path have achieved 21% less energy consumption of UAV than the MACO-A* algorithm. The MACO-MEA* algorithm accomplished a 55% shorter execution time than MACO-A*. The simulation and experimental results obtained 99% coherence, showing that the developed algorithm and its results can be well utilized for path planning in a denser environment. Hence, the developed Hybrid MACO-MEA* algorithm has proven to be a proficient framework for avoiding obstacles in a 3D environment and effectively finding the energy-efficient optimal path. The experimental framework can be well utilized for deploying the UAV in the obstacle prone regions for the multifaceted applications wherein UAV energy consumption is a prime concern. In addition, the implication of the developed energy-efficient framework will be well suited for various categories of unmanned systems, mobile robots and other autonomous vehicles with stringent memory requirements for achieving efficient autonomous navigation. The present work performs well in a known environment and avoids static obstacles effectively. In contrast, it could be further extended in the near future to cope by avoiding dynamic obstacles in the unknown environment too. Moreover, in the future, attempts will be made to intelligibly understand the geometrical features of the obstacles and thereby equip them to avoid real-time obstacles using the deep learning approach.