Skip to main content
Log in

Drone flocking optimization using NSGA-II and principal component analysis

  • Published:
Swarm Intelligence Aims and scope Submit manuscript

Abstract

Individual agents in natural systems like flocks of birds or schools of fish display a remarkable ability to coordinate and communicate in local groups and execute a variety of tasks efficiently. Emulating such natural systems into drone swarms to solve problems in defense, agriculture, industrial automation, and humanitarian relief is an emerging technology. However, flocking of aerial robots while maintaining multiple objectives, like collision avoidance, high speed etc., is still a challenge. This paper proposes optimized flocking of drones in a confined environment with multiple conflicting objectives. The considered objectives are collision avoidance (with each other and the wall), speed, correlation, and communication (connected and disconnected agents). Principal Component Analysis (PCA) is applied for dimensionality reduction and understanding of the collective dynamics of the swarm. The control model is characterized by 12 parameters which are then optimized using a multi-objective solver (NSGA-II). The obtained results are reported and compared with that of the CMA-ES algorithm. The study is particularly useful as the proposed optimizer outputs a Pareto Front representing different types of swarms that can be applied to different scenarios in the real world.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

Data Availability

The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request.

References

  • Abraham, L., Biju, S., Biju, F., et al. (2019). Swarm robotics in disaster management. In 2019 International conference on innovative sustainable computational technologies (CISCT) (pp. 1–5). IEEE.

  • Abson, D. J., Dougill, A. J., & Stringer, L. C. (2012). Using principal component analysis for information-rich socio-ecological vulnerability mapping in Southern Africa. Applied Geography, 35(1–2), 515–524.

    Article  Google Scholar 

  • Allison, C., & Hughes, C. (1991). Bacterial swarming: an example of prokaryotic differentiation and multicellular behaviour. Science Progress, 75(298(Pt 3–4)), 403–422.

    Google Scholar 

  • Balázs, B., Vásárhelyi, G., & Vicsek, T. (2020). Adaptive leadership overcomes persistence-responsivity trade-off in flocking. Journal of the Royal Society Interface, 17(167), 20190853.

    Article  Google Scholar 

  • Blank, J., & Deb, K. (2020). Pymoo: Multi-objective optimization in python. IEEE Access, 8, 89497–89509.

    Article  Google Scholar 

  • Brust, M. R., Danoy, G., Bouvry, P., Gashi, D., Pathak, H., & Gonçalves, M. P. (2017). Defending against intrusion of malicious UAVs with networked UAV defense swarms. In 2017 IEEE 42nd Conference on Local Computer Networks Workshops (LCN Workshops) (pp. 103–111).

  • Coppola, M., McGuire, K. N., De Wagter, C., et al. (2020). A survey on swarming with micro air vehicles: Fundamental challenges and constraints. Frontiers in Robotics and AI, 7, 18.

    Article  Google Scholar 

  • Czaczkes, T. J., Grüter, C., & Ratnieks, F. L. (2015). Trail pheromones: An integrative view of their role in social insect colony organization. Annual Review of Entomology, 60(1), 581–599.

    Article  Google Scholar 

  • Deb, K., & Saxena, D. (2006). Searching for pareto-optimal solutions through dimensionality reduction for certain large-dimensional multi-objective optimization problems. In Proceedings of the world congress on computational intelligence (WCCI-2006) (pp. 3352–3360).

  • Deb, K., Pratap, A., Agarwal, S., et al. (2002). A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Transactions on Evolutionary Computation, 6(2), 182–197.

    Article  Google Scholar 

  • Dewi, M., Hariadi, M., & Purnomo, M. H. (2011). Simulating the movement of the crowd in an environment using flocking. In 2011 2nd international conference on instrumentation, communications, information technology, and biomedical engineering. IEEE, Bandung, West Java, Indonesia (pp. 186–191).

  • Fine, B. T., & Shell, D. A. (2013). Unifying microscopic flocking motion models for virtual, robotic, and biological flock members. Autonomous Robots, 35(2), 195–219.

    Article  Google Scholar 

  • Hauert, S., Leven, S., & Varga, M., et al. (2011). Reynolds flocking in reality with fixed-wing robots: Communication range vs. maximum turning rate. In 2011 IEEE/RSJ international conference on intelligent robots and systems, IEEE (pp. 5015–5020).

  • Ju, C., & Son, H. I. (2018). Multiple uav systems for agricultural applications: control, implementation, and evaluation. Electronics, 7(9), 162.

    Article  Google Scholar 

  • Krizmancic, M., Arbanas, B., & Petrovic, T., et al. (2020). Cooperative aerial-ground multi-robot system for automated construction tasks. IEEE Robotics and Automation Letters, 5(2), 798–805.

  • Kumar, V. (2020). Co-ordination, co-operation, collaboration. https://robohub.org/coordination-cooperation-and-collaboration/ [Robohub Podcast].

  • Loeffler, H. H., & Kitao, A. (2009). Collective dynamics of periplasmic glutamine binding protein upon domain closure. Biophysical Journal, 97(9), 2541–2549.

    Article  Google Scholar 

  • Márquez-Vega, L. A., Aguilera-Ruiz, M., & Torres-Treviño, L. M. (2021). Multi-objective optimization of a quadrotor flock performing target zone search. Swarm and Evolutionary Computation, 60(100), 733.

    Google Scholar 

  • Moere, A. (2004). Time-varying data visualization using information flocking boids. In IEEE Symposium on Information Visualization (pp. 97–104).

  • Mulgaonkar, Y., Makineni, A., Guerrero-Bonilla, L., et al. (2017). Robust aerial robot swarms without collision avoidance. IEEE Robotics and Automation Letters, 3(1), 596–603.

    Article  Google Scholar 

  • Nagy, M., Akos, Z., Biro, D., & Vicsek, T. (2010). Hierarchical group dynamics in pigeon flocks. Nature, 464(7290), 890–893.

    Article  Google Scholar 

  • Pozo, C., Ruiz-Femenia, R., Caballero, J., et al. (2012). On the use of principal component analysis for reducing the number of environmental objectives in multi-objective optimization: Application to the design of chemical supply chains. Chemical Engineering Science, 69(1), 146–158.

    Article  Google Scholar 

  • Reynolds, C. W. (1987). Flocks, herds and schools: A distributed behavioral model. SIGGRAPH Comput Graph, 21(4), 25–34.

    Article  Google Scholar 

  • Ron, J. E., Pinkoviezky, I., Fonio, E., et al. (2018). Bi-stability in cooperative transport by ants in the presence of obstacles. PLoS Computational Biology, 14(5), e1006068.

    Article  Google Scholar 

  • Saffre, F., Hildmann, H., & Karvonen, H. (2021). The design challenges of drone swarm control. In International conference on human-computer interaction (pp. 408–426). Springer.

  • Tosato, P., Facinelli, D., Prada, M., et al. (2019). An autonomous swarm of drones for industrial gas sensing applications. In 2019 IEEE 20th international symposium on “a world of wireless, mobile and multimedia networks” (WoWMoM) (pp. 1–6).

  • Vásárhelyi, G., Virágh, C., Somorjai, G., et al. (2018). Optimized flocking of autonomous drones in confined environments. Science Robotics, 3(20), eaat3536.

    Article  Google Scholar 

  • Virágh, C., Vásárhelyi, G., Tarcai, N., et al. (2014). Flocking algorithm for autonomous flying robots. Bioinspiration and Biomimetics, 9(2), 025012.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jagdish Chand Bansal.

