Content uploaded by Lakshmi Kanthan Narayanan

Author content

All content in this area was uploaded by Lakshmi Kanthan Narayanan on Aug 06, 2021

Content may be subject to copyright.

IoT-based water demand forecasting and distribution

design for smart city

Lakshmi Kanthan Narayanan and Suresh Sankaranarayanan

ABSTRACT

The percentage of fresh water resource availability in the world is diminishing every year. According

to a world economic forum survey, the increase in water demand will result in high scarcity globally

in the next two decades. The eradication of the water demand increase and reducing the losses

during the transportation of water is challenging. Thus accordingly, an Internet of Things (IoT)-based

architecture integrated with Fog for underground water distribution system has been proposed.

Towards designing an IoT water distribution architecture for a smart city, we need to ﬁrst forecast the

water demand for consumers. Hence, accordingly, water demand forecasting has been carried out

on a daily basis for a period of three months as a case study using autoregressive integrated moving

average (ARIMA) and regression analysis. Based on water demand forecasting analysis, a water

distribution design for an IoT-based architecture has been carried out using hydraulic engineering

design for proper distribution of water with minimal losses which would result in the development of

a smart water distribution system (SWDS). This has been carried out using EPANET.

Lakshmi Kanthan Narayanan

Suresh Sankaranarayanan (corresponding

author)

SRM Institute of Science and Technology,

Kattankulathur,

Chennai, Tamilnadu 603203

India

E-mail: sureshs3@srmist.edu.in

Key words |ARIMA, EPANET, Fog, IoT, SWDS

INTRODUCTION

The International Water Association (IWA) states that water

loss management has achieved increased attention. The rec-

ommendations of IWA have proposed new methods for

modelling leakage detection and loss management com-

ponents (Gupta et al. ).

The common problem that occurs during the transpor-

tation of water from the source via underground pipes to

consumers is transportation loss. The losses are mainly

due to the ﬁttings of the pipe network, leakages, breaks

and cracks in the pipe, overﬂow in the main tanks/sub-

tanks, pressure loss and obstruction due to sediments or

blocks in pipes.

The construction of smart water distribution system

(SWDS) architecture for a smart city is done with storage

reservoirs, booster pumping stations, ﬁre hydrants and consu-

mer service lines and redundancy of the network is provided

via smart water grids and loops (Bibri &Krogstie ). In the

past, the water distribution models used fuzzy-based

decisions in the estimation of ﬂow rate (Zischg et al. ).

The impact of Cloud computing has played a vital role in

bringing the concept of Internet of Things (IoT) into reality.

But at the same time, Cloud computing cannot be integrated

into all the IoT-based systems. The data acquired from the

sensors need to be processed in real time for providing

quick control action for the industrial IoT devices. Fog com-

puting has achieved many more advantages over Cloud

computing, such as low latency, less computational delay

and less bandwidth operation (Bonomi et al. ;Veerama-

nikandan & Sankaranarayanan ).

Thus, accordingly, an IoT-based underground water dis-

tribution architecture integrated with Fog computing and

Cloud has been proposed (Narayanan & Sankaranarayanan

) where the real-time processing happens at the Edge,

also called Fog computing, based on the sensor data

1411 © IWA Publishing 2020 Journal of Water and Climate Change |11.4 |2020

doi: 10.2166/wcc.2019.019

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

captured from underground pipes for control action at the

substation. The Cloud is responsible for storing all historical

information and other pertinent information for Big Data

analyses.

Towards designing such an IoT-based underground water

distribution architecture for a smart city with minimal trans-

portation losses, we ﬁrst need to understand and study

consumer behaviour towards water consumption based on

the historical data available. Thus, the water demand predic-

tion was made for daily consumption over a three-month

period as a case study using autoregressive integrated

moving average (ARIMA) and linear regression with com-

parative analysis. Based on the demand prediction, an

effective and efﬁcient water distribution system has been

designed on the basis of day-wise water demand prediction,

which will resolve issues related towater distribution. Figure 1

shows a sample water distribution system (www.epa.gov).

The main contributions of the paper are as follows.

(1) Statistical analysis of water consumption data and

demand forecasting using ARIMA and regression.

(2) Comparative analysis on statistical model towards

demand forecasting.

(3) Designing of water distribution in IoT-based water

distribution architecture using EPANET-based on the

demand forecasting.

The remaining section of the paper is organized as

follows. The next section presents a complete literature

survey on various technologies adapted in water distribution

and demand forecasting methods. This is followed by a sec-

tion discussing in detail the construction of IoT-based WDS

design with the integration of Fog and Cloud computing

