ACN-Sim: An Open-Source Simulator for Data-Driven Electric Vehicle Charging Research

ACN-Sim is a data-driven, open-source simulation environment designed to accelerate research in the field of smart electric vehicle (EV) charging. It fills the need in this community for a widely available, realistic simulation environment in which researchers can evaluate algorithms and test assumptions. ACN-Sim provides a modular, extensible architecture, which models the complexity of real charging systems, including battery charging behavior and unbalanced three-phase infrastructure. It also integrates with a broader ecosystem of research tools. These include ACN-Data, an open dataset of EV charging sessions, which provides realistic simulation scenarios and ACN-Live, a framework for field-testing charging algorithms. It also integrates with grid simulators like MATPOWER, PandaPower and OpenDSS, and OpenAI Gym for training reinforcement learning agents.


I. INTRODUCTION
With millions of electric vehicles (EVs) expected to enter service in the next decade, generating gigawatt-hours of additional energy demand, engineers must work quickly to develop new algorithms to provide safe and affordable charging at scale. This need has resulted in a large body of research in managed or smart charging algorithms, outlined in [1], [2]. However, transitioning these algorithms from theory to practice requires dealing with the complexities of practical systems, which are often overlooked in simplified theoretical models. While these simpler models can make analysis tractable, they can also lead to a sizable gap between theoretical results and robust, high-performance implementations of algorithms. Bridging this gap is critical to making an impact in practice, but doing so requires: (1) access to real-world data; (2) detailed simulations driven by realistic models; and (3) the ability to test an algorithm in the field.
We began to bridge this gap in 2016 with the development of the Caltech Adaptive Charging Network (ACN), a firstof-its-kind testbed for large-scale, high-density EV charging research [3], [4]. This testbed consists of 126 networked and controllable EV charging stations, which allow us to collect data and field test algorithms with real hardware. The ACN Research Portal (ACN-Portal) is designed to give more researchers access to the benefits of this testbed. The portal has three major components: (1) ACN-Data, a dataset of over 66,000 real EV charging sessions from ACNs like the one at Caltech [5]; (2) ACN-Sim, an open-source, data-driven simulation environment; and (3) ACN-Live, a framework for researchers to field test algorithms on the Caltech ACN. The interaction between these tools and the physical ACN infrastructure is summarized in Fig. 1.
In this work, we will focus on ACN-Sim, which is opensource and available at [6]. ACN-Sim has previously been described in [7], [8]. However, in this work, we extend this description with new features and applications. Our contributions are as follows: II. EXISTING SIMULATORS Open-source tools and simulators have a long history of supporting smart grid research. MATPOWER [9] makes it easy to solve power flow and optimal power flow problems in MATLAB. It has inspired projects in other languages including PandaPower [10] in Python and PowerModels.jl in Julia [11]. Other important simulators include OpenDSS [12] and GridLab-D [13], which enable large-scale studies of the distribution system. These tools have demonstrated the importance and impact of open tools within the smart grid community. ACN-Sim integrates with many of these, including MATPOWER, PandaPower, and OpenDSS, to enable studies of the grid impacts of EV charging.
ACN-Sim is not the first simulator specific to EV charging. V2G-Sim was developed at Lawrence Berkeley National Laboratory and has been used to evaluate the ability of EVs to meet drivers' mobility needs in the context of: level-1 charging [14]; battery degradation [15]; and demand response [16]. V2G-Sim has also been used to examine grid-level effects of smart charging, such as smoothing the duck curve [17]. EVLib and EVLibSim were developed at Aristotle University of Thessaloniki to model many types of EV charging, including standard conductive charging, inductive charging, and battery swapping [18]. These simulators address a different problem space from ACN-Sim. While ACN-Sim is designed to evaluate online and closed-loop control strategies, these simulators only allow precomputed schedules or simple controls. ACN-Sim is also unique in modeling unbalanced, behind the meter electrical infrastructure, allowing it to evaluate algorithms which oversubscribe local infrastructure.
More recently, the Open Platform for Energy Networks (OPEN) from Oxford was released to facilitate simulation and optimization of smart local energy systems, including electric vehicle charging [19]. OPEN supports model predictive control algorithms at the distribution feeder level and unbalanced three-phase infrastructure. It also allows for control of other distributed energy resources such as stationary storage and building loads. However, it has not been used to consider the electrical infrastructure behind the meter.
Overall, ACN-Sim's realistic models and data taken from real charging systems, along with its simple interfaces for defining new control algorithms and suite of baseline algorithms, set it apart from existing simulators, making it a useful addition to the suite of tools available to researchers.