Ethics declarations

Conflict of interest

This work was supported by the funding received in the international joint research project titled “Design and Applications of Swarm Intelligence based algorithms for drone swarm and COVID19 Spread Prediction” funded by Liverpool Hope University UK. The authors declare that there is no conflict of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Electronic supplementary material

Below is the link to the electronic supplementary material.

11721_2022_216_MOESM1_ESM.zip

Supplementary file 1. Code repository: https://github.com/nikhil-sethi/MOflock (ZIP 121 kb)

Supplementary file 2. Comparison of the swarms from the two extreme points on the Pareto front (MP4 8473 kb)

Supplementary file 3. Target following for the two extreme points on the Pareto front (MP4 5864 kb)

Appendices

Appendix A: Background

1.1 Principal component analysis

The covariance matrix K is formulated as follows: Let X be an n x m design matrix with n rows as the samples and m columns as objectives. A pre-processing step often carried out is the normalization of the design matrix which brings the mean of samples for each objective to 0.0 and the variance to 1.0 (Eq. A1). The covariance matrix is then calculated by taking the mean of all samples of the pairwise products for each objective (Eq. A2). In a vectorized format, this is equivalent to taking the matrix product of the design matrix X with its transpose (Eq. A3).

$$\begin{aligned} X_{ij}^{norm}&= \frac{X_{ij}-\mu _{j}}{\sigma _{j}} \end{aligned}$$
(A1)
$$\begin{aligned} K_{ij}&= \frac{1}{n} \sum ^{n}_{k=1} X_{ki}X_{kj} \end{aligned}$$
(A2)
$$\begin{aligned} K&= \frac{1}{n} (X^{norm})^{T} X^{norm} \end{aligned}$$
(A3)
  • where,

  • \(X_{ij} \ \equiv \) Element of X at \(i\hbox {th}\) row and \(j\hbox {th}\) column

  • \(X_{ij}^{norm} \ \equiv X_{ij}\) normalized to 0.0 mean and 1.0 standard deviation

  • \(\mu _{j} \ \equiv \) Mean of all n samples of \(j\hbox {th}\) objective

  • \(\sigma _{j} \ \equiv \) Standard deviation of all n samples of \(j\hbox {th}\) objective

  • \(n \ \equiv \) Number of samples

  • \(m \ \equiv \) Number of objectives

  • \(K \equiv \) Covariance matrix

  • \(K_{ij} \ \equiv \) Element of K at \(i\hbox {th}\) row and \(j\hbox {th}\) column

