## 3 Design of the Improved NMPC Controller
### Design of an Improved NMPC Controller Based on Sliding Mode Variable Structure  
During the in-orbit service of an actual space robot, the dynamic parameters will change due to factors such as fuel consumption, and the space robot will inevitably be affected by external disturbances. Therefore, considering the influence of parameter uncertainty and external disturbances, the practical dynamic model of the in-orbit service free-floating dual-arm space robot is  
\[\mathbf{M}\cdot\ddot{\mathbf{q}}(t)+\mathbf{h}=\mathbf{u}+\mathbf{d} \tag{31}\]  
where \(\mathbf{M}\) and \(\mathbf{h}\) are the actual inertia matrix and the actual bias force vector of the free-floating dual-arm space robot, respectively, and \(\mathbf{d}\) is the external disturbance.  
The sliding mode function is taken as  
\[\mathbf{s}=\dot{\mathbf{e}}(t)+\mathbf{P}\cdot\mathbf{e}(t)+\mathbf{V}\cdot\int_{0}^{t}\mathbf{e}(t)dt \tag{32}\]  
where \(\mathbf{e}(t)=\mathbf{q}(t)-\mathbf{q}_{d}(t)\), \(\dot{\mathbf{e}}(t)=\dot{\mathbf{q}}(t)-\dot{\mathbf{q}}_{d}(t)\), \(\mathbf{P}=2\mathbf{\Lambda}\), \(\mathbf{V}=\mathbf{\Lambda}^{2}\), \(\mathbf{\Lambda}\) is a positive definite diagonal matrix of size \(9\times 9\), \(\lambda_{i}\) is a diagonal element of \(\mathbf{\Lambda}\), and \(\lambda_{i}>0\).  
The sliding mode hyperplane is  
\[\dot{\mathbf{s}}=\ddot{\mathbf{e}}(t)+\mathbf{P}\cdot\dot{\mathbf{e}}(t)+\mathbf{V}\cdot\mathbf{e}(t) \tag{33}\]  
According to \(\ddot{\mathbf{e}}(t)=\ddot{\mathbf{q}}(t)-\ddot{\mathbf{q}}_{d}(t)\), Equation (33) can be re-expressed as  
\[\dot{\mathbf{s}}=\ddot{\mathbf{q}}(t)-[\ddot{\mathbf{q}}_{d}(t)-\mathbf{P}\cdot\dot{\mathbf{e}}(t) -\mathbf{V}\cdot\mathbf{e}(t)] \tag{34}\]  
The reference acceleration \(\ddot{\mathbf{q}}_{r}(t)\) is taken as  
\[\ddot{\mathbf{q}}_{r}(t)=\ddot{\mathbf{q}}_{d}(t)-\mathbf{P}\cdot\dot{\mathbf{e}}(t)-\mathbf{V} \cdot\mathbf{e}(t) \tag{35}\]  
Then, Equation (34) can be re-expressed as  
\[\dot{\mathbf{s}}=\ddot{\mathbf{q}}(t)-\ddot{\mathbf{q}}_{r}(t) \tag{36}\]  
According to Equation (31), we can obtain  
\[\ddot{\mathbf{q}}(t)=\mathbf{M}^{-1}\cdot(\mathbf{u}+\mathbf{d}-\mathbf{h}) \tag{37}\]  
According to Equation (37), Equation (36) can be re-expressed as  
\[\dot{\mathbf{s}}=\mathbf{M}^{-1}\cdot[\mathbf{u}+\mathbf{d}-\mathbf{h}-\mathbf{M}\cdot\ddot{\mathbf{q}}_{ r}(t)] \tag{38}\]By substituting Equations (20), (30) and (35) into Equation (38), we can obtain  
\[\dot{s}=\mathbf{M}^{-1}\cdot(\mathbf{u}_{c}+\Delta\mathbf{u}) \tag{39}\]  
where \(\Delta\mathbf{u}\) is the uncertainty of the system.  
According to Equation (39), we can obtain  
\[\mathbf{s}^{\mathrm{T}}\cdot\dot{s}=\mathbf{s}^{\mathrm{T}}\cdot\mathbf{M}^{-1}\cdot(\mathbf{u} _{c}+\Delta\mathbf{u}) \tag{40}\]  
**Theorem 1**.: _Suppose there is a positive definite matrix \(\mathbf{B}\in\mathcal{R}^{a\times a}\) of \(a\times a\) and there is a positive real number \(b>0\) such that \(b\cdot\mathbf{I}>\mathbf{B}\) holds, where \(\mathbf{I}\) is the identity matrix of size \(a\times a\). Suppose any vector \(\mathbf{y}\in\mathcal{R}^{a}\) and \(\|\mathbf{y}\|\leq\rho\); then, for any vector \(\mathbf{x}\in\mathcal{R}^{a}\), the following inequality holds:_  
\[\mathbf{x}^{\mathrm{T}}\cdot\mathbf{B}\cdot\mathbf{y}\leq b\cdotp\cdot\|\mathbf{x}\| \tag{41}\]  
According to Theorem 1, we can obtain  
\[\mathbf{s}^{\mathrm{T}}\cdot\mathbf{M}^{-1}\cdot\Delta\mathbf{u}\leq\frac{1}{\underline{ m}}\cdotp\cdot\|\mathbf{s}\| \tag{42}\]  
where \(\underline{m}\) is the infimum of \(\mathbf{M}\).  
Because \(\|\mathbf{s}\|\leq\sum\limits_{i=1}^{9}|\mathbf{s}_{i}|\), then according to Equations (40) and (42), we can obtain  
\[\mathbf{s}^{\mathrm{T}}\cdot\dot{\mathbf{s}}\leq\frac{1}{\underline{m}}\cdotp\cdot \sum\limits_{i=1}^{9}|\mathbf{s}_{i}|+\mathbf{s}^{\mathrm{T}}\cdot\mathbf{M}^{-1}\cdot\mathbf{ u}_{c} \tag{43}\]