# Design and Implementation of a Mixed IoT LPWAN Network Architecture
## 5 Case Study and Testing Environment  
The validation of the developed system has been carried out in two different phases. A first phase has been performed at the laboratory level using a mock-up of the system model (Figure 20a), which consists of a closed water circuit, an electric pump, a residential water-meter similar to that used by the distribution company and an electronic-pulse generator device as shown in Figure 20c, which is attached to the water-meter, whose output is connected to the input connector of the acquisition device described in Section 4.2. Figure 19: LoRaWAN base station: (**a**) External view; (**b**) Internal view. Figure 20: Testing system: (**a**) Mock-up of the system model consisting of: closed water circuit, electric pump, residential water-meter and electronic pulse generator; (**b**) Set of hardware devices developed for remote monitoring, LoRa-Sigfox gateway and test console containing: water-meter emulator, switching device between real water meter or emulator, electronic pulse generator and commercial IoT tele-operated products. (**c**) Electronic pulse generator device attached to a company water-meter placed at the front wall of a residential house. Figure 20b shows the final versions of each of the different devices developed and described in the previous sections that have been tested during this laboratory phase. The main goal of this testing phase was to verify that all the hardware worked properly, that all the electrical pulses coming from the water-meter were acquired rightly and that all the necessary information was transmitted without losses by the network in an appropriate way, in order to assure that all developed devices presented an appropriate behaviour, at both hardware and software level, and they could be considered fully operational final prototypes. Once the testing phase has been passed, a second phase was implemented, consisting of the development of a case study under real operating conditions. For this purpose, it was made an application to a commercial water distribution company of a set of data remotely acquired from several of its water-meters. The remote acquisition system used by the company is based on a 169 MHz radio link communication within the ISM Band. The reception antenna is located on the roof of a building that the company has in the city of Cartagena. The acquisition system is configured in such way it captures and transmits a measurement every hour, so the full monitoring process of a day would involve the acquisition and transmission of 24 samples. The company supplied the measurements acquired during a 100-day period, coming from a set of 78 water-meters located in different areas of the city chosen randomly. Figure 21 summarizes the data gathered by these water-meters. Being samples acquired over 100 days, a total amount of 2400 samples should theoretically have been received from each water-meter (100 days \(\times\) 24 samples/day). However, as shown in Figure 21, this has not happened for all the water-meters, which implies that there are problems associated with the data-transmission process. Using statistical quartiles Q1 (25%) and Q3 (75%), the range of received samples has been divided into three different zones. All those water-meter from which have been received an amount of measurements less than 25% of the expected quantity during the considered monitoring period have been classified as _'alarming'_ (marked in red in the figure). Those water-meters from which have been received an amount of measurements between the 25% and 75% of the expected quantity, have been classified as _'critical'_ (marked in yellow in the figure). Finally, those water-meters from which an amount of received measures is greater than 75% of the expected amount, have been considered as _'acceptable'_ (marked in green).