Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Energy Forecaster

Notebook by Ali Radwan

Submitted to Ana Matran-Fernandez

School of Computer Science and Electronic Engineering, University of Essex.

It is recommended to view this notebook in nbviewer for the best viewing experience.

Table of Content

About

This README covers project description, all assumptions used, directory structure, how to run the project, and all the references used.

Project description

Energy forecaster is a Python based ML project that predicts energy generation for at least 24 hours. The aim of this project is to provide reliable predictions to help an energy provider to take decisions accordingly - providing free energy in case of surplus generation.

According to the provided data [11], this energy company has 4 power plants in 2 cities in the UK. In Colchester, theres a solar and a wind power plants and likewise in Brighton.

This problem is counted as a time series problem, which means time is an essential element in predicting energy. This project tested a lot of models including CNNs and LSTMs with different combinations and picked the best to ensure the highest possible accuracy.

Assumptions

Since there were a lot of data missing, the following assumptions had to be made up to get a proof of concept running. All these assumptions applies for both cities unless otherwise is mentioned.

  1. Wind power plant

In regards to wind turbines, 1MW wind turbines of rotor diameter 60 m [3] will be installed. Wind turbines need to be around 5 times the rotor diameter apart so that they don’t affect each other with turbulence [2]. Hence, the turbines will be spread upon a distance of 3 km. Each wind mill has 3 blades, 35 m long each [4]. The output power (in Watts) of the a turbine will be calculated using the following formula, P = 0.5 * Cp * ρ * π * R^2 * V^3 [5]. Where Cp is the coefficient of performance (efficiency factor, in percent), ρ is air density (kg/m3), R is the blade length (in meters) and V is the wind speed(m/s) [5]. The energy (Wh) generated by each turbine is P * 1, where 1 is the number of operating hours.

variables values
Cp 30%
ρ 1.293 kg/m3 [7]
R 35 m

Note that the wind speed is the predicted variable by the forecaster. The above formula computes the power of a given turbine. Since each turbine is operating for one hour with a certain wind speed by multiplying the power by 1 gives us energy generated per hour.

2. Solar power plant

The 2 MW solar farm consists of 2667 (750 W) [9] solar panels, 4 square metres each. Covering a total distance of 4 * 8k = 10668 square metres = 2.6 acre. In fact, this solar farm is expected to have an annual energy output of 2873.4 MWh [8]. In terms of energy production, the following formula is used to determine the output energy of the farm, E = A * r * H * PR. Where A total solar panel area (m2), r solar panel yield or efficiency(%), H Annual average solar radiation on tilted panels PR Performance ratio, coefficient for losses [10].

variables values
A 10668 m2
r 24.16 % [9]
PR 0.75 [10]

Note that the solar radiation is the predicted variable by the forecaster. The above formula calculated the annual energy of the farm. Therefore, the energy generated per hour will be the total_annual_energy/8760.

3. Household energy consumption

A typical household in England consumes 2,700 kWh of electricity per year[1]. That means 225 kWh per month and 8 kWh per day.

4. Audience

In order to make things easy whilst presenting, I will assume that the CEO has a very small technical background and they're familiar with terms like LSTMs, Time Series, etc.

5. Neighbourhood

This project assumes that solar power plants and wind power plants serve different neighbourhoods depending on the size of the power plant. With that being said, solar farms serves a neighbourhood called Solar Neighbourhood which consists of 20 households in both Colchester and Brighton. The solar farm should produce more energy - as stated in [8] - than the actual numbers. Therefore, we limited the neighbourhood to 20 households so it can be realist whilst prototyping. However, wind power plants serve a neighbourhood known as Wind Neighbourhood which consists of 200 households in both Colchester and Brighton. The assumptions matched the given data which allowed us to increase the number of households and showcase more test cases.

6. Energy Forecasting

