Application of ANFIS Model for Thailand’s Electric Vehicle Consumption

Generally, road transport is a major energy-consuming sector. Fuel consumption of each vehicle is an important factor that affects the overall energy consumption, driving behavior and vehicle characteristic are the main factors affecting the change of vehicle fuel consumption. It is difficult to analyze the influence of fuel consumption with multiple and complex factors. The Adaptive Neuro-Fuzzy Inference System (ANFIS) approach was employed to develop a vehicle fuel consumption model based on multivariate input. The ANFIS network was constructed by various experiments based on the ANFIS Parameter setting. The performance of the ANFIS network was validated using Root Mean Square Error (RMSE) and Mean Average Error (MAE) which related to the setting of ANFIS parameters. The experimental results indicated that the training data sample, number, and type of membership functions are the most important factor affecting the performance of the ANFIS network. However, the number of epochs does not necessarily significantly improve the system performance, too many the number of epochs setting may not provide the best results and lead to excessive responding time. The results also demonstrate that three factors, consisted of the engine size, driving speed, and the number of passengers, are important factors that influence the change of vehicle fuel consumption. The selected ANFIS models with minimum error can be properly and efficiently used to predict vehicle fuel consumption for Thailand’s road transport sector.


Introduction
The concerns of energy consumption and environmental impact caused many countries to attempt to improve energy efficiency and promoting an alternative technology. In 2019, the transportation sector was the highest fossil fuel consumption, accounting for 39.2%, and it was the second-largest CO2 emissions source, accounting for about 34% of the world's emissions [1]. According to the energy and environmental crises, the government of Thailand has promoted energy efficiency plans in all sectors. In the energy efficiency plan of Thailand, the target is to reduce the energy consumption of the transportation sector by 40% of the total target in 2030. There are 10 measures to reduce energy consumption in the transport sector. One of which is the use of electric vehicles (EVs) technology, accounting for 4% of the total energy consumption reduction of the transport sector, and it is expected that 1.2 million EVs will be used by 2030 [2]. However, with the increasing of an EV fleet, the uncertainty load of EV charging has been increased. Therefore, the effective assessment of load demand from EVs charging has become one of the most important challenges in the transport section. To meet the challenges, investigation of factors, especially reliability and accuracy prediction of fuel consumption affecting the remaining battery level of each EV before the next recharging is a very important factor.
In general, the fuel consumption of internal combustion engine vehicles (ICEVs) and EVs depends on: (1) vehicle characteristic parameters, such as engine size and age of the vehicle [3] and (2) driving behavior, such as driving speed and number of passengers [4]. In the literature, several studies have analyzed the influence of driving behavior on the change of fuel consumption [5][6][7]. These studies indicated that it is important to study the correlation between driving behavior factors and vehicle fuel consumption, which also concluded that the driving behavior factor was suitable to predict the fuel consumption of each vehicle. Vehicle fuel consumption model was developed to estimate the energy consumption and emission based on driving behavior factors, only instantaneous speed and acceleration were investigated [8][9][10][11]. The driving behavior and fuel consumption data of taxies were collected from mobile phones and onboard diagnostic systems (OBD) installed in taxis [12]. Three fuel consumption prediction models including artificial Neural Network (ANN), support vector regression (SVR), and random forest technique were compared. All three models constructed could accurately predict the fuel consumption with an absolute relative error of less than 10%. Meanwhile, the random forest technique, the gradient boosting, and ANN were applied for fuel consumption modeling of the public bus based on several internal factors including vehicle characteristics, and driver behavior, as well as external factors such as road conditions, traffic, and weather [13]. The external factors that affect fuel consumption were also applied in Khayyam et al. [14] including road-slope, road-friction, wind-drag, accessories, and mechanical losses. These models mentioned above can be categorized as conventional methods, but these developed models can only be used in some ICEV types. For the fuel consumption model development of EVs, the data set used to construct the fuel consumption model is both derived from a questionnaire survey and real-world driving tests. These data sets were carried out to develop the vehicle fuel consumption model with different methods Shankar et al. [15][16][17][18][19].
Due to the factors influencing fuel consumption, which is relatively difficult to construct an analytical or numerical model for a fuel consumption assessment. Thus, the fuel consumption assessment can be considered as a non-linear complex system. Therefore, a suitable tool to support the prediction model development with the multivariate input data was investigated. Artificial Intelligent (AI) techniques (ANN, fuzzy logic, neuro-fuzzy, etc.) present solutions to this problem and can be used for modeling and prediction of complex systems with a multivariate input [20]. Neuro-fuzzy or an adaptive neuro-fuzzy inference system (ANFIS) is a hybrid technique between ANN and fuzzy logic which combines the advantages of the two. Furthermore, the ANFIS approach has been widely used in numerous fields, as reported in Karaboga et al. [21]. ANFIS approach was used for determining the optimal inputs of the fuel consumption model with a minimum root means square error (RMSE) value. The best two inputs of the ANFIS model for prediction mile per gallon (MPG), i.e., "Weight" and "Year", provide a minimum value of RMSE [22]. However, this study was presenting an alternative approach to determine the input variables of the ANFIS model, but only the vehicle characteristic parameter was considered as inputs of the model. In previous papers, we developed the fuel consumption model by using the ANFIS approach based on vehicle characteristic parameters and driving behavior factors. Both ICEVs and EVs were investigated, which were categorized into five types of vehicles including private cars, taxis, private motorcycles, passenger motorcycles, and non-fixed route buses [23][24][25][26]. The ANFIS models were constructed by using only the "Gaussian" membership function type. Furthermore, some input variables of the model were a conflict, so the fuel consumption predicted results could not be interpreted clearly. Therefore, it is difficult to prove that these models are suitable to implement in the road transport sector.
The objective of this paper is to develop and improve the vehicle fuel consumption model of ICEVs and EVs. The Adaptive Neuro-Fuzzy Inference System (ANFIS) approach was employed to develop a vehicle fuel consumption model based on the driving behavior and vehicle parameter characteristics data, these data obtained from the survey and test driving. First, the ANFIS network was designed using trial and error based on various experiments by the setting of ANFIS parameters. Then, the experimental results were validated using Root Mean Square Error (RMSE) and Mean Average Error (MAE), the best efficiency model was selected with the minimum error. Finally, the prediction results of fuel consumption of both ICEVs and EVs, categorized into five types of vehicles such as private cars, taxis, private motorcycles, public motorcycles, and non-fixed route buses, were investigated. The evaluation of fuel/energy consumption of each vehicle was presented as thermal energy in terms of megajoule per kilometer (MJ/km).
The rest of the paper is organized as follows: Section 2 describes an overview of the analysis framework and the adaptive neuro-fuzzy inference system (ANFIS) approach. Section 3, the proposed methodology of data collection is presented explaining the process of survey and test-driving data collection. Section 4 presents the model construction by the setting of ANFIS parameters. Section 5 presents the experimental results including the model validation results and prediction results of fuel consumption from the developed model. Finally, Section 6 summarizes the paper and discusses the different conclusions.