III. SIMULATOR ARCHITECTURE AND MODELS
ACN-Sim utilizes a modular, object-oriented architecture which is shown in Fig. 2. This design models physical systems as closely as possible and makes it easier to extend the simulator for new use cases. Each of the boxes in Fig. 2 refers to a base class that can be extended to model new behavior or add functionality. While ACN-Sim includes several models of each component, users are free to customize the simulator to meet their needs. We encourage researchers to contribute extensions back to the project so that others can utilize them.

A. Simulator
A Simulator object forms the base of any ACN-Sim simulation. This Simulator holds models of the hardware components in the simulated environment and a queue of events that define when actions occur in the system. ACN-Sim is based on a discrete-time, event-based simulation model. Figure 3 describes its operation. During a simulation, the Simulator stores relevant data, such as the event history, EV history, and time series for the pilot signal and charging current for each EVSE, for later analysis.

1) Electrical Infrastructure:
ACN-Sim uses the ChargingNetwork class to model the electrical infrastructure of the charging system, including EVSEs 1 , transformers, switch panels, and cables. Each ChargingNetwork instance contains a set of EVSE objects, as well as a set of constraints.
We model constraints by limiting the current through each bottleneck component in the network. Because charging systems are radial networks and electrical codes specify ampacity limits that keep voltages within specifications, it is sufficient to model only constraints on current magnitudes. Using Kirchhoff's Current Law, we can express these constraints by where I j (t) is the current through the bottleneck, R j is the limit on the current magnitude, N is the total number of EVSEs in the system, r i (t) is the charging current of EVSE i at time t, and T is the set of all timesteps in the simulation. The parameter φ i is the phase angle of the current phasor, which can be calculated based on how EVSE i is connected in the network. For simplicity, we assume φ i is fixed, and voltages in the network are nominal. A ij can be found via circuit analysis, as shown in [4] for a subset of the Caltech ACN.
2) Stochastic Space Assignment: ChargingNetwork assumes that each EV is preassigned to a specific EVSE, and no two EVs are ever assigned to the same EVSE at the same time. This holds when applying a workload from ACN-Data to its corresponding network model. However, in some cases, such as when generating events from a statistical model or applying a real workload to a new network configuration, it can be helpful to allow for non-deterministic space assignments. ACN-Sim accomplishes this through the StochasticNetwork class (which is a subclass of ChargingNetwork). Using this network model, EVs are assigned to a random open EVSE when they arrive instead of using a predefined station_id for assignment. Since it is possible for no EVSEs to be available when a new EV arrives, StochasticNetwork also includes a waiting queue for EVs which arrive while all EVSEs are in use. When an EV leaves the system, the first EV in the queue takes its place. By default, we assume that the presence of EVs in the waiting queue does not affect drivers' departure time. However, with the early_departure option, drivers swap places with the first EV in the queue as soon as they finish charging. This is a common practice in many offices that have more EV drivers than EVSEs.
3) Included Site Models: While users are free to develop their own charging networks, ACN-Sim includes functions to generate network models that match the physical infrastructure of the three sites currently included in ACN-Data (Caltech, JPL, and Office001). In addition, the auto_acn function allows users to quickly build simple single-phase and threephase networks by providing just a list of station ids and a transformer capacity. In these auto_acn networks, it is assumed that the transformer is the only source of constraints. All of these functions work with both ChargingNetwork and StochasticNetwork, which can be set as a parameter.

C. EVSE
EVSEs, short for Electric Vehicle Supply Equipment, are the devices EVs plug into to charge. The EVSE communicates a pilot signal to the EV's on-board charger, which is an upper limit on current the EV is allowed to draw from the EVSE. The granularity of this pilot is dependent on the particular EVSE. Some EVSEs provide continuous control, while others offer only a discrete number of set-points. In addition, according to the J1772 standard, no pilot signals are allowed between 0 to 6 A [20]. In most current research, the additional constraints imposed by EVSEs without continuous control are neglected [1]. However, including these constraints is important for practical algorithms and is non-trivial.
ACN-Sim provides three EVSE models which cover most ideal and practical level-2 EVSEs: • EVSE allows any pilot signal between an upper and lower bound. By default, EVSE allows any non-negative charging rate. • DeadbandEVSE also allows continuous pilots but excludes 0 -6 A as required by the J1772 standard. • FiniteRatesEVSE only allows pilot signals within a finite set, accurately modeling most commercial EVSEs. For example, many of the EVSEs used in the Caltech ACN allow {6, 7, ..., 31, 32} or {8, 16, 24, 32} amps.

D. EV
The EV object contains relevant information for a single charging session such as arrival time, departure time, estimated departure time and requested energy. The estimated departure time may differ from the actual departure time. Likewise, it may be infeasible to deliver the requested energy in the allotted time due to maximum charging rate restrictions, system congestion, or insufficient battery capacity. By allowing this, ACN-Sim models the case where user inputs or predictions are inaccurate, which is common in practice [5].

E. Battery
Most research in EV charging utilizes an ideal battery model, where EVs are assumed to follow the given pilot signal exactly. However, in practice, we see that the charging rate of an EV is often strictly lower than the pilot signal and decays as the battery approaches 100% state-of-charge [1], [4]. This can significantly increase the total time required to charge the battery and results in under-utilization of infrastructure capacity.
ACN-Sim jointly models the vehicle's battery and battery management system. The battery's actual charging rate depends on the pilot signal as well as the vehicle's on-board charger, its state-of-charge, and other environmental factors. ACN-Sim currently includes two battery models.
The Battery class is an idealized model and serves as the base for all other battery models. The actual charging rate of the battery,r(t), in this idealized model is described bŷ where r(t) is the pilot signal passed to the battery,r is the maximum charging rate of the on-board charger andê(t) is the Comparison of Linear2Stage and idealized Battery models with a real charging curve collected from two distinct users of the Caltech ACN when the pilot signal is not binding. We can see that the Linear2Stage model with appropriate parameters matches the battery behavior well in the first case, but in the second case, there are dynamics in the joint battery/battery manager system that the Linear2Stage model does not capture; namely the double-tail behavior (which is recurring for this user).
difference between the capacity of the battery and the energy stored in it at time t in the units of A·periods. We do not consider discharging batteries, so all rates are positive.
Linear2StageBattery is an extension of Battery that approximates the roughly piecewise linear charging process used for lithium-ion batteries. The first stage, referred to as bulk charging, typically lasts from 0% to between 70 to 90% state-of-charge. During this stage, the current draw, neglecting changes in the pilot, is nearly constant. In the second stage, called absorption, the voltage of the battery is held constant while the charging current decreases roughly linearly. The actual charging rate of the Linear2StageBattery is given bŷ where SoC is the state-of-charge of the battery and th marks the transition from the bulk stage to the absorption stage of the charging process. Figure 4 shows how these two models compare for two charging profiles taken from ACN-Data. In general, we find that the piecewise linear model is a good, though imperfect, approximation.

F. Event Queue / Events
ACN-Sim uses events to describe actions in the simulation. There are two types of events currently supported: • PluginEvent signals when a new EV arrives at the system. A PluginEvent also contains a reference to the EV object which represents the new session. • UnplugEvent signals when an EV leaves the system at the end of its charging session. Each event has a timestamp describing when the event should occur. Events are stored in a queue sorted by their timestamp. Since multiple events could occur at the same timestep, we further sort by event type, first executing UnplugEvents, then PluginEvents. At each timestep, the Simulator executes all events left in the queue with timestamps on or before the current timestep. After any event, the scheduling algorithm is called to adapt to the new system state. Users are free to create new events by extending the Event class.
To generate events, users can either get real event sequences from ACN-Data, generate event sequences from statistical models, or manually create events to investigate edge cases. To make accessing ACN-Data simpler for users, ACN-Sim provides direct integration with the ACN-Data API. It also provides utilities for learning statistical models such as Gaussian Mixture Models, directly from data using tools from SciKit Learn as described in [5].

G. Signals
The signals sub-module allows ACN-Sim to integrate with external signal sources, which can be an important part of EV charging systems such as: 1) utility tariffs, 2) solar generation curves, 3) external loads.
To support utility tariffs, ACN-Sim includes the TimeOfUseTariff class, which supports time-varying and seasonal tariff schedules with or without demand charges. To make integration easier for users, ACN-Sim includes several utility tariff schedules. Users can define new schedules in a simple JSON format. In Section V-A we use these tariff schedules to calculate operating costs, and in Section V-B we provide the tariff as an input to the minimum cost objective for the MPC algorithm.
External loads, generation profiles, pollution indexes, and other signals can be loaded into the simulator using the signals dictionary within the Simulator constructor or passed directly to the control algorithm. Section V-D provides an example of an experiment using external loads and generation.

