# Quantifying the Computational Efficiency of Compressive Sensing in Smart Water Network Infrastructures

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Data Acquisition System Overview and Preliminaries

#### 2.1. Data Description

#### 2.2. Compressive Sensing

#### 2.2.1. CS-Based Compression

#### 2.2.2. CS-Based Decompression

#### 2.3. CS Weak Encryption

## 3. Hardware Benchmark

#### 3.1. Hardware Platform

#### 3.2. Software Description

#### 3.2.1. Contiki OS

#### 3.2.2. Network Stack

#### IEEE 802.15.4

#### 6LoWPAN

#### CoAP

#### 3.2.3. Energy Profiling

#### 3.3. Implementation Details

- The Data Collection Module is responsible for the sensor data collection. It periodically polls the sensor for value and buffers them, until a pre-defined block of values is collected.
- The Compression Module, which applies the selected compression algorithm on the collected sensor data. It receives as input: (i) the buffered sensor values provided by the Data Collection Module; (ii) the compression algorithm (CS or LZ77); and (iii) the compression parameters (i.e., the measurement matrix and compression ratio for CS, and dictionary hash table size for LZ77) and outputs a block of compressed data stored in a buffer.
- The Communication Module (built on the network stack described in Section 3.2.2) receives the output of the Compression Module and sends it to the gateway. More specifically, a CoAP server exposes two CoAP resources for managing the compression and collection of compressed data, one for each alternative, namely CS and LZ77. CoAP asynchronous notifications mechanism, OBSERVE, is used for data collection, while appropriate CoAP POST requests permit compression parameters control, such as dynamic compression ratio for CS.

## 4. Performance Evaluation

#### 4.1. Performance Metrics

#### 4.2. Results

## 5. Conclusions and Future Work

## Author Contributions

## Funding

## Conflicts of Interest

## Abbreviations

WDN | Water Distribution Network |

ICT | Information Communication Technologies |

CS | Compressive Sensing |

SR | Sampling Rate |

CR | Compression Rate |

STFT | Short-Time Fourier Transform |

SER | Signal-to-Error Ratio |

IoT | Internet-of-Things |

SoC | System on Chip |

RF | Radio Frequency |

I2C | Inter-integrated Circuit |

SPI | Serial Peripheral Interface |

UART | Universal Asynchronous Receiver Transmitter |

IETF | Internet Engineering Task Force |

LPWAN | Low Power Wide Area Network |

CSMA-CA | Carrier Sense Multiple Access-Collision Avoidance |

TSCH | Time Slotted Channel Hopping |

MTU | Maximum Transmission Unit |

LoWPAN | Low Power Wireless Personal Area Network |

DODAG | Destination Oriented Directed Acyclic Graph |

CoAP | Constrained Application Protocol |

FWHT | Fast Walsh-Hadamard Transform |

CET | Compression Execution Time |

CEC | Compression Energy Consumption |

TEC | Transmission Energy Consumption |

## References

