*2.2. Forecasting Problems*

There are several variants of the forecasting problem which arise in PV: weather forecasting, solar irradiance forecasting and energy production forecasting, which is to estimate the energy production of the system. This is really important to optimize the real-time management of systems that use this kind of energy (smart cities, villages, etc.). This problem has high priority for electric companies because they want a more robust and reliable system to predict the changes in energy loads and demands. Another important aspect is the amount of time that has to be predicted.


Another important factor for forecasting is the number of parameters, the amount of information and data is key when it comes to obtaining a precise forecasting model, but it is also true that sometimes too much data can provide noise or misleading information that can injure performance.

Each kind of forecasting is usually tacked as a different problem, since the amount of data and precision required are highly different. More information about forecasting can be found in [17].

#### *2.3. Estimation of Parameters of Model Circuits*

The simulation of PV systems is important to optimize the production of the real systems. It is know that any PV can be modeled and represented by an equivalent electric circuit, whose parameters control the predicted or estimates operation of the PV cell or module. The single-diode circuit presents five unknown parameters [18,19] (*Iph*, *Isd*, *Rl*, *Rsh* and *n*), and the output current is evaluated as follows:

$$I = I\_{ph} - I\_{sd} \times \left[ \exp\left(\frac{q \times (V\_L + R\_s \times I\_L)}{n \times k \times T}\right) - 1\right] - \frac{V\_L + R\_S \times I\_L}{R\_s h}$$

where *IL*, *Iph*, *Id* and *Ish* are the solar cell output current, total current, diode current and shunt current, respectively. *Rs* represents the series, and *Rsh* denotes the shunt resistances. In addition, *VL* means the cell output voltage; *n* is the ideal factor of diode. *k* represents the Boltzmann constant, which is set as 1.3806503 × <sup>10</sup><sup>23</sup> J/K; *<sup>q</sup>* is set as 1.60217646 × <sup>10</sup><sup>19</sup> C, which is the electron charge, and *T* means the cell absolute temperature.

The double-diode model presents seven unknown parameters [18,19] (*Iph*, *Isd*1, *Isd*2, *Rl*, *Rsh*, *n*<sup>1</sup> and *n*<sup>2</sup> ), and the output current is evaluated as follows:

$$\begin{aligned} I\_L &= I\_{ph} - I\_{sd1} \times \left[ \exp\left(\frac{q \times (V\_L + R\_s \times I\_L)}{n\_1 \times k \times T}\right) - 1 \right] \\ &- I\_{sd2} \times \left[ \exp\left(\frac{q \times (V\_L + R\_s \times I\_L)}{n\_2 \times k \times T}\right) - 1 \right] - \frac{V\_L + R\_S \times I\_L}{R\_s h} \end{aligned}$$

where *Isd*<sup>1</sup> and *Isd*<sup>2</sup> represent the diffusion and saturation currents, while *n*<sup>1</sup> and *n*<sup>2</sup> represent the ideal factors of diffusion and recombination diode. The other parameters have the same meaning as the previous equation.

This problem is presented as a optimization problem, where the output to optimize is *IL*, and the variables to be found are the unknown parameters.
