Next Article in Journal
Eye State Identification Based on Discrete Wavelet Transforms
Next Article in Special Issue
Subcooled Flow Boiling Heat Flux Enhancement Using High Porosity Sintered Fiber
Previous Article in Journal
Integrating Optical and Wireless Techniques towards Novel Fronthaul and Access Architectures in a 5G NR Framework
Previous Article in Special Issue
Application of Semi-Empirical Models Based on Satellite Images for Estimating Solar Irradiance in Korea
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Deep Learning Model to Forecast Solar Irradiance Using a Sky Camera

Department of Mechanical Engineering, Kookmin University, 77 Jeongneung-ro, Seoul 02727, Korea
*
Author to whom correspondence should be addressed.
Appl. Sci. 2021, 11(11), 5049; https://doi.org/10.3390/app11115049
Submission received: 30 March 2021 / Revised: 16 May 2021 / Accepted: 25 May 2021 / Published: 29 May 2021
(This article belongs to the Special Issue Sciences and Innovations in Heat Pump/Refrigeration: Volume II)

Abstract

:
Solar irradiance fluctuates mainly due to clouds. A sky camera offers images with high temporal and spatial resolutions for a specific solar photovoltaic plant. The cloud cover from sky images is suitable for forecasting local fluctuations of solar irradiance and thereby solar power. Because no study applied deep learning for forecasting cloud cover using sky images, this study attempted to apply the long short-term memory algorithm in deep learning. Cloud cover data were collected by image processing of sky images and used for developing the deep learning model to forecast cloud cover 10 min ahead. The forecasted cloud cover data were plugged into solar radiation models as input in order to predict global horizontal irradiance. The forecasted results were grouped into three categories based on sky conditions: clear sky, partly cloudy, and overcast sky. By comparison with solar irradiance measurement at a ground station, the proposed model was evaluated. The proposed model outperformed the persistence model under high variability of solar irradiance such as partly cloudy days with relative root mean square differences for 10-min-ahead forecasting are 25.10% and 39.95%, respectively. Eventually, this study demonstrated that deep learning can forecast the cloud cover from sky images and thereby can be useful for forecasting solar irradiance under high variability.

1. Introduction

Clouds have a serious impact on photovoltaic (PV) power production. By limiting the levels of solar irradiance reaching the PV, the clouds can contribute to the high variability of PV power output. Therefore, it is necessary to monitor cloud formation and obtain information about clouds in order to be able to prepare backup energy sources that will cover any reductions in energy output. Cloud information is applied in weather analyses and meteorological data; also, it is used for energy applications such as solar irradiance and PV power estimation. Furthermore, cloud information, such as cloud cover and cloud motion, has frequently been examined as a source of renewable energy. Chow et al. [1] used a sky camera installed in California to develop a method for intra-hour cloud motion and to forecast global horizontal irradiance (GHI). Kim et al. [2] used sky images to retrieve cloud cover and validated these images through human observations to estimate solar irradiance. Lothon et al. [3] investigated an algorithm to estimate the cloud cover from sky images.
Cloud information is a key input variable for solar irradiance forecasting, which is a critical issue to manage uncontrollable production of PV power. In general, many methods are able to forecast solar irradiance, and these methods are grouped according to the forecast horizon. For long-term forecast horizons, numerical weather prediction that relies on the numerical solution of governing equations in meteorological sciences is most useful. Because predictions can be made up to 15 days in advance, such long-term forecast horizon helps operation optimization and market participation. On the other hand, sky images and satellite images are used for forecasting solar irradiance in the short-term forecast horizon. These methods are able to forecast solar irradiance several minutes to several hours in advance. This short-term forecasting is useful in the anticipation of ramp events caused by variations in solar irradiance. Compared to satellite images, sky images offer more detailed cloud information with higher spatial resolution. Therefore, the solar irradiance forecasting based on sky images is appropriate for management of a specific PV system, in spite of shorter time horizon.
In general, information about clouds, especially for cloud cover data, is collected through human observations, and the World Meteorological Organization provides the rules for the registration of cloud cover. Observers estimate the cloud cover in oktas or tenths, in which the sky is divided into 8 or 10 regions and the regions that are covered by clouds are evaluated. However, the accuracy of this traditional method is deemed unsatisfactory: it provides low temporal and spatial resolutions, and errors can be introduced through the subjective nature of observers’ judgments. Hence, a hemispherical sky camera is an alternative solution that can be used to address some of these problems. The camera gathers images at high frequency during the hours of daylight.
The fast evolution of low-cost hemispherical sky cameras has been preferred due to their application in gathering cloud information [4], and they have become very popular in the fields of solar energy and cloud motion detection. The sky camera is able to produce cloud cover information by image processing from pixel distribution. The data are calculated based on an algorithm that applies the red, green, and blue (RGB) channels of an image and combines them with an adaptive threshold in order to distinguish the cloud and sky pixels. Besides, this data can be combined with physical models to estimate solar irradiance. For example, Kim et al. [5] used cloud cover to estimate solar irradiance in South Korea using the cloud cover radiation model. This model is a regression-type model that was developed by Kasten et al. [6] to estimate GHI on an hourly basis. Furthermore, some researchers have also used sky images to forecast solar irradiance in short-term forecast horizons. Caldas et al. [7] forecasted GHI using sky images and real-time GHI measurements. They applied the cloud correlation model (CCM) to these images to predict GHI up to 10 min in advance. These results indicate that the proposed model was able to predict GHI in a very short-term forecast horizon under high variability of solar irradiance.
So far, the GHI forecasting using sky images was calculated using conventional methods, such as CCM and cloud motion vector (CMV). They estimated the cloud motion by calculating the motion of the pixels on images. However, these methods did not provide good accuracy because the cloud motion is not linear and hard to predict. Meanwhile, deep learning, which is the subpart of artificial intelligence (AI), has been increasingly used in solar irradiance and PV power forecasting [8,9,10,11]. Various deep learning models, such as recurrent neural network (RNN), long short-term memory (LSTM), gated recurrent unit (GRU), and deep belief network (DBN), provide high accuracy in forecasting solar irradiance for both short-term and long-term forecast horizons. Nevertheless, no studies applied deep learning models to forecast the solar irradiance using cloud cover data obtained from sky images.
In this study, we proposed a method to estimate solar irradiance in high variability of solar irradiance such as partly cloudy days. The proposed method combines the cloud cover obtained from sky images, the deep learning model to forecast the cloud cover ten minutes ahead, and the physical model to estimate GHI with the forecasted cloud cover. The LSTM was selected out of deep learning algorithms because it is recommendable for predicting time-series data compared with other deep learning models [8]. The forecasting was conducted for clear, cloudy, and overcast days on a minute basis and validated by the comparison with GHI measurement at a ground station in Seoul, South Korea. Because no study used the deep learning model to forecast the cloud cover from sky images, this study will investigate its applicability.

