# Flocking for Multiple Ellipsoidal Agents with Limited Communication Ranges

Authors: K. D. Do
Journal: ISRN Robotics
 (2013)

---

## Abstract

This paper contributes a design of distributed controllers for flocking of mobile agents with an ellipsoidal shape and a limited communication range. A separation condition for ellipsoidal agents is first derived. Smooth step functions are then introduced. These functions and the separation condition between the ellipsoidal agents are embedded in novel pairwise potential functions to design flocking control algorithms. The proposed flocking design results in (1) smooth controllers despite of the agents’ limited communication ranges, (2) no collisions between any agents, (3) asymptotic convergence of each agent’s generalized velocity to a desired velocity, and (4) boundedness of the flock size, defined as the sum of all distances between the agents, by a constant.


---

## Body

## 1. Introduction

Flocking, referred to as a collective motion of a large number of self-propelled entities, has attracted a lot of attention of researchers in biology, physics, and computer science [1–4]. Engineering applications of flocking include search, rescue, coverage, surveillance, sensor networks, and cooperative transportation [5–14].In 1987, Reynolds [2] introduced three rules of flocking: (1) separation: avoid collision with nearby flock-mates; (2) alignment: attempt to match velocity with nearby flock-mates; (3) cohesion: attempt to stay close to nearby flock-mates. Since then, there has been a number of modifications and extensions of the above three rules and additional rules to result in many algorithms to realize these rules. The graph theory and the Lyapunov direct method were used to solve consensus problems in [15–17]. Local artificial potentials between neighboring agents were used to deal with separation (collision avoidance) and cohesion problems in [12, 13, 18–23]. The leader-follower approach to a target tracking problem was used in [24, 25]. Other related work includes geometric formation optimization [26, 27], pattern formation [28], and task allocation [29]. In all the above cited references, the agents are considered as a single point, a circular disk, or a sphere.In practice, many agents have a nonspherical, especially long and narrow, shape. If these agents are fitted to spheres, there is a problem of the large conservative volume. To illustrate this problem, we look at an example of fitting a cylindrical agent with a radius ofrc and a length of 2lc to an ellipsoid with semiaxes of a, b, and c, and a sphere with a radius of rs as shown Figure 1. By shrinking the space along the direction of the major axis of the ellipsoid, we can find a=2lc, b=c=2rc, and rs=rc2+lc2. Therefore, the conservative volume, Vcon, defined as the difference between the volumes enclosed by the sphere and the ellipsoid, is given by Vcon=(4πrc3/3)[(lc2/rc2+1)lc2/rc2+1-22(lc/rc)]. This means that the conservative volume is always nonnegative and is proportional to cubic of the half-length lc over the radius rc of an agent.Figure 1
Fitting an cylindrical agent to a sphere and an ellipsoid.A spherical approximation of the shape of long and narrow agents can adversely affect performance of a flocking algorithm. An example is the case where it is a must to flock a group of long and narrow agents through a long and narrow passageway. In some cases, a spherical approximation of the agents's shape can result in failure of a flocking algorithm. As an illustration, we consider two cylindrical agents with a length of2l1 and 2l2, and a radius of r1 and r2. Assuming that r1 and r2 are much less than l1 and l2, respectively, that is, the two agents have a long and narrow shape. We now require these two agents to flock in a way that they do not collide with each other and the distance d12 between them is such that (r1+r2)+ϵ12<d12<(l1+l2)-ϵ12 with ϵ12 being a feasible positive constant. Clearly, a spherical approximation of the agents' shape is not applicable in this case for a flocking algorithm. On the other hand, an ellipsoidal approximation can be applicable. In addition, an ellipsoidal approximation of the agents' shape for collision avoidance between the agents in a flocking algorithm covers a spherical approximation of the agents' shape by setting the semiaxes of the ellipsoid equal, but not vice versa. The above discussion indicates that it is much more efficient to use an ellipsoidal approximation of the agents with a long and narrow shape for collision avoidance in designing flocking algorithms.Despite of the above advantages of an ellipsoidal approximation of the agents' shape, flocking for ellipsoidal agents has not been addressed in the literature except for a recent paper [30] on coordination control of multiple ellipsoidal agents. This is partially due to difficulties in determining a separation condition between two ellipsoids. There have been two main methods to determine a separation condition between ellipsoids. The first method in [31, 32] consists of determining the intersection of the ellipsoids with the plane containing the line joining their centers and rotating the plane. The distance of closest approach [33] of the two ellipses formed by the intersection is a periodic function of the plane orientation, of which the maximum value corresponds to the closest distance between the two ellipsoids. The second method [34] is based on the discriminant of their characteristic polynomial. Both methods are too complicated for an application in flock control. If these methods are applied for collision avoidance, the condition, for which the minimum distance between two disks or the discriminant of their characteristic polynomial is positive, is extremely complicated to be embedded in a proper potential function for designing a flocking algorithm. In [35], a design of distributed controllers for flocking of mobile agents with an elliptical shape and with limited communication ranges was addressed. As it will be seen later, the design of a flocking algorithm in two dimensional space (i.e., elliptical agents are considered) is much harder than that in three-dimensional space (i.e., ellipsoidal agents are considered).The aforementioned observations motivate contributions of this paper on a design of flocking algorithms for mobile agents with an ellipsoidal shape and limited communication ranges. The paper's contributions include (1) a new condition for separation between two ellipsoids, see Section 2.1; (2) smooth step functions; (3) a new pairwise potential function for two ellipsoidal agents, see Section4.1.1; (4) a derivation of flocking algorithms based on the pairwise potential functions, see Section 4.4.


## 2. Preliminaries

### 2.1. Separation Condition Between Two Ellipsoids

This section presents a condition for separation of two ellipsoids applicable for collision avoidance in the flock control design later. As such, we consider two ellipsoidsi and j shown in Figure 2. In this figure, OXYZ is the earth-fixed frame, OiXiYiZi is the body-fixed frame attached to ellipsoid i, qi=[xiyizi]T denotes the position of the center Oi, and ηi=[ϕiθiψi]T denotes the orientation (roll, pitch and yaw angles) of the ellipsoid i. Moreover, (ai,bi,ci) denote the semiaxes of the ellipsoids i. These notations are similar to the ellipsoid j.Figure 2
Two ellipsoids and their coordinates.Lemma 1.
Consider two ellipsoidsi and j, which have semi-axes of (ai,bi,ci) and (aj,bj,cj), and orientation vectors ηj=[ϕiθiψi]T and ηj=[ϕjθjψj]T, and are centered at qi=[xiyizi]T and qj=[xjyjzj]T, respectively, see Figure 2. Define the transformed distance Δij between the ellipsoids i and j as
(1)Δij=∥Qijq-ij∥2+∥Qjiq-ji∥22-1,
where
(2)Qij=I3×3-(I3×3+κijTj)-1,q-ij=Piqij,
with I3×3 being a 3×3 identity matrix, and
(3)qij=qi-qj,Pi=-Ai-1R-1(ηi),Ai=diag(ai,bi,ci).
The matrix R(•) represents the three-dimensional rotational matrix with respect to the vector •. The matrix Tj is given by
(4)Tj=[Tj11Tj12Tj13Tj12Tj22Tj23Tj13Tj23Tj33],
where
(5)Tj11=a112+a212+a312,Tj12=a11a12+a21a22+a31a32,Tj22=a122+a222+a322,Tj13=a11a13+a21a23+a31a33,Tj33=a132+a232+a332,Tj23=a12a13+a22a23+a32a33,
with amn for m=1,2,3 and n=1,2,3 being the element (m,n) of the matrix (Ai-1R(ηij)Aj)-1 with
(6)ηij=ηi-ηj,Aj=diag(aj,bj,cj).
The variable κij is the largest root (the right most root) of the following equation:
(7)Fij(κij):=q-ijT(I3×3+κijTj)-TTj(I3×3+κijTj)-1q-ij-1=0,
where (I3×3+κijTj)-T denotes the transpose of (I3×3+κijTj)-1.
The vectorqji and the matrix Qji are defined accordingly. The two ellipsoids are externally separated, that is, the ellipsoids are outside of each other and do not contact with each other like Figure 2, if
(8)Δij>0.Remark 2.
The transformed distanceΔij is symmetric, that is, Δij=Δji. Moreover, Δij is a smooth function of qij, ηi, ηj, and ηij. Alternatively, Δij is a smooth function of q-ij, q-ji, and ηij.Proof.
see AppendixA.


