Formation Control for Second-Order Multi-Agent Systems with Collision Avoidance

: This paper deals with the formation control problem without collisions for second-order multi-agent systems. We propose a control strategy which consists of a bounded attractive component to ensure convergence to a speciﬁc geometrical pattern and a complementary repulsive component to guarantee collision-free rearrangement. For convergence purposes, it is assumed that the communication graph contains at least a directed spanning tree. The avoidance complementary component is formed by applying repulsive vector ﬁelds with unstable focus structure. Using the well-known input-to-state stability property a control law for second-order agents is derived in a constructive manner starting from the ﬁrst-order case. We consider that every agent is able to detect the presence of any other agent in the surrounding area and also can measure and share both position and velocity with his predeﬁned set of neighbours. The resulting control law ensures the convergence to the desired geometrical pattern without collisions during the transient behaviour, as well as bounded velocities and accelerations. Numerical simulations are provided to show the performance and effectiveness of the proposed strategy.


Introduction
Multi-agent systems have received much attention in the last decades because of their wide range of potential applications in situations where a single agent could not be effective enough, e.g., exploration, surveillance and rescue tasks, among others [1][2][3][4][5].In order to design versatile systems that can achieve the mentioned tasks, a number of different issues have been studied in this research area: for example, consensus, trajectory tracking, formation control, coordination, synchronization and so forth [6][7][8][9][10].In formation control, a group of agents is meant to be driven to a prescribed spatial pattern.Depending on the constraints imposed in the ability to measure or share information with other agents, those geometrical patterns could be reached up to translation, rotation, scaling or a combination of them.In terms of the sensing capability and interaction among agents, previous results in formation control algorithms can be divided into three main categories: position-, displacement-and distance-based schemes [7].In position-based control strategies, agents usually are able to determine their absolute position with respect to a global reference frame.Communication among agents is not strictly necessary, but the whole performance can be enhanced if coordination is regarded.As a result, the desired patterns are reached with proper scale and orientation [11][12][13].Displacement-based control schemes require the agents to measure relative positions of their neighbouring agents with respect to a local frame attached to each agent which has to be aligned with the global reference frame.Communication among agents needs to include at least a spanning tree, and the desired formation is specified by a set of relative displacements among agents.
Under this approach, the resulting formation is invariant up to translation [10,14].Distancebased strategies treat the desired formation as a set of inter-agent distances which can be expressed in local coordinates where the local frames are not necessarily aligned with respect to the global frame.Interactions among agents must be enhanced in order to ensure the agents converge to the correct formation by using rigidity, angle rigidity or signed area approaches [15][16][17][18].The aforementioned results have been developed by regarding a number of mathematical models, such as single or double integrator, unicycle-type robots, high-order linear agents, as well as a variety of constraints as intermittent communication, time delay, input saturation, quantization and digitization, among others [18][19][20][21][22][23].
One important issue that arises independently of the control objective and approach for solving the formation control problem is to guarantee that collisions will not occur among agents.Different schemes have been proposed for multi-agent systems regarding several mathematical models, communication topology and agents' capabilities to either receive or transmit information and sensing equipment.In the same way, there are different works regarding collisions between agents or collisions against obstacles, in [24][25][26][27][28][29][30][31][32][33][34].
A common approach to avoid collisions is based on the use of repulsive vector fields designed as the negative gradient of an artificial potential function.The main advantage of this approach is the simplicity in the design process, but it can lead to undesired equilibrium points where the agents could get stuck [25,26].A immediate remedy to guarantee that the agents can escape from unwanted local minima is to add a controlled perturbation to the overall control input [26].In [28,29], velocity information was used to modify the avoidance functions in order to be more energy-efficient and to generate faster and smoother trajectories.Many strategies under this approach have been designed in such a way that the repulsive vector fields grow indefinitely as the distance between agents tends to zero.This results in high magnitude control inputs that might be unrealistic for physical agents to achieve.Furthermore, if physical dimensions of agents are taken into account, collisions could eventually occur.Therefore, modified potential functions are proposed to comply with a minimum safety distance between any pair of agents and bounded control input magnitude in [26,32].A recent work proposed the use of the rotation matrix to modify the vector fields depending on the relative position of the agent with respect to obstacles [30].In contrast, in [33], the shape of obstacles are taken into account to guarantee motion without collisions.However, both algorithms were developed for nonholonomic vehicles.An alternative strategy to the collision avoidance problem was formulated in [27], where the agents are labelled according to a priority level which provide solution to the conflicts between agents.The priority in this scheme varies for leader and followers.An interesting strategy was proposed in [34], where an adaptive control component was used to ensure free-collision convergence.A novel approach was reported in [31], in which barrier functions are applied to ensure input and velocity constraints and collision avoidance requirements.
In [35], a collision avoidance algorithm based on reactive repulsive vector fields was proposed.This work was proposed to solve the formation control problem without collisions for first-order agents by applying repulsive vector fields with unstable focus structure.This technique, first reported in [36], considers that there exists an unstable focus centred at the position of any other robot or obstacle.This mechanism is activated when agents are near enough to each other.The repulsive vector fields are turned on/off in a discontinuous manner which could provoke the appearance of chattering phenomenon.Finite-time convergence to the desired formation, as well as finite-time for solving the conflicts between agents, were achieved.Unlike many previous works, the repulsive vector fields proposed in [36] cannot be derived as the gradient of any potential function.Then, in [37], the switching control strategy was modified by using continuous switching functions to ensure a smooth transition between the components of the control law and conditions to guarantee asymptotic convergence to the desired formation were derived.It is important to notice that the convergence component is bounded by considering saturation, while the collision avoidance component is, by definition, bounded.This results in a bounded control algorithm.Moreover, this strategy has been shown to be effective in real-time experiments [38].Additionally, in [37], a detailed analysis of the repulsive vector fields leads to minimum gain parameters such that the collision avoidance is guaranteed.
In this paper, we propose a solution to the formation control problem without collisions for second-order agents by generalizing the algorithm in [35].Regarding the second-order agents as a cascade of two single integrators, we apply the mentioned control law to first integrator in order to ensure asymptotic stability of the position error.Then, taking the velocity as a virtual control, we find the expression of acceleration signal which are, indeed, the control input.A cascaded system approach is utilized to show that the interconnected systems is globally asymptotically stable.We consider that every agent is equipped to measure the relative position and velocity of a predefined set of neighbours.For convergence purposes, it is assumed that the communication among agents contains, at least, a spanning tree.Even more, each agent is able to detect the presence of any agent in the surrounding area and share both position and velocity with agents into their sensing region.The convergence component of the algorithm is bounded by a saturating function while the repulsive vector fields are smoothly activated/deactivated.The resulting control law ensures the convergence to the desired geometrical pattern without collisions during the transient behaviour and bounded velocities and control inputs.The use of repulsive vector fields with unstable focus structure provides a relatively simple tool to avoid undesired equilibrium points.Moreover, the algorithm can be scaled in case that agents were added or removed with the only requirement of existing a spanning tree in the nominal communication scheme.
The remainder of this paper is organized as follows.In Section 2, some basic concepts about graph theory and some definitions are reviewed.We state, in detail, the problem and the control objective in Section 3. Our main results are provided in Section 4 and the corresponding simulation results to validate the performance of the proposed strategy are presented in Section 5. Finally, in Section 6, we list some conclusions and perspectives of our future work in this research line.