2. Data and Instrument

Two instruments have been utilized in this study: a sky camera used to capture the sky image and a pyranometer used to measure the GHI. The instruments were set up on the rooftop at Kookmin University in Seoul, South Korea (latitude: 37.61200° N, longitude: 126.99770° E).

2.1. Sky Image

Sky images were obtained using a Total Sky Camera J1006 as shown in Figure 1a, which captured sky images every minute. A fish-eye lens as the angle projection was then attached to the camera, which provides a 180° field of view in the horizontal direction. The camera system is based on a digital camera with a maximum resolution of 2272 × 1704 pixels, and the images were stored locally in a computer at the Kookmin University. The camera system contains large-capacity silica gel drying cartridges to keep the inside of the instrument free of moisture. A ventilation unit was also applied to prevent the deposit of dust and dew on the optical system and to protect the sky camera against thermal heating effects.
The sky images captured through the fish-eye lens were calibrated using a checkerboard calibration pattern to correct the fish-eye image. First, pictures were taken of the checkerboard in different positions and orientations, as shown in Figure 1b. Then, the MATLAB toolbox was used to detect the image and world points on the checkerboard as the calibration parameters. The image and checkerboard points were applied as the input for the image calibration in converting all the images to flat images.

2.2. Solar Irradiance

Solar irradiance measurement revolves around three components, that is, global horizontal irradiance (GHI), diffuse horizontal irradiance (DHI), and direct normal irradiance (DNI). The GHI is the total solar irradiance that reaches the earth’s surface, which is the combination of DNI and DHI. The GHI can be measured using a pyranometer that has been designed to receive solar irradiance from all directions. In this study, the GHI was measured using a EKO pyranometer MS-80 in Kookmin University (see Figure 2a,b). The pyranometer was then installed with ventilation units that cover the dome of the pyranometer to protect it from dew and frost during the morning and to reduce the effects of raindrops and dust. The pyranometer has a response time of less than 0.5 s with an approximate sensitivity of 10 µV/Wm−2 and collects the GHI in 1-min, 10-min, 1-hr, and 1-day intervals. The pyranometer was calibrated following the ISO 9060:2018 standard.

2.3. Classification of Sky Conditions

In order to forecast solar irradiance using sky images during a variety of sky conditions, the 25 days from May to August in July 2020 were selected. These days provided all-sky conditions based on the clear-sky index and variability. Thereafter, days have been grouped according to the mean of the clear-sky index and clear-sky index variability, which is calculated using the following equation:
μ k t = 1 n i = 1 n G H I m G H I c
δ k t = S t d { k t t 1 k t t }
where k t is the clear-sky index, μ k t is the mean of the clear-sky index, G H I m is the GHI measurement, G H I c is the clear-sky GHI, and δ k t is the clear sky index variability. Statistics from the clear-sky index can be used to determine the sky conditions. The clear-sky index estimates the atmospheric attenuation due to the clouds by measuring the ratio of the surface solar radiation to the solar radiation received under a clear sky. In this study, the days have been grouped into three categories [12] as shown in Figure 3: clear-sky day   ( μ k t > 0.65 ) and ( δ k t < 0.03 ) , partly cloudy day   ( 0.3 μ k t 0.65 ) and ( δ k t > 0.10 ) , and overcast day   ( μ k t < 0.3 ) and ( δ k t < 0.03 ) . Figure 4 compares the GHI measurement variability in all sky conditions for three representative days. It illustrates the small variation in GHI for clear and overcast days from 9:00 a.m. to 5:00 p.m. On the other hand, the partly cloudy day presents the high GHI variability with the maximum and the minimum values of GHI are 956.0 Wm−2 and 184.0 Wm−2, respectively.

