On the Optimality of Generic Rate-Based AIMD and AIAD Congestion Control Schemes in Cognitive Radio Sensor Networks

Investigating the optimality and the modeling of congestion control schemes is crucial in order to provide quality of service (QoS) for various applications in cognitive radio sensor networks (CRSNs). This paper develops an analytical framework to study the optimality of rate-based generic AIMD and AIAD congestion control schemes. In this way, a congestion model is introduced to describe the congestion behavior of CRSNs. A semi-Markov chain (SMC) is proposed to model the steady-state sending rate distribution of source nodes based on the congestion model. The optimality of generic AIMD and AIAD, based on the proposed models, is analyzed in order to maximize the defined rate-congestion ratio (RCR). The analytical results are verified through various NS2-based simulations in CRSNs.


Introduction
Dynamic spectrum access (DSA) is one of the main approaches to have spectrum-efficient wireless networks [1]. Cognitive radio (CR) is frequently used as a capable tool in order to provide dynamic spectrum access in wireless networks. A wireless network with CR nodes is called cognitive radio network (CRN). A wireless node, equipped with CR, operates on the spectrum channels opportunistically based on the CR basic operations: spectrum sensing, decision, and handoff [2]. The CR nodes do not have priority to access the wireless channels in the CRNs because the channels are licensed to some licensed users called primary users (PUs) [1]. The CR nodes can use the licensed channel in the absence of PUs and should leave the channel immediately, if a PU enters in its licensed channel [1]. Cognitive radio technology is widely used in wireless sensor networks (WSNs) to have spectrum-efficient networks and reserve the limited resources of sensors in WSNs. The WSNs with CRequipped sensors are called cognitive radio sensor networks (CRSNs) [3].
Disregarding the activity of PUs and the unique characteristics of CRSNs (such as spectrum sensing and spectrum mobility) in the protocols of MAC, routing, and transport layers may lead to the violation of the main objectives of CRSNs. Hence, studying the optimality of the protocols with regard to CR-related parameters is a crucial task for CRSNs. In this paper, we focus on the optimality of the transport layer protocols in CRSNs. The performance of congestion control schemes is important to provide the QoS of the diverse applications in CRSNs. The performance metrics such as congestion, throughput, and delay should be studied in order to provide various QoS guarantees in CRSNs. In this way, it is needed to tune the basic congestion control schemes in CRSNs in order to reach the QoS objectives. However, there is a limited analytical study on the optimality and performance evaluation of transport layer protocols in CRSNs and also in CRNs.
In [4], a simulation-based study on the performance of existing congestion control schemes is done over CRSNs to reveal the CRSN challenges in transport layer protocols. The challenges of real-time transport over CRSNs in different 2 International Journal of Distributed Sensor Networks spectrum environments of smart grid are studied in [5]. In [6], TCP throughput and efficiency over CRNs are studied. The impact of sensing period, PUs activity, and wireless channels number on the throughput of TCP is investigated in [7]. Authors in [8] study the behavior of TCP throughput, round trip time (RTT), and congestion window size based on the sensing period, the PUs activity, and the heterogeneity of channels. A transport protocol for cognitive radio ad hoc networks is proposed in [9]. Furthermore, the impact of sensing time and the changes of available bandwidth of CR users on the behavior of TCP congestion control is investigated. In [10], a study on TCP performance in CRNs with regard to the congestion window size, RTT behavior, and retransmission timeout (RTO) is done. TCP throughput is evaluated based on PUs activities and the number of available channels in [11]. An equation-based transport protocol for CRNs is proposed in [12]. Authors in [13] evaluate TCP endto-end throughput, delay, and packet drop probability with regard to packet size, activities of PUs, sensing time, and accuracy.
As described above, most of the previous work on the transport layer of CRNs and CRSNs concentrates on the simulation-based performance evaluation. Furthermore, there is no study on the optimality and the modeling of rate-based congestion control schemes in CRSNs and CRNs. However, study on the optimality of congestion control schemes based on the analytical models is required in order to make better QoS provisioning in different applications. The real time and reliability are two main factors in the delay-sensitive and loss-sensitive applications that should be considered. The type and the parameters of the ratebased congestion control schemes have significant effects on the mean sending rate of source nodes and the congestion level of network. Increasing the sending rate in congestion control schemes leads to higher mean rate. On the other hand, it increases congestion probability of the CR nodes in the network. Hence, it is necessary to find the optimal congestion control scheme in order to provide both the lowest congestion probability and the highest sending rate. To the best of our knowledge, there is no study on the optimality and the modeling of rate-based congestion control schemes for CRSNs in the current literature.
In this paper, an analytical study on the optimality of ratebased generic AIMD and AIAD congestion control schemes in CRSNs is presented. The main contributions are the following.
(i) A congestion model is proposed for CRSNs. (ii) A semi-Markov chain (SMC) is proposed to model the steady-state sending rate distribution of source nodes. (iii) The optimality of rate-based generic AIMD and AIAD schemes is investigated based on the proposed sending rate distribution model of source nodes and the congestion model. In this way, we define the ratio of the mean sending rate to mean congestion probability (RCR) as a metric to measure the balance between mean sending rate and congestion probability. It is deduced by calculation that the optimal   Figure 1: (a) The CRSN model. CR collecting sensors send data via CR relay nodes toward the sink station. Based on the established end-to-end connections between source nodes and the sink station, the network can be seen as a set of multiple separated subnetworks. (b) Systematic view of CRSN. Each subnetwork is considered as a system with multiple sources. scheme to maximize the RCR is the AIMD (1, 3) scheme for the maximum sending rate of 100 packets per time unit.
The rest of this paper is organized as follows. In Section 2, system model of the CRSN is defined. Section 3 presents the proposed congestion model. The steady-state sending rate distribution of source nodes in the CRSN is proposed in Section 4. In Section 5, the optimality of rate-based congestion control schemes is investigated. Simulation results and verifications are presented in Section 6. Finally, the conclusions are presented in Section 7.

