# Asymmetric Constrained Control of a Cervical Orthotic Device Based on Barrier Sliding Modes
## 5 Control Design Based on an Asymmetric Barrier Lyapunov Function
### System Decomposition  
The uncertain system (4) can be decomposed as \(n\)-second order systems, that is,  
\[ \begin{array}{l}\dot{x}_{1,i}=x_{2,i}\\ \dot{x}_{2,i}=f_{i}(x)+g_{i}(x_{1,i})u_{i}+\sum_{i=1,j\
eq j}^{n}g_{ij}(x_{1}) u_{j}+\psi_{i}(x_{1},t),\end{array}  \tag{6}\]  
where \(g_{i}\) is the diagonal matrix taking the element \(g_{i,i}\) of matrix \(G(x)\)\(i\)-th element of function, \(f_{i}\) is the \(i\)th element of function \(F\). The matrix \(g_{ij}\) groups the effect of the remaining control actions \(u_{j}\) with \(i\
eq j\). Taking into account the definition of the tracking error \(z_{i}\), its dynamics becomes  
\[ \begin{array}{l}\dot{z}_{1,i}=z_{2,i}\\ \dot{z}_{2,i}=f_{i}(x)+g_{i}(x_{1,i})u_{i}+\sum_{i=1,i\
eq j}^{n}g_{ij}(x_{1}) u_{j}+\psi_{i}(x_{1},t)-\ddot{y}_{r,i}.\end{array}  \tag{7}\]  
Let proposes the following control to solve the tracking trajectory task  
\[u_{i}=g_{i}^{-1}(u_{a,i}+u_{b,j}), \tag{8}\]in last equation, the component \(u_{a,i}\) compensates the nonlinear dynamics and the interaction of the control components in the \(i\)-th state, that is  
\[u_{a_{i}}= \begin{cases}-f^{+}-\gamma_{i}z_{2,i}-\sum\limits_{i=1,i\
eq j}^{n}g_{ i,j}u_{i,j}+\dot{y}_{r,i}&\text{if }\sigma(s_{i})=1\\ \\ -f^{-}-\gamma_{i}z_{2,i}-\sum\limits_{i=1,i\
eq j}^{n}g_{i,j}u_{i,j}+\dot{y}_{r,i}&\text{if }\sigma(s_{i})=0\end{cases}  \tag{9}\]  
the definition of function \(\sigma(\cdot)\) is  
\[\sigma(\cdot):= \begin{cases}1&\text{if}\quad\cdot>0\\ 0&\text{if}\quad\cdot\leq 0\end{cases}  \tag{10}\]  
and \(s_{i}\) is the \(i\)-th component of the sliding surface, which is defined as,  
\[s_{i}=z_{2,i}+\gamma_{i}z_{1,i}, \tag{11}\]  
here, \(\gamma_{i}\in\mathbb{R}^{+}\) defines the rate of convergence of the tracking error. The control component \(u_{b_{i}}\) forces the tracking error to converge in finite time to the sliding surface defined in (11), and it has the following definition  
\[u_{b_{i}}=-\bar{k}_{i}(t)\text{sign}(s_{i}) \tag{12}\] \[\bar{k}_{i}:= \begin{cases}\bar{k}_{i}^{+}&\text{if}\,\sigma(s_{i} )=1\\ \bar{k}_{i}^{-}&\text{if}\,\sigma(s_{i})=0\end{cases} \]  
the definition of the adaptive gains are the following  
\[ \begin{split}\bar{k}_{i}^{+}&=\bar{k}_{s_{i}}(0.5)^{ \frac{3}{2}}\mu_{i}\frac{1}{1-\eta_{b,i}}+\text{sign}\big{(}\eta_{b_{i}}\big{)} \frac{\Psi_{i}^{+}}{1-\eta_{b,i}},\\ \bar{k}_{i}^{-}&=\underline{k}_{s_{i}}(0.5)^{\frac{3}{2}}\mu_{i} \frac{1}{1-\eta_{a,i}}+\text{sign}(\eta_{a_{i}})\frac{\Psi_{i}^{-}}{1-\eta_{a,i}},\end{split}  \tag{13}\]  
with \(\mu_{i}\geq 0\). The values of \(\eta_{a,i}\) and \(\eta_{b,i}\) are defined as  
\[\eta_{a_{i}}:=\frac{s_{i}}{\underline{k}_{s_{i}}},\qquad\eta_{b_{i}}:=\frac{ s_{i}}{\underline{k}_{s_{i}}}, \tag{14}\]  
and \(s_{i}\) is the sliding surface, that is,  
\[s_{i}=z_{2,i}+\gamma_{i}z_{1,i}. \tag{15}\]  
Notice that the sliding surface has the following bounds based on the constraints imposed over the states  
\[\underline{k}_{s_{i}}\leq s_{i}(t)\leq\bar{k}_{s_{i}},\quad\forall t\geq 0 \tag{16}\]  
\[\underline{k}_{s_{i}}:=dk_{a_{i}}+\gamma_{i}k_{a_{i}},\qquad\bar{k}_{s_{i}}:=dk _{b_{i}}+\gamma_{i}k_{b_{i}}.\]  
The main result of this manuscript is given in the following Theorem  
Theorem 1: _Let consider the close-loop system in (7) that represents the tracking error for a mechanical system in form of Equation (6). If the control action is selected as in Equation (8) with \(\mu>0\) and the time varying gains described by Equation (13). Then, the origin of the sliding surface is a finite-time equilibrium point with a convergence time defined as_  
\[T(s)\leq\sqrt[4]{0.5}\min_{i\in 1,2,\ldots,n}\left(\frac{\sqrt{V(s_{i})}}{u_{i}^{0. 5}}\right), \tag{17}\]  
_and the tracking error has an asymptotically stable equilibrium point at the origin._  
Proof.