# Usage of IoT Framework in Water Supply Management for Smart City in Nepal
## 3 Proposed Methodology
### Development of IoT Framework  
Based on this experiment and conceptual analysis, and review of literatures, the framework as shown in Figure 4 has been proposed. Figure 4: IoT framework concentrated on technological layer. The benefits derived from IoT can be felt only when IoT operates in a full-fledged manner. It is essential to have a concrete architecture and specific protocols for the IoT to fully emerge. To solve the problems, it is important to tear up the existing paradigm, thereby allowing the formation of systems that are open and interoperable that offer efficient and scalable communications [56]. Based on the different previous studies and experiment, the framework has been developed as shown in Figure 3; the sensor and module section comprise the sensor and its placement, analog to digital conversion, wireless sensor network, signal conditioning, and processing the digital signal. In relation to the experimental setup and the framework, ultrasonic sensor has been used as the sensor for this specific purpose. The central processing unit used is a Raspberry Pi which facilitates sensor control as well as data storage and publishing to the web. The utmost importance of data consistency and lower distance of communication in household have been the major reasons behind using the ethernet. In terms of the online application unit, the database has been implemented in MYSQL and Web Interface in HTML, CSS and JS as frontend and PHP (Laravel) as backend. The web app is hosted online so that the various households under experiment can transmit the data simultaneously. In order to achieve the maximum accuracy in data from sensors, an algorithm which takes the average of 10 data have been applied while also considering the difference of each following data so that any data measurement error by the sensor can be mitigated during the measurement stage. To limit the bandwidth usage, we applied burst transmission mode, where the data are stored locally for each household and only transmitted once per day in bulk. The local storage also prevents the loss of data in case of internet breakage. The output is then observed through any device connected to the internet given that user has the authentic credentials. The experimental section as a whole in Figure 4 is realized by using full-on experiment as shown in Figure 3. The conceptual section of the developed IoT framework cannot be realized until and unless the devices are used in full-fledged manner either within a municipality, state or the entire country. The experimental section of the framework concentrated more on generating the real-time data. The conceptual section deals more with the management and efficient usage of the data. The voluminous data are generated from the experimental section at a high velocity, therefore big data analytics is very essential and servers like Amazon S3 (simple storage service) can be taken into consideration. The management of the data can also be undertaken by establishing own data center. After the data sets are obtained, the system can be trained to obtain the future values regarding demand and the supply of water. This can be one approach, another approach can be processing the data in an information system after the data mining and applying the statistical measures to perform trend analysis, and the information system itself can also forecast the amount of water needed for future. All of these operations come down to discovering knowledge from different viewpoints. This information along with consumer feedback can help to enhance the existing system to a great extent and this is a never ending process. Machine learning (ML) contributes to developing efficient IoT products. The delay time before transmitting data should be minimized as far as possible but by doing so operational complexities are introduced by iCloud services [57]. The most important concern within an IoT network is security as diversity and the number of device in the system are a priority.