A layered IoT-based architecture for a distributed structural health monitoring system ACTA IMEKO ISSN: 2221-870X June 2019, Volume 8, Number 2, 45 - 52 ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 45 A layered IoT-based architecture for a distributed structural health monitoring system Francesco Lamonaca1, Carmelo Scuro2, Paolo Francesco Sciammarella3, Renato Sante Olivito2, Domenico Grimaldi3, Domenico Luca Carnì3 1 DING - Department of Engineering, University of Sannio, 82100 Benevento, Italy 2 DINCI – Department of Civil Engeneering, University of Calabria, 87036 Rende (CS) - Italy 3 DIMES - Department of Informatics Modelling Electronics and Systems Science, University of Calabria, 87036 Rende (CS) - Italy Section: RESEARCH PAPER Keywords: Structural Health Monitoring, Internet-of-Things, Synchronization, Multi-Agent system, Signal Processing, Acoustic Emission. Citation: Francesco Lamonaca, Carmelo Scuro, Paolo Francesco Sciammarella, Renato Sante Olivito, Domenico Grimaldi, Domenico Luca Carnì, A layered IoT- based architecture for a distributed structural health monitoring system, Acta IMEKO, vol. 8, no. 2, article 7, June 2019, identifier: IMEKO-ACTA-08 (2019)- 02-07 Editor: Alessandro Depari, University of Brescia, Italy Received July 26, 2018; In final form June 24, 2019; Published June 2019 Copyright: This is an open-access article distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Corresponding author: Domenico Luca Carnì, e-mail: dlcarni@dimes.unical.it 1. INTRODUCTION Structural collapse of buildings can be caused by the sum of minor damage caused by aging phenomena, prolonged pressure to the structural load curve limit, and many other stress causes which, if promptly identified, could prevent loss of human life [1]. With this aim, several inspections and building maintenance programmes are carried out and regulated by law, according to importance, ownership, use, risk, and hazard [2]. These solutions are insufficient for guaranteeing high safety levels because the periodicity of the human inspections carried out are generally unrelated to the unpredictable time in which structure damage events can occur. The need to carry out continuous and more accurate monitoring has led to increased research and development in the field of structural health monitoring (SHM) [3]-[4]. The efforts have been devoted to developing methods, techniques, and systems designed to perform real-time and automated monitoring of buildings [5], detecting the occurrence of structural damaging events (such as a crack in a concrete pillar) that could provoke structural failure or those in any other concrete structures. The sensing part of an SHM system generally constitutes a set of wired or wireless sensors, typically based on fibre Bragg gratings [6] or micro-electro-mechanical-systems (MEMSs) [2]. Both estimate the impact of static and dynamic loads on a pillar, measuring the structural vibration response. Other innovative techniques are based on the analysis of the natural frequency of the structure [7]-[10] and investigate the information transmission problem [11]. ABSTRACT Structural health monitoring (SHM) is responsible for identifying techniques and for prototyping systems performing a state diagnosis of structures. Its aim is to prevent sudden civil infrastructure failure as a result of several invisible sources of damage. Since structural damage is often caused by ground phenomena involving circumscribed geographical areas, it is useful to extend SHM systems to allow for the exchange of information among nearby buildings and then to increase the timeliness of the alerts. To this end, in this article, an SHM based on the IoT paradigm is proposed (SHM-IoT). SHM-IoT carries out both localised monitoring on a single building, and it uses information collected by several sensors correlated in time, aiming to identify potentially dangerous damage. It also performs a wider monitoring on a group of buildings in order to alert a larger number of people. SHM-IoT also sends a remote notification, which is finalised in order to alert the authorities and rescuers about the status of each monitored building. In this context, synchronisation problems arise because the information collected by each sensor of the SHM-IoT needs to be correlated in time in order to be used for damage evaluation and alert generation. In this paper, the hardware and software architectures of the proposed SHM-IoT are presented together with the synchronisation requirements and the methods of satisfying them. Experiments are undertaken to validate the SHM- IoT in real scenarios. mailto:dlcarni@dimes.unical.it ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 46 Nowadays, techniques based on the use of acoustic emission (AE) associated with a crack event show interesting results in pillar damage detection. AEs are elastic radiations generated by the release of energy within the material [12], converted to voltage signals by using piezoelectric sensors applied to the different faces of the pillar. The acquired signal contains information about fracture and plastic deformations, impacts, friction, corrosive film rupture, and other aging processes [13],[14]. The pillars and beams are considered as critical points of the structure that must be monitored in order to prevent critical damage. The number of pillars is determined by several factors, such as the architecture of the structure, in order to transfer the load to the foundation. The use of multiple sensors for each monitoring point determined by the designer of the infrastructure permits detection and localisation of the damage. In the implementation of the monitoring system, the use of wireless networks allows for easy allocation of wireless sensors in the space, increasing the volume of the monitored structure and reducing hardware costs (compared to the adoption of a wired ad hoc network technology). In this article, an improvement on the author’s previous AE- based SHM system [15],[16] is proposed. The overall system can be divided into two subsections: the first deals with the monitoring of the state of a single structure, and the second, instead, is responsible for sending a notification alarm not only within the building but also to the competent authorities and to the other building alarm systems within the neighbourhood. In fact, if a subsoil event affects a certain area, it is likely that more than a single building may have been damaged. Communication among structures is a useful feature for improving the reliability of the SHM system by covering possible failure in the detection of damaging events occurring in the building. In fact, if a structure receives a critical event notification from a neighbour, the preventive alert is performed, even if its sensing part has not detected any event. According to the IoT paradigm [17],[18], the proposed SHM system is designed as a distributed measurement system which follows a layered implementation. Each layer has a specific role and requires the fulfilment of specific temporal constraints to work properly, according to the goals that it has to achieve. This is a preliminary study to determine the applicability of the technologies considered therein. Future research will be focused on the dislocation of the sensor by analysing a scaling model of the structures and then the number of sensors required to monitor a structure. The paper is structured as follows. Section II covers the state of the art in the use of IoT system for SHM is provided. Section III presents an overview on the methodology used to develop each layer of an SHM. In section IV the results of the experimental validation of the proposed SHM are carried out. Finally, in Section V the conclusions are drawn. 2. STATE OF THE ART IN THE IOT SYSTEM FOR SHM In the field of SHM, different technologies and techniques are presented in the literature. The information used to infer the health state of a structure are related to global or local structural properties. The methods used to determine these properties are typically based on: ultrasonic or AE; vibration; strain; comparative vacuum monitoring; Lamb wave; and E/M impedance. Among the architectures proposed in the literature to apply the IoT paradigm to the SHM, in [19], a real-time platform for SHM combining the information provided by two techniques implemented on wireless sensors is proposed: the pitch-catch and pulse-echo sensors. The former is used to detect damage, the second to localise the damage. One limitation of this proposal is that each node needs a cable to connect the ultrasonic transmitter and receiver to the opposite side of the critical point under monitoring and it is tested only on homogeneous material. In [20], an open platform to implement a bridge structural health monitoring system based on IoT is proposed. Similarly, in [21], a smart wireless structural monitoring system for a self-anchored suspension bridge is proposed. The system in [21] uses Bluetooth technology and a TCP/IP network protocol. Among the methods proposed in the literature for SHM, which can be used in an IoT-based system, in [22] an ultrasonic inspection system for the SHM is proposed. Additionally, in [23], the Huang- Hilbert Transform is used to analyse the sensor data to infer the health of a structure. However, the analysis was only made on simulated data. In [1], the Hilbert transform was used on AE signals, and it has enabled the experimental highlighting of two different phases in the damage to the concrete. Further possibilities of IoT in civil engineering for SHM include the recording and storage of a large quantity of data related to the engineering constants of the materials of a structure (elastic modulus; Poisson coefficient; and compressive and tensile strength). These constants can thus be used to improve the analysis of numerical models based on a finite element [24]. 3. SHM BASED ON MULTI-AGENT IOT The proposed system considers the SHM system as a network of interconnected smart objects (SOs) that can be installed in a non-invasive way on the pillars of a structure in order to carry out real-time structural monitoring. Each SO is modelled by following a hierarchical layered architecture (see Figure 1), comprising: • a physical part that includes all the sensors and actuators; and • a cyber part that includes all the algorithm and software protocols. Challenging in this design is the matter of ensuring that all the time constraints on the synchronisation accuracy required by each layer to work properly are satisfied. Moreover, although it is going up in the hierarchy, the growing level of abstraction is coupled with the relaxation of the time constraints, and problems could arise from the synchronisation functioning among different layers (for example, in operations such as data Figure 1. Hierarchical layered implementation of a SHM system. Application Layer Event Detection Layer Signal Processing Layer Sensing Layer Cyber Part Physical Part ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 47 exchange), which limits the reactivity of the overall system, highlighting a separate block: non-holistic functioning. By collecting, processing, and combining the information coming from the individual SOs, it is possible to achieve complex monitoring applications. In particular, the operations computed by each SO are gathered into two groups. The first group includes all the tasks finalised to the local detection of damage, such as: • acquisition of AE signals; • processing of acquired signals to classify whether they are associated with a critical event or not; and • correlation of multiple critical events to infer whether a dangerous damage event has occurred. After the identification of a critical event or the reception of a dangerous event notification, the second group of operations performs tasks aimed at guaranteeing people’s safety. Exploiting the IoT paradigm, SOs can communicate with each other through the network [25],[26], and the performed actions include: • the propagation of an alarm throughout the building in order to evacuate it; • the sending of a remote message to advise the competent authorities; and • the sending of a remote notification to the other buildings included in a fixed neighbourhood to suggest their evacuation. The latter feature is introduced to increase the reliability of a group of SOs installed in the same building and to extend the implementation of an SHM system on a set of structures. In fact, since events generated in the subsoil generally affect a wide geographic area, it is probable that not only has one single structure been damaged, but also its neighbours have suffered damage. Therefore, if a building detects structural damage in itself, it spreads the news towards its neighbours to advise their preventive evacuation. This is useful for avoiding risks due to a possible failure in the detection of a dangerous event. All local and remote communication operations performed by the SOs are carried out exploiting the agent programming paradigm. As defined in [27], an agent is a software entity that is capable of performing an autonomous operation in order to reach an established behavioural goal. Each SO is equipped with an agent that, through its properties (such as reactivity and proactiveness [27]), supervises and manages the monitoring operations, choosing autonomously when it is necessary to interact with other SOs. The main properties that agents offer that are useful for modelling the functioning and the dynamics of a distributed system [27] are: • sociality and mobility, which simplify the implementation of data exchange and offer a distributed view of the application; • concurrent data processing, which allows the acquisition of a high computational throughput; • extensibility, which allows the addition of new features to the application or updating of the used technologies, avoiding any redesign cost; • easy detection of malfunctions by simple problem isolation; • role decomposition, which permits the system to be scaled. The whole SHM system can be seen as a federation of interacting agents, also called multi-agent system (MASs). In such a system, critical aspects relate to the implementation and synchronisation issues connected with the development of a single SO. These aspects can be addressed by analysing each layer of Figure 1 in detail. 3.1. Sensing layer To detect the structural damage, avoiding the use of invasive techniques, the proposed architecture uses the detection of the AE generated in a pillar and in the evaluation of its characteristics. As shown in Figure 2, if a pillar is over-stressed, a set of micro- cracks will be generated within it. If the pressure is exceeded for a long time or if it increases in its intensity, these micro-cracks tend to be generated at multiple points inside the pillar. Consequently, if the micro-cracks couple with each other, highly critical damage can be caused inside the pillar, which can be recognised by detecting the occurrence of the cracks in a time window. As shown in Figure 1, the lowest level of the proposed hierarchy is the sensing layer. That layer is responsible for carrying out continuous real-time monitoring of the structure, exploiting the SOs installed on the pillars, and raising the alarm if a critical event occurs. Low-level AE acquisition is achieved using a set of piezoelectric sensors (PSs) equipped on each SO. The main problems resolved in this layer by using the proposed architecture are concerned with: • the identification of the signals of interest, distinguishing it among environmental noise and sounds produced by a mini-crack i.e. a crack that has low amplitude with respect to a preestablished threshold and cannot be considered significant in the evaluation of the pillar health; • the storage and acquisition only of signals associated with potentially critical events in order to save computational resources; and • the synchronisation of measurements coming from different SOs in order to ensure that they are related to the same phenomenon. Figure 2. Example of crack generation. Figure 3. Distributed structural health monitoring architecture. ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 48 Figure 3 presents that all these issues have been solved by using the logic flat amplifier and trigger (L-FAT) component, described in [15]. L-FAT works together with the data acquisition system (DAQ), extending its capabilities and guaranteeing no loss of signal and no wastage of storage memory. The wastage of memory is related to the requirements of continuous storage of the input signals to guarantee no loss of events. L-FAT allows for the implementation of a suitable logic for the memorisation. The L-FAT component is responsible for conditioning the input signals coming from PSs, amplifying their values, and managing the beginning of the acquisition operations by sending a trigger to the DAQ. That trigger is generated only when one of the signals perceived on the input channels exceeds an experimentally fixed threshold. By appropriately calibrating that threshold, it is possible to store and process only signals associated with a potential event of interest. To avoid the loss of signal of interest samples due to the trigger propagation delay (estimated in the order of ns), it is possible to set DAQ functioning in a pre-trigger mode. In this way, the board is enabled to acquire a fixed number of samples before the trigger occurrence, estimated for the AEs using the Hsu-Nielsen test [28]. All the operations involved in the acquisition phase are time- critical, and a synchronisation accuracy in the order of the s is needed to establish that the different measurements are related to a same event/phenomenon. The parallel-channel architecture of the L-FAT component is able to satisfy that constraint, introducing a propagation delay among the acquired signals estimated in the order of 20 ns, with an uncertainty of a few ns [15], which can be considered negligible. 3.2. Signal processing layer The processing layer includes the algorithms needed to perform low-level processing of the acquired signal. In particular, the sensing layer using the L-FAT acquires the signals related to a crack. This level acts as a filter, discarding among the signals received all those with an intensity that is insufficient for consideration as being associated with the occurrence of a dangerous event. To achieve this goal, the signal processing layer implements all the mathematical operations and the procedures finalised to: • achieve the processing of the acquired signals; and • make the information about the number of the crack identified as dangerous available to the higher software levels. Exploiting the similarity among the crack AE signals and those associated with earthquakes [29], it is possible to use the Gutenberg Richter (GBR) law in order to estimate the crack intensity and to determine the damage level. Using a variant of the GBR law [30], reported in Equation (1), critical cracks are characterised by a value of b in the neighbour of 1 [13]. 𝐿𝑜𝑔(𝑁) = 𝑎 − 𝑏 ∙ 𝐴𝑑𝑚 (1) where N is the number of hits higher than the threshold noise, experimentally fixed at 40 dB. The Adm variable represents the maximum amplitude peak of the AE signal. The a and b parameters are two constants that are experimentally fixed by using the techniques reported in [13]. Considering that for an event characterised by a higher magnitude and the b-value tends to 1, the a value is experimentally evaluated by using Equation (1). With this value, b is also estimated by using Equation (1) for the non-critical events. With this technique, the a value obtained for a sample of RCK25 is 14.45. As shown in Figure 4, the signal processing layer keeps track of the number of potentially dangerous cracks within a counter variable (CV). The value of the CV is needed by the higher software level in the hierarchy for it to carry out its own operations. To make the system as reactive as possible, the decoupling among the updating time of the signal processing layer (determined by the event occurrence) from the periodicity associated with the event detection layer is required. To perform the data exchange, non-blocking mechanisms are used, specifically to increase parallelism and to improve performance. The CV variable is stored in a shared memory location, accessible in Windows by using other software, using the dynamic link library. Consequently, the main problem in this layer lies in synchronising the read-and-write access of the shared variable among the different software components. To overcome this issue, the Dekker mutual exclusion algorithm was used [31]. 3.3. Event detection layer Continuing to rise in the hierarchy of Figure 1, the next level is the event detection layer. It represents a front end between the functioning of the single smart object and the remaining part of the system. The event detection layer: • allows for the identification of the occurrence of effective dangerous damage in the pillar, which is monitored locally by the specific SO; and • sends a notification to the node hosting the application layer through the LAN. The operation of this tier and the algorithms needed to achieve its goals are schematized in Figure 5 and implemented within the behaviour of a software entity called the event detection agent (EDA). Each SO is equipped with one EDA, which exploits the agent message-passing protocol in order to Figure 4. Layer interactions to perform the low-level crack identification. Figure 5. Event detection layer functioning. ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 49 exchange data with the next layer. To detect dangerous damage within a pillar, the first operation that the EDA algorithm performs is the continuous monitoring of the CV value according to an observation period TO=1 s. This periodicity is acceptable, and a greater resolution is not required because TO is compatible with the time constraints needed by the higher layer to perform its operations. Since the recent literature [32] assesses that the structure can be considered dangerously damaged if at least three events of interest are detected in a time interval of 60 s, if the EDA detects a variation in the CV of 3, it automatically detects the hazard situation and sends the appropriate notifications. 3.4. Application layer When the EDA in the event detection layer identifies dangerous damage, it sends a message to the monitoring agent (MA), which implements the high-level operations of the application layer (see Figure 6). That MA is responsible for: • enabling the actuators (such as alarms) to command the evacuation of the building. This is performed by sending an alert message to all the SOs spread throughout the structure, using the LAN; • sending two types of remote notifications using the WAN: o the first to the authorities (such as firefighters), to require their intervention; and o the second to the monitoring agents installed on the structures included in the neighbourhood. No strict time constraints are required to implement the notification mechanism via LAN and globally via WAN, because any propagation delay, estimated in hundreds of ms [32], is negligible. The reaction-actions that will be performed by humans do not in fact require the fulfilment of hard real-time constraints. In fact, the addition of a few ms has no impact on the time needed to carry out an evacuation, the implementation, or the arrival of the authorities for the inspection. The only critical constraint that must be satisfied is that both remote and local notification messages must arrive at their destination. In order to also implement the propagation of the warning to nearby structures, it is necessary that the MA knows and can contact the MAs installed thereon. To solve this problem, the proposed SHM system offers two solutions. According to the first solution, each MA statically memorises information about the neighbours’ IPs in a map, which are appropriately initialised during configuration. The advantage of this approach is that no further network communication is required to discover the neighbourhood, and the disadvantage is that if a new structure is built or if the neighbourhood radius is extended, manual reconfiguration in needed. The second proposed solution is a compromise between the advantage and disadvantage of the previous solution. Following the agent philosophy, a single MA can periodically update its list of neighbouring nodes, requesting it for a yellow pages service, which acts as a directory facilitator. Issues concerning fault tolerance and possible reduction of incoming traffic on the node that offers this service are resolved with node replication mechanisms. 3.5. Remote transmission protocol If all the agents are on the same SO, they can exchange information locally, exploiting their sociality propriety by means of local message passing. Instead, if they are deployed on different SOs, the data exchange requires the use of the network and mechanisms that support the correct message delivery in a distributed environment. The MAS architecture proposed in [33] includes the Gateway component, which has the task of managing the distributed data exchange, exploiting different protocols. In particular, it exposes to the agents the basic read-and-write operations needed to interact with physical devices or other remote cyber components, hiding all the details about the communication protocols used. To develop the proposed SHM, the Gateway has been improved with the introduction of a new module, which enables data exchange on the Internet. According to the IoT paradigm, in order to avoid the active waiting due to the polling cycle between sender and receiver agents (i.e. different MAs or among EDAs and MAs) and to guarantee no packet loss in the communication, the message queue telemetry transport (MQTT) protocol is used [23]. MQTT is based on the publish-subscribe communication paradigm. The architecture does not allow direct data exchange between publisher and subscriber but provides an entity called a broker, which acts as a mediator. Subscribers register themselves to the broker, specifying the topic of the data that they want to receive. When the publisher makes a piece of data available, it dispatches that information to the broker, adding a topic string label that summarises its content. When the broker receives the data, it forwards and delivers the data to the appropriate receivers only if the associated topic is the same as the one that was requested. It is worth noting that by using the broker, publishers ignore the details related to the subscribers’ locations and vice-versa, guaranteeing the operations asynchronicity. MQTT was also chosen because it is designed for networks with low bandwidths and high latency. It uses reduced header and payload for the packet transmission, estimating the transmission’s upper bounds delays in the order of 56 ms [35]. Furthermore, MQTT also offers three quality-of-service (QoS) levels for the reliability of message delivery [36], summarised as follows: Level 0 guarantees a best-effort performance because a message is delivered once at the most, and no acknowledgement of receipt is required. This level ensures reduced transmission times, but there is no reliability concerning delivery. In Level 1, every message is delivered at least once to the receiver, and confirmation of message receipt is required. This level ensures that the message arrives with the receiver, but duplicates can occur. Level 2, by means of a four-way handshake mechanism, guarantees that each message is received only once by the receiver. It is the safest and also the slowest QoS level, and it ensures that delivery occurs and that network congestion and packet duplication are avoided. Figure 6. Application layer communication. ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 50 To ensure that the notification alarm produced by an SO of the application layer reaches the other destinations, it is appropriate to use QoS level 2. This level ensures delivery and reduces network traffic at the cost of a slightly longer transmission delay. The increase in the delay is acceptable compared with the timing of human reactions. 4. EXPERIMENTAL VALIDATION Experiments were carried out to validate the proposed SHM system. Figure 7(a) shows the experimental test bed. It comprises: • Compression system: o Matest high stiffness compression machines with load control (Mod. YIMC109NS); and o PC. • Monitoring system: o Sensing layer: ▪ four AE transducers R15, operating in the frequency range [50, 200] kHz, with a peak sensitivity of 69V/(m/s), a resonant frequency of 150 kHz, and a directionality of ±1.5 dB; ▪ the L-FAT component with four input channels; and ▪ the data acquisition board DAQ (NI 6110 PCI), allowing a sampling frequency of 5MS/s for each input channel and a resolution of 12-bit. o Signal processing layer: ▪ Hp PC-Desktop, 2GB of RAM, Windows XP. o Application Layer: ▪ MacBook, 8GB of RAM. Figure 7(b) shows the detail of the sensors’ positioning over the concrete specimen. In particular, the four sensors were placed on the free faces of the specimen. According to [37],[38], the b-value acceptability parameter for the detection algorithm, is selected in the range [0.9-1.2]. The threshold of the L-FAT for sending the acquisition trigger is established with the Hsu-Nielsen test [39], which is 0.7 V. The number of pre-trigger samples settled in the DAQ is 1000. Tests were conducted on six specimens, and four are characterised by the typical resistance used in concrete structures. Two of them are characterised by a very high resistance with respect to the typical values. The results show that in the case of typical resistance, the three dangerous cracks in the time interval of 60 s detected around 80 % of the maximum load curve (Figure 8). In the other two cases, however, the ISHM system identified only two cracks instead of three. This may be due to the a and b values used in the identification of the events that are established on the basis of typical resistance values. The validation of the sensing layer with respect to the time constraint is performed by comparing, for each event, the time difference among the p-wave of the signals acquired by the four sensors and by verifying that this time difference is compatible with a position of the crack inside the specimen according to the speed of the wave in the concrete. In order to evaluate the one-way delay from publisher to subscriber, it is considered that the IoT devices operate in the same LAN. In this scenario, the one-way delay is evaluated by executing multiple instances of MQTT publishers and subscribers. The subscribers provide multiple messages that flow through the broker to the subscribers. Figure 9 depicts the architecture of the test bed. Several instances of MQTT publishers run equally distributed on two RaspberryPi miniPCs called Raspberry#0 and Raspberry#1. One instance of the selected MQTT broker (Mosquito) is executed on PC#1. Several instances of MQTT subscribers run equally distributed on two RaspberryPi systems called Raspberry#2 and Raspberry#3. The delay measurement system is installed on PC#2. The delay measurement system deploys the open-source network analyser tool Wireshark [39] in order to (i) capture network packets in real time, (ii) select only the packet exchanged by the agents running on the HP and MAC computers, (iii) save Figure 8. Load vs. Time. The round marker highlights 80% of the load and the triangular marker indicates the maximum load. Figure 9. Application layer communication. (a) (b) Figure 7. (a) Experimental test bed overview; (b) details of the sensors’ positioning over the concrete specimen. ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 51 the acquired information in human-readable format, together with the acquisition timestamp, and (iv) evaluate the one-way delay from the transmission of a packets up to its receipt. It is worth noting that the packets are timestamped by Wireshark by using the clock that equips PC#1. This solution does not require the use of protocols to synchronise the clocks that equip the RaspberryPi board in order to evaluate the packet delay [38]. Consequently, we avoid that the synchronisation uncertainty that characterises the actual realisation of such protocols would degrade the accuracy of the packet delay measurement [40],[41]. All components in the testbed are connected to a network hub. This connection allows each packet to be captured as soon as it is sent by the RaspberryPi board and then the one-way delay values are considered as a function only of the message flows. The proposed application scenario is the worst case because in a typical scenario, all the subscribers and publishers have a dedicated device. The implementation on the same device of difference publisher or subscriber processes has the following effects: (i) all the publishers/subscribers share the reduced computational resources and (ii) several messages sent by the publishers are queued to the same network interface. Table 1 shows the results obtained by the experimental testbed considering different numbers of message flows produced by the publishers and received by the subscribers. As expected, the mean  and standard deviation  values increase along with an increase in the number of message flows. The maximum delay, in the order of tens of ms, is acceptable to correlate in time dangerous events registered on different components of the same structure. The evaluation of the one-way delay from publisher to subscriber on the Internet is not useful, since it is related to human reaction in the case of an event. Therefore, a delay in the order of some seconds, typically in the case that the Internet is used, is fully acceptable on this level. Conversely, guarantee of the receipt of the alarm by the authorities is a fundamental requirement. Such a need is satisfied by using the MQTT with acknowledgment of receipt. 5. CONCLUSIONS In this article, a SHM system based on an IoT paradigm was proposed. The features provided by the proposed system include the localisation of the damage; the classification of the damage to recognise a possible danger for a single building and for neighbouring buildings; and the sharing of the information with the authorities to prevent the critical degradation of the building status. Particular attention was given to the synchronisation problems arising from the distributed sensor network composing the proposed system. In this regard, a hardware and software architecture is proposed that fulfils all the synchronisation requirements. Experimental tests validated the effectiveness and suitability of the proposed system in a real context. REFERENCES [1] G.Siracusano, et al., A framework for the damage evaluation of acoustic emission signals through, Mechanical Systems and Signal Processing, Elsevier, 75 (2016) pp.109-122. [2] J.M.Brownjohn, Structural health monitoring of civil infrastructure, Philosophical Transactions of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 365 (2007), pp. 589-622. [3] C.U.Grosse et al, “Wireless acoustic emission sensor networks for structural health monitoring in civil engineering”, Proc. of European Conf. on Non-Destructive Testing (ECNDT), 25-29 September, 2006, Berlin, pp. 1-8. [4] R.Morello, et al., ‘Remote monitoring of building structural integrity by a smart wireless sensor network’, International Instrumentation and Measurement Technology Conference (I2MTC 2010), 3-6 May, Austin, Texas, 2010. [5] G.T.Webb, et al., Categories of SHM deployments: Technologies and capabilities, Journal of Bridge Engineering, 20 (2014), pp. 1- 15. [6] R.C.Tennyson, et al., Structural health monitoring of innovative bridges in Canada with fiber optic sensors, Smart Materials and Structures, 10 (2001), pp. 560-573. [7] S.Nagarajaiah, B.Basu, Output only modal identification and structural damage detection using time frequency & wavelet techniques, Earthquake Engineering and Engineering Vibration, 8(4) (2010) pp. 583-605. [8] M.Diaferio, V.Sepe, Modal identification of damaged frames, Structural Control and Health Monitoring, 23(1) 2016, pp. 82-102. [9] O.S.Salawu, Detection of structural damage through changes in frequency: a review, Engineering Structures, 19(9) (1997) pp. 718- 723. [10] S.Ivorra, V.Brotóns, D.Foti, M.Diaferio A preliminary approach of dynamic identification of slender buildings by neuronal networks, International Journal of Non-Linear Mechanics, 80 (2016) pp. 183-189. [11] Y.Yang, S.Nagarajaia, Robust data transmission and recovery of images by compressed sensing for structural health diagnosis, Structural Control and Health Monitoring, 24(1) (2017), pp. 1-15. [12] R.D.Finlayson, et al., Health monitoring of aerospace structures with acoustic emission and acousto-ultrasonics, Insight-Wigston Then Northampton, 43 (2001) pp. 155-158. [13] D.L.Carnì, et al., Damage analysis of concrete structures by means of acoustic emission technique, Composite Part B: Engineering, 115 (2017) pp. 79-86. [14] J.M.C.Ongpeng, et al., Monitoring damage using acoustic emission source location and computational geometry in reinforced concrete beams, Applied Sciences, 8, 2018, pp. 1-15. [15] F.Lamonaca, et al., “Multi-triggering and signal extraction for acoustic emissions monitoring”, Proc. of IEEE Metrology for Aerospace (MetroAeroSpace), 2014. [16] F.Lamonaca, P.F.Sciammarella, C.Scuro, D.L.Carnì, R.S.Olivito, ‘Synchronization of IoT layers for structural health monitoring’, Proc. of the IEEE International Workshop on Metrology for Industry 4.0 and IoT, Brescia, Italy, 2018. [17] R.Mahmoud et al., “Internet of things (IoT) security: current status, challenges and prospective measures”, Proc. of 10th International Conference for Internet Technology and Secured Transactions (ICITST), 14-16 Dec., London, UK, 2015, pp. 336- 341. [18] L.Atzori, et al., The internet of things: a survey, Computer Networks, 54(15) (2010) pp. 2787-2805. [19] W.J.Staszewski, B.C.Lee, L.Mallet, F.Scarpa, Structural health monitoring using scanning laser vibrometry: I. Lamb wave sensing, Smart Materials and Structures, 13(2) (2004) pp. 251-260. [20] C.Lazo, P.Gallardo, S.Céspedes, ‘A bridge structural health monitoring system supported by the internet of things’, Proc. of the IEEE Colombian Conference on Communications and Computing (COLCOM '15), May, 2015, Popayán, Colombia, pp. 1-6. Table 1. Packet delays with respect to multiple publishers and subscribers. #Publisher #Subscriber Max (ms) Min (ms)  (ms)  (ms) 1 1 14.72 0.01 0.09 0.79 1 3 13.35 0.01 0.6 0.42 3 3 13.14 0.01 0.39 2.11 5 10 23.98 0.01 3.62 4.03 10 5 22.01 0.01 5.12 4.27 10 10 21.02 0.01 7.14 6.55 ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 52 [21] G.Heo, J.Jeon, A smart monitoring system based on ubiquitous computing technique for infra-structural system: Centering on identification of dynamic characteristics of self-anchored suspension bridge, KSCE J. Civil Eng., 13(5) (2009) pp. 333-337. [22] E.La Malfa Ribolla, M.Rezaee Hajidehi, P.Rizzo, G.Fileccia Scimemi, A.Spada, G.Giambanco, Ultrasonic inspection for the detection of debonding in CFRP-reinforced concrete, Structure and Infrastructure Eng. J., 14(6) (2018) pp. 807-816. [23] H.Zhang, J.Guo, X.Xie, R.Bie, Y.Sun, ‘Environmental effect removal based structural health monitoring in the internet of things’, Proc. of the 7th International Conference on Innovative Mobile and Internet Services in Ubiquitous Computing (IMIS ’13), July, 2013, Taichung, Taiwan, pp. 512-517. [24] R.S.Olivito, R.Codispoti, C.Scuro, A seismic analysis for masonry constructions: The different schematization methods of masonry walls, AIP Conference Proceedings, 1906(1) (2017) p. 090007. [25] J.P.Lynch, et al., A summary review of wireless sensors and sensor networks for structural health monitoring, Shock and Vibration Digest, 38 (2006) pp. 91-130. [26] F.De Rango, et al., A low energy consumption smart antenna adaptive array system for mobile ad hoc networks, International Journal of Computing, 16 (2017) pp.124-132. [27] N.R.Jennings, et al., A roadmap of agent research and development, Autonomous Agents and
Multi-agent Systems (1998) pp. 7-38. 
 [28] A.Anastasopoulos, et al., Acoustic emission monitoring for detecting structural defects in vessels and offshore structures, Ships and Offshore Structures (2009) pp. 363-372. [29] M.V.M.S.Rao, et al., Analysis of b-value and improved b-value of acoustic emissions accompanying rock fracture, Current Science, 89 (2005) pp. 1577-1582. [30] B.Gutenberg, et al., Magnitude and energy of earthquakes, Science, 176 (1955), pp. 1-15. [31] F.Cicirelli, et al., Model checking mutual exclusion algorithms using Uppaal, Software Engineering Perspectives and Application in Intelligent Systems, Springer (2016) pp. 203-215. [32] C.Grosse, et al., Localization and classification of fracture types in concrete with quantitative acoustic emission measurement techniques, NDT & E Int., 30 (1997) pp. 223-230. [33] F.Cicirelli, et al., Model continuity in cyber-physical systems: A control-centered methodology based on agents, Simulation Modelling Practice and Theory, 83 (2017), pp. 93-107. [34] K.Tang, et al., ‘Design and implementation of push notification system based on the MQTT protocol’, Proc. of the International Conference on Information Science and Computer Applications, 2013, pp. 116-119. [35] L.De Vito, et al., ‘An IoT-enabled multi-sensor multi-user system for human motion measurements, In Proc. of Medical Measurements and Applications (MeMeA), 2017, pp. 210-215. [36] D.Thangavel, et al., ‘Performance evaluation of MQTT and CoAP via a common middleware,’ Proc. of Intelligent Sensors, Sensor Networks and Information Processing, 2014, pp. 1-6. [37] F.Leccese, et al., A smart city application: A fully controlled street lighting isle based on Raspberry-Pi card, a ZigBee sensor network and WiMAX, Sensors (Switzerland), 14 (2014) pp. 24408-24424. [38] D.L.Carnì, D.Grimaldi, G.Guglielmelli, F.Lamonaca, ‘Synchronization of measurement instruments co-operating into the W-DMS’, Proc. of IMTC 2007 – IEEE Instrumentation and Measurement Technology Conference, 1-3 May, 2007, Warsaw, Poland, pp.1-6. [39] Wireshark [Online] Available: https://www.wireshark.org [40] F.Lamonaca, D.Grimaldi, R.Morello, A.Nastro, ‘Sub-µs Synchronization accuracy in distributed measurement system by PDA and PC triggers realignement’, Proc. of I2MTC 2013, IEEE International Instrumentation and Measurement Technology Conference, 6-9 May, 2013, Minnesota, USA, pp. 801-806. [41] F.Lamonaca, D.L.Carnì, M.Riccio, D.Grimaldi, G.Andria, Preserving synchronization accuracy from the plug-in of nonsynchronized nodes in a wireless sensor network, IEEE Transactions on Instrumentation and Measurement, 66(5) 2017, pp.1058-1066. https://www.wireshark.org/