The models were build and trained to predict solar radiation and wind speed for 24 hours at one go - this means the network uses the previous 24 hours to predict the next day. Therefore, in order to prototype the work I predicted only one day after the last day of my testing dataset - as this the only data available - and applied the decision making on this forecasted values to check for free slots. Dates are different from dataset to another.

7. Avoid False Positives

False positives are avoided by applying safety factor to the household consumptions. For instance, in Solar Neighbourhood there are 20 households each consumes 0.00031 MWh/hour, which means total_consumption = 20 * 0.00031 = 0.0062 MWh/hour for all houses. This value is then multiplied by a safety factor of 1.5 to be 0.0093 MWh/hour for all households. Then the surplus is calculated if there is any. This way False positives are avoided. Also, during weekends if the consumption increases the safety factor will cover it which will avoid the company from losing money. During a free slot clients will have to be limited to a certain amount of free MWh/slot to avoid consuming all energy and leaving the others with nothing. Having this safety factor will allow us to increase the limit_per_household on demand if the monitoring team realise there's more surplus left.

Directory Structure

  1. Datasets

All datasets are located inside ./Data directory. ./Data/Colchester and ./Data/Brighton contains all raw datasets. However, as required from the last submission, ./Data now contains all datasets (train, val, test) for all areas and energy types that is being used for training and prototyping the models.

  1. DataPreprocessing

./DataPreprocessing.ipnyb file is the only notebook for data preprocessing. There lives the code behind cleaning exploring and creating datasets for training, validating and testing the models.

  1. Energy Forecaster

./EnergyForecaster.ipnyb file is the only notebook for modeling and prototyping. All the models used were trained and prototypes in this notebook. Functions were used to avoid duplicating code as much as possible.

How to Run the Project

Run it via jupyter notebook

  1. Run jupyter notebook by running the following command in your terminal where this project is saved

jupyter notebook

  1. Open DataPreprocessing.ipnyb

Run it via VS code

If you have visual studio code just open DataPreprocessing.ipnyb and select your environment to be Python3 and start running the notebook

Make sure to run this notebook first to generate the prepared datasets that will be used in the next notebook.

  1. Open EnergyForecaster.ipnyb

Run it via VS code

If you have visual studio code just open EnergyForecaster.ipnyb and select your environment to be Python3 and start running the notebook

References

  1. https://www.ofgem.gov.uk/information-consumers/energy-advice-households/average-gas-and-electricity-use-explained#:~:text=Individual%20appliances%20can%20vary.,of%20gas%20in%20a%20year.

  2. https://renewablesfirst.co.uk/renewable-energy-technologies/windpower/community-windpower/location-size-no-of-wind-turbines/#:~:text=The%20number%20of%20wind%20turbines,turbine%20it%20is%20410%20metres.

  3. https://products.mywindpowersystem.com/shop/500kw-3mw/winwind-wwd-1-1mw-wind-turbine-class/#:~:text=1MW%20Industrial%20Wind%20Turbine&text=and%2For%20environmentally%20size%2Dlimited,at%20lower%20wind%20speed%20sites.

  4. https://todayshomeowner.com/eco-friendly/guides/wind-turbine-blades-size/

  5. https://thundersaidenergy.com/downloads/wind-power-impacts-of-larger-turbines/#:~:text=The%20best%20overall%20formula%20for,Location%20matters%20most.

  6. https://www.e-education.psu.edu/emsc297/node/649#:~:text=For%20a%20wind%20turbine%2C%20the,yr%20(or%20832.2%20MWh).

  7. https://www.earthdata.nasa.gov/topics/atmosphere/atmospheric-pressure/air-mass-density#:~:text=Pure%2C%20dry%20air%20has%20a,a%20pressure%20of%20101.325%20kPa.

  8. https://pdf.usaid.gov/pdf_docs/PA00X4P9.pdf

  9. https://www.cleanenergyreviews.info/blog/most-powerful-solar-panels

  10. https://www.sunbasedata.com/how-to-calculate-solar-panel-output

  11. https://www.visualcrossing.com/resources/documentation/weather-data/weather-data-documentation/

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages