Implementation of a Fuel Estimation Algorithm Using Approximated Computing

The rising concerns about global warming have motivated the international community to take remedial actions to lower greenhouse gas emissions. The transportation sector is believed to be one of the largest air polluters. The quantity of greenhouse gas emissions is directly linked to the fuel consumption of vehicles. Eco-driving is an emergent driving style that aims at improving gas mileage. Real-time fuel estimation is a critical feature of eco-driving and eco-routing. There are numerous approaches to fuel estimation. The first approach uses instantaneous values of speed and acceleration. This can be accomplished using either GPS data or direct reading through the OBDII interface. The second approach uses the average value of the speed and acceleration that can be measured using historical data or through web mapping. The former cannot be used for route planning. The latter can be used for eco-routing. This paper elaborates on a highly pipelined VLSI architecture for the fuel estimation algorithm. Several high-level transformation techniques have been exercised to reduce the complexity of the algorithm. Three competing architectures have been implemented on FPGA and compared. The first one uses a binary search algorithm, the second architecture employs a direct address table, and the last one uses approximation techniques. The complexity of the algorithm is further reduced by combining both approximated computing and precalculation. This approach helped reduce the floating-point operations by 30% compared with the state-of-the-art implementation.


Introduction
The transportation sector is experiencing a paradigm shift thanks to the fast development in information and communication technologies (ICT). Sustainability and a multitude of other factors have contributed to the establishment of transportation 4.0. It has been argued in many published reports that the legacy transportation system is inefficient, polluting, and unsafe [1][2][3]. To remedy the problems associated with road traffic, the intelligent transportation system based on dedicated short range communication (DSRC), has been proposed with the following chief aims [4]: reduce congestion, increase road safety, improve drive experience, lower greenhouse gas emission, and make the transportation more efficient. In [5], the authors proposed an eco-routing system based on vehicle-to-infrastructure (V2I). The energy consumption on a given road is transmitted to a road-side unit (RSU) and forwarded to the traffic management center (TMC). Drivers use this information to find fuel-efficient routes. This solution necessitates a strong ICT infrastructure, which can be prohibitive. The same design principle has been advocated in [6].
The revolution in communication, embedded systems, and the associated disruptive technologies have contributed to the realization of the fourth industrial revolution, commonly known as industry 4.0. The smart city is yet another concept that emerged with the development of the Internet of Things, as well as machine learning techniques. As pictured in Figure 1, smart mobility is one of the pillars in the smart city [7]. In the EU model for the smart city, the smart mobility indicator includes safety, sustainability, and innovation. In academia, reducing car emissions has been the focus of intensive work. Many parameters impact car fuel consumption (load, tire pressure, road, weather, vehicle age, etc.). It has been demonstrated through intensive experiments that driving style substantially impacts fuel consumption. Three driving styles have been investigated in [8]. It was found that economic driving style reduces fuel consumption by 21% compared to dynamic driving.
In the literature, several algorithms have been devised for the estimation of fuel consumption [9][10][11][12]. Real-time implementation of fuel estimation algorithms has received scant attention. This work is an extension of previously published work [9,13]. The contributions reported in this work are the following: • Reducing the computational complexity by 66% using high-level transformation techniques; • Devising two techniques for computing the RPM: binary searching based on a directaddressable table and approximation algorithm; • Implementation of the devised architecture using both an IP method and a high-level synthesis tool (GAUT).
The rest of the paper is organized as follows. Section 2 compares our work with existing techniques. Section 3 reviews the fuel estimation algorithm described in [9]. Section 4 describes techniques to reduce the computational complexity of the fuel estimation algorithm and elaborates three hardware architectures. Section 5 reports the implementation results. Section 6 concludes the paper.

Related Work
In the last decade, numerous fuel estimation algorithms have been proposed. The authors of [14] elaborated an algorithm using a power-based model. The algorithm requires instantaneous values for the acceleration and speed; consequently, it cannot be used for eco-routing.
An Android application was devised in [15]. The app reads vehicle parameters through on-board diagnostics parameter ID (OBDII) interface. The system uses artificial intelligence techniques to provide the driver with eco-driving tips.
Using the Willan's internal combustion engine, the author of [9] devised a non-iterative fuel estimation model. The technique devised in [16] for the vehicle routing problem (VRP) is determined by the comprehensive modal emission model (CMEM). CMEM requires both speed and acceleration to estimate the fuel consumption. The engine RPM was fixed to 2800 for a passenger vehicle and 2400 for a truck. The authors of [13] envisioned an RPM algorithm and designed a hardware architecture using floating point arithmetic for the implementation of the fuel estimation algorithm.
Approximated computing is a new design technique that has been conceived to reduce the power consumption or increase the speed of VLSI circuits. Floating-point arithmetic consumes more area, is slower, and is more power-hungry compared with fixed-point arithmetic. Fortunately, approximated computing have also been shown to substantially reduce delay and power consumption [17]. Table 1 lists the parameters along with their typical values used to elaborated on the architecture. Subsequently, we review the equations used to elaborate the macroscopic fuel estimation algorithm described in [9,18,19]. Figure 2 summarizes the forces exerted on a vehicle in an acceleration mode. Those forces are: the traction force ( F t (t)), the aerodynamic friction( F a (t)), the rolling friction ( F r (t)), the gravity force( F g (t)), and the disturbance force ( F d (t)). The relation between those forces is described in (1) [19].

Preliminaries
where is m v denotes the mass of the vehicle's body, and a represents the acceleration of the vehicle. In traction mode, the distance traveled by the vehicle is determined using (2).
Equations (3) and (4) are, respectively, used to estimate the average value of the speed and the acceleration.v Given the air density (ρ a ), the vehicle frontal area (A f ) , the aerodynamic drag coefficient (c d ), and the rolling friction coefficient ( c r ), (5)-(8) are used to calculate the average value of the traction force.F whereF m is the acceleration force.
The mechanical power is determined from the traction as shown in (9).
The gearbox input power is calculated from (10).
where e gb is the efficiency of the gearbox, and P 0,gb the idle power of the gearbox at a given engine speed. The additional energy consumed after each stop is approximated using (11).
where v 0 is the attained speed from the standing mode. The mean value of the fuel power consumption given by (12).
where ζ e = the engine efficiency parameter, p me = fuel mean pressure, p meo = pressure losses inside the engine, and P start = power consumed when the vehicle is accelerating from a standstill to a given speed. Both p meo and ζ e can be obtained from the engine map. The fuel flow is estimated using (13).
where H l (J/kg) is the fuel's lower heating value, and ρ f (kg/l) is the fuel density.

Algorithm for Fast Fuel Estimation
To simplify the calculations, the author of [9] used the driving cycle to estimate the fuel consumption. The known driving modes are MVEG-95 (Motor Vehicle Emissions Group), ECE (European Cycle Emission), and EUDC (Extra-Urban Driving Cycle) [19]. The steps are described in Algorithm 1.

Optimized Hardware Architecture
The hardware architecture for implementing the fuel estimation algorithm needs to have the following features: (1) an RPM unit that determines the engine rotation per minute given the driving speed; (2) a functional unit for computing h 1 , h 2 , and h 3 ; (3) a hardware module for calculating F trac , P trac , P i,gb , P start ,P f uel , V f ,f c ; and (3) a memory unit for storing the constants used by the precedent unit.
To reduce the computational complexity of the fuel estimation algorithm, the following techniques can be used efficiently. A predefined driving mode can be utilized to estimate h 1 , h 2 , and h 3 . Table 2, lists the values of h 1,2,3 for the three driving cycles. The computational complexity can be further reduced by precomputing the first term of P trac , that is, the quantity h 1 1 2 ρ a A f c d . Table 3 reports the precomputed values for the three driving cycles for air density ρ a = 1.293 kg/m 3 , c d = 0.312, A f = 2.06 m 3 . It is further possible to reduce the computational cost of tractive force, F trac , by the transformation shown in (14): where K 1 and K 2 are constants that depend on the driving cycle. Tables 2 and 4 show the value of, respectively, K 1 and K 2 for the three driving cycle modes. Table 4. Precomputed value of K 2 = h 2 · g · c r + h 3 for c r = 8.63 × 10 −3 .

MVEG-95 ECE EUDC
0.173 0.194 0.160 Having performed the rearrangements, the number of multiplications is reduced from 3 to 1. The required number of arithmetic operations before and after optimization is summarized in Table 5. The control data-flow graph of the original and refined algorithm is shown in Figure 3. The control data-flow graph can be further improved by inserting pipeline latches, which reduce the critical path delay to one arithmetic unit, that is τ = max(t add , t divider , t multiplier ), where t add , t divider , t multiplier are, respectively, the critical path delay of a floating point adder, divider, and multiplier. The fuel estimation algorithm requires as input the RPM value (ω e ). The closed-form expression to compute ω e is shown in (15).
where D is the diameter of the wheel expressed in meters, γ A is the axle ratio, and γ G is the gearbox ratio.
In [19], the author proposed an approximation formula to compute the engine RPM, which is described in (16): where γ i is the gear ratio. The RPM unit can be implement in one of the following ways: a look-up table that stores a pre-calculated value or a datapath unit that computes ω e using (16). To verify the accuracy of (16), the RPM and speed have been measured using a sedan vehicle. Table 6 compares the measured RPM to the approximated one using (16). The results shows that the approximation error has an acceptable accuracy.   The RPM unit designed using a look-up table requires the implementation of a searching algorithm. The algorithm takes as input the average speed and returns the engine RPM (ω e ). The known searching algorithms are: linear, binary, hash table, and direct-table. The complexity of those algorithms is summarized in Table 7. Hardware implementation of the search algorithm. For the fuel estimation algorithm, the direct address table is the most appropriate way for searching the engine RPM, as the size of the table is small. The Algorithm 2 computes the engine RPM using the direct address table.

Algorithm
Linear Search Binary Search Hash Table Direct Address Table   Complexity O The data-flow graph of the RPM unit using the approximating equation, the search algorithm using the direct address table, and the binary search algorithm are pictured in Figure 4.

Implementation Results
Three types of architecture have been implemented using FPGA technology. Those architectures are summarized in Table 8. The architecture ArchApproxRM uses an approximation formula to compute ω e . The binary search algorithm is used by the architecture ArchBinaryRPM. The last one uses a direct address table.

Feature Approximation Binary Search Direct
For automated architecture synthesis of the RPM unit, the academic high-level synthesis tool (GAUT) has been used [20]. The design flow using GAUT is shown in Figure 5. Comparison between three architectures for the implementation of the RPM calculator is presented in Table 9. From the presented results, it is clear the the approximation method consumes fewer resources as compared with the two others.   The data path of the fuel estimation algorithm necessitates the implementation of floating-point arithmetic. This is due to the high-dynamic range of the coefficients used in the fuel estimation algorithm. Floating-point arithmetic is supported in VHDL 2008 operations [21]. Furthermore, a number of vendors offer IP for floating point operations. To select the suitable method for the realization of the data path, both the floating-point package and the IP provided by Xilinx ISE tool were implemented and tested using Virtex-6 FPGA. The core is reconfigurable and can be used to design adder, multiplier, absolute value, exponential function, square-root, conversion between fixed and floating-point, natural logarithm, and accumulator [22].
The comparison presented in Table 10 favors the IP over the floating-point package. The critical delay for the data path is 4 ns, which is nearly 17.8 times less than the one proposed in [13]. The proposed architecture can be used for eco-routing. The circuit can be further optimized by fine-tuning the floating-point arithmetic. Furthermore, the fuel estimation model does not consider factors such as driving comfort and weather conditions. A more detailed investigation will be conducted from both an algorithm standpoint as well as a hardware implementation standpoint.

Conclusions
Approximation computing is a very attractive design techniques for reducing the implementation complexity of DSP algorithms. In this paper, high-level transformation techniques were used to implement a fuel estimation algorithm for a passenger car. Three architectures were devised and implemented on FPGA technology. High-level synthesis using GAUT was employed to design the RPM calculation unit. Pre-calculation combined with approximated computing was exercised to further reduce the floating-point operations. The results show that the architecture that uses approximated multiplication for the computation of the engine RPM consumes fewer hardware resources compared with the binary-based searching method. Furthermore, the control data-flow graph was pipelined to reduce the critical path delay. The synthesis results were determined using a commercial IP. The maximum operating frequency of the data path is 236 MHz, which is dictated by the floating-point adder. The author, therefore, acknowledges with thanks GBR for technical and financial support.

Institutional Review Board Statement:
The study was conducted according to the guidelines of the Declaration of Helsinki, and approved by the Institutional Review Board (or Ethics Committee) of Dar Al-Hekma University.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: