Aligned Simulation Models for Simulating Africa’s Electric Minibus Taxis

: Planning for the eventual electriﬁcation of transport in sub-Saharan Africa requires accurate simulation of its unique transport systems. The few studies that attempt to model electric minibus taxis—vehicles extensively used in sub-Saharan Africa’s public transport systems—vary greatly in their results. This paper analyses, compares and corrects the only two existing studies that project energy consumption of electric minibus taxis in the region. One of the studies projected an energy consumption of 0.39kWh/km, while the other projected 0.93kWh/km. This paper carefully analyses the simulation tools and models and cumulatively applies corrections from the literature and scientiﬁc analyses. As a result, the discrepancy between the two simulation tools is eliminated for a given data input and a ﬁnal energy consumption is estimated in the range of 0.49–0.52kWh/km, depending on the input data.


Introduction
Africa's main mode of transport, the minibus taxi, is still fully non-electric. Planning for its eventual electrification in the midst of scarce and unreliable electricity supply requires accurate modelling of the mode's mobility and its consequential electricity demand. The divergent simulation results in the literature are aligned in this paper, which enables accurate planning for electric mobility in the region.
Public transport in Africa consists primarily of informally operated "minibus taxis", which autonomously manage their schedules, rates and routes according to the perceived demand. These taxis have become the predominant mode of transport in many countries, providing countless jobs and cheap transport to millions of people every day.
Part of the reason that these vehicles have become so popular is that they are available at a low cost, as second-hand imports from developed countries ( [1], p. 348). Unfortunately, this has led to the system being fraught with old, under-maintained vehicles, causing serious environmental concerns. One study done in 12 African cities found that the average age of minibus taxis was 15 years [2]. Powered by internal combustion engines, these vehicles contribute substantially to the emission of greenhouse gases and a general decline of air quality in African cities [3]. Within the next 10 years, these vehicles will need to be replaced with more environmentally and economically sustainable alternatives.
One of the major alternative technologies that have come to the fore in recent times are Electric Vehicles (EVs). Unfortunately, while many developed countries have already started to embrace this technology, African countries have been left behind with almost zero EV penetration, as well as complete uncertainty as to whether their fragile grids and unique transport requirements will make EVs feasible in the African context.
Little research effort has been invested in this space, especially with regard to the electrification of minibus taxis. One of the reasons that have hampered this research is the unavailability of data surrounding public transport of these countries. Routes, fleet 1.
Abraham et al.'s simulation tool uses an energy-based EV model developed by Kurczveil et al. [13]. In Abraham et al.'s study, their simulation tool was applied to GPS data collected from nine taxis, at 1 sample/minute, over 2 years. These data were collected by Akpa et al. [4]. Although the EV model and the GPS data were not developed/collected by Abraham  The differences between the two studies are further detailed in Section 2.
The discrepancy is analysed in this paper, with the objective of identifying common pitfalls that are overlooked in EV modelling, and to finally contribute the correct energy model and energy consumption per distance value of minibus taxis in Africa.

Literature Study (Analysis of Abraham et al. vs. Hull et al.)
As mentioned in the introduction, the study of Abraham et al. projected a minibus taxi energy consumption of 0.93 kWh/km, compared to the 0.39 kWh/km found in Hull et al. This section presents a careful study of Hull et al. and Abraham et al. to identify differences that may have led to the large discrepancy. In addition, it highlights anomalies in both studies which may have introduced other errors.
The differences between the two studies are summarized in Table 1.

Data Anomalies
The first difference is the characteristics of the data that was used in the studies. As mentioned in Section 1, Hull et al.'s study used high-frequency data, measured at a rate of 1 sample per second, while Abraham et al.'s study used low-frequency data (∼1 sample per minute). The problem with high-frequency data is that it quickly accumulates to large quantities of data, increasing the cost of the data logging system. The problem with low-frequency data is that the vehicles' aggressive acceleration profiles and stop-start behaviour are not captured. In addition, since datapoints are sparse, the exact route that the vehicle took has to be inferred. Therefore, low-frequency data needs to be artificially upsampled using a routing/driver model, to synthesize this missing information. Anomalies caused by artificially upsampling the data are discussed in Section 2.2.
Hull et al. limited their study to just 62 trips (24 minutes each) in different driving conditions. On the other hand, Abraham et al. were able to obtain low-frequency data for nine taxis, which were tracked over 2 years. Thus, the Abraham et al. study had a more complete representation of the taxis' daily and seasonal movement patterns, while the Hull et al. study had a more complete representation of the microscopic acceleration and deceleration patterns and route details.

