# Smart City Pilot Projects Using LoRa and IEEE802.15.4 Technologies
## 5 A Smart City Testbed: The Rigers Project
### Network-Level Performance Assessment via Simulations  
In view of the in-field implementation of the LoRa network envisioned within RIGERS, in this section we present network-level results obtained through a proprietary simulator incorporating the above derived path-loss models. The simulator, written in C++, has been developed by the University of Bologna in collaboration with TIM (TIM -Telecom Italia Mobile- is, along with Vodafone, the main Italian telecommunications company, which provides telephony services, mobile services, and DSL data services.). Obtained results have been qualitatively compared with those presented in [31],  
Figure 6: Saragozza district. Outcomes of the measurement campaign. where the NS-3 simulator, modelling the LoRa bit error rate and the LoRaWAN MAC layer, has been used. In contrast with [31], in this work the behavior of a single link in terms of device sensitivity and packet capture effect have been characterized experimentally. However, a complete experimental validation of the network-level performance is difficult to carry out, due to the number of devices that should be deployed in order to observe a reasonable number of collisions. Figure 7: Simulated reference scenarios. Simulation parameters are provided in Table 1, while receiver sensitivities and bit rates for the case of 125 kHz bandwidth, when setting different spreading factors, are reported in Table 2. The results reported in this section have been obtained by averaging over 1000 different scenarios (i.e., nodes distributions in the area, see below), and transmitting 100 packets per device in each scenario. The simulated scenarios are the Saragozza and Navile districts of Bologna. In the former case we investigated a rectangular area of 0.9 km \(\times\) 1.8 km, with the gateway located as reported in Figure 7a, while in the case of the Navile district, shown in Figure 7b, a square area of side 0.6 km was considered, with the gateway located in the corner of the area. In each simulated scenario, \(N\) buildings were randomly chosen with uniform distribution in the area, and each building was assumed to be equipped with one multi-sensor board (Figure 7 shows an example of simulated snapshot and devices location when 25 devices are deployed). According to the RIGERS application, every five minutes the board is switched on and all the sensors take a sample. Measured values are then averaged every hour and coded into a single packet transmitted to the gateway through the LoRaWAN access mechanism. Since each measurement take 2 bytes, each multi-sensor board generates 10 bytes (2 bytes by five sensors) of payload every hour. In the simulator, a packet is detected by a receiver (the gateway in our case), if the received power, \(P_{\mathrm{r}}\) given by Equation (2), is greater than the receiver sensitivity (whose values are reported in Table 2 for the different \(SF\)). If this condition is fulfilled, the receiver locks to the preamble and tries to decode the payload. When a packet collision occurs, the signal-to-interference ratio (SIR) is calculated (as the ratio between the power received over the useful link and the sum of the interfering powers) and the payload is passed to the upper layers provided that the device is locked to that particular packet and that the SIR is greater than the protection ratio, \(\gamma\). An acknowledgment mechanism is also used and up to three retransmissions per packet are allowed. In order to compute the received power, \(P_{\mathrm{r}}\) [dBm], the following model is used:  
\[P_{\mathrm{r}}=P_{\mathrm{t}}+G_{\mathrm{t}}+G_{\mathrm{r}}-PL-PL_{\mathrm{add }}+s\, \tag{2}\]  
where \(P_{\mathrm{t}}\) [dBm] is the transmit power, \(G_{\mathrm{t}}\) [dB] and \(G_{\mathrm{r}}\) [dB] are the transmit and receive antenna gains and \(PL\) [dB] is given by Equation (1). \(PL_{\mathrm{add}}\) is the penetration loss: since the gateway will be located