A field-measurements-based LoRa network planning tool ACTA IMEKO ISSN: 2221-870X December 2020, Volume 9, Number 4, 21 - 29 ACTA IMEKO | www.imeko.org December 2020 | Volume 9 | Number 4 | 21 A field-measurements-based LoRa network planning tool Susanna Spinsante1, Luca Gioacchini2, Lorenzo Scalise3 1 Dipartimento di Ingegneria dell’Informazione, Università Politecnica delle Marche, Via Brecce Bianche 12, 60131 Ancona, Italy 2 Dipartimento di Elettronica e Telecomunicazioni, Politecnico di Torino, 10129 Torino, Italy 3 Dipartimento di Ingegneria Industriale e Scienze Matematiche, Università Politecnica delle Marche, Via Brecce Bianche 12, 60131 Ancona, Italy Section: RESEARCH PAPER Keywords: LoRa; network planning; path loss; LoRaSim tool Citation: Susanna Spinsante, Luca Gioacchini, Lorenzo Scalise, A field-measurements-based LoRa network planning tool, Acta IMEKO, vol. 9, no. 4, article 4, December 2020, identifier: IMEKO-ACTA-09 (2020)-04-04 Section Editor: Leopoldo Angrisani, University of Naples Federico II, Italy Received: October 15, 2019; In final form: February 3, 2020; Published: December 2020 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. Funding: S. Spinsante acknowledges support by the Italian National Technology Cluster project SHELL (Shared interoperable home ecosystems for a green, comfortable and safe living), project code: CTN01 00128 111357. Corresponding author: Susanna Spinsante, e-mail: s.spinsante@staff.univpm.it 1. INTRODUCTION Industry 4.0 encompasses several key technological components and substantiates in the so-called smart factory, where computer-driven systems monitor physical processes, create a virtual copy of the physical world and make decentralised decisions based on self-organisation mechanisms. The Internet of Things (IoT) is considered an essential element of Industry 4.0, providing the connection among the different sub-systems and enabling both human-to-machine and machine-to-machine communications. As such, large-scale IoT deployments are expected to become widespread, not only within smart industrial plants, but also in similar scenarios, such as multi-site production districts [1], smart construction sites and even mines [2]. Among the communication technologies enabling IoT, low power wide area networks (LPWANs) have been established as a good trade-off between performance and deployment costs [3]. In fact, widely distributed sensor networks relying on 3G/4G cellular infrastructures benefit from reserved frequencies (thus being free from interferences), network-based synchronisation and a pervasive and reliable connectivity; however, they are associated with prohibitively high costs in the case of dense networks. Meanwhile, LPWANs, such as the long range network (LoRa) [4], provide license-free long-range communication (possibly prone to interferences) with low power demands (essential for IoT sensors), but may require a dense deployment of gateways (GWs) to ensure adequate data transfer performance and to minimise the data losses. Numerous examples of IoT applications relying on LoRa transmission technology can be found in the recent literature. Addabbo et al. [5], [6] present a low-power IoT architecture for the monitoring of chemical emissions, employed to set up monitoring infrastructures in industrial plants or public buildings. Within the context of smart ABSTRACT Long range (LoRa) transmission technology enables energy-constrained devices such as the tiny sensor systems used in internet-of- things applications that are distributed over wide areas while still being able to establish appropriate connectivity. This has resulted in the development of an exponentially increasing number of different solutions and services based on LoRa, be they dedicated to the long-term monitoring of distributed plants and infrastructures or to human-centred applications such as safety-oriented sensor systems for use in the workplace. In dense LoRa networks, predicting the number of supported nodes in relation to their position and the propagation environment is essential for ensuring reliable and stable communication and minimising costs. In this paper, after comparing different path loss models based on a field measurement campaign for LoRa received signal strength indicator values within a university campus, two main modifications of the LoRa simulator tool were implemented. These were aimed at improving the accuracy of the prediction of the number of sustainable nodes in relation to the target data extraction rate set. The simulations based on field measurements demonstrated that through an improved path loss evaluation and the use of three gateways, the number of nodes could be increased theoretically from around 100 to around 6,000. mailto:s.spinsante@staff.univpm.it ACTA IMEKO | www.imeko.org December 2020 | Volume 9 | Number 4 | 22 cities, the use of LoRa provides the advantage of allowing for the deployment of a large quantity of sensor nodes while keeping the structure of the acquisition network relatively simple and flexible. A LoRa-based smart bin architecture for waste management within the smart city context is presented in [7], where an ultrasonic sensor is used to check the trash level inside the bin. Using a single-channel LoRa network, the authors demonstrated how a system composed of five sensor nodes was deployed in the historical centre of the city of Florence, Italy. Another example, where the problem of covering long distances among LoRa nodes and GWs in sensor networks deployed to monitor gas pipelines was addressed, was recently presented in [8]. Here, in order to overcome the limitations of transmission coverage, the authors suggest a multi-hop linear topology supported by an appropriately adapted synchronisation protocol. Other examples of distributed plants and systems monitored by means of a LoRa- based solution are provided in [9] and [10]. At the same time, LoRa has been adopted to support sensor network solutions aimed at human monitoring, as presented in [11], where a wearable system for noise assessment in the workplace is proposed, which makes it possible to notify a subject of a potentially dangerous exposure to high noise levels for a prolonged period of time. In [12], the capability of low-cost LoRa transceivers to schedule the transmission of frames with a standard uncertainty of less than 3 μs and an acceptable long- term clock stability for applications such as industry processing was demonstrated. LoRa is also being used and evaluated in terms of mobility conditions, as presented in [13]. LoRa is based on the chirp spread spectrum modulation technique, with sinusoidal signals with a frequency that changes over the transmission time (chirp signals). This provides inherent robustness to interference, allowing the coexistence of several active nodes within the same frequency channel, with the communication robust even in the presence of high noise levels [14]. When the sensor network to be deployed needs to include a huge number of tiny devices, as could be the case in industrial or construction process monitoring, the possibility of accurately predicting the attainable data extraction rate (DER) prior to setting up the real network can be critical. The DER is the key criterion used to evaluate the scalability of a network and is defined as the ratio of received messages to transmitted messages over a given period of time. The DER depends on the position, number and behaviour of the nodes and sinks, and takes values of between 0 and 1, where, in a perfect deployment, DER = 1. Once estimated, the predicted DER value can be checked against the specific requirements, and, if the check fails, the network design can be modified (e.g. by adopting a specific topology, as in [15]) before carrying out the final deployment, thus avoiding additional costs and delays associated with repeated test installations and failures. In this paper, with reference to [16] and the LoRaSim simulation tool presented therein, we implement various modifications based on real measurements, with the aim of improving the capability of the tool to predict the scalability performance of LoRa networks. Such modifications will enable a more realistic modelling of the propagation losses and the positioning of the nodes, as well as a more accurate determination of the number of nodes that allow acceptably reliable and stable communications and the network configuration that best adapts to different propagation scenarios. The remainder of the paper is organised as follows. In Section 2, the original LoRaSim tool and the applied changes are briefly introduced before Section 3 describes the experimental tests performed and the results obtained, both by comparing the theoretical models to the field measurements and implementing different path loss models within the LoRaSim tool. Finally, Section 4 concludes the paper. 2. THE LORA SIMULATOR AND APPLIED MODIFICATIONS LoRaSim, a discrete-event simulator based on SimPy, was implemented according to the technical specification of the SX1272 LoRa module provided by Semtech [18]. The software operations also apply to later modules, such as the recent SX1276 that features additional frequency bands of operation (169 MHz and 433 MHz, in addition to the 850 MHz–1 GHz already supported by the SX1272), more options for the programmable bandwidth, and a better receiver sensitivity (down to −148 dBm vs. −137 dBm of the SX1272 module). The software tool can be used to model the communications between randomly placed nodes and GWs, the number of which can be selected by the user. One of the tool's main features is the possibility of choosing different configurations for the LoRa module through a combination of settings, such as transmission power (TP), carrier frequency (CF), spreading factor (SF), bandwidth (BW) and coding rate (CR). For each data transmission occurring over a node-to-GW link, the LoRaSim estimates the path loss using an embedded model and simulates collisions among the data packets in terms of signal power (through the so-called ‘capture effect’), carrier frequency, spreading factor and received power. In order to obtain a more realistic evaluation of network scalability, first, we implemented additional path loss models to allow LoRaSim to adapt to different environmental scenarios. Then, a function enabling the insertion of nodes and GW positions from a file was added to analyse the DER performance changes in relation to the default random node positioning assumption. 2.1. Path loss models A path loss model is an equation describing the decrease in signal power density due to its propagation in different environments. We focused on three main models, which reasonably apply to the scenarios noted in Section 1 and are valid in the frequency range used by LoRa. 1) Log-Distance model. According to [16], the log-distance path loss model refers to built-up and densely populated areas, expressing the signal attenuation as a function of the distance 𝑑 between node and GW (given in km): 𝑃𝑙(𝑑) = 𝑃�̅�(𝑑0) + 10 𝛾 log ( 𝑑 𝑑0 ) + 𝑋𝜎 , (1) where 𝑃𝑙(𝑑) is the path loss in dB, 𝑃�̅�(𝑑0) is the mean path loss at the reference distance 𝑑0, 𝛾 is the path loss exponent and 𝑋𝜎 ≅ 𝒩(0, 𝜎 2) is the normal distribution with zero mean and 𝜎 2 variance, to account for any shadowing. 2) Okumura–Hata model. The main enhancement introduced by the Okumura–Hata model [11] is the dependence of the path loss on the carrier frequency that characterises the transmission and on the terminal (node and GW) height. As such, we can model a wider range of node distribution in more detail while accounting for the height of the antennas in four different scenarios: ACTA IMEKO | www.imeko.org December 2020 | Volume 9 | Number 4 | 23 𝑃𝑙(𝑑) = 𝐴 + 𝐵 log(𝑑) + 𝐶 , (2) where A, B and C are frequency- and antenna-height-dependent terms. Factor A increases according to carrier frequency and decreases with an increase in GW and node height. In addition, the path loss exponent (proportional to B) decreases with an increase in GW height: 𝐴 = 69.55 + 26.16 log(𝑓𝑐 ) − 13.82 log(ℎ𝑏 ) − 𝑎(ℎ𝑚 ) (3) and 𝐵 = 44.9 − 13.82 log (ℎ𝑏 ) (4) where 𝑓𝑐 is the carrier frequency in MHz, 𝑑 is the distance between node and GW (in km), and ℎ𝑏 and ℎ𝑚 are the GW and node height (in m), respectively. The model is only intended for large areas, with the GW placed higher than the surrounding rooftops. The values assigned to the different terms were obtained by interpolating the results of extensive measurement campaigns carried out in propagation scenarios corresponding to the model requirements (see [19], Appendix 7.A). Different expressions of the term 𝐶 and the 𝑎(ℎ𝑚 ) function refer to four different scenarios or propagation environments: • Small and medium size cities: 𝑎(ℎ𝑚 ) = (1.1 log(𝑓𝑐 ) − 0.7)ℎ𝑚 − 1.56 log(𝑓𝑐 ) − 0.8) 𝐶 = 0. (5) • Metropolitan areas: 𝑎(ℎ𝑚 ) = { 8.29(log(1.54 ℎ𝑚 )) 2 − 1.1 𝑓𝑜𝑟 𝑓𝑐 ≤ 200 MHz 3.2(log(11.75 ℎ𝑚 )) 2 − 4.97 𝑓𝑜𝑟 𝑓𝑐 ≥ 400 MHz 𝐶 = 0. (6) • Suburban environments: 𝐶 = −2 [log ( 𝑓𝑐 28 )] 2 − 5.4. (7) • Rural areas: 𝐶 = −4.78[log(𝑓𝑐 )] 2 + 18.33log (𝑓𝑐 ) − 40.98. (8) The function 𝑎(ℎ𝑚 ) in suburban and rural areas is the same as with urban (small and medium-sized cities) areas. 3) 3GPP. Both 3GPP and 3GPP2 [20] developed a path loss model to evaluate the performance of cellular systems. Here, again, the equation considers the carrier frequency and the antenna height: 𝑃𝑙 = (44.9 − 6.55 log(ℎ𝑏 )) log(𝑑) + 45.5 + (35.46 − 1.1 ℎ𝑚 ) log(𝑓𝑐 ) − 13.82 log(ℎ𝑚 ) + 0.7 ℎ𝑚 + 𝐶 , (9) where ℎ𝑏 and ℎ𝑚 are the base station (GW) and mobile station (node) antennas’ height, respectively. Unlike in the two previous models, the distance 𝑑 is expressed in metres. According to the value of the constant term 𝐶, a suburban macrocell system (𝐶 = 0 dB) or an urban macrocell system (𝐶 = 3 dB) is assumed. These models were implemented in LoRaSim, starting with the log-distance model, as the following coding shows: #Log-Distance Model Pl = Pld0+10*gamma*math.log10(distance/d0) The variables used in the code have the same meaning as those in equation (1). The distance variable represents the distance between the GW and each node; considering that models 2) and 3) include the antenna height, transforming the 2D spatial representation of the log-distance model into a 3D representation, we changed the variable definition by applying the Pythagorean theorem. The following coding was used to implement the Okumura– Hata and 3GPP models, respectively. The user can select them through a simple if…elif control, which was omitted here for convenience. #Okumura–Hata Model #small and medium-size cities ahm=(1.1*(math.log10(self.freq)-math.log10(10**6))+ -0.7)*hm-(1.56*(math.log10(self.freq)+ -math.log10(10**6))-0.8) C = 0 #metropolitan areas if (self.freq <= 2*10**8): ahm = 8.29*((math.log10(1.54*hm))**2)-1.1 elif (self.freq >= 4*10**8): ahm = 3.2*((math.log10(11.75*hm))**2)-4.97 C = 0 #suburban environments ahm=(1.1*(math.log10(self.freq)-math.log10(10**6))+ -0.7)*hm-(1.56*(math.log10(self.freq)+ -math.log10(10**6))-0.8) C = -2*((math.log10(self.freq)+ -math.log10(2.8*10**7))**2) - 5.4 #rural area Figure 1. The LoRa node used in the experiments, which was based on an Arduino board equipped with a GPS receiver and a LoRa feather. Figure 2. The 37 planned LoRa RSSI measurement positions along eight different directions within the university campus. ACTA IMEKO | www.imeko.org December 2020 | Volume 9 | Number 4 | 24 ahm=(1.1*(math.log10(self.freq)-math.log10(10**6))+ -0.7)*hm-(1.56*(math.log10(self.freq)+ -math.log10(10**6))-0.8) C=-4.78*((math.log10(self.freq)+ -math.log10(10*6))**2)+ +18.33*(math.log10(self.freq)+ -math.log10(10*6))-40.98 A = 69.55+26.16*(math.log10(self.freq)+ -math.log10(10**6))-13.82*math.log(hb)-ahm B = 44.9-6.55*math.log10(hb) #3GPP Model #suburban Macro C = 0 #urban Macro C = 3 where self.freq is the carrier frequency, and hb and hm are the base station (GW) and node height, respectively. All the equations are the same as in Section 2.1. The result of the path loss computation was passed to the Pl variable by the following line of code for the Okumura–Hata model, Pl=A+B*(math.log10(distance)-math.log10(1000))+C, and by the following for the 3GPP model: Pl = (44.9- 6.55*math.log10(hb))*math.log10(distance/1000)+45.5 +(35.46-1.1*hm)*(math.log10(self.freq)+ -math.log10(10**6))-13.82*math.log10(hm)+0.7*hm+C 2.2. Node placement The second relevant change applied to the LoRaSim tool allows for specifying the placement of the nodes. In fact, the original tool only allows for a random distribution of the nodes, according to which the GW is positioned at the centre of a circular area, with the nodes randomly placed inside it based on a simplified Poisson point process (PPP) [17]. We modified the simulator to feed it with the positions of the ‘hot spots’ recorded as GPS coordinates in a file. Then, in order to account for any possible misplacement of the LoRa nodes around these hot spots (e.g. due to physical obstacles or constraints encountered during the installation), each hot spot was assumed to be the centre of a circular area in which an evenly distributed number of nodes was randomly placed, with a minimum distance between the nodes of 10 m, while their height was between 1 m and 2 m. 3. EXPERIMENTAL RESULTS 3.1. Measurement campaign Before adding the different path loss models into the LoRaSim software tool, an extensive measurement campaign aimed at evaluating the validity of the models was carried out within our university campus. LoRa received signal strength indicator (RSSI) measurement values (in dBm) were collected over one-hour intervals at each position and were subsequently GPS-referenced using a transmission module (LoRa node) based on the Adafruit Feather M0 with a RFM95 LoRa Radio (900 MHz) equipped with a GPS receiver (ITEAD RoyalTek REB- 4216/REB-5216 GPS Shield Breakout Board for Arduino MEGA) and connected to a laptop, as shown in Figure 1. The RSSI parameter (i.e. the measured received signal strength indicator) represents a measure of the signal power on a radio link. The link can be affected by several channel conditions causing variation at the RSSI level, such as the distance between the nodes, the radio transmission medium (e.g. air, water), physical obstacles, the geometrical orientation of the nodes and interference from other radio transmission equipment and reflected radio waves. The RSSI is related to the path loss Pl in terms of the following equation: 𝑃𝑙(𝑑) = |𝑅𝑆𝑆𝐼| + 𝑆𝑁𝑅 + 𝑃TX + 𝐺RX [dB], (10) where SNR is signal-to-noise ratio, 𝑃TX is the effective isotropic radiated power, and 𝐺RX is the receiver’s antenna gain. Both the RSSI and the SNR are measured by the receiving module, while the 𝑃TX is known, and the 𝐺RX is 5 dBi for the specific antenna installed in the GW. Table 1. Average RSSI value and variance measured at each position within the university campus, over a one-hour data collection session. Position Avg RSSI (dBm) σ2 (dBm2) 1 −99.7 4.0 2 −94.7 3.6 3 −92.0 14.5 4 −95.6 6.0 5 −105.9 23.6 6 −107.3 19.2 7 −98.4 8.5 8 −109.1 12.6 9 −94.7 8.5 10 −88.5 2.9 11 −90.0 5.0 12 −100.9 18.4 13 −87.0 4.5 14 −110.6 12.3 15 −93.5 9.8 16 −86.8 4.4 17 −88.9 70.3 18 −101.7 13.4 19 −89.3 12.0 20 −99.5 14.1 21 −105.5 4.4 22 −106.4 7.7 23 −83.1 6.9 24 −84.0 2.4 25 −97.2 5.3 26 −97.7 7.1 27 −92.7 6.6 28 −84.8 3.5 29 −86.5 3.4 30 −101.5 62.5 31 −99.5 30.0 32 −103.0 13.9 33 −81.2 3.6 34 −105.5 5.1 35 −108.0 18.9 36 −90.4 10.8 37 −91.4 4.6 ACTA IMEKO | www.imeko.org December 2020 | Volume 9 | Number 4 | 25 The multi-channel LoRa GW located on top of the campus tower was implemented using a Raspberry Pi and an iC880A board, which integrates two Semtech SX1257 transceivers and an SX1301 baseband processor, thus allowing for simultaneously receiving up to eight LoRa packets transmitted with different SF values and on different channels. The single GW was positioned on top of the highest tower within the campus (200 m a.s.l.), with the 37 different outdoor measurement positions planned, as shown in Figure 2, moving along eight different directions at a distance of 25 m, 50 m, 75 m, 100 m, and 125 m from the tower where the GW was positioned, along each direction. This system collected more than 7,000 measures in total. For practical reasons, the measurements were collected during several days of good weather conditions (i.e. almost clear sky, no rain or fog). The measurement positions identified in this preliminary step, as based on the observation of the university campus plan, were adhered to as far as possible during the measurement campaign. When the identified measurement position was indoors, the nearest possible outdoor position was chosen to collect the RSSI measurement values since we were only interested in checking the signal power distribution in outdoor conditions and referencing each measurement via GPS coordinates. Table 1 lists the average RSSI values measured at each of the 37 real positions selected within the campus, together with their corresponding variance. Figure 34 shows the distribution of the RSSI values measured at each real position in graphical terms, encoded by coloured dot clouds of different gradations and associated with their GPS coordinates. It should be noted that while the LoRa node remained fixed at each position during the one-hour measurement collection period, the resulting GPS coordinates provided by the on-board receiver fluctuated slightly due to the GPS module’s horizontal position accuracy of 2.5 m [21], [22]. The positions located in the line-of-sight (LoS) to the GW returned the highest RSSI values (violet to red dots, from −97.4 dBm to −74 dBm) even when at a longer distance. Conversely, the positions that were located near the GW but were obstructed by buildings (yellow to light green dots, from −121 dBm to −97.5 dBm) exhibited the lowest RSSI values. This was further confirmed by the box plots presented in Figure 4, where the measured RSSI values were grouped based on the distance from the GW, irrespective of the direction along which the measurement position was located. It is clear that the median RSSI (horizontal red line inside each box) did not always decrease with an increase in distance, which was due to the propagation effects resulting from the buildings and other surrounding obstacles. As noted above, in this study, the RSSI measurement values were collected during several days of good weather conditions and it is important to note that bad weather conditions, specifically rain, could increase the LoRa packet loss rate due to the stronger attenuation of the transmitted signal, as presented in [23], where the authors reported that light rain led to an additional 20 % reduction in the packet delivery ratio. The impact of the weather factor should be taken into account in applications that require high reliability at any given time, and higher-layer protocols should be used to overcome the effects by automatically adjusting the LoRa configuration parameters. Data related to the number of packets lost during transmission was also collected through setting the number of transmitted packets at each measurement position and then checking the number of packets received at the backend server via the GW. In fact, each LoRa packet carries several data fields, among which, the frame counter field allows for assigning a counter to each packet, which is incremented sequentially by the transmitter [4]. Once the transmission from a specific measurement site was finished, the sequence of received packets at the server was checked to obtain the number of lost packets. Figure 5 shows the resulting packet loss percentage at each measurement direction. Here, direction no. 1 is the south-west direction in relation to the GW in Figure 2, while direction no. 8 is the north-west direction shown in the same image, as identified in a clockwise fashion. Figure 3. Heat map showing the GPS-referenced LoRa RSSI measurements in the selected real field positions. Figure 4. Distribution of LoRa RSSI measurements at different distances from the GW. Figure 5. Percentage of packet loss values along the eight different directions (see Figure 2) considered during the LoRa field measurements at the university campus. 0% 2% 4% 6% 8% 10% 12% 14% 1 2 3 4 5 6 7 8 % p a ck e t lo ss measurement direction ACTA IMEKO | www.imeko.org December 2020 | Volume 9 | Number 4 | 26 As the graph shows, the percentage of lost packets was, on average, under a 7 % threshold, with the exception of direction no. 6, where the highest packet loss occurred (around 12 %). Given that the measurements at the 37 different positions were carried out in a randomised manner, we can assume that, during a single week, the highest loss value along direction no. 6 was motivated by the propagation environment and not by occasional or sporadic conditions. 3.2. Comparison of the path loss models in relation to the field measurements Before implementing a modified version of the LoRaSim tool to improve the network planning performance, the results of the RSSI field measurements were processed in order to check which theoretical model among those presented in Section 2.1 can be considered as more reliably describing the LoRa signal propagation behaviour. To this end, the average RSSI values at each position reported in Table 1 were considered in relation to the corresponding distance 𝑑 between the measurement position and the GW while assuming a fixed LoRa node height of 1 m. Two different polynomials were used to interpolate the available values, a third- degree polynomial and a sixth-degree polynomial, as described by the following equations: 𝑅𝑆𝑆𝐼3(𝑑) = −5.49 ∙ 10 −63𝑑3 + 2.94 ∙ 10−32𝑑2 − 0.50𝑑 + −70.75 [dBm], (11) and 𝑅𝑆𝑆𝐼6(𝑑) = 3.69 ∙ 10 −12𝑑6 + 5.99 ∙ 10−11𝑑5 − 1.38 ∙ 10−6𝑑4 + 5.13 ∙ 10−4𝑑3 − 7.32 ∙ 10−2𝑑2 + 4.25𝑑 − 171 [dBm]. (12) Both the models are shown in Figure 6 together with the measured average RSSI values. Equation (11) allows for correctly describing 14.6 % of the measured data, while the sixth-degree model given by equation (12) allows for correctly describing 23 % of the measured data. Following the generation of the interpolation models based on the measured RSSI values, they were compared to the theoretical models previously introduced, as shown in Figure 7. As Figure 7 shows, the log-distance model generally overestimated the path loss, providing the lowest estimated RSSI values in relation to the measured values. The sixth-order polynomial model was not applicable for distances shorter than 35 m, while the third-degree polynomial model appeared to better represent the measured RSSI trend. Both of the 3GPP path loss models provided acceptable results, with a reasonable underestimation of the RSSI. Finally, all the Okumura–Hata models overestimated the RSSI, with an average excess of 60 dB in relation to the measured values. Based on the experimental RSSI measurements, the 3GPP path loss models (urban and suburban) provided the best approximation for predicting the propagation behaviour of the LoRa signals within the campus. However, to ensure completeness, all the theoretical models were implemented within the LoRaSim tool and were used to predict the performance of the network. 3.3. Simulations with the modified LoRaSim tool The LoRaSim tool considers N LoRa end-nodes and M GWs, each of which feature specific configurations of TP, CF, SF, BW and CR parameters. Together with the average rate of transmitted packets (λ) and the packet load (B), these parameters identify a network setting of SN = {TP, CF, SF, BW, CR, λ, B}. Following the modifications to the LoRaSim tool, an initial simulation campaign was conducted aimed at evaluating how the network DER was affected by the selection of the path loss model. For a better comparison with the previous studies, we used the same settings as chosen in [16]. Here, assuming that N = 1,000, each LoRa node is able to send a packet of 20 bytes every 16.7 minutes to a single GW (M = 1), with the simulated transmission time = one hour. The signal carrier frequency was 860 MHz. A total of 100 simulation runs were executed for each path loss model. Path losses and collisions determine the communication behaviour of LoRa nodes. In LoRaSim, the so-called simple model (S.M.) variant assumes an infinite communication range and the collisions occurring whenever any two transmissions overlap in time at the receiver with the same CF, SF and BW, which means both transmissions are lost. Figure 6. The third- and sixth-order polynomials interpolation models based on the measured RSSI values. Figure 7. Comparison between the RSSI values estimated through different theoretical path loss models and the interpolation models based on the field measurements. The Okumura–Hata model for small cities has been excluded as it reports the same values as the urban areas model. ACTA IMEKO | www.imeko.org December 2020 | Volume 9 | Number 4 | 27 When, during a LoRa transmission, a signal arrives at the receiver before the previous packet has been processed, the receiver is unable to decode one or both of them. Denoting this overlap between packets x and y as O(x,y), the condition according to which the LoRaSim tool decides on a successful packet decoding can be expressed as: C = O(x,y) ∧ C freq ∧ C sf ∧ C pwr ∧ C time , where the different symbols represent an overlap (leading to a collision) in frequency, spreading factor, power and timing, respectively. The use of the AND logic operators implies that a packet is suppressed at the receiver (i.e. lost) if, and only if, all the overlapping conditions occur. Each overlap is represented by an independent random variable, which means, according to the central limit theorem, that their sum tends toward a normal distribution. The S.M. variant allows for establishing a baseline that can be analytically described. In an initial experiment, the configuration of the SN1 parameters detailed in Table 2 was considered, albeit in two different simulation settings. Here, the first setting, labelled SN1PL, assumes the combination of selectable parameters that enables the strongest transmission (i.e. the most robust to channel quality degradation), with the longest possible airtime of 1712.13 ms (SF = 12), the selection of different path loss models, and the collisions as defined above. Meanwhile, the second setting, labelled SN1 S.M., assumes the same node configuration as the S.M. variant, but with a fixed log-distance path loss model (default model). The mean DER value obtained for N = 1,000 nodes randomly placed around a single GW was then evaluated. As Figure 8 shows, the S.M. variant consistently provided DER values of <4 % due to the underestimation of the communication channel, which means a good packet reception is highly unlikely. Meanwhile, the results for the SN1PL configuration indicated a dependence on the path loss model used. The Okumura–Hata model, which considers different terrains, provided the highest DER in the rural scenario (as was expected), albeit that it was still very low (around 12 %). Figure 9 shows the expected mean DER trend with an increase in the number of nodes for different path loss models. In line with the previous experiment, the generic SN1 S.M. configuration returned the lowest probability of receiving packets, while the configuration incorporating the 3GPP model was the most favourable. When assuming a DER of ≥0.8 to be an acceptable value for a realistic deployment, the log-distance model predicted that there were 64 supported nodes, while the other two models predicted around 100. In accordance with Section 2.2, we then modelled a more realistic LoRa deployment by placing nodes in the same GPS- referenced positions used for the RSSI field measurements (hot spots). Given the poor DER results obtained from the simulations discussed above, and in order to increase the number of nodes supported by the network, we assumed a scenario that included three GWs, one located on top of the highest tower (as with the measurement campaign) and two additional GWs, both positioned at a height 150 m a.s.l. The new scenario is shown in Figure 10. We first tested the SN1 configuration by comparing the DER results provided by the random positioning of the nodes (default option in LoRaSim) and the GPS-based positioning in both the single-GW network and the three-GW network. From Figure 11, it is clear that with the GPS-based node placing method and the single-GW network, a 34.6 % increase in mean DER (0.11– 0.148) was obtainable. The network performances were further improved using the three-GW network. As such, we can obtain a 91.94 % increase in the DER using the GPS-3GW network compared to when using a single gateway (GPS-1GW), and a Table 2. Configuration settings. Parameter SN1 SN5 Transmission Power (dBm) 14 14 Carrier Frequency (MHz) 860 860 Spreading Factor 12 Best of 7-12 Bandwidth (kHz) 125 Best of 125/250/500 Coding Rate 4/8 4/5 Figure 8. Comparison of the DER results obtained by setting different path loss models in the LoRaSim tool for the two configurations, SN1 S.M. and SNPL1, for N = 1,000. Figure 9. Comparison of mean DER results obtained by setting different path loss models, for an increasing number of nodes. Figure 10. The simulated scenario with three GWs located in the campus area: hot spots (yellow markers) and GWs (white circled red markers) placement. ACTA IMEKO | www.imeko.org December 2020 | Volume 9 | Number 4 | 28 global 158.4 % increase compared to when using the random placement method (random-1GW), thus increasing the mean DER value from 0.11 to 0.285. The use of the GPS-based location of the nodes improved the simulated performance as it allowed for fully exploiting the results of the RSSI field measurement campaign, with a realistic distribution of the received signal power described by the propagation model used. The last simulated configuration, labelled SN5 in Table 2, relies on dynamic parameters and allows for minimising both the airtime and the TP. As shown in Table 3, this is the best option for ensuring a high reception rate, since the mean DER ranges from 0.97 to 0.99. According to the simulations, a DER of ≥0.8 is obtainable with up to 6,000 nodes deployed. 4. CONCLUSION In this paper, we presented two effective modifications to the LoRaSim network simulator aimed at improving the accuracy of the software tool in predicting the number of nodes that can be sustained by a dense LoRa network, given a target mean DER. The applied modifications consisted of introducing the possibility of testing different path loss models, previously verified through an extensive field measurement campaign for LoRa RSSI values and through providing a GPS-based positioning of the nodes rather than the default random positioning available in the simulator. The simple default model configuration tended to underestimate the link quality, while the 3GPP path loss models were found to be the most favourable, allowing for placing around 100 nodes in a metropolitan area as opposed to the 64 nodes supported by the default log-distance model. Meanwhile, the Okumura–Hata model introduced an 83 % increase in DER compared to the log-distance model in rural scenarios. The GPS- based location of the nodes allowed for simulating a more realistic network deployment that optimised the estimation of the mean DER. As such, irrespective of which path loss model was applied, a 34.6 % increase in the mean DER was obtained. The study relied on measurement results obtained outdoors during several days of good weather conditions; however, it is known that rain, fog and other phenomena may impact the received signal levels and the packer delivery rate of the LoRa link. Even if the huge link budget margin ensured by the LoRa technology makes it less sensitive to weather conditions and signal attenuation than other wireless communication systems, it is important to not underestimate the weather-related effects, especially if the target application requires high reliability in packet transmission at any given time. To address this issue, it is crucial to remain aware that, in addition to the propagation environment, the physical-level configurable settings of LoRa also determine different trade-offs among range, consumption and data rate. Future activities could involve a more thorough analysis of the weather-related effects on the capacity of a LoRa network, the deployment of an adequate number of nodes to measure the simulator performance, and the introduction of additional capabilities, such as accounting for the imperfect orthogonality among the node transmissions and any additional attenuation due to poor weather conditions. ACKNOWLEDGEMENT S. Spinsante acknowledges the support from the Italian National Technology Cluster project SHELL (Shared interoperable home ecosystems for green, comfortable and safe living), project code: CTN01 00128 111357. REFERENCES [1] C. Liu, S. Yan, T. Lai, The establishment of an integrated automation production line with multiple monitoring and control loops, IEEE International Conference on Applied System Invention (ICASI), Chiba, Japan, 13 – 17 April 2018, pp. 968-971. DOI: https://doi.org/10.1109/ICASI.2018.8394432 [2] R. Laskier, Modernizing the mining industry with the Internet of Things, in: Internet of Things and Data Analytics Handbook. H. Geng (editor). Wiley, 2017. ISBN: 978-1-119-17364-9 DOI: https://doi.org/10.1002/9781119173601.ch32 [3] G. Margelis, R. Piechocki, D. Kaleshi, P. Thomas, Low throughput networks for the IoT: Lessons learned from industrial implementations, IEEE 2nd WF-IoT, Milaan, Italy, 14-16 December 2015, pp. 181-186. DOI: https://doi.org/10.1109/WF-IoT.2015.7389049 [4] LoRa Alliance, LoRa Alliance Website, 2019. Online [Accessed 28 October 2020]. https://lora-alliance.org/about-lorawan [5] T. Addabbo, A. Fort, M. Mugnaini, L. Parri, S. Parrino, A. Pozzebon, V. Vignoli, A low-power IoT architecture for the monitoring of chemical emissions, ACTA IMEKO 8 (2019) pp. 53-61. DOI: https://doi.org/10.21014/acta_imeko.v8i2.642 [6] T. Addabbo, A. Fort, M. Mugnaini, L. Parri, S. Parrino, A. Pozzebon, V. Vignoli, An IoT framework for the pervasive monitoring of chemical emissions in industrial plants, workshop on metrology for Industry 4.0 and IoT, Brescia, Italy, 16 – 18 April 2018, pp. 269-273. DOI: https://doi.org/10.1109/METROI4.2018.8428325 [7] T. Addabbo, A. Fort, A. Mecocci, M. Mugnaini, S. Parrino, A. Pozzebon, V. Vignoli, A LoRa-based IoT sensor node for waste management based on a customized ultrasonic transceiver, Figure 11. Comparison of mean DER results obtained with different node placing methods in the SN1 configuration. Table 3. DER results for a 3 GWs deployment. Model SN1 S.M. SN1 SN5 Log-Distance 0.07 0.21 0.97 Okum. small city, metropolitan 0.03 0.31 0.99 Okum. suburban 0.04 0.28 0.99 Okum rural 0.03 0.29 0.98 3GPP urban, suburban 0.03 0.29 0.99 https://doi.org/10.1109/ICASI.2018.8394432 https://doi.org/10.1002/9781119173601.ch32 https://doi.org/10.1109/WF-IoT.2015.7389049 https://lora-alliance.org/about-lorawan https://doi.org/10.21014/acta_imeko.v8i2.642 https://doi.org/10.1109/METROI4.2018.8428325 ACTA IMEKO | www.imeko.org December 2020 | Volume 9 | Number 4 | 29 IEEE Sensors Applications Symposium (SAS), Sophia Antipolis, France, 11 – 13 March 2019, pp. 1-6. DOI: https://doi.org/10.1109/SAS.2019.8705980 [8] A. Abrardo, A. Fort, E. Landi, M. Mugnaini, E. Panzardi, A. Pozzebon, Black powder flow monitoring in pipelines by means of multi-hop LoRa networks, II Workshop on Metrology for Industry 4.0 and IoT (MetroInd4.0&IoT), Naples, Italy, 4 – 6 June 2019, pp. 312-316. DOI: https://doi.org/10.1109/METROI4.2019.8792890 [9] E. L. d. Medeiros, C. A. d. S. Filho, F. B. S. d. Carvalho, R. M. S. Cruz, C. d. S. Moreira, Data acquisition system development for a hydraulic plant using hybrid communication network based on LoRa, IEEE International Instrumentation and Measurement Technology Conference (I2MTC), Auckland, New Zealand, 20 – 23 May 2019, pp. 1-6. DOI: https://doi.org/10.1109/I2MTC.2019.8827080 [10] L. Lei, Z. H. Sheng, L. Xuan, Development of low power consumption manhole cover monitoring device using LoRa, IEEE International Instrumentation and Measurement Technology Conference (I2MTC), Auckland, New Zealand, 20 – 23 May 2019, pp. 1-6. DOI: https://doi.org/10.1109/I2MTC.2019.8826885 [11] L. Lombardo, L. Iannucci, M. Parvis, S. Corbellini, S. Grassini, A wearable system for noise assessment in workplaces, IEEE International Instrumentation and Measurement Technology Conference (I2MTC), Auckland, New Zealand, 20 – 23 May 2019, pp. 1-6. DOI: https://doi.org/10.1109/I2MTC.2019.8826907 [12] M. Rizzi, P. Ferrari, A. Flammini, E. Sisinni, Evaluation of the IoT LoRaWAN solution for distributed measurement applications, IEEE Trans. Instr. & Meas. 66 (2017) pp. 3340- 3349. DOI: https://doi.org/10.1109/TIM.2017.2746378 [13] S. Spinsante, A. Poli, S. Pirani, L. Gioacchini, LoRa Evaluation in mobility conditions for a connected smart shoe measuring physical activity, IEEE International Symposium on Measurements & Networking (M&N), Catania, Italy, 8 – 10 July 2019, pp. 1-5. DOI: https://doi.org/10.1109/IWMN.2019.8805037 [14] L. Angrisani, P. Arpaia, F. Bonavolontà, M. Conti, A. Liccardo, LoRa protocol performance assessment in critical noise conditions, IEEE 3rd International Forum on Research and Technologies for Society and Industry (RTSI), Modena, Italy, 11 – 13 September 2017, pp. 1-5. DOI: https://doi.org/10.1109/RTSI.2017.8065952 [15] H. Lee, K. Ke, Monitoring of large-area IoT sensors using a LoRa wireless mesh network system: Design and evaluation, IEEE Transactions on Instrumentation and Measurement 67 (2018) pp. 2177-2187. DOI: https://doi.org/10.1109/TIM.2018.2814082 [16] M. C. Bor, U. Roedig, T. Voigt, J. M. Alonso, Do LoRa Low- power wide-area networks scale? Proceedings of 19th ACM MSWiM. New York, USA, 2016, pp. 59-67. [17] LoRa Sim, University of Lancaster, 2019. Online [Accessed 28 October 2020]. https://www.lancaster.ac.uk/scc/sites/lora/lorasim.html [18] Semtech, SX 1272/3/6/7/8: LoRa Modem, Semtech, Designer’s Guide, Tech. Rep. AN1200.13, rev 1, July 2013. [19] A. Molisch, Wireless Communications. Wiley–IEEE Press, Hoboken, 2005, ISBN: 978-0-470-74186-3 [20] European Telecommunications Standard Institute (ETSI): The Third Generation Partnership Project (3GPP). Online [Accessed 28 October 2020]. https://www.etsi.org/committee/1418-3gpp [21] O. Georgiou, U. Raza, Low power wide area network analysis: Can LoRa scale? IEEE Wireless Communications Letters 6 (2017) pp. 162–165. DOI: https://doi.org/10.1109/LWC.2016.2647247 [22] U-Blox.com, NEO-6 U-Blox 6 GPS modules, data sheet. Online [Accessed 28 October 2020] https://www.u-blox.com/sites/default/files/products/ documents/NEO-6_DataSheet_%28GPS.G6-HW- 09005%29.pdf [23] Shie-Yuan Wang, Yo-Ru Chen, Tzu-Yang Chen, Chia- Hung Chang, Yu-Hsiang Cheng, Chun-Chia Hsu, Yi-Bing Lin, Performance of LoRa-based IoT applications on campus, IEEE 86th Vehicular Technology Conference (VTC-Fall), Toronto, ON, 2017, pp. 1-6. DOI: https://doi.org/10.1109/VTCFall.2017.8288154 https://doi.org/10.1109/SAS.2019.8705980 https://doi.org/10.1109/METROI4.2019.8792890 https://doi.org/10.1109/I2MTC.2019.8827080 https://doi.org/10.1109/I2MTC.2019.8826885 https://doi.org/10.1109/I2MTC.2019.8826907 https://doi.org/10.1109/TIM.2017.2746378 https://doi.org/10.1109/IWMN.2019.8805037 https://doi.org/10.1109/RTSI.2017.8065952 https://doi.org/10.1109/TIM.2018.2814082 https://www.lancaster.ac.uk/scc/sites/lora/lorasim.html https://www.etsi.org/committee/1418-3gpp https://doi.org/10.1109/LWC.2016.2647247 https://www.u-blox.com/sites/default/files/products/documents/NEO-6_DataSheet_%28GPS.G6-HW-09005%29.pdf https://www.u-blox.com/sites/default/files/products/documents/NEO-6_DataSheet_%28GPS.G6-HW-09005%29.pdf https://www.u-blox.com/sites/default/files/products/documents/NEO-6_DataSheet_%28GPS.G6-HW-09005%29.pdf https://doi.org/10.1109/VTCFall.2017.8288154