Driver/Routing Inconsistencies
Abraham et al.'s simulation tool is designed for low-frequency data. High-frequency data (e.g., 1 Hz data used in Hull et al.) are not common, due to the large storage or high bandwidth that would be required. However high-frequency data, which describe the vehicle's acceleration and deceleration as well as route details, are needed to accurately simulate an EV model. Abraham et al.'s simulation tool solves this problem by reading a road network to predict the route a vehicle would have taken to go from one waypoint to the next and using a driver model to drive the taxi along this route to upsample the data. This road network is obtained from OpenStreetMap (OSM) [16].
Similar to this study, Giliomee et al. [17] investigated the reasons for the discrepancy between the two studies which evaluate electric minibus taxis, Hull et al. and Abraham et al. They compared the actual manifestations of the road infrastructure, taxi routes, and driving behaviour to their virtual manifestations in Abraham et al.'s simulation. The discrepancies they identified relate to the process that Abraham et al.'s simulation tool uses to upsample the low-frequency data. They identified nine inconsistencies, which fall into three categories: 1. Road network: (a) Road elevation data was not included in the EV simulation; (b) Some roads were missing; (c) Some road segments had incorrect speed limits; (d) Stop signs were missing and traffic light sequences were incorrect.

Waypoints:
(a) The simulated vehicle incorrectly stopped at each waypoint along its route; (b) Inaccurate GPS data points caused waypoints to fall in oncoming lanes. This led to the simulated vehicles taking multiple U-turns, greatly lengthening the vehicles' routes.
3. Virtual driver: (a) In residential roads, the virtual driver travelled at the official speed limit, whereas the actual driver travelled at significantly lower speeds; (b) The virtual driver had an excessively aggressive acceleration profile; (c) The virtual driver adhered to 100% of stop signs, whereas the actual driver adhered to only 30% of stop signs.
Out of the road network inconsistencies, most were upstream issues with the road network data provider, OSM [16]. Aside from inconsistency 1a, the inconsistencies would require excessive manual intervention to correct.
Regarding the two waypoint inconsistencies: Inconsistency 2a caused the vehicle to decelerate and accelerate unnecessarily at each waypoint, rather than simply passing them by. Giliomee et al. [17] point out that this would lead to a higher energy consumption and estimate a theoretical compensation factor of −24% to compensate for the error. Since inconsistency 2b mostly affected the total distance that the simulated vehicle travelled, it only affected the total energy consumption, while this study concerns itself with energy consumption per unit distance.
Regarding the inconsistencies in the virtual driver model: Giliomee et al. [17] provide simple remedies to inconsistencies 3a and 3b. Additionally, they find that the energy consumption impact of inconsistency 3c was less than 0.5%, insignificant enough to ignore.
A detailed analysis and description of these inconsistencies can be found in Giliomee et al. [17].

EV Model Inconsistencies
In addition to the differences in data highlighted above, the two studies also used different EV models. The EV model consumes the vehicles' routes to calculate the energy requirements of the vehicles. Hull [13], which is bundled with the Simulation of Urban Mobility (SUMO [14]) software. The model is well-tested and scientifically peer-reviewed. The model used by Hull et al. has been peer reviewed at the time of publication. However, it has had significantly less testing and public exposure than the Kurczveil et al. [13] model. Consequently, mathematical errors in the code are found and addressed in this paper (Section 4.4.2). The features of each model are summarized in Table 2. New versions of SUMO also include a detailed EV model by Koch et al. [18], which could be a more accurate drop-in replacement for the Kurczveil Table 2 shows that Hull et al.'s model does not take into account radial drag and rotational inertia. These parameters may have a significant impact on the vehicles' energy usage. For example, radial drag accounted for 6% of the energy consumption of buses in Netherlands [19].
The table also shows that Koch et al. [18] do not use simple propulsion/recuperation factors to determine the drivetrain efficiency, allowing for a more detailed setup of the EV model.