Preliminaries
In this section, we provide some concepts and definitions that will be useful throughout the rest of the paper.

Graph Theory
The communication among a set of agents is described by a formation graph G = {V, E, C}, which consists of a set of vertices V = {R 1 , . . ., R n } corresponding to each agent and a set of edges E = {(R j R i ) ∈ V × V, i = j}, which denotes the agent R i receive information about R j ; the agent R j is called the parent node and R i is, respectively, the child node; finally, If a formation graph is neither directed nor undirected, it is called mixed.There exists a path between the vertices R j and R i if there is a sequence of edges (R j R m 1 ), (R m 1 R m 2 ), . . ., (R m r R i ) for some i = j.A directed tree is a directed graph in which every node has exactly one parent, except for one single node, called the root.The root has no parent and has a directed path to every other node.A directed spanning tree of a directed graph G is a directed tree involving every node in G.The Laplacian matrix associated with a formation graph G is given by where ∆ is the degree matrix defined as ∆ = diag{g 1 , . . ., g n }, g i is the number of edges directed to R i , i = 1, . . ., n and A d is the adjacency matrix of G defined as follows

Saturating and Switching Functions
Definition 1.Let Φ r be the set of the saturating functions which is composed of all the real functions which satisfy the following conditions Definition 2. Let Ψ be the set of smooth switching functions which is composed of functions satisfying the next properties is said to be input-to-state stable (ISS) if there exist a class KL function β and a class K function γ, such that for any initial state x(t 0 ) and any bounded input u(t), the solution x(t) exists for all t ≥ t 0 and satisfies ∂V ∂t Lemma 2 ([39]).Consider the interconnected system ẏ = g(t, y).
If the subsystem (5) with y as input is ISS and y = 0 is a globally uniformly asymptotically stable equilibrium point of the subsystem (6), the origin (x, y) = (0, 0) of the interconnected system (5) and ( 6) is globally uniformly asymptotically stable.

