# Research on Trajectory Planning and Tracking Methods for Coal Mine Mobile Robots
## 2 Trajectory Planning Based on MINCO Trajectory Classes
### Differential Flatness-Based Control Optimization Trajectories
#### 2.1.4 Trajectory Optimization Solution without Cost Function  
The trajectory \(z^{*}(t)\) is the optimal solution to problem (17) if the trajectory \(z^{*}(t):[t_{0},t_{M}]\) satisfies the sufficient and necessary condition for optimality. The optimality condition is described as the optimal solution when \(z^{*}(t)\) exists and is unique if and only if all the following conditions are satisfied [29]:  
* For any \(1\leq i\leq M,z^{*}(t):[t_{i-1},t_{i}]\) is a polynomial with \(2s-1\) order;
* The trajectory \(z^{*}(t):[t_{0},t_{M}]\) should satisfy formula (17c) and (17d);
* For any \(1\leq i\leq M\), the trajectory \(z^{*}(t)\) satisfies \(\overline{d}_{i}-1\) order continuous differentiability at \(t_{i}\), where \(\overline{d}_{i}=2s-d_{i}\). By applying the optimality condition, there is a direct way to obtain an optimal trajectory without the aid of a cost function. For an \(m\) dimensionally \(N\)th (\(N=2s-1\)) polynomial trajectory, the segment \(i\) can be expressed as:  
\[p_{i}(t)=\mathbf{c}_{i}^{T}\beta(t-t_{i-1}),t\in[t_{i-1},t_{i}] \tag{18}\]  
where \(\mathbf{c}_{i}\in R^{2s\times m}\) and \(\beta(x)=\left(1,x,\ldots,x^{N}\right)^{T}\) are the coefficient matrix and basis of the polynomial, respectively. For ease of understanding, the trajectory is represented using relative time, i.e., the timeline \(t_{0}=0\). A multiband polynomial trajectory can then be represented by a matrix of coefficients \(\mathbf{c}\in R^{2 Ms\times m}\) and a time vector \(\mathbf{T}\in R^{M}_{>0}\):  
\[\mathbf{c}=\left(\mathbf{c}_{1}^{T},\ldots,\mathbf{c}_{M}^{T}\right)^{T}\mathbf{,}\mathbf{T}= \left(T_{1},\ldots,T_{M}\right)^{T} \tag{19}\]  
where \(T_{i}\) is the time elapsed in the trajectory of segment \(i\), the total length of the trajectory is \(T=\|\mathbf{T}\|_{1}\). The \(i\)th timestamp of the trajectory is the sum of the times of the previous trajectories, i.e., \(t_{i}=t_{1}+t_{2}+\ldots+t_{i-1}+t_{i}\). Define the \(M\) segment polynomial trajectory \(p:[0,T]\) as:  
\[p(t)=p_{i}(t),\forall t\in[t_{i-1},t_{i}),\forall i\in\{1,\ldots,M\} \tag{20}\]  
The unique optimal solution to problem (17) can be computed by enforcing the optimality sufficiency and necessary condition on the coefficient matrix \(\mathbf{c}\). \(\mathbf{D}_{0},\mathbf{D}_{M}\in R^{s\times m}\) is the initial and termination boundary conditions of the whole trajectory, \(\mathbf{D}_{i}\in R^{d_{i}\times m}\)is intermediate derivative conditions at the time-stamped \(t_{i}\), and each column of \(\mathbf{D}_{i}\) is a dimension of the intermediate conditions. Therefore, the intermediate condition at \(t_{i}\) can be expressed by the coefficient matrix \(\mathbf{E}_{i},\mathbf{F}_{i}\in R^{2s\times 2s}\) as follows:  
\[ \begin{pmatrix}\mathbf{E}_{i}&\mathbf{F}_{i}\end{pmatrix}\begin{pmatrix}\mathbf{c}_{i}\\ \mathbf{c}_{i+1}\end{pmatrix} = \begin{pmatrix}\mathbf{D}_{i}\\ \mathbf{0}_{\overline{d}_{i}\times m}\end{pmatrix}  \tag{21}\]  
where  
\[ \begin{gathered}\mathbf{E}_{i}=(\beta(T_{i}),\dots,\beta^{d_{i}-1}( T_{i}),\beta(T_{i}),\dots,\beta^{\overline{d}_{i}-1}(T_{i}))^{T}\\ \mathbf{F}_{i}=(\mathbf{0},-\beta(0),\dots,\beta^{\overline{d}_{i}-1}(0))^{T}\end{gathered}  \tag{22}\]  
For the initial and termination boundary conditions of the trajectory, they are \(\mathbf{E}_{M},\mathbf{F}_{0}\in R^{s\times 2s}\), expressed as shown below:  
\[ \begin{gathered}\mathbf{F}_{0}=(\beta(0),\dots,\beta^{(s-1)}(0))^{T} \\ \mathbf{E}_{M}=(\beta(T_{M}),\dots,\beta^{(s-1)}(T_{M}))^{T}\end{gathered}  \tag{23}\]  
Thus, a system of linear equations with respect to the coefficient matrices is obtained by enforcing a sufficient and necessary condition of optimality on the coefficient matrices:  
\[\mathbf{M}\mathbf{c}=\mathbf{b} \tag{24}\]  
The coefficient matrix \(\mathbf{c}\) solved by this system of equations is the optimal coefficient matrix, where \(\mathbf{M}\in R^{2M\text{s}\times 2M\text{s}}\) and \(\mathbf{b}\in R^{2M\text{s}\times m}\) are as follows:  
\[\mathbf{M}=