# Multi-Body Dynamics Modeling and Simulation of Maglev Satellites
## 3 Design of Three Body Multi Closed Loop Control Law
### Design of Payload-Centered Attitude Pointing Control Law
Based on the multivariable super-twisting theory, the observer is designed as follows:_  
\[\dot{\mathbf{Z}}_{1} =\mathbf{Z}_{2}-\lambda_{1}\frac{\mathbf{e}_{1}}{\|\mathbf{e}_{1}\|_{2}^{1/2 }}-\lambda_{2}\mathbf{e}_{1}\|\mathbf{e}_{1}\|_{2}^{\zeta-1}+\mathbf{h}_{p}+\mathbf{B}_{p}\bm {u}_{pl}+\mathbf{B}_{p}\mathbf{D}\] \[\dot{\mathbf{Z}}_{2} =-\lambda_{3}\frac{\mathbf{e}_{1}}{\|\mathbf{e}_{1}\|_{2}} \tag{48}\]  
_where \(\mathbf{Z}_{1}\) and \(\mathbf{Z}_{2}\) are observation variables, \(\mathbf{e}_{1}\) is observation error, satisfying \(\mathbf{e}_{1}=\mathbf{Z}_{1}-\mathbf{x}_{1}\); \(\lambda_{1}\), \(\lambda_{2}\), \(\lambda_{3}\), and \(\zeta\) are scalar parameters of the observer, satisfying:_  
\[\lambda_{3}>4L_{d},\lambda_{1}>\sqrt{2\lambda_{3}},\lambda_{2}>0,\zeta>1 \tag{49}\]  
_where \(\mathbf{D}_{1}\) is unknown and bounded, and according to \(\mathbf{D}_{p}=\mathbf{B}_{p}\mathbf{D}_{1}\), \(\left\|\dot{\mathbf{D}}_{p}\right\|_{2}\leq L_{d}\) holds._  
For unknown bounded interference \(\mathbf{D}_{p}\), observer errors \(\mathbf{e}_{1}=\mathbf{Z}_{1}-\mathbf{x}_{1}\) and \(\mathbf{e}_{2}=\mathbf{Z}_{2}-\mathbf{x}_{2}\) are defined. When the parameter conditions in the observer satisfy the equation, there exists a finite time \(T_{o}\) that makes \(\mathbf{Z}_{2}=\mathbf{D}_{p}\) hold for any \(t\geq T_{o}\), where \(T_{o}\) satisfies:  
\[ \begin{split}\mathrm{T}_{o}&\leq\left(\frac{1}{ \lambda_{2}(\zeta-1)\eta^{c-1}}+\frac{2(\sqrt{3}\eta)^{1/2}}{\lambda_{1}}+ \frac{K}{M}\right)\\ &\times\left(1+\frac{M}{m\left(1-\sqrt{2\lambda_{3}}/\lambda_{1} \right)}\right)+\frac{\sqrt{3}K}{m}\end{split}  \tag{50}\]  
where \(M\), \(m\), \(\eta\), and \(K\) are scalar parameters that satisfy: \(M=\lambda_{3}+L_{d}m=\lambda_{3}-L_{d}\), \(\eta=\left(3^{1/4}\lambda_{1}/\lambda_{2}\right)^{1/(\zeta+0.5)}\), \(K\geq\|\mathbf{e}_{2}(0)\|_{2}\). Based on the estimation of unknown interference \(\mathrm{D}\) by the observer, design a non-singular terminal sliding surface \(\mathbf{s}\) as follows:  
\[\mathbf{s}=\mathbf{K}(\mathbf{q}_{pev})\mathbf{q}_{pev}+\mathrm{sig}^{\tau_{2}}(\hat{\mathbf{q}}_ {pev}) \tag{51}\]  
where \(\mathbf{K}(\mathbf{q}_{qev})\) is a diagonal matrix. The diagonal element \(\mathbf{K}(\mathbf{q}_{qev})\) of \((i=1,2,3)\) is:  
\[k(q_{qev,i})=(a\big{|}q_{qev,i}\big{|}^{p-1/(k\tau_{2})}+b\big{|}q_{qev,i} \big{|}^{s-1/(k\tau_{2})})^{k\tau_{2}} \tag{52}\]  
The sliding surface parameter conditions are \(a>0\), \(b>0\), \(k>1\), \(2>r_{2}>1\), \(1<gk\leq 2k-1\), and \(1/r_{2}<pk<1\) hold. When \(s=0\) is established, the system states \(\mathbf{q}_{pev}\) and \(\hat{\mathbf{q}}_{pev}\) on the sliding surface converge to the origin within a fixed time \(\mathrm{S}\), while \(q_{p00}\) and \(\mathbf{\omega}_{pe}\) converge to \(1\) (or \(-1\)) and \(\mathbf{0}_{3\times 1}\), respectively: if \(q_{p00}(0)>0\), \(q_{p00}\) will converge to \(1\). If \(q_{pe0}(0)<0\), \(q_{p0}\) will converge to \(-1\). The convergence time \(T_{s}\) satisfies:  
\[T_{s}\leq\frac{2^{(1-pk)/2}}{a^{k}3^{1-k}(1-pk)}+\frac{2^{(1-gk)/2}}{b^{k}3^{1- k}(gk-1)} \tag{53}\]  
Design the NFFTSMS law as follows:  
\[ \begin{split}\mathbf{u}_{pl}&=-\frac{1}{r_{2}}\mathbf{B}_{p ^{-1}}\big{[}\overline{\mathbf{K}}(q_{pev})+\mathbf{K}(q_{pev})\big{]}\mathrm{sig}^{2-r _{2}}(\hat{\mathbf{q}}_{pev})-\mathbf{B}_{p^{-1}}\mathbf{h}_{p}\\ &-\frac{1}{r_{2}}\mathbf{B}_{p^{-1}}diag\Big{\{}\kappa\big{(}\big{|} \hat{\mathbf{q}}_{pev}\big{|}^{r_{2}-1}\Big{)}\Big{\}}diag\bigg{\{}\big{|}\hat{\mathbf{ q}}_{pev}\big{|}^{1-r_{2}}\bigg{\}}\\ &\times\mathrm{sig}^{k_{1}}(\mathrm{sig}^{p_{1}}(s)+\hat{\rho} \mathrm{sig}^{\delta_{1}}(s))-\mathbf{B}_{p^{-1}}\rho\mathrm{sgn}(\mathbf{s})\\ &-\mathbf{B}_{p}^{-1}\mathbf{Z}_{2}-\mathbf{D}\end{split}  \tag{54}\]where \(k_{1}>1\), \(0<p_{1}k_{1}<1\), \(1<g_{1}k_{1}<2k_{1}-1\), \(\alpha>0\), \(\beta>0\) and \(\rho>0\). \(\kappa(\left|\hat{q}_{pev}\right|^{r_{2}-1})\) is a nonlinear function that satisfies:  
\[\kappa(x)= \begin{cases}\sin(\frac{\pi n^{2}}{2\tau^{2}})&|x|<\tau\\ 1&|x|\geq\tau\end{cases}