**Design and Experimental Validation of a LoRaWAN Fog Computing Based Architecture for IoT Enabled Smart Campus Applications †**

**Paula Fraga-Lamas 1,\*, Mikel Celaya-Echarri 2, Peio Lopez-Iturri 3,4, Luis Castedo 1, Leyre Azpilicueta 2, Erik Aguirre 3, Manuel Suárez-Albela 1, Francisco Falcone 3,4 and Tiago M. Fernández-Caramés 1,\***


Received: 28 June 2019; Accepted: 23 July 2019; Published: 26 July 2019

**Abstract:** A smart campus is an intelligent infrastructure where smart sensors and actuators collaborate to collect information and interact with the machines, tools, and users of a university campus. As in a smart city, a smart campus represents a challenging scenario for Internet of Things (IoT) networks, especially in terms of cost, coverage, availability, latency, power consumption, and scalability. The technologies employed so far to cope with such a scenario are not yet able to manage simultaneously all the previously mentioned demanding requirements. Nevertheless, recent paradigms such as fog computing, which extends cloud computing to the edge of a network, make possible low-latency and location-aware IoT applications. Moreover, technologies such as Low-Power Wide-Area Networks (LPWANs) have emerged as a promising solution to provide low-cost and low-power consumption connectivity to nodes spread throughout a wide area. Specifically, the Long-Range Wide-Area Network (LoRaWAN) standard is one of the most recent developments, receiving attention both from industry and academia. In this article, the use of a LoRaWAN fog computing-based architecture is proposed for providing connectivity to IoT nodes deployed in a campus of the University of A Coruña (UDC), Spain. To validate the proposed system, the smart campus has been recreated realistically through an in-house developed 3D Ray-Launching radio-planning simulator that is able to take into consideration even small details, such as traffic lights, vehicles, people, buildings, urban furniture, or vegetation. The developed tool can provide accurate radio propagation estimations within the smart campus scenario in terms of coverage, capacity, and energy efficiency of the network. The results obtained with the planning simulator can then be compared with empirical measurements to assess the operating conditions and the system accuracy. Specifically, this article presents experiments that show the accurate results obtained by the planning simulator in the largest scenario ever built for it (a campus that covers an area of 26,000 m2), which are corroborated with empirical measurements. Then, how the tool can be used to design the deployment of LoRaWAN infrastructure for three smart campus outdoor applications is explained: a mobility pattern detection system, a smart irrigation solution, and a smart traffic-monitoring deployment. Consequently, the presented results provide guidelines to smart campus designers and developers,

and for easing LoRaWAN network deployment and research in other smart campuses and large environments such as smart cities.

**Keywords:** IoT; smart campus; sustainability; fog computing; outdoor applications; LPWAN; LoRaWAN; 3D Ray-Launching; smart cities; Wireless Sensor Networks (WSN)

### **1. Introduction**

A smart campus is an infrastructure similar to a smart city that makes use of Internet of Things (IoT) solutions [1–6] to connect, monitor, control, optimize, and automate the systems of a university. Today, a smart campus represents a challenging scenario for IoT networks, especially in terms cost, coverage, availability, latency, security, power consumption, and scalability.

The area covered by a campus varies substantially depending on the university, its location, the financial endowment, and the year of founding. For example, Berry College (Floyd County, Georgia, United States), is often considered the largest contiguous rural campus in the world: it covers 27,000 acres (109.26 km2) [7] of land. Other examples are the suburban/urban campuses of Duke University (Durham, NC, USA), which are deployed on 9350 acres (37.83 km2) [8], and the campus of Stanford University (Stanford, CA, USA), which covers 8180 acres (33 km2) [9]. Regardless of their initial surface area, it is common that campuses grow considerably as time goes by [10], hence institutions usually devise long-term sustainability plans to envision their growth in the future [11–13].

When a campus provides smart IoT services, it is necessary to provide communications connectivity to IoT nodes and gateways. Such a connectivity can be provided in a quite straightforward way indoors thanks to the use of popular technologies such as Wi-Fi, but, outdoors, technology selection becomes more complex, since it is not only necessary to provide good coverage and a cost-effective deployment, but also to decrease the communications energy consumption to maximize IoT node battery life.

To tackle such an issue in wide areas, a set of technologies grouped under the term Low-Power Wide Area Network (LPWAN) seem to be a good selection, since, in comparison to other previous technologies, they provide a wider area communications range and reduced energy consumption. In fact, LPWAN technologies have emerged as an enabling technology for IoT and Machine-to-Machine (M2M) communications [14] mainly due to their capabilities related to range, cost, power consumption, and capacity. Examples of such technologies are NB-IoT [15], SigFox [16], Ingenu [17], Weightless [18] or LoRaWAN [19] (a detailed comparison of these and other LPWAN technologies is given later in Section 2.2).

In the case of LoRaWAN, it is gaining momentum from both industry and academia [20–22]. LoRaWAN defines a communications protocol and a system architecture for the network. In addition, it uses LoRa for its physical layer [23], which is able to create long-range communications links and makes use of a Chirp Spread Spectrum (CSS) modulation that conserves the power features of Frequency Shifting Keying (FSK) while increasing its communications range. All these features make LoRaWAN a good candidate for providing wireless communications to outdoor IoT nodes in a smart campus.

Traditionally, gateways connect the IoT nodes with the cloud and among them. The cloud is basically one or more servers with large computational power, communication, and storing capabilities that receives, processes, and analyzes the data collected from the IoT nodes by performing computational-intensive tasks. Although cloud-based solutions are appropriate at a small scale, when the number of IoT nodes grows significantly and, consequently, the network traffic they generate, congestion may lead to increasing latency responses and slower data processing. Among the different alternatives to confront this challenge and to guarantee a flexible, scalable, robust, secure, and energy-efficient deployment of IoT networks, the design and implementation of a fog computing

architecture was chosen. Fog computing supports physically distributed, low-latency (e.g., real-time or quasi real-time responses) and location-aware applications that decrease the network traffic and the computational load of traditional cloud computing systems by processing in the IoT nodes most of the data generated by their sensors and actuators and unburdening the higher layers from data processing [24].

Furthermore, when designing a smart campus, it is necessary to plan how LoRaWAN gateways and nodes are deployed to guarantee good IoT node coverage while minimizing the number of gateways (i.e., minimizing the smart campus communications infrastructure cost). The problem is that there are only a few examples of academic and commercial tools that create such a planning [25,26], so developers have to adapt tools previously optimized for other technologies (e.g., Wi-Fi [27]) or have to carry out tedious empirical measurements throughout the campus [28,29].

This article confronts the mentioned challenges by designing and implementing a cost-efficient, scalable, and low-power consumption LoRaWAN fog computing-based architecture for wide areas. Specifically, the system was designed with the aim of developing novel latency-sensitive IoT outdoor applications that create more sustainable and intelligent campuses. The following are the main contributions of the article, which as of writing, have not been found together in the literature:


The rest of this article is structured as follows. Section 2 reviews the state of the art on smart campuses: their characteristics, technologies, architectures, previous relevant deployments, potential applications, and the previous work on modeling and planning a smart campus. Section 3 details the architecture of the proposed system and the characteristics of the LoRaWAN testbed implementation. Section 4 describes the proposed planning simulator and the analyzed scenario. Section 5 is dedicated to the experiments. Finally, Section 6 presents the main discussion on the lessons learned from these experiences, while Section 7 is devoted to the conclusions.