1.2 Non-dominated sorting genetic algorithm

Let \(P_{o}\) be an N sized initial random population. This population is sorted based on non-domination according to the following rules: An individual \(X_{1}\) in the population is said to be dominated by individual \(X_{2}\) if satisfies both of the following conditions:

  • All fitnesses of \(X_{1}\) must be less than or equal to that of \(X_{2}\) particle.

  • At least one fitness of \(X_{1}\) must be strictly less than that of \(X_{2 }\).

Mathematically, individual \(X_{1}\) dominates \(X_{2}\) if \(d = 1\), and the individuals are non-dominated if \(d=0\).

Where, \(d = \{ \forall m \ F(X_{1})^m \le F(X_{2})^m \} \cap \{ \exists m \ F(X_{1})^m < F(X_{2})^m \}\)

This method divides the population into dominating and non-dominating solutions, which is a heuristic used to guide the population towards better solutions through the generations. Each solution in this population is also ranked based on the number of other members it is dominated by, and accordingly, it is assigned a front rank. Next, an offspring population Q is created from the sorted population by applying tournament selection, recombination, and mutation operators. A new 2N sized population is made using \(P \cup Q\) and is again sorted and ranked to retain the best solution across generations (elitism). To make the next population \(P_{t+1}\) from this combined set, solutions are taken in order of their front ranking. In case the number of solutions belonging to a front exceeds the amount that can be accommodated into the new N sized population, the remaining solutions in that front are ranked based on a crowding operator as follows:

