1. ABOUT THE DATASET ------------ Title: Electric Vehicle Smart Charging simulation and dispatch – code and configuration data Creator(s): Farzaneh Daneshzand (https://orcid.org/0000-0002-8434-7794) Organisation(s): University of Reading Rights-holder(s): University of Reading Publication Year: 2023 Description: This dataset includes Python code required to simulate the smart charging of an Electric Vehicle (EV) fleet, or similar electricity demand entities, under a variety of tariff / incentive structures and user assumptions. Four modules of code are accompanied by three configuration data files. Descriptions of additional, required input data tables are provided below. This code was used in preparation of the article, Daneshzand et al (2023), which includes reference to publicly accessible data sources for all required inputs. Cite as: Daneshzand, F (2023): Electric Vehicle Smart Charging simulation and dispatch – code and input data. University of Reading. Dataset. https://doi.org/10.17864/1947.000444. Related publication: [1] Daneshzand, F., Coker, P. J., Potter, B., Smith, S.T. (2023) EV smart charging: how tariff selection influences grid stress and carbon reduction. Applied Energy, 348. 121482. ISSN 0306-2619. https://doi.org/10.1016/j.apenergy.2023.121482 2. TERMS OF USE ------------ Copyright 2023 University of Reading. This dataset is licensed under a Creative Commons Attribution 4.0 International Licence: https://creativecommons.org/licenses/by/4.0/. 3. PROJECT AND FUNDING INFORMATION ------------ Title: CREDS (Centre for Research into Energy Demand Solutions) Dates: Wider centre ran from 2018-2023. University of Reading team contributed to Work Package 2.2.2 in the Mobility theme from January 2021 to April 2022. Funding organisation: EPSRC Grant no.: EP/R035288/1 4. CONTENTS ------------ 1.EV_smart_charging_code.zip: 1.i) Python_scripts 1.i.a) main.py 1.i.b) functions_model.py 1.i.c) make_reports.py 1.i.d) report_functions.py 1.i.e) Output_folder 1.ii) input_data 1.ii.a) pricing_ids.csv 1.ii.b) grid_cap_SS.csv 1.ii.c) grid_connections_SS.csv Python_scripts: PYTHON CODE Main.py The main script, which reads inputs, establishes EV sessions and implements scheduling/smart control. This script calls various functions from functions_model.py. Outputs are saved in Output_folder. Functions_model.py Includes code for various functions called by Main.py make_reports.py Should be run after Main.py. This script reads from Output folder to derive summary statistics and plot results. Draws on various functions from report_functions.py. report_functions.py Includes code for various functions called by make_reports.py Output_folder This folder is empty in the dataset. An empty folder with this name is needed before calling Main.py and will be populated when the code is run for the first time. input_data: INPUT DATA FILES (INCLUDED) The Python code requires a series of input data tables, which should be available in the input_data folder. The published code is accompanied by three of these data tables: pricing_ids.csv, grid_cap_SS.csv, grid_connections_SS.csv pricing_ids.csv Lists IDs and definitions for each tariff in prices.csv. Also includes allocation proportions for combined tariff case. 4 columns [price_id,explanation,name,perc_usage] Header row plus 7 rows of data grid_cap_SS.csv Lists grid node capacities for each relevant substation. For the implementation described in [1], this is just one substation and one parent. Col 4 records the number of connections under each node. 4 columns [id_orig,cap(kVA),type,n] Header row plus 3 rows of data grid_connections_SS.csv Details grid hierarchy - how each grid node is connected to its parent node 2 columns [id_orig,parent_id_orig] Header row plus 3 rows of data input_data: INPUT DATA FILES (REQUIRED BUT NOT INCLUDED) The published model outputs drew on data synthesised from a range of publicly accessible sources, all referenced in the accompanying journal article. Some of the data sources require acceptance of license terms and do not permit onward sharing. Users should obtain data directly, then the following data tables should be populated and added to the input_data folder before attempting to run the Python code. battery_cap.csv Sample list providing individual EV batteries’ capacities for households with each of two charger capacities. EVs with higher battery capacities are more likely to be associated with a faster home charger in the Electric Nation data. Therefore, all battery capacities of EVs have been split into two groups based on the charger rates associated with them to increase the probability of having a bigger battery if the charge rate is higher. The columns are duplicated to support an aspect of the code which allows for greater sub-division, if required in future. Columns 1) and 2) relate to a charger rate of 3.6kW. Columns 3) and 4) relate to a charger rate of 7kW. 4 columns [1,2,3,4]. Header row plus a flexible number of rows of data. Battery_demand_charger.csv Statistical parameters (as per column headers) of battery capacity sample for each capacity range (rows) 10 columns [battery_cap,id,demand_id,demand_kwh_mean,demand_kwh_SD,upper_limit,charger_rate_id,probability,battery_cap_probability,Battery_capacity_median] Header row plus 4 rows of data [less than 10kwh,10 to 25 kwh,25 to 35 kwh,more than 35 kwh] Probability values as decimals, e.g. [0.5] charger_rates.csv The probability of occurrence for each of two charger rates 3 columns [id,charger_rate,probability] Header row plus 2 rows, with IDs [1,2] and charger rates [3.6,7] charging_frq.csv Frequency of charge per day, allocated by month and each of four battery capacity ranges 4 columns [month,battery_cap,frq_in_day,id] Header plus 48 rows with 4 ranges for each month [less than 10kwh,10 to 25 kwh,25 to 35 kwh,more than 35 kwh] and respective IDs [1,2,3,4] demand_per_caprange.csv Sample list of charging demand (kWh) per session for each battery capacity range 4 columns with IDs [1,2,3,4] which correspond to the IDs used in charging_frq.csv Header row plus a flexible number of rows of data. onEVload_per_customer.csv Non-EV load per customer (kWh)at each half hour across a day. 3 columns [time_stamp,domestic_per_customer,time_start] Header row plus 48 rows beginning with time_stamp 0 and time_start 00:00. plug-in_time.csv Records probability of plug-in at each half hour, both for weekdays and weekends 3 columns [time,wkday,wkend] Header plus 48 rows of data, with time [0,0.5,…, 23.5]. Probability as % value. plug-out_time.csv Records probability of plug-out at each half hour, both for weekdays and weekends 3 columns [time,wkday,wkend] Header plus 48 rows of data, with time [0,0.5,…, 23.5]. Probability as % value. prices.csv Half hourly prices for each tariff from 01/01/2020 to 31/12/2021. All prices in units p/kWh, except carbon intensity with units gCO2/kWh. Col 2 – DuoS informed; col 3 – Market Index Price; col 4 – Dynamic; col 5 – carbon intensity; col 6 – Economy 7 with flat weekend prices; col 7 – Economy 7 with weekend variation (not representative for UK); col 8 – Fixed price 12 columns [time_id,price_0,price_1,price_2,CI_0,price_3_oldEco7flatweekend,price_3,price_4,day,time,time american,Day of week] Header row plus 35040 rows of data Time ID [0,1,…,35039] Time format e.g. [01/01/2020 00:00:00] Time american format e.g. [01/01/2020 00:00:00] Day of week in full e.g. [Wednesday] 5. METHODS ----------- The code has been written and debugged in PyCharm Community Edition 2020.3.3, and the interpreter used for running is Python 3.7. The format of all input data is CSV. The results are saved in the “Output_folder” in pickle format. Various input data tables are required alongside the code, as described above. Suitable, publicly available data sets are described in [1]. In combination, the input data described in that article represent a unique configuration for the model implementation, relevant to a particular case study and set of assumed tariff cases. To test for alternative charging policies the file “pricing_ids” should be modified. This file represents the percentage of EVs at each tariff.