# Decentralized Consensus Protocols on \(SO(4)^{N}\) and \(Tso(4)^{N}\) with Reshaping
## 2 Background
### Morse-Bott-Lyapunov Function and Reshaping
To classify the critical points and determine the stability of these equilibria, the second variation of Equation (19) is obtained as  
\[\delta^{2}V(R)=-\frac{1}{2}\sum_{n=1}^{q}nb_{n}\operatorname{tr}(R^{n}\Sigma^ {2})=\frac{1}{2}(\Sigma^{\vee})^{T}\Psi(R)(\Sigma^{\vee}) \tag{28}\]  
where the Hessian is defined as  
\[\dot{V}(R)=-\frac{1}{2}\sum_{n=1}^{q}b_{n}\operatorname{tr}(R^{n}\Omega)=( \Omega^{\vee})^{T}\psi(R) \tag{20}\]0  
and  
\[H(R)= \begin{bmatrix}\operatorname{tr}(R_{11})I_{3}-\frac{1}{2}(R_{11}+R_{11}^ {T})&\frac{1}{2}(R_{12}+R_{21}^{T})^{\times}\\ -\frac{1}{2}(R_{12}+R_{21}^{T})^{\times}&\frac{1}{2}(R_{11}+R_{11}^{T})+R_{22} I_{3}\end{bmatrix} . \tag{30}\]  
The matrices \(R_{ij}\) are submatrices of \(R\) that result from partitioning as  
\[R= \begin{bmatrix}R_{11}&R_{12}\\ R_{21}&R_{22}\end{bmatrix}  \tag{31}\]  
and \(R_{11}\in\mathbb{R}^{3\times 3}\), \(R_{12}\in\mathbb{R}^{3\times 1}\), \(R_{21}\in\mathbb{R}^{1\times 3}\), \(R_{22}\in\mathbb{R}\). Evaluating \(\Psi(R)\) at the critical points, the identity configuration is a Morse critical point with \(\Psi(I_{4})=2I_{6}\sum_{n=1}^{q}nb_{n}>0\). Similarly, the submanifolds of \(\pi\) rotations in \(\theta_{1}\) and/or \(\theta_{2}\) are non-Morse critical points, where using the normal form in Equation (3) and Assumptions 1 and 2 yields \(\Psi(diag([1,1,-1,-1]))\) as a diagonal matrix with matrix elements \(\Psi_{(3,3)}>2\) and \(\Psi_{(6,6)}=-2\), while \(\Psi(diag([-1,-1,1,1]))\) has \(\Psi_{(3,3)}=-2\) and \(\Psi_{(6,6)}>2\), both resulting in indefinite \(\Psi(R)\), while \(\Psi(diag([-1,-1,-1,-1])=-2I_{6}\). Equation (11) can be used to calculate \(\Psi\) in terms of the planes of rotation \(E_{1},E_{2}\). Since using different planes of rotation \(E_{1}\) and \(E_{2}\) would not change the eigenvalues of \(\Psi(R)\), it is seen that \(\Psi(R)\) is non-degenerate in the directions normal to the equilibrium manifold and degenerate along the tangent directions to the critical manifold, corresponding to rotations by \(\pi\). Thus, Equation (33) is a Morse-Bott-Lyapunov function. Therefore, there is a neighborhood of \(R=I_{4}\) where \(\dot{V}(R)<0\), while, because the submanifolds of rotations by \(\pi\) constitute a set of zero measure in \(SO(4)\), the stability of \(R=I_{4}\) in Equation (25) can be strengthened to almost global asymptotic stability (AGAS). Reshaping is a protocol strategy that has been presented in [16; 20]. The coefficients \(q\) and \(b_{n}\) are chosen as defined in [20], with the restrictions in Assumptions 1-3 for the Base case and two reshaping cases as follows:  
* Base case (no reshaping): \(q=b_{1}=1\);
* Case 1 reshaping: \(q=3\), \((b_{1},b_{2},b_{3})=(1.1819,0.4326,0.2278)\);
* Case 2 reshaping: \(q=5\), \((b_{1},b_{2},b_{3},b_{4},b_{5})=(1.1081,0.3872,0.2886,0.1676,0.0942)\). Consider the function \(f(\theta)=\sum_{n=1}^{q}b_{n}\sin(n\theta)\) in the reshaping strategy. This function is derived from the Fourier series expansion of an odd function of one of the principal rotation angles [20]. This function for the Base case and reshaping cases 1 and 2 is shown in Figure 2. Both presented reshaping functions defined by Fourier expansions show that the PRA associated with the maximum of \(f(\theta)\) is decreased with respect to \(90^{\circ}\) for the Base case. Specifically, \(\arg\max f(\theta)=50^{\circ}\) for Case 1 reshaping and \(35^{\circ}\) for Case 2 reshaping. Although the reshaping strategy does not affect the stability in Equation (25) for a single agent, it will be seen that the location of the maximum of \(f(\theta)\) determines the stability of certain non-consensus equilibria of the closed-loop dynamics for the multi-agent problem. This is used to increase the region of attraction of the consensus manifold of the multi-agent system with the possibility of AGAS stability if no other equilibria are locally stable, as will be seen in the next section.