Analysis Framework
The process of fuel consumption modeling was divided into two parts, data collection and model construction. The methodology of the model development shows in Fig. 1. First, the characteristic parameter data and driving behaviors data of both ICEVs and EVs were collected. Both ICEV and EV are categorized into five types of vehicles, including private cars, taxis, private motorcycles, public motorcycles, and non-fixed route buses. The survey questionnaire was used for collecting the data from ICEV drivers, which was collected from multiple drivers in Bangkok and metropolitan areas. While the driving test was used for collecting the data from EVs, which was deployed under real-world driving tests in Bangkok and metropolitan roads with different traffic conditions and different driving conditions. Then the collected data was analyzed by utilizing analysis of variance (ANOVA). Then the key factors that affect the fuel consumption of each vehicle type were determined as the input of the fuel consumption model. Collected data was divided into two sets: training data set and testing data set. Of all data collected, the training data set was randomly selected for several scenarios, and the remaining data were test data set. Several experiments were conducted based on the ANFIS parameter setting, and the experimental results were compared with minimum error. The RMSE and MAE were utilized as the predictive indicator to perform validation of the developed models.

Prediction Model
The Adaptive Neuro-Fuzzy Inference System (ANFIS) principle gives the mapping relation between the input and output data by using a hybrid learning method to determine the optimal distribution of membership function parameters which are extracted from a data set according to a given error criterion [27]. In general, the ANFIS architecture of five layers for constructing an inference system can be described as shown in Fig. 2. Each layer consists of several nodes described by the node function. The rule base of ANFIS contains fuzzy if-then rules of Sugeno type and was used to output defuzzification, and the detail of ANFIS architecture was described in Teansri et al. [28].

Survey Data Collection
Since there are many types and brands of ICEVs in Thailand, data collection through test-driving cycle may be difficult to obtain adequate information. Thus, to obtain a wide variety of benefits under comprehensive types and brands of driving information for ICEVs in Thailand, the appropriate method of collecting the driving data of ICEVs is a survey questionnaire.  In this study, vehicle characteristics and driving behaviors of ICEVs registered in Bangkok metropolitan city were collected using survey questionnaires. The ICEVs were categorized into five types including private cars (ICE-Car), taxis (ICE-Taxi), non-fixed route buses (ICE-Bus), and motorcycles (ICE-Motor) which consisted of personal motorcycles and public motorcycles. The survey questionnaire was developed by using factors that may affect vehicle fuel consumption such as vehicle characteristics (engine size and age of the vehicle), and driving behaviors (driving speed, travel distance per day, and number of passengers), etc. Furthermore, the driver's daily use behaviors data such as daily travel distance, type of fuel used, the frequency of refuel, fuel cost, and frequency of vehicle used was investigated. Since fuel consumption cannot be obtained directly by the driver, the surveyed data was matched and determined the fuel consumption per distance (MJ/km) of each vehicle.
There are many theories for an optimal initial number of the sampling data for the survey data collection, which is depending on the total number of concentrate groups. In this paper, Taro Yamane's theory was performed for determining the number of the sampling data. The confidential level at 95% of Taro Yamane's theory was employed to determine the number of sampling data of each vehicle type. According to Taro Yamane's table [29], the total number of concentrate groups more than 100,000 samples, the sampling number of survey data collection methods can be determined at least 400 samples. The surveyed data was collected between January 2016 and August 2016, and the data was updated by survey questionnaire between January 2019 and June 2019. The sampling data can be determined by considering the registration number of ICEVs in 2019, the surveyed data shown in Tab. 1.

Test-Driving Data Collection
An EV operates on an electric motor supplied by electric power. Currently, there are many types of EVs, such as electric private cars, electric taxis, electric motorcycles (E-Motor), and electric buses (E-Bus), etc. So as not to be confused with the variety of EVs, in this paper, electric private cars and electric taxis are represented by electric cars (E-Cars).
In Thailand, EVs have not been used widely, which the registration number of EVs in 2019 [30] can be displayed in Tab. 2. Therefore, in this study, the data collection of E-Cars and E-Motor were obtained from a real-world driving test in Bangkok and metropolitan road with different traffic condition and different driving pattern, whereas the experimental test-driving data in the report under the public electric vehicle development project of the PEA was used for E-Bus. An E-Cars used in the test-driving cycle was supported by the Metropolitan Electricity Authority (MEA) organization, which was categorized into three sizes (sizing of the electric motor) consisted of a small, medium, and large. The power of the electric motor of a small, medium, and large engine size are 49, 70, and 80 kilowatts (battery capacity is 16, 24, and 60 kWh), respectively. In this test-driving cycle, an E-Cars was deployed under various driving patterns such as For An E-Motor, according to vehicle characteristics, the sizing of the electric motor was categorized into three sizes: small size (800 watts), medium size (1,200 watts), and large size (1,500 watts). The testdriving cycle of an E-Motor was deployed under various driving patterns such as driving under different speed conditions, driving under different traffic conditions, and driving under a different number of passenger conditions, etc. In addition, tested-driving data in previous research [31] was also considered. In the case of E-Bus, due to the limitation of the market in Thailand, which E-Bus was only used in the Provincial Electricity Authority (PEA) organization. Therefore, in this study, the experimental data of E-Bus under the public electric vehicle development project of the PEA was used for fuel consumption model development [32]. The only 120 kW of motor power of the E-Bus was considered (battery capacity is 169 kWh) and capable of carrying was approximately 43 passengers.

