# Hardware Development and Safety Control Strategy Design for a Mobile Rehabilitation Robot
## 4 Dynamic Models
### Linear Extended State Observer Design  
In practical applications, model disturbances and uncertainties are unavoidable in practical applications but usually cannot be measured directly; this degrades the control performance of the system. In this study, a linear extended-state observer (LESO), first presented previously [37], was introduced to estimate the system's uncertainties, variable states and the unmodeled dynamics from measurable variables. The LESO regards all factors affecting the system, including nonlinearities, uncertainties, and disturbances that needed to be observed as a total uncertainty (i.e., extended state) [37]. Involving the extended state has the advantages of relative independence of the mathematical model of the plant, better performance, and simplified implementation. For Equation (14), assuming that \(g_{0}\) is the nominal value of \(g(\mathbf{x}(t),t)\) and \(\Delta g(\mathbf{x}(t),t)\) is the associated uncertainties, we can have:  
\[g(\mathbf{x}(t),t)=g_{0}+\Delta g(\mathbf{x}(t),t). \tag{15}\]  
If the total uncertainty \(F(\mathbf{x}(t),t)\) that needs to be estimated is defined as  
\[F(\mathbf{x}(t),t)=f(\mathbf{x}(t),t)+\Delta g(\mathbf{x}(t),t)u(t)+d( \mathbf{x}(t),t) \tag{16}\]  
and the extended state of LESO \(x_{3}(t)\) is chosen as the term of \(F(\mathbf{x}(t),t)\), the SISO second-order nonlinear system (14) can be extended and be rewritten as  
\[\left\{ \begin{array}{l}\dot{x}_{1}(t)=x_{2}(t)\\ \dot{x}_{2}(t)=x_{3}(t)+g_{0}u(t)\\ \dot{x}_{3}(t)=w_{1}(t)\\ y(t)=x_{1}(t)\end{array} \right., \tag{17}\]  
where \(w(t)=\dot{F}(\mathbf{x}(t),t)\) is the rate of change of the uncertainty. Equation (17) shows that all the uncertainties, including modeling errors and external disturbances, are lumped into the single term \(F(\mathbf{x}(t),t)\). **Assumption 1** ([38]). : _The total uncertainty \(F(\mathbf{x},t)\) is continuously differentiable for the SISO second-order nonlinear system (14) and the inequality of \(\left|\dot{F}\right|\leq\eta\) is satisfied, where \(\eta\) is a positive constant._A vector form of the extended-order system (17) can be represented as (18) by defining \(\underline{\mathbf{x}}(t)=\left[x_{1}(t),\quad x_{2}(t),\quad x_{3}(t)\right]^{T} \in R^{3}\) as the extended state vector. \[\left\{ \begin{array}{l}\dot{\underline{\mathbf{x}}}(t)=\mathbf{A}\underline{ \mathbf{x}}(t)+\mathbf{B}u(t)+\mathbf{D}w(t)\\ y(t)=\mathbf{C}\underline{\mathbf{x}}(t)\end{array} \right., \tag{18}\]  
\[\text{where }\mathbf{A}= \begin{bmatrix}0&1&0\\ 0&0&1\\ 0&0&0\end{bmatrix} ,\mathbf{B}= \begin{bmatrix}0\\ g_{0}\\ 0\end{bmatrix} ,\mathbf{C}= \begin{bmatrix}1\\ 0\\ 0\end{bmatrix} ^{T},\mathbf{D}= \begin{bmatrix}0\\ 0\\ 1\end{bmatrix} .\text{We can design the LESO for the extended-order system (17) as:  
\[\dot{\underline{\mathbf{x}}}(t)=\mathbf{A}\underline{\mathbf{\hat{x}}}(t)+ \mathbf{B}u(t)+\mathbf{L}\mathbf{C}(\underline{\mathbf{x}}(t)-\underline{ \mathbf{\hat{x}}}(t)), \tag{19}\]  
where \(\underline{\mathbf{\hat{x}}}(t)=\left[\hat{x}_{1}(t),\quad\hat{x}_{2}(t), \quad\hat{x}_{3}(t)\right]^{T}\) represents the observed state vector of LESO, \(\mathbf{L}=\left[ \begin{matrix}\alpha_{1},&\alpha_{2},&\alpha_{3}\end{matrix}  \right]^{T}\) is the gain matrix of the designed observer. Usually, the observer-gained \(\mathbf{L}\) is solvable through the pole placement method. For simplicity in the observer design, however, we selected the observer gain \(\mathbf{L}\) according to the required bandwidth of the observer, represented as  
\[\mathbf{L}=\left[ \begin{matrix}\alpha_{1},&\alpha_{2},&\alpha_{3}\end{matrix}  \right]^{T}=\left[ \begin{matrix}3w_{1},&3w_{1}^{2},&w_{1}^{3}\end{matrix}  \right]^{T}, \tag{20}\]  
where \(w_{1}\) should be larger than zero and is the only tuning parameter for the LESO. In general, the larger the observer bandwidth is, the more accurate the estimation is. However, the large observer bandwidth increases noise sensitivity.