Consensus and coordination on groups SO(3) and S 3 over constant and state-dependent communication graphs

We address several problems of coordination and consensus on and that can be formulated as minimization problems on these Lie groups. Then, gradient descent methods for minimization of the corresponding functions provide distributed algorithms for coordination and consensus in a multi-agent system. We point out main differences in convergence of algorithms on the two groups. We discuss advantages and effects of representing 3D rotations by quaternions and applications to the coordinated motion in space. In some situations (and depending on the concrete problem and goals) it is advantageous to run algorithms on and map trajectories onto via the double cover map , instead of working directly on .


Introduction
Explosive growth of interest in distributed and cooperative control reflects a shift of paradigm in the design of engineering systems and Control Theory. Geometric consensus theory is a recently developed subdiscipline in this broad field that deals with problems of consensus (and, more generally, coordination) on non-Euclidean manifolds [1][2][3].
This theory studies systems of agents whose states are represented by points on a certain nonlinear manifold. Agents communicate through a communication graph and adjust their positions in accordance to the information received from their neighbours. In such a way, the system as a whole can achieve a desired configuration through their pairwise interactions. Consensus is one of such configurations, where all agents are represented by a same point on manifold. As the fundamental and important issue of flocking and synchronization, consensus problem has attracted a larger number of scientists' attention, e.g. [1,[4][5][6][7][8][9][10][11][12].
Mathematical formalization of some important engineering problems yields consensus problems on certain higher-dimensional Riemmanian manifolds. In order to develop a meaningful geometric consensus theory, it is necessary to impose some conditions on the class of Riemannian manifolds on which the problems are stated. One natural restriction is to work under the assumption that the underlying manifold is a homogeneous space. Problems of coordination on Lie groups, notably on SO (3) and S 3 , are of a special CONTACT Aladin Crnkić aladin.crnkic@unbi.ba Supplemental data for this article can be accessed here. https://doi.org/10.1080/00051144.2020.1863544 interest, due to mathematical tractability and great number of applications. Among others, problems of attitude synchronization in space [13,14], formation flying [9,15,16], sensor networks [17][18][19][20][21] can be stated in a mathematically rigorous way as coordination problems on these Lie groups.
Many problems of Geometric consensus theory can be reduced to minimization of some potential functions that are defined on appropriate non-Euclidean spaces. For an overview of optimization problems and algorithms on matrix manifolds we refer to the book of Absil et al [22]. In such setup, gradient descent methods for minimization of these potential functions provide distributed algorithms for reaching desired configurations of agents.
In this view, one of central questions in this theory is the one regarding the structure of the set of minima of these potential functions. Convergence properties of gradient descent methods obviously depend on existence and stability of critical points of corresponding potential functions.
However, the structure of local minima depends on a communication graph and underlying manifold and there are only a few universal results in this direction.
In the present paper we consider several coordination problems on groups SO(3) and S 3 that are formulated as minimization problems.
In the next Section we consider consensus over the complete communication graph. This particular situation is well understood and universal results are available.
In Section 3 we proceed with consensus over arbitrary connected graphs. The situation here is more involved and satisfactory answers are available only for some manifolds. We present some simulation results that illustrate the difference between the problems on SO(3) and S 3 .
In Section 4 we analyse coordination protocols with state-dependent weighted communication graphs that can be formulated as minimization problems for a certain potential function. In this setup, the potential function is minimized simultaneously over the states of agents and weighted pairwise synapses between them. As we will see, this framework offers more robust distributed protocols for achievement of desired equilibrium configurations.
Finally, in Section 5, we briefly discuss the results, draw some conclusions and point out some opportunities in the design of robust protocols for coordinated motion in space.

Coordination on homogeneous spaces over the complete communication graph
Consider a system of N agents whose states are described by points X 1 , . . . , X N on manifold M. Let M be a special orthogonal group SO(n) or a special unitary group SU(n). Suppose that agents communicate to each other through complete communication graph G. Based on the information received from his neighbours, each agent continuously adjusts his state. Following an analogy with linear consensus algorithms it is natural to consider the following minimization problem [2,3]: Tr(X * j X k ) → min (1) with respect to agents' states X 1 , . . . , X N . The notion X * above stands for the transpose (or conjugate transpose) of a matrix X.
The gradient system for this problem reads In other words, (2) is obtained as gradient descent method for minimization problem (1). Thus, trajectories converge to critical points of V M and all strict minima of V M are stable equlibria of (1). Consensus (alignment, synchronization) are those configurations, where X 1 = · · · = X N .
Notice that on special orthogonal (or unitary) groups the maximum of the trace is achieved for the identity matrix. Hence, the minimum of V M is achieved when the matrix X * j X k = X −1 j X k = I, where I denotes identity matrix. It follows then that consensus configurations are exactly global minima of the function V M . Formal proof of this statement is given in the next theorem, which is a corollary of Proposition 7 from [2].

