# Simultaneous Trajectory and Speed Planning for Autonomous Vehicles Considering Maneuver Variants
## 6 Conclusions  
The study has developed a technique for planning the AV motion ensuring simultaneous optimization of the trajectory and speed mode. The proposed technique is fully workable and provides results that are adequate to the initial conditions and preset restrictions. Note that the obtained results are characterized for the AV with a drive type in which traction is redistributed by all wheels, since the critical speed criterion is related to the entire vehicle and not to a single drive axle. Also, in the calculations, it was assumed that the minimum length of the maneuver trajectory should be greater than the AV's stopping distance from the initial speed. Regarding the results of testing the technique, the following conclusions can be drawn. 1. A clear advantage is the use of a 5 th-degree polynomial as a trajectory basis possessing sufficient flexibility and good stability (i.e., predetermined trajectory shape), which reduces the time required to optimize the trajectory model. All curves formed with the participation of the trajectory model are characterized by smoothness, unambiguity, and simplicity of form, providing a positive effect for the control stability at the tracking stage. 2. The proposed technique is based on the minimum number of variable parameters (5-7) necessary for high-quality prediction of the maneuver and its speed mode. Note that despite the multiple optimization criteria, it is recommended to shift priorities to control the maneuver's accuracy (lateral displacement \(L\)) and safety (distance between objects during lane changes and the final distance between vehicles within the same lane). 3. The variation of the lateral displacement \(L\) within the lane boundaries allows for the obtainment of several trajectory variants. However, in this study, we relied on minor deviations from the lane's centerline. In this regard, for simulation examples, only three forecasting options were used. The priorities for decision-making on choosing the best trajectory [25] can be the minimum travel time, maximum speed at the end of the maneuver, the longest trajectory, minimum control costs, or a combination of these. In this study, we do not focus on the problem of selecting a criterion since the goal was to verify the technique itself in general. 4. For simulations, a device equipped with an Intel(R) Core(TM) i7-7500U CPU @ 2.7 GHz, two cores, and 8 GB RAM on the 64-bit Windows 10 was used. The software environment was MATLAB R2022b with the basic optimization function **fmincon**. The average time to calculate one forecast is about 0.35-1.4 s depending on the settings, declared accuracy, and initial conditions. The performance can be significantly enhanced by optimizing the MATLAB code, using parallel computing, compiling to the C/C++ language, and applying more efficient multi-core processors. 5. The accuracy of the constraints plays a key role in the solution convergence and needed number of iterations. Due to the integral approach to equality constraints, the sensitivity to the residual order increases. Thus, for the guaranteed convergence of equality constraints on the criteria of critical speed, acceleration, and jerks, the recommended accuracy should correspond to the order of \(10^{-12}\). 6. The choice of a number of integration points for the Gaussian quadrature scheme and some sections into which the finite element interval is divided significantly affects the forecast performance. Multiple virtual simulations have revealed that the optimal interval step is \(\Delta\xi\) = 0.2... 0.25, and the number of integration points is \(N\) = 3... 5. 7. The following may be noted as disadvantages. When forecasts are subsequent, the conjunction smoothness at transition nodes is ensured only for parameters that require no more than the second derivative of the trajectory and speed. At the same time, for some parameters, such as curvature derivative, angular acceleration, and jerk, discontinuities of functions at nodes may appear.