- Liemberger, R.; Wyatt, A. Quantifying the global non-revenue water problem. Water Supply
**2019**, 19, 831–837. [Google Scholar] [CrossRef] - AL-Washali, T.; Sharma, S.; AL-Nozaily, F.; Haidera, M.; Kennedy, M. Monitoring nonrevenue water performance in intermittent supply. Water
**2019**, 11, 1220. [Google Scholar] [CrossRef][Green Version] - Nguyen, K.A.; Stewart, R.A.; Zhang, H.; Sahin, O.; Siriwardene, N. Re-engineering traditional urban water management practices with smart metering and informatics. Environ. Model. Softw.
**2018**, 101, 256–267. [Google Scholar] [CrossRef][Green Version] - Roubakis, S.; Tzagkarakis, G.; Tsakalides, P. Real-time prototyping of matlab-java code integration for water sensor networks applications. In Proceedings of the 2019 27th European Signal Processing Conference (EUSIPCO), A Coruna, Spain, 2–6 September 2019; pp. 1–5. [Google Scholar] [CrossRef]
- Giurco, D.P.; White, S.B.; Stewart, R. Smart metering and water end-use data: Conservation benefits and privacy risks. Water
**2010**, 2, 461–467. [Google Scholar] [CrossRef][Green Version] - Ramos, H.M.; McNabola, A.; Jiménez, A.P.L.; Pérez-Sánchez, M. Smart water management towards future water sustainable networks. Water
**2020**, 12, 58. [Google Scholar] [CrossRef][Green Version] - Li, J.; Yang, X.; Sitzenfrei, R. Rethinking the framework of smart water system: A review. Water
**2020**, 12, 412. [Google Scholar] [CrossRef][Green Version] - Vrachimis, S.G.; Kyriakou, M.S.; Eliades, D.G.; Polycarpou, M.M. LeakDB: A benchmark dataset for leakage diagnosis in water distribution networks. In Proceedings of the WDSA/CCWI Joint Conference, Kingston, ON, Canada, 23–25 July 2018; Volume 1. [Google Scholar]
- Alvisi, S.; Casellato, F.; Franchini, M.; Govoni, M.; Luciani, C.; Poltronieri, F.; Riberto, G.; Stefanelli, C.; Tortonesi, M. Wireless middleware solutions for smart water metering. Sensors
**2019**, 19, 1853. [Google Scholar] [CrossRef] [PubMed][Green Version] - Amaxilatis, D.; Chatzigiannakis, I.; Tselios, C.; Tsironis, N.; Niakas, N.; Papadogeorgos, S. A smart water metering deployment based on the fog computing paradigm. Appl. Sci.
**2020**, 10, 1965. [Google Scholar] [CrossRef][Green Version] - Jang, D.W.; Park, H.; Choi, G. Estimation of leakage ratio Using principal component analysis and artificial neural network in water distribution systems. Sustainability
**2018**, 10, 750. [Google Scholar] [CrossRef][Green Version] - Gupta, S.P.; Pandey, U.K. Data Analysis, Visualization, and Leak Size Modeling for Water Distribution Network; Wang, J., Reddy, G., Prasad, V., Reddy, V., Eds.; Soft Computing and Signal Processing, Advances in Intelligent Systems and Computing, Vol. 898; Springer: Singapore, 2019. [Google Scholar] [CrossRef]
- Valisš, D.; Hasilová, K.; Forbelská, M.; Vintr, Z. Reliability modelling and analysis of water distribution network based on backpropagation recursive processes with real field data. Measurement
**2020**, 149, 107026. [Google Scholar] [CrossRef] - Horsburgh, J.S.; Leonardo, M.E.; Abdallah, A.M.; Rosenberg, D.E. Measuring water use, conservation, and differences by gender usingan inexpensive, high frequency metering system. Environ. Model. Softw.
**2017**, 96, 83–94. [Google Scholar] [CrossRef] - Vrachimis, S.G.; Lifshitz, R.; Eliades, D.G.; Polycarpou, M.M.; Ostfeld, A. Active contamination detection in water-distribution systems. J. Water Resour. Plan. Manag.
**2020**, 146, 04020014. [Google Scholar] [CrossRef][Green Version] - Vrachimis, S.G.; Eliades, D.G.; Polycarpou, M.M. Leak detection in water distribution systems using hydraulic interval state estimation. In Proceedings of the 2018 IEEE Conference on Control Technology and Applications (CCTA), Copenhagen, Denmark, 21–24 August 2018; pp. 565–570. [Google Scholar]
- Allen, M.; Preis, A.; Iqbal, M.; Whittle, A.J. Water distribution system monitoring and decision support using a wireless sensor network. In Proceedings of the 14th ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing, Honolulu, HI, USA, 1–3 July 2013; pp. 641–646. [Google Scholar]
- Carminati, M.; Turolla, A.; Mezzera, L.; Mauro, M.D.; Tizzoni, M.; Pani, G.; Zanetto, F.; Foschi, J.; Antonelli, M. A self-powered wireless water quality sensing network enabling smart monitoring of biological and chemical stability in supply systems. Sensors
**2020**, 20, 1125. [Google Scholar] [CrossRef] [PubMed][Green Version] - Gourbesville, P. Key challenges for smart water. Procedia Eng.
**2016**, 154, 11–18. [Google Scholar] [CrossRef][Green Version] - Ng, W.K.; Choi, S.; Ravishankar, C. Lossless and Lossy Data Compression; Evolutionary Algorithms in Engineering Applications; Springer: Berlin/Heidelberg, Germany, 1997. [Google Scholar] [CrossRef]
- Ziv, J.; Lempel, A. A universal algorithm for sequential data compression. IEEE Trans. Inf. Theory
**1977**, 23, 337–343. [Google Scholar] [CrossRef][Green Version] - Kartakis, S.; McCann, J.A. Real-time edge analytics for cyber physical systems using compression rates. In Proceedings of the 11th International Conference on Autonomic Computing (ICAC ’14), Philadelphia, PA, USA, 18–20 June 2014. [Google Scholar]
- Eichinger, F.; Efros, P.; Karnouskos, S.; Böhm, K. A time-series compression technique and its application to the smart grid. VLDB J.
**2015**, 24, 193–218. [Google Scholar] [CrossRef][Green Version] - Ukil, A.; Bandyopadhyay, S.; Pal, A. IoT data compression: Sensor-agnostic approach. In Proceedings of the IEEE 2015 Data Compression Conference, Snowbird, UT, USA, 7–9 April 2015; pp. 303–312. [Google Scholar]
- Luo, G.; Yi, K.; Cheng, S.W.; Li, Z.; Fan, W.; He, C.; Mu, Y. Piecewise linear approximation of streaming time series data with max-error guarantees. In Proceedings of the IEEE 31st International Conference on Data Engineering, Seoul, Korea, 13–17 April 2015; pp. 173–184. [Google Scholar]
- Daubechies, I. Ten Lectures on Wavelets; SIAM: Philadelphia, PA, USA, 1992; Volume 61. [Google Scholar]
- Mallat, S. A Wavelet Tour of Signal Processing: The Sparse Way, 3rd ed.; Academic Press: Cambridge, MA, USA, 2009. [Google Scholar]
- Candès, E.J.; Romberg, J.; Tao, T. Robust uncertainty principles: Exact signal reconstruction from highly incomplete frequency information. IEEE Trans. Inf. Theory
**2006**, 52, 489–509. [Google Scholar] [CrossRef][Green Version] - Donoho, D.L. Compressed sensing. IEEE Trans. Inf. Theory
**2006**, 52, 1289–1306. [Google Scholar] [CrossRef] - Kartakis, S.; Tzagkarakis, G.; McCann, J.A. Adaptive compressive sensing in smart water networks. In Proceedings of the 2nd International Electronic Conference on Sensors and Applications, Basel, Switzerland, 15–30 November 2015. Multidisciplinary Digital Publishing Institute. [Google Scholar]
- Balan, R.; Casazza, P.; Heil, C.; Landau, Z. Density, overcompleteness, and localization of frames. I. Theory. J. Fourier Anal. Appl.
**2006**, 12, 71–86. [Google Scholar] [CrossRef][Green Version] - Do, T.T.; Gan, L.; Nguyen, N.H.; Tran, T.D. Fast and efficient compressive sensing using structurally random matrices. IEEE Trans. Signal Process.
**2012**, 60, 139–154. [Google Scholar] [CrossRef][Green Version] - Sebert, F.; Zou, Y.M.; Ying, L. Toeplitz block matrices in compressed sensing and their applications in imaging. In Proceedings of the 2008 International Conference on Information Technology and Applications in Biomedicine, Shenzhen, China, 30–31 May 2008. [Google Scholar]
- Gan, L.; Do, T.T.; Tran, T.D. Fast compressive imaging using scrambled block Hadamard ensemble. In Proceedings of the European Signal Processing Conference (EUSIPCO), Lausanne, Switzerland, 25–29 August 2008. [Google Scholar]
- Fino, B.J.; Algazi, V.R. Unified matrix treatment of the fast Walsh-Hadamard transform. IEEE Trans. Comput.
**1976**, C-25, 1142–1146. [Google Scholar] [CrossRef] - Tibshirani, R. Regression shrinkage and selection via the lasso. J. R. Stat. Soc. Ser. B (Methodol.)
**1996**, 58, 267–288. [Google Scholar] [CrossRef] - Donoho, D.; Tsaig, Y.; Drori, I.; Starck, J.L. Sparse solution of underdetermined systems of linear equations by stagewise orthogonal matching pursuit. IEEE Trans. Inf. Theory
**2012**, 58, 1094–1121. [Google Scholar] [CrossRef] - Tropp, J.; Gilbert, A. Signal recovery from random measurements via orthogonal matching pursuit. IEEE Trans. Inf. Theory
**2007**, 53, 4655–4666. [Google Scholar] [CrossRef][Green Version] - Becker, S.; Bobin, J.; Candès, E.J. NESTA: A fast and accurate first-order method for sparse recovery. SIAM J. Imaging Sci.
**2011**, 4, 1–39. [Google Scholar] [CrossRef][Green Version] - Fay, R.; Ruland, C. Compressive sensing encryption modes and their security. In Proceedings of the 11th International Conference for Internet Technology and Secured Transactions (ICITST), Barcelona, Spain, 5–7 December 2016; pp. 119–126. [Google Scholar] [CrossRef]
- Rachlin, Y.; Baron, D. The secrecy of compressed sensing measurements. In Proceedings of the 46th Annual Allerton Conference on Communication, Control, and Computing, Urbana-Champaign, IL, USA, 23–26 September 2008; pp. 813–817. [Google Scholar] [CrossRef][Green Version]
- Zhang, Y.; Zhou, J.; Chen, F.; Zhang, L.Y.; Wong, K.W.; He, X.; Xiao, D. Embedding cryptographic features in compressive sensing. Neurocomputing
**2016**, 472–480. [Google Scholar] [CrossRef] - Hahm, O.; Baccelli, E.; Petersen, H.; Tsiftes, N. Operating systems for low-end devices in the Internet of Things: A survey. IEEE Internet Things J.
**2016**, 3, 720–734. [Google Scholar] [CrossRef][Green Version] - Pöhls, H.C.; Angelakis, V.; Suppan, S.; Fischer, K.; Oikonomou, G.; Tragos, E.Z.; Rodriguez, R.D.; Mouroutis, T. RERUM: Building a reliable IoT upon privacy-and security-enabled smart objects. In Proceedings of the 2014 IEEE Wireless Communications and Networking Conference Workshops (WCNCW), Istanbul, Turkey, 6–9 April 2014; pp. 122–127. [Google Scholar]
- Dunkels, A.; Gronvall, B.; Voigt, T. Contiki-a lightweight and flexible operating system for tiny networked sensors. In Proceedings of the 29th Annual IEEE International Conference on Local Computer Networks, Washington, DC, USA, 16–18 November 2004; pp. 455–462. [Google Scholar]
- Dunkels, A.; Schmidt, O.; Voigt, T.; Ali, M. Protothreads: Simplifying event-driven programming of memory-constrained embedded systems. In Proceedings of the 4th International Conference on Embedded Networked Sensor Systems (SenSys 2006), Boulder, CO, USA, 31 October–3 November 2006; pp. 29–42. [Google Scholar]
- Durvy, M.; Abeillé, J.; Wetterwald, P.; O’Flynn, C.; Leverett, B.; Gnoske, E.; Vidales, M.; Mulligan, G.; Tsiftes, N.; Finne, N.; et al. Making sensor networks IPv6 ready. In Proceedings of the 6th ACM Conference on Embedded Network Sensor Systems, Raleigh, NC, USA, 5–7 November 2008; pp. 421–422. [Google Scholar]
- Shelby, Z.; Hartke, K.; Bormann, C. The Constrained Application Protocol (CoAP). 2014. Available online: https://tools.ietf.org/html/rfc7252 (accessed on 9 June 2020).
- Dunkels, A.; Osterlind, F.; Tsiftes, N.; He, Z. Software-based on-line energy estimation for sensor nodes. In Proceedings of the 4th Workshop on Embedded Networked Sensors (EmNets ’07), Cork, Ireland, 25–26 June 2007; Association for Computing Machinery: New York, NY, USA, 2007; pp. 28–32. [Google Scholar] [CrossRef]

**Figure 2.**(

**a**) Original pressure stream and sorted absolute STFT coefficients, under normal network conditions; and (

**b**) original pressure stream and sorted absolute STFT coefficients, under abnormal network conditions.

**Figure 4.**(

**a**) Original stream under normal network conditions and its compressed versions; and (

**b**) original stream and CS-based reconstructions, for three distinct sampling ratios $\mathrm{SR}\phantom{\rule{3.33333pt}{0ex}}\in \phantom{\rule{3.33333pt}{0ex}}\{25\%,50\%,75\%\}$.

**Figure 5.**(

**a**) Original stream under abnormal network conditions and its compressed versions; and (

**b**) original stream and CS-based reconstructions, for three distinct sampling ratios $\mathrm{SR}\in \{25\%,50\%,75\%\}$.

**Figure 9.**Average and standard deviation of CET, over the total number of pressure blocks, for different compression types.

**Figure 10.**CET Kruskal–Wallis mean ranks and Dunn comparison intervals for different compression types: (

**a**) $N=64$; (

**b**) $N=128$; and (

**c**) $N=256$.

**Figure 11.**Average and standard deviation of CEC, over the total number of pressure blocks, for different compression types.

**Figure 12.**CEC Kruskal–Wallis mean ranks and Dunn comparison intervals for different compression types: (

**a**) $N=64$; (

**b**) $N=128$; and (

**c**) $N=256$.

