###### Abstract  
Optimizing battery swapping station (BSS) configuration is essential to enhance BSS's energy savings and economic feasibility, thereby facilitating energy refueling efficiency of electric taxis (ETs). This study proposes a novel modular battery swapping mode (BSM) that allows ET drivers to choose the number of battery blocks to rent according to their driving range requirements and habits, improving BSS's economic profitability and operational flexibility. We further develop a data-driven approach to optimizing the configuration of modular BSS considering the scheduling of battery charging at the operating stage under a scenario of time-of-use (ToU) price. We use the travel patterns of taxis extracted from the GPS trajectory data on 12,643 actual taxis in Beijing, China. Finally, we test the effectiveness and performance of our data-driven model and modular BSM in a numerical experiment with traditional BSM as the benchmark. Results show that the BSS with modular BSM can save 38% on the investment cost of purchasing ET battery blocks and is better able to respond to the ToU price than to the benchmark. The results of the sensitivity analysis suggest that when the peak electricity price is too high, additional battery blocks must be purchased to avoid charging during those peak periods.  
battery swapping station configuration; modular battery swapping mode; electric taxi; data-driven approach; trajectory data 202313984. 202313984.  
There are two energy refueling modes for EVs: battery charging mode (BCM) and battery swapping mode (BSM). Compared with BCM, BSM can accomplish energy refueling for ETs in a shorter time, which can be comparable to the time currently consumed by ICEVs [9; 10; 11]. The BSM is more suitable and applicable for public transport vehicles such as buses and ETs with uniform battery blocks due to the requirements of battery block standardization and specialized supporting infrastructure [12; 13]. Moreover, the recycling process of batteries can decrease the environmental impacts of battery production [14; 15]. BSM can facilitate this process better than BCM. Therefore, battery swapping is a compelling choice to accelerate taxi fleet electrification when these fleets are relatively uniform. The high accessibility and flexibility of battery swapping stations (BSSs) allow taxi drivers to arrive at BSSs easily and ensure empty batteries are swapped with fully charged batteries in only one minute [5]. The depleted batteries are then recharged at the BSSs and are later used by other taxis [7].  
Due to high upfront investment costs [13; 16], BSSs must be configured to respond to market dynamics appropriately and efficiently, i.e., the battery swapping demand (\(BSD\)) of ET drivers and the time-of-use (ToU) price. Furthermore, current BSSs only offer a single type of battery for swapping, but not all ET drivers need that specific driving range. Cloud-based smart battery management systems have recently emerged as a better solution for battery condition monitoring and optimization, allowing for the implementation of novel battery management strategies [17]. In order to match the dynamic \(BSD\) and ET drivers' driving range requirements, this study proposes a novel operational strategy in which ET drivers can choose the varying number of battery blocks (its rated capacity is less than the standard battery in current BSSs) to rent at modular BSSs according to their driving range requirements and habits, as illustrated in Figure 1. Moreover, the abundant traffic data in urban areas makes it possible to develop a data-driven approach to estimating the \(BSD\) by mining the GPS dataset of taxi trajectories, which are a proxy to power consumption [18; 19]. The abovementioned considerations motivate this research to propose a data-driven framework for configuring and operating ET BSS featuring modular battery swapping.