# A Hierarchical Control System for Autonomous Driving towards Urban Challenges
## 2 Hierarchical Control System
### Vehicle Control Strategy
#### 2.3.2 Adaptive-Pure Pursuit Algorithm Based-Lateral Controller
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Whole Trajectory (m)** & **A1 Area (m)** & **A2 Area (m)** & **A3 Area (m)** \\ \hline \(\centering\xi_{x}\) & 0.0037 & 0.0128 & 0.0029 & 0.0201 \\ \(\centering\xi_{x}\) & 0.0078 & 0.0162 & 0.0232 & 0.0227 \\ \(\centering\xi\) & 0.0057 & 0.0145 & 0.0130 & 0.0214 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The errors of path tracking algorithm. Figure 12: The path tracking results in the structured environment, (**b–d**) are corresponding to part A1, A2, A3 of (**a**). ### Velocity Tracking Based on SFF-PI Controller

The vehicle modeling uses MATLAB and Simulink with the dynamic model specified in Vehicle Dynamics Blockset. In this simulation, the vehicle model with one degree-of-freedom (1 DOF) was used. A simulation model was developed to compare control strategies between a feedforward PID [26], a SFF-PI [26], a Predictive [35] controller and ours approach as shown in Figure 14. Our method uses two SFF-PI controllers described in Algorithm 1, and the controllers have also tuned the parameters. We implement the SFF-PI controller as in Algorithm 1. The parameters for the accelerating controller are updated as follows

\[K_{FF}=0.1;\,K_{AW}=1;\,v_{0}=5;\,\,\{K_{P},K_{I}\}=\left\{ \begin{array}{l}\{ 0.2,100\};\,v<5\\ \{6v-29,100v\};\,5\leq v<10\\ \{6v-30,100v\};\,10\leq v<20\\ \{100,2100\};\,v\geq 20\end{array} \right.. \tag{24}\]

We also adjust the parameters of the braking controller as

\[K_{FF}=0.2;\,K_{AW}=1;\,v_{0}=5;\,\,\{K_{P},K_{I}\}=\left\{ \begin{array}{l}\{ 0.005,100\};\,v<5\\ \{0.09v-0.35,10v+100\};\,5\leq v<10\\ \{0.1v-0.4,10v+100\};\,10\leq v<15\\ \{0.1v-0.5,20v+100\};\,15\leq v<20\\ \{1.2,250\};\,v\geq 20\end{array} \right.. \tag{25}\]

The results in Figure 14 indicate that our controller outperforms other controllers. Figure 14b shows the accelerating process of ours has the best outcome. The most outstanding result was working on the braking process, as in Figure 14c,d. Figure 13: Histogram of the path tracking errors. In a real test, the performance of our longitudinal controller is provided in Figure 15. The output speed tracks the desired velocity with a small steady-state error. The result in Figure 15 is a part of the complete result in the proving ground. The desired velocity is generated by using curvature information indicated in Section 2.3.2. The response velocity tracks with a small steady-state error without overshoot because of the limit of acceleration and brake in [\(-\)0.8;0.8]. The setting time from 9 kph to 40 kph is approximately 5.5 s. However, if we do not bound the throttle, it can achieve around 4 s as the simulate result in Figure 14. In the braking situation, the design speed can archive from 40 kph to 15 kph for about 5 s.

Figure 14: (**a**) the comparison of feedforward PI (FF-PI) controller, SFF-PI controller, predictive controller, and our approach; (**b**) the accelerating results in 18\(\rightarrow\)23 s; (**c**) the braking result in 25\(\rightarrow\)30 s; (**d**) the braking result in 31\(\rightarrow\)38 s.

Figure 15: Velocity tracking of our SFF-PI controller, where the time is counted from the beginning of data logging. ### The Local Path Planning

#### 3.4.1 The Local Path Generation

The results of local path planning are presented in Figure 16. The lane-changing task is performed to produce a smooth route with the minimum jerk reported in Section 2.2.1. The lane-changing to the right lane as shown in Figure 16a, after that if the left lane safe, the vehicle change back to the left lane as visualized in Figure 16b. In Figure 16c,d, the result shows a new trajectory by using the three-order polynomial function in the Appendix A.2. The main drawback of this method is that it can not work well in high curvature as in Figure 11 regions 5-7. #### 3.4.2 The Local Path with Hybrid A*

Figure 17 shows two instances of custom-built visualizer. The first instance is when the perception module notices obstacles in the global path and initiates the path planning module.