## 3 Simulation Results
### Model Validation  
In order to evaluate the accuracy of the three-phase unbalanced power flow and the network parameters, voltage values obtained from the unbalanced three-phase power flow were compared to the actual voltage values supplied by the DSO and measured from the network, for four representative days of the four seasons of the year. In Figure 6 is shown the total active power consumption for the four representative days. In Figures 7-10 are shown the comparisons between the historical voltage profiles and voltage profiles obtained through the three-phase unbalanced PF for the node electrically more distant from the distribution transformer for the four representative days.  
\begin{table}
\begin{tabular}{c c} \hline
**Contracted** & **Microgeneration Installed** \\
**Power, [kVA]** & **Capacity, [kW]** \\ \hline
1.15 & 0.50 \\
3.45 & 1.00 \\
4.60 & 1.50 \\
5.75 & 1.75 \\
6.90 & 2.00 \\
10.35 & 2.50 \\
20.70 & 4.00 \\
27.60 & 5.00 \\
41.40 & 7.50 \\ \hline \end{tabular}
\end{table}
Table 2: Network characterization. Generation installed capacity, according to the contracted power.  
\begin{table}
\begin{tabular}{l l l l l l l} \hline  & & **Phase R** & **Phase S** & **Phase T** & **Phase RST** & **Total** \\ \hline Number & Total consumers & 46 & 44 & 31 & 8 & 129 \\  & Consumers w/HEMS & 14 & 13 & 9 & 2 & 38 \\  & Consumers w/HEMS, \% & 30.43\% & 29.55\% & 29.03\% & 25.00\% & 29.46\% \\ \hline Contracted & Total consumers & 212.75 & 215.05 & 143.75 & 144.9 & 716.45 \\ power, [kVA] & Consumers w/HEMS & 65.55 & 65.55 & 43.70 & 27.60 & 202.40 \\  & Consumers w/HEMS, \% & 30.81\% & 30.48\% & 30.40\% & 19.05\% & 28.25\% \\ \hline Microgeneration & Total producers & 61.75 & 65.00 & 42.50 & 29.50 & 198.75 \\ installed capacity, & Producers w/HEMS & 19.75 & 21.00 & 13.25 & 6.00 & 60,00 \\ [kW] & Producers w/HEMS, \% & 31.98\% & 32.31\% & 31.18\% & 20.34\% & 30.19\% \\ \hline \end{tabular}
\end{table}
Table 3: Network characterization. Summary of the number, contracted power and of consumers with and without Home Energy Management System (HEMS).  
Figure 8: Model validation. Voltage profiles—Spring day.  
Figure 6: Model validation. Total active power consumption for the four representative days.  
Figure 7: Model validation. Voltage profiles—Winter day.  
The accuracy of the three-phase unbalanced power flow was evaluated through two different metrics, the Mean Absolute Percentage Error (MAPE) and the Root-Mean-Square Error (RMSE). The MAPE and RMSE are respectively given by:  
\[\text{MAPE}=\frac{100\%}{n}\sum_{t=1}^{n}\left|\frac{A_{t}-F_{t}}{A_{t}}\right| \tag{6}\]  
\[\text{RMSE}=\sqrt{\frac{\sum_{t=1}^{n}\left(F_{t}-A_{t}\right)^{2}}{n}}, \tag{7}\]  
where \(n\) is the number of instants, and \(A_{t}\) and \(F_{t}\) are respectively the actual and forecasted values for the instant \(t\). The MAPE and RMSE values obtained per phase for the node electrically furthest to the MV/LV transformer, for the four representative days, are listed in Table 4. As it is possible to see from Figures 7-10, and Table 4, the voltage values obtained are very close to the historical voltage values. The day where the voltage values present the highest error is the Winter day, with an average MAPE of 1.70%. The errors also have the tendency to decrease over time. The higher errors obtained for the Winter days may be explained by some configuration and synchronization  
Figure 10: Model validation. Voltage profiles—Autumn day.  
Figure 9: Model validation. Voltage profiles—Summer day.  
errors in the acquisition of the data from the AMI. As these issues were solved, the voltage error values decreased significantly. The results obtained validate not only the accuracy of the unbalanced three-phase power flow implementation, but also the network's electrical characteristics.