Professional Documents
Culture Documents
On
DEVANSH DHRAFANI
2017B5A41569H
HYDERABAD CAMPUS
(NOVEMBER 2020)
1
ACKNOWLEDGMENTS
I take this opportunity to express my gratitude and thanks to everyone associated with this
project. I am grateful to them for their views and constructive criticism. I thank my
instructor, Dr. Harihara Venkataraman for providing constant motivation, guidance, and
freedom to explore the topics that interest me. I would also like to thank my colleague
Gautam Sibansh Mishra, who worked closely with me on the project. Finally, I thank
everyone associated with the institution for giving me this wonderful opportunity of working
on this project.
2
Birla Institute of Technology and Science-Pilani,
Hyderabad Campus
Certificate
This is to certify that the project report entitled “Artificial Neural Network model for
Solar Electricity Generation Forecasting” submitted by Mr. DEVANSH DHRAFANI (ID No.
2017B5A41569H) in partial fulfillment of the requirements of the course PHY F266, Study Project
Course, embodies the work done by him/her under my supervision and guidance.
3
ABSTRACT
The recent shift to variable energy generation like wind and solar energy resources has become
a source of uncertainty in the power grid. Accurate prediction of Solar Energy generated can
mitigate some of the challenges of using variable energy sources and lead to better adoption of
renewable sources. While this problem is receiving attention from the research community,
current solutions rely on time-series forecasting taking no account of the weather conditions
that Solar Panels are operating at. This project aims to create an ANN solution for Solar
Electricity Generation forecasting which solely relies on weather parameters as inputs.
4
CONTENTS
Title page………………………………………………………..….…….1
Acknowledgments…………………………………………….……...…..2
Certificate………………………………………………………...……....3
Abstract……………………………………………………….……..…....4
Objectives……..………………………………………….……....……....6
Literature Review…………………………………………….……....…...7
Overview of ANNs……………………………………………....….…….9
Data Preprocessing……………..……………………………...…….…...10
Proposed ML Models………………………………………….…….…...13
Scatter Matrices…………………………………………………………..14
Performance Metrics…………………………………………………….. 15
References…………………………………………………………...……18
5
Objectives
6
Literature Review
As Neural Networks are a vast field with many existing models and new models
constantly being developed, it was necessary to carry out a thorough Literature
Review to get a better understanding of the current methods being employed for
Solar Electricity Generation Forecasting problems.
Machine learning for solar ● Humidity ● Hidden Markov ● The target parameter
irradiance forecasting of ● Temperature Model is solar irradiance
photovoltaic system. [4] ● Wind Speed ● Support Vector ● It's a time-series
Machine (SVM) forecasting problem
(3 hour time horizon)
7
Key Takeaways from Literature Review
8
Overview of ANNs
If (x1,x2,...,xn) are the input variables and y is the associated output variable,
ANNs model a function f(x1,x2,...,xn) = y_pred such that the error y-y_pred is
minimized. This is done by repeatedly feeding a training dataset to the model. At
the end of each pass of inputs, a loss/error is calculated at the output node. Then
using a method called backpropogation, the program derivates the Loss function
with respect to the input variables, thus getting a difference between the weights
responsible for the error. The difference is subtracted from the original weights at
each node. The above process is carried out multiple times till the model gives
minimum loss and maximum accuracy for the training set.
9
Data Preprocessing
The dataset [5],[6] consists of 6 year data of daily solar electricity generation.
Here are the variables that the dataset records:
1. Date
2. Temperature (degC)
3. Cloud Cover
4. Wind Speed (km/hr)
5. Humidity (percent)
6. Pressure (mBar)
7. Daily Solar Power (kW)
If we plot Power Generated on a time-scale, we can see that the peak power is
almost consistently generated during mid-year May-July. This is probably
because in Antwerp, Belgium, the days are longest in May-July during summer
time with low cloud cover.
As we are not considering the time data for our study, the weather conditions will
have to compensate for this. For the weather data, we had hourly forecasts. But as
our solar generation parameter was a daily cumulative reading, we needed to take
the daily average of the weather data.
10
Looking at the “weather status” parameter, we found that Cloud Cover is given in
text form with many different variations:
To sort this, we took common phrases and simplified them to 6 main text outputs:
11
This histogram shows the data distributions of various parameters:
The “Sci-Kit Learn” library was used for data preprocessing. For the cloud cover
data, a one-hot encoder was used. This allowed to convert text based values to
machine-readable numeric values. Missing values were filled with Median
Imputation. And a MinMax scalar was used to normalize the data in a range of
0-1.
12
Proposed Machine Learning Models
There are several Machine Learning models that could be used for forecasting
purposes. From the literature review, we came to the conclusion that Multilayer
Perceptron(MLP) and Support Vector Regression(SVR) work best for Solar
Electricity Generation forecasting with weather parameters.
MLP is a Feed forward-only neural network architecture, which means that the
input data flows only in the forward direction (input → hidden layer → output).
Other than that, it has the same characteristics as all Artificial Neural Networks.
Each layer has a set number of nodes with different input and output weights.
The weights are determined by backpropagation to minimize loss function. The
model uses backpropogation to minimize the Loss function, which is Mean
Square Error (MSE) for our case.
14
Performance Metrics
1. Root Mean Square Error: As the name suggests, this is the Square root of
the mean squared error for all predicted values. Lower value is better. The
formula for the same is given below.
15
Model Evaluation and Results
With the data preprocessed and the performance metrics identified, all that was
left was to train and test the models. Again, the Sci-Kit Learn library was used for
model training/testing. The entire dataset was split into training and testing data.
All 3 models could access the training input and output parameters. But while
testing, they were only supplied with the testing input data. The testing output
data was then compared with actual outputs, and the performance metrics were
noted.
From the above metrics, it's clear that MLP gives the best performance for our
problem. But it is to be noted that the margin by which MLP wins is not that
high. As the other models were approximating to a linear solution and gave
similar results, it may be concluded that MLP had similar performance because it
was also doing the same. Thus, this suggests that the relationship between
weather parameters and daily solar power production may be linear in nature.
This conclusion may not hold for all ranges/parameters. A bigger dataset might
give better insights about the same. Lastly, it should be noted that while MLP’s
performance was better, it took significantly longer to train the MLP as compared
to Linear R and SVR. So for a small dataset, it may be wise to stick to a linear
approximation for solar-power production.
16
Conclusion and Future Work
17
References
[1] Voyant, C., Notton, G., Kalogirou, S., Nivet, M. L., Paoli, C., Motte, F., &
Fouilloy, A. (2017). Machine learning methods for solar radiation forecasting: A
review. Renewable Energy, 105, 569-582.
[2] Abuella, M., & Chowdhury, B. (2015, October). Solar power forecasting
using artificial neural networks. In 2015 North American Power Symposium
(NAPS) (pp. 1-5). IEEE.
[3] Sharma, N., Sharma, P., Irwin, D., & Shenoy, P. (2011, October). Predicting
solar generation from weather forecasts using machine learning. In 2011 IEEE
international conference on smart grid communications (SmartGridComm) (pp.
528-533). IEEE.
[4] Li, J., Ward, J. K., Tong, J., Collins, L., & Platt, G. (2016). Machine learning
for solar irradiance forecasting of photovoltaic system. Renewable energy, 90,
542-553.
[5] Frank. (2018, 09 02). Daily Power Production of Solar Panels. Kaggle.
https://www.kaggle.com/fvcoppen/solarpanelspower
18