# The Photovoltaic Pv Solar Energy Generating System Engineering Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

The demand for solar radiation forecasting has become a significant feature in the design of photovoltaic (PV) systems. Currently, the artificial neural network (ANN) is the most popular model that is used to estimate solar radiation. However, a new approach, called the extreme learning machine (ELM) algorithm, has been introduced by Huang et al. In this research, ELM and a multilayer feed-forward network with back propagation were used to predict daily global solar radiation. Metrological parameters such as air temperature, humidity and date code have been used as inputs for the ANN and ELM models. The accuracy and performance of these techniques were evaluated by comparing their outputs. ELM is faster than ANN, and results in a high generalization capability.

## Chapter 1: Introduction

Demand for electricity is reasonably high, and it predicted to increase rapidly into the future. Consequently, the usage of non-renewable energy such as fossil fuels will likely increase as well. While a boon to industries that produce energy, heavy use of traditional fuel sources has raised concerns about environmental pollution, prompting a search for clean, renewable energy sources by governments and researchers around the world. Such energy sources include wind, biomass, solar, and marine energy and hydro. Our research here will focus on solar energy [1].

The photovoltaic (PV) solar energy generating system, whether grid-connected or stand-alone, is most commonly used in suburban and rural areas. It is based on converting solar radiation (i.e., photons that are sent from the sun) to produce electricity. The PV system has a wide range of applications. For example, in developing countries, PV is used for basic life needs, such as heating and cooking, while in developed countries, the system is used to supply electricity for homes and the grid [2].

Solar power systems are affected by different parameters such as solar radiation which is the most essential, and solar radiation data is the most significant factor impacting the design and production of solar energy. In fact, the output voltage of a PV panel is strongly affected by the degree of solar radiation. The two most common ways to collect solar radiation data are through a meteorological station and through satellites [3].

Due in part to its importance in the solar energy field, global solar radiation data (GSR) forecasting has become more popular in order to facilitate solar system installation. Air temperature and humidity data are the most commonly used parameters to predict solar radiation and two techniques used in this research are artificial neural network (ANN) and extreme learning machine (ELM).

An artificial neural network consists of intelligent neurons that work similar to a human brain. ANN maps the relationships between input(s) and output(s) (i.e., the target) and deals with linear or nonlinear mathematical operations between and among them. To find the input/output relationships, neural networks apply various methods such as multilayer perceptron (MPL) and radial basis function (RBF). In this thesis a multilayer feed-forward neural network with back propagation is used.

On the other hand, an extreme learning machine (ELM) is based on single, hidden-layer feed-forward neural networks (SLFNs), as proposed by Huang et al [4]. The input weights and hidden biases are randomly assigned, and the output weights are analytically calculated. In other words, an ELM learning algorithm is faster than back propagation and is also reported to yield high quality generalization performance.

Both algorithms (ANN and ELM) are used to predict the global solar radiation of the city of Riyadh, the capital of Saudi Arabia. A comparison between the results of the two methods is then provided. ANN & ELM were created in a MATLAB (R2011a) environment, version 7.12, and Minitab software was utilized to find the correlation coefficient.

## Research Motivation

Saudi Arabia has an abundance of natural solar radiation through long hours of sunshine. Accordingly, using solar energy system as a clean renewable energy source is considered a practical solution. The motivation for this research is to study global solar radiation using the new algorithm called extreme learning machine, and to compare its performance with that of a well-known algorithm, the artificial neural network.

## Research Objectives

The main objective of this research is to predict solar radiation in Saudi Arabia by using two models and determining which one is more accurate. Although Saudi Arabia has high levels of solar radiation, the radiation is affected by various factors. By using these factors as input and solar radiation as output, an artificial neural network has been applied to estimate solar radiation in Saudi Arabia.

## Research Outlines

Five chapters are presented in this thesis. Chapter 1 contains this introduction about renewable energy sources and the techniques used in this research. Chapter 2 consists of four sections. The first section provides an introduction to solar radiation; the second section overviews the topic of renewable energy in Saudi Arabia; the third section presents a literature review of solar radiation forecasting; and the final section describes how the Photovoltaic (PV) system utilizes solar radiation. Chapter 3 provides a detailed description and analysis of the two models that are applied in this research: the artificial neural network model and the extreme learning machine model. Chapter 4 discusses the results obtained from using these models, and Chapter 5 presents the conclusions of this research and offers suggestions for future work.

## Chapter 2: Solar Radiation and Photovoltaic

## Solar Radiation

Solar radiation, which is the intensity of the sun spectrum at any given location, is the main parameter used in designing a solar power system. Solar radiation is measured in watts per square meter (W/m2) units and consists of photons that penetrate a photovoltaic (PV) array and cause electron excitation. Photon energy can be expressed as [2]:

E= (2-1)

E: is the photon energy

h: is the Planck's constant

c: the velocity of light

: is the wavelength

There are three types of solar radiation that penetrate the PV panel: direct, diffuse, and albedo. The direct (beam) radiation is the amount of radiation that comes from the sun in a straight line. It is considered the best measurement of radiation when there is no atmosphere condition influence, such as clouds. On the other hand, diffuse radiation is scattered by molecules and clouds. This radiation is more effective than direct in atmosphere generation. Albedo is the reflected sun beaming from the ground or objects. The total of direct, albedo and diffuse radiation is called global radiation, as shown in Figure 2.1 [5].

