# Decentralized Consensus Protocols on \(SO(4)^{N}\) and \(Tso(4)^{N}\) with Reshaping
## 2 Background
### Properties of \(So(4)\)
The characteristic equation for a general \(R\in SO(4)\) can be easily obtained from Equation (3) as  
\[\det(R-\lambda I_{4})=\lambda^{4}-2(\cos\theta_{1}+\cos\theta_{2})\lambda^{3}+ 2(1+2\cos\theta_{1}\cos\theta_{2})\lambda^{2}-2(\cos\theta_{1}+\cos\theta_{2}) \lambda+1=0 \tag{4}\]  
The comparison of Equation (4) with the standard form of the characteristic equation of a \(4\times 4\) proper orthogonal matrix given by  
\[\lambda^{4}-\mathrm{tr}(R)\lambda^{3}+\mathrm{tr}_{2}(R)\lambda^{2}-\mathrm{ tr}(R)\lambda+1=0 \tag{5}\]  
results in the first- and second-order traces defined in terms of the PRAs as  
\[\mathrm{tr}(R)=\sum_{i=1}^{4}R_{ii}=2(\cos\theta_{1}+\cos\theta_{2}) \tag{6}\]  
and  
\[\mathrm{tr}_{2}(R)=\sum_{i=1}^{4}\sum_{j=i+1}^{4} \begin{vmatrix}R_{ii}&R_{ij} \\ R_{ji}&R_{jj}\end{vmatrix} =2(1+2\cos\theta_{1}\cos\theta_{2}). \tag{7}\]  
The PRAs are then obtained by simultaneously solving Equations (6) and (7) as  
\[\cos\theta_{1,2}=\frac{\mathrm{tr}(R)\pm\sqrt{\mathrm{tr}^{2}(R)-4\,\mathrm{ tr}_{2}(R)+8}}{4} \tag{8}\]  
In the case of a simple rotation, \(\theta=\theta_{1}\), \(\theta_{2}=0\), \(\cos\theta=(\mathrm{tr}(R)-2)/2\). For an isoclinic rotation, \(\theta_{1}=\theta_{2}\
eq 0\), \(\cos\theta=\mathrm{tr}(R)/4\). As presented in ref. [25], the [PERSON] formula can be extended from \(SO(3)\) to \(SO(4)\). The Rodrigues formula on \(SO(3)\) in terms of principal angle \(\theta\) and principal axis \(\hat{\varrho}\in\mathbb{R}^{3}\) with \(\|\hat{\varrho}\|=1\) is given by \(R=\exp(\theta\hat{\varrho}^{\times})=I_{3}+\sin\theta[\hat{\varrho}]^{\times} +(1-\cos\theta)([\hat{\varrho}]^{\times})^{2}\), where \(()^{\times}\) is the cross-product operator that maps an element of \(\mathbb{R}^{3}\) to a \(3\times 3\) skew-symmetric matrix, \(\hat{\varrho}^{\times}\in\mathfrak{so}(3)=\{S^{3\times 3}|S^{T}=-S\}\), and \(\mathfrak{so}(3)\) is the Lie algebra associated with the Lie group \(SO(3)\). Using this formulation as a guide, the Rodrigues formula on \(SO(4)\) can be obtained as follows. For a \(4\times 4\) skew-symmetric matrix \(S\in\mathfrak{so}(4)=\{S^{4\times 4}|S^{T}=-S\}\), where \(\mathfrak{so}(4)\) is the Lie algebra associated with the Lie group \(SO(4)\), and \(\sigma(S)=(\pm i\theta_{1},\pm i\theta_{2})\), the decomposition \(S=\theta_{1}S_{1}+\theta_{2}S_{2}\), \(S_{i}\in\mathfrak{so}(4)\) holds such that \(S_{i}^{3}=-S_{i}\), \(i=1,2\), \(S_{1}S_{2}=0\), \(R_{i}=\exp(\theta_{i}S_{i})\), and  
\[R=\exp(S)=\exp(\theta_{1}S_{1}+\theta_{2}S_{2})=R_{1}R_{2}. \tag{9}\]  
Using the properties of the matrix exponential, as well as the power series expansions of \(\sin(x)\) and \(\cos(x)\), this can be reduced to the Rodrigues formula on \(SO(4)\) given by  
\[R=I_{4}+\sin\theta_{1}S_{1}+(1-\cos\theta_{1})S_{1}^{2}+\sin\theta_{2}S_{2}+( 1-\cos\theta_{2})S_{2}^{2}. \tag{10}\]  
Using the formula \(S_{i}^{2}=E_{i}E_{i}^{T}-I_{4}\), \(i=1,2\), in terms of the planes of rotation \(E_{1}\) and \(E_{2}\), where \(S_{i}E_{i}=0\), the symmetric component of \(R\) can be expressed as  
\[\frac{1}{2}(R+R^{T})=(\cos\theta_{1}+\cos\theta_{2}-1)I_{4}+(1-\cos\theta_{1} )E_{1}E_{1}^{T}+(1-\cos\theta_{2})E_{2}E_{2}^{T} \tag{11}\]  
Equation (11) will be used in obtaining the classification of critical points of the Morse-Bott-Lyapunov function. A standard form for matrix \(S\) in Equation (9) is [22]  
\[S= \begin{bmatrix}a^{\times}&b\\ -b^{T}&0\end{bmatrix} = \begin{bmatrix}a\\ b\end{bmatrix} ^{\wedge} \tag{12}\]  
where the \(()^{\vee}\) operator undoes the \"wedge\" (\()^{\wedge}\) operation, such that  
\[S^{\vee}= \begin{bmatrix}a\\ b\end{bmatrix} \in\mathbb{R}^{6} \tag{13}\]  
The standard form for the characteristic equation of a \(4\times 4\) skew-symmetric matrix is  
\[\lambda^{4}+\text{tr}_{2}(S)\lambda^{2}+\text{det}(S)=0. \tag{14}\]  
Using this and Equation (12), it can be shown that \(\text{tr}_{2}(S)=a^{T}a+b^{T}b\) and \(\text{det}(S)=(a^{T}b)^{2}\)[22]. Using the basis assumed in Equation (3), the matrix \(S\) takes the real normal form given by  
\[S=\theta_{1}