# An Application of a LPWAN for Upgrading Proximal Soil Sensing Systems
## 5 System Test and Analysis
### Channel Characteristics and Gateway Capacity Analysis  
The key parameter settings of the node are shown in Table 3. When setting the parameters of radio device, on the basis of meeting the radio management specifications, we optimized the LoRa modulation and demodulation technology through designing the key parameters, such as modulation spread factor, modulation bandwidth, and error correction coding rate, to make the system reach an optimal state, as far as possible [30,31]. The spread spectrum LoRa modulation is performed by representing each bit of the payload information using multiple chips of information. The rate at which the spread information is sent is referred to as the symbol rate; while, the ratio between the nominal symbol rate and chip rate is the spreading factor and represents the number of symbols sent per bit of information. Spread spectrum transmission can reduce the bit error rate; that is, the SNR, as shown in Table 4. Under the condition of a negative signal-to-noise ratio, the signal can be received normally, which improves the sensitivity, link budget, and coverage of the LoRa receiver, but reduces the actual data that can be transmitted under the condition of the same amount of data [32]. Therefore, the larger the spread spectrum factor, the smaller the number rate (bit rate) of the transmitted data. In this paper, we set the spreading factor (SF) as 12 to maximize the signal coverage, under the condition of meeting the transmission rate. The LoRa modem employs cyclic error coding to perform forward error detection and correction. Such error coding incurs a transmission overhead, but it can further improve the robustness of the link. Therefore, we set the coding rate (CR) as 4/5. An increase in signal bandwidth (BW) permits the use of a higher effective data rate; thus, reducing transmission time at the expense of a reduced sensitivity improvement [33]. Apparently, there are regulatory constraints in most countries on the permissible occupied bandwidth. As it is stipulated in China that the power in 470\(-\)\(-\)510 mHz frequency band shall not exceed 50 mW (17 dBm (ERP)) and the occupied bandwidth shall not exceed 200k [34], we set the bandwidth to 125 k; considering the cable loss and air path loss, we set the transmission power of the node to 20 dBm. In short, these parameters were closely related to the range and robustness of radio communication links. Changing the BW, SF, and CR would change the link budget and transmission time. It was necessary to have a trade-off between battery life and distance. For large-scale LoRa connection applications, gateway capacity is an important characteristic [35,36], especially in a typical suburban farming environment; and whether the gateway is sufficient for the determined number of nodes is an important concern. In the same application scenario, for a certain gateway, the maximum number of packets that can be received per day is also determined. However, different packet forms and sending rates will change the total number of packets. The LoRa standard data frame format is shown in Figure 9. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \begin{tabular}{c} **ADC Sampling** \\ **Battery Voltage** \\ \end{tabular} & \begin{tabular}{c} **Sensor Work** \\ \end{tabular} & \
\begin{tabular}{c} **Data Sending** \\ **and Receiving** \\ \end{tabular} &
\begin{tabular}{c} **Low Power Mode** \\ \end{tabular} \\ \hline Voltage(V) & 3.3 & 12 & 3.3 & 3.3 \\ Current (mA) & 15.4 & 40.9 & 168.3 & \(4.3\times 10^{-3}\) \\ Duration (s) & 6 & 3 & 2 & T-11 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Energy consumption of each main state of the system. The data frame includes a preamble byte, a header byte, a payload, and an optional CRC byte for synchronization. Although the number of preamble bytes can be programmable, the number of remaining bytes depends on the coding rate and spreading factor used in other parameters.