# Hardware Development and Safety Control Strategy Design for a Mobile Rehabilitation Robot
## 4 Dynamic Models
### Stability Analysis  
The stability of the proposed controller, ILESO-PSMC, is analyzed in this section. For convenience of presentation, we first define the system's equilibrium point as \(\mathbf{x}_{e}=[s_{p}(0),s_{q}(0),x_{p}(0)-x_{q}(0)]\). **Remark 2**: _The controllers (24) and (28) are designed based on the PSMC method and LESO technology. The primary difference between the ILESO-PSMC and traditional PSMC methods is that the states and total disturbance estimations are introduced in the control law to compensate  
Figure 3: The principle of the physical model of ILESO-PSMC. for unmodeled dynamics, disturbances, and uncertainties. The ILESO-PSMC can deal with the problem that the system states cannot directly measure._  
**Remark 3**. : _The ILESO-PSMC (24) and (28) are functions of the LESO's outputs \(\hat{x}_{1}(t),\hat{x}_{2}(t),\hat{x}_{3}(t)\). Since the inputs of LESO are \(x_{1}(t)\) (or \(y(t)\)) and \(u(t)\), the proposed ILESO-PSMC only requires the output \(y(t)\) of the SISO second-order nonlinear system (14)._  
**Theorem 1**. : _For the SISO second-order nonlinear system (14) in which the total uncertainty \(F(\mathbf{x},t)\) is bound (based on Assumption 1), if the observer gain matrix \(\mathbf{L}\) in (19) is selected such that the matrix \(\mathbf{A}_{1}=(\mathbf{A}-\mathbf{LC})\) is Hurwitz, the system output \(y(t)\) asymptotically converges to the equilibrium point of the system using the proposed ILESO-PSMC scheme (24) and (28)._  
Proof. : To simplify the analysis, we only analyze the stability of the sliding surface \(s_{p}\) in this section. The proof of stability of the sliding surface \(s_{q}\) can also be found using the same outcome as follows. The Lyapunov function candidate for the sliding surface \(s_{p}\) is defined as:  
\[V=\frac{1}{2}m_{p}s_{p}^{2}+\frac{1}{2}s_{q}^{2}+\frac{1}{2}(K_{P}+K_{D} \lambda_{h})(x_{p}-\hat{x}_{q})^{2}. \tag{29}\]  
Obviously, the conditions of  
\[\left\{ \begin{array}{ll}V>0,&\mathbf{x}_{e}\
eq 0\\ V=0,&\mathbf{x}_{e}=0\end{array} \right. \tag{30}\]  
are satisfied. By differentiating both sides of \(V\) and substituting (21), (22), and (26) into \(\dot{V}\), the derivation of the Lyapunov function candidate is obtained as:  
\[\dot{V}=s_{p}[m_{p}\ddot{x}_{d}-m_{p}\ddot{x}_{p}+m_{p}\lambda_{h} (\dot{x}_{d}-\dot{x}_{p})]+s_{q}[\ddot{x}_{d}-\dot{x}_{q}+\lambda_{h}(\dot{x} _{d}-\dot{x}_{q})]+ \tag{31}\] \[\quad(K_{P}+K_{D}\lambda_{h})(x_{p}-\dot{x}_{q})(\ddot{x}_{p}- \dot{x}_{q})\] \[=s_{p}[-\gamma\text{sgn}(s_{p})+K_{P}(x_{p}-\dot{x}_{q})+K_{D}( \dot{x}_{p}-\dot{x}_{q})]+s_{q}[\ddot{x}_{d}-\ddot{x}_{q}-\ddot{\bar{x}}_{q}+ \lambda_{h}(\dot{x}_{d}-\dot{\bar{x}}_{q})]+\] \[\quad K_{P}(x_{p}-\dot{x}_{q})(\dot{x}_{p}-\dot{x}_{q})+K_{D} \lambda_{h}(x_{p}-\dot{x}_{q})(\dot{x}_{p}-\dot{x}_{q})\] \[=s_{p}[-\gamma\text{sgn}(s_{p})+K_{P}(x_{p}-\dot{x}_{q})+K_{D}( \dot{x}_{p}-\dot{\bar{x}}_{q})]+s_{q}[\ddot{x}_{d}-F-b_{0}u(t)-\ddot{\bar{x}}_{ q}+\] \[\quad\lambda_{h}(\dot{x}_{d}-\dot{\bar{x}}_{q})]+K_{P}(x_{p}- \dot{x}_{q})(\dot{x}_{p}-\dot{\bar{x}}_{q})+K_{D}\lambda_{h}(x_{p}-\dot{\bar{ x}}_{q})(\dot{x}_{p}-\dot{\bar{x}}_{q})\] \[=s_{p}[-\gamma\text{sgn}(s_{p})+K_{P}(x_{p}-\dot{x}_{q})+K_{D}( \dot{x}_{p}-\dot{\bar{x}}_{q})]+s_{q}[-F+\dot{F}-\ddot{\bar{x}}_{q}-\] \[\quad K_{P}(x_{p}-\dot{\bar{x}}_{q})-K_{D}(\dot{x}_{p}-\dot{\bar{ x}}_{q})]+K_{P}(x_{p}-\dot{\bar{x}}_{q})(\dot{x}_{p}-\dot{\bar{x}}_{q})+K_{D} \lambda_{h}(x_{p}-\dot{\bar{x}}_{q})(\dot{x}_{p}-\dot{\bar{x}}_{q})\] \[=-\gamma|s_{p}|-K_{p}\lambda_{h}(x_{p}-\dot{q}_{q})^{2}-K_{D}( \dot{x}_{p}-\dot{\bar{x}}_{q})^{2}\leq 0.\]  
We know from (30) and (31) that \(V\) is a positive definite function and \(\dot{V}\) is a negative semi-definite function. Because \(\mathbf{A}_{1}=(\mathbf{A}-\mathbf{LC})\) is Hurwitz and the total uncertainty \(F(\mathbf{x},t)\) is bounded (based on Assumption 1), the estimate states \(\dot{\mathbf{x}}(t)\rightarrow\mathbf{x}(t)\) as \(t\rightarrow\infty\).