Model Parameters
The EV model parameters used in Hull et al. are different from those used in Abraham et al. The model parameters of each study are shown in Table 3. For a fair comparison, the model parameters must be equalized.  Table 3 omits the internal moment of inertia and radial drag coefficient for Hull et al.'s study. This is because the model does not implement these two aspects in the energy model, as mentioned in Section 2.3. In addition, Abraham et al.'s internal moment of inertia is on a significantly lower order of magnitude than other values found in the literature. For example, Koch et al. [18] find a value of 12 kg·m 2 for the BMW i3.

Method
The approach taken in this study was to replicate the methods of Abraham et al. and Hull et al., iteratively correcting the anomalies identified in Section 2, as well as other anomalies that were found during the process. As described in Section 2, the anomalies fall under three main categories: data anomalies, driver/routing inconsistencies and EV modelling inconsistencies.
Before correcting anomalies, the studies of Abraham et al. and Hull et al. were first replicated using the latest versions of their simulation tools. After this, the various were fixed, as described in the following sections.

Data Anomalies
As mentioned in Section 2.1, the two studies used different data sources. It was of interest to see whether using one dataset instead of the other would yield a different result. This was done by running the Abraham et

Routing Inconsistencies
The first thing to do was to identify which inconsistencies listed in Section 2.2 were worth addressing.
Inconsistencies 1b, 1d, 2b and 3c all had negligible effect on energy consumption according to Giliomee et al. [17], meaning that they could be safely ignored.
The inconsistencies left to be addressed were 1a, 1c, 2a, 3a and 3b. Each of these inconsistencies was addressed as follows, and the simulation was re-evaluated.
As described by Giliomee et al. [17], inconsistency 1a would be resolved by overlaying the OSM road network with elevation data gathered from NASA [20]. This functionality was implemented and merged into Abraham et al.'s simulation tool.
Inconsistency 1c could not be addressed, as it was an upstream issue with OSM, and would require excessive manual intervention to fix. According to Giliomee et al. [17], this issue increases the energy consumption by 11%. The sensitivity analysis of Section 4.6 checks this value, and implications are discussed in the conclusions section.
Inconsistency 2a stated that the vehicle tended to stop at each waypoint encountered in the routes. According to Giliomee et al.'s theoretical approximation, this should reduce the energy consumption by approximately 24% [17]. The validity of their approximation was tested by removing all stops from all the simulation routes, such that the vehicle would pass each waypoint without stopping. This showed that the impact of this inconsistency was much less than anticipated, as shown in Section 4.3. Nevertheless, the issue was fixed by addressing a logical error in the stop detection algorithm (See commit 81caab5 of Abraham et al.'s simulation tool [7]).
Inconsistency 3a was fixed by manually reducing speed limits in the road network. Finally, inconsistency 3b was resolved by changing the driver model's acceleration and deceleration parameters to the ones given by Giliomee et al. [17].

EV Modelling Inconsistencies
This study also corrected the inconsistencies in Abraham et al. and Hull et al., which were due to their EV models. These inconsistencies are described in Section 2.3. The two main inconsistencies that are shown in the literature study are: 1.
The two studies had slightly different model parameters, and the effect of these differences need to be quantified; 2.
Hull et al. did not implement rotational inertia and radial drag, which may have a significant impact on the vehicles' energy usage. After these inconsistencies were fixed, additional analyses and experimentation were needed in order to identify any other sources of error.

Model Parameters and Rotational Inertia
The model parameters, which are different between the two studies, can be seen in Table 3 Rotational inertia and radial drag were suppressed in Abraham et al.'s simulation tool, since they were not implemented in Hull et al.'s simulation tool. The difference caused by suppressing these two parameters was given special focus in the investigation, since the energy consumption results were particularly sensitive to changes in it.