along with demand forecasting-based WDN construction.

The statistical methods adopted for the demand forecasting

are presented in the next section. Then a section deals with

the comparative analysis between ARIMA and linear

regression and water distribution design based on the fore-

cast using EPANET. The ﬁnal section presents the

conclusions and future work.

LITERATURE REVIEW

Much research has been carried out on designing an IoT-

based WDS using sensors in order to monitor the supply

Figure 1 |Water distribution system (courtesy of United States Environmental Protection Agency).

1412 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution design for smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

and quality of water. This WDS will display real-time water

consumed by customers (Perera et al. ).

For a block of apartments, the WDS is built with a series

of interconnected sensors, which are deployed in the pipe

network in order to measure the ﬂow and consumption in

the system. The consumed data are sent to the Cloud

which will perform the task of intimating the customer

regarding their consumption (Amatulla et al. ).

Research has been carried out in constructing an effec-

tive distribution system for rural distribution networks

with a combination of ultrasonic and conductivity sensors

for assessing the water level and quality of water in the dis-

tribution tanks, respectively. In this system, the measured

data are sent to a mobile-based application for further

assessment (Chanda et al. ).

An IoT-based distribution prototype was designed by

Amatulla (Amatulla et al. ) for smart cities. This

system is purely a microprocessor-based monitoring system

where the periodically monitored data are transmitted

through Wi-Fi to the web-based system which is remotely

located (Varma et al.). Ultrasonic sensors are also

used in the water management system (WMS) for identifying

the level of water in the tanks (Candelieri & Archetti ).

Similarly, in the WDS, the sensors are also deployed in

the external pipes that connects the apartment or commu-

nity in order to monitor the amount of water distributed to

each individual household. These data are transmitted

through Wi-Fi to the Cloud platform for further analysis

and graphical report generation (Laspidou et al. ).

The above-discussed water distribution systems are only

IoT-based monitoring systems in which no intelligence and

control automation is involved.

The following paragraphs will discuss in detail research

work that has been carried out by employing machine learn-

ing (ML) and deep learning (DL).

The usage of time series analysis plays a vital role in fore-

casting and prediction. Data clustering is executed by using

time series analysis. Support vector machine regression is

implemented over hourly water consumption data observed

from test-bed setup. This characterization pattern method is

validated over the urban demand of the water distribution net-

work (WDN) of the city of Milan (Gwaivangmin & Jiya ).

Feature extraction of water demand pattern is done by

the construction of Kohonen self-organizing maps. This

analysis is purely dependent upon consumers’bills. This

characterization enables autonomous classiﬁcation on the

basis of consumption of water by the consumers. This con-

sumption pattern analysis was carried out with the

consumers of the Greek island of Skiathos (Herrera et al.

).

An artiﬁcial neural network is deployed over a distri-

bution and control design based on the supervisory

control. This system is designed on the basis of a case

study done in Nigeria. The ultimate aim of this system is

to provide an optimal solution towards WDN in order to

solve the issues that arise due to water scarcity (Chen &

Boccelli ).

Water consumption and demand forecasting of a resi-

dential tower in Korea was used as a case study analysis.

The average consumption over the period of 2012 to 2014

was carried out and used as a training input for the predic-

tion model. This resulted in the construction of a decision-

making model for water distribution (Rinaudo ).

Environmental variables such as humidity, rainfall,

temperature, and atmospheric pressure were left out by

implementing multiple kernel regression algorithms for

daily water demand prediction in order to improve the accu-

racy and computational efﬁciency of the system which

resulted in the design of a decision-making system for a

smart city (Herrera et al. ).

A computational frame for the analysis of water demand

in urban areas is implemented by using a machine learning

approach called regression analysis. It is implemented in

two stages. The ﬁrst stage is clustering of consumption

data on the basis of consumption pattern or behaviour.

A time series forecasting framework was implemented

for statistical forecasting of short-term water demands

using ﬁxed seasonal autoregressive model and adaptive sea-

sonal autoregressive model for predicting real demand of

consumers in a real-world scenario using prototype models

(Candelieri & Archetti ).

Multivariate statistical modelling and microcomponent

modelling are the two adaptive techniques that were utilized

in long-term forecasting of water demand prediction

(Laspidou et al. ).

From the above examples, there were some develop-

ments and research pertaining to an IoT-based monitoring

system for water distribution without integration of Fog

1413 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution design for smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

and intelligence. Also, those systems were not designed for

an underground water distribution system for a smart city.

In addition, regarding water demand forecasting, long-

term predictions were done based on water consumption