In solar radiation forecasting, two procedures are used to estimate solar radiation: conventional forecasting and neural networks. The former procedure depends on methods applied during the past decade, such as time-series Autoregressive moving Average (ARMA), while the latter uses artificial neural networks, such as feed-forward network and radial basis functions [6].

Figure â€Ž2. Global Solar Radiation Components [7]â€Ž

## Kingdom of Saudi Arabia

As the Middle East's largest and most populous nation, Saudi Arabia boasts a total area of 2,149,690 square kilometers and a population of nearly 27 million [8]. It is also one the world's largest oil producers, claiming nearly one-fifth of all known global oil reserves [9]. However, due to its hot and sunny geographical location (between latitudes 17 N and 32 N) [10], Saudi Arabia also has enormous potential to generate energy by capitalizing on renewable resources such as wind and solar energy [11].

## Solar Radiation in Saudi Arabia

Saudi Arabia receives enormous amounts of radiation of approximately 12,425 terra- watt-hour (TWh), or around 5500 W/ per year [12]. The country currently has 12 locations for measuring solar radiation data, with each location providing hourly measurements of air temperature, relative humidity, global horizon radiation (GHI), direct normal radiation (DNI) and diffuse horizontal radiation (DHI). All data are collected and sent to the solar village in Riyadh. Figure 2.2 shows the locations where the solar data are measured [13].

Figure â€Ž2. Solar Villages Locations in Saudi Arabia [14]

## Literature Review

Wang et al. (2011) [15] used an artificial neural network and time series analysis for short-term solar irradiation forecasting. Diffused radiation, temperature, relative humidity and time were used as inputs in the neural network model, and double hidden layers were applied with two transfer functions, tang-sigmoid and log-sigmoid. The results showed accurate estimation of solar irradiation. Specifically, the coefficient determination of the model was 99.12% and the root mean square was 0.0331.

Mubiru et al. (2007) [16] studied an artificial neural network to predict the monthly average daily global solar radiation in Uganda. Back propagation (BP) was used, with 15 neurons and one hidden layer. The input parameters were sunshine hours, cloud cover, maximum temperature, longitude, latitude and altitude, with results showing a root mean square error of 38.5%.

Dorovlo et al. (2002) [17] created two models based on Radial Basis Function (RBF) and Multilayer Perceptron (MLP) to predict solar radiation in Oman. The data were gathered from eight locations to forecast the clearness index and solar radiation. The authors concluded that RBF was better than MLP, based on the factor of time savings.

Mellti et al. (2010) [18] investigated Multilayer Perceptron (MLP) in artificial neural networks to predict 24-hour solar irradiance in Italy. The inputs were based on the mean daily irradiance and the mean daily air temperature. The article showed that the best model was obtained with one input and two hidden layers. The correlation coefficient for a sunny day was between 98% and 99%; but for a cloudy day, it was between 94% and 95%.

Mellit et al. (2005) [19] estimated the daily solar radiation by using Radial Basis Function network. The proposed model used air temperature and sunshine duration as inputs to predict daily solar radiation. The drawback was that the method was time-consuming, as the model was created for limited data. The authors suggested using a fast algorithm, such as back propagation, to overcome this issue.

Angela et al. (2011) [20] carried out forecasting for the monthly average of daily global solar radiation by using an artificial neural network for application to Kampala data. The tangent sigmoid transfer function was used with one hidden layer and 65 neurons. The root mean square value of the error was 0.521 MJ/ and the correlation coefficient (R) was 0.965. The article concluded that the model was valid but accuracy was high because the input to the neural network involved sunshine hours only.

Deng et al. (2010) [21] used a feed-forward neural network with back-propagation to predict the daily global solar radiation in China. The proposed model had three hidden layers and the Levenberg-Marquardt algorithm was employed. The input to the neural network was meteorological data and geographical parameters. The authors found that the sunshine duration, geo-parameters, and day of the year were the most significant inputs to this model. The best result obtained was 1.915 MJ/m2 root mean square error and 0.932 correlation of determination ().

Rehman et al. (2007) [22] divided the data into two sections: training data from 1998 to 2001 and testing data from 2001 to 2002. The inputs to the neural network were air temperature and relative humidity, and the output was global solar radiation. Based on the number of inputs, three models were proposed in the work. The first model used the day of the year and the daily maximum air temperature as inputs to the neural network. The second model used day of the year and daily mean air temperature, and the last model used day of the year, daily mean air temperature, and relative humidity as inputs. The mean absolute percentage errors for the three models were 10.3%, 11.8% and 4.49, respectively. The article concluded that the third model had the best relative performance.

Ghanbrazadeh et al. (2009) [23] used combinations of meteorological parameters as inputs to the neural network to predict solar radiation. The authors discovered that the best performance occurred when the sunshine hours, the average of daily temperature, and humidity were used as inputs to the neural network. The model obtained 0.00405433 for the root mean square error and 8.84% for the absolute mean percentage of error.

Rani et al. (2012) [24] found that the model was more accurate when the temperature, humidity, month and day were the inputs to the neural network. The data were divided onto two subsets: the training set and the testing set. The root mean square error (RMSE) and mean absolute percentage error (MAPE) for the model were 0.9429 and 9.1754%, respectively. The model was less accurate when the date and the month were used as inputs.

## Solar Powered Systems

The idea of a PV module is to convert sunlight into electricity. In general, one cell in a PV array gives 0.5 voltages. There are two types of solar powered systems: grid-connected PV and stand-alone PV [2].

## Grid-Connected Photovoltaic (GPV) System

