<figure><img src="image_1.png" /></figure>

HAL
open science

# Comparative analysis of machine learning models for prediction and forecasting of electric water boilers energy consumption

Ibrahim Ali Kachalla, Christian Ghiaus, Majid Baseer

► To cite this version:

Ibrahim Ali Kachalla, Christian Ghiaus, Majid Baseer. Comparative analysis of machine learning models for prediction and forecasting of electric water boilers energy consumption. Applied Thermal Engineering, 2025, 267, pp.125799. 10.1016/j.applthermaleng.2025.125799. hal-04936749

HAL Id: hal-04936749

https://hal.science/hal-04936749v1

Submitted on 9 Feb 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Comparative Analysis of Machine Learning Models for Prediction and Forecasting of Electric Water Boilers Energy Consumption

**Authors:** Ibrahim Ali Kachalla¹,*, Christian Ghiaus, Majid Baseer

**Address:** Centre d'Energétique et de Thermique de Lyon, CETHIL UMR5008, INSA Lyon, Université de Lyon, F-69621 Villeurbanne, France;

*Corresponding author

E-mail addresses :

ibrahim-ali.kachalla@insa-lyon.fr¹,*, christian.ghiaus@insa-lyon.fr², majid.baseer@insa-lyon.fr³

## Key Highlights:

* Comprehensive evaluation of ARIMA, SVR, and ANN models for predicting and forecasting EWBs energy consumption in residential buildings.

* Highlights the impact of short (10-minute) and long-time-step scenarios on prediction and forecasting accuracy.

* Demonstrates ANN's superior performance (R² up to 1.00) in capturing non-linear user behaviour patterns.

* Presents trade-offs between accuracy and computational efficiency for regression (ARIMA) and machine learning models (SVR and ANN).

* Establishes a framework for EWB energy consumption forecasting, applicable to MPC integration, EVs, smart grid management, and related applications.

## Abstract

In the quest to accurately predict energy consumption in high-rise residential buildings for model predictive control implementation to enhance energy efficiency and address energy poverty, this study compares two supervised learning algorithms (support vector regression (SVR) and multi-layer perceptron (MLP) artificial neural network (ANN)) and a regressive forecasting technique (ARIMA). These methods are used to predict and forecast energy consumption for electric water boilers in a residential building consisting of 67 apartments, based on six months of data as a case study. The unique approach of the study involves five distinct scenarios with different timesteps: 1) 10-minute intervals of daily energy consumption, 2) hourly daily consumption, 3) daily consumption during the winter season, 4) daily consumption during the spring season, and 5) daily energy consumption for six months. These timesteps are used for the prediction (one time-step ahead) and forecasting (many time-steps ahead) of electricity consumption by the hot water boilers. The objective is to evaluate the effectiveness, accuracy, and computational efficiency of these scenarios in both prediction and forecasting. Furthermore, the paper presents the performance metrics of each method,
highlighting their respective strengths and weaknesses. In conclusion, the SVR model demonstrated average overall performance compared to the ANN and ARIMA models, with noteworthy results in scenario 2 with 1 hour time steps. The paper offers recommendations and suggests areas for future research and potential model optimisations to enhance demand-side management and advance energy conservation initiatives in residential buildings.

**Keywords:** Energy consumption, Electric water boilers, Domestic hot water consumption, Prediction modeling, Machine learning, residential building, Renewable energy grid management.

**Nomenclature**

$X_t$

Observed energy consumption at time $t$

$X_{t-n+1}, X_{t-n+2}, \dots, X_t$

Past observations used as input for prediction or forecasting

$X_{input}$

Input vector consisting of past observations

$\hat{X}_{t+1}, \hat{X}_{t+2}, \dots, \hat{X}_{t+H}$

Predicted or forecasted energy consumption values for future time steps

$Y_i$

Actual observed value of the dependent variable

$\hat{Y}_i$

Predicted or observed value of the dependent variable

$\bar{Y}$

Mean of the observed values

$R^2$

Coefficient of determination, the proportion of variance in the dependent variable

$W^{[layer]}$

Weight matrix for a specific layer of the ANN

$b^{[layer]}$

Bias vector for a specific layer of the ANN

$a^{[layer]}$

Activation values of neurons in a specific layer of the ANN

$g^{[layer]}$
Activation function for a specific layer

$\sigma(x)$

Sigmoid activation function

$f:$

Function mapping input observations to predicted values

$H$

Forecasting horizon (number of future steps predicted)

$P$

Number of past observations used as input

$w$

Weight vector, the direction and magnitude of the decision boundary in SVR

$b$

Bias term, shifting the decision boundary in SVR

$\xi_i, \zeta_i$

Slack variables, accommodating deviations beyond $\epsilon$

$\alpha_i$

Lagrange multipliers used in SVR optimization.

$\epsilon$

Epsilon-insensitive loss parameter, defining margin of tolerance for model error

$K(x, y)$

Kernel function, mapping input data into higher-dimensional space

$\sigma$

Bandwidth parameter in the Gaussian (RBF) kernel

## Abbreviations

ANN

Artificial Neural Network

ARIMA

Autoregressive Integrated Moving Average

DHW

Domestic Hot Water

SVR

Support Vector Regression

RBF
Radial Basis Function

EWB

Electric Water Boiler

SC

Scenario

MPC

Model Predictive Control

EV

Electric Vehicle

AIC

Akaike Information Criterion

ACF

Autocorrelation Function

Hidden Layer

Intermediate layer in the ANN that processes input features to learn patterns

Output Layer

Final layer in the ANN, producing predictions or forecasts

Weights (W)

Parameters learned by the ANN to adjust the importance of inputs

Bias (b)

Additional parameters to shift the activation functions

RMSE

Root Mean Squared Error

MAE

Mean Absolute Error

MSE

Mean Squared Error

# 1. Introduction

The residential sector accounts for a significant portion of global energy usage. It represents approximately 26 % of total final energy use and is estimated to constitute about one-third of worldwide energy consumption. Nationally, this figure can vary, sometimes reaching as high as 50 % in specific contexts, such as French social housing sector [1]. Implementing energy-saving strategies in the residential sector holds substantial potential for reducing overall energy
consumption and, consequently, CO₂ emissions. A key component in achieving this is the development of robust prediction models. These models aim to accurately predict and forecast residential energy consumption patterns based on occupant behaviour over time and across different seasons, facilitating efficient energy resource management through the application of model predictive controllers (MPC). The accuracy of these models is crucial for enhancing effective model predictive control (MPC) strategies for demand-side response management [2], [3]. However, creating these prediction models poses significant challenges. They range from adapting to the intricacies of time series data and regression analysis to addressing the non-linearity inherent in user behaviour, particularly concerning daily and seasonal variations of hot water usage. Effectively predicting and forecasting residential energy consumption has been a persistent research challenge, emphasising the need for continued exploration and development in this field [4]. Within this work, prediction, and forecasting models are applicable distinctly. These applications are as follows:

i. Prediction refers to the estimation of values in a time series at time $t$, expressed as $\hat{Y}_t = f(Y_{t-1}, Y_{t-2}, \dots, Y_{t-n})$, where $\hat{Y}_t$ is the predicted value for the time period $t$, based on previous observations $Y_{t-1}, Y_{t-2}, \dots, Y_{t-n}$.

ii. Forecasting specifically involves estimating future values in a time series, expressed as $\hat{Y}_{t+k} = g(Y_t, Y_{t-1}, \dots, Y_{t-n})$, where $k = \{1, 2, 3, \dots\}$ and $\hat{Y}_{t+k}$ denotes an estimate for a future time period $t+k$, explicitly based on the sequence of past data points $Y_t, Y_{t-1}, \dots, Y_{t-n}$. This approach inherently assumes and leverages the temporal ordering of data points to project into the future [5].

Predicting and forecasting electric water boiler (EWB) consumption accurately presents a complex challenge, largely due to the difficulty in identifying trends and patterns in hot water usage over time. Time series data, which reflects occupant behaviour, require robust modeling approaches. Prediction and forecast models have evolved significantly, transitioning from traditional statistical methods to advanced statistical and machine learning techniques [6]. In this context, time series models like autoregressive integrated moving Average (ARIMA) have been widely utilised for their ability to capture seasonal trends, stochastic behaviours, and temporal dynamics in energy data. In 2006 a research conducted by De Gooijer and Hyndman, provide a thorough review of time series forecasting methods, particularly emphasising their utility in energy consumption prediction [7]. Traditional regression analysis, such as linear regression, plays a crucial role in modelling the relationship between energy consumption and various influencing factors, including ambient temperature and usage patterns. Engle & Granger work on cointegration in economic time series laid the groundwork for using
regression methods in analysing time-dependent data [8]. Methods such as support vector regression (SVR) and ARIMA are often used due to their interpretability and simplicity. SVR, an extension of the support vector machine (SVM) model, is effective in regression tasks and is considered a machine learning technique.

Machine learning technologies like artificial neural networks (ANNs) have become increasingly popular for modeling EWB consumption due to their ability to handle non-linearity complexities of energy data. Similarly, techniques like SVR and ensemble methods have shown exceptional performance in managing high-dimensional and non-linear data. Kachalla & Ghiaus [4], reviewed methods for predicting energy consumption in EWBs, comparing time-series models like ARIMA, regression models for accuracy and interpretability, and advanced machine learning techniques such as ANN and SVR for handling complex data. The study also reviewed performance evaluation metrics, emphasizing accuracy, precision, computational efficiency, and error reduction. The research also reviews performance evaluation methods, focusing on accuracy, precision, computational efficiency, and error rate reduction as crucial metrics. The study emphasises the need for a comparative analysis of these methodologies: ARIMA (time-series regression), machine learning SVR and ANN specifically for EWB applications, a research gap that has thus far received limited research attention. The potential insights from such a comparative study could be instrumental in selecting the most appropriate modeling technique based on criteria like prediction and forecasting accuracy and computational efficiency.

This study conducts a comparative analysis of time series (ARIMA), regression (SVR), and machine learning (ANN) models, specifically focusing on predicting energy consumption in electric water boilers (EWBs) for residential buildings. The paper aims to address the following key research questions:

1. Computational resources of approaches: How well do the ARIMA, SVR, and ANN models perform across different scenarios in terms of computational cost for scenarios of EWB consumption in residential buildings presented in Table 1?

2. Accuracy in prediction and forecasting: What levels of accuracy do these models achieve in both short-term prediction and long-term forecasting horizons based on the performance metrics of RMSE, MAE, and MSE?

3. Model strengths and weaknesses: What are the significant strengths and weaknesses of these approaches in terms of model implementation, and what areas could be improved?
The research analyses energy consumption data from 67 apartments over 6 months, categorised into 5 distinct scenarios based on different time intervals: 10-minute intervals time-step for daily consumption, hourly daily consumption, seasonal daily consumption in spring and winter, and overall daily energy consumption for 6 months. The features of these five scenarios are shown in Table 1. The “training period” is the duration of historical data used to train and develop the models. “Prediction duration” is the time for which one-time step predictions are done. “Forecast length” denotes the period for which the model forecasts beyond the available data (i.e., the current time).

<table><caption>Table 1: Electric water boiler energy consumption scenarios (time-step) data for forecast and prediction model evaluation</caption><thead><tr><td>Scenarios</td><td>Timestep</td><td>Training period</td><td>Prediction duration</td><td>Forecast length</td></tr></thead><tbody><tr><td>SC1</td><td>10 minutes</td><td>daily</td><td>24 hours</td><td>2 hours</td></tr><tr><td>SC2</td><td>1 hour</td><td>daily</td><td>7 days</td><td>24 hours</td></tr><tr><td>SC3</td><td>24 hours</td><td>winter</td><td>60 days</td><td>30 days</td></tr><tr><td>SC4</td><td>24 hours</td><td>spring</td><td>60 days</td><td>30 days</td></tr><tr><td>SC5</td><td>24 hours</td><td>6 months</td><td>150 days</td><td>30 days</td></tr></tbody></table>

