Multi-Agent Trajectory-Tracking Flexible Formation via Generalized Flocking and Leader-Average Sliding Mode Control

This paper reports a flexible (or time-varying) multi-agent formation approach with average trajectory tracking for second-order integral multi-agent networks with single virtual leaders. The approach is developed by means of time-varying Olfati-Saber flocking algorithms, and sliding mode control (SMC) in terms of the leader-average dynamics. More precisely, SMC-specifying average trajectory tracking is combined with flexible multi-agent flocking driven by the Olfati-Saber flocking algorithms with time-varying weighting norm. Existence conditions and properties of the suggested multi-agent formation are examined rigorously, together with implementation formulas. It is shown that by designing the sliding surface and the time-varying weighting matrix appropriately, flexible formation with finite-time trajectory tracking can be achieved, free of control action chattering; moreover, the sliding mode control and formation control can be designed separately. Numerical examples are given to illustrate the main results.

In this study, the generalized flocking algorithms of [31], [59] for the second-order integral multi-agent networks with single virtual leaders are further extended by employing time-varying weighting matrices in position and velocity metrics for flexible multi-agent formation control. As the main results, existence and properties about the flexible formation aspect under the suggested algorithms are summarized. To address the trajectory-tracking aspect, the navigation features of the leader-average dynamics are exploited. More specifically, based on the sliding mode control techniques [6], [12], [36], [37], [44], [56], [61], the transient/steady-state average dynamics are manipulated for VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see http://creativecommons.org/licenses/by/4.0/ the leader-average state to slide on the sliding surface specified along the tracked trajectory, while the flexible formation is retained simultaneously. Advantages of the approach include: (a) the control algorithms for flexible formation and sliding mode can be designed separately; (b) the sliding mode control for navigation keeps the trajectory tracking from matched noise, while the average trajectory-tracking is attainable in finite time; (c) the sliding mode is virtual, and no chattering control actions are practically involved.
Outlines: Preliminaries to second-order integral multiagent networks are collected in Section II. Section III explicates the flocking algorithms with time-varying weighting parameters. Leader-average modeling and sliding mode control are explicated in Section IV. Trajectory-tracking formation control is formulated and addressed in Section V with respect to the leader-average model. Illustrations are sketched in Section VI, and Section VII is our conclusion.
Notations: R and C denote the sets of all real and complex numbers, respectively. I n denotes the n × n identity matrix. (·) ⊗ ( * ) means the Kronecker product of the matrices (·) and ( * ). | · | means the absolute value of a scalar complex number, the Euclidean vector norm and the induced matrix norm as appropriately according to the context.

II. PRELIMINARIES TO MULTI-AGENT NETWORKS
Firstly, let us consider a multi-agent network consisting of N agents, each of which is described by the second-order continuous-time state-space equatioṅ with i ∈ {1, · · · , N } := N . In (1), q i (t), p i (t), u i (t) ∈ R n are the position, velocity and acceleration vectors, respectively, of the agent i at time t. Throughout the paper, we writė (·) = d(·)/dt. The time variable t will be dropped. For our latter usage, let us define the vectorization of , respectively, as follows.
Accordingly, the multi-agent network with the agents individually defined by (1) can be re-written collectively as the (Nn)-dimensional model (2).
Secondly, let M t =: M (t) ∈ R n×n be a time-varying weighting matrix for inter-agent position difference metric in the Euclidean norm sense of Based on this, the γ -neighbor of the agent i is defined as where γ > 0 is the radius of the super-ball in R n ; N i,t ⊆ N for all t ≥ 0. By the definition, N i,t is the subscript set of all agents in the neighborhood of the agent i at t. The same radius is meant in all neighborhoods.
Thirdly, let (i × j) be an undirected connection between the agents i and j if both are in each other's γ -neighborhood, and thus their position and velocity data are available mutually. The graph of the multi-agent network at t is which is a set of all one-to-one connections in the multi-agent network.