3. Methods

The method to forecast solar irradiance, which is comprised of the two steps, is presented in this section. In the first step, the cloud cover is calculated from sky images, and then the future cloud cover is predict using LSTM. In the second step, the GHI is forecasted by applying the predicted cloud cover for the solar radiation model as the input data.

3.1. Cloud Cover Algorithm

To include further details of the cloud cover retrieval, we have created a simple flow chart of the algorithm used to detect the cloud and sky pixels on images, as shown in Figure 5. This flow chart outlines the process of obtaining the cloud cover from sky images by using the distribution of the pixel values in images. The first step is to collect the sky images from the sky camera. These images are converted into a one-channel image in order to improve the contrast and to reduce the noise of the image by applying the RBR method; this method was proposed by Shield et al. [13] and is able to successfully detect the cloud and sky pixels in an image. Mathematically, the RBR method is defined as the ratio of the red and blue channels of an image with the pixel value ranging from 0 to 255. It should be noted that the value of the blue channel is increased by 1 if it equals 0 to avoid dividing by 0 [14].
After that, the threshold value is applied to the one-channel image to distinguish the clouds from the sky. We calculated the value using the Otsu thresholding method that Nobuyaski Otsu proposed back in 1979 [15]. This method was chosen on account of its flexibility and robustness in identifying the cloud and sky pixels. Another advantage of this method is the simple process involved in determining the threshold values: since the calculation requires one-dimensional intensity data, the other parameters, such as the shape or geometric components of an object, do not affect the accuracy of the threshold value.
It is worth noting that the basic concept in thresholding is to segment an image based on the difference between the pixel value. Therefore, a fixed threshold value cannot be applied to all-sky images because the brightness in sky images differs on account of the ever-changing position of the sun. To address these problems, the threshold value is adapted to all images, and this makes the value different in each image.
Finally, the cloud cover was calculated using the ratio of cloud pixels to total pixels based on the percentage of the cloud pixels in the binary image. The measurement of cloud cover is reported in the number of parts of the sky covered by clouds. The sky can be split into 8 (oktas) or 10 (tenths) parts representing the amount of cloud in a particular sky. It should also be noted that cloud cover does not describe the cloud thickness and that it only refers to the amount of the sky covered by clouds in a particular location.

3.2. Solar Radiation Model

The solar radiation model has been used to estimate GHI using various input data. One of the solar radiation models that uses cloud cover as the input data is the Kasten model [6]. This regression-type model estimates GHI by using a correlation between the cloud cover and clear-sky irradiance. In this model, the cloud cover was divided into 9 classes, where 0 refers to a clear sky and 8 an overcast sky. This model has been widely used in different locations, but some researchers had to modify the coefficients in order to obtain results in their location. In this specific location in Seoul, the coefficients were obtained from research conducted by Yoo et al. [16]. The GHI is calculated using this formula:
G H I = G H I c × ( 1 A × ( 0.125 × C C ) B )
G H I c = C × sin ( α ) D
where   C C is the cloud cover,   G H I c   is the solar irradiance on clear sky condition,   α is solar elevation, A = 0.75, B = 2.6, C = 963, and D =106. However, the specific value does not reach the GHI under overcast sky conditions, since the minimum value for an overcast sky is a quarter of clear-sky irradiance. Therefore, we proposed a new model by modifying the coefficient in Kasten’s model and the clear sky irradiance model. The coefficients to calculate the GHI for each model are presented in Table 1.
Many clear-sky irradiance models have been made available to calculate the solar irradiance under clear sky conditions, and each of these models requires different parameters as the input. For example, Dazhi et al. [17] calculated clear-sky irradiance in combination with the solar zenith angle and the eccentricity of the earth. Antonanzas-Torres et al. [18] estimated solar irradiance based on commonly measured variables, such as temperature, rainfall, and humidity. Yang et al. [19] proposed a model to calculate solar irradiance based on ozone absorption, water vapor absorption, permanent gas absorption, aerosol extinction, and Rayleigh scattering. In this work, we used the Ineichen clear-sky model after modification by Reno et al. [20], as this model affords good accuracy and fairly easy to execute. The equations to obtain the clear-sky irradiance obtained from are expressed as follows:
G H I c = c g 1 × I ο × cos ( θ z ) × exp ( c g 2 × A M × ( f h 1 + f h 2 × ( T L 1 ) ) ) × exp ( 0.01 × A M 1.8 )
A M = 1 cos ( θ z ) + 0.50572 × ( 96.07995 θ z ) 1.6364
f h 1 = exp ( d / 8000 )
f h 2 = exp ( d / 1250 )
c g 1 = 5.09 × 10 5 d + 0.868
c g 2 = 3.92 × 10 5 d + 0.0387
where   I ο   is extraterrestrial normal incident irradiance,   θ z   is solar zenith,   A M   is air mass,   T L   is linked turbidity factor, and   d   is the ground elevation expressed in meters.
Here, the linked turbidity refers to the optical thickness of the atmosphere due to the presence of gaseous water vapor and the absorption and scattering by the aerosol [21]. It expresses the transparency of the sky or cloudless atmosphere. In a case where the sky is perfectly blue (clean), the T L value is close to 1. However, if the sky has high water vapor and the color is closer to white, the T L becomes larger. The air mass refers to the relative path length of the direct solar beam through the atmosphere, and it describes the ratio of the distance traveled by solar radiation in reaching the atmosphere to the distance of the sun directly overhead. Note, in this solar irradiance model, the air mass is dependent solely on the so-lar zenith.

