A Common Framework for Attitude Synchronization of Unit Vectors in

Report 0 Downloads 25 Views
A Common Framework for Attitude Synchronization of Unit Vectors in Networks with Switching Topology

arXiv:1509.08343v1 [cs.SY] 28 Sep 2015

Pedro O. Pereira, Dimitris Boskos, Dimos V. Dimarogonas Abstract— In this paper, we study attitude synchronization for elements in the unit sphere of R3 and for elements in the 3D rotation group, for a network with switching topology. The agents angular velocities are assumed to be the control inputs, and a switching control law for each agent is devised that guarantees synchronization, provided that all elements are initially contained in a given region, unknown to the network. The control law is decentralized and it does not require a common orientation frame among all agents. We refer to synchronization of unit vectors in R3 as incomplete synchronization, and of 3D rotation matrices as complete synchronization. Our main contribution lies on showing that these two problems can be analyzed under a common framework, where all elements’ dynamics are transformed into unit vectors dynamics on a sphere of appropriate dimension.

I. I NTRODUCTION Decentralized control in a multi-agent environment has been a topic of active research, with applications in large scale robotic systems. Attitude synchronization in satellite formations is one of the relevant applications [1], where the control goal is to guarantee that a network of fully actuated rigid bodies can acquire a common attitude. Coordination of underwater vehicles in ocean exploration missions [2], and of unmanned aerial vehicles in aerial exploration missions, can also be casted as an attitude synchronization problem. In the literature, attitude synchronization for elements in the special orthogonal group can be found [3]–[6], which focus on complete attitude synchronization. In this paper, we focus on both complete and incomplete attitude synchronization. We refer to incomplete attitude synchronization when the agents are unit vectors in R3 , a space also called S 2 ; and we refer to complete attitude synchronization, when the agents are 3D rotation matrices, a space also called SO(3). Incomplete synchronization has received little attention in the literature, and, nonetheless, it represents an interesting practical problem, when the goal among multiple agents is to share a common direction. In flocking, for example, moving along a common direction is a requirement. Also, in a network of satellites, whose antennas are to point in a common direction, incomplete synchronization is necessary, rather than complete synchronization. In [3]–[5], state dependent control laws for torques are presented which guarantee synchronization for elements in SO(3), while in [7] state dependent control laws for torques are presented which guarantee synchronization for elements The authors are with the School of Electrical Engineering, KTH Royal Institute of Technology, SE-100 44, Stockholm, Sweden. {ppereira, boskos, dimos}@kth.se. This work was supported by funding from the European Union’s Horizon 2020 Research and Innovation Programme under the Grant Agreement No.644128 (AEROWORKS).

in S 2 . In these papers, all agents are dynamic and their angular velocities are part of the state of the system, rather than control inputs. In this paper, however, we consider kinematic agents and we design control laws, for the agents’ angular velocities, which are not exclusively state dependent, but also time dependent, with the time dependency being a consequence of the switching network topology. We note that, regarding synchronization in SO(3), similar results can be found in [8], [9]. In [8], two control laws are proposed, one requiring a common orientation frame among agents, and one with no such requirement. Both control laws guarantee synchronization under a switching topology, given a dwell time between consecutive switches. In [10], [11], convergence to consensus in R is analyzed with the help of a common weak non-smooth Lyapunov function, i.e. a Lyapunov function which is non-increasing along solutions. In this paper, we also construct a common weak non-smooth Lyapunov function for analyzing synchronization in S n−1 , and we also show that consensus in Rn can be treated as a case of synchronization in S n . Results on extensions of LaSalle’s invariance principle can be found in [12]–[15]. [12] presents an invariance principle for switched linear systems; [13] an invariance principle for switched non-linear systems with dwell time, and whose results can be extended to weak nonsmooth common Lyapunov functions; [14] an invariance principle for switched nonlinear systems with average dwell time, but requiring smooth Lyapunov functions. The requirements in [12]–[15] are not necessarily satisfied in our framework. For that reason, we present a result which is weaker than an invariance-like result, but which will suffice for the purposes of this paper. Specifically, we propose control laws for angular velocities of unit vectors in R3 and 3D rotation matrices in that guarantee synchronization under a network with switching topology. The control laws devised for unit vectors and rotation matrices in R3 , achieve different goals, but nonetheless, they differ in two aspects worth emphasizing. First, controlling rotation matrices requires more measurements when compared with controlling unit vectors; secondly, while controlling rotation matrices requires full actuation, i.e., all body components of the angular velocity need to be controllable, controlling unit vectors does not. Our main contribution lies in analyzing both problems under a common framework, particularly by transforming both problems into synchronization problems in S m for an appropriate m. Since rotation matrices can be parametrized by unit quaternions, which are unit vectors in R4 , i.e. S 3 , these are chosen for the analysis of the proposed control law. We also show that consensus in Rn can be casted

as a synchronization problem in S n . By transforming all these problems into a common standard form, we are able to analyze all of them at once. Finally we note that, under our framework, we do not require a dwell time between consecutive switches. The remainder of this paper is structured as follows. In Section III, we present conditions on the vector fields that guarantee convergence to the consensus set. In Section IV, we describe the common framework for analysis of both synchronization in S 2 and SO(3). In Sections IV-A and IV-B, the control laws for synchronization in S 2 and SO(3) are presented, respectively, and the agents dynamics are transformed into the common framework. In Section VI, illustrative simulations are presented. II. N OTATION 0n ∈ R and 1n ∈ Rn denote the zero column vector and the column vector with all components equal to 1, respectively. In ∈ Rn×n stands for the identity matrix. When the subscript n is omitted, the dimension n is assumed to ¯ 3,3 as the be of appropriate size. We denote M3,3 and M space of symmetric matrices and antisymmetric matrices in ¯ 3,3 R3×3 , respectively. Given a ∈ R3 , the matrix S (a) ∈ M is the skew-symmetric matrix that satisfies S (a) b = a × b, ¯ 3,3 → R3 as the for any b ∈ R3 . We denote S ∨ : M ∨ ¯ 3,3 , and function that satisfies X = S (S (X)) for X ∈ M ∨ 3 n−1 x = S (S (x)) for x ∈ R . We denote S = {x ∈ Rn : xT x = 1} as the space of the unit vectors in Rn . The map Π : S n−1 7→ Rn×n , defined as Π (x) = I − xxT , yields a matrix that represents the orthogonal projection operator onto the subspace perpendicular to x. We denote Ωǫ = {x ∈ Rn : ∃z ∈ Ω : kx − zk < ǫ} as the set of all points which are ǫ-close to the set Ω ⊆ Rn , and dist(x, Ω) = inf y∈Ω kx − yk. Finally, given a set H, we use the notation |H| for the cardinality of H. n

III. P RELIMINARIES Consider the switched system ˙ x(t) = f (x(t), t) =: fσ(t) (x(t)),

(1)

where 

   x1 fi,σ(t) (x)     .. Nn x :=  ...  ∈ RNn , fσ(t) (x) :=  ∈R , . xN

fN,σ(t) (x)

and where xi ∈ Rn for every i ∈ {1, · · · , N} =: N ; i.e., N will be the number of agents in the network, n the dimension of the space which the agents belong to, and fi,σ(t) (x) is the dynamics of agent i ∈ N , which can switch in time. The function σ(t), where σ : R≥0 7→ {1, · · · , p} =: P, is a time dependent switching signal, continuous from the right. We denote by T = {tk } the increasing sequence of the switching time instants, i.e., σ(t) = p′ ∈ P for all t ∈ [tk , tk+1 ) and σ(tk ) 6= σ(tk+1 ), where tk , tk+1 ∈ T , and where either limk→∞ tk+1 = ∞ or tk+1 = ∞ for some k ∈ N. Since T is a countable set, then the switching signal σ(t) is continuous almost everywhere. Additionally, {fp (x)}p∈P are

assumed to be locally Lipschitz continuous, and thus, since |P| < ∞, f (x, t) = fσ(t) (x) is locally Lipschitz continuous on x for each switching signal σ(t). Thus the conditions of Theorem 54 in [16] are satisfied, which implies that the initial value problem, Z t x(t) = x(0) + fσ(τ ) (x(τ ))dτ, (2) 0

has a unique solution x : [0, Tmax ) 7→ RNn , which is an absolutely continuous function defined on the maximal right interval [0, Tmax). Proposition 1: Consider the function V (x) = maxi∈N 12 xTi xi . Then, given a bounded solution (III), V (x(t)) is absolutely continuous as a function of t. Proof: Since x is bounded, 12 xTi xi is Lipschitz continuous as a function of x, for all i ∈ N . Additionally, the pointwise maximum of Lipschitz continuous functions is also Lipschitz continuous. Indeed, given η(x) = maxx (h1 (x), · · · , hN (x)) where {hi (x)}i∈N are Lipschitz continuous functions with Lipschitz constants {Li }i∈N , it follows that the pointwise maximum η(x) is also Lipschitz continuous, with Lipschitz constant Lη ≤ maxi∈N Li . Since (1) hi (x1 ) ≤ hi (x2 )+Li |x2 −x1 | ≤ η(x2 )+maxi∈N Li |x2 − x1 | for all i ∈ N , and (2) η(x1 ) = hi (x1 ) for some i ∈ N , it follows that η(x1 ) ≤ η(x2 ) + maxi∈N Li |x2 − x1 |, which is valid for any x1 and x2 . Thus |η(x2 )−η(x1 )| ≤ Lη kx2 −x1 k. Finally, the composition of a Lipschitz continuous function with an absolutely continuous function is also absolutely continuous [17]. Thus V (x(t)) = maxi∈N 12 xTi (t)xi (t) = maxx(t) (h1 (x(t)), · · · , hN (x(t))), with hi (x) = 12 xTi xi , is absolutely continuous as a function of t and V˙ (x(t)) exists almost everywhere. A. Conditions on fi,p (x) that guarantee convergence C We now present conditions on the vector fields {fp (x)}p∈P , which, if satisfied, guarantee that x(t) in (III) converges to the set C = {x ∈ RNn : x1 = · · · = xN }, corresponding to the consensus set. This means that limt→∞ (x(t) − x∞ (t) ⊗ 1N ) = 0, for some x∞ : R≥0 ∈ Rn , i.e., the result presented in this section does not provide any information on whether xi (t), for all i ∈ N , converge to a constant vector or a time-varying vector. In later sections, when studying synchronization in S 2 and SO(3), given the proposed control laws, we verify that the dynamics of all agents satisfy these conditions, allowing us to call the results in this section. Moreover, for these systems, convergence to a constant vector is guaranteed, but that conclusion will not rely on the results from this section. For brevity, we denote, for every i ∈ N , vimax (x) := max xTi fi,p (x), p∈P

(3)

which quantifies the maximum growth of 12 kxi (t)k2 as a function of the state x (i.e., no time dependency), since d 1 T T max (x(t)), for all dt 2 xi (t)xi (t) = xi (t)fi,σ(t) (x(t)) ≤ vi times where the derivative is well defined, i.e., all times except switching time instants.

x2 ∈ R x(t) = x(0) +

vmax (x) < 0, where the inequality follows from condition (III-A). As such, vmax (x(t)) quantifies the maximum growth of 12 kxi (t)k2 , where kxi (t)k is strictly larger than all other kxj (t)k, for i ∈ H(x(t)) and j ∈ N \{i}. When |H(x(t))| ≥ 1, vmax (x(t)) < 0 also quantifies the maximum growth of 12 kxi (t)k2 , where kxi (t)k is larger than or equal to all other kxj (t)k, for i ∈ H⋆ (x, σ(t)) and j ∈ N \{i}, and as long as (III-A) holds. Let us start with a simpler and motivating result, where we assume N = 2, i.e., we assume there are only two agents.