III. FLEXIBLE MULTI-AGENT FORMATION CONTROL
Now we formulate the formation control: fix the control actions {u i } N i=1 such that distributed and localized feedbacks are built and the following relationships hold.
where G ∞ is the graph of the multi-agent network at t → ∞. In (4), the first relation reflects the agent behavior rules: neither collision nor splitting all the time; the second and third relations are to achieve the specified formation and velocity consensus in the steady-state. M t = 0 and 0 < d < γ are assumed for the γ -neighborhood and the limit to be welldefined. Also, p * = 0 ensures that velocity consensus is rigorously meant in orientation and magnitude.
where ∈ R n×n is non-singular and 0 < T = ∈ R n×n . The control action u i defined by (5) is determined by the timevarying flocking control algorithm.
To explicate the algorithm, we write z =: q j − q i . About the first term in (5), we use the following notations.
Also about the first term of (5), for all i, j ∈ N , we have To see the second term of (5), define the adjacent function In what follows, we call the spatial adjacency matrix for the position vectorization q.
Here, M t = I N ⊗ M t ∈ R Nn×Nn . Clearly, A(M t q) is symmetrical with non-negative entries, whose scalar Laplacian matrix and the multi-dimensional Laplacian matrix, denoted by L(M t q) and L(M t q), are given by where (·) is the degree matrix of (·). Its diagonal entries are the row-sums of (·) and non-diagonal ones are zeros.
To understand the third term of (5), we need the virtual leader agent model with q r , p r ∈ R n . The leader agent provides navigation such that additional objectives for the agents to track the leader behavior and so on can be taken into account. Remark 1: Since the leader is virtual, no leader agent exists such that q r and p r are measured and informed to all the agents. When implementing the protocol in the follower agents, the leader agent is nothing but a navigation program driven by q a and p a , which are the average position and velocity that can be obtained by distributed measurements and data exchanges in between the agents.

B. AVERAGE MODELING
To see existence and properties under the time-varying flocking algorithm (5), we explain the average model for the closed-loop multi-agent dynamics. Define the average position and velocity vectors, respectively, by In deriving (9), we used N i=1 u 1,i = 0 and N i=1 u 2,i = 0. Thirdly, let us introduce new position and velocity vectors with respect to the average frame (q a , p a ); that is Eventually, the closed-loop multi-agent dynamics can be reflected under the shifting frame (x, v) by the structural dynamics model where V(M t x) is similar to L(M t x) but in terms of the Lyapunov functional V (M t , x) defined according to [59].
The closed-loop multi-agent network (10) is time-varying and highly nonlinear, whose solution cannot be given explicitly. However, fortunately, its Hamiltonian equivalence can help us in proving Theorem 1, though the details are omitted due to space limitation and to avoid redundance.

C. EXISTENCE AND PROPERTIES OF FLEXIBLE MULTI-AGENT FORMATION
Now we are ready to conclude Theorem 1 about flexible flocking formation under the algorithm (5), which is a timevarying version of Theorem 3.1 [59].
Theorem 1: Consider the multi-agent network with agents individually defined by (1). To each agent, the time-varying flocking algorithm (5) The multi-agents remain cohesive along the average trajectory q a ; that is, a radius 0 < ϒ < ∞ uniformly in t ≥ 0 exists such that |q − q a | ≤ ϒ over t ≥ 0. (ii) |v(t)| → 0 as t → ∞ is always achievable; that is, lim t→∞ p 1 = · · · = lim t→∞ p N = p * with p * = lim t→∞ p a (t) ∈ R Nn . VOLUME 8, 2020 (iii) Almost every solution x to (10) asymptotically con- Remark 3: The assertions (i)-(iii) of Theorem 1 say that if M t is moderate in the magnitude sense of |M t |, flexible formation almost always exists in the steady state. The assertion (iv) says that multi-agent formation may not happen, if a small-magnitude M t is adopted so that rejecting forces are not strong enough to keep away from each other.
Remark 4: According to [59], the proof arguments about Theorem 1 are based on the structural dynamic model (10). The model has nothing to do with q a , p a , q r and p r algebraically. In view of this, we conclude that Theorem 1 holds true no matter what behaviors q a , p a , q r and p r possess; or flexible formation is achievable independent of q a , p a , q r and p r . This is the starting point for us to introduce sliding mode control to manipulate q a , p a , q r and p r , while flexible formation remains unchanged.

