# Reducing the Cost of Implementing Filters in LoRa Devices
## 2 Sample Reduction Methods
### Quantization  
In order to implement a practical LoRa system, some level of quantization is necessary to represent the LoRa chirp signals. Since the chirp sample values are normally between \(\pm 1\), two integer bits are needed to represent a signed chirp signal. Thus, only the number of fractional bits can be varied and investigated. Let \(B\) represent the number of fraction bits used for the system such that the uniform quantization step size is \(Q=2^{-B}\).  
Assuming the use of chirp segmentation, the values of \(N_{\text{gen}}\) will be those found in Table 2 as before. However, \(N_{\text{in}}\) depends on the quantization factor, i.e., the number of fraction bits, \(B\). Table 4 contains the values of \(N_{\text{in}}\) found for five different values of \(B\), namely 2, 4, 6, 8, and 10 bits.  
Once again, the total number of samples required to implement the LoRa transmitter for each quantization factor can be found from (12). The calculated values of \(N_{\text{TX}}\) for LoRa devices utilizing chirp segmentation and quantization are shown in Tables 5 and 6 with filter lengths of 17 and 81 taps, respectively. Note that the results for the standard system do not change with quantization.  
By comparing the results in Tables 5 and 6 with that of Table 3, it is clear that quantization provides a more significant reduction in stored samples than using chirp segmentation alone. In fact, using chirp segmentation and quantization not only can match, but improve upon the results obtained for a standard system that does not use multiplier-less filtering. Representing the real and imaginary chirp samples with 8-bit fractional precision for both cases of filters would be an appropriate solution in this regard. Not only is there a significant sample reduction from the standard case, but no hardware multipliers would be required. The main concern with quantizing the LoRa chirp signals is the potential impact on the decoding performance. The performance results and comparison presented in the next section shall remove this concern.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \(\mathbf{SF}\) & \(\mathbf{M}\) & \(\mathbf{N_{\text{gen}}}\) & \(\mathbf{N_{\text{in}}}\) \\ \hline
6 & 64 & 32 & 25 \\
7 & 128 & 64 & 49 \\
8 & 256 & 128 & 97 \\
9 & 512 & 256 & 193 \\
10 & 1024 & 512 & 385 \\
11 & 2048 & 1024 & 769 \\
12 & 4096 & 2048 & 1537 \\ \hline \multicolumn{3}{c}{All} & 4064 & 2049 \\ \hline \hline \end{tabular}
\end{table}
Table 2: \(N_{\text{gen}}\) and \(N_{\text{in}}\) for a LoRa system with chirp segmentation.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \(\mathbf{SF}\) & **Standard** & \(\mathbf{N_{\text{filter}}=17}\) & \(\mathbf{N_{\text{filter}}=81}\) \\ \hline
6 & 128 & 248 & 1016 \\
7 & 256 & 496 & 2032 \\
8 & 512 & 992 & 4064 \\
9 & 1024 & 1984 & 8128 \\
10 & 2048 & 3968 & 16,256 \\
11 & 4096 & 7936 & 32,512 \\
12 & 8192 & 15,872 & 65,024 \\ \hline \hline All & 16,256 & 22,496 & 88,032 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Total number of samples (\(N_{\text{TX}}\)) for a standard LoRa system and a system with chirp segmentation: Length-17 and 81 filters.