# Analysis of Instantaneous Energy Consumption and Recuperation Based on Measurements from SORT Runs
## 3 Results
### Linear Regression Model  
Using linear regression, stepwise regression was also used to identify the dependence of instantaneous consumption and recuperation energy on speed, acceleration and energy intensity (model selection AIC value is the smallest by adding and subtracting predictors). After parametric identification, the following model was obtained:  
\[ \begin{array}{rcl}IE_{t}&=&\alpha_{0}^{S}I_{S}(x_{t})+\big{(}\alpha_{1}^{A}v_ {t}+\alpha_{2}^{A}a_{t}+\alpha_{3}^{A}v_{t}a_{t}\big{)}I_{A}(x_{t})\\ &&+\big{(}\alpha_{1}^{B}v_{t}+\alpha_{3}^{B}v_{t}a_{t}\big{)}I_{B}(x_{t})\\ &&+\big{(}\alpha_{1}^{D}v_{t}+\alpha_{3}^{D}v_{t}a_{t}\big{)}I_{D}(x_{t})+ \varepsilon\end{array} . \tag{22}\]  
where  
\[I_{L}(x_{t})= \begin{cases}1,&x_{t}=L,\\ 0,&x_{t}\
eq L\end{cases}  \tag{23}\]  
for \(L\in\{S,A,B,D\}\). The values of structural parameters for model (23) are presented in Table 3.  
Figure 5: Temporary energy consumption and regeneration. Table 3 shows that, at the significance level of 0.05, there is no basis for rejecting the working hypothesis for the parameters \(\alpha_{0}^{S}\) and \(\alpha_{1}^{A}\). Therefore, the energy consumption at a standstill is not significantly different from zero, and the effect of vehicle speed during acceleration has a negligible impact on explaining energy consumption. We reject the working hypothesis for the remaining parameters in favour of the alternative hypothesis. Therefore, acceleration and energy consumption in the acceleration state, as well as speed and energy consumption in the braking and driving states, significantly affect energy consumption and recuperation. The value of the coefficient of determination \(R2\) for the linear model is 0.9069. Several important trends and dependencies are shown by the linear regression model's residual analysis. Though the residuals cluster around zero, the histogram clearly demonstrates that there are outliers and fat tails that make the distribution non-normal. The residuals do not appear to be independent and instead display serial correlation, as the autocorrelation function reveals at lag 1. With residuals departing from the anticipated distribution, especially at the ends, the normal QQ plot verifies non-normality. This is further reinforced by the cumulative distribution function, which reveals that the empirical and theoretical normal distributions do not match. According to these results, the linear model misses certain important details about the relationship between energy use and recovery, especially when it comes to temporal dependencies. In order to improve the accuracy of the model, it is necessary to incorporate new predictors or variables with a temporal lag. Using non-linear models or more advanced methods like KNN or neural networks could improve performance, as the residuals are non-normal and auto correlate. For the linear model (19), the residuals were analysed, as shown in the below graph. In Figure 6, we see the occurrence of extreme values in the series of residuals \(\{\epsilon_{t}\}_{1\leq t\leq n}\) and a significant correlation with \(\tau=1\). The Q-Q plot shows the existence of \"fat tails\". We also see significant differences between the theoretical distribution function with a normal distribution and the empirical distribution function. The tests examined the normality of the distribution of residuals using Shapiro-Wilk, Anderson-Darling, Cramer-von Mises, [PERSON] (Kolmogorov-Smirnov), the Jarque-Bera test and D'Agostino omnibus tests and the independence of residuals using the Ljung-Box test for lags \(1\leq\tau\leq 10\). The Table 4 gives the values of the statistics and the value of the test probability. From the obtained results, we can see that, at the significance level of 0.05 and based on [PERSON], [PERSON], [PERSON], [PERSON] (Kolmogorov-Smirnov), the Jarque-Bera test, and D'Agostino omnibus tests, the working hypothesis, which assumes normality of residuals, should be rejected in favour of the alternative hypothesis.