# Hardware Development and Safety Control Strategy Design for a Mobile Rehabilitation Robot
## 4 Dynamic Models
### Integration of LESO within PSMC  
Most previous work has proved that PSMC can passively compensate for disturbance in a closed-loop control dynamic. However, the stability of PSMC has not been well addressed. This paper proposes the integration of LESO within PSMC to estimate the system's states and total disturbance and to provide stable tracking control. We provide a straightforward and simple proof of stability for the dynamic system. Figure 3 illustrates the principle of the physical model of ILESO-PSMC. In ILESO-PSMC, a virtual object, a \"proxy\", is assumed to be connected to a physical actuator. Before proceeding to the ILESO-PSMC design, we first define the following sliding manifolds:  
\[s_{p}(t)=\dot{x}_{d}(t)-\dot{x}_{p}(t)+\lambda_{h}(x_{d}(t)-x_{p}(t)) \tag{21}\]  
and  
\[s_{q}(t)=\dot{x}_{d}(t)-x_{q}(t)+\lambda_{h}(x_{d}(t)-x_{q}(t)), \tag{22}\]where \(\lambda_{h}\) is a positive constant, \(x_{d}(t)\) is the desired trajectory, \(x_{p}(t)\) and \(x_{q}(t)\) is the proxy output and the actuator output, respectively. It is difficult to directly measure the state, disturbance, and uncertainty of the actual system; Equation (22) is modified by the idea of the LESO, as follows:  
\[s_{q}(t)=\dot{x}_{d}(t)-\hat{x}_{q}(t)+\lambda_{h}(x_{d}(t)-\hat{x}_{q}(t)), \tag{23}\]  
where \(\hat{x}_{q}(t)\) is the estimate of \(x_{q}(t)\). It is noted that Equation (23) presents the tracking states of the proxy and the actuator. In Figure 3, the PD-type virtual coupling could drive the states \(\mathbf{x}_{p}(t)=\big{[}x_{p}(t),\quad\dot{x}_{p}(t)\big{]}^{T}\) of the actuator to the states \(\mathbf{x}_{q}(t)=\big{[}x_{q}(t),\quad\dot{x}_{q}(t)\big{]}^{T}\) of the proxy, and the ILESO-PSMC generated the force \(f_{smc}(t)\) exerted on the proxy, as follows:  
\[\begin{split} f_{smc}(t)&=\gamma\text{sgn}(s_{p}( t))-K_{p}(x_{p}(t)-\hat{x}_{q}(t))+m_{p}\ddot{x}_{d}(t)+m_{p}\lambda_{h}( \dot{x}_{d}(t)-\dot{x}_{p}(t))-K_{D}(\dot{x}_{p}(t)-\dot{\hat{x}}_{q}(t))\\ &\quad+\frac{1}{S_{0}}\big{[}-\hat{F}(\mathbf{x}(t),t)+K_{p}(x_{ p}(t)-\hat{x}_{q}(t))+K_{D}(\dot{x}_{p}(t)-\dot{x}_{q}(t))+\lambda_{h}(\dot{x}_{ d}(t)-\dot{x}_{q}(t))+\ddot{x}_{d}(t)\big{]},\end{split} \tag{24}\]  
where \(\hat{F}(\mathbf{x}(t),t)\) is the total uncertainty estimated by the LESO, \(m_{p}\) denotes the proxy mass, \(K_{P}>0\) and \(K_{D}>0\) are constants representing the proportional and differential gains, \(\gamma>0\), and \(\text{sgn}(s_{p}(t))\) is the signum function. The virtual coupling is represented as:  
\[f_{smc}(t)=\frac{1}{S_{0}}\big{[}-\hat{F}(\mathbf{x}(t),t)+K_{P}(x_{p}(t)- \hat{x}_{q}(t))+K_{D}(\dot{x}_{p}(t)-\hat{x}_{q}(t))+\lambda_{h}(\dot{x}_{d}(t )-\dot{\hat{x}}_{q}(t))+\ddot{x}_{d}(t)\big{]}. \tag{25}\]  
Please note that the proposed virtual coupling force \(f_{cou}(t)\) is not a pure PD-type controller. Because the force \(f_{cou}(t)\) acts directly on the controlled actuator and its reaction force acts on the proxy, the following equation of motion is obtained based on [PERSON]'s second law of motion:  
\[\begin{split} m_{p}\ddot{x}_{p}(t)&=f_{smc}(t)-f_{ com}(t)\\ &=\gamma\text{sgn}(s_{p}(t))-K_{P}(x_{p}(t)-\hat{x}_{q}(t))+m_{p} \ddot{x}_{d}(t)+m_{p}\lambda_{h}(\dot{x}_{d}(t)-\dot{x}_{p}(t))-K_{D}(\dot{x} _{p}(t)-\dot{\hat{x}}_{q}(t)).\end{split} \tag{26}\]  
Since the proxy is a virtual object and its mass is 0, Equation (26) can be expressed as:  
\[\dot{x}_{p}(t)=\frac{1}{K_{D}}\Big{[}\gamma\text{sgn}(\Phi(t))-K_{P}(x_{p}(t)- \hat{x}_{q}(t))+K_{D}\dot{\hat{x}}_{q}(t)\Big{]}, \tag{27}\]  
where \(\Phi(t)=\frac{K_{D}\big{(}\dot{x}_{d}(t)-\dot{\hat{x}}_{q}(t))+K_{D}\lambda_{h }(x_{d}(t)-x_{p}(t))+K_{P}(x_{p}(t)-\dot{\hat{x}}_{q}(t))}{\gamma}\). Substituting Equation (27) into Equation (25), the ILESO-PSMC can be applied to the actual actuator as:  
\[u(t)=f_{cou}(t)=\frac{1}{S_{0}}\Big{[}-\hat{F}(t)+\lambda_{h}(\dot{x}_{d}(t)- \hat{x}_{q}(t))+\ddot{x}_{d}(t)+\gamma\text{sgn}(\Phi(t))\Big{]}. \tag{28}\]