## 3 Motion Prediction of the Surrounding Vehicles
### Lateral Motion of the Vehicle  
The overtaking trajectories are collected from the NGSIM dataset. Due to the measurements, the collected vehicle trajectories can be noisy, and thus, feasible trajectories are fitted to the measured overtaking path. It can be said that one trajectory is feasible when the curvature of the trajectory is continuous and bounded. The basic idea behind this method is to build up the given trajectory using clothoid segments. Assuming clothoid segments, for the given overtaking trajectory, the curvature values can be computed. Since the velocities of the vehicles can be determined, the lateral accelerations can be computed. The value of lateral acceleration characterizes the overtaking trajectories, and the density functions are calculated based on these acceleration values. Assuming clothoid segments as a feasible trajectory, the coordinates of the smooth trajectory can be formulated as [19]:  
\[ \begin{split} x(s)&=\alpha\sqrt{\pi}S\bigg{(}\frac{ s}{\sqrt{\pi}}\bigg{)},\\ y(s)&=\alpha\sqrt{\pi}C\bigg{(}\frac{s}{\sqrt{\pi }}\bigg{)},\end{split}  \tag{8}\]  
where \(x(s)\) and \(y(s)\) the longitudinal and lateral direction of the clothoid segment, \(S(x)\) and \(C(x)\) denotes the Fresnel sine and cosine and \(a\) is the scaling factor. \(C(L)=\int\limits_{0}^{L}cos(\frac{\pi t^{2}}{2})dt\), \(S(L)=\int\limits_{0}^{L}sin(\frac{\pi t^{2}}{2})dt\). Using these formulas, the smooth trajectory can be built by clothoid segments, which guarantees the feasibility. Every trajectory is divided into four segments, where the sharpness parameter \((\alpha)\) characterizes the given segment. In Figure 6 an illustration on the overtaking trajectories and the computed smooth trajectories are depicted. Using the fitted smooth trajectories, curvature can be determined as:  
\[\kappa_{m}=s_{l}\alpha, \tag{9}\]  
where \(s_{l}\) is the length of the given segment. In the following step, the fitted, feasible trajectories are used to evaluate the overtaking maneuvers. The maximum curvature of the given segment can be computed using Equation (9). Since the velocity of the vehicles can be computed, the maximum value of lateral acceleration is calculated. In the next step, the prediction method of the lateral motion of the vehicle is presented. During the prediction method, the previously computed feasible trajectories and the longitudinal velocity of the vehicles which are provided by the NGSIM dataset, are used. As it is described below, the maximum lateral acceleration characterizes the overtaking scenarios. Density functions are fitted to the saved data, to solve the prediction process. During the determination  
Figure 6: Comparing the raw data to the smooth trajectories. of the density functions nearly 300 overtaking trajectories are selected from the whole NGSIM dataset, and at the same time, the velocity profile of the vehicles is saved of the given segment. Assuming the kinematic bicycle model, the lateral acceleration of the vehicle can be computed as it is described in Equation (2). Using the maximum values of the accelerations, the density function can be computed. The motion of the vehicles is predicted using the Gamma density function, which widely used in the field of predictions [20]. The advantage of this distribution is that it can be used for several motion models and it is easy to implement. The Gamma density function can be formed as:  
\[f_{lat}(x,\alpha,\beta)=\frac{\beta^{\alpha}x^{\alpha-1}e^{-\beta x}}{\Gamma( \alpha)}, \tag{10}\]  
where \(x\), \(\alpha\) and \(\beta\) are non-negative. In Equation (10) \(\Gamma\) is the Gamma function which is formed as \(\Gamma(\alpha)=\int\limits_{0}^{\infty}x^{\alpha-1}e^{-x}dx\), where \(\alpha\in\mathbb{N}\). In Figure 7, the density and distribution functions are shown. The probability can be computed between two lateral acceleration values as: \(P(a_{l}\leq x\leq a_{u})=F(a_{u})-F(a_{l})\), where \(F\) is the distribution function.