Data Analysis and the Determination of the Key Factors
The data obtained from the survey and test driving were not directly available for modeling, the statistical analysis was investigated. Therefore, data analysis was performed using appropriate statistical techniques to present the results of the correlation of surveyed data. The analysis can be performed with both qualitative and quantity interpretation. The response rate of the survey questionnaire was presented. Information of respondents by position and operational function was also revealed. As the objective of determining the key factors that affect the fuel consumption of each vehicle type, the hypothesis testing was performed using ANOVA [33] with a confidence level of 95 (statistical significance level 0.05). The results of the hypothesis testing of ICEVs and EVs shown in Tabs. 3 and 4, respectively. Public motorcycles -

5.
Non-fixed route buses 75 Tab. 3 presents the key factors that influence the fuel consumption of ICEVs, which the factors that affect the change of fuel consumption of the private car, taxi, personal motorcycle, and public motorcycle are composed of five factors: engine size, fuel type, driving speed, age of the vehicle and number of passengers. The significance value of all five variables is less than the defined statistical significance level of 0.05, which was indicated that these factors were significant to the change of fuel consumption of the four vehicle types mentioned above. While the fuel type does not affect the change of fuel consumption for the non-fixed route bus due to only diesel fuel oil was considered.
For EVs, the fuel type factor has no effect on fuel consumption due electric power is considered only one type. Likewise, the age of the vehicle factor was not considered, as the data collected in this study was based on the new EVs. Therefore, the age of the vehicle factor does not affect fuel consumption. In Tab. 4, the main factors that effect on fuel consumption of the private car, taxi, personal motorcycle, and public motorcycle are composed of three factors: engine size, driving speed, and number of passengers, whereas the engine size has no effect on fuel consumption for the non-fixed route bus due to only one engine size is considered.

ANFIS System Training Process
The fuel consumption model in this paper is multi-inputs and a single output model, in which the output is the amount of fuel consumption per travel distance in terms of MJ/km. The ANFIS system training methodology is summarized in Fig. 3. The process begins by determining the training data set which was obtained from a variation on randomly selected. Of all data collected, 55%, 65%, 75%, and 85% were randomly selected as training data set and the remaining data were assigned as testing data set. To ensure the accuracy and stability of the prediction model, the sample selection was conducted ten times.
The MATLAB toolbox was used for the data training process of ANFIS and uses the anfis function. The training data set was used to train with the anfis function. The data set must be in a matrix form, where the last column of the matrix is the output, and the rest of the columns are representing as the inputs of the system, in which the number of columns is equal to the number of inputs. The rows of a matrix represent all the existing training data.
The Formulation of a membership function depends on the system developer, which the developer may create membership function parameters if they have knowledge of the expected shapes. The genfis function was used to create the membership functions, the component of this function consists of 3 parts: input training data, output training data, and options data. In the part of option data, we can define an initial FIS structure, consisted of the input membership function type, output membership function type, and the number of membership functions with the genfisOptions command. This work uses the "Gaussian-shaped (gaussmf), Triangular-shaped (trimf), and Generalized bell-shaped (gbellmf)" membership function type. The number of fuzzy rules is dependent on the initial number of membership functions of each input variable, which is equal to the number of all member functions multiplied. Each rule generated is a multiinput single-output structure, in which the output membership function is of type "constant" by default. In addition, we can also define the training epoch number of the ANFIS training process with anfisOptions command. The training epoch number was set to different values. Once the initial FIS structures are completely created, system training begins.
There are four different the number of epochs assigned to the experiment, 25, 50, 100, and 200. The training error result of one training process (ICE-car) is shown in Fig. 4. Fig. 4a shows the relation between the training error of the network and the number of epochs of the ICE-Car model. It can be seen that the error is decreased as the number of epochs increases and finally levels off. The minimum value of the training RMES occurred at the 100th iterations or more. However, an excessive training epoch number determination leads to model overfitting. To avoid overfitting, the setting of different training epoch numbers with a trial-and-error method was tested. This will allow us to determine the optimal epoch number with the lowest RMSE. After the ANFIS system training is complete, the evalfis function was used to evaluate the prediction result and system performance. The process of evaluating system performance is entering testing data set into the fuzzy system, which the data sets do not include training data set. The output of the evalfis function represents the final output of the ANFIS system. The fuel consumption prediction results of one training process shown in Fig. 4b. The figure shows the degree of fuel consumption prediction and the actual fuel consumption. As can be seen that, some points with a larger deviation are the prediction results of the ANFIS system. However, overall, the prediction model has a good fitting degree.
To evaluate the accuracy and efficiency of the fuel consumption prediction models, two indexes, namely, the root-mean-square error (RMSE) and mean average error (MAE), were performed. A test of the performance criteria, RMSE between the actual values and predicted values of ANFIS output were compared. RMSE was calculated using the following equation: Mean Average Error (MAE) is used and defined as where N is the total number of predictions, ŷ i is the predicted result, and y i is the original result.

