# Distributed Attitude Synchronization for Spacecraft Formation Flying via Event-Triggered Control
## 3 Main Results
: Consider the following Lyapunov function:  
\[V=\sum_{i=1}^{n}\chi_{i}^{T}J_{i}\chi_{i} \tag{16}\]In accordance with (8) and (11), taking the derivative of \(V\) gives:  
\[ \begin{array}{ll}\dot{V}&=2\sum\limits_{i=1}^{n}\chi_{i}^{T}I_{i}\dot{\chi}_{i} \\ &=2\sum\limits_{i=1}^{n}\chi_{i}^{T}\big{(}u_{i}-{\omega_{i}}^{\times}\dot{I}_{i }\omega_{i}-J_{i}\dot{\omega}_{d}+rJ_{i}\dot{e}_{i}\big{)}\\ &=2\sum\limits_{i=1}^{n}\chi_{i}^{T}\Big{(}-k_{i}\hat{\chi}_{i}-rJ_{i}\dot{ \tilde{e}}_{i}+\widetilde{\eta}_{i}\Big{)}\end{array}  \tag{17}\]  
From the definition of \(\chi_{i}\), \(\hat{\chi}_{i}\), and \(\widetilde{\chi}_{i}\), we can get:  
\[ \begin{array}{ll}2\chi_{i}^{T}\hat{\chi}_{i}&=\chi_{i}^{T}(\chi_{i}+ \widetilde{\chi}_{i})+(\hat{\chi}_{i}-\widetilde{\chi}_{i})^{T}\hat{\chi}_{i} \\ &=\chi_{i}^{T}\chi_{i}+\widehat{\chi}_{i}^{T}\hat{\chi}_{i}+\big{(}\chi_{i}^{ T}\hat{\chi}_{i}-\widehat{\chi}_{i}^{T}\hat{\chi}_{i}\big{)}\\ &=\chi_{i}^{T}\chi_{i}+\widehat{\chi}_{i}^{T}\hat{\chi}_{i}-\widehat{\chi}_{i}^ {T}\widehat{\chi}_{i}\end{array}  \tag{18}\]  
Substituting (18) into (17), we have:  
\[ \begin{array}{ll}\dot{V}&=-\sum\limits_{i=1}^{n}k_{i}\chi_{i}^{T}\chi_{i}- \sum\limits_{i=1}^{n}k_{i}\hat{\chi}_{i}^{T}\hat{\chi}_{i}+\sum\limits_{i=1}^ {n}k_{i}\widehat{\chi}_{i}^{T}\widetilde{\chi}_{i}+2\sum\limits_{i=1}^{n} \chi_{i}^{T}\big{(}-rJ_{i}\dot{\tilde{e}}_{i}+\widetilde{\eta}_{i}\big{)}\\ &\leq-\sum\limits_{i=1}^{n}k_{i}\|\chi_{i}\|^{2}-\sum\limits_{i=1}^{n}k_{i}\| \hat{\chi}_{i}\|^{2}+\sum\limits_{i=1}^{n}k_{i}\|\widetilde{\chi}_{i}\|^{2}+ 2\sum\limits_{i=1}^{n}\|\chi_{i}\|\Big{(}r\|I_{i}\|\Big{\|}\dot{\tilde{e}}_{i} \Big{\|}+\|\widetilde{\eta}_{i}\|\Big{)}\end{array}  \tag{19}\]  
Based on [PERSON]'s inequality, we get:  
\[\|\chi_{i}\|\Big{\|}\dot{\tilde{e}}_{i}\Big{\|}\leq\frac{1}{2}\bigg{(}\|\chi_ {i}\|^{2}+\left\|\tilde{\tilde{e}}_{i}\right\|^{2}\bigg{)} \tag{20}\]  
\[\|\chi_{i}\|\|\widetilde{\eta}_{i}\|\leq\frac{1}{2}\Big{(}\|\chi_{i}\|^{2}+\| \widetilde{\eta}_{i}\|^{2}\Big{)} \tag{21}\]  
Then, substituting (20) and (21) into (19) gives:  
\[ \begin{array}{ll}\dot{V}\leq-\sum\limits_{i=1}^{n}k_{i}\|\chi_{i}\|^{2}- \sum\limits_{i=1}^{n}k_{i}\|\widehat{\chi}_{i}\|^{2}+\sum\limits_{i=1}^{n}k_{ i}\|\widetilde{\chi}_{i}\|^{2}+\sum\limits_{i=1}^{n}r\|I_{i}\|\bigg{(}\|\chi_{i} \|^{2}+\left\|\tilde{\tilde{e}}_{i}\right\|^{2}\bigg{)}+\sum\limits_{i=1}^{n} \Bigl{(}\|\chi_{i}\|^{2}+\left\|\widetilde{\eta}_{i}\right\|^{2}\Bigr{)}\\ =-\sum\limits_{i=1}^{n}(k_{i}-r\|I_{i}\|-1)\|\chi_{i}\|^{2}-\sum\limits_{i=1}^ {n}k_{i}\|\widehat{\chi}_{i}\|^{2}+\sum\limits_{i=1}^{n}k_{i}\|\widetilde{ \chi}_{i}\|^{2}+\sum\limits_{i=1}^{n}r\|I_{i}\|\Big{\|}\dot{\tilde{e}}_{i} \|^{2}+\sum\limits_{i=1}^{n}\|\widetilde{\eta}_{i}\|^{2}\end{array}  \tag{22}\]  
Define \(\alpha_{1i}^{2}=k_{i}\) and \(\alpha_{2i}^{2}=r\|I_{i}\|\), where \(\alpha_{1i}\) and \(\alpha_{2i}\) are positive. According to the definition of \(k_{i}\), it is obvious that \(\alpha_{1i}>\alpha_{2i}\) and \(\alpha_{1i}>1\) hold true. Moreover, if \(x>0\), \(y>0\), and \(z>0\), the inequality \(x^{2}+y^{2}+z^{2}\leq(x+y+z)^{2}\) holds. According to the above analysis, (22) can be recast as:  
\[ \begin{array}{ll}\dot{V}\leq-\sum\limits_{i=1}^{n}k_{0}\|\chi_{i}\|^{2}- \sum\limits_{i=1}^{n}k_{i}\|\hat{\chi}_{i}\|^{2}+\sum\limits_{i=1}^{n}\Bigl{(} \alpha_{1i}\|\widetilde{\chi}_{i}\|+\alpha_{2i}\|\tilde{\tilde{e}}_{i}\|+\| \widetilde{\eta}_{i}\|\Bigr{)}^{2}\\ \leq-\sum\limits_{i=1}^{n}k_{0}\|\chi_{i}\|^{2}-\sum\limits_{i=1}^{n}k_{i}\| \hat{\chi}_{i}\|^{2}+\sum\limits_{i=1}^{n}k_{i}\Bigl{(}\|\widetilde{\chi}_{i}\| +\left\|\tilde{\tilde{e}}_{i}\right\|+\left\|\tilde{\eta}_{i}\right\|\Bigr{)}^{2} \end{array}  \tag{23}\]  
From the proposed event-driven strategy (15), we obtain:  
\[\|\widetilde{\chi}_{i}\|+\left\|\tilde{\tilde{e}}_{i}\right\|+\|\widetilde{ \eta}_{i}\|\leq\frac{\sqrt{2}}{2}\|\hat{\chi}_{i}\|+c_{1}e^{-c_{2}\tanh(t)} \tag{24}\]Combining (23) and (24), we have:  
\[