# An IoT-Based Participatory Antitheft System for Public Safety Enhancement in Smart Cities
## 3 Methods and Materials
### Range Calculation  
Radio Frequency (RF) power propagates in free space within a virtual \"pipe\" (Figure 8), which can be defined by the so-called Fresnel ellipsoid. Any obstacles within the area of this \"pipe\" attenuate the RF power and thus decrease the actual range of the link. The radius of the \"pipe\" can be approximated by:  
\[R=\frac{\sqrt{D\lambda}}{12}, \tag{1}\]  
where \(R\) is the radius, \(D\) is the distance between the antennas and \(\lambda\) is the wave length  
The free space loss can be approximated by:  
\[Path\ Loss\ (dB)\ =92.45+20\log f+20\log d, \tag{2}\]  
where \(f\) is frequency in GHz and \(d\) is distance in kilometers. This approximation however does not apply to the actual case where the signal is reflected from the ground. More realistic results can be calculated by using (3):  
\[\frac{P_{R}}{P_{T}}=2\bigg{(}\frac{\lambda}{4\pi r}\bigg{)}^{2}\bigg{[}1-cos \bigg{(}k\frac{2h_{1}h_{2}}{r}\bigg{)}\bigg{]}, \tag{3}\]  
where \(P_{R}\) and \(P_{T}\) represent the received signal power and transmitted power, respectively, \(h_{1}\) and \(h_{2}\) denote the heights of the two antennas, \(k\) is the free space wave number and \(r\) stands for the distance between the two antennas. The equation is expressed with the blue line (BlueGiga [46]) in Figure 9 showing the Plane Earth Loss. Figure 8: Transmit receive antenna configuration. Figure 9: Planet earth loss and free space loss diagrams. The distance \(d_{m}\) where the ground starts to become influential can be calculated by:  
\[d_{m}=\frac{(12\cdot h_{1}\cdot h_{2})}{\lambda}, \tag{4}\]  
The total range can be approximated once the output power from the antenna (transmitter output power + antenna gain) and the receiver sensitivity (receiver sensitivity + antenna gain) is defined. As an example, by using antenna heights equal to 1 m, 2 m and 3 m, TX power equal to 3 dBm, receiver sensitivity equal to \(-91\) dBm and antenna attenuation equal to 5 dB (where 5 dB is the loss in both TXP and RX sensitivity) one can approximate the total ranges assuming an open field without obstacles within the RF path as follows:  
\(h=1\) m \(\to D=125\) m  
\(h=2\) m \(\to D=235\) m  
\(h=3\) m \(\to D=305\) m  
BLE Range Analysis [47] describes the methodology for the BLE coverage distance evaluation. In a practical application, the range can be much shorter because the orientation and height of the antenna cannot be controlled, and typically, there are also obstacles within the RF path which will significantly attenuate the signal. In practical applications, the range is impacted by:  
* Persons/obstacles moving close to the antenna. This is due to multipath propagation and will have an impact even if the person is not in the line of sight between the two radios. * Any obstacles within the radio path. * Transmitting antenna gain and height. * The mechanical design of the end product. As the range is impacted by many factors which are difficult to control, the practical range must be tested with the end product, and the application should not be design based on the maximum theoretical range as the practical range will always be shorter. Next, it is shown how the transmit power, receiver sensitivity and radiation pattern convert to the link budget and how the line of sight range can be estimated using a plane earth loss calculation. Additionally, the practical test results are shown in comparison with the theoretical estimate. The results of the experimental measurements performed in an open field, regarding the practical line of sight range of the BLE121 long range module, manufactured by BlueGiga [46], with antennas positioned at 1.5 m above ground, using the heart rate example [48], are shown in Table 1, where the range represents the distance at which the remote device remains able to still connect and maintain the connection to the module. The tests performed took place in an airfield using a data connection between the modules, while, as mentioned above, the result does not guarantee a practical range for real application.