Performance metrics, such as the coefficient of determination ($R^2$), root mean square error (RMSE), mean absolute error (MAE), and mean squared error (MSE), are employed to validate their accuracy and computation efficiency. Finally, the paper suggests potential areas for improvement and future research directions for improving model predictive controller (MPC) application and energy management strategies in residential buildings. The remaining structure of this article is as follows: the next section reviews related work, followed by the model development methodology of the prediction and forecasting models, results and discussion, and then the comparative analysis of models and answers to research question. Finally, the conclusion and recommendations for future research are presented.

## 1.2 Review of related work

Prediction models for electric water boiler (EWB) consumption have evolved significantly, transitioning from traditional physics-based technical measurements to utilising electronic sensors for profiling energy usage over time. This evolution spurred the development of time series techniques for statistical estimation. However, these methods often struggle with capturing trends and seasonal patterns inherent in energy data. While regression methods like ARIMA, seasonal autoregressive integrated moving average (SARIMA), and exponential smoothing can identify linear relationships and seasonal patterns, they are primarily rooted in statistical learning techniques. ARIMA and similar moving average methods are categorised as
both time series and regression techniques [1], [9]. Yet, they face challenges with non-linear
data and typically require data to be stationary, i.e without trends, a constant autocorrelation
structure over time with no periodic fluctuations (seasonality), which often necessitates
transformations in datasets. The integration of regression methods with machine learning has
opened doors to addressing both linear and non-linear data complexities.

Support vector regression (SVR), an extension of support vector machines (SVM), is eminent for its resilience against overfitting, particularly in high-dimensional spaces [10], [11]. However, SVR has its limitations; it is computationally demanding and requires meticulous hyperparameter tuning. artificial neural networks (ANNs), forming the bedrock of contemporary machine learning, excel in modeling intricate patterns and non-linear relationships within data [12], [13]. However, they demand extensive datasets for training and can sometimes be seen as a 'black box' due to their lack of transparency in internal model architecture. The efficiency and accuracy of these methodologies, time series, regression, and machine learning, in prediction and forecasting are heavily dependent on the specific nature of the data and the requirements of the prediction task. Research over the years has given limited attention to a comprehensive experimentation and analysis of these three methods in the context of EWB energy consumption in residential buildings [4]. Table 2 presents the summary of related work comparing prediction and forecasting model analyses in residential buildings for electric water boilers (EWBs).

Perez-Fargallo et al. [14] emphasised the need for dwelling-focused EWB consumption prediction models using stochastic time-series and statistical methods. Analysing data from 98 apartments (2015–2021), the study compared exponential smoothing, the basic structural model (BSM), and the state-space model (SSM). SSM achieved the lowest MAPE in training with tighter confidence intervals (80% and 95%), while exponential smoothing excelled in future estimates within acceptable confidence levels. In contrast, BSM performed poorly, making SSM and exponential smoothing the most suitable methods for domestic hot water (DHW) estimations. Additionally, time-series models, like Gelazanskas and Gamage [15] explored time-series models, including exponential smoothing and ARIMA, for 24-hour forecasts in individual dwellings, highlighting their potential for electric water boiler control. The study reported the best Mean Absolute Scaled Error (MASE) of 0.573 for aggregate data, compared to 0.670 for individual house forecasts. Normalized RMSE for mean consumption data was approximately twice as low, with a 30% improvement in R value and normalized MAE. The best-performing model, STL combined with ETS (ANN), achieved a mean absolute error of 4.4
L/h, outperforming other individual forecasts (range: 4.4 to 6.9 L/h). However, the study did not integrate regression methods with machine learning, such as SVR.

Leiria et al. [11] compared multiple techniques for estimating space heating (SH) and electric water boiler (EWB) demand using data from 28 Danish apartments. They identified the 'maximum peaks' strategy and a combination of the Kalman filter with Support Vector Regression (SVR) as the most effective methods. The overall methodology achieved an error margin of approximately 10% for SH demand, while for domestic hot water (DHW) estimation, the error margin was slightly higher, around 15% for most apartments. Chaerun and Kuan [16] studied power consumption prediction and forecasting for water-cooled chillers using machine learning and deep learning models, including multi-layer perceptron (MLP) and long short-term memory (LSTM). Their results showed high accuracy, with MLP achieving the best prediction performance ($R^2$ = 0.971, MAE = 0.743 kW, RMSE = 1.157 kW). For time-series forecasting, LSTM outperformed other models ($R^2$ = 0.994, MAE = 0.233 kW, RMSE = 1.415 kW), demonstrating predictions and forecasts closely aligned with actual values.

Rzeznik et al. analysed actual hot water usage and heat power demand against forecasts from methodologies like Sander's, Recknagel's, standard methods, and Polish regulations of 2008 and 2015 [17]. The findings showed an average heat power demand of 89.8 ± 8.5 W/person, 211.2 ± 13.7 W/apartment and 4.8 ± 0.3 W/m² with daily water consumption being 26.7 ± 3.6 dm³/person per day, 62.6 ± 5.8 dm³/apartment per day, and 1.4 ± 0.1 dm³/m² day. Significantly, the actual demand was lower than forecasted with the modified standard method (Standard PN – 92/B – 01706/A1:1999), showing the smallest error rate of 10.5 ± 4.1% for predicting hot water consumption. The method was closest to the actual usage, overestimating by about 7.7 ± 5.0 %. The research, however, did not extend to comparing these forecasts with alternative methods nor assessing their predictive accuracy.

However, there is a gap in research on comparative analysis of time series, regression, and machine learning methods for predicting electric water boiler consumption in residential buildings, especially considering distinct electric water boilers data and different predictive horizons and scenarios.

*Table 3* shows the review of similar work with consideration of the gaps and objective of this research.
<table><caption>Table 2: Summary of related work comparing prediction and forecasting methods analyses in residential buildings for Electric Water Boilers (EWBs).</caption><thead><tr><th rowspan="2">Authors</th><th colspan="3">Research Methods</th><th rowspan="2">Prediction horizon</th><th rowspan="2">Forecast horizon</th><th rowspan="2">Data Scenarios</th><th rowspan="2">Application</th><th rowspan="2">Research disparity context</th></tr><tr><th>Time series</th><th>Regression</th><th>Machine Learning</th></tr></thead><tbody><tr><td>Fargallo et al. [14]</td><td>✓1</td><td></td><td></td><td>monthly</td><td>--2</td><td>98 apartments, 2015 to 2021</td><td>Application to EWB</td><td>Did not consider various periods or scenarios and failed to compare with other methods such as regression techniques and machine learning.</td></tr><tr><td>Li et al., [18]</td><td>✓</td><td></td><td></td><td>daily</td><td>--</td><td>1<sup>st</sup> March to March 25, 2020</td><td>Electric equipment (EWB)</td><td>Data was limited, with no consideration given to regression methods or Electric Water Boiler (EWB) applications.</td></tr><tr><td>Schaffer et al. [19]</td><td></td><td>✓</td><td>✓</td><td>hourly</td><td>--</td><td>single-family houses data for 2022</td><td>Space heating & EWBs</td><td>Neglected to consider regression methods and Electric Water Boilers (EWBs) applications only.</td></tr><tr><td>Dalipi et al. [20]</td><td></td><td></td><td>✓</td><td>hourly</td><td>--</td><td>October 1<sup>st</sup> 2014 & April 30<sup>th</sup>, 2015</td><td>District heating system</td><td>Neglected to consider regression methods and applications for Electric Water Boilers (EWBs).</td></tr><tr><td>Tso et al. [21]</td><td></td><td>✓</td><td>✓</td><td>hourly</td><td>--</td><td>Hong Kong</td><td>Electricity consumption</td><td>Overlooked time series methods and applications for Electric Water Boilers (EWBs).</td></tr><tr><td>Sharifi et al. [22]</td><td>✓</td><td></td><td></td><td>hourly</td><td>--</td><td>165 household yearly</td><td>Electricity & EWB</td><td>Failed to consider regression methods and applications for Electric Water Boilers (EWBs).</td></tr><tr><td>Toledo et al. [23]</td><td>✓</td><td></td><td>✓</td><td>2 minutes</td><td>--</td><td>2019–01–28 09:30:00 to 2020–11–01 13:28:00</td><td>Electricity consumption</td><td>Failed to consider regression methods and applications for Electric Water Boilers (EWBs) only.</td></tr><tr><td>Salah et al. [24]</td><td></td><td></td><td>✓</td><td>hourly</td><td>--</td><td>January to February 2011</td><td>Electric power consumption in metropolitan France</td><td>Failed to consider time series and regression methods or applications for Electric Water Boilers (EWBs) only.</td></tr><tr><td>Leiria et al. [11]</td><td>✓</td><td></td><td></td><td>hourly</td><td>--</td><td>28 apartments in Aalborg</td><td>Space heating & EWBs</td><td>Failed to consider regression and machine learning (ML) methods</td></tr><tr><td>Rzeznik et al. [17]</td><td>✓</td><td></td><td></td><td>--</td><td>daily</td><td>2021 Grudziadz, in Central Poland</td><td>EWBs consumption</td><td>Neglected to consider regression and machine learning (ML) methods.</td></tr></tbody></table>

<table><caption>Table 3: Summary of similar studies on prediction and forecast models for electric water boiler applications in residential buildings.</caption><thead><tr><th colspan="3">Research Method</th><th rowspan="2">Prediction</th><th rowspan="2">Forecast</th><th rowspan="2">Authors</th></tr><tr><th>ARIMA</th><th>SVR</th><th>ANN</th></tr></thead><tbody><tr><td></td><td></td><td>✓<sup>3</sup></td><td>✓</td><td></td><td>Merih et al. [25]</td></tr><tr><td></td><td></td><td>✓</td><td></td><td>✓</td><td>Bennett et al. [12]</td></tr><tr><td></td><td></td><td>✓</td><td>✓</td><td></td><td>Mathioulakis et al. [26]</td></tr><tr><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td>Xu et al. [27]</td></tr><tr><td>✓</td><td></td><td></td><td></td><td></td><td>Denis et al. [28]</td></tr><tr><td>✓</td><td></td><td>✓</td><td>✓</td><td></td><td>Barteczko et al. [29]</td></tr><tr><td></td><td>✓</td><td></td><td></td><td></td><td>Lomet et al. [30]</td></tr><tr><td></td><td></td><td>✓</td><td>✓</td><td></td><td>Leiria et al. [11]</td></tr><tr><td>✓</td><td></td><td>✓</td><td></td><td>✓</td><td>Gelazanskas et al. [31]</td></tr><tr><td></td><td></td><td></td><td></td><td>✓</td><td>Gelazanskas [15]</td></tr><tr><td></td><td>✓</td><td></td><td>✓</td><td></td><td>Zhao et al. [32]</td></tr></tbody></table>

<footnote n="1">¹ Method considered by author</footnote>

<footnote n="2">² Method not considered by author</footnote>

<footnote n="3">³ Method considered by author</footnote>
## 2. Methodology

The research methodology used is aimed to compare three prediction models: the ARIMA prediction model, which is a time series and regression method, the SVR method, which is a regression and machine learning method, and the ANN machine learning and time series method, as represented in Figure 1. The core objectives include comparing the prediction and forecast accuracy of the models over five different scenarios for residential electric water boiler applications, as presented in Table 1. The performance of the models is assessed with metrics such as R-square, RMSE, MAE, and MSE. This section presents the detailed model development and research methodology framework as illustrated in Figure 1.

<figure><img src="image_3.png" /><figcaption>Figure 1: Methodology of EWBs energy consumption evaluation methods.</figcaption></figure>

### 2.1. Data description and analysis

Data were obtained from three different residential buildings located in France (C1, C2, and C3), as described in Annex Figure A1. These buildings consist of three different blocks with varying residential unit types, including multiple residential units range from two-room to five-room units, as detailed in Annex Table A1. Energy consumption data for electric water boilers (EWBs) were recorded using IoT-based smart meters installed in the different residential units.
The smart meters provided real-time measurements at 10-minute intervals, and the corresponding energy consumption values were accessed and recorded in kWh for each time step. These data were used to carry out prediction and forecast evaluation, categorising the energy consumption into five distinct scenarios for 67 apartments (Table 1). Data were collected at 10-minute intervals over a 6-month period, from December 1, 2020, at 12:10:00 to June 11, 2021, at 08:50:00.

