# Feasible Trajectories Generation for Autonomous Driving Vehicles
## 3 Position Quinic Polynomial for Trajectory Generation
 \tag{13}\]  
The vehicle velocity and acceleration can be re-formulated from (10) and (11) as  
\[\dot{y}(t)=\left(\alpha_{1}tan\theta_{0}+\frac{\alpha_{2}tan\phi_{0}}{lcos^{3} \theta_{0}}t+3b_{1}t^{2}+4b_{2}t^{3}+5b_{3}t^{4}\right) \tag{14}\]  
and  
\[\ddot{y}(t)=\left(\frac{\alpha_{2}tan\phi_{0}}{lcos^{3}\theta_{0}}+6b_{1}t+12 b_{2}t^{2}+20b_{3}t^{3}\right) \tag{15}\]  
and for variable \(x\):  
\[\dot{x}(t)=\left(\frac{\left(2T(x_{T}-x_{0})-T|x_{T}-x_{0}|+2|x_{T}-x_{0}|t \right)}{2T^{2}}\right) \tag{16}\]  
and  
\[\ddot{x}(t)=\left(\frac{|x_{T}-x_{0}|}{T^{2}}\right) \tag{17}\]  
The vehicle velocity can be identified from Equations (14)-(17):  
\[v_{1}(t)=\frac{\sqrt{\dot{x}^{2}+\dot{y}^{2}}}{t} \tag{18}\]Or another way to calculate \(v_{1}(t)=\frac{\dot{x}(t)cos\theta}{r}+\frac{\dot{y}(t)sin\theta}{r}\), then:  
\[v_{1}(t)=\Big{(}\frac{(2T(x_{T}-x_{0})-T|x_{T}-x_{0}|+2|x_{T}-x_{0}|t|)}{2T^{2}} \Big{)}cos\theta\] \[+\Bigg{(}\frac{\Big{(}a_{1}tan\theta_{0}+\frac{a_{2}tan\theta_{0} }{cos\theta_{0}}+3b_{1}t^{2}+4b_{2}t^{3}+5b_{3}t^{4}\Big{)}sin\theta}{r}\Bigg{)} \tag{19}\]  
\(\dot{\theta}\) is re-formulated from Equation (6):  
\[\dot{\theta}=\frac{\ddot{y}\dot{x}-\ddot{x}\dot{y}}{\dot{x}^{2}+\dot{y}^{2}}= \frac{tan\theta}{l}rv_{1} \tag{20}\]  
To calculate \(v_{2}(t)=\dot{\phi}\), from Equation (13), when \(\phi=arctan(X)\),  
\[X=\Bigg{(}\frac{\Big{(}\frac{v_{2}tan\theta_{0}}{los^{2}\theta_{0}}+6b_{1}t+1 2b_{2}t^{2}+20b_{3}t^{3}\Big{)}(2T^{2})^{2}los^{2}\theta}{(2T(x_{T}-x_{0})-T |x_{T}-x_{0}|+2|x_{T}-x_{0}|t)^{2}}\Bigg{)} \tag{21}\]  
Then, the second input \(v_{2}(t)=\dot{\phi}\) is:  
\[\dot{\phi}=\partial\left(l\frac{\ddot{y}\dot{x}-\ddot{x}\dot{y}}{r\Big{(}\dot{ x}^{2}+\dot{y}^{2}\Big{)}^{\frac{3}{2}}}\right)\left(\frac{1}{1+\left(l \frac{\ddot{y}\dot{x}-\ddot{x}\dot{y}}{r\Big{(}\dot{x}^{2}+\dot{y}^{2}\Big{)} ^{\frac{3}{2}}}\right)^{2}}\right) \tag{22}\]  
Simulations for this method were conducted with the above vehicle parameters of \(l=2\) m, \(r=0.25\) m, \(x(0)=\left[0,0,0,0\right]^{\prime}\), \(x(T)=\left[10,10,0,\frac{\pi}{6}\right]^{\prime}\), and \(T=100\) (\(T\) is calculated for 100 discrete time intervals from \(t=0\div T\)). The trajectory generation for \(x,y,\theta,\dot{\phi},\dot{\theta}\), and \(\dot{\phi}\) is obtained from Equations (12)-(22) and shown in Figures 2 and 3. \[\ddot{y}(t)=\left(\frac{\alpha_{2}tan\phi_{0}}{lcos^{3}\theta_{0}}+6b_{1}t+12 b_{2}t^{2}+20b_{3}t^{3}\right) \tag{15}\]0 Vehicle trajectory and the velocity. Figure 3 shows the maximum steering angle, \(\phi_{MAX}=1.0973\) radians or \(62.87^{\circ}\) (degrees). This value violated the constraint for the vehicle steering angle \(\phi_{MAX}\leq 45^{\circ}\). This trajectory, therefore, is infeasible because the distance from \(\mathrm{x}^{\circ}\), \(\mathrm{y}^{\circ}\) to \(\mathrm{x}^{\mathrm{T}}\) and \(\mathrm{y}^{\mathrm{T}}\) is too short, causing the steering angle to be too large. The next part presents the method to achieve feasible and optimal trajectories subject to vehicle constraints and environmental limitations.