data collected from various sources like data source organiz-

ations, water meters or from test-bed setup.

In none of these systems discussed above, had water

demand forecasting been carried out on a daily basis for a

short term based on available daily water consumption his-

toric data. In addition, water demand forecasting was not

integrated with water distribution system design for an efﬁ-

cient and optimal distribution of water to the consumers

in a smart city concept without wastage of water.

Accordingly, we will be discussing in the forthcoming

sections, the proposal of an IoT-based water distribution

architecture integrated with Fog and Cloud, followed by

water demand forecasting and water distribution design in

detail.

IOT-BASED WATER DISTRIBUTION ARCHITECTURE

In the real-world scenario, there are many independent

systems which are used for demand prediction, water distri-

bution automation, monitoring the distribution, estimation

of supply, quality evaluation, etc. However, all these systems

are independently designed for speciﬁc applications.

In India, currently, there are no concrete systems in

practice since they are more than 100 years old. There are

only a few systems in practice in order to perform under-

ground pipe monitoring such as in oil reﬁneries, mines, etc.

Taking these points into consideration and with the

advent of IoT and Fog computing, an IoT-based water distri-

bution architecture integrated with Fog and Cloud is

proposed (Narayanan & Sankaranarayanan ) with the

ultimate aim of providing cost-effective, highly reliable archi-

tecture for water distribution and underground pipe health

monitoring based on the predicted water demand and deter-

mined hydraulic parameters. There are various variable

components, such as climate, season, rainfall, family type,

which can have a huge impact on the decision-making

system in the determination of consumer demand. The fol-

lowing are the essential goals that need to be satisﬁed for

a water distribution system:

(1) The water distribution system (WDS) should understand

the consumer demands and hydraulic parameters which

are dependent on geographical topology.

(2) The WMS should be aware of the basics of supply

requirements as well as demand. It should also investi-

gate the purpose of the application.

(3) The WMS should be thoroughly trained with the intake

structure, source of supply and also WDN (WDN)

structure.

(4) The WDS should be fed with complete information

about the material types and controlling mechanism

used in the system.

Figure 2 illustrates an IoT-based architecture for water

distribution and underground pipe health monitoring

system. Figure 3 shows a sample community-based WDS.

Water distribution system

Based on the IoT-based architecture for a WDS, the design

of the water distribution system is important and a key

task in distribution of water to consumers. This design in

the architecture is based on demand prediction which is

based on historical data of water consumption and, accord-

ingly, supply of water will be initiated by the local SCADA

engineer from the substation.

Hence, predicting the water demand for consumers

with regards to water distribution design, we need to look

into methodologies pertaining to water demand prediction

based on historical water consumption data which are

discussed below.

WATER DEMAND FORECASTING

The water demand forecast is performed using statistical

models of forecasting algorithms, namely, ARIMA and linear

regression. For the prediction of water demand and analysis,

a dataset of day-to-day water consumption of people residing

in the city of Austin (Texas, USA) is taken into account.

The dataset contains the aggregated reading of water

consumption on a daily basis. The dataset also consists of

two maximum consumptions, namely, Peak-1 and Peak-2

consumption during peak hours of the day. The dataset

1414 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution design for smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

detailed account is provided by US government data (www.

data.gov). The dataset contains eight years and three

months of readings from 1 January 2010 to 31 March

2018. Figure 4 illustrates the consumption of water by the

people of Austin over the period January 2010 to March

2018.

We will now discuss in detail the methodology of the

two algorithms –ARIMA and linear regression –regarding

prediction and analysis on historical water consumption

data over a period of eight years.

ARIMA for demand prediction

An ARIMA algorithm has the ultimate aim of performing

statistical analysis of seasonal data regarding data arrange-

ment based on the time pattern globally known as time

Figure 2 |IoT-based architecture for WDS and underground pipe health monitoring (Narayanan & Sankaranarayanan 2019).

Figure 3 |A community-based WDS (courtesy of Prince Mohammad Bin Fahd University) (www.pmu.edu).

1415 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution design for smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

series analysis. This analysis is done to determine the trend

of data, seasonality of occurrences, moving average and to

evaluate the algorithmic performance on the basis of deter-

mining and analysing error.

Box and Jenkins performed a wide range of analysis

using ARIMA. There are three phases that are involved in

the Box–Jenkins analysis model (Tom et al.).

Phase-I: data identiﬁcation

The primary and initial step of the Box–Jenkins model is

preparation of data. In this phase, the data are transformed

in order to make the data series stationary and to stabilize

the variance.

Model selection is the continuous process of this phase

in which the partial autocorrelation function (PACF) and