To address anomalies in the dataset, instances where certain apartments recorded zero or abnormally low consumption (categorised as missing data) were identified. The average energy consumption across apartments and time steps was computed to mitigate data non-linearity and variability, thus enhancing model performance [14]. The data was split into 80% training and 20% testing. Prediction was conducted on the test data (next-step energy consumption), while forecasting used a rolling horizon strategy, where future data beyond the testing range was iteratively forecasted. This split ensured robust evaluation of the model predictive and forecasting capabilities. Figures 3 to 7 present the statistical description of the dataset, illustrating patterns, variability, and the overall energy consumption trends.

## 2.2. ARIMA model development

The ARIMA model is selected for energy consumption prediction owing to its proficiency in analysing time series data, which effectively captures inherent trends, seasonality, and autocorrelation, characteristics frequently observed in energy usage [33], [34], [35]. Its adaptable model structure permits customised fitting to specific datasets. The ARIMA model robust statistical foundation and its integration of autoregressive (AR), differencing (I), and moving average (MA) components enable the removal of trends and seasonality to ensure data stationarity, thereby facilitating the generation of accurate forecasts, as depicted in the development framework shown in Figure 2.

### 2.2.1 Time series decomposition and parametric selection

The time-series patterns are trends, seasonality, and cycles. The trends and cycles are combined as trends (trend-cycle). The time series decomposition has three components: trend, seasonal, and remainder (difference). The optimal order $(p, d, q)$ for the ARIMA model was determined using time series data from electric water boilers energy consumption by iteratively testing various combinations of ARIMA parameters. The best fit was identified based on the Akaike Information Criterion (AIC). Initially, the Dickey-Fuller test was employed to verify the stationarity of the data. Subsequently, a brute-force grid search was conducted over combinations of $p, d$, and $q$ values to find the model that yielded the lowest AIC value as (3, 1, 0).
The AR part of the model captures the previous three values of the time series and the time series lag of $p = 3$ is represented as:

$$X_t = \varphi_1 X_{t-1} + \varphi_2 X_{t-2} + \varphi_3 X_{t-3} \quad (1)$$

where $\varphi_1, \varphi_2$, and $\varphi_3$ are the coefficient of the AR terms of 'p' observations and $X_{t-k}$ represents the past observed value of the time series at time $t-k$.

The integration parameter in the ARIMA model represents the differencing term $d$, which transforms the time series $X_t$ into a stationary series by removing trends and seasonality. Specifically, differencing the time series once, helps to stabilise the mean of the time series by eliminating time-dependent structures, denoted as:

$$\Delta X_t = X_t - X_{t-1} \quad (2)$$

$\Delta X_t$ signifies the differenced series at time step $t$, effectively transforming the original series to achieve stationarity. The Moving Average (MA) component models the error term of the series as a linear combination of past error terms. Specifically, empirical experimental simulation involving the Autocorrelation Function (ACF) was carried out on the dataset, and a single lag was determined to be suitable for the ARIMA model. For a single lag, the moving average $q$ model is defined as $\Theta_1 \varepsilon_{t-1}$, where $\Theta_1$ is the coefficient of the first lag of the error term which is the parameter to be estimated, and $\varepsilon_{t-1}$ represents the past error at the time $t-1$.

### 2.2.3 Prediction and forecasting with ARIMA model

The ARIMA model is fitted to a portion of the data to estimate the model parameters by maximising the likelihood function and the predictions are made using the fitted model which incorporates the estimated AR ($p = 3$), I ($d = 1$), and the MA ($q = 0$) component as:

$$\hat{x}_{t+1} = \zeta + \varphi_1 \Delta X_t + \varphi_2 \Delta X_{t-1} + \varphi_3 \Delta X_{t-2} + \Theta_1 \varepsilon_t \quad (3)$$

where $\hat{x}_{t+1}$ is the predicted value at time $t+1$ and $\zeta$ is constant value. The MA (Moving Average) component models the error term as a linear combination from of $\Theta_1 \varepsilon_t$ in equation 3 to $\Theta_q \varepsilon_{t-q}$ where $\Theta_1$ through $\Theta_q$ are the coefficients of the moving average $q$ terms to be estimated, reflecting the influence of past error terms up to the $q$th lag. The residual error $\varepsilon_t$ is the difference between the observed values and predicted values $\hat{x}_t$ at time $t$ is given by:

$$\varepsilon_t = X_t - \hat{x}_t \quad (4)$$

The maximum likelihood was determined by the function $L(\varphi, \Theta, X)$ where $\hat{x}_t$ predicted values, $X_t$ is the actual observed values, $\varphi$ and $\Theta$ are function parameters and $X$ is the
observed data while, the maximum likelihood estimation finds φ and Θ to maximise L(φ, Θ, X). These residuals from the previous prediction are used in the MA part of the ARIMA model for predictions.

In the application design for electric water boiler energy consumption, the forecasting model employs the entire observed dataset to predict future consumption levels, while the prediction model focuses on estimating values within the observed dataset to validate the model's accuracy. The forecasting model equation projects forecasted values $\hat{x}_{t+1}$ based on past observations and the estimated model parameters as:

$$ \hat{x}_{t+1} = \zeta + \phi_1 \Delta x_t + \phi_2 \Delta x_{t-1} + \phi_3 \Delta x_{t-2} + \theta_1 \epsilon_t \quad (5) $$

where, $\hat{x}_{t+1}$ is the forecasted value at time t + 1, $\zeta$ is a constant term, $\Delta x_t$, $\Delta x_{t-1}$, $\Delta x_{t-2}$ represent the first, second, and third lagged differences of the series, capturing the autoregressive (AR) component, and $\epsilon_t$ denotes the residual error at time t. $\phi_1, \phi_2, \phi_3$, and $\theta_1$ are the coefficients for the AR and moving average (MA) components, respectively.

Prediction, on the other hand, assesses the model fit by comparing predicted values ($\hat{x}_t$) within the observed dataset against actual observed values ($x_t$). For each time point within the dataset, predictions are generated based on the model that has been fitted to the data, while excluding the point being predicted. This formulation allows for predicting current or past time points ($\hat{x}_t$) based on their preceding values and errors. Specifically, the equation for predicting at time t is expressed as:

$$ \hat{x}_t = \zeta + \phi_1 \Delta x_{(t-1)} + \phi_2 \Delta x_{(t-2)} + \phi_3 \Delta x_{(t-3)} + \theta_1 \epsilon_{(t-1)} \quad (6) $$

The parametric estimation was done by minimising the sum of square errors as presented in section 3.5 performance metric analysis. Prediction and forecasted results are presented in section 4.2.1.

## 2.3 SVR model development

The Support Vector Regression (SVR) prediction model is designed based on the optimisation problem by minimising prediction error of the time series prediction model. The objective function is to find a function $f(x)$ that deviates from the actual observed targets $y_i$ by a value not greater than $\epsilon$ for all the training data, while also being as small as possible. The model employs convex optimisation to minimise the following objective function:

$$ \frac{1}{2} \|w\|^2 + C \sum_{i=1}^{n} (\xi_i + Z_i) \quad (7) $$
Where C is the regularisation parameter, w represents the weight vector, $\xi_i$ and $\zeta_i$ are slack variables that accommodate deviations larger than $\epsilon$ for each data point. This minimisation initialises the alpha ($\alpha$) values, which are Lagrange multipliers used in the Support Vector Regression (SVR) optimisation process. The model is subject to the following constraints:

For all i:

$$y_i - (w, x_i) - b \leq \epsilon + \xi_i \quad (8)$$

where, w represents the weight vector, b is the bias, the term $x_i$ represents the feature vector of the i-th data point in the dataset and C is the regularisation parameter which controls the trade-off between the flatness of the decision surface and the amount permissible for violations of the $\epsilon$-insensitive zone as:

$$(w, x_i) + b - y_i \leq \epsilon + \zeta_i \quad (9)$$

$$\xi_i, \zeta_i \geq 0 \text{ for all } i \quad (10)$$

### 2.3.1 Gaussian Kernel function formulation

The support vectors and coefficients are determined by the trained SVR model set of support vectors ($x_i$) and corresponding coefficients ($\alpha_i$) were determined during the training process. The Gaussian kernel computes the new data point $x$ of the kernel $K(x, y)$ function with each support vector $x_i$. These were done by creating input-output pairs from the time series data, which is subsequently used for the supervised learning model (SVR). Initially, these values are set to zero. The Gaussian Kernel (Radial Basis Function - RBF) is used to map input data to higher-dimensional space as:

$$K(x, y) = e^{-\frac{\|x-y\|^2}{2\sigma^2}} \quad (11)$$

where $\sigma$ is the bandwidth parameter, $x$ and $y$ are data points respectively. Subsequently, iteratively updates alpha $\alpha$ values and computes the prediction based on the Gaussian kernel function. The prediction is essentially the sum of the kernel values multiplied by their respective alpha $\alpha$ values, similar to the weighted sum as in equation 10.

### 2.3.2 SVR algorithm implementation

The data time series data is decomposed for regression by creating input and output pairs from the data structure, which are necessary for the supervised learning of the SVR, by initialising sets of i-th data points for $\alpha$ to zero (0) values. These values are Lagrange multipliers of the SVR optimisation problem. Tolerance level is set as stop criterion, while hyperparameters, regularisation parameter ($\epsilon$) and the iterative optimisation was carried out by updating the $\alpha$-values as:
$$ \alpha_i = \alpha_i + y_i - \varepsilon \operatorname{sign}(\alpha_i) - \sum_{j}^{n} \alpha_j K(x, x_i) \quad (12) $$

where $\alpha_i$ & $y_i$ are the coefficients and targeted value is for the $i^{th}$ data point respectively; $\varepsilon$ is the small regularisation term and $K(x, y)$ is the kernel function as represented in equation 11, while the summation $\sum_{j}^{n} \alpha_j K(x, x_i)$ computes the weighted sum of the kernel evaluation between the $i^{th}$ data point and all data points in the set, weighted by their respective $\alpha$-values. The model updates and adjusts each $\alpha_i$ based on the error of the regularisation term, and the influence of all other data points through the kernel function. Additionally, the convergence check loop continues until the change in $\alpha$ values is below the error tolerance threshold of 0.2 and a maximum number of iterations of 1000. This approach ensures that the model neither overfits nor runs indefinitely. Moreover, a small regularisation term of the epsilon-insensitive loss function is set to 0.1 to maintain model robustness. The prediction $\tilde{y}$ is computed as a weighted sum of the kernel values. Each kernel value is weighted by the corresponding coefficient $\alpha$ expressed as:

$$ \tilde{y} = \sum_{i=1}^{n} \alpha_i K(\dot{x}, x_i) + b \quad (13) $$

where $b$ is the bias term learned during training, $\tilde{y}$ is the predicted output for the new input $\dot{x}$; $\alpha_i$ are the coefficients learned during the training; while $K(\dot{x}, x_i)$ is the kernel function applied between the new input $\dot{x}$ and each of the support vectors $x_i$; and $n$ is the number of support vector. These new predictions in the SVR model are made using the learned coefficients and the kernel function to compute the output for new inputs. The model's performance is evaluated using the quantitative estimator Mean Squared Error (MSE etc), which quantitatively measures the accuracy of the model prediction of the targeted variable $y_i$ as new data points estimate.

### 2.3.3 SVR prediction and forecasting

In both prediction and forecasting applications, the Support Vector Regression (SVR) model remains consistent; the distinction arises from the application of input features ($x$) as presented in section 3.0, (i) & (ii). For SVR forecasting, $x$ encompasses lagged observations of the series being forecasted. The aim is to predict future values based on these past observations as:

$$ \hat{y}_{t+1} = \sum_{i=1}^{n} \alpha_i K(x_t, x_i) + b \quad (14) $$

where $\hat{y}_{t+1}$ represents the forecasted value at time $t+2, t+3, \dots$ and $x_t$ includes features estimated from values observed up to time $t$. In predicting energy consumption, the SVR models utilises input features $x$ that are directly related to the prediction target as:
$$ \hat{y} = \sum_{i=1}^{n} \alpha_{i} K(x, x_{i}) + b \quad (15) $$

where, $x$ represents the vector of historical energy usage (features) pertinent to predicting the target variable. In both scenarios, the SVR model capitalises on the kernel function to facilitate the estimation of linear regression within a high-dimensional feature space. The decision function is shaped by kernel function and the optimisation of the $\alpha_i$ coefficients, enabling the model to effectively navigate and interpret the complex nonlinearity in the data.

## 2.4 ANN prediction model development

The ANN model architecture is designed by incorporating historical data points to estimate future consumption at specific timesteps. For forecasting time series data of electric water boiler energy consumption, the architecture was empirically determined by leveraging past observations to enable the prediction of future values over a specified forecasting horizon. The optimal number of hidden layers in the ANN is determined by estimating the generalisation error for each configuration. First, the ANN was initialised with varying numbers of hidden layers, and the sigmoid activation function was applied to the outer layer [13], as:

$$ \text{Sigmoid}(x) = \frac{1}{1+e^{-x}} \quad (16) $$

where $x$ is the input variable. Equation 16 was applied to each layer to introduce non-linearity and manage binary regression within hidden nodes. Each model configuration was trained on the dataset, with performance monitored on a validation set to evaluate generalisation beyond the training data. The configuration with the lowest generalisation error, balancing accuracy and complexity, was selected to avoid overfitting or underfitting. This process, applied to the energy consumption dataset across scenarios, ensured the network effectively modeled the data. MSE, MAE, and RMSE served as objective functions, measuring discrepancies between predicted and actual outputs.

### 2.4.1 ANN prediction architecture

The ANN architecture is designed with the core objective of predicting the electric water boiler energy consumption at the next time step, $X_{t+1}$, $X_{t+2}$, $X_{t+3}$, ... using a time series dataset $\{X_t\}$ where $t$ represents different times. The prediction is based on past observations $[X_{t-n+1}, X_{t-n+2}, ..., X_t]$, where $n$ is the number of past observations used as input. The input layer receives a vector of these past observations, as:

$$ X_{input} = [X_{t-n+1}, X_{t-n+2}, ..., X_t] \quad (17) $$

The hidden layers consist of neurons that process this input data. Each neuron in a hidden layer calculates the weighted sum of its inputs, applies the activation function to this sum, and then forwards the output to the subsequent layer as:
$$a^{[layer]} = g^{[layer]}(W^{[layer]}a^{[layer-1]} + b^{[layer]}) \quad (18)$$

where $g^{[layer]}$ represents the activation function, $W^{[layer]}$ and $b^{[layer]}$ are the weights and biases respectively, $a^{[layer]}$ denotes the activations of the current layer, and $a^{[layer-1]}$ refers to the activations from the previous layer and the input vector for the first hidden layer. Finally, the output layer, produces the prediction $\hat{X}_{t+1}$, using a linear activation function for regression tasks as:

$$\hat{X}_{t+1} = W^{[output]} \cdot a^{[L-1]} + b^{[output]} \quad (19)$$

where $W^{[output]}$ and $b^{[layer]}$ are the weights and bias connecting the last hidden layer to the output, and $L$ denotes the last hidden layer. The prediction $\hat{X}_{t+1}, \hat{X}_{t+2}, \hat{X}_{t+3}, ...$ made by the ANN for the time series data is presented as a function $f$ that maps the input observations to the predicted value. This mapping incorporates all network layers, weights, biases, and activation functions as:

$$\hat{X}_{t+1} = f([X_{t-n+1}, X_{t-n+2}, ..., X_t]; W, b) \quad (20)$$

The function $f$ learns from historical data to accurately predict energy consumption, while the network simultaneously adjusts its weights and biases to minimise the prediction error throughout the training process.

### 2.4.2 ANN forecasting architecture

Applying the time series dataset $\{X_t\}$ for electric water boiler energy consumption, where $t$ indexes time (e.g., hourly, daily), the forecasting objective of the ANN model design is to predict the energy consumption for the next $H$ steps, $\{X_{(t+1)}, X_{(t+2)}, ..., X_{(t+H)}\}$, using a history of $P$ past observations $[X_{(t-P+1)}, ..., X_t]$ as input:

$$X_{input} = [X_{t-P+1}, ..., X_t] \quad (21)$$

Each hidden layer computes activations using equation (16), where $a^{[layer-1]}$ represents the activations from the previous layer with $a^{[0]} = X$ "input", and the output layer produces the forecast for $H$ future steps as:

$$\hat{X}_{forecast} = [\hat{X}_{t+1}, \hat{X}_{t+2}, ..., \hat{X}_{t+H}] \quad (22)$$

This layer has multiple neurons, equal to the number of forecasting steps $H$, each predicting the consumption for future time steps. The forecasting output $\hat{X}_{forecast}$ made by the ANN is represented as a function $f$ of the past observations and the learned model parameters as:

$$\hat{X}_{forecast} = f([X_{t-P+1}, ..., X_t]; W, b) \quad (23)$$
where *f* encapsulates the computations across all layers of the network, from the input through the hidden layers to the output layer, while *W* & *b* are the weights and biases respectively.

## 2.5 Performance metrics for model validation

The evaluation of prediction models, particularly for electric water boiler energy consumption in residential buildings across different scenarios, relies on statistical measures and tests to assess performance, accuracy, and computation efficiency. The error evaluation indexes adopted in this paper include Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and the coefficient of determination ($R^2$). These metrics provide insights into the statistical significance, predictive and forecasting capability of the models. Understanding the direction and magnitude of errors is critical for model interpretation [4], [36], [37]. The equations for these metrics are:

i. Root Mean Squared Error (RMSE) is calculated as the square root of the average of the squared differences between the predicted or observed values ($\hat{Y}_i$), and the actual values ($Y_i$):

$$RMSE = \sqrt{\frac{1}{n} \sum_{i=1}^{n} (Y_i - \hat{Y}_i)^2} \qquad (24)$$

ii. Mean Absolute Error (MAE) is computed as the average of the absolute differences between the actual values ($Y_i$) and predicted or observed ($\hat{Y}_i$) values:

$$MAE = \frac{1}{N} \sum_{i=1}^{N} |Y_i - \hat{Y}_i| \qquad (25)$$

iii. Mean Squared Error (MSE) is computed as the average of the squared differences between the actual values ($Y_i$) and predicted or observed ($\hat{Y}_i$) values:

$$MSE = \frac{1}{N} \sum_{i=1}^{N} (Y_i - \hat{Y}_i)^2 \qquad (26)$$

iv. Coefficient of Determination ($R^2$) measures the proportion of the variance in the dependent variable ($Y_i$) that is predictable from the independent variable(s):

$$R^2 = 1 - \frac{\sum_{i=1}^{N} (Y_i - \hat{Y}_i)^2}{\sum_{i=1}^{N} (Y_i - \bar{Y})^2} \qquad (27)$$

where *N* is the number of observations; $Y_i$ and $\hat{Y}_i$ are the observed values; $\bar{Y}$ is the mean of observed values; and the denominator represents the total variance in the observed data. These metrics are used to provide a comprehensive evaluation of the three prediction model accuracy and suitability for application in predicting and forecasting energy consumption in electric water boilers across various scenarios [4].
# 3. Results and discussion

In this section, the performance metrics of the models are analysed in the quest to address the research questions outlined in subsection 4.2. This study used the R-square value to evaluate how well the model fits the data in five distinct scenarios, showing how the independent variables affect the dependent variable. The Root Mean Squared Error (RMSE) and Mean Squared Error (MSE) metrics are employed to evaluate the models error interpretation and accuracy. The Mean Absolute Error (MAE) is used to estimate the bias error, which is determined by averaging the extents to which the model's predictions and forecasts deviate from the actual data. This analysis facilitates comparison across various scenario scales and employs data visualisation to illustrate how effectively the models mapped the energy consumption patterns within the data.

## 3.1 Data presentation and visualisation result.

The five scenarios presented in Table 1 are illustrated in Figure 2 to Figure 6, providing a comprehensive overview of EWBs energy consumption across 67 apartments. The figures portray the distribution of energy consumption (kWh) based on minimum, median, maximum, and mean values, highlighting variability, patterns, and anomalies for model comparison and analysis.

* Figure 3 (SC1): Energy consumption at 10-minute intervals reveals significant variability and frequent outliers, reflecting sporadic short-term fluctuations in EWB usage.

* Figure 4 (SC2): Aggregation to hourly intervals reduces some variability, though outliers persist, indicating short-term peaks in energy demand.

* Figure 5 (SC3): Energy consumption at daily intervals shows a wider spread with clearer patterns, suggesting the influence of occupant behaviour.

* Figure 6 (SC4): Weekly aggregation smooths short-term fluctuations, presenting more stable trends with fewer extreme outliers.

* Figure 7 (SC5): Monthly data highlights consistent long-term trends with reduced variability and minimal outliers, reflecting predictable and sustained energy usage.

These visualisations demonstrate that increasing the time-step duration smooths short-term variability, enabling clearer insights into energy consumption trends, which are essential for model comparison and generalisation across varying temporal resolutions.
<figure><img src="image_4.png" /><figcaption>Figure 2: EWBs energy consumption of apartments in scenario one (SC1).</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>Figure 3: EWBs energy consumption of apartments in scenario two (SC2).</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Figure 4: EWBs energy consumption of apartments in scenario three (SC3).</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>Figure 5: EWBs energy consumption of apartments in scenario four (SC4).</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>Figure 6: EWBs energy consumption of apartments in scenario five (SC5).</figcaption></figure>

## 3.2 Model performance results

To more effectively compare and address the three research questions, this section presents the individual model results based on the forecasting and prediction applications across different time steps of the five scenarios, as detailed in subsections 3.2.1, 3.2.2, and 3.2.3. Additionally, the application parameters and their corresponding design results are outlined.
The resulting time comparisons and performance metric outcomes are exhibited in Section 5.0 as presented in Table 11 and Figure 28 respectively. Table 4 presents the model parameter tuning and configuration. The ARIMA and SVR implementations follow the methodologies outlined in [5, 6], while the ANN architecture was customised to fit the dataset, as described in Sections 2.4.1, 2.4.2, and 2.3.2. and presented in table Table 4.

<table><caption>Table 4: Summary of Model hyperparameter configuration</caption><thead><tr><td>Model</td><td>Hyperparameter</td><td>Value/Configuration</td><td>Description/Justification</td></tr></thead><tbody><tr><td>ARIMA</td><td>(p, d, q) parameters</td><td>(3, 1, 0)</td><td>AIC optimisation criteria</td></tr><tr><td>SVR</td><td>Kernel</td><td>Gaussian (RBF)</td><td>Handles non-linearity</td></tr><tr><td>ANN</td><td>Hidden layers</td><td>3 (16, 32, 64 neurons)</td><td>Optimised through validation</td></tr><tr><td>ANN</td><td>Activation Function</td><td>Sigmoid</td><td>Manages non-linearity.</td></tr><tr><td>ANN</td><td>Optimiser</td><td>Adam</td><td>Enhances adaptive learning</td></tr></tbody></table>

### 3.2.1 ARIMA performance results

The ARIMA (3,1,0) model was selected based on simulations that utilised the Akaike Information Criterion (AIC) for model optimisation and the Autocorrelation Function (ACF) to ensure the best model fit to the data. The ARIMA model was designed with an 80 % training and 20 % testing data split to uncover patterns across various time-step scenarios while reserving some data to evaluate its predictive performance. The ARIMA (3,1,0) configuration gave a log likelihood of 96.4 %. Heteroskedasticity simulation yielded *p* - values, with the coefficient for the first lag in the autoregressive component of the model AR - L1 = 0.0, the second and the third as AR - L2 = 0.0, AR - L3 = 0.5 respectively. Specifically, the ARIMA (3,1,0) order signifies that the autoregression component is set with a lag value of 3, with a differencing order of 1 to render the time series stationary and uses a moving average window of zero (indicating no moving average component). Furthermore, the ARIMA (3,1,0) model serves as the baseline for modeling predictions and forecasts over different scenario time horizons, as illustrated in Figure 7 to Figure 12 onwards. Table 5 and Table 6 presents the results of performance metrics and computational time.
<figure><img src="image_9.png" /><figcaption>Figure 7: ARIMA prediction & forecasting for scenario 1</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>Figure 8: ARIMA prediction & forecasting for scenario 2</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>Figure 9: ARIMA prediction & forecasting for scenario 3</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>Figure 10: ARIMA prediction & forecasting for scenario 4</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>Figure 12: ARIMA prediction & forecasting for scenario 5</figcaption></figure>

