Impact of Packet Size in Adaptive Cognitive Radio Sensor Network

A cognitive radio sensor network (CRSN) is a solution that enables sensor nodes to opportunistically access licensed radio channels. Data transmitted over a network are divided into packets. Inmachine-to-machinecommunication,which is a heterogeneousnature of wireless networks, small-size packets are the common form of traffic. Due to the nature of CRSNs, small data packets will not allow a balance between optimal performance of the network and fulfilling the secondary network obligations towards the primary network in terms of interference. Either interference or channel’s underutilization would result from employing data packets of inadequate size. In this paper, the appropriate packet size for adaptive CRSN is investigated by examining the performances of small, medium, and large packet size. In contrast to the trends of exploiting small packets of sizes up to 128 bytes, this study demonstrates that medium-size packets are more appropriate to yield the best performance in CRSNs. Simulation results show that packets of size 375 bytes outperform smaller and larger packets in many CRSN protocols.The induced delay that is partially caused by interference is decreased at the same time the channels are efficiently utilized.


Introduction
Wireless sensor networks (WSN) applications are implemented in traditional and emerging applications such as security, automated industry, and e-Health.Currently, the implementation of WSN applications in many new surveillance and monitoring services is facing a disconcerting challenge due to the radio spectrum scarcity of free licensed bands.WiFi, Bluetooth, cordless phones, and microwave ovens technologies utilize the same radio spectrum.This causes a serious spectrum congestion and disruption of a wireless network considering the close proximity of the utilized frequencies [1,2].Interference caused by the hostile radio environment results in high rates of data loss which consumes excessive energy and shortens the WSN network's lifetime [3].On the contrary, licensed bands are being underutilized by licensed users which can be tapped by secondary network users (SUs) [4].
Cognitive radio (CR) technology enables SUs to opportunistically utilise the licensed channels assigned to primary network users (PUs).Such technology aims at improving the spectrum utilisation and mitigating the effects of the license-free spectrum overcrowding [5].In cognitive radio networks (CRNs), SUs are strictly obliged to avoid interference with PUs.Once a PU commences transmission on the said channel, SUs must instantly evacuate the channel known as handoff.CR uses spectrum sensing (SS) to allow SUs to determine an idle radio channel to commence data transmission.It can also defer a data transmission if the channel of interest is busy.Among many signal detection techniques, the energy detection (ED) is the most common [6,7].In the ED technique, the radio channel is considered busy if the energy of the detected signal exceeds a predefined threshold value.Let () denote the energy of the sampled signal received by the SU receiver. 0 denotes the hypothesis of the absence of the PU signal while  1 denotes its presence.The energy of the received signal can be expressed as where () represents the additive white Gaussian noise (AWGN) and () represents the transmitted signal multiplied by the channel gain.The probability that the PU channel is busy is given by with   as the channel busy time and   as channel idle time.The probability that the channel is free   is given as Probability that the channel is detected as busy when it is actually busy is called the detection probability,   , and probability that the channel is detected as busy when it is idle is called the false alarm probability,   .Optimal detection can be achieved only if the noise power is known to the SUs.The channel status is determined based on the value of the received signal's energy  and a predefined threshold value   .The relationship between   and   with   and  is given by ( 4) and (5), respectively. and Emerging technology that enables the opportunistic access for WSN's units is called the cognitive radio sensor network (CRSN), whose typical layout is shown in Figure 1.Appropriate data packet size helps limit the interference between the signals of the WSN units, equipped with CR capabilities, and PU signals [8][9][10].Thus, size of data packet in CRSN has a twofold importance: to achieve a satisfactory performance and to mitigate harmful interference with PU signal.Small data packets offer maximum reliability and minimum latency for most types of data traffic especially in critical traffic.Together with the growth of sensor network in internet of things (IoT), the result is that small data packets, of sizes up to 128 bytes (1024 bits), have become the popular trend in data transmission [11,12].Subsequently, overhead data and the inefficient utilisation of resources induced by using small-size packets in emerging heterogeneous networks are often overlooked.Other substantial factors such as smallsize packets have low signal noise ratios (SNRs) compared to large size packets, in effect of noise such as thermal noise [13], and the fact that large-size packets are able to achieve higher efficiency of bandwidth utilisation [14,15] is neglected.
The contributions of this study can be summarised as follows: (i) It investigates the impact of packet size on the performance of CRSNs in terms of two main metrics, namely, the average delay and the throughput (ii) It examines the interactivity between the packet size and the main parameters of the radio network and shows the resultant effects on the system performance (iii) It suggests adopting medium size by proving the outperformance of medium-size packets compared to the small and large packets.
This study is an extension of the work in [16] and it is organised as follows: Section 2 presents the related works, Section 3 introduces the system model and shows the adopted MAC protocol, Section 4 presents the mathematical model, Section 5 shows the evaluation and the results are discussed, and Section 6 concludes the work.

Related Works
Several studies have introduced solutions to improve the performances of MAC protocols in CRSN networks and some have analysed or modelled the performance metrics of a network but little attention was given to the influence of packet size [18][19][20].Data collisions can occur during data transmission.During the data transmission phase, the PU is active until the transmission ends.The longer the SU's packet duration, the more collisions with the PU's data that result in decreasing the throughput of the SU.Furthermore, data collision can happen between SU and existing PUs and also between the SUs themselves.
An analytical model was presented in [21] to determine a suitable packet size subject to CRN parameters such as network traffic, sensing accuracy, and PU's density.A new formula was introduced to the normalised throughput of SU under perfect and imperfect scenarios of the SS function.The required complexity is not acceptable in CRSNs.Aimed at maximizing the goodput, another study based on carrier spectrum multiple access (CSMA) mechanism [22] proposed an analytical model to determine the optimal packet size based on the packet error probability, the collisions between the SUs themselves, and the collisions between SUs and PUs.The outcomes of the study do not treat the plain structure of the end sensor nodes.A similar study [23] investigated the impact of packet size variety on the throughput of a CSMA-based cognitive WLAN.In [24], a framework was proposed and modelled aimed at maximising the achievable throughput while the framework in [25] was more concerned with increasing the network lifetime.The performance of the dynamic open spectrum sharing (DOSS) MAC protocol for a CSMA-based CRSN was analysed and modelled in [17] which incorporates multiple channel access.The study partially investigated the effect of using long and small sizes of data frames on the performance of ad hoc-based CRSNs.Such study does not treat cluster-based networks of CRSNs that are more suitable for heterogeneous networks.

System Model
Network nodes are considered to be uniformly distributed in 2D square area of size  x .The primary network includes  data channels ( 1 , ..,   ), with equal bandwidths.The operating area is divided into clusters each consisting of one master node and several ideal sensing nodes that are spatially correlated.The ideal sensing node is self-powered and it is considered to be heterogeneous that is producing several types of data packets according to how critical the obtained measurements are.The traffic is classified into two categories, namely, real time (RT) traffic and non-real time (NRT) traffic.RT traffic represents the most important traffic containing critical data, which must acquire priority in transmission and avoid interference.The master node is responsible for collecting traffic of a group of ideal nodes and performing several main CR functions.The buffer of the master node is assumed to be infinite and there are no limits on the number of packets it may contain.The environment of the licensed channels is homogeneous in terms of the bandwidth and the radio physical conditions.While the communication inside each cluster is a single-hop via the licensed-free spectrum, the communication between the master node and the base station (BS) is opportunistic via the licensed spectrum, i.e., through the radio channels of the primary network.A common control (CC) channel is used for the communications of the control messages.The channels between the ideal node and the master node are assumed to be perfect because of the short distances between them.The adaptivity of the adopted network refers to the framework mechanism in which the end nodes are able to resort to the alternative workflow, which is CR-based, when the usual WSN workflow suffers from a significant degradation in its performance [26].In the alternative flow, the sensor node reroutes its data to the master node rather than routing it to its original cluster head (CH).
. .Medium Access Control.Existing WSN MAC protocols such as IEEE 802.15.4,WirelessHART, and ISA-100.11a are not suitable for CRSN networks since they lack the efficiency in terms of the network heterogeneity.Likewise, using CRN's proposed algorithms such as IEEE 802.22 will result in producing huge volume of overhead data and consuming enormous amount of sensors' precious power [27][28][29].Pliable Cognitive MAC (PCMAC) algorithm, proposed and modelled in [16], concerns the communication between the master node and the BS and aims at maintaining the ideal sensor's capabilities in the same time of exploiting the CR technique.The master nodes use carrier spectrum multiple access with collision avoidance (CSMA/CA) scheme to access the CC channel that they use to exchange the control messages with the BS through.Request to send/clear to send (RTS/CTS) mechanism is used by the master node and the BS through the CC channel to negotiate the data channel reservation.This is also helpful in mitigating the effect of the hidden node problem.Inside each master node's buffer, packets are virtually lined up in to two virtual queues according to their category: RT and NRT.First come first served (FCFS) discipline is adopted for scheduling the packets in each queue.The RT packets have higher priority to be submitted earlier than the NRT packets since the latter is more delay-tolerant.In e-Health applications, for instance, RT traffic might represent the monitoring data of patient's activities such as the measurements of the heart and the brain while NRT traffic represents the ordinary traffic such as the environmental measurements of the room.When the BS receives an RTS message, it responds with a CTS message and assigns an unallocated channel to the requesting node.The BS tunes its transceiver to the channel it has assigned to receive data.Concurrently, the master node receives the channel assignment message, enclosed within the CTS message; then it tunes its transceiver into the selected radio channel and begins to sense it until it becomes idle, i.e., spectrum hole.At that time, the master node can commence submitting its data in a burst-based manner.The master node will continue to transmit its data until either its data buffer becomes clear or it receives no Acknowledgement (ACK) message from the BS for the latest packet.
Figure 2 illustrates the mechanism of packet transmission where two SUs exploit the channel's idle time to submit their data.Packets are transmitted in bursts.The node tries to squeeze through as many packets as it can before the PU becomes active again.As long as the transmitting node does not receive its ACK message, a packet may interfere with the PU signal, as the second packet of the SU2.Failed packet has to be transmitted again in the next transmission cycle.In such a case, the master node will continue to sense the same channel for when the PU evacuates the channel to allow for the remaining data packets to be transmitted.Since the master node includes its buffer size information in its submission request, the BS will not reassign that channel until the allocated node finishes its transmission.The assignment is limited in time and if the node fails to submit its data for the predefined period of time, the BS can reallocate the channel to another requesting node.In such cases, the former node has to begin a new transmission cycle starting with sending an RTS message via the CC channel.

Mathematical Model
The M/G/1 model is a model where the arrival of packets is Markovian which occurs according to a Poisson process at rate  with a general distribution, , of the service time  through the CC channel, denoted by 1.The adopted model in this study is an improved M/G/1 with a non-preemptive priority scheme, inasmuch as it estimates the delay not only in the CC channel but also in the data channels.
The service time  of each packet comprises the waiting time in the queue  and the transmission time   .The latter includes the contention time in the CC channel,   , the licensed channel's sensing time   , and the packet submission time   , where   =  +   +   +  +   .DIFS and SIFS are the interframe space and short interframe space durations of the distributed coordination function (DCF), respectively.  and   represent durations of the RTS and CTS frames while   represents the backoff estimated time that can be expressed as [30] is the minimum contention window size,  represents the conditional collision probability, and  is the number of the contender nodes.Since the node can arrive at the assigned channel at any moment within the [  +   ] period, the time required to observe the channel until it becomes idle can be estimated as where   is the licensed channel's occupancy probability (by PU) obtained by (2).Assuming that both RT and NRT packets have the same size, packet submission time can be expressed as Wireless Communications and Mobile Computing 5 where  is clear channel assessment average time  is packet size   is data channel's capacity (bits/s) For simplification, the perfect sensing is assumed, meaning that   = 1 and   = 0.However, in the case of imperfect sensing, the new value of the probability that a channel will be sensed idle will be given by   (1 −   ), whereas the old value, i.e., for the perfect sensing   , can be obtained by (3).In several applications, the acceptable values for   and   are 0.1 and 0.9, respectively.
The occupancy ratio of the CC channel   is the sum of the occupancy ratios of RT and NRT,   =   +   , where and   =     (10) To maintain the system stability, the occupation rate for the CC channel must be less than one.Similarly, the occupation rate of the data channels after considering the number of utilised channels can be estimated for RT and NRT packets, respectively, as The mean waiting time for an RT packet,   , is estimated as where R is the mean residual service time of a current served packet, even if it is NRT, and Φ represents the general occupation rate for the entire traffic in the CC and the data channels.The model is nonpreemptive; thus, By using Little's Law and when   represents the mean size of the RT packet queue and equals     , (12) can be rewritten as where   represents the total occupation rate for RT packets.Thus, the mean waiting time for an RT packet is estimated as and the mean throughput time, i.e., the average delay time, is Considering that a new packet may arrive at any moment during the service time, the mean residual service time can be estimated as where   is the coefficient of the service variation time and is equal to   /.Note that, in case of exponential service time,  2  is equal to 1 and in case of deterministic service time it equals 0. For simplicity,  2  = 0.5.Thus, ( 17) can be rewritten as The mean delay time for the NRT packet can be estimated as The sum of gaps between the sequential transmissions is considered as wasted time and it is denoted by   .  includes the contention periods in which the channel is not chosen for submission.Thus, where   is the probability that the BS will choose this channel for the next submission.The maximum number of transmissions that can be achieved in the channel's idle time,   , after deducting the time in which the channel was not chosen for the submission,   , is given by Accordingly, (20) can be rewritten as Each channel has the same probability to be chosen among  available channels since a uniform distribution is used to provide the fairness property for the data channels; thus the probability of allocating a channel,   , equals 1/.Consequently, the available time for data transmission equals (  −   ) and the achievable number of packet transmissions is given as The net transmission time is estimated as Therefore, the achieved throughput can be estimated as Taking into account the probability that a node can transmit in a specific idle time,   , and the CC channel's blocking probability,   , that can be expressed as (25) can be rewritten as

Packet Size Impact Evaluation
The evaluation of the impact based on different data packet size was performed using MATLAB.The main evaluation parameters values are listed in Table 1 and they are similar to that defined in IEEE 802.11MAC.The duty cycle time is assumed to be  second.Figure 3 shows the effects of changing the packet size on the relationship between the node population and the induced delay for the two categories of the packets, RT and NRT.In the simulated scenario, the channel idle time is fixed,   = 0.5 s, number of the channels is 10, and the arrival rate at both of the queues is the same,   =   = 3 pkt/s.The performance shows linear behavior of the RT packets starting from the low to the high node densities while the performance of the NRT packets behaves exponentially starting from the medium nodes population,  = 5.From the figure, the average delay increases as the packet size increases even though the delay values are similar in low nodes density with values less than 0.2 s.The difference of the induced delay values between RT and NRT packets increases as nodes density increases and that can be explained given that the RT packets have the advantage in the CC contention.
In Figure 4, the trend towards the exponential behavior for both RT and NRT packet delay curves is so clear.In this simulation, the node population is fixed at  = 5, 3 pkt/s is the arrival rate for each node, and 10 channels are being utilised.In short busy time periods, the values of the average delay are low, below 0.1 s.As the channel's busy time increases, the delay increases for all packet sizes although  the large-size packets are exposed to longer delay.When the packet size is 10 kb and   = 0.9 s, the induced delay records its highest values: 0.43 s and 0.94 s for RT and NRT packets, respectively.Figure 5 presents the effects of the packet size on the relationship between the number of the available channels and the average delay.Nodes density is fixed at  = 5, and channel idle time is   = 0.5 s.The induced delay for NRT packets is very long when the number of the available channels is less than 5 to the extent that the system losses its  stability with large-size packets, i.e.,  = 10 kb.The curves of the induced delay fall steeply for NRT packets as the number of channels increases to 5 channels and gradually decline as  exceeds 5 channels.For large-size packets of 10 kb, the declining trend is slower compared to other packet sizes.From the figure, it is obvious that medium-size packets of 3 kb can cope with the miserly licensed radio environment while large-size packets cannot.Resulting interference contributes more to increasing the induced delay for large-size packets since the collided packet has to be retransmitted again.
Figure 6 shows the performances of the PCMAC protocol and DOSS MAC protocol with various sizes of the data packet.The latter protocol was improved and modelled in [17].Nodes density equals 5 and 7 data channels are exploited.Although DOSS MAC offers a shorter delay time in short lengths of channels busy times, it behaves exponentially in longer busy times starting from 0.4 s.PCMAC presents a more stable performance in both short and long lengths of channel idle times.Generally, the average delay time increases as the packet size becomes larger in both of PCMAC and DOSS protocols.
Figure 7 illustrates that the throughput can be significantly affected by packet size.In the simulation, the idle time and the number of channels are fixed at   = 0.5 and  = 5, respectively.The throughput curves growths have an exponential trend for all packet sizes; however the curve of small-size packet,  = 1 kb, shows the slowest trend.The impact of the time gap between the contention time   and the packet size  is clear in case of  = 1 kb.As the number of nodes increases, the contention time increases; i.e., the time gap between   and   decreases, until it approaches the value of the packet size at which the throughput reaches its peak, in the range of  = 7 and  = 8, before declining gradually.In this simulation, medium-size packets show a much closer performance to that of large-size packets.
In Figure 8, the significant impact of the packet size on the relationship between the channel idle time and the achieved throughput is illustrated.Generally, the throughput increases dramatically as channel idle time increases, but with packets of medium size,  = 3 kb, the throughput performance is better compared to other sizes.For packets of 1 kb size, the time gap between the contention time and the packet time plays a main role since the packet  size determines throughput performance for larger packets.The higher the achieved throughput, the more efficient the utilization of the radio channels.The fluctuation of the throughput curve for packets of 10 kb size is because of the submission nature in which the receiver deals with the data packet as a block.As a matter of fact, the latter feature is also responsible for the high probability of interference leading to longer delay for large-size packets.Because of the burst nature of the traffic in PCMAC protocol, it shows better performance than DOSS MAC protocol in terms of the achievable throughput especially with small-size packets as illustrated in Figure 9.Using medium-size packets,  = 3 kb, improves DOSS MAC protocol's performance significantly although the nodes density increasing will result in slowing down the throughput increasing due to the contention in the CC channel.The simultaneous transmission nature, i.e., concurrent submission through many channels, for the packets in DOSS causes the high sensitivity against increasing nodes density.
In general, at the same time the medium-size packets outperform small-size packets in terms of the achieved throughput and channel's utilization; they show closer performances to them in terms of the latency.Moreover, employing packets of size 375 byte can be the optimal choice when using an adaptive architecture for the network such as that proposed in [26].Packets of medium size that are closer to the common sizes used in WSN standards, up to 128 bytes, ensure a robust performance in the alternative workflow that is CR-based

Conclusion
The size of the data packet in CRSN networks plays a key role not only to enhance the throughput and increase the and DOSS [17].
efficiency of channels' utilization, but also to mitigate the harmful interference.This study has examined the impact of packet size on the performance of CRSN in terms of two main performance metrics, namely, the delay and the throughput.Simulation results show that exploiting the appropriate size within an efficient MAC protocol, such as PCMAC, significantly enhances the performance.Medium-size packets outperformance is proven by the short induced latency, which is suitable for critical data, and the increased throughput.Furthermore, the results show that large-size packets not only fail to cope with a poor radio environment, but also do not enhance the throughput significantly in contrast to the packets of medium size that perform better in several conditions.Through this study, it is evident that medium-size packets are the optimal choice for adaptive CRSN networks despite the current trends of using small-size packets.

Figure 5 :
Figure 5: Average delay vs number of channels.

Figure 6 :
Figure6: Impact of the packet size on the induced delay in PCMAC[16] and DOSS[17] protocols.