System Model
We model a cognitive radio sensor network as a collection of CR collecting sensors, CR relay nodes, and a sink station (see Figure 1(a)). The CR collecting sensors sense their event area and send the appropriate sensed data packets toward the sink station. The CR relay nodes do not generate any data and only forward the data packets from the source nodes toward the sink station. Based on the established end-to-end connections between the CR collecting sensors and the sink station, the network can be seen as a set of subnetworks. A subnetwork consists of the end-to-end paths that have at least one common relay node. Each subnetwork can be seen as a separate system with its own congestion behavior with regard to the sending rate of CR collecting sensors. A subnetwork has a lifetime depending on the network characteristics and established end-to-end paths. We study a subnetwork in its lifetime. In Figure 1(a), such a CRSN with N subnetworks is depicted. Generally, we can consider a sensor network as a set of multiple systems, each with finite sources, and a single sink station. The systematic view of a sensor network is shown in Figure 1 A CR node in this system operates in two main phases: a spectrum sensing phase and a data exchanging phase. In the spectrum sensing phase, the CR node senses spectrum channel to detect the presence of primary users. The CR node enters data exchanging phase after it finds a free channel. It is common in cognitive radio nodes to periodically sense the spectrum with a period of . In the sensing phase, a CR node senses the spectrum channel for a duration of time units. Primary users' activity can be modeled by a two-state ON/OFF Markov model with a mean entrance rate of and mean departure rate of [14]. We assume that the sensing range covers wireless channels, licensed for PUs. At each channel a separate and independent primary user operates based on the traffic model of PUs.