Figure 7 to Figure 12 illustrate the results of the ARIMA model across five scenarios. The predictions across all scenarios demonstrate significant model fit to data, with the best performance observed in scenario 1 compared to scenarios 2, 3, 4, and 5, respectively. However, the model is capable of forecasting only for the short term, specifically for the initial six time steps of the scenarios into the future, as shown in the plots, with a pattern that flattens continuously after the initial six horizons. These results highlight the model relevance for long term prediction and suitability for short-term forecasting.
<table><caption>Table 5: ARIMA prediction model performance metrics result over five scenarios</caption><thead><tr><th>Scenarios (Timestep)</th><th>Consumption</th><th>Computational time (s)</th><th>R<sup>2</sup></th><th>RMSE</th><th>MAE</th><th>MSE</th><th>Prediction Length</th></tr></thead><tbody><tr><td>SC1-10mins</td><td>daily</td><td>0.1142</td><td>0.9889</td><td>0.0173</td><td>0.0090</td><td>0.0003</td><td>1 day</td></tr><tr><td>SC2 - 1 hr</td><td>daily</td><td>0.0757</td><td>0.8385</td><td>0.0755</td><td>0.0436</td><td>0.0057</td><td>7 days</td></tr><tr><td>SC3 - 24 hr</td><td>winter</td><td>0.1381</td><td>0.8774</td><td>0.0330</td><td>0.0249</td><td>0.0011</td><td>60 days</td></tr><tr><td>SC4 - 24 hr</td><td>spring</td><td>0.0808</td><td>0.5838</td><td>0.0481</td><td>0.0388</td><td>0.0023</td><td>60 days</td></tr><tr><td>SC5 - 24 hr</td><td>daily</td><td>0.0952</td><td>0.8147</td><td>0.0364</td><td>0.0281</td><td>0.0013</td><td>150 days</td></tr></tbody></table>

<table><caption>Table 6: ARIMA forecast model performance metrics result over five scenarios</caption><thead><tr><th>Scenarios (Timestep)</th><th>Consumption</th><th>Computational time (s)</th><th>R<sup>2</sup></th><th>RMSE</th><th>MAE</th><th>MSE</th><th>Forecast Length</th></tr></thead><tbody><tr><td>SC1-10mins</td><td>daily</td><td>0.0728</td><td>-0.7589</td><td>0.0520</td><td>0.0443</td><td>0.0027</td><td>2 hours</td></tr><tr><td>SC2 - 1 hr</td><td>daily</td><td>0.0672</td><td>-0.1119</td><td>0.1869</td><td>0.0814</td><td>0.0349</td><td>1 day</td></tr><tr><td>SC3 - 24 hr</td><td>winter</td><td>0.1361</td><td>-1.1756</td><td>0.1395</td><td>0.1093</td><td>0.0195</td><td>30 days</td></tr><tr><td>SC4 - 24 hr</td><td>spring</td><td>0.0891</td><td>-1.1757</td><td>0.1395</td><td>0.1084</td><td>0.0195</td><td>30 days</td></tr><tr><td>SC5 - 24 hr</td><td>daily</td><td>0.0907</td><td>-0.7547</td><td>0.0847</td><td>0.0689</td><td>0.0072</td><td>30 days</td></tr></tbody></table>

Table 5 presents the prediction performance metrics across five scenarios. The results indicate that the ARIMA model exhibits the shortest and longest computational times for daily energy consumption inputs in Scenario 2 at 0.0757 seconds and in the winter scenario 3 at 0.1381 seconds, respectively. The coefficient of determination $R^2$ is highest at 0.9889, demonstrating significant model responsiveness to data variability around its mean in Scenario 1, and lowest in Scenario 4 (spring) at approximately 0.5838. In terms of error and accuracy, the prediction model achieves minimum values with an RMSE of 0.0173, MAE of 0.0090, and MSE of 0.0003 in Scenario 1. Conversely, the ARIMA prediction errors peak in Scenario 2 with hourly input data time steps, exhibiting an RMSE value of 0.0755, and MAE and MSE values of 0.0436 and 0.0057, respectively.

The forecasting results presented in Table 6 indicate a high computational time of 0.1361 seconds for Scenario 3 (winter) and 0.0672 seconds for Scenario 2 with daily input time steps. The coefficient of determination ($R^2$) across all scenarios indicates a poor model fit of the forecast to the data, with negative values ranging from -0.1119 to -1.1757, denoting a lack of forecasting accuracy. Furthermore, the lowest error rates for scenario SC1 are 0.0520 for RMSE, 0.0520 for MAE, and 0.0027 for MSE, whereas scenario SC3 (winter) exhibits higher error rates with values of 0.1395 for RMSE, 0.1093 for MAE, and 0.0195 for MSE. These findings suggest that the prediction results are more accurate compared to the forecasted results.
### 3.2.2 SVR performance results

The SVR design was conducted based on the Gaussian kernel and initialised with 80 % training and 20 % testing data split to uncover patterns across various time-step scenarios while reserving some data to evaluate its predictive performance. The parameter sigma in the Gaussian kernel was deployed for controlling the smoothness of the decision boundary. A sigma value of 0.005 was empirically determined through testing and validation to model the decision boundary effectively across all scenario time steps for the prediction and forecasting horizon. Error tolerance and iteration control were implemented, setting the error tolerance level for the algorithm's convergence at 0.2 and limiting the maximum number of iterations to 1000. This approach prevents infinite loops in the model when it fails to converge. The results obtained are presented in Figure 12 to Figure 16 to compare the prediction and forecasting. The prediction depicted in black, exhibit significant fitness across all scenarios, except for scenario SC3 in winter, which shows a substantial 4 time-steps lag compared to the daily time step in scenario SC2. This same trend is observed in the forecasting results, shown in red, of the SVR model, as compared to the actual data, which is illustrated in green.
<figure><img src="image_14.png" /><figcaption>Figure 12: SVR Prediction & forecasting for scenario SC1</figcaption></figure>

<figure><img src="image_15.png" /><figcaption>Figure 13: SVR Prediction & forecasting for scenario SC2</figcaption></figure>

<figure><img src="image_16.png" /><figcaption>Figure 14: SVR prediction & forecasting for scenario SC3</figcaption></figure>

<figure><img src="image_17.png" /><figcaption>Figure 15: SVR prediction & forecasting for scenario SC4</figcaption></figure>

<figure><img src="image_18.png" /><figcaption>Figure 16: SVR prediction & forecasting for scenario SC5</figcaption></figure>

<table><caption>Table 7: SVR prediction model performance metrics result over five scenarios</caption><thead><tr><th>Scenarios (Timestep)</th><th>Consumption</th><th>Computational time</th><th>R<sup>2</sup></th><th>RMSE</th><th>MAE</th><th>MSE</th><th>Prediction Length</th></tr></thead><tbody><tr><td>SC1-10 mins</td><td>daily</td><td>2 mins 52.0 s</td><td>0.8496</td><td>0.0640</td><td>0.0533</td><td>0.0040</td><td>1 day</td></tr><tr><td>SC2 - 1 hr</td><td>daily</td><td>3 mins 58.0 s</td><td>0.8310</td><td>0.0773</td><td>0.0693</td><td>0.0060</td><td>7 days</td></tr><tr><td>SC3 - 24 hr</td><td>winter</td><td>0 mins 39 s</td><td>-0.2676</td><td>0.0964</td><td>0.0945</td><td>0.0093</td><td>60 days</td></tr><tr><td>SC4 - 24 hr</td><td>spring</td><td>0 mins 52 s</td><td>-0.6661</td><td>0.0971</td><td>0.0941</td><td>0.0094</td><td>60 days</td></tr><tr><td>SC5 - 24 hr</td><td>daily</td><td>4 mins 44 s</td><td>-0.3113</td><td>0.0971</td><td>0.0931</td><td>0.0094</td><td>150 days</td></tr></tbody></table>
<table><caption>Table 8: SVR forecast model performance metrics result over five scenarios</caption><thead><tr><th>Scenarios (Timestep)</th><th>Consumption</th><th>Computational time</th><th>R<sup>2</sup></th><th>RMSE</th><th>MAE</th><th>MSE</th><th>Forecast Length</th></tr></thead><tbody><tr><td>SC1-10 mins</td><td>daily</td><td>2 mins 52.0 s</td><td>-1.1572</td><td>0.0767</td><td>0.0688</td><td>0.0059</td><td>2 hours</td></tr><tr><td>SC2 -1 hr</td><td>daily</td><td>3 mins 58.0 s</td><td>0.8544</td><td>0.0676</td><td>0.0587</td><td>0.0046</td><td>1 day</td></tr><tr><td>SC3 - 24 hr</td><td>winter</td><td>0 mins 39 s</td><td>-0.1848</td><td>0.0983</td><td>0.0982</td><td>0.0097</td><td>30 days</td></tr><tr><td>SC4 - 24 hr</td><td>spring</td><td>0 mins 52 s</td><td>-1.0389</td><td>0.0965</td><td>0.0944</td><td>0.0093</td><td>30 days</td></tr><tr><td>SC5 - 24 hr</td><td>daily</td><td>0 mins 39 s</td><td>-1.3418</td><td>0.0975</td><td>0.0968</td><td>0.0095</td><td>30 days</td></tr></tbody></table>

Table 7 presents the prediction performance metrics of the SVR model across five scenarios. The model exhibits a high computational time of 4 minutes and 44 seconds for Scenario 5, which involves daily consumption input data, whereas Scenario 3, in winter, demonstrates the shortest computational time of 39 seconds. The coefficient of determination ($R^2$) shows poor performance in scenarios SC3, SC4, and SC5, while its best performance of 0.8496 was in scenario SC1 and the lowest performance with a value of -0.2676 in scenario SC3. The model accuracy in terms of RMSE, MAE, and MSE shows lower error values of 0.0640, 0.0533, and 0.0040 respectively for scenario SC1, and higher values of 0.0971, 0.0931, and 0.0094 in scenario SC5.

Table 8 outlines the forecasting computational times, with the highest being 3 minutes and 58 seconds in scenario SC2, which pertains to hourly daily energy consumption input data. The shortest computational time is recorded in scenario SC5, with daily energy consumption as the time step input, at 39 seconds. Forecasting errors range from -0.1848 to -1.3418 in scenario SC5, with the coefficient of determination showing its best performance output at 0.8544 in scenario SC2. The lowest error rates in scenario SC2 are 0.0676 for RMSE, 0.0587 for MAE, and 0.0046 for MSE, respectively. Conversely, scenario SC5 shows higher error rates with values of 0.0975 for RMSE, 0.0968 for MAE, and 0.0095 for MSE. The model demonstrates significantly good prediction error rates and accuracy, though the forecasting model fit is poor, with only scenario SC2 exhibiting a good fit, as illustrated in Figure 12 and Figure 13.

### 3.2.3 ANN performance results