3.3. Deep Learning Model

In this study, we used LSTM as a deep learning model to forecast the cloud cover up to several minutes ahead. LSTM was chosen as it provides satisfactory results in handling time series data. Rajagukguk et al. [7] identified that this model performs better than other deep learning models, such as RNN and GRU. Furthermore, this deep learning model demonstrates good performance in solar irradiance forecasting in both short-term and long-term forecast horizons. LSTM was developed to overcome the problems with vanishing and explosion gradients that often occur in other deep learning models. For instance, in the case of the RNN, when these problems occurred in the learning process, the learning performance failed to increase [22].
The LSTM model was proposed by Hochreiter and Scmidhuber to adapt to the long-term dependence on the information [23]. The unit, as has been illustrated in Figure 6, consists of forget gate, input gate, output gate, and cell state. For simplicity’s sake, the structure can be formulated as follows:
f t = σ ( W f × x t + U f × h t 1 + b f )
i t = σ ( W i × x t + U i × h t 1 + b i )
S t = tanh ( W c × x t + U c × h t 1 + b c )
C t = i t S t + f t C t 1
o t = σ ( W o × x t + U o × h t 1 + V o × C t + b o )  
h t = o t tanh ( C t )
where f t is the forget gate, i   is the input gate, o t   is the output gate, x   t is input data, b   is bias, W , U , V are weight matrices, h t   is the value of memory cell, S   t is candidate state of the memory cell,   tanh   and   σ   are the activation functions, and   C   t is the state of the memory cell.
In Equations (11), (12) and (15), the sigmoid function is used to calculate the amount of information that passes through the gate with values from 0 to 1. The candidate state of the memory cell in Equation (13) contains the tanh function that makes the value ranging from −1 to 1 in order to calculate the new information. The input and forgot gates in Equation (14) are operated with the Hadamard product ( ) to calculate the state memory of the cell. The final output of the memory cell in Equation (16) was obtained after multiplying with the output gate.
A total of 12,000 images were processed to obtain minutely cloud cover information in this study. These calculated data provided the input for LSTM to forecast the future cloud cover. To illustrate the model design, the details of these hyperparameters are listed in Table 2.
The optimum hyperparameters such as epochs, batch size, learning rate, optimization algorithm, and activation functions for deep learning models depend on the datasets. The epochs describe the number of complete passes (forward and backward) through the neural network. The batch size denotes the number of training examples in one pass (forward and backward). The learning rate controls the weight in a neural network with reference to loss gradient. The optimization algorithm is used to find the attributes, such as determining the weights neural network to reduce the losses. Along with this structure, this LSTM model is also equipped with an activation function known as a rectified linear unit (ReLU). ReLu is a non-linear function that oppresses a value below 0 to become exactly 0 but still inherits some linear property for cases above 0. Because this function has a linear characteristic, it can easily train by a deep network of neurons and also solve a case of gradient problem by ignoring the negative values. It should be noted that there is no fixed value in deep learning models to explain the optimum design for each model because the networks inside deep learning models are trained iteratively. Therefore, the best way to determine the optimal hyperparameter was to use errors during validation and training to assess the algorithm’s accuracy.

3.4. Evaluation Metric

In order to validate the performance of forecasting, various common evaluation metrics have been used to calculate the accuracy of the model, including mean bias difference (MBD), root mean square difference (RMSD), relative root means square difference (rRMSD), and relative mean bias difference (rMBD). We prefer to use differences rather than errors as the measurement data by nature include uncertainty; hence, the true values are unknown [24]. The evaluation metrics are given in the following equations:
M B D = 1 n i = 1 n ( P e P m )
R M S D = 1 n i = 1 n ( P e P m ) 2
r M B D = 1 n i = 1 n ( P e P m ) 1 n i = 1 n P m
r R M S D = 1 n i = 1 n ( P e P m ) 2 1 n i = 1 n P m 100
where   P e   is the estimated values at each time,   P m   is the measured values at each time, and   n   is the number of sample data for the period.
The RMSD explains the deviation from the measurement and it always generates a positive value. This value measures how close the prediction is to the measurement; thus, a smaller value is deemed better. The MBD shows the average bias of the prediction, and it also provides the long-term performance of the model [25], where the positive and negative values represent overprediction and underprediction, respectively. Furthermore, in cases where the data vary with location and time scale, relative metrics such as rRMSD and rMBD are more useful, as they provide the percentage difference.