ACF are carried out in order to ﬁnd the optimal model.

Phase-II: estimation of parameters and testing

In this phase, the parameters are estimated in all the poss-

ible models and the best-ﬁt model is chosen on the basis

of optimal criteria. This step is followed by diagnostics,

where the residuals are diagnosed by portmanteau test and

PACF/ACF is also veriﬁed. The residuals are veriﬁed

whether it is a white noise or not. If the residuals are

found to be white noise, then Phase III is carried out, else

the procedures in Phase I are repeated.

Phase-III: data forecasting

In this phase, the data is being forecasted. In the procedure of

time series analysis, the pattern is decomposed into simpler

form or should be divided into sub-patterns. The data is

assumed as a function of seasonality, error and trend cycle.

Phase-IV: data decomposition modelling

In time series analysis, data are always deﬁned as a function

of error, trend cycle and seasonality component which is

expressed as:

Zt¼f(St,Et,Tt) (1)

In general, the additive form of decomposition is deter-

mined by computing the sum of all the components. The

additive form is represented as:

Zt¼StþEtþTt(2)

This decomposition is applicable only if the seasonal

functions maintain a constant pattern, i.e., no rapid decrease

Figure 4 |Aggregate consumption of the city of Austin over a period of eight years.

1416 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution design for smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

or increase in functional component over a period of time.

Here, the water consumption is a seasonal dependent func-

tion where the consumption rate varies with respect to

seasons of a year. Hence, the decomposition is multiplica-

tive in nature.

ZT¼STEtTt(3)

This is further transformed into additive model by taking

the log of the series in order to derive the additive relation-

ship from the multiplicative relationship.

logZt¼logStlogEtlogTt(4)

Smoothing of data is done to obtain trend-cycle by redu-

cing the random variations. The simple way of smoothing

the time series is moving average (MA). The expression of

MA is as follows:

Tt¼1

KX

m

j¼m

Ztþj, where m¼(Kþ1)

2(5)

Here, MA is determined as ﬁrst order of k, where kis an

integer. It is suitable for calculating an odd number of obser-

vations. For computing MA for six-month observations, the

following equations are derived.

Example of 2 ×6MA:

T2:5¼(Z1þZ2þZ3þZ4þZ5þZ6)

6(6)

T3:5¼(Z2þZ3þZ4þZ5þZ6þZ7)

6(7)

On averaging these two 6 MA smoothers:

T0

3¼(T2:5þT3:5)

2(8)

T0

3¼(Zþ2Z2þ2Z3þ2Z4þ2Z5þ2Z6þ2Z7)

12 (9)

Figure 5 illustrates the 7 MA, i.e., 7 day moving average

applied over the water consumption dataset in order to ana-

lyze the trend for the next 7 days and how it is used in the

process of decomposition. This is beneﬁcial for water

demand prediction on a daily basis over a three-month

period.

Figure 6 describes the trend and seasonality pattern. A

good prediction or data forecasting model will have resi-

dues or forecast errors as described in the following

equation:

Zt¼etþC(10)

Statonarity testing

Dickey–Fuller testing is widely used in practice to test the

stationarity in time series data (Figure 7). It is highly essen-

tial to satisfy the unit root testing method. The primary step

is estimation of the regression model.

Zt¼∅Zt1þb1Zt1þb2Zt2þ...þbpZtp(11)

where ∅value is 4.68, which means Z

t

is stationary. Hence,

Z

t

0is denoted as differential series of Z

t

–Z

t-1

.

Figure 5 |Seven days MA for the 2018 dataset.

1417 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution design for smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

Figure 6 |The decomposition of time series: (a) trend, (b) seasonality, (c) error component.

1418 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution design for smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

Prediction/forecasting

In order to perform prediction, this model used the seasonal

ARIMA: (SARIMA) as

SARIMA ¼(p,d,q)(P,D,Q)S(12)

where sis no. of periods per season, pis order of auto-

regression (AR), dis degree of data differencing (I) invoked

and q is order of moving average (MA).

The general ARIMA (1, 1, 1) (1, 1, 1)

12

model is

expressed as follows:

(1 ∅1B12)(1 ∅1B12 )(1 B)(1 B12)Zt

¼(1 θ1B)(1 θ1B12)et(13)

Here Bis the lag factor, the values of ∅1,θ1are par-

ameters of autoregressive and moving average and used

for forecasting. These steps are applied to the daily water

consumption dataset for a period of eight years in order to

predict their consumption pattern. This work aims to predict

the water demand on a daily basis for the next three months.

The demand forecast analysis and accuracy is discussed in

the Results and discussion section.

Least square linear regression

Linear regression is a statistical model which is used to derive

the relationship between two variables and also helps to

determine the impact of one variable over the other. Here,

the water consumption is one variable, which is impacted

by the change in date/month of year. The regression model

is expressed in terms of association between variables X

and Y. The algorithmic representation of this association is

expressed in terms of a straight line as follows:

Y¼aþbX (14)

Here, ais the intercept of Y and bis the slope of the line.

If the line is a fair line which intercepts the variables X and

Y, and also if the line obtained is a fairly ﬂat line, then the

slope will be small and also the rise of the line obtained will

be smaller than the run. The expression to determine slope is:

slope of line ¼rise

run (15)

slope ¼b¼rise

run ¼Y2Y1

X2X1

(16)

Forecasting through least square regression lines

In the water demand forecasting model, the X axis is

assumed as an independent variable called date and the

consumption variable is assumed as Y. In this dataset,

there is no implication to say that Yis the resultant of X.

The following expression is used to determine the

regression line:

^

Y¼aþbX (17)

Figure 7 |Stationarity testing using Dickey–Fuller test.

1419 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution designfor smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

Here, Xis the observed value of independent variable

called date and ^

Yis the dependent variable of Y called

consumption.

The least square criterion is determined through the fol-

lowing algebraic equation. Here, consider there are ‘n’

observed points for both X and Y variables with a range

from 1 to n. Then for the ‘i’observations, the difference or

deviation between the predicted and observed value can

be formulated as:

ei¼Yi^

Yi(18)

Figure 8 |Decomposition of linear regression: (a) trend, (b) plot of residual water usage, (c) normalized residuals, (d) error plot vs residuals. (Continued.)

1420 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution designfor smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

In order to determine the best-ﬁt points to the demand

prediction curve, the positive and the negative errors get

cancelled and the error ∑e

i

¼0.

Figure 8 shows the decomposition of linear regression

on water consumption dataset illustrating the trend, residual

water usage, normalized residuals and plot of error versus

residual.

Figure 9 shows the best ﬁt regression line for water

demand prediction on a daily basis for the period of three

months which is January–March 2018. The result is 0.2698

which shows that it is a good ﬁt. Best ﬁt should lie between

0 and 1 (www.ncss.com).

RESULTS AND DISCUSSION

Based on ARIMA and least square linear regression method

applied for demand forecasting on water consumption dataset,

this section discusses demand forecast result analysis in terms

of error rate accuracy. Based on the demand forecast, the

WDS will be designed for IoT architecture using EPANET.

Measurement of forecast accuracy

The statistical estimation method of determining error is dis-

cussed previously in detail. The following algebraic

Figure 8 |Continued.

Figure 9 |Best ﬁt curve of linear regression.

1421 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution designfor smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

expression is used in this error calculation which plays an

important role in determining the efﬁciency of the forecast

model. Figure 10 and Table 1 show the statistical forecast

using the LSLR model. Figure 11 and Table 2 show the

statistical forecast using ARIMA model:

et¼OtFt(19)

where O

t

is the actual consumption and F

t

is the forecasted

demand.

Mean error

ME ¼1

nX

n

i¼1

et(20)

Mean absolute error

MAE ¼1

nX

n

i¼1jetj(21)

Table 1 |Forecast for three months using LSLR

Date 2018 Consumed ( y) 2018 Actual predicted (P) (P-Y)/Y ¼error Mod (2018 error) Percentage error Actual error (Y-P) 2018 Sqr. error

1-Jan 13,953.60 13,247.67 0.05 0.95 94.94 705.93 498,343.99

2-Jan 13,861.20 13,204.14 0.05 0.95 95.26 657.06 431,732.93

3-Jan 15,435.60 13,936.75 0.10 0.90 90.29 1,498.85 2,246,555.86

–– – – – – – –

29-Mar 14,768.40 13,583.30 0.08 0.92 91.98 1,185.10 1,404,471.19

30-Mar 13,683.60 13,077.66 0.04 0.96 95.57 605.94 367,165.20

31-Mar 13,449.60 12,968.19 0.04 0.96 96.42 481.41 231,752.04

Total 87.62% 9.47 ×10

5

Figure 10 |Prediction vs consumption using LSLR model.

1422 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution designfor smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

The percentile error PAE is calculated as follows, in

which the relative measures are frequently used:

PE ¼YtFt

Yt

×100 (22)

Mean absolute percentage error

(MAPE)¼1

nX

n

t¼1jPetj(23)

Mean absolute square error

MASE ¼1

nX

n

i¼1jetj

!

2

(24)

Root mean square error

RMSE ¼ﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ

MASE

p(25)

Figure 11 |Prediction vs consumption using ARIMA.

Table 2 |Forecast for three months using ARIMA

Date 2018 Consumed (y) 2018 Actual predicted (P) (P-Y)/Y ¼error Mod (2018 error) Percentage error Actual error (Y-P) 2018 Sqr. error

1-Jan 13,953.60 13,172.44 0.06 0.94 94.40 781.16 610,205.31

2-Jan 13,861.20 13,513.51 0.03 0.97 97.49 347.69 120,891.50

3-Jan 15,435.60 13,604.39 0.12 0.88 88.14 1,831.21 3,353,314.18

–– – – – – – –

29-Mar 14,768.40 13,888.32 0.06 0.94 94.04 880.08 774,542.09

30-Mar 13,683.60 14,186.21 0.04 0.04 3.67 502.61 252,616.78

31-Mar 13,449.60 13,941.76 0.04 0.04 3.66 492.16 242,222.18

Total 52.45% 1.08 ×10

6

Table 3 |Comparison of forecast errors for three months

Error ARIMA LSLR

MAPE 52.45% 88.09%

MASE 1.08 ×10

6

9.47 ×10

5

RMSE 1.03 ×10

3

9.73 ×10

2

1423 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution designfor smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

The forecast calculation accuracy between the two

statistical models ARIMA and LSLR is compared and dis-

played in Table 3. From the comparative analysis it is

evident that error in terms of MASE and RMSE is higher

for ARIMA compared to LSLR in terms of predicted and

actual value towards demand prediction. However, in

regard to prediction accuracy, the ARIMA model forecast

accuracy is better than the LSLR forecast model where

MAPE is higher for LSLR as compared to ARIMA, as

shown in Table 3. That is, higher MAPE signiﬁes that

percentage error is greater for LSLR which results in

low accuracy as compared to ARIMA where MAPE is

less. From the statistical analysis it is also found that in

spite of the demand prediction, consumption is at quite

a high rate. It is not necessary that the consumption is

entirely utilized by the consumers. The consumption

reading is inclusive of losses due to pipe breakages,

joint materials and gate valves, ageing of WDN, etc., natu-

ral causes and theft of water. In order to minimize the

losses, a highly efﬁcient WDN is required. The following

section discusses in detail the design of the WDN and

simulating the hydraulic behaviour as a pre-requisite for

IoT-based WDS.

Design of WDN using EPANET

Based on the demand prediction made using the ARIMA

model for the ﬁrst season (January–March) of 2019, the

WDN is constructed on the basis of the following assump-

tions (Table 4).

Table 4 |WDN design assumptions

S. no. Name of parameter Description

1 No. of distribution points 50

2 Material of pipe PVC

3 No. of junctions 26

4 Diameter of pipe 100 mm

5 Length b/w each junction 500 m

6 Roughness coefﬁcient 140

7 Calculation method Hazen–Williams formula

Figure 12 |Season-1 forecast for three months of the year 2019 (January 2019–March 2019).

1424 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution designfor smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

The formula for calculating head loss occurring in pipe

is determined using the Hazen–Williams formula as follows:

h100ft ¼0:002083 100

c

1:852

Lq1:852

d4:8655

h

(26)

where h

100

ft is friction head loss inside pipe per 100 feet, Lis

length of pipe in feet, cis Hazen–Williams friction constant,

qis volume of ﬂow in gallons per minute, d

h

is hydraulic

diameter inside the pipe.

Thedateof17January2019predicteddatais

taken for pipe network simulation. The water distribution

on that particular date is taken as the average

quantity for 24 hours’distribution and it is illustrated in

Figure 12.

The WDN network is constructed as per the details

furnished below. EPANET network design consists of 50

distribution mains supplied by 1 reservoir.

•The average demand and the maximum demand for Jan-

uary 2019 is computed as 12,625 million gallons (MG) as

per the prediction for 17 January 2019. 1,286 MG is the

maximum requirement in the three months’predicted

analysis (January 2019–March 2019).

•The maximum demand is for a postal zone and it is

assumed as 50 supplier tanks connected through 25

junctions.

•The variable length of PVC for the upper networks is 500

and the bottom network is 1,000 m.

•The diameter of the pipe is 100 mm.

•The base demand of each node is distributed equally

across the 25 junctions.

•The base water level in the supply reservoir is assumed as

the quantity of water required as per the prediction made

by analysis.

Table 5 illustrates how the water demand for 17 January

2019 is assumed to be supplied and simulated along with the

peak and normal duration supply.

The construction of the WDN and the hourly ﬂow of

water in the WDN is illustrated in the following ﬁgures.

From Figures 13–15, it is understood that the simulation

of WDN is done using EPANET. This simulation helps in

determining the hydraulic parameters such as ﬂow

volume, pressure, head-loss, etc. at each and every junction

and node of the WDN. It is also helpful in predetermining

the hydraulic nature of WDN for the already existing

water distribution system. It is helpful in the design of a

new hydraulic distribution system as well as being useful in

determining the performance of the existing or already con-

structed WDN. EPANET analysis, as shown in Figures 14

and 15,describestheﬂow of water in the WDN in the

course of time. It helps the SCADA engineer to map the

ﬂow in the pipeline. It also illustrates how data prediction

can be integrated with the WDN design, which is done

with the ultimate aim of reducing losses in water distribution.

This analysis also helps to determine the exact ﬂow including

the losses that happen during the transmission in order to

match the supply as per requirement.

Table 5 |Hourly supply of water on 17 January 2019

EPANET supply 17 January 2019 (in

hrs) Supply (MG)

Multiplier

factor

0 375 0.2

1 350 0.06

2 450 0.02

3 550 0.03

4 575 0.06

5 775 0.13

6 1,000 0.9

7 1,400 1.68

8 1,600 1.35

9 1,400 1.35

10 300 0.67

11 300 0.56

12 250 1

13 200 2.56

14 200 3.56

15 200 2.81

16 200 1.24

17 300 0.75

18 500 0.9

19 400 1.75

20 300 1.25

21 300 1.25

22 400 0.34

23 300 0.34

Total predicted ¼12,624.72 Total supplied

12,625

1425 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution designfor smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

CONCLUSION AND FUTURE WORK

To conclude, an IoT-based architecture integrated with Fog

for an underground WDS has been proposed. In addition to

proposing an IoT-based architecture for WDS, water

demand forecasting has been done for water distribution

design. The water demand forecast has been carried out

on a daily basis for a period of three months using

ARIMA and regression analysis.

Based on water demand forecasting analysis, water dis-

tribution design for an IoT-based architecture has been

carried out using hydraulic engineering design for proper

Figure 13 |WDN design using EPANET.

Figure 14 |Water ﬂow during ﬁnal distribution stage on 17 January 2019 at node 25 during 0.45 hrs.

1426 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution designfor smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

distribution of water with minimal losses which would result

in the development of a smart water distribution system

(SWDS). This has been carried out using EPANET.

In future, the system can extend to predicting water

demand using LSTM which is an extension of recurrent

neural networks and be similarly extended for water distri-

bution design for varying types of consumers. Also, the

system can be incorporated with intelligence for an under-

ground pipe health monitoring system using intelligent

agents for immediate action from SCADA engineers.

REFERENCES

Amatulla, P. H., Navnath, B. P., Yogesh, B. P. & Ashwini, Z. S.

IoT based water management system for smart city.

International Journal of Advanced Research Ideas and

Innovation in Technology 3(2), 379–383. https://www.ijariit.

com/manuscripts/v3i2/V3I2-1252.pdf

Bibri, S. E. & Krogstie, J. Smart sustainable cities of the

future: an extensive interdisciplinary literature review.

Sustainable Cities and Society 31, 183–212. https://doi.org/

10.1016/j.scs.2017.02.016.

Bonomi, F., Milito, R., Natarajan, P. & Zhu, J. Fog

computing: a platform for internet of things and analytics. In:

Big Data and Internet of Things: A Roadmap for Smart

Environments (N. Bessis & C. Dobre, eds). Springer,

Switzerland, pp. 169–186. https://doi.org/10.1007/978-3-

319-05029-4_7.

Candelieri, A. & Archetti, F. Identifying typical urban water

demand patterns for a reliable short-term forecasting –the ice

water project approach. In: Procedia Engineering,

Proceedings of 16th Conference on Water Distribution System

Analysis, Bari, Italy, 89, 1004–1012. https://doi.org/10.1016/

j.proeng.2014.11.218.

Chanda, R., Prabaharan, S. R. S. & Muthulakshmi, S. IoT

based water management, IEEE Xplore. In: International

Conference on NextGen Electronic Technologies: Silicon to

Software, Chennai, India. https://ieeexplore.ieee.org/

abstract/document/8067943/similar#similar

Chen, J. & Boccelli, D. L. Demand forecasting for water

distribution systems. In: Procedia Engineering, Proceedings of

