# A Deep Learning Model to Forecast Solar Irradiance Using a Sky Camera
## 3 Methods
### 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  
Figure 5: Flow chart for determining cloud cover using red, green, and blue (RGB) channels of an image. 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 [PERSON] et al. [16]. The GHI is calculated using this formula:  
\[GHI=GHI_{c}\times(1-A\times(0.125\times CC)^{B}) \tag{3}\]  
\[GHI_{c}=C\times\sin(\alpha)-D \tag{4}\]  
where \(CC\) is the cloud cover, \(GHI_{c}\) is the solar irradiance on clear sky condition, \(\alpha\) 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 [PERSON]'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, [PERSON] et al. [17] calculated clear-sky irradiance in combination with the solar zenith angle and the eccentricity of the earth. [PERSON] et al. [18] estimated solar irradiance based on commonly measured variables, such as temperature, rainfall, and humidity. [PERSON] 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 [PERSON] 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:  
\[GHI_{c}=c_{g1}\times I\times\cos(\theta_{z})\times\exp(-c_{g2}\times AM\times (f_{h1}+f_{h2}\times(T_{L}-1)))\times\exp(0.01\times AM^{1.8}) \tag{5}\]  
\[AM=\frac{1}{\cos(\theta_{z})+0.50572\times\left(96.07995-\theta_{z}\right)^{-1.6364}} \tag{6}\]  
\[f_{h1}=\exp(-d/8000) \tag{7}\]  
\[f_{h2}=\exp(-d/1250) \tag{8}\]  
\[c_{g1}=5.09\times 10^{-5}\cdot d+0.868 \tag{9}\]  
\[c_{g2}=3.92\times 10^{-5}\cdot d+0.0387 \tag{10}\]  
where \(I\) is extraterrestrial normal incident irradiance, \(\theta_{z}\) is solar zenith, \(AM\) 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. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Model** & **A** & **B** \\ \hline Kasten & 0.75 & 3.4 \\ Yoo [16] & 0.75 & 2.6 \\ Proposed & 0.95 & 3.4 \\ \hline \hline \end{tabular}
\end{table}