IV. LEADER-AVERAGE MODEL AND SLIDING MODE CONTROL A. LEADER-AVERAGE DYNAMICS AND STRUCTURAL FEATURES
To understand the leader-average dynamics of the closedloop multi-agent network, let us re-express (8) and (9) with (11) which is termed the leader-average equation. Clearly, the weighting matrix M t is not in (11). Also we notice • Firstly, since (11) is LTI, the multi-agent formation with expected stead-state average features is meant in the sense of t → ∞. Hence to realize finite-time trajectorytracking formation under the control algorithms (5), the sliding mode control is used.
• Secondly, the controllability matrix for (11) is Since T > 0, rank {Q C (s)} = 4n for all s ∈ C. The PBH criterion says that the leader-average dynamics (11) are controllable if T > 0. This in turn implies that by choosing the leader reference u r appropriately, the multi-agent average trajectories can be specified.

B. SMC IN LEADER-AVERAGE DYNAMICS
In this subsection, we formulate and address leader-average SMC for accommodating flexible formation with finite-time average trajectory tracking.
We re-write the leader-average equation (11) as By the structural facts, the pairs (A, B) and (A 11 , A 12 ) are controllable under T > 0. With respect to (12), let us define the switching function s : R 4n × R n → R n : where S ∈ R n×4n is constant and rank(S) = n; µ : R 4n ×R + 0 → R n is a shifting factor reflecting some expected performances about the sliding surface : s(ξ, µ) = 0} Next, to explicate the sliding mode control u r , let us introduce the following coordinates transformation to (12).
Note that s(ξ, µ) = S 1 ξ 1 + S 2 ξ 2 + µ. It follows that In summary, the leader-average equation (12) is expressed under the new coordinates as     ξ A 12 ) is controllable. Then, we can always prescribe a non-singular S 2 ∈ R n×n and S 1 ∈ R 3n×n such that all eigenvalues of 11 = A 11 − A 12 S −1 2 S 1 have negative real parts via pole assignment. The eigenvalue assignment of 11 plays a key role in ensuring that the state solution of (13) is at least ultimately bounded, which in turn guarantees that the desired sliding mode will be maintained after reaching the sliding surface [12].

C. EXISTENCE AND PROPERTIES FOR SMC
Now let us construct the sliding mode control u r by where with ∈ R n×n , 0 < ϒ T = ϒ ∈ R n×n being design parameter matrices and β > 0 a scalar. Also, is Hurwitz and ϒ is the unique solution to the Lyapunov equation T ϒ + ϒ = −I n . It must be stressed that u r2 is not defined at s(ξ, µ) = 0. When s(ξ, µ) = 0, the state vector of (13) is located on the sliding surface, where u r will be replaced by some equivalent control u re defined soon. In addition, to ensure that the control laws in (14) and (15) are implementable, bounded-ness of ξ 1 , u r1 and µ over t ∈ [0, ∞) is needed. This is guaranteed by the stable eigenvalues of 11 .
As a final step for fixing u r , we specify the shifting factor µ to be differentiable with respect to t, which is our standing assumption in the discussion. Thus, µ is bounded if ξ 1 is bounded. The latter is ensured by stability of 11 . Now we are ready to claim existence and properties for the leader-average equation (12) to run into the sliding surface S t (·) and remain there under the control laws (14) and (15). The proof details for Theorem 2 are given in Appendix.
• Since the sliding mode control u r in (14), (15) contains sign operations, chattering might be brought into the flocking control algorithm (5). However, if we see that u r is merely an indirect input to induce the desirable average trajectory in terms of q r and p r . It is q r and p r that bring the leader navigation into the the flocking control algorithm (5). Clearly, q r and p r themselves have no chattering, since the leader-average model acts actually as a low-passing filter.