12th International Conference on Computing and Control for

the Water Industry, Perugia, Italy, 70, 339–342. https://doi.

org/10.1016/j.proeng.2014.02.038.

Gupta, A. D., Bokde, N. & Kulat, K. D. Hybrid leakage

management for water network using psf algorithm and soft

computing techniques.Water Resources Management 32 (3),

1133–1151. https://doi.org/10.1007/s11269-017-1859-3.

Gwaivangmin, B. I. & Jiya, J. D. Water demand prediction

using artiﬁcial neural network for supervisory control.

Nigerian Journal of Technology (NIJOTECH) 36 (1), 148–154.

http://dx.doi.org/10.4314/njt.v36i1.19.

Herrera, M., Izquierdo, R., Perez-Garcia, D. & Ayala-Cabrera,

D. On-line learning of predictive kernel models for

urban water demand in a smart city.In:Procedia

Engineering, Proceedings of 12th International Conference

on Computing and Control for the Water Industry, Perugia,

Italy, 70, 791–799. https://doi.org/10.1016/j.proeng.2014.

02.086.

https://www.epa.gov/dwsixyearreview/drinking-water-

distribution-systems.

https://www.ncss.com.

https://www.pmu.edu.sa/Academics/Design_Water_Supply_

Facility_Khobar_Residential_Complex.aspx.

Figure 15 |Water ﬂow in WDN for 24 hrs.

1427 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution designfor smart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021

Laspidou, C., Papageorgiou, E., Kokkinos, K., Sahu, S., Gupta, A. &

Tassiulas, L. Exploring patterns in water consumption by

clustering.In:Proceedia Engineering, Proceedings of 13th

Computer Control for Water Industry Conference, Leicester,

UK, 119, pp. 1439–1446. https://doi.org/10.1016/j.proeng.

2015.08.1004.

Narayanan, L. K. & Sankaranarayanan, S. IoT based smart

water distribution management and underground pipe health

monitoring system for smart city. In: IEEE Sponsored 2019

5th International Conference for Convergence in Technology

(In press).

Perera, C., Qin, Y., Estrella, J. C., Marganiec, S. R. & Vasilkos,

A. V. Fog computing for sustainable smart cities: a

survey.ACM Computing Surveys 50 (3), 1–39. http://delivery.

acm.org/10.1145/3060000/3057266/a32-perera.pdf?

ip=103.4.223.69& id=3057266&acc=ACTIVE%

20SERVICE&key=045416EF4DDA69D9%

2EA1D9F3C769B82345%2E4D4702B0C3E38B35%

2E4D4702B0C3E38B35&__acm__=1556078150_f57b96df7

ab5f648ea15d0f91354d036.

Rinaudo, J. D. Long-term water demand forecasting.

In: Understanding and Managing Urban Water in Transition

(Q. Grafton, K. A. Danielle, C. Nauges, J.-D. Renaudo & N.

W. W. Chan, eds). Springer, Dordrecht, pp. 239–268. https://

doi.org/10.1007/978-94-017-9801-3_11.

Tom, R. J., Sankaranarayanan, S. & Rodrigues, J. P. C. Smart

energy management and demand reduction by consumers

and utilities in an IoT fog based power distribution system.

IEEE Internet of Things Journal X(X), 1–8. 10.1109/JIOT.

2019.2894326.

Varma, S. K., Hemalatha, I. & Kishore, R. A smart water

management system for rural area water tanks. Journal of

Chemical and Pharmaceutical Sciences 10 (10), 29–33.

Retrieved from https://www.jchps.com/specialissues/2016%

20SPECIAL%20ISSUE%2010/07%20JCP.pdf

Veeramanikandan, M. & Sankaranarayanan, S. Publish/

subscribe based multi-tier based computational model in

internet of things for latency reduction.Journal of Parallel

and Distributed Computing 127,18–27. https://doi.org/10.

1016/j.jpdc.2019.01.004.

Zischg, J., Rauch, W. & Sitzenfrei, R. Morphogenesis of urban

water distribution networks: a spatiotemporal planning

approach for cost-efﬁcient and reliable supply.Entropy

20 (9), 1–22. https://doi.org/10.3390/e20090708.

First received 28 January 2019; accepted in revised form 10 June 2019. Available online 18 July 2019

1428 L. K. Narayanan & S. Sankaranarayanan |IoT-based water demand forecasting and distribution design forsmart city Journal of Water and Climate Change |11.4 |2020

Downloaded from http://iwaponline.com/jwcc/article-pdf/11/4/1411/829970/jwc0111411.pdf

by guest

on 06 August 2021