## 3 Results
### Results of the Analysis of the Influence of the Prediction Algorithm Parameters
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \(N_{horizon}\) + \(N_{MaxGradIter}\) & \(P_{Cost}\) & \(T_{horizon}\) & _LineSearchMax_ \\ \hline \(E_{L}\) (J) & 5 & 5 & 1 & 5 \\ \(N_{s}\), _Accuracy_ (\%) & 5 & 5 & 1 & 5 \\ \(T_{s}\), _Calculation time_ (s) & 0.01 & - & 1 & 0 \\ \(R^{2}\) & 10 & 1 & 1 & 10 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Weighting coefficients. Figure 6: Plots of \(E_{L}\), _Accuracy, Calculation time_, and \(R^{2}\) versus \(T_{horizon}\). for a fixed number of \(N_{MaxGranLiter}\) iterations, the \(N_{s}\) (_accuracy, in %_) increases to almost 100% with sufficient values of \(T_{horizon}\). At the same time, anomalies can be seen: for high \(N_{MaxGranLiter}\) and small values of \(N_{horizon}\), this leads to a sharp drop in \(N_{s}\), which indicates the instability of optimisation when the number of discretisation points \(N_{horizon}\) on the \(T_{horizon}\) prediction horizon is insufficient. In Figure 3c, the _Calculation time, in seconds \(T_{s}\)_ is shown. It is nearly independent of the influence of \(N_{horizon}\) within the studied range of values: for all combinations of parameters, \(T_{s}\) remains within a narrow range of approximately 1.8-2.1 s at small values of \(N_{MaxGranLiter}\). Thus, an increase in the number of sampling points does not lead to a significant increase in computation time (the computer load hardly changes) at small values of \(N_{MaxGranLiter}\). The dependence of \(R^{2}\) on \(N_{MaxGranLiter}\) and \(N_{horizon}\) is illustrated in Figure 3d. At small values of \(N_{MaxGranLiter}\) and \(N_{horizon}\), \(R^{2}\) displays large negative values (up to -74), which means that the model shows a very poor fit. As \(N_{horizon}\) increases, \(R^{2}\) gradually increases (approaching zero and even +0.5...+0.9 at large parameter values). \(N_{MaxGranLiter}>2\) has almost no effect on \(R^{2}\). From the results in Figure 3, it can be seen that a larger number of \(N_{horizon}\) points reduces the tracking error in the speed profile (higher \(N_{s}\)) and improves current fitting (higher \(R^{2}\)) with a sufficient number of iterations \(N_{MaxGranLiter}>1\). In practice, this means that \(N_{horizon}\) should be chosen to match the dynamics of the system, without overcomplicating the solution. On the other hand, increasing the number of gradient iterations \(N_{MaxGranLiter}\) improves the convergence of optimisation, resulting in higher solution accuracy. However, after a certain threshold (approximately 2-3 iterations), the improvements are minor, such that an additional increase is not justified. The \(P_{Cost}\) parameter consists of two weighting factors: \(P_{Cost}\)_(speed)_ for speed deviation and \(P_{Cost}\)_(loss)_ for energy loss. It determines the compromise in the cost function between the accuracy of the speed profile and energy efficiency. In Figure 4a, it is shown that increasing the weight of \(P_{Cost}\)_(speed)_ leads to a slight increase in \(E_{L}\): for example, when \(P_{Cost}\)_(loss)_ = 1, \(E_{L}\) increases from -43.1 J (\(P_{Cost}\)_(speed)_ = 1) to -44.1 J (\(P_{Cost}\)_(speed)_ = 100). This is due to the priority of maintaining speed, resulting in higher energy consumption. On the other hand, increasing \(P_{Cost}\)_(loss)_ reduces \(E_{L}\) (for example, when \(P_{Cost}\)_(speed)_ = 1, \(E_{L}\) drops from 43.1 J (\(P_{Cost}\)_(loss)_ = 1) to 42.2 J (\(P_{Cost}\)_(loss)_ = 75)). However, these changes are quite small. Figure 4b shows \(N_{s}\) depending on the ratio of \(P_{Cost}\)_(loss)_ and \(P_{Cost}\)_(speed)_. For nearly all combinations, \(N_{s}\approx\) 99-100%, i.e., the speed setpoint is successfully achieved. The accuracy only drops significantly for combinations of \(P_{Cost}\)_(speed)_ = 1 and \(P_{Cost}\)_(loss)_ > 40. Thus, the balance of \(P_{Cost}\) weights has a negligible effect on the accuracy of the speed profile itself, and it remains high. Figure 4c illustrates \(R^{2}\) depending on \(P_{Cost}\).