Rt

f (x(τ ))dτ 0 σ(τ ) Ω = Ω0 ∩ C

x1 ∈ R

n o Ω∞ = x ∈ R2 : 21 x2i = lim V (t) t→∞

Ω0 =

Theorem 2: Consider the system (III) with N = 2 and the set Ω0 = {x ∈ R2n : kxi k ≤ maxj∈{1,2} kxj (0)k}. If for all x ∈ Ω0

  x ∈ R2 : |xi | ≤ max |xj (0)| j∈{1,2}

C = {x ∈ R2 : x1 = x2 }

(a) Illustration of sets for n = 1: Ω0 is a positively invariant set; limt→∞ V (t) defines a set which the trajectory x(t) must converge to; more specifically, x must converge to the intersection between that set and the set Ω.

1) when x1 6= x2 ,

a) vimax (x) ≤ 0∀i ∈ H(x), b) ∀p ∈ P∃k ∈ H(x) : xTk fk,p (x) < 0,

x2 ∈ R

2) when x1 = x2 , fp (x) = 0 ∀p ∈ P,

Ω = Ω0 ∩ C Ωǫ ∩ Ω 0 ǫ

Ω 2 ∩ Ω0 x(t)

x1 ∈ R

ǫ ǫ 2

Ω0 =

  x ∈ R2 : |xi | ≤ max |xj (0)| j∈{1,2}

C = {x ∈ R2 : x1 = x2 } ǫ

(b) Illustration of sets Ωǫ and Ω 2 , i.e., sets of points which are, respectively, ǫ and 2ǫ close to the set Ω (Ω is illustrated ǫ in Fig. 1(a)), and a trajectory x(t) crossing Ωǫ \Ω 2 multiples times. Fig. 1.

Illustration of sets defined in Theorem 2 for n = 1.

Also, denote H(x) = {i ∈ N : i = arg maxi∈N (kxi k)} as the set of indexes i ∈ N , for which kxi k is larger than or equal to all other kxj k. Assume that vimax (x) ≤ 0 for all i ∈ H(x) and that ∀p ∈ P∃k ∈ H(x) : xTk fk,p (x) < 0.

(4)

Condition (III-A) states that, for every p ∈ P, and within the set { 12 kxi k2 }i∈H(x) of all maximum norms, we can always find a maximum whose time derivative, if well defined, is negative. Then, denote H⋆ (x, p) = {i ∈ H(x) : xTi fi,p (x) < 0}, which is a non-empty subset of H(x), i.e., ∅ 6= H⋆ (x, p) ⊆ H(x), as long as condition (III-A) is satisfied. We finally define vmax (x) := max max ⋆

p∈P k∈H (x,p)

xTi fi,p (x).

Now notice that for |H(x)| = 1 and i ∈ H(x), vimax (x) =

then Ω0 is positively invariant and every solution x(t), with x(0) ∈ Ω0 , converges asymptotically to Ω = Ω0 ∩ C. Proof: Consider the nonsmooth function V : R2n 7→ + R0 , given by V (x) = 12 max(xT1 x1 , xT2 x2 ). From Proposition 1, given a bounded solution (III), V (x(t)) is absolutely continuous and, therefore, V˙ (x(t)) exists almost everywhere. Without loss of generality, we assume V˙ (x(t)) does not exist for all t ∈ T , where T is the set of time instants at which all switches occur and it is a set of zero measure in R≥0 (we note however that V˙ (x(tk )) exists for some tk ∈ T , for example, if fσ(tk ) (x(tk )) = fσ(tk−1 ) (x(tk )), i.e., if the vector field at x is the same before and after a switch). For convenience, let us denote T ′ = {t ∈ R≥0 \T : d d kx1 (t)k2 6= dt kx2 (t)k2 } as the set kx1 (t)k = kx2 (t)k ∧ dt of time instants when the norms kx1 (t)k and kx2 (t)k are equal but their time rate of change is not (for i ∈ {1, 2}, d 2 dt kxi (t)k is always well defined since we only consider time instants when switches do not occur, i.e., t ∈ R≥0 \T ). Then, V˙ (x(t)) does not exist at a time instant t only under two scenarios, when a switching occurs, i.e., t ∈ T , or when t ∈ T ′ . Since V (x(t)) is absolutely continuous, V˙ (x(t)) exists almost everywhere and therefore T ∪ T ′ is a set of zero measure in R≥0 . For t 6∈ T ∪ T ′ and x(t) ∈ Ω0 , there are three scenarios. (1) If kx1 (t)k > kx2 (t)k, from the first condition of the Theorem, it follows that V˙ (x(t)) = xT1 (t)fσ(t) (x1 (t)) ≤ v1max (x(t)) = vmax (x(t)) < 0, with a similar conclusion holding when kx2 (t)k > kx1 (t)k. (2) If kx1 (t)k = kx2 (t)k∧ x1 (t) 6= x2 (t), then V˙ (x(t)) = xT1 (t)f1,σ(t) (x(t)) = xT2 (t)f2,σ(t) (x(t)) ≤ vmax (x(t)) < 0, where the inequality follows from conditions 1)a)-b) in the Theorem. (3) If x1 (t) = x2 (t), it follows from the second condition in the Theorem that V˙ (x(t)) = 0. As such, V˙ (x(t)) ≤ 0 for all t ∈ R≥0 \(T ∪ T ′ ) and x(t) ∈ Ω0 , which implies V˙ (x(t)) ≤a.e 0. Since V (x(t)) = Rt V (x(0)) + 0 V˙ (x(τ ), τ )dτ and V (x) is lower bounded, it then follows that V (x(t)) ≤ V (x(0)) for all time and

limt→∞ V (t) = V ∞ , where V ∞ is a constant between 0 and V (x(0)). Consider now the sets Ω0 = {x ∈ R2n : kxi k ≤ maxj∈{1,2} kxj (0)k} and Ω = {x ∈ Ω0 : x1 = x2 } = Ω0 ∩C. Since V (x(t)) ≤ V (x(0)) for all time, then Ω0 is positively invariant, i.e., x(t) ∈ Ω0 for all t ∈ R≥0 , and thus x(t) is bounded for all t ≥ 0, which guarantees that Proposition 1 can be used of this proof. Also, from compactness of Ω0 , it follows the solution of (III) is defined for all positive times, namely Tmax = ∞ (Proposition C.3.6 in [16]). Now let us prove that limt→∞ dist(x(t), Ω) = 0. We will suppose, on the contrary, that limt→∞ dist(x(t), Ω) 6= 0, which will lead to the conclusion that V (x(t)) crosses it lower bound, at which point a contradiction is reached and the proof is completed. Suppose then that limt→∞ dist(x(t), Ω) 6= 0, i.e., ∃ǫ > 0∀T > 0∃t ≥ T : dist(x(t), Ω) ≥ ǫ,

(5)

i.e., x(t) does not uninterruptedly stay in the set Ωǫ for an infinite time period. ǫ Consider now the set Ω 2 , and denote V˙ ǫmax := 2

sup

ǫ x∈Ω0 \Ω 2

vmax (x) < 0

as the maximum time rate of V˙ (x(t)) for all t 6∈ T ∪ T ′ ǫ and for all x(t) ∈ Ω0 \Ω 2 , and which is also negative, i.e., supx(t)∈Ω \Ω 2ǫ supt6∈T ∪T ′ V˙ (x(t)) ≤ V˙ ǫmax < 0. 2 0 It then follows that ǫ

∀T ≥ 0∃t ≥ T : x(t) ∈ Ω 2 ,

(6)

ǫ

i.e., if x(t) is ever outside the set Ω 2 , then it will re-enter ǫ that set. Suppose, on the contrary, that x(t) ∈ Ω0 \Ω 2 for all ˙ t ≥ T and for some T ≥ 0. Then, V (x(t)), for t ≥ T , exists almost everywhere and it is upper bounded by a negative constant, i.e., V˙ (x(t)) ≤a.e V˙ ǫmax < 0, which implies that Rt 2 V (x(t)) = V (x(T )) + T V˙ (x(τ ), τ )dτ ≤ V (x(0)) + V˙ ǫmax (t − T ) crosses its lower bound, i.e., V (x(t)) < 0 for 2

t>T−

V (x(0)) , V˙ ǫmax 2

which is impossible.

We can now combine the two previous conclusions: from (III-A), x(t) does not uninterruptedly stay in the set Ωǫ for an infinite time period; from (III-A), if x(t) is ever ǫ outside the set Ω 2 , then it will re-enter that set. Equivalently, x(t) always leaves the set Ωǫ , and always returns to the set ǫ ǫ Ω 2 , which implies that x(t) crosses the set Ωǫ \Ω 2 infinite ǫ ǫ many times. In Fig. 1(b), we illustrate Ω and Ω 2 , and a ǫ trajectory x(t) crossing the set Ωǫ \Ω 2 . For convenience, define f max := < ∞. Then, crossing maxx∈Ω0 maxp∈P kfp (x)k ǫ Ωǫ \Ω 2 takes a lower bounded positive time T , where ǫ ǫ T ≥ 2f max . Moreover, when x(t) ∈ Ω0 ∩ (Ωǫ \Ω 2 ), V˙ (x(t)) ≤a.e V˙ ǫmax < 0, which means V (x(t)) must 2 decrease by at least |V˙ ǫmax |T > 0 every time x(t) crosses 2 ǫ Ωǫ \Ω 2 . Since this happens infinitely often, and every time V (x(t)) decreases by at least |V˙ ǫmax |T > 0, then V (x(t)) 2 crosses its lower bound, i.e., V (x(t)) < 0 for all time

t after Ω0 ∩ (Ωǫ \Ω 2 ) has been crossed k = ⌈ |VV˙ (x(0)) max |T ⌉ ǫ

ǫ 2

times. A contradiction has then been reached, implying that limt→∞ dist(x(t), Ω) = 0.