V. MULTI-AGENT FORMATION WITH FINITE-TIME TRAJECTORY TRACKING UNDER SMC A. PROBLEM FORMULATION AND SOLUTION
The problem is: determine possible control u r such that in the leader-average model with the output relation (18), it is satisfied that y = µ for all t ≥ t s within finite time t s < ∞.
Here, µ stands for the desired average trajectory.
To address the problem, let us define the switching function and sliding surface as Then, we must answer: under what conditions does any SMC control u r exist such that the leader-average output y will be forced to the trajectory µ (or the sliding surface S t (·)) in finite time and remain there thereafter? Corollary 1: In the leader-average model with the output relation in (18), assume that C = [C 1 , C 2 ] ∈ R n×4n with C 2 ∈ R n×n being nonsingular such that A 11 − A 12 C −1 2 C 1 is Hurwitz. Then, under the sliding mode control u r in (14) VOLUME 8, 2020 and (15) when s(ξ, µ) = 0, the output vector of (18) will be driven to the sliding surface S t (ξ ) in finite time t s < ∞ and thus y = µ for all t ≥ t s . The equivalent control for the trajectory tracking when s(ξ, µ) = 0 is In the above, µ is the desired average trajectory. Proof of Corollary 1: It is straightforward to show that all the conditions of Theorem 2 are satisfied. Therefore, the results follow from Theorem 2 readily.
• The trajectory tracking is meant in the leader-average dynamics, rather than the multi-agent ones. Main advantages of the SMC technique include: firstly, the tracking output reaches the desired trajectory in finite time; secondly, the reference tracking is totally free from matched uncertainties and robust to bounded unmatched uncertainties; thirdly, no chattering control actions involved in the flocking control.
• Different from the internal mode principle for trajectory tracking, no trajectory modeling is involved. Moreover, the multi-agent formation control laws and the control law to induce the sliding mode are designed separately.
• The finite time t s < ∞ is in the sense of the output vector of the leader-average dynamics. In other words, we cannot claim any finite-time reaching to the sliding surface for the individual agents themselves in general.

B. IMPLEMENTING MULTI-AGENT FLOCKING CONTROL WITH LEADER-AVERAGE SMC
Now we consider implementation of the time-varying flocking algorithm (5) while the average dynamics are tracking a specific trajectory via SMC, which is induced by u r defined in (14), (15) and (17) as appropriately. Since the time-varying flocking algorithm (5) consists of three terms, in which only u 3,i is related to the leader-average dynamics in terms of q r and p r . In view of this, our discussion goes to how to determine q r and p r . Under the assumptions of Corollary 2, when the desired trajectory µ is given, we write It follows that Substituting u r and u re for the closed-loop leader-average equation, we obtain that

VI. NUMERICAL ILLUSTRATIONS
Now we sketch numerical simulations about second-order integral multi-agent networks to illustrate the main results. Throughout the following figures, in the sub-figures captioned by (a), the dots represent the agent positions, and the arrows stand for the agent velocities; the undirected lines in between the dots reflect that the agents are within each other's γ -neighbourhood; the blue-dashed curve represents the expected trajectory, while the red-solid curve is the multiagent average trajectory. In the sub-figures captioned by (b), the control action vectors are plotted with respect to time t in a per-dimension way. In the 2-dimensional case, the trajectory µ = [x, y] T is defined as x(t) = 100 sin(2π t/100) y(t) = 100 cos(2π t/100) More precisely, Figure 1(a) gives the multi-agent trajectory-tracking flocking in the time interval [0, 600]s with fixed formation determined by the constant weighting matrix M t = 1.2I 2 . The multi-agent formations are plotted every ten seconds during the first hundred seconds and every fiftyfour seconds during the other time in Figure 1(a). Figure 1(b) illustrates the control actions during [0, 100]s, together with  those over [0, 5]s and [50,100]s. It is worth noticing that no control action chattering is involved. Figure 2 presents the results under the time-varying weighting matrix M t = (1 + |t−500| 500 )I 2 . In particular, when ||M t || decreases during t ∈ [0, 500), then the formation scales up gradually; when ||M t || is increasing during t ∈ [500, 600), then the formation scales down gradually. This reveals that the formation scaling can be adjusted by choosing the weighting matrix M t as appropriately. Clearly, in both cases the desired multi-agent formation is yielded, and the formation average position runs into the expected trajectory.  More precisely, Figure 3(a) gives the multi-agent trajectory-tracking flocking with a fixed formation determined by the constant weighting matrix M t = 1.2I 3 during the time interval [0, 1000]s. The multi-agent formations are plotted every twenty seconds during the first two hundred seconds and every hundred seconds during the other time in Figure 3(a). Figure 3(b) illustrates the control actions during [0, 100]s, together with those over [0, 5]s and [50,100]s, in which no control action chattering can be seen. Figure 4(a) illustrates the results with a flexible formation determined by the time-varying weighting matrix M t = (1 + |t−500| 500 )I 3 . Similar to the 2D case, when ||M t || decreases with respect to t ∈ [0, 500), the formation scales up gradually; when ||M t || increases with respect to t ∈ [500, 1000), the formation scales down gradually.
Obviously, in both cases the desired formation is yielded, and the average position runs into the specified trajectory.

