INTERNATIONAL JOURNAL OF COMPUTERS COMMUNICATIONS & CONTROL Online ISSN 1841-9844, ISSN-L 1841-9836, Volume: 15, Issue: 6, Month: December, Year: 2020 Article Number: 3977, https://doi.org/10.15837/ijccc.2020.6.3977 CCC Publications Water Demand Forecasting using Deep Learning in IoT Enabled Water Distribution Network L.K. Narayanan, S. Sankaranarayanan, J.J.P.C. Rodrigues, S. Kozlov Lakshmi Kanthan Narayanan Department of Computer Science and Engineering Chennai Institute of Technology Chennai, India lakshmikanth.vlsi@gmail.com Suresh Sankaranarayanan* SRM Institute of Science and Technology Chennai, India *Corresponding author: sureshs3@srmist.edu.in Joel J. P. C. Rodrigues 1 Federal University of Piauí (UFPI), Teresina – PI, Brazil 2 Instituto de Telecomunicações, Portugal. 3 ITMO University, St. Petersburg, Russia Sergei Kozlov ITMO University, St. Petersburg, Russia Abstract Most of the water losses occur during water distribution in pipelines during transportation. In order to eradicate the losses, an “IoT based water distribution system” integrated with “Fog and Cloud Computing" proposed for water distribution and underground health monitoring of pipes. For developing an effective water distribution system based on Internet of Things (IoT), the demand of the consumer should be analysed. So, towards predicting the water demand for consumers, Deep learning methodology called Long Short-Term Memory (LSTM) is compared with traditional Time Series methodology called Auto Regressive Integrated Moving Average (ARIMA) in terms of error and accuracy. Now based on demand prediction with higher accuracy, an IoT integrated “Water Distribution Network (WDN)” is designed using hydraulic engineering. This WDN design will ensure minimal losses during transportation and quality of water to the consumers. This will lead to development of a smart system for water distribution. Keywords: Internet of Things, Recurrent Neural Network, Long Short-Term Memory, Auto Regressive Integrated Moving Average, Water Distribution Network. https://doi.org/10.15837/ijccc.2020.6.3977 2 1 Introduction In the present era, people are facing many health hazards due to accessing unsafe water. A report of World Health Organization (WHO) states that the imbalance in the quantity and quality of water leads to the downtime of human activities. It is the need of the hour to construct a safe water distribution and management system in order to save our future generations. The major reason for the water quality issues are because of breakdown or crack in pipes, poor monitoring and demand forecast system, loss in quantity of distribution due to water theft and leakages. Also, the current water distribution system that is in practice in India is the traditional system which has not changed over more than 100+ years. Figure 1 illustrates the traditional water distribution system. Figure 2 shows a typical “Water Sub-Distribution” system which describes how water is distributed to all the consumer nodes. Figure 1: Water Distribution System Figure 2: Water Sub distribution system There are two types of Water Distribution Network (WDN) based on the location of pipes laid which are Above Ground Water Distribution Network (AGWDN) and Underground Water Distribu- tion Network (UGWDN)[3]. In water distribution systems, the supervisory control and automation is not in practice throughout the network. All the process are completely automated only at the water treatment unit using SCADA and not done yet especially in the distribution part of the network[5]. In the traditional water distribution system, there is no part for the demand forecast analysis. For the determination of rate of flow in the pipe network, Fuzzy based method is used in the traditional system[4]. It is hard to deploy the sensors under the surface of ground which plays a vital role in making decision for operational control by the engineer. So with advent of IoT [22], we can make this into reality. In order to take real time decision based on data communicated by the underground sensor, Fog/Edge computing introduced by CISCO been integrated with IoT. The computation delay, latency and bandwidth are reduced to a great extent by the evolution of Fog computing which is an extension of cloud computing in IoT[8, 29]. So accordingly, an “IoT” integrated with “Fog and Cloud Computing” for underground “Water Distribution Management” and pipe health monitoring proposed where all the real time processing happen at the edge level called fog computing. All the data is captured from various sensors that are deployed internally and externally over the surface of pipe with laminated protection under the surface of ground. For storing the processed and unpro- cessed data for future operations like billing, Consumption analysis etc., Cloud computing employed which is a part of the system[17]. For developing such an IoT based system for the water distribution management, the first and foremost step is identifying the consumption pattern and behavior of con- https://doi.org/10.15837/ijccc.2020.6.3977 3 sumer through the detailed analytical study of historical data. There are various realistic models that are used for demand forecasting like “SVM, Regression, ANN, ARIMA” which has produced proven results as available from literature[10, 13, 18]. The current trend is more towards Deep Learning which uses various numbers of interconnected different layers present in the neural network. Deep learning ensures neural network to learn from a large volume of data and complex algorithms are used to train the neural net. Figure 3 shows the design layer of the neural network system. Figure 3: A Neural Network Label So, the proposed work aims at designing an efficient water distribution system based on demand forecast for smart city with minimal transportation losses. So, towards this, historical “water con- sumption” data is used for studying the consumer behaviour. So accordingly, the water demand predictions were made for a daily consumption over 3-month period as a case study using “LSTM and ARIMA” in terms of error and accuracy. The major contribution of the paper are as follows. •Prediction of Daily Consumption water demand using “Deep learning” method called “LSTM”. •Prediction of Daily Consumption Water Demand using “ARIMA”. •Comparative analysis of LSTM Versus ARIMA based Demand Forecasting. •Design and analysis of “Water Distribution Network” based on “LSTM” based forecast using EPANET for 24 hr period. The rest of the sections in this paper organised as follows. Section 2 discusses about the various technologies adopted in construction of water distribution system and also about various methods for demand forecasting. Section 3 discusses on Water distribution architecture for IoT followed by the operation of water distribution system and Water Demand forecasting using “LSTM” which is a variant of “Recurrent Neural Network”. Section 4 talks on the Results and Discussion which compares the water demand forecasting using “LSTM” with traditional “Time Series Analysis” method called “ARIMA” in terms of error and accuracy. Also based on demand forecasting using LSTM, water distribution design carried out using EPANET. Section 5 is the concluding and future work section which gives the concluding remarks of the research with future direction of research. 2 Literature Review Many researches are made on designing an “IoT Water Distribution System” using sensors in order to monitor the supply and quality of water. This “WDS” will display the real time water consumed by the customers[6]. In terms of SCADA for water distribution, data is collected from various “sensors” deployed in the network from remote locations and correspondingly processes the data[7, 28]. Re- search been done towards identifying the quality of water by employing Randomized Pollution Matrix and Maximum Column Coverage methodologies[23]. Researchers have developed a system employing microphone and acoustic signature for sensing the water flow and actively controlling the water flow. In addition, determination of fault or leak in the pipeline analyzed too[19]. Now towards “Water Dis- tribution Automation”, Solution is provided towards “fault-diagnosis, fault-detection, flow-pressure variation regulation and control, isolation and restoration” of pipes in the network, enhancing and im- proving the efficiency and performance of the “water distribution system”. For towards development of smart sensors, “Micro Electro Mechanical System (MEMS)” has played a very important role[1]. For covering up large distance between placement location of water tanks, “Ultrasonic sensors and sub-GHz based systems” are developed. For controlling the operation of “water distribution system”, “Smart valves” are introduced[24]. Research carried out towards the development of contamination warning system (CWS) for “drinking water distribution systems”. For detection of contaminants rapidly, placement of sensors is the critical aspect in the design of “CWS”[14]. Research been done https://doi.org/10.15837/ijccc.2020.6.3977 4 towards measuring the hydrogen ion concentration present in the water flow through the pipe by deploying pH sensors. This is helpful in assuring the quality of water that is supplied to customer[11]. Research also been done by measuring conductivity in water by employing conductivity sensor for wa- ter quality. This sensor allows you to measure water conductivity which is included in Open Garden Hydrophonics[15]. “Internet of Things” refers to networking the devices towards sensing and collecting the data from the environment and sharing the data across different devices towards processing for various purposes[16]. Researcher have employed IoT towards the leakage detection in the pipe which is based on the “drip-out” happening outside the surface of the pipe. “Moisture Sensors” are deployed at the top and bottom surface of the pipe outside[27]. For effective water management, “Electromagnetic wave” communication happen between “underground” and “aboveground” sensors. The communica- tion range is “2.4GHz frequency” and “operating range is 73 meters to 100 meters[? ]. Research been done towards proposing an IoT based reference architecture called the Integrated Water Resource Management which specially focuses on the water management. It is a unified architecture for linking and embedding process control mechanism. Research has been done in connecting the intermediate gateway to the control system to the internet. The Web based application is used as a gateway to communicate to the internet. A system for servicing the city piped network intelligently using IoT is developed using dynamic simulation model, which is used to monitor the drainage pipes underground. Geographical Information System is used as spatial management system[20]. For monitoring the wa- ter supply and controlling the water theft, novel and innovation system developed. “ADAFRUIT” server used for simulation of the system[25]. Researchers have developed a system for collecting the data sources and the data analysis carried out. The consumption of data is done online through data visualization[2]. It has been seen so far that good amount of work done by employing IoT for water distribution, water flow, water quality and Water theft. Now in terms of water demand prediction, research been done by employing “machine learning” which are discussed below. A system to predict the water demand for a region is done using “Artificial Neural Network (ANN)”. The forecast data of “Laminga water treatment plant and distribution network” is taken into consideration for 60 days. The supervisory control is designed to control the login security through user name and password pro- tection, interfacing the demand node for the activation / deactivation of pumps and also interfacing the activation/deactivation of valves[13]. Research done towards a deterministic model for the prediction of water demand in the Austin household area is taken into considerations. The consumption pattern is correlated with the number of persons in the household. “Kohenen self-organization maps” are used for clustering. The graphical analysis of consumption is made in 7*7 formats. The application of Time Series Analysis in data analytics has made many improvements in terms of accuracy of the predic- tion made. The water distribution of Milan city is validated over the demand forecasted and actual consumption through a test bed setup. SVM is the method used for performing this analysis[13]. On top of SCADA system, an Artificial Neural Network -ANN is deployed. This system is implemented on the basis of case study done in Nigeria. Solution is provided towards remote monitoring of hydrol- ogy parameters and drawing a feasible solution towards scarcity of water in the Water Distribution Network[10]. Adaptive Seasonal Regression model and auto regressive model with fixed seasonality is used for short term water demand prediction. This analysis was carried out by using a statistical forecasting method based on the data obtained from prototype test bed. This resulted in derivation of a framework called Time Series Forecasting Framework(TSFF)[9]. A decision-making model is derived as a result of analysis carried out on case study of demand forecasting of water consumed by people of residential buildings in Korea. Demand forecasting is made by Back Propagation Neural Network with considerations of climate, seasonality components and geometrical values. Two years consumption of residents from 2012 to 2014 is used as training input[26]. From the data analytics employed in water demand prediction, it has been concluded that good amount of research done by employing machine learning algorithms like ANN, SVM, BPNN and Regression. None of the system has employed Deep learning for water demand prediction. In addition, none of these water demand predictions been integrated into IoT based water distribution system towards water distribution design. None of the system is implemented using short term distribution like daily water demand forecast integrated with water distribution design with minimal loss of water and meeting the demand of consumers. The forthcoming session will discuss about integration of Fog and Cloud computing with IoT based Water https://doi.org/10.15837/ijccc.2020.6.3977 5 Distributed System architecture design in detail. 3 Water Distribution Architecture using IoT There are different types of systems that are in practice for demand forecasting, Quantity Mea- surement, automation of distribution etc. All these systems are standalone applications. "IoT based Water Distribution architecture” integrated with “Fog and Cloud Computing” been proposed [17, 21] based on the above-mentioned points. Figure 4 illustrates an “IoT” based architecture for “Water Distribution and Underground Pipe Health Monitoring System”. Figure 4: An IoT based Water Distribution Architecture[17] 3.1 Operation of Water Distribution System The design of the “Water Distribution System" is based on the prediction of consumer demand. The water distribution forecasting is done based on historical water consumption data. The water supply in the network will be initiated by the “SCADA” engineer on the basis of forecast made. This forecast based distribution enables the SCADA engineer to look for alternate source if the required quantity is not available. The hydraulic parameters like “flow, pressure, velocity and also quality” is monitored through the various sensors positioned at pre-defined intervals in and around the pipe. For keeping track of pipe health, quality of water flow and hydraulic parameters like the flow, pressure inside the pipe need to be monitored. Different methodologies pertaining to “Water Demand prediction” need to be looked into based on historical water consumption data for predicting the water demand towards water distribution design. These are discussed below 3.2 Water Demand Forecasting This section will discuss in detail about the prediction of water demand towards effective im- plementation of WDS design. The water demand forecasting is done by using “Long Short-Term Memory (LSTM)” which is a variant of “Recurrent Neural Network” under “Deep Learning”. The de- mand forecast analysis using “LSTM” is compared with the traditional “Time Series Analysis” called “Auto Regression Integrated Moving Average (ARIMA)” in terms of error and accuracy. Towards the demand forecasting and analysis, the day-wise water consumption data of the residents of Austin City-Texas, USA is considered. The dataset consists of water meter readings of various types of con- sumers like residents, industrial and public etc. The dataset also consists of maximum consumption data labeled as Peak 1 and Peak 2 along with total consumption of the day. The dataset details are furnished in public domain of US Web [30]. It contains consumption data for 8 years and 3 months from Jan-01-2010 till March-31-2018.The following figure illustrates the consumption of Austin city over the period of Jan 2010 to March 2018. 3.2.1 Recurrent Neural Network Before getting into the details of LSTM which is a variant of RNN for time series forecasting, details about Recurrent Neural Network been discussed. There are many difficulties that arise in handling sequential inputs, memorizing previous outputs etc. in the traditional neural network. So, with the upcoming of Deep learning, RNN is developed. RNN is smart enough to handle sequential https://doi.org/10.15837/ijccc.2020.6.3977 6 Figure 5: Water consumption of Austin from January 2010 to March 2018 data, keep track of current input and previous inputs and also keeps track of previous inputs due to the in built provision of memory. Figure 6 illustrate the basic RNN model. Figure 6: RNN Processing States Where ht is the output of the network after processing, Xt is the input states. Data at the previous states is denoted by successor -1 and future state is denoted with a successor of +1. Figure 7 illustrates layered architectural representation of RNN. In RNN, there are three layers namely input, output and hidden layers respectively. Here h is the new state formed after performing a geometrical operation called tan (h). In order to determine the outcome of hidden layer (h(t)) parameter, the following equation is used. h(t) = Sh(WhXt + Uhht−1 + Bh) Y (t) = SY (WY ht + BY ) Here “Xt” is input vector, ht is input layered vector, “Yt“ is output vector. “W,U and B” are metrics and vector, Sh is activation function within the hidden layer which can be TANH or RELU. The output activation function SY is either sigmoid or Softmax or linear. RNN vanishes the gradient problem that occurred in the neural network model by exploding gradients through Back propagation and the gradients are vanished by using Long Short-Term Memory (LSTM) networks. 3.2.2 LSTM Networks LSTM is a special type of RNN which learns the long term dependencies at a rapid pace.It has a unique feature incorporated in it viz. keeping track of information over a longer duration of time. The RNN network is formed by repeated chains of neural network. The structural formation of these modules is very simple in structural construction. It is built with only one tan(h) layer. LSTM follows a very special way to interact between the four different layers present in the structure. Figure 7 shows the different layers in LSTM. Figure 7: LSTM Computation Layer https://doi.org/10.15837/ijccc.2020.6.3977 7 3.2.3 Working of LSTM* Step 1: Decision over the size of remembrance of the past data The primary step in LSTM is eliminating the irrelevant data from the input cell during the specific time step. This is performed by function shown in the above figure called sigmoid (S).This sigmoid layer will act as an input gate which helps in making the decision of which contents of the memory cell to be processed forward. ft = S(Wf .[ht−1, Xt] + bf ) Where ft is forget gate, which decides on which information to be left out from the previous state of time, ht-1 is the previous state and Xt is the current input. Step 2. Selective Cell Update Values After the decision made on the size of memory of previous state, the comparison is made between the current input Xt and previous output ht-1. It helps the LSTM to determine how much of the past unit is needed to be included with the present input. A vector of new candidate value Ct’ is created by tanh layer in order to write to the memory cell. The following equation is used for this selection. it = S(Wf .[ht−1, Xt] + bf ) Ct = tanh(Wc.[ht−1, Xt] + bc) Ct = ft ∗ Ct−1 + it ∗ C′t Here it is input gate which helps in deciding which of the information can be passed forward on the basis of present time step. Step 3: Decides which part of the present state can be proceeded to output state This state helps in setting up the output. Sigmoid layer is executed formerly to determine which are the components of the cells through to the output. Then tanh function is applied over the cell state in order to limit the values between -1 and 1. Finally this outcome is multiplied with the sigmoid gate output.The sigmoid layer decides which part of the memory is to be written to the output gate. ot = S(Wo.[ht−1, Xt] + bo) ht = ot ∗ tanh(ct) Here ot is the output gate, which creates an impact on the output gate by the passed information in the present time step. Here for the water distribution forecast analysis, the model is trained with 43000 input sequence of daily consumption from Jan 2010 till March 2017 which is the training data set. The model is designed with these inputs for performing long time prediction. The secondary model is built with automated test set training from the pre-trained model in order to perform short term prediction based on nearly six-month data as validation data set. The range of feedback delay is set within a range of 1 to 5 which is based on the number of neurons in each hidden layer, the maximum range can be between 1 to 40. The number of hidden layers is set with a range of 1 to 3 for training functions. This is set with reference to Bayesian Regularization and Levenberg Marquardt. The initial learning rate of the system is obtained as 0.0009 using solver called Adam Optimizer. This is shown in Figure 8. Here the data set consist of vectors like date, consumption in Million Gallons, peak-1 consumption and peak-2 consumption. The entire data is fed as input through the input layer. The forget gate is programmed to forget the null values and also the peak-1, peak-2 values in order to feed the consumption of water to predict the future demand. The output gate will have the vectors called date and predicted quantity of water in Million Gallons. https://doi.org/10.15837/ijccc.2020.6.3977 8 Figure 8: Summary of data trained with LSTM Model 4 Results and Discussion Based on the LSTM and ARIMA applied for water consumption demand prediction over the data set of water consumption of Austin city, this section will briefly discuss on the forecast analysis result in terms of accuracy of forecast and percentage of error in prediction. Based on this forecast analysis, an IoT based distribution network design construction is discussed in the following section. The algebraic expression which plays a vital role in determining effectiveness of the prediction model in terms of efficiency is described below. et = Ot − Ft Here et is the calculated error, Qt is actual amount of water consumed and Ft is the predicted demand. M eanError[M E] = 1 n ∑ i=1n et M eanAbsoleteError[M AE] = 1 n ∑ i=1n |et| The percentage of error is calculated as follows P E = Ot − Ft Ot ∗ 100 Here PE is Error in percentage. The following figure shows the LSTM model trained with the data set.Comparative analysis of prediction vs. consumption of water is done and the results are discussed below. Figure 9 and 10 shows the LSTM and ARIMA forecast versus consumption for 2018. Table-1 and 2 shows the prediction for 3 months in 2018 for LSTM and ARIMA. Table-3 represent the computation of errors and accuracy that are found during forecast analysis using recurrent neural based LSTM and statistical based ARIMA models. From the table it is evident that the accuracy of LSTM model is nearly 12 percent higher when compared with ARIMA. From the table it is also proven that in spite of the prediction, the consumption is higher over a greater period of time. We cannot claim that the entire volume is properly consumed by the consumers. The consumption data includes volume of water lost during transportation and water theft occurred etc. It is necessary to minimize the losses https://doi.org/10.15837/ijccc.2020.6.3977 9 Figure 9: LSTM Forecast vs Consumption for 2018 Season 1 Figure 10: ARIMA Forecast vs Consumption for 2018 Season 1 Table 1: Prediction for 3 months using LSTM Date (O) 2018 (F) 2018 Act- (O-F)/O Mod(2018 Percentage Actual 2018 Sq. Consumed -ual Predicted =Error Error) Error Error Error 1 Jan 13953.60 14853.76 0.06 0.06 6.45 -900.16 810279.82 2 Jan 13861.20 14168.71 0.02 0.02 2.22 -307.51 94565.27 3 Jan 15435.60 14396.96 -0.07 0.93 93.27 1038.64 1078780.87 - - - - - - - - 29 Mar 14768.40 14043.00 -0.05 0.95 95.09 725.40 526203.74 30 Mar 13683.60 14043.00 0.03 0.03 2.63 -359.40 129170.47 31 Mar 13683.60 14043.00 0.04 0.04 4.41 -593.40 352128.20 TOTAL 40.41% 3689248.26 Table 2: Prediction for 3 months using ARIMA Date (O) 2018 (F) 2018 Act- (O-F)/O Mod(2018 Percentage Actual 2018 Sq. Consumed -ual Predicted =Error Error) Error Error Error 1 Jan 13953.60 13172.44 -0.06 0.94 94.40 781.16 610205.31 2 Jan 13861.20 13513.51 -0.03 0.97 97.49 347.69 120891.50 3 Jan 15435.60 13604.39 -0.12 0.88 88.14 1831.21 3353314.18 - - - - - - - - 29 Mar 14768.40 13888.32 -0.06 0.94 94.04 880.08 774542.09 30 Mar 13683.60 14186.21 0.04 0.04 3.67 -502.61 252616.78 31 Mar 13683.60 13941.76 0.04 4.41 -492.16 242222.18 TOTAL 52.45% 97274284.40 since fresh water availability has started diminishing. In order to overcome this flaws need a WDN with smartness. The graphical representation of error and prediction accuracy is illustrated in the figure 11 and figure 12 respectively. https://doi.org/10.15837/ijccc.2020.6.3977 10 Table 3: Comparison of accuracy betweeen LSTM and ARIMA LSTM ARIMA MAPE 40.41 52.45 Accuaracy 59.59 47.55 MASE 3.6x10^5 9.7x10^6 M eanAbsoluteP ercentageErrorM AP E = 1 n ∑ i−1n M od[P E] Accuracy= 100 - MAPE The accuracy is derived by reducing the percentage of error from hundred. The accuracy obtained using LSTM model is better than that of forecast analysis done by ARIMA. The accuracy of the LSTM is obtained nearly 60 percentage whereas ARIMA is only 48 percentage on validating the entire data set. Figure 11: MAPE Comparison between ARIMA and LSTM Figure 12: Comparative analysis of percentage error and accuracy 4.1 Water Distribution Design Using EPANET On the basis of the demand forecast done using LSTM model for the first quarter of the year 2019, the distribution network is designed on the basis of following assumptions as shown in Table 4. Table 4: Assumptions for Water Distribution Design S.No Name of the Parameter Description 1 No. of distribution points 50 2 Material of pipe PVC 3 No. of junctions 26 4 Diameter of pipe 100mm 5 Length b/w each junction 500m 6 Roughness co.efficient 140 7 Calculation Method Hazen Williams formula The predicted data of Jan 17, 2019 is taken into simulation for the pipe network design. The total quantity of water predicted is taken as an average for 24 Hrs. The EPANET design is constructed with an assumption of 50 Distribution Mains supplied by one main reservoir. • The maximum and average demand of Jan 2019 is computed as 14391 Million Gallons based on https://doi.org/10.15837/ijccc.2020.6.3977 11 prediction done for Jan 17 2019 – 14535 MG is the Max requirements as per the prediction analysis done over a period of 3 months (Jan 2019 to March 2019). • The prediction is assumed for one postal zone and it is assumed that 50 sub-tanks supply the entire zone and 25 No.s of Junctions are used to connect all of them. • The length of the PVC connects the upper zone is assumed as 1000m and the tanks in bottom zone is 500m in length. Table 5: Hourly Water Supply on 17th Jan 2019 EPANET supply 17th Jan 2019(in Hrs) Supply (MG) Multiplier Factor 0 400 0.2 1 500 0.06 2 500 0.02 3 540 0.03 4 695 0.06 5 1000 0.13 6 1200 0.9 7 1500 1.68 8 1700 1.35 9 1400 1.35 10 400 0.67 11 400 0.56 12 300 1 13 250 2.56 14 250 3.56 15 250 2.81 16 250 1.24 17 400 0.75 18 500 0.9 19 500 1.75 20 400 1.25 21 400 1.25 22 400 0.34 23 400 0.34 Total 14535 The forecast analysis of water demand for the year 2019 is illustrated in the Figure 13. The construction of water distribution network based on the forecast analysis using LSTM is illustrated in the figures 14 to 16. Figure 14 to 16 show the simulation of water distribution system using EPANET based on LSTM forecast. This simulation helps to determine the hydraulic parameters such as flow, pressure, velocity etc. throughout the WDN. The EPANET design in Figure 14 shows WDN design. Figures 15 and 16 describes the water flow in the pipe network in the due course of time. It also helps in determining the systematic flow of water including the transportation losses like head loss which is the pre requisite for providing lossless distribution. This analysis also helps to determine the exact flow including the losses that happen during the transmission in order to match the supply as per requirement. https://doi.org/10.15837/ijccc.2020.6.3977 12 Figure 13: LSTM Prediction for 2019 Season 1 Figure 14: WDN Based on Forecast using LSTM Figure 15: Water Flow during Distribution Stage on 17 Jan 2019 at Node 25 during 3.00 Hrs Figure 16: Water Flow in WDN on 17th Jan 2019 https://doi.org/10.15837/ijccc.2020.6.3977 13 5 Conclusion and future work To conclude, an IoT based water distribution architecture integrated with Fog computing is pro- posed along with a hydraulic WDN design using EPANET. In addition a comparative demand forecast analysis is done for the efficient water distribution network design. This analysis is carried out on the basis of day to day consumption of water over a 3 months period using LSTM and ARIMA. The demand forecast analysis using LSTM provides a higher accuracy and minimal error compared to ARIMA. On the basis of LSTM based forecast result, the water distribution system design for an IoT based system is done with an aim of effective supply of water with minimal losses and well-defined quality using hydraulic engineering which will result in establishing a smart water distribution network (SWDN). In future, this work can be extended towards development of software agent-based model for underground pipe health monitoring and consumption monitoring using agents built with intelligence, which will intimate the SCADA engineer for immediate control action and supply restoration. During critical stages this intelligent agent would bring control automation as a preventive measure. Acknowledgements This work is partially funded by FCT/MCTES through national funds and when applicable co- funded EU funds under the Project UIDB/50008/2020; and by Brazilian National Council for Scientific and Technological Development - CNPq, via Grant No. 309335/2017-5. References [1] Abdelkader Outtagarts. (2009). Mobile agent-based applications: a survey, International Journal of Computer Science and Network Security, 9(11), 331-339, 2009. [2] Abdelhafidh, M.; Fourati, M.; Fourati, L.C.; Abidi, A. (2017). A remote water pipeline moni- toring system IoT-based architecture for new industrial era 4.0 14th International Conference on Computer Systems and Applications, 1184-1191, 2017. [3] Afshar, A.; Miri Khombi, S.M. (2015). Multi objective Optimization of Sensor Placement in Water Distribution Networks; Dual Use Benefit approach. International Journal of Optimization in Civil Engineering, 5(3), 315-331, 2015. [4] Akram, T.; Naqvi, S.R., Haider, S.A., Kamran, M. (2017). Towards real-time crops surveillance for disease. Computers and Electrical Engineering, 59, 15-26, 2017. [5] Amatulla, P. H.; Navnath, B.P.; Yogesh, B.P. (2017). IoT based water management system for smart city. International Journal of Advanced Research , Ideas and Innovations in Technology, 3(2), 319-383, 2017. [6] Amin, M.; Amanullah, M.; Akbar, A. (2014). Time series modelling for forecasting wheat pro- duction of Pakistan Journal of Animal and Plant Sciences, 24(5), 1444–1451, 2014. [7] Bennett, P.J.; Soga, K.; Wassell, I.et all. (2010). Wireless sensor networks for underground railway applications: case studies in Prague and London, Smart Structures and Systems, 6, 619-639, 2010. [8] Bonomi, F.; Milito, R.; Natarajan, P.; Zhu, J. (2014). Fog computing: A platform for internet of things and analytics, Big Data and Internet of Things: A roadmap for smart Environments, New York, NY, USA: Springer, 169-186, 2014. [9] Candelieria, A.; Archettia, F. (2014). Identifying typical urban water demand patterns for a reliable short-term forecasting- the ice water project approach, 16th Conference on Water Distri- bution System analysis, Bari, Italy, 89, 1004-1012, 2014. [10] Chena, J.; Boccelli, D. L. (2014). Demand forecasting for water distribution systems, 12th In- ternational Conference on Computing and Control for the Water Industry, Perugia, Italy, 70, 339-342, 2014. https://doi.org/10.15837/ijccc.2020.6.3977 14 [11] Dorini, G.; Jonkergouw, P.; Kapelan, Z.; Savic, D. (2010). SLOTS: Effective algorithm for sensor placement in water distribution systems, Journal of Water Resources Planning and Management, 136(6), 620-628, 2010. [12] Ferrari, G. (2009). Sensor networks, Springer Series on signals and communication technology,, 1860-4862, 2009. [13] Gwaivangmin, B.; Iand Jiya, J. D. (2017). Water demand prediction using artificial neural network for supervisory control, Nigerian Journal of Technology (NIJOTECH), 36(1), 148-154, 2017. [14] Hart, W. E.; Murray, R.(2010). Review of sensor placement strategies for contamination warn- ing systems in drinking water distribution systems, Journal of Water Resources Planning and Management, 136(6), 611-619. [15] Hu, C.; Tian, D.; Yan, X. (2014). Research on placement of water quality sensor in water distri- bution systems, 11th World Congress on Intelligent Control and Automation , 3584-3587, 2014. [16] Kalpana, M B. (2016). Online monitoring of water quality using Raspberry Pi3 model, Interna- tional Journal of Innovative Technology and Research, 4(6), 4790-4795, 2016. [17] Lakshmi, K. N.; Suresh, S. (2019). IoT based smart water distribution management and un- derground pipe health monitoring system for smart city, Proceedings of 5thIEEE International Conference For Convergence In Technology, Pune, India,, 1-7, 2019. [18] Laspidou, C.; Papageorgiou, E.; Kokkinos, K. et all. (2015). Exploring patterns in water con- sumption by clustering, 13th Computer Control for Water Industry Conference, Leicester, UK, 119, 1439-1446, 2015. [19] Lenker, J.; Carroll, J.; Lenkor, K.; Carroll, C. (2004). United States patent application US 10/735,329. https://mdepatents.com/, 2004. [20] Liu, Y.; Zhang, W.; Cui, X.; Zhang, G.; Wang, G. (2015). City pipe network intelligent service based on gis and internet of things 7th International Conference on Intelligent Computation Technology and Automation, 169-186, 2015. [21] Narayanan, L. K.; Sankaranarayanan, S.; Rodrigues, J. J.; Lorenz, P. (2020). Multi-Agent-Based Modeling for Underground Pipe Health and Water Quality Monitoring for Supplying Quality Water. International Journal of Intelligent Information Technologies (IJIIT), 16(3), 52-79, 2020. [22] Noje, D.; Tarca, R.; Dzitac, I.; Pop, N.(2019). IoT Devices Signals Processing based on Multi- dimensional Shepard Local Approximation Operators in Riesz MV-algebras. International Journal of Computers Communications & Control, 14(1), 56-62, 2019. [23] Ostfeld, A.; Asce, M.; Salomons, E. (2004). Optimal layout of early warning detection stations for water distribution systems security Journal of Water Resources Planning and Management,, 130(5), 377-385, 2004. [24] Pracheet, V.; Akshay, K.; Pratik, J.et all.(2015). Towards an IoT based water management system for campus 1st International Smart Cities Conference (ISC2), IEEE Xplore, 1-6, 2015. [25] Pranita, V.K.; Joshi, M.S.(2015). An IOT based water supply monitoring and controlling system with theft identification, International Journal of Innovative Research in Science, Engineering and Technology, 5(9), 16152-16159, 2015. [26] Rinaudo, JD. (2015. Long-term water demand forecasting. In Grafton Q., Daniell K., Nauges C., Rinaudo JD., Chan N. (eds) Understanding and Managing Urban Water in Transition. Global Issues in Water Policy, Springer, 15, 239-268, 2015. https://doi.org/10.15837/ijccc.2020.6.3977 15 [27] Tariq, A.L.K.; Ziyad, A.L.T.; Abdullah, A.L.O. (2013). Wireless sensor networks for leakage detection in underground pipelines: a survey paper, 5th International Symposium on Application of Ad hoc and Sensor Networks, Procedia Computer Science, 491– 498, 2013. [28] Tom, R. J.; Sankaranarayanan, S.; Rodrigues Joel, J. P. C. (2019). Smart energy management and demand reduction by consumers and utilities in an IoT fog based power distribution system, IEEE Internet of Things journal, 6(5), 7386-7394, 2019. [29] Veeramanikandan, M.; Sankaranarayanan, S. (2019). Publish/subscribe based multi-tier based computational model in internet of things for latency reduction, Journal of parallel and distributed computing , 127, 18-27, 2019. [30] [Online] https://catalog.data.gov/dataset?q=water+consumption+demand+forecasting Copyright c©2020 by the authors. Licensee Agora University, Oradea, Romania. This is an open access article distributed under the terms and conditions of the Creative Commons Attribution-NonCommercial 4.0 International License. Journal’s webpage: http://univagora.ro/jour/index.php/ijccc/ This journal is a member of, and subscribes to the principles of, the Committee on Publication Ethics (COPE). https://publicationethics.org/members/international-journal-computers-communications-and-control Cite this paper as: Narayanan, L.K.; Sankaranarayanan, S.; Rodrigues, J.J.P.C.; Kozlov, S. (2020). Water Demand Fore- casting Using Deep Learning For Water Distribution System Design In IoT Enabled Water Distribution Network, International Journal of Computers Communications & Control, 15(6), 3977, 2020. https://doi.org/10.15837/ijccc.2020.6.3977. Introduction Literature Review Water Distribution Architecture using IoT Operation of Water Distribution System Water Demand Forecasting Recurrent Neural Network LSTM Networks Working of LSTM* Results and Discussion Water Distribution Design Using EPANET Conclusion and future work