# Slotted ALOHA on LoRaWAN-Design, Analysis, and Deployment
## 4 LoRaWAN MAC Model  
Class A is designed for battery-powered end nodes that must be ultra-low power with very long expected lifetime. It permits bi-directional communications, but downlink transmissions are constrained to two short intervals after each uplink transmission to the gateway. The MAC of LoRaWAN is based on P-ALOHA. End-devices of Class B and Class C are designed for end nodes with no critical energy constraints, thus they allow for more receiving slots at specific scheduled times and synchronized beacons are sent from the gateway. In this paper, we focus on an S-ALOHA scheme for LoRaWAN battery-powered sensor nodes. We define \(S\) as the average number of packets generated per transmission time interval; the traffic source \(\lambda\) consists of a high number of users who collectively form an independent Poisson source with an aggregate mean packet generation rate of \(X\) packets/s, the packet time width is supposedly fixed with a period of \(T\) seconds (Equation (2)). Moreover, we can consider that each user generates packets infrequently and that each packet can be successfully transmitted in an interval smaller than the average time between successive packets from a given node [36]. \(S\) can also be expressed as the channel throughput rate. Each node delays the transmission of a previously collided packet by some random time, chosen, for example, uniformly between 0 and \(T_{\text{max}}\). Therefore, the traffic injected into  
Figure 3: Uplink and Downlink methodology in Class A, B, and C.  
the channel consists not only of new packets but also of previously collided packets: this increases the mean traffic generated, usually denoted with \(G\) (Equation (3)):  
\[S=\lambda\ T \tag{2}\]  
\[G\geq S \tag{3}\]  
\[G(n)=\lambda(n)T \tag{4}\]  
\[S=G(n)\cdot P_{\text{suc}}=\lambda(n)T\cdot e^{-\lambda(n)2T} \tag{5}\]  
In P-ALOHA, a single transmission is successfully performed if during the time period \(2T\) (vulnerability period) the channel remains free. The probability that there are no transmissions in the \(2T\) period is \(P_{\text{suc}}\)[36]. The total channel traffic could be expressed as presented in Equation (4). With these hypotheses, it is possible to obtain the maximum channel throughput: 18%. This model generates results that approximate to real deployments for LoRaWAN Class A end node in the unacknowledged configuration when there is only uplink transmission without the answer from gateway (s). To realistically model the single channel throughput in the half-duplex mode we achieved a statistical model based on measurements from a real LoRaWAN testbed, the network simulator and statistical analysis. As shown in Figure 3, in LoRaWAN Class A there is one second delay between transmission and RX1 windows; this period could be used by other end nodes to transfer data, but the probability of a successful transmission in the RX Delay 1 is very low, since LoRa modulation generates a remarkable packet's time of air. With an SF 12, a BW 125 KHz, CR 4 and 25 bytes of payload the overall time of air is 1253 ms, with these setting the corresponding ACK time width is 530 ms.  
With the proposed parameters, a transmission inside the RX1 Delay is not allowed, as shown in Figure 4, and the probability of collision is equal to one. In the proposed model the overall channel occupation time for each transmission is composed by time of air of both uplink (\(T\)) and downlink (\(T_{\text{ack}}\)) windows plus the RX1 Delay. If we consider T the channel time used to transfer the payload, we can define \(2.22T\) the total channel time used for each sensor, considering the LoRaWAN overhead; this value is equal to \(T_{\text{LoRaWAN}}\). Therefore, the ratio between the traffic injected and transmission successfully performed can be expressed as presented in Equation (6), where the vulnerability period scales up from \(2T\) to \(2(2.22T)\):  
\[S=G(n)\cdot P_{\text{suc}}=\lambda(n)T\cdot e^{-\lambda(n)2(2.22T)} \tag{6}\]  
Figure 4: Vulnerability period in LoRaWAN with ACK.