Keywords

1 Introduction

Modeling of a vehicle’s fuel consumption and exhaust emissions could be an effective tool to help develop vehicle technologies towards a greener future with low carbon emissions. Exhaust emissions affect not only sustainability of an urban environment, but also have a negative effect on human health.

During the early stages of studying fuel emissions, researchers used data from a large spatiotemporal scale [1, 2]. Those data, however, did not provide information about the vehicle and its moving parameters. To that end, new models have been developed that take under consideration vehicle technology and moving [1].

For the calculation of a vehicle’s exhaust emissions, the first step is to approximate the fuel consumption during a trip. However there are numerous factors to affect the estimation of fuel consumption, like, for example, the weather, the type and characteristics of the vehicle, the type of the fuel, the driver and the traffic conditions.

Smartphones equipped with various sensors such as GPS, compass, accelerometer etc., can provide a means with which one can collect driving data [3,4,5]. As the smartphone industry is continuously expanding, there has been a series of applications developed to support driving, in general, and provide data about fuel consumption and exhaust emission in particular [6].

Approximating a vehicle’s fuel consumption using smartphone-recorded data has a few fundamental difficulties. One of them is the low-accuracy of a smartphone’s GPS data [7]. Furthermore, the data from the smartphone’s sensors are extremely noisy and there are no other additional vehicle data that would help in our analysis, like angular velocity of the engine, horsepower, torque and gear ratio.

In the present study, we aim to develop an algorithm to be used for estimating fuel consumption using only a smartphone’s sensors, while exhibiting the same accuracy in our results as when using the vehicle’s on-board diagnostics, regardless of the aforementioned factors that affect fuel consumption.

In order to estimate the emissions using a smartphone’s GPS data after we have calculated the fuel consumption, we follow the following calculations:

One liter of petrol corresponds to around 0.737 kg/l density [8]. The chemical reaction of the production of the emissions using petrol is given by [9]:

$${\text{2C}}_{{8}} {\text{H}}_{{{18}}} + {\text{ 25O}}_{{2}} \to {\text{ 16CO}}_{{2}} + {\text{ 18H}}_{{2}} {\text{O}}$$

That means that the specific CO2 emission is 3.30 (kg of CO2)/(kg of petrol) = 2.43 kg of CO2 per liter of petrol [8].

For diesel engines, the emission formula is given by:

$${\text{C}}_{{{12}}} {\text{H}}_{{{24}}} + {\text{ 18O}}_{{2}} \to {\text{ 12CO}}_{{2}} + {\text{ 12H}}_{{2}} {\text{O}}$$

The density of diesel is 0.848 kg/l, which means that the specific CO2 emission is 3.15 (kg of CO2)/(kg of diesel) = 2.67 kg of CO2 per liter of petrol [8].

Thus, using the fuel consumption algorithm we developed and the emission formulas for petrol and diesel engines we can estimate the CO2 emissions using the smartphone data.

2 Data Collection

Data collection for the present study is based on the use of a combination of the Androsensor [10] and Torque Pro [11] android applications, alongside the ELM327 device [12]. Androsensor is designed to record data from all the available sensors in a smartphone in.csv format with a sampling rate up to 10 Hz. Torque Pro, on the other hand, uses Bluetooth to extract the real on-board diagnostics data (OBD) [13] from the vehicle with the help of ELM327, a programmed microcontroller produced by ELM Electronics for translating the OBD interface found in most modern cars.

2.1 Data Accuracy and Fuel Consumption Algorithm

In order to approximate the fuel consumption of the vehicle using only smartphone data we designed an algorithm that can account for several parameters, namely speed, kinetic energy, dynamic energy, aerodynamic and the road friction, rolling resistance, idling fuel consumption, fuel consumption when the vehicle stops, transmission-engine load, mass of the vehicle, drag coefficient, tire pressure, frontal area of the vehicle, density of the air and one free factor, Mf, that depends on the vehicle’s model. It is necessary to point out that the poor performance of the GPS is a known problem, especially, in urban areas [14,15,16] where narrow streets and high buildings are present, hence the GPS speed estimation is poor.