The ANN design commenced with an 80 % training and 20 % testing data split to identify the underlying patterns across various distinct scenario time-steps while maintaining a portion of the data to assess its predictive performance. The ANN parameter selection and tuning were rigorously validated through experimental simulations, ensuring the development of a robust and effective neural network for accurately predicting energy consumption patterns from time-lagged data [13], [21], [38]. The model configurations were methodically tested across various
scenarios and timestep scales to determine the optimal tuning and activation functions for
superior prediction performance. The model includes three hidden layers with 16, 32, and 64
neurons, respectively. These configurations were empirically determined from simulations to
progressively capture the complex relationships in the data. The sigmoid activation function is
utilised to address non-linearity in the scenarios and to prevent vanishing gradient issues. The
output layer employs a single neuron with a 'sigmoid' activation function while the ADAM
optimiser is implemented to adjust the weights and facilitate adaptive learning. The model
undergoes training over 200 epochs, balancing sufficient training time with minimising the risk
of overfitting. The Mean Squared Error (MSE), RMSE, R-squared, and MAE, as outlined in
equations 24 to 27, serve as the loss functions to evaluate the model's prediction and forecasting
accuracy in terms of the estimated values compared to the actual values. Figure 17 to Figure 21
presents the prediction and forecasting outcomes of the ANN model across various prediction
horizons to visualize the pattern recognition and model fit to data.
<figure><img src="image_19.png" /><figcaption>Figure 17: ANN prediction & forecasting for scenario 1</figcaption></figure>

<figure><img src="image_20.png" /><figcaption>Figure 18: ANN prediction & forecasting for scenario 2</figcaption></figure>

<figure><img src="image_21.png" /><figcaption>Figure 19: ANN prediction & forecasting for scenario 3</figcaption></figure>

<figure><img src="image_22.png" /><figcaption>Figure 20: ANN prediction & forecasting for scenario 4</figcaption></figure>

<figure><img src="image_23.png" /><figcaption>Figure 21: ANN prediction & forecasting for scenario 5</figcaption></figure>

The results obtained with ANN model, as presented in Figure 17 to Figure 21, demonstrate effective prediction and strong learning rates, yet exhibits significant overfitting to the data in Scenario 1 of Figure 17. This is similarly observed in Figure 18 indicate overfitting and high learning rates. Figure 19 showcases scenario SC3, which illustrates excellent prediction, comparable to scenarios SC1 and SC2, but with notable overfitting. The results also reveal a significant fit to the data for scenarios SC4 and SC5 for both prediction and forecast. Although the model performs well across all scenarios, it nevertheless exhibits overfitting. As demonstrated in scenarios SC1 and SC2, this model performance is influenced by short time-step intervals, where patterns are less distinguishable, particularly at 10-minute intervals.
Table 9 presents the performance metrics of the prediction model for five scenarios. The ANN model exhibits a high computational time in scenario SC1 of 5 minutes and 4 seconds, with the shortest computational time observed in scenario SC5 at 2 minutes. In scenarios SC1 and SC2, the model coefficient of determination is 1, indicating perfect accuracy, while scenario SC4 shows the lowest value at 0.8055. The lowest error rates in scenario SC1 are RMSE of 0.0010, MAE of 0.0006, and MSE of 0.000, while the highest error rates are seen in scenario SC4 (spring) with RMSE, MAE, and MSE values of 0.0318, 0.0256, and 0.0010, respectively.

The forecasting model performance metrics in Table 10 indicate a high computational time of 5 minutes in scenario SC3 (winter), with the shortest computational time being 2 minutes in scenario SC4 (spring). The coefficient of determination values are perfect (1.0) in both scenarios SC1 and SC2, with the lowest value recorded as 0.8238 in scenario SC4. The lowest error rates in scenario SC1 are RMSE of 0.0011, MAE of 0.0007, and MSE of 0.0000, in contrast to higher error rates in scenario SC4, with RMSE, MAE, and MSE values of 0.0288, 0.0247, and 0.0008, respectively, for the forecasting models. Both the forecasting and prediction results of the model exhibit limited error rates, demonstrating a high level of accuracy.

<table><caption>Table 9: ANN prediction model performance metrics result over scenarios</caption><thead><tr><th>Scenarios (Timestep)</th><th>Consumption</th><th>Computational time</th><th>R<sup>2</sup></th><th>RMSE</th><th>MAE</th><th>MSE</th><th>Prediction Length</th></tr></thead><tbody><tr><td>SC1-10 mins</td><td>daily</td><td>5 mins 4.0 s</td><td>1.0000</td><td>0.0010</td><td>0.0006</td><td>0.0000</td><td>24 hours</td></tr><tr><td>SC2 - 1 hr</td><td>daily</td><td>4 mins 1.0 s</td><td>1.0000</td><td>0.0030</td><td>0.0024</td><td>0.0000</td><td>7 days</td></tr><tr><td>SC3 - 24 hr</td><td>winter</td><td>3 mins 0.0 s</td><td>0.9919</td><td>0.0079</td><td>0.0030</td><td>0.0001</td><td>60 days</td></tr><tr><td>SC4 - 24 hr</td><td>spring</td><td>4 mins 0.0 s</td><td>0.8055</td><td>0.0318</td><td>0.0256</td><td>0.0010</td><td>60 days</td></tr><tr><td>SC5 - 24 hr</td><td>daily</td><td>2 mins 0.0 s</td><td>0.9861</td><td>0.0103</td><td>0.0068</td><td>0.0001</td><td>150 days</td></tr></tbody></table>

<table><caption>Table 10: ANN forecast model performance metrics result over scenarios</caption><thead><tr><th>Scenarios (Timestep)</th><th>Consumption</th><th>Computational time</th><th>R<sup>2</sup></th><th>RMSE</th><th>MAE</th><th>MSE</th><th>Forecast Length</th></tr></thead><tbody><tr><td>SC1-10 mins</td><td>daily</td><td>3 mins 1.0 s</td><td>1.0000</td><td>0.0011</td><td>0.0007</td><td>0.0000</td><td>2 hours</td></tr><tr><td>SC2 - 1 hr</td><td>daily</td><td>3 mins 0 s</td><td>1.0000</td><td>0.0031</td><td>0.0026</td><td>0.0000</td><td>1 day</td></tr><tr><td>SC3 - 24 hr</td><td>winter</td><td>5 mins 0.0 s</td><td>0.9991</td><td>0.0035</td><td>0.0015</td><td>0.0000</td><td>30 days</td></tr><tr><td>SC4 - 24 hr</td><td>spring</td><td>2 mins 0.0 s</td><td>0.8238</td><td>0.0288</td><td>0.0247</td><td>0.0008</td><td>30 days</td></tr><tr><td>SC5 - 24 hr</td><td>daily</td><td>3 mins 0.0 s</td><td>0.9980</td><td>0.0052</td><td>0.0050</td><td>0.0000</td><td>30 days</td></tr></tbody></table>
## 4. Comparative analysis and discussion

In this section, computational resources along with various performance metrics obtained were experimented and compared. The results, illustrated in Table 5 to Table 10 of the predictive and forecasting models, are critically analysed. Figure 22 to Figure 26 present the forecasted and predicted results. Additionally, Figure 28 presents the comparative outcomes of the performance metrics alongside the corresponding error rates. Finally, the computation cost of the models with respect to time is presented in Figure 27. The comparison of model results obtained is discussed in the subsection according to the research questions.

### 4.1 Discussion of results for research question one on computational resources.

The results address the research question "Computational Resources of Approaches: How well do the ARIMA, SVR, and ANN models perform across different scenarios in terms of computational cost as illustrated in Table 1 for EWB consumption in residential buildings?". The shaded areas in Figure 22 to Figure 26 represent the forecasted data, while the non-shaded areas illustrate the performance of the prediction models. These plots provide a comparative analysis and are summarised in Table 11, detailing model fitness and the accuracy with which the models reflect data across various time-step inputs within the scenarios.

<table><caption>Table 11: Comparative summary of model performance interpretation – This table synthesises the performance of ARIMA, SVR, and ANN models over five scenarios as illustrated in Figure 22 to 27, in terms of model fitness and their correlation to data at different time steps.</caption><thead><tr><th>Scenario (Inputs)</th><th>Algorithms Model</th><th>Prediction</th><th>Forecast</th></tr></thead><tbody><tr><td rowspan="3">SC1 10 minutes</td><td>ARIMA</td><td>Optimal model fit and pattern mapping to data.</td><td>Inadequate model fit to data.</td></tr><tr><td>SVR</td><td>Moderately accurate fit to data.</td><td>Moderately accurate fit to data.</td></tr><tr><td>ANN</td><td>Over fitting to data</td><td>Over fitting to data</td></tr><tr><td rowspan="3">SC2 1 hour</td><td>ARIMA</td><td>Optimal model fit and pattern mapping to data.</td><td>Inadequate model fit to data.</td></tr><tr><td>SVR</td><td>Moderately accurate fit to data.</td><td>Moderately accurate fit to data.</td></tr><tr><td>ANN</td><td>Moderately over fitting to data</td><td>Moderately over fitting to data</td></tr><tr><td rowspan="3">SC3 24 hours</td><td>ARIMA</td><td>Moderately accurate fit to data.</td><td>Inadequate model fit to data.</td></tr><tr><td>SVR</td><td>Fairly fit to data with significant lag in mapping to actual data.</td><td>Fairly fit to data with significant lag in mapping to actual data.</td></tr><tr><td>ANN</td><td>Optimal model fit and pattern mapping to data.</td><td>Optimal model fit and pattern mapping to data.</td></tr><tr><td rowspan="3">SC4 24 hours</td><td>ARIMA</td><td>Moderately over fitting to data</td><td>Inadequate model fit to data.</td></tr><tr><td>SVR</td><td>Fairly fit to data with significant lag in mapping to actual data.</td><td>Fairly fit to data with significant lag in mapping to actual data.</td></tr><tr><td>ANN</td><td>Optimal model fit and pattern mapping to data.</td><td>Optimal model fit and pattern mapping to data.</td></tr><tr><td rowspan="3">SC5 24 hours</td><td>ARIMA</td><td>Moderately over fitting to actual data.</td><td>Inadequate model fit to actual data.</td></tr><tr><td>SVR</td><td>Fairly fit to data with significant lag in mapping to actual data.</td><td>Fairly fit to data with significant lag in mapping to actual data.</td></tr><tr><td>ANN</td><td>Optimal model fit and pattern mapping to data.</td><td>Optimal model fit and pattern mapping to data.</td></tr></tbody></table>
<figure><img src="image_24.png" /><figcaption>Figure 22: ARIMA, SVR & ANN prediction & forecast for scenario SC1</figcaption></figure>

<figure><img src="image_25.png" /><figcaption>Figure 23: ARIMA, SVR & ANN predictions & forecast for scenario SC 2</figcaption></figure>

<figure><img src="image_26.png" /><figcaption>Figure 24: ARIMA, SVR & ANN predictions & forecast for scenario SC 3</figcaption></figure>

<figure><img src="image_27.png" /><figcaption>Figure 25: ARIMA, SVR & ANN predictions & forecast for scenario SC 4</figcaption></figure>

<figure><img src="image_28.png" /><figcaption>Figure 26: ARIMA, SVR & ANN predictions & forecast for scenario 5</figcaption></figure>

In Section 2, the implementation and empirical design of the ARIMA, SVR, and ANN models, the computational efficiency of the models are considered to compare the computation time using the same simulation parameters as discussed in Sections 3.0 and 4.0. Figure 27 presents a comparative analysis of the computational cost for the models. The model was developed using Python programming language, and the computational performance tests were carried out on a system equipped with a computer, 8th Gen Intel (R) CoreTM i5-8265U CPU @ 1.60GHz, 1.80 GHz, 16.0 GB RAM. The computational time was computed during the simulations, and the comparative result for the prediction and forecasted ability of the model was tabbed and compared in Table 11 & Figure 27.
<figure><img src="image_29.png" /><figcaption>Figure 27: Prediction and forecasted ARIMA, SVR & ANN computation time comparison results</figcaption></figure>

In Figure 27, plot (a) showcases the outcomes of the prediction performance. The ARIMA model demonstrates the lowest computational cost of approximately less than 1 second across all scenarios as compared to the ANN and SVR models, the ANN incurs the highest computational costs across all scenarios, except in scenario SC5, where the SVR reaches a computational cost of 284 seconds. Generally, the ANN demonstrates higher computation costs, peaking at approximately 304 seconds in scenario SC1 with 10-minute time-step inputs. The results shown in Figure 27 (b) illustrate the forecast performance cost plot. In this context, the ARIMA model again shows the lowest computation cost of approximately one second, while the SVR exhibits an average computation cost across all scenarios, except in scenario SC2 with one-hour time-step input, where it reaches 238 seconds, compared to 180 seconds for the ANN. The ANN tends to be more computationally demanding in its forecasting results, with the highest recorded time being 300 seconds in scenario 3, which corresponds to winter, compared to the ARIMA and SVR models.