### 2.2. Smooth Step Function

This section gives a definition of the smooth step function followed by a construction of this function. The smooth step function is to be embedded in a pairwise potential function to avoid discontinuities in the control law due to the agents' communication limitation ranges in solving the collision avoidance problem.Definition 3.
A scalar functionh(x,a,b,c) is said to be a smooth step function if it possesses the following properties:
(9)(1)h(x,a,b,c)=0,∀x∈(-∞,a],(2)h(x,a,b,c)=1,∀x∈[b,∞),(3)0<h(x,a,b,c)<1,∀x∈(a,b),(4)h(x,a,b,c)issmooth,(5)h′(x,a,b,c)>0,∀x∈(a,b),(6)h′′(x,a,b,c)=0atx=x*∈(a,b),
where h′(x,a,b,c)=∂h(x,a,b,c)/∂x, h′′(x,a,b,c)=∂2h(x,a,b,c)/∂x2, a and b are constants such that a<b, and c is a positive constant.Lemma 4.
Let the scalar functionh(x,a,b,c) be defined as
(10)h(x,a,b,c)=f(τ)f(τ)+cf(1-τ)withτ=x-ab-a,
where
(11)f(τ)=0ifτ≤0,f(τ)=e-1/τifτ>0,
with a and b being constants such that a<b, and c being a positive constant. Then the function h(x,a,b,c) is a smooth step function.Proof (see [30]).
An alternative “symmetric” (i.e.,c=1) smooth step function is available in [14] but it requires a numerical integration. The introduction of the positive constant c in the smooth step function in Lemma 4 is to shift the location at which h′(x,a,b,c) attains its extremum value. An illustration of a smooth step function (a=0,b=3,c=2) is given in Figure 3.Figure 3
A smooth step function and its first and second derivatives.


### 2.3. Barbalat-Like Lemma

The following Barbalat-like lemma is to be used in stability analysis of the closed-loop system.Lemma 5.
Assume that a nonnegative scalar differentiable functionf(t) satisfies the following conditions:(12)(1)|ddtf(t)|≤k1f(t),∀t≥0,(2)∫0∞‍f(t)dt≤k2,
where k1 and k2 are positive constants, then limt→∞f(t)=0.Proof (see [7]).
Lemma5 differs from Barbalat's lemma found in [36]. While Barbalat's lemma assumes that f(t) is uniformly continuous, Lemma 5 assumes that |(d/dt)f(t)| is bounded by k1f(t). Lemma 5 is useful in proving convergence of f(t) when it is difficult to prove uniform continuity of f(t).


## 2.1. Separation Condition Between Two Ellipsoids

This section presents a condition for separation of two ellipsoids applicable for collision avoidance in the flock control design later. As such, we consider two ellipsoidsi and j shown in Figure 2. In this figure, OXYZ is the earth-fixed frame, OiXiYiZi is the body-fixed frame attached to ellipsoid i, qi=[xiyizi]T denotes the position of the center Oi, and ηi=[ϕiθiψi]T denotes the orientation (roll, pitch and yaw angles) of the ellipsoid i. Moreover, (ai,bi,ci) denote the semiaxes of the ellipsoids i. These notations are similar to the ellipsoid j.Figure 2
Two ellipsoids and their coordinates.Lemma 1.
Consider two ellipsoidsi and j, which have semi-axes of (ai,bi,ci) and (aj,bj,cj), and orientation vectors ηj=[ϕiθiψi]T and ηj=[ϕjθjψj]T, and are centered at qi=[xiyizi]T and qj=[xjyjzj]T, respectively, see Figure 2. Define the transformed distance Δij between the ellipsoids i and j as
(1)Δij=∥Qijq-ij∥2+∥Qjiq-ji∥22-1,
where
(2)Qij=I3×3-(I3×3+κijTj)-1,q-ij=Piqij,
with I3×3 being a 3×3 identity matrix, and
(3)qij=qi-qj,Pi=-Ai-1R-1(ηi),Ai=diag(ai,bi,ci).
The matrix R(•) represents the three-dimensional rotational matrix with respect to the vector •. The matrix Tj is given by
(4)Tj=[Tj11Tj12Tj13Tj12Tj22Tj23Tj13Tj23Tj33],
where
(5)Tj11=a112+a212+a312,Tj12=a11a12+a21a22+a31a32,Tj22=a122+a222+a322,Tj13=a11a13+a21a23+a31a33,Tj33=a132+a232+a332,Tj23=a12a13+a22a23+a32a33,
with amn for m=1,2,3 and n=1,2,3 being the element (m,n) of the matrix (Ai-1R(ηij)Aj)-1 with
(6)ηij=ηi-ηj,Aj=diag(aj,bj,cj).
The variable κij is the largest root (the right most root) of the following equation:
(7)Fij(κij):=q-ijT(I3×3+κijTj)-TTj(I3×3+κijTj)-1q-ij-1=0,
where (I3×3+κijTj)-T denotes the transpose of (I3×3+κijTj)-1.
The vectorqji and the matrix Qji are defined accordingly. The two ellipsoids are externally separated, that is, the ellipsoids are outside of each other and do not contact with each other like Figure 2, if
(8)Δij>0.Remark 2.
The transformed distanceΔij is symmetric, that is, Δij=Δji. Moreover, Δij is a smooth function of qij, ηi, ηj, and ηij. Alternatively, Δij is a smooth function of q-ij, q-ji, and ηij.Proof.
see AppendixA.


## 2.2. Smooth Step Function

This section gives a definition of the smooth step function followed by a construction of this function. The smooth step function is to be embedded in a pairwise potential function to avoid discontinuities in the control law due to the agents' communication limitation ranges in solving the collision avoidance problem.Definition 3.
A scalar functionh(x,a,b,c) is said to be a smooth step function if it possesses the following properties:
(9)(1)h(x,a,b,c)=0,∀x∈(-∞,a],(2)h(x,a,b,c)=1,∀x∈[b,∞),(3)0<h(x,a,b,c)<1,∀x∈(a,b),(4)h(x,a,b,c)issmooth,(5)h′(x,a,b,c)>0,∀x∈(a,b),(6)h′′(x,a,b,c)=0atx=x*∈(a,b),
where h′(x,a,b,c)=∂h(x,a,b,c)/∂x, h′′(x,a,b,c)=∂2h(x,a,b,c)/∂x2, a and b are constants such that a<b, and c is a positive constant.Lemma 4.
Let the scalar functionh(x,a,b,c) be defined as
(10)h(x,a,b,c)=f(τ)f(τ)+cf(1-τ)withτ=x-ab-a,
where
(11)f(τ)=0ifτ≤0,f(τ)=e-1/τifτ>0,
with a and b being constants such that a<b, and c being a positive constant. Then the function h(x,a,b,c) is a smooth step function.Proof (see [30]).
An alternative “symmetric” (i.e.,c=1) smooth step function is available in [14] but it requires a numerical integration. The introduction of the positive constant c in the smooth step function in Lemma 4 is to shift the location at which h′(x,a,b,c) attains its extremum value. An illustration of a smooth step function (a=0,b=3,c=2) is given in Figure 3.Figure 3
A smooth step function and its first and second derivatives.


## 2.3. Barbalat-Like Lemma

The following Barbalat-like lemma is to be used in stability analysis of the closed-loop system.Lemma 5.
Assume that a nonnegative scalar differentiable functionf(t) satisfies the following conditions:(12)(1)|ddtf(t)|≤k1f(t),∀t≥0,(2)∫0∞‍f(t)dt≤k2,
where k1 and k2 are positive constants, then limt→∞f(t)=0.Proof (see [7]).
Lemma5 differs from Barbalat's lemma found in [36]. While Barbalat's lemma assumes that f(t) is uniformly continuous, Lemma 5 assumes that |(d/dt)f(t)| is bounded by k1f(t). Lemma 5 is useful in proving convergence of f(t) when it is difficult to prove uniform continuity of f(t).


## 3. Problem Statement

### 3.1. Agent Dynamics

As mentioned before, this paper mainly focuses on difficulties caused by the ellipsoidal shape of the agents in designing flocking algorithms, we therefore assume that each ellipsoidal agenti has the following dynamics:
(13)q˙i=ui,η˙i=ωi,i∈ℕ,
where ℕ is the set of all agents in the group, ui=[uxiuyiuzi]T and ωi=[ωϕiωθiωψi]T are the control input vectors of the agent i. It is recalled that qi=[xiyizi]T with (xi,yi,zi) being the position coordinates of the center of the agent i and ηi=[ϕiθiψi]T with (ϕi,θi,ψi) being the orientation angles of the agent i, see Figure 2. For agents with higher order dynamics, the backstepping technique [37] can be used because we will design the control input vectors ui and ωi such that they are smooth.


### 3.2. Flock Control Objective

In order to design a flocking algorithm for a group of ellipsoidal agents, there is a need to specify a common goal for the group, some communication between the agents, and initial position and orientation of the agents. We therefore impose the following assumption on the flocking rendezvous trajectory, communication, and initial conditions between the agents.Assumption 1.
(1) The agentsi and j have spherical communication spaces, which are centered at the points Oi and Oj, and have radii of Ri and Rj. The radii Ri and Rj are sufficiently large in the sense that
(14)ΔijRm>0,
where ΔijRm is the greatest lower bound of Δij when the agents i and j are within their communication ranges, that is,
(15)ΔijRm=inf(Δij)s.t.{ηij∈ℝ3,∥qij∥=min(Ri,Rj),
for all (i,j)∈ℕ and j≠i.
(2) The agentsi and j can exchange their trajectories, (qi,ηi) and (qj,ηj) if these agents are in their communication spaces.
(3) At the initial timet0≥0, all the agents in the group are sufficiently far away from each other in the sense that the following condition holds
(16)Δij(t0)>0,
where Δij(t0) is given in (1) evaluated at (qi=qi(t0),ηi=ηi(t0)) and (qj=qj(t0),ηj=ηj(t0)), and we have abused the notation of Δij(qij(t0),ηi(t0),ηj(t0)) as Δij(t0) for simplicity of presentation.
(4) The flocking rendezvous position and orientation trajectory,qod=[xod,yod,zod]T and ηod=[ϕod,θod,ψod]T, for the flock to follow has bounded derivatives q˙od and η˙od, and is available for all the agents.Remark 6.
(1) In item (1), the condition (14) holds if there exists a positive constant ϱi such that Ri≥ϱi+sup(ai+aj,ai+bj,ai+cj,bi+aj,bi+bj,bi+cj,ci+aj,ci+bj,ci+cj), for all (i,j)∈ℕ and j≠i.
(2) Items (1) and (2) in Assumption1 specify the way each agent communicates with other agents in the group within its communication range. In other words, the agents in the group are connected if they are inside their communication ranges.
(3) Item (3) in Assumption1 implies from Lemma 1 that at the initial time t0 there is no collision between any agents in the group.
(4) Items (1), (2), and (3) in Assumption1 do not guarantee overall connectivity among all the agents in the group in general. Under item (4) in Assumption 1, we do not require overall connectivity among all the agents to design a flocking algorithm.
(5) Item (4) in Assumption1 means that all the agents are aware of the flocking rendezvous trajectory. This item together with items (1) and (2) in Assumption 1 were also required in [13] to design a nonfragmentation flocking algorithm for point agents based on an attractive/repulsive potential field. In [13] Olfati-Saber also showed that under items (1) and (2) if all the agents are not aware of the flocking rendezvous trajectory, the flocking algorithm works only for a very restricted set of initial states and a small number of agents. In [21], a further analysis of the flocking algorithm proposed in [13] was carried out for the case where only several agents in a group are aware of the flocking rendezvous trajectory. It was shown in [21] that the agents, which are not aware of the flocking rendezvous trajectory and stay disconnected from the other agents in the group sufficiently long, would stay disconnected from the agents, which are aware of the flocking rendezvous trajectory, that is, the flocking algorithm leads to fragmentation. This represents a real situation. For example, the chance for a bird that has gone away from its flock a sufficiently long time coming back to the flock is very low. Hence, this paper imposes item (4) in Assumption 1 to design a flocking algorithm for elliptical agents. It is possible to use the analysis technique in [21] to analyze the flocking algorithm to be proposed later in this paper for ellipsoidal agents when only several agents are aware of the flocking rendezvous trajectory. This is because the flocking algorithm to be designed in this paper is also based on an attractive/repulsive potential field. However, since this paper focuses on solving difficulties due to an ellipsoidal shape of the agents for collision avoidance in a flocking algorithm, all the agents are assumed to be aware of the flocking rendezvous trajectory.Flock Control Objective. Under Assumption 1, for each agent i design the smooth control input vectors ui and ωi to achieve a desired flocking including: (1) no collisions between any agents; (2) asymptotic convergence of each agent's generalized velocity to a desired velocity; (3) boundedness of the flock size FL(t)=∑j=i+1N‍∑j=1i-1‍Δij(t) by a constant when the time t tends to infinity.


## 3.1. Agent Dynamics

As mentioned before, this paper mainly focuses on difficulties caused by the ellipsoidal shape of the agents in designing flocking algorithms, we therefore assume that each ellipsoidal agenti has the following dynamics:
(13)q˙i=ui,η˙i=ωi,i∈ℕ,
where ℕ is the set of all agents in the group, ui=[uxiuyiuzi]T and ωi=[ωϕiωθiωψi]T are the control input vectors of the agent i. It is recalled that qi=[xiyizi]T with (xi,yi,zi) being the position coordinates of the center of the agent i and ηi=[ϕiθiψi]T with (ϕi,θi,ψi) being the orientation angles of the agent i, see Figure 2. For agents with higher order dynamics, the backstepping technique [37] can be used because we will design the control input vectors ui and ωi such that they are smooth.


## 3.2. Flock Control Objective

In order to design a flocking algorithm for a group of ellipsoidal agents, there is a need to specify a common goal for the group, some communication between the agents, and initial position and orientation of the agents. We therefore impose the following assumption on the flocking rendezvous trajectory, communication, and initial conditions between the agents.Assumption 1.
(1) The agentsi and j have spherical communication spaces, which are centered at the points Oi and Oj, and have radii of Ri and Rj. The radii Ri and Rj are sufficiently large in the sense that
(14)ΔijRm>0,
where ΔijRm is the greatest lower bound of Δij when the agents i and j are within their communication ranges, that is,
(15)ΔijRm=inf(Δij)s.t.{ηij∈ℝ3,∥qij∥=min(Ri,Rj),
for all (i,j)∈ℕ and j≠i.
(2) The agentsi and j can exchange their trajectories, (qi,ηi) and (qj,ηj) if these agents are in their communication spaces.
(3) At the initial timet0≥0, all the agents in the group are sufficiently far away from each other in the sense that the following condition holds
(16)Δij(t0)>0,
where Δij(t0) is given in (1) evaluated at (qi=qi(t0),ηi=ηi(t0)) and (qj=qj(t0),ηj=ηj(t0)), and we have abused the notation of Δij(qij(t0),ηi(t0),ηj(t0)) as Δij(t0) for simplicity of presentation.
(4) The flocking rendezvous position and orientation trajectory,qod=[xod,yod,zod]T and ηod=[ϕod,θod,ψod]T, for the flock to follow has bounded derivatives q˙od and η˙od, and is available for all the agents.Remark 6.
(1) In item (1), the condition (14) holds if there exists a positive constant ϱi such that Ri≥ϱi+sup(ai+aj,ai+bj,ai+cj,bi+aj,bi+bj,bi+cj,ci+aj,ci+bj,ci+cj), for all (i,j)∈ℕ and j≠i.
(2) Items (1) and (2) in Assumption1 specify the way each agent communicates with other agents in the group within its communication range. In other words, the agents in the group are connected if they are inside their communication ranges.
(3) Item (3) in Assumption1 implies from Lemma 1 that at the initial time t0 there is no collision between any agents in the group.
(4) Items (1), (2), and (3) in Assumption1 do not guarantee overall connectivity among all the agents in the group in general. Under item (4) in Assumption 1, we do not require overall connectivity among all the agents to design a flocking algorithm.
(5) Item (4) in Assumption1 means that all the agents are aware of the flocking rendezvous trajectory. This item together with items (1) and (2) in Assumption 1 were also required in [13] to design a nonfragmentation flocking algorithm for point agents based on an attractive/repulsive potential field. In [13] Olfati-Saber also showed that under items (1) and (2) if all the agents are not aware of the flocking rendezvous trajectory, the flocking algorithm works only for a very restricted set of initial states and a small number of agents. In [21], a further analysis of the flocking algorithm proposed in [13] was carried out for the case where only several agents in a group are aware of the flocking rendezvous trajectory. It was shown in [21] that the agents, which are not aware of the flocking rendezvous trajectory and stay disconnected from the other agents in the group sufficiently long, would stay disconnected from the agents, which are aware of the flocking rendezvous trajectory, that is, the flocking algorithm leads to fragmentation. This represents a real situation. For example, the chance for a bird that has gone away from its flock a sufficiently long time coming back to the flock is very low. Hence, this paper imposes item (4) in Assumption 1 to design a flocking algorithm for elliptical agents. It is possible to use the analysis technique in [21] to analyze the flocking algorithm to be proposed later in this paper for ellipsoidal agents when only several agents are aware of the flocking rendezvous trajectory. This is because the flocking algorithm to be designed in this paper is also based on an attractive/repulsive potential field. However, since this paper focuses on solving difficulties due to an ellipsoidal shape of the agents for collision avoidance in a flocking algorithm, all the agents are assumed to be aware of the flocking rendezvous trajectory.Flock Control Objective. Under Assumption 1, for each agent i design the smooth control input vectors ui and ωi to achieve a desired flocking including: (1) no collisions between any agents; (2) asymptotic convergence of each agent's generalized velocity to a desired velocity; (3) boundedness of the flock size FL(t)=∑j=i+1N‍∑j=1i-1‍Δij(t) by a constant when the time t tends to infinity.


## 4. Flock Control Design

### 4.1. Potential Function

#### 4.1.1. Pairwise Potential Function

This section defines and constructs pairwise potential functions that will be used in a Lyapunov function for the flock control design.Definition 7.
Letφij be a scalar function of the transformed distance Δij given in (1) between the ellipsoidal agents i and j. The function φij is said to be a pairwise potential function if it has the following properties:
(17)(1)φij=kij,φij′=0,φij′′=0,∀Δij∈[ΔijRM,∞),(2)φij>0,∀Δij∈(0,ΔijRM),(3)limΔij→0φij=∞,limΔij→0φij′=-∞,(4)φijissmooth,∀Δij∈(0,∞),(5)φijhasauniqueminimumvalueatΔij=Δijd,∀Δij∈(0,ΔijRM),
where φij′=∂φij/∂Δij, φij′′=∂2φij/∂Δij2, and kij is a positive constant. The positive constant Δijd is referred to as the desired transformed distance between the agents i and j, and satisfies the condition
(18)0<Δijd<ΔijRm,
with ΔijRm defined in (15). The constant ΔijRM is the least upper bound of the transformed distance Δij when the agents i and j are within their communication ranges, that is,
(19)ΔijRM=sup(Δij)s.t.{ηij∈ℝ3,∥qij∥=min(Ri,Rj).Remark 8.
Property (1) implies that the functionφij is constant when the agents i and j are outside of their communication ranges. Property (2) implies that the function φij is positive definite when the agents i and j are inside of their communication ranges. By Lemma 1, Property (3) means that the function φij is equal to infinity when a collision between the agents i and j occurs. Property (4) allows us to use control design and stability analysis methods found in [36] for continuous systems instead of techniques for switched and discontinuous systems found in [38] to handle the collision avoidance problem under the agents' limited communication ranges. Property (5) makes it effective to use a gradient-based method for the flock control design.Lemma 9.
Let the scalar functionφij be defined as(20)φij=(Δij-Δijd)21-h(Δij,aij,bij,cij)Δij2+kijh(Δij,aij,bij,cij),
where the positive constants aij and bij satisfy the condition
(21)aij=Δijd,aij<bij<ΔijRM,
and cij is a positive constant. The positive constant kij is chosen such that
(22)φij′>0,∀Δij∈(Δijd,ΔijRM),
where
(23)φij′=2(Δij-Δijd)1-h(•)Δij2-(Δij-Δijd)2h′(•)+2(1-h(•))Δij3+kijh′(•).
The function h(•) with • stood for (Δij,aij,bij,cij) is a smooth step function defined in Definition 3.
Then the functionφij is a pairwise potential function.Proof (see AppendixB).
A pairwise potential functionφij with Δijd=5, ΔijRM=10, aij=Δijd, bij=0.9ΔijRM, and cij=1 is plotted in Figure 4.Figure 4
A pairwise potential function.


#### 4.1.2. Potential Function

Having constructed the pairwise potential functionφij for the agents i and j, the potential function φ for all the agents in the group is the sum of all the pairwise potential functions, that is,
(24)φ=∑i=1N-1‍∑j=i+1N‍φij,
where φij is given in (20).


### 4.2. Derivative of Potential Function

To prepare for the flock control design later, we calculating the derivative ofφ by differentiating both sides of (24) to obtain
(25)φ˙=∑i=1N-1‍∑j=i+1N‍φij'Δ˙ij.
It is noted that Δij is a smooth function of qij, ηi, ηj, and ηij, see Remark 2. However, there is a difficulty in determining an explicit dependence of Δij on qij, ηi, ηj, and ηij via the matrix Qij, see (1) and (2), because κij cannot be solved explicitly. To avoid this difficulty, we treat Δij as a smooth function of κij, q-ij, q-ji, and ηij.We first calculate the first time derivative ofκij. From (7), we have
(26)κ˙ij=-(∂Fij∂κij)-1((∂Fij∂q-ij)Tq-˙ij+(∂Fij∂ηij)Tη˙ij).
It is noted that ∂Fij/∂κij is always nonzero, see A.10. Hence, the first time derivative of Δij is
(27)Δ˙ij=Gijq-˙ij+Gjiq-˙ji+Hijη˙ij+Hjiη˙ji,
where
(28)Gij=[∂Δij∂q-ij-∂Δij∂κij(∂Fij∂κij)-1∂Fij∂q-ij]T,Gji=[∂Δij∂q-ji-∂Δij∂κji(∂Fji∂κji)-1∂Fji∂q-ji]T,Hij=[∂Δij∂ηij-∂Δij∂κij(∂Fij∂κij)-1∂Fij∂ηij]T,Hji=[∂Δij∂ηji-∂Δij∂κji(∂Fji∂κji)-1∂Fji∂ηji]T.
From definition of q-ij in (2), we have
(29)q-˙ij=Piq˙ij+P˙iqij,=Pi(q˙ij+Siqij+Sj(qj-qod)-Sj(qj-qod)),
where Si=Pi-1P˙i and Sj=Pj-1P˙j, and we have added and subtracted Sj(qj-qod) to the first line of (29) to result in the second line. Now substituting qij=[qi-qod]-[qj-qod] into (29) gives
(30)q-˙ij=Pi([q˙i-q˙od+S-iη˙i]-[q˙j-q˙od+S-jη˙j])-Pi(S-ijη˙i-S-jη˙j),
where the matrices S-i, S-j, and S-ij are defined by
(31)Si(qi-qod)=S-iη˙i,Sj(qj-qod)=S-jη˙j,Si(qj-qod)=S-ijη˙i.
Similarly, we have
(32)q-˙ji=Pj([q˙j-q˙od+S-jη˙j]-[q˙i-q˙od+S-iη˙i])-Pj(S-jiη˙j-S-iη˙i).Substituting (30) and (32) into (27) results in the following:(33)Δ˙ij=Γij(q˙i-q˙od+S-iη˙i)+Λijη˙i+Γji(q˙j-q˙od+S-jη˙j)+Λjiη˙j,
where
(34)Γij=GijPi-GjiPj,Γji=GjiPj-GijPi,Λij=-GijPiS-ij+GjiPjS-i+Hij-Hji,Λji=-GjiPjS-ji+GijPiS-j+Hji-Hij.Substituting (33) into (25) gives
(35)φ˙=∑i=1N‍[(∑j≠i‍φij'Γij)(q˙i-q˙od+S-iη˙i)+(∑j≠i‍φij'Λij)η˙i].Remark 10.
The transformed distanceΔij depends not only on the relative distance vector qij and the relative orientation vector ηij but also on the individual orientation vectors ηi and ηj of the ellipsoidal agents i and j. This dependence creates a difficulty in designing flocking control algorithms using a gradient-based approach since it is hard to write the derivative of the potential function φ as a summation of the product of each individual agent's potential gradient and its state derivative. To overcome this difficulty, we have carefully calculated the derivative of the transformed distance by adding and subtracting the term Sj(qj-qod) to the first line of (29). As a result, the expression of φ˙ has been obtained in a feasible form, see (35), for the flocking control design later.
The expression ofφ˙ in (35) deserves some discussion. If we define φ=∑i=1N‍φi, where φi is the potential function for each agent i. We then have φ˙i=(∑j≠i‍φij′Γij)(q˙i-q˙od+S-iη˙i)+(∑j≠i‍φij′Λij)η˙i, where the term (∑j≠i‍φij′Γij) can be regarded as the gradient of φi with respect to the relative distance, which is rotated by the orientation vector ηi, from the agent i to the rendezvous trajectory qod. The term (∑j≠i‍φij′Λij) can be considered as the gradient of φi with respect to ηi.


### 4.3. Lyapunov Function

Since the derivative of the potential functionφ is the summation of the term (∑j≠i‍φij′Γij)(q˙i-q˙od+S-iη˙i) instead of (∑j≠i‍φij′Γij)(q˙i-q˙od), and the term (∑j≠i‍φij'Λij)η˙i instead of (∑j≠i‍φij′Λij)(η˙i-η˙od), it is not possible to use a Lyapunov function candidate as a summation of the potential function φ and the square of all errors qi-qod and ηi-ηod for the flock control design.To overcome the aforementioned impossibilities, we will construct a Lyapunov function candidate as a sum of the potential functionφ in (24) and the square of errors Pi(qi-qod) and ηi-ηid. The vector ηid is considered as the virtual rendezvous orientation vector to be designed such that limt→∞ηid(t)=ηod(t). As such, the Lyapunov function candidate for the flock control design in the next section is constructed as follows:
(36)V=φ+12∑i=1N‍[c1∥Pi(qi-qod)∥2+c2∥ηi-ηid∥2],
where c1 and c2 are positive constants. Differentiating both sides of (36) along the solutions of (35) and recalling from (13) that q˙i=ui and η˙i=ωi results in the folowing:
(37)V˙=∑i=1N({∑j≠i‍}[ΩiT(ui-q˙od+S-iωi)+ΞiT(ωi-η˙id)]+(∑j≠i‍φij'Λij)η˙id),
where we added and subtracted ∑i=1N‍(∑j≠i‍φij′Λij)η˙id to the right hand side of the equation (35) before substituting this equation into the derivative of V. In (37), we have defined
(38)Ωi=[∑j≠i‍φij'Γij+c1(Pi(qi-qod))TPi]T,Ξi=[∑j≠i‍φij'Λij+c2(ηi-ηid)T]T.


### 4.4. Control Law

We first deal with the terms inside the square bracket in the right hand side of (37). As such, to avoid a large control effort when an agent in the group is close to the agent i due to Property (3) of the function φij, see (17), for collision avoidance, we design a control law for ui and ωi as follows:
(39)ui=-k1W(Ωi)+q˙od-S-i(-k2W(Ξi)+η˙id),ωi=-k2W(Ξi)+η˙id,
where k1 and k2 are positive constants. The vector W(χ) denotes a vector of bounded and differentiable functions of elements of χ in the sense that W(χ)=[w(χ1)…,w(χl),…,w(χn)]T with χl the lth element of χ, that is, χ=[χ1…,χl,…,χn]T. The function w(χ) is a scalar, differentiable and bounded function, and satisfies
(40)(1)|w(χ)|≤M1,(2)w(χ)=0ifχ=0,χw(χ)>0ifχ≠0,(3)w(-χ)=-w(χ),(χ-ω)[w(χ)-w(ω)]≥0,(4)|w(χ)χ|≤M2,|∂w(χ)∂χ|≤M3,∂w(χ)∂χ|χ=0=1,
for all χ∈ℝ,ω∈ℝ, where M1,M2,M3 are positive constants. Some functions that satisfy the above properties are arctan(χ) and tanh(χ).We now deal with the term(∑j≠i‍φij'Λij)η˙id in the right hand side of (37). This term seems to be troublesome because η˙id is nonzero in general since we are considering a time-varying rendezvous trajectory. To get around this problem, we will design an update law η˙id such that
(41)(∑j≠i‍φij'Λij)η˙id=0,
holds for all time. Moreover, it is desired to have the virtual rendezvous orientation vector ηid asymptotically approached the desired rendezvous orientation vector ηod. As such, we utilize the smooth step function to design an update law η˙id as follows:
(42)η˙id=(∏j≠i‍h(Δij,aijd,bijd,cijd))(-kd(ηid-ηod)+η˙od),
where kd is a positive constant, and ηid(t0)=ηod(t0). The function h(Δij,aijd,bijd,cijd) is a smooth step function with the constants aijd, bijd, and cijd chosen as
(43)aijd=bij,aijd<bijd≤ΔijRM,cijd>0,
where bij is chosen as in (21), and ΔijRM is given in (19). Using properties of the smooth step function, the choice of the constants aij, bij, aijd, and bijd in (21) and (43) results in h′(Δij,aij,bij,cij)h(Δij,aijd,bijd,cijd)=0 and (1-h(Δij,aij,bij,cij))h(Δij,aijd,bijd,cijd)=0. These equalities imply that (41) holds as long as Δij>0, which is to be guaranteed by our control design. Moreover, the choice of the constants aijd and bijd in (43) ensures that the function h(Δij,aijd,bijd,cijd) approaches 1 whenever Δij approaches a value larger than bijd. The inequality Δij>0 and the limit limt→∞(∑j≠i‍φij′(t)Λij(t))=0 will be guaranteed by our designed control input vectors ui and ωi in (39). This will be shown in the proof of the main result.Remark 11.
(1) The control vectorsui and ωi in (39) of the agent i are smooth and depend on only its own state and the rendezvous trajectory, and the states of other agents j in the communication range of the agent i due to Property (1) of the pairwise potential function φij in (17).
(2) The update lawη˙id in (42) ensures that when the collision avoidance is active, the virtual rendezvous orientation vector ηid is not updated. This implies that the control vectors ui and ωi give priority to the collision avoidance mission or the rendezvous orientation tracking mission whenever which mission is more important.
Substituting the control vectorsui and ωi in (39) and the update law η˙id in (42) into (37) results in
(44)V˙=-∑i=1N‍ϑi,
where
(45)ϑi=k1ΩiTW(Ωi)+k2ΞiTW(Ξi).
On the other hand, substituting the control vectors ui and ωi in (39) and the update law η˙id in (42) into (13) results in the closed-loop system:
(46)q˙i=-k1W(Ωi)+q˙od-S-i(-k2W(Ξi)+η˙id),η˙i=-k2W(Ξi)+η˙id,
for all i∈ℕ. We now present the main result of our paper in the following theorem.Theorem 12.
Under Assumption1, the smooth control vectors ui and ωi in (39) and the update law η˙id in (42) for the agent i solve the flocking control objective. In particular, the following results hold
(1)  There are no collisions between any agents and the closed-loop system (46) is forward complete;
(2)  The relative distance between each agenti and the flocking rendezvous trajectory qod is bounded, that is, ∥qi(t)-qod(t)∥≤A0 for all t≥t0≥0 with A0 a constant depending on the initial conditions;
(3)  The generalized velocity of each agenti asymptotically tends to the generalized flocking rendezvous velocity, that is,
(47)limt→∞(q˙i-q˙od+S-iη˙id)=0,
where η˙id is given in (42).
(4)  The flock sizeFL(t)=∑j=i+1N‍∑j=1i-1‍Δij(t) is bounded by a positive constant as time tends to infinity, that is,
(48)limt→∞FL(t)=FLc,
with FLc≤c0 where c0 is a positive constant.Proof.
See AppendixC.


## 4.1. Potential Function

### 4.1.1. Pairwise Potential Function

This section defines and constructs pairwise potential functions that will be used in a Lyapunov function for the flock control design.Definition 7.
Letφij be a scalar function of the transformed distance Δij given in (1) between the ellipsoidal agents i and j. The function φij is said to be a pairwise potential function if it has the following properties:
(17)(1)φij=kij,φij′=0,φij′′=0,∀Δij∈[ΔijRM,∞),(2)φij>0,∀Δij∈(0,ΔijRM),(3)limΔij→0φij=∞,limΔij→0φij′=-∞,(4)φijissmooth,∀Δij∈(0,∞),(5)φijhasauniqueminimumvalueatΔij=Δijd,∀Δij∈(0,ΔijRM),
where φij′=∂φij/∂Δij, φij′′=∂2φij/∂Δij2, and kij is a positive constant. The positive constant Δijd is referred to as the desired transformed distance between the agents i and j, and satisfies the condition
(18)0<Δijd<ΔijRm,
with ΔijRm defined in (15). The constant ΔijRM is the least upper bound of the transformed distance Δij when the agents i and j are within their communication ranges, that is,
(19)ΔijRM=sup(Δij)s.t.{ηij∈ℝ3,∥qij∥=min(Ri,Rj).Remark 8.
Property (1) implies that the functionφij is constant when the agents i and j are outside of their communication ranges. Property (2) implies that the function φij is positive definite when the agents i and j are inside of their communication ranges. By Lemma 1, Property (3) means that the function φij is equal to infinity when a collision between the agents i and j occurs. Property (4) allows us to use control design and stability analysis methods found in [36] for continuous systems instead of techniques for switched and discontinuous systems found in [38] to handle the collision avoidance problem under the agents' limited communication ranges. Property (5) makes it effective to use a gradient-based method for the flock control design.Lemma 9.
Let the scalar functionφij be defined as(20)φij=(Δij-Δijd)21-h(Δij,aij,bij,cij)Δij2+kijh(Δij,aij,bij,cij),
where the positive constants aij and bij satisfy the condition
(21)aij=Δijd,aij<bij<ΔijRM,
and cij is a positive constant. The positive constant kij is chosen such that
(22)φij′>0,∀Δij∈(Δijd,ΔijRM),
where
(23)φij′=2(Δij-Δijd)1-h(•)Δij2-(Δij-Δijd)2h′(•)+2(1-h(•))Δij3+kijh′(•).
The function h(•) with • stood for (Δij,aij,bij,cij) is a smooth step function defined in Definition 3.
Then the functionφij is a pairwise potential function.Proof (see AppendixB).
A pairwise potential functionφij with Δijd=5, ΔijRM=10, aij=Δijd, bij=0.9ΔijRM, and cij=1 is plotted in Figure 4.Figure 4
A pairwise potential function.


### 4.1.2. Potential Function

Having constructed the pairwise potential functionφij for the agents i and j, the potential function φ for all the agents in the group is the sum of all the pairwise potential functions, that is,
(24)φ=∑i=1N-1‍∑j=i+1N‍φij,
where φij is given in (20).


## 4.1.1. Pairwise Potential Function

This section defines and constructs pairwise potential functions that will be used in a Lyapunov function for the flock control design.Definition 7.
Letφij be a scalar function of the transformed distance Δij given in (1) between the ellipsoidal agents i and j. The function φij is said to be a pairwise potential function if it has the following properties:
(17)(1)φij=kij,φij′=0,φij′′=0,∀Δij∈[ΔijRM,∞),(2)φij>0,∀Δij∈(0,ΔijRM),(3)limΔij→0φij=∞,limΔij→0φij′=-∞,(4)φijissmooth,∀Δij∈(0,∞),(5)φijhasauniqueminimumvalueatΔij=Δijd,∀Δij∈(0,ΔijRM),
where φij′=∂φij/∂Δij, φij′′=∂2φij/∂Δij2, and kij is a positive constant. The positive constant Δijd is referred to as the desired transformed distance between the agents i and j, and satisfies the condition
(18)0<Δijd<ΔijRm,
with ΔijRm defined in (15). The constant ΔijRM is the least upper bound of the transformed distance Δij when the agents i and j are within their communication ranges, that is,
(19)ΔijRM=sup(Δij)s.t.{ηij∈ℝ3,∥qij∥=min(Ri,Rj).Remark 8.
Property (1) implies that the functionφij is constant when the agents i and j are outside of their communication ranges. Property (2) implies that the function φij is positive definite when the agents i and j are inside of their communication ranges. By Lemma 1, Property (3) means that the function φij is equal to infinity when a collision between the agents i and j occurs. Property (4) allows us to use control design and stability analysis methods found in [36] for continuous systems instead of techniques for switched and discontinuous systems found in [38] to handle the collision avoidance problem under the agents' limited communication ranges. Property (5) makes it effective to use a gradient-based method for the flock control design.Lemma 9.
Let the scalar functionφij be defined as(20)φij=(Δij-Δijd)21-h(Δij,aij,bij,cij)Δij2+kijh(Δij,aij,bij,cij),
where the positive constants aij and bij satisfy the condition
(21)aij=Δijd,aij<bij<ΔijRM,
and cij is a positive constant. The positive constant kij is chosen such that
(22)φij′>0,∀Δij∈(Δijd,ΔijRM),
where
(23)φij′=2(Δij-Δijd)1-h(•)Δij2-(Δij-Δijd)2h′(•)+2(1-h(•))Δij3+kijh′(•).
The function h(•) with • stood for (Δij,aij,bij,cij) is a smooth step function defined in Definition 3.
Then the functionφij is a pairwise potential function.Proof (see AppendixB).
A pairwise potential functionφij with Δijd=5, ΔijRM=10, aij=Δijd, bij=0.9ΔijRM, and cij=1 is plotted in Figure 4.Figure 4
A pairwise potential function.


## 4.1.2. Potential Function

Having constructed the pairwise potential functionφij for the agents i and j, the potential function φ for all the agents in the group is the sum of all the pairwise potential functions, that is,
(24)φ=∑i=1N-1‍∑j=i+1N‍φij,
where φij is given in (20).


## 4.2. Derivative of Potential Function

To prepare for the flock control design later, we calculating the derivative ofφ by differentiating both sides of (24) to obtain
(25)φ˙=∑i=1N-1‍∑j=i+1N‍φij'Δ˙ij.
It is noted that Δij is a smooth function of qij, ηi, ηj, and ηij, see Remark 2. However, there is a difficulty in determining an explicit dependence of Δij on qij, ηi, ηj, and ηij via the matrix Qij, see (1) and (2), because κij cannot be solved explicitly. To avoid this difficulty, we treat Δij as a smooth function of κij, q-ij, q-ji, and ηij.We first calculate the first time derivative ofκij. From (7), we have
(26)κ˙ij=-(∂Fij∂κij)-1((∂Fij∂q-ij)Tq-˙ij+(∂Fij∂ηij)Tη˙ij).
It is noted that ∂Fij/∂κij is always nonzero, see A.10. Hence, the first time derivative of Δij is
(27)Δ˙ij=Gijq-˙ij+Gjiq-˙ji+Hijη˙ij+Hjiη˙ji,
where
(28)Gij=[∂Δij∂q-ij-∂Δij∂κij(∂Fij∂κij)-1∂Fij∂q-ij]T,Gji=[∂Δij∂q-ji-∂Δij∂κji(∂Fji∂κji)-1∂Fji∂q-ji]T,Hij=[∂Δij∂ηij-∂Δij∂κij(∂Fij∂κij)-1∂Fij∂ηij]T,Hji=[∂Δij∂ηji-∂Δij∂κji(∂Fji∂κji)-1∂Fji∂ηji]T.
From definition of q-ij in (2), we have
(29)q-˙ij=Piq˙ij+P˙iqij,=Pi(q˙ij+Siqij+Sj(qj-qod)-Sj(qj-qod)),
where Si=Pi-1P˙i and Sj=Pj-1P˙j, and we have added and subtracted Sj(qj-qod) to the first line of (29) to result in the second line. Now substituting qij=[qi-qod]-[qj-qod] into (29) gives
(30)q-˙ij=Pi([q˙i-q˙od+S-iη˙i]-[q˙j-q˙od+S-jη˙j])-Pi(S-ijη˙i-S-jη˙j),
where the matrices S-i, S-j, and S-ij are defined by
(31)Si(qi-qod)=S-iη˙i,Sj(qj-qod)=S-jη˙j,Si(qj-qod)=S-ijη˙i.
Similarly, we have
(32)q-˙ji=Pj([q˙j-q˙od+S-jη˙j]-[q˙i-q˙od+S-iη˙i])-Pj(S-jiη˙j-S-iη˙i).Substituting (30) and (32) into (27) results in the following:(33)Δ˙ij=Γij(q˙i-q˙od+S-iη˙i)+Λijη˙i+Γji(q˙j-q˙od+S-jη˙j)+Λjiη˙j,
where
(34)Γij=GijPi-GjiPj,Γji=GjiPj-GijPi,Λij=-GijPiS-ij+GjiPjS-i+Hij-Hji,Λji=-GjiPjS-ji+GijPiS-j+Hji-Hij.Substituting (33) into (25) gives
(35)φ˙=∑i=1N‍[(∑j≠i‍φij'Γij)(q˙i-q˙od+S-iη˙i)+(∑j≠i‍φij'Λij)η˙i].Remark 10.
The transformed distanceΔij depends not only on the relative distance vector qij and the relative orientation vector ηij but also on the individual orientation vectors ηi and ηj of the ellipsoidal agents i and j. This dependence creates a difficulty in designing flocking control algorithms using a gradient-based approach since it is hard to write the derivative of the potential function φ as a summation of the product of each individual agent's potential gradient and its state derivative. To overcome this difficulty, we have carefully calculated the derivative of the transformed distance by adding and subtracting the term Sj(qj-qod) to the first line of (29). As a result, the expression of φ˙ has been obtained in a feasible form, see (35), for the flocking control design later.
The expression ofφ˙ in (35) deserves some discussion. If we define φ=∑i=1N‍φi, where φi is the potential function for each agent i. We then have φ˙i=(∑j≠i‍φij′Γij)(q˙i-q˙od+S-iη˙i)+(∑j≠i‍φij′Λij)η˙i, where the term (∑j≠i‍φij′Γij) can be regarded as the gradient of φi with respect to the relative distance, which is rotated by the orientation vector ηi, from the agent i to the rendezvous trajectory qod. The term (∑j≠i‍φij′Λij) can be considered as the gradient of φi with respect to ηi.


## 4.3. Lyapunov Function

Since the derivative of the potential functionφ is the summation of the term (∑j≠i‍φij′Γij)(q˙i-q˙od+S-iη˙i) instead of (∑j≠i‍φij′Γij)(q˙i-q˙od), and the term (∑j≠i‍φij'Λij)η˙i instead of (∑j≠i‍φij′Λij)(η˙i-η˙od), it is not possible to use a Lyapunov function candidate as a summation of the potential function φ and the square of all errors qi-qod and ηi-ηod for the flock control design.To overcome the aforementioned impossibilities, we will construct a Lyapunov function candidate as a sum of the potential functionφ in (24) and the square of errors Pi(qi-qod) and ηi-ηid. The vector ηid is considered as the virtual rendezvous orientation vector to be designed such that limt→∞ηid(t)=ηod(t). As such, the Lyapunov function candidate for the flock control design in the next section is constructed as follows:
(36)V=φ+12∑i=1N‍[c1∥Pi(qi-qod)∥2+c2∥ηi-ηid∥2],
where c1 and c2 are positive constants. Differentiating both sides of (36) along the solutions of (35) and recalling from (13) that q˙i=ui and η˙i=ωi results in the folowing:
(37)V˙=∑i=1N({∑j≠i‍}[ΩiT(ui-q˙od+S-iωi)+ΞiT(ωi-η˙id)]+(∑j≠i‍φij'Λij)η˙id),
where we added and subtracted ∑i=1N‍(∑j≠i‍φij′Λij)η˙id to the right hand side of the equation (35) before substituting this equation into the derivative of V. In (37), we have defined
(38)Ωi=[∑j≠i‍φij'Γij+c1(Pi(qi-qod))TPi]T,Ξi=[∑j≠i‍φij'Λij+c2(ηi-ηid)T]T.


## 4.4. Control Law

We first deal with the terms inside the square bracket in the right hand side of (37). As such, to avoid a large control effort when an agent in the group is close to the agent i due to Property (3) of the function φij, see (17), for collision avoidance, we design a control law for ui and ωi as follows:
(39)ui=-k1W(Ωi)+q˙od-S-i(-k2W(Ξi)+η˙id),ωi=-k2W(Ξi)+η˙id,
where k1 and k2 are positive constants. The vector W(χ) denotes a vector of bounded and differentiable functions of elements of χ in the sense that W(χ)=[w(χ1)…,w(χl),…,w(χn)]T with χl the lth element of χ, that is, χ=[χ1…,χl,…,χn]T. The function w(χ) is a scalar, differentiable and bounded function, and satisfies
(40)(1)|w(χ)|≤M1,(2)w(χ)=0ifχ=0,χw(χ)>0ifχ≠0,(3)w(-χ)=-w(χ),(χ-ω)[w(χ)-w(ω)]≥0,(4)|w(χ)χ|≤M2,|∂w(χ)∂χ|≤M3,∂w(χ)∂χ|χ=0=1,
for all χ∈ℝ,ω∈ℝ, where M1,M2,M3 are positive constants. Some functions that satisfy the above properties are arctan(χ) and tanh(χ).We now deal with the term(∑j≠i‍φij'Λij)η˙id in the right hand side of (37). This term seems to be troublesome because η˙id is nonzero in general since we are considering a time-varying rendezvous trajectory. To get around this problem, we will design an update law η˙id such that
(41)(∑j≠i‍φij'Λij)η˙id=0,
holds for all time. Moreover, it is desired to have the virtual rendezvous orientation vector ηid asymptotically approached the desired rendezvous orientation vector ηod. As such, we utilize the smooth step function to design an update law η˙id as follows:
(42)η˙id=(∏j≠i‍h(Δij,aijd,bijd,cijd))(-kd(ηid-ηod)+η˙od),
where kd is a positive constant, and ηid(t0)=ηod(t0). The function h(Δij,aijd,bijd,cijd) is a smooth step function with the constants aijd, bijd, and cijd chosen as
(43)aijd=bij,aijd<bijd≤ΔijRM,cijd>0,
where bij is chosen as in (21), and ΔijRM is given in (19). Using properties of the smooth step function, the choice of the constants aij, bij, aijd, and bijd in (21) and (43) results in h′(Δij,aij,bij,cij)h(Δij,aijd,bijd,cijd)=0 and (1-h(Δij,aij,bij,cij))h(Δij,aijd,bijd,cijd)=0. These equalities imply that (41) holds as long as Δij>0, which is to be guaranteed by our control design. Moreover, the choice of the constants aijd and bijd in (43) ensures that the function h(Δij,aijd,bijd,cijd) approaches 1 whenever Δij approaches a value larger than bijd. The inequality Δij>0 and the limit limt→∞(∑j≠i‍φij′(t)Λij(t))=0 will be guaranteed by our designed control input vectors ui and ωi in (39). This will be shown in the proof of the main result.Remark 11.
(1) The control vectorsui and ωi in (39) of the agent i are smooth and depend on only its own state and the rendezvous trajectory, and the states of other agents j in the communication range of the agent i due to Property (1) of the pairwise potential function φij in (17).
(2) The update lawη˙id in (42) ensures that when the collision avoidance is active, the virtual rendezvous orientation vector ηid is not updated. This implies that the control vectors ui and ωi give priority to the collision avoidance mission or the rendezvous orientation tracking mission whenever which mission is more important.
Substituting the control vectorsui and ωi in (39) and the update law η˙id in (42) into (37) results in
(44)V˙=-∑i=1N‍ϑi,
where
(45)ϑi=k1ΩiTW(Ωi)+k2ΞiTW(Ξi).
On the other hand, substituting the control vectors ui and ωi in (39) and the update law η˙id in (42) into (13) results in the closed-loop system:
(46)q˙i=-k1W(Ωi)+q˙od-S-i(-k2W(Ξi)+η˙id),η˙i=-k2W(Ξi)+η˙id,
for all i∈ℕ. We now present the main result of our paper in the following theorem.Theorem 12.
Under Assumption1, the smooth control vectors ui and ωi in (39) and the update law η˙id in (42) for the agent i solve the flocking control objective. In particular, the following results hold
(1)  There are no collisions between any agents and the closed-loop system (46) is forward complete;
(2)  The relative distance between each agenti and the flocking rendezvous trajectory qod is bounded, that is, ∥qi(t)-qod(t)∥≤A0 for all t≥t0≥0 with A0 a constant depending on the initial conditions;
(3)  The generalized velocity of each agenti asymptotically tends to the generalized flocking rendezvous velocity, that is,
(47)limt→∞(q˙i-q˙od+S-iη˙id)=0,
where η˙id is given in (42).
(4)  The flock sizeFL(t)=∑j=i+1N‍∑j=1i-1‍Δij(t) is bounded by a positive constant as time tends to infinity, that is,
(48)limt→∞FL(t)=FLc,
with FLc≤c0 where c0 is a positive constant.Proof.
See AppendixC.


## 5. Simulation Results

In this section, we provide a numerical simulation to illustrate the effectiveness of the proposed flocking control design stated in Theorem12. We use N=6 ellipsoidal agents with the geometric parameters as ai=3 and bi=ci=1 for all i=1,…,N. The initial position and orientation of these agents are chosen as follows: qi(0)=15[cos(2π(i-1)/N)sin(2π(i-1)/N)0]T and ηi(0)=[000]T. All the agents have the same communication range of Ri=25. The control design parameters are chosen as follows: kij=10, Δijd=5, aij=Δijd, bij=1.5aij, c1=1, c2=1, k1=20, k2=20, aijd=bij, bijd=1.2aijd, kd=1. The function w(·) is chosen as arctan(·). The flocking rendezvous trajectory is chosen as q˙od=[111]T with qod(0)=[0,0,0]T. This choice implies that the flocking rendezvous trajectory is a angled straight line. A calculation shows that the above initial conditions and the above choice of control design parameters satisfy all the conditions (14), (16), (18), (21), (22).Simulation results are plotted in Figures5 and 6. In Figure 5, several snapshots of the position and orientation of all agents are plotted. The representative Δij*=(Πj∈ℕj≠iΔij)1/5 is plotted in the first subfigure of Figure 6. The control inputs u=[u1,…,ui,…,uN]T and ω=[ω1,…,ωi,…,ωN]T are plotted in the second and third subfigures of Figure 6. It is clearly seen from Figures 5 and 6 that there is no collision between any agents as indicated by Δij*>0 for all i∈ℕ. Moreover, all the agents manage to track the generalized flocking rendezvous trajectory qod. The mismatched velocity can be seen from the second and third subfigures of Figure 6.Figure 5
Snapshots of the agents' position and orientation.RepresentativeΔij* and control inputs.
(a)
(b)
(c)


## 6. Conclusions

Flocking ofN mobile agents with an ellipsoidal shape and limited communication ranges was studied. The flock control design is based on a separation condition for ellipsoidal agents, smooth step functions, and novel pairwise potential functions. The proposed flock algorithms achieved desired flocking behaviors including smooth controllers despite of agents' limited communication ranges, no collisions between any agents, asymptotic convergence of each agent's velocity to a desired velocity, and boundedness of the flock size by a constant. The keys to success of our proposed flocking algorithm include the symmetric transformed distance Δij between two ellipsoids, smooth cut-off pairwise potential function φij, and a careful derivation of the derivative of the potential function φ. An extension of the proposed flock control design and those controllers designed for single underactuated underwater vehicles in [39] to provide a flock control system for multiple underactuated underwater vehicles is under consideration.



---

*Source: 387465-2012-11-26.xml*