The algorithm accepts as inputs both the altitude and the speed from the smartphone’s GPS data, as well as the vehicle’s characteristics (i.e. model, mass, drag coefficient, frontal area, tire pressure) and air density (see Fig. 1).The outcomes of the algorithm are the fuel consumption approximation and a better estimation of the vehicle’s speed after improving the GPS data. The schematic representation of the algorithm’s operation is represented in Fig. 1.

Fig. 1
A top-to-the-bottom flow chart. It starts with input with three factors, and they are further classified. They are Smartphone data, Vehicle Characteristics, and Additional factors. These factors lead to Fuel Consumption Algorithm. After that comes Outcome: Fuel consumption approximation and Better G P S speed approximation.

Schematic representation of the operation of the fuel consumption algorithm

More specifically, in order to achieve a better estimation of the GPS speed (from here on denoted as iGPS speed, where ‘i’ stands for ‘improved’) we calculate for every single point in a GPS-speed diagram the least square line [17, 18] that interpolates n points before and n points after this single point (in total 2n + 1 points). Subsequently, we attribute to the central point the corresponding value of the least square line. Of course, with this approximation we lose the first n and the last n points of our measurements, however, the n value has been selected to correspond to a few number of points, e.g. n = 5, which amounts to 0.5 s.

For the purpose of the current analysis, the n value is selected equal to 5 (n = 5). The reason for this value is the sampling rate of 10 Hz for both of the applications that we are using. In addition, the closest number of points in order to cover a time frame of almost (and simultaneously greater than) one second is 11. Thus, filtering the GPS speed signal through this process, we increase the accuracy compared with the “real” speed data that were obtained from the OBD interface via the ELM327 device.

3 Fuel Consumption Analysis

3.1 Field Tests

For the purpose of this study, we designed an experiment of several routes with a wide range of different parameters (e.g. car, driver, cities, geography, weather, time), as well as the effect of traffic conditions and the driving behavior to the fuel consumption rate. In particular, we followed six different testing routes with three different drivers (Driver1, Driver2 and Driver3 hereafter) that were not aware of the exact reason of the measurements (thus avoiding purposeful driving), in two different cities in different European countries (i.e. Coventry, UK and Athens, Greece, see maps in Fig. 2) and three different vehicles, a three year old Ford Fiesta 1600 cc petrol with automatic transmission (Vehicle1, hereafter), a five year old Ford Fiesta 1600 cc petrol with manual transmission (Vehicle2, hereafter), and an eleven year old Suzuki Swift 1300 cc 92HP petrol with manual transmission (Vehicle3, hereafter).

Fig. 2
Images of four maps, tagged as a, b, c, and d. There are three routes selected in maps a, c, and d, labeled as Route a 1, Route c 1, and Route c 2, respectively. In map b, three routes are selected, which join each other, Route b 1, Route b 2, and Route b 3.

Maps of the routes followed during the field trials: a Route a1 in Coventry city, UK, with the first driver and the first Vehicle (Automatic Ford Fiesta), b Routes b1, b2, b3 with the red, green, and blue solid lines respectively, in the centre and the surrounding area of Athens, Greece, with the second driver and the second vehicle (Manual Ford Fiesta), c Route c1 in the west suburbs of Athens covering the regions (Municipalities) of Peristeri, Nea Philadelphia, Egaleo and Chaidari. And d Route c2 in the region of Chaidari in Athens, Greece

For the better understanding of the results, the discussion is more extensive for the first route than the others. However, we follow exactly the same analysis for all cases.

3.2 Results

In the first field trial, Driver1 drove Vehicle1 in Coventry City, UK. Figure 2a shows the route a1 that has been followed for the first test. We asked the driver to drive in a range of driving styles from “passive” driving behavior to “restless”. Thus, the average speed of the trial was 31.8 km/h, the standard deviation of the speed was 22.5 and the max speed was 85.0 km/h. The altitude variation in this route was 29 m. Figure 3 shows the comparison between the “real” (OBD) fuel and the smartphone approximation algorithm’s outcome for every single point. One can observe the high-quality matching of the two time-series.

Fig. 3
A graph with its x-axis is labeled as Fuel and its range is 0, .2, .4, .6, .8, 1, 1.2, 1.4, 1.6, 1.8, and 2. And its y-axis is labeled as Time, and its range is 0, 100, 200, 300, 400, and 500. Two lines, smartphone and O B D start from 0 goes straight with many spikes. The highest recorded hike is 1.8 cc.

A typical excerpt of Route a1, of the “real” fuel consumption extracted from the OBD with the solid orange line, together with the smartphone approximation algorithm outcome with the blue solid line

Nevertheless, the right measure to evaluate our method would be the total estimation of the fuel consumed. The calculation of the Cumulative Distribution Function (CDF) [19] gives a different perspective on the whole behavior of the fuel consumption data during the time of the test as well as the total fuel consumed.

Figure 4a presents the CDF for both the “real” fuel consumption and the approximation using the smartphone data. As we can see, the algorithm’s outcome follows exactly the behavior of the “real” data extracted from the OBD and the total estimation error is only 1.17%. We can also notice that there is a slight difference in the beginning of the trial that could be interpreted by the fact that the engine was cold and, for this reason, the fuel consumption rate was higher than normal. It is worth to mention that this difference is observed any time that we are starting the vehicle with a cold engine.

Fig. 4
A total of six graphs a, b, c, d, e, and f are labeled as Route a 1 Vehicle 1, Driver 1, Route b 1 Vehicle 2 Driver 2, Route b 2 Vehicle 2 Driver 2, Route b 3 Vehicle 2 Driver 2, Route c 1 Vehicle 2 Driver 2, and Route c 2 Vehicle 3 Driver 3, respectively. There are two lines in each graph; Smartphone and O B D start from 0 and then go up.

The cumulative distribution functions of the “real” fuel consumption as extracted from the OBD with the solid orange lines, together with the Cumulative distribution functions of the smartphone approximation algorithm’s outcome with the blue solid lines for the Routes a  a1, b1, b2, b3, e  c1 and c2

A second example of the behavior of the algorithm’s operation is shown in Fig. 5a, where we see the total fuel consumption of the smartphone approximation and OBD fuel measurements for a sliding window of 901 points (close to 1.5 min). Each point in the diagram, therefore, represents the total fuel consumption for the time window starting 450 points earlier to this point and ending 450 points after this point. We chose this length since is close to 1000 points, while it is worth to note that we have the same accuracy for different window lengths.

Fig. 5
A total of six graphs a, b, c, d, e, and f are labeled as Route a 1 Vehicle 1, Driver 1, Route b 1 Vehicle 2 Driver 2, Route b 2 Vehicle 2 Driver 2, Route b 3 Vehicle 2 Driver 2, Route c 1 Vehicle 2 Driver 2, and Route c 2 Vehicle 3 Driver 3, respectively. There are two lines in each graph labeled as Smartphone and O B D.

The total fuel consumption for the smartphone approximation (blue solid line) and OBD fuel measurements (orange solid line) for a sliding window of 901 points (close to 1.5 min) is presented for the Routes a1, b1, b2, d  b3, c1 and f  c2. Each point in the diagram represents the total fuel consumption for the time window starting 450 points earlier to this point and ending 450 points after this point

For the second field trial, we used Vehicle2 and different Driver2. The field test took place in Athens, Greece (see route b1 in the map of Fig. 2b), in a heavy traffic route, especially during the first part of the route. The average speed of this trial was 17.5 km/h, the standard deviation of the speed was 19.5, the max speed was 76.0 km/h and the altitude variation in this route was 80 m. We kept exactly the same values for the algorithm’s operational parameters as in the previous test, since the vehicle is a similar model of Ford Fiesta, but with a manual transmission.

The CDF of the fuel consumption approximation when we use the smartphone data together with the real fuel consumption data is presented in Fig. 4b and the total fuel consumption’s comparison of the sliding window of 901 points is presented in Fig. 5b. The results show that the final fuel consumption approximation error in this case is 0.7%. As in the previous case, the “smartphone” CDF curve follows precisely the behavior of the “real” data. We can also see the small difference when the engine is cold (the air temperature was close to 0 °C) in the beginning of the route. The fact that the approximation is independent of the car’s gearbox type for a similar car model in different driving conditions shows the exceptional operation of the algorithm.