VII. CONCLUSION
This paper is devoted to trajectory-tracking flexible formation control of second-order integral multi-agent networks with single virtual leaders. In other words, the Olfati-Saber's flocking algorithms are modified into a class of generalized ones with time-varying weighting parameters; then trajectorytracking control is worked out with sliding mode control in the sense of the leader-average dynamics. This technique provides us with more design freedoms for dealing with multi-objectives and performances. General time-varying multi-agent formation existence and properties are summarized in Theorem 1, whereas SMC-specifying trajectorytracking formation design is explained by Theorem 2 and Corollary 1, whose implementation is also summarized. The proposed SMC-specification approach is inspiring and meaningful for other multi-agent control issues such as collision avoidance and route planning.

APPENDIX PROOF OF THEOREM 2
The proof arguments are completed in two steps.
Step 1: It is shown that the state vector of (12) can be driven into the sliding surface S t (µ) in finite time t s < ∞.
Step 2: It is shown that the state vector remains on the sliding surface thereafter if some implementable control u r over t ∈ [t s , ∞) exists.
Clearly, when the state vector reaches the sliding surface and remains there, it holds that s(ξ, µ) = 0 over t ∈ [t s , ∞). This is equivalent to saying that the leader-average dynamics reduce to the following.
For the state vector remains on the sliding surface over t ∈ [t s , ∞), it is necessary to choose u r such thatṡ(ξ, µ) = 0 over t ∈ [t s , ∞). The corresponding u r is called the equivalent control, denoted by u re hereafter and given as in (17).
After reaching the sliding surface, if the control u r is replaced with u re of (17), then the state vector remains on the sliding surface, whenever u re is implementable in the sense that ξ 1 , µ andμ are all bounded. To this end, let 0 < ϒ = ϒ T ∈ R 3n×3n be the unique solution to the algebraic Lyapunov equation T 11 ϒ + ϒ 11 = −Q with 0 < Q = Q T ∈ R 3n×3n . Consider the Lyapunov candidate V (ξ 1 ) = 1 2 ξ T 1 ϒ ξ 1 for the first equation of (20). Then, the time derivative of V (ξ 1 ) along the first equation of (20) giveṡ where t ∈ [t s , ∞) and we simply write K = λ min (Q) 2λ max (ϒ )|| 12 S −1 2 || The inequalities in (21) say that if thenV (ξ 1 ) < 0 over t ∈ [t s , ∞) and thus the solutions to the first equation of (20) are at least bounded. Bearing in mind the above inequality, we see that if holds true, then the inequality (22) is true. To see under what conditions about µ the inequality (23) can be ensured, we consider two situations: µ = 0 and µ = 0. On the one hand, when µ = 0, the inequality (22) holds in form of K > 0, ∀ξ 1 ∈ R 3n (24) This is always possible by choosing S 2 . Indeed, in this situation the solution ξ = [ξ T 1 , ξ T 2 ] T is actually asymptotically stable, and thus ultimately bounded.
In short, if (24) holds, then the solution ξ = [ξ T 1 , ξ T 2 ] T is at least ultimately bounded so that the equivalent control u re is implementable; or equivalently, the state vector is kept on the sliding surface by u r = u re for all t ≥ t s .
To complete the proof in Step 2, let us note that (24) can be re-written as λ min (Q) 2λ max (ϒ )|| 12 S −1 2 || > 0 Now we consider the optimal choice of Q to maximize λ min (Q)/λ max (ϒ ). The optimal solution is given as follows when Q = I 3n .