## 3 Methods
### Prediction
#### 3.2.2 Power Production Prediction  
In order to make optimal consumption schedules, it is important to predict the solar energy production for the next 24 h, and this is done by modeling the global horizontal irradiance (_GHI_) values. In this work, two methods are used to make the _GHI_ prediction. The first one is called \"Meteorological Method\" and is based, as the name suggests, on meteorological data. The second one doesn't consider that data, and it is called \"Statistical Method\". The Global Horizontal Irradiance (_GHI_), first calculated by the meteorological method (sub-section _a._) and then by the statistical method (sub-section _b._), was used to predict power production. Then the calculated production predictions were compared.  
Meteorological method for GHI predictionIn the meteorological method, the solar irradiance calculated for clear sky situations in a specific area can be approximated by models that consider the solar zenith angle (the \"z\" parameter in Equation (1)). It has been shown in [18] that the model that best approximates the global horizontal irradiance (_GHI_) at the clear sky is the Adnot-Bourges-Campana-Gicquel, formulated as in (Equation (1)):  
\[GHI=951.39\times cos(z)^{1.15} \tag{1}\]  
The parameters 951.39 and 1.15 are regression parameters empirically calculated. The computed _GHI_ in Equation (1) is related to the clear sky scenario (\"_clear sky GHI_\"). Then, the \"_measured GHI_\" is estimated using Equation (2) extracted from [18]  
\[\text{{measured }}GHI=\text{{clear sky }}GHI\times(1-\alpha\times cloudiness^{n}) \tag{2}\]  
Equation (2) is based on the okta of covered sky, which is a specific unit measurement used to describe the amount of cloud cover in a given location. The used coefficients \(\alpha\) and \(n\) are the same as those in [18]. Precisely, \(\alpha\) is 0.51 and \(n\) is 6.42.  
Statistical method for GHI predictionIn the statistical method, as stated in [3], the solar irradiance can be modeled using the function of probability density Beta (Equation (3)).  
\[f(GHI\ )=\frac{\gamma(\alpha+\beta)}{\gamma(\alpha)\gamma(\beta)}\times GHI \ ^{(\alpha-1)}\times(1-GHI\ )^{(\beta-1)},\ 0<GHI\ (t)<\infty \tag{3}\]  
where _GHI_ is the solar irradiance in kW\(\alpha\)m\({}^{2}\); _f_(_GHI_) is the beta distribution function of _GHI_; and \(\alpha\), \(\beta\) are the parameters of the beta distribution function. As stated in [3], the parameters are computed from the mean \(\mu\) and the standard deviation \(\sigma\) of the random variable _GHI_. Hence, the used formulas are:  
\[\beta=\left(\frac{\mu\times(1+\mu)}{\sigma^{2}}-1\right)\times(1-\mu) \tag{4}\]  
\[\alpha=\frac{\mu\times\beta}{1-\mu} \tag{5}\]  
Prediction of the power production The prediction of electricity production was mainly modeled using the model presented by [PERSON] et al. [19] and reported in the next formulas. The used formulas are:  
\[P_{ac}=0.92\times P_{n}\times GHI\times\eta_{DC-AC}\times(1-\gamma\times\Delta T _{c})/1000 \tag{6}\]  
where \(P_{n}\) is the rated power of the \(PV\) system (1-100 kWp), \(GHI\) is the global irradiance on a fixed plane, \(\eta_{DC-AC}\) is the inverter efficiency (95%), \(\gamma\) is the power temperature coefficient (0.007), and \(\Delta T_{c}\) is:  
\[\Delta T_{c}=|25-(T_{d}+(NOCT-20)\times GHI/800)| \tag{7}\]  
where \(T_{d}\) is the average daytime temperature profile calculated for each day in a year, \(NOCT\) is the \"Normal Operating Cell temperature\" (45 \({}^{\circ}\)C), and \(GHI\) is the global irradiance on a fixed plane. The values used are in line with those used by [19].