Remark 3: Note that Fig. 1(a) suggests that x(t) converges to a constant, since Ω∞ = {x ∈ R2 : 12 x21 = 12 x22 = limt→∞ V (x(t)) =: V ∞ }, a set x(t) converges to, is composed of two points (and since x(t) is continuous, it cannot alternate between those two asymptotically). However, this conclusion only holds for n = 1 (and if V ∞ 6= 0). For n > 1, Ω∞ = {x ∈ R2n : 21 xT1 x1 = 21 xT2 x2 = V ∞ } forms a connected set of points since 21 xTi xi = V ∞ describes a circle with radius larger than zero if V ∞ 6= 0. Since, in general, V ∞ is not guaranteed to be 0, then it is not possible to guarantee that x1 (t) and x2 (t) converge to a constant vector. We now extend the previous result for a generic scenario, where N ≥ 2. For convenience, we define the sets C = {x ∈ RNn : x1 = · · · = xN }, and H(x) = {i ∈ N : i = arg maxi∈N (kxi k)}. C is the set where all xi are equal, i.e., the consensus set, and H(x) provides the indexes for which kxi k is maximum. Theorem 4: Consider the system (III) and the set Ω0 = {x ∈ RNn : kxi k ≤ maxj∈N kxj (0)k}. If, for all x ∈ Ω0 , 1) when x 6∈ C, a) vimax (x) ≤ 0∀i ∈ H(x) , b) ∀p ∈ P∃k ∈ H(x) : xTk fk,p (x) < 0, 2) when x ∈ C, fp (x) = 0∀p ∈ P, then Ω0 is positively invariant and every solution x(t), with x(0) ∈ Ω0 , converges asymptotically to Ω = {x ∈ Ω0 : x1 = · · · = xN } = Ω0 ∩ C. Proof: Consider the nonsmooth function V : RNn 7→ R+ , given 0 by V (x) = maxi∈N 12 xTi xi . From Proposition 1, given a bounded solution (III), V (x(t)) is absolutely continuous and therefore, V˙ (x(t)) exists almost everywhere. Without loss of generality, we assume V˙ (x(t)) does not exist for t ∈ T , where T is the set of time instants at which switches occur and it is a set of zero measure in R≥0 (we note however that V˙ (x(tk )) exists for some tk ∈ T , for example, if fσ(tk ) (x(tk )) = fσ(tk−1 ) (x(tk )), i.e., if the vector field at x is the same before and after a switch). For convenience let us denote T ′ = {t ∈ R≥0 \T : d d kxi (t)k = 6 kxi (t)k = kxj (t)k ∧ dt dt kxj (t)k, ∀i, j ∈ H(x(t)), |H(x(t))| > 1} as the set of time instants when two or more norms kxi (t)k, for i ∈ H(x(t)), are equal and larger than all others, but their time rate of change is not d kxi (t)k2 is always well defined since (for i ∈ H(x(t)), dt we only consider time instants when switches do not occur, i.e., t ∈ R≥0 \T ). Then, V˙ (x(t)) does not exist at a time instant t only under two scenarios, when a switching occurs, i.e., t ∈ T , or when t ∈ T ′ . Since V (x(t)) is absolutely continuous, V˙ (x(t)) exists almost everywhere and therefore T ∪ T ′ is a set of zero measure in R≥0 . For t 6∈ T ∪T ′ and x(t) ∈ Ω0 , there are three scenarios. (1) If |H(x(t))| = 1 and i ∈ H(x(t)), from the first condition of the Theorem, it follows that V˙ (x(t)) = xTi (t)fi,σ(t) (x(t)) ≤

vimax (x(t)) = vmax (x(t)) < 0. (2) If |H(x(t))| > 1 ∧ x(t) 6∈ C, then V˙ (x(t)) = xTi (t)fi,σ(t) (x(t)) ≤= vmax (x(t)) < 0 for all i ∈ H(x(t)), and where the inequality follows from the first condition of the Theorem. (3) If x(t) ∈ C, from the second condition in the Theorem, V˙ (x(t)) = 0. As such, V˙ (x(t)) ≤ 0 for all t ∈ R≥0 \(T ∪ T ′ ) and x(t) ∈ Ω0 , which implies V˙ (x(t)) ≤a.e 0. Since V (x(t)) = Rt ˙ V (x(0)) + 0 V (x(τ ), τ )dτ and V (x) is lower bounded, it then follows that V (x(t)) ≤ V (x(0)) for all time and limt→∞ V (t) = V ∞ , where V ∞ is a constant between 0 and V (x(0)). Consider now the sets Ω0 = {x ∈ RN n : kxi k ≤ maxj∈N kxj (0)k} and Ω = {x ∈ Ω0 : x1 = · · · = xN }. Since V (x(t)) ≤ V (x(0)) for all time, then Ω0 is positively invariant, i.e., x(t) ∈ Ω0 for all t ∈ R≥0 , and thus x(t) is bounded for all t ≥ 0, which explains why Proposition 1 can be used in this proof. Also, from compactness of Ω0 , it follows the solution of (III) is defined for all positive times, namely Tmax = ∞ (Proposition C.3.6 in [16]). Now let us prove that limt→∞ dist(x(t), Ω) = 0. We will suppose, on the contrary, that limt→∞ dist(x(t), Ω) 6= 0, which will lead to the conclusion that V (x(t)) crosses it lower bound, at which point a contradiction is reached and the proof is completed. Suppose then that limt→∞ dist(x(t), Ω) 6= 0, i.e., ∃ǫ > 0∀T > 0∃t ≥ T : dist(x(t), Ω) ≥ ǫ,

(7)

i.e., x(t) does not uninterruptedly stay in the set Ωǫ for an infinite time period. ǫ Consider now the set Ω 2 , and denote V˙ ǫmax := 2

sup

ǫ x∈Ω0 \Ω 2

vmax (x) < 0

as the maximum time rate of V˙ (x(t)) for all t 6∈ T ∪ T ′ ǫ and for all x(t) ∈ Ω0 \Ω 2 , and which is also negative, i.e., supx(t)∈Ω \Ω 2ǫ supt6∈T ∪T ′ V˙ (x(t)) ≤ V˙ ǫmax < 0. 2 0 It then follows that ǫ

∀T ≥ 0∃t ≥ T : x(t) ∈ Ω 2 ,

(8)

ǫ 2

i.e., if x(t) is ever outside the set Ω , then it will re-enter ǫ that set. Suppose, on the contrary, that x(t) ∈ Ω0 \Ω 2 for all t ≥ T and for some T ≥ 0. Then, V˙ (x(t)), for t ≥ T , exists almost everywhere and it is upper bounded by a negative constant, i.e., V˙ (x(t)) ≤a.e V˙ ǫmax < 0, which implies that Rt 2 V (x(t)) = V (x(T )) + T V˙ (x(τ ), τ )dτ ≤ V (x(0)) + V˙ ǫmax (t − T ) crosses its lower bound, i.e., V (x(t)) < 0 for 2

t>T−

V (x(0)) , V˙ ǫmax 2

which is impossible.

We can now combine the two previous conclusions: from (III-A), x(t) does not uninterruptedly stay in the set Ωǫ for an infinite time period; from (III-A), if x(t) is ever ǫ outside the set Ω 2 , then it will re-enter that set. Equivalently, x(t) always leaves the set Ωǫ , and always returns to the set ǫ ǫ Ω 2 , which implies that x(t) crosses the set Ωǫ \Ω 2 infinite ǫ ǫ many times. In Fig. 1(b), we illustrate Ω and Ω 2 , and a ǫ ǫ trajectory x(t) crossing the set Ω \Ω 2 .

For convenience, define f max := < ∞. Then, crossing maxx∈Ω0 maxp∈P kfp (x)k ǫ Ωǫ \Ω 2 takes a lower bounded positive time T , where ǫ ǫ . Moreover, when x(t) ∈ Ω0 ∩ (Ωǫ \Ω 2 ), T ≥ 2f max V˙ (x(t)) ≤a.e V˙ ǫmax < 0, which means V (x(t)) must 2 decrease by at least |V˙ ǫmax |T > 0 every time x(t) crosses 2 ǫ Ωǫ \Ω 2 . Since this happens infinitely often, and every time V (x(t)) decreases by at least |V˙ ǫmax |T > 0, then V (x(t)) 2 crosses its lower bound, i.e., V (x(t)) < 0 for all time ǫ t after Ω0 ∩ (Ωǫ \Ω 2 ) has been crossed k = ⌈ |VV˙ (x(0)) max |T ⌉ ǫ 2

times. A contradiction has then been reached, implying that limt→∞ dist(x(t), Ω) = 0.

IV. S YNCHRONIZATION In the next subsections, we define synchronization in S 2 and SO(3). We then present the proposed control laws for the angular velocity in both cases, and the the dynamics for the individual agents, either in S 2 or SO(3), that follow from the chosen control laws. We then rewrite these in a form that allows for studying synchronization in S 2 and SO(3) under a common framework. Additionally, we also show that consensus in Rn can be casted as a synchronization problem in S n , for any n ∈ N. Definition 1: An open α-cone, for α ∈ [0, π], formed by ¯ is composed of all unit vectors ν that satisfy a unit vector ν, ν¯ T ν > cos(α). For a closed α-cone, ν¯ T ν ≥ cos(α). Definition 2: We say that a group of unit vectors {νi }i∈N in S n−1 belongs to an open/closed α-cone, for α ∈ [0, π], if there exists a unit vector ν¯ such that all νi belong to the ¯ open/closed α-cone formed by ν. The concept of open α-cone is illustrated in Fig. 3, for N = 3 and n = 3: in Fig. 3, three unit vectors in R3 are contained in an open 30◦ -cone formed by the unit vector ν¯ . Definition 3: We say that a group of unit vectors {νi }i∈N in S n−1 is synchronized if νiT νj = 1 ⇔ νi = νj for all i, j ∈ N . We show later that, given the proposed control laws, synchronization of {νi }i∈N in S n−1 takes place if a group of unit vectors {νi }i∈N is initially contained in an open α⋆ cone, where α⋆ = π2 for synchronization in S 2 and consensus in Rn ; and where α⋆ = π4 for synchronization in SO(3). In the next subsections, we always consider a group of N agents, indexed by the set N = {1, · · · , N}, operating in either S 2 , SO(3) or Rn . The group of agents network can be modeled as a time varying digraph, G(t) = {N , E(t)}, with N as the time invariant vertices’ set indexed by the team members, and E(t) as the time varying edges’ set. We denote Ni (t) ⊂ N as the neighbor set of agent i at time instant t ∈ R≥0 . In order to perform analysis under a common framework, we will transform all problems into a standard form. We denote ν = [ν1T · · · νNT ]T , where {νi }i∈N is a group of unit vectors in S n−1 . The state ν(t) is assumed to evolve

0

according to the dynamics  ˜f1,σ(t) (ν(t))   .. ˙ ν(t) = ˜fσ(t) (ν(t)) =  , . ˜fN,σ(t) (ν(t)) 

˜fi,σ(t) (ν) =

g˜ij (νi , νj )Π (νi ) νj ,

(9)

(10)

j∈Ni (t)

for all i ∈ N , i.e., ν˙ i (t) = ˜fi,σ(t) (ν(t)). System (IV)-(IV) will be the standard form all problems will be transformed into. For synchronization in S 2 , νi ∈ S 2 ; for synchronization in SO(3), νi ∈ S 3 ; and for consensus in Rn , νi ∈ S n . The functions g˜ij : V 7→ R≥0 are continuous weight functions, where V ⊂ S n−1 × S n−1 is the Cartesian product of ¯ Specifically, two open α-cones formed by the unit vector ν. g˜ij (νi , νj ) is the weight agent νi assigns the error between itself and its neighbor νj , for all i, j ∈ N . All functions g˜ij (·, ·) satisfy the following criterion, g˜ij (νi , νj ) > 0 if νiT νj 6= 1.

2

3

T 1 = {0, 1, 2, 3, ...} n T 2 = 0, 1 +

where, X

1

(11)

From continuity, it follows that lim inf νiT νj →1 g˜ij (νi , νj ) ≥ 0 and, for k ∈ {i, j}, lim inf νkT ν→cos(α) g˜ij (νi , νj ) ≥ 0 and ¯ lim supνkT ν→cos(α) g ˜ (ν , ν ) ≤ ∞. ij i j ¯ Assume a group of unit vectors {νi (t)}i∈N is contained in ¯ with β ∈ [0, α) a closed β-cone formed by the unit vector ν, and for all t ∈ R≥0 , i.e., ν¯ T νi (t) ≥ cos(β) > cos(α) for all i ∈ N and t ∈ R≥0 . Then, constraint (IV), if satisfied, provides the following two conclusions: since ν¯ T νi (t) cannot converge to cos(α) for any i ∈ N , (1) the weight g˜ij (νi , νj ) can be 0 or it can converge to 0 if and only if νiT νj is 1 or if it converges to 1; (2) all weights g˜ij (νi , νj ) are upper bounded, and so is k˜fσ(t) (ν)k for all t ∈ R≥0 . The explicit dependency of the dynamics (IV)-(IV) on time comes from the time varying graph network, and more specifically, the time varying neighbor set for each agent i ∈ N , Ni (t) as specified in (IV). Assumption 5: For each agent i ∈ N , we assume that it only switches its neighbor set Ni (t) only after a τDi period of time, and independently from all other agents in the network. We then denote T i := {tik } as the increasing sequence of time instants at which agent i switches its neighbor set. Under Assumption 5, it follows that there is a dwell time between consecutive switches’ time instants for every agent dynamics, i.e., tik+1 − tik ≥ τDi for all tik+1 , tik ∈ T i and for all i ∈ N . Notice that each agentP neighbor set can r=N−1 (N−1)! switch between no more than 2N −1 = r=0 r!(N−1−r)! (N−1)! neighbor sets, where r!(N−1−r)! quantifies the maximum number of available neighbor sets when an agent has r neighbors. As such, the complete network dynamics can switch between no more than p ≤ 2N (N −1) graphs networks. For convenience, we denote each possible graph network by a unique integer number from P = {1, · · · , p}, where p is the maximum number of possible graph networks, which is bounded from above as discussed previously. The switching

