# River Water Quality Monitoring Using LoRa-Based IoT
## 3 IoT Technologies
### LoRa Modulation  
LoRa uses a proprietary modulation technique derived from existing Chirp Spread Spectrum (CSS) technology [12], which spreads a narrowband signal over a wider bandwidth on the transmitting channel, allowing low power requirements, noise immunity, robustness against channel degradation (multipath, jamming, fading and Doppler effect). In CSS, spectrum spread is obtained by generating a chirp signal (Compressed High-Intensity Radar Pulse) that continuously varies in frequency, between the minimum and \begin{table}
\begin{tabular}{c c c c} \hline  & **Sigfox** & **LoRaWAN** & **NB-IoT** \\ \hline Modulation & BPSK & CSS & QPSK \\ \hline Freq. Band & ISM & ISM & LTE \\ \hline BW & 100 Hz & 125/250 kHz & 180 kHz \\ \hline Bidirectional & Limited & Yes & Yes \\  & Half-duplex & Half-duplex & Half-duplex \\ \hline Messages/day & 140 (UL) & Limited & \\ (max) & 4 (DL) & (duty-cycle) & Unlimited \\ \hline Message size & 12 Byte (UL) & & \\ (max) & 8 Byte (DL) & & 243 Byte & 1600 Byte \\ \hline Throughput & 100 bit/s & 50 kbit/s & 160 kbit/s (UL) \\ (max) & 100 bit/s & 50 kbit/s & 120 kbit/s (DL) \\ \hline Range & 10 km (urban) & 5 km (urban) & 1 km (urban) \\  & 40 km (rural) & 20 km (rural) & 10 km (rural) \\ \hline Interference & High & High & Low \\ immunity & High & Low \\ \hline Encryption & No & Yes (AES 128 bits) & Yes (LTE) \\ \hline Private networks & No & Yes & No \\ \hline Standard & Sigfox & LoRa Alliance & 3 GPP \\ \hline \end{tabular}
\end{table} 
Table 1: Overview of LPWAN network technical aspects (adapted from [15]). Figure 4: LPWAN advantage compromise in terms of some IoT factors (adapted from [15]). maximum values of the transmission channel bandwidth (BW). These deviations can increase (up-chirp) or decrease (down-chirp). Each chirp will transmit a symbol with a certain number of bits, which represents the Spreading Factor (SF). Each chirp is composed of 2 SF chips, which is the number of values that it is possible to encode with the number of bits. In the examples in Figure 5, two up-chirps are represented, with decimal information symbols of 32 (Figure 5a) and 64 (Figure 5b), with an SF = 7, which each corresponds to 128 chips. The SF can go from 7 to 12. A low SF means that more chirps are being sent per second. This way, more information can be coded per second; however, the range of the transmission drops. On the other hand, a high SF provides a better range, but the chirps are more spread out in time, lowering the bit rate. Bandwidths of 125 kHz, 250 kHz and 500 kHz are normally used, the latter being applied only in the downlink. With higher bandwidths, the binary rhythm increases, reducing the symbol period, but on the other hand, this sacrifices receive sensitivity due to the introduction of more noise. The symbol period, \(T_{sym}\), is defined by (1)  
\[T_{sym}=\frac{2^{SF}}{BW}\left[\text{s}\right], \tag{1}\]  
where:  
* \(SF\) is the spreading factor (7...12);
* \(BW\) is the modulation bandwidth (Hz). The symbol rate, \(R_{sym}\), is defined by (2)  
\[R_{sym}=\frac{1}{T_{sym}}=\frac{BW}{2^{SF}}\left[\text{sym}/\text{s}\right], \tag{2}\]  
where:  
* \(SF\) is the spreading factor [7...12];
* \(BW\) is the modulation bandwidth [Hz];
* \(T_{sym}\) is the symbol period [s]. The chip rate, \(R_{c}\), is defined by (3)  
\[R_{c}=R_{sym}*2^{SF}=\frac{BW}{2^{SF}}*2^{SF}=BW\left[\text{chips}/\text{s}\right], \tag{3}\]  
Figure 5: Up-chirp signals, with SF = 7: (**a**) decimal information symbol of 32; (**b**) decimal information symbol of 64 (adapted from [16]). where:  
* \(SF\) is the spreading factor [7...12];
* \(BW\) is the modulation bandwidth [Hz];
* \(R_{sym}\), symbol rate [sym/s]. This leads to the following statement. One chip is sent per second per Hz of bandwidth [17]. And because LoRa modulation also includes an error correction scheme, Forward Error Correction (FEC) is implemented. This improves transmission robustness by including redundant bits.