**Figure 13.**Average and standard deviation of TEC, over the total number of pressure blocks, for different compression types.

**Figure 14.**TEC Kruskal–Wallis mean ranks and Dunn comparison intervals for different compression types: (

**a**) $N=64$; (

**b**) $N=128$; and (

**c**) $N=256$.

**Figure 15.**CS reconstruction error in terms of SER (dB) averaged over all streams, for the original and permuted $\mathsf{\Phi}$ and for $\mathrm{SR}\in \{25\%,50\%,75\%\}$, as a function of $p(\%)$: (

**a**–

**c**) $N=64$; (

**d**–

**f**) $N=128$; and (

**g**–

**i**) $N=256$.

Variable | Value | |
---|---|---|

RTIMER_SECOND | 32,768 ticks | |

Voltage | 3 V | |

Current | CPU | 13 mA |

LPM | 0.6 mA | |

TRANSMIT (0 dBm) | 24 mA | |

LISTEN (−100 dBm) | 24 mA |

Parameter | Value |
---|---|

Sensor sampling frequency | 1 sample every 15 min |

Total number of pressure values in the monitored period | 9984 |

Block size N | $\{64,128,256\}$ |

CS compression ratio ${\mathrm{CR}}_{\mathrm{CS}}$ | $\{25\%,50\%,75\%\}$ |