Theorem 2.1 ([2,3]): Consensus configurations are the only stable critical points of V M .
Proof: Since V M always decreases along solutions, only local minima can be asymptotically stable. All local minima of V M correspond to consensus. Indeed, for Let us recall that the local minima of linear function over SO(n) (or SU(n)) are all global minima. Therefore, X k * is a global minimum of v k (c) for all k, which corresponds of consensus.
As we have seen, (1) can be interpreted as the consensus problem on M over the complete communication graph. In this view, Theorem 1 guarantees that the distributed algorithm given by dynamical system (2) will converge towards consensus. Hence, Theorem 1 is a universal result about consensus over complete graphs on matrix groups. The convergence of the algorithm (2) over complete communication graph on SO(3) and S 3 is shown in the following two videos in the supplementary materials 1 respectively SM1 and SM2. In Figures 1  and 2 we depict the evolution of the potential functions, pairwise distances between the agents, and motion of the agents on the unit spheres 2 under the dynamics (2).

Remark 2.1:
Throughout the article we use the videos showing rotating bodies in order to visualize the evolution of gradient dynamical systems. These videos illustrate continuous rotations in the space, that is the motion on the group SO (3). The algorithms on S 3 are visualized by using 2 → 1 map from S 3 onto SO (3). In this way, the trajectories on S 3 are mapped onto trajectories on SO (3). This corresponds to the representation of 3D rotations by unit quaternions, the technique that is frequently used as a working framework for rotations in Robotics and Computer Graphics. This approach has some advantages over the working with SO(3) matrices directly. However, one drawback is that the map is not 1 → 1, as two antipodal points on S 3 (that is, unit quaternions q and −q) correspond to the same rotation.
Notice that Theorem 2.1 is valid also for the wide class of connected compact homogeneous manifolds that includes spheres and some Grassmannians. In conclusion, Theorem 2.1 is a universal result regarding consensus problems over complete graphs. However, in most applications, this topology is too expensive or even not feasible. Hence, problems of the design of   , x k (where θ jk is an angle between the unit vectors x j and x k , and · denotes the inner product) between the agents j and k on S 3 , and (c) visualization of agents' motion on unit spheres by plotting curves q j (t)pq j (t) ∈ S 2 for different unit quaternions p = i, j, k respectively, where q j (t) are curves on S 3 . multi-agent systems in real life require study of consensus over more general graphs.

Coordination on SO(3) and S 3 over an arbitrary connected graph
In this Section we address the problem of reaching consensus in a multi-agent system where agents communicate through a undirected connected graph (V, E), where V and E are sets of vertices and edges, respectively. Then, the potential function is defined by The corresponding gradient system reads Here, E j denotes the set of all agents l ∈ {1, . . . , N}, such that there exists an edge (j, l) ∈ E.
As the communication graph is undirected and connected, we can conclude that the only consensus configurations are global minima of V in the same way as in the previous Section. Hence, convergence of the algorithm (4) depends on the existence of local minima or stable critical points of the function V . However, it turns out that this question is very difficult in general and the answer depends both on the topology of and geometry of the underlying manifold. Even in seemingly the simplest non-Euclidean case, when underlying manifold is the unit circle S 1 , this remains an open question. Surprisingly, it turns out that for spheres in higher dimensions the situation is a bit simpler.

Theorem 3.1 ([7]): Suppose that the communication graph is connected and undirected. Then the set of consensus configurations is almost globally stable for the system
Emphasize that Theorem 3.1 is a partial case of the result of Markdahl et al, [7]. In fact, the similar assertion is valid for any sphere S n for n ≥ 2. It is well known that SU(2) is a Lie group, isomorphic to the sphere S 3 . However, one can not guarantee the same result for S 1 , there are asymptotically stable equilibrium sets on S 1 that are disjunct from the consensus set. [2,3]. In this way, the situation with S 1 surprisingly turns out to be the most complicated among all spheres. The unit circle is the least favourable sphere for consensus. Theorem 3.1 states that convergence of the system (4) towards consensus is almost guaranteed on SU (2). As the group manifold of SU(2) is the 3-sphere, we can say that this Theorem guarantees (almost surely) consensus on S 3 .
In Table 1 we present simulation results for multiagent systems consisting of 5 agents connected through the ring graph . This clearly illustrates fundamental difference between problems on SO(3) and S 3 : consensus is always achieved on S 3 , while on SO(3) the result depends on the initial configuration and happens in approximately 60 percent of attempts. Similar results have been reported in [7].
The two videos demonstrate the situation when the algorithm (4) over the ring graph converges towards consensus on S 3 (see the supplementary material SM3), and fails to reach consensus on SO(3) (see the supplementary material SM4). See Remark 2.1 for the explanation of the video for the case S 3 . Figures 3 and 4 demonstrate the evolution of the potential functions, pairwise distances between agents, and dynamics of the agents on the unit spheres S 2 mapped from S 3 and SO(3).

