As plug-in electric vehicle (PEV) adoption accelerates, uncoordinated charging habits during peak hours can cause power losses, overloads, and voltage fluctuations in smart grids. This thesis simulates the success rate (10% - 50%) of a hypothetical campaign encouraging consumers to charge their PEVs during off-peak hours to help alleviate grid strain. Data analytics tools and descriptive statistics are used to manipulate data and visualize results. The findings show that even a slight shift in charging behavior during peak hours can lead to a more balanced distribution of energy demand.
- R and an R IDE (e.g., R Studio) are required. You can download both from the official RStudio website.
- You will also need the following R packages:
ggplot2,lubridate,dplyr, andglue. You can install them by running this command in your R console:
install.packages(c("ggplot2", "lubridate", "dplyr", "glue"))
- To ensure correct date formatting, your computer's display language must be set to English (United States) in the language settings.
Note
If you prefer to view the generated graphs without setting up the coding environment or running your own simulations, you can access a Colab notebook linked in the About section of this repository. This notebook summarizes Chapter 2 of the thesis, featuring key findings and relevant graphs, all generated from pre-executed code. It also provides links to additional notebooks for other chapters of the thesis, where you can explore further insights and visualizations.
The three primary datasets were sourced from publicly available data provided by the National Laboratory of the Rockies (NLR) and were adapted for use in this research. The data were generated by a model simulating realistic electricity consumption patterns for the Midwest region of the United States.
The first dataset contains electricity demand profiles in watts for 200 households, recorded in 10-minute intervals throughout 2010 in the DD/MM/YYYY HH:MM format. The other two datasets contain PEV charging profiles for 348 vehicles associated with these 200 households. One dataset uses Level 1 (1920 W) charging, and the other uses Level 2 (6600 W) charging, both recorded in 10-minute intervals over the same period in the same format. All datasets are complete with no missing values for any time interval. Below are sample tables for each.
- Household Power Demand (House.csv)
| Time | Household 1 | Household 2 | Household 3 | ... | Household 200 |
|---|---|---|---|---|---|
| 1/1/2010 0:00 | 274.16 | 576.44 | 1523.90 | ... | 664.39 |
| ... | ... | ... | ... | ... | ... |
| 26/4/2010 18:20 | 818.34 | 1845.10 | 1421.30 | ... | 819.74 |
| 26/4/2010 18:30 | 513.47 | 1810.40 | 996.30 | ... | 819.74 |
| 26/4/2010 18:40 | 531.81 | 534.71 | 1721.30 | ... | 819.74 |
| ... | ... | ... | ... | ... | ... |
| 31/12/2010 23:50 | 1625.00 | 1013.30 | 420.61 | ... | 919.74 |
- PEV Charging Demand Using Level 1 Charging (PEV_L1.csv)
| Time | H001.V001 | H002.V002 | H002.V003 | ... | H200.V348 |
|---|---|---|---|---|---|
| 1/1/2010 0:00 | 0 | 0 | 0 | ... | 0 |
| ... | ... | ... | ... | ... | ... |
| 26/4/2010 18:20 | 0 | 1920 | 1920 | ... | 0 |
| 26/4/2010 18:30 | 0 | 1920 | 0 | ... | 0 |
| 26/4/2010 18:40 | 1920 | 1920 | 0 | ... | 0 |
| ... | ... | ... | ... | ... | ... |
| 31/12/2010 23:50 | 0 | 0 | 0 | ... | 0 |
- PEV Charging Demand Using Level 2 Charging (PEV_L2.csv)
| Time | H001.V001 | H002.V002 | H002.V003 | ... | H200.V348 |
|---|---|---|---|---|---|
| 1/1/2010 0:00 | 0 | 0 | 0 | ... | 0 |
| ... | ... | ... | ... | ... | ... |
| 26/4/2010 18:20 | 0 | 6600 | 0 | ... | 0 |
| 26/4/2010 18:30 | 0 | 6600 | 0 | ... | 0 |
| 26/4/2010 18:40 | 6600 | 0 | 0 | ... | 0 |
| ... | ... | ... | ... | ... | ... |
| 31/12/2010 23:50 | 0 | 0 | 0 | ... | 0 |
- PEV column names: Each label corresponds to a unique household-vehicle combination. For example,
H001.V001represents Vehicle 1 (V001) associated with Household 1 (H001). This pattern follows for all 348 vehicles. - PEV charging: A value of zero means the vehicle is not charging at that time, while any non-zero value (1920 for Level 1 or 6600 for Level 2) indicates the charging power in watts.
- Charging types: Level 1 charging uses a standard 120V household power outlet and consumes 1920 W, making it the slowest and cheapest option. Level 2 charging uses a 240V power outlet and consumes 6600 W. It is faster than Level 1 but more expensive and requires special equipment to connect to the 240V outlet.
Chapter 2 Plots.R: a first look at the dataset.Chapter 4 Plots.R: thorough investigation of the dataset.Chapter 5 Plots.R: TimeZones structure exploraton.Chapter 6 Plots.R: load shifting results study.TimeZones.R: creates the new TimeZones structure.LoadShifting.R: applies the load shifting strategy to the TimeZones structure.L1-L2.R: returns a LoadShifting or TimeZones structure back to the PEV_L1 and PEV_L2 structures.

