The enviroCar platform offers a broad range of data about traffic that can be used by different stakeholder groups. Fuel consumption is of special interest, e.g. when trying to understand the environmental impact of traffic or when trying to minimize fuel consumption by individual drivers. In enviroCar, there are currently two models to calculate fuel consumption: 1) using motor data from the on-board diagnostics (OBD) and 2) using GPS data from mobile phones running the enviroCar app.

### 1) OBD-derived fuel consumption

Instantaneous fuel consumption, $Q$ (in l/h), is not directly measured with the OBD adapter, but derived using the measured mass air flow, $\dot{m}_{\mathrm{air}}$ (in g/s):

\begin{equation}

Q_{\mathrm{OBD}} = \frac{\dot{m}_{\mathrm{air}}}{C_{\mathrm{sto}} \cdot \rho_{\mathrm{fuel}} \cdot \lambda_{\mathrm{ER}}}

\label{eq:consumption-obd}

\end{equation}

Mass density, $\rho_{\mathrm{fuel}}$, and stoichiometric air-fuel ratio, $C_{\mathrm{sto}}$, depend on the fuel type. The parameters used are shown in Table 1.

**Table 1**: Parameters used for gasoline and diesel engines.

$\rho_{\mathrm{fuel}}$ | $C_{\mathrm{sto}}$ | $\lambda_{\mathrm{ER}}$ | |
---|---|---|---|

Gasoline | 745 g/l | 14.7 | 1 |

Diesel | 832 g/l | 14.5 | measured or Eq. \ref{eq:lambda} |

The air-fuel equivalence ratio, $\lambda_{\mathrm{ER}}$, is set to 1 for gasoline engines (in practice it may vary between 0.85 and 1.1). For diesel engines, it might reach values of up to 10 and therefore is read from the OBD adapter. If it exceeds 1.97 (the observed capped maximum) it is calculated using Eq. \ref{eq:lambda}

\begin{equation}

\lambda_{\mathrm{ER}} = \frac{C_1}{C_2 – C_3 \cdot \{\lambda\}} = \frac{0.23478}{0.218911 – 0.18415 \cdot \{\lambda\}}

\label{eq:lambda}

\end{equation}

where $\lambda$ is the measured lambda voltage (in V) of the oxygen sensor. It must be noted that no consumption at all is assumed if lambda voltage exceeds 1.1 V.

In cases where direct mass-air-flow measurements are not available, it is calculated using Eq. \ref{eq:mass-air-flow}

\begin{equation}

\dot{m}_{\mathrm{air,calc}} = \frac{p \cdot n}{T} \cdot \eta_{\mathrm{vol}} \cdot \frac{V_{\mathrm{engine}} \cdot M_{\mathrm{air}}}{R}

\label{eq:mass-air-flow}

\end{equation}

with the following parameters

$T$ – intake air temperatur in °C (from OBD)

$p$ – manifold absolute pressure in kPa (from OBD)

$n$ – revolutions per minute (from OBD)

$\eta_{\mathrm{vol}}$ – volumetric efficiency ($\frac{V_{\mathrm{real}}}{V_{\mathrm{theo,max}}}$, 85 %)

$V_{\mathrm{engine}}$ – engine displacement in l (from registered car)

$M_{\mathrm{air}}$ – molar mass (28.9644 kg/mol)

$R$ – gas constant (8.3144621 (kg m²)/(s² mol K)).

### 2) GPS-based fuel consumption

This load-based model considers the instantaneous power that the motor provides to overcome the driving resistance. Fuel consumption is calculated using Eq. \ref{eq:consumption}

\begin{equation}

Q_{\mathrm{GPS}} = \frac{P}{H \cdot \eta}

\label{eq:consumption}

\end{equation}

where $P$ denotes power (in kW), $H$ the calorific value (8.8 kWh/l for gasoline and 9.9 kWh/l for diesel) and $\eta$ the motor efficiency. Power is calculated from the driving resistance, $F_{\mathrm{driving}}$, which – in our case – includes four contributions: aerodynamic drag, $F_{\mathrm{D}}$, rolling resistance, $F_{\mathrm{R}}$, climbing resistance, $F_{\mathrm{C}}$, and inertial resistance, $F_{\mathrm{I}}$:

\begin{align}

\begin{split}

P &= F_{\mathrm{driving}} \cdot v = (F_{\mathrm{D}} + F_{\mathrm{R}} + F_{\mathrm{C}} + F_{\mathrm{I}}) \cdot v \\

&= [ \frac{1}{2} \cdot c_{\mathrm{w}} \cdot A \cdot \rho_{\mathrm{air}} \cdot v^2 + m \cdot g \cdot c_{\mathrm{R}} \cos(\Theta) \\

&+ m \cdot g \cdot \sin(\Theta) + m \cdot a ] \cdot v

\end{split}

\label{eq:power}

\end{align}

$v$ – vehicle speed in km/h (from GPS)

$a$ – vehicle acceleration km/h per s (calculated from speed)

$\Theta$ – road gradient angle in degree (calculated from GPS coordinates and altitude)

$A$ – cross-sectional area in driving direction (1.55 m $\cdot$ 1.7 m)

$\rho_{\mathrm{air}}$ – air mass density (1.2 kg/m³)

$g$ – gravitational acceleration (9.81 m/s²)

$m$ – total vehicle mass (1500 kg))

$c_{\mathrm{w}}$ – air drag coefficient (0.3)

$c_{\mathrm{r}}$ – rolling resistance coefficient (0.02)

The efficiency considers energy losses through, e.g., heat or friction. Because this highly depends on the driving condition, we use a variable efficiency depending on the driving resistance:

\begin{equation}

\eta = \frac{(\eta_{\mathrm{max}}-\eta_{\mathrm{min}}) \cdot F_{\mathrm{driving}}}{4000 \ \mathrm{N}} + \eta_{\mathrm{min}} – \frac{(\eta_{\mathrm{max}}-\eta_{\mathrm{min}}) \cdot (-2000 \ \mathrm{N})}{4000 \ \mathrm{N}}

\label{eq:efficiency}

\end{equation}

The minimum efficiency, $\eta_{\mathrm{min}}$, is assumed to be 0.1 for both fuel types and the maximum efficiency, $\eta_{\mathrm{max}}$, is assumed to be 0.4 for gasoline engines and 0.43 for diesel engines.

We introduce the idle power, $P_{\mathrm{idle}}$, because the engine consumes energy even when there is no driving resistance to be overcome. With this, power is defined by

\begin{equation}

P = \max\{P,P_{\mathrm{idle}}\} = \max\{P, 2 \ \mathrm{kW}\}

\label{eq:idle}

\end{equation}

At the moment, vehicle-specific properties like vehicle mass or cross-sectional area are defined with some average values. In the future, the enviroCar platform should be extended to provide real values or at least values for different vehicle classes, e.g. light and heavy vehicles.

*Units are defined here as measured or used in the software. Consistent unit conversion is performed when executing the calculations, but not mentioned here for clarity.