## 5 Results and Discussion
### Experimentation Results
Meanwhile, in the case of the THD estimation, the errors obtained indicate that when using the GA, the estimation error never goes beyond 2%. Regarding the results obtained using the ANN, they are very variable, and the errors fluctuate between 3.2% and 33.2%, showing that the ANN is not as reliable as the GA for this particular estimation. The results obtained using the proposed methodology are meaningful because they show that the proper  
Figure 4: Comparison between the real and the estimated active power for (**a**) 13 August, (**b**) 12 September, (**c**) 27 October, (**d**) 13 November, (**e**) 9 January, (**f**) 10 February, (**g**) 20 March, and (**h**) 21 March. combination of sun irradiance, cell temperature, DC voltage, and DC current can reasonably estimate the active power of a whole production day in PV systems. However, a more important fact is that the proposed approach can also describe the THD associated with the generation process. Having a priori knowledge of the quality of a generation process is important from the smart grid point of view in order to guarantee a reliable and robust supply. On the other hand, it has been demonstrated that even slight variations in the operating conditions of the PV system may affect the harmonic distortion in the network [7]. This situation can be verified by performing a comparison between Figures 4 and 5; for instance, Figure 4b presents a day with variations in the irradiance conditions, whereas Figure 4e presents another day without sudden variations. Consequently, Figure 5b presents a higher THD value than Figure 5e, confirming the fact that variations in the operation conditions have an impact on the resulting THD. From Table 3, it is observed that in the case of the THD, both methodologies present the highest estimation error in the month of March. However, the second month with the highest error correspond to November for the GA approach and January for the ANN approach, respectively. In this sense, it is important to mention that there exist other factors (such as the network impedance) that are related to the existing THD, and these factors are not considered in this particular model. Therefore, through the  
Figure 5: Comparison between the real and the estimated THD for (**a**) 13 August, (**b**) 12 September, (**c**) 27 October, (**d**) 13 November, (**e**) 9 January, (**f**) 10 February, (**g**) 20 March, and (**h**) 21 March. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Day**} & \multicolumn{4}{c}{**Estimated Error (\%)**} \\  & \multicolumn{2}{c}{**Active Power**} & \multicolumn{2}{c}{**THD (Total Harmonic Distortion)**} \\  & **GA (Genetic Algorithms)** & **ANN (Artificial Neural Network)** & **GA** & **ANN** \\ \hline Aug & 0.10 & 0.70 & 0.60 & 6.50 \\
13 th & Sep & 0.44 & 0.50 & 0.22 & 3.30 \\
12 th & Oct & & & & \\
27 th & 0.38 & 0.08 & 0.61 & 3.90 \\ Nov & 0.34 & 1.40 & 1.10 & 3.20 \\ Jan & 0.20 & 4.30 & 0.33 & 22.00 \\
9 th & Feb & & & & \\
10 th & 0.07 & 2.90 & 0.08 & 16.00 \\ Mar & 0.21 & 1.10 & 1.20 & 13.00 \\ Mar & 0.71 & 0.70 & 1.10 & 33.40 \\
21 st & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Error in the generated active power in the THD prediction. effects of non-considered factor changes, the accuracy of any methodology may be compromised; thus, as has been previously mentioned, the error in the estimation does not necessarily follow the same tendency in both methodologies. This means that the accuracy of the estimation would depend on the robustness of the used methodology to the variation of non-considered parameters. In this case, the GA methodology seems to be more robust to these kinds of variations.