The third field trial was conducted with the same driver (Driver2) and car (Vehicle2) as in the second field test in Athens, for the route b2 in the map of Fig. 2b. This test includes different types of road, i.e. Highway, Avenue, Street, Alley, normal driving, periods of testing with different driving styles (restless and passive) and a high variation in altitude. The average speed of this trial was 37.4 km/h, the standard deviation of the speed was 29.7, the max speed was 119.9 km/h and the altitude variation in this route was 172 m.

In this case, the CDF (see Fig. 4c) of the smartphone’s data follows once again exactly the same behavior as the “real” data. The estimation error in this trial is the greatest of all cases, reaching 10.1%. However, the excellent behavior of the improved (via our algorithm) data is observed in Fig. 5c, which shows the total fuel consumption’s comparison, as in the previous cases, of the sliding window of 901 points between the “real” and the “smartphone” data.

The fourth field trial was held by the same driver (Driver2) and vehicle (Vehicle2), again in Athens, Greece (see route b3 of Fig. 2(b)). The challenges to this route were the high variation in altitude and the fact that one part of the route was made with different driving styles (restless / passive). The average speed of the trial was 26.5 km/h, the standard deviation of the speed was 22.0, the max speed was 96.5 km/h and the altitude variation in this route was 156 m. In this case, the final fuel consumption approximation error is only 1.4%. The CDF of the fuel consumption approximation when using the smartphone data together with the “real” fuel consumption data is presented in Fig. 4d. The “smartphone” curves, as the previous times, follow the “real” data (see Figs. 4d and 5d).

Throughout the last three field tests, we covered a large area, including the centre and the surrounding region of the city of Athens from the East to the West and from the North to the South (see the map of Fig. 2b). The following two field trials, however, took place with a different driver (Driver3) and car (Vehicle3) again in Athens, but in completely different routes (see the maps of Fig. 2c and d). In these tests we inserted into the algorithm the specific values for the mass, the drag coefficient, the frontal area of the Suzuki Swift with the different factor Mf for this vehicle model, and then followed the same procedure as in the previous tests.

The fifth field trial (see route c1 of Fig. 2c) is a normal route, including highway, streets and alleys, in the west Attica in the surrounding area of the capital of Greece. In this route the average speed of the trial was 37.5 km/h, the standard deviation of the speed was 25.8, the max speed was 97.1 km/h and the altitude variation in this route was 111 m. The total approximation error here was only 1.2%. One can observe again the remarkable efficiency of our algorithm (see the corresponding diagrams in Figs. 4e and 5e). As we observed in the previous cases the only difference in this test between the OBD and the smartphone data is again at the beginning of the route when the vehicle’s engine is cold. The air temperature during the route was about 1 °C. It is worth to mention here that, although the vehicle was produced eleven years ago, the curves of the CDFs of “smartphone” and “real” fuel consumption data are incredibly close.

The last field trial (see route c2 of Fig. 2d) was carried out with three different driving styles (passive, normal and restless) in a place with a small hill with a very high slope that we “climbed” three times in a row. The average speed of this trial was 24.7 km/h, the standard deviation of the speed was 14.9, the max speed was 66.7 km/h and the altitude variation in this route was 53 m. Once again, the operation (see Figs. 4f and 5f) of the algorithm was excellent since the total fuel consumption’s estimation error is only 0.5%.

4 Concluding Remarks

In the present study, we performed six field tests in order to determine a vehicle’s fuel consumption. We developed an algorithm in order to improve the accuracy of GPS data recorded via a smartphone with respect to the real vehicle data extracted from OBD. We found that the approximation error between the two data sets (smartphone and OBD) varies between 0.3 and 3.7%, except one case where we observed 10.1% error and in which the fuel consumption rate of the real data is changing rapidly.

In general, the results show that the smartphone’s data could be used for the identification of a vehicle’s fuel consumption during a trip. Using this approach, a driver could monitor their driving behavior in order to reduce their fuel consumption through specially designed applications. This method can become a valuable and inexpensive tool for reducing carbon emissions and developing macro-traffic simulation models. For this to happen, however, implementation of smartphone applications at a large scale is required.