## 4.2 Discussion of results for research question two on accuracy in prediction and forecasting.

To address the second research question, ‘Accuracy in prediction and forecasting: What levels of accuracy do these models achieve in both short-term and long-term prediction and forecasting horizons based on the performance metrics of RMSE, MAE, and MSE?’:

i. Short time-step intervals (SC1, 10-minute durations), where consumption patterns become less distinguishable and harder to predict accurately. Negative R² values in Figure 28 occur when the model's predictions or forecasts perform worse than a baseline mean prediction, indicating a poor fit to the actual data. In Plot (a), the SVR model shows a negative R² of approximately -0.67 in scenario SC4 (winter) due to high variance and difficulties in capturing the seasonal fluctuations of energy
consumption over short time steps. Similarly, in Plot (b), the ARIMA model demonstrates the lowest accuracy with R² values as low as -2.76, particularly in scenarios with significant variability and longer-term forecasting challenges. These results highlight the limitations of SVR and ARIMA in accurately modeling complex, non-linear consumption patterns, especially under short time steps and seasonal variability, where the ANN model performs significantly better with consistently higher R² values.

<figure><img src="image_30.png" /></figure>

<figure><img src="image_31.png" /></figure>

<figure><img src="image_32.png" /></figure>

<figure><img src="image_33.png" /></figure>

<figure><img src="image_34.png" /></figure>

<figure><img src="image_35.png" /></figure>
<figure><img src="image_36.png" /><figcaption>Figure 28: Comparative performance metrics for the prediction and forecasted results of the ARIMA, SVR, and ANN models. Plots (a) and (b) present the coefficient of determination ($R^2$) values for the models prediction and forecasting performance. Plots (c) and (d) depict the RMSE (Root Mean Square Error) rates for prediction and forecasting. Plots (e) and (f) illustrate the MAE (Mean Absolute Error) results for the models' performance in prediction and forecasting. Plots (g) and (h) demonstrate the MSE (Mean Squared Error) outcomes for the prediction and forecasting models, respectively.</figcaption></figure>

ii. In Figure 28, Plots (c) and (d) present the RMSE results, indicating that the SVR has the highest prediction error rates of approximately 0.10, while ARIMA displays average RMSE values across all scenarios. The ANN model showcases an optimal error rate of 0.00 in scenario SC1, with its highest rate in scenario SC4 (spring) at 0.03. The forecasted RMSE results in plot (d) reveal that ARIMA records the highest values of 0.19 and the lowest of 0.05, while the SVR model exhibits an average error rate across scenarios, particularly in scenario SC1 with a 10-minute time-step input, where it records values of 0.08 compared to ARIMA and ANN.

iii. Plots (e) and (f) of Figure 28 present the MAE error rates for predicted and forecasted outcomes. The prediction results show SVR with the highest error rate of approximately 0.95, while ARIMA exhibits an average error rate. The ANN model achieves the lowest error rate of approximately 0.00 in scenario SC1 with a 10-minute time-step, establishing it as the optimal model for MAE prediction results. Similarly, the forecasted plot (f) demonstrates ANN dominance with an optimal error rate of 0.00 in scenario SC1 and a high rate of 0.03 in scenario SC4 (spring). The SVR model shows an average error rate across all scenarios, except for scenario SC1, which exhibits higher values of approximately 0.07 compared to ARIMA and ANN.

iv. In Figure 28, plots (g) and (h) for MSE error rates, the ANN model prediction results in plot (g) exhibit optimal performance across all scenarios. In contrast, ARIMA presents average MSE values, while SVR tends to exhibit a higher error rate of 0.01 in scenario SC4 (spring) with a 24-hour time-step input. However, the SVR
demonstrates high MSE values of approximately 0.01 for scenarios SC1 and SC5, respectively, compared to ANN and ARIMA in the same scenarios presented in plot (h) for forecasted MSE results. The ANN continues to show optimal performance with an MSE value of approximately 0.00 across all scenarios.

## 4.3 Discussion of results for research question three on model strengths and weaknesses.

In order to address the research question, 'Model Strengths and Weaknesses: What are the significant strengths and weaknesses of these approaches in terms of model implementation, and what areas could be improved?', the results from the comparative analysis are presented in Figure 22 to Figure 26 and Table 11.

This comparison highlights the strengths and weaknesses of the ARIMA, SVR, and ANN models applied to EWBs energy consumption prediction and forecasting:

1. ARIMA strength lies in its ability to effectively predict electric water boilers energy consumption across all scenarios, demonstrating computational efficiency, as shown in Figure 27. However, it is limited to forecasting effectively for only about six timesteps, indicating its utility in short-term forecasting. ARIMA has high forecasting errors across all scenarios and is limited in long-term forecasting capabilities.

2. The SVR model exhibits significant performance in predicting and forecasting electric water boilers energy consumption with average error rates. It shows moderate computational efficiency compared to the more expensive ANN. The SVR model is more computationally demanding for hourly timestep inputs, as indicated in Figure 27 (b), and is prone to prediction and forecasting errors, particularly with lags of about four timesteps.

3. The ANN model displays optimal strength in prediction and forecasting, fitting the model to data with minimal error across all scenarios. However, it is computationally costly and prone to overfitting, especially for 10-minute timestep inputs where patterns are less distinguishable as shown in Figure 17.

<table><caption>Table 12: Summary of average RMSE and computation time for ARIMA, SVR, and ANN models in prediction and forecasting performance.</caption><thead><tr><th rowspan="2">Model</th><th>Avg. Computation time</th><th>Avg. Computation time</th><th rowspan="2">Avg. RMSE Prediction</th><th rowspan="2">Avg. RMSE Forecasting</th></tr><tr><th>(s)<br>Prediction</th><th>(s)<br>Forecasting</th></tr></thead><tbody><tr><td>ARIMA</td><td><strong>0.1008</strong></td><td><strong>0.0912</strong></td><td>0.0421</td><td>0.12052</td></tr><tr><td>SVR</td><td>157.0</td><td>108.0</td><td>0.08638</td><td>0.08732</td></tr><tr><td>ANN</td><td>217.0</td><td>192.2</td><td><strong>0.0108</strong></td><td><strong>0.00834</strong></td></tr></tbody></table>
This Table 12 highlights the trade-offs between computational efficiency and accuracy for ARIMA, SVR, and ANN models in prediction and forecasting tasks. ARIMA is the fastest model (0.1008s for prediction) but has higher RMSE values, making it suitable for real-time applications where speed is prioritised over accuracy. In contrast, ANN achieves the lowest RMSE (0.0108 for prediction, 0.00834 for forecasting), demonstrating superior accuracy, but at a significantly higher computational cost, which limits its feasibility for time-sensitive scenarios. SVR strikes a balance between accuracy and computational time, offering a middle ground for applications requiring moderate performance. Further recommendations for improvement and future work are as follows:

i. The current approach focuses on time-series energy consumption trends as endogenous variables due to data availability and privacy constraints. Future work should integrate multi-variable models by including exogenous (independent) variables, such as flat area, number of occupants, and temperature, to improve the precision of energy forecasting for electric water boilers (EWBs).

ii. Improve the ARIMA model accuracy and long-term forecasting capabilities by incorporating seasonality, expanding the validation set, and integrating external variables (exogenous) to account for seasonal variations. Hybrid approaches combining ARIMA with machine learning techniques can further enhance its ability to capture complex behaviours.

iii. Reduce the SVR model computational time by applying feature selection techniques, optimising kernel parameters, and leveraging efficient hardware or parallel computing. Address the observed step lag in data fitting by incorporating additional time-series features or experimenting with alternative kernels to better capture energy consumption dynamics.

iv. Enhance the ANN model computational efficiency and address overfitting by implementing more efficient training algorithms, adding dropout layers, and exploring hybrid approaches that combine ANN with other techniques. This will ensure robust generalization while retaining the ability to capture intricate consumption patterns.

## 5. Conclusion.

In this study, the ARIMA, SVR, and ANN models were evaluated across various scenarios with different time-step inputs using electric water boiler (EWB) energy consumption data from
67 apartments. Their prediction and forecasting accuracies were comparatively analysed, and the strengths and weaknesses of each model were identified. Additionally, three key research questions were addressed, providing insights into model performance, computational efficiency, and practical applicability. The analysis revealed that ARIMA is computationally efficient and performs well for short-term prediction; however, it is limited in its ability to capture long-term forecasting trends. SVR demonstrated moderate performance in both prediction and forecasting but was constrained by computational costs and a lag in fitting the data. In contrast, the ANN model outperformed ARIMA and SVR in terms of model fit and accuracy, particularly for longer time steps. However, it exhibited challenges with overfitting in shorter time steps (Scenarios 1 and 2) and required higher computational resources.

Table 12 effectively highlights the performance-efficiency trade-offs between ARIMA, ANN and SVR, offering practical insights for balancing computation time and prediction/forecasting accuracy. This research establishes a framework for energy consumption prediction, applicable not only to electric water boilers (EWBs) but also to electric vehicles (EVs), industrial, and commercial energy systems. It can further improve Model Predictive Control (MPC) integration applications and smart grid management to enhance energy efficiency. Future work can focus on hybridising these models to leverage their respective strengths while addressing limitations. Additionally, considering influencing factors (exogenous) such as occupant behaviour, weather conditions, and building characteristics will improve model performance and ensure broader applicability in real-world scenarios.

## 7. Annexes

<figure><img src="image_37.png" /><figcaption>Figure A1: Case study of electric water boiler energy consumption in 67 apartments within residential buildings C1, C2, and C3.</figcaption></figure>

<table><caption>Table A1: Electric water boiler description.</caption><thead><tr><td>Apartment no.</td><td>Apartment type</td><td>Tank volume</td><td>Operating control</td><td>Max power</td></tr></thead></table>
<table><tr><td>01 to 15</td><td>T3(2bedroom)</td><td>150L</td><td>with Peak/OFF Peak Ctrl</td><td>1.7 kW</td></tr><tr><td>16 to 20</td><td>T4(3bedroom)</td><td>200L</td><td>with Peak/OFF Peak Ctrl</td><td>2.3 kW</td></tr><tr><td>21 to 30</td><td>T4(3bedroom)</td><td>150L</td><td>with Peak/OFF Peak Ctrl</td><td>1.75 kW</td></tr><tr><td>30 to 36</td><td>T5(4bedroom)</td><td>200L</td><td>without Peak/OFF Peak Ctrl</td><td>Variable</td></tr><tr><td>37 to 50</td><td>T2(1bedroom)</td><td>150L</td><td>with Peak/OFF Peak Ctrl</td><td>1.25 kW</td></tr><tr><td>51 to 64</td><td>T2(1bedroom)</td><td>150L</td><td>without Peak/OFF Peak Ctrl</td><td>Variable</td></tr><tr><td>65 to 67</td><td>T5(4bedroom)</td><td>200L</td><td>with Peak/OFF Peak Ctrl</td><td>2.3 kW</td></tr></table>

**Author Contributions:** Conceptualisation, I.A.K. and C.G.; writing and original draft I.A.K.; reviewing and editing I.A.K., C.G. and M.B; supervision C.G. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was financed by the Petroleum Technology Development Fund (PTDF), Nigeria, and supported by Immobilier Rhône Alpes-Groupe 3F.

**Conflicts of Interest:** The authors declare no conflict of interest.

## 8. Reference:

[1] E. Fuentes, L. Arce, and J. Salom, 'A review of domestic hot water consumption profiles for application in systems and buildings energy performance analysis', *Renew. Sustain. Energy Rev.*, vol. 81, pp. 1530–1547, Jan. 2018, doi: 10.1016/j.rser.2017.05.229.