Problem Statement
Consider the set N = {R 1 , R 2 , . . ., R N } consisting of N mobile agents at the plane.The position coordinates of every robot are specified by z where the velocity and acceleration along the X and Y axes, respectively.We assume that robot R i can sense continuously.
The relative position and velocity of a specific subset of robots N i ⊆ N are determined by the corresponding formation graph G. Therefore, the desired position z * i of robot R i is defined as where n i is the cardinality of N i and c ji = [c x ji , c y ji ] T ∈ R 2 , ∀j ∈ N i defines the geometrical pattern to be reached.In addition, we assume that each agent is able to detect and measure the relative position and velocity of any other agent within a circle of radius D. This region is called the sensing region and is assumed to be the same for all robots.The set of agents into the sensing region is denoted as Analogously, the collision region is defined by a radius d, which is the smallest allowed distance between any pair of agents.If some agents get closer than this value, it is considered that they collide with each other because of their physical dimensions.

Control Objective
The control goal is to design distributed controllers u i (z i , z j , żi , żj ), j ∈ N i ∪ M i (t), i = 1, . . ., N such that: (i) The agents reach the desired relative positions, that is, (ii) There are no collisions among agents.Even more, the agents remain at some predefined distance d from each other, that is, z i (t) − z j (t) ≥ d, ∀t ≥ 0, i = j; (iii) Once the agents achieve the desired formation, the geometrical pattern does not move from its current location any more, i. e., lim t→∞ v i (t) → 0, ∀i ∈ N.

Position Error Dynamics
Define the position error for each agent as the difference between the current and the desired position, zi Then, the position error dynamics is given by żi = żi − 1 Given (7), the last equation can be written in terms of velocities.The whole system in vector form is where L (G) is the Laplacian matrix, I 2 is the 2 × 2 identity matrix, ⊗ denotes the Kronecker product, z

Control Design
In this section, we solve the formation control problem without collisions in two stages.First, we propose a control law attending only the convergence issue.Then, we propose a complementary reactive control component which prevent agents from collisions.