4. Results and Discussion

This section provides the results from both the RBR model used to obtain the cloud cover and the deep learning model used to forecast solar irradiance. The RBR method detects the presence of clouds by considering the ratio of the red channels to blue channels in a color image. These one-channel images combined with the threshold values were able to distinguish cloud pixels from the background. In the sky images, the cloud and sky pixels were detected as white and black colors and were further transformed from the original image into the binary image to facilitate the identification of cloud and sky pixels. However, in some cases, errors occurred when the cloud pixel was almost the same as the sky pixel. In addition, if the clouds are extremely thin, the pixels are lower than the threshold value, and they are not detected as clouds. Hence, it is essential to determine an accurate threshold value to lessen the occurrence of such classification errors.
In order to understand the correlation between cloud cover and the clear-sky index, the distribution of the daily calculated cover data is presented in Figure 7, which illustrates the variation of mean cloud cover for each day. To investigate the results, the mean clear-sky index has been converted into an opposite value on account of the differences in the definition of sky conditions in relation to cloud cover and the clear-sky index; for example, in referring to cloud cover, a value of 0 is a clear-sky condition, while in the clear-sky index, a value of 0 refers to an overcast sky. The correlation between the cloud cover and the clear-sky index is worth mentioning because it shows similar trends, which indicates that the method provides satisfactory results in obtaining the cloud cover from sky images.
In forecasting results, the forecast cloud cover using the LSTM model is converted into GHI data using the correlation cloud cover and clear-sky irradiance as described in Equation (3). The results for the minutes forecasting were compared with the GHI measurement in terms of evaluation metrics. The summary of solar irradiance forecasting is grouped in three categories based on sky conditions: partly cloudy, clear, and overcast days. The proposed model by modifying the coefficient in Kasten’s model outperformed the Yoo model and the persistence model for partly cloudy days as shown in Table 3. After 10 min forecasting, the RMSD for the proposed, the Yoo, and the persistence models are 199.75 Wm−2, 214.97 Wm−2, and 317.94 Wm−2, respectively. For reference, another forecasting model by Caldas et al. [7], which used the cross-correlation method (CCM) in all-sky imaging, attained an RMSD of 251 Wm−2 for partly cloudy days in forecasting solar irradiance up to 10 min in advance.
The results for clear days and overcast days are shown in Table 4. The results indicate that under clear day conditions the proposed model outperforms the persistence and the Yoo models for forecast horizon more than 5 min. The RMSD in 10 min forecasting for the proposed, the Yoo, and the persistence models are 43.08 Wm−2, 63.74 Wm−2, and 52.49 Wm−2, respectively. However, the information was different on overcast days. In this case, the smallest error by the persistence model, the RMSD of 9.98 Wm−2 in 10 min ahead of forecasting, demonstrated that the persistence model performed well under the overcast condition. The proposed and the Yoo models provide the RMSD of 17.37 Wm−2 and 169.86 Wm−2, respectively. The result in these overcast days was not surprising since the value of solar irradiance does not change significantly. The experiment by Caldas et al. [7] also reported that the persistence model has better performance than their proposed model for overcast day conditions, with an RMSD of 110 Wm−2 for 10 min ahead forecast horizon.
To further analyze the variability of the solar irradiance under different sky conditions, the metric that indicates the variability of solar irradiance is presented in Figure 8. The metric was calculated using the universal variability index (UVI) to quantify the variation of solar irradiance under clear, partly cloudy, and overcast days by comparing the measured irradiance and calculated clear-sky irradiance. As expected, the small variations in clear and overcast days resulted in the values of UVI close to one. However, the UVI for partly cloudy days does not remain constant anymore due to the high variability of solar irradiance. It shows the high variability index with the value ranging from 2.68 to 61.16.
The performance of forecast models significantly differs by solar irradiance variability. Figure 9 shows the mean RMSD and the mean UVI of 10-min-ahead forecast results under different sky conditions. It clearly explains that the proposed model remarkably outperformed the persistence model in partly cloudy days with the mean UVI > 20. On the other hand, when the mean UVI < 5, the forecast performance of the proposed model is comparable to that of the persistence model. In overcast days, the proposed model is slightly less accurate than the persistence model. Probably, the reason is that the solar radiation model is less accurate under overcast sky conditions.

5. Conclusions

In this study, a model to forecast solar irradiance from sky images was proposed and evaluated. The images recorded using a sky camera were designed to capture a hemispherical image each minute. Image processing using the RBR method was used to improve the quality of the image in detecting the cloud pixels in the image. The LSTM, as a deep learning model, was applied to forecast the cloud cover for several minutes ahead. Then, the physical model was used to estimate the GHI by using the forecasted cloud cover.
When the sky is partly cloudy, i.e., the UVI is larger than 20, the proposed model is able to forecast GHI for 10 min in advance with RMSD, rMSD, MBD, and rMBD values of 199.75 Wm−2, 25.1%, −60.65 Wm−2, and −12.70%. These evaluation metrics demonstrate that the proposed model has a better performance than the Yoo and the persistence models. On the other hand, for clear and overcast sky conditions when the UVI is smaller than 5, performances of the proposed and the persistence models are comparable.