Implementation of Rotary Inertia and Radial Drag
As mentioned above, the Hull et al. model does not implement rotational inertia and radial drag. Since it was found that this is a significant part of the EV modelling process, this study contributes implementations of both these components to Hull et al.'s EV model. These components are implemented in a similar way to that of Kurczveil et al. [13].
The energy lost by the rotary inertia is governed by the formula: where I is the internal moment of inertia and r wheel is the radius of the vehicle's wheel.
The energy lost by radial drag is governed by the formula: where c rad is the radial drag coefficient and r curve is the radius of the turning curve. This radius is calculated using the formula r curve = ∆s/∆θ, where ∆θ is the change in the vehicle's heading angle.
Both these components were added to Hull et al.'s EV model. Thereafter, the effect of the rotary inertia and radial drag constants on the model results were tested.
This revealed that rotary inertia did not affect the energy usage by much. Initially, it was thought that this was caused by an incorrectly selected internal moment of inertia. The value used by Abraham et al. was 0.01 kg·m 2 , several orders of magnitude lower than other values found in the literature, such as the 12 kg·m 2 used by Koch et al. [18].
In their code repository [21], Koch et al. suggest a rotary inertia of 16 kg·m 2 for SUV vehicles. Since a value specifically for minibuses could not be found, this value was selected.
This value was roughly validated as follows. The inertia of each wheel was calculated using the equation I = 1 2 mr 2 , where m is the mass of the wheel and tyre, and r is the outer radius of the tire. For a Toyota Quantum (the prevalent minibus taxi in South Africa), these were m = 23 kg and r = 345 mm. This resulted in a rotational inertia of 1.37 kg·m 2 . Multiplying this over the four wheels yielded 5.5 kg·m 2 . This is a third of the selected value of 16 kg·m 2 , leaving two-thirds to account for the gearbox, motor, differential, and other rotating components of the vehicle.

Experimentation to Identify Further Inconsistencies
Section 4.4 shows that there was a residual error after making the above corrections. Therefore, additional experimentation was needed in order to find the source of this residual error. This was done by running both simulations in parallel, stepping through the code line by line and comparing the outputs of all intermediate calculations.
As shown in Section 4.4.2, a significant mathematical error was found. The explanation of the error and the corresponding results are presented in that section.

Results
The original energy consumption estimates by Abraham et al. [9] and Hull et al. [12] were 0.93 kWh/km and 0.39 kWh/km, respectively. This section shows how these two values converged when the anomalies mentioned previously were resolved. The original results are compared to the final converged results in Table 4 and Figure 1.

Replicating Original Results
The two simulations were repeated with the exact same configurations given in Abraham et al. [9] and Hull et al. [12]. Although Hull et al.'s 0.39 kWh was replicated successfully, repeating Abraham et al.'s simulation resulted in a consumption of 0.88 kWh/km. Inspecting the repository's history revealed two bug fixes that caused this change. Originally, when the results were generated in Abraham et al. [9], power and speed values were cast as integer datatypes, in order to make the software more memory efficient. However, this caused the fractional part of each value to be lost. This led to a large error in the energy and distance values, since they were calculated by integrating speed and power with respect to time. This issue was fixed by version 1.6 of Abraham et al.'s simulation tool (commits b9f1c6e and e50a84e).

Data Anomalies
The effect of using different types of data was investigated using the approach described in Section 3.  [17] report a value of 0.44 kWh/km. This slight discrepancy is due to the software patch described in Section 4.1.) In order for the data to be compatible with Hull et al.'s simulation tool, the data had to be upsampled from 1/60 Hz to 1 Hz. This was done by running the data through the routing algorithm of Abraham et al.'s simulation tool, and feeding the resulting 1 Hz data into Hull et al.'s simulation tool. The difference between the two results is 0.03 kWh/km. This could be because of the different driving patterns inherent in the two datasets.
From the above two analyses, it is quite clear that the inconsistency lies more with the simulators than with the data. For consistency and simplicity of the discussion, the downsampled Hull et al. data will be used to generate the results in the remainder of this paper.

Routing Inconsistencies
This section describes the results that were found by implementing the fixes described in Section 3.2.
By analysing the stop detection algorithm, it was found to be labelling datapoints as stops when the vehicle was actually moving at those points. The two model parameters that were not implemented in Hull's simulator were rotary inertia and radial drag. Therefore, these two model parameters were set to zero, as shown in Table 3.
These two parameters were implemented in Hull et al.'s simulation tool, using the same modelling techniques as Kurczveil et al. [13]. Each of these model parameters were then restored to Abraham  According to Fridlund and Wilen [15], it is extremely difficult to accurately calculate the radial drag coefficient. They, therefore, recommend using SUMO's default value. In their initial study [9]