Congestion Model
In wireless sensor networks, congestion control is usually performed by the rate adjustment algorithms [15]. Rate adjustment is to regulate the sending rate of the source nodes according to the congestion notification received from the sink station. Simple rate adjustment and exact rate adjustment are basic rate adjustment algorithms [15]. In the simple rate adjustment algorithms, the rate is controlled based on a single congestion bit. The additive increase multiplicative decrease (AIMD) and additive increase additive decrease (AIAD) are two variations of the simple rate adjustments. On the other hand, in the exact rate adjustment algorithm, the rate is adjusted based on the exact congestion level of the network. In this paper, we investigate the performance and the optimality of the generic AIMD and AIAD rate adjustments as the congestion control schemes which are executed in the sink station. The regulating decisions are made in the sink station and sent to the collecting CR sensors periodically with the period of (the sink notification period). The minimum value of the sending rate is assumed to be one packet per second. We assume that the collecting CR sensors have a higher bound of packets per second on their sending rate because of the limitations of the sink station.
A cognitive radio sensor subnetwork is considered as a system which receives the traffic of some CR collecting sensors and forwards them toward the sink station. The collecting CR sensors rate is regulated through generic AIMD and AIAD schemes based on the congestion level in the subnetwork. The source nodes rate of the subnetwork can vary between 1 and packet per second. Generally, the congestion behavior of a subnetwork can be modeled by the pairs of ( , Ω ), where is the source nodes rate of subnetwork ( = 1, 2, . . . , ) and Ω is the subnetwork congestion probability with regard to the source nodes rate. The trend of Ω versus is a monotonically increasing curve such that, with increasing the collecting CR sensors rate of the subnetwork, the congestion probability will increase. In general, for the rates lower than a specific rate, that is, , there is almost no congestion in the subnetwork. On the other hand, for the rates higher than a specific rate, that is, , the congestion probability is close to one. For the rates between the two thresholds, that is, and , the congestion probability increases with the rate. The Ω curve in this region can be approximated by a line. The congestion model of a subnetwork is depicted in Figure 2. Finding the congestion probabilities is subject of a separate research and will not be addressed in this paper. Based on the congestion model, the sending rate distribution of CR collecting sensors, which is regulated by generic AIMD and AIAD schemes, can be calculated (see Section 4).

Sending Rate Distribution of the Collecting Sensors in CRSNs
The regulated sending rate process of a generic rate-based AIMD scheme can be modeled by a semi-Markov chain (SMC) with the transition probabilities and also of the generic rate-based AIAD scheme: where is the current regulated sending rate of source and Ω is the congestion probability in the subnetwork between the source nodes and the sink station while the sending rate of source nodes is . The * is the new adjusted sending rate of the source nodes. The AIMD and AIAD increase the rate additively by INC factor if there is not any congested node at the subnetwork at the duration of . The AIMD/AIAD decreases the sending rate multiplicatively/additively by DEC if a congestion is detected at the subnetwork at the period . We represent the AIMD and AIAD schemes with the INC A CR collecting sensor regulates its sending rate based on the AIMD/AIAD algorithm and sends with the regulated rate for time units. Hence, sojourn time of being in the various rates is equal to and is not exponentially distributed and we have a semi-Markov chain (SMC). If the behavior of the SMC is observed at discrete instances that the state transitions happen, its embedded DTMC will be obtained [16]. In Figure 3, the embedded DTMC of sending rate process based on generic AIMD rate adjustment is illustrated for maximum sending rate = 8, increasing factor INC = 1, and decreasing factor DEC = 2.
The evolution process of sending rate is a finite state, aperiodic, and irreducible Markov chain; hence there is a unique steady-state distribution for this embedded DTMC [16]. Calculating the steady-state distribution of the embedded DTMC, that is, = ( 1 , 2 , . . . , ), can be done by solving a system of linear equations with independent equations and unknown variables. For the large values of , the transition matrix will be large. Also, the matrix is sparse. Hence, we use the LSQR method [17] in order to solve the system of linear equations. Since the sojourn time of all states is equal to , the steady-state distribution of embedded DTMC equals steady-state distribution of the SMC. The steady-state distribution of SMC can be calculated through the steady-state distribution of embedded DTMC as follows: where ( 1 , 2 , . . . , ) is the steady-state distribution of embedded DTMC and ( 1 , 2 , . . . , ) is the steady-state distribution of SMC.

Optimality of Rate-Based AIMD and AIAD Schemes
The type of rate adjustment scheme and the increasing and decreasing factors of scheme, that is, INC and DEC, affect the sending rate distribution of CR collecting sensors and congestion probability in CRSNs. Increasing the sending rate causes the higher mean rate and decreases the delay overhead of congestion control schemes. On the other hand, it can increase the congestion probability in CRSNs. Since both of delay and reliability should be considered in real-time reliable applications, it is important to establish a trade-off between mean rate and mean congestion probability in CRSNs. In this way, we define rate-congestion ratio (RCR) based on the mean sending rate and mean congestion probability as follows: where Ω and are mean congestion probability and mean sending rate of rate adjustment scheme, respectively. Mean congestion probability is calculated based on the congestion model. Mean sending rate is obtained based on the steady-state distribution of the proposed SMC, that is, ( 1 , 2 , . . . , ).
Maximizing this ratio will be useful to provide both real time and reliability in CRSNs. The optimal rate adjustment scheme and optimal values of rate increasing (INC) and decreasing (DEC) factors can be obtained based on the proposed SMC model of sending rate and congestion model. Our variables are (i) type of rate adjustment scheme; (ii) rate increasing factor of the scheme (INC); (iii) rate decreasing factor of the scheme (DEC).

Calculation of Optimal Scheme.
As noted in Section 4, the generic AIMD and AIAD rate adjustments are considered. The INC factor is an integer value at the range of [1, − 1] for both AIMD and AIAD schemes (minimum rate and maximum allowable rate of AIMD and AIAD schemes are 1 and packets per second, resp.). Also, DEC factor is an integer value at the range of In the congestion model, the value of can be between 1 and ; that is, 1 ≤ ≤ , and the value of varies between 1 and ; that is, 1 ≤ ≤ . Hence, the total number of possible congestion models is ∑ =1 ∑ =1 1 = ( + 1)/2. However, all the congestion models for various networks are not practical. We can investigate the optimality of generic AIMD and AIAD rate adjustments for all the possible models for a given value of . For each congestion model, in order to maximize the RCR ratio, the optimal rate adjustment algorithm is obtained through exhaustive search on the possible values of INC and DEC factors for the different values of .
In particular, the AIMD scheme with increasing factor of 1 and decreasing factor of 3, that is, AIMD (1, 3), is obtained as the optimal scheme in order to maximize the RCR ratio while the value of is considered as 100 packets per time unit. The optimal AIAD scheme alters for various congestion models. The increasing factor of the optimal AIAD scheme is obtained as 1 and the decreasing factor varies per different congestion models for the equal to 100 packets per time unit.

Simulation Results and Verifications
The obtained results through models are verified using simulations by CogNS simulation framework [13] which is a simulation framework for cognitive radio networks based on Network Simulator 2 (NS2) [18]. Default simulation settings and the configuration parameters of the CRSN are summarized in Table 1 Figure 3: The embedded DTMC of sending rate process based on generic AIMD rate adjustment with maximum sending rate = 8, increasing factor INC = 1, and decreasing factor DEC = 2. The Ω is the congestion probability in the subnetwork between the source nodes and sink while the sending rate of the source nodes is . nodes and a sink station. There are 6 wireless channels ( ) with the same capacity of 1 Mbps. There is one primary user per wireless channel with the entrance rate ( ) equal to 1 and the departure rate ( ) equal to 3. Sensing time ( ) and sensing period ( ) are 0.2 seconds and 1.2 seconds, respectively. A simple CSMA/CA-based multichannel protocol is considered as MAC protocol. The AODV is used as routing protocol and queue management in the network layer is done based on droptail strategy. The generic rate-based AIMD and AIAD schemes are considered as transport protocols. The size of packets is 120 bytes. The maximum sending rate of AIMD and AIAD schemes is 100 packets per second. There are different events such as buffer occupancy, packet rate, node delay, channel status, and reliability parameters which are used to detect congestion in WSNs [15]. In our simulations, the queue length (buffer occupancy level) of nodes is assumed as congestion detection parameter. The queue size of nodes is 100 packets and the queue length threshold for the congestion detection is 95 packets.

The Congestion Behavior of a Subnetwork.
In order to show that the congestion behavior of a subnetwork can be generally demonstrated by the proposed congestion model, it is needed to find appropriate thresholds, that is, and , in congestion probability curve obtained through simulation for various CRSN configurations so that the curve in the region between and can be fitted by a line. Based on the CRSN configuration described in Table 1, we consider a subnetwork with two collecting CR sensors and six relay nodes. Table 2 shows four different experiments in order to obtain the congestion behavior of the subnetwork. The default parameters (Table 1) are considered in experiment I. In experiment II, PU activity is changed to ( , ) = (1, 3). In experiment III, sensing period is set to 0.4 seconds. In experiment IV, we consider traditional wireless sensor networks so that nodes are not CR ( = 0) and there is not any PU.
In Figure 4, the congestion behavior of the subnetwork is illustrated for experiments I, II, III, and IV. In these figures, the obtained congestion probabilities through simulation for all possible sending rates of collecting CR sensors are demonstrated by the black circle-marker curve. For each curve, the congestion model is fitted on the simulation curve with minimum fitting error and is demonstrated by red curve. The best threshold values of the congestion model are calculated in order to minimize the fitting error. The region between and is depicted by gray region in these figures.  In Figure 4(a), the values of and are obtained to be 42 and 51 packets per second, respectively. In experiment II, the activity of the PUs is increased. Therefore, the subnetwork will be congested with lower sending rates in comparison with experiment I. Consequently, the values of and are 34 and 42 packets per second, respectively, in Figure 4(b). Since the sensing period is decreased to 0.4 seconds in experiment III, the overhead of spectrum sensing is increased. Therefore, the capacity of network reduces significantly and the values of and are calculated as 24 and 30 packets per second, respectively (Figure 4(c)), which are smaller than the values in experiments I and II. Experiment IV is related to traditional wireless sensor networks. In this experiment, the values of and are calculated as 49 and 59 packets per second, respectively. Because the CR nodes can communicate on the channels without the presence of PUs and without spending some portion of time for spectrum sensing, the threshold values are larger than the previous experiments' thresholds.
With regard to the simulation results, it is reasonable to model the congestion behavior of a subnetwork by the proposed congestion model with some fitting errors. In other words, the simulation results show that we can find two threshold values of the sending rates for each subnetwork and approximate the region between the thresholds with a line.

Optimal AIMD and AIAD Schemes.
In this section, the optimality of AIMD and AIAD schemes in order to maximize the RCR ratio is investigated through simulation for the experiments mentioned in Table 2. In this way, for each experiment, the value of RCR ratio is obtained for all possible AIMD and AIAD schemes. As the default parameters of the CRSN described in Table 1, the maximum allowable rate of AIMD and AIAD schemes, that is, , is 100 packets per second. Consequently, the value of INC factor is at the range of [1,99] packets per second for both AIMD and AIAD schemes. The value of DEC factor is at the range of [2,100] and [1,99] packets per second for AIMD and AIAD, respectively.
In Figures 5, 6, 7, and 8, the value of the RCR is plotted based on the all possible INC and DEC factors for AIMD and AIAD schemes in experiments I, II, III, and IV, respectively. In experiment I, the optimal AIMD scheme is found to be the one with the INC factor of 1 and the DEC factor of 3, that is, AIMD (1, 3) that gives the maximum value of 864.5974 for the RCR (Figure 5(a)). Also, the optimal AIAD scheme in As it can be seen in the simulation results, the AIMD (1, 3) is the optimal scheme in all experiments. The optimal AIAD scheme is different in various experiments. The INC factor of the optimal AIAD is one in all experiments. However, the value of DEC factor is 32, 26, 18, and 37 in experiments I, II, III, and IV, respectively. Hence, the optimal AIMD and AIAD schemes obtained based on the simulations verify the calculated optimal schemes with regard to the proposed semi-Markov chain (SMC) of the sending rate of the collecting CR sensors and the congestion model.

Conclusions
In this paper, we have investigated the optimality of generic rate-based AIMD and AIAD congestion control schemes. In this way, a congestion model is proposed to describe the congestion behavior of CRSNs. Based on the congestion model, the steady-state sending rate of collecting CR sensors has been modeled through the proposed semi-Markov chain (SMC). With regard to the congestion model and the sending rate distribution, we have defined the RCR as the ratio of mean sending rate over mean congestion probability. In order to maximize the RCR, the optimality of AIMD and AIAD schemes has been investigated based on the proposed models. In particular, the AIMD scheme with the rate increasing factor of 1 and rate decreasing factor of 3, that is, AIMD (1, 3), has been calculated as the optimal scheme for the maximum sending rate of 100 packets per time unit. The analytical results have been verified through the NS2-based simulations for CRSNs.
Future study in this research area could be obtaining a closed-form formula for RCR and maximizing it with regard to the parameters such as spectrum sensing time and period of CR nodes.