# Predictive Path Following and Collision Avoidance of Autonomous Connected Vehicles
## 2 Problem Formulation  
### Vehicle Modeling  
Nonlinear Model Predictive Control (NMPC) employs a vehicle dynamic model in order to predict the future trajectory of the vehicle over a predefined prediction horizon. This model is the key for a successful vehicle control system. In the literature of vehicle control, there are different models of vehicles varying in the complexity from kinematic to complex kinetic models [13]. While kinetic models provide accurate prediction of the vehicle motion, they might increase the complexity in the design of collision avoidance systems, and require, during the deployment, high computation time and small sampling interval. It has been shown in the literature that the kinematic model can provide reasonable accuracy by adding constraints on the rate of change of the inputs to be consistent with the low level controllers of the vehicle [14; 15]. Therefore, the state space representation of the nonlinear kinematic bicycle model [16]  
\[\dot{x}(t) =V(t)\cos(\delta(t)+\beta(t)) \tag{1}\] \[\dot{y}(t) =V(t)\sin(\delta(t)+\beta(t))\] \[\dot{\psi}(t) =\frac{V(t)}{l_{r}}\sin(\beta(t))\] \[\dot{V}(t) =a(t),\]  
is used in this paper, where \((x(t),y(t))\) indicates the position of the center of gravity (CG) of the vehicle, \(V(t)\) is the longitudinal velocity, \(\psi(t)\) is the heading angle of the vehicle, \(\beta(t)=\arctan(\frac{l_{r}}{L}\tan(\delta(t)))\) is the side-slip angle between the velocity vector and the longitudinal direction of the vehicle, \(a(t)\) is the longitudinal acceleration input used to control the velocity, \(\delta(t)\) is the steering angle, \(L\) is the wheelbase, and \(l_{r}\) is the distance between CG and the rear wheel (see Figure 1).  
In order to achieve consistency between the kinematic model and the real vehicle model, interval constraints on the control inputs and their rate of change must be imposed. These constraints play a key role in achieving comfort driving and avoids extreme driving conditions by limiting the maximum and minimum value for the longitudinal acceleration and steering angle inputs. The maximum/minimum longitudinal acceleration can be obtained experimentally and vary from one vehicle to the other based on the engine size. The steering angle can be limited in terms of a maximum safe lateral acceleration to achieve normal driving behavior and avoid extreme slipping [14]. Therefore, the acceleration and steering angle constraints  
\[a_{min}\leq a\leq a_{max}, \tag{2}\] \[\delta_{min}\leq\delta\leq\delta_{max},\]  
must be considered. Constraints on time derivative of the control inputs are beneficial for avoiding jerky behavior, and are represented in the model by the augmentation of the control inputs, \((a,\delta)\), as extra states and define the rate of change as a new virtual inputs, \((a_{dot},\delta_{dot})\), as  
\[\dot{a} =a_{dot} \tag{3}\] \[\dot{\delta} =\delta_{dot}.\]  
Therefore, the rate of change constraints are formulated as  
\[-a_{dot}\leq a_{dot}\leq a_{dot}\leq a_{dot} \tag{4}\] \[-\delta_{dot}\leq\delta_{dot}\leq\delta_{dot}.\]  
Based on that, a compact state-space model of the system is  
\[\dot{\mathbf{x}}(t)=\mathbf{f}(\mathbf{x},\mathbf{u}), \tag{5}\]  
where \(\mathbf{x}=[\ x\ y\ \psi\ A\ \delta\ ]^{T}\in\mathbb{R}^{n}\), \(n=6\) is the state vector, \(\mathbf{u}=[a_{dot}\ \delta_{dot}]^{T}\in\mathbb{R}^{m}\), \(m=2\), is the control input vector, and \(\mathbf{f}(\cdot,\cdot)\) is a continuously differentiable function.