*2.1. Research Framework*

The historical water consumption and calendar data are used as the model inputs in this study, as many researchers have proved that the hourly and 15-min forecasting model only considering historical water consumption data is able to achieve reliable forecast results [9,33,34]. Further, this study tests the model's capability of forecasting without real-time meteorological (e.g., temperature, humidity, and wind speed) data which is usually unavailable in real-time or highly uncertain. Admittedly, there are studies considering meteorological data for hourly water demand forecasting (e.g., Al-Zahrani et al. [35] and Brentan et al. [29]), but there is no proof that use of meteorological data can significantly improve the prediction accuracy without increasing the complexity of the method.

This study addresses the problem of short-term water demand forecasting with the prediction horizon of 24 h with time intervals of 15 min. Firstly, historical water demand data from DMA cases are collected, and the features of the historical data are extracted to select valuable information as the inputs of the forecasting model. Then the forecasting model is trained and tested using the historical water demand data and will be rebuilt every 24 h on the basis of an updated data set. When applying the forecasting model, the newly observed water demand data are collected at 15-min intervals. The historical data set always maintains the same size and is updated once a day by adding the newly observed data and deleting the earliest data.

There are 96 time steps in the water demand forecasting for one day ahead. The water demand forecasting for each time step in one day ahead is performed as follows: (1) Establish the forecasting model by LSSVM according to the historical water demand data (see Section 2.2, Section 2.3, and Section 3.2). (2) Predict the water demand at the first future time step (15 min) on the forecasting day by the forecasting model; the model inputs for the 15-min prediction are provided by the historical data. (3) Predict the water demand at the second future time step (30 min) on the forecasting day; the model inputs for the 30-min prediction are obtained from the newly observed data at 15 min and the historical data. (4) The input data for the 45-min prediction is obtained from the newly observed data at 30 min, the observed data at 15 min, and the historical data, and so on. This stepwise data updating procedure is shown Figure 1. It should be noted that the model parameters

of the forecasting model remain unchanged for the 96 time steps, but the model inputs for different time steps are updated as illustrated in Figure 1.

**Figure 1.** Water demand data processing procedure.

The hybrid forecasting model is mainly constituted of two parts, namely the initial forecasting module and the error correction module. The framework of the hybrid model is shown in Figure 2. The outline of the initial forecasting module is actually similar to the traditional water demand forecasting model. The difference between the hybrid model and the traditional one is the error correction module.

**Figure 2.** Hybrid framework for water demand forecasting.

In the initial forecasting module, historical water demand data and other relevant information are firstly collected into a data set with the time step of 15 min. After identification and processing of abnormal data, data features are extracted to provide valuable information to the forecasting model inputs. Furthermore, the nonlinear relationship between the historical water demand data and the demand at the next time step is constructed by LSSVM training, which provides the initial forecasting model *F*(*y*) of water demand. Then, the forecasted water demand *y*ˆ*t*+<sup>1</sup> at the future time (target time) *t* + 1 is obtained by the initial forecasting model. The errors of the initial forecasting model on the training data at historical time steps (1, ... , *t*) is expressed as:

$$x\_i = y\_i - \mathfrak{H}\_i \tag{1}$$

where *ei* is the error of the initial forecasting model at the time step *i* (*i* = 1, ... , *t*); *yi* is the observed water demand at time step *i*; *y*ˆ*<sup>i</sup>* is the output value of the initial forecasting model at time step *i*. Note that, *t* + 1 is the first target time step at which the water demand is unknown and needs forecasting.

The error correction module has three steps. Firstly, the error time series (*e*1, *e*2, ... , *ei*, ... , *et*) from the initial forecasting model is transformed into a chaotic time series. Secondly, the LSSVM is adopted to establish the relationship between the errors of the initial forecasting at next time step and the chaotic time series at current and previous time steps, which provides the error forecasting model *f*(*e*). Thirdly, the forecasted error for the target time *t* + 1 is obtained and used to correct the initially forecasted demand value as follows:

$$
\mathfrak{H}\_{l,t+1} = \mathfrak{H}\_{t+1} + \mathfrak{e}\_{t+1} \tag{2}
$$

where *y*ˆ*H*,*t*+<sup>1</sup> is the water demand forecasting by the hybrid model, in other words, the final output of water demand forecasting at the target time *t* + 1; *y*ˆ*t*+<sup>1</sup> is the forecasted water demand by the initial forecasting model *F*(*y*); and *e*ˆ*t*+<sup>1</sup> is the forecasted error by the error forecasting model *f*(*e*).
