# Neural Robust Control for a Mobile Agent Leader-Follower System
## 2 Materials and Methods
### Exact State Feedback Linearization  
Let us consider a multiple-input and multiple-output system, given as follows, which could describe the dynamics of the mobile agent:  
\[ \begin{split}\dot{x}&=f(x)+\sum_{i=1}^{m}g_{i}(x)u_ {i},\\ y_{1}&=h_{1}(x),\\ &\ldots\\ y_{m}&=h_{m}(x).\end{split}  \tag{1}\]  
where \(f(x),g_{1}(x),\ldots,g_{m}(x):U\to U\); \(U\in\mathbb{R}^{n}\) is defined as an open set of continuously differentiable vector fields; \(h_{1}(x),\ldots,h_{m}(x)\) are smooth real-valued functions also defined on \(U\), which determine the outputs of the system. The starting point of the analysis is a multivariable version of the relative degree notion. The relative degree (\(r_{i}\)) is exactly the number of times that the \(i\)th output needs to be differentiated (evaluated at \(x=x^{0}\)) for at least one component of the input vector to appear explicitly. A multivariable nonlinear system of the form (1) has a relative degree vector \(\rho=[r_{1},\ldots,r_{m}]\) at a point \(x^{0}\) if  
1. \(L_{g_{i}}L_{f}^{k}h_{i}(x)=0\), for all \(1\leq j\leq m,k<r_{i}-1\) and for all \(x\) in a neighborhood of \(x^{0}\). 2. The following \(m\times m\) matrix: \[\tilde{A}(x)= \begin{bmatrix}L_{g_{1}}L_{f}^{r_{1}-1}h_{1}(x)&\cdots&L_{g_{m}}L_{f} ^{r_{1}-1}h_{1}(x)\\ L_{g_{1}}L_{f}^{r_{2}-1}h_{2}(x)&\cdots&L_{g_{m}}L_{f}^{r_{2}-1}h_{2}(x)\\ \vdots&\ddots&\vdots\\ L_{g_{1}}L_{f}^{r_{m}-1}h_{m}(x)&\cdots&L_{g_{m}}L_{f}^{r_{m}-1}h_{m}(x)\\ \end{bmatrix} \] (2) is nonsingular at \(x^{0}\). Consider for simplicity that previous conditions are satisfied and the system has a relative degree vector \([r_{1},r_{2},\ldots,r_{m}]\) at \(x^{0}\) (considering an equal number of inputs and outputs; thus, \(m=n\)), with sum \(r=r_{1}+\ldots+r_{m}\) exactly equal to \(n\); therefore, there exist \(n\) functions such that they define a mapping as \(\Phi(x)= \begin{bmatrix}z_{1}^{1}(x),\ldots,&z_{r_{1}}^{1}(x),\ldots,z_{1}^{m}( x),\ldots,z_{r_{m}}^{m}(x)\end{bmatrix} ^{T}\), where \(z_{1}^{i}(x)=h_{i}(x)\), \(z_{2}^{i}(x)=L_{f}h_{i}(x)\),..., \(z_{r_{i}}^{i}(x)=L_{f}^{r_{i}-1}h_{i}(x)\), \(i=0,1,\ldots,n\), this mapping has a nonsingular Jacobian at \(x^{o}\) and then is considered as a local coordinate transformation at a neighborhood of \(x^{o}\). Now, differentiating with respect to time, the following canonical system form is obtained: \[\dot{z}_{1}^{i} =z_{2}^{i},\] \[\dot{z}_{2}^{i} =z_{3}^{i},\] \[\ldots\] \[\dot{z}_{r_{i}-1}^{i} =z_{r_{i}}^{i},\] (3) \[\dot{z}_{r_{i}}^{i} =b_{i}(z)+\sum_{j=1}^{m}a_{ij}(z)u_{j},\] \[y_{i} =z_{1}^{i},\] where \[a_{ij}(z)=L_{g_{j}}L_{f}^{r_{i}-1}h_{i}(\Phi^{-1}(z))\quad for\quad 1 \leq i,j\leq m,\] (4) \[b_{i}(z)=L_{f}^{r_{i}}h_{i}(\Phi^{-1}(z))\quad for\qquad 1 \leq i\leq m,\] (5) where \(x=\Phi^{-1}(z)\) is the inverse mapping of transformation matrix, the functions \(a_{ij}(z)\) are exactly the entries of the matrix (2), and \(b_{i}(z)\) are the entries of the vector given by \(b(z)=[L_{f}^{r_{i}}h_{1},L_{f}^{r_{i}}h_{2},\ldots,L_{f}^{r_{m}}h_{m}]^{T}\). System (3) with functions (4) and (5) defines a fully linearizable system via feedback. Now, the next step is to design a control feedback that leads the outputs of the system to a prescribed trajectory \(y_{R}(t)\)[11]; to this end, the tracking control feedback is given as follows:  
\[u_{i}=A^{-1}(z)\Bigg{(}-b_{i}(z)+y_{R}^{(r)}-\sum_{i=1}^{r}c_{i-1}e^{(i-1)}(t) \Bigg{)}, \tag{6}\]  
where \(c_{i},\ldots,c_{i-1}\) are real numbers, and \(e^{(i-1)}(t)=y^{(i-1)}(t)-y_{R}^{(i-1)}(t)\) is the error between the \((i-1)\)th time derivative of the real output and the \((i-1)\)th time derivative of the output reference. It is noticeable that the elements of the matrix \(A^{-1}(z)\) are those mentioned in Equation (4); moreover, the matrix \(A^{-1}(z)\) is the same as the relative degree inverse matrix \(\tilde{A}(\Phi^{-1}(z))\) in Equation (2), that is, \(A^{-1}(z)=\tilde{A}(\Phi^{-1}(z))\).