Let \(\mathcal {F}^{k}\) be the set of solutions on the \(k\hbox {th}\) ranked Pareto front. The crowding distance (\(c^{m}_{i}\)) for the \(m\hbox {th}\) objective for \(i\hbox {th}\) solution on this front is defined as the normalized distance between the two nearest solutions i.e. \((i+1)\hbox {th}\) and \((i-1)\hbox {th}\) (Eq. A4). The overall crowding distance (\(c_{i}\)) is the sum taken for each objective (Eq. A5).

$$\begin{aligned} \forall X_{i} \in \mathcal {F}^{k}: c^{m}_{i}&= \frac{F^{m}(X_{i+1}) -F^{m}(X_{i-1})}{F^{m}_{max}-F^{m}_{min}} \end{aligned}$$
(A4)
$$\begin{aligned} c_{i}&= \sum ^{M}_{m=1} c^{m}_{i} \end{aligned}$$
(A5)

This crowding operator ensures that the Pareto Front is uniformly distributed, and the range of each objective value is minimized as the search progresses. The remaining solutions are ranked according to \(c_{i}\) and the new population \(P_{t+1}\) moves forward to the next generation. NSGA-II is faster than NSGA-I and has a worst-case complexity of \(O(MN^{2})\).

Appendix B: Decision variables

1.1 Separation

The following two equations (B7) and (B8) are used to find a repulsion vector for agent i after scaling it according to the relative distances in \({\textbf {r}}_{i}^{\mathrm {mag}}\) and a gain \(p^{\mathrm {rep}}\).

$$\begin{aligned} {\textbf {r}}^{\mathrm {mag}}&= \Vert R^{rel}\Vert ^{\bot r_{0}^{\mathrm {rep}} } \end{aligned}$$
(B6)
$$\begin{aligned} V^{\mathrm {rep}}&= p^{\mathrm {rep}}. ({\textbf {r}}^{\mathrm {mag}} - r_{0}^{\mathrm {rep}}).\frac{R^{rel}}{{\textbf {r}}^{\mathrm {mag}}} \end{aligned}$$
(B7)
$$\begin{aligned} {\textbf {v}}^{\mathrm {rep}}_{i}&=\sum _{j=1}^{\mathcal {N}_{o}} V^{\mathrm {rep}}_{j} \end{aligned}$$
(B8)
  • where,

  • \(a_{\top b} = max(a,b)\) i.e. a is at least b

  • \(a^{\bot c} = min(a,c)\) i.e. a is at most c

  • \({\textbf {r}}^{\mathrm {mag}} \equiv \mathcal {N}_{o} \ \text {x} \ 1 \) sized vector containing inter-agent distances

  • \(r_{0}^{\mathrm {rep}} \ \equiv \) Repulsion cutoff distance (user-dependent parameter)

  • \(p^{\mathrm {rep}} \ \equiv \) Repulsion gain (user-dependent parameter)

  • \(V^{\mathrm {rep}} \ \equiv \mathcal {N}_{o} \ \text {x} \ 2 \) sized matrix of scaled repulsion velocities for all neighbors

  • \(V^{\mathrm {rep}}_{j} \ \equiv \) Repulsion velocity of \(j\hbox {th}\) neighbor i.e. \(j\hbox {th}\) row of \(V^{\mathrm {rep}}\)

  • \({\textbf {v}}^{\mathrm {rep}}_{i}\ \equiv \) Desired collective repulsion vector

Note that the upper bound of \({\textbf {r}}^{\mathrm {mag}}\) is the parameter \(r_{0}^{\mathrm {rep}}\) to enable short-range effects. The matrix norm in Eq. (B6) is only taken along the row axis, i.e. for each neighbor. An Nx2 matrix \((R^{rel})\) of position vectors divided by the distance vector \((r^{\mathrm {mag}})\) yields unit position vectors. \(V^{\mathrm {rep}}\) contains all the corresponding scaled repulsion velocities, and the division and multiplication in Eq. (B7) is done element-wise.

1.2 Alignment

