## 3 Test Results and Discussion
Once again, a remarkable similarity between the results can be observed, indicating the effectiveness of the ANN in forecasting  
Figure 7: Results (estimated data) for desired output (target—Y\({}_{\text{des}}\)) in the sample validation phase versus (**a**) output obtained (Y\({}_{\text{ob}}\)) via ANN; (**b**) output obtained via first-degree polynomial regression; (**c**) output obtained via second-degree polynomial regression; (**d**) output obtained via third-degree polynomial regression. consumption. Figure 9 displays a three-dimensional graph of the error between the desired output and the output obtained by the ANN, also in relation to the days and time. The analysis reveals that most of the error values remained very close to zero, with only a few slight deviations, further reinforcing the accuracy of the model in estimating energy consumption data. Although the neural network was well-trained, with an MSE of around 0.06364 for training and 0.10629 for validation, small errors occurred at certain points when comparing the real values with the values predicted by the ANN, as evidenced by the peaks in the surface graph of Figure 9.  
Finally, after training and validating the neural network with the weights W and biases adjusted and stored, Figure 10 presents a forecast of the energy consumption for the same residence for the first three days of February 2023. The analysis reveals that the ANN was able to accurately predict the energy consumption values, which were very close to the desired (target) values. Figure 8: Energy consumption (kWh) according to days in January 2023 and time (h), (**a**) target—desired output—Y\({}_{\text{des}}\), (**b**) obtained output via ANN—Y\({}_{\text{obj}}\). For this estimation, 144 samples were used, with 48 samples for each day, incorporating 7 distinct variables (voltage, current, active power, power factor, frequency, days, and minutes) for each sample. With these data, the ANN demonstrated its capability to forecast future energy consumption with a high level of precision, proving it to be an effective tool for modeling energy consumption patterns. Residential consumers can significantly benefit from short-term consumption forecasting methods, as discussed in this study. Accurate energy consumption forecasts provide residents with detailed insights into their usage habits, enabling them to identify peak usage periods and shift their consumption to off-peak hours, thereby taking advantage of lower prices. This is particularly advantageous in situations where time-of-use pricing is implemented, resulting in direct savings on electricity bills. Furthermore, these forecasts can facilitate the adoption of more energy-efficient technologies, such as residential solar power systems and energy storage solutions. Consumers with a better understanding of their consumption patterns are more likely to invest wisely in energy-efficient technologies, including solar panels for self-generation and batteries for storing energy during off-peak hours. The enhanced quality and availability of information provided by smart grid technology and smart meters empower users to take proactive measures to improve their homes' energy efficiency, reducing waste and promoting more sustainable energy usage. Additionally, the ability to forecast consumption enhances integration with home automation systems, which can automatically adjust energy usage in response to forecasts, thereby increasing efficiency and generating long-term savings. Notwithstanding the good results, some difficulties need to be addressed. Scalability is a big difficulty; while the approach worked effectively in a home setting, its performance  
Figure 10: ANN’s estimated values for electricity consumption for the first three days of February 2023. Figure 9: Error between the desired (target) and obtained (via ANN) outputs for the 1484 samples as a function of time (days and hours). may vary in other contexts, such as entire neighborhoods, commercial districts, or smart buildings.