Experimental Results and Discussions
Various experiments were conducted by training data set selected and ANFIS parameter set up. The sample selection was conducted ten times. The data was divided into two sets: the training data set and the testing data set. Of all data collected, 55%, 65%, 75%, and 85% were randomly selected as training data set and the remaining data were assigned as testing data set. The training data set was used to train the ANFIS, whereas the testing data set was used to validate the accuracy and the performance of the ANFIS network. This section presents the validation and prediction results of vehicle fuel consumption obtained from the ANFIS model. The best model will be selected based on the comparison of RMSE and MAE values according to the optimal ANFIS model setting. Once the training data set was selected, membership function types are determined for comparison. This work uses the "Gaussian-shaped (gaussmf), Triangular-shaped (trimf), and Generalized bell-shaped (gbellmf)" membership function type. Furthermore, the different training epoch numbers were assigned, 25, 50, 100, and 200. Then the ANFIS network with the lowest RMSE and MAE value was selected. Four main aspects will be considered in relation to the ANFIS system training: the number of membership functions (the number of membership functions is determined based on the classification of the training dataset.), type of membership functions, overfitting, and training options (training data sample and epoch number).
The first thing to consider after the ANFIS learning rule system is the training RMSE value. Tab. 5 shows an example of a certain number for a total of ten tests, it compares the training RMSE obtained from the ANFIS learning rule system the different amount of training data set, and the number of epochs. The results indicated that the number of epochs of the ANFIS learning rule system had no effect on the model performance but influenced the response time resulting in model overfitting. It is observed that both the type of membership functions and the amount of training data set used in the ANFIS learning rule system affect the model performance. As the results of the training RMSE are shown in Tab. 5, for the ANFIS model with the Generalized bell-shaped (gbellmf) membership function, and the epoch number 100 with 85% of training data set was selected as the best fit model. However, the testing RMSE and MAE must be considered.

Fuel Consumption Model of Car
In this study, the type of car can be divided into two categories, namely private car, and public car (taxi). Private cars and taxis are similarly characteristic in terms of the brand of vehicles, but different daily travel distances. Thus, in this paper, the fuel consumption model of the taxis can be used the same fuel consumption model of private cars. Five key factors, including engine size, fuel type, driving speed, age of the vehicle, and the number of passengers, were assigned as model input of ICE-Car. Engine size has five membership functions represented as "Very Small, Small, Medium, Large and Very Large". Fuel type has four membership functions represented as "Gasoline, Diesel, LPG, and CNG". Driving speed has five membership functions represented as "Very Slow, Slow, Medium, Fast and Very Fast". The age of the vehicle has three membership functions represented as "New, Medium, and Old". The number of passengers has five membership functions represented as "Very Low, Low, Medium, High and Very High". Thus, the model was tested with membership function number (5*4*5*3*5), and membership function types "Gaussian-shaped, Triangular-shaped, and Generalized bell-shaped" were used. The generated fuzzy inference system structure contains 1500 fuzzy rules.
For an E-Cars model, three model inputs, consisted of engine size, driving speed and the number of passengers, were constructed. Engine size has three membership functions represented as "Small, Medium, and Large". Driving speed has five membership functions represented as "Very Slow, Slow,  Medium, Fast and Very Fast". The number of passengers has five membership functions represented as "Very Low, Low, Medium, High and Very High". The membership function types "Gaussian-shaped, Triangularshaped, and Generalized bell-shaped" were used with membership function number (3*5*5). The generated fuzzy inference system structure contains 75 fuzzy rules.
Tab. 6 shows the ANFIS learning results. For ICE-Car, the Generalized bell-shaped (gbellmf) membership function type performs most effectively with a minimum error during validation with the epoch numbers 50. The ANFIS1 network with 85% of the training data set is the model that provided the best results, which can be expressed with training RMSE and testing RMSE by 0.640 and 0.880, respectively, whereas the calculated MAE value has better accuracy when compared to the other three training data sets. For the ANFIS2 network with three inputs, the Gaussian-shaped (gaussmf) membership function type with epoch number 200 and 85% of the training data set was selected as the best fit model for describing the fuel consumption of E-Car. The training RMSE and testing RMSE for the selected model of the ANFIS2 network are 0.019 and 0.025, respectively. Likewise, MAE for the selected model is 0.017.
The fuel consumption prediction results of the ANFIS model shown in Fig. 5. The figure shows the changes in the values of the driving speed and engine size versus the amount of fuel consumption in the ANFIS1 model. As it can be seen in Fig. 5a, with an increase in the engine size the fuel consumption value goes on increasing, which is due to the larger engine size, consume more energy. Whereas the low driving speed consumes higher energy than moderate driving speed and high driving speed. The driving speed range at which the low energy consumption is between 60 and 80 km/hrs. In a comparison of the ANFIS2 model that is presented in Fig. 5b, the fuel consumption was approximately 0.60 MJ/km by the engine size of 40 kWh with driving speed of 100 km/hrs., whereas the fuel consumption was increased to 0.79 MJ/km at the same size of the engine, but the more driving speed of 120 km/hrs.

Fuel Consumption Model of Motorcycle
The type of motorcycle in the road transport sector can be categorized into two groups, personal motorcycles, and public motorcycles. The physical characteristics of personal motorcycles and public motorcycles are similar, and they have used the same brand, but they differ in the purpose of use and daily travel distance. Therefore, the prediction model of fuel consumption for the public motorcycle can be used the same as a personal motorcycle.  Key factors assigned as the model input of ICE-Motor are comprised of five factors including engine size, fuel type, driving speed, age of the vehicle, and the number of passengers. Engine size has four membership functions represented as "Very Small, Small, Medium and Large". Fuel type has two membership functions represented as "Gasohol and Gasoline". Driving speed has five membership functions represented as "Very Slow, Slow, Medium, Fast and Very Fast". Age of the vehicle has three membership functions represented as ", New, Medium, and Old". The number of passengers has three membership functions represented as "Low, Medium, and High". Thus, the model was tested with membership function number (4*2*5*3*3), and membership function types "Gaussian-shaped, Triangular-shaped, and Generalized bell-shaped" were determined. The generated fuzzy inference system structure contains 360 fuzzy rules.
For an E-Motor, three model inputs, consisted of engine size, driving speed and the number of passengers, were constructed. Engine size has four membership functions represented as "Very Small, Small, Medium and Large". Driving speed has five membership functions represented as "Very Slow, Slow, Medium, Fast and Very Fast". The number of passengers has three membership functions represented as "Low, Medium and High". The membership function types "Gaussian-shaped, Triangularshaped, and Generalized bell-shaped" were used, with membership function number (4*5*3). The generated fuzzy inference system structure contains 60 fuzzy rules. The summary of the tested membership function types with their respective epoch numbers and training data set are presented in Tab. 7.
As shown in Tab. 7, for the ANFIS3 network, that the Gaussian-shaped (gaussmf) membership function with epoch number 200 and 85% of the training data set was selected as the best fit model for describing the fuel consumption of ICE-Motor. Although the ANFIS3 network with 55% of training data set contains a smaller amount of training data than the other models, it provides the least amount of training RMSE by 0.479. Nevertheless, the ANFIS3 network used 85% of the training data set gave the best testing RMSE and MAE value by 0.505 and 0.371, respectively. The ANFIS model of E-Motor with three inputs, that the Generalized bell-shaped (gbellmf) membership function with the epoch numbers 200 is the best fit model, and that the Triangular-shaped (trimf) and Gaussian (gaussmf) membership functions perform the worst. 75% of the training data set provides lowest the training RMSE, but 85% of the training data set is the model that provided the best results with the lowest testing RMSE and MAE. Therefore, the ANFIS4 network with 85% of the training data set was selected as the best fit model for describing the fuel consumption of E-Motor. The fuel consumption predicted results obtained from the ANFIS model were presented in Fig. 6, which shown the relationship between engine size and driving speed related to fuel consumption of ICE-Motor and E-Motor. Fig. 6a, the fuel consumption of the ICE-Motor based on the engine size of 80 cc and driving speed of 60 km/hrs. was approximately 1.72 MJ/km. Whereas the same engine size with a more heterogeneous driving speed of 80 km/hrs, the fuel consumption was increased to 1.83 MJ/km. Fig. 6b shown the fuel consumption of an E-Motor regarding the relationship of engine size and driving speed factors. The fuel consumption of the E-Motor based on the engine size of 800 Wh and driving speed of 40 km/hrs was approximately 0.12 MJ/km. Whereas the same engine size with a more heterogeneous driving speed of 80 km/hrs., the fuel consumption was increased to 0.14 MJ/km.

Fuel Consumption Model of Non-Fixed Route Bus
The factors influencing the fuel consumption of ICE-Bus are comprised of four factors including engine size, driving speed, age of the vehicle, and the number of passengers. Engine size has three membership functions represented as "Small, Medium, Large and Very Large". Driving speed has five membership  Age of the vehicle has three membership functions represented as "New, Medium, and Old". The number of passengers has five membership functions represented as "Very Low, Low, Medium, High and Very High". Thus, the model was tested with membership function number (4*5*3*5), and membership function types "Gaussianshaped, Triangular-shaped, and Generalized bell-shaped" were generated. The generated fuzzy inference system structure contains 300 fuzzy rules.
The engine size factor of E-Bus models was not considered as mentioned in section 3.2; only one size was considered is 120 kW. For an E-Bus, two model inputs consisted of driving speed and number of passengers were constructed. Driving speed has five membership functions represented as "Very Slow, Slow, Medium, Fast and Very Fast". The number of passengers has five membership functions represented as "Very Low, Low, Medium, High and Very High". The membership function types "Gaussian-shaped, Triangular-shaped, and Generalized bell-shaped" were determined, with membership function number (5*5). The generated fuzzy inference system structure contains 25 fuzzy rules.
Tab. 8 shows the summary of the ANFIS model tested results of ICE-Bus and E-Bus, which both are the Generalized bell-shaped (gbellmf) membership function provide most effectively with minimum errors during validation with the epoch numbers 50 and 100, respectively. The selected model of ICE-Bus used 85% of the training data set provides the best performance with training RMSE and testing RMSE by 1.372 and 2.079, respectively, whereas the calculated MAE value has better accuracy when compared to the other three training data sets. Likewise, for E-Bus, the ANFIS6 network that used 85% of the training data set has the lowest training RMSE and testing RMSE by 0.089 and 0.104, respectively whereas the MAE value is 0.084.
The surface of two inputs against the fuel consumption obtained from the ANFIS model shown in Fig. 7. Fig. 7a shown a surface graph of the fuel consumption predicted result of ICE-Bus based on engine size and driving speed factors. Based on the surface, the fuel consumption of ICE-Bus by engine size of 250 hp and driving speed of 40 km/hrs, was approximately 11.00 MJ/km. Whereas the same engine size with the more heterogeneous driving speed of 70 km/hrs, the fuel consumption was increased to 15.00 MJ/km. The fuel consumption predicted results based on driving speed, and the number of passengers of the E-Bus model  Fig. 7b. Based on the surface, the fuel consumption by a driving speed of 40 km/hrs and 10 passengers was approximately 2.0 MJ/km. Whereas the fuel consumption was increased to 2.8 MJ/km by the same driving speed with more passengers of 30.
The results mentioned above demonstrate that the fuzzy rule base selected training data set by the random produce consistent results for the test data used. However, not all situations of fuzzy rules are covered, and some missing rules are detected by the ANFIS system. It was also noted that most of the ANFIS models with the greater amount of training data set resulted in the lower RMSE and MAE values due to the greater coverage of the fuzzy rules. Therefore, the learned training data set with ANFIS may need to cover as many fuzzy rules as possible for better results. In addition, the ANFIS model demonstrated significant efficiency diversity in terms of the number of membership functions, and the type of membership functions. Both the number and type of membership functions are important in building the ANFIS model. Various setting the number and type of membership functions of training data sets were applied to evaluate the influence of type and number of membership functions. It suggests that each ANFIS network was sensitive to the number and type of membership functions. An increase in the number of membership functions, which is an increasing number of fuzzy rules, results in a more timeconsuming. As the experimental results, in Tabs. 5-7, the Generalized bell-shaped (gbellmf) and the Gaussian-shaped (gaussmf) membership function type performs better performance than the Triangularshaped (trimf) membership function type for most ANFIS networks. Different epoch numbers of each ANFIS network were applied, including 25, 50, 100, and 200. It can be concluded that the increase of epoch number for the ANFIS system training does not necessarily significantly improve the system performance, but it helped to solve the problem of overfitting. Thus, setting so many epoch numbers may not produce the best results and lead to excessive responding time.
The prediction results of fuel consumption indicated that all five factors, consisted of engine size, fuel type, driving speed, age of the vehicle, and the number of passengers, are important factors that affect the fuel consumption of all ICEVs types except the non-fixed routes buses, which the fuel type factor does not affect the change of fuel consumption since only one type of diesel fuel oil was considered. In the case of an EVs, three factors, consisted of engine size, driving speed and the number of passengers, are important factors that influence the fuel consumption of all types except the E-bus, which the engine size factor does not affect the change of fuel consumption because only one size of motor power was considered.

Conclusions
This paper introduced the ANFIS approach as a learning and decision tool to predict the vehicle fuel consumption of ICEVs and EVs in Thailand's road transport. The vehicle fuel consumption model was developed based on the driving behavior and vehicle characteristic data. This study was conducted to demonstrate the potential effectiveness of ANFIS with four main points to be considered regarding the setting of the ANFIS system training. The experimental results indicated that the most important factors to achieve good performance are usually the number and type of membership functions. The training data sample is also an important factor, but the system performance depends on the sample size covered the possibility of fuzzy rules. The number of epochs does not appear to have a significant influence on performance. The performance of ANFIS was analyzed using the training RMSE, testing RMSE, and MAE which related to the ANFIS parameter setting. The number of fuzzy rules obtained from the driving behavior and vehicle characteristic data may not be covered, therefore, the ANFIS learning rule system is used to formulate a complete fuzzy rule system based on multivariate input. Therefore, the selected ANFIS models with minimum error can be accurately and efficiently used to predict vehicle fuel consumption for Thailand's road transport sector. The proposed approach used to develop the multivariate model can be used for the analysis of the complicated relations between the many inputs and output variables in other fields. In future study, the collected data related to the fuel consumption in brand new EVs and more types of public transport vehicles, such as vans and three-wheelers vehicles or tuk-tuk, could be considered. Due to the current EV market has rapidly developed in EV technology, it provides more mileage of travel distance and results in better fuel efficiency, which results in the fuel consumption of each EV type. The fuel consumption prediction models based on driving behavior and vehicle characteristic data for more different types of the vehicle could be constructed to future improve the accuracy and performance of fuel consumption models.
Funding Statement: The authors received no specific funding for this study.

Conflicts of Interest:
The authors declare that they have no conflicts of interest to report regarding the present study.