# Driverless Bus Path Tracking Based on Fuzzy Pure Pursuit Control with a Front Axle Reference
## 2 Controller Design
### Longitudinal Control  
The velocity of the driverless bus is divided into acceleration control and deceleration control. Since the acceleration is controlled by the VCU of the driverless bus, and only the deceleration is controllable, this section mainly concerns deceleration control. The structure of the longitudinal control is shown in Figure 11. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \(s\)\(v\)\(l_{d}\) & NB & NM & NS & ZO & PS & PM & PB \\ \hline NB & NB & NB & NM & NS & ZO & PS & PS \\ NM & NB & NM & NS & ZO & ZO & PS & PS \\ NS & NM & NS & ZO & ZO & PS & PS & PM \\ ZO & NM & NS & ZO & PS & PM & PM \\ PS & NS & NS & ZO & ZO & PS & PM & PM \\ PM & NS & ZO & ZO & PS & PM & PM & PB \\ PB & ZO & PS & PS & PS & PM & PB & PB \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Rule base of \(l^{\prime}_{d}\). Figure 10: The surface of outputs. (**a**) The surface of \(l^{\prime}_{d}\). (**b**) The surface of \(k\). \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \(v\)\(l_{d}\) & NB & NM & NS & ZO & PS & PM & PB \\ \hline NB & PB & PB & PB & PS & ZO & NS & NB \\ NM & PB & PB & PB & PS & ZO & NS & NB \\ NS & PB & PB & PB & PS & ZO & NS & NB \\ ZO & PB & PB & PM & ZO & NS & NM & NB \\ PS & PB & PB & PM & ZO & NM & NB & NB \\ PM & PB & PB & PM & NS & NM & NB & NB \\ PB & PB & PB & PM & NS & NM & NB & NB \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Rule base of \(k\). In Figure 11, the feedback control mainly focuses on deceleration \(a_{fb}\) which is calculated by the PI controller. TD is applied to calculate the fast tracking of the desired velocity which is shown as \(v_{d}\). The feedforward controller provides the compensation of deceleration \(a_{ff}\) and velocity \(v_{1}\) according to the road slope. Compensations are used to release the influence of the road slope. The feedback-forward control algorithm is introduced to deceleration. The deceleration is calculated by Equation (11):  
\[a=a_{ff}+a_{fb} \tag{11}\]  
where \(a\in[a_{\min},a_{\max}]\). The deceleration is negative, thus, \(a_{\min}\leq a_{\max}\leq 0\). The local path planning calculates \(v_{d}\) and it only gives the limit velocity rather than a velocity curve. If the driverless bus needs to stop, the desired velocity jumps to 0. To smooth the desired velocity, TD is applied to calculate the fast tracking of the desired velocity [27]. The main idea of TD is that there exists a curve that \(v^{\prime}_{d}(k)\) tracks \(v_{d}(k)\) without overshoot, and the curve is defined by the discrete time optimal control (DTOC) law [28]. In this paper, the fast tracking of the desired velocity is used as the target in PI. The longitudinal system is a discrete-time double-integral system [28]. The discrete algorithm of TD is given as Equation (12):  
\[\left\{ \begin{array}{l}u(k)=f(v^{\prime}_{d}(k)-v_{d},\dot{v^{\prime}_{d}}( k-1),r,h)\\ v^{\prime}_{d}(k)=v^{\prime}_{d}(k-1)+h\dot{v^{\prime}_{d}}(k)\\ \dot{v^{\prime}_{d}}(k)=\dot{v^{\prime}_{d}}(k-1)+h\dot{v}u(k)\end{array} \right. \tag{12}\]  
where \(v_{d}\) is the desired velocity. \(v^{\prime}_{d}(k)\) is the fast tracking of the desired velocity. \(r\) denotes the fast factor. \(h\) indicates the step length. \(f(\cdot)\) is the discrete time optimal control (DTOC) law. \(u(k)\) is the outputs of the DTOC. \(k\) is the control step. The law of DTOC is shown as Equation (13). \[\left. \begin{array}{l}f\dot{s}=f(x_{1},x_{2},r,h)\\ \left\{\begin{array}{l}d=r\dot{h},d_{0}=h\dot{d}\\ y=x_{1}+h\dot{x}_{2},a_{0}=\sqrt{d^{2}+8\dot{\cdot}r\left|y\right|}\\ a=\left\{\begin{array}{l}x_{2}+(a_{0}-d)\dot{s}ign(y)\\ x_{2}+y/h\end{array}\right.\left|y\right|>d_{0}\\ y\left|\right.\leq d_{0}\end{array}\right.\\ f=\left\{\begin{array}{l}-r\dot{s}ign(a)\\ -r\dot{a}/d\end{array}\right.\left|a\right|\leq d\end{array} \right. \tag{13}\]  
where \(sign(\cdot)\) is the symbolic function. Figure 12 illustrates the different transient profiles of desired velocities with different \(r\) and \(h\). It is obvious that the fast tracking of the desired velocity is smooth.