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

Smart electric vehicle charging has recently garnered significant attention in the research community due to need to charge vast numbers of electric vehicles (EVs) economically, as well as the potential of providing grid services using EVs. However, research into practical online charging algorithms has been hampered by the lack of a widely available, realistic simulation environment in which to evaluate algorithms and test assumptions. To meet this need, we have developed ACN-Sim, a data-driven, open-source simulator based on our experience building and operating real-world charging systems. ACN-Sim provides a modular, extensible architecture which models the complexity of real charging systems, including battery charging behavior and unbalanced three-phase infrastructure. In addition, ACN-Sim integrates with a broader ecosystem of research tools for EV charging, including ACN-Data, an open dataset of EV charging sessions to provide realistic simulation scenarios, and ACN-Live, a framework for field-testing charging algorithms.


INTRODUCTION
The massive growth of distributed energy resources (DERs) has made clear the need for algorithms which can control these grid edge devices effectively. Electric vehicles (EVs) are a particularly important DER which has inspired many researchers to develop algorithms to control EV charging. However, moving these algorithms from theory to practice requires dealing with practical constraints and complications which are often overlooked in simplified theoretical models.
Our experience building real EV charging systems has led us to study some of these issues, including unbalanced three-phase infrastructure constraints and non-ideal battery behavior [1]. Motivated by the value of real-world data and realistic simulation in our own research, we have developed and released the Adaptive Charging Network (ACN) Research Portal [2] an overview of Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the owner/author(s  which is shown in Fig. 1. In this abstract we focus our attention on ACN-Sim an open-source, high-fidelity, data-driven EV charging simulation environment.

REALISTIC, DATA-DRIVEN MODELS
ACN-Sim utilizes an modular, object-oriented architecture which closely resembles the components of a physical charging system as shown in Fig. 2. ACN-Sim provides multiple models of each component which can be mixed and matched by researchers to set up their experiment. Moreover, researchers can easily extended existing models to add new features or behavior. In addition to realistic component models, user behavior, including arrival/departure patterns and energy demands, are extremely important for realistic simulations. To provide real user behavior in simulations, ACN-Sim uses ACN-Data, a publicly accessible dataset which currently includes over 26,000 charging sessions collected from charging systems at Caltech and JPL [3]. Together these realistic component models and real data give researchers an idea of how their algorithms would perform in practice.

SIMPLIFIED RESEARCH PIPELINE
In addition to providing a highly-realistic simulation environment, ACN-Sim also significantly reduces the software engineering burden faced by researchers. Developing a simulator like ACN-Sim takes months of effort and extensive knowledge of real EV charging systems. Individual researchers should not be expected to spend valuable time developing their own in-house simulator.
With ACN-Sim, researchers can make use of a well-tested and realistic simulation environment to evaluate their algorithms. For most users the process of using ACN-Sim boils down to just six steps, which are shown in Fig. 3. ACN-Sim significantly reduces the amount of code needed to define an experiment, construct a simulator, and run the simulation. This gives the researcher more time to focus on implementing their algorithm and analyzing the results. ACN-Sim also offers tools to make these steps easier. To define an algorithm in ACN-Sim users only need to extend the BaseAlgorithm class and write a single schedule() function. For analysis, ACN-Sim provides tools for finding currents within the network, evaluating the percentage of demands which were met, and measuring peak power draw; all common calculations when evaluating EV charging algorithms. Once an experiment is complete, ACN-Sim makes it easy to share that experiment's code with the rest of the research community.

EASE OF SHARING
Reproduciblity is key to good science. However, when experiments are run on in-house simulators and closed datasets, it can be difficult for researchers to share their work and verify the results of others. Consider the plight of a researcher who wants to benchmark their new algorithm against others proposed in the literature. For some algorithms code may be available, but the researcher must still modify it to work with their simulation environment. For other works, the researcher must develop their own implementation from scratch based only on information included in the publication. Moreover, since the datasets used in a study are often unavailable, it is impossible for this researcher to even verify that their implementation matches the claimed performance. With ACN-Sim and ACN-Data all researchers have access to the same dataset and simulation environment, making it much easier to share experiments and benchmark algorithms.
To make this process even easier, ACN-Sim works with Google Colab, a free cloud-based service which hosts Jupyter notebooks [4]. Using this service, researchers can share links to their experiments which can be run in the cloud without downloading or installing software locally. Other researchers can then easily try the experiment themselves, even changing parameters or trying different scenarios. This promotes transparency in the research community.

CASE STUDY
To demonstrate the usefulness of ACN-Sim we present a simple case study. In this study, we implement an earliest deadline first algorithm which respects three-phase infrastructure constraints. We then compare line currents for each phase in the network with those resulting from uncontrolled charging 1 . We run this experiment using charging session data collected from the Caltech ACN from Sept. 5 -6, 2018 and use the included charging network model of the three-phase infrastructure of the Caltech ACN. This experiment is available as a Colab notebook at [5]. The results of the experiment are shown in Fig. 4.

CONCLUSION
ACN-Sim provides a valuable tool for EV charging research. Its integration with ACN-Data provides real scenarios for evaluating algorithms while realistic models of electrical infrastructure and components help researchers demonstrate the practicality of their algorithms. ACN-Sim also significantly reduces the amount of code required to set up a realistic experiment and allows these experiments to be easily shared.