H. Co-simulation with Grid Simulators
ACN-Sim also provides co-simulation with popular gridlevel simulators, including MATPOWER, PandaPower, and OpenDSS. This allows researchers to investigate Vehicle-Grid Integration (VGI) problems such as algorithms to alleviate voltage and overload issues in the local distribution system or aggregation approaches to bid into markets. In the current version, simulations are run sequentially, with the output of the ACN-Sim experiment serving as an input to the grid simulator. In future releases, we plan to support feedback from the grid simulation into ACN-Sim.

I. OpenAI Gym Integration
Reinforcement learning (RL) has been applied to many problems in scheduling and resource allocation [21]. To enable researchers to study RL algorithms' performance on scheduled EV charging, ACN-Sim provides integration with OpenAI Gym [22], a framework for testing RL algorithms on different environments. ACN-Sim offers customizable OpenAI Gym environments that implement the same interface as built-in Gym environments [23], facilitating both direct application of baseline RL algorithms and development of new algorithms for the problem of smart EV charging. As with other parts of ACN-Sim, users may extend the base ACN-Sim environment to study different action, observation, or reward structures.

A. Interface
To make algorithm implementations more flexible, we introduce an interface that abstracts away the underlying infrastructure, whether that be simulated or real, allowing us to use the same algorithm implementation with both ACN-Sim and ACN-Live. This means that algorithms can be thoroughly tested with ACN-Sim before they are used on physical hardware.

B. Defining an algorithm
To define an algorithm in ACN-Sim users only need to extend the BaseAlgorithm class and define the schedule() function. This function takes in a list of active sessions, meaning that the EV is plugged in and its energy demand has not been met, and returns a charging schedule for each. Each entry in the schedule is valid for one timestep beginning at the current time. Algorithms have access to additional information about the simulation through the Interface class, such as the current timestep, infrastructure constraints, and allowable pilot signals for each EVSE.

C. Included algorithms
ACN-Sim is packaged with many common online scheduling algorithms that can be used as benchmarks.
• Uncontrolled Charging: Most charging systems today do not manage charging. With Uncontrolled Charging, each EV charges at its maximum allowable rate. This algorithm does not factor in infrastructure constraints. • Round Robin: Round Robin (RR) is a simple algorithm that attempts to equally share charging capacity among all active EVs. It creates a queue of all active EVs. For each EV in the queue, it checks if it is feasible to increment its charging rate by one unit. If it is, it increments the rate and replaces the EV at the end of the queue. If it is not, the charging rate of the EV is fixed, and the algorithm does not return the EV to the queue. This continues until the queue of EVs is empty. • Sorting Based Algorithms: Sorting based algorithms are commonly used in other deadline scheduling tasks such as job scheduling in servers due to their simplicity [24].

ACN-Sim includes several of these algorithms, including First-Come First-Served (FCFS), Last-Come First-Served (LCFS), Earliest-Deadline First (EDF), Longest
Remaining Processing Time (LRPT), and Least-Laxity First (LLF). These algorithms work by first sorting the active EVs by the given metric, then processing them in order. Each EV is assigned its maximum feasible charging rate, given that the assignments to all previous EVs are fixed. This process continues until all EVs have been processed. • Model Predictive Control: Many approaches to the EV scheduling problem rely on model predictive control (MPC). The adacharge package, available at [25], is based on CVXPY [26], [27], and makes it easy to use these algorithms with ACN-Sim. With this library, users can easily choose from existing objective functions and constraints or create their own. The general framework for these MPC algorithms is outlined in [4].

V. USE CASES
ACN-Sim has been used to explore many research questions. In this section, we provide examples, including evaluating (1) possible infrastructure solutions, (2) the effect of unbalance on oversubscribing infrastructure, (3) time-series of EV charging profiles, and (4) the effect of large-scale EV charging on a distribution feeder. In addition, ACN-Sim has been used to design dynamic pricing schemes and cost-optimal scheduling [28], train reinforcement learning agents for EV charging systems [29], and examine the effect of non-ideal batteries and EVSE pilot quantization on model predictive control and baseline algorithms [30]. The code for all case studies presented here is available at [31].

