# Decentralized Consensus Protocols on \(SO(4)^{N}\) and \(Tso(4)^{N}\) with Reshaping
## 4 Consensus on \(Tso(4)^{n}\) with Reshaping
### Proposed Consensus Protocol on \(TSO(4)^{n}\)  
Similar to the strategy proposed for \(SO(4)^{N}\) in Section 3.1, the \(TSO(4)^{N}\) reshaped Lyapunov candidate function is proposed as  
\[V(R_{j}^{T}R_{i},\Omega_{i})=\frac{k_{p}}{2}\sum_{1\leq i<j\leq N}a_{ij}\sum_{ n=1}^{q}\frac{b_{n}}{n}\operatorname{tr}(I_{4}-(R_{j}^{T}R_{i})^{n})+\frac{1}{4} \sum_{i=1}^{N}\operatorname{tr}(\Omega_{i}^{T}\Omega_{i}). \tag{46}\]  
Using the relation \((\Omega_{i}^{\gamma})^{T}\Omega_{i}^{\gamma}=\frac{1}{2}\|\Omega_{i}\|_{F}^{2 }=\frac{1}{2}\operatorname{tr}(\Omega_{i}^{T}\Omega_{i})\), the derivative of Equation (46) becomes  
\[\dot{V}(R_{j}^{T}R_{i},\Omega_{i})=k_{p}\sum_{i=1}^{N}(\Omega_{i}^{\gamma})^{T} \sum_{j=1}^{N}a_{ij}\psi(R_{j}^{T}R_{i})+\sum_{i=1}^{N}(\Omega_{i}^{\gamma})^ {T}\tau_{i}. \tag{47}\]  
Let \(R_{i}\Omega_{i}R_{i}^{T}={}^{\mathcal{N}}\Omega_{i}\) represent the angular rate dyadic resolved into the inertial frame and \({}^{\mathcal{N}}\Omega^{\vee}=[{}^{\mathcal{N}}\Omega_{1}^{\vee}{}^{\mathcal{ N}}\Omega_{2}^{\vee}{}^{T}\quad\dots\quad{}^{\mathcal{N}}\Omega_{N}^{\vee}{}^{ \mathcal{N}}]^{T}\) denote the stacked vector of angular rate dyadics for all agents. The relation  
\[{}^{\mathcal{N}}\Omega_{1}^{\vee}=B_{i}\Omega_{i}^{\vee}=(R_{i}\Omega_{i}R_{i }^{T})^{\vee} \tag{48}\]  
is used to express the Lyapunov derivative, where \(B_{i}\in O(6)\) is obtained in terms of the submatrices of \(R_{i}\) as  
\[B_{i}= \begin{bmatrix}cof(R_{i11})&(R_{i12})^{\times}\\ -R_{i11}(R_{i21})^{\times}&R_{i22}R_{i11}-R_{i12}R_{i21}\end{bmatrix}  \tag{49}\]  
In Equation (49), \(cof()\) represents the cofactor matrix and \(R_{i}\) is decomposed into submatrices as defined in Equation (31). The proposed consensus protocol in terms of the relative PRAs and angular rate dyadic resulting from Equation (52) becomes  
\[\tau_{i}=-k_{p}\sum_{j=i}^{N}a_{ij}\psi(R_{j}^{T}R_{i})-k_{d}\sum_{j=i}^{N}a_{ ij}[\Omega_{i}^{\vee}-(R_{i}^{T}R_{j}\Omega_{j}R_{j}^{T}R_{i})^{\vee}]-k_{i} \Omega_{i}^{\vee}. \tag{50}\]  
where \(k_{i}>0\) for at least one value of \(i\) and \(k_{i}=0\) otherwise. The purpose of the last term in Equation (50) is to bring the angular rate tensors to zero. Equations (45) and (50) yield the reshaped closed loop given by  
\[\dot{R}_{i}=R_{i}\Omega_{i},\quad\dot{\Omega}_{i}=-k_{p}\sum_{j=i}^{N}a_{ij}[ \psi(R_{j}^{T}R_{i})]^{\wedge}-k_{d}\sum_{j\
eq i}a_{ij}[\Omega_{i}-(R_{i}^{T }R_{j}\Omega_{j}R_{j}^{T}R_{i})]-k_{i}\Omega_{i}. \tag{51}\]  
Furthermore, utilizing Equations (48) and (49), Equation (47) can now be expressed as  
\[\dot{V}=-({}^{\mathcal{N}}\Omega^{\vee})^{T}((k_{d}\mathcal{L}+K)\otimes I_{6 })({}^{\mathcal{N}}\Omega^{\vee})<0 \tag{52}\]  
where \(K=diag(k_{1},\dots,k_{N})\). Since it was assumed that \(k_{i}>0\) for at least one value of \(i\), the matrix in Equation (52) is positive definite. The largest invariant set where the Lyapunov rate vanishes is \(M=\{(R_{i},{}^{\mathcal{N}}\Omega_{i}^{\vee}):(\mathcal{L}\otimes I_{6})({}^{ \mathcal{N}}\Omega^{\vee})=0\}\). Hence, \(\dot{V}=0\) when \(\Omega_{i}=0\) for \(i=1,\dots,N\). However, no solution can stay in the set \(\{(R_{i},\Omega_{i}):\Omega_{i}=0_{4}\}\) other than when the PRAs associated with the relative configuration \(R_{j}^{T}R_{i}\) are \(0\) or \(\pi\) (corresponding to consensus or partial consensus equilibria) or for the case of non-consensus equilibria, because, to obtain \(\dot{\Omega}=0\), Equation (51) requires that \(\sum_{j=1}^{N}a_{ij}(\psi(R_{j}^{T}R_{i}))^{\wedge}=0\) for \(i=1,\dots,N\). As in consensus on \(SO(4)^{N}\), there are three possible classifications for the stability of equilibria when evaluating \(\dot{V}(R_{j}^{T}R_{i},\Omega_{i})=0\). Consensus equilibria corresponds to \(R_{j}^{T}R_{i}=1_{4},\Omega_{i}=0_{4}\), implying that the relative configuration PRAs are \(\theta_{ij1},\theta_{ij2}=0\) for all \((i,j)\) pairs. Since this configuration represents the minimum in Equation (46), it is concluded that the consensus equilibrium with \(\Omega_{i}=0\) is locally asymptotically stable.