Figure 2.3 illustrates the structure of a grid-connected PV system. The most essential part in this model is the inverter used to convert the PV's direct current to alternating current. In this system, the grid and PV system work in parallel. In other words, the load demand is supplied from the solar system during the day, while the grid supplies the load demand at night [2].

Figure â€Ž2. Grid-Connected Photovoltaic System [25]

## Stand-alone PV Model

The stand-alone PV model is popular in rural areas, and consists of PV cells, a battery and inverters. The drawback of this system is that it is unable to supply load demand during night time. The solution is to develop a system that combines the desired features of the stand-alone and hybrid systems, such as diesel generation or wind. Figure 2.4 shows the composition of the stand-alone model [2, 5].

Figure â€Ž2. Stand-Alone Structure [26]

## PV Elements

All PV models consist of components that are used to supply electricity to the load or the grid.

## Inverter

The inverter converts the direct current (DC) that comes from PV array to an alternative current (AC). The power transmission (AC) between the PV model and the grid should have the same voltage, phase and frequency [2].

## Charge Controller

The main objective of the charge controller is to determine the current from the PV array to avoid overcharging between the PV models and battery, and discharging between the battery and the load [2].

## Battery

A battery is used in a stand-alone system to store the voltage that is supplied from the PV array. It works during the day especially at night when the PV model is off [2].

## Digital Meter

The main idea of a digital meter is to show the amount of electricity that is transferred to the load and grid. It also protects the load peak of the network by measuring the performance of the inverter [2].

## Chapter 3: Solution Methods

## Artificial Neural Network (ANN)

## Introduction

A neural network (NN) is a program that is designed to imitate the human brain. The brain consists of many neurons which are connected by axons, synapses and dendrites. The neurons are composed of neurons that are linked by weights and biases. The function of a neural network is to map the relationship between the input(s) and the output(s). In this study, the solar radiation in Saudi Arabia (Riyadh) has been predicted by using an artificial neural network (ANN) [27].

## Neural Network Procedure

Neural networks can be used for different functions, such as curve fitting, prediction and regression [27]. In this thesis, neural networks are used to design forecasting models using four steps that must be achieved:

Collecting the data

Initiating the network

Training the data

Simulating the data

The design of any neural network model requires information about the system that will be used. In our case here, information on radiation, temperature, and humidity in Riyadh, Saudi Arabia, is gathered from the King Abdulaziz City of Science and Technology to be used in the forecasting model.

After collecting the data, they are entered into the initiation stage where data are divided and processed. In the division stage, data are divided into three sets: training set, validation set, and testing set. The data are then normalized to be in a range between 1 and -1, after which the data are ready for the training process and are simulated to obtain the prediction results [27].

The normalization of the data is executed using the following [27]:

= (3-1)

= the normalized data.

= the input data before normalized.

= the maximum value of the input/output vector.

= the minimum value of the input/output vector.

## Neural Network Structure

The core unit of an artificial neural network (ANN) is neurons which use a transfer function to create output. Each input (p) is multiplied by a weight (w), which serves as a connection between an input and a neuron as well as between the various layers of neurons. In the next stage, the weight inputs are combined, after which a bias (b) is added to the sum of the weight inputs. The neuron applies a transfer function () to this result, from which the output (a) is obtained. Figure 3.1 illustrates a basic ANN [28].

Figure â€Ž3. Simple Artificial Neural Network [27]

The output of each neuron can now be expressed as [27]:

a = () (3-2)

Where: is the activity function.

During the training stage the weight(s) and the bias(s) are updated with respect to the following equations [27]:

(3-3)

(3-4)

W= the weight

b= the bias vector

= the learning rate

e= the error vector

In other words, the evolution of the weights is driven by the error. Table 3.1 shows four types of transfer function that have been used in this work. The purlin transfer function is used at the output layer in the neural network, while the other three transfer functions, i.e tansig, logsig, and tribas are used in different models between the input and hidden layers [27].

Table â€Ž3. Transfer Function

y = purelin(n) = n

There are many types of artificial neural networks. Examples include feed-forward neural network, radial basis function (RBF) networks, recurrent networks, Hoplfield networks, Kohonen self-organizing networks, the Echo state networks, Boltzmann machine, the long short term memory networks, associative neural network (ASNN) and neuro-fuzzy networks. In this study, the feed forward neural network is used with back propagation [29].

Figure 3.2 shows a single-layer network. R represents the number of elements in the input vector, S is the number of neuron in layer, and a is the output vector.

Figure â€Ž3. Single- layer Artificial Neural Network [27]

The relation between the input and the output can be expressed [27]:

(3-5)

Where

a = the output vector.

x = the input vector.

w = the matrix containing the neuron weight.

## Multi-layers Feed Forward Neural Network (MFFNNBP)

Feed forward neural networks have different layers. In this study, a three-layer feed-forward neural network is applied, as shown in Figure 3.3. The input layer consists of n elements. The hidden layers, which are considered the second layer, contain a nonlinear transfer function such as tan-sigmoid, log-sigmoid, or tribas. The output layer has a linear transfer function.

Back propagation (BP) is considered to be the most popular learning approach for training the multi-layer feed-forward neural network. The BP algorithm is used to reduce the error of the network by adjusting the weight and the bias. The BP algorithm uses a gradient-decent method to minimize the error function between the desire output and network output. The weights are moved in the negative direction of the gradient until only an acceptable small error is achieved [27].

Figure â€Ž3. Three layer Feed forward Neural Network