Mathematical Model Correction
After making all the model parameters equal, there was still a discrepancy between the two EV models. To identify the source of this discrepancy, both both simulations were run in parallel, stepping through the code line by line and comparing the outputs of all intermediate calculations.
The Abraham et al. model calculated the propulsive energy as follows: On the other hand, the Hull et al. model calculated the propulsive energy as follows: where ∆x is the distance travelled. F prop was calculated by assuming that the difference between the measured velocity and the expected velocity (caused by drag forces) is caused by F prop . Therefore: where v exp [n] is the expected velocity due to external forces (gravity, aerodynamic drag, and rolling resistance) at timestep n, ∆t[n] = t[n] − t[n − 1], and m is the vehicle's mass. The problem with this approach is the transition from Equation (5) The correct form of Equation (6) has a complex derivation, so it is omitted here, but it can be proven wrong by expanding Equation (3) as follows: From Equation (3): If substituting Equation (6) into Equation (4) does not yield Equation (7), it will prove that Equation (6) is incorrect. Substituting Equation (6) into Equation (4):

According to Hull et al.'s definition of v exp
: Substituting Equation (9) into Equation (8): Comparing Equations (10) and (7) shows that the kinetic energy term is incorrect in Equation (10). That is, Thus, it is proven that the assumption taken in Hull's model was incorrect. The Hull et al. simulation tool was thus adapted to follow the same modelling approach as Abraham et al.
This resulted in a value of 0.52 kWh/km, the same value found by the Abraham et al. model at the end of Section 4.4. Thus, the two models produced the same result of 0.52 kWh/km.

Final Result
After all of the fixes above were completed, the energy consumption output by both simulators agreed for the Hull

Sensitivity Analysis
To aid with future assessments of electric paratransit, this section performs a sensitivity analysis of some of the inconsistencies in Section 2.2 and parameters in Table 3. This parameter sensitivity analysis shows how much each parameter affects the result (compared to the correct result), and is summarized in Tables 5 and 6.

Consumption with Parameter Variation
Parameter ∆ = −10%  Table 5 shows that the driver acceleration parameters are the most important to get correct, out of the various simulator parameters. If left uncorrected, a 15% error in the result is introduced.
The last row of the table shows the impact of inconsistency 1c. As discussed in Section 3.2, Giliomee et al. [17] found that the issue had an 11% impact. This was concerning, since this was the only issue with a non-zero impact issue that was left unresolved in this study. Thankfully, with respect to the corrected model, this issue only has a −3% impact factor. Therefore, the issue can safely be ignored. Table 6 shows the sensitivity of various parameters of the EV model. It shows that propulsion efficiency has the highest sensitivity. This means that it is essential to select this value as accurately as possible. Finding these parameter values vary in difficulty. According to Fridlund and Wilen [15], Table 5.4, the following parameters are hard to find (in increasing order of difficulty): roll drag coefficient, power offtake, recuperation efficiency, propulsion efficiency, radial drag coefficient and internal moment of inertia.
The results of the sensitivity analysis are presented graphically in Figure 2. It shows that, out of all the parameters, roll drag coefficient, propulsion and recuperation efficiency are the only ones with a significant sensitivity. Fortunately, although the roll drag coefficient is difficult to find accurately, it is easy to approximate [15],  This study implements two parameters in the Hull model, which were previously missing. One was the internal moment of inertia. Table 6 shows that the implementation of this parameter had a negligible impact on energy consumption. On the other hand, radial drag had a large impact. When not implemented, it affected the result by −13%. This value roughly corresponds with the −6% observed by Beckers et al. [19] for urban buses in the Netherlands. One can assume that radial drag losses would be higher for minibus taxis, since they do a lot of cornering due to the highly tortuous (winding) nature of their routes, as observed by Ndibatya and Booysen [6].

