# Dynamic Decoupling and Trajectory Tracking for Automated Vehicles Based on the Inverse System
## 3 Methodology
### Decoupling of Dynamics  
#### 3.1.1 Proof of Reversibility  
In order to apply the decoupling algorithm, it is necessary to prove the reversibility of the vehicle dynamic. Here, the proof is derived based on the Interactor Algorithm 1[29; 30]. For a multiple-input and multiple-output (MIMO) nonlinear system, it can be written as  
\[\dot{\mathbf{X}}=f(\mathbf{X},\mathbf{U}), \tag{16}\]  
Figure 2: The decoupling principle of the inverse system. \[\mathbf{Y}=h(\mathbf{X}), \tag{17}\]  
where the input vector is \(\mathbf{U}= \begin{bmatrix}u_{1},u_{2}\ldots,u_{p}\end{bmatrix} ^{T}\), the state vector is \(\mathbf{X}= \begin{bmatrix}x_{1},x_{2}\ldots,x_{n}\end{bmatrix} ^{T}\) and the output vector is \(\mathbf{Y}= \begin{bmatrix}y_{1},y_{2}\ldots,y_{q}\end{bmatrix} ^{T}= \begin{bmatrix} h_{1}(\mathbf{X}),h_{2}(\mathbf{X})\ldots,h_{q}(\mathbf{X})\end{bmatrix} ^{T}\). ```
1: Defining the superscript \(r_{k}\), which means taking the derivative for k-th component \(y_{k}\), \(r_{k}\) is the order when control input \(\mathbf{U}= \begin{bmatrix}u_{1},u_{2}\ldots,u_{p}\end{bmatrix} ^{T}\) firstly appears, and the derivative is noted as \(y_{k}^{(r_{k})}\)
2:For\(k=1\), \(q\)
3: Defining a criterion vector \(\mathbf{\Gamma}_{k}= \begin{bmatrix}\ \ \mathbf{\Gamma}_{k-1}\\ y_{k}^{(r_{k})}\end{bmatrix} \), and \(\mathbf{\Gamma}_{0}\) is null when \(k=1\)
4: Calculating the rank of the Jacobian matrix \(R_{k}=rank(\partial\mathbf{\Gamma}_{k}/\partial\mathbf{U})\)
5: If \(R_{k}=k\)
6:\(\alpha_{k}=r_{k}\)
7: End If
8: End For
9:If\(\sum\limits_{i=1}^{k}\alpha_{k}\leq n\)
10: The system is reversible. 11: End If
``` ```  
**Algorithm 1**Interactor Algorithm  
As for the proposed vehicle dynamics, the output vector is \(\mathbf{Y}= \begin{pmatrix}\dot{x},\dot{y},\dot{\varphi}\end{pmatrix} ^{T}\). Setting \(y_{1}=\dot{x}\), which does not include any input variable, \(\mathbf{\Gamma}_{1}\) needs to be rewritten with respect to its derivative [21]: that is, \(\mathbf{\Gamma}_{1}=y_{1}^{(1)}=\dot{y}\dot{\varphi}+\frac{F_{1}}{m}-\frac{k_{ \mathcal{D}}\dot{x}^{2}}{m}-\frac{2C_{f}\dot{\varphi}^{2}}{m}+2\frac{C_{f} \dot{\varphi}}{m}\frac{\dot{y}}{\dot{x}}+2\frac{C_{f}\dot{\varphi}}{m}\frac{ \dot{y}}{\dot{x}}\), the rank of the Jacobian matrix of \(\mathbf{\Gamma}_{1}\) to \(\mathbf{U}\) is  
\[R_{1}=\text{rank}(\partial\mathbf{\Gamma}_{1}/\partial\mathbf{U})= \begin{bmatrix} \ \frac{1}{m}&2C_{f}\frac{\dot{\varphi}}{\dot{x}}+l\frac{\dot{\varphi}}{\dot{x}}- \delta}{m}&0\end{bmatrix} =1, \tag{18}\]  
So that, \(\alpha_{1}=r_{1}=1\). And \(y_{2}=\dot{y}\), which also does not include any input variable. Hence, setting \(\mathbf{\Gamma}_{2}= \begin{bmatrix}\ \ \mathbf{\Gamma}_{1}\\ y_{2}^{(1)}\end{bmatrix} = \begin{bmatrix}\ \ \ddot{x}\\ \ \ \ddot{y}\end{bmatrix} \),  
\[R_{2}=\text{rank}(\partial\mathbf{\Gamma}_{2}/\partial\mathbf{U})= \begin{bmatrix} \ \ \frac{1}{m}&0&0\\ \ \ \frac{(1-k_{\mathcal{D}})\delta}{m}&\frac{2C_{f}}{m}&0\end{bmatrix} =2, \tag{19}\]  
we can get that \(\alpha_{2}=r_{2}=1\). At last, setting \(\mathbf{\Gamma}_{3}= \begin{bmatrix}\ \ \mathbf{\Gamma}_{2}\\ y_{3}^{(1)}\end{bmatrix} = \begin{bmatrix}\ \ \ddot{x}\\ \ \ddot{y}\\ \ \ \ddot{\varphi}\end{bmatrix} \),  
\[\text{R}_{3}=rank(\partial\mathbf{\Gamma}_{3}/\partial\mathbf{\Gamma})= \begin{bmatrix} \ \ \frac{1}{m}&2C_{f}\frac{\dot{\varphi}}{\dot{x}}+l\frac{\dot{\varphi}}{\dot{x}}- \delta}{m}&0\\ \ \ \frac{(1-k_{\mathcal{D}})\delta}{m}&\frac{2C_{f}}{m}&0\\ \ \ \frac{l_{f}(1-k_{\mathcal{D}})\delta}{l_{z}}&\frac{2C_{f}l_{f}}{l_{z}}&\frac{1} {l_{z}}\end{bmatrix} =3, \tag{20}\]  
and this yields \(\alpha_{3}=r_{3}=1\), then  
\[\sum\limits_{i=1}^{3}\alpha_{3}=3, \tag{21}\]According to the reversibility judgment [31], there is an inverse system for the 4 WID vehicle without hidden dynamics [32], and the input and output of the inverse system are \(\mathbf{U}_{inv}=\left(y_{1}^{(1)},y_{2}^{(1)},y_{3}^{(1)}\right)^{T}=\left(\ddot{x}, \ddot{y},\ddot{\varphi}\right)^{T}\) and \(\mathbf{Y}_{inv}=\left(F_{t},\delta,M_{z}\right)^{T}\).