This repository comprises two parts:
- Information about the journal paper "Large Scale Scenarios of Electric Vehicle Charging with a Data-Driven Model of Control", and
- Code to run the tool itself.
This project was funded by the California Energy Commission under grant EPC-16-057.
Principal Investigator: Gustavo Vianna Cezar.
For more information about the Grid Integration Systems and Mobility (GISMo) group within SLAC National Accelerator Laboratory visit https://gismo.slac.stanford.edu/. SLAC National Accelerator Laboratory is operated for the US Department of Energy by Stanford University under Contract DE-AC02-76SF00515.
Powell, S., Cezar, G. V., Apostolaki-Iosifidou, E., & Rajagopal, R. (2021). "Large Scale Scenarios of Electric Vehicle Charging with a Data-Driven Model of Control." Under review.
Corresponding authors: Siobhan Powell (siobhan.powell at stanford.edu) and Ram Rajagopal (ramr at stanford.edu).
Long-term planning for transportation electrification demands large-scale, detailed, data-driven scenarios for future charging demand. Controlled charging is a powerful and growing tool for managing the impact of charging on the grid; it is critical to include in planning scenarios.
Many scenario tools today, however, are expensive to scale and cannot represent complex load controls. In this paper and tool we address that gap. We present a scalable tool for scenario generation based in real data from the California Bay Area, and we present a novel methodology to model the impact of load management control on aggregate charging profiles using machine learning.
Core to our methodology is the separation of model training from scenario generation. The tool below does not reference the raw data directly but uses pre-trained model objects. To make those easy to access by the research community, we have made the model objects available for download here:
- Control models: https://s3-us-west-1.amazonaws.com/script.control.tool/Control_Objects/public_control_model_objects.zip
- Sessions models: https://s3-us-west-1.amazonaws.com/script.control.tool/Sessions_Model_Objects/public_sessions_model_objects.zip
The paper highlights rate design as an application for this tool using the following procedure:
- Generate data using the sessions model
- Define a custom rate schedule to study
- Build training data for that rate schedule and learn its mapping
- Apply the mapping within the model to study its impact on a large-scale scenario.
Code for that application is included here in the folder
PaperCode/CustomRate
The main model code is also embedded and used in the tool below to generate new scenarios. Further code associated with the paper is available on request.
Developers: Anna Peery, Derin Serbetcioglu, Jonathan Goncalves
Supervised by: Gustavo Vianna Cezar
Contributors: Robbie Shaw, Siobhan Powell, Yanqing Wang, Heather Zhang, Proverbs Xu, Leezki, and xinyile
SCRIPT/
webserver/ ---- Django REST Framework web server
manage.py
app/ ---- settings
script/ ---- script web app
frontend/ ---- React
src/ ---- source code
ec2setup/ ---- code running on EC2
utils/ ---- Utils which can be copied by all images during image build
mosek/ ---- mosek license
variable.env ---- Configuration for environment variables
UploadToCounty/ ---- Includes script to populate the counties table
$ brew install postgresql
$ brew services start postgresql
$ createdb scriptdb
To connect to the DB - I used TablePlus. Connection params for development are the postgres defaults. You can also check the settings file to find them: webserver/app/settings/base.py
. For now just save the new connection - we will connect to it once the Django Server is running
$ conda env create -f environment.yml
$ conda env update -f environment.yml
$ conda env export --name venv_script > environment.yml
$ conda activate venv_script
$ conda deactivate
$ cd webserver
$ python manage.py migrate --settings=app.settings.base
$ cd UploadToCounty
$ python UploadToPostgresCountiesZips.py
$ cd frontend
$ nvm use
$ cd frontend
$ yarn install
$ cd webserver
$ python manage.py runserver --settings=app.settings.base
$ cd webserver
$ redis-server
$ cd webserver
$ celery -A app worker --loglevel=INFO
$ cd webserver
$ flower -A app --port=5555
$ cd frontend
$ yarn start