# Automated and Controlled System for Analysis of Residual Limbs Thermograms of Transtibial Amputees
## 3 Methodology
### Control Solution
#### 3.4.2 Tracking Trajectory Problem  
The dynamic model representing the automated cabin (3), including the motor actuating the wheel (4), can be rewritten using a state variable representation as follows:  
\[\dot{q}=f(q)+Bu,\]  
where \(q=[q_{1},q_{2},q_{3}]^{\top}\), \(q_{1}=\theta\), \(q_{2}=\dot{\theta}\), and \(q_{3}=I\), considering the relation between the angles \(\alpha\) and \(\theta\) given in (2), and considering that the motor torque \(\tau_{0}=K_{\tau}I\), with \(K_{\tau}\) as the torque constant, the function \(f\colon\mathbb{R}^{3}\to\mathbb{R}^{3}\) and constant vector \(B\in\mathbb{R}^{3}\) are described as  
\[f= \begin{bmatrix}q_{2}\\ \phi_{1}\sin{q_{1}}+\phi_{2}q_{3}\\ \phi_{3}q_{2}+\phi_{4}q_{3}\end{bmatrix} ,\quad B= \begin{bmatrix}0\\ 0\\ \phi_{5}\end{bmatrix} .\]  
where \(\phi_{1}=-\dfrac{(m_{1}+m_{2})g}{(m_{1}+2m_{2})l^{\prime}}\), \(\phi_{2}=\dfrac{RK_{\tau}}{rl^{2}(m_{1}+2m_{2})}\), \(\phi_{3}=-\dfrac{K_{m}l}{rL_{m}}\), \(\phi_{4}=-\dfrac{R_{m}}{L_{m}}\) and \(\phi_{5}=\dfrac{1}{L_{m}}\). The control strategy considers partial state constraints on the tracking error \(\Delta=[\Delta_{1},\Delta_{2}]^{\top}\), \(\Delta_{1}=q_{1}-q_{1}^{*}\), \(\Delta_{2}=q_{2}-q_{2}^{*}\), where \(q_{1}^{*}\) and \(q_{2}^{*}\) are the state variables to represent the desired path with the following dynamics \(q_{1}^{*}=q_{2}^{*}\), \(q_{2}^{*}=h(q^{*})\), where \(h\colon\mathbb{R}^{2}\to\mathbb{R}\) is a smooth function. Thus, the extended dynamics considering the tracking error and the electrical model of the motor can be represented as  
\[ \begin{array}{c}\dot{\Delta}_{1}=\Delta_{2},\\ \dot{\Delta}_{2}=\phi_{1}\sin{q_{1}}+\phi_{2}q_{3}-h(q^{*}),\\ q_{3}=\phi_{3}q_{2}+\phi_{4}q_{3}+\phi_{5}u.\end{array}  \tag{5}\]  
Here, the following assumptions are considered. **Assumption 1**. : _The reference path \(q_{1}^{*}\) is smooth, bounded, and its derivatives are bounded, i.e.,_  
\[|q_{1}^{*}|\leq q_{1}^{+},|q_{2}^{*}|\leq q_{2}^{+},|h(q*)|\leq h^{+},\forall t \in\mathbb{R}^{+},\]  
_where \(q_{1}^{+},q_{2}^{+}\) and \(h^{+}\) are positive constants._  
**Assumption 2**. : _The parameters \(\phi_{i}\), \(i=\{1,\ldots,5\}\) are unknown constants, and are bounded in the following sense:_  
\[|\phi_{i}|\leq\phi_{i}^{+},\]  
_where \(\phi_{i}^{+}\) are positive constants._  
The control design uses a Nussbaum class of function; this type of function satisfies the following definition. **Definition 1** ([18]). : _A function \(N\colon\mathbb{R}\to\mathbb{R}\) is called a Nussbaum-type function if it satisfies_  
\[\limsup_{s\to\infty}\int\limits_{s_{0}}^{s}N(\psi)d\psi=+\infty,\ \ \liminf_{s\to\infty}\int\limits_{s_{0}}^{s}N(\psi)d\psi=-\infty.\]  
_For this work, we use the Mittag-Leffler function \(N(\psi)=-k_{N}\psi^{\alpha_{N}}\), \(\alpha_{N}\in(2,3]\), and \(k_{N}>0\)[19]._  
Taking the above-mentioned Nussbaum function, the following lemma is an important preliminary for the control presented here. **Lemma 1** ([18]). : _Let \(U(\cdot)\) be a Lyapunov function, \(N(\cdot)\) be a Nussbaum function, and \(\psi(\cdot)\) be a smooth function defined in \([0,t_{f})\). For \(t\in[0,t_{f})\), if the following inequality is valid:_  
\[U(t)\leq c_{0}+e^{-c_{1}t}\int_{0}^{t}(\upsilon N(\psi)+1)\dot{\psi}e^{c_{1} \tau}d\tau,\forall t\in[0.t_{f}),\]  
_with \(v\) as a nonzero constant, and \(c_{0}\) and \(c_{1}\) as positive constants,_  
_then \(U(t)\), \(\psi(t)\) and \(e^{-c_{1}t}\int_{0}^{t}(\upsilon N(\psi)+1)\psi e^{c_{1}\tau}d\tau\) are bounded \(\forall t\in[0,t_{f})\)._  
The following theorem summarizes the result of the proposed controller. The control solution considers the methods proposed in [18; 20; 21; 22; 23], in such a way that the control ensures the restriction fulfillment for the tracking error, the ultimate boundedness for all the states to the equilibrium point, and the asymptotic convergence of the tracking error. **Theorem 1**.