# New Energy Bound-Based Model for Optimal Charging of Electric Vehicles with Solar Photovoltaic Considering Low-Voltage Network's Constraints

## Description

This directory contains the following datasets: SOURCE CODE Three scripts in Python are included to obtain the parameters of the whole network and test the proposed optimisation approach. SENSITIVITY MATRICES OF THE 905-NODES LOW-VOLTAGE FEEDER * dVcal.txt: voltage sensitivity matrix of household nodes due to the addition of load, expressed in V/kW * dVGen.txt: voltage sensitivity matrix of household nodes due to the addition of generation, expressed in V/kW * dLline.txt: loading sensitivity matrix of the feeder's main cable due to the addition of load, expressed in kW/kW * dLlineGen.txt: loading sensitivity matrix of the feeder's main cable due to the addition of generation, expressed in kW/kW * dStcal.txt: loading sensitivity matrix of the distribution transformer due to the addition of load, expressed in kW/kW * dStGen.txt: loading sensitivity matrix of the distribution transformer due to the addition of generation, expressed in kW/kW INITIAL VOLTAGES AND LOADING LEVELS These data were obtained for a test period of 30 hours with a 10-minute interval (i.e., 180 slots of time). * Vini.txt: time-series of voltage per phase for every household node obtained from the unbalanced quasi-dynamic power flow (QDPF) * PLini.txt: time-series of loading per phase for the feeder's main cable obtained from the unbalanced QDPF * STini.txt: time-series of loading per phase for the distribution transformer obtained from the unbalanced QDPF INPUT AND ADDITIONAL PARAMETERS Both folders "Winter parameters" and "Summer parameters" contain 100 text files, which correspond to each simulated scenario, numbered from one to one hundred for the following variables: * DtX.txt: the daily travelled distance of each EV for scenario X * e_arrX.txt: the arrival energy level of each EV for scenario X * taIntX.txt: the arrival time interval of each EV for scenario X * tpIntX.txt: the number of time intervals of each EV parked at home for scenario X * e_reqX.txt: the objective energy level of each EV for scenario X * xX.txt: the availability of each EV for scenario X, which is based on taIntX.txt and tpIntX.txt * eLowerX.txt: the lower energy boundary of each EV for scenario X * eUpperX.txt: the upper energy boundary of each EV for scenario X * PpvX.txt: time-series of PV power output for scenario X It is also included the IEEE LV network in PowerFactory V15.1 with a series of EVs and PVs. These have a time-series profile assigned from the proposed optimisation problem results. Additionally, the parameters and results obtained by comparing the addition of network constraints are included.

## Files

## Steps to reproduce

1. The network must be imported in PowerFactory (V15.1 or later) and located in a folder named "LV UK networks". Add or remove the desired number of EVs and PVs in the network in PowerFactory in order to evaluate a particular penetration level. 2. Python files must be in the same folder. In the file "EV_Energy_Power_Bounds.py" you can change the EV parameters, as well as the sample period "ts" and the length of the simulation through the variable "days". This file will return the energy boundaries and time availability of all EVs, along with other required parameters. 3. "Get_Sensitivity_Coeff_PowerFactory_Losses.py" compute the sensitivity matrices, the initial voltage and loading levels of the network, and other input parameters for the EVs and PVs. Modify the variable "exportSel" to 1 if you want to export the data to a particular folder, which has to be previously defined. 4. The main file is "LP_EVandPV__Single_Objevtive_MonteCarlo.py", and it must be executed to call the remaining two. Define the number of iterations if you want to perform several simulations. Modify the variable "exrporRes" to 1 if you want to export the data to a particular folder, which has to be previously defined. Note: The data provided in the folders can be used to test the cases of the manuscript, but the main script will have to be modified to read all of those.