TX_1~ABS:AT/ADD:TX_2~ABS:AT 8 http://journals.cihanuniversity.edu.iq/index.php/cuesj CUESJ 2023, 7 (1): 8-20 ReseaRch aRticle Full-Smart Intermittent Water Supply Monitoring, Managing, and Distributing System Based on IoT: Case Study at Soran City Mohammed M. Ahmed1, Abdulqadir I. Abdullah2 1Information Technology Department, Soran Technical College, Erbil Polytechnic University, Kurdistan Region, Iraq, 2Department of Computer Science, College of Science, Knowledge University, Erbil, Kurdistan Region, Iraq ABSTRACT Water supply scarcity has become a serious problem for many countries and cities, especially in the last few years when there has been less rain in many areas. Hence, managing, monitoring, and distributing, the water supply for consumption by the people has become an urgent task for many local and national governments. Monitoring how the water is used by the population in different regions helps a lot in the more efficient management of the water supply, thus helping in solving the water scarcity problem. In this research, we proposed an efficient solution for the problem which is an efficient, fair, and robust solution based on resources and consumption. The proposed system includes continuous water level monitoring of wells and storage reservoirs in the city, as well as continuous monitoring of the daily water consumption needs of each household in each neighborhood based on a group of criteria such as the number of residents, the area of green space, and the temperature of the air. This is followed by a fair amount of water being automatically distributed at regular periods to each consumer based on the estimated total amount of water. This is done through smart water meters, remote actuation of valves, and remote water pumps based on internet of thing devices, all of which are under the supervision of a web-based system. The system was developed and installed in the city of Soran in the Kurdistan region of Iraq. The system performed very well and proved to be a very good tool for the local government. According to the results, the proposed smart water meter system can save 24.59% on water consumption. Keywords: ESP32, fair water distribution, intermittent water distribution system, internet of things, smart water meter. INTRODUCTION Water is an essential resource for humans to maintain their lives and health. It is regarded as one of the most important resources for human and economic growth. Water supply scarcity has become a serious problem for many countries and cities, especially in the last few years when there has been less rain in many areas. Moreover, some individuals waste it, and others do not know how to properly use it. The amount of water consumed per capita in each country depends on factors such as nationality, culture, and climate.[1] The standard of average daily water consumption per capita in middle-income countries is 162 L/day.[2] Whereas daily water consumption in the United States of America (USA) is 575 L/person, 200–300 L in Europe and 250 L in Australia.[3] Furthermore, daily water consumption in Iraq is 392 L[4] and in the Kurdistan Region of Iraq (KRI), my research location is 375–400 L/day per capita.[5] This amount is very high compared to the average water consumption of middle-income countries. On a worldwide scale, most domestic water-consuming activities are related to personal hygiene purposes such as bathing, showering, toilet, and clothes washers.[6] In the arid and semi-arid conditions, watering lawns and gardens are also a water-demanding activity.[7] Although the water distribution network (WDN) in KRI was set up to supply water continuously at first, due to the population’s rapid growth and unexpected network extension, intermittent water supply (IWS) systems were adopted as a solution to deal with the supply-versus-demand deficit. IWS refer to piped WDNs that provide water to consumers for a period of time that is <24 h a day.[8] IWS are often utilized in drought-stricken areas to reduce water consumption.[9,10] Corresponding Author: Mohammed M. Ahmed, Department of IT, Soran Technical Institute, Erbil Polytechnic University, Kurdistan Region, Iraq. E-mail: muhammad.mustafa.it@gmail.com Received: September 1, 2022 Accepted: December 21, 2022 Published: January 30, 2023 DOI: 10.24086/cuesj.v7n1y2023.pp8-20 Copyright © 2023 Mohammed M. Ahmed, Abdulqadir I. Abdullah. This is an open-access article distributed under the Creative Commons Attribution License (CC BY-NC-ND 4.0) Cihan University-Erbil Scientific Journal (CUESJ) Cihan University-Erbil Scientific Journal (CUESJ) Ahmed and Abdullah: Smart water supply monitoring and management system 9 http://journals.cihanuniversity.edu.iq/index.php/cuesj CUESJ 2023, 7 (1): 8-20 In all of KRI’s cities, water is supplied intermittently, with an average of 45 minutes a day and with poor levels of service. In addition, every household has local water storage tanks to offset the fluctuation of water supply. The poor service levels can be attributed to limitations on available water and resources, poor network maintenance, limited instrumentation, and improper operation of the system. Intermittent WDNs (IWDN) unequally supply water to consumers.[11,12] So that some consumers get more water and others get less water than they need. This is the biggest problem in KRI. Hence, managing, monitoring, and distributing the water supply and consumption of the people has become an urgent task for many local and national governments. Monitoring how the water supply is used by the population in different regions and distributing it correctly helps a lot in the more efficient management of the water supply, thus helping in solving the water scarcity problem. Therefore, governments should adopt intelligent policies to combat this problem. Intelligent monitoring is described as a way of monitoring, controlling, managing, and optimizing a network using various computational approaches to give customers appropriate tools and information.[13] The internet of things (IoT) is a critical part of intelligent monitoring, which uses wireless sensor technologies to link people and devices. RELATED WORK Smart Water Monitoring and Distribution System This research work Hsia et al.[14] has proposed a smart water meter system by combining the traditional mechanical water meter with an electronic water meter based on a capacitive sensor. The water meter uses a low-cost non-contact metal arrow sensor. In Mudumbe and Abu-Mahfouz,[15] the authors have proposed a system that includes a real-time monitoring system, a smart water meter, and open-source tools used for the visualization of consumer data. The authors say that the proposed system can help people change how they use water and use less water. The study Suresh et al.[16] has proposed a low-cost and reliable smart water distribution metering system based on IoT. The system provides a real-time water meter reading for updating consumption data. It also lets customers pay their bills using a smartphone app. To record the amount of water consumption, the researcher used an analogue water meter with a magnetic reed switch and an embedded magnet on the wheel of the water meter. In this study Chinnusamy,[17] a smart WDN based on LoRa communication was proposed. This work provided an architecture for a WDN that includes: Remote Node, Actuator Node, Gateway Node, and Cloud Server. The remote node monitors the level of water in reservoirs based on an ultrasonic sensor and sends data every minute to the gateway node. Furthermore, the gateway node receives actuator status data such as open or closed status every 10 s from the actuator node. The gateway node analyses the received data from remote nodes and actuator nodes and transmits it to the cloud server. In Narayanan and Sankaranarayanan,[18] the authors have proposed a smart water monitoring and distribution system based on IoT for a smart city with the integration of fog and cloud computing. Their system has capabilities for water quality control, fault localization, fault prediction, underground pipe health monitoring, and water theft detection. This research work by Patel and Gaikwad[19] has proposed a smart water distribution system based on IoT for residential areas. Their system has the capability of distributing the same amount of water to all consumers, quality control, and keeping the water level in the water tank. The researchers used an electric valve to ensure each consumer got the same amount of water. In this study Rapelli et al.,[20] a smart water monitoring and distribution system for an apartment were proposed. This work provided an architecture that includes three modules; the first module is used for real-time monitoring of the water level based on an ultrasonic sensor. The second module, through the use of electric valves, will ensure that water is evenly distributed in each block. The third module is also responsible for distributing water on demand in accordance with water consumption based on an IoT-based mobile application. In Sammaneh and Al-Jabi,[21] the authors have presented a smart water distribution management system for intermittent water supply situations. The system is able to distribute water based on residents’ demands and also control water usage by providing the optimum amount of water to save water and maintain resident activities as well. The authors focused on the theoretical requirements that are needed to implement this architecture rather than on any practical work. The study Devi et al.[22] have proposed a smart water distribution system based on IoT for residential societies. This system lets both meter readers and consumers use smartphones to monitor their water consumption. A web server receives real-time water consumption data from a magnetic sensor that is installed in the pipe. This data are automatically updated in the cloud, and consumers can visualize their water consumption using an Android application. This research work by Fuentes and Mauricio[23] has provided an architecture for a water consumption measurement system that addresses five important parts: Water consumption measurement (using a water meter), leak detection (using the K-NN algorithm), local record consumption process (data were stored on a raspberry pi), physical security of the electronic device (anti-tampering mechanism), and storage and visualization of the obtained consumption through a website and smartphone. The authors claim the proposed system can detect all water leak problems with 100% accuracy. One of the limitations of this research is the non-use of backup batteries during power outages or intentional power outages by consumers. This research work by Nelakuditi et al.[24] has proposed a reliable and cost-effective smart water governing framework for industries and households. The system is an integrated Ahmed and Abdullah: Smart water supply monitoring and management system 10 http://journals.cihanuniversity.edu.iq/index.php/cuesj CUESJ 2023, 7 (1): 8-20 model for water management that includes automatic monitoring and control capabilities as well as powerful data visualization and analytics tools. This work provides an architecture with four important parts: water consumption tracking, water quality monitoring, water tank filling, and leakage detection. METHODOLOGY Our research is focused on a type of WDN that has the following characteristics in Soran City in KRI. There are several WDNs in the city; some are independent, and some are shared. Furthermore, there are several water supplies sources, such as storage reservoirs and wells. Some sources are responsible for water supply to just one neighborhood, while others to more than one. Each neighborhood has its own manual valve actuator. Some neighborhoods receive water from only one source and some from several sources. The water is distributed every 48 h for 1–2 h by the opening of the manual valve actuator in the neighborhood by the staff of the water department. Each house has its own analog water meter. In addition, every household has local water storage tanks to offset the fluctuation of water supply. Most households have their own water pump. Of course, those who have a stronger water pump than others receive more water. Furthermore, those who are near the main water pipe receive more water than those who are far from the main water pipe. In some neighborhoods, the wrong design of the WDN, the ancient WDN, the growing number of households, and the low water pressure inside the pipes have caused some households to be unable to receive their daily water needs, so they are forced to buy water through tankers. Moreover, every 1–2 months, the water paper bill will be handed over to the consumers by the water department staff and paid manually. To overcome the mentioned problems and distribute water fairly to every household, we need an intelligent system that helps to automate all parts of water monitoring, management, and distribution. In the proposed system, the water pump of any well or storage reservoir is equipped with a device that can turn the pump on and off remotely through Wi-Fi or GSM. Furthermore, the manual valve actuators in the WDNs are replaced with electric valve actuators to be opened and closed remotely. Any well or storage reservoir is equipped with a water level monitoring system. And the smart water meter replaces the analogue water meter in every house. Furthermore, the water required for plants and gardens is supplied to protect the environment based on the area of the green space of each house. A server continuously monitors the water level of wells and storage reservoirs using the water level monitoring system that is installed on them at different parts of the city. The proposed water level monitoring system uses an ultrasonic sensor to measure the level of water, and it sends the capacity of storage reservoirs or wells to the server every minute through Wi-Fi or GSM. It also continuously monitors the air temperature. The server determines the water needs of each household in each neighborhood based on three criteria: the number of residents, the area of green space, and the temperature of the air. Water consumption is higher on hot days than on cold ones. Therefore, the air temperature station has been used to determine hot and cold days. This system supplies 150 L of water for each person per day on cold days and 250 L on hot days. Moreover, it supplies 1 L of water for every square meter of green space per day on cold days and 2 L on hot days. The server estimates the capacity of each well or storage reservoir in the future using the last 24 recorded water capacities (one capacity per hour) of any well or storage reservoir and determines the percentage of water delivered to each household based on the estimated capacity. The proposed system is shown in Figure 1. Smart Water Meter The smart water meter is an electronic device designed to control and record water usage remotely. It is put on the water inlet pipe and replaces the old analogue water meter in every house. The block diagram of the smart water meter is shown in Figure 2, and its circuit diagram is shown in Figure 3. Every smart water meter has a unique identifier (ID) and a secret code that is used for security purposes to authenticate the water meter. The flowchart of the main operation between the smart water meter and the server is shown in Figure 4. Figure 1: Physical view of the smart water supply monitoring and management system Ahmed and Abdullah: Smart water supply monitoring and management system 11 http://journals.cihanuniversity.edu.iq/index.php/cuesj CUESJ 2023, 7 (1): 8-20 Air Detection One of the problems in intermittent WDNs is the air in the pipe. When the water flow is turned on to fill an empty pipe, the trapped air is displaced and exits the system.[25] It then enters the analogue water meter of the house, and it causes the water meter to read it. As a result, it costs more for the consumer. A sensor is designed to avoid reading the air inside the pipes in the proposed smart water meter. The air sensor consists of two copper wires that are placed inside the tube [Figure 5], which can detect the water inside the pipe. By using the air sensor together with the flow meter sensor and an algorithm, the system can detect the air inside the pipes [Figure 6]. Fair Water Distribution There are several methods of water distribution, such as unequal distribution, equal distribution, and fair distribution. In unequal water distribution, each household receives an unequal amount of water in every distribution. In equal water distribution, each household receives the same amount of water regardless of their needs in every distribution. However, in fair water distribution, every household receives a fair amount of water considering their needs in every distribution. To achieve the goal of fair water distribution, the system determines the water needs of each household in each neighborhood based on three criteria: The number of people living in the house; the area of green space; and the temperature of the air. It supplies 150 L of water for each person per day on cold days and 250 L on hot days; and 1 L of water for every square meter of green space per day on cold days and 2 L on hot days (according to each country, these settings can be changed on the setting page). To distribute water fairly, the following steps should be taken: a) Calculating the amount of water needed by each household, given by equation (1). Where: W = Water needed by each household (L) TAvg = Average daily temperature Tth = Temperature threshold used to determine hot days P = Number of people living in the house A = Area of green space (m) D = Periodic distribution time (h) If TAvg >= Tth → Hot day W = (P * 250 L + A * 2 L) * D/24 If TAvg < Tth → Cold day W = (P * 150 L + A * 1 L) * D/24 (1) b) Calculating the total water requirement of each neighborhood, given by equation (2). Where: X = Water needed by each neighborhood (L) W = Water needed by each household (L) N = The number of households in the neighborhood = =∑ 1 N i i X W (2)Figure 2: The block diagram of the smart water meter Figure 3: Smart water meter circuit diagram Ahmed and Abdullah: Smart water supply monitoring and management system 12 http://journals.cihanuniversity.edu.iq/index.php/cuesj CUESJ 2023, 7 (1): 8-20 c) Calculating the total water requirement of all those neighborhoods that have a shared water source, given by equation (3). Where: Y = Total water requirement of the neighborhoods (L) X = Water needed by each neighborhood (L) M = The number of neighborhoods that have a shared water source = =∑ 1 M j j Y X (3) d) Estimating the capacity of water in the sources To estimate the capacity of the sources in the future, it is necessary to know how much water flows into them in an hour. The system continuously monitors the capacity of sources and then estimates the input water flow rate with high accuracy using the last 24 recorded water capacities (one capacity per hour) of the sources. There are two scenarios to do this: Scenario One When the source does not distribute water, the value obtained between the two recorded water capacities is positive, which Figure 4: The proposed system flowchart Ahmed and Abdullah: Smart water supply monitoring and management system 13 http://journals.cihanuniversity.edu.iq/index.php/cuesj CUESJ 2023, 7 (1): 8-20 means that the source water has increased. In this case, equation (4) is used to calculate the input water flow rate between two capacities. Where: Fin = Input water flow rate (L/h) C = Capacity of the source (L) at time n Fin = (Cn−Cn−1) (4) Scenario Two When the source distributes water, the value obtained between the two recorded water capacities is negative, which means that the source water has decreased. In this case, equation (5) is used to calculate the input water flow rate between two capacities. Where: Fout = Output water flow rate (L/h) (The output water flow rate of each source is stored on the settings page based on the specifications of its water pump) Fin = (Cn−Cn−1) + Fout (5) The input water flow rate in each source varies depending on some situations, such as climate, night and day, seasons and drought. To achieve high accuracy, the system estimates the input water flow rate using the last 24 recorded water capacities of the sources. Equation (6) is used to calculate the average input water flow rate in 24 h. Where: Favg = Average Input water flow rate (L/h) Fp = Positive flow rate (L/h) Fn = Negative flow rate (L/h) For n=2 to 24 { If (Cn−Cn−1) > 0 → Positive value Fp = Fp + (Cn−Cn−1) If (Cn−Cn−1) < 0 → Negative value Fn = Fn + (Cn−Cn−1) + Fout } Favg = (Fp + Fn)/23 (6) For all those neighborhoods that have a shared water source to receive water equally, the amount of water in the source should be estimated based on the remaining time (hours) for water distribution in the last neighborhood. Equation (7) is used to estimate the amount of water available in one source in the next few hours. Where: E = Estimated capacity of the source (L) Cc = Current capacity of the source (L) Favg = Average Input water flow rate (L/h) H = Number of hours (h) E = Cc + (Favg * H) (7) Also, equation (8) is used to estimate the amount of water available in shared sources in the next few hours, Where: Eall = Estimated capacity of the shared sources (L) E = Estimated capacity of the source (L) K = Number of sources = =∑ 1 N all k k E E (8) e) Calculating the percentage of water delivered to each household To achieve the purpose of fair water distribution among all neighborhoods when there is not enough water for every household, water must be distributed fairly among all households depending on the available water. Equation (9) is used to calculate the percentage of water delivered to each household: This ensures that everyone receives an equal amount of water, where: PW = Percentage of water delivered to each household Eall = Estimated capacity of one source or shared sources (L) Figure 5: Air detection sensor Figure 6: The algorithm of the air detection Ahmed and Abdullah: Smart water supply monitoring and management system 14 http://journals.cihanuniversity.edu.iq/index.php/cuesj CUESJ 2023, 7 (1): 8-20 Y = Total water requirement of the neighborhoods (L) PW = (Eall/Y) * 100 (9) Implementation of Proposed System Software and Hardware Software Web Server An advanced website is designed to monitor, manage, and control IoT devices in the WDN. The web pages are developed based on HTML, CSS, JavaScript, jQuery, JSON, and PHP. Bootstrap framework is used for fast, attractive, and modern design and chart.js for data visualization in graphical form. Furthermore, the MySQL database is used to store data. Moreover, all security aspects are included to protect the system. Figure 7 shows the main interface of the system, which provides the following: 1) real-time monitoring of source levels; 2) current and average daily temperatures in the city; 3) a list of neighborhoods; 4) the number of residents of each neighborhood; 5) the water demand of each neighborhood based on the time period selected on the setting page; 6) The name of the source that supplies water to the neighborhood (A: Bekhal storage reservoir, B: Jondian storage reservoir, and C: Sarwchawa wells, Note: the * next to the source name denotes a shared source); 7) current capacity of each source; 8) the percentage of water supply ability for each neighborhood; 9) the last time water was distributed; 10) the time left (remaining time) until the next water distribution in each neighborhood; and 11) manual water distribution during technical difficulties. Mobile App. A friendly user interface has been developed for smartphones where consumers can monitor their water consumption, check the water meter status (Wi-Fi and battery status), be informed about the next water distribution time and the amount of predicted water, check the air in the water pipes, and conduct water bill inquiries and payments, etc. [Figure 8]. All of the information represented on the web page is retrieved dynamically from the database. To sign in to the system, the consumers must enter the device ID (the smart water meter’s ID), user name, and password that is used for security purposes to authenticate them. Hardware All parts of the proposed smart water supply monitoring system were implemented using hardware and software. Figure 9 shows the proposed smart water meter. The website was implemented on a laptop to control the proposed system using the XAMPP web server. All parts of the proposed system were connected to the XAMPP web server using the home Wi-Fi router. Two water buckets (represented as a source), two water pumps, and two solenoid valves (represented as an electric valve actuator in the neighborhood) were used to emulate the WDN [Figure 10]. Two water buckets were used so that the system could be tested using both independent and shared water sources. • Before starting to test the system, on the settings page, the following parameter thresholds were configured: • The temperature threshold was adjusted to 26 degrees Celsius (to determine hot days). • The daily water supply per person was adjusted to 150 L on cold days and 250 L on hot days. • The daily water supply for every square meter of green space was adjusted to 1 L on cold days and 2 L on hot days. • The daily water supply to cover the maximum area of green space was adjusted to 50 square meters. • The automatic water distribution time was adjusted every 12 h. • The price of one cubic meter of water was adjusted to 100 IQD. Figure 11 shows the successful process of water distribution by the proposed system using both independent and shared water sources. Furthermore, Figure 12 shows the detection of air in the water pipe by the smart water meter. RESULTS The smart water meter system was developed and tested successfully in the city of Soran in the Kurdistan region of Northern Iraq. The system was tested in the summer of 2022 in a total of 73 households with different numbers of residents and different sizes of green areas. These households were divided into three neighborhoods: G, J, and D. Table 1 shows the households divided by the different neighborhoods, with Figure 7: The main interface of the system Ahmed and Abdullah: Smart water supply monitoring and management system 15 http://journals.cihanuniversity.edu.iq/index.php/cuesj CUESJ 2023, 7 (1): 8-20 household resident numbers and green areas. The important data shown in Table 1 are the usage of water in L by each household before and after installing the smart water meter system in the household. From the table, we can clearly observe Figure 9: Proposed smart water meter Figure 10: The prototype of the proposed system a significant amount of savings in water usage after installing the system. As an example, we can see household number 1, which is located in the neighborhood of G, with a number of residents of 2 and a green area of 12 m2. In this household, we can see that before the installation of the system, they Figure 8: (a) The mobile authentication form; (b) water meter, water distribution and battery status; (c) check the air in the water pipes; (d) water bill and pay; and (e) the next water distribution time and the amount of predicted water for next distribution d cba e Ahmed and Abdullah: Smart water supply monitoring and management system 16 http://journals.cihanuniversity.edu.iq/index.php/cuesj CUESJ 2023, 7 (1): 8-20 used 632 L/day, but after the installation of the system, the daily consumption has decreased to 524 L. This is a savings of 17.09%, which is a significant amount. Similar to this, we can observe all the other households in the different regions. From Table 1, we can clearly see that the average savings in water usage by households constitute a percentage of 24.59%. This savings amount is significant, especially if the projections of water shortages in the area come true. We can see these results visually in Figure 13, in the different neighborhoods G, J, and D, respectively, from top to bottom. In the top figure, we can see the usage of water for the households from 1 to 27. The red bar on the graph represents the usage before installing the system, and the yellow bar represents the usage after installing the system. The middle graph represents the neighborhood of households J from 28 to 44, and the bottom graph represents the neighborhood of households D from 45 to 73. We can clearly see the savings in water usage from the graphs for all the households in the three neighborhoods. In Table 2, we can see the water consumption in the three neighborhoods before and after installing the smart water meter system in the households in the three neighborhoods. In the table, Figure 11: Water distribution process Figure 12: Detection of air in tubes by the smart water meter Table 1: Daily water consumption and water savings of households before and after the installation of the proposed smart water meter in the summer ID N R G (m2) Before (Liter) After (Liter) Water saving (%) 1 G 2 12 632 524 17.09 2 G 1 40 505 330 34.70 3 G 3 10 925 770 16.73 4 G 3 0 1077 750 30.36 5 G 4 16 1325 1032 22.14 6 G 3 12 1245 774 37.85 7 G 3 6 869 762 12.31 8 G 2 25 877 550 37.31 9 G 1 15 443 280 36.78 10 G 3 4 1071 758 29.25 11 G 4 8 1109 1016 8.36 12 G 3 0 905 750 17.11 13 G 2 12 838 524 37.48 14 G 3 16 1089 782 28.16 15 G 2 12 755 524 30.62 16 G 2 12 724 524 27.62 17 G 2 2 586 504 13.98 18 G 4 0 1089 1000 8.13 19 G 2 12 755 524 30.62 20 G 3 4 903 758 16.06 21 G 2 12 724 524 27.62 22 G 2 10 586 520 11.25 23 G 3 25 1002 800 20.16 24 G 3 20 1005 790 21.41 25 G 2 8 862 516 40.11 26 G 2 12 650 524 19.40 27 G 2 20 1052 540 48.69 28 J 3 10 889 770 13.38 29 J 1 12 432 274 36.57 30 J 1 6 409 262 35.94 31 J 5 40 1981 1330 32.86 32 J 4 6 1109 1012 8.74 33 J 3 0 831 750 9.75 34 J 4 12 1524 1024 32.83 35 J 4 12 1188 1024 13.83 36 J 3 25 1166 800 31.39 37 J 3 0 1017 750 26.25 38 J 5 50 1671 1350 19.20 39 J 1 30 512 310 39.48 40 J 4 40 1707 1080 36.74 41 J 6 50 2482 1600 35.53 42 J 2 12 831 524 36.94 43 J 5 16 1463 1282 12.40 (Contd...) Ahmed and Abdullah: Smart water supply monitoring and management system 17 http://journals.cihanuniversity.edu.iq/index.php/cuesj CUESJ 2023, 7 (1): 8-20 we can see the minimum and maximum savings from water consumption by households and the average savings. As we see that the savings are 25.22% for neighborhood G, 25.70% for neighborhood J, and 23.35% for neighborhood D, we can see that the average savings is around 25% for all three neighborhoods. This is a significant water consumption savings which will lead to significantly decrease the shortage of water in the area. From these results, we can say that installing the smart water meter system will lead to a significant improvement in daily water consumption by people in the areas because it creates a capability for water monitoring systems by the authorities and people to reduce waste in water consumption significantly. The system will foster a culture of accountability for the population’s water consumption, resulting in better water management. Comparison with Existing Smart Water Management Systems We presented a complete design of a full smart intermittent water supply monitoring, management, and distribution system, whereas most existing systems have focused on Figure 13: Daily water consumption of households in neighborhoods G, D, and D before/after the installation of the proposed smart water meter in the summer Table 2: Average water savings in neighborhoods N Before (Liter) After (Liter) Min (%) Max (%) Water saving G 23604 17650 8.13% 48.69% 25.22% J 20402 15158 8.74% 39.48% 25.70% D 30045 23030 8.08% 52.19% 23.35% Table 1: (Continued) ID N R G (m2) Before (Liter) After (Liter) Water saving (%) 44 J 4 8 1188 1016 14.51 45 D 3 12 913 774 15.18 46 D 2 10 779 520 33.25 47 D 3 20 988 790 20.04 48 D 3 16 1000 782 21.80 49 D 3 22 1100 794 27.82 50 D 2 12 927 524 43.48 51 D 5 15 1447 1280 11.52 52 D 3 12 1009 774 23.29 53 D 4 20 1250 1040 16.80 54 D 4 12 1126 1024 9.09 55 D 3 10 1030 770 25.28 56 D 2 4 755 508 32.72 57 D 4 25 1231 1050 14.69 58 D 2 40 658 580 11.90 59 D 2 12 1096 524 52.19 60 D 1 15 450 280 37.75 61 D 2 6 557 512 8.08 62 D 3 10 980 770 21.41 63 D 4 0 1098 1000 8.91 64 D 6 50 1989 1600 19.56 65 D 5 40 2018 1330 34.09 66 D 4 25 1358 1050 22.68 67 D 2 12 599 524 12.55 68 D 3 16 960 782 18.54 69 D 2 12 821 524 36.18 70 D 2 10 681 520 23.64 71 D 1 12 448 274 38.84 72 D 4 25 1304 1050 19.48 73 D 4 40 1473 1080 26.68 Min 8.08 Max 52.19 Average 24.59% Note: N=Neighborhood name R=Number of residents G=Green area at home Ahmed and Abdullah: Smart water supply monitoring and management system 18 http://journals.cihanuniversity.edu.iq/index.php/cuesj CUESJ 2023, 7 (1): 8-20 a specific part of water system problems, such as water monitoring, water management, or water distribution, and they have focused only on the design rather than the implementation. Table 3 shows the comparison between the architecture of our proposed system and that of existing smart water management systems based on 26 features. DISCUSSION The Benefits of the Proposed System The following points are the advantages of the proposed system: Automatic water distribution The proposed system has the ability to automatically distribute the amount of water that is required by each household on time and without any delay. Water is distributed fairly based on the available water capacity When the available water capacity is less than the total demand of households (which often occurs in the summer season), the proposed system has the ability to distribute the available water fairly among them so that all households receive the same share of water. On the other hand, fair water distribution leads to social justice. Water supply according to seasonal needs Temperature has been found to influence water consumption. Climate factors, such as temperature and rainfall, are considered to influence the amount of water used for home purposes.[26] Furthermore, the hotter days lead to more frequent watering of gardens and personal cleanliness.[27] The proposed system provides the water needed by every household according to the cold and hot days in different seasons. Automatic water reading Every time the specified amount of water is received by the smart water meter, the amount of water consumed (counter) is automatically sent to the server and also stored in the EEPROM of the water meter. Reducing water consumption In the traditional water distribution system, water is unequally distributed among households, and each household can receive more water than they need. Whereas the proposed system distributes the water needed by each household according to the real needs of each person, it prevents households from receiving more water, which will reduce water consumption. Reducing the wastage of treated water and thus lowering costs Table 3: The features F1 to F26 are as follows: smart water system (F1), real time monitoring (F2), security approach (F3), indicator LED or LCD (F4), display battery status (F5), use of memory to record water usage on the water meter (F6), use of an electric valve to control water usage on the water meter (F7), device error checker (F8), water monitoring system (F9), data analysis (F10), mobile app (F11), auto water distribution (F12), pump control (F13), actuator valve water control (F14), use of machine learning techniques (F15), water level monitoring (F16), implemented system (F17), independent web server (F18), fair or same water distribution (F19), water supply according to the number of residents in each house (F20), water supply according to the amount of green space (F21), water supply according to the temperature (F22), temperature station (F23), the ability to modify the smart water device’s SSID and network password (F24) the air-in-pipe anti-reading system (F25) and, Ability to support shared water sources (F26). The check marks refer to features supported, while the uncheck marks refer to features unsupported. Systems F 1 F 2 F 3 F 4 F 5 F 6 F 7 F 8 F 9 F 10 F 11 F 12 F 13 F 14 F 15 F 16 F 17 F 18 F 19 F 20 F 21 F 22 F 23 F 24 F 25 F 26 [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] Our System Ahmed and Abdullah: Smart water supply monitoring and management system 19 http://journals.cihanuniversity.edu.iq/index.php/cuesj CUESJ 2023, 7 (1): 8-20 The proposed system supplies the water needed by each household based on their daily needs. It prevents households from receiving more water, which means that less treated water is wasted and, as a result, lower costs. Staff reduction In traditional water distribution systems, the water operators are required to manually control valve actuators in the neighborhood. However, the proposed system does not require water operators due to replacing the remote tap actuators with manual valve actuators. The proposed system reads water meters remotely, which means there is no requirement to manually read water meters by employees. Moreover, the water paper bill is handed over to the consumers by the water department staff, but the proposed system informs the consumers about their water bill in real-time, which also causes the staff to decrease. Reduction of electricity costs due to low water pump operating hours In the traditional water distribution system, the water pumps are turned on and off by water operators for a fixed time (usually 1–2 h for each neighborhood). Furthermore, water operators sometimes forget to turn off the pump, which causes a lot of electricity consumption. In the proposed system, after the water is distributed to all households, it automatically turns off the water pump, which saves electricity consumption. Reducing greenhouse gas emissions as a result of water supply for green spaces Greenhouse gases are vital to Earth’s life. Certain concentrations of greenhouse gases in the atmosphere enable the earth to maintain livable temperatures.[28] Infectious and non-infectious diseases, severe impacts on nutrition and water security, and other societal disruptions are attributed to the increase in greenhouse gas emissions.[29] One of the solutions to reduce greenhouse gas emissions is green infrastructure, which plays many roles in urban environments.[30] To contribute to the reduction of greenhouse gas emissions and thus protect the environment, the proposed system supplies the water needed by trees and green spaces in houses. Accurate bills in real time The wrong reading of the analogue water meter by water meter readers causes the issuance of inaccurate water bills, which can have a bad psychological effect on consumers. Furthermore, not reading the water meter when the consumer is not at home will result in the issuance of a large water bill in subsequent reading periods whereas the proposed system informs consumers about their water bills in real-time. The Limitation of the Proposed System Internet problem The proposed smart water meter is built on the basis of the IoT and requires a continuous Internet connection to work. Therefore, every house should have its own internet, or there should be public internet in the neighborhoods. CONCLUSION In this work, an IoT-based architecture for full-smart monitoring, management, and distribution systems for intermittent water supplies has been proposed. The proposed system includes a smart water meter, water level monitoring systems, an air temperature station, valve actuator controllers, water pump controllers, a web server, and a mobile application. The main goal of the proposed system was the fair distribution of water to each household according to the available water capacity using a group of criteria such as the number of residents, the area of green space, and the temperature of the air. Furthermore, a user-friendly mobile app was developed for use by consumers so that they can monitor their water consumption, be informed about the next water distribution time and the amount of predicted water, check the water meter status, check the air in water pipes, and conduct water bill inquiries and payments. The system was developed and installed on 73 houses in three neighborhoods with different numbers of residents and different sizes of green areas in the city of Soran in the Kurdistan region of Iraq. According to the obtained results, the proposed smart water meter system can save water consumption from 8.08% to 52.19%, with an average of 24.59%. In our future work, we would like to use a rain gauge station to know the amount of rain in the city in order to provide enough water to irrigate the green spaces in the houses. We will also build a dataset to predict the amount of green space in houses based on ML techniques. REFERENCES 1. H. M. Corbella and D. S. Pujol. What lies behind domestic water use? A review essay on the drivers of domestic water consumption. Boletín de la Asociación de Geógrafos Españoles, vol. 50, pp. 297-314, 2009. 2. World Bank. The Kurdistan Region of Iraq: Assessing the Economic and Social Impact of the Syrian Conflict and ISIS, 2015. Available from: https://documents1. wor ldbank .org/cura ted/en/579451468305943474/ pdf/958080PUB0Apri0PUBLIC09781464805486.pdf [Last accessed on 2022 Jun 11]. 3. UNDP (United Nations Development Programme). Human Development Report 2006: Beyond Scarcity: Power, Poverty and the Global Water Crisis. New York, 2006. Available from: https:// hdr.undp.org/system/files/documents//human-development- report-2006-english.human-development-report-2006-english [Last accessed on 2022 Jun 12]. 4. UN. 2013 Water in Iraq Factsheet. UN, Iraq, 2013. Available from: https://www.iraqicivilsociety.org/wp-content/uploads/2014/02/ water-factsheet.pdf [Last accessed on 2022 Jun 12]. 5. KRG Ministry of Planning (MoP) & UNDP. Building the Kurdistan Region of Iraq: The Socio-Economic Infrastructures, 2012. Available from: https://us.gov.krd/media/1318/building-the-kurdistan- region-sociao-economic.pdf [Last accessed on 2022 Jun 14]. 6. B. J. Carragher, R. A. Stewart and C. D. Beal. Quantifying the influence of residential water appliance efficiency on average day diurnal demand patterns at an end use level: A precursor to optimised water service infrastructure planning. Resources Conservation and Recycling, vol. 62, pp. 81-90, 2012. 7. B. H. Hurd. Water conservation and residential landscapes: Household preferences, household choices. Journal of Agricultural and Resource Economics, vol. 31, no. 2, pp. 173-192, 2006. 8. D. D. J. Taylor, A. H. Slocum and A. J. Whittle. Demand satisfaction as a framework for understanding intermittent water supply systems. Water Resources Research, vol. 55, no. 7, pp. 5217-5237, 2019. 9. A. W. Bivins. Estimating infection risks and the global burden of diarrheal disease attributable to intermittent water supply using QMRA. Environmental Science and Technology, vol. 51, no. 13, pp. 7542-7551, 2017. Ahmed and Abdullah: Smart water supply monitoring and management system 20 http://journals.cihanuniversity.edu.iq/index.php/cuesj CUESJ 2023, 7 (1): 8-20 10. C. Laspidou and A. Spyropoulou. Global dimensions of IWS- number of people affected worldwide. In: Dealing with the Complex Interrelation of Intermittent Supply and Water Losses. IWA Publishing, London, pp. 5-16, 2017. 11. K. Vairavamoorthy, S. D. Gorantiwar and S. Mohan. Intermittent water supply under water scarcity situations. Water International, vol. 32, no. 1, pp. 121-132, 2007. 12. M. De Marchis, C. M. Fontanazza, G. Freni, G. L. Loggia, E. Napoli, and V. Notaro. Analysis of the impact of intermittent distribution by modelling the network-filling process. Journal of Hydroinformatics, vol. 13, no. 3, pp. 358-373, 2011. 13. Z. Zho, Q. Liu, Q. Ai and C. Xu. Intelligent monitoring and diagnosis for modern mechanical equipment based on the integration of embedded technology and FBGS technology. Measurement, vol. 44, no. 9, pp. 1499-1511, 2011. 14. S. C. Hsia, S. W. Hsu and Y. J. Chang. Remote monitoring and smart sensing for water meter system and leakage detection. IET Wireless Sensor Systems, vol. 2, no. 4, pp. 402-408, 2012. 15. M. J. Mudumbe and A. M. Abu-Mahfouz. Smart Water Meter System for User-Centric Consumption Measurement. In: 2015 IEEE 13th International Conference on Industrial Informatics (INDIN), pp. 993-998, 2015. 16. M. Suresh, U. Muthukumar and J. Chandapillai. A Novel Smart Water-Meter Based on IoT and Smartphone App for City Distribution Management. In: 2017 IEEE Region 10 Symposium (TENSYMP), pp. 1-5, 2017. 17. S. Chinnusamy. IoT Enabled Monitoring and Control of Water Distribution Network. In: 1st International WDSA/CCWI 2018 Joint Conference, pp. 23-25, 2018. 18. L. K. Narayanan and S. Sankaranarayanan. IoT Enabled Smart Water Distribution and Underground Pipe Health Monitoring Architecture for Smart Cities. In: 2019 IEEE 5th International Conference for Convergence in Technology (I2CT), pp. 1-7, 2019. 19. C. S. Patel and J. A. Gaikwad. Design and Development of IOT based SMART Water Distribution Network for Residential Areas. In: 2019 International Conference on Communication and Electronics Systems (ICCES), 2019. 20. N. Rapelli, A. Myakal, V. Kota and P. R. Rajarapollu. IOT Based Smart Water Management, Monitoring and Distribution System for an Apartment. In: 2019 International Conference on Intelligent Computing and Control Systems (ICCS), pp. 440-443, 2019. 21. H. Sammaneh and M. Al-Jabi. IoT-Enabled Adaptive Smart Water Distribution Management System. In: 2019 International Conference on Promising Electronic Technologies (ICPET), pp. 40-44, 2019. 22. B. N. Devi, G. Kowsalya and R. Senbagam. Design and implementation of IOT based smart water distribution system. International Journal of Scientific Research in Science Engineering and Technology, vol. 7, pp. 537-541, 2020. 23. H. Fuentes and D. Mauricio. Smart water consumption measurement system for houses using IoT and cloud computing. Environmental Monitoring and Assessment, vol. 192, no. 9, pp. 1-16, 2020. 24. U. R. Nelakuditi, M. K. Shaik and N. Avula. Reliable and cost- effective smart water governing framework for industries and households. In: Smart Technologies for Energy and Environmental Sustainability. Springer, Germany, pp. 177-199, 2022. 25. Q. M. Bautista-de Los Santos, K. A. Chavarria and K. L. Nelson. Understanding the impacts of intermittent supply on the drinking water microbiome. Current Opinion in Biotechnology, vol. 57, pp. 167-174, 2019. 26. S. Gato, N. Jayasuriya and P. Roberts. Forecasting residential water demand: Case study. Journal of Water Resources Planning and Management, vol. 133, no. 4, pp. 309-319, 2007. 27. M. Hoffmann, A. Worthington and H. Higgs. Urban water demand with fixed volumetric charging in a large municipality: The case of Brisbane, Australia. Australian Journal of Agricultural and Resource Economics, vol. 50, no. 3, pp. 347-359, 2006. 28. I. C. Mell. Green infrastructure: Reflections on past, present and future praxis. Landscape Research, vol. 42, no. 2, pp. 135-145, 2017. 29. A. Mikhaylov, N. Moiseev, K. Aleshin and T. Burkhardt. Global climate change and greenhouse effect. Entrepreneurship and Sustainability Issues, vol. 7, no. 4, p. 2897, 2020. 30. J. Parker and M. E. Zingoni de Baro. Green infrastructure in the urban environment: A systematic quantitative review. Sustainability, vol. 11, no. 11, p. 3182, 2019.