n T = 0, 1, 1 +

 1 1 2

,2 +

 1 1 2

 1 2 2

, 2, 2 +

, ...

o

 1 2 2

, ...

o

Fig. 2. Network with 2 agents, where neighbor set of agent 1 switches at 1 time instants T 1 , with dwell time τD = 1; where neighbor set of agent 2 1 switches at time instants T 2 , with dwell time τD = 0.75; and the network dynamics switches at time instants T with no dwell time, but with average 0.75 dwell time τD ≥ 2 and N0 = 2.

signal σ : R≥0 7→ P then provides the graph network G(t), and therefore all agents neighboring sets Ni (t), which are active at each time instant t. We adopt Definition 2.3. in [14], and say a switching signal σ(t) has an average dwell-time τD and a chatter bound N0 ∈ N if the number of switching times of σ(t) in any open finite interval (t1 , t2 ) is upper bounded by 1 . #s (t1 , t2 ) = N0 + t2τ−t D We show next that, under Assumption 5, σ(t) has an average dwell time, and therefore it follows that the set T has zero measure in R≥0 , a necessary condition in order to invoke the results from Section III-A. Given the sets of switches’ time instants, T i , for each agent i ∈ N , the set of switches’ time instants for the complete network can be computed recursively following Algorithm 1, where we assume ti0 = 0 for all i ∈ N , i.e., the initial time instant is considered a switch instant for all agents. Given: T i = {tik } for all i ∈ N Initialization: T = ∅ tk ← 0 T ← T ∪ {tk } T i ← T i \{tk } while T i 6= ∅ for all i ∈ N do V = argj,tj minj∈N mintj ∈T j (tjk − tk ) k k tk ← tjk for any (j, tjk ) ∈ V T ← T ∪ {tk } T j ← T j \{tk } for all (j, tjk ) ∈ V end Algorithm 1: Constructing the set of time switches T = {tk } for the complete network, given the individual set of time switches T i for all agents i ∈ N . (operator mintj ∈T j (tjk − tk ) is well defined since T j is an increasing k sequence and its first element is always greater than tk ). For brevity, let us denote τDmin := mini∈N τDi , representing the minimum dwell time among all agents. Proposition 6: If tik+1 −tik ≥ τDi > 0, for all tik+1 , tik ∈ T i , and for all i ∈ N , then the network dynamics (IV) has a switching signal with average dwell time τD = N1 τDmin and chatter bound N0 = N . 1 min  N0 = N and τD = N τD , then #s (t1 , t2 ) =  Proof: If −t1 . N 1 + tτ2min D

Consider then any open interval (t1 , t2 ) with 0 < t2 − t1 ≤ ≤ τDi for all i ∈ N . Denote t ∈ T as a switch instant in (t1 , t2 ). It follows that t ∈ T j for some j ∈ N . Under Assumption 5, the next switch from T j may come only after a period τDj ≥ τDmin ≥ N1 τDmin , and, since 0 < t2 − t1 ≤ N1 τDmin ≤ τDj , it then follows that agent j can only switch once in (t1 , t2 ). Since this is valid for any j ∈ N , it follows that a maximum of N switches are possible in (t1 , t2 ). Since N ≤ #s (t1 , t2 ) ≤ 2N, then the Proposition’s conclusion follows for this scenario. Consider now any open interval (t1 , t2 ) with Nk τDmin < t2 − min t1 ≤ k+1 for some k ∈ N. The interval (t1 , t2 ) can be N τD broken in k + 1 intervals of equal length, i.e., (t1 , t2 ) = (t1 , t1 + ∆t] ∪ (t1 + ∆t, t1 + 2∆t] ∪ · · · ∪ (t1 + k∆t, t2 ) 2 −t1 . Each interval (t1 + (l − 1)∆t, t1 + l∆t], where ∆t = tk+1 for all l ∈ {1, · · · , k + 1}, has length ∆t ≤ N1 τDmin ≤ τDi for all i ∈ N . Thus, we can invoke the same reasoning as before to conclude that in each of those intervals only a maximum of N switches can occur, and, as such, only a total of (k+1)N switches can occur in (t1 , t2 ). Moreover, for this case, it follows that (k + 1)N ≤ #s (t1 , t2 ) ≤ (k + 2)N, and, therefore, the Proposition’s conclusion follows. In Fig. 2, we illustrate a scenario where Assumption 5 is satisfied, and the switching signal has no dwell time, but it has an average dwell time. 1 min N τD

A. Synchronization in S 2 Here, we consider a group of agents operating in the unit sphere domain in R3 , i.e., S 2 = {x ∈ R3 : xT x = 1}. If, at a time instant t, agent i ∈ N is aware of the relative attitude between itself and another agent j, then j ∈ Ni (t). Each agent i has its own orientation frame (w.r.t. an unknown inertial orientation frame), represented by Ri ∈ SO(3). Let ni ∈ S 2 be a direction along agent’s i ori¯ i , where n ¯ i ∈ S 2 is a constant entation, i.e., ni := Ri n unit vector that is known by agent i. The goal of attitude synchronization in S 2 is not that all agents share the same complete orientation, i.e., R1 = · · · = RN , but rather that all agents share the same orientation along a specific direction, i.e., n1 = · · · = nN . Figure 4 illustrates the concept of incomplete synchronization for two agents. in  For example, T ¯1 = n ¯ 2 = √13 1 1 1 , and in Figs. 4(a) and 4(b), n ¯ 2. ¯ 1 = R2 n Fig. 4(b) the synchronized network satisfies R1 n Notice that agent i is not aware of ni (since this is specified in an unknown inertial orientation frame); instead, agent i ¯ i – fixed in its own orientation is aware of its direction n frame – and the relative attitude between its orientation and its neighbors’ own directions, i.e., agent i can measure RTi nj for all j ∈ Ni . A rotation matrix Ri ∈ SO(3) evolves with kinematics ¯i ¯ i = S (Ri ωi ) Ri n R˙ i = Ri S (ωi ) ⇒ R˙ i n ⇔ n˙ i = S (Ri ωi ) ni ,

(12)