Author Contributions

Formal Analysis R.A.R.; Conceptualization R.A.R. and R.K.; Writing—original draft R.A.R.; Writing—review and editing H.-J.L.; Funding acquisition H.-J.L. All authors have read and agreed to the published version of the manuscript.

Funding

This study is financially supported by grants from the National Research Foundation of Korea (NRF), Ministry of Science and ICT (2018M1A3A3A02065823, 2019R1A2C1009501).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data are contained within this study.

Conflicts of Interest

The authors declare no conflict of interest.

Nomenclature

A M Air mass
C C Cloud cover
C t The state of the memory cell
d Ground elevation (m)
f t Forget gate
h t The value of memory cell
i t Input gate
I o Extraterrestrial irradiance
k t Clear-sky index
o t Output gate
S t The candidate state of the memory cell
T L Linke turbidity
x t Input data
Subscripts
c c Cloud cover
k t Clear-sky index
e Estimated
m Measured
c Clear sky
Greek Symbols
α Solar angle
δ k t Clear-sky index variability
θ z Sun zenith
σ Sigmoid function
Abbreviations
GHIGlobal horizontal irradiance (Wm−2)
LSTMLong short-term memory
MBDMean bias difference (Wm−2)
PVPhotovoltaic
RBRRed blue ratio
ReLURectified linear unit
rMBDRelative mean bias difference (%)
RMSDRoot mean square difference (Wm−2)
rRMSDRelative root mean square difference (%)
UVIUniversal variability index

