# Modified Artificial Potential Field for the Path Planning of Aircraft Swarms in Three-Dimensional Environments

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

- implementation of a modified APF algorithm with a vortex field that spins over three directions aiming to avoid local minima, collisions, as well as oscillations in narrow passages and in the influence threshold associated with the obstacles;
- development of a technique in which each aircraft analyzes its position in relation to the obstacles and the target, individually determining the best direction of rotation for the vortex field generated by each obstacle aiming at safe motion in the workspace. In this way, agents can adapt to scenarios with new types of obstacles on a real-time basis;
- discussion of experimental tests performed with aircraft model Crazyflie 2.0 in a scenario comprising dynamic targets, as well as obstacles that may require the hierarchical cooperation among agents. From the results, it is possible to verify that the algorithm is viable to be applied in real-time experiments.

## 2. Modeling and Control of a Quadrotor

_{p}, K

_{i}, and K

_{d}are the proportional, integral, and derivative gains, respectively; T

_{s}is the sampling period; e

_{k}and e

_{k}

_{−1}are the present and past values of the error signal, respectively; u

_{k}is the output signal. Anti-windup limiters are associated with the integral term |I

_{lim}| and the output signal |u

_{lim}|.

## 3. Artificial Potential Field

#### 3.1. Attractive Field

#### 3.2. Repulsive Field

#### 3.3. Vortex Field

#### 3.4. Cooperation

#### 3.5. Resultant Field and Path

_{lim}, the estimated sampling time between the calculation of each route point given by T

_{st}, and the sampling resolution of the workspace corresponding to Res. Once the route points are determined for each agent, this very same procedure is repeated iteratively until all the aircrafts are close to their respective targets while also respecting the imposed reference values.

## 4. Methodology

Algorithm 1: Python Interface | |

1 | Input: none |

2 | Output:UAV_position, UAV_SP |

3 | Declare:t, UAV_initial_position |

4 | Check_crazyflie () |

5 | Send_crazyflie (UAVs_initial_position) |

6 | UAV_position = Get_crazyflie_position () |

7 | Start (t_test) |

8 | While t_test <= t do |

9 | Start (t_control) |

10 | UAV_position_vec.append (UAV_position) |

11 | Time_vec.append = t_test |

12 | New_SP = Modified_vortex_APF (UAV_position (end), t_test) (presented in Algorithm 2) |

13 | Send_crazyflie (New_SP) |

14 | UAV_SP.append = New_SP |

15 | Wait (t_control => 1000 “ms”) |

16 | end While |

17 | Land_Crazyflie () |

18 | Save UAV_position, UAV_SP, Time_vec |

Algorithm 2: Modified APF | |

1 | Input: UAVs_position, t_test |

2 | Output: UAV_SP |

3 | Declare Target, target_speed, Obstacle, obstacle_speed, k_a, k_r, k_v, max_vel |

5 | Target_pos = update (Target, target_speed, t_test) |

6 | Obstacle_pos = update (Obstacle, obstacle_speed, t_test) |

7 | n_UAV = length (UAV_position)/3 |

8 | for j = 1: n_UAV do |

9 | j_index = [1 + 3 ∗ (j − 1) 3 ∗ j] |

10 | Obs_expand = (Obstacle_pos, UAV_position (not (j_index))) |

11 | spin_dir = Vortex_field_spin_direction (Target_pos, Obs_expand, UAV_position (j_index)) |

12 | Att_field = Attractive_field (Target_pos) |

13 | Rep_field = Repulsive_field (Obs_expand) |

14 | Vor_field = Vortex_field (Obs_expand) |

15 | WS_field = k_a ∗ Att_field + k_r ∗ Rep_field + k_v ∗ Vor_field |

16 | new_SP = steepest_descent (WS_field, max_vel) |

17 | UAV_SP (j_index) = New_SP |

18 | end for |

19 | Return: UAV_SP |

## 5. Results

#### 5.1. Simulation Results

#### 5.2. Experimental Results

## 6. Conclusions

## Supplementary Materials

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Sánchez-Ibáñez, J.R.; Pérez-del-Pulgar, C.J.; García-Cerezo, A. Path Planning for Autonomous Mobile Robots: A Review. Sensors
**2021**, 21, 7898. [Google Scholar] [CrossRef] - Xie, R.; Meng, Z.; Wang, L.; Li, H.; Wang, K.; Wu, Z. Unmanned Aerial Vehicle Path Planning Algorithm Based on Deep Reinforcement Learning in Large-Scale and Dynamic Environments. IEEE Access
**2021**, 9, 24884–24900. [Google Scholar] [CrossRef] - Schacht-Rodríguez, R.; Ponsart, J.C.; García-Beltran, C.D.; Astorga-Zaragoza, C.M.; Theilliol, D.; Zhang, Y. Path Planning Generation Algorithm for a Class of UAV Multirotor Based on State of Health of Lithium Polymer Battery. J. Intell. Robot. Syst.
**2018**, 91, 115–131. [Google Scholar] [CrossRef] - Benders, S.; Wenz, A.; Johansen, T.A. Adaptive Path Planning for Unmanned Aircraft Using In-flight Wind Velocity Estimation. In Proceedings of the International Conference on Unmanned Aircraft Systems (ICUAS), Dallas, TX, USA, 12–15 June 2018; pp. 483–492. [Google Scholar] [CrossRef]
- Elmokadem, T.; Savkin, A.V. Towards Fully Autonomous UAVs: A Survey. Sensors
**2021**, 21, 6223. [Google Scholar] [CrossRef] - Marin-Plaza, P.; Hussein, A.; Martin, D.; Escalera, A. Global and Local Path Planning Study in a ROS-Based Research Platform for Autonomous Vehicles. J. Adv. Transp.
**2018**, 6392697. [Google Scholar] [CrossRef] - Yingkun, Z. Flight path planning of agriculture UAV based on improved artificial potential field method. In Proceedings of the Chinese Control and Decision Conference (CCDC), Shenyang, China, 9–11 June 2018; pp. 1526–1530. [Google Scholar] [CrossRef]
- Zhang, H.; Lin, W.; Chen, A. Path Planning for the Mobile Robot: A Review. Symmetry
**2018**, 10, 450. [Google Scholar] [CrossRef][Green Version] - Zhang, H.; Zhu, Y.; Liu, X.; Xu, X. Analysis of Obstacle Avoidance Strategy for Dual-Arm Robot Based on Speed Field with Improved Artificial Potential Field Algorithm. Electronics
**2021**, 10, 1850. [Google Scholar] [CrossRef] - Shin, Y.; Kim, E. Hybrid path planning using positioning risk and artificial potential fields. Aero. Sci. Technol.
**2021**, 112, 106640. [Google Scholar] [CrossRef] - Li, H. Robotic Path Planning Strategy Based on Improved Artificial Potential Field. In Proceedings of the International Conference on Artificial Intelligence and Computer Engineering (ICAICE), Beijing, China, 23–25 October 2020; pp. 67–71. [Google Scholar] [CrossRef]
- Yao, Q.; Zheng, Z.; Qi, L.; Yuan, H.; Guo, X.; Zhao, M.; Liu, Z.; Yang, T. Path Planning Method with Improved Artificial Potential Field-A Reinforcement Learning Perspective. IEEE Access
**2020**, 8, 135513–135523. [Google Scholar] [CrossRef] - Shang, M.; Chu, M.; Grethler, M. Path Planning Based on Artificial Potential Field and Fuzzy Control. In Proceedings of the International Conference on Intelligent Computing, Automation and Systems (ICICAS), Chongqing, China, 11–13 December 2020; pp. 304–308. [Google Scholar] [CrossRef]
- Ruiz, K.; Victor, S.; Melchior, P.; Chaumette, S. A new dynamical repulsive fractional potential for UAVs in 3D dynamical environments. In Proceedings of the International Federation of Automatic Control (IFAC), Berlin, Germany, 11–17 July 2020; pp. 3719–3724. [Google Scholar] [CrossRef]
- Zhou, Z.; Wang, J.; Zhu, Z.; Yang, D.; Wu, J. Tangent navigated robot path planning strategy using particle swarm optimized artificial potential field. Optik
**2018**, 158, 639–651. [Google Scholar] [CrossRef] - Di, W.; Caihong, L.; Na, G.; Yong, S.; Tengteng, G.; Guoming, L. Local Path Planning of Mobile Robot Based on Artificial Potential Field. In Proceedings of the 39th Chinese Control Conference (CCC), Shenyang, China, 27–29 July 2020; pp. 3677–3682. [Google Scholar] [CrossRef]
- Sepehri, A.; Moghaddam, A.M. A Motion Planning Algorithm for Redundant Manipulators Using Rapidly Exploring Randomized Trees and Artificial Potential Fields. IEEE Access
**2021**, 9, 26059–26070. [Google Scholar] [CrossRef] - Chang, K.; Xia, Y.; Huang, K. UAV formation control design with obstacle avoidance in dynamic three-dimensional environment. SpringerPlus
**2016**, 5, 1124. [Google Scholar] [CrossRef][Green Version] - Sudan Das, M.; Sanyal, S.; Mandal, S. Navigation of Multiple Robots in Formative Manner in an Unknown Environment using Artificial Potential Field Based Path Planning Algorithm. Ain Shams Eng. J.
**2021**, 13, 101675. [Google Scholar] [CrossRef] - Lu, B.; He, H.; Yu, H.; Wang, H.; Li, G.; Shi, M.; Cao, D. Hybrid Path Planning Combining Potential Field with Sigmoid Curve for Autonomous Driving. Sensors
**2020**, 20, 7197. [Google Scholar] [CrossRef] [PubMed] - Matoui, F.; Boussaid, B.; Abdelkrim, M.N. Distributed path planning of a multi-robot system based on the neighborhood artificial potential field approach. Simulation
**2019**, 95, 637–657. [Google Scholar] [CrossRef] - Hwang, J.; Lee, J.; Park, C. Collision avoidance control for formation flying of multiple spacecraft using artificial potential field. Adv. Space Res.
**2021**, 69, 2197–2209. [Google Scholar] [CrossRef] - Crazyflie 2.1. Available online: https://www.bitcraze.io/products/crazyflie-2-1 (accessed on 12 July 2021).
- Getting Started with the Loco Positioning System. Available online: https://www.bitcraze.io/documentation/tutorials/getting-started-with-loco-positioning-system/ (accessed on 12 July 2021).
- Raffo, G.V.; Ortega, M.G.; Rubio, F.R. An integral predictive/nonlinear Hinf control structure for a quadrotor helicopter. Automatica
**2010**, 46, 29–39. [Google Scholar] [CrossRef] - Förster, J. System Identification of the Crazyflie 2.0 Nano Quadrocopter. Bachelor’s Thesis, Swiss Federal Institute of Technology (ETH), Zurich, Swiss, 2015. [Google Scholar]
- Khatib, O. Real-Time Obstacle Avoidance for Manipulators and Mobile Robots. Int. J. Robot. Res.
**1986**, 5, 90–98. [Google Scholar] [CrossRef] - Sun, J.; Tang, J.; Lao, S. Collision Avoidance for Cooperative UAVs with Optimized Artificial Potential Field Algorithm. IEEE Access
**2017**, 5, 18382–18390. [Google Scholar] [CrossRef] - Fan, X.; Guo, Y.; Hui, L.; Wei, B.; Wenhong, L. Improved Artificial Potential Field Method Applied for AUV Path Planning. Math. Prob. Eng.
**2020**, 2020, 6523158. [Google Scholar] [CrossRef]

Variable | K_{p} | K_{i} | K_{d} | |I_{lim}| | |u_{lim}| |
---|---|---|---|---|---|

X | 1.8 | 0.0 | 0.0 | 5000 | 1.10 |

Y | 1.8 | 0.0 | 0.0 | 5000 | 1.10 |

Z | 1.8 | 0.7 | 0.2 | 5000 | 1.10 |

$\dot{X}$ | 25.0 | 5.0 | 0.0 | 5000 | 22.0 |

$\dot{Y}$ | 25.0 | 5.0 | 0.0 | 5000 | 22.0 |

$\dot{Z}$ | 25.0 | 15.0 | 0.0 | 5000 | 32.7 |

$\varphi $ | 8.0 | 3.0 | 0.0 | 20.0 | - |

$\theta $ | 8.0 | 3.0 | 0.0 | 20.0 | - |

$\psi $ | 4.0 | 1.0 | 0.35 | 360.0 | - |

$\dot{\varphi}$ | 250.0 | 500.0 | 2.5 | 33.3 | - |

$\dot{\theta}$ | 250.0 | 500.0 | 2.5 | 33.0 | - |

$\dot{\psi}$ | 120.0 | 16.7 | 0.0 | 166.7 | - |

Component | Signal | Mathematical Operations |
---|---|---|

