## 5 Simulation
### MATLAB Simulation
If the gateway height is adjusted from 1 to 5 m, the coverage area and signal strength change drastically change from 1319 to 2946 m. This signifies that maintaining all of the parameters at a certain value will enhance the link budget strength increases because there is less interference. Case III:  
In this case, the following parameters were considered: node sensitivity at \(-137\) dBm and operating frequency at 433 MHz. Now, changing the value of the gateway height significantly impacts the range. Maintained a link budget of 151 dBm, it is observed that SNR decreases because there is a low possibility of interference. The mode of operation during the experiment is downlink, i.e., data received at the receiver side. During the experiment, it was observed that at a fixed node sensitivity of \(-137\) dBm and antenna gain of 10 dB, the custom-built sensor node varies the value of the link budget (in dB) with a change in the wide-area range coverage at a frequency of 433 MHz. This is shown in Table 6 and Figure 10. In Figure 12, a relationship between antenna gain, link budget, and range is plotted. The blue line graph shows increasing antenna gain increases the range, whereas the red line shows increasing the range in response to the link budget in LoRa. By maintaining all of the parameter values, antenna height is directly proportional to the coverage range. This signifies that deploying the LoRa receiver at a certain height can enable a strong communication link. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Mode** & **Gateway** & **End Node** & **Link Budget** & **Range in Meter** \\
**(Down Link)** & **Height in Meter** & **Height in Meter** & **dBm** & **Range in Meter** \\ \hline Down Link & 1 & 1 & 151 & 1681 \\ Down Link & 2 & 1 & 151 & 2377 \\ Down Link & 3 & 1 & 151 & 2911 \\ Down Link & 4 & 1 & 151 & 3362 \\ Down Link & 5 & 1 & 151 & 3758 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Range and link budget at node sensitivity of \(-137\) dBm. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Mode** & **Gateway** & **End Node** & **Link Budget** & **Range in Meter** \\
**(Down Link)** & **Height in Meter** & **Height in Meter** & **dBm** & **Range in Meter** \\ \hline Down Link & 1 & 2 & 159 & 1319 \\ Down Link & 2 & 2 & 159 & 1863 \\ Down Link & 3 & 2 & 159 & 2282 \\ Down Link & 4 & 2 & 159 & 2635 \\ Down Link & 5 & 2 & 159 & 2946 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Range and link budget at node sensitivity of \(-124\) dB. Case IV:  
Transmission signal strength is optimized by setting the antenna gain from 1 to 25 dB. Here, the transmission range and link budget of the LoRa transmitter module were evaluated with a change in antenna gain. The mode of operation is uplink, as presented in Table 7. Antenna gain was changed by writing the MATLAB code for interpreting the signal strength at a frequency of 433 MHz. When gateway noise remains at 10 dB and node sensitivity at \(-137\) dBm, the link budget increases from 141 to 166 dBm. Hence, it is concluded that by changing antenna gain, we can improve the coverage area. Thus, it is preferred to use an antenna with high gain. Experimental parameters are presented in Table 8, and signify the importance of node sensitivity. We used a helical antenna in the design of the custom sensor node and gateway. Maintaining the uplink frequency at 433 MHz, by changing node sensitivity from \(-124\) to \(-130\) dBm, the sensor coverage distance increased from 945 to 3986 m. The data from Table 8 indicates that the change in node sensitivity is directly proportional to the range. As the height of the gateway and sensor node changes, the range also varies. The variation in both gateway and end node height changes the range significantly during downlink mode at the receiver. In Figure 13, the red triangles denote the data rate, and black downward triangles signify the bit rate. Figure 14a,b shows the relation of bit error rate, packet error rate, and symbol error rate with the spreading factor.