1. Introduction
In Europe, almost a quarter of the greenhouse gas (GHG) emissions can be attributed to road transport. Electrification of this sector plays an important role in reducing these emissions and reaching the targets set by the European Commission, i.e., a reduction in GHG emissions with 60% by 2050 [
1]. As a result, public transport operators (PTOs) of European cities are looking at battery electric buses (BEBs) to replace their current diesel fleet [
2]. This transition however presents several challenges which must be overcome, such as the rescheduling of the vehicle operations due to the limited range of BEBs, reducing the total cost of ownership (TCO) and improving the power quality [
3].
Looking at operational feasibility, BEBs require charging at regular time intervals. The most prominent charging concepts are depot charging, where BEBs are charged when they are not in operation (e.g., overnight) and opportunity charging, where BEBs are charged in several minutes at bus stops or at the end stations of their route. Depending on the existing bus routes, PTOs must investigate which charging concept is most suited and reliable for their specifications. Additionally, a vehicle scheduling problem emerges, where the aim is to optimally allocate the BEBs on the routes to accomplish the timetable, while minimizing the fleet size, the number of chargers and the total operational costs, and to accordingly size the battery capacity of the BEBs and the charging power rate of the charging infrastructure. This problem was intensively studied in [
4,
5,
6,
7], but is not given further consideration in this research. BEBs also have a higher total cost of ownership (TCO) than diesel buses. Jefferies et al. [
8] and Lajunen [
9] both performed a TCO analysis. They show that the TCO of BEBs is 15–30% higher than their diesel counterpart. The highest share is related to the capital costs of the vehicle and the battery, but also the operational cost which is composed of the maintenance, the electricity and the staff costs plays an important role. Another challenge of introducing BEB fleets in cities is the impact charging has on the local distribution network. Mohamed et al. [
10] investigated the impact of the different charging concepts on the grid and concluded that depot charging is the best configuration.
Depot charging currently stills happens in an uncoordinated way, where BEBs are charged with the maximum allowed power from the moment they arrive back at the depot until they are fully charged. However, it has the advantage that smart charging can be introduced. BEBs are available in the depot for a long time and so the charging process can be managed in a way that is beneficial for the PTO and the distribution network operator (DSO). Furthermore, because of the increasing amount of renewable energy resources (RERs) and their contribution in the electricity mix, the electricity price will become variable in the near future, especially for industrial consumers such as PTOs [
11]. This leaves room to reduce the operational costs of BEBs. Moreover, RERs such as photovoltaic panels can even be installed at the depot to use locally generated energy to charge BEBs.
Because of these advantages, scheduling of the charging process of BEBs at depots recently gained interest. In [
12], the authors used a mathematical model to determine an optimal charging plan for a fleet of BEBs where the goal is to minimize the energy cost of the charging station based on a 3-stage time-of-use (TOU) rate schedule. Their results show that the controlled charging model can sharply reduce the charging station energy cost. In [
13], the authors also investigate optimal charging for BEBs to achieve minimum operating cost for the bus company considering a TOU electricity price. They use a wavelet neural network to predict the power consumption and observed a reduction of approximately 10% in charging costs. Raab et al. [
14] developed an enhanced charging strategy, based a mixed-integer linear programming (MILP), to integrate a BEB fleet into the energy management of a power plant portfolio. They adjusted the charging schedules in day-ahead and intraday operations to efficiently supply the energy demand for the fleet within a multi-period optimization process. The results show that the proposed methodology is capable of fully integrating BEB fleets in the operation of the power plant portfolio and providing economic benefits. In [
15], the authors proposed a bi-level model where the upper level is a vehicle scheduling problem to minimize the operating cost and the carbon emissions, while the lower level is a charging scheduling, based on dynamic programming, to minimize the charging cost. They managed to reduce the charging cost by 8–13% compared to uncoordinated charging. The authors of [
16] formulated a MILP model to develop a limited BEB charge scheduling algorithm for a depot equipped with photovoltaics (PV) and an energy storage system (ESS) to maximize the profit for the bus depot operator and minimize the overloading on the grid feeder. They conclude that the installation of PV and ESS together with their algorithm provides a complete charging solution for BEBs that generates revenue for the operator. Jahic et al. [
17] developed a greedy and heuristic algorithm for the charging scheduling of large-scale bus depots in the city of Hamburg with the goal to minimize the peak load. They were able to reduce the peak demand and flatten the peak load at the bus depot within the range of 24–43%, depending on the covered scenario. Houbbadi et al. [
18] introduced an optimal scheduling strategy using a non-linear programming technique to manage overnight charging of a BEB fleet aiming to minimize the battery aging cost in order to extend its lifetime. They concluded that with their strategy it is possible to use the battery packs for almost 20 years.
The aforementioned papers mainly use more conventional mathematical programming methods to show the benefits of optimally scheduling the charging process of BEBs. However, these methods can have long computation times which make them appropriate for day-ahead scheduling, but less suitable for solving real-time charging scheduling problems [
19,
20]. This is important to enable smart charging in real-world applications such as bus depots and is currently missing in the scientific literature. Some authors already addressed real-time scheduling, but they focused mainly on regular electric vehicles (EVs). One of the difficulties with real-time scheduling of regular EVs is that there is a big uncertainty about when they will arrive at a charging station, making it difficult to provide an optimal planning in terms of cost and grid impact [
21]. BEBs used in public transportation drive following a detailed timetable which means it is approximately known when they will return to the depot and as a consequence when they can be charged. This strongly reduces the uncertainty factor and enables to propose a fully optimal charging scheduling where even near-future charging actions can be considered to satisfy the constraints for both bus and distribution network operator. Still, the research that was carried out for real-time charging scheduling of EVs gives a good overview on which optimization techniques can be used. In [
22], the authors proposed an online optimal charging scheme for EVs that minimizes the total system energy cost and operates in a time-receding manner with the latest system information. The charging problem is solved with a distributed model predictive control and modified convex relaxation technique. Yao et al. [
23] used a simple on–off strategy for EV charging scheduling, leading to the formulation of a computationally expensive binary optimization problem. To reduce the computational complexity, they developed a modified convex relaxation method which can be used in real time. However, using such convex relaxation techniques can lead to large errors which can result in non-optimal solutions [
24]. Other researchers used learning-based techniques to implement real-time smart charging scheduling algorithms. Frendo et al. [
25] proposed a data-driven approach to integrate a machine learning regression model in a smart charging algorithm. Their model was trained on a large historical dataset of charging processes to predict the power drawn by an EV over the course of the charging process. However, such a large real-world dataset is often not available and cannot be easily obtained. Therefore, in [
26], the authors developed a deep reinforcement learning (RL)-based approach to determine an optimal strategy for a real-time charging scheduling problem which does not require any system model information. Wang et al. [
27] also proposed a model-free RL method for charging station pricing and scheduling strategies that deal with time-varying continuous state and action spaces. In [
28], the authors developed an online actor–critic-based smart charging algorithm to schedule EV charging and customized it to improve the computational efficiency at the cost of a less optimal charging schedule. Still, with RL-based techniques it is not easy to achieve a robust algorithm that can operate properly under a high versatility of charging conditions. Another type of optimization technique which has also been used for real-time smart charging scheduling are metaheuristics. In [
29], the authors developed an improved grey wolf optimizer to solve a charging scheduling problem of EVs with short-term PV power production in real time and to reduce the electricity costs. Su et al. [
30] proposed a rolling horizon scheduling approach based on a genetic algorithm (GA) which deals with the online optimal scheduling problem of aggregated EVs in the energy exchange market. Metaheuristics are able to find (near)-global solutions within a reasonable amount of time without the need of training data and can easily adapt to different conditions because they can explore a large search space at once [
31,
32,
33].
Finally, the integration of the developed real-time algorithms with real-world charging infrastructure and their experimental validation is still lacking. This has only been covered in [
34] for AC (slow) chargers but can only be used for regular EVs. For DC off-board chargers dedicated for BEBs, this has not been investigated yet.
Therefore, this paper proposes a real-time scheduling and optimization (RTSO) algorithm for BEB charging in a depot, aiming to minimize the charging cost for PTOs, while satisfying the power limitations of the distribution network and the energy requirements and timetable of each BEB. GA, a metaheuristic optimization technique, is used to solve the predetermined scheduling problem. This paper also considers charging with a variable charging rate, which is often neglected in the scientific literature. Finally, this paper also addresses the integration and validation of the developed RTSO algorithm, implemented in a high-level charging management system (HL-CMS), with existing charging infrastructure.
The remaining of the paper is organized as follows.
Section 2 gives information about the high-level charging management system, an additional feature required for smart charging of BEBs.
Section 3 describes the methodology of the RTSO algorithm, including the objective function and the constraints. In
Section 4, the simulation and experimental results are shown and discussed. Finally, the main conclusions of the proposed algorithm are drawn in
Section 5.
3. Methodology
3.1. Problem Formulation and Assumptions
One of the most important challenges for PTOs is to reduce the operation costs of its BEB fleet. This can be achieved by optimizing a depot charging scheduling problem in terms of the charging costs. The difficulty in solving such an optimization problem is that the charging process also involves other factors that need to be satisfied. BEBs operate following a detailed timetable, so their departure time from the depot should be maintained. Furthermore, the local distribution network cannot be overloaded as this could lead to high additional charges for the PTO. As charging an entire BEB fleet requires a power level in the range of MW, this implies that the BEBs cannot all charge at the same time and that the charging needs to be scheduled over a longer period. Finally, it is also important that the charging scheduling occurs in real time as BEBs can return to the depot later than expected or with less energy in their battery because of traffic and weather conditions.
This research starts from the assumption that the PTO operator already has a BEB fleet up and running, meaning that the entire planning on how to operate a BEB fleet has been carried out considering the energy consumption, that the BEB type (standard 12 m or articulated 18 m buses), the charging technology (conductive or wireless), the charging interface (pantograph, plug-in or ground-based), etc., are already fixed, that a detailed operation schedule of the BEBs exists, that the depot is already equipped with the necessary charging infrastructure and that the BEBs are properly positioned in the depot and connected to a charging system with enough charging power to cover the charging requirements. In fact, the proposed RTSO algorithm can be used for every BEB type that needs to be charged in the depot, regardless of the charging technology, the charging interface or the charging power. Information about the routes the BEBs covered before coming to the depot is neglected as this is insignificant information for charging scheduling algorithms. However, it is assumed that the BEBs are connected to the monitoring platform of the PTO to track valuable data of the BEBs in operation. This allows the PTO to accurately know the state of charge (SoC) of a BEB when it returns to the depot. The SoC is an important battery parameter as it indicates by how much a BEB should get charged to fulfil its next trip and is closely linked to the covered routes and the energy consumption of the BEB.
Furthermore, accurate real-time electricity pricing and short-term load forecasting, which are both essential in the deployment of urban smart grids, are considered. Real-time electricity pricing charges consumers with a price that varies with time based on the electricity generation in a particular time interval. With the increasing penetration of RERs into the distribution system, it is expected that such a pricing scheme will be implemented very soon. Short-term load forecasting is used to predict the energy requirements on an hourly basis based on forecasted data, weather conditions and, closely linked with that, availability of the RERs [
35]. Load forecasting is especially important when the charging infrastructure is added to already existing networks, which are not designed to deal with the additional load that comes with BEB charging and which is often the case in cities.
3.2. Real-Time Scheduling and Optimization Algorithm
The proposed RTSO algorithm divides the charging time of each BEB into several smaller time slots and assigns a specific variable current level to each of these time slots, aiming to minimize the charging costs without violating the operation schedule or overloading the distribution network. The core of the RTSO algorithm is a GA, which is a metaheuristic optimization technique that belongs to the class of evolutionary or nature-inspired algorithms. It searches for an optimal solution based on reproduction and natural selection, in line with Darwin’s theory of evolution. It is adopted in this research because it has the ability to find (near) global optimal solutions. Since GA is population-based, it can explore and exploit the search space more effectively, escape local minima to find the best solution in a reasonable computation time and easily adapt to changing conditions. Furthermore, constraints can be handled in an easy and straightforward manner by using penalty functions [
31].
Figure 2 shows the flowchart of how the RTSO algorithm works. When a BEB returns to the depot, the necessary information from the different stakeholders needs to be acquired to enable the RTSO to compute a charging current level profile. From the DSO, an accurate forecast of the grid limitation and the electricity price is required. This information is usually sent to the PTO on regularly basis (e.g., every 4 h). From the BEB itself, the SoC and the voltage of the battery pack should be acquired. Based on the remaining SoC, the type of BEB that returned to the depot and the operation schedule it has for the next hours or day, the PTO can provide the exact driving range and departure time of the BEB to the HL-CMS at the start of the charging process. Furthermore, based on the timetable, the PTO can also provide an estimation of the arrival time, the required driving range and the voltage level of BEBs that will return to the depot in the near future, together with their departure time, and include them already in the optimization process to avoid possible conflicts later on. With all these data, the RTSO computes a charging current profile in function of time for each BEB that needs charging. Then, the current level values are communicated with the specific charging point and the charging process is started or resumed. The charging information for each bus, i.e., how far the charging process has progressed, is remembered by the HL-CMS to use the updated charging requirements when a next BEB returns to the depot. This way, the scheduling of the BEBs happens in real time and makes the RTSO algorithm robust to BEBs that arrive later than expected due to unforeseen traffic conditions.
3.3. Objective Function
The GA will minimize a cost function that computes the total charging cost for all BEBs together as described in Equation (1). The decision variables in the GA are the current levels that the charger should send to the BEB during the different time slots the charging process is divided in. These time slots coincide with the electricity tariff and grid limitation forecast intervals, except for the first and the last time slot in case the arrival or the departure time lies within such an interval.
where
the total charging cost of the i BEBs that needs to be charged [EUR],
is the current level with which BEB i is charged during the time slot n [A],
is the voltage of BEB i [V],
is the length of the time slot n [h] and
is the price of the electricity during the time slot n [EUR/Wh].
Each decision variable is subject to some hard constraints, which means that they cannot be violated at any time because this will create negative effects for the stakeholders. When they are violated, a high penalty cost is applied to the cost function to exclude the solution from the optimization process. The hard constraints compel that the current level at time slot n cannot exceed the maximum current limit of the charging point, as expressed in Equation (2), that the sum of the current levels for BEBs i at time slot n cannot exceed the limit of the grid at that time slot, as expressed in Equation (3) and that the demanded energy by the PTO for BEB i needs to be satisfied, as expressed in Equation (4).
where
can be easily calculated by multiplying the required range with the average consumption of the BEB [kWh/km].
Furthermore, there is also a soft constraint applied to each decision variable, which can be violated if needed. When this happens, a smaller penalty cost, depending on how much the constraint is violated, is applied. This soft constraint declares that the GA should try to keep the current level above 60% of the maximum current of the charging point, as expressed in Equation (5). It is applied to enhance the efficiency of the charging process and the operation of the PEC because below approximately 60%, the efficiency of a PEC drops drastically, resulting in huge power losses.
An additional constraint which says that the current cannot return to zero before the charging requirements are met is also applied. This is to prevent the charging process from getting interrupted without the BEB being completely charged.
3.4. Initial Population
A clever initialization of the GA population will decrease the chance that the algorithm does not find an optimal solution because the search space is reduced. However, it is still important to give the algorithm enough freedom to explore the search space. Accordingly, the initial population should contain many different individuals. Sets of decision variables, representing the different current levels with which a BEB will get charged, make up each individual. As a result, the total number of decision variables is the sum of the decision variables in each set, which equals the number of time slots that are assigned to the charging process of a specific BEB that requires charging. Since for this charging scheduling problem the required range, and thus the energy demand, for each BEB is known in advance, as it is an input to the RTSO algorithm, an initial population can be built where all sets and individuals already comply with the constraint given by Equation (4). Therefore, a function was developed that assigns a random value to each decision variable of each set, such that the sum of these random values equals the required energy demand of a specific BEB. For some sets, the decision variables are then ordered in descending order, ascending order or a combination of both, to imitate the behavior of the electricity tariff and grid limitation profile for small portions of the day. Finally, each individual is built up from a combination of these ordered and random sets, to constitute the initial population. Such an initial population allows the GA to quickly find some initial good solutions, while the randomness of the values ensures optimality at the end of the optimization process.
3.5. Parameters
The performance of the GA also greatly depends on several parameters. The population size, which specifies how many individuals there are in the population, cannot be too small because in this case only a small area of the search space will be explored. On the other hand, if the population is too big, the time to find the global solution will increase and the RTSO algorithm slows down. As presented in
Table 1, the population size depends on the number of decision variables. If the number of decision variables increases because more BEBs return to the depot to get charged, or some BEBs require a longer charging time than others, the population size will also increase. This is needed to give the GA a larger search space and to find an optimal solution for every BEB that needs charging.
Other important parameters are the elite count, the crossover ratio and the mutation rate. These parameters affect how the next generation of the population is created. The elite count specifies the number of the best individuals that will survive the next generation. The crossover ratio determines how many individuals of the next generation, other than the elites, are produced by crossover, where the genes of two parent individuals are combined, and which are produced by mutation, where random changes to the individuals are applied. In general, crossover will be applied to the largest part of the population to exploit the good genes of the parent individuals, while mutation is used to prevent the GA from getting trapped in a local optimum. The mutation rate specifies how many of the decision variables of an individual are tweaked.
Finally, some stopping criteria can also be applied to end the GA when the maximum number of generations has been reached, or when there has been no significant improvement in the cost function for a number of iterations.
Table 1 provides an overview of the values of these parameters used in this research. They have been determined by trial and error, as they are problem-specific, to ensure an acceptable solution and a reasonable computation time. A flowchart illustrating how the GA works is shown in
Figure 3.
5. Conclusions
The transition from diesel to battery electric buses brings several challenges with it. One of them is to efficiently charge the buses without affecting their operational schedule, violating grid limitations and avoiding load peaks at a minimal charging cost. To deal with this challenge, smart charging algorithms need to be applied to the charging process of BEBs in a depot. This requires the introduction of a HL-CMS, which adds an additional control layer to the charging infrastructure where algorithms can be implemented to control the charging rate in real time. This real-time implementation with variable charging rate for BEBs is currently lacking in scientific literature. Therefore, in this paper, an RTSO algorithm, based on a GA, is developed. It not only aims to minimize the charging cost for the PTO, but it also considers the constraints of the grid operator, the operation schedule of the BEBs and the efficiency of the charging process.
Several simulation scenarios were tested to validate the developed RTSO algorithm. For the considered scenarios, the RTSO algorithm managed to reduce the charging cost up to 9.4% compared with uncoordinated charging and satisfy the grid limitations where uncoordinated charging could not. Furthermore, the developed RTSO algorithm was implemented in a HL-CMS and real-time communication with existing off-board charging infrastructure was established. The experimental validation demonstrated the correct operation of the RTSO algorithm for a real-world use case, where it was observed that the execution time of the developed algorithm was lower than the time for the charging infrastructure and the EV to exchange the communication messages at the start of the charging process.
Still, further improvements to the RTSO algorithm are possible and will be considered in the future. First of all, bus-to-grid (B2G) functionalities can be included, which implies that the charging current can also become negative and that the BEBs are discharged to support the grid. This is especially useful in depots where a lot of power is potentially available for grid services [
38]. Secondly, the cost function can be upgraded with battery and charger parameters to extend their lifetime. Finally, upscaling and implementing the RTSO algorithm for an entire fleet of BEBs should also be considered. In such a case, the GA that is now used as the core of the RTSO algorithm will probably not be able to find a satisfactory solution within the connection time, even when using parallelized computing. Learning-based algorithms will in this case need to replace the GA. However, the GA can be used to create a complete database, which can then be used to train the learning-based algorithms.