Coordination on SO(3) and S 3 over state-dependent communication graphs
In many applications communication graph is not constant, but depends on states of agents. In such situations, the graph evolves according to a certain learning rule. Inspired by Neuroscience, evolving weighted edges of a graph are called adaptive synapses. Coordination problems on S 3 with various learning rules are studied in [23,24].
One possible way to introduce coordinates on S 3 is provided by the algebra of quaternions. Then, states of the agents are represented by unit quaternions q 1 , . . . , q N . Suppose that agents evolve by the following system of quaternion-valued ODE's (QODE's) The notationq stands for quaternionic conjugation of a quaternion q, that is if q = q 1 + q 2 · i + q 3 · j + q 4 · k,  The set of unit quaternions is isomorphic to the special unitary group SU(2), so one can treat the above Equations (5) as matrix ODE's on SU (2).
It is easy to verify that (5) preserves S 3 , hence if the initial conditions q 1 (0), . . . , q N (0) are sampled from S 3 , then q j (t) ∈ S 3 for all t ≥ 0.
In addition, suppose that synapses w jk evolve by the following learning rulė The key observation is that the system (5), (6) displays potential dynamics with the potential function Hence, (5), (6) is the gradient descent system for minimization of V q . This video demonstrates evolution of agents on S 3 (we again refer to Remark 2.1 for clarification) for random initial conditions (see the supplementary material SM5). Figure 5 shows evolution of the potential function V q , pairwise cosines between (vectors on S 3 that represent) agents' states, and dynamics of agents on the unit spheres S 2 mapped from S 3 .
On the other hand, consider the analogous system on SO (3) (8) with initial condition Q j (0) ∈ SO (3). The notion Q T stands for the transpose of Q.
Suppose that synapses w jk satisfy the following learning ruleẇ The system (8), (9) appears to be the gradient descent method for minimization of the following function  B. This measure of distance on SO (3) has been used in [3,25,26].
This video demonstrates evolution on the group SO(3) under the dynamics (8),(9) (see the supplementary material SM6). In Figure 6 we depict the potential function V Q , pairwise distances d(Q i , Q j ) = 3 − Tr(Q T i Q j ) between agents i and j for some pairs, and agents' motion on the unit spheres S 2 mapped from SO (3).
Comparison between videos 5 and 6 (combined with insight into Figures 5-6) unveils an essential difference between the algorithms on S 3 and SO(3). From Figure 5 it is clear that algorithm (5), (6) ends up in bipolar configuration (i.e. agents occupy two antipodal points on S 3 ). When restricted to SO(3), this algorithm converges towards consensus, since bipolar configuration on S 3 is mapped into consensus on SO(3) (see Remark 2.1 for the explanation).
On the other hand, algorithm (8), (9) provides a distributed protocol for dividing the set of agents into two groups.

Conclusion and outlook
In this paper, we have addressed several consensus and coordination problems on Lie groups SO(3) and S 3 that can be stated as minimization problems. It turns out that the situation is different for these two groups and analogous algorithms in many cases perform differently.
In conclusion, we stress two important points. The sphere S 3 (i.e. special unitary group SU(2)) is more favourable for consensus then SO (3). It means that the potential function V on SO(3) can have local minima. Existence of local minima of V strongly depends on the communication graph . It is an open problem to characterize all graphs with which the distributed consensus algorithms on SO(3) fail to reach global minimum. Also, it would be interesting to see is it the situation on SO(4) (or SO(n) for some n) is the same or different from one on SO(3)? This problems are still unsolved at present, and we leave it for a future work. Hence, in those applications, in which the objective is to reach consensus, it is advantageous to represent rotations by quaternions, rather then by orthogonal matrices. However, whenever representing rotations by quaternions, one needs to be aware of some peculiar effects that come as a consequence of nonuniqueness of such representation, such as unwinding see for instance [27] When designing engineering systems and intelligent swarms, introduction of adaptive synapses brings new possibilities. This additional flexibility is easy to implement in some applications in order to enhance the robustness of the system. In whole, in the design of autonomous engineering systems it is possible to combine different techniques and methods, depending on a specific application, objectives and available resources.

Notes
1. All videos in the supplementary materials and figures are implemented using Wolfram Mathematica package and 4th order Runge-Kutta method for solving systems of ordinary differential equations. 2. We have used Hopf fibration for mapping from S 3 and SO(3) to S 2 .