$\overrightarrow{{R}^{X}}$ | ≤0 | ${}_{n}{}^{m}F{}_{V}^{X}\left(q\right)={}_{n}{}^{m}F{}_{V}^{X}\left(q\right)$ ${}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)={}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)+{K}_{V}\cdot {}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)$ ${}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)={}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)-{K}_{V}\cdot {}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)$ |

>0 | ${}_{n}{}^{m}F{}_{V}^{X}\left(q\right)={}_{n}{}^{m}F{}_{V}^{X}\left(q\right)$ ${}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)={}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)-{K}_{V}\cdot {}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)$ ${}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)={}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)+{K}_{V}\cdot {}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)$ | |

$\overrightarrow{{R}^{Y}}$ | ≤0 | ${}_{n}{}^{m}F{}_{V}^{X}\left(q\right)={}_{n}{}^{m}F{}_{V}^{X}\left(q\right)-{K}_{V}\cdot {}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)$ ${}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)={}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)$ ${}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)={}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)+{K}_{V}\cdot {}_{n}{}^{m}F{}_{V}^{X}\left(q\right)$ |

>0 | ${}_{n}{}^{m}F{}_{V}^{X}\left(q\right)={}_{n}{}^{m}F{}_{V}^{X}\left(q\right)+{K}_{V}\cdot {}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)$ ${}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)={}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)$ ${}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)={}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)-{K}_{V}\cdot {}_{n}{}^{m}F{}_{V}^{X}\left(q\right)$ | |

$\overrightarrow{{R}^{Z}}$ | ≤0 | ${}_{n}{}^{m}F{}_{V}^{X}\left(q\right)={}_{n}{}^{m}F{}_{V}^{X}\left(q\right)+{K}_{V}\cdot {}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)$ ${}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)={}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)-{K}_{V}\cdot {}_{n}{}^{m}F{}_{V}^{X}\left(q\right)$ ${}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)={}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)$ |

>0 | ${}_{n}{}^{m}F{}_{V}^{X}\left(q\right)={}_{n}{}^{m}F{}_{V}^{X}\left(q\right)-{K}_{V}\cdot {}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)$ ${}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)={}_{n}{}^{m}F{}_{V}^{Y}\left(q\right)+{K}_{V}\cdot {}_{n}{}^{m}F{}_{V}^{X}\left(q\right)$ ${}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)={}_{n}{}^{m}F{}_{V}^{Z}\left(q\right)$ |

Variable | Value | Unit | |
---|---|---|---|

Workspace size (x, y, z) | (2.2, 3.8, 2.0) | (m) | |

Time of execution | 21 | (s) | |

Target initial position (x, y, z) | (1.2, 2.6, 1.2) | (m) | |

Target trajectory (as a function of time “t”) | x | 0.5 sin(t/3.5) | (m/s) |

y | 0.8 cos(t/3.5) | (m/s) | |

z | 0.7 sin(t/3.5) | (m/s) | |

Obstacle size (x, y, z) | (0.4, 0.4, 0.3) | (m) | |