## Training Techniques

The neural networks use training techniques to find the relationship between the input and the output of any model. Once the data are introduced to the network, the neural networks generate weights and biases values for the first iteration (epoch). The weights are multiplied by the input and the biases are added to the neurons. After that, the data are trained to find the best linear fit. If the relationship between the input and output data cannot be achieved from the first iteration, the data will update the weights and biases and then train the data for the second iteration. This procedure is repeated until the iteration is gained or the model has a good fit [27].

## Bayesian Framework Algorithm (trainbr)

This algorithm is used to automatically calculate the optimal regularization parameters. The best performance of this technique happens when the data are normalized. This command is implemented in the MATLAB as a trainbr.

## BFGS Quasi-Newton Algorithm (trainbfg)

The BFGS-Quasi-Newton algorithm applies Newton's method to approximate the Hessian matrix. In MATLAB, the algorithm is listed as a trainbfg [27].

## Over-Fitting Problem

During data training, a smaller error between the input and the output is achieved. The error can be very large or very small when new data is entered into the network, causing high system error. This situation is called over-fitting. There are different methods to use to avoid over-fitting. These include using early stopping and automated regularization, and modifying the performance function (mean square error) . The first method divides the data into three sets: the training set, the validation set, and the test set. This method is based on observing the error between the training set and the validation set. At the start of the training process, the data, the error of training set and validation are declined. Then, when new data is introduced to the neural, the error of the training set gradually increases and is higher than the validation set error. As a result, the network will be over-fitted and the training will be stopped to prevent over-fitting. The purpose of using the test set is to compare different learning algorithms and thus it is not used in this process [27].

Another way to avoid over-fitting is by using automated regularization. The basic idea of the Bayesian framework procedure is to create random values to add them to weights and biases. In this way, Bayesian regularization provides a variance that is distributed between random values. It is implemented in a MATLAB command called trainbr [27].

The mean square error can also be modified to avoid over-fitting issues. This approach relies on changing a certain factor to the mean square error that contains a sum square error of the weight and biases. The factor used, called msereg, improves the neural generalization by reducing the errors of the weights and the biases. This method can be expressed as [27]:

(3-6)

(3-7)

Where

= is the error between the target and the network output

= is the performance ratio

N = is the number of data samples.

## Error Management

Errors between the target and the neural network output can be decreased by utilizing a supervised learning. With the intention of validating the neural model, this work investigates the least mean square error (LME) method, which is based on reducing the mean square error and is used to adjust the weights and bias. The mean square error is a performance function used in data training. The MSE can be defined as [27]:

(3-8)

Where: is the error between the target and the neural network output . : is the number of the data samples.

As for gauging the prediction model performance, the root mean square error (RMSE) is implemented. The purpose of the RMSE is to explicate the model's fit and any mismatches between the actual data and forecasted data. The RMSE can be exemplified as [16]:

(3-9)

Where;

is the predicted value

: is the actual value

N: is the number of observation

The mean absolute percentage error (MAPE) is applied to calculate the average error between the actual measure and the prediction. The equation 3-10 of MAPE can be defined [24]:

MAPE = 100 (3-10)

Where

x(t) : is the actual value.

(t) : is the predicted value.

n : is the number of data samples.

## Performance of Neural Network Training

Regression analysis is a statistical method used to measure errors between training and validation sets. Regression analysis studies whether the variables used are dependent or independent with regards to system response. In this study, the evaluation of generalization performance is calculated by the correlation coefficient (R-value), a value that indicates the relationship between the network output response and the corresponding target in a linear fit line. If the value is closer to one, the correlation between the target and the output is strong [27].

## Extreme Learning Machine

The Extreme Learning Machine (ELM) is based on single hidden layer feed-forward network (SLFN), Figure 3.4. Huang et al was the first to introduce the extreme learning machine algorithm. It is a new approach for feed forward networks that has a remarkable speed for mapping the relationship between input(s) and output(s). ELM creates a hidden layer without needing iterative steps and also computes the output weights analytically. There are no iterations in ELM, which makes ELM faster than the back propagation technique. However, there are some drawbacks of the ELM. The first issue is the neurons in the hidden layer have to be computed by using a trial-and-error procedure. The hidden layer needs more neurons because ELM generates random values chosen for the weighting matrix [30, 31].

Figure â€Ž3. ELM Structure

## The ELM Algorithm

