## 2 Method
### Autonomous Vehicle Pipeline and Vehicle Setup
#### 2.1.3 Vehicle Modeling  
This section describes the released vehicle and tire models that are used for trajectory planning algorithm test and validation purposes. Several mathematical models have been investigated in the recent literature with different levels of complexity and accuracy based on the research context [41]. In this paper, the vehicle is modeled using the 3-DOF rigid vehicle model (single track) for both lateral and longitudinal dynamics as depicted in Figure 3.  
The equations of motion are written in terms of errors with respect to the reference poses generated by the Local Path Planner to properly define the controller variables. To this extent, the kinematic motion of the vehicle, at velocity \(U_{x}\), can be described with the cross-track error \(e_{1}\) of the front axle guiding wheels, and the angle of those wheels with respect to the nearest segment of the trajectory to be tracked \(e_{2}\), as reported in Figure 4.  
Figure 4: Definition of the controlled variables \(e_{1}\) and \(e_{2}\) with respect to the reference trajectory. Figure 3: 3-DOF rigid vehicle model single track. In case of forward driving motion and steering system acting only on vehicle front guiding wheels, the derivative of the cross-track error \(\dot{e}_{1}\) and relative yaw angle \(e_{2}\) can be defined as follows:  
\[\dot{e}_{1}=U_{y}+U_{x}\cdot e_{2} \tag{4}\]  
\[e_{2}=\psi-\delta \tag{5}\]  
where \(U_{y}\) is the lateral velocity in the vehicle-fixed reference frame, \(\psi\) is the heading angle of the vehicle with respect to the closest trajectory segment, and \(\delta\) is the angle of the front wheels with respect to the vehicle. The steering is mechanically limited to \(\left|\delta\right|\ <\delta_{max}\) and \(\delta_{max}=\pi/6\) rad. The derivative of the heading angle is  
\[\dot{\psi}=r-U_{x}\cdot\frac{\sin(\delta)}{a+b} \tag{6}\]  
where \(a\) and \(b\) are the distance from the center of gravity (CoG) to the front and rear wheels, respectively. The vehicle model takes in consideration also the nonlinear dynamic motion contribution coming from the effect of the tire slip and the steering servomotor that actuates the steering system mechanism. The front and rear tires are modeled such that each provides a force \(F_{yf}\) and \(F_{yr}\), perpendicular to the rolling direction of the tire, and proportional to the side slip angle \(\alpha\). Assuming negligible vehicle track, the lateral forces at the front and rear wheels are entirely due to the contribution coming from the tires:  
\[F_{yf}\approx-2C_{xf}\alpha_{f} \tag{7}\]  
\[F_{yr}\approx-2C_{xf}\alpha_{r} \tag{8}\]  
where \(C_{xf}\) and \(C_{x}\) refers to the lateral stiffness of the front and rear tires, respectively. Then, the front and rear tire side slip angles can be defined as  
\[\alpha_{f}=\tan^{-1}\frac{U_{y}+r\cdot a}{U_{x}}+\delta \tag{9}\]  
Figure 4.0  
with vehicle-fixed longitudinal and lateral velocities \(U_{x}\) and \(U_{y}\). In the end, the equations of motion can be written as  
Figure 4.1  
Figure 4.2  
Figure 4.3  
where \(F_{xf}\) and \(F_{xr}\) are the components of the force provided by the front and rear tires in their direction of rolling. Thus, the equation of motion (11)-(13) are rewritten in terms of the cross-track error \(e_{1}\) and relative yaw angle \(e_{2}\). The state space equation of the obtained model state space model is defined in Equation (14). \[\left[ \begin{array}{c}\ddot{U}_{x}\\ \dot{U}_{x}\\ \dot{U}_{y}\\ \dot{r}\\ \dot{e}_{1}\\ \dot{e}_{2}\end{array} \right]=\left[ \begin{array}{cccc}-\frac{1}{\tau}&0&0&0 &0&0\\ 1&0&0&0&0&0\\ 0&0&-\frac{2C_{xf}+2C_{ar}}{mU_{x}}&-U_{x}&-\frac{2C_{xf}l_{f}^{2}-2C_{ar}l_{ r}}{mU_{x}}&0&0\\ 0&0&-\frac{2C_{xf}l_{f}-2C_{ar}l_{r}}{l_{x}U_{x}}&-\frac{2C_{xf}l_{f}^{2}+2C_{ ar}l_{r}^{2}}{l_{x}U_{x}}&0&0\\ 0&0&1&0&0&U_{x}\\ 0&-\kappa&0&1&0&0\end{array} \right]\left[ \begin{array}{c}\dot{U}_{x}\\ \dot{U}_{x}\\ \dot{U}_{y}\\ \dot{r}\\ \dot{e}_{1}\\ \dot{e}_{2}\end{array} \right]+\left[