# An Application of a LPWAN for Upgrading Proximal Soil Sensing Systems
## 5 System Test and Analysis
### Communication Test and Discussion
There were 135 received signal strength data points in total. During the test, the distance between the node and the gateway ranged from 300 m to 1300 m. Among the valid data points obtained, there were 18 at 300 m, 22 at 500 m, 19 at 650 m, 26 at 800 m, 19 at 1000 m, 5 at 1100 m, and 26 at 1300 m. The signal strength of these data ranged from \(-142.5\) dBm to \(-119.8\) dBm, including 1 data point greater than \(-120\) dBm, 57 data points less than \(-120\) dBm and greater than \(-130\) dBm, 66 data points less than \(-130\) dBm and greater than \(-140\) dBm, and 11 data points less than or equal to \(-140\) dBm. From the signal strength analysis, 92% of the test signals were greater than \(-140\) dBm, while the received signal sensitivity of LoRa gateway was \(-142\) dBm. Therefore, the RSSI of this test was within the acceptable range. However, when combined with the packet loss rate data analysis, the coverage radius of a single gateway should not exceed 1100 m.  
Figure 16: Signal strength distribution. Figure 15: Packet loss rate. Compared with the theoretical parameters, the actual test data parameters, especially the communication distance, had large gaps. Many factors restrict wireless communication distance. In an ideal environment, wireless communication satisfies the Friis transmission equation [41; 42]. After considering the loss of the free space path, the Friis transmission equation can be transformed into the following Equation (7):  
\[\mathrm{Pt-Pr+Gt+Gr=20 lg\frac{4\pi fd}{c}+Lc+L0} \tag{7}\]  
where Pt is the transmission power of the transmitter, Pr is the sensitivity of the receiver, Gt is the transmitter antenna gain, Gr is the receiver antenna gain, \(f\) is the carrier frequency, \(d\) is the distance between the receiver and transmitter antennas, \(c\) is the speed of light, \(Lc\) is the feeder loss of the transmitter antenna at the base station, and \(L0\) is the air propagation loss. Here, \(\pi\) and \(c\) are constants; therefore, Equation (7) can be easily converted into the following Equation (8):  
\[\mathrm{Pt-Pr+Gt+Gr=20 lg(f)+20 lg(d)+Lc+L0-147.56(dB)} \tag{8}\]  
Equation (8) can be converted to Equation (9) to calculate the distance:  
\[\mathrm{d}=10^{\frac{\eta_{1}-\mathrm{Pr+Gt+Gr-20 lg(f)-Lc-L0+147.56(dB)}}{20}} \tag{9}\]  
Therefore, according to the theoretical calculation formula, the factors affecting the wireless communication distance include the system's own factors, such as receiving sensitivity, transmission power, transmitter, and receiver antenna gain, as well as environmental conditions such as obstacles, transmitter and receiver antenna height, electromagnetic interference and weather influence. In the system parameter setting designed in this paper, considering the data transmission rate and battery life, we set the maximum SF and transmission power to maximize the sensitivity of the node. Therefore, the main factors affecting the communication distance of the system came from the antenna gain and the air propagation loss caused by the obstacles between the sensor node and the gateway. In our system, we chose an antenna with high gain as much as possible; however, due to the consideration of the overall waterproof and anti-corrosion properties of the sensor node, the transmitting antenna was encapsulated inside the node, which led to increased propagation loss. As mentioned in the previous communication test section, the LoRa gateway was deployed on a billboard about 2.5 m above the ground. The sensor node test location passed through the village, and there were tall and dense trees on both sides of the test route. These test conditions well simulated the low-cost deployment mode in a typical suburban farming environment, but objectively caused the propagation loss of wireless communication and greatly reduced the wireless communication distance.