The equations are similar to separation with one major difference: the upper bound for the velocity magnitude (\({\textbf {v}}^{frictmax}\)) is now calculated dynamically with decay function D in Eq. (B9), which is dependent on the inter-agent distance (Vásárhelyi et al. 2018). Eqs. (B10) - (B12) describe the process of finding out the agent’s combined alignment vector.

$$\begin{aligned} {\textbf {v}}^{frictmax}&= D({\textbf {r}}_{i}^{\mathrm {mag}}- r_{0}^{\mathrm {frict}} - r_{0}^{\mathrm {rep}}, a^{\mathrm {frict}}, p^{\mathrm {frict}}) _{\top {v}^{\mathrm {frict}}} \end{aligned}$$
(B9)
$$\begin{aligned} {\textbf {v}}^{\mathrm {mag}}&= \Vert V^{rel}\Vert _{\top {\textbf {v}}^{frictmax}} \end{aligned}$$
(B10)
$$\begin{aligned} V^{\mathrm {frict}}&= c^{\mathrm {frict}}.({\textbf {v}}^{\mathrm {mag}}-{\textbf {v}}^{frictmax}).\frac{V^{rel}}{{\textbf {v}}_{mag}} \end{aligned}$$
(B11)
$$\begin{aligned} {\textbf {v}}^{\mathrm {frict}}_{i}&=\sum _{j=1}^{\mathcal {N}_{o}} V^{\mathrm {frict}}_{j} \end{aligned}$$
(B12)
  • where,

  • D is the velocity decay function from the Vásárhelyi et al. model and takes a vector as the first argument

  • \(p^{\mathrm {frict}} \equiv \) Slope for the linear part of the decay curve (user-dependent parameter)

  • \(a^{\mathrm {frict}} \equiv \) Acceleration for the non-linear part of the decay curve (user-dependent parameter)

  • \(c^{\mathrm {frict}} \equiv \) Overall Gain for alignment (user-dependent parameter)

  • \(v^{\mathrm {frict}} \equiv \) Velocity slack for alignment (user-dependent parameter)

  • \(r_{0}^{\mathrm {frict}} \ \equiv \) Alignment cutoff distance for maximum alignment (user-dependent parameter)

  • \(V^{\mathrm {frict}} \ \equiv \mathcal {N}_{o} \ \text {x} \ 2 \) sized matrix of scaled alignment velocities for all neighbors

  • \(V^{\mathrm {frict}}_{j} \ \equiv \) Alignment velocity of \(j\hbox {th}\) neighbor i.e. \(j\hbox {th}\) row of \(V^{\mathrm {frict}}\)

  • \({\textbf {v}}^{\mathrm {frict}}_{i}\ \equiv \) Desired collective alignment vector

Eq. (B9) gives a vector composed of each neighbor’s maximum allowable velocity differences. The maximum is proportional to the inter-agent distance. This ensures that the alignment for two agents in close proximity is larger and vice-versa. Also, the maximum allowable difference is lower bound by an optimization parameter \(v^{\mathrm {frict}}\) so the agents do not strive for perfect alignment, and there is some slack. Eq. (B11) compensates for the velocity difference for each neighbor, and Eq. (B12) sums the alignment velocities for each neighbor.

Appendix C: Software

See Figure 7.

Fig. 7
figure 7

Class diagram for the Multi-Objective flocking simulator. The Env class has a 1 to n relationship with the CoBot as each environment can contain multiple CoBots. Similarly, the Optimizer class can run multiple environments on multiple cores/processes. The complete simulator is available on GitHub (Supplementary material S1, 2022)

Rights and permissions

Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Bansal, J.C., Sethi, N., Anicho, O. et al. Drone flocking optimization using NSGA-II and principal component analysis. Swarm Intell 17, 63–87 (2023). https://doi.org/10.1007/s11721-022-00216-x

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11721-022-00216-x

Keywords

Navigation