## 3 Sliding Mode Control with Sliding Perturbation Observer (SMCSPO)  
SPO and SMC has shown efficient performance against perturbation in many studies by employing partial state feedback. The combination of SMC and SPO is known as sliding mode control with sliding perturbation observer (SMCSPO) [40]. In this work, SMC and SPO are used respectively to control and to estimate the reaction force of a 3 DOF robotic manipulator. Generally, second-order dynamics of n-DOF can be represented as  
\[\ddot{x}_{j}=f_{j}(\mathbf{x})+\Delta f_{j}(\mathbf{x})+\sum_{i=1}^{n}\left[( b_{ji}(\mathbf{x})+\Delta b_{ji}(\mathbf{x}))u_{i}\right]+d_{j}(t) \tag{5}\]  
where \(\mathbf{x}\overset{\Delta}{=}\left[\mathbf{X}_{1}\dots\mathbf{X}_{\mathbf{n} }\right]^{T}\) denotes the state vector, \(f_{j}(\mathbf{x})\) and \(\Delta f_{j}(\mathbf{x})\) are the non-linear driving force and uncertainties, respectively, \(b_{ji}\) is the control gain matrix with corresponding uncertainties \(\Delta b_{ji}\), \(d_{j}\) is the external disturbance, and \(u_{j}\) is the control input. \(f_{j}\), \(b_{ji}\) are well-known continuous functions of state, described in [41]. All these uncertainties in joint form can be defined as perturbation, with the mathematical form of the perturbation being as follows,  
\[\psi_{j}(\mathbf{x},t)=\Delta f_{j}(\mathbf{x})+\sum_{i=1}^{n}\left[\Delta b_{ ji}(\mathbf{x})u_{i}\right]+d_{j}(t) \tag{6}\]  
It is assumed that the perturbations are upper bounded by a known continuous function of the state. The continuous function of the state for the upper bound of the perturbation can be defined as follows:  
\[\Gamma_{j}(x,t)=F_{j}(x)+\Sigma\Big{|}\underset{i=1}{\overset{n}{\Phi}} \underset{i=1}{\overset{n}{\Phi}}\underset{j}{\overset{n}{\Phi}}+D_{j}(t)> \Big{|}\Psi_{j}(t)\Big{|} \tag{7}\]  
where \(F_{j}>\Big{|}\Delta f_{j}\Big{|}\), \(\Phi_{ji}>\Big{|}\Delta b_{ji}\Big{|}\) and \(D_{j}>\Big{|}d_{j}\Big{|}\) represent the expected upper bounds of the uncertainties. Let us suppose \(f_{j}(\mathbf{x})\), defined in Equation (5), except the perturbation of Equation (6) is represented as  
\[f_{j}(\hat{x})+\sum_{i=1}^{n}b_{ji}(\hat{x})u_{i}=\alpha_{3j}\overline{u}_{j} \tag{8}\]where \(\alpha_{3j}>0\), and \(\overline{u}_{j}=\) a new control variable. The SPO equations are derived as in [40]. \[\dot{\hat{x}}_{1j}=\hat{x}_{2j}-k_{1j}sat(\overline{x}_{1j}) \tag{9}\]  
\[\dot{\hat{x}}_{2j}=\alpha_{3}\overline{u}_{j}-k_{2j}sat(\overline{x}_{1j})+ \dot{\Psi}_{j} \tag{10}\]  
\[\dot{\hat{x}}_{3j}=\alpha_{3j}^{2}\Big{(}\overline{u}_{j}+\alpha_{3j}\hat{x}_{2 j}-\hat{x}_{3j}\Big{)} \tag{11}\]  
\[\dot{\psi}_{j}=\alpha_{3j}(\alpha_{3}\hat{x}_{2j}-\hat{x}_{3j}) \tag{12}\]  
where \(k_{1j}\), \(k_{2j}\), \(\alpha_{3j}\) are greater than zero and \(\overline{x}=\hat{x}-x\) is the estimation error. \(\dot{\psi}_{j}\) = estimated perturbation. \[sat(\overline{x}_{1j})=\left\{ \begin{array}{l}\overline{x}_{1j}/\Big{|} \overline{x}_{1j}\Big{|},if\Big{|}\overline{x}_{1j}\Big{|}\geq\varepsilon_{0j} \\ \overline{x}_{1j}/\varepsilon_{0j},if\Big{|}\overline{x}_{1j}\Big{|}\leq \varepsilon_{0j}\end{array} \right. \tag{13}\]  
The sliding function is defined as follows:  
\[s_{j}=\dot{e}_{j}+c_{1j}e_{j} \tag{14}\]  
where \(e_{j}=x_{1j}-x_{1 dj}\) is the actual position tracking error, \(c_{1j}>0\). As the sliding surface is reached, we define \(\dot{s}_{j}=0\), and the sliding control is represented as  
\[\dot{s}_{j}=-K_{j}sat(s_{j}) \tag{15}\]  
The new control input \(\overline{u}_{j}\) is designed such that it forces \(\dot{\hat{s}}\)\(<0\) outside of the prescribed manifold.