# 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.2 Trajectory Optimization in Flat Space  
Denote the flat output of the mobile robot as \(z(t)[0,T]\in R^{m}\). In order to generate usable trajectories for the mobile robot, the trajectories in a flat output space are straightforward optimized, and appropriate constraints are assigned with them (safety constraints and human-defined constraints). The state trajectories \(x(t)\) and control trajectories \(u(t)\) of the whole system are then obtained using \(\Psi_{x}\) and \(\Psi_{u}\) for flat mapping relations for \(z(t)\). In order to make the planned trajectory as smooth as possible, the quadratic planning form of the control quantities is chosen as the cost function to optimize \(z(t)\). In order to make the trajectory feasible, the system constraints of the mobile robot are divided into two parts. The first part is the spatial safety constraint, i.e., the trajectory must avoid obstacles to achieve collision-free capabilities, which can be expressed as:  
\[z(t)\in\mathcal{F},\forall t\in[0,T] \tag{7}\]  
where \(\mathcal{F}\) denotes the set of obstacle-free spaces, i.e., the passable area. The second part of the constraints are human-defined dynamic constraints, such as speed and acceleration limits of the robot, which can be expressed as:  
\[\mathcal{G}_{D}(x(t),u(t))\underline{\prec}\mathbf{0},\forall t\in[0,T] \tag{8}\]  
Dynamic constraints can be written in the form of representations of \(z(t)\) by mapping \(\Psi_{x}\) and \(\Psi_{u}\):  
\[\Psi_{x}(z^{[s-1]}(t)),\Psi_{u}(z^{[s]}(t))\underline{\prec}\mathbf{0},\forall t \in[0,T] \tag{9}\]  
Differential flatness is then utilized to express the state \(x(t)\) and control \(u(t)\) in the form of their finite order derivatives. Then, the constraint of Equation (9) can be expressed as:  
\[\mathcal{G}(z(t),\dot{z}(t),\ldots,z^{(s)}(t))\underline{\prec}\mathbf{0}, \forall t\in[0,T] \tag{10}\]where \(\mathcal{G}\) is a vector function with dimension related to the customized constraints. In summary, the control cost-optimized trajectory problem with a time-regular term for a differential flat robot system can be described as:  
\[ \begin{split}&\min_{z(t),T}\!\!\int_{0}^{T}v(t)^{T}Wv(t)dt+\rho(T) \qquad\quad(a)\\ & z^{(s)}(t)=v(t),\forall t\in[0,T]\qquad\quad(b)\\ &\mathcal{G}(z(t),\ldots,z^{(s)}(t))\underline{\sim}\mathbf{0}, \forall t\in[0,T]\quad(c)\\ & z(t)\in\mathcal{F},\forall t\in[0,T]\qquad\quad(d)\\ & z^{[s-1]}(0)=\Xi_{0},z^{[s-1]}(T)=\overline{z}_{f}\qquad(e) \end{split}  \tag{11}\]  
where \(W\in R^{m\times m}\) is a diagonal matrix with all positive elements, \(\overline{z}_{0}\in R^{ms}\) is the starting boundary condition of the trajectory, \(\overline{z}_{f}\in R^{ms}\) is the terminating boundary condition, and \(\rho(T)\) is a time regular term which is a positive real number. Further assumptions on the constraints \(\rho\), \(\mathcal{G}\), and \(\mathcal{F}\) can make the description of problem (11) more concrete. First for the time-regularity term, it can generally be taken as \(\rho_{s}(T)=k_{\rho}T\) to prevent the trajectory from taking too long to reach the end point, or it can be of the following form to expect the total time of the trajectory to be a deterministic value:  
\[\rho_{f}(T)= \begin{cases}0\quad\text{if }T=T_{\Sigma}\\ \infty\quad\text{if }T\
eq T_{\Sigma}\end{cases}  \tag{12}\]  
For a nonlinear constraint \(\mathcal{G}\), it is required that it satisfies at least second-order differentiability and continuity. For the constraint space \(\mathcal{F}\), it can be approximated as a concatenation of \(M\) feasible subregions, i.e.,:  
\[\mathcal{F}\simeq\widetilde{\mathcal{F}}=\overset{M}{\underset{i}{\cup}} \mathcal{P}_{i} \tag{13}\]  
It is also specified that the local connections between these feasible subregions are sequential, i.e.,:  
\[ \begin{cases}\mathcal{P}_{i}\cap\mathcal{P}_{i}=\varTheta&if|i-j|=2\\ Int(\mathcal{P}_{i}\cap\mathcal{P}_{i})\
eq\varTheta&if|i-j|\leq 1\end{cases}