References

  1. Chow, C.W.; Urquhart, B.; Lave, M.; Dominguez, A.; Kleissl, J.; Shields, J.; Washom, B. Intra-Hour Forecasting with a Total Sky Imager at the UC San Diego Solar Energy Testbed. Sol. Energy 2011, 85, 2881–2893. [Google Scholar] [CrossRef] [Green Version]
  2. Kim, B.Y.; Jee, J.B.; Zo, I.S.; Lee, K.T. Cloud Cover Retrieved from Skyviewer: A Validation with Human Observations. Asia Pac. J. Atmos. Sci. 2016, 52, 1–10. [Google Scholar] [CrossRef]
  3. Lothon, M.; Barnéoud, P.; Gabella, O.; Lohou, F.; Derrien, S.; Rondi, S.; Chiriaco, M.; Bastin, S.; Dupont, J.C.; Haeffelin, M.; et al. ELIFAN, an Algorithm for the Estimation of Cloud Cover from Sky Imagers. Atmos. Meas. Tech. 2019, 12, 5519–5534. [Google Scholar] [CrossRef] [Green Version]
  4. Wacker, S.; Gröbner, J.; Zysset, C.; Diener, L.; Tzoumanikas, P.; Kazantzidis, A.; Vuilleumier, L.; Stöckli, R.; Nyeki, S.; Kämpfer, N. Cloud Observations in Switzerland Using Hemispherical Sky Cameras. J. Geophys. Res. 2015, 120, 695–707. [Google Scholar] [CrossRef] [Green Version]
  5. Kim, K.H.; Kie-Whan Oh, J.; Jeong, W.S. Study on Solar Radiation Models in South Korea for Improving Office Building Energy Performance Analysis. Sustainable 2016, 8, 589. [Google Scholar] [CrossRef] [Green Version]
  6. Kasten, F.; Czeplack, G. Solar and Terrestrial Radiation Dependent on the Amount and Type of Cloud. Sol. Energy 1980, 24, 177–189. [Google Scholar] [CrossRef]
  7. Caldas, M.; Alonso-Suárez, R. Very Short-Term Solar Irradiance Forecast Using All-Sky Imaging and Real-Time Irradiance Measurements. Renew. Energy 2019, 143, 1643–1658. [Google Scholar] [CrossRef]
  8. Rajagukguk, R.A.; Ramadhan, R.A.A.; Lee, H.-J. A Review on Deep Learning Models for Forecasting Time Series Data of Solar Irradiance and Photovoltaic Power. Energies 2020, 13, 6623. [Google Scholar] [CrossRef]
  9. Brahma, B.; Wadhvani, R. Solar Irradiance Forecasting Based on Deep Learning Methodologies and Multi-Site Data. Symmetry 2020, 12, 1–20. [Google Scholar] [CrossRef]
  10. Wang, F.; Yu, Y.; Zhang, Z.; Li, J.; Zhen, Z.; Li, K. Wavelet Decomposition and Convolutional LSTM Networks Based Improved Deep Learning Model for Solar Irradiance Forecasting. Appl. Sci. 2018, 8, 1286. [Google Scholar] [CrossRef] [Green Version]
  11. Husein, M.; Chung, I.Y. Day-Ahead Solar Irradiance Forecasting for Microgrids Using a Long Short-Term Memory Recurrent Neural Network: A Deep Learning Approach. Energies 2019, 12, 1856. [Google Scholar] [CrossRef] [Green Version]
  12. Alves, M.D.C.; Sanches, L.; de Nogueira, J.S.; Silva, V.A.M. Effects of Sky Conditions Measured by the Clearness Index on the Estimation of Solar Radiation Using a Digital Elevation Model. Atmos. Clim. Sci. 2013, 3, 618–626. [Google Scholar] [CrossRef] [Green Version]
  13. Shields, J.E.; Johnson, R.W.; Koehler, T.L. Automated Whole Sky Imaging Systems for Cloud Field Assessment. In Proceedings of the Fourth Symposium on Global Change Studies of the American Meteorological Society, Boston, MA, USA, 17–22 January 1993. [Google Scholar]
  14. Li, Q.; Lu, W.; Yang, J. A Hybrid Thresholding Algorithm for Cloud Detection on Ground-Based Color Images. J. Atmos. Ocean. Technol. 2011, 28, 1286–1296. [Google Scholar] [CrossRef]
  15. Nobuyuki, O. A Threshold Selection Method from Gray-Level Histograms. IEEE Trans. Syst. Man Cybern. 1979, 9, 62–66. [Google Scholar]
  16. Yoo, H.-C.; Lee, K.-H.; Park, S.-H. Analysis of Data and Calculation of Global Solar Radiation Based on Cloud Data for Major Cities in Korea. J. Korean Sol. Energy Soc. 2008, 28, 17–24. [Google Scholar]
  17. Dazhi, Y.; Jirutitijaroen, P.; Walsh, W.M. The Estimation of Clear Sky Global Horizontal Irradiance at the Equator. Energy Procedia 2012, 25, 141–148. [Google Scholar] [CrossRef] [Green Version]
  18. Antonanzas-Torres, F.; Sanz-Garcia, A.; Martínez-de-Pisón, F.J.; Perpiñán-Lamigueiro, O. Evaluation and Improvement of Empirical Models of Global Solar Irradiation: Case Study Northern Spain. Renew. Energy 2013, 60, 604–614. [Google Scholar] [CrossRef] [Green Version]
  19. Yang, K.; Huang, G.W.; Tamai, N. Hybrid Model for Estimating Global Solar Radiation. Sol. Energy 2001, 70, 13–22. [Google Scholar] [CrossRef]
  20. Reno, M.J.; Hansen, C.W. Identification of Periods of Clear Sky Irradiance in Time Series of GHI Measurements. Renew. Energy 2016, 90, 520–531. [Google Scholar] [CrossRef] [Green Version]
  21. Chaâbane, M.; Masmoudi, M.; Medhioub, K. Determination of Linke Turbidity Factor from Solar Radiation Measurement in Northern Tunisia. Renew. Energy 2004, 29, 2065–2076. [Google Scholar] [CrossRef]
  22. Cortez, B.; Carrera, B.; Kim, Y.J.; Jung, J.Y. An Architecture for Emergency Event Prediction Using LSTM Recurrent Neural Networks. Expert Syst. Appl. 2018, 97, 315–324. [Google Scholar] [CrossRef]
  23. Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
  24. Lave, M.; Hayes, W.; Pohl, A.; Hansen, C.W. Evaluation of Global Horizontal Irradiance to Plane-of-Array Irradiance Models at Locations across the United States. IEEE J. Photovolt. 2015, 5, 597–606. [Google Scholar] [CrossRef]
  25. Gairaa, K.; Bakelli, Y. A Comparative Study of Some Regression Models to Estimate the Global Solar Radiation on a Horizontal Surface from Sunshine Duration and Meteorological Parameters for Ghardaïa Site, Algeria. ISRN Renew. Energy 2013, 2013, 1–11. [Google Scholar] [CrossRef]
