## 4 Motion Planning and Control in ADAS for City Buses
### Feedback Control  
Following [34], a feedback control law is formulated to provide motion corrections based on the presented vehicle-body kinematics (1) utilising a Vector-Field-Orientation (VFO) [36] controller. The controller takes the form  
\[\phi_{0}(\overline{\mathbf{q}})=\left[\begin{array}{c}\phi_{a0}(\overline{\mathbf{q} })\\ \phi_{b0}(\overline{\mathbf{q}})\end{array}\right]\triangleq\left[\begin{array}{ c}h_{\theta}(\overline{\mathbf{q}})\\ h_{x}(\mathbf{p})c\theta+h_{y}(\mathbf{p})s\theta\end{array}\right], \tag{4}\]  
resulting in the convergence vector field components  
\[h_{\theta}\triangleq k_{a}\underbrace{(\theta_{a}-\theta)}_{c_{a}}+\theta_{a},\quad\left[\begin{array}{c}h_{x}\\ h_{y}\end{array}\right]\triangleq k_{p}F(\mathbf{p})\mathbf{\vartheta}+v_{d}\mathbf{R}\mathbf{ \vartheta}, \tag{5}\]  
where \(v_{d}>0\) represents the absolute value of a reference longitudinal velocity along the path, \(k_{a}>k_{p}>0\) are design parameters, whose values were determined by taking a baseline value from the simulation and tuned during the experiments in the field, and \(\mathbf{R}=\left[\begin{array}{cc}0&1\\ -1&0\end{array}\right]\) is a rotation operator of the \(-\pi/2\) angle, while  
\[\theta_{a}\triangleq\operatorname{Atan}2c\big{(}\zeta_{d}h_{y},\zeta_{d}h_{x} \big{)}\in\mathbb{R},\quad\vartheta\triangleq-\
abla F/\|\
abla F\| \tag{6}\]  
can be defined as the auxiliary orientation and the unit vector of a negative gradient of the function \(F(\mathbf{p})\), respectively. Having the outer-loop control function (4), one introduces the computed vehicle-body velocities  
\[\mathbf{u}_{0c}=[\omega_{0c}\;v_{0c}]^{\top}\triangleq\mathbf{\phi}_{0}(\overline\mathbf{{q}}), \tag{7}\]  
where \(\kappa_{0c}=\omega_{0c}/\
u_{0c}\) is determined uniquely as an instantaneous motion curvature and a corresponding computed steering angle  
\[\beta_{c}(\mathbf{\phi}_{0}(\overline{\mathbf{q}}))\triangleq\arctan(L\kappa_{0c}) \stackrel{{(\ref{eq:v_d})}}{{=}}\arctan\left(L\frac{\phi_{b0}( \overline{\mathbf{q}})}{\phi_{b0}(\overline{\mathbf{q}})}\right), \tag{8}\]  
Figure 10: Bounding boxes are generated to provide the planner with a safe and obstacle-free tunnel interpreted as positional inequality containers; in this figure, (**A**–**C**) present different locations subject to path planning. The blue arrow denotes the initial configuration of the bus while the green one charger configuration.  
with \(\phi_{\omega 0}(\overline{q})\) and \(\phi_{v0}(\overline{q})\) resulting from (4). Following the work [37], control signals (7) and steering angle (8) provide the control inputs \(\mathbf{u}_{c}(\overline{\mathbf{q}})=\left[\zeta_{c}(\overline{\mathbf{q}})\;v_{c}( \overline{\mathbf{q}})\right]^{\top}\). Since our ADAS is providing a steering angle indicator to the human driver, it only utilises (8) in a saturated form  
\[\beta_{d}(\mathbf{\phi}_{0}(\overline{\mathbf{q}}))\triangleq\text{sat}(\beta_{c}( \mathbf{\phi}_{0}(\overline{\mathbf{q}})),\beta_{m}), \tag{9}\]  
where \(\text{sat}(\alpha,\alpha_{m})\triangleq\min\{|\alpha|,\alpha_{m}\}\cdot\text {sign}(\alpha)\) is a conventional saturation function, while \(\beta_{m}\) corresponds to the constraint imposed by the admissible configuration set.  
As illustrated in Figure 11, the desired steering angle \(\beta_{d}\) and the actual steering angle \(\beta\) are visualised for the human driver through the ADAS human-machine interface. The human driver then is expected to follow the steering angle indicator to track the generated path. Manoeuvres leading to the displacement of the bus to the reference path are corrected via the Vector-Field-Orientation (VFO) [36] controller to a defined threshold. The steering suggestions displayed to the driver are the ones corrected by the VFO algorithm; thus, they take into account any inaccuracies of path following. However, a large displacement from the reference path cannot be corrected by VFO and can lead to re-planning the path from the current configuration of the bus.