LoRaWAN and Blockchain based Safety and Health Monitoring System for Industry 4.0 Operators

The latest advances in the different Industry 4.0 technologies have enabled the automation and optimization of complex tasks of production processes thanks to their ability to monitor and track the state of physical elements like machinery, environmental sensors/actuators or industrial operators. This paper focuses on the latter and presents the design and evaluation of a system for monitoring industrial workers that provides a near real-time decentralized response system aimed at reacting and tracing events that affect operator personal safety and health. Such a monitoring system is based on the information collected from sensors encapsulated in IoT wearables that are used to measure both personal and environmental data. The communications architecture relies on LoRaWAN, an LPWAN (Low-Power Wide-Area Network) technology that offers good reliability in harsh communications environments and that provides relatively long distance communications with low-energy consumption. Specifically, each wearable sends the collected information (e.g., heart rate, altitude, external temperature, gas concentration, location) from the sensors to the nearest LoRaWAN gateway, which is transmitted to a pool of nodes where information is stored in a distributed manner. Such a decentralized system allows for providing information redundancy and guarantees its availability as long as there is an operative node. In addition, the proposed system is able to store and to process the collected data through smart contracts in a blockchain, which eliminate the need for a central backend and ensure the traceability and immutability of such data in order to share them with third parties (e.g., insurance companies or medical services).


Introduction
Global manufacturing is undergoing an unprecedented evolution of its daily processes. The Industry 4.0 paradigm has enabled the automation and optimization of industrial processes thanks to their ability to monitor, trace and connect all types of assets. Apart from physical elements, workforce is a key asset in an industrial environment, so it is important to propose human-centered approaches to ease human-machine interaction, to achieve seamless integration with the different physical elements (e.g., machinery or environmental sensors/actuators) and to trace in near real-time events that may affect the operator productivity, personal safety and health. This work has been performed within the context of a Joint Research Unit (JRU) between Navantia and the University of A Coruña (UDC). Since 2015, Navantia is adapting its shipyards to the principles of Industry 4.0, turning them into what has been called Shipyards 4.0. Specifically, there is a research line that focuses on auto-identification technologies for monitoring and tracking industrial elements, including the ones for creating the so-called Industry 4.0 operator or Operator 4.0. The proposed system is devoted to monitor operators' physical and physiological parameters in confined spaces to diminish occupational hazards. In the shipyard, a number of operators are subject to dangerous work under extreme environmental conditions that involve slips/falls, fatigue, a high degree of physical exertion or thermal stress; events that can end into fatal accidents if an adequate reaction is not available.
Kong et al. [1] define industrial wearable systems as a human empowering technology that fits the operators' needs while improving their human physical, sensing and cognitive capabilities. To meet such requirements, wearables still have to face challenges related to their security, scalability, energy-efficiency, ergonomics, interoperability and robustness [2][3][4]. Furthermore, operational requirements may differ significantly depending on their form factor (e.g., wristbands, chest straps, helmets, garments or even AR devices [5]). Most of recent wearable research is mainly focused on data collection, data processing and system feedback [3]. In addition, there are some articles focused on the communications architecture or on the study of mobile middlewares. For instance, a relevant example is proposed in [6], which describes a cloud-based mobile gateway operation system for industrial wearables to bridge multiple heterogeneous devices. Besides the previously mentioned literature, to the knowledge of the authors, this article is the first one that presents a decentralized communications architecture that includes a LoRaWAN and blockchain-based wearable development for monitoring Industry 4.0 operators. Figure 1 illustrates the proposed communications architecture, which is composed by the following components:

•
Wearables. The operator can carry multiple wearables that make use of different sensors to estimate physical and physiological parameters. In addition, the wearables embed batteries to power them and specific storage subsystems to store the collected data. Part of such data can be managed through a blockchain module in order to store them or their hash on the blockchain. The blockchain module may also carry out other blockchain operations, like consulting certain transaction data. Furthermore, each wearable embeds a wireless communications module (e.g., WiFi, Bluetooth) that is used to communicate with the LoRaWAN bridge. • LoRaWAN bridge. It exchanges data with the different wearables carried by the operator. Such data can then be transmitted through the LoRaWAN module to remote LoRaWAN gateways.

•
LoRaWAN gateways. They are scattered throughout the monitoring scenario and collect the information from remote wearables. Moreover, each gateway acts as an InterPlanetary File System (IPFS) node to provide decentralized storage, which stores the relevant data and synchronize them with the other existing IPFS peers with the objective of providing redundancy. • Blockchain. An Ethereum blockchain was chosen since the distributed ledger required by the proposed architecture has to be able to run smart contracts. The blockchain performance obtained is similar to our previous work [7]. Nevertheless, the overall decentralized system performance was improved by omitting the use of a database such as OrbitDB in the implemented architecture.
• Cloud services. The information collected from the wearables can be gathered and processed by remote cloud services that may trigger notifications or certain actions, as well as provide a web interface for remote users. • Remote supervisors. Different stakeholders (e.g., doctors, insurance personnel, managers) can access the information stored by the cloud services or on the blockchain in order to monitor, validate and keep track of potential safety and health issues (e.g., occupational hazards insurance).

Experiments
Three experiments were carried out in order to measure the time required for sending data from the BLE-based wearable to the LoRaWAN bridge, the time required for sending LoRaWAN packets from the bridge to the gateway, and the response time of IPFS when exchanging pubsub messages among different nodes and diverse topics.

BLE to LoRaWAN Bridge Communications Delay
For this experiment, the BLE wearable and the LoRaWAN bridge were placed at 0.5 m, which is roughly the distance they would be when integrated in the operator's equipment. Then, BLE packets were sent every 5 s from the wearable to the bridge, and the transmission delay was measured. As it can be observed in Figure 2, such a delay is really stable and less than 1.5 s, which is appropriate, considering the short transmission distance and the lack of relevant obstacles in the communication.

LoRaWAN Bridge to Gateway Communications Delay
For this experiment, the impact on the communications delay was measured in two different scenarios: one considered to be 'noisy', where the signal strength is weak and the link quality poor, and an environment that can be considered a reliable connection. Figure 3 shows the LoRaWAN Time of Arrival (ToA) and the Received Signal Strength Indicator (RSSI) for such environments. By observing the ToA and the RSSI, it can be concluded that in the noisy environment, it takes longer to stabilize the bandwidth and the spreading (the ToA is not stable until packet #19), while the RSSI is really poor (between −100 and −112 dBm). In contrast, in the non-noisy scenario RSSI is usually good (between −55 and −95 dBm) and only one packet is necessary to stabilize the ToA, approximately around 51.5 ms.

IPFS Pubsub Performance
In order to evaluate the IPFS node performance, the response time of the communications mechanism provided by the pubsub protocol was measured. For such a purpose, the latency was measured between message publications to a specific topic and when receiving such messages. Each IPFS node published messages sequentially to several topics and was also subscribed to all of them. In addition, for carrying out a fair comparison, the tests were performed for the three different IPFS nodes.
As an example, Figure 4 shows the reception time for the three boards when publishing messages to the same topic at the same time. As it can be observed, the Orange Pi Lite 2 and the One Plus obtain fairly similar delays, although the former gets less stable results due to the use of its WiFi interface (the One Plus has an Ethernet interface). The Orange Pi Zero obtains the largest delays mainly due to its hardware constraints.
All nodes published 2000 IPFS messages sequentially and no messages were lost. When comparing the obtained results with those for a IPFS-based database like OrbitDB [7], it can be stated that the delays and memory consumption are clearly lower for the system proposed in this paper. Such an assessment indicates that IPFS pubsub is a good alternative for nodes with limited performance and that do not require a persistent storage scheme like the one provided by a database.

Conclusions
This paper presented the design, implementation and initial evaluation of a decentralized IoT LPWAN solution for health monitoring in industrial environments. The system is capable of collecting data from the sensors integrated in a wearable that monitor the operator's health and safety. The collected data are transmitted through LoRaWAN, and the proposed system is serverless, providing decentralized storage. In addition, the system offers a completely transparent and trustworthy data source through a blockchain, so the data collected can be accessed both locally and remotely.
In order to estimate the system's response time and the performance of the decentralized system, several experiments were performed, which showed that both BLE and LoRaWAN communication delays are low enough to provide remote operator health and safety applications.