Keywords

1 Introduction

Electric vehicles (EVs) are an attractive medium of transportation, with excellent performance. The possibility of zero-emission fuel makes them a cornerstone in reaching the climate goals set by the European Commission. The vehicle industry’s objective to meet climate goals typically translates into increasing sales of EVs. In 2023, the worldwide sales of electric cars almost reached 14 million and have seen an exponential increase in sold units over the recent year. However, the number of electric trucks sold remains small in 2023, resulting in about 54 thousand units sold [2].

In line with the sale numbers, electric trucks suffer from the lack of charging infrastructure, low power delivery at the connector, and yet small battery sizes. As a result, the feasibility of using an electric truck varies from operation to operation. The uncertainty the driver experiences posed by the variation is typically referred to as range anxiety, halting haulage from transitioning to electric vehicles. Hence, a logistical effort targeting the variation in operations would benefit the rate of electrification. The foundation of such logistic effort is a good residual range estimate or energy prediction. The former is the distance until empty, and the latter is the energy consumed up to a distance ahead.

The vast literature covering residual range estimation can be divided into model-free approaches and model-based approaches. The model-free approach is generally based on the assumption that energy consumption is linearly increasing with traveled distance. The slope of the linear trend is the average specific energy consumption (SEC), typically calculated as a moving average of past driving, imposing similarities in future driving to that of the past. In [5], a model-free approach is presented, fitting SEC values to specific driving patterns. The model clusters regions of similar driving patterns based on average speed and average power and fits an SEC value to each cluster that matches the data. The model received an average relative error of 9 % when validated against log data from a BMW i3. However, the model is yet to be tested for heavy vehicles.

In [9], a semi-physical model, calculating the energy consumed over each road segment as the sum of energy losses due to road grade, air drag, change in kinetic energy, and a cruise penalty is presented. In this model, energy consumption is assumed to be constant over a road segment but allowed to vary from segment to segment, thus capturing the slow dynamics tide to the geometrical space, but not the fast dynamics and phenomena tide to other entities such as traffic. Also, the performance of the model is yet to be evaluated.

In a model-based approach, the main energy consumers are divided into the auxiliary load (air conditioner, displays, battery thermal management, and more) and propulsion load (energy consumed to propel the vehicle). In combination with a powertrain and an energy storage model, one can predict the total energy consumption of any vehicle, including internal combustion engine vehicles (ICEVs), and EVs. Hence, in the model-based approach, authors can make minor improvements to the whole model by studying the auxiliary or propulsion load in isolation. In this article, a traction force estimator derived from longitudinal vehicle dynamics is presented under Sect. 3. The model is complemented by a constrained Kalman filter state estimator, see Sect. 2, and a truncation bias correction method, see Sect. 4. In Sect. 5, the propulsion energy estimator is compared against vehicle log data and a simple benchmark model based on SEC.

2 State Estimation

A vehicle’s longitudinal position, velocity, and acceleration, are integral parts to propulsion energy estimation. To estimate the states using a Kalman filter, a motion, and measurement model should be decided on. The measurement model uses vehicle wheel speed and odometer sensor measurements. To keep it simple, a kinematic motion model, namely the constant acceleration motion model (CA) (CA)

$$\begin{aligned} \begin{aligned} x_k = \begin{bmatrix} 1 & T & \frac{1}{2}T^2\\ 0 & 1 & T \\ 0 & 0 & 1 \end{bmatrix} x_{k-1} + q_{k-1}, \quad \text {with } q_{k-1} \sim \mathcal {N}(0,\text {Q}_{k-1}), \\ y_k = \begin{bmatrix} 1 & 1 & 0 \end{bmatrix} x_k + r_k, \quad \text {with } r_k \sim \mathcal {N}(0,\sigma _r^2), \end{aligned} \end{aligned}$$
(1)

is used. The process noise covariance matrix \(\text {Q}_{k-1} =\int _0^T e^{\tilde{A}\tau } \tilde{\text {Q}} e^{\tilde{A}^\top \tau } d\tau \) is the analytical solution to the discretization of the continuous-time CA model with jerk modeled as a Gaussian white noise process. The measurement noise \(r_k\) is uniformly distributed around the CAN bus rounding error. To facilitate the assumption of normally distributed noise, the best approximation of the uniform distribution \(\mathcal {U}(a,b)\) is the normal distribution \(\mathcal {N}(\frac{a+b}{2},\frac{(a-b)^2}{12})\). In addition, the speedometer cannot measure negative velocities, which excludes reversing maneuvers. The Kalman filter is hence modified to facilitate the inequality constraint \(x_{k}(2) \le 0\). The constrained solution to the Kalman filter is obtained by projecting the unconstrained a posteriori state estimate to the constrained space [6, 7]:

$$\begin{aligned} \begin{array}{lll} & \displaystyle \text {minimize } & {(x - \hat{x}_{k|k})^\top W_k^{-1}(x - \hat{x}_{k|k}),} \\ & \displaystyle \text {subject to } & {x(2) \ge 0}. \end{array} \end{aligned}$$
(2)