A. System Planning
In this section, we demonstrate how the simulator can be used to aid in system planning and design. We consider a site host who would like to install an EV charging solution at an office building. The host estimates that the system will charge approximately 100 EVs per day. There are several ways to meet this demand, which are described in Table I. Each of these options has its own trade-offs.
We can use ACN-Sim to guide this site host. We assume that the office will have a usage pattern similar to that of JPL. As such, we train a Gaussian Mixture Model based on the data collected from weekday usage at JPL, as described in [5]. We assume the site will not allow usage on weekends. We then use ACN-Sim's GaussianMixtureEvents tool to create a queue of events from this generative model, assuming 100 arrivals on weekdays and 0 on weekends. We also create models of the charging networks described in each proposal. Since EVs are generated, we use the StocasticNetwork, which randomly assigns EVs to EVSEs when they arrive. For proposals 1, 2, and 3, we use the built-in Uncontrolled charging algorithm. For proposal 4, we consider an MPC based algorithm for cost minimization. We evaluate the scenarios on four criteria: 1) transformer capacity required, 2) percentage of total energy requested that was delivered, 3) number of times drivers need to swap spaces to allow others to charge after they finish, and 4) the operating cost of the system based on the summer rates from the sce_tou_ev_4_march_2019 tariff schedule included in ACN-Sim. We repeat these experiments for ten months of generated data, with mean results shown in Table I. Note that in each case, the standard deviation between months was less than 3.5% for each metric.
From Table I, we can see that while installing 100 level-1 EVSEs might be the simplest solution, these slow chargers are only able to 75.6% of demand because they cannot support users with large energy needs and short deadlines. However, the alternative of installing a 685 kW transformer and associated service upgrade would be cost-prohibitive for most sites, and installing only 30 level-2 EVSEs requires over 1,100 swaps per month, leading to lost productivity and poor This illustrates the real-world need for smart charging systems and associated algorithms. The benefit of smart charging approaches is amplified as EV adoption grows, and charging infrastructure must scale accordingly. In this scenario, we consider how the system will scale to 200 charging sessions per day. The results are shown in Table II. Intuitively the systems designed for 100 EVs per day require far more swaps with increased demand, and similarly, the percent of demand met decreases. This is also true for the smart charging (MPC) case. However, while scaling the number of EVSEs in traditional uncontrolled charging systems would require a corresponding scaling of the transformer capacity to ensure safety, the smart charging approach allows us to add new EVSEs without increasing the transformer capacity. To enable scalability, we can leave an open space beside each of the orignals and install a second EVSE using the same cable. We then use the charging algorithm to ensure the capacity of this cable is not exceeded. Thus, we can easily scale the number of EVSEs without increasing transformer or interconnection capacity.
Interestingly, as the number of EVs served by the system increases, the effective cost per kWh decreases for all systems. This indicates the economics of scale, which are associated with demand charge. With more usage, it is possible to spread the demand charge over more energy delivered, decreasing the price per kWh. This decrease in demand charge is greater than the increase in energy price, which results from needing to charge users in more expensive TOU periods, leading to a net decrease in per-unit costs.

B. Comparing Algorithms in Oversubscribed Infrastructure
As we have seen in Section V-A, smart charging algorithms can lead to significant savings in terms of both capital investment and operating costs. However, despite significant work there are still relatively few algorithms proposed in the literature which can be directly applied in practice. To develop more practical algorithms, ACN-Sim provides a platform to evaluate them in as realistic a setting as possible. A key feature of ACN-Sim is its ability to simulate the unbalanced three-phase electrical infrastructure common in large charging systems. Most charging algorithms in the literature rely on constraints that implicitly assume single-phase or balanced three-phase operation. To see why these assumptions are insufficient for practical systems, we consider two versions of the LLF algorithm. In the first, LLF only ensures that total power draw is less than the transformer's capacity, which is sufficient for a single-phase or balanced system. In the second, LLF uses the full threephase system model that includes individual line constraints. The results of this experiment are shown in Fig. 5, where we can see that only considering maximum power draw leads to significant constraint violations in line currents. However, by using an algorithm that considers the full three-phase model, we ensure these line constraints are not violated at the cost of not fully utilizing the 50 kW transformer's capacity due to unbalance.
Unbalanced three-phase infrastructure can also influence our evaluation of algorithms. An important evaluation metric for EV charging algorithms is what percentage of user energy demands met when infrastructure constraints are binding. We use this metric to evaluate six algorithms over a range of possible transformer capacities based on the real charging workload of the Caltech ACN from September 2018. To demonstrate the effect of infrastructure models, we conduct this experiment with single-phase and three-phase models, as shown in Fig. 6. Here we can see that in the singlephase case, EDF, LLF, and MPC all perform near optimally, exceeding the performance of Round Robin and FCFS by up to 8.6%. However, the subplot on the right tells a different story. Here we see that the MPC algorithm can match the offline optimal performance as before, while EDF and LLF both underperform. In fact, in the highly constrained regime, Round Robin outperforms EDF and LLF despite having less  information about the workload. We attribute these results to the importance of phase-balancing in three-phase systems, which has been historically under-appreciated in the manged charging literature. In addition to comparing algorithms, the curves in Fig. 6 can also inform the design of charging systems when accounting for the online algorithm used. For example, we can see that if a host wants to deliver >99% of charging demand using MPC, a 70 kW transformer would be sufficient, assuming an unbalanced three-phase system. Alternatively, if an existing transformer can only support 40 kW of additional demand, a host could expect to meet approximately 85% of demands without an upgrade.

