# Decentralized Consensus Protocols on \(SO(4)^{N}\) and \(Tso(4)^{N}\) with Reshaping
## 2 Background
### Morse-Bott-Lyapunov Function and Reshaping  
In this section, the Morse-Bott-Lyapunov function on \(SO(4)\), along with its accompanying regulation protocol that drives an element of \(SO(4)\) to the identity matrix, is shown, and the reshaping strategy is introduced. These topics are preliminary to introducing the consensus protocols on \(SO(4)^{N}\) and \(TSO(4)^{N}\) in the following section. The derivation of the regulation protocol uses a Lyapunov-based approach in which the Lyapunov function, which is also a Morse-Bott function on \(SO(4)\), and its derivative have assumed forms in order to extract a regulation protocol. Consider the Lyapunov candidate function, which is also a Morse-Bott function on \(SO(4)\), as will be shown, as  
\[V(R)=\frac{1}{2}\sum_{n=1}^{q}\frac{b_{n}}{n}\operatorname{tr}(I_{4}-R^{n})>0 \quad\forall R\in SO(4)\setminus I_{4} \tag{19}\]  
where \(q\) is the desired number of harmonics in the feedback protocol, and \(b_{n}>0\) are positive coefficients that satisfy the following assumptions:  
**Assumption 1**. : \(\sum_{n=1}^{q}nb_{n}\geq 1\)_;_
**Assumption 2**. : \(\sum_{n=1}^{q}(-1)^{n-1}nb_{n}=1\)_;_
**Assumption 3**. : _The only solutions of \(f(\theta)=\sum_{n=1}^{q}b_{n}\sin(n\theta)=0\) are \(\theta=\{0,\pi\}\mod 2\pi\)._  
The simplest form of Equation (19) and the resulting protocol corresponds to \(q=b_{1}=1\) and is called the Base case. The rationale behind using \(q>1\) and selecting the \(b_{n}\) coefficients is provided by the reshaping strategy, which will be explained subsequently. Using the kinematics defined in Equation (17), the Lyapunov rate becomes  
\[\dot{V}(R)=-\frac{1}{2}\sum_{n=1}^{q}b_{n}\operatorname{tr}(R^{n}\Omega)=( \Omega^{\vee})^{T}\psi(R) \tag{20}\]  
where  
\[\psi(R)=\sum_{n=1}^{q}b_{n}h(R^{n}). \tag{21}\]  
and  
\[h(R)=\frac{1}{2}(R-R^{T})^{\vee}=\sin(\theta_{1})S_{1}^{\vee}+\sin(\theta_{2 })S_{2}^{\vee} \tag{22}\]  
Setting the Lyapunov rate in Equation (20) equal to  
\[\dot{V}(R)=-\left\|\psi(R)\right\|^{2}\leq 0\quad\forall R\in SO(4), \tag{23}\]  
it is seen that Equation (19) is a Lyapunov function. Equations (20) and (23) result in the protocol  
\[\Omega=-\psi^{\wedge}(R)=-\sum_{n=1}^{q}b_{n}(\sin(n\theta_{1})S_{1}+\sin(n \theta_{2})S_{2}) \tag{24}\]and the closed loop  
\[\dot{R}=-\frac{1}{2}\sum_{n=1}^{q}b_{n}(R^{n+1}-(R^{T})^{n-1}) \tag{25}\]  
Since Equation (19) has been established as a Lyapunov function, the conclusion can be made that \(R=I_{4}\) is locally stable in Equation (25). Note that, in the Base case \(V(R)=\operatorname{tr}(I_{4}-R)/2\), the protocol is \(\Omega=-h^{\wedge}(R)\) and the closed loop is \(\dot{R}=(I_{4}-R^{2})/2\). The following theorem demonstrates that \(R=I_{4}\) is almost globally asymptotically stable and that \(V(R)\) is also a Morse-Bott function. Theorem 3.1: _The Lyapunov function in Equation (19) is also a Morse-Bott function, while \(R=I_{4}\) is almost globally asymptotically stable in Equation (25)._  
Proof: The variation in \(R\) with time held fixed is obtained from Equation (17) as  
\[\delta R=R\Sigma \tag{26}\]  
where \(\Sigma\in\mathfrak{so}(4)\) is a variational matrix. Taking the variation of Equation (19) and using Equation (26) results in  
\[\delta V(R)=-\frac{1}{2}\sum_{n=1}^{q}b_{n}\operatorname{tr}(R^{n}\Sigma)=( \Sigma^{\vee})^{T}\psi(R) \tag{27}\]  
The critical points of Equation (19) and the equilibria of Equation (25) can be analyzed by assessing \(\delta V(R)=0\). Since \(\Sigma\) is an arbitrary variation, this is equivalent to \(\psi(R)=0\), which results in \(R=I_{4}\), and the submanifold of \(\pi\) rotations about any one or two planes \(E_{1}\) and \(E_{2}\), which is equivalent to the pair of PRAs \((\theta_{1},\theta_{2})\in\{(0,\pi),(\pi,0),(\pi,\pi)\}\).