where ωi ∈ R3 is the body-framed angular velocity, which ¯ i is constant). can be actuated, for all i ∈ N (recall that n Problem 1: Given a set of kinematic agents with unit vectors {ni }i∈N satisfying (IV-A), design distributed control

1

0.5

I

z

ν3 ν1

0

ν2

ν¯

-0.5 -1 0

-1 -1

-0.5

0

0.5 I

1

1

I

x

y

(a) Three unit vectors, ν1 , ν2 and ν3 , in R3 contained in open ¯ 30◦ -cone formed by unit vector ν

1

z

0.5 I

x3

0

ν3

x2 x1

-0.5

ν1

ν¯

ν2

-1 -1 0 I

1

x

1

0 -1 I

y

¯ νi as in Definition 6 (b) Errors xi = Π (ν) Fig. 3. Three unit vectors, ν1 , ν2 and ν3 , in R3 contained in open 30◦ ¯ cone formed by unit vector ν.

laws for the angular velocities {ωi }i∈N that guarantee that all unit vectors converge to each other, in the absence of a common inertial orientation frame. Definition 4: We define θ : S 2 × S 2 7→ [0, π] as the angular displacement between two unit vectors ni and nj , defined as θ(ni , nj ) = arccos(nTi nj ). For convenience, we denote n := [nT1 · · · nTN ]T and Rn := [RnT1 · · · RnTN ]T for any R ∈ SO(3). Then, for agents in S 2 we propose the following control law, X gij (θ(¯ ni , RTi nj ))S (¯ ni ) RTi nj ,(13) ωi (RTi n, t) = j∈Ni (t)

where gij : [0, π] 7→ R≥0 is continuous, satisfying gij (θ) > 0 for θ ∈ (0, π] and gij (0) ≥ 0, and it corresponds to a weight agent i assigns to the error between itself and its neighbor j. Notice that the control law depends only on the measurement ¯ i which RTi nj , and additionally ωi is always orthogonal to n means full angular velocity control is not necessary, i.e., we only need to control ωi along the two directions which are ¯i. orthogonal to n Notice that θ(ni , nj ) = θ(¯ ni , RTi nj ). Thus, if we denote g˜ij (ni , nj ) := gij (θ(ni , nj )), this satisfies (IV) for any α ∈ [0, π] and any ν¯ ∈ S 2 . Also, the dynamics of each agent (IV-A), when composed with the proposed law (IV-A),

R1 u2

R1 u1

R2 u2

R2 u1 R1 u3

R1 u3 R1 u2

R2 u2

R2 u3

R2 u3

(a) Two agents not synchronized

¯1 n1 ≡ R1 n ¯2 n2 ≡ R2 n

R1 u2

R1 u1

R2 u2

R2 u1

R1 u1

R2 u1

¯1 = (a) Two agents not synchronized, i.e., n1 6= n2 with n 1 ¯ 2 = 3− 2 [1 1 1]T . n

R1 u3

R2 u3

(b) Two agents synchronized R1 u3

R2 u2

R1 u2

Fig. 5. In complete synchronization, n agents, indexed by i = {1, · · · , n}, synchronize their rotation matrices (u1 ,u2 and u3 stand for the canonical basis vectors in R3 ).

R2 u3 ¯1 n1 ≡ R1 n

¯2 n2 ≡ R2 n

R1 u1

R2 u1

¯1 = n ¯2 = (b) Two agents synchronized, i.e, n1 = n2 with n 1 3− 2 [1 1 1]T . Fig. 4. In incomplete synchronization, all agents i = {1, · · · , N}, align ¯ i , where n ¯ i is fixed in rigid body i (u1 ,u2 and the unit vectors ni , Ri n u3 stand for the canonical basis vectors in R3 ).

can be described by n˙ i (t) = ˜fi,σ(t) (n(t)), where ˜fi,σ(t) (n) = S (Ri ωi (RT n, t)) ni i X g˜ij (ni , nj )Π (ni ) nj . = j∈Ni (t)

We have thus casted this problem in the form (IV)-(IV) with νi = ni and ν = n. B. Synchronization in SO(3) Here, we consider a group of agents operating in SO(3) = {R ∈ R3×3 : RT R = I, RRT = I, det(R) = 1}. If, at a time instant t, agent i ∈ N is aware of the relative attitude between itself and another agent j, then j ∈ Ni (t). The goal of attitude synchronization is that all agents share the same complete orientation, i.e. R1 = · · · = RN , as illustrated in Fig. 5. Notice that agent i is not aware of Ri (since this is specified in an unknown inertial orientation frame); instead agent i is aware of the relative attitude between its orientation and its neighbors’ own orientation, i.e. agent i can measure RTi Rj for all j ∈ Ni . Measuring RTi Rj corresponds to agent i being able to measure the projection of agent’s j body axis onto its own body axis, since   T n1,i n1,j nT1,i n2,j nT1,i n3,j T Ri Rj = nT2,i n1,j nT2,i n2,j nT2,i n3,j  = [nTk,i nl,j ], nT3,i n1,j nT3,i n2,j nT3,i n3,j

where nk,i and nl,j correspond to agent’s i and j body axis (for k, l ∈ {1, 2, 3}), respectively; and nTk,i nl,j is the projection of the lth axis of agent j onto the k th axis of agent i which can be measured by agent i without the need of a common inertial orientation between agents i and j. A rotation matrix Ri ∈ SO(3) evolves with kinematics R˙ i = Ri S (ωi ) ,

(14)

where ωi ∈ R3 is the body-framed angular velocity, and that can be actuated, for all i ∈ N . Problem 2: Given a set of kinematic agents with rotation matrices {Ri }i∈N satisfying (IV-B), design distributed control laws for the angular velocities {ωi }i∈N that guarantee that {Ri }i∈N converges to a synchronized network, in the absence of a common inertial orientation frame. Definition 5: We define θ : SO(3) × SO(3) 7→ [0, π] as the angular displacement between two rotation matrices  Ri  tr(RT i Rj )−1 . and Rj , defined as θ(Ri , Rj ) = arccos 2 For agents in SO(3), we propose the following control law,  T  X Ri Rj − RTj Ri T ∨ (,15) gij (θ(I, Ri Rj ))S ωi = 2 j∈Ni (t)

where gij : [0, π] 7→ R≥0 is continuous, satisfying gij (θ) > 0 for θ ∈ (0, π] and gij (0) ≥ 0, and it corresponds to a weight agent i assigns to the error between itself and its neighbor j. Notice that the control law depends only on the measurement RTi Rj . Since we will study synchronization in S 2 and SO(3) under a common framework, we now perform a change of variables that serves only the purpose of analysis, while the implemented control law is still that in (IV-B). We consider now the unit quaternion qi ∈ S 3 as a parametrization of Ri , for all i ∈ N , and denote q := [qT1 · · · qTN ]T . Details on the next derivations can be found in Section II. For this parameterization, the control law (IV-B) can be rewritten as

(for brevity, denote sij = arccos(2(qTi qj )2 − 1)) X   2qTi qj gij (sij ) I3 0 Q(q⋆i )qj , (16) ωi (q, t) = j∈Ni (t)



where qi denotes the conjugate quaternion of qi . Notice that ωi (q, t) = ωi (˜Iq, t) where ˜I ∈ {I4 ⊗ D ∈ R4N×4N : Dij = 0 ∧ Dii = ±1, ∀i, j ∈ {1, · · · , N}, i 6= j}, which is a consequence of the fact that S 3 is a double cover of SO(3), particularly, if qi ∈ S 3 parametrizes Ri ∈ SO(3) then so does −qi ∈ S 3 [18]. If all unit quaternions {qi }i∈N are contained in an open π ¯ , then, from Propo-cone formed by a unit quaternion q 4 sition 16, qTi qj > 0 for all i, j ∈ N . Thus, if we denote g˜ij (qi , qj ) := qTi qj gij (arccos(2(qTi qj )2 − 1)), this satisfies (IV) for α = π4 and for any ν¯ ∈ S 3 . Then the dynamics of each agent, parametrized by qi , when composed with the proposed control law (IV-B), can be described by q˙ i (t) = ˜fi,σ(t) (q(t)), where   ˜fi,σ(t) (q) = 1 Q(qi ) I ωi (q, t) 0 2   X I 0 = g˜ij (qi , qj )Q(qi ) Q(q⋆i )qj 0 0 j∈Ni (t) X = g˜ij (qi , qj )Π (qi ) qj . j∈Ni (t)

We have then casted this problem in the form (IV) with νi = qi and ν = q. Remark 7: If all unit quaternions {qi }i∈N are contained in an open π4 -cone, then, by definition,  there exists a unit ¯ such that q ¯ T qj > cos π4 for all i ∈ N . Thus, quaternion q it follows that there exists a rotation matrix R, parametrized ¯ , such that  θ(R, Ri ) = arccos(2(¯ by q qT qi )2 − 1) ≤ π 2 π arccos 2 cos 4 − 1 = 2 for all i ∈ N , i.e. all rotation matrices Ri are π2 close to R. See also Proposition 19 in Appendix II. C. Consensus in Rn casted as synchronization in S n

Here, we consider a group of agents operating in Rn . If, at a time instant t, agent i ∈ N is aware of the relative position between itself and another agent j, then j ∈ Ni (t). An agent xi in Rn evolves with kinematics x˙ i = Ri ui

For convenience, we denote x := [xT1 · · · xTN ]T and Rx := [RxT1 · · · RxTN ]T for any R ∈ SO(3). For agents in Rn , we propose the control law X gij (kRTi (xj − xi )k)RTi (xj − xi ), ui (RTi x, t) = j∈Ni (t)

which only requires the knowledge of RTi (xj − xi ). gij (kRTi (xj − xi )k) is a weight function agent i assigns to the position error between itself and its neighbor j, and it can be used, for example, to bound the actuation. For example, if gij (x) = √σ2σ+x2 for all j ∈ N , then kui k ≤ N σ. As such, X x˙ i = gij (kxj − xi k)(xj − xi ) (18) j∈Ni (t)

which is not in the form (IV). In order to write the dynamics of the system as in (IV), we perform a transformation which is discussed next. Consider the unit vector en+1 = [0Tn 1]T ∈ S n , which is fixed in time and it is also a point in Rn+1 . Let us then ˜i = consider the following transformation, for each i ∈ N , x [xTi 0] ∈ Rn+1 , with which we can construct the following unit vectors zi ∈ S n for each i ∈ N , ˜ i + en+1 x zi = =: h(˜ xi ), (19) k˜ xi + en+1 k

which is always well defined, since k˜ xi + en+1 k = √ 1 + xTi xi ≥ 1. This transformation is illustrated in Fig.6. We then denote z = [zT1 · · · zTN ]T . Taking the inner product of (IV-C) with en+1 , it fol˜ i = 0 and lows that k˜ xi + en+1 k = zT e1n+1 , since eTn+1 x i T en+1 en+1 = 1. We notice that the mapping between xi and zi is a bijection, i.e., h(·) is invertible, as long as {zi }i∈N are contained in an open π2 -cone formed by the unit vector en+1 . Indeed, 1 ˜ i = −en+1 + T x zi =: h−1 (zi ). (20) zi en+1 Note that, from (IV-C),

˜j − x ˜i x ˜i ) = (zTi en+1 )(˜ xj − x k˜ xi + en+1 k   zj zi T = (zi en+1 ) − zTj en+1 zTi en+1   zT en+1 (21) = zj iT − zi zj en+1

(17)

where ui ∈ Rn is the body-framed linear velocity, and Ri ui is the inertial-framed linear velocity, for all i ∈ N . Ri is assumed to be constant, and unknown by agent i. Each agent i ∈ N can only measure RTi (xj − xi ), which does not require a common reference frame among agents, i.e., agents do not need to agree on a common origin and orientation frame. Problem 3: Given a set of kinematic agents with positions {xi }i∈N , with body frames {Ri }i∈N , satisfying (IV-C), design distributed control laws for the linear velocities {ui }i∈N that guarantee that all positions converge to each other, in the absence of a common reference frame.

From the definition of zi in (IV-C), it follows that ˜˙ i x k˜ xi + en+1 k X ˜ i k) Π (zi ) gij (k˜ xj − x

z˙ i = Π (zi ) (IV-C)

=

j∈Ni (t)

(IV-C)

=

X

j∈Ni (t)

Π (zi )

˜j − x ˜i x k˜ xi + en+1 k

 

zj zTi en+1 zi

zj g − ij

zT en+1 zTj en+1 zTi en+1 j

Rn+1

xi Sn ∋

xi −en+1 kxi −en+1 k

xj zj =

= zi

en+1

Fig. 6.

˜ i ). We also denote x = defined as xi = Π (ν¯ ) νi =: h(ν T T T T ˜ ˜ ˜ [x1 · · · xN ] =: [h (ν1 ) · · · h (νN )]T =: h(ν). Rn xj −en+1 kxj −en+1 k

∈ Sn



 0 = ∈ Rn+1 −1

Figure 3(b) illustrates the errors xi as introduced in Definition 6, for n = 3 and N = 3. What will be shown next is that, if {νi }i∈N are contained in an open π2 -cone, then we can work with xi without losing any information.

Casting consensus in Rn as synchronization in S n .

zT e zj i If we define g˜ij (zi , zj ) := ziT en+1 gij (k zT en+1 − zT ezn+1 k), j n+1 j i π then this satisfies (IV) for α = 2 and for ν¯ = en+1 .

Then the dynamics of each agent, parametrized by zi , when composed with the proposed control law, can be described by z˙ i (t) = ˜fi,σ(t) (z(t)), where X ˜fi,σ(t) (z) = g˜ij (zi , zj )Π (zi ) zj .

Proposition 11: Consider a group of unit vectors {νi }i∈N formed by a unit vector ν¯ . contained in an open π2 -cone, p T Then kxi k < 1, ν¯ νi = 1 − kxi k2 > 0 and p ˜ −1 (xi ). (22) νi = 1 − kxi k2 ν¯ + xi =: h

Moreover, if kxi k > kxj k for all j ∈ N \{i} then 0 < ν¯ T νi < ν¯ T νj ; if kxi k ≥ kxj k for all j ∈ N \{i} then 0 < ν¯ T νi ≤ ν¯ T νj .

j∈Ni (t)

We have thus casted this problem in the form (IV) with νi = zi ∈ S n and ν = z = [zT1 · · · zTN ]T . Remark 8: Unlike synchronization in S 2 and SO(3), all unit vectors zi in this section are always by construction contained in a π2 -cone formed by the unit vector en+1 , since zTi en+1 = k˜xi +e1 n+1 k = √ 1 T > 0. Also, note that zi 1+xi xi

in (IV-C) could have been defined with other vectors other e T ˜ 6= 0, would also than en+1 , i.e., zi = k˜xx˜ ii +˜ +˜ ek with en+1 e work as an alternative transformation. Finally, notice that if the group of unit vectors {zi }i∈N converges to a synchronized network, then from (IV-C) it follows that x converges to a set where x1 = · · · = xN , i.e., the consensus set. V. A NALYSIS

In this section, we analyze system (IV)-(IV), and show that given a wide set of initial conditions, asymptotic synchronization of {νi (t)}i∈N is guaranteed. Specifically, if all νi (t) are initially contained in an open α⋆ -cone, synchronization is guaranteed, where α⋆ = π2 for synchronization in S 2 and consensus in Rn and α⋆ = π4 for synchronization in SO(3). Let us make the following assumption, which is verified later in this section. Assumption 9: Assume that all unit vectors {νi (t)}i∈N are ¯ and contained in a closed α-cone, formed by a unit vector ν, for some α ∈ [0, α⋆ ), and for all times. Remark 10: We note that if Assumption 9 is satisfied, then there exist n linearly independent unit vectors {ν¯1 , · · · , ν¯n } which form a closed cone containing {νi (t)}i∈N for all time (see Proposition 18 in Appendix ). Let us now introduce the variables, whose dynamics, as shown later, satisfy the conditions of Theorem 4. Definition 6: Consider the group of unit vectors {νi }i∈N contained in an open π2 -cone, formed by a unit vector ν¯ . We denote xi : S n−1 7→ Rn as the error between ν¯ and νi ,

Proof: If all unit vectors {νi }i∈N are contained in a ¯ then by definition open π2 -cone formed by a unit vector ν, ¯ νi , then ν¯ T νi > 0 for all i ∈ N . Also, since xi = Π (ν) ¯ Π (ν) ¯ νi = νiT Π (ν) ¯ pνi = 1 − (ν¯ T νi )2 . kxi k2 = νiT Π (ν) Since ν¯ T νi > 0, it follows that ν¯ T νi = 1 − kxi k2 and that kxi k < 1. Also, from the definition of xi ,p and since νi = ¯ ν¯ + Π (ν) ¯ νi , it follows that νi = 1 − kxi k2 ν + (νiT ν) ˜ −1 (xi ). For the last part of the Proposition, it suffices xi =: h p to verify that ν¯ T νi = 1 − kxi k2 is decreasing with kxi k and that, by assumption, ν¯ T νi > 0 for all i ∈ N . Proposition 11 guarantees that there exists a bijection between νi and xi , and therefore, a bijection between ν and ˜ ˜ −1 (x), as long as {νi }i∈N is x, i.e., x = h(ν) ⇔ ν = h π ˜ and h ˜ −1 (·) can be found contained in an open 2 -cone (h(·) in Definition 6 and Proposition 11, respectively). We note that, if Assumption 9 is satisfied, then Proposition 11 is valid since α⋆ is either π2 or π4 .

Based on Definition 6 and given the dynamics (IV)-(IV), we can deduce that the dynamics of xi satisfy x˙ i (t) = ¯fi,σ(t) (ν(t)), where ¯fi,σ(t) (ν) = Π (ν) ¯ ˜fi,σ(t) (ν) X ¯ g˜ij (νi , νj )Π (νi ) νj . = Π (ν)

(23)

j∈Ni (t)

If Assumption 9 is satisfied, then, from Proposition 11, ˜ −1 (x), it follows that we can also describe the since ν = h dynamics as ˜ −1 (x(t))) =: fi,σ(t) (x(t)), x˙ i (t) = ¯fi,σ(t) (h which is in the form (III).

(24)

It also follows from (V) that xTi fi,σ(t) (x) = xTi ¯fi,σ(t) (ν) X ¯ Π (ν) ¯ g˜ij (νi , νj )Π (νi ) νj = νiT Π (ν) j∈Ni (t)

¯ ν¯ ) = (ν − (ν ν) T i

T i

= −(νiT ν¯ )ν¯ T T

= ν¯ νi

T

X

g˜ij (νi , νj )Π (νi ) νj

j∈Ni (t)

j∈Ni (t)

X

j∈Ni (t)

= −ν¯ T νi

X

X

g˜ij (νi , νj )(νj − (νiT νj )νi )

g˜ij (νi , νj )(ν¯ T νi νiT νj − ν¯ T νj ) g˜ij (νi , νj )ν¯ T Π (νi ) νj

(25) (26)

j∈Ni (t)

We now present a Proposition which will prove useful in the following derivations and which is related with the sign of (V). Proposition 12: Consider three unit vectors ν1 , ν2 and ν¯ , satisfying 0 < ν¯ T ν1 ≤ ν¯ T ν2 ≤ 1. Then (a) ν¯ T ν1 ν1T ν2 − ν¯ T ν2 = 0 iff ν1 = ν2 , and (b) ν¯ T ν1 ν1T ν2 − ν¯ T ν2 < 0 iff ν2 6= ν1 . Proof: Sufficiency: Regarding (a), if ν2 = ν1 , then ν¯ T ν1 ν1T ν2 − ν¯ T ν2 = ν¯ T ν1 ν1T ν1 − ν¯ T ν1 = 0. Regarding (b), if ν1 6= ν2 then −1 ≤ ν1T ν2 < 1. Consider then the following two cases: (1) ν¯ T ν1 = ν¯ T ν2 and (2) ν¯ T ν1 6= ν¯ T ν2 . For case (1), it follows that ν¯ T ν1 ν1T ν2 − ν¯ T ν2 = ν¯ T ν1 (ν1T ν2 −1) < 0, where the inequality applies since ν1T ν2 < 1 and since, by assumption 0 < ν¯ T ν1 . For case (2), the Proposition’s assumption becomes 0 < ν¯ T ν1 < ν¯ T ν2 ≤ 1. Then, since ν1T ν2 < 1, it follows that 0 < ν¯ T ν1 ≤ 1 ⇒ ν¯ T ν1 ν1T ν2 < ν¯ T ν1 . As such, ν¯ T ν1 ν1T ν2 − ν¯ T ν2 < ν¯ T ν1 − ν¯ T ν2 < 0, where the latter inequality follows from the Proposition’s assumption (when simplified for case (2)). Necessity: Regarding (a), if we assume, on the contrary, that ν1 6= ν2 then it follows, from before, that ν¯ T ν1 ν1T ν2 − ν¯ T ν2 < 0 6= 0, which implies that ν1 = ν2 . Similarly, regarding (b), if we assume, on the contrary, that ν1 = ν2 then it follows, from before, that ν¯ T ν1 ν1T ν2 − ν¯ T ν2 = 0 6< 0, which implies that ν1 6= ν2 . By combining Propositions 11 and 12 and exploiting (V), it will be shown that the conditions of the Theorem 4 are satisfied for the dynamics (V)-(V). Proposition 13: For a graph network connected at all ˙ times, the error dynamics x(t) = fσ(t) (x(t)), with compo˜ −1 (x)) in (V), satisfy conditions of nents fi,σ(t) (x) = ¯fi,σ(t) (h Theorem 4, provided that Assumption 9 is satisfied. Proof: If Assumption 9 is satisfied, ν¯ T νi ≥ cos(α) > 0 for α ∈ [0, α⋆ ) and for all i ∈ N , and therefore we ignore its effect in (V). Also, if Assumption 9 is satisfied, and since the functions g˜ij (νi , νj ) satisfy condition (IV), it follows that g˜ij (νi , νj ) can only be zero or converge to zero if νiT νj is 1 or if it converges to 1. Therefore, we also ignore its effect in (V). Recall that H(x) = {i ∈ N : i = arg maxj∈N kxj k} and C = {x ∈ Rn : x1 = · · · = xN }. Also, since the graph network is connected at all times, P represents the set of all

possible connected network topologies. For all i ∈ H(x) and j ∈ N \{i}, kxi k ≥ kxj k ⇔ 0 < ν¯ T νi ≤ ν¯ T νj ≤ 1. It follows immediately from Propositions 11 and 12 that, for i ∈ H(x), xTi fi,p (x), given in (V), is negative or zero for all p ∈ P, and therefore condition 1)a) in Theorem 4 is satisfied. When |H(x)| = 1 and i ∈ H(x), kxi k > kxj k for all j ∈ N \{i}, and it follows again from Propositions 11 and 12 that xTi fi,p (x), given in (V), is strictly negative for all p ∈ P. Let us now show that, when 1 < |H(x)| ≤ N ∧ x 6∈ C, for each p ∈ P, there exists a k ∈ H(x) for which xTk fk,p (x) < 0. Alternatively, ∀p ∈ P∃k ∈ H(x) : xTk fk,p (x) < 0,

(27)

where we emphasize that the index k depends on p, i.e., the graph network associated to p. Also, note that when |H(x)| = 1, our previous conclusion still holds, and xTk fk,p (x) ≤ vkmax (x) < 0 for k ∈ H(x) and for all p ∈ P (see (III-A) for Definition of vkmax (x)). Let us prove (V) by contradiction. Suppose then, on the contrary, that, for some p ∈ P, xTi fi,p (x) = 0 for all i ∈ H(x) and recall that the network of agents is not synchronized, since x 6∈ C. For convenience, denote Nip as the neighbor set of agent i when the graph network is that associated to the integer p, i.e., σ(t) = p ⇒ Nip = Ni (t). Consider an l ∈ H(x) and any p ∈ P. From Proposition 12, xTl fl,p (x) is 0 only if all neighbors of agent l are synchronized with agent l, i.e., if νj = νl ⇔ xj = xl for all j ∈ Nlp . This implies that all j ∈ Nlp are necessarily contained in H(x), i.e., Nlp ⊆ H(x). As such, by assumption, xTj fj,p (x) = 0 for all j ∈ Nlp , which means the previous rationale can be applied for all j ∈ Nlp , thus leading to the conclusion that all neighbors of all neighbors of agent l are necessarily synchronized with each other. Since the graph associated to p ∈ P is connected, the previous rationale, applied N − 1 times, would lead to the conclusion that all agents are necessarily synchronized. Since, x 6∈ C it follows that a contradiction has been reached, and therefore, for each p ∈ P, there exists a k ∈ H(x) for which xTk fk,p (x) < 0, and therefore condition 1)b) of Theorem 4 is satisfied. Finally, from (11), x1 = · · · = xN ⇔ ν1 = · · · = νN , which combined with Proposition 12 implies that fp (0) = 0 for all p ∈ P. As such, the second condition of Theorem 4 is also satisfied. Theorem 14: Consider the network of unit vectors {νi (t)}i∈N , with dynamics (IV)-(IV). If {νi (t)}i∈N is initially contained in a closed α-cone for α ∈ [0, α⋆ ), then {νi (t)}i∈N is forever contained in that closed α-cone and {νi (t)}i∈N converges to a synchronized network. Furthermore, all νi (t) converge to a constant unit vector, i.e., limt→∞ νi (t) = ν ⋆ for some ν ⋆ ∈ S n−1 . Proof: If {νi }i∈N is initially contained in a closed αcone for α ∈ [0, α⋆ ) – recall that α⋆ is either π2 or π4 , then there exists a bijection between νi and xi , and, moreover, kxi (0)k < 1. From Proposition 13, the dynamics (V)(V) satisfy Theorem’s 4 conditions and therefore the set

Ω0 = {x ∈ RN n : kxi k ≤ maxj∈N kxj (0)k < 1} is positively invariant. Since kxi (t)k ≤ maxj∈N kxj (0)k < 1 for all t ≥ 0, then {νi (t)}i∈N is forever contained in the closed α-cone it starts on, and thus Assumption 9 is satisfied. Also, from Theorem 4 it follows that limt→∞ x1 (t) = · · · = limt→∞ xN (t) ⇔ limt→∞ ν1 (t) = · · · = limt→∞ νN (t), which corresponds to asymptotic synchronization of {νi (t)}i∈N . Additionally, it follows that the Lyapunov function in Theorem 4 converges to a constant, i.e., limt→∞ V (t) = limt→∞ maxi∈N 12 kxi (t)k2 = limt→∞ 12 kxi (t)k2 = V ∞ , for some constant 0 ≤ V ∞ ≤ ¯ i (t) = V (0) 0 for the former case, and gij (0) = 0 for the latter case, which means odd agents will penalize small errors differently between the two simulations. In Figs. 7(a)-7(f), six unit vectors are randomly initialized in an open π2 -cone around [1 0 0]T . In Figs. 7(a) and 7(d), the trajectories of the unit vectors on the unit sphere is shown, and a visual inspection indicates convergence to a synchronized network. In Figs. 7(b) and 7(e), the function V (x) = maxi∈N 21 kxi k2 – used in Theorem 14 – is provided, and we can verify that despite being non-smooth, it is

2

3

4

1

6

Fig. 8.

5

Time-varying digraph with 6 agents.

almost always decreasing; notice that V (x(t)) converges to a constant which quantifies the asymptotic angular distance between all unit vectors and [1 0 0]T . In Figs. 7(c) and 7(f), the angular distance, i.e., θ(·, ·) as in Definition 4, between some agents is presented, and indicating convergence to a synchronized network. Notice that in simulation #1 convergence is quicker when compared with simulation #2. This is a consequence of choosing, for simulation #2, weight functions that are zero when two unit vectors are synchronized, i.e., gij (0) = 0 for i odd. These means odd agents penalized the error between themselves and their neighbors very little when they are close, and thus leading to a slow convergence to a synchronized network. In turn, even agents i ∈ N tend to converge to some odd agent, when |Ni | = 1 (if |Ni | = 1 then Ni is an odd number); and tend to converge to somewhere in between their two neighbors when |Ni | = 2. This explains the oscillatory behavior for simulation #2 in Figs.7(e) and 7(f). In Figs. 7(g)-7(l), six rotation matrices were randomly initialized such that θ(I, Ri ) ≤ π2 for all i ∈ N . In Figs. 7(g) and 7(j), the trajectories of the rotation matrices are shown on a sphere of π radius1 , and a visual inspection indicates convergence to a synchronized network. In Figs. 7(h) and 7(k), the function V (x) = maxi∈N 12 kxi k2 – used in Theorem 14 – is provided, and we can verify that despite being non-smooth, it is almost always decreasing; notice that V (x(t)) converges to a constant which quantifies the asymptotic angular distance between all rotation matrices and I (the rotation matrix that all rotation matrices start close to). In Figs. 7(i) and 7(l), the angular distance, i.e., θ(·, ·) as in Definition 5, between some agents is presented, and indicating convergence to a synchronized network. Notice that in simulation #1 convergence is quicker when compared with simulation #2. This is a consequence of choosing, for simulation #2, weight functions that are zero when the two rotation matrices are synchronized, i.e., gij (0) = 0 for i odd. These means odd agents penalized the error between themselves and their neighbors very little, and thus leading to a slow convergence to a synchronized network. In turn, even agents i ∈ N tend to converge to some odd agent, when |Ni | = 1 (if |Ni | = 1 then Ni is an odd number); and tend to converge to somewhere in between their two neighbors when |Ni | = 2. This explains the oscillatory behavior for simulation #2 in Figs.7(k) and 7(l). 1 For each rotation matrix R , we plot θ n where θ = θ(I, R ) ∈ [0, π] i i i i i 1 2 S ∨ (Ri − RT and ni = 2 sin(θ i ) ∈ S . ) i

0.5

150 1 2 2 kx1 k 1 2 2 kx2 k 1 2 2 kx3 k 1 2 2 kx4 k 1 2 2 kx5 k 1 2 kx k 6 2 maxi 21 kxi k2

0.45 1 0.4 0.35

z-Axis

0.5

θ(n1, n2) θ(n2, n3) θ(n3, n4) θ(n4, n5) θ(n5, n6) θ(n6, n1)

100

Degrees (◦ )

0.3

I

0 0.25 -0.5

0.2

50 0.15

-1 -1

0.1 -0.5

1 0

0.5

x-Axis

0.05

0

0.5 I

-0.5

1

-1

0 I

y-Axis

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

0

2

(a) Simulation #1: Trajectories of unit vectors in unit sphere

(b) Simulation #1: time evolution of with xi as in Definition 6

1 kxi (t)k2 , 2

0.4

0.6

0.8

0.5 0.3

-0.5

1.2

1.4

1.6

1.8

2

140 1 2 2 kx1 k 1 2 2 kx2 k 1 2 2 kx3 k 1 2 2 kx4 k 1 2 2 kx5 k 1 2 2 kx6 k maxi 12 kxi k2

0.4

0

1

(c) Simulation #1: angular distance between some pairs of unit vectors θ(n1 , n2 ) θ(n2 , n3 ) θ(n3 , n4 ) θ(n4 , n5 ) θ(n5 , n6 ) θ(n6 , n1 )

120 100

Degrees (◦ )

1

z-Axis

0.2

Time (s)

0.5

I

0

Time (s)

0.2

80 60 40

-1 0.1

-1 0 I

x-Axis

20

1

0 1

-1

I

0

(d) Simulation #2: Trajectories of unit vectors in unit sphere

0 0

y-Axis

5

10

15

20

0

(e) Simulation #2: time evolution of with xi as in Definition 6

1 kxi (t)k2 , 2

20

120 1 2 2 kx1 k 1 2 2 kx2 k 1 2 2 kx3 k 1 2 2 kx4 k 1 2 2 kx5 k 1 2 2 kx6 k 1 maxi 2 kxi k2

0.2

1

θ(R1, R2) θ(R2, R3) θ(R3, R4) θ(R4, R5) θ(R5, R6) θ(R6, R1)

100

80 0.15

0

Degrees (◦ )

z-Axis

15

(f) Simulation #2: angular distance between some pairs of unit vectors

0.25

I

10

Time (s)

3 2

5

Time (s)

-1 0.1

-2

60

40 -3 0.05 20 -2 0 I

2

x-Axis

0

-2 I

2

0

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

0

2

(g) Simulation #1: Trajectories of rotation matrices in sphere of π radius

(h) Simulation #1: time evolution of with xi as in Definition 6

1 kxi (t)k2 , 2

0.4

0.6

0.8

0.15

-1 -2

1.4

1.6

1.8

2

0.1

θ(R1 , R2 ) θ(R2 , R3 ) θ(R3 , R4 ) θ(R4 , R5 ) θ(R5 , R6 ) θ(R6 , R1 )

80

Degrees (◦ )

1 0

1.2

100 1 2 2 kx1 k 1 2 2 kx2 k 1 2 2 kx3 k 1 2 2 kx4 k 1 2 2 kx5 k 1 2 kx k 6 2 maxi 12 kxi k2

0.2

2

1

(i) Simulation #1: angular distance between some pairs of rotation matrices

0.25

z-Axis

0.2

Time (s)

3

I

0

Time (s)

y-Axis

60

40

-3 0.05

-4

20

-2 0 I

x-Axis

2

0

-2

2

0

0 0

I

5

10

y-Axis

(j) Simulation #2: Trajectories of rotation matrices in sphere of π radius

15

20

Time (s)

(k) Simulation #2: time evolution of with xi as in Definition 6

1 kxi (t)k2 , 2

Fig. 7.

Simulations #1 and #2.

0

5

10

15

20

Time (s)

(l) Simulation #2: angular distance between some pairs of rotation matrices

ν

VII. C ONCLUSIONS In this paper, we study attitude synchronization in S 2 and in SO(3), for a network of agents under connected switching topologies. We propose switching control laws for each agent’s angular velocity, which are decentralized and do not require a common orientation frame among agents. Our main contribution lies in transforming those two problems into a common framework, where all agents dynamics are transformed into unit vectors’ dynamics on a sphere of appropriate dimension. Convergence to a synchronized network is guaranteed for a wide range of initial conditions. Directions for future work include extending all results to agents controlled at the torque level, rather than the angular velocity level.

α-cone δ

(α + δ)-cone

η = cos(δ)ν + sin(δ)ν ⊥

(α + δ)-cone

ν⊥

Fig. 9. Illustration of result in Proposition 18 for n = 2: closed (α + δ)cones formed by ν and η contain closed α-cone formed by ν; also, ν and η are linearly independent.

1 0.5

ν2

z I

A PPENDIX I A PPENDIX : AUXILIARY RESULTS Proposition 15: Consider three unit vectors ν1 , ν2 and ν in S n−1 . For θ1,2 = arccos(ν1T ν2 ), θ1 = arccos(ν1T ν) and θ2 = arccos(ν2T ν), it follows that θ1,2 ≤ θ2 + θ2 . Proof: For θ1 = 0 or θ2 = 0, it can be easily verified that the equality θ1,2 = θ2 + θ2 holds. Assume then that θ1 6= 0 ∧ θ2 6= 0. Notice that νi = (νiT n)ν + Π (ν) νi = cos(θi )ν + sin(θi )ν ⊥,i , for i = {1, 2} and where Π(ν)νi is a unit vector orthogonal to ν (well ν ⊥,i = kΠ(ν)ν ik defined since θi 6= 0). Then it follows that cos(θ1,2 ) = ν1T ν2 = cos(θ1 ) cos(θ2 ) + sin(θ1 ) sin(θ2 )(ν ⊥,1 )T ν ⊥,2 = cos(θ1 +θ2 )+sin(θ1 ) sin(θ2 )(1+(ν ⊥,1 )T ν ⊥,2 ) ≥ cos(θ1 +θ2 ). The Proposition’s conclusion then follows. The following Proposition is a direct consequence of Proposition 15. Proposition 16: If a group of unit vectors {νi }i∈N belongs to an open α-cone, for α ∈ [0, π2 ], then νiT νj > cos(2α), for all i, j ∈ N . Proposition 17: Consider n linearly independent unit vectors {νi }{1,··· ,n} , with νi ∈ S n−1 , and n constants {vi }{1,··· ,n} , with vi ∈ (−1, 1). The system of equations vi = νiT ν ⋆ , for i = {1, · · · , n} and with respect to ν ⋆ , has no more than one solution. T and V , Proof: Denote N , ν1 · · · νn  T v1 · · · vn . The system of equations can be rewritten as Nν ⋆ = V. Given that {νi }{1,··· ,n} are linearly independent, N is non-singular, and a unique solution exists and is given by ν ⋆ = N−1 V. Figure 10 illustrates the result in Proposition 17, which essentially implies that in a sphere in Rn , the intersection of n cones yields the unit vector ν ⋆ . Proposition 18: A closed α−cone, for α ∈ [0, π2 ), formed by the unit vector ν ∈ S n−1 , is always contained in a closed (α + δ)−cone, for δ ∈ (0, π2 − α), formed by at least n linearly independent unit vectors. Proof: In a closed α−cone, for α ∈ [0, π2 ), formed by the unit vector ν ∈ S n−1 , ν T νi ≥ cos(α) > 0 for all νi ∈ S n−1 contained in that cone. It is trivial to verify that the closed (α + δ)−cone formed by the unit vector ν contains the closed α−cone formed by the same vector.

0

ν



ν1 ν3

-0.5

-1 -0.5

-1 -1

0 0.5

0 1 I

Fig. 10.

1

I

x

y

Illustration of result in Proposition 17 for n = 3.

Consider now the unit vector η = cos(δ)ν + sin(δ)ν ⊥ , where ν ⊥ ∈ S n−1 is an unit vector orthogonal to ν. Since δ ∈ (0, π2 − α), it follows that cos(δ) > 0. Then νiT η = cos(δ)ν T νi +sin(δ)νiT ν ⊥ ≥ cos(δ) cos(α)−sin(δ) sin(α) = cos(α+δ) > cos(α), for all νi ∈ S n−1 contained in the cone. Since there are n − 1 unit vectors orthogonal to ν, it follows that we can find n − 1 linearly independent unit vectors η that form a closed (α + δ)−cone. As such, {ν, cos(δ)ν + sin(δ)ν ⊥,1 , · · · , cos(δ)ν + sin(δ)ν ⊥,n−1 } are n linearly independent unit vectors that form closed (α + δ)−cones containing the closed α-cone formed by the unit vector ν, and where {ν, ν ⊥,1 , · · · , ν ⊥,n−1 } forms a basis in Rn . Figure 9 illustrates the result in Proposition 18 for n = 2. From Proposition 18 it follows that if a group of unit vectors {νi }i∈N is contained in a closed α-cone for α ∈ [0, π2 ), then we can find n larger (by δ) closed cones that contain all {νi }i∈N and that are formed by n linearly independent unit vectors (namely ν, cos(δ)ν +sin(δ)ν ⊥,1 , · · · , and cos(δ)ν + sin(δ)ν ⊥,n−1 ). A PPENDIX II A PPENDIX : Q UATERNIONS For details on unit quaternions, we refer to [19]. We ˆ denote q = [ˆ qT q¯]T ∈ S 3 as a unit quaternion, where q is the quaternion’s vector component and q¯ is the quaternion’s scalar component, and q⋆ = [−ˆ qT q¯] denotes the quaternion’s conjugate. A rotation matrix R ∈ SO(3) can be parametrized by a unit quaternion q ∈ S 3 , i.e., R : S 3 7→ ˆ T provides a SO(3) with R(q) = qT q⋆ I3 + 2¯ qS (ˆ q) + 2ˆ qq mapping from S 3 to SO(3). Notice that R(q) = R(−q), and, in fact, S 3 provides a double covering of SO(3),

where exactly two diametrically opposed unit quaternions correspond to the same rotation matrix [18]. Additionally, given two unit quaternions q1 and q2 , R(q1 )T = R(q⋆1 ) and R(q1 )R(q2 ) = R(Q(q1 )q2 ), where Q(q1 )q2 is also a unit quaternion and   ˆ S (ˆ q) q Q(q) = q¯I4 + , −ˆ qT 0 ⋆



which satisfies Q (q) = Q(q ), Q(q )Q(q) = ⋆ Q(q)Q(q ) = I4 and Q(q)e4 = q¯e4 +[ˆ qT 0]T = q. As such,  I 0 Q(q) Q(q⋆ ) = Q(q)Q(q⋆ ) − Q(q)e4 eT4 Q(q⋆ ) = 0 0 I − qqT = Π (q). Moreover, given the kinematics R˙ = RS (ω), the kinematics of q satisfy [19]   1 I ˙q = Q(q) ω. 0 2 T

It is easy to verify that S ∨ (R(q) − RT (q)) = ˆ = 4¯ S ∨ (4¯ q S (ˆ q)) = 4¯ qq q I3 0 q. As such, ˆ , where q is the S ∨ (RT (q1 )R(q2 ) − RT (q2 )R(q1 )) = 4¯ qq product quaternion between q⋆1 and q2 , i.e., q = Q(q⋆1 )q2 ; ∨ T T therefore, =  S (R⋆ (q1 )R(q2 ) − R (q2 )R(q1 )) T 4q1 q2 I3 0 Q(q1 )q2 . Finally, notice that ˆT ) − 1 tr(R(q)) − 1 tr(qT q⋆ I3 + 2¯ q S (ˆ q) + 2ˆ qq = 2 2 ˆ − qT q 3qT q⋆ + 2ˆ qT q = 2 ˆT q ˆ ) + 2ˆ ˆ − qT q 3(¯ q2 − q qT q = 2 ˆT q ˆ = qT q⋆ , = q¯2 − q (28) T

tr(R(Q(q⋆ )q )−1

2 2 ))−1 1 and therefore tr(R (q1 )R(q = 2 2 T ⋆ ⋆ q q , where q = Q(q1 )q2 , and which simplifies as

=

qT q⋆ = (Q(q⋆1 )q2 )T (Q(q⋆1 )q2 )⋆ = qT2 Q(q1 )(Q(q⋆1 )q2 )⋆   −I 0 = qT2 Q(q1 ) Q(q⋆1 )q2 0 1 = −qT2 Q(q1 )Q(q⋆1 )q2 + 2qT2 Q(q1 )e4 eT4 Q(q⋆1 )q2

= −qT2 q2 + 2qT2 q1 qT1 q2 = 2(qT1 q2 )2 − 1.

(29)

Proposition 19: Consider a group of rotation matrices {Ri }i∈N , and a rotation matrix R ∈ SO(3) such that θ(R, Ri ) ≤ α, for α ∈ [0, π] and for all i ∈ N . If R is ¯ ∈ S 3 , then there exists qi ∈ S 3 that parameterized by q ¯ T qi ≥ cos α2 , for each parametrizes Ri and that satisfies q i ∈ N . Moreover, {qi }i∈N is contained in an α2 -cone around ¯ . Finally, if, for all i ∈ N , Ri (t) is continuous in time and q θ(R, Ri (t)) ≤ α with α ∈ [0, π) for all time, then there exists qi (t) ∈ S 3 continuous in time that parametrizes Ri (t) ¯ T qi (t) ≥ cos α2 for all time. and that satisfies q Proof: Recall that every rotation matrix can be parametrized by exactly two diametrically opposed quater¯ ∈ S 3 , one of the possible parameterizations of nions. Take q R ∈ SO(3), as given, i.e., R := R(¯ q). Additionally, take

α 2 -cone

formed by −¯ q R := R(¯ q) = R(−¯ q)

−¯ q −qi

Ri := R(qi ) = R(−qi )

α 2

θ(R, Ri ) ≤ α qi ∈ S

α 2

3 α 2 -cone

¯∈S q

¯ formed by q

3

(a) If θ(R(¯ q), Ri ) ≤ α, then there exists a unit quaternion qi ¯ that parametrizes in the α -cone formed by the unit quaternion q 2 Ri . ˜ i (t) and −˜ q qi (t) are continuous for t ∈ (t1 , t2 )

−¯ q

−˜ qi (t1 ) −˜ qi (t2 )

R := R(¯ q) = R(−¯ q) Ri (t) := R(˜ qi (t)) = R(−˜ qi (t)) ˜ i (t1 ) ⇒ q ¯ T qi (t1 ) > 0 qi (t1 ) = q ¯ T qi (t2 ) > 0 qi (t2 ) = −˜ qi (t2 ) ⇒ q

˜ i (t2 ) q ˜ i (t1 ) q

¯ ∈ S3 q

(b) A continuous qi (t), parameterizing Ri (t) and satisfying ¯ T qi (t) > 0 for all time, may not be found. q Fig. 11.

Illustration for the result in Proposition 19

{˜ qi , −˜ qi } as the pair of unit quaternions that parameterizes Ri ∈ SO(3), i.e., Ri := R(˜ qi ) = R(−˜ qi ) for each i ∈ N . From (II)-(II), ˜ i )2 − 1 cos(θ(R, Ri )) = 2(¯ qT q r cos(θ(R, Ri )) + 1 ˜i| = ⇔|¯ qT q = 2     θ(R, Ri ) θ(R, Ri ) T ˜ i | = cos ⇔|¯ q q , = cos 2 2

where the latter equality follows since θ(R, Ri ) ∈ [0, π]. ˜i Thus, there always exists a unit quaternion qi (either qi = q ¯T q ˜i = or qi = −˜ qi )that parametrizes Ri and that satisfies q  i) ≥ cos α2 . As such, by definition, {qi }i∈N is cos θ(R,R 2 ¯. contained in a α2 -cone formed by q Let us now focus on the final statement of the Proposition. If Ri (t) is continuous in time, we can find a pair of quaternions {˜ qi (t), −˜ qi (t)} continuous in time and parameterizing Ri (t) ∈ SO(3), i.e., Ri (t) := R(˜ qi (t)) = R(−˜ qi (t)) ˜ i (t)| > 0 for for each i ∈ N . If α ∈ [0, π), then |¯ qT q all time. Since {˜ qi (t), −˜ qi (t)} are continuous in time, then ˜ i (t) or there exists a unit quaternion qi (t) (either qi (t) = q ¯ T qi (t) > 0 for qi (t) = −˜ qi (t) for all time) that satisfies q all time. Remark 20: In the proof of Proposition 19, we note that, had we chosen −¯ q ∈ S 3 as the other possible parameterization of R ∈ SO(3), then we would find that −qi parametrizes q)T (−qi ) =  Ri and that this satisfies (−¯ ¯ T qi ≥ cos α2 , for all i ∈ N . Moreover, {−qi }i∈N would q q. be contained in an α2 -cone formed by −¯ Figure 11 illustrates the results of Proposition 19. R EFERENCES [1] J. R. Lawton and R. W. Beard, “Synchronized multiple spacecraft rotations,” Automatica, vol. 38, no. 8, pp. 1359–1364, 2002.

[2] N. Leonard, D. Paley, F. Lekien, R. Sepulchre, D. Fratantoni, and R. Davis, “Collective motion, sensor networks, and ocean sampling,” Proceedings of the IEEE, vol. 95, no. 1, pp. 48–74, Jan 2007. [3] W. Ren, “Distributed attitude consensus among multiple networked spacecraft,” in American Control Conference, June 2006. [4] A. Sarlette, R. Sepulchre, and N. E. Leonard, “Autonomous rigid body attitude synchronization,” Automatica, vol. 45, no. 2, pp. 572–577, 2009. [5] D. V. Dimarogonas, P. Tsiotras, and K. Kyriakopoulos, “Leader– follower cooperative attitude control of multiple rigid bodies,” Systems & Control Letters, vol. 58, no. 6, pp. 429–435, 2009. [6] H. Bai, M. Arcak, and J. T. Wen, “Rigid body attitude coordination without inertial frame information,” Automatica, vol. 44, no. 12, pp. 3170–3175, 2008. [7] P. O. Pereira and D. Dimarogonas, “Family of controllers for attitude synchronization in S 2 ,” in IEEE Conference on Decision and Control. IEEE, 2015. [8] J. Thunberg, W. Song, E. Montijano, Y. Hong, and X. Hu, “Distributed attitude synchronization control of multi-agent systems with switching topologies,” Automatica, vol. 50, no. 3, pp. 832–840, 2014. [9] Y. Igarashi, T. Hatanaka, M. Fujita, and M. W. Spong, “Passivity-based attitude synchronization in SE(3),” IEEE Transactions on Control Systems Technology, vol. 17, no. 5, pp. 1119–1134, 2009. [10] J. N. Tsitsiklis, “Problems in decentralized decision making and computation.” DTIC Document, Tech. Rep., 1984. [11] R. Sepulchre, “Consensus on nonlinear spaces,” Annual reviews in control, vol. 35, no. 1, pp. 56–64, 2011. [12] J. P. Hespanha, “Uniform stability of switched linear systems: extensions of lasalle’s invariance principle,” IEEE Transactions on Automatic Control, vol. 49, no. 4, pp. 470–482, 2004. [13] A. Bacciotti and L. Mazzi, “An invariance principle for nonlinear switched systems,” Systems & Control Letters, vol. 54, no. 11, pp. 1109–1119, 2005. [14] J. L. Mancilla-Aguilar and R. A. García, “An extension of lasalle’s invariance principle for switched systems,” Systems & Control Letters, vol. 55, no. 5, pp. 376–384, 2006. [15] N. Fischer, R. Kamalapurkar, and W. E. Dixon, “Lasalle-yoshizawa corollaries for nonsmooth systems,” IEEE Transactions on Automatic Control, vol. 9, no. 58, pp. 2333–2338, 2013. [16] E. D. Sontag, Mathematical Control Theory, 1998. [17] I. P. Natanson, “Theory of functions of a real variable,” Frederick Ungar, New York (1955/1961), vol. 1, no. 1, pp. 2–4, 1957. [18] C. G. Mayhew, R. G. Sanfelice, and A. R. Teel, “On quaternion-based attitude control and the unwinding phenomenon,” in American Control Conference. IEEE, 2011, pp. 299–304. [19] M. Field and D. Pence, “Spacecraft attitude, rotations and quaternions,” UMAP Modules, vol. 5, no. 2, p. 130, 1984.