C. Time Series Inspection
ACN-Sim also allows us to examine the charging profile of individual EVs, as shown in Fig. 7 qualitative difference between the algorithms. For example, FCFS behaves very similarly to Uncontrolled charging but is delayed as the EV must wait its turn in the queue. For EDF and LLF, charging can be interrupted when EVs with earlier deadlines arrive or as an EV's laxity evolves over time.
Oscillations in the LLF plot result from an increase in laxity as the EV charges, which can decrease its standing in the queue, causing it to stop charging temporarily. Round Robin, MPC, and the offline optimal are quite different. Each EV charges steadily but at a rate below its maximum as congestion in the system necessitates sharing of charging capacity. In this case, we use an equal sharing regularizer in the objective function for MPC and Offline Optimal. See [4] for more information.
With this tariff schedule, on-peak rates run from 12 -6 pm -Offline Optimal finishes charging this user before this, while MPC goes slightly into the on-peak period.

D. Grid Integration
The output load profiles generated by ACN-Sim simulations can be used as loads on nodes of a distribution feeder in a grid simulator; in this case study, we use OpenDSS [12]. This functionality can be used to evaluate different algorithms' effects on a larger grid. For this case study, we add EV charging to one node of a 240-node test distribution feeder with a voltage regulator located in Iowa and use actual smartmeter data from the system in 2017 [32].
We add an EV charging facility as an unbalanced threephase load to node 2053, which has a transformer capacity of 225 kVA. We use the JPL charging network with workload data from Sept. 5, 2019. Background load data is from Sept. 5, 2017 (both days were weekdays). We consider four cases, a baseline with no EV charging, uncontrolled charging, MPC with a load flattening objective, and MPC with load flattening and onsite solar. The results of these experiments are shown in Fig. 8. Uncontrolled charging results in an unacceptable minimum voltage of 0.93 p.u. and overloads the transformer at bus 2053. This indicates that the grid as designed could not support uncontrolled charging at this scale at bus 2053.
To prevent voltage issues, we can schedule charging during periods of low background load by using the MPC framework in Section IV-C with a load flattening objective term. We provide the actual building load as an input to the algorithm and ensure that the total load is constrained to be below the transformer's capacity. From Fig. 8, we can see that this improves the minimum system voltage to 0.965 p.u., which matches the system wide minimum from the baseline case.
Since many EV charging systems are co-located with solar PV, we now consider adding a 270 kW DC (225 kW AC) PV array at node 2053. The solar data was generated from NREL's SAM tool for Des Moines, Iowa, in a typical meteorological year (TMY) for Sept. 5. We use the same MPC algorithm but now set the background load to the net load after subtracting solar. We see in Fig. 8 this roughly recovers the same gridwide minimal voltage as before we added an ACN, indicating that smart charging and solar PV could enable widespread adoption of EV charging without adverse grid impacts. The MPC objective is constructed to fulfill all EVs' energy demand in both the baseline and solar cases. Both of these case studies assume perfect knowledge of background load and generation, as forecasting methods are beyond the scope of this study. However, no knowledge of future of future EV arrivals is used.

VI. CONCLUSIONS
In this work, we present ACN-Sim, a data-driven simulator designed to aid the development of practical online scheduling algorithms for EV charging. This tool significantly reduces the software engineering burden on researchers and exposes them to practical issues present in real charging systems. ACN-Sim also makes it easier for researchers to share their experiment code, improving transparency and code reuse in the community. Finally, ACN-Sim integrates with the Adaptive Charging Network Research Portal, a larger suite of tools that includes a database of real charging sessions and a framework for field testing algorithms. ACN-Sim will continue to grow to meet the needs of the community, including new models of systems components and charging networks.