Measurement matrix $\mathsf{\Phi}$ | Hadamard |

LZ77 dictionary hash table size | 1 KB |

Network stack | CoAP + UDP + IPv6 + 6LoWPAN |

2]*Physical and MAC layer | Non-beacon-enabled CSMA, |

IEEE 802.15.4 | |

TX power | 0 dBm |

RF channel | 26 (2480 MHz) |

N | 64 | 128 | 256 |
---|---|---|---|

${\mathrm{CR}}_{\mathrm{LZ}}^{\mathrm{av}}$ | 44.81% | 48.08% | 50.04% |

N | Average CEC [uJ] | CEC Savings | |
---|---|---|---|

LZ77 | CS (any CR) | ||

64 | 38 | 19 | 50% |

128 | 64 | 44 | 31.25% |

256 | 115 | 89 | 22.61% |

N | LZ77 | ${\mathbf{CS}}_{\mathbf{CR}}$ | ||
---|---|---|---|---|

CR = 25% | CR = 50% | CR = 75% | ||

64 | 35.43% | 22.73% | 46.97% | 73.07% |

128 | 43.06% | 23.82% | 49.04% | 73.75% |

256 | 47.80% | 24.73% | 49.28% | 74.07% |

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Tzagkarakis, G.; Charalampidis, P.; Roubakis, S.; Makrogiannakis, A.; Tsakalides, P. Quantifying the Computational Efficiency of Compressive Sensing in Smart Water Network Infrastructures. *Sensors* **2020**, *20*, 3299.
https://doi.org/10.3390/s20113299

**AMA Style**

Tzagkarakis G, Charalampidis P, Roubakis S, Makrogiannakis A, Tsakalides P. Quantifying the Computational Efficiency of Compressive Sensing in Smart Water Network Infrastructures. *Sensors*. 2020; 20(11):3299.
https://doi.org/10.3390/s20113299

**Chicago/Turabian Style**

Tzagkarakis, George, Pavlos Charalampidis, Stylianos Roubakis, Antonis Makrogiannakis, and Panagiotis Tsakalides. 2020. "Quantifying the Computational Efficiency of Compressive Sensing in Smart Water Network Infrastructures" *Sensors* 20, no. 11: 3299.
https://doi.org/10.3390/s20113299