Obstacle center of mass initial position (x, y, z) | (1.1, 1.9, 1.25) | (m) | |

Obstacle trajectory (as a function of time “t”) | x | 0.02t | (m/s) |

y | −0.02t | (m/s) | |

z | 0.00t | (m/s) | |

Initial coordinates of the UAV 1 (x, y, z) | (0.6, 0.5, 0.5) | (m) | |

Initial coordinates of the UAV 2 (x, y, z) | (1.1, 0.5, 0.5) | (m) |

Variable | Value | Unit |
---|---|---|

Attractive field gain coefficient | 1 | - |

Repulsive field gain coefficient | 2 | - |

Distance of influence of the obstacle | 0.6 | m |

Vortex field gain coefficient (when applied) | 4 | - |

UAV speed constraint | 0.3 | m/s |

Metric | Conventional APF | LTAPF | Proposed APF | |||
---|---|---|---|---|---|---|

UAV1 | UAV2 | UAV1 | UAV2 | UAV1 | UAV2 | |

Total distance travelled (m) | 5.0797 | 4.9327 | 5.1585 | 5.2856 | 5.3627 | 5.1027 |

Final target approach (m) | 0.4475 | 0.3532 | 0.4089 | 0.3038 | 0.3238 | 0.2843 |

Mean target distance (m) | 0.8762 | 0.9280 | 1.0378 | 0.8066 | 0.8729 | 0.8590 |

Collision | Yes | Yes | Yes | No | No | No |

Quad/Test | Axis | Max. Error (m) | Min. Error (m) | IAE |
---|---|---|---|---|

x | 0.396 | 0.000 | 2.516 | |

UAV 1–Test 1 | y | 0.511 | 0.003 | 3.812 |

z | 0.379 | 0.000 | 2.937 | |

x | 0.370 | 0.000 | 2.473 | |

UAV 1–Test 2 | y | 0.435 | 0.001 | 3.772 |

z | 0.381 | 0.000 | 2.870 | |

x | 0.408 | 0.001 | 2.530 | |

UAV 1–Test 3 | y | 0.493 | 0.002 | 3.780 |

z | 0.345 | 0.000 | 2.878 |

Quad/Test | Axis | Max. Error (m) | Min. Error (m) | IAE |
---|---|---|---|---|

x | 0.388 | 0.000 | 2.458 | |

UAV 2–Test 1 | y | 0.470 | 0.002 | 3.635 |

z | 0.348 | 0.000 | 2.408 | |

x | 0.354 | 0.001 | 2.542 | |

UAV 2–Test 2 | y | 0.477 | 0.000 | 3.683 |

z | 0.294 | 0.000 | 2.442 | |

x | 0.350 | 0.000 | 2.605 | |

UAV 2–Test 3 | y | 0.456 | 0.000 | 3.846 |

z | 0.339 | 0.001 | 2.600 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Souza, R.M.J.A.; Lima, G.V.; Morais, A.S.; Oliveira-Lopes, L.C.; Ramos, D.C.; Tofoli, F.L. Modified Artificial Potential Field for the Path Planning of Aircraft Swarms in Three-Dimensional Environments. *Sensors* **2022**, *22*, 1558.
https://doi.org/10.3390/s22041558

**AMA Style**

Souza RMJA, Lima GV, Morais AS, Oliveira-Lopes LC, Ramos DC, Tofoli FL. Modified Artificial Potential Field for the Path Planning of Aircraft Swarms in Three-Dimensional Environments. *Sensors*. 2022; 22(4):1558.
https://doi.org/10.3390/s22041558

**Chicago/Turabian Style**

Souza, Rafael Monteiro Jorge Alves, Gabriela Vieira Lima, Aniel Silva Morais, Luís Cláudio Oliveira-Lopes, Daniel Costa Ramos, and Fernando Lessa Tofoli. 2022. "Modified Artificial Potential Field for the Path Planning of Aircraft Swarms in Three-Dimensional Environments" *Sensors* 22, no. 4: 1558.
https://doi.org/10.3390/s22041558