<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article article-type="research-article" dtd-version="2.3" xml:lang="EN" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Robot. AI</journal-id>
<journal-title>Frontiers in Robotics and AI</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Robot. AI</abbrev-journal-title>
<issn pub-type="epub">2296-9144</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">1219931</article-id>
<article-id pub-id-type="doi">10.3389/frobt.2023.1219931</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Robotics and AI</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Distributed control for geometric pattern formation of large-scale multirobot systems</article-title>
<alt-title alt-title-type="left-running-head">Giusti et al.</alt-title>
<alt-title alt-title-type="right-running-head">
<ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3389/frobt.2023.1219931">10.3389/frobt.2023.1219931</ext-link>
</alt-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" equal-contrib="yes">
<name>
<surname>Giusti</surname>
<given-names>Andrea</given-names>
</name>
<xref ref-type="aff" rid="aff1">
<sup>1</sup>
</xref>
<xref ref-type="fn" rid="fn001">
<sup>&#x2020;</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/2301555/overview"/>
</contrib>
<contrib contrib-type="author" equal-contrib="yes">
<name>
<surname>Maffettone</surname>
<given-names>Gian Carlo</given-names>
</name>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
<xref ref-type="fn" rid="fn001">
<sup>&#x2020;</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/2294614/overview"/>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Fiore</surname>
<given-names>Davide</given-names>
</name>
<xref ref-type="aff" rid="aff3">
<sup>3</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/2390469/overview"/>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Coraggio</surname>
<given-names>Marco</given-names>
</name>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/2332992/overview"/>
</contrib>
<contrib contrib-type="author" corresp="yes">
<name>
<surname>di Bernardo</surname>
<given-names>Mario</given-names>
</name>
<xref ref-type="aff" rid="aff1">
<sup>1</sup>
</xref>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
<xref ref-type="corresp" rid="c001">&#x2a;</xref>
<uri xlink:href="https://loop.frontiersin.org/people/367321/overview"/>
</contrib>
</contrib-group>
<aff id="aff1">
<sup>1</sup>
<institution>Department of Electrical Engineering and Information Technology</institution>, <institution>University of Naples Federico II</institution>, <addr-line>Naples</addr-line>, <country>Italy</country>
</aff>
<aff id="aff2">
<sup>2</sup>
<institution>Scuola Superiore Meridionale</institution>, <addr-line>Naples</addr-line>, <country>Italy</country>
</aff>
<aff id="aff3">
<sup>3</sup>
<institution>Department of Mathematics and Applications &#x201c;R. Caccioppoli&#x201d;</institution>, <institution>University of Naples Federico II</institution>, <addr-line>Naples</addr-line>, <country>Italy</country>
</aff>
<author-notes>
<fn fn-type="edited-by">
<p>
<bold>Edited by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/1385250/overview">Roberto Casadei</ext-link>, University of Bologna, Italy</p>
</fn>
<fn fn-type="edited-by">
<p>
<bold>Reviewed by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/2324690/overview">Gianluca Aguzzi</ext-link>, University of Bologna, Italy</p>
<p>
<ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/765647/overview">Matteo Luperto</ext-link>, University of Milan, Italy</p>
<p>
<ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/2425241/overview">Danilo Pianini</ext-link>, University of Bologna, Italy</p>
</fn>
<corresp id="c001">&#x2a;Correspondence: Mario di Bernardo, <email>mario.dibernardo@unina.it</email>
</corresp>
<fn fn-type="equal" id="fn001">
<label>
<sup>&#x2020;</sup>
</label>
<p>These authors have contributed equally to this work and share first authorship</p>
</fn>
</author-notes>
<pub-date pub-type="epub">
<day>28</day>
<month>09</month>
<year>2023</year>
</pub-date>
<pub-date pub-type="collection">
<year>2023</year>
</pub-date>
<volume>10</volume>
<elocation-id>1219931</elocation-id>
<history>
<date date-type="received">
<day>09</day>
<month>05</month>
<year>2023</year>
</date>
<date date-type="accepted">
<day>05</day>
<month>09</month>
<year>2023</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#xa9; 2023 Giusti, Maffettone, Fiore, Coraggio and di Bernardo.</copyright-statement>
<copyright-year>2023</copyright-year>
<copyright-holder>Giusti, Maffettone, Fiore, Coraggio and di Bernardo</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/">
<p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p>
</license>
</permissions>
<abstract>
<p>
<bold>Introduction:</bold> Geometric pattern formation is crucial in many tasks involving large-scale multi-agent systems. Examples include mobile agents performing surveillance, swarms of drones or robots, and smart transportation systems. Currently, most control strategies proposed to achieve pattern formation in network systems either show good performance but require expensive sensors and communication devices, or have lesser sensor requirements but behave more poorly.</p>
<p>
<bold>Methods and result:</bold> In this paper, we provide a distributed displacement-based control law that allows large groups of agents to achieve triangular and square lattices, with low sensor requirements and without needing communication between the agents. Also, a simple, yet powerful, adaptation law is proposed to automatically tune the control gains in order to reduce the design effort, while improving robustness and flexibility.</p>
<p>
<bold>Results:</bold> We show the validity and robustness of our approach via numerical simulations and experiments, comparing it, where possible, with other approaches from the existing literature.</p>
</abstract>
<kwd-group>
<kwd>multiagent systems</kwd>
<kwd>pattern formation</kwd>
<kwd>distributed control</kwd>
<kwd>swarm robotics</kwd>
<kwd>collective dynamics</kwd>
</kwd-group>
<custom-meta-wrap>
<custom-meta>
<meta-name>section-at-acceptance</meta-name>
<meta-value>Multi-Robot Systems</meta-value>
</custom-meta>
</custom-meta-wrap>
</article-meta>
</front>
<body>
<sec id="s1">
<title>1 Introduction</title>
<p>Many robotic applications require&#x2014;or may benefit from&#x2014;one or more groups of multiple agents to perform a joint task (<xref ref-type="bibr" rid="B39">Shi and Yan, 2021</xref>); this is, for example, the case of surveillance (<xref ref-type="bibr" rid="B25">Lopes and Lima, 2021</xref>), exploration (<xref ref-type="bibr" rid="B17">Kegeleirs et al., 2021</xref>), herding (<xref ref-type="bibr" rid="B1">Auletta et al., 2022</xref>) or transportation (<xref ref-type="bibr" rid="B12">Gardi et al., 2022</xref>). When the number of agents becomes extremely large, the task becomes a <italic>swarm robotics</italic> problem (<xref ref-type="bibr" rid="B6">Brambilla et al., 2013</xref>; <xref ref-type="bibr" rid="B15">Heinrich et al., 2022</xref>). Typically, in these problems, it is assumed that the agents are relatively simple, and thus have limited communication and sensing capabilities, and limited computational resources; see, for example the robotic swarms described in <xref ref-type="bibr" rid="B14">Hauert et al. (2009)</xref>; <xref ref-type="bibr" rid="B36">Rubenstein et al. (2014)</xref>; <xref ref-type="bibr" rid="B12">Gardi et al. (2022)</xref>. Sometimes, to cope with such big ensembles, macroscopic methods exploiting partial differential equations can be also suitable (<xref ref-type="bibr" rid="B5">Biswal et al., 2021</xref>; <xref ref-type="bibr" rid="B26">Maffettone et al., 2023a</xref>, <xref ref-type="bibr" rid="B27">b</xref>).</p>
<p>In swarm robotics, typical tasks of interest include <italic>aggregation</italic>, <italic>flocking</italic>, <italic>navigation</italic>, <italic>spatial organisation</italic>, <italic>collaborative manipulation</italic>, and <italic>task allocation</italic> (<xref ref-type="bibr" rid="B6">Brambilla et al., 2013</xref>; <xref ref-type="bibr" rid="B4">Bayindir, 2016</xref>). Among these, an important subclass of spatial organisation problems is <italic>geometric pattern formation</italic>, where the goal is for the agents to self-organize their relative positions into some desired structure or <italic>pattern</italic>, e.g., arranging themselves to form multiple adjacent triangles or on a lattice. Pattern formation is crucial in many applications (<xref ref-type="bibr" rid="B29">Oh et al., 2017</xref>), including sensor networks deployment (<xref ref-type="bibr" rid="B19">Kim et al., 2014</xref>; <xref ref-type="bibr" rid="B50">Zhao et al., 2019</xref>), cooperative transportation and construction (<xref ref-type="bibr" rid="B35">Rubenstein et al., 2013</xref>; <xref ref-type="bibr" rid="B28">Mooney and Johnson, 2014</xref>; <xref ref-type="bibr" rid="B12">Gardi et al., 2022</xref>), and 2D or 3D exploration and mapping (<xref ref-type="bibr" rid="B17">Kegeleirs et al., 2021</xref>) or area coverage (<xref ref-type="bibr" rid="B47">Wang and Rubenstein, 2020</xref>). Moreover, the formation of patterns is common in many biological systems where agents, such as cells or microorganisms, form organized geometric structures, e.g., <xref ref-type="bibr" rid="B43">Tan et al. (2022)</xref>.</p>
<p>There are two main difficulties associated with achieving pattern formation. Firstly, as there are no leader agents, the pattern must emerge by exploiting a control strategy that is the same for all agents, <italic>distributed</italic> and <italic>local</italic> (i.e., each agent can only use information about &#x201c;nearby&#x201d; agents). Secondly, the number of agents is large and may change over time; therefore, the control strategy must also be <italic>scalable</italic> to varying sizes of the swarm and <italic>robust</italic> to uncertainties due to its possible variations.</p>
<p>This sets the problem of achieving pattern formation apart from the more classical <italic>formation control</italic> problems (<xref ref-type="bibr" rid="B30">Oh et al., 2015</xref>) where agents are typically fewer and have pre-assigned roles within the formation. Moreover, note that geometric formations can also emerge as a by-product of <italic>flocking</italic> algorithms as those described in <xref ref-type="bibr" rid="B31">Olfati-Saber (2006)</xref>; <xref ref-type="bibr" rid="B46">Wang G. et al. (2022)</xref>. Nevertheless in such cases often the focus of the control strategy is to achieve coordinated motion rather than desired regular formations to emerge.</p>
<p>To classify existing solutions to pattern formation, we employ the same taxonomy used in <xref ref-type="bibr" rid="B30">Oh et al. (2015)</xref>, and later extended in <xref ref-type="bibr" rid="B38">Sakurama and Sugie (2021)</xref>, which is based on the type of information available to the agents. Namely, existing strategies can be classified as being (i) <italic>position-based</italic> when it is assumed agents know their position and orientation and those of their neighbours, in a global reference frame; (ii) <italic>displacement-based</italic> when agents can only sense their own orientation with respect to a global reference direction (e.g., North) and the relative positions of their neighbours; (iii) <italic>distance-based</italic> when agents can measure the relative positions of their neighbours with respect to their local reference frame. In terms of sensor requirements, position-based solutions are the most demanding, requiring global positioning sensors, typically GPS, and communication devices, such as WiFi or LoRa. Differently, displacement-based methods require only a distance sensor (e.g., LiDAR) and a compass, although the latter can be replaced by a coordinated initialisation procedure of all local reference frames (<xref ref-type="bibr" rid="B9">Cort&#xe9;s, 2009</xref>). Finally, distance-based algorithms are the least demanding, needing only the availability of some distance sensors.</p>
<p>A pressing open challenge in pattern formation problems is that of devising new local and distributed control strategies that can combine low sensor requirements with consistently high performance. This is crucial in swarm robotics, where it can be generally cumbersome, or prohibitively expensive, to equip all agents with GPS sensors and communication capabilities, e.g., <xref ref-type="bibr" rid="B36">Rubenstein et al. (2014)</xref>.</p>
</sec>
<sec id="s2">
<title>2 Related work and main contributions</title>
<p>Next, we give a brief overview of the existing literature before expounding our main contributions. Notice that most of these control strategies are based on the use of <italic>virtual forces</italic> (see <xref ref-type="bibr" rid="B18">Khatib, 1985</xref>), an approach inspired by Physics, where each agent is subject to virtual forces [e.g., Lennard-Jones and Morse functions (<xref ref-type="bibr" rid="B6">Brambilla et al., 2013</xref>; <xref ref-type="bibr" rid="B10">D&#x2019;Orsogna et al., 2006</xref>)] from neighbouring agents, obstacles, and the environment.</p>
<sec id="s2-1">
<title>2.1 Position-based approaches</title>
<p>In <xref ref-type="bibr" rid="B34">Pinciroli et al. (2008)</xref>, a position-based algorithm was proposed to achieve 2D triangular lattices in a constellation of satellites in a 3D space. This strategy combines global attraction towards a reference point with local interaction among the agents to control both the global shape and the internal lattice structure of the swarm. In <xref ref-type="bibr" rid="B7">Casteigts et al. (2012)</xref>, a position-based approach was presented that combines the common radial virtual force [also used in <xref ref-type="bibr" rid="B42">Spears et al. (2004)</xref>, <xref ref-type="bibr" rid="B16">Hettiarachchi and Spears (2005)</xref>, <xref ref-type="bibr" rid="B44">Torquato (2009)</xref>] with a normal force. In this way, a network of connections is built such that each agent has at least two neighbours; then, a set of geometric rules is used to decide whether any or both of these forces are applied between any pair of agents. Importantly, this approach requires the acquisition of positions from two-hop neighbours. In <xref ref-type="bibr" rid="B50">Zhao et al. (2019)</xref>, a position-based strategy is presented to achieve triangular and square patterns, as well as lines and circles, both in 2D and 3D; the control strategy features global attraction towards a reference point and re-scaling of distances between neighbours, with the virtual forces changing according to the goal pattern. Therein, a qualitative comparison is also provided with the distance-based strategy from <xref ref-type="bibr" rid="B42">Spears et al. (2004)</xref>, showing more precise configurations and a shorter convergence time, due to the position-based nature of the solution. Finally, a simple position-based algorithm for triangular patterns, based on virtual forces and requiring communication between the agents, is proposed in <xref ref-type="bibr" rid="B45">Trotta et al. (2018)</xref> to have unmanned aerial vehicles perform area coverage.</p>
</sec>
<sec id="s2-2">
<title>2.2 Displacement-based approaches</title>
<p>In <xref ref-type="bibr" rid="B24">Li et al. (2009)</xref>, a displacement-based approach is presented based on the use of a geometric control law similar to the one proposed in <xref ref-type="bibr" rid="B21">Lee and Chong (2008)</xref>. The aim is to obtain triangular lattices but small persisting oscillations of the agents are present at steady state, as the robots are assumed to have a constant non-zero speed. In <xref ref-type="bibr" rid="B2">Balch and Hybinette (2000a</xref>, <xref ref-type="bibr" rid="B3">b)</xref>, an approach is discussed inspired by covalent bonds in crystals, where each agent has multiple attachment points for its neighbours. Only starting conditions close to the desired pattern are tested, as the focus is on navigation in environments with obstacles. In <xref ref-type="bibr" rid="B40">Song and O&#x2019;Kane (2014)</xref> the desired lattice is encoded by a graph, where the vertices denote possible <italic>roles</italic> the agents may play in the lattice and edges denote rigid transformations between the local frames or reference of pairs of neighbours. All agents communicate with each other and are assigned a label (or identification number) through which they are organised hierarchically to form triangular, square, hexagonal or octagon-square patterns. Formation control is similarly addressed in <xref ref-type="bibr" rid="B8">Coppola et al. (2019)</xref>. The algorithm proposed therein is made of a higher level policy to assign positions in a square lattice to the agents, and a lower level control, based on virtual forces, to have the agents reach these positions. The algorithm can be readily applied to the formation of square geometric patterns, but not to triangular ones. Notably, the reported convergence time is relatively long and increase with the number of agents. Finally, a solution to progressively deploy a swarm on a predetermined set of points is presented in <xref ref-type="bibr" rid="B23">Li et al. (2019)</xref>. The algorithm can be used to perform both formation control and geometric lattice formation, even though the orientation of the formation cannot be controlled. Moreover, this strategy requires local communication between the agents and the knowledge of a common graph associated to the formation.</p>
</sec>
<sec id="s2-3">
<title>2.3 Distance-based approaches</title>
<p>A popular distance-based approach for the formation of triangular and square lattices, named <italic>physicomimetics</italic>, was proposed in <xref ref-type="bibr" rid="B41">Spears and Gordon (1999)</xref> and later further investigated in <xref ref-type="bibr" rid="B42">Spears et al. (2004)</xref>; <xref ref-type="bibr" rid="B16">Hettiarachchi and Spears (2005)</xref>. In these studies, triangular lattices are achieved with long-range attraction and short-range repulsion virtual forces only, while square lattices are obtained through a selective rescaling of the distances between some of the agents. The main drawback of the physicomimetics strategy (<xref ref-type="bibr" rid="B41">Spears and Gordon, 1999</xref>; <xref ref-type="bibr" rid="B42">Spears et al., 2004</xref>; <xref ref-type="bibr" rid="B16">Hettiarachchi and Spears, 2005</xref>; <xref ref-type="bibr" rid="B37">Sailesh et al., 2014</xref>) is that it can produce the formation of multiple aggregations of agents, each respecting the desired pattern, but with different orientations. Another problem, described in <xref ref-type="bibr" rid="B42">Spears et al. (2004)</xref>, is that, for some values of the parameters, multiple agents can converge towards the same position and collide.</p>
<p>Similar approaches are also used to obtain triangular lattices when using flocking algorithms (<xref ref-type="bibr" rid="B31">Olfati-Saber, 2006</xref>; <xref ref-type="bibr" rid="B48">Wang et al., 2022b</xref>, <xref ref-type="bibr" rid="B46">a</xref>). An extension to achieve the formation of hexagonal lattices was proposed in <xref ref-type="bibr" rid="B37">Sailesh et al. (2014)</xref>, but with the requirement of an <italic>ad hoc</italic> correction procedure to prevent agents from remaining stuck in the centre of a hexagon.</p>
<p>In <xref ref-type="bibr" rid="B44">Torquato (2009)</xref>, an approach exploiting Lennard-Jones-like virtual forces is numerically optimised to locally stabilise a hexagonal lattice. When applied to mobile agents, the interaction law is time-varying and requires synchronous clocks among the agents. A stability proof for the formation of triangular (or 3D lattices) under the effect of virtual forces control algorithm, was recently published in <xref ref-type="bibr" rid="B13">Giusti et al. (2023)</xref>. In <xref ref-type="bibr" rid="B21">Lee and Chong (2008)</xref>, a different distance-based control strategy, derived from geometric arguments, was proposed to achieve the formation of triangular lattices. An analytical proof of convergence was given to the desired lattice exploiting Lyapunov methods. Robustness to agents&#x2019; failure and the capability of detecting and repairing holes and gaps in the lattice are obtained via an <italic>ad hoc</italic> procedure and verified numerically. A 3D extension was later presented in <xref ref-type="bibr" rid="B22">Lee et al. (2010)</xref>.</p>
</sec>
<sec id="s2-4">
<title>2.4 Main contributions</title>
<p>Our main contributions can be listed as follows.<list list-type="simple">
<list-item>
<p>1. We introduce a novel <italic>distributed displacement-based</italic> local control strategy to solve geometric pattern formation problems in swarm robotics that requires no communication among the agents or any need for labelling them. In particular, to achieve triangular and square lattices, we employ two virtual forces controlling the norm and the angle of the agents&#x2019; relative position, respectively.</p>
</list-item>
<list-item>
<p>2. We show that the strategy performs significantly better than distance-based algorithms (<xref ref-type="bibr" rid="B42">Spears et al., 2004</xref>) when achieving square lattices, in terms of precision and robustness.</p>
</list-item>
<list-item>
<p>3. We propose an adaptive strategy to select the control gains automatically in order for the agents to organize themselves and switch from one desired pattern to another, without the need of off-line tuning of the control gains.</p>
</list-item>
<list-item>
<p>4. We present an exhaustive numerical and experimental validation of the proposed strategy showing its effectiveness even in the presence of actuator constraints and other more realistic effects.</p>
</list-item>
</list>
</p>
<p>When compared to the control strategies in the existing literature, our approach (i) is able to achieve both triangular and square lattices rather than just triangular ones [e.g., as in <xref ref-type="bibr" rid="B21">Lee and Chong (2008)</xref>, <xref ref-type="bibr" rid="B7">Casteigts et al. (2012)</xref>] (ii) yields more precise and robust square lattices with respect to distance-based algorithms (e.g., <xref ref-type="bibr" rid="B42">Spears et al., 2004</xref>; <xref ref-type="bibr" rid="B37">Sailesh et al., 2014</xref>), with only a minimal increase in sensor requirements (a compass); and (iii) does not require the more costly sensors and communication devices used for position-based strategies (e.g., <xref ref-type="bibr" rid="B50">Zhao et al., 2019</xref>), nor labelling of the agents (<xref ref-type="bibr" rid="B40">Song and O&#x2019;Kane, 2014</xref>; <xref ref-type="bibr" rid="B8">Coppola et al., 2019</xref>).</p>
</sec>
</sec>
<sec id="s3">
<title>3 Mathematical preliminaries</title>
<p>
<bold>Notation.</bold> We denote by &#x2016;&#x22c5;&#x2016; the Euclidean norm. Given a set <inline-formula id="inf1">
<mml:math id="m1">
<mml:mi mathvariant="script">B</mml:mi>
</mml:math>
</inline-formula>, its cardinality is denoted by <inline-formula id="inf2">
<mml:math id="m2">
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi mathvariant="script">B</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
</mml:math>
</inline-formula>. We refer to <inline-formula id="inf3">
<mml:math id="m3">
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula> as the <italic>plane</italic>.</p>
<sec id="s3-1">
<title>3.1 Planar swarms</title>
<p>
<statement content-type="definition" id="definition1">
<label>Definition 1</label>
<p>(Swarm). <italic>A (planar) swarm</italic> <inline-formula id="inf4">
<mml:math id="m4">
<mml:mi mathvariant="script">S</mml:mi>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">{</mml:mo>
<mml:mrow>
<mml:mn>1,2</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:mi>N</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">}</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> <italic>is a set of</italic> <inline-formula id="inf5">
<mml:math id="m5">
<mml:mi>N</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">N</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> <italic>identical agents that can move on the plane. For each agent</italic> <inline-formula id="inf6">
<mml:math id="m6">
<mml:mi>i</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">S</mml:mi>
</mml:math>
</inline-formula>
<italic>,</italic> <inline-formula id="inf7">
<mml:math id="m7">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula> <italic>denotes its position in the plane at time</italic> <inline-formula id="inf8">
<mml:math id="m8">
<mml:mi>t</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:math>
</inline-formula>.</p>
</statement>
</p>
<p>Moreover, <inline-formula id="inf9">
<mml:math id="m9">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula> is the relative position of agent <italic>i</italic> with respect to agent <italic>j</italic>, and <italic>&#x3b8;</italic>
<sub>
<italic>ij</italic>
</sub>(<italic>t</italic>) &#x2208; [0, 2<italic>&#x3c0;</italic>] is the angle between <bold>r</bold>
<sub>
<italic>ij</italic>
</sub> and the horizontal axis (see <xref ref-type="fig" rid="F1">Figure 1</xref>).</p>
<fig id="F1" position="float">
<label>FIGURE 1</label>
<caption>
<p>Schematic diagram of two agents, <italic>i</italic> and <italic>j</italic>, showing the key variables used in the paper to describe the agents&#x2019; position and their geometrical relationship.</p>
</caption>
<graphic xlink:href="frobt-10-1219931-g001.tif"/>
</fig>
<p>
<statement content-type="definition" id="definition2">
<label>Definition 2</label>
<p>(Neighbourhood). <italic>Given a swarm and a sensing radius</italic> <inline-formula id="inf10">
<mml:math id="m12">
<mml:msub>
<mml:mrow>
<mml:mi>R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>s</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>
<italic>, the neighbourhood of agent</italic> <italic>i</italic> <italic>at time</italic> <italic>t</italic> <italic>is</italic>
</p>
</statement>
<disp-formula id="e1">
<mml:math id="m10">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">N</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">S</mml:mi>
<mml:mo>&#x29F5;</mml:mo>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>:</mml:mo>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>s</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:math>
<label>(1)</label>
</disp-formula>
</p>
<p>
<statement content-type="definition" id="definition3">
<label>Definition 3</label>
<p>(Adjacency set). <italic>Given a swarm and some finite</italic> <inline-formula id="inf11">
<mml:math id="m13">
<mml:msub>
<mml:mrow>
<mml:mi>R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>min</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>max</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>
<italic>, with</italic> <italic>R</italic>
<sub>min</sub> &#x2264; <italic>R</italic>
<sub>max</sub>
<italic>, the adjacency set of agent</italic> <italic>i</italic> <italic>at time</italic> <italic>t</italic> <italic>is</italic> (<italic>see</italic> <xref ref-type="fig" rid="F2">Figure 2</xref>).</p>
</statement>
<disp-formula id="e2">
<mml:math id="m11">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">S</mml:mi>
<mml:mo>&#x29F5;</mml:mo>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>:</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>min</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2264;</mml:mo>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>max</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:math>
<label>(2)</label>
</disp-formula>
</p>
<p>Notice that if <italic>R</italic>
<sub>max</sub> &#x2264; <italic>R</italic>
<sub>s</sub> then <inline-formula id="inf12">
<mml:math id="m14">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2286;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">N</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>.</p>
<p>
<statement content-type="definition" id="definition4">
<label>Definition 4</label>
<p>(Links). <italic>A link is a pair</italic> <inline-formula id="inf13">
<mml:math id="m15">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">S</mml:mi>
<mml:mo>&#xd7;</mml:mo>
<mml:mi mathvariant="script">S</mml:mi>
</mml:math>
</inline-formula> <italic>such that</italic> <inline-formula id="inf14">
<mml:math id="m16">
<mml:mi>j</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> <italic>(or equivalently</italic> <inline-formula id="inf15">
<mml:math id="m17">
<mml:mi>i</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>
<italic>). Moreover,</italic> <inline-formula id="inf16">
<mml:math id="m18">
<mml:mi mathvariant="script">E</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> <italic>is the set of all links existing at time</italic> <italic>t</italic>.</p>
</statement>
</p>
<p>Clearly, it is possible to associate to the swarm a time-varying graph <inline-formula id="inf17">
<mml:math id="m19">
<mml:mi mathvariant="script">G</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="script">S</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="script">E</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> (<xref ref-type="bibr" rid="B20">Latora et al., 2017</xref>); <inline-formula id="inf18">
<mml:math id="m20">
<mml:mi mathvariant="script">S</mml:mi>
</mml:math>
</inline-formula> and <inline-formula id="inf19">
<mml:math id="m21">
<mml:mi mathvariant="script">E</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> being the set of vertices and edges, respectively<xref ref-type="fn" rid="fn2">
<sup>1</sup>
</xref>.</p>
<p>Finally, given any two links (<italic>i</italic>, <italic>j</italic>) and (<italic>h</italic>, <italic>k</italic>), we denote with <inline-formula id="inf20">
<mml:math id="m22">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2208;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mn>0,2</mml:mn>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> the absolute value of the angle between the vectors <bold>r</bold>
<sub>
<italic>ij</italic>
</sub> and <bold>r</bold>
<sub>
<italic>hk</italic>
</sub>.</p>
</sec>
<sec id="s3-2">
<title>3.2 Lattice and performance metrics</title>
<p>
<statement content-type="definition" id="definition5">
<label>Definition 5</label>
<p>(Lattice). <italic>Given some</italic> <italic>L</italic> &#x2208; {4, 6} <italic>and</italic> <inline-formula id="inf21">
<mml:math id="m23">
<mml:mi>R</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>
<italic>, a</italic> (<italic>L</italic>, <italic>R</italic>)-lattice <italic>is a set of points in the plane that coincide with the vertices of an associated regular tiling</italic> (<xref ref-type="bibr" rid="B11">Engel et al., 2004</xref>)<italic>;</italic> <italic>R</italic> <italic>is the distance between adjacent vertices and</italic> <italic>L</italic> <italic>is the number of adjacent vertices each point has.</italic>
</p>
</statement>
</p>
<p>In <xref ref-type="statement" rid="definition5">Definition 5</xref>, <italic>L</italic> &#x3d; 4, and <italic>L</italic> &#x3d; 6 correspond to square and triangular lattices,<xref ref-type="fn" rid="fn3">
<sup>2</sup>
</xref> respectively, as portrayed in <xref ref-type="fig" rid="F2">Figure 2</xref>. We say that a swarm <italic>self-organises into a</italic> (<italic>L</italic>, <italic>R</italic>)<italic>-lattice</italic> if (i) each agent has at most <italic>L</italic> links, and (ii) <inline-formula id="inf22">
<mml:math id="m24">
<mml:mo>&#x2200;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">E</mml:mi>
</mml:math>
</inline-formula> and <inline-formula id="inf23">
<mml:math id="m25">
<mml:mo>&#x2200;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>k</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">E</mml:mi>
</mml:math>
</inline-formula> it holds that <inline-formula id="inf24">
<mml:math id="m26">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> is some multiple of 2<italic>&#x3c0;</italic>/<italic>L</italic>. To assess whether a swarm self-organises into some desired (<italic>L</italic>, <italic>R</italic>)-lattice, we introduce the following two metrics.</p>
<fig id="F2" position="float">
<label>FIGURE 2</label>
<caption>
<p>(<italic>L</italic>, <italic>R</italic>)-lattice formations. <bold>(A)</bold> shows a triangular lattice (<italic>L</italic> &#x3d;6), and <bold>(B)</bold> shows a square lattice (<italic>L</italic> &#x3d;4). Red dots are agents in the adjacency set <inline-formula id="inf25">
<mml:math id="m28">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> of the generic agent <italic>i</italic> depicted as a black dot.</p>
</caption>
<graphic xlink:href="frobt-10-1219931-g002.tif"/>
</fig>
<p>
<statement content-type="definition" id="definition6">
<label>Definition 6</label>
<p>(Regularity metric). <italic>Given a swarm and a desired</italic> (<italic>L</italic>, <italic>R</italic>)<italic>-lattice, the regularity metric</italic> <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub>(<italic>t</italic>) &#x2208; [0, 1] <italic>is</italic>
<disp-formula id="e3">
<mml:math id="m29">
<mml:msub>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>err</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:math>
<label>(3)</label>
</disp-formula>where, omitting the dependence on time,</p>
</statement>
<disp-formula id="e4">
<mml:math id="m27">
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>err</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi mathvariant="script">E</mml:mi>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">&#x7c;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi mathvariant="script">E</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:munder>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">E</mml:mi>
</mml:mrow>
</mml:munder>
<mml:mspace width="0.3333em"/>
<mml:munder>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">E</mml:mi>
</mml:mrow>
</mml:munder>
<mml:munder>
<mml:mrow>
<mml:mi>min</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>q</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="double-struck">Z</mml:mi>
</mml:mrow>
</mml:munder>
<mml:mfenced open="|" close="|">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>q</mml:mi>
<mml:mfrac>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:math>
<label>(4)</label>
</disp-formula>
</p>
<p>The regularity metric <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub>, derived from <xref ref-type="bibr" rid="B42">Spears et al. (2004)</xref>, quantifies the incoherence in the orientation of the links in the swarm. In particular, <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub> &#x3d; 0 when all the pairs of links form angles that are multiples of 2<italic>&#x3c0;</italic>/<italic>L</italic> (which is desirable to achieve the (<italic>L</italic>, <italic>R</italic>)-lattice), while <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub> &#x3d; 1 when all pairs of links have the maximum possible orientation error, equal to <italic>&#x3c0;</italic>/<italic>L</italic>. (<italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub> &#x2248; 0.5 generally corresponds to the agents being arranged randomly.)</p>
<p>
<statement content-type="definition" id="definition7">
<label>Definition 7</label>
<p>(Compactness metric). <italic>Given a swarm and a desired</italic> (<italic>L</italic>, <italic>R</italic>)<italic>-lattice, the compactness metric</italic> <italic>e</italic>
<sub>
<italic>L</italic>
</sub>(<italic>t</italic>) &#x2208; [0, (<italic>N</italic> &#x2212; 1 &#x2212; <italic>L</italic>)/<italic>L</italic>] <italic>is</italic>
<disp-formula id="e5">
<mml:math id="m30">
<mml:msub>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:munderover accentunder="false" accent="true">
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
</mml:munderover>
<mml:mfrac>
<mml:mrow>
<mml:mfenced open="|" close="|">
<mml:mrow>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>.</mml:mo>
</mml:math>
<label>(5)</label>
</disp-formula>
</p>
</statement>
</p>
<p>The compactness metric <italic>e</italic>
<sub>
<italic>L</italic>
</sub> measures the average difference between the number of neighbours each agent has and the one they are ought to have if they were arranged in a (<italic>L</italic>, <italic>R</italic>)-lattice. According to this definition, <italic>e</italic>
<sub>
<italic>L</italic>
</sub> reaches its maximum value, <italic>e</italic>
<sub>
<italic>L</italic>,&#x2009;max</sub> &#x3d; (<italic>N</italic> &#x2212; 1 &#x2212; <italic>L</italic>)/<italic>L</italic>, when all agents are concentrated in a small region, and links exist between all pairs of agents, while <italic>e</italic>
<sub>
<italic>L</italic>
</sub> &#x3d; 1 when all the agents are scattered loosely in the plane, and no links exist between them, and, <italic>e</italic>
<sub>
<italic>L</italic>
</sub> &#x3d; 0 when all the agents have <italic>L</italic> links (typically we will require that <italic>e</italic>
<sub>
<italic>L</italic>
</sub> is below some acceptable threshold, see <xref ref-type="sec" rid="s5-1-1">Section 5.1.1</xref>). It is important to remark that, if the number <italic>N</italic> of agents is finite, <italic>e</italic>
<sub>
<italic>L</italic>
</sub> can never be equal to zero, because the agents on the boundary of the group will always have less than <italic>L</italic> links (<xref ref-type="fig" rid="F2">Figure 2</xref>). This effect gets less relevant as <italic>N</italic> increases. Note that a similar metric was also independently defined in <xref ref-type="bibr" rid="B40">Song and O&#x2019;Kane. (2014)</xref>. We remark that the compactness metric inherently penalizes the presence of holes in the configuration and the emergence of detached swarms, as those scenarios are characterized by larger boundaries.</p>
<p>For the sake of brevity, in what follows we will omit dependence on time when that is clear from the context.</p>
</sec>
</sec>
<sec id="s4">
<title>4 Control design</title>
<sec id="s4-1">
<title>4.1 Problem formulation</title>
<p>Consider a planar swarm <inline-formula id="inf26">
<mml:math id="m31">
<mml:mi mathvariant="script">S</mml:mi>
</mml:math>
</inline-formula> whose agents&#x2019; dynamics is described by the first order model<disp-formula id="e6">
<mml:math id="m32">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mo>&#x307;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em"/>
<mml:mspace width="0.3333em"/>
<mml:mo>&#x2200;</mml:mo>
<mml:mspace width="0.3333em"/>
<mml:mi>i</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">S</mml:mi>
<mml:mo>,</mml:mo>
</mml:math>
<label>(6)</label>
</disp-formula>where <bold>x</bold>
<sub>
<italic>i</italic>
</sub>(<italic>t</italic>) was given in <xref ref-type="statement" rid="definition1">Definition 1</xref> and <inline-formula id="inf27">
<mml:math id="m33">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula> is some input signal determining the velocity of agent <italic>i</italic> <xref ref-type="fn" rid="fn4">
<sup>3</sup>
</xref>.</p>
<p>We want to design a <italic>distributed</italic> feedback control law <inline-formula id="inf28">
<mml:math id="m34">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mi mathvariant="bold">g</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">{</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">}</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">N</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>L</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>R</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> to let the swarm self-organise into a desired triangular or square lattice, starting from any set of initial positions in some disk of radius <italic>r</italic>, while guaranteeing the control strategy to be:<list list-type="simple">
<list-item>
<p>1. <italic>robust</italic> to failures of agents and to noise;</p>
</list-item>
<list-item>
<p>2. <italic>flexible</italic>, allowing dynamic reorganisation of the agents into different patterns;</p>
</list-item>
<list-item>
<p>3. <italic>scalable</italic>, allowing the number of agents <italic>N</italic> to change dynamically.</p>
</list-item>
</list>
</p>
<p>We will assess the effectiveness of the proposed strategy by using the performance metrics <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub> and <italic>e</italic>
<sub>
<italic>L</italic>
</sub> introduced above (see <xref ref-type="statement" rid="definition6">Definition 6</xref> and <xref ref-type="statement" rid="definition7">Definition 7</xref>).</p>
</sec>
<sec id="s4-2">
<title>4.2 Distributed control law</title>
<p>To solve this problem we propose a distributed displacement-based control law of the form<disp-formula id="e7">
<mml:math id="m35">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:math>
<label>(7)</label>
</disp-formula>where <bold>u</bold>
<sub>r,<italic>i</italic>
</sub> and <bold>u</bold>
<sub>n,<italic>i</italic>
</sub> are the <italic>radial</italic> and <italic>normal</italic> control inputs, respectively. The two inputs have different purposes and each comprises several <italic>virtual forces</italic>. The radial input <bold>u</bold>
<sub>r,<italic>i</italic>
</sub> is the sum of attracting/repelling actions between the agents, with the purpose of aggregating them into a compact swarm, while avoiding collisions. The normal input <bold>u</bold>
<sub>n,<italic>i</italic>
</sub> is also the sum of multiple actions, used to adjust the angles of the relative positions of the agents.</p>
<p>Note that the control strategy in <xref ref-type="disp-formula" rid="e7">(7)</xref> is <italic>displacement-based</italic> because it only requires each agent <italic>i</italic> (i) to be able to measure the relative positions of the agents close to it (in the sets <inline-formula id="inf29">
<mml:math id="m36">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">N</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> and <inline-formula id="inf30">
<mml:math id="m37">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>), and (ii) to possess knowledge of a common reference direction. Next, we describe in detail each of the two control actions in <xref ref-type="disp-formula" rid="e7">(7)</xref>.</p>
</sec>
<sec id="s4-3">
<title>4.3 Radial interaction control</title>
<p>The radial control input <bold>u</bold>
<sub>r,<italic>i</italic>
</sub> in <xref ref-type="disp-formula" rid="e7">(7)</xref> is defined as the sum of several virtual forces, one for each agent in <inline-formula id="inf31">
<mml:math id="m38">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">N</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> (neighbours of <italic>i</italic>), each force being attractive (if the neighbour is far) or repulsive (if the neighbour is close). Specifically, we set<disp-formula id="e8">
<mml:math id="m39">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:munder>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">N</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:munder>
<mml:msub>
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
</mml:mfenced>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
</mml:math>
<label>(8)</label>
</disp-formula>where <inline-formula id="inf32">
<mml:math id="m40">
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> is the radial control gain. Note that <bold>u</bold>
<sub>r,<italic>i</italic>
</sub> is termed as <italic>radial</italic> input because in <xref ref-type="disp-formula" rid="e8">(8)</xref> the attraction/repulsion forces are parallel to the vectors <bold>r</bold>
<sub>
<italic>ij</italic>
</sub> (see <xref ref-type="fig" rid="F1">Figure 1</xref>). The magnitude and sign of each of these forces depend on the distance, &#x2016;<bold>r</bold>
<sub>
<italic>ij</italic>
</sub>&#x2016;, between the agents, according to the <italic>radial interaction function</italic> <inline-formula id="inf33">
<mml:math id="m41">
<mml:msub>
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>:</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2192;</mml:mo>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:math>
</inline-formula>. Here, we select <italic>f</italic>
<sub>r</sub> as the Physics-inspired Lennard-Jones function (<xref ref-type="bibr" rid="B6">Brambilla et al., 2013</xref>), given by<disp-formula id="e9">
<mml:math id="m42">
<mml:msub>
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>min</mml:mi>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2212;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em"/>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:math>
<label>(9)</label>
</disp-formula>where <inline-formula id="inf34">
<mml:math id="m43">
<mml:mi>a</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>b</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> and <inline-formula id="inf35">
<mml:math id="m44">
<mml:mi>c</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="double-struck">N</mml:mi>
</mml:math>
</inline-formula> are design parameters. In <xref ref-type="disp-formula" rid="e9">(9)</xref>, <italic>f</italic>
<sub>r</sub> is saturated to 1 to avoid divergence for &#x2016;<bold>r</bold>
<sub>
<italic>ij</italic>
</sub>&#x2016; &#x2192; 0. <italic>f</italic>
<sub>r</sub> is portrayed in <xref ref-type="fig" rid="F3">Figure 3A</xref>.</p>
<fig id="F3" position="float">
<label>FIGURE 3</label>
<caption>
<p>Interaction functions. <bold>(A)</bold> shows the radial function and <bold>(B)</bold> shows the normal interaction function. Red dots highlight zeros of the functions. Parameters are taken from <xref ref-type="table" rid="T2">Table 2</xref>.</p>
</caption>
<graphic xlink:href="frobt-10-1219931-g003.tif"/>
</fig>
</sec>
<sec id="s4-4">
<title>4.4 Normal interaction</title>
<p>For any link (<italic>i</italic>, <italic>j</italic>), we define the <italic>angular error</italic> <inline-formula id="inf36">
<mml:math id="m45">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>err</mml:mtext>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2208;</mml:mo>
<mml:mfenced open="]" close="]">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:math>
</inline-formula> as the difference between <italic>&#x3b8;</italic>
<sub>
<italic>ij</italic>
</sub> and the closest multiple of 2<italic>&#x3c0;</italic>/<italic>L</italic> (see <xref ref-type="fig" rid="F1">Figure 1</xref>), that is,<disp-formula id="e10">
<mml:math id="m46">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>err</mml:mtext>
</mml:mrow>
</mml:msubsup>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mi>arg</mml:mi>
<mml:munder>
<mml:mrow>
<mml:mi>min</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>q</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="double-struck">Z</mml:mi>
</mml:mrow>
</mml:munder>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:mfenced open="|" close="|">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>q</mml:mi>
<mml:mfrac>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:math>
<label>(10)</label>
</disp-formula>
</p>
<p>Then, the normal control input <bold>u</bold>
<sub>n,<italic>i</italic>
</sub> in <xref ref-type="disp-formula" rid="e7">(7)</xref> is chosen-as<disp-formula id="e11">
<mml:math id="m47">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:munder>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:munder>
<mml:msub>
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>err</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfenced>
<mml:mfrac>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22a5;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="&#x2016;" close="&#x2016;">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
</mml:math>
<label>(11)</label>
</disp-formula>where <inline-formula id="inf37">
<mml:math id="m48">
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n,i</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> is the normal control gain. Note that each of the normal virtual forces is applied in the direction of <inline-formula id="inf38">
<mml:math id="m49">
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22a5;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>, that is the vector normal to <bold>r</bold>
<sub>
<italic>ij</italic>
</sub>, obtained by applying a <italic>&#x3c0;</italic>/2 counterclockwise rotation (see <xref ref-type="fig" rid="F1">Figure 1</xref>). The magnitude and sign of these forces are determined by the <italic>normal interaction function</italic> <inline-formula id="inf39">
<mml:math id="m50">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>:</mml:mo>
</mml:mrow>
<mml:mspace width="0.17em"/>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:mrow> </mml:mfenced>
<mml:mo>&#x2192;</mml:mo> <mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:mfenced>
<mml:mrow>
<mml:mo>,</mml:mo>
</mml:mrow> </mml:math>
</inline-formula> given by<disp-formula id="e12">
<mml:math id="m51">
<mml:msub>
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>err</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mspace width="0.17em"/>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>err</mml:mtext>
</mml:mrow>
</mml:msubsup>
<mml:mo>.</mml:mo>
</mml:math>
<label>(12)</label>
</disp-formula>
<italic>f</italic>
<sub>n</sub> is portrayed in <xref ref-type="fig" rid="F3">Figure 3B</xref>.</p>
</sec>
</sec>
<sec id="s5">
<title>5 Numerical validation</title>
<p>In this section, we assess the performance and the robustness of our proposed control algorithm (7) through an extensive simulation campaign. The experimental validation of the strategy is later reported in <xref ref-type="sec" rid="s7">Section 7</xref>. First in <xref ref-type="sec" rid="s5-2">Section 5.2</xref>, using a numerical optimisation procedure, we tune the control gains <italic>G</italic>
<sub>r,<italic>i</italic>
</sub> and <italic>G</italic>
<sub>n,<italic>i</italic>
</sub> in (<xref ref-type="disp-formula" rid="e8">8</xref>), (<xref ref-type="disp-formula" rid="e11">11</xref>), as the performance of the controlled swarm strongly depends on these values. Then in <xref ref-type="sec" rid="s5-3">Section 5.3</xref>, we assess the robustness of the control law with respect to (i) agents&#x2019; failure, (ii) noise, (iii) flexibility to pattern changes, and (iv) scalability. Finally in <xref ref-type="sec" rid="s5-4">Section 5.4</xref>, we present a comparative analysis of our distributed control strategy and other approaches previously presented in the literature. The simulations and experiments performed in this and the next Sections are summarised in <xref ref-type="table" rid="T1">Table 1</xref>.</p>
<table-wrap id="T1" position="float">
<label>TABLE 1</label>
<caption>
<p>List of simulations and experiments reported in this paper with indication of the section and figures were the results are presented.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Scenario</th>
<th align="left">Section</th>
<th align="left">Figure</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td colspan="3" align="left">
<italic>Control law</italic> (<xref ref-type="disp-formula" rid="e7">7</xref>),(<xref ref-type="disp-formula" rid="e8">8</xref>),(<xref ref-type="disp-formula" rid="e11">11</xref>)</td>
</tr>
<tr>
<td align="left">Tuning</td>
<td align="left">
<xref ref-type="sec" rid="s5-2">5.2</xref>
</td>
<td align="left">
<xref ref-type="fig" rid="F4">4</xref>
</td>
</tr>
<tr>
<td align="left">Validation</td>
<td align="left">
<xref ref-type="sec" rid="s5-2">5.2</xref>
</td>
<td align="left">
<xref ref-type="fig" rid="F5">5</xref>
</td>
</tr>
<tr>
<td align="left">Robustness to faults</td>
<td align="left">
<xref ref-type="sec" rid="s5-3-1">5.3.1</xref>
</td>
<td align="left">
<xref ref-type="fig" rid="F6">6</xref>
</td>
</tr>
<tr>
<td align="left">Robustness to noise</td>
<td align="left">
<xref ref-type="sec" rid="s5-3-2">5.3.2</xref>
</td>
<td align="left">
<xref ref-type="fig" rid="F7">7</xref>
</td>
</tr>
<tr>
<td align="left">Flexibility</td>
<td align="left">
<xref ref-type="sec" rid="s5-3-3">5.3.3</xref>
</td>
<td align="left">
<xref ref-type="fig" rid="F8">8</xref>
</td>
</tr>
<tr>
<td align="left">Scalability</td>
<td align="left">
<xref ref-type="sec" rid="s5-3-4">5.3.4</xref>
</td>
<td align="left">
<xref ref-type="fig" rid="F9">9</xref>
</td>
</tr>
<tr>
<td align="left">Comparison with established algorithm</td>
<td align="left">
<xref ref-type="sec" rid="s5-4">5.4</xref>
</td>
<td align="left">
<xref ref-type="fig" rid="F10">10</xref>
</td>
</tr>
<tr>
<td colspan="3" align="left">
<italic>Adaptive gain tuning</italic> (<xref ref-type="disp-formula" rid="e22a">22</xref>)</td>
</tr>
<tr>
<td align="left">Validation</td>
<td align="left">
<xref ref-type="sec" rid="s6">6</xref>
</td>
<td align="left">
<xref ref-type="fig" rid="F11">11</xref>
</td>
</tr>
<tr>
<td align="left">Robustness analysis</td>
<td align="left">
<xref ref-type="sec" rid="s5-1">6.1</xref>
</td>
<td align="left">
<xref ref-type="fig" rid="F12">12</xref>
</td>
</tr>
<tr>
<td align="left">Robotarium experiment</td>
<td align="left">
<xref ref-type="sec" rid="s7">7</xref>
</td>
<td align="left">
<xref ref-type="fig" rid="F13">13</xref>
</td>
</tr>
</tbody>
</table>
</table-wrap>
<sec id="s5-1">
<title>5.1 Simulation setup</title>
<p>We consider a swarm consisting of <italic>N</italic> &#x3d; 100 agents (unless specified differently). To represent the fact that the agents are deployed from a unique source (as typically done in the literature, see e.g., <xref ref-type="bibr" rid="B42">Spears et al. (2004)</xref>, their initial positions are drawn randomly with uniform distribution from a disk of radius <italic>r</italic> &#x3d; 2 centred at the origin<xref ref-type="fn" rid="fn5">
<sup>4, </sup>
</xref>
<xref ref-type="fn" rid="fn6">
<sup>5</sup>
</xref>.</p>
<p>Initially, for the sake of simplicity and to avoid the possibility of some agents becoming disconnected from the group, we assume that <italic>R</italic>
<sub>s</sub> in <xref ref-type="disp-formula" rid="e1">(1)</xref> is large enough so that<disp-formula id="e13">
<mml:math id="m52">
<mml:mo>&#x2200;</mml:mo>
<mml:mi>i</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">S</mml:mi>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mo>&#x2200;</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">N</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mi mathvariant="script">S</mml:mi>
<mml:mo>&#x5c;</mml:mo>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>;</mml:mo>
</mml:math>
<label>(13)</label>
</disp-formula>i.e., any agent can sense the relative position of all others. Later, in <xref ref-type="sec" rid="s5-3">Section 5.3</xref>, we will drop this assumption and show the validity of our control strategy also for smaller values of <italic>R</italic>
<sub>s</sub>. All simulation trials are conducted in <sc>Matlab</sc>
<xref ref-type="fn" rid="fn7">
<sup>6</sup>
</xref>, integrating the agents&#x2019; dynamics using the forward Euler method with a fixed time step &#x394;<italic>t</italic> &#x3e; 0. Moreover, the speed of the agents is limited to <italic>V</italic>
<sub>max</sub> &#x3e; 0. The values of the parameters used in the simulations are reported in <xref ref-type="table" rid="T2">Table 2</xref>.</p>
<table-wrap id="T2" position="float">
<label>TABLE 2</label>
<caption>
<p>Simulation parameters.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Parameter</th>
<th align="left">Description</th>
<th align="left">Value</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">
<italic>R</italic>
</td>
<td align="left">Desired link length</td>
<td align="left">1 m</td>
</tr>
<tr>
<td align="left">
<italic>R</italic>
<sub>min</sub>
</td>
<td align="left">Minimum link length</td>
<td align="left">0.6 m</td>
</tr>
<tr>
<td align="left">
<italic>R</italic>
<sub>max</sub>
</td>
<td align="left">Maximum link length</td>
<td align="left">1.1 m</td>
</tr>
<tr>
<td align="left">
<italic>V</italic>
<sub>max</sub>
</td>
<td align="left">Maximum speed</td>
<td align="left">5 m/s</td>
</tr>
<tr>
<td align="left">
<italic>t</italic>
<sub>max</sub>
</td>
<td align="left">Maximum simulation time</td>
<td align="left">200 s</td>
</tr>
<tr>
<td align="left">&#x394;<italic>t</italic>
</td>
<td align="left">Integration step</td>
<td align="left">0.01 s</td>
</tr>
<tr>
<td align="left">
<italic>T</italic>
<sub>w</sub>
</td>
<td align="left">Time window</td>
<td align="left">10 s</td>
</tr>
<tr>
<td align="left">
<italic>a</italic>
</td>
<td align="left">Radial interaction function <italic>f</italic>
<sub>r</sub> (&#x22c5;)</td>
<td align="left">0.15</td>
</tr>
<tr>
<td align="left">
<italic>b</italic>
</td>
<td align="left">&#x201d;</td>
<td align="left">0.15</td>
</tr>
<tr>
<td align="left">
<italic>c</italic>
</td>
<td align="left">&#x201d;</td>
<td align="left">5</td>
</tr>
</tbody>
</table>
</table-wrap>
<sec id="s5-1-1">
<title>5.1.1 Performance evaluation</title>
<p>To assess the performance of the controlled swarm, we exploit the metrics <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub> and <italic>e</italic>
<sub>
<italic>L</italic>
</sub> given in <xref ref-type="statement" rid="definition6">Definition 6</xref> and <xref ref-type="statement" rid="definition7">Definition 7</xref>. Namely, we select empirically the thresholds <inline-formula id="inf40">
<mml:math id="m53">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0.2</mml:mn>
</mml:math>
</inline-formula> and <inline-formula id="inf41">
<mml:math id="m54">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0.3</mml:mn>
</mml:math>
</inline-formula>, which are associated to satisfactory compactness and regularity of the swarm. Then, letting <italic>T</italic>
<sub>w</sub> &#x3e; 0 be the length of a time window, we say that <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub> is at <italic>steady-state</italic> from time <italic>t</italic>&#x2032; &#x3d; <italic>k</italic>&#x394;<italic>t</italic> (for <inline-formula id="inf42">
<mml:math id="m55">
<mml:mi>k</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="double-struck">Z</mml:mi>
</mml:math>
</inline-formula>) if<disp-formula id="e14">
<mml:math id="m56">
<mml:mfenced open="|" close="">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub> </mml:mrow>
</mml:mfenced>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>j</mml:mi>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mfenced open="|" close=""> <mml:mrow>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>0.1</mml:mn>
<mml:mspace width="0.17em"/>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo> </mml:mrow>
</mml:mfenced>
<mml:mspace width="0.3333em"/>
<mml:mo>&#x2200;</mml:mo>
<mml:mi>j</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:mn>1,2</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:mfenced open="&#x230a;" close="&#x230b;">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>w</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:math>
<label>(14)</label>
</disp-formula>We give an analogous definition for the steady state of <italic>e</italic>
<sub>
<italic>L</italic>
</sub> (using <inline-formula id="inf43">
<mml:math id="m57">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> rather than <inline-formula id="inf44">
<mml:math id="m58">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>). Then, we say that in a trial the swarm <italic>achieved steady-state</italic> at time <italic>t</italic>
<sub>ss</sub> if there exists a time instant such that both <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub> and <italic>e</italic>
<sub>
<italic>L</italic>
</sub> are at steady state, and <italic>t</italic>
<sub>ss</sub> is the smallest of such time instants. Moreover, we deem the trial <italic>successful</italic> if <inline-formula id="inf45">
<mml:math id="m59">
<mml:msub>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3c;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> and <inline-formula id="inf46">
<mml:math id="m60">
<mml:msub>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3c;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>. If in a trial steady-state is not reached in the time interval [0, <italic>t</italic>
<sub>max</sub>], the trial is stopped (and deemed unsuccessful). We define<disp-formula id="e15">
<mml:math id="m61">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="{" close="">
<mml:mrow>
<mml:mtable class="cases">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mspace width="0.5em"/>
<mml:mtext>if&#x2009;steady&#x2009;state&#x2009;is&#x2009;achieved</mml:mtext>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>max</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mtext>otherwise</mml:mtext>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(15)</label>
</disp-formula>
<disp-formula id="e16">
<mml:math id="m62">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="{" close="">
<mml:mrow>
<mml:mtable class="cases">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mspace width="0.5em"/>
<mml:mtext>if&#x2009;steady&#x2009;state&#x2009;is&#x2009;achieved</mml:mtext>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>max</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mtext>otherwise</mml:mtext>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(16)</label>
</disp-formula>
</p>
<p>Finally, to asses how quickly the pattern is formed, we define.<disp-formula id="e17">
<mml:math id="m63">
<mml:mspace width="-0.7em"/>
<mml:msub>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>min</mml:mi>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>:</mml:mo>
<mml:mspace width="0.3333em"/>
<mml:msub>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:mspace width="0.28em"/>
<mml:mspace width="0.28em"/>
<mml:mo>&#x2200;</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>&#x2265;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:math>
<label>(17)</label>
</disp-formula>
<disp-formula id="e18">
<mml:math id="m64">
<mml:msub>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>min</mml:mi>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2033;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>:</mml:mo>
<mml:mspace width="0.3333em"/>
<mml:msub>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2033;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:mspace width="0.28em"/>
<mml:mspace width="0.28em"/>
<mml:mo>&#x2200;</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>&#x2265;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2033;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:math>
<label>(18)</label>
</disp-formula>
<disp-formula id="e19">
<mml:math id="m65">
<mml:mi>T</mml:mi>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>max</mml:mi>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:math>
<label>(19)</label>
</disp-formula>
</p>
</sec>
</sec>
<sec id="s5-2">
<title>5.2 Tuning of the control gains</title>
<p>For the sake of simplicity, in this section we assume that <italic>G</italic>
<sub>r,<italic>i</italic>
</sub> &#x3d; <italic>G</italic>
<sub>r</sub> and <italic>G</italic>
<sub>n,<italic>i</italic>
</sub> &#x3d; <italic>G</italic>
<sub>n</sub>, for all <inline-formula id="inf47">
<mml:math id="m66">
<mml:mi>i</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">S</mml:mi>
</mml:math>
</inline-formula>; later, in <xref ref-type="sec" rid="s6">Section 6</xref>, we will present an adaptive control strategy allowing each agent to independently vary online its own control gains. To select the values of <italic>G</italic>
<sub>r</sub> and <italic>G</italic>
<sub>n</sub> giving the best performance in terms of regularity and compactness, we conducted an extensive simulation campaign and evaluated, for each pair (<italic>G</italic>
<sub>r</sub>, <italic>G</italic>
<sub>n</sub>) &#x2208; {0, 1, <italic>&#x2026;</italic>, 30}&#xd7;{0, 1, <italic>&#x2026;</italic>, 30}, the following cost function, averaged over 30 trials, starting with random initial conditions:<disp-formula id="e20">
<mml:math id="m67">
<mml:mi>C</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo>&#x2b;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo>.</mml:mo>
</mml:math>
<label>(20)</label>
</disp-formula>The results are reported in <xref ref-type="fig" rid="F4">Figure 4</xref> for the triangular (<italic>L</italic> &#x3d; 6) and the square (<italic>L</italic> &#x3d; 4) lattices; in the former case, the pair <inline-formula id="inf48">
<mml:math id="m68">
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> minimising <italic>C</italic> is (22, 1), whereas in the latter case it is <inline-formula id="inf49">
<mml:math id="m69">
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>6</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mn>15,8</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>. Both pairs achieve <italic>C</italic> &#x2264; 1, implying <inline-formula id="inf50">
<mml:math id="m70">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> and <inline-formula id="inf51">
<mml:math id="m71">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>.</p>
<fig id="F4" position="float">
<label>FIGURE 4</label>
<caption>
<p>Tuning of the control gains <italic>G</italic>
<sub>r</sub> and <italic>G</italic>
<sub>n</sub>. <bold>(A)</bold> shows the result for the triangular lattice (<italic>L</italic> &#x3d;6), and <bold>(B)</bold> shows the result for the square lattice (<italic>L</italic> &#x3d;4). The black dots correspond to <inline-formula id="inf52">
<mml:math id="m72">
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>6</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> and <inline-formula id="inf53">
<mml:math id="m73">
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>, minimising the metric <italic>C</italic> defined in <xref ref-type="disp-formula" rid="e20">(20)</xref>. The black curves delimit the regions where <italic>C</italic> &#x2264;1.</p>
</caption>
<graphic xlink:href="frobt-10-1219931-g004.tif"/>
</fig>
<p>In <xref ref-type="fig" rid="F5">Figure 5</xref>, we report four snapshots at different time instants of two representative simulations, together with the metrics <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub>(<italic>t</italic>) and <italic>e</italic>
<sub>
<italic>L</italic>
</sub>(<italic>t</italic>), for the cases of a triangular and a square lattice, respectively. The control gains were set to the optimal values <inline-formula id="inf54">
<mml:math id="m74">
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>6</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> and <inline-formula id="inf55">
<mml:math id="m75">
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>. In both cases, the metrics quickly converge below their prescribed thresholds, as <italic>T</italic> <inline-formula id="inf56">
<mml:math id="m76">
<mml:mo>&#x3c;</mml:mo>
<mml:mn>2.75</mml:mn>
<mml:mspace width="0.17em"/>
<mml:mtext>s</mml:mtext>
</mml:math>
</inline-formula>. Moreover, note that <italic>e</italic>
<sub>
<italic>L</italic>
</sub>(<italic>t</italic>) decreases faster than <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub>(<italic>t</italic>), meaning that the swarm tends to first reach the desired level of compactness and then agents&#x2019; positions are rearranged to achieve the desired pattern. Finally, we note that it is immediate to verify that it is possible to control the orientation of the resulting lattice simply by applying a uniform offset to the agents&#x2019; compasses.</p>
<fig id="F5" position="float">
<label>FIGURE 5</label>
<caption>
<p>Snapshots at different time instants of a swarm of <italic>N</italic> &#x3d;100 agents being controlled to form a triangular lattice <bold>(A&#x2013;D)</bold> and a square lattice <bold>(F&#x2013;I)</bold>. For each snapshot, we also report the values of <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub> and <italic>e</italic>
<sub>
<italic>L</italic>
</sub>. <bold>(E&#x2013;J)</bold> show the time evolution of the metrics <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub> and <italic>e</italic>
<sub>
<italic>L</italic>
</sub> for <italic>L</italic> &#x3d;6 and <italic>L</italic> &#x3d;4, respectively. When <italic>L</italic> &#x3d;6, we set <inline-formula id="inf57">
<mml:math id="m77">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>6</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>; when <italic>L</italic> &#x3d;4, we set <inline-formula id="inf58">
<mml:math id="m78">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>. (See <xref ref-type="sec" rid="s5-2">Section 5.2</xref> for details on how the gains were tuned).</p>
</caption>
<graphic xlink:href="frobt-10-1219931-g005.tif"/>
</fig>
</sec>
<sec id="s5-3">
<title>5.3 Robustness analysis</title>
<p>In this section, we investigate numerically the properties that we required in <xref ref-type="sec" rid="s4-1">Section 4.1</xref>, that is robustness to faults and noise, flexibility, and scalability.</p>
<sec id="s5-3-1">
<title>5.3.1 Robustness to faults</title>
<p>We ran a series of simulations in which we removed a percentage of the agents at a certain time instant, and assessed the capability of the swarm to recover the desired pattern. For the sake of brevity, we report only one of them as a representative example in <xref ref-type="fig" rid="F6">Figure 6</xref>, where, with <italic>L</italic> &#x3d; 4, 30% of the agents were removed at random at time <italic>t</italic> &#x3d; 30 s. We notice that, as the agents are removed, <italic>e</italic>
<sub>
<italic>L</italic>
</sub>(<italic>t</italic>) and <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub>(<italic>t</italic>) suddenly increase, but, after a short time, they converge again to values below the thresholds, recovering the desired pattern, despite the formation of small holes in the pattern at steady-state that increase <inline-formula id="inf59">
<mml:math id="m79">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>. Finally, we also considered the case where the faulty agents stay still in their positions after the fault, with other agents having to form the lattice around them. We observed that when the fault takes place after a satisfying structure is formed, the metrics are not affected by the event (the numerical results are omitted here for the sake of brevity).</p>
<fig id="F6" position="float">
<label>FIGURE 6</label>
<caption>
<p>Robustness to agents&#x2019; removal. <bold>(A&#x2013;D)</bold> show snapshots at different time instants of a swarm agents achieving a square lattice. Initially, there are <italic>N</italic> &#x3d;100 agents with 30 agents being removed at <italic>t</italic> &#x3d;30 s. <bold>(E)</bold> shows the time evolution of the metrics; dashed vertical lines denote the time instant when agents are removed. Here <italic>L</italic> &#x3d;4, and <inline-formula id="inf60">
<mml:math id="m80">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>.</p>
</caption>
<graphic xlink:href="frobt-10-1219931-g006.tif"/>
</fig>
</sec>
<sec id="s5-3-2">
<title>5.3.2 Robustness to noise</title>
<p>We assessed the robustness to noise both on actuation and on sensing, in two separate tests. In the first case, we assumed that the dynamics (6) of each agent is affected by additive white Gaussian noise with standard deviation <italic>&#x3c3;</italic>
<sub>a</sub>. In the second case, we assumed that, for each agent, both the distance measurements &#x2016;<bold>r</bold>
<sub>
<italic>ij</italic>
</sub>&#x2016; in <xref ref-type="disp-formula" rid="e8">(8)</xref> and the angular measurements <inline-formula id="inf61">
<mml:math id="m81">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>err</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> in <xref ref-type="disp-formula" rid="e11">(11)</xref> are affected by additive white Gaussian noise (i.i.d. for each <italic>i</italic> and <italic>j</italic>) with standard deviation <italic>&#x3c3;</italic>
<sub>m</sub> and <inline-formula id="inf62">
<mml:math id="m82">
<mml:msub>
<mml:mrow>
<mml:mi>&#x3c3;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">m</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:math>
</inline-formula>, respectively.</p>
<p>In particular, we set <italic>L</italic> &#x3d; 4 and varied either <italic>&#x3c3;</italic>
<sub>a</sub> or <italic>&#x3c3;</italic>
<sub>m</sub> in intervals of interest with small increments. For each value of <italic>&#x3c3;</italic>
<sub>a</sub> and <italic>&#x3c3;</italic>
<sub>m</sub>, we ran <italic>M</italic> &#x3d; 30 trials, starting from random initial conditions, and report the average values of <inline-formula id="inf63">
<mml:math id="m83">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> and <inline-formula id="inf64">
<mml:math id="m84">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> in <xref ref-type="fig" rid="F7">Figure 7</xref>. We observe that, while in the ranges <italic>&#x3c3;</italic>
<sub>a</sub> &#x2208; [0, 0.45] and <italic>&#x3c3;</italic>
<sub>m</sub> &#x2208; [0, 0.125] the strategy guarantees robustness, for large enough noise (<italic>&#x3c3;</italic>
<sub>a</sub> &#x2265; 0.45 or <italic>&#x3c3;</italic>
<sub>m</sub> &#x2265; 0.125) performance is increasingly worsened with trials eventually becoming unsuccessful (the swarm never achieving the desired lattice configuration). Interestingly, we find that for smaller noise (0 &#x3c; <italic>&#x3c3;</italic>
<sub>a</sub> &#x2264; 0.2 or 0 &#x3c; <italic>&#x3c3;</italic>
<sub>m</sub> &#x2264; 0.1) performance is actually improved, as small random inputs can prevent the agents from getting stuck in undesired configurations, including those containing holes.</p>
<fig id="F7" position="float">
<label>FIGURE 7</label>
<caption>
<p>Robustness to noise. Value of the metrics <inline-formula id="inf65">
<mml:math id="m85">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> and <inline-formula id="inf66">
<mml:math id="m86">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>, averaged over <italic>M</italic> &#x3d;30 trials, when <bold>(A)</bold> the intensity <italic>&#x3c3;</italic>
<sub>a</sub> of the actuation noise is varied and <bold>(B)</bold> the intensity <italic>&#x3c3;</italic>
<sub>m</sub> of the measurement noise is varied. The shaded areas represent the maximum and minimum values obtained over the <italic>M</italic> trials. Here <italic>L</italic> &#x3d;4, and <inline-formula id="inf67">
<mml:math id="m87">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>.</p>
</caption>
<graphic xlink:href="frobt-10-1219931-g007.tif"/>
</fig>
<p>We obtained qualitatively similar results when we assumed the presence of noise on the compass measurements of the agents (obtained by adding Gaussian noise on the variables <inline-formula id="inf68">
<mml:math id="m88">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>err</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>, with the noise value being the same for <inline-formula id="inf69">
<mml:math id="m89">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>err</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> and <inline-formula id="inf70">
<mml:math id="m90">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mi>l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>err</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> when <italic>i</italic> &#x3d; <italic>k</italic>).</p>
</sec>
<sec id="s5-3-3">
<title>5.3.3 Flexibility</title>
<p>In <xref ref-type="fig" rid="F8">Figure 8</xref>, we report a simulation where <italic>L</italic> was initially set equal to 4 (square lattice), changed to 6 (triangular lattice) at time <italic>t</italic> &#x3d; 30 s, and finally changed back to 4 at <italic>t</italic> &#x3d; 60 s. The control gains are set to <inline-formula id="inf71">
<mml:math id="m91">
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> and kept constant during the entire the simulation. Clearly, as <italic>L</italic> is changed, both <italic>e</italic>
<sub>
<italic>L</italic>
</sub> and <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub> suddenly increase, but the swarm is quickly able to reorganise and reduce them below their prescribed thresholds in less than 5 s, thus achieving the desired patterns.</p>
<fig id="F8" position="float">
<label>FIGURE 8</label>
<caption>
<p>Flexibility to spatial reorganisation. Time evolution of the metrics <inline-formula id="inf72">
<mml:math id="m92">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> and <inline-formula id="inf73">
<mml:math id="m93">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> as <italic>L</italic> changes as shown in the bottom panel. The gains are set as <inline-formula id="inf74">
<mml:math id="m94">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>.</p>
</caption>
<graphic xlink:href="frobt-10-1219931-g008.tif"/>
</fig>
</sec>
<sec id="s5-3-4">
<title>5.3.4 Scalability</title>
<p>We relaxed the assumption that <xref ref-type="disp-formula" rid="e13">(13)</xref> holds and characterised <inline-formula id="inf75">
<mml:math id="m95">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> as a function of the sensing radius <italic>R</italic>
<sub>s</sub>. The results are portrayed in <xref ref-type="fig" rid="F9">Figure 9A</xref>, showing that the performance starts deteriorating for approximately <italic>R</italic>
<sub>s</sub> &#x3c; 6 <italic>R</italic>, until it becomes unacceptable for about <italic>R</italic>
<sub>s</sub> &#x3c; 1.1 <italic>R</italic>. Therefore, as a good trade-off between performance and feasibility, we set <italic>R</italic>
<sub>s</sub> &#x3d; 3 <italic>R</italic>. Then, to test for scalability, we varied the number <italic>N</italic> of agents (initially, <italic>N</italic> &#x3d; 100), reporting the results in <xref ref-type="fig" rid="F9">Figure 9B</xref>. We see that (i) the controlled swarm correctly achieves the desired pattern for at least four-fold changes in the size of the swarm, (ii) compactness <inline-formula id="inf76">
<mml:math id="m96">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> improves as <italic>N</italic> increases, and (iii) the average convergence time <italic>T</italic> increases as <italic>N</italic> increases.</p>
<fig id="F9" position="float">
<label>FIGURE 9</label>
<caption>
<p>Scalability. <bold>(A)</bold> shows <inline-formula id="inf77">
<mml:math id="m97">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> averaged over <italic>M</italic> &#x3d;30 trials for different values of <italic>R</italic>
<sub>s</sub>. <bold>(B)</bold> shows the metrics <inline-formula id="inf78">
<mml:math id="m98">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> and <inline-formula id="inf79">
<mml:math id="m99">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> and the convergence time <italic>T</italic> averaged over the trials, with varying <italic>N</italic>, while <italic>R</italic>
<sub>s</sub> &#x3d;3 m, and agents&#x2019; initial positions are drawn with uniform distribution from a disk with radius <inline-formula id="inf80">
<mml:math id="m100">
<mml:mi>r</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:msqrt>
<mml:mrow>
<mml:mi>N</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>25</mml:mn>
</mml:mrow>
</mml:msqrt>
</mml:math>
</inline-formula>. The shaded areas represent the maximum and minimum values over the <italic>M</italic> trials. Here <italic>L</italic> &#x3d;4 and the gains are set as <inline-formula id="inf81">
<mml:math id="m101">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>.</p>
</caption>
<graphic xlink:href="frobt-10-1219931-g009.tif"/>
</fig>
</sec>
</sec>
<sec id="s5-4">
<title>5.4 Comparison with other established algorithm</title>
<p>As done in related literature (<xref ref-type="bibr" rid="B50">Zhao et al., 2019</xref>) (yet for a position-based solution) we compared our control law (<xref ref-type="disp-formula" rid="e7">7</xref>) to the so-called &#x201c;gravitational virtual forces strategy&#x201d; (see the <xref ref-type="app" rid="app1">Appendix</xref>) (<xref ref-type="bibr" rid="B42">Spears et al., 2004</xref>), that represent an established solution to geometric pattern formation problems. In <xref ref-type="bibr" rid="B42">Spears et al. (2004)</xref>, a second order damped dynamics is considered for the agents. Hence, for the sake of comparison, we reduced the model therein to the first order model in <xref ref-type="disp-formula" rid="e6">(6)</xref>, by assuming that the viscous friction force is significantly larger than the inertial one.</p>
<p>To select the gravitational gain <italic>G</italic> and the saturation value <italic>F</italic>
<sub>max</sub> in the control law from <xref ref-type="bibr" rid="B42">Spears et al. (2004)</xref>, we applied the same tuning procedure described in <xref ref-type="sec" rid="s5-2">Section 5.2</xref>. In particular, we considered (<italic>G</italic>, <italic>F</italic>
<sub>max</sub>) &#x2208; {0, 0.5, <italic>&#x2026;</italic>, 10}&#xd7;{0, 1, <italic>&#x2026;</italic>, 40}, and performed 30 trials for each pair of parameters, obtaining as optimal pair for the square lattice <inline-formula id="inf82">
<mml:math id="m102">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>max</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mn>35,2</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> (see <xref ref-type="fig" rid="F10">Figure 10A</xref>). All other parameters where kept to the default values in <xref ref-type="table" rid="T2">Table 2</xref>.</p>
<fig id="F10" position="float">
<label>FIGURE 10</label>
<caption>
<p>Representative application of the algorithm from <xref ref-type="bibr" rid="B42">Spears et al. (2004)</xref> (see <xref ref-type="app" rid="app1">Appendix</xref>). <bold>(A)</bold> shows the tuning of parameters <italic>G</italic> and <italic>F</italic>
<sub>max</sub> for the square lattice (<italic>L</italic> &#x3d;4). The black dot denotes the optimal pair <inline-formula id="inf83">
<mml:math id="m103">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>max</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>. <bold>(B)</bold> shows the scalability test for the algorithm. The metrics <inline-formula id="inf84">
<mml:math id="m104">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> and <inline-formula id="inf85">
<mml:math id="m105">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> are averaged over <italic>M</italic> &#x3d;30 trials, as <italic>N</italic> varies, and plotted against our results (in gray) in the same scenario (see <xref ref-type="fig" rid="F9">Figure 9</xref> for the sake of comparison). Agents&#x2019; initial positions are drawn with uniform distribution from a disk of radius <inline-formula id="inf86">
<mml:math id="m106">
<mml:mi>r</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:msqrt>
<mml:mrow>
<mml:mi>N</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>25</mml:mn>
</mml:mrow>
</mml:msqrt>
</mml:math>
</inline-formula>. The shaded area represents the maximum and minimum values over the trials. Here <italic>L</italic> &#x3d;4, and <inline-formula id="inf87">
<mml:math id="m107">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>G</mml:mi>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>max</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>max</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</caption>
<graphic xlink:href="frobt-10-1219931-g010.tif"/>
</fig>
<p>Then, we performed the same scalability test in <xref ref-type="sec" rid="s5-3-4">Section 5.3.4</xref> and report the results in <xref ref-type="fig" rid="F10">Figure 10B</xref>. Remarkably, by comparing these results with ours, we see that our proposed control strategy performs better, obtaining much smaller values of <inline-formula id="inf88">
<mml:math id="m108">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>, regardless of the size <italic>N</italic> of the swarm. In particular, the control law from <xref ref-type="bibr" rid="B42">Spears et al. (2004)</xref> only rarely achieves <inline-formula id="inf89">
<mml:math id="m109">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>, implying a low success rate.</p>
</sec>
</sec>
<sec id="s6">
<title>6 Adaptive tuning of control gains</title>
<p>Tuning the control gains (here <italic>G</italic>
<sub>r,<italic>i</italic>
</sub> and <italic>G</italic>
<sub>n,<italic>i</italic>
</sub>) can in general be a tedious and time-consuming procedure. Therefore, to avoid it, we propose the use of a simple, yet effective adaptive control law, that might also improve the robustness and flexibility of the swarm. Specifically, for the sake of simplicity, <italic>G</italic>
<sub>r,<italic>i</italic>
</sub> is set to a constant value <italic>G</italic>
<sub>r</sub> for all the swarm, while each agent computes its gain <italic>G</italic>
<sub>n,<italic>i</italic>
</sub> independently, using only local information. Letting <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>,<italic>i</italic>
</sub> &#x2208; [0, 1] be the <italic>average angular error</italic> for agent <italic>i</italic>, given by<disp-formula id="e21">
<mml:math id="m110">
<mml:msub>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">&#x7c;</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:munder>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:munder>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>err</mml:mtext>
</mml:mrow>
</mml:msubsup>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mo>,</mml:mo>
</mml:math>
<label>(21)</label>
</disp-formula>
<italic>G</italic>
<sub>n,<italic>i</italic>
</sub> is varied according to the law.<disp-formula id="e22a">
<mml:math id="m111">
<mml:mfrac>
<mml:mrow>
<mml:mi mathvariant="normal">d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">d</mml:mi>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="{" close="">
<mml:mrow>
<mml:mtable class="cases">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mi>&#x3b1;</mml:mi>
<mml:mspace width="0.17em"/>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mtext>if</mml:mtext>
<mml:mspace width="0.28em"/>
<mml:msub>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3e;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo>
<mml:mspace width="6.3em"/>
<mml:mtext>otherwise</mml:mtext>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(22a)</label>
</disp-formula>
<disp-formula id="e22b">
<mml:math id="m112">
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo>
</mml:math>
<label>(22b)</label>
</disp-formula>where <italic>&#x3b1;</italic> &#x3e; 0 is an adaptation gain and <inline-formula id="inf90">
<mml:math id="m113">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> (introduced in <xref ref-type="sec" rid="s5-1">Section 5.1</xref>) is used to determine the amplitude of the dead-zone. Here, we empirically choose <italic>&#x3b1;</italic> &#x3d; 3. To evaluate the effect of the adaptation law, we also define the average normal gain of the swarm <inline-formula id="inf91">
<mml:math id="m114">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:msubsup>
<mml:mrow>
<mml:mo movablelimits="false" form="prefix">&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
<p>In <xref ref-type="fig" rid="F11">Figure 11</xref>, we report the time evolution of <italic>e</italic>
<sub>
<italic>L</italic>
</sub>, <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub>, and of <inline-formula id="inf92">
<mml:math id="m115">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> for a representative simulation. First, we notice that the average normal gain <inline-formula id="inf93">
<mml:math id="m116">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> eventually settles to a constant value. Moreover, comparing the results with the case in which the gains <italic>G</italic>
<sub>n,<italic>i</italic>
</sub> are not chosen adaptively (see <xref ref-type="sec" rid="s5-2">Section 5.2</xref>; <xref ref-type="fig" rid="F5">Figure 5J</xref>), here <italic>T</italic>
<sub>
<italic>&#x3b8;</italic>
</sub>, <italic>T</italic>
<sub>
<italic>L</italic>
</sub> and <italic>t</italic>
<sub>ss</sub> are larger (meaning longer convergence time) but <inline-formula id="inf94">
<mml:math id="m117">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> and <inline-formula id="inf95">
<mml:math id="m118">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> are smaller (meaning better regularity and compactness performance).</p>
<fig id="F11" position="float">
<label>FIGURE 11</label>
<caption>
<p>Pattern formation using the adaptive tuning law (<xref ref-type="disp-formula" rid="e22a">22</xref>). Initial conditions are the same as those of the simulation in <xref ref-type="fig" rid="F5">Figure 5</xref>. The shaded magenta area is delimited by <inline-formula id="inf96">
<mml:math id="m119">
<mml:msub>
<mml:mrow>
<mml:mi>max</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">S</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> and <inline-formula id="inf97">
<mml:math id="m120">
<mml:msub>
<mml:mrow>
<mml:mi>min</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">S</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>, while the average across all agents is depicted by a solid magenta line. Here, <italic>L</italic> &#x3d;4, and <italic>G</italic>
<sub>r</sub> &#x3d;15.</p>
</caption>
<graphic xlink:href="frobt-10-1219931-g011.tif"/>
</fig>
<sec id="s6-1">
<title>6.1 Robustness analysis</title>
<p>Next, we test robustness to faults, flexibility, and scalability for the adaptive law (<xref ref-type="disp-formula" rid="e22a">22</xref>), similarly to what we did in <xref ref-type="sec" rid="s5-3">Section 5.3</xref>.</p>
<p>We ran a series of agent removal tests, as described in <xref ref-type="sec" rid="s5-3-1">Section 5.3.1</xref>. For the sake of brevity, we report the results of one of such tests with <italic>L</italic> &#x3d; 4 in <xref ref-type="fig" rid="F12">Figures 12A&#x2013;E</xref>. At <italic>t</italic> &#x3d; 30 s, 30% of the agents are removed; yet, after a short time the swarm reaggregates to recover the desired lattice.</p>
<fig id="F12" position="float">
<label>FIGURE 12</label>
<caption>
<p>Robustness tests using the adaptive tuning law (<xref ref-type="disp-formula" rid="e22a">22</xref>). Panels <bold>(A&#x2013;E)</bold> show the results of the simulations when starting from 100 agents, 30 agents are removed at <italic>t</italic> &#x3d;30 s. Initial conditions are the same as those of the simulation in <xref ref-type="fig" rid="F6">Figure 6</xref>. <bold>(A&#x2013;D)</bold> show snapshots of the agents&#x2019; configurations at different time instants. <bold>(E)</bold> shows the time evolution of the metrics <italic>e</italic>
<sub>
<italic>&#x3b8;</italic>
</sub> and <italic>e</italic>
<sub>
<italic>L</italic>
</sub>, and of the adaptive gain <italic>G</italic>
<sub>n</sub> (the shaded magenta area is delimited by <inline-formula id="inf98">
<mml:math id="m121">
<mml:msub>
<mml:mrow>
<mml:mi>max</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">S</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> and <inline-formula id="inf99">
<mml:math id="m122">
<mml:msub>
<mml:mrow>
<mml:mi>min</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">S</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> while the average value of the gain over all the agents is shown as a solid magenta line). Dashed vertical lines denote the time instant when agents are removed. Here <italic>L</italic> &#x3d;4. <bold>(F)</bold> refers to the flexibility test. Initial conditions are the same as those of the simulation in <xref ref-type="fig" rid="F8">Figure 8</xref>. <bold>(G)</bold> refers to the scalability test. The metrics <inline-formula id="inf100">
<mml:math id="m123">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> and <inline-formula id="inf101">
<mml:math id="m124">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>, and the adaptive gain <inline-formula id="inf102">
<mml:math id="m125">
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> are averaged over <italic>M</italic> &#x3d;30 trials with varying <italic>N</italic>. Agents&#x2019; initial positions are drawn with uniform distribution from a disk with radius <inline-formula id="inf103">
<mml:math id="m126">
<mml:mi>r</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:msqrt>
<mml:mrow>
<mml:mi>N</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>25</mml:mn>
</mml:mrow>
</mml:msqrt>
</mml:math>
</inline-formula>. The shaded areas represent the maximum and minimum values over the trials. Here <italic>L</italic> &#x3d;4, and <italic>G</italic>
<sub>r</sub> &#x3d;15, <italic>R</italic>
<sub>s</sub> &#x3d;3 m. In all these simulations <italic>G</italic>
<sub>r</sub> &#x3d;15.</p>
</caption>
<graphic xlink:href="frobt-10-1219931-g012.tif"/>
</fig>
<p>We then repeated the test in <xref ref-type="sec" rid="s5-3-3">Section 5.3.3</xref>, with the difference that this time we set <italic>G</italic>
<sub>r</sub> &#x3d; 18.5 (that is the average between the optimal gain for square and triangular patterns), and set <italic>G</italic>
<sub>n,<italic>i</italic>
</sub> according to law (<xref ref-type="disp-formula" rid="e22b">22</xref>), resetting all <italic>G</italic>
<sub>n,<italic>i</italic>
</sub> to 0 when <italic>L</italic> is changed. The results are shown in <xref ref-type="fig" rid="F12">Figure 12F</xref>. When compared to the non-adaptive case (<xref ref-type="fig" rid="F8">Figure 8</xref>), here <inline-formula id="inf104">
<mml:math id="m127">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> and <inline-formula id="inf105">
<mml:math id="m128">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> are smaller (better pattern formation), but <italic>T</italic>
<sub>
<italic>&#x3b8;</italic>
</sub> and <italic>T</italic>
<sub>
<italic>L</italic>
</sub> are larger (slower), especially when forming square patterns. Interestingly, when <italic>L</italic> &#x3d; 4, <inline-formula id="inf106">
<mml:math id="m129">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">n</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> settles to about 5, while when <italic>L</italic> &#x3d; 6 it settles to about 0.3, a much smaller value.</p>
<p>Finally, we repeated the test in <xref ref-type="sec" rid="s5-3-4">Section 5.3.4</xref>, setting again the sensing radius <italic>R</italic>
<sub>s</sub> to 3 <italic>R</italic> and assessing performance while varying the size <italic>N</italic> of the swarm; results are shown in <xref ref-type="fig" rid="F12">Figure 12G</xref>. First, we notice that the larger the swarm is, the larger the steady state value of <inline-formula id="inf107">
<mml:math id="m130">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">n</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> is. Comparing the results with those obtained for static gains shown in <xref ref-type="fig" rid="F9">Figure 9B</xref>, here we observe a slight improvement of performance, with a slightly smaller <inline-formula id="inf108">
<mml:math id="m131">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>, while we verified that the convergence time is comparable to the one observed for the static policy.</p>
</sec>
</sec>
<sec id="s7">
<title>7 Robotarium experiments</title>
<p>To further validate our control algorithm, we tested it in a real robotic scenario, using the open access <italic>Robotarium</italic> platform; see <xref ref-type="bibr" rid="B32">Pickem et al. (2017)</xref>; <xref ref-type="bibr" rid="B49">Wilson et al. (2020)</xref> for further details. The experimental setup features 20 differential drive robots (GRITSBot <xref ref-type="bibr" rid="B33">Pickem et al., 2015</xref>), that can move in a 3.2 m &#xd7; 2 m rectangular arena. The robots have a diameter of about 11 cm, a maximum (linear) speed of 20 cm/s, and a maximum rotational speed of about 3.6 rad/s. To cope with the limited size of the arena, distances <inline-formula id="inf109">
<mml:math id="m132">
<mml:mfenced open="&#x2016;" close="&#x2016;">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:math>
</inline-formula> in <xref ref-type="disp-formula" rid="e9">(9)</xref> are doubled, while control inputs <bold>u</bold>
<sub>
<italic>i</italic>
</sub> are halved. The Robotarium implementation includes a collision avoidance safety protocol and transforms the velocity inputs (<xref ref-type="disp-formula" rid="e7">7</xref>) into appropriate acceleration control inputs for the robots. Moreover, we run an initial routine to yield an initial condition in which the agents are aggregated as much as possible at the centre, similarly to what considered in <xref ref-type="sec" rid="s5">Section 5</xref>.</p>
<p>As a paradigmatic example, we performed a flexibility test (similarly to what done in <xref ref-type="sec" rid="s5-3-3">Section 5.3.3</xref> and reported in <xref ref-type="fig" rid="F8">Figure 8</xref>). During the first 33 s, the agents reach an aggregated initial condition. Then we set <italic>L</italic> &#x3d; 4 for <italic>t</italic> &#x2208; [33, 165), <italic>L</italic> &#x3d; 6 for <italic>t</italic> &#x2208; [165, 297), and <italic>L</italic> &#x3d; 4 for <italic>t</italic> &#x2208; [297, 429], ending the simulation. We used the static control law (<xref ref-type="disp-formula" rid="e7">7</xref>)&#x2013;(<xref ref-type="disp-formula" rid="e8">8</xref>) and (<xref ref-type="disp-formula" rid="e11">11</xref>), and to comply with the limited size of the arena, we scaled the control gains to the values <italic>G</italic>
<sub>r</sub> &#x3d; 0.8 and <italic>G</italic>
<sub>n</sub> &#x3d; 0.4, selected empirically.</p>
<p>The resulting movie is available online (<ext-link ext-link-type="uri" xlink:href="https://github.com/diBernardoGroup/SwarmSimPublic/tree/SwarmSimV1/Media">https://github.com/diBernardoGroup/SwarmSimPublic/tree/SwarmSimV1/Media</ext-link>), while representative snapshots are reported in <xref ref-type="fig" rid="F13">Figure 13</xref>, with the time evolution of the metrics. The metrics qualitatively reproduce the behaviour obtained in simulation (see <xref ref-type="fig" rid="F8">Figure 8</xref>). In particular, we obtain <inline-formula id="inf110">
<mml:math id="m133">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3c;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>, with both triangular and square patterns. On the other hand, we obtain <inline-formula id="inf111">
<mml:math id="m134">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3c;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> when forming square patterns, but <inline-formula id="inf112">
<mml:math id="m135">
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ss</mml:mtext>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3e;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> with triangular patterns; this does not mean that the pattern is not achieved, as it can be seen in <xref ref-type="fig" rid="F13">Figure 13C</xref> showing the pattern is successfully achieved. This minor performance degradation is due to (i) the reduced number of agents, (ii) unmodelled dynamics of the differential-drive robots such as non-holonomic constraints and finite acceleration, and (iii) additional constraints such as the finite size of the arena and the size of the robots themselves.</p>
<fig id="F13" position="float">
<label>FIGURE 13</label>
<caption>
<p>Flexibility test in Robotarium. <bold>(A&#x2013;D)</bold> show the swarm at different time instants. <bold>(E)</bold> shows the time evolution of the metrics and the parameter <italic>L</italic>. The gains are set as <inline-formula id="inf113">
<mml:math id="m136">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>n</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>.</p>
</caption>
<graphic xlink:href="frobt-10-1219931-g013.tif"/>
</fig>
</sec>
<sec sec-type="conclusion" id="s8">
<title>8 Conclusion</title>
<p>We presented a distributed control law to solve pattern formation for the case of square and triangular lattices, based on the use of virtual forces. Our control strategy is distributed, only requires distance sensors and a compass, and does not need communication between the agents. We showed via exhaustive simulations and experiments that the strategy is effective in achieving triangular and square lattices. As a benchmark, we also compared it with the well established distance-based strategy in <xref ref-type="bibr" rid="B42">Spears et al. (2004)</xref>, observing better performance particularly when the goal is that of achieving square lattices. Additionally, we showed that the control law is robust to failures of the agents and to noise, it is flexible to changes in the desired lattice and scalable with respect to the number of agents. We also presented a simple yet effective gain adaptation law to automatically tune the gains so as to be able to switch the goal pattern in real-time.</p>
<p>In the future, we plan to study analytically the stability and convergence of the control law; results in the case of triangular lattices, also for higher dimensions, were recently presented in <xref ref-type="bibr" rid="B13">Giusti et al. (2023)</xref>. Other possible future extensions include the ability to obtain other patterns (e.g. hexagonal ones, or non-regular tilings), move in 3D environments and the synthesis of a more sophisticated adaptive law, or a reinforcement learning strategy, able to tune all the control gains at the same time.</p>
</sec>
</body>
<back>
<sec sec-type="data-availability" id="s9">
<title>Data availability statement</title>
<p>The software platform used to produce the results presented in the paper is SWARMSIMV1, which is available here: <ext-link ext-link-type="uri" xlink:href="https://github.com/diBernardoGroup/SwarmSimPublic/tree/SwarmSimV1">https://github.com/diBernardoGroup/SwarmSimPublic/tree/SwarmSimV1</ext-link>.</p>
</sec>
<sec id="s10">
<title>Author contributions</title>
<p>AG and GM with support from DF and MC carried out the modeling, control design, numerical and experimental validation of the proposed techniques, AG and GM with support from MC and DF analysed the data and wrote the numerical code used for all simulations, MdB with support from DF designed the research. All authors contributed to the article and approved the submitted version.</p>
</sec>
<ack>
<p>The authors wish to acknowledge the University of Naples Federico II and the Scuola Superiore Meridionale for supporting their research activity. This work was in part supported by the Research Project &#x201c;SHARESPACE&#x201d; funded by the European Union (EU HORIZON-CL4-2022-HUMAN-01-14. SHARESPACE. GA 101092889 - <ext-link ext-link-type="uri" xlink:href="http://sharespace.eu">http://sharespace.eu</ext-link>), by the the research projects PON INCIPIT, INSIST and PRIN 2017 &#x201c;Advanced Network Control of Future Smart Grids&#x201d; (<ext-link ext-link-type="uri" xlink:href="http://vectors.dieti.unina.it">http://vectors.dieti.unina.it</ext-link>) funded by the Italian Ministry for University and Research, and by the University of Naples Federico II&#x2014;&#x201c;Finanziamento della Ricerca di Ateneo (FRA)&#x2014; Linea B&#x201d; through &#x201c;BIOMASS&#x201d;.</p>
</ack>
<sec sec-type="COI-statement" id="s11">
<title>Conflict of interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<sec sec-type="disclaimer" id="s12">
<title>Publisher&#x2019;s note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<fn-group>
<fn id="fn2">
<label>1</label>
<p>Formally, <inline-formula id="inf114">
<mml:math id="m137">
<mml:mi mathvariant="script">G</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> is a directed graph, even though <inline-formula id="inf115">
<mml:math id="m138">
<mml:mi mathvariant="script">E</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> is such that the existence of (<italic>i</italic>, <italic>j</italic>) implies the existence of (<italic>j</italic>, <italic>i</italic>).</p>
</fn>
<fn id="fn3">
<label>2</label>
<p>Regular tilings exist only for <italic>L</italic> &#x2208; {3, 4, 6}. The case <italic>L</italic> &#x3d; 2 corresponds more trivially to a line, rather than a planar structure. The case <italic>L</italic> &#x3d; 3, corresponding to hexagonal tilings, where vertices appear in two different spatial configurations (one with edges at angles <italic>&#x3c0;</italic>/2, 7/6 <italic>&#x3c0;</italic>, 11/6 <italic>&#x3c0;</italic>, and one with edges at angles <italic>&#x3c0;</italic>/6, 5/6 <italic>&#x3c0;</italic>, 3/2 <italic>&#x3c0;</italic>&#x2014;plus an optional offset). Hence, the control strategy we propose here would need to be extended to select one or the other of the possible hexagonal configurations.</p>
</fn>
<fn id="fn4">
<label>3</label>
<p>First order models like (6) are often used in the literature <xref ref-type="bibr" rid="B21">Lee and Chong (2008)</xref>; <xref ref-type="bibr" rid="B22">Lee et al. (2010)</xref>; <xref ref-type="bibr" rid="B7">Casteigts et al. (2012)</xref>; <xref ref-type="bibr" rid="B50">Zhao et al. (2019)</xref>. In some other works <xref ref-type="bibr" rid="B42">Spears et al. (2004)</xref>; <xref ref-type="bibr" rid="B37">Sailesh et al. (2014)</xref> a second order model is used, given by <inline-formula id="inf116">
<mml:math id="m139">
<mml:mi>m</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mo>&#x308;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3bc;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mo>&#x307;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>, where <bold>u</bold>
<sub>
<italic>i</italic>
</sub> is a force, <italic>m</italic> is a mass and <italic>&#x3bc;</italic> is a viscous friction coefficient. Under the simplifying assumptions of small inertia <inline-formula id="inf117">
<mml:math id="m140">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>m</mml:mi>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">v</mml:mi>
</mml:mrow>
<mml:mo>&#x307;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:mo>&#x226a;</mml:mo>
<mml:mi>&#x3bc;</mml:mi>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">v</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> and <italic>&#x3bc;</italic> &#x3d; 1, the two models coincide.</p>
</fn>
<fn id="fn5">
<label>4</label>
<p>That is, denoting with <italic>U</italic>([<italic>a</italic>, <italic>b</italic>]) the uniform distribution on the interval [<italic>a</italic>, <italic>b</italic>], the initial position of each agent in polar coordinates <bold>x</bold>
<sub>
<italic>i</italic>
</sub>(0):&#x3d; (<italic>d</italic>
<sub>
<italic>i</italic>
</sub>, <italic>&#x3d5;</italic>
<sub>
<italic>i</italic>
</sub>) is obtained by independently sampling <inline-formula id="inf118">
<mml:math id="m141">
<mml:msub>
<mml:mrow>
<mml:mi>&#x3d5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x223c;</mml:mo>
<mml:mi>U</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
</mml:mrow>
<mml:mn>0,2</mml:mn>
<mml:mi>&#x3c0;</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:mfenced>
</mml:math>
</inline-formula> and <italic>d</italic>
<sub>
<italic>i</italic>
</sub> is chosen according to the probability density function <inline-formula id="inf119">
<mml:math id="m142">
<mml:msub>
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>&#x3be;</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
<mml:mo>&#x21a6;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> defined as <italic>p</italic>
<sub>
<italic>l</italic>
</sub>(<italic>&#x3be;</italic>) &#x3d; 2<italic>&#x3be;</italic>/<italic>r</italic>2.</p>
</fn>
<fn id="fn6">
<label>5</label>
<p>We also considered different deployment strategies (e.g., agents starting uniformly distributed from a larger disk or several disjoint disks) and verified that the results are qualitatively similar.</p>
</fn>
<fn id="fn7">
<label>6</label>
<p>Simulations are performed using <sc>SwarmSimV1</sc>, a software platform we developed to simulate swarms of mobile agents. The code is available at <ext-link ext-link-type="uri" xlink:href="https://github.com/diBernardoGroup/SwarmSimPublic/tree/SwarmSimV1">https://github.com/diBernardoGroup/SwarmSimPublic/tree/SwarmSimV1</ext-link>.</p>
</fn>
</fn-group>
<ref-list>
<title>References</title>
<ref id="B1">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Auletta</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Fiore</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Richardson</surname>
<given-names>M. J.</given-names>
</name>
<name>
<surname>di Bernardo</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2022</year>). <article-title>Herding stochastic autonomous agents via local control rules and online target selection strategies</article-title>. <source>Aut. Robots</source> <volume>46</volume>, <fpage>469</fpage>&#x2013;<lpage>481</lpage>. <pub-id pub-id-type="doi">10.1007/s10514-021-10033-6</pub-id>
</citation>
</ref>
<ref id="B2">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Balch</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Hybinette</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2000a</year>). &#x201c;<article-title>Behavior-based coordination of large-scale robot formations</article-title>,&#x201d; in <conf-name>Proceedings of the 4th International Conference on MultiAgent Systems</conf-name> (<publisher-name>ICMAS</publisher-name>), <fpage>363</fpage>&#x2013;<lpage>364</lpage>. <pub-id pub-id-type="doi">10.1109/ICMAS.2000.858476</pub-id>
</citation>
</ref>
<ref id="B3">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Balch</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Hybinette</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2000b</year>). &#x201c;<article-title>Social potentials for scalable multi-robot formations</article-title>,&#x201d; in <conf-name>Proceedings of the IEEE International Conference on Robotics and Automation (ICRA 2000)</conf-name>, <fpage>73</fpage>&#x2013;<lpage>80</lpage>. <pub-id pub-id-type="doi">10.1109/ROBOT.2000.844042</pub-id>
<volume>1</volume>
</citation>
</ref>
<ref id="B4">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Bayindir</surname>
<given-names>L.</given-names>
</name>
</person-group> (<year>2016</year>). <article-title>A review of swarm robotics tasks</article-title>. <source>Neurocomputing</source> <volume>172</volume>, <fpage>292</fpage>&#x2013;<lpage>321</lpage>. <pub-id pub-id-type="doi">10.1016/j.neucom.2015.05.116</pub-id>
</citation>
</ref>
<ref id="B5">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Biswal</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Elamvazhuthi</surname>
<given-names>K.</given-names>
</name>
<name>
<surname>Berman</surname>
<given-names>S.</given-names>
</name>
</person-group> (<year>2021</year>). <article-title>Decentralized control of multiagent systems using local density feedback</article-title>. <source>IEEE Trans. Automatic Control</source> <volume>67</volume>, <fpage>3920</fpage>&#x2013;<lpage>3932</lpage>. <pub-id pub-id-type="doi">10.1109/tac.2021.3109520</pub-id>
</citation>
</ref>
<ref id="B6">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Brambilla</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Ferrante</surname>
<given-names>E.</given-names>
</name>
<name>
<surname>Birattari</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Dorigo</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2013</year>). <article-title>Swarm robotics: A review from the swarm engineering perspective</article-title>. <source>Swarm Intell.</source> <volume>7</volume>, <fpage>1</fpage>&#x2013;<lpage>41</lpage>. <pub-id pub-id-type="doi">10.1007/s11721-012-0075-2</pub-id>
</citation>
</ref>
<ref id="B7">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Casteigts</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Albert</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Chaumette</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Nayak</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Stojmenovic</surname>
<given-names>I.</given-names>
</name>
</person-group> (<year>2012</year>). <article-title>Biconnecting a network of mobile robots using virtual angular forces</article-title>. <source>Comput. Commun.</source> <volume>35</volume>, <fpage>1038</fpage>&#x2013;<lpage>1046</lpage>. <pub-id pub-id-type="doi">10.1016/j.comcom.2011.09.008</pub-id>
</citation>
</ref>
<ref id="B8">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Coppola</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Guo</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Gill</surname>
<given-names>E.</given-names>
</name>
<name>
<surname>de Croon</surname>
<given-names>G. C.</given-names>
</name>
</person-group> (<year>2019</year>). <article-title>Provable self-organizing pattern formation by a swarm of robots with limited knowledge</article-title>. <source>Swarm Intell.</source> <volume>13</volume>, <fpage>59</fpage>&#x2013;<lpage>94</lpage>. <pub-id pub-id-type="doi">10.1007/s11721-019-00163-0</pub-id>
</citation>
</ref>
<ref id="B9">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Cort&#xe9;s</surname>
<given-names>J.</given-names>
</name>
</person-group> (<year>2009</year>). <article-title>Global and robust formation-shape stabilization of relative sensing networks</article-title>. <source>Automatica</source> <volume>45</volume>, <fpage>2754</fpage>&#x2013;<lpage>2762</lpage>. <pub-id pub-id-type="doi">10.1016/j.automatica.2009.09.019</pub-id>
</citation>
</ref>
<ref id="B10">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>D&#x2019;Orsogna</surname>
<given-names>M. R.</given-names>
</name>
<name>
<surname>Chuang</surname>
<given-names>Y. L.</given-names>
</name>
<name>
<surname>Bertozzi</surname>
<given-names>A. L.</given-names>
</name>
<name>
<surname>Chayes</surname>
<given-names>L. S.</given-names>
</name>
</person-group> (<year>2006</year>). <article-title>Self-propelled particles with soft-core interactions: patterns, stability, and collapse</article-title>. <source>Phys. Rev. Lett.</source> <volume>96</volume>, <fpage>104302</fpage>. <pub-id pub-id-type="doi">10.1103/PhysRevLett.96.104302</pub-id>
</citation>
</ref>
<ref id="B11">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Engel</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Michel</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Senechal</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2004</year>). <source>Tech. rep</source>. <publisher-name>Institut des Hautes Etudes Scientifique</publisher-name>. <comment>Lattice Geometry</comment>.</citation>
</ref>
<ref id="B12">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Gardi</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Ceron</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Wang</surname>
<given-names>W.</given-names>
</name>
<name>
<surname>Petersen</surname>
<given-names>K.</given-names>
</name>
<name>
<surname>Sitti</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2022</year>). <article-title>Microrobot collectives with reconfigurable morphologies, behaviors, and functions</article-title>. <source>Nat. Commun.</source> (<issue>13</issue>), <fpage>1</fpage>&#x2013;<lpage>14</lpage>. <pub-id pub-id-type="doi">10.1038/s41467-022-29882-5</pub-id>
</citation>
</ref>
<ref id="B13">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Giusti</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Coraggio</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>di Bernardo</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2023</year>). <article-title>Local convergence of multi-agent systems toward rigid lattices</article-title>. <source>IEEE Control Syst. Lett.</source> <volume>7</volume>, <fpage>2869</fpage>&#x2013;<lpage>2874</lpage>. <pub-id pub-id-type="doi">10.1109/LCSYS.2023.3289060</pub-id>
</citation>
</ref>
<ref id="B14">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Hauert</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Zufferey</surname>
<given-names>J. C.</given-names>
</name>
<name>
<surname>Floreano</surname>
<given-names>D.</given-names>
</name>
</person-group> (<year>2009</year>). <article-title>Evolved swarming without positioning information: an application in aerial communication relay</article-title>. <source>Aut. Robots</source> <volume>26</volume>, <fpage>21</fpage>&#x2013;<lpage>32</lpage>. <pub-id pub-id-type="doi">10.1007/s10514-008-9104-9</pub-id>
</citation>
</ref>
<ref id="B15">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Heinrich</surname>
<given-names>M. K.</given-names>
</name>
<name>
<surname>Wahby</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Dorigo</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Hamann</surname>
<given-names>H.</given-names>
</name>
</person-group> (<year>2022</year>). &#x201c;<article-title>Swarm robotics</article-title>,&#x201d; in <source>Cognitive robotics</source>. <comment>chap. 5. 77&#x2013;98</comment>. <pub-id pub-id-type="doi">10.7551/mitpress/13780.003.0009</pub-id>
</citation>
</ref>
<ref id="B16">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Hettiarachchi</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Spears</surname>
<given-names>W. M.</given-names>
</name>
</person-group> (<year>2005</year>). &#x201c;<article-title>Moving swarm formations through obstacle fields</article-title>,&#x201d; in <conf-name>Proceedings of the 2005 International Conference on Artificial Intelligence</conf-name> (<publisher-name>ICAI&#x2019;05</publisher-name>).<volume>97&#x2013;103</volume>
</citation>
</ref>
<ref id="B17">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Kegeleirs</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Grisetti</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Birattari</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2021</year>). <article-title>Swarm SLAM: challenges and perspectives</article-title>. <source>Front. Robotics AI</source> (<issue>8</issue>), <fpage>1</fpage>&#x2013;<lpage>6</lpage>. <pub-id pub-id-type="doi">10.3389/frobt.2021.618268</pub-id>
</citation>
</ref>
<ref id="B18">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Khatib</surname>
<given-names>O.</given-names>
</name>
</person-group> (<year>1985</year>). &#x201c;<article-title>Real-time obstacle avoidance for manipulators and mobile robots</article-title>,&#x201d; in <conf-name>Proceedings of the IEEE International Conferencce on Robotics and Automation</conf-name> (<publisher-name>ICRA</publisher-name>), <fpage>500</fpage>&#x2013;<lpage>505</lpage>. <pub-id pub-id-type="doi">10.1109/ROBOT.1985.1087247</pub-id>
<volume>85</volume>
</citation>
</ref>
<ref id="B19">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Kim</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Oh</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Suk</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Tsourdos</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2014</year>). <article-title>Coordinated trajectory planning for efficient communication relay using multiple UAVs</article-title>. <source>Control Eng. Pract.</source> <volume>29</volume>, <fpage>42</fpage>&#x2013;<lpage>49</lpage>. <pub-id pub-id-type="doi">10.1016/j.conengprac.2014.04.003</pub-id>
</citation>
</ref>
<ref id="B20">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Latora</surname>
<given-names>V.</given-names>
</name>
<name>
<surname>Nicosia</surname>
<given-names>V.</given-names>
</name>
<name>
<surname>Russo</surname>
<given-names>G.</given-names>
</name>
</person-group> (<year>2017</year>). <source>Complex networks: Principles, methods and applications</source>. <publisher-name>Cambridge University Press</publisher-name>. <pub-id pub-id-type="doi">10.1093/comnet/cnx062</pub-id>
</citation>
</ref>
<ref id="B21">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Lee</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Chong</surname>
<given-names>N. Y.</given-names>
</name>
</person-group> (<year>2008</year>). <article-title>A geometric approach to deploying robot swarms</article-title>. <source>Ann. Math. Artif. Intell.</source> <volume>52</volume>, <fpage>257</fpage>&#x2013;<lpage>280</lpage>. <pub-id pub-id-type="doi">10.1007/s10472-009-9125-x</pub-id>
</citation>
</ref>
<ref id="B22">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Lee</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Nishimura</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Tatara</surname>
<given-names>K.</given-names>
</name>
<name>
<surname>Chong</surname>
<given-names>N. Y.</given-names>
</name>
</person-group> (<year>2010</year>). &#x201c;<article-title>Three dimensional deployment of robot swarms</article-title>,&#x201d; in <conf-name>Proceedings of the EEE/RSJ 2010 International Conference on Intelligent Robots and Systems (IROS 2010)</conf-name>, <fpage>5073</fpage>&#x2013;<lpage>5078</lpage>. <pub-id pub-id-type="doi">10.1109/IROS.2010.5652055</pub-id>
</citation>
</ref>
<ref id="B23">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Li</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>St-Onge</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Pinciroli</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Gasparri</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Garone</surname>
<given-names>E.</given-names>
</name>
<name>
<surname>Beltrame</surname>
<given-names>G.</given-names>
</name>
</person-group> (<year>2019</year>). <article-title>Decentralized progressive shape formation with robot swarms</article-title>. <source>Aut. Robots</source> <volume>43</volume>, <fpage>1505</fpage>&#x2013;<lpage>1521</lpage>. <pub-id pub-id-type="doi">10.1007/s10514-018-9807-5</pub-id>
</citation>
</ref>
<ref id="B24">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Li</surname>
<given-names>X.</given-names>
</name>
<name>
<surname>Ercan</surname>
<given-names>M. F.</given-names>
</name>
<name>
<surname>Fung</surname>
<given-names>Y. F.</given-names>
</name>
</person-group> (<year>2009</year>). &#x201c;<article-title>A triangular formation strategy for collective behaviors of robot swarm</article-title>,&#x201d; in <conf-name>Proceedings of the 2009 International Conference on Computational Science and Its Applications (ICCSA 2009)</conf-name>, <fpage>897</fpage>&#x2013;<lpage>911</lpage>. <pub-id pub-id-type="doi">10.1007/978-3-642-02454-2_70</pub-id>
</citation>
</ref>
<ref id="B25">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Lopes</surname>
<given-names>H. J.</given-names>
</name>
<name>
<surname>Lima</surname>
<given-names>D. A.</given-names>
</name>
</person-group> (<year>2021</year>). <article-title>Evolutionary Tabu Inverted Ant Cellular Automata with Elitist Inertia for swarm robotics as surrogate method in surveillance task using e-Puck architecture</article-title>. <source>Robotics Aut. Syst.</source> <volume>144</volume>, <fpage>103840</fpage>. <pub-id pub-id-type="doi">10.1016/j.robot.2021.103840</pub-id>
</citation>
</ref>
<ref id="B26">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Maffettone</surname>
<given-names>G. C.</given-names>
</name>
<name>
<surname>Boldini</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Di Bernardo</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Porfiri</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2023a</year>). <article-title>Continuification control of large-scale multiagent systems in a ring</article-title>. <source>IEEE Control Syst. Lett.</source> <volume>7</volume>, <fpage>841</fpage>&#x2013;<lpage>846</lpage>. <pub-id pub-id-type="doi">10.1109/LCSYS.2022.3226619</pub-id>
</citation>
</ref>
<ref id="B27">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Maffettone</surname>
<given-names>G. C.</given-names>
</name>
<name>
<surname>Porfiri</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Di Bernardo</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2023b</year>). <article-title>Continuification control of large-scale multiagent systems under limited sensing and structural perturbations</article-title>. <source>IEEE Control Syst. Lett.</source> <volume>7</volume>, <fpage>2425</fpage>&#x2013;<lpage>2430</lpage>. <pub-id pub-id-type="doi">10.1109/LCSYS.2023.3286773</pub-id>
</citation>
</ref>
<ref id="B28">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Mooney</surname>
<given-names>J. G.</given-names>
</name>
<name>
<surname>Johnson</surname>
<given-names>E. N.</given-names>
</name>
</person-group> (<year>2014</year>). <article-title>A comparison of automatic nap-of-the-earth guidance strategies for helicopters</article-title>. <source>J. Field Robotics</source> <volume>31</volume>, <fpage>637</fpage>&#x2013;<lpage>653</lpage>. <pub-id pub-id-type="doi">10.1002/rob.21514</pub-id>
</citation>
</ref>
<ref id="B29">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Oh</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Ramezan Shirazi</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Sun</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Jin</surname>
<given-names>Y.</given-names>
</name>
</person-group> (<year>2017</year>). <article-title>Bio-inspired self-organising multi-robot pattern formation: A review</article-title>. <source>Robotics Aut. Syst.</source> <volume>91</volume>, <fpage>83</fpage>&#x2013;<lpage>100</lpage>. <pub-id pub-id-type="doi">10.1016/j.robot.2016.12.006</pub-id>
</citation>
</ref>
<ref id="B30">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Oh</surname>
<given-names>K. K.</given-names>
</name>
<name>
<surname>Park</surname>
<given-names>M. C.</given-names>
</name>
<name>
<surname>Ahn</surname>
<given-names>H. S.</given-names>
</name>
</person-group> (<year>2015</year>). <article-title>A survey of multi-agent formation control</article-title>. <source>Automatica</source> <volume>53</volume>, <fpage>424</fpage>&#x2013;<lpage>440</lpage>. <pub-id pub-id-type="doi">10.1016/j.automatica.2014.10.022</pub-id>
</citation>
</ref>
<ref id="B31">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Olfati-Saber</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2006</year>). <article-title>Flocking for multi-agent dynamic systems: algorithms and theory</article-title>. <source>IEEE Trans. Automatic Control</source> <volume>51</volume>, <fpage>401</fpage>&#x2013;<lpage>420</lpage>. <pub-id pub-id-type="doi">10.1109/TAC.2005.864190</pub-id>
</citation>
</ref>
<ref id="B32">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Pickem</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Glotfelter</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Wang</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Mote</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Ames</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Feron</surname>
<given-names>E.</given-names>
</name>
<etal/>
</person-group> (<year>2017</year>). &#x201c;<article-title>The robotarium: A remotely accessible swarm robotics research testbed</article-title>,&#x201d; in <conf-name>Proceedings of the IEEE International Conference on Robotics and Automation</conf-name> (<publisher-name>ICRA</publisher-name>), <fpage>1699</fpage>&#x2013;<lpage>1706</lpage>. <pub-id pub-id-type="doi">10.1109/ICRA.2017.7989200</pub-id>
</citation>
</ref>
<ref id="B33">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Pickem</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Lee</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Egerstedt</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2015</year>). &#x201c;<article-title>The GRITSBot in its natural habitat - a multi-robot testbed</article-title>,&#x201d; in <conf-name>Proceedings of the IEEE International Conference on Robotics and Automation (ICRA 2015)</conf-name>, <fpage>4062</fpage>&#x2013;<lpage>4067</lpage>. <pub-id pub-id-type="doi">10.1109/ICRA.2015.7139767</pub-id>
</citation>
</ref>
<ref id="B34">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Pinciroli</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Birattari</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Tuci</surname>
<given-names>E.</given-names>
</name>
<name>
<surname>Dorigo</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Zapatero</surname>
<given-names>M. D. R.</given-names>
</name>
<name>
<surname>Vinko</surname>
<given-names>T.</given-names>
</name>
<etal/>
</person-group> (<year>2008</year>). &#x201c;<article-title>Self-organizing and scalable shape formation for a swarm of pico satellites</article-title>,&#x201d; in <conf-name>Proceedings of the 2008 NASA/ESA Conference on Adaptive Hardware and Systems</conf-name> (<publisher-name>AHS</publisher-name>), <fpage>57</fpage>&#x2013;<lpage>61</lpage>. <pub-id pub-id-type="doi">10.1109/AHS.2008.41</pub-id>
</citation>
</ref>
<ref id="B35">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Rubenstein</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Cabrera</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Werfel</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Habibi</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>McLurkin</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Nagpal</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2013</year>). &#x201c;<article-title>Collective transport of complex objects by simple robots</article-title>,&#x201d; in <conf-name>Proceedings of the 2013 International Conference on Autonomous Agents and Multi-agent Systems</conf-name>, <fpage>47</fpage>&#x2013;<lpage>54</lpage>. <pub-id pub-id-type="doi">10.5555/2484920.2484932</pub-id>
</citation>
</ref>
<ref id="B36">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Rubenstein</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Cornejo</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Nagpal</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2014</year>). <article-title>Programmable self-assembly in a thousand-robot swarm</article-title>. <source>Science</source> <volume>345</volume>, <fpage>795</fpage>&#x2013;<lpage>799</lpage>. <pub-id pub-id-type="doi">10.1126/science.1254295</pub-id>
</citation>
</ref>
<ref id="B37">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Sailesh</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>William</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>James</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2014</year>). <article-title>Hexagonal lattice formation in multi-robot systems</article-title>. <source>Distrib. Aut. Robot. Syst.</source> <volume>104</volume>, <fpage>307</fpage>&#x2013;<lpage>320</lpage>. <pub-id pub-id-type="doi">10.1007/978-3-642-55146-82_2</pub-id>
</citation>
</ref>
<ref id="B38">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Sakurama</surname>
<given-names>K.</given-names>
</name>
<name>
<surname>Sugie</surname>
<given-names>T.</given-names>
</name>
</person-group> (<year>2021</year>). <article-title>Generalized coordination of multi-robot systems</article-title>. <source>Found. Trends Syst. Control</source> <volume>9</volume>, <fpage>1</fpage>&#x2013;<lpage>170</lpage>. <pub-id pub-id-type="doi">10.1561/2600000025</pub-id>
</citation>
</ref>
<ref id="B39">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Shi</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Yan</surname>
<given-names>B.</given-names>
</name>
</person-group> (<year>2021</year>). <article-title>A survey on intelligent control for multiagent systems</article-title>. <source>IEEE Trans. Syst. Man, Cybern. Syst.</source> <volume>51</volume>, <fpage>161</fpage>&#x2013;<lpage>175</lpage>. <pub-id pub-id-type="doi">10.1109/TSMC.2020.3042823</pub-id>
</citation>
</ref>
<ref id="B40">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Song</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>O&#x2019;Kane</surname>
<given-names>J. M.</given-names>
</name>
</person-group> (<year>2014</year>). &#x201c;<article-title>Decentralized formation of arbitrary multi-robot lattices</article-title>,&#x201d; in <conf-name>Proceedings of the IEEE International Conference on Robotics and Automation</conf-name> (<publisher-name>ICRA</publisher-name>), <fpage>1118</fpage>&#x2013;<lpage>1125</lpage>. <pub-id pub-id-type="doi">10.1109/ICRA.2014.6906994</pub-id>
</citation>
</ref>
<ref id="B41">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Spears</surname>
<given-names>W. M.</given-names>
</name>
<name>
<surname>Gordon</surname>
<given-names>D. F.</given-names>
</name>
</person-group> (<year>1999</year>). &#x201c;<article-title>Using artificial physics to control agents</article-title>,&#x201d; in <conf-name>Proceedings of the 1999 International Conference on Information Intelligence and Systems (ICIIS 1999)</conf-name> (<publisher-name>IEEE</publisher-name>), <fpage>281</fpage>&#x2013;<lpage>288</lpage>. <pub-id pub-id-type="doi">10.1109/ICIIS.1999.810278</pub-id>
</citation>
</ref>
<ref id="B42">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Spears</surname>
<given-names>W. M.</given-names>
</name>
<name>
<surname>Spears</surname>
<given-names>D. F.</given-names>
</name>
<name>
<surname>Hamann</surname>
<given-names>J. C.</given-names>
</name>
<name>
<surname>Heil</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2004</year>). <article-title>Distributed, physics-based control of swarms of vehicles</article-title>. <source>Aut. Robots</source> <volume>17</volume>, <fpage>137</fpage>&#x2013;<lpage>162</lpage>. <pub-id pub-id-type="doi">10.1023/B:AURO.0000033970.96785.f2</pub-id>
</citation>
</ref>
<ref id="B43">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Tan</surname>
<given-names>T. H.</given-names>
</name>
<name>
<surname>Mietke</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Li</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Chen</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Higinbotham</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Foster</surname>
<given-names>P. J.</given-names>
</name>
<etal/>
</person-group> (<year>2022</year>). <article-title>Odd dynamics of living chiral crystals</article-title>. <source>Nature</source> <volume>607</volume>, <fpage>287</fpage>&#x2013;<lpage>293</lpage>. <pub-id pub-id-type="doi">10.1038/s41586-022-04889-6</pub-id>
</citation>
</ref>
<ref id="B44">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Torquato</surname>
<given-names>S.</given-names>
</name>
</person-group> (<year>2009</year>). <article-title>Inverse optimization techniques for targeted self-assembly</article-title>. <source>Soft Matter</source> <volume>5</volume>, <fpage>1157</fpage>&#x2013;<lpage>1173</lpage>. <pub-id pub-id-type="doi">10.1039/b814211b</pub-id>
</citation>
</ref>
<ref id="B45">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Trotta</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Felice</surname>
<given-names>M. D.</given-names>
</name>
<name>
<surname>Montori</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Chowdhury</surname>
<given-names>K. R.</given-names>
</name>
<name>
<surname>Bononi</surname>
<given-names>L.</given-names>
</name>
</person-group> (<year>2018</year>). <article-title>Joint coverage, connectivity, and charging strategies for distributed UAV networks</article-title>. <source>IEEE Trans. Robotics</source> <volume>34</volume>, <fpage>883</fpage>&#x2013;<lpage>900</lpage>. <pub-id pub-id-type="doi">10.1109/TRO.2018.2839087</pub-id>
</citation>
</ref>
<ref id="B46">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Wang</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Liu</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Wang</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Chen</surname>
<given-names>Y.</given-names>
</name>
</person-group> (<year>2022a</year>). <article-title>A novel and elliptical lattice design of flocking control for multi-agent ground vehicles</article-title>. <source>IEEE Control Syst. Lett.</source> <volume>7</volume>, <fpage>1159</fpage>&#x2013;<lpage>1164</lpage>. <pub-id pub-id-type="doi">10.1109/LCSYS.2022.3231628</pub-id>
</citation>
</ref>
<ref id="B47">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Wang</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Rubenstein</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2020</year>). <article-title>Shape Formation in homogeneous swarms using local task swapping</article-title>. <source>IEEE Trans. Robotics</source> <volume>36</volume>, <fpage>597</fpage>&#x2013;<lpage>612</lpage>. <pub-id pub-id-type="doi">10.1109/tro.2020.2967656</pub-id>
</citation>
</ref>
<ref id="B48">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Wang</surname>
<given-names>X.</given-names>
</name>
<name>
<surname>Sun</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Wu</surname>
<given-names>Z.</given-names>
</name>
<name>
<surname>Li</surname>
<given-names>Z.</given-names>
</name>
</person-group> (<year>2022b</year>). <article-title>Robust integral of sign of error-based distributed flocking control of double-integrator multi-agent systems with a varying virtual leader</article-title>. <source>Int. J. Robust Nonlinear Control</source> <volume>32</volume>, <fpage>286</fpage>&#x2013;<lpage>303</lpage>. <pub-id pub-id-type="doi">10.1002/rnc.5823</pub-id>
</citation>
</ref>
<ref id="B49">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Wilson</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Glotfelter</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Wang</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Mayya</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Notomista</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Mote</surname>
<given-names>M.</given-names>
</name>
<etal/>
</person-group> (<year>2020</year>). <article-title>The robotarium: globally impactful opportunities, challenges, and lessons learned in remote-access, distributed control of multirobot systems</article-title>. <source>IEEE Control Syst. Mag.</source> <volume>40</volume>, <fpage>26</fpage>&#x2013;<lpage>44</lpage>. <pub-id pub-id-type="doi">10.1109/MCS.2019.2949973</pub-id>
</citation>
</ref>
<ref id="B50">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Zhao</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Wei</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Huang</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Zhou</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Tang</surname>
<given-names>Q.</given-names>
</name>
</person-group> (<year>2019</year>). <article-title>Regular topology formation based on artificial forces for distributed mobile robotic networks</article-title>. <source>IEEE Trans. Mob. Comput.</source> <volume>18</volume>, <fpage>2415</fpage>&#x2013;<lpage>2429</lpage>. <pub-id pub-id-type="doi">10.1109/TMC.2018.2873015</pub-id>
</citation>
</ref>
</ref-list>
<app-group>
<app id="app1">
<title>Appendix</title>
<p>Let us first introduce some useful notation. Given a real-valued function <italic>x</italic>(<italic>t</italic>) and <inline-formula id="inf120">
<mml:math id="m143">
<mml:mi>a</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>b</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:math>
</inline-formula> with <italic>a</italic> &#x3c; <italic>b</italic>, we introduce the <italic>saturation</italic> of <italic>x</italic>(<italic>t</italic>) between <italic>a</italic> and <italic>b</italic>, given by<disp-formula id="equ1">
<mml:math id="m144">
<mml:msubsup>
<mml:mrow>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>x</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="{" close="">
<mml:mrow>
<mml:mtable class="cases">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mi>a</mml:mi>
<mml:mo>,</mml:mo>
<mml:mspace width="2.3em"/>
<mml:mtext>if</mml:mtext>
<mml:mspace width="0.28em"/>
<mml:mspace width="0.28em"/>
<mml:mi>x</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3c;</mml:mo>
<mml:mi>a</mml:mi>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mi>x</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mtext>if</mml:mtext>
<mml:mspace width="0.28em"/>
<mml:mspace width="0.28em"/>
<mml:mi>a</mml:mi>
<mml:mo>&#x2264;</mml:mo>
<mml:mi>x</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:mi>b</mml:mi>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mi>b</mml:mi>
<mml:mo>,</mml:mo>
<mml:mspace width="2.3em"/>
<mml:mtext>if</mml:mtext>
<mml:mspace width="0.28em"/>
<mml:mspace width="0.28em"/>
<mml:mi>x</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3e;</mml:mo>
<mml:mi>b</mml:mi>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
</mml:math>
</disp-formula>
</p>
<p>In <xref ref-type="bibr" rid="B41">Spears and Gordon (1999)</xref>; <xref ref-type="bibr" rid="B42">Spears et al. (2004)</xref>; <xref ref-type="bibr" rid="B37">Sailesh et al. (2014)</xref>, the agent dynamics is described by<disp-formula id="e23">
<mml:math id="m145">
<mml:mfenced open="{" close="">
<mml:mrow>
<mml:mtable class="cases">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mo>&#x307;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">v</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">v</mml:mi>
</mml:mrow>
<mml:mo>&#x307;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>m</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3bc;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">v</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
<mml:mspace width="1em"/>
<mml:mo>&#x2200;</mml:mo>
<mml:mi>i</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">S</mml:mi>
<mml:mo>,</mml:mo>
</mml:math>
<label>(23)</label>
</disp-formula>where <inline-formula id="inf121">
<mml:math id="m146">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula> is the control input, <inline-formula id="inf122">
<mml:math id="m147">
<mml:mi>m</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> is the mass of the agent and <inline-formula id="inf123">
<mml:math id="m148">
<mml:mi>&#x3bc;</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> is the friction damping factor. Recall that, as described in <xref ref-type="sec" rid="s4-1">Section 4.1</xref>, under a few assumptions, (<xref ref-type="disp-formula" rid="e23">23</xref>) can be recast as (<xref ref-type="disp-formula" rid="e6">6</xref>). The control input <bold>u</bold>
<sub>
<italic>i</italic>
</sub> is given by<disp-formula id="e24">
<mml:math id="m149">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:munderover accentunder="false" accent="true">
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
</mml:munderover>
<mml:mi>f</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
</mml:mfenced>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
</mml:math>
<label>(24)</label>
</disp-formula>where <italic>f</italic> is a gravitational-like virtual force, given by<disp-formula id="e25">
<mml:math id="m150">
<mml:mi>f</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="{" close="">
<mml:mrow>
<mml:mtable class="cases">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:msubsup>
<mml:mrow>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>G</mml:mi>
<mml:mfrac>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>m</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>max</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:mspace width="1.5em"/>
<mml:mtext>if&#x2009;</mml:mtext>
<mml:mspace width="0.3333em"/>
<mml:mn>0</mml:mn>
<mml:mo>&#x2264;</mml:mo>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:mo>&#x2264;</mml:mo>
<mml:mi>R</mml:mi>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>G</mml:mi>
<mml:mfrac>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>m</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>max</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mtext>if&#x2009;</mml:mtext>
<mml:mspace width="0.3333em"/>
<mml:mi>R</mml:mi>
<mml:mo>&#x3c;</mml:mo>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>1.5</mml:mn>
<mml:mi>R</mml:mi>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo>
<mml:mspace width="6.5em"/>
<mml:mtext>otherwise</mml:mtext>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(25)</label>
</disp-formula>In <xref ref-type="disp-formula" rid="e25">(25)</xref>, <inline-formula id="inf124">
<mml:math id="m151">
<mml:mi>G</mml:mi>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>max</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> are tunable control gains, and <inline-formula id="inf125">
<mml:math id="m152">
<mml:mi>R</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>.</p>
<p>The control law given by <xref ref-type="disp-formula" rid="e24">(24)</xref> and <xref ref-type="disp-formula" rid="e25">(25)</xref> was showed to work for triangular lattices. To make it suitable for square patterns, a binary variable called <italic>spin</italic> is introduced for each agent, and the swarm is divided in two subsets, depending on the value of their spin. Then, agents with different spin aggregate at a distance of <italic>R</italic>, while agents with the same spin do so at a distance of <inline-formula id="inf126">
<mml:math id="m153">
<mml:msqrt>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msqrt>
<mml:mi>R</mml:mi>
</mml:math>
</inline-formula>. The extension to the case of hexagonal lattice is discussed in <xref ref-type="bibr" rid="B37">Sailesh et al. (2014)</xref> and requires communication among the agents.</p>
</app>
</app-group>
</back>
</article>