Suppose that we have training samples (xi, ti) where xi = [, xi2â€¦, Rc and = [,,â€¦., Rm. From these samples, an ELM model is trained with k hidden neurons and an activation function g(x). When ELM approximate training samples with zero error, we will obtain = 0. In other words, such that [32]:

= j=1, 2,â€¦â€¦.,N (3-11)

The is the input weight connected between input and hidden layers, is the bias of the hidden layer, andis the input sample. The equation (3-11) can be written as [32]:

(3-12)

Where

(3-13)

= (3-14)

(3-15)

H: is the hidden layer output

: is the output weight

T: is the target

(3-16)

: is the Moore-Penrose generalized (pseudo-inverse) inverse. The orthogonal project method is used to calculate the Moore-Penrose generalized inverse of the matrix [32].

The ELM design involves four steps:

Dividing the data onto three subsets (training set, testing set, predicting set).

Generating the weight values randomly (w).

Computing the hidden layer output matrix (H).

Computing the output weight ().

## Error Function

The error between the actual data and ELM output were measured to validate the proposed model. The root mean square error (RMSE-Equation 3-9) and the mean absolute percentage of error (MAPE-Equation 3-10) were used here to validate the ELM forecasting models.

## ELM Overview

ELM was developed by Huang et al to improve single-layer feed-forward networks (SLFNs). Generally, neural networks have three drawbacks: they are prone to human error, they encounter difficulties when changing calculations, and they are time-consuming. The ELM learning algorithm makes the process faster than in back propagation. In addition, the general performance of ELM is more accurate than ANN [4].

In terms of ELM forecasting, there was little in the literature (in IEEE or Science Direct database) regarding solar radiation forecasting using extreme learning machine algorithm. However, some research has been carried out using ELM for electricity prices and sales in fashion retailing forecasting [33, 34].

## Chapter 4: Results

This chapter shows the results obtained from artificial neural network (ANN) and the extreme learning machine (ELM). This section is divided into three parts. The first subsection concentrates on ANN results and models, the second part focuses on ELM results, and the final section presents comparisons between the results of the two forecasting methods.

## Artificial Neural Network (ANN) Results

Artificial neural networks are numerical structure that attempt to simulate the human brain by using scintillating neurons. Neural networks consist of layers and intelligent neurons. The aim of the neurons is to attain the relationship between inputs and targets by using mathematical equations. If the relationships between inputs and outputs have disorderly characteristics, the neural network can ascertain whether the relation is linear or nonlinear.

In this thesis, an artificial neural network is used to predict the global solar radiation of Riyadh in Saudi Arabia by using temperature, humidity and date code as inputs.

## Back Propagation (BP)

A multilayer feed-forward neural network with back propagation (MFFNNBP) is applied in this thesis to optimize the error derivative of nonlinear networks. The structure of the neural network that is used in BP consists of three layers: input layer, hidden layer, and output layer. Generally, the back propagation technique has two phases: forward pass and backward pass [35].

## BP Forward pass

In the Forward Pass phase, the inputs, during the training procedure, are multiplied by weights and then propagated to the neuron located in the hidden layer. The weights in each neuron are then added together, creating a nonlinear mathematical function from the sum of all of the neurons' inputs. Next, each neuron in the hidden layer is multiplied by weights and added together to propagate to the output layer. The output layer results in a nonlinear mathematical function that has been obtained from the weight sum [35].

## BP Backward pass

The Backward Pass phase starts throughout calculating the error between the desired output and the network output. Working from this calculation, the error is then propagated backward, with the intent of revising the weight matrix between the input and hidden layer as well as between the output and hidden layer [35].

## Neural Network Training Algorithm

In a multilayer feed-forward neural network with back propagation, various algorithms are used to train the data and reduce the system error by modifying the weights and biases between the input and output. In terms of algorithms, some are fast convergence and train the data according to Newton's method; however, this is somewhat complex due to the matrix calculation. Other techniques, such as steepest descent methods, are slow convergence but provide better generalization [27, 36].

In this thesis, three faster techniques were applied: the Levenberg-Marquardt (LM) algorithm, the BFGS-Quasi-Newton (BFG), and the Bayesian regularization (BR) [36].

## Levenberg Marquardt Algorithm (LM)

This algorithm uses Newton's method to calculate Jacobian matrices without computing the hessian matrices. Hence, this makes the LM algorithm have a faster convergence with minimal error.

The Levenberg-Marquardt algorithm can be expressed as [36]:

(4-1)

I = the identity matrix

= a positive combination coefficient

The weights are updated and can be defined:

= (4-2)

## BFGS Quasi-Newton Backpropagation

The main objective of BFGS is to compute the inverse of the Hessian matrix. Although computing the Hessian matrix is considered to be complicated and costly, BFGS offers relatively fast convergence. The algorithm can be found in MATLAB, listed as the trainbfg command [37].

## Bayesian Regularization Backpropagation (BRB)

This method provides performance that is considered a high generalization, which means it avoids over-fitting by reducing squared errors and modifying the weights. This algorithm can be found in MATLAB as the trainbr command [27].

## ANN Proposed Model

Figure 4.1 shows the proposed neural network models. The model created consists of three layers: input layer, hidden layer, and output layer. The data introduced to the input layer were temperature, humidity and date code. The output data was the global solar radiation (GSR) of Riyadh in SA. The data used in the model were collected from 2009 to 2011, while the solar radiation data were obtained from the King Abdulaziz City of Science & Technology (KACST).

Figure â€Ž4. Neural Network Proposed Model

## ANN Radiation 2011 Model

The daily global solar radiation (GSR) of 2011 was predicted using the ANN network, a model of which is shown in Figure 4.2. The inputs to the neural network were: average daily temperature from 2009 to 2011, average daily humidity from 2009 to 2011, and daily date code from 2009 to 2011. The data were divided into three sets: the training set (438 observations), the validation set (146 observations), and the testing set (146 observations). The triangle basis transfer function (tribas) was used between input layer and hidden layer and pure line transfer function (purelin) between hidden and output layer. The Bayesian regularization algorithm (trainbr) was used to train the data. The number of hidden neurons was chosen using trial-and-error procedure, and the best number was found to be 83.

Table 4.1 shows the training time that the neural network required to train given the data. The root mean square between the predicted data and the actual data was 6%. This error is considered to be low because of the high volatility of the input data. Table 4.1 also shows the mean absolute percentage error, error performance in the training set, and the correlation coefficient of the best line fit between the actual and predicted of GSR. Obviously, the proposed model has a low error and high correlation coefficient. These results validate the proposed model. Figures 4.3 & 4.4 show the error performance of the training model and the linear regression analysis, respectively. Finally the predicted data verses the actual data is shown in Figure 4.5.

Figure â€Ž4. Net Radiation 2011 Model

Table â€Ž4.: ANN Radiation 2011 Results

Training time (sec)

RMSE of training

RMSE of prediction

MAPE

R

Error performance

1628

0.066375

0.074740

2.5054

0.98624

6.4108

Figure â€Ž4. Error Performance Radiation 2011

Figure â€Ž4. Best Linear Fit Between Actual and Predicted Radiation 2011 (ANN)

Figure â€Ž4., Radiation Actual Vs. Prediction (ANN)

## ANN Temperature 2012 Model

The challenge in this model is to estimate the average daily temperature for the year 2012 by using only the daily date code from 2009 to 2012. Figure 4.6 shows that eighty (80) neurons were used in the hidden layer. Additionally, the triangle basis transfer function (tribas) was applied between the input layer and the hidden layer, and the pure line transfer function (purelin) was applied between the hidden layer and the output layer. Since some factors that affect the temperature were ignored, the model results were less accurate, as shown in Table 4.2. Hence, there are some fluctuations between the real temperature and the prediction, as shown in Figure 4.9. The training performance is shown in Figure 4.7, and the correlation coefficient is shown in Figure 4.8.

Figure â€Ž4. Net Temperature 2012 Model

Table â€Ž4. ANN Temperature 2012 Results

Training time (sec)

RMSE of training

RMSE of Prediction

MAPE

R

Error performance

721

0.164368

0.1614569

6.5906

0.94612

26.6261

Figure â€Ž4. Error Performance (Temperature 2012)

Figure â€Ž4. Best Linear Fit Between Actual and Predicted Temperature 2012 (ANN)

Figure â€Ž4. Actual Temperature Vs Prediction (ANN)

## ANN Humidity 2012 Model

The average daily humidity of Riyadh was also predicted using neural network. The daily date code was the input of the neural network model and the target was the humidity. As shown in Figure 4.10, the hidden layer used 60 neurons with a tan-sigmoid transfer function (tansig). Table 4.3 shows the training time as well as the errors in the training section and prediction that were measured by RMSE and MAPE. This model obtained a good fit (0.953), as shown in Figure 4.11. Figure 4.12 shows 0.029584 of the performance of the model, when the neural network was trained by trainbfg. Figure 4.13 shows the actual humidity verses the prediction.

Figure â€Ž4.: Net Humidity 2012 Model

Table â€Ž4.: ANN Humidity 2012 Results

Training time (sec)

RMSE of training

RMSE of prediction

MAPE

Error Performance

24

0.154270

0.126534

9.5169

0.95502

0.029584

Figure â€Ž4. Best Linear Fit Between the Actual and Predicted Humidity (ANN)

Figure â€Ž4. Error Performance Humidity 2012

Figure â€Ž4. Actual Humidity Vs. Prediction (ANN)

## ANN Radiation 2012 Model with Three Inputs

After predicting the average daily temperature 2012 and the average daily humidity 2012, the neural network used them with the previous data from 2009, 2010 and 2011 and the daily date code to forecast global solar radiation for 2012. The data has 876 training sets, 110 for validation sets and 109 for testing sets. The triangle basis transfer function was used in the hidden layer and the pure line in the output layer. The best number of neurons was found to be 80, as shown in Figure 4.14. Table 4.4 shows the results of the neural model. The Bayesian regularization algorithm (trainbr) was used to train the data. Figures 4.15 and 4.16 show the training performance and the correlation coefficient, respectively. As shown in Figure 4.17, the actual data are similar to the predicted data.

Figure â€Ž4. Net Radiation 2012 with Three Inputs

Table â€Ž4.: ANN Radiation 2012 with Three Input Results

Training time(sec)

RMSE of training

RMSE of prediction

MAPE

R

Error Performance

424

0.060740

0.077573

4.7735

0.96366

6.4026

Figure â€Ž4.:Error Performance Radiation 2012 with Three Input

Figure â€Ž4. Best Linear Fit between Actual and Predicted Radiation 2012 with Three Input (ANN)

Figure â€Ž4. Actual Radiation (with Three Input) Vs. Prediction (ANN)

## ANN Radiation 2012 Model with One Input

In order to show the effects of temperature and humidity in predicting solar radiation, a neural model using only the daily data code was used, as illustrated in Figure 4.18. The model is valid, but the accuracy is less than in the model that used three inputs. Table 4.5 shows the training time, the RMSE, and the MAPE of the model. The correlation coefficient and the performance error are illustrated as well. Figure 4.19 shows the performance error. Even though the value of the correlation coefficient is not high, the model provides a good estimate, as can be seen in Figure 4.20. The real radiation is not corresponding to predicted radiation, as shown in Figure 4.21.

Figure â€Ž4. Net Radiation 2012 Model with One Input

Table â€Ž4. ANN Radiation 2012 with One Input Results

Training time (sec)

RMSE of training

RMSE of prediction

MAPE

R

Error performance

605

0.195458

0.22157

9.3565

0.802

36.2869

Figure â€Ž4. Error Performance Radiation 2012 with One Input

Figure â€Ž4. Best linear fit between actual and predicted radiation with One Input (ANN)

Figure â€Ž4. Actual Radiation 2012 (with One Input) Vs. Prediction

## Extreme Learning Machine

An extreme learning machine (ELM) is a single hidden layer feed-forward network (SLFN). The weights between the input and hidden layers are randomly generated and the output weight mathematically calculated. Hence, the ELM algorithm converges faster than ANN, as shown in the ELM prediction model below [32].

The ELM algorithm can be exemplified as [32]:

H = T (4-3)

H is the hidden output layer matrix

= is the output weight

T= is the target

The can be computed as:

= T (4-4)

is the Moore-Penrose generalized inverse.

The method that used to calculate is the orthogonal projection which can be expressed as [32]:

= T (4-5)

= is the positive value that is added to the output matrix to provide a better solution and performance [32].

## ELM Proposed Model

Figure 4.22 shows the proposed models, five of which are shown here. A single hidden feed-forward layer is applied, with different transfer functions and different numbers of neurons.

Figure â€Ž4. ELM Proposed model

## ELM Radiation 2011 Model

Since we are using two different prediction models, the number of inputs was chosen to be the same to show the accuracy and the performance of each model. The inputs for the ELM program were the average daily temperature in 2009, 2010 and 2011, the average daily humidity in 2009, 2010 and 2011, and the daily date code of 2009, 2010 and 2011. The triangle basis (tribas) transfer function was chosen between the hidden and output layers. There were 610 observations for training the ELM model using the ELM_ train command, after which all of the data (1095) were used to predict the global solar radiation (GSR), and the trial-and-error method was used to determine the number of neurons.

The ELM algorithm needs a large number of neurons for coverage. Thus, in order to obtain a low error rate, the number of neurons was determined at 5,000. Table 4.6 shows the training time of the model, the root mean square error (RMSE), and the mean absolute percentage error (MAPE). It also shows the correlation coefficient (R) of the model. As shown in Figure 4.23, the value of correlation coefficient is 0.982, which is close to one. This indicates that there is a good fit between the predicted and actual data. Figure 4.24 shows the forecasting data versus the real data. As can be seen, the actual and predicted data are nearly identical.

Table â€Ž4. ELM Radiation 2011 Results

Training time (sec)

RMSE of training

RMSE of prediction

MAPE

R

84.3809

0.032025

0.079127

1.8233

0.982

Figure â€Ž4. Best Linear Fit Between Actual and Predicted Radiation 2012 (ELM)

Figure â€Ž4. Actual Radiation Vs Prediciton (ELM)

## ELM Temperature 2012 Model

The ELM model uses 1200 neurons to predict the average daily temperature 2012 by applying the daily date code from 2009 to 2012 as input. Logistic transfer function (log) is used between the input and hidden layers. Notice that the training time is very low compared to the training time for the ANN model. Table 4.7 shows the training time, RMSE, MAPE and R of the model, Figure 4.25 illustrates the linear regression between the variables, and Figure 4.26 shows the results between the actual and predicted data.

Table â€Ž4. ELM Temperature 2012 Results

Training time(sec)

RMSE of training

RMSE of prediction

MAPE

R

3.2292

0.05928

0.16304

6.1829

0.975

Figure â€Ž4. Best Linear Fit Between the Actual and Predicted Temperature (ELM)

Figure â€Ž4. Actual Temperature Vs Prediction (ELM)

## ELM Humidity 2012 Model

An ELM model has been developed to predict the average daily humidity of Riyadh. The input was the daily date code from 2009 to 2012, and triangle basis transfer function (tribas) was used to train the data. Table 4.8 shows the results obtained for the ELM model. Figure 4.27 illustrates the relation between the target and the neural network output. As shown in Figure 4.28, there are some differences between the actual and predicted data. This is due to the fast convergence of ELM, excluding the factors that affect humidity. Nevertheless, the model has a low error rate and hence is valid.

Table â€Ž4. ELM Humidity 2012 Results

Training time(sec)

RMSE of training

RMSE of prediction

MAPE

R

3.0108

0.066735

0.12646

7.354

0.953

Figure â€Ž4. Best Linear Fit Between Actual and Predicted Humidity (ELM)

Figure â€Ž4. Actual Humidity Vs Prediction (ELM)

## ELM Radiation Model 2012 with Three Inputs

This model is based on the average daily temperature and humidity of 2012 previously forecasted. Here, not only are the predicted humidity and temperature of 2012 used, but also the temperature and humidity from 2009 and 2010 along with the daily date codes from 2009, 2010, 2011 and 2012. The purpose of utilizing all of these inputs is to obtain more accurate results. Compared to ANN, ELM needed 4000 neurons with Log-sigmoid transfer function to achieve a small error rate. The model results are shown in Table 4.9. As can be seen in Figure 4.29, the model has a strong relationship between the output and the targets. Figure 4.30 shows that the predicted radiation is nearly the same as the actual radiation.

Table â€Ž4. ELM Radiation2012 with Three Input Results

Training time(sec)

RMSE of training

RMSE of prediction

MAPE

R

15.1009

0.017201

0.054697

2.865

0.986

Figure â€Ž4.: Best Linear Fit Between Actual and Predicted Radiation 2012 (ELM)

Figure â€Ž4.: Actual Radiation Vs Prediction With Three Input (ELM)

## ELM Radiation Model 2012 with One Input

This model has lower MAPE than the mode predicted by ANN. The root mean square error (RMSE) of training and the time of training of the ELM model are shown in Table 4-10. Log-sigmoid is the transfer function applied between the input and hidden layers. As illustrated in Figure 4.17, the relation between the two parameters is not stronger than the model with three inputs. Figure 4.18 shows the actual radiation versus the predicted one.

Table â€Ž4.: ELM Radiation 2012 with One Input Results

Training time (sec)

RMSE of training

RMSE of prediction

MAPE

R

2.1216

0.12555

0.18530

8.1352

0.862

Figure â€Ž4. Best Linear Fit Between Actual and Predicted Radiation with One Input (ELM)

Figure â€Ž4. Actual Radiation (with One Input) Vs. Prediction (ELM)

## Discussion

In this study, the goal was to find a method that accurately predicts global solar radiation. This section discusses the results obtained from the ANN and ELM models. It also compares the two methods, showing their drawbacks and the advantages.

Solar radiation is an essential parameter for implementing solar energy system. Hence, meticulous calculation of the radiation, both real and predicted, should be available. Table 5.9 shows an overview of the important parameters of both the ANN and ELM methods. As can be seen, the number of neurons needed to map the relationship between the input and output of the neural network algorithm is less than that needed in the ELM algorithm. This is because the neural network is running under an iteration process while the ELM is based on a one-time process. Furthermore, the back propagation technique is based on forward and backward pass processes that update the weight and bias at each epoch. Conversely, the ELM generates random weight and obtains the output weight in a one-time matrix multiplication. Consequently, there are few neurons used for coverage in the ANN method.

The second parameter of comparison between ANN and ELM is training time. As shown in Table 5.9, the ELM method has a shorter training time than ANN. Since the ANN algorithm uses a complex back propagation technique, these techniques require time for coverage. Thus, back propagation needs a high number of iterations to find the relationship between the input and the target. Hence, regarding convergence speed, ELM is considered faster than ANN.

The final and most important comparison is the rate of error between the actual and predicted data. Although the ELM method has a lower rate of error than ANN, the difference in the error is only slight, and both models have the same number of inputs. Despite local minima and over-fitting (which are drawbacks of back propagation), ELM provides more accurate results and higher performance than ANN [39]. As shown in Figure 4.3, the month of January 2009 was chosen to compare ANN and ELM. Here, it can be clearly seen that ELM outperforms ANN.

Table â€Ž4.: ANN and ELM results

## Methods

## ANN

## ELM

## Model

## Neurons

## Training Time (sec)

## MAPE

## Neurons

## Training Time

## (sec)

## MAPE

Radiation 2011

83

1628

2.5054

5000

84.38

1.8233

Temperature 2012

80

721

6.5906

1200

3.22

6.1829

Humidity 2012

60

24

9.5169

1000

3.01

7.354

Radiation 2012 (three input)

81

424

4.7735

4000

15.10

2.8653

Radiation 2012 (one input)

70

605

9.3565

1000

2.1216

8.1352

Figure â€Ž4. Comparison between the actual and forecasted radiation in one month (Jan 2009)â€Ž

## Chapter 5: Conclusion

Global solar radiation forecasting plays a significant role in the design of solar power systems. In this work, two methods were employed to predict daily average solar radiation. This section provides conclusions of the results obtained along with suggestions for future work.

## Research Conclusions

The aim of this study was to predict the daily average of global solar radiation in Riyadh, Saudi Arabia. This research concluded the following:

The artificial neural network (ANN) and extreme learning machine (ELM) algorithms are useful in predicting global solar radiation.

In ANN and ELM, five models were proposed: radiation 2011, temperature 2012, humidity 2012, and radiation 2012 (three input and one input).

ANN was useful in predicting global solar radiation with low root mean square and mean per error.

The extreme learning algorithm provides a lower root mean square error and a lower mean absolute percentage error. As well, it converges fast, reduces the time it takes to do computations, and has a high performance level.

ELM algorithm proved its ability to predict in less time than ANN. Table 5.1 shows the training time for ANN and ELM. Clearly, the ELM training time is faster than ANN.

Table â€Ž5.: Training Time Results

## Methods

## ANN

## ELM

## Models

Training time (sec)

Training time (sec)

Radiation 2011

1628

84.38

Temperature 2012

721

3.22

Humidity 2012

24

3.01

Radiation 2012(three input)

424

15.10

Radiation 2012 (one input)

605

2.1216

Using temperature and humidity as inputs to the neural network model and the ELM model has a significant effect in predicting global solar radiation. Hence, utilizing meteorological data helps provide an accurate prediction for solar radiation. Table 5.2 shows the prediction result for GSR with and without utilizing meteorological parameters.

Table â€Ž5. Prediction Results

## Methods

## ANN

## ELM

Models

MAPE

MAPE

Radiation 2012 (three inputs)

4.7735

2.8653

Radiation 2012 (one input)

9.3565

8.1352

The correlation coefficients for all models are closer to one. That indicates a good fit between the network output and the targets.

Table â€Ž5. Correlation Coefficient Results

## Methods

## ANN

## ELM

## Models

R

R

Radiation 2012

0.986

0.982

Temperature 2012

0.946

0.975

Humidity 2012

0.953

0.953

Radiation 2012 (three input)

0.964

0.986

Radiation 2012 (one input)

0.802

0.862

The results show that the mean percentage absolute errors in ANN models were reasonable. However, the accuracy of temperature and humidity was somewhat high because some factors were ignored.

To sum up, the comparisons between the two methods of ELM and ANN show that the extreme learning machine was faster than the artificial neural network. Also, ELM provided a better overall performance. The drawbacks that affect ANN (such as over-fitting and local minima) cause decreased accuracy and lower overall performance.