water usage
water usage
water usage
Handling Editor: Cecilia Maria Villas Bôas de This paper presents the design and implementation of intelligent buildings for the monitoring of building
Almeida parameters, which includes both the required hardware and the associated software. For implementation
Keywords: purposes, the paper focuses on technical descriptions of the steps required to successfully implement IoT
Smart building architecture while providing applications for the implementation of smart water meters and providing data
Smart water meters analysis. The main goal of such a system is to provide the user with transparent data in real-time. Looking
LoRaWAN at consumption overtime on different platforms is essential, as it can change habits and patterns of water
IoT wallet consumption, reducing costs for users and the overall operating system. By increasing distribution efficiency
and maintaining resource sustainability, smart water distribution can be achieved.
∗ Corresponding author.
E-mail address: toperkov@fesb.hr (T. Perković).
https://doi.org/10.1016/j.jclepro.2022.132792
Received 20 March 2022; Received in revised form 6 June 2022; Accepted 18 June 2022
Available online 22 June 2022
0959-6526/© 2022 Elsevier Ltd. All rights reserved.
I. Andrić et al. Journal of Cleaner Production 365 (2022) 132792
Fig. 1. Location of LoRaWAN-based watermeters from Axioma placed at University building with a high-rate daily-based change in the number of people.
from electromagnetically difficult environments (e.g., in a parking lot, 3.1. Selecting appropriate IoT radio technology for underground water-
under a metallic plate) to a central system. The water consumption meters
analysis was carried out from the hourly water consumption values
collected in each block. The largest consumption of the entire building Water meters are located below the ground and usually a wireless
occurred between 9 a.m. and 12 p.m. In addition, during the night, interface should be used to transmit water flow data. Omnipresent
there is a constant loss of water of approximately 0.3 m3 = h, indicating wireless technologies, which are used for high (3G, WiFi, and LTE) or
a slow but continuous loss of water. Such a form of information low throughput data (ZigBee, Bluetooth Low Energy (BLE)), are limited
about water consumption, particularly at publicly available locations, in coverage and do not adapt to such operations. Low-power-wide-area
or available in an IoT-wallet-like application, can lead to changes in networks (LPWAs) enable battery devices to transmit data over long
water consumption habits and patterns, resulting in reduced overall distances, enabling them to implement intelligent buildings. These tech-
operating cost of the system. nologies range from LoRa (Sain et al., 2017), Sigfox (Sanchez-Iborra
and Cano, 2016), to NB-IoT (Centenaro et al., 2016; Mangalvedhe
2. Materials and methods et al., 2016). As can be seen in Fig. 2, water meter is placed under
the ground at the parking lot below the metallic hydrant cap. Be-
fore selecting the appropriate radio technology for the transmission of
3. IoT technology for smart buildings
water-meter data, three different state-of-the-art IoT radio technologies
were considered: Sigfox, LoRaWAN, and NB-IoT, each of them having
To strengthen the concept of smart buildings, future IoT systems its own pros and cons in terms of coverage, battery life, cost-efficiency,
must include many sensor devices that measure environmental changes etc. As the implementation of IoT communication infrastructure in
and inform the user and/or systems of these changes. From a smart Croatia is still early, it is required to check the availability of LPWA
building point of view, one of the most important elements of a smart technologies at particular positions, moreover at underground positions
building is the management of smart water consumption and the timely where the smart water-meters should be installed. It is important to
and rapid detection of pipe failures, water consumption control, but note that given locations are harsh in terms of radio signal propagation,
also loss control in particular building segments. Traditional meters i.e., wireless communications, and need to be tested on sight before
require users to regularly check and read the status of meters to obtain installation. The test procedure is started by establishing the setup of
information about water consumption. In addition, in today’s smart data acquisition from different IoT radios and on-sight performance
building era, water meters transmit data to a centralized system that measurements. To test the availability of the three IoT radios, an initial
stores water consumption data and concludes about possible broken setup for testing was established, both from the software and hardware
pipes, send an alarm to the user or system about a possible water side. Hardware setup comprises three Arduinos equipped with three
leak through the web application, apply machine learning algorithms different IoT radios (NB-IoT, LoRa, Sigfox), as shown in Fig. 3. To
to achieve possible savings, detect a decrease in consumption and/or check if given radios are transmitting, Software Defined Radio (SDR)
consumption trends. To interpret the concept of intelligent buildings tool was used to listen the radio channel between Arduino’s radio and
from the point of view of water consumption analysis, water is collected a particular receiver. Given testing scheme is depicted in Fig. 3 and
that flows through the building’s pipes using water meters from Axioma test setup is shown in Fig. 2(down). The same system can be used
placed in three separate locations, as shown in Fig. 1(left). The first to determine the signal strength attenuation at a particular location
device 1 (Fig. 1(right)) measures the entire building’s water consump- with the cover being closed and open, giving better insights on the
tion, while devices 2 and 3 measure the water consumption of the other real-world performance of given radios and physical limiting factors.
two blocks (blocks B and C). Modern water meters use new methods to Software architecture used to retrieve data from Arduinos is pre-
measure water flow, including electromagnetics (Boyle et al., 2013), sented in Fig. 3, with each having its retrieval procedure considered
fluids and ultrasonics (Li and Chong, 2019). Qalcosonic devices use in the given experiment. Results of the experiments with related vi-
ultrasonic technology as one of the most used methods to measure sualization are presented in Fig. 4. For testing purposes, LoRaWAN
water data flow, ensuring high measurement accuracy.1 To transmit gateway was placed in the university building, while for Sigfox and
data collected from water measurement devices, Axioma Qalcosonic NB-IoT clients depend upon commercial infrastructure providers. The
devices are equipped with LoRaWAN radio technology. left part of Fig. 4 shows that Sigfox and NB-IoT may lead to a drop in
performance (can be noticed by missing counts in data retrieval), while
position 2 (location C) is not covered by the service provider infras-
1
https://www.axiomametering.com/en/products/water-metering- tructure. This means that the only reasonable technological approach
devices/ultrasonic/qalcosonic-f1-ip68-ultrasonic-flow-meter. among the tested is LoRa, i.e. LoRaWAN, since the coverage is reliable
2
I. Andrić et al. Journal of Cleaner Production 365 (2022) 132792
Fig. 2. (up) Test procedure comprising LPWA devices that use LoRaWAN, Sigfox and NB-IoT technology and (down) installation phase that comprises Axioma Qalcosonic watermeters
with LoRaWAN transceivers.
Fig. 3. Network architecture of (up) LoRaWAN, (center) Sigfox and (down) NB-IoT implementation used during the test procedure phase.
enough. Right part of Fig. 4 shows the influence of the surrounding In addition, to show the quality of LoRaWAN signals from publicly
in Location A — as the IoT radio is underground, the signal reception available gateways, a TTN mapper2 tool was used to map the signal
depends on if the metallic cover of the manhole is closed or open. As quality of LoRaWAN devices near the university building where water-
meters are being installed. TTN mapper is an open source application
shown, a 10 dB drop in signal can be expected if the metallic cover is
closed. This highly reflects on the distance where the receiver can be
2
located to ensure reliable data transmission. https://ttnmapper.org/heatmap/.
3
I. Andrić et al. Journal of Cleaner Production 365 (2022) 132792
Fig. 4. (left) Testing different IoT radio technologies results; Missing dots, i.e. counts on the left side shows that reception of particular transmission between Arduino node and
receiver failed; LoRaWAN gateway was located In pilot location building. (right) Influence of the closed and opened metallic cover of the manhole — 10 dB of difference.
4
I. Andrić et al. Journal of Cleaner Production 365 (2022) 132792
Fig. 7. Water consumption measurements collected by Axioma water meter device placed at one location — location A. Blue graph depicts delta volumes on an hour basis, while
purple denotes overall water consumption.
the gateway periodically. Since the Axioma Qalcosonic is a battery- when a pipe fracture occurs or send information about possible slow
operated device, the radio module transmits messages every 6 h to save water leaks.
energy and increase battery life. The payload includes information on Wallet is organized a set of microservices. Fig. 8 shows how services
the current volume, as well as 15 Delta volumes corresponding to the interact with one another and the databases, and also the most relevant
last 15 h of measurement, as shown: technologies used in each service. All of the services are written in
JavaScript and TypeScript.
1 { The job of the ttn-microservice is to receive data from TTN and store
2 " date " : " 2020 -12 -31 T14 :00:00.000 Z " ,
it in the Influx database. It is also responsible for querying/retrieving
3 " deltaVolumes " : [0, 0, 0.013 , 0.069 , 0.066 ,
0.042 , 0.036 , 0.033 , 0.034 , 0.034 , the stored data. The service subscribes to a set of TTN applications
0.034 , 0.031 , 0.063 , 0.079 , 0.046] , defined in the configuration file. Data is stored in the Influx database
4 " logDate " : " 2020 -12 -30 T23 :00:12.000 Z " , as it is received. Each time a data point is stored in Influx, an event is
5 " state " : 0, raised, and the data point is also published to the server. Hence, the
6 " stateMessages " : [ " OK " ], ttn-microservice is a hub between TTN, the influx database and the
7 " volume " : 0.58 server via the mqtt-broker. The mqtt-broker service runs the Hivemq
8 } MQTT server implementation and allows message-passing between the
ttn-microservice and server. It is an intermediary that allows the ttn-
Listing 1: Decoded Payload
microservice and server to publish events to each other and receive
data. Depending on which API endpoint is triggered, the server either
In addition, the payload contains information on the status code
needs to query the MySQL database or publish events via mqtt-broker.
such as dryness, fire, water leakage, etc. As a LoRaWAN gateway, the
The MySQL database contains the data for all entities relevant to the
Sentrius RG191 gateway concentrator was used to forward messages
server’s logic (users, sensors, sensor types, and payload fields). When-
from Axioma Qalcosonic sensor devices to the cloud infrastructure of
ever the server needs to retrieve or manage these entities, it queries
the Things Network (TTN). The gateway is an indoor concentrator
the MySQL database. The server also communicates with openweath-
built on the Semtech SX1301/1257 LoRaWAN technology and equipped
ermap.org to retrieve the weather around the location of the sensor.
with a 2.0 dBi gain RP-SMA antenna that is vertically polarized and
Whenever the server needs some sensor data, it publishes an event.
omnidirectional.
Events published from the server are forwarded to the ttn-microservice
via the mqtt-broker. The ttn-microservice queries the influx database
3.4. Software to use data - IoT wallet architecture for the requested sensor data and returns it to the server. The server
then forwards the data back to the client via HTTP response.
When the message of a water measurement device is received by the The client is a web application that provides a graphical interface
gateway, it is transmitted to a cloud TTN infrastructure equipped with for users and an admin panel for administrators. Because it is built using
a network and application server. TTN cloud infrastructure has many Ionic, it can also be compiled to an android app. Whenever the client
integrations such as MQTT, webhooks, that allow message forwarding requests data it communicates with the server via HTTP request. Each
to a dedicated server for further processing, storage, and visualization. HTTP requests triggers some API endpoint on the server. Administrators
Fig. 7 shows an overview of the total water volume and the daily delta can manage these sensors, sensor types and their payload fields, as well
volume using a water meter, modeled by the IoT wallet application. as application users. When a user logs into the application, a dashboard
Such information can be interesting as it can trigger alarm warnings that displays all the relevant information from their sensors is shown.
5
I. Andrić et al. Journal of Cleaner Production 365 (2022) 132792
Admins have the capability to download the collected data or add new consumption shows the expected pattern of water consumption with
users. lower consumption on weekends. The presence of outliners on Sunday
Organizing the applications as such microservices enables us to can be explained by the project to improve the infrastructure of the
extend wallet’s functionality in a modular way. For example, if we scientific research area in the university building, which also occurred
would like to make predictions using machine learning, one approach on Sunday due to the lower number of staff and students.
would be to create a separate machine learning service which train and Averaging the available measurement data yielded the average
store models. hourly water consumption quantities for the entire building and blocks
A, B, and C. Since there are water meters in blocks B and C, the average
4. Results and discussion water consumption in block A is equal to the difference between the
total consumption and the consumption in two other blocks. The com-
4.1. Analysis of water consumption pattern puted data reveals the unevenness of water consumption throughout
the day (Fig. 11). Thus, consumption peaks occur in different time
Water consumption was analyzed using data collected hourly at the periods. Throughout the building, the peak consumption is between
three measurement points: the main valve and building blocks B and 9 and 11 a.m., in block A at 9 a.m., in B at 1 a.m., and in block C
C. From the temporal distribution of the gathered data (Fig. 9), large between 11 a.m. and 12 a.m. Because each block serves a different
fluctuations in water consumption can be seen as a function of several purpose, e.g., classrooms and a restaurant in block A, offices and a
key parameters. As with water consumption in residential buildings, laboratory in block B, and classrooms in block C, different consumption
where consumption depends primarily on the number of residents and patterns were expected throughout the day. The uniformity of water
their activities, water consumption in university buildings depends on consumption is between 7 a.m. and 4, 5 p.m., or during the working
the number of students, staff, and their activities (Mohd Daud and hours of most employees. The coefficient of non-uniformity, defined
Abdullah, 2020). It is clear that the population structure in residential as the deviation from the mean, is used to describe the unevenness of
buildings, where daily activities are consistent, is quite different from daily water consumption (Fig. 11). The highest value of the coefficient
the structure in university buildings. The number of persons in the of non-uniformity was computed in block B. Analysis of hourly water
university building changes from day to day due to the presence of consumption contributed to the detection of losses in the distribution
students, employees, external associates, and other visitors. In addition system. Detection of unexpected water consumption can be identified
to classrooms and offices, the university building also includes labora- as losses in the system in the form of possible leaks or breaks in the
tories for scientific experiments, a library, and a mess hall in building system. Thus, a constant loss value of 0.3 m3 /h is registered at the main
block A. Consistent with the above, a temporal distribution of water valve, 0.2 m3 /h at block A, and between 0.05 and 0.06 m3 /h at blocks
consumption over the observed time was to be expected. B and C. The lower values of losses in blocks B and C compared to
The distribution of the data is also presented using boxplots indicat- building A can be explained by the newer buildings and the resulting
ing the interquartile range (IQR) and whisker. The interquartile range, newer distribution system with new pipes and fittings.
defined in the boxplot as the width of the box, thus assumes that the
values are clustered around the central value (median), and the edges 4.2. Frequency distribution and analysis in frequency domain
of the box, bottom, and top, are defined as the 25th (first quartile)
and 75th (third quartile) percentiles. Respectively, the IQR indicates The frequency distribution of a continuous numerical variable is
how much the ‘‘middle’’ values are spread out. The whiskers extend to shown in a histogram. Histograms in Fig. 12 depict the frequency of
the most extreme data points, minimum and maximum. Values that lie occurrence of consumption of a specific value. The main valve, for
outside the interquartile range and whiskers are considered outliners. example, records a maximum consumption between 0.27 and 0.37
According to the hourly water consumption, the values are normally m3 /h, block A between 0.16 and 0.25 m3 /h, block B between 0.1
distributed in the period from 7 a.m. to 4 p.m., in contrast to the rest of and 0.1 m3 /h, and block C between 0.04 and 0.07 m3 /h. The highest
the period where a larger number of outliers were recorded (Fig. 10). duration, i.e., the cumulative frequency of consumption of the highest
This can be explained by an unusual event that led to higher water occurrences, is captured by the duration curves. As histograms, the du-
consumption, such as a leak in the distribution system. Daily water ration curves indicate the presence of losses in the distribution system,
6
I. Andrić et al. Journal of Cleaner Production 365 (2022) 132792
Fig. 9. Water consumption trends at the main valve, as well as in blocks B and C.
Fig. 11. Average hourly water consumption and corresponding non-uniformity coefficients for the main valve and three blocks.
the magnitudes of which lead to a greater frequency of consumption S(f) used to detect the periodicity of the analyzed signal is defined as
corresponding to the magnitude of the losses. follows (Denić-Jukić et al., 2020; Larocque et al., 1998):
Analysis in the frequency domain includes the analysis of signals [ ]
∑
𝑚
and their properties with respect to frequency, rather than time. Signals 𝑠(𝑓 ) = 2 1 + 2 𝐷(𝑘)𝑟(𝑘) cos(2𝜋𝑓 𝑘) (1)
are converted from the time domain to the frequency domain by 𝑘=1
the Fourier transform. The function used in this article for frequency
1 𝜋𝑘
analysis is the spectral density function. The spectral density function 𝐷(𝑘) = (1 + cos ) (2)
2 𝑚
7
I. Andrić et al. Journal of Cleaner Production 365 (2022) 132792
Fig. 12. Histograms and duration curves of data set for the main valve, block A, B, and C.
Fig. 13. Spectral density function of data set at main valve, block B and C.
8
I. Andrić et al. Journal of Cleaner Production 365 (2022) 132792
CRediT authorship contribution statement Boyle, T., Giurco, D., Mukheibir, P., Liu, A., Moy, C., White, S., Stewart, R., 2013.
Intelligent metering for urban water: A review. Water 5 (3), 1052–1081. http://dx.
doi.org/10.3390/w5031052, URL: https://www.mdpi.com/2073-4441/5/3/1052.
I. Andrić: Conceptualization, Formal analysis, Investigation,
Centenaro, M., Vangelista, L., Zanella, A., Zorzi, M., 2016. Long-range communications
Methodology, Software, Validation, Visualization, Funding acquisi- in unlicensed bands: the rising stars in the IoT and smart city scenarios. IEEE Wirel.
tion, Project administration, Writing – original draft, Writing – Commun. 23 (5), 60–67. http://dx.doi.org/10.1109/MWC.2016.7721743.
review & editing. A. Vrsalović: Conceptualization, Data curation, Dahlström, P., Söderberg, A., 2017. Turning Smart Water Meter Data Into Useful
Investigation, Methodology, Validation, Visualization, Software, Information. A case study on rental apartments in Södertälje. Student Paper.
Denić-Jukić, V., Lozić, A., Jukić, D., 2020. An application of correlation and spectral
Supervision, Writing – original draft, Writing – review & editing. analysis in hydrological study of neighboring karst springs. Water 12 (12), http://
T. Perković: Data curation, Investigation, Methodology, Validation, dx.doi.org/10.3390/w12123570, URL: https://www.mdpi.com/2073-4441/12/12/
Visualization, Software, Writing – original draft, Writing – review 3570.
& editing. M. Aglić Čuvić: Data curation, Software, Validation, Depuru, S.S.S.R., Wang, L., Devabhaktuni, V., 2011. Smart meters for power grid:
Challenges, issues, advantages and status. Renew. Sustain. Energy Rev. 15
Visualization, Writing – original draft, Writing – review & editing. P.
(6), 2736–2742. http://dx.doi.org/10.1016/j.rser.2011.02.039, URL: https://www.
Šolić: Conceptualization, Funding acquisition, Project administration, sciencedirect.com/science/article/pii/S1364032111000876.
Supervision, Validation, Writing – review & editing. Farah, E., Shahrour, I., 2017. Smart water for leakage detection: Feedback about the
use of automated meter reading technology. In: 2017 Sensors Networks Smart
Declaration of competing interest and Emerging Technologies (SENSET). pp. 1–4. http://dx.doi.org/10.1109/SENSET.
2017.8125061.
Larocque, M., Mangin, A., Razack, M., Banton, O., 1998. Contribution of correlation and
The authors declare that they have no known competing financial spectral analyses to the regional study of a large karst aquifer (Charente, France).
interests or personal relationships that could have appeared to J. Hydrol. 205 (3), 217–231. http://dx.doi.org/10.1016/S0022-1694(97)00155-8,
influence the work reported in this paper. URL: https://www.sciencedirect.com/science/article/pii/S0022169497001558.
Li, X.J., Chong, P.H.J., 2019. Design and implementation of a self-powered smart
water meter. Sensors 19 (19), http://dx.doi.org/10.3390/s19194177, URL: https:
Acknowledgments //www.mdpi.com/1424-8220/19/19/4177.
LoRa Alliance Technical Committee. 2020. Technical Report, LoRaWAN Specification
This work has been partially supported by Croatian Science Founda- v1.0.3 URL: https://lora-alliance.org/resource_hub/lorawan-specification-v1-0-3/.
tion under the project ‘‘Internet of Things: Research and Applications’’, Mangalvedhe, N., Ratasuk, R., Ghosh, A., 2016. NB-IoT deployment study for low
power wide area cellular IoT. In: 2016 IEEE 27th Annual International Symposium
UIP-2017-05-4206; by the European Union through the Interreg Central
on Personal, Indoor, and Mobile Radio Communications (PIMRC). pp. 1–6. http:
Europe Programme under Project ‘‘CWC - City Water Circles’’. URL: //dx.doi.org/10.1109/PIMRC.2016.7794567.
https://www.interreg-central.eu/Content.Node/CWC.html Manoharan, A.M., Rathinasabapathy, V., 2018. Smart water quality monitoring and
This research was supported through project KK.05.1.1.02.0024, metering using lora for smart villages. In: 2018 2nd International Conference
on Smart Grid and Smart Cities (ICSGSC). pp. 57–61. http://dx.doi.org/10.1109/
‘‘VODIME—Waters of Imotski region’’ a project financed by Croatian
ICSGSC.2018.8541336.
Government and the European Union through the European Struc- Mohd Daud, F., Abdullah, S., 2020. Water consumption trend among students in a
tural Fund—within the call ‘‘Strengthening the applied research for university’s residential hall. Malaysian J. Soc. Sci. Human. (MJSSH) 5 (9), 56–
climate change adaptation measures’’. This research was partially sup- 62. http://dx.doi.org/10.47405/mjssh.v5i9.477, URL: https://msocialsciences.com/
ported through project KK.01.1.1.02.0027, a project co-financed by index.php/mjssh/article/view/477.
Sain, M., Kang, Y.J., Lee, H.J., 2017. Survey on security in internet of things: State
the Croatian Government and the European Union through the Euro-
of the art and challenges. In: 2017 19th International Conference on Advanced
pean Regional Development Fund—the Competitiveness and Cohesion Communication Technology (ICACT). pp. 699–704. http://dx.doi.org/10.23919/
Operational Programme. ICACT.2017.7890183.
Sanchez-Iborra, R., Cano, M.-D., 2016. State of the art in LP-WAN solutions for
industrial IoT services. Sensors 16 (5), http://dx.doi.org/10.3390/s16050708, URL:
References
https://www.mdpi.com/1424-8220/16/5/708.
Slaný, V., Lučanský, A., Koudelka, P., Mareček, J., Krčálová, E., Martínek, R., 2020.
Almeida, A.P., Sousa, V., Silva, C.M., 2021. Methodology for estimating energy
An integrated IoT architecture for smart metering using next generation sensor
and water consumption patterns in university buildings: case study, federal
for water management based on LoRaWAN technology: A pilot study. Sensors 20
university of roraima (UFRR). Heliyon 7 (12), e08642. http://dx.doi.org/10.
(17), http://dx.doi.org/10.3390/s20174712, URL: https://www.mdpi.com/1424-
1016/j.heliyon.2021.e08642, URL: https://www.sciencedirect.com/science/article/
8220/20/17/4712.
pii/S2405844021027456.
Yasin, H.M., Zeebaree, S.R.M., Sadeeq, M.A.M., Ameen, S.Y., Ibrahim, I.M., Zebari, R.R.,
Anandhavalli, D., Sangeetha, K., Priya Dharshini, V., Lukshana Fathima, B., 2018.
Ibrahim, R.K., Sallow, A.B., 2021. IoT and ICT based smart water management,
Smart meter for water utilization using IoT. Int. Res. J. Eng. Technol. (IRJET)
monitoring and controlling system: A review. Asian J. Res. Comput. Sci. 8 (2),
5, 1002–1005.
42–56. http://dx.doi.org/10.9734/ajrcos/2021/v8i230198.
Benavente-Peces, C., 2019. On the energy efficiency in the next generation of smart
Zorzi, M., Gluhak, A., Lange, S., Bassi, A., 2010. From today’s INTRAnet of things
buildings—Supporting technologies and techniques. Energies 12 (22), http://dx.doi.
to a future INTERnet of things: A wireless-and mobility-related view. IEEE Wirel.
org/10.3390/en12224399, URL: https://www.mdpi.com/1996-1073/12/22/4399.
Commun. 17, 44–51. http://dx.doi.org/10.1109/MWC.2010.5675777.
Berni, A., Gregg, W., 1973. On the utility of chirp modulation for digital signaling. IEEE
Trans. Commun. 21 (6), 748–751. http://dx.doi.org/10.1109/TCOM.1973.1091721.