Formation Control Strategy
In order to design a control law to achieve the aforementioned objective, we start by recalling the control law in ([37] Thm.1), which was proposed for first-order agents and consists of a bounded control input which applied to (7a).The closed-loop system in vector form takes the form where ∈ Φ r and µ > 0. Indeed, it was proven that the error trajectories in (15) coverge to zero, implying that the agents reach their desired formation.Keeping this in mind and in view of (12), we can add and subtract the right-hand term of ( 15) into (12).Then, grouping conveniently, we have where we have defined an auxiliary variable ξ ∈ R 2N as whose dynamics is given by Using (12), Theorem 1.Consider the system (16)- (19) and assume that the communication graph contains at least a directed spanning tree.Then, using the control law with λ > 0, the set of agents reaches the desired geometrical pattern and the velocity of the whole formation tends to zero.
Proof.First, we show that the subsystem ( 16) is ISS with ξ as input.Then, if ξ = 0, we have Taking the Lyapunov function candidate where φ( zi ) = φ x ( zi x ), φ y ( zi y ) T , φ x , φ y ∈ Φ r , the dynamics along the trajectories of ( 16) is In vector form, it becomes Since every agent defines its desired position with respect to, at least, another agent, the matrix ∆ −1 > 0. If there exists a directed spanning tree in the communication graph, the Laplacian matrix has exactly one zero eigenvalue, say λ n = 0.This implies rank(L (G)) = n − 1, while the rest of the eigenvalues have positive real parts, that is, Re(λ i ) > 0, i = 1, . . ., n − 1.Then, we can ensure that V( z) ≤ 0. ( Now, to prove asymptotic stability, consider the eigenvector associated to the zero eigenvalue, which has a value of 1 n = [1, 1, . . . , 1]T .Then, L (G)1 n = 0, which implies that in the equilibrium, the components φ( zi ) are all equal, i.e., φ( z1 Due to the properties of saturation functions, z1 = z2 = • • • = zn = z * .On the other hand, there exists a left eigenvector α = [α 1 , α 2 , . . . ,α n ] T ≥ 0 such that 1 T n α = 1 and L T (G)α = 0, [40].In other words, there exists a linear combination of the position errors in such a way that with coefficients α i not all equal to zero.Finally, implies that z * = 0, which means that only the trivial solution can identically ensure V( z) = 0.Then, z = 0 is asymptotically stable.Moreover, as the Lyapunov function candidate ( 22) is strictly increasing and radially unbounded, the origin is globally asymptotically stable (GAS).Now, we allow ξ = 0. Using the same Lyapunov candidate function, we get The last expression can be written as (30) or, bounding the last right-hand term, with 0 < θ < 1.Then, according to Lemma 1, ( 16) is ISS with γ(r) = φ −1 ξ µθ .Finally, by direct application of the control law ( 20), (19) becomes which is not only GAS, but also globally exponentially stable.Recalling Lemma 2, a cascaded composition of an ISS subsystem as ( 16) and a GAS subsystem as (32) result in another GAS system.This implies that z → 0 and the auxiliary variable ξ → 0 as t → ∞.
As a consequence, from (17), we also notice that v → 0 as t → ∞.In summary, this implies that the agents reach the desired geometrical pattern and the whole formation remains stationary after achieving the formation goal.This concludes the proof.
Once the formation control problem has been solved, it is of interest to implement the control law in each agent.Then, rewriting (20) in terms of the position and velocity errors, we have where The implementation of this control law in each agent is

Formation Control Strategy With Collision Avoidance
In order to enhance the applicability of the control law proposed in the previous subsection, we now take into account the possibility of collisions to occur while the rearrangement of agents.Following the same reasoning, we start from a control law designed for first-order agents inspired in the one reported in [37], given as where ψ ij (•) are smooth distance-based switching functions which satisfy that This allows us to turn on/off the collision avoidance mechanism.d ij is the distance between the i-th and the j-th agents.For designing this control law, every agent considers that there exists an unstable focus structure centred at the position of any other agent which ensures that the agents repel each other.The repulsive vector fields, which are given by the second right-hand term in (36), are designed by taking into consideration the relative positions between any pair of robots, when they are in their sensing regions.The relative position variables are defined as Clearly, if an agent does not detect any other agents into its sensing region, the repulsive component is not necessary.In this case, the repulsive component should be turned off, i.e., if the agents are far enough from each other, the second right-hand term in (36) vanishes.This implies that, in vector form, the control law reduces to the one applied in (15).In [41], it was shown that (36) and a gain ε, properly selected, solve the problem for first-order agents.It is also proved that, even if the repulsive vector fields are applied when the agents are at a distance D, the agents could get closer, but never at a distance smaller than d.Once the agents leave their sensing regions, their reactive components are deactivated and they proceed with their motion to the respective desired locations.

Reduced System
In the design of a collision avoidance complementary control law for second-order agents, we start by considering a reduced system consisting of two first-order agents with bidirectional communication between them.The closed-loop system for this reduced set, is given in (40) by applying (36), where we denote the distance d 12 = d 21 simply by d.
is the matrix which provides the unstable focus behaviour. (40)  We can assume without loss of generality that every agent has the same range of measurement, then ψ 12 ( d) = ψ 21 ( d) = ψ( d), and (40) becomes Remark 1.It is worthwhile to point out that a well-defined desired geometric pattern is such that the distance among the agents is larger that the minimum one, that is, at the desired formation, no conflicts between agents exist.Then, at the origin of (41), the second right-hand term vanishes.
Then, following the same procedure applied in the previous subsection, and adding and subtracting the right-hand side of ( 41) to (12), we have where and a new auxiliary variable is defined as whose dynamics is given by If the control input is selected as the ξ-subsystem reduces to ξ = −λξ.
Then, once that the control law ( 46) is applied, the cascaded system (42)-( 47) could be analysed as in Theorem 1.Since the ξ-subsystem is clearly GAS, it remains to show that zi -subsystem is ISS, which can be done by using the stability theory for perturbed systems.Indeed, if we let ξ = 0, (42) can be focused as (15) perturbed by the term β(z).As mentioned in Remark 1, this term is a vanishing perturbation at the desired formation.

General System
If we consider a set of N first-order agents along with the formation control strategy (36), the closed-loop system (42), in vector form, can be expressed as where F is defined as in (39).The matrix Ω, which depends on the distance between every pair of agents and models the conflicts among agents, is described by Remark 2. As it was assumed, every robot is able to detect other robots in a certain radius, which ensure the matrix Ω is a symmetric Laplacian-like matrix if only the agents in conflict are regarded.
The position error dynamics (12) in combination with (48 where and a general auxiliary variable was defined as Since the time derivative of the auxiliary variable is the control input could be selected as which implies that the dynamics of the auxiliary variable ξ becomes ξ = −λξ. (55) Now, we are ready to state our main result.
Theorem 2. Consider the system (50) and (55), and assume that the communication graph contains at least a directed spanning tree.Then, using the control law (54), the set of agents reaches the desired geometrical pattern without collisions.Once the desired formation is achieved, the whole pattern does not move from its current position.Even more, the agents remains for all time at a greater than or equal to a predefined bound d.
Proof.First we show that (50) is ISS.If we let ξ = 0 in (50), we get As mentioned before, the second right-hand term vanishes when the agents are far enough from each other, including when they reach the desired formation; that is, β(z * ) = 0.Then, regarding (51), we have with c 1 > 0. Equation (56) could be considered as (15) perturbed by the term β(z), which is fully described in (51) and could be bounded as in (57).According to [39], since β(z) vanishes at the origin of the error dynamics, if the parameters are selected properly, the system is still GAS.In [41], it has been shown that (56) is GAS when applying (36) and conditions in the selection of parameters µ and ε were derived.If we let ξ = 0 and recall the same Lyapunov function candidate (22), we have where 0 < θ < 1 and c 2 > 0.Then, (50) is ISS, which, along with (55), implies that the cascaded system remains GAS even when the complementary control component is applied.
As a conclusion, the formation control problem with collision avoidance is solved satisfying the control objective stated above.
It is clear that when the agents remain far enough from each other, the matrices Ω and Ω are null, which implies that (54) reduces to (33) where the repulsive vector fields are not taken into account.Finally, if (54) is written only in terms of position and velocity variables, it becomes

Simulations
In this section, we present the results of a series of simulations carried out to show and evaluate the performance of the proposed control strategy.To illustrate the effectiveness of the control law, we study a system composed of nine agents whose objective is to reach a sequence of desired geometrical patterns which are shown in Figures 1-4 where the communication links are shown as well.The parameters used for this example are µ = 1, ε = 0.6 and λ = 1, and the sensing and collision radius were D = 2.8 and d = 2, respectively, i.e., the minimum allowed distance between any pair of agents is 2 m and each agent is able to detect any another robots within a range of 2.8 m.The switching function that enables the repulsive vector fields is given by with a = 10 and b = 2.4.This exhibits the behaviour depicted in Figure 5 and gives a good approximation to the properties of the switching functions defined previously.The minimum distance between agents one they reach the desired formations is about 3.5 m.This distance ensures these patterns are reachable.The parameters of the simulation are summarized in Table 1.In the same way, the third formation to be formed is given by c It is important to notice that, in this case, the communication is reduced to contain a directed spanning tree rooted in robot R 8 .Moreover, we consider in this case that the robot R 8 is not able to apply the repulsive vector fields, i. e., the agent remains stationary while the rest of them get in formation with respect to it.

Simulation Results and Discussions
In Figures 6-8, we show the results up to the first 100 s of simulation.In Figure 6, distances among any pair of agents are depicted.There, a horizontal dashed line represents the minimum allowed distance between them.Clearly, no pair of robot get closer than this predefined bound and, even more, the conflict among agents are solved after about 30 s.Additionally, in Figures 7 and 8, velocity and control signals are illustrated, respectively.As it can be seen, velocities tend to zero, which implies that the whole formation stays at its current location once the geometrical pattern is reached.Both velocities and accelerations remain bounded during the transient period.Figure 9 shows the spatial configuration of agents at different times, which helps to illustrate the convergence to the desired formation.In Figure 10, distances between agents, velocities and accelerations are depicted for the whole simulation time.Details about time evolution can be appreciated more clearly in the video attached as Supplementary Material.

Conclusions
In this paper, we proposed a strategy for solving the formation control problem without collisions for second-order multi-agent systems.The control law is the result of a generalization from a strategy which has been proved to solve the similar problem for first-order systems.The main characteristics of the proposed design are preserved: the unstable focus structure in the collision avoidance mechanism and the absence of undesired equilibria.In this work, we assume that every agent in the set is able to determine and share both position and velocity, and that each of them can apply repulsive vector fields to repel others to avoid collision.The notion of input to state stability is applied to show convergence to the desired formation by using the approach of cascaded subsystems.As a

Figure 5 .
Figure5.Switching function to turn on/off the repulsive vector fields.A function which satisfy conditions given in Section II, with the same behaviour, could also be used instead of the proposed one.

Figure 9 .
Figure 9. Spatial distribution of agents at some specific times.

Figure 10 .
Figure 10.Distancesbetween an pair of agents, velocities and control inputs for whole simulation.

Table 1 .
General parameters used for simulation.