[2] M. T. Ahmed, P. Faria, O. Abrishambaf, and Z. Vale, 'Electric Water Heater Modelling for Direct Load Control Demand Response', in *2018 IEEE 16th International Conference on Industrial Informatics (INDIN)*, Jul. 2018, pp. 490–495. doi: 10.1109/INDIN.2018.8472102.

[3] G. Shen, Z. E. Lee, A. Amadeh, and K. M. Zhang, 'A data-driven electric water heater scheduling and control system', *Energy Build.*, vol. 242, p. 110924, Jul. 2021, doi: 10.1016/j.enbuild.2021.110924.

[4] I. A. Kachalla and C. Ghiaus, 'Electric Water Boiler Energy Prediction: State-of-the-Art Review of Influencing Factors, Techniques, and Future Directions', *Energies*, vol. 17, no. 2, p. 443, 2024, Accessed: Mar. 12, 2024. [Online]. Available: https://www.mdpi.com/1996-1073/17/2/443

[5] J. Runge and E. Saloux, 'A comparison of prediction and forecasting artificial intelligence models to estimate the future energy demand in a district heating system', *Energy*, vol. 269, p. 126661, Apr. 2023, doi: 10.1016/j.energy.2023.126661.

[6] O. A. Olanrewaju and C. Mbohwa, 'Predicting World Energy Consumption: Comparison of ANN and Regression Analysis', in *2017 IEEE International Electron Devices Meeting*
(IEDM), IEEE, 2017, pp. 1–5. Accessed: Mar. 12, 2024. [Online]. Available:
https://ieeexplore.ieee.org/abstract/document/9110625/

[7] J. G. De Gooijer and R. J. Hyndman, '25 years of time series forecasting', *Int. J. Forecast.*, vol. 22, no. 3, pp. 443–473, 2006, Accessed: Feb. 04, 2024. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0169207006000021

[8] R. F. Engle and C. W. J. Granger, 'Co-Integration and Error Correction: Representation, Estimation, and Testing', *Econometrica*, vol. 55, no. 2, pp. 251–276, 1987, doi: 10.2307/1913236.

[9] M. Khashei and M. Bijari, 'A novel hybridization of artificial neural networks and ARIMA models for time series forecasting', *Appl. Soft Comput.*, vol. 11, no. 2, pp. 2664–2675, Mar. 2011, doi: 10.1016/j.asoc.2010.10.015.

[10] S. Cao, S. Hou, L. Yu, and J. Lu, 'Predictive control based on occupant behavior prediction for domestic hot water system using data mining algorithm', *Energy Sci. Eng.*, vol. 7, no. 4, pp. 1214–1232, 2019, doi: 10.1002/ese3.341.

[11] D. Leiria, H. Johra, A. Marszal-Pomianowska, and M. Z. Pomianowski, 'A methodology to estimate space heating and domestic hot water energy demand profile in residential buildings from low-resolution heat meter data', *Energy*, vol. 263, p. 125705, Jan. 2023, doi: 10.1016/j.energy.2022.125705.

[12] C. Bennett, R. A. Stewart, and C. D. Beal, 'ANN-based residential water end-use demand forecasting model', *Expert Syst. Appl.*, vol. 40, no. 4, pp. 1014–1023, 2013, Accessed: Oct. 08, 2023. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0957417412009736

[13] H. B. Demuth, M. H. Beale, O. De Jess, and M. T. Hagan, *Neural network design*. Martin Hagan, 2014. Accessed: Mar. 20, 2024. [Online]. Available: https://dl.acm.org/doi/abs/10.5555/2721661

[14] A. Pérez-Fargallo, D. Bienvenido-Huertas, S. Contreras-Espinoza, and L. Marín-Restrepo, 'Domestic hot water consumption prediction models suited for dwellings in central-southern parts of Chile', *J. Build. Eng.*, vol. 49, p. 104024, May 2022, doi: 10.1016/j.jobe.2022.104024.

[15] L. Gelažanskas and K. A. Gamage, 'Forecasting hot water consumption in residential houses', *Energies*, vol. 8, no. 11, pp. 12702–12717, 2015.

[16] E. Chaerun Nisa and Y.-D. Kuan, 'Comparative assessment to predict and forecast water-cooled chiller power consumption using machine learning and deep learning algorithms', *Sustainability*, vol. 13, no. 2, p. 744, 2021, Accessed: Mar. 12, 2024. [Online]. Available: https://www.mdpi.com/2071-1050/13/2/744

[17] W. Rzeźnik, I. Rzeźnik, and P. Hara, 'Comparison of Real and Forecasted Domestic Hot Water Consumption and Demand for Heat Power in Multifamily Buildings, in Poland', *Energies*, vol. 15, no. 19, Art. no. 19, Jan. 2022, doi: 10.3390/en15196871.

[18] J. Li et al., 'Energy consumption data prediction analysis based on EEMD-ARMA model', in *2020 IEEE International Conference on Mechatronics and Automation (ICMA)*, IEEE, 2020, pp. 1338–1342. Accessed: Mar. 12, 2024. [Online]. Available: https://ieeexplore.ieee.org/abstract/document/9233741/

[19] M. Schaffer, J. Widén, J. E. Vera-Valdés, A. Marszal-Pomianowska, and T. S. Larsen, 'Disaggregation of total energy use into space heating and domestic hot water: A city-scale suited approach', *Energy*, vol. 291, p. 130351, 2024, Accessed: Mar. 12, 2024. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0360544224001221

[20] F. Dalipi, S. Yildirim Yayilgan, and A. Gebremedhin, 'Data-driven machine-learning model in district heating system for heat load prediction: A comparison study', *Appl. Comput. Intell. Soft Comput.*, vol. 2016, 2016, Accessed: Mar. 12, 2024. [Online]. Available: https://www.hindawi.com/journals/acisc/2016/3403150/abs/
[21] G. K. Tso and K. K. Yau, 'Predicting electricity energy consumption: A comparison of regression analysis, decision tree and neural networks', *Energy*, vol. 32, no. 9, pp. 1761-1768, 2007, Accessed: Mar. 12, 2024. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0360544206003288

[22] M. Sharifi, A. Kouti, E. Lambie, Y. Ma, M. F. Boneta, and M. H. Shamsi, ‘A Comprehensive Framework for Data-Driven Building End-Use Assessment Utilizing Monitored Operational Parameters’, *Energies*, vol. 16, no. 20, p. 7132, 2023, Accessed: Mar. 12, 2024. [Online]. Available: https://www.mdpi.com/1996-1073/16/20/7132

[23] M. Toledo-Orozco, C. Celi, F. Guartan, A. Peralta, C. Álvarez-Bel, and D. Morales, ‘Methodology for the disaggregation and forecast of demand flexibility in large consumers with the application of non-intrusive load monitoring techniques’, *Energy AI*, vol. 13, p. 100240, 2023, Accessed: Mar. 12, 2024. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S2666546823000125

[24] S. Bouktif, A. Fiaz, A. Ouni, and M. A. Serhani, ‘Optimal Deep Learning LSTM Model for Electric Load Forecasting using Feature Selection and Genetic Algorithm: Comparison with Machine Learning Approaches †’, *Energies*, vol. 11, no. 7, Art. no. 7, Jul. 2018, doi: 10.3390/en11071636.

[25] M. Aydinalp, V. I. Ugursal, and A. S. Fung, ‘Modeling of the space and domestic hot-water heating energy-consumption in the residential sector using neural networks’, *Appl. Energy*, vol. 79, no. 2, pp. 159–178, 2004, Accessed: Mar. 20, 2024. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0306261903002344

[26] E. Mathioulakis, G. Panaras, and V. Belessiotis, ‘Artificial neural networks for the performance prediction of heat pump hot water heaters’, *Int. J. Sustain. Energy*, vol. 37, no. 2, pp. 173–192, Feb. 2018, doi: 10.1080/14786451.2016.1218495.

[27] J. Xu, H. Mahmood, H. Xiao, E. Anderlini, and M. Abusara, ‘Electric Water Heaters Management via Reinforcement Learning With Time-Delay in Isolated Microgrids’, *IEEE Access*, vol. 9, pp. 132569–132579, 2021, doi: 10.1109/ACCESS.2021.3112817.

[28] Y. Denis, F. Suard, A. Lomet, and D. Chèze, ‘Saving energy by anticipating hot water production: identification of key points for an efficient statistical model integration’, *AI EDAM*, vol. 33, no. 2, pp. 138–147, May 2019, doi: 10.1017/S0890060419000143.

[29] C. Barteczko-Hibbert, M. Gillott, and G. Kendall, ‘An artificial neural network for predicting domestic hot water characteristics’, *Int. J. Low-Carbon Technol.*, vol. 4, no. 2, pp. 112–119, 2009.

[30] A. Lomet, F. Suard, and D. Chèze, ‘Statistical modeling for real domestic hot water consumption forecasting’, *Energy Procedia*, vol. 70, pp. 379–387, 2015, Accessed: Feb. 13, 2024. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S187661021500260X

[31] L. Gelažanskas and K. A. A. Gamage, ‘Forecasting hot water consumption in dwellings using artificial neural networks’, in *2015 IEEE 5th International Conference on Power Engineering, Energy and Electrical Drives (POWERENG)*, May 2015, pp. 410–415. doi: 10.1109/PowerEng.2015.7266352.

[32] H.-X. Zhao and F. Magoulès, ‘Feature Selection for Predicting Building Energy Consumption Based on Statistical Learning Method’, *J. Algorithms Comput. Technol.*, vol. 6, no. 1, pp. 59–77, Mar. 2012, doi: 10.1260/1748-3018.6.1.59.

[33] G. E. Box, G. M. Jenkins, G. C. Reinsel, and G. M. Ljung, *Time series analysis: forecasting and control*. John Wiley & Sons, 2015. Accessed: Mar. 20, 2024. [Online]. Available: https://books.google.com/books?hl=en&lr=&id=rNt5CgAAQBAJ&oi=fnd&pg=PR7&d q=Box,+G.+E.+P.,+Jenkins,+G.+M.,+%26+Reinsel,+G.+C.+&(2015).+Time+Series+Ana lysis:+Forecasting+and+Control.+John+Wiley+%26+Sons&ots=DL20sOh1TA&sig=By xW2Vz9iIoi91Qos3CV0N_AIgU
[34] P. J. Brockwell and R. A. Davis, Eds., 'State-Space Models', in *Introduction to Time Series and Forecasting*, in Springer Texts in Statistics., New York, NY: Springer New York, 2002, pp. 259–316. doi: 10.1007/0-387-21657-X_8.

[35] R. J. Hyndman and G. Athanasopoulos, *Forecasting: principles and practice*. OTexts, 2018. Accessed: Mar. 20, 2024. [Online]. Available: https://books.google.com/books?hl=en&lr=&id=_bBhDwAAQBAJ&oi=fnd&pg=PA7&dq=Hyndman,+R.+J.,+%26+Athanasopoulos,+G.+ (2018).+Forecasting:+principles+and+practice.+OTexts:+Melbourne,+Australia.&ots=TjfWsgTREG&sig=HCW9w_VgemS-7Wnh6pgmTkmMHK8

[36] C. Diduch, M. Shaad, R. Errouissi, M. E. Kaye, J. Meng, and L. Chang, 'Aggregated domestic electric water heater control - building on smart grid infrastructure', in *Proceedings of The 7th International Power Electronics and Motion Control Conference*, Jun. 2012, pp. 128–135. doi: 10.1109/IPEMC.2012.6258873.

[37] A. Marszal-Pomianowska, B. Valeva, V. Georgieva, O. K. Larsen, R. L. Jensen, and C. Zhang, 'High resolution measuring system for domestic hot water consumption. Development and field test.', *Energy Procedia*, vol. 158, pp. 2859–2864, Feb. 2019, doi: 10.1016/j.egypro.2019.01.1022.

[38] A. Mellit and S. A. Kalogirou, 'Chapter II-1-D - A Survey on the Application of Artificial Intelligence Techniques for Photovoltaic Systems', in *McEvoy's Handbook of Photovoltaics (Third Edition)*, S. A. Kalogirou, Ed., Academic Press, 2018, pp. 735–761. doi: 10.1016/B978-0-12-809921-6.00019-7.