Application of Results
In Hull et al. [12], the authors apply their model (which had an average consumption rate of 0.39 kWh/km) to estimate the range that would be achieved given various battery sizes. These values are re-computed using the updated consumption rate of 0.49 kWh/km to obtain Table 7. A total of 85% of the battery capacity is assumed to be available.
Additionally, some of the key results of Abraham et al. [9] are also revised in Table 8, using the updated consumption rates.

Conclusions
The minibus taxi is one of the most widely used forms of public transport in Africa. However, despite it prevalence, surprisingly little research has been invested to prepare the industry for emerging EV technologies. The only two studies which have evaluated EV taxis (namely Abraham et al. and Hull et al.) have conflicting results. This study evaluated the two aforementioned studies in order to find the reasons for the discrepancy and obtain a more accurate result.
In order to do this, the data, mobility model, and EV model aspects of the two studies were compared and analysed as follows. Regarding the data, the primary difference between the two studies was the data resolution. Hull Giliomee et al. are incorporated to more accurately model the specific mobility patterns of minibus taxis. Lastly, the study analysed the model parameters and the mathematics behind the two EV models to finally reconcile their outputs. A final output between 0.49-0.52 kWh/km was observed, depending on the input data. A sensitivity analysis of the above discrepancies revealed the following. For the data aspect, downsampling the Hull et al. data increased the consumption from 0.49 to 0.52 kWh/km, an error of 6%. For the mobility model aspect, the error caused by selecting wrong acceleration parameters led to an error of 15%. For the EV model aspect, the most sensitive model parameters were mass, roll-drag, recuperation efficiency and propulsion efficiency, with sensitivities between 3% and 15% in the output per 10% change in the model parameter. However, the difficulty in measuring the latter two parameters make them the most critical. Furthermore, for the EV model aspect, a mathematical error in Hull et al.'s model was found which caused an error of 10% in the result.
These results have implications for future electric taxi evaluations. Firstly, it is clear that high frequency data is needed to ensure that the aggressive acceleration profiles and tortuous routes are captured. If data logging limitations do not allow for high frequency data collection, a mobility model such as that of Abraham et al. may be used to synthesize the missing data. However, the high sensitivity of the acceleration model parameters underscores the importance of accurately modelling the unique mobility patterns of electric taxis. Despite our best efforts to do this, a 6% error was still observed. Although this was less significant than the sensitivity of parameters in the mobility and EV models, it reinforces Hull et al.'s statement that the frequency of data collection has a notable impact on energy consumption calculations. The EV model analysis showed that the propulsion and recuperation efficiency parameters need to be selected carefully. This issue could be avoided by using a more detailed EV model, which calculates these efficiencies by modelling the motor, power electronics and drivetrain components. Because of this study's holistic approach, some of the sensitivity values calculated by Giliomee et al. were invalidated, due to corrections made in other aspects of the electric taxi model. For example, the issue of incorrect legal speed limits was found to have a significantly less impact than initially predicted. Giliomee et al. predicted a sensitivity of +11%, but the updated model had only a −3% error.
The novelty of this study is that it contributes corrections to two existing EV minibus taxi simulation tools, and contributes a more accurate energy consumption per distance value for minibus taxis in Africa. Some further work can be envisioned as a result of this research. Firstly, the 6% discrepancy between the results of the artificially downsampled Hull et al. data versus the original 1 Hz Hull et al. data needs to be examined. Secondly, a detailed EV model needs to be incorporated into the simulation tools in order to reduce the uncertainty of estimating the propulsion and recuperation efficiency parameters. Thirdly, work needs to be done to correct anomalies that affect the total energy consumption of the vehicle. Finally, an empirical validation is envisaged, using a physical electric taxi to validate the result of 0.49-0.52 kWh/km and calibrate the model parameters. Data Availability Statement: Publicly available datasets were analysed in this study. This data can be found in the following links: https://gitlab.com/eputs/data/fcd-stellenbosch and https: //data.mendeley.com/v1/datasets/xt69cnwh56/draft?a=70e4b7ed-4557-40ce-a170-e82dd775a4d8 (accessed on 1 March 2023).

Conflicts of Interest:
The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

Abbreviations
The following abbreviations are used in this manuscript: