## 2 System Description  
Two different approaches are foreseen in IEEE 802.15.4 to coordinate the data traffic: beacon-enabled mode and non-beacon-enabled mode [2]. In the former, periodic beacons are sent by the coordinator to synchronize the channel access, while in the latter, no synchronization is required. CSMA-CA is used in both modes, but in a slightly different way. In the beacon-enabled mode, every node synchronizes itself to the backoff slots determined by the coordinator; for this reason it is named slotted CSMA-CA. In non-beacon-enabled mode, every node has its own backoff slot timing, so that it is called unslotted CSMA-CA. Default values of the parameters and the number of sensing phases before assessing the channel idle are different in slotted and unslotted versions as a result of synchronization (_i.e.,_ two backoff slots in slotted, one backoff slot in unslotted). In both modes, each node waits for a random number of backoff slots, then channel sensing is performed. If the channel is found to be free, the node immediately starts the transmission. If the channel is found to be busy, the node turns back to the backoff state again. There is a maximum number of attempts a node can try to sense the channel. When this maximum is reached, the algorithm ends with a failure. Even though CSMA-CA avoids collisions by sensing the channel before transmitting a packet, a hidden terminal effect or sensing the channel as idle exactly at the same time by more than one node can cause a collision. As discussed in the previous Section, a collision does not always lead to a total loss. One of the packets, most probably the one with the better signal strength, can be successfully received.  
IEEE 802.15.4 PHY uses direct sequence spread spectrum (DSSS), and it operates over different ISM bands: the 868 MHz (EU) ISM band, the 915 MHz (US) ISM band and the 2.4 GHz global ISM band. Because of the global availability of the higher frequency band, currently transceiver manufacturers mostly have products working in this band (_i.e.,_ Chipcon CC2420, Freescale MC13224, _etc._). In the paper, we focus on the 2.4-GHz frequency band, which utilizes half-sine shaped O-QPSK modulation. In the PHY layer of the 2.4 GHz band, the signal is first modulated by forming a data symbol of four bits, and then, this symbol is mapped to 32-chip long sequences, obtaining 16 data symbols. The data symbol set modulated at the carrier frequency, \(f_{c}\), and carrier phase, \(\phi_{C}\), can be written as:  
\[s_{Ci}(t)=I_{i}(t)\cos(2\pi f_{c}t+\phi_{C})-Q_{i}(t)\sin(2\pi f_{c}t+\phi_{C}) \hskip 14.226378 pti=0,1,...,15 \tag{1}\]  
For each chip sequence, even-indexed chips are modulated to the in-phase (I) carrier, and odd-indexed chips are modulated to the quadrature-phase (Q) carrier of O-QPSK. The offset between the I-phase and Q-phase is formed by delaying the Q-phase symbols one chip duration with respect to the I-phase. \(I(t)\) and \(Q(t)\) for each data symbol can be written as in [25]:  
\[I_{i}(t)= \sum_{n=0}^{15}c_{2n}^{i}h(t-2 nT_{c}) \tag{2}\] \[Q_{i}(t)= \sum_{n=0}^{15}c_{2n+1}^{i}h(t-(2n+1)T_{c}) \tag{3}\]where \(c_{k}^{i}\) is \(\pm 1\) with respect to the chip value and \(i\) is the index of the data symbols. The function, \(h(t)\), is half-sine shaped and can be expressed as:  
\[h(t)=\begin{cases}\cos(\frac{\pi t}{2T_{c}})&\text{if }-T_{c}\leq t<T_{c}\\ 0&\text{otherwise}\end{cases} \tag{4}\]  
Finally, the complex baseband signal is given as:  
\[\tilde{s}_{C_{i}}(t)=I_{i}(t)+jQ_{i}(t);\]  
the corresponding data symbol set in time domain will be expressed by using the complex envelope as:  
\[s_{Ci}(t)=\Re\Big{[}\tilde{s}_{C_{i}(t)}\exp\Big{(}j(2\pi f_{c}t+\phi_{C}) \Big{)}\Big{]} \tag{5}\]  
where \(\Re[.]\) is the real part of the complex expression.