# Priority-Based Machine-To-Machine Overlay Network over LTE for a Smart City
## 5 Modelling the PM2M Backoff Procedure with Backoff Error  
Let us now present the analytical model for the CSMA-CA backoff procedure. We model backoff errors that occur when a UE incorrectly estimates the state of the channel. Our modelling is based on elements developed in [13] with necessary modifications regarding the superframe structure and coupling with the physical layer. The physical layer influences clear channel assessment at MAC. The latter comes due to SINR, which depends on H2H traffic and preambles belonging to the physical layer of the overlay network. We consider a single-hop PM2M overlay network with H2H terminals in a single LTE/LTE-A cell. The system works in the non-saturation condition where the packet queue does not always have a packet to transmit and each UE experiences an idle period when its queue is empty. The model consists of two three-dimensional Discrete Time Markov Chains (DTMCs). Note that the physical layer of our proposed architecture is different from that in [13] since our physical layer is implemented with dedicated preambles and we do not use RTS/CTS to avoid creating extra overload on the PRACH. We consider two user priorities, \(UP_{k},k=0,1\), where Indices 0 and 1 refer to lower and higher priority traffic class, respectively. All the time scales are presented in slots and modified according to the LTE time scale. The backoff value of a \(UP_{k}\) node is distributed uniformly over the interval \([1,CW_{k}]\). \(CW_{k}\) has the minimum value of \(CW_{k,min}=W_{k,i}\) where \(i=0\). The maximum contention window value is \(CW_{k,max}=W_{k,max_{k}}\), corresponding to the maximum number of retries \(R=7\). User priorities are differentiated according to the values of \(CW\); see Table 1. We assume that a packet is dropped if the number of unsuccessful attempts exceeds the retry limit \(R\). Contention window values for a user priority \(UP_{k}\) node for the \(i\)-th backoff phase are calculated as follows:  
* Initially, \(W_{k,i}=W_{k,min}=CW_{k,min}\), where \(i=0\). * The contention window value doubles when, \(W_{k,i}=min\{2W_{k,i-1},CW_{k,max}\}\), for \(2<=i<=R\), if \(i\) is an even number
* The contention window value increases uniformly when, \(W_{k,i}=W_{k,i-1}\), for \(1<=i<=R\), if \(i\) is an odd number. We calculate the probability that neither the data nor the subsequent acknowledgement (ack) packet are corrupted by noise as:  
\[\sigma=(1-BER_{PM2M})^{dt_{s}+ak_{s}} \tag{15}\]  
where \(BER_{PM2M}\) is the bit error rate caused by interference from H2H traffic and \(dt_{s},ak_{s}\) represent the data and acknowledgement size in slots. In IEEE 802.15.6, during the CSMA-CA medium access, a UE senses the medium before decrementing the backoff counter. If the medium is sensed as busy, the node will freeze the backoff counter until the medium is sensed to be idle. The UE senses the status of the medium in backoff periods equivalent to 20-bit periods. Listening in each bit period may give an erroneous result with the probability \(BER_{PM2M}\). If more than half of the bits are wrong, the UE arrives at the wrong listening decision for a given backoff period with the probability of:  
\[PB_{err}=\sum_{nb=11}^{20}\binom{20}{B}BER_{PM2M}^{B}(1-BER_{PM2M})^{20-nb} \tag{16}\]  
We develop a three-dimensional Discrete Time Markov Chain (DTMC) to model the backoff procedure of the CSMA-CA mechanism with backoff error only for two traffic classes and the Random Access Phase (RAP), as depicted in Figure 6. To calculate the average backoff time, we calculate all possible backoff phases during the CSMA-CA countdown and extend three-dimensional DTMCs to four-dimensional ones for all UPs, as shown in Figure 7.  
The medium access probability \(\tau_{k}\) of a \(UP_{k}\) node, where \(k=0,1\) during RAP is calculated by solving the two dependent DTMCs derived by extending the framework from [13] with the probabilityof backoff error. The access probability is calculated only when the medium is idle and nodes are competing to get access.