Figure 1. An instrument to record sky image data. (a) Total Sky Camera J1006; (b) sky camera calibration using the checkerboard image.
Figure 1. An instrument to record sky image data. (a) Total Sky Camera J1006; (b) sky camera calibration using the checkerboard image.
Applsci 11 05049 g001
Figure 2. Solar irradiance measurement equipment installed on the rooftop of Kookmin University. (a) MS-80 pyranometer to measure the global horizontal irradiance; (b) measurement station location.
Figure 2. Solar irradiance measurement equipment installed on the rooftop of Kookmin University. (a) MS-80 pyranometer to measure the global horizontal irradiance; (b) measurement station location.
Applsci 11 05049 g002
Figure 3. Day classification based on the distribution of mean clear-sky index ( μ k t ) and clear-sky index variability ( δ k t ) .
Figure 3. Day classification based on the distribution of mean clear-sky index ( μ k t ) and clear-sky index variability ( δ k t ) .
Applsci 11 05049 g003
Figure 4. The variability of GHI measurement for clear-sky day (8 June 2020), partly cloudy day (4 June 2020), and overcast day (24 June 2020).
Figure 4. The variability of GHI measurement for clear-sky day (8 June 2020), partly cloudy day (4 June 2020), and overcast day (24 June 2020).
Applsci 11 05049 g004
Figure 5. Flow chart for determining cloud cover using red, green, and blue (RGB) channels of an image.
Figure 5. Flow chart for determining cloud cover using red, green, and blue (RGB) channels of an image.
Applsci 11 05049 g005
Figure 6. The architecture of the long short-term memory (LSTM).
Figure 6. The architecture of the long short-term memory (LSTM).
Applsci 11 05049 g006
Figure 7. Mean cloud cover distribution and mean clear-sky index for each day data. Note: the mean clear-sky index was changed by the opposite original value to follow the cloud cover definition.
Figure 7. Mean cloud cover distribution and mean clear-sky index for each day data. Note: the mean clear-sky index was changed by the opposite original value to follow the cloud cover definition.
Applsci 11 05049 g007
Figure 8. Universal variability index (UVI) for 10 min ahead forecasting in different sky conditions: clear sky, partly cloudy, and overcast day.
Figure 8. Universal variability index (UVI) for 10 min ahead forecasting in different sky conditions: clear sky, partly cloudy, and overcast day.
Applsci 11 05049 g008
Figure 9. Comparison between proposed and persistence models using the mean values of RMSD and UVI for 10-min forecast horizon in partly cloudy, clear, and overcast days.
Figure 9. Comparison between proposed and persistence models using the mean values of RMSD and UVI for 10-min forecast horizon in partly cloudy, clear, and overcast days.
Applsci 11 05049 g009
Table 1. The coefficients to estimate global horizontal irradiance (GHI) for each model.
Table 1. The coefficients to estimate global horizontal irradiance (GHI) for each model.
ModelAB
Kasten0.753.4
Yoo [16]0.752.6
Proposed0.953.4
Table 2. The hyperparameters used in designing the LSTM model.
Table 2. The hyperparameters used in designing the LSTM model.
HyperparameterSearching for Optimal ValueOptimal Value
Epoch[50,100,200,300,400,500]300
Activation functionReLUReLU
Batch size[64,128,256]128
Optimization AdamAdam
Learning rate0.0010.001
Table 3. Evaluation metrics of forecast performance between the proposed, the Yoo, and the persistence models for partly cloudy days.
Table 3. Evaluation metrics of forecast performance between the proposed, the Yoo, and the persistence models for partly cloudy days.
Forecast HorizonProposedYoo [16]Persistence
RMSDMBDrMSDrMBDRMSDMBDrMSDrMBDRMSDMBDrMSDrMBD
(minute)(Wm−2)(Wm−2)(%)(%)(Wm−2)(Wm−2)(%)(%)(Wm−2)(Wm−2)(%)(%)
1137.007.5818.051.66144.12−50.7218.98−11.14219.70−10.1328.943.81
2143.6712.7620.082.97153.20−60.9121.41−14.19343.1735.5247.966.70
3154.72−6.5720.92−1.48165.26−78.4122.35−17.67379.9211.7651.386.95
4167.50−30.1921.31−6.40173.02−92.7722.01−19.67319.28−59.6540.615.17
5166.49−14.7521.68−3.20172.28−78.4922.44−17.04296.78−43.6138.655.03
6173.8417.7723.153.94181.78−39.7924.21−8.83310.31−35.9441.335.50
7178.33−16.3623.49−3.59185.04−84.1524.37−18.47169.01−12.9622.262.93
8190.83−20.8626.03−4.74201.44−100.8927.47−22.93170.847.1323.303.18
9187.02−31.1925.49−7.09205.31−115.2127.99−26.17299.6015.4240.845.57
10199.75−60.6525.10−12.70214.97−131.5327.01−27.54317.94−43.2839.955.02
Table 4. Root mean square difference (RMSD) between the proposed, the Yoo, and the persistence models for clear days and overcast days.
Table 4. Root mean square difference (RMSD) between the proposed, the Yoo, and the persistence models for clear days and overcast days.
Forecast HorizonClear DaysOvercast Days
ProposedYoo [16]PersistenceProposedYoo [16]Persistence
(minute)(Wm−2)(Wm−2)(Wm−2)(Wm−2)(Wm−2)(Wm−2)
120.5935.446.2017.7474.322.52
231.5939.157.7916.7390.663.66
337.8031.7814.0418.1798.264.67
445.7041.4020.9219.4199.869.43
545.5657.5628.2619.34104.516.64
629.6959.6856.2420.20138.795.48
734.7654.0541.7420.46119.068.30
834.1553.7638.2817.33158.657.26
940.2758.2049.2615.60155.476.48
1043.0863.7452.4917.37169.869.98
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Rajagukguk, R.A.; Kamil, R.; Lee, H.-J. A Deep Learning Model to Forecast Solar Irradiance Using a Sky Camera. Appl. Sci. 2021, 11, 5049. https://doi.org/10.3390/app11115049

AMA Style

Rajagukguk RA, Kamil R, Lee H-J. A Deep Learning Model to Forecast Solar Irradiance Using a Sky Camera. Applied Sciences. 2021; 11(11):5049. https://doi.org/10.3390/app11115049

Chicago/Turabian Style

Rajagukguk, Rial A., Raihan Kamil, and Hyun-Jin Lee. 2021. "A Deep Learning Model to Forecast Solar Irradiance Using a Sky Camera" Applied Sciences 11, no. 11: 5049. https://doi.org/10.3390/app11115049

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop