# Experimental Evaluation of the Packet Reception Performance of LoRa
## 5 Results and Analysis
### The Impact of the Packet Length on the Packet Reception Performance of LoRa
#### 5.4.1 Theoretical Analysis of the Impact of the Packet Length  
The previous experimental results tell us that within a given SNR, several parameters can be selected to achieve normal decoding of the signal, that is, the receiver has a normal decoding SNR range. Specifically, if the SNR of the received signal is less than the normal decoded SNR threshold, or the LoRa signal collides with the interference signal, the packet will be discarded due to a decoding error. This Packet Error Ratio can be expressed using Equation (3) [33]:  
\[p_{f}(L,SNR)=1-(1-p_{c}(L)\cdot(1-p_{s}(L,SNR)), \tag{3}\]  
where \(p_{c}(L)\) refers to the Packet Error Ratio caused by collision interference between packets; \(p_{s}(L,SNR)\) refers to the probability of error caused by noise interference, that is, the SNR of signal is lower than the threshold; and L is the packet length.  
For providing a simpler understanding of the situation when the SNR of the received signal is less than the SNR threshold for normal decoding, transmission errors caused by packet collisions are ignored in this paper, so Equation (3) can be transformed into Equation (4). The probability of successful reception \(p_{sp}(L,SNR)\) is represented by Equation (5).  
\[p_{f}(L,SNR)=p_{s}(L,SNR) \tag{4}\]  
\[p_{sp}(L,SNR)=1-p_{s}(L,SNR) \tag{5}\]  
For a given number of information bits contained in each data packet, \(p_{sp}(L,SNR)\) can be used to calculate the expected data volume of each data packet (denoted as D below).  
\[\text{D}=\text{L}\cdot p_{sp}(L,SNR)=\text{L}-\text{L}\cdot p_{s}(L,SNR) \tag{6}\]  
We assume that data packets are lost due to bit errors, and data bit errors are bursty and follow the Poisson process. The probability of at least one burst bit error in an \(\mid\) bits data packet is \(\text{P}(\mid)\), which can be represented by Equation (7).  
\[\text{P}(\mid)\ =\ \text{b}+(1-\text{b})\cdot(1-\text{exp}(-\lambda\mid)) \tag{7}\]  
Here, \(1/\lambda\) is the average number of bits between two error bursts. The b is the possibility that the packet transmission may start during the error burst.  
If we define c = 1 - b, Equation (7) can be simplified as (8):  
\[\text{P}(\mid)\ =\ 1-\text{c}\mid\text{exp}(-\lambda\mid) \tag{8}\]  
If the packet loss rates of two different packet lengths \(\mid\)1 and \(\mid\)2 are known, then we can use Equation (9) and (10) to find the parameters c and \(\lambda\).  
\[\lambda=\ln\biggl{(}\frac{1-\text{P}(\mid_{\lambda})}{1-\text{P}(\mid_{ \lambda})}\biggr{)}/(\mid_{\lambda}-\mid_{\lambda}) \tag{9}\]  
\[\text{c}=\frac{1-\text{P}(\mid_{\lambda})}{\text{exp}(-\lambda\mid_{\lambda} )}=\frac{1-\text{P}(\mid_{\lambda})}{\text{exp}(-\lambda\mid_{\lambda})} \tag{10}\]  
Knowing \(\lambda\) and c, we can estimate the loss rate of different packet lengths to make adjustments to the transmission mechanism, and the retransmission mechanism should also be considered. We assume that it can be retransmitted indefinitely. In theory, long packets are more susceptible to interference than short packets, so more retransmissions may be required. However, if a node has a message (i.e., 128 bytes) to send, it can send a packet carrying the 128-byte message directly or divide this message into four 32-byte blocks. This means that short packets need to send more headers, which is the cost of short packets.