## 3 Observer and Controller Design for Scratch Formation Reduction
### Stability Analysis of SPO and SMCSPO  
The stability of the SPO and SMCSPO were analyzed. As shown in (4), the perturbation consists of all the nonlinear terms of system dynamics. Each perturbation term is assumed to be upper-bounded by the known continuous functions of the state as follows [9]:  
\[\Gamma(\theta,t)=F(\theta)+\Phi(\theta)u_{c}+D(t)>|\Psi(t)|, \tag{16}\]  
where \(F>|\Delta f|\), \(\Phi>|\Delta b|\), and \(D>|d|\) are the expected upper bounds of uncertain nonlinear terms. In the sliding observer, the conditions for the existence of the sliding mode can be expressed as  
\[ \begin{array}{c}\widetilde{\theta}_{2}\leq k_{1}+\alpha_{1}\widetilde{\theta }_{1},\ (\text{if}\ \widetilde{\theta}_{1}>0),\\ \widetilde{\theta}_{2}\geq-k_{1}+\alpha_{1}\widetilde{\theta}_{1},\ (\text{if}\ \widetilde{\theta}_{1}<0),\end{array}  \tag{17}\]  
where \(\widetilde{\theta}_{1}=\widetilde{x}_{1}\) and \(\widetilde{\theta}_{2}=\widetilde{x}_{2}\) are the estimation errors of the system representing the position and velocity, respectively. When the sliding mode occurs, the resulting error dynamics obtained by (6) and (8) assume the following equation:\[\dot{\widetilde{\theta}}_{2}=-\Psi-\left(\frac{k_{2}}{k_{1}}\right)\widetilde{ \theta}_{2}. \tag{18}\]  
The stability of the sliding observer, \(\widetilde{\theta}_{2}\dot{\widetilde{\theta}}_{2}<0\), can be ensured by setting the following conditions: \(k_{2}>\Gamma\) and \(\left|\widetilde{\theta}_{2}\right|\leq k_{1}\). If \(\widetilde{\theta}_{2}<0\), then the stability is guaranteed and established by (19). \[\dot{\widetilde{\theta}}_{2}=-\Psi-\left(\frac{k_{2}}{k_{1}}\right)\widetilde {\theta}_{2}\geq-\Psi+k_{2}>0 \tag{19}\]  
Using a similar method, if \(\widetilde{\theta}_{2}>0\), then the stability is established by (20). \[\dot{\widetilde{\theta}}_{2}=-\Psi-\left(\frac{k_{2}}{k_{1}}\right)\widetilde {\theta}_{2}\leq-\Psi-k_{2}<0, \tag{20}\]  
where (19) and (20) ensure that \(\widetilde{\theta}_{2}\dot{\widetilde{\theta}}_{2}<0\) by setting \(k_{2}>\Gamma\) and \(\left|\widetilde{\theta}_{2}\right|\leq k_{1}\). Therefore, if the gains (\(k_{1}\) and \(k_{2}\)) are sufficiently large, the stability of the SPO can be guaranteed. To check the closed-loop stability of the SMCSPO, the Lyapunov stability criterion is used, as follows:  
\[ \begin{array}{c}V=\frac{1}{2}s^{2}>0,\\ \dot{V}=\dot{s}<0.\end{array}  \tag{21}\]  
The estimated sliding surface of the SMCSPO is given by (11), which can also be expressed as  
\[\dot{s}=\dot{\theta}_{1}-\dot{\theta}_{1d}+c\left(\dot{\theta}_{1}-\theta_{1d }\right), \tag{22}\]  
where \(\theta_{1d}\) is the desired position, and \(\dot{\widetilde{\theta}}_{1}=\dot{\dot{x}}_{1}\). After the reaching phase, \(\alpha_{1}\) and \(\alpha_{2}\) are set as zero; therefore, (23) can be derived by combining (8) and (22). \[\dot{s}=\dot{\theta}_{2}-\left(\frac{k_{1}}{\epsilon_{0}}\right)\widetilde{ \theta}_{1d}-\dot{\theta}_{1d}+c\left(\dot{\theta}_{1}-\theta_{1d}\right) \tag{23}\]  
Differentiating (23) yields (24), as follows:  
\[\dot{s}=\dot{\theta}_{2}-\left(\frac{k_{1}}{\epsilon_{0}}\right)\dot{ \widetilde{\theta}}_{1}-\ddot{\theta}_{1d}+c\left(\dot{\theta}_{1}-\dot{ \theta}_{1d}\right). \tag{24}\]  
Using the results presented in Section 3.1 and substituting (8) into (24), we obtain  
\[\dot{s}=\alpha_{3}\overline{u}-\frac{k_{2}}{\epsilon_{o}}\widetilde{\theta}_ {1}+\dot{\Psi}-\frac{k_{1}}{\epsilon_{o}}\left[\widetilde{\theta}_{2}-\frac{ k_{1}}{\epsilon_{o}}\widetilde{\theta}_{1}\right]-\dot{\theta}_{1d}+c\left[\dot{ \theta}_{2}-\frac{k_{1}}{\epsilon_{o}}\widetilde{\theta}_{1}-\dot{\theta}_{1d }\right], \tag{25}\]  
where the new control variable (\(\overline{u}\)) is selected to enforce \(\dot{s}\dot{s}<0\) outside a predefined manifold, \(|s|\leq\epsilon_{c}\).