# 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  
To pursue a trajectory that is provided by LPP, the lateral controller is needed. Recently, the state-of-the-art lateral controller is Model Predictive Control (MPC) [16; 20; 36], which can effectively address the problem with high accuracy. However, this method is complex, and it requires high computational cost and resources. Besides, the processing time of MPC controller is approximately 10 ms in practice, so it can cause a delayed signal. Although the optimal controllers such as feedforward-LQR can achieve high accuracy, its robustness is not guaranteed due to the disturbances [37]. Geometry based-path tracking is one of the most common methods of path tracking algorithms in robotics. This solution finds the relationship between the vehicle and the path by the geometric constraints. One of the most famous geometry-based controllers is Stanley, which was introduced and implemented in Stanley robot in DARPA Grand Challenge in 2005 [16; 30]. This approach uses the front-wheel position as a nonlinear feedback function of the cross-track error. The controller operates smoothly in the highway driving, but it is fair to deal with disturbances. Furthermore, the Stanley method encounters a discontinuity path tracking problem while the Pure Pursuit Controller (PPC) is more robust. Although the PPC is not precise as the state-of-the-art methods in high-speed scenarios, the PPC is selected due to its stabilization to disturbances [16]. In this paper, we present the implementation of an adaptive-PPC for path tracking with an explicit algorithm. The path curvature is described in Figure 8c given as  
\[\chi=\frac{1}{R}=\frac{2\sin(\alpha)}{l_{a}}, \tag{16}\]where \(l_{a}\) is the look-ahead distance determined from the rear axle pose to the desired path, R is the radius of the circle passing through points \(A\) and \(B\) with having a tangent at point \(A\), \(\alpha\) is the angle between the vehicle heading and the look-ahead direction. The steering angle is calculated by using the bicycle model and Equation (16) as follows  
\[\psi_{pp}=\tan^{-1}(\chi L)=\tan^{-1}(\frac{2L\sin(a)}{l_{a}}). \tag{17}\]  
Using the relationship of cross-track error \(e\) in Figure 8c, Equation (16) can be written as  
\[ \begin{array}{l}\sin(\alpha)=\frac{e}{l_{a}}\\ \chi=\frac{2e}{l_{a}^{2}}\end{array} . \tag{18}\]  
The look-ahead \(l_{a}\) is linearly proportional to the longitudinal velocity of the vehicle \(v_{r}\). Thus \(l_{a}=\kappa v_{r}\). Finally, using Equations (17) and (18), we have  
\[\psi_{pp}=\tan^{-1}\left(\frac{2L\sin(\alpha)}{\kappa v}\right)=\tan^{-1}\left( \frac{2 eL}{l_{a}^{2}}\right). \tag{19}\]  
where \(l_{a}\) is set to the minimum and maximum values of 3 m and 22 m, respectively. As reported in [37], the value of \(\kappa\) effects the stability of the system. Roughly speaking, increasing or decreasing the value of \(\kappa\) is the trade-off between smoothness and precision tracking. However, the value of \(\kappa\) is unreliable if it is excessively small or large which causes instability or poor tracking. The value of \(\kappa\) is tuned and implemented as in [38]. Therefore, the looking ahead distances are adapted as follows  
\[l_{a}=\left\{ \begin{array}{ll}3\,;&v<15\,kph\\ 0.76v-8.4\,;&15 kph\,\leq v\leq 40 kph\\ 22\,;&v>40 kph\end{array} \right.. \tag{20}\]  
The vehicle speed directly affects the stabilization such as the slipping and rolling. So, the target speed needs to limit depending on the road curvature [38] as yields  
\[v\leq\sqrt{\frac{g(\rho+\phi)}{\chi}}=\sqrt{\frac{g(\rho+\phi)l_{a}^{2}}{2e}}, \tag{21}\]  
Figure 8: The coordinate systems in our automated driving; (**a**) the global coordinate system in the offset-Universal Transverse Mercator (UTM) frame; (**b**) the local vehicle coordinate system; (**c**) the geometry of path-pure pursuit algorithm.