A solution to the quadratic programming (QP) problem (2) is found by applying the active set method

$$\begin{aligned} \hat{x}_{k|k}^P = \hat{x}_{k|k} - \Upsilon (A\hat{x}_{k|k} - b), \quad \Upsilon = W_k^{-1} A^\top (A W_k^{-1} A^\top )^{-1}, \end{aligned}$$
(3)

with weighting matrix \(W_k\) being the inverse of the covariance matrix, \(A = [0,1,0]\), and \(b=0\). The same method is also applied for the a priori state estimate allowing the Kalman filter to do better predictions.

The yaw angle must also be estimated since it affects the air drag through the attack angle. Another kinematic motion model is used to estimate the yaw angle in the world frame, namely the coordinated turn (CT) motion model. Since the procedure is similar, no further explanation is provided.

3 Traction Force Estimation

At any time k, the total traction force \(F_{\text {t},k}\) for a road vehicle is a linear combination of five forces: rolling resistance force \(F_{\text {rr},k}\), air drag force \(F_{\text {ad},k}\), hill climbing force \(F_{\text {hc},k}\), translational inertial force \(F_{\text {it},k}\), and rotational inertial force \(F_{\text {ir},k}\),

$$\begin{aligned} F_{\text {t},k} = F_{\text {rr},k} + F_{\text {ad},k} + F_{\text {hc},k} + F_{\text {it},k} + F_{\text {ir},k} . \end{aligned}$$
(4)

Rolling resistance force is the resistive force associated with a tire rolling under vertical load. In this paper, only the linear relationship between the nominal rolling resistance coefficient (\(C_r\)) and the vehicle’s vertical load is modeled:

$$\begin{aligned} \hat{F}_{\text {rr}, k} = C_\text {r} m_{k} g \cos {(\varphi _k)} + e_{\text {rr}, k}, \end{aligned}$$
(5)

where the error \(e_\text {rr}\) captures model inaccuracies coupled with using a simplified model that does not consider the temperature and pressure dependency of \(C_\text {r}\). In [4], the mean relative error of a constant \(C_\text {r}\) over a certain driving cycle was found to be \(12.9\%\). In this paper, the error is assumed to be normally distributed with zero mean and variance, \(\sigma _{\text {rr},k}^2 = (m_k g C_\text {r} \cdot 0.1)^2\).

Aerodynamic drag force is the resistive force acting on an object moving in air and in this paper, model 1 [1] is used. The model is based on the state-of-art model:

$$\begin{aligned} \hat{F}_{\text {ad},k} = \frac{1}{2} \rho C_\text {D} A_\text {p}(\theta _k) (v_{x,k}+v_{wx,k})^2 + e_{\text {ad},k}, \end{aligned}$$
(6)

in which the air density \(\rho \) and the drag coefficient \(C_\text {D}\) are constants. The relative longitudinal velocity experienced by the vehicle is the sum of the longitudinal vehicle \(v_{x,k}\) and wind \(v_{wx,k}\) speed. Additionally, the projected frontal area \(A_\text {p}(\theta _k)\),

$$\begin{aligned} A_\text {p}(\theta _k) = A_\text {f} cos(\theta _k) + A_{\text {s},k} sin(\theta _k), \quad \theta _k = \arctan \frac{|v_{\text {w}y,k}|}{v_{x,k}}, \end{aligned}$$
(7)

is a function of the attack angle \(\theta _k\), a constant front area \(A_\text {f}\), and a varying side area \(A_{\text {s},k}\), which is allowed to change between two discrete values representing with and without a trailer. The model has a root mean squared error \(\text {RMS}(y_k - C_\text {D} A_\text {p}(\theta _k)) = 1.19\) when compared against CFD simulation results using a tractor with a semi-trailer. In this paper, the error is assumed to be normally distributed with zero mean, and variance, \(\sigma _{\text {ad},k}^2 = (1.2\frac{1}{2}\rho (v_{x,k}+v_{wx,k})^2)^2\).

Hill climbing force is the gravitational force parallel to the road slope \(\varphi _k\),

$$\begin{aligned} F_{\text {hc},k} = m_k g \sin (\varphi _k) . \end{aligned}$$
(8)

Inertial force consists of a translational and a rotational force. The translational inertial force is associated with longitudinal acceleration and the rotational with acceleration of the powertrain. They can be coupled by introducing the equivalent mass \(m^*\):

$$\begin{aligned} \hat{F}_{\text {it},k} + F_{\text {ir},k} = m_k^*a_k + e_{\text {i}, k}, \quad m_k^* = m_k + I \frac{G_k^2}{\eta _\text {g} r^2}. \end{aligned}$$
(9)

Here G is the gear ratio, I is the moment of inertia of the rotor, \(\eta _g\) is the gear efficiency, and r is the tire radius. Thus, a model for gear selection is required. A simple switch algorithm based on vehicle longitudinal speed is used.

The normally distributed acceleration estimation error propagates to the inertial force and hence, is the inertial force error \(e_{\text {i}, k}\) normally distributed with zero mean, and variance, \(\sigma _{\text {i},k}^2 = (m^* \sigma _a)^2\).

4 Propulsion Power

The traction force \(F_\text {t}\) is the force applied at the wheel to propel and brake the vehicle. A negative traction force corresponds to braking, and a positive to propelling the vehicle. The propulsion power is thus:

$$\begin{aligned} P_{\text {p},k} = \max (0, F_{\text {t},k} v_{x,k}). \end{aligned}$$
(10)

But since \(F_\text {t}\) is unknown, the traction force estimate \(\hat{F}_\text {t}\) has to be used. However, truncating a random variable will move the mean resulting in a truncation bias in the model. First, the traction force estimation error,

$$\begin{aligned} e_{\text {t},k} = F_{\text {t},k} -\hat{F}_{\text {t},k}, \quad e_{\text {t},k} = e_{\text {rr},k} + e_{\text {ad},k} + e_{\text {i},k}, \end{aligned}$$
(11)

is a linear combination of random normal distributed variables with zero mean. The error \(e_{\text {ad}}\) comes from simplifications in \(A_{\text {p},k}(\theta ) C_d\), \(e_{\text {rr}}\) from simplifications in \(c_r\), and \(e_{\text {i},k}\) from kalman filter uncertainties in the acceleration. Since none of the errors is a function of the same variable, one can claim independence resulting in a zero mean, normally distributed variable with variance, \(\sigma _{\text {t},k}^2 = \sigma _{\text {rr},k}^2 + \sigma _{\text {ad},k}^2 + \sigma _{\text {i},k}^2 \). The author acknowledges that the errors are likely auto-correlated, but are here regarded as time-independent. The traction power estimate \(\hat{P}_{\text {t},k}\) is thus also normally distributed with mean \(\mu _k = F_{\text {t},k}v_{x,k}\) and variance \(\sigma _k^2 = v_{x,k}^2\sigma _{\text {t},k}^2\). Now, consider the truncated traction power estimate, i.e. the propulsion power estimate \(\hat{P}_{\text {p},k} = \text {max}(0,\hat{P}_{\text {t},k})\), corresponding to a lower-tail truncation at 0 with \(\alpha =\frac{-\mu _k}{\sigma _k} = \frac{-F_{\text {t},k}}{\sigma _\text {t},k}\) and \(\beta = \infty \). The probability density function and the cumulative distribution function evaluated in \(\beta \) are thus \(\varphi (\beta )=0\) and \(\Phi (\beta )=1\). The first moment of the propulsion power estimate can now be expressed as:

$$\begin{aligned} E(\hat{P}_{\text {t},k} | \hat{P}_{\text {t},k} > 0) = E(\hat{P}_{\text {p},k}) = \mu _k + \sigma _k \frac{\varphi (\alpha )}{1-\Phi (\alpha )} \end{aligned}$$
(12)

5 Result

The model presented under Sect. 2, 3, and 4 is now to be evaluated under real operating conditions. That is, using vehicle log data from a single heavy vehicle operating all over Sweden, mainly transporting gravel. The vehicle log data is complimented with road [3] and weather [8] data from 3rd party data suppliers and the estimated propulsion power is compared against the on-board torque estimate, \(P=T\omega \). The original validation data set is composed of 86 transport operations, typically 8–10 hours each, and after removing transport operations shorter than 10 km, the total number was now reduced to 59. As a reference, a primal history-based benchmark model is designed. It predicts today’s (i) energy consumption \(E_i\) based on today’s total travel distance \(d_i\), and the previous transport operations’ SEC value, \(f_{i-1}\),

$$\begin{aligned} E_i = f_{i-1}d_i. \end{aligned}$$
(13)

The benchmark model, although simple, is built on the same postulate that was discussed in Sect. 1. That is, the near future is likely to be similar to the near past.

In Fig. 1, the x-axis represents the relative error \(\frac{\hat{E}-E}{d}\) which has the same unit as SEC, \(\text {kWh }\text {km}^{-1}\), and the y-axis, the represent the probability density of a certain error. The figure has two histograms, the benchmark error (orange), representing the difference in SEC comparing transport mission k and \(k-1\), and the model error (blue). On top of the histograms, two normal distributions are drawn, the the model error pdf (green) has a mean \(\mu _\text {m} = -0.01\) and standard deviation \(\sigma _\text {m} = 0.40\), and the benchmark error pdf (red) has a mean \(\mu _\text {B} = -0.02\) and standard deviation \(\sigma _\text {B} = 0.52\). Hence, for each 100km driven, with \(68 \%\) certainty, the benchmark error is smaller or equal to \(\begin{bmatrix} -54 & 50\end{bmatrix}\) kWh and the model rror is smaller or equal to \(\begin{bmatrix} -41 & 39\end{bmatrix}\) kWh.

Fig. 1.
figure 1

The model (blue), and benchmark (orange) represent the relative error when compared against vehicle log data. Two normal distributions fitted using the model error (green), and benchmark error (red) are drawn on top. (Color figure online)