EURASIP Journal on Applied Signal Processing 2005:2, 116–128 c ○ 2005 Hindawi Publishing Corporation LAMAN: Load Adaptable MAC for Ad Hoc Networks

In mobile ad hoc radio networks, mechanisms on how to access the radio channel are extremely important in order to improve network e ﬃ ciency. In this paper, the load adaptable medium access control for ad hoc networks (LAMAN) protocol is described. LAMAN is a novel decentralized multipacket MAC protocol designed following a cross-layer approach. Basically, this protocol is a hybrid CDMA-TDMA-based protocol that aims at throughput maximization in multipacket communication environments by e ﬃ ciently combining contention and conﬂict-free protocol components. Such a combination of components is used to adapt the nodes’ access priority to changes on the tra ﬃ c load while, at the same time, accounting for the multipacket reception (MPR) capability of the receivers. A theoretical analysis of the system is developed presenting closed expressions of network throughput and packet delay. By simulations, the validity of our analysis is shown and the performances of a LAMAN-based system and an Aloha-CDMA-based one are compared.


INTRODUCTION
Traditionally, medium access control (MAC) mechanisms are used to face off the classical collision resolution problem in multiple-access channels with single-packet communications.That is, if two or more nodes send packets through the radio channel simultaneously, these packets collide and consequently, information is lost.To recover the information, the collided packets have to be retransmitted.Although the common aim in such channels is a MAC able to come close to efficiency equal to one, by avoiding collisions as much as possible, the approach considered in MAC design is different whether the system is centralized or decentralized.While centralized systems mainly present a node scheduling problem of variable complexity, decentralized systems present many different new challenges, like the availability of each node to communicate directly with any other node or the half-duplex transceiver characteristics, that must be overcome.In this paper, we will focus on decentralized systems.
Regarding decentralized MAC algorithms, multiple access with collision avoidance (MACA) [1] presented a request-to-send (RTS) and clear-to-send (CTS) handshake for channel reservation during transmission.Afterwards, many works have been done in order to minimize the effect of this RTS/CTS information exchange (see [2] and references therein).In other mechanisms such as carriersense multiple access (CSMA) [3,4], the channel is sensed to know whether it is idle or busy; if the channel is sensed idle for a period longer than a guard time, transmission is done.In the case of collision, the node executes a backoff procedure before retransmission.Finally, in basic timedivision multiple access (TDMA) systems like Bluetooth (not totally decentralized but still considered ad hoc; see https://www.bluetooth.org/spec/),collision is avoided by assigning a slot time to each node.Clearly, the collision resolution efficiency of each of these techniques will mainly depend on the traffic load of the network and none of them is designed to adapt to traffic load changes.Therefore, the optimal MAC procedure for decentralized systems would be similar to the one presented in advanced GPS electronic navigation tool (AGENT) [5], able to combine, according to the traffic load, contention and conflict-free [6] channel access mechanisms in a decentralized fashion.AGENT is a transmitteroriented protocol, where time is slotted, and each slot is allocated to a node that has priority access the channel.By means of an RTS/CTS handshake, the node with priority indicates to its neighbors whether it has a packet to transmit or not.If it transmits, no one else is allowed for transmission.On the contrary, if the node with priority does not have a packet to transmit, other nodes with a packet for transmission can access the channel with a designed probability.By such procedure, the system behaves similar to a TDMA system at high traffic loads and similar to a slotted ALOHA at low traffic loads.However, none of these MAC techniques considers multipacket communications and hence, show low channel-use efficiency.Furthermore, while new signal processing techniques have been developed in order to allow multiple concurrent transmissions by introducing the capability of detecting multiple packets simultaneously, little has been reported on how MAC techniques should take into account these new techniques developed at the PHY layer.In other words, the introduction of diversity, such as code diversity or space diversity, provides multipacket reception (MPR) at the PHY layer and shows improvement in the system performance [7,8].Consequently, it comes to one's mind that the knowledge of this new PHY capability at the MAC layer should provide valuable information in the design of new MAC techniques.This idea of using interaction between layers in order to improve and reach an optimal system performance is known as cross-layer [9,10].Note that in multipleaccess channels with multipacket communications, the collision resolution problem results in a more complex problem, where the MAC must control the access of multiple users, not only to the channel, but also to other resources (spreading codes, antennas, etc.) when these resources are scarce.
Recently, some papers in the literature refer to the PHY layer MPR capability by using the so-called MPR matrix C, and use this MPR matrix in the development of centralized MAC procedures [11,12,13].Each element of this matrix, c m,k , is the probability of successfully received k packets when m packets have been sent.Basically, assuming some statistical independency between both packets and nodes, these probabilities can be obtained from the bit error rate (BER) and binomial distributions.The work in [11] is perhaps the first to introduce the concept of MPR matrix.Besides, in [12], a cross-layer centralized approach is described.Assuming that each node has a packet with probability q i and considering the MPR receiver matrix, an optimal node access set is obtained in order to schedule node's access to the channel aiming at packet delay minimization and network throughput maximization.However, with the use of the information on the MPR matrix only, PHY-MAC interaction reduces to a BER information exchange.In [13], the idea of [12] is used to show how the use of additional parameters or information agents, such as the knowledge of the active nodes, can further improve system performance.
Furthermore, little has been reported regarding decentralized MAC protocols for ad hoc multipacket systems, where nodes can transmit directly to each other and any node is a potential receiver or transmitter.A very interesting work is presented in [14], where a comparison of a CDMA-Alohabased decentralized system with MPR receivers is compared with its equivalent centralized system.As in [14], other works [15,16] consider CDMA ad hoc networks in which the number of codes or channels depend on the number of nodes in the network.Only [17] refers to the problem of a CDMA network with a fixed number of spreading codes and variable number of nodes.However, in [17], a peer-to-peer communication link is established by means of an RTS/CTS-based channel reservation mechanism and unfortunately, simultaneous reception of packets is not considered.
The CDMA-TDMA-based MAC protocol for ad hoc networks presented here is an extension of the work in [18,19] that aims at throughput maximization in decentralized multipacket environments.Particularly, the idea behind the load adaptable MAC for ad hoc networks (LAMAN) protocol is to go one step further on the concept presented in [5] and it is intended to design a decentralized multipacket MAC protocol able to efficiently combine contention and conflict-free components.The key point is to manage time and code resources by means of two degrees of freedom: the retransmission probability P r and the number of spreading codes to be allocated to a particular node N c , and what is more, by always accounting for the receiver's MPR capability.We note that cross-layer interaction (see Figure 1) is used in order to improve and reach an optimal system performance and that the fact that codes are allocated in a decentralized fashion is, to the best of our knowledge, a totally new approach in ad hoc networks.Moreover, LAMAN protocol also deals with the case when the number of spreading codes in the network is less than the number of nodes.
In summary, under the context of ad hoc networks, the LAMAN protocol has been specially designed to (i) deal with both the direct communication between nodes and the half-duplex transceiver characteristics; (ii) present an optimal collision resolution mechanism depending on the traffic load; (iii) be a multipacket protocol that fully exploits the PHY layer MPR capabilities; (iv) efficiently manage use of a scarce number of spreading codes.
The rest of this paper is structured as follows.In Section 2, a system description is presented including a general network description and the LAMAN protocol portrayal.In Section 3, the concepts of receiver and network MPR capabilities are defined.Section 4 is devoted to the protocol analysis and system optimization.This analysis is based on a twodimensional Markov chain and ends up with closed expressions for the optimization of the throughput and the delay of the network.In Section 5, the validity and the accuracy of our analysis are studied.Finally, we present simulation examples and comparisons with existing systems in Section 6 and conclusions and further work in Section 7.

General description of the network
We consider a single-hop (fully connected) packet-oriented CDMA-TDMA ad hoc network in which all nodes are identical and share the same common channel.Each node has the knowledge of the spreading codes used in the network and the number of nodes present in that network.Each node can be either a transmitter or a receiver, but not both at the same time, that is, half-duplex communication is assumed.It is also assumed that all nodes in the network are perfectly synchronized (synchronization and association procedures could be similar to the ones in [4] and are not tackled here).
The network is characterized by both the number of users M in the network and the number of spreading codes N to be used in this network.Note that M ≥ N. Opposite to common CDMA systems, nodes do not have a unique preassigned code, but on the contrary, a number of codes N c are assigned to a particular node and the remaining nodes randomly choose codes among the N r residual ones.Time is slotted and the duration of a slot is the time needed for the transmission of a data packet.In the case of unsuccessful transmission of a data packet, packets are retransmitted until these packets are properly received by their intended nodes.

LAMAN protocol description
The LAMAN protocol is a transmitter-oriented protocol, where each time slot is allocated to a particular node.Such a particular node is called the multiple node, whereas the other nodes in the network are called simple nodes.The multiple node is changed once every s slots such that if the multiple node is changed in a slot-by-slot basis (s = 1), each node in the network becomes a multiple node once every M slots.During one time slot, a number of codes N c (N c ≤ N) are allocated to the multiple node for sending its packets and the M − 1 simple nodes contend for using the residual codes N r (N r = N − N c ). Particularly, at the beginning of a slot, the multiple node transmits and retransmits its packets with a probability equal to one, having the possibility to send up to N c packets simultaneously by using one different code per packet (notice that, although N c codes are reserved to the multiple node, it might happen that the multiple node does not use all the N c codes).At the same time, simple nodes send packets by using codes randomly chosen from the set of N r codes.It is possible that two or more simple nodes simultaneously choose the same code for sending a packet.If this is the case, such packets collide and are lost.Codes used by more than one node simultaneously are named collided codes and consequently, packets sent by means of these collided codes are named collided packets.On the contrary, packets sent simultaneously using different codes are called noncollided packets.A simple node is limited to send up to one packet per slot and hence, to use up to one code per slot only.If at the beginning of a slot, a simple node has a packet to be transmitted for the first time, it is called unbacklogged simple node and the packet is transmitted with a probability equal to one.If on the contrary, a simple node has a packet waiting for retransmission, it is called backlogged simple node and retransmits its packet with a probability equal to P r .Another parameter that characterizes the performance of the LAMAN protocol is the number of free nodes M f that are in the reception mode at a given time, that is, the number of nodes that do not send a packet in a given slot.The number of free nodes M f in one slot is computed in Section 4. Figure 2 presents an example of a system with eight nodes (M = 8) and four codes (N = 4) with two of them allocated to the multiple node (N c = 2).Assuming that the multiple node is changed once every slot, the length of the frame in that example is eight time slots.In slot 1, the multiple node is the node 1 and uses two codes to send packets to nodes 4 and 5 (codes are indicated by means of arrows of different grey shade).Nodes 2 and 8 also transmit a packet to nodes 7 and 3, respectively.However, nodes 2 and 8 randomly choose the same code and hence, packets collide and are lost.Notice that in that example, M f = 4 (nodes 3, 4, 5, and 7 are not in the transmission mode).Besides, node 6 sends a packet to node 1 and, although this packet does not collide, it is also  lost because node 1 is in transmission mode.In that situation and considering a fully connected network, nodes 5 and 4 receive five packets to demodulate, but only one packet among these five packets is intended for each of them.Success in the transmission of such intended packets depends on the MPR capabilities of the receivers.In the following slot, the general behavior of the network would be similar to the one stated here.However, in slot 2, the multiple node would be node 2, and node 1 would become a simple node.Notice that, at a given slot, packets unsuccessfully transmitted in the previous slot are retransmitted with probability P r by simple nodes, and with probability equal to one by the multiple node.
With the protocol description presented in this section, surely the reader has realized that the priority the multiple node has over the network resources (time and codes) is controlled by means of parameters P r and N c .More precisely, the contention and conflict-free components of the protocol are controlled by means of P r and N c , respectively.In the following sections, we will see that by taking into account the traffic load and the receiver MPR capability, the aim of the LAMAN protocol is to properly design parameters N c and P r to achieve throughput maximization and/or delay minimization.

RECEIVER AND NETWORK MPR CAPABILITIES
As previously stated in Section 1, one of the main motivations for the novel cross-layer protocol presented in this paper is to fully account for the PHY layer MPR capability at the MAC layer.In Figure 3, a proposed receiver architecture is shown.The MPR capability is obtained by means of a multiuser detection (MUD) [20], in this case, a bank of N matched filters.We focus on wireless LANs in indoor environments that cover a small area with a relatively small number of nodes and then, we will ignore the near-far effect.Furthermore, we also propose an additional stage in order to avoid excessive signal processing in posterior stages of the receiver.To this end, the output of the bank of matched filters is concatenated to N power detectors and thresholds for the decision of collided codes.The output of the decision block consists of N binary signals indicating whether the corresponding code is detected as a collided code (0) or not (1).Hence, this signal is used to decide if further processing of the corresponding matched filter output signal is needed.Besides, the knowledge at the PHY layer of the N c codes allocated to the multiple node will be used, not only to know the range of available codes when the node is in the transmission mode, but also to reduce the range of possible collided codes to N r when the node is in the reception mode.This work considers perfect detection of collided codes and hence, false-alarm or miss-detection probabilities are negligible.
With such defined receiver architecture, the receiver MPR capability mainly depends on both the SNR and the multiple access interference (MAI).We assume that the data is BPSK modulated and the total number of received packets (collided and noncollided) is m.Under the Gaussian assumption on the MAI and ignoring any possible near-far effect, the BER at the output of a matched filter can be computed by ( Expression ( 1) only applies at the output of the matched filters corresponding to noncollided packets because BER for collided packets is equal to one.However, notice that collided packets interfere with noncollided packets and must be considered as MAI in the computation of (1).In (1), ρ refers to the cross-correlation coefficient between two different codes and is assumed to be equal for any pair of codes.Assuming that errors occur independently in a packet, the number of errors i in a packet with length P l is a binomial random variable with probability mass function And hence, considering that up to t errors can be corrected in a packet, the packet error probability (PER) as a function of m can be computed as We recall that in our system, simple nodes choose codes randomly and hence, in the event of two or more simple nodes using the same code, packets are lost due to collision.Therefore, given statistical independency between packets and if there are L noncollided packets (i.e., L packets sent using L different codes), the number of successfully received packets l among a total of m packets is also a binomial random variable with probability mass function: It is worth remarking that collided packets are, for sure, lost packets and consequently, the binomial expression in (4) only considers the L noncollided packets.However, as mentioned before, collided packets are still interfering noncollided packets and hence, the PER depends on the total number of received packets m. c m,l (L) models the MPR capability of the receiver, that is, the capability of successfully received l packets when there are m simultaneous transmissions, and L among them use different codes.Unfortunately, the problem arises in ad hoc networks when the values of c m,l (L) that characterize the MPR capability of the receiver do not completely characterize the MPR capability of the network.First, since the transceivers are half-duplex, a node in the transmission mode cannot successfully receive packets and second, a node can successfully demodulate a packet not intended for it.In these two situations, packets are lost.Furthermore, in our system, packets are lost due to collision of codes.Bao and Tong [14] have done work on modifying the receiver MPR capability to characterize the MPR capability of the network accounting for the properties of ad hoc networks.However, this characterization is not enough in the problem stated here.The fact that there might exist a node using more than one code simultaneously also affects the MPR capability of the network.Consequently, we define the network MPR matrix R(M f , L) as a function of the number of free nodes M f (nodes that are in the reception mode) and the number of noncollided packets L as follows: In expression (5), r m,l (M f , L) is the probability that l out of m packets are successfully received by their intended receivers in the network given that M f nodes are in the reception mode and that L out of m packets do not collide.Notice that when M f = 0, that is, no node is in the reception mode, then r m,l (0, L) = 0.The relationship between the c m,l (L) and r m,l (M f , L) is provided by the following theorem.Theorem 1.Given that a total of m packets are transmitted simultaneously, that L out of these m packets are noncollided packets, and that M f (≥ M − L) nodes are in the reception mode, the probability that there are l ≤ L successfully received packets by their intended receivers in the network is given by where In ( 6), q L,n is used to determine the probability that n among L noncollided packets reach their intended nodes and d L,ai,bi is used to determine the probability of successfully received b i packets when a i packets are intended for that node.A proof of ( 6) is shown in [14].However, in [14], there are not any collided packets and each node sends one packet at the most.Consequently, in [14], m and M f are always L and M − L, respectively.

PROTOCOL ANALYSIS AND OPTIMIZATION
Before we proceed to the analysis of the protocol, it is important to state some assumptions.

Assumptions (1) Nodes generate packets according to independent
Poisson processes with an equal arrival rate of λ packets/slot.(2) Perfect feedback information about the status of transmission is received instantaneously by each node.(3) All nodes are assumed to have the same receiver architecture as described in Section 3. (4) Packets in a node have equal probability to be transmitted to any other node.(5) The number of packets that a node can hold at a time is restricted to the following conditions: (a) from the time a simple node generates a packet until that packet is successfully received, the simple node is blocked in the sense that it cannot generate (or accept from its input source) a new packet for transmission, that is, a simple node can hold at most a packet at a time; (b) the multiple node can hold at most N c packets at a time.(6) The multiple node does not change from slot to slot and is always the same node.
Notice that whereas assumptions from (1) to (5a) are considered standard assumptions [14,21] for the analysis of Aloha systems, assumptions (5b) and ( 6) have been specially introduced for the analysis of the LAMAN protocol.At first sight, the reader might think that assumptions (5) and ( 6) are useful to simplify the analysis but, at the same time, do not seem to really model the system described in Section 2. Accuracy and validity of our analytical results are fully studied in Section 5.

Protocol analysis
Our analysis is based on the Markov Chain approach proposed by Kleinrock and Lam [22] and followed afterwards by Bao and Tong [14].Kleinrock and Lam model a finitepopulation slotted Aloha system with the number of backlogged nodes n, that is, nodes that have a packet for retransmission, as the network states.Bao and Tong used the same model to compare the performance of a CDMA centralized system versus a CDMA ad hoc system.Here, for an M-node network, the Markov chain is extended to a two-dimensional (N c + 1) × M state chain which models both the number of backlogged packets in the multiple-node buffer which is in the range of [0, N c ] and the number of simple nodes in the backlogged state which is in the range of [0, This Markov chain is characterized by an ((N c +1)×M)× ((N c + 1) × M) transition matrix P in which each entry is p (i,n),( j,k) and denotes the probability of network state to go from state (i, n) to state ( j, k) in one time slot.The transition from one state to another of the Markov chain is determined by two events: (i) the between unsuccessful transmissions of unbacklogged packets and the successful retransmissions of backlogged packets of the multiple node and (ii) the difference between unsuccessful transmissions from unbacklogged simple nodes and successful retransmissions from backlogged simple nodes.That can be seen as, for a given p (i,n),( j,k) , transition from i to j models the evolution of the number of backlogged packets of the multiple node, and transition from n to k models the evolution of the number of backlogged simple nodes.Hence, p (i,n),( j,k) in terms of the design parameters P r and N c can be obtained by means of where Q z,x,y is the probability of transmitting a total of m = x + y + z + i packets when the system is in state (i, n).In (8), z are the newly generated packets by the multiple node, i are the backlogged packets in the multiple node, x are the newly generated packets by the M − n − 1 unbacklogged simple nodes, and y are the packets retransmitted by the n backlogged simple nodes.Following the notation used in [14], we define Q rs (y, n) as the probability that y backlogged simple nodes retransmit a packet when there are n backlogged simple nodes, Q as (x, n) as the probability that x unbacklogged simple nodes transmit a packet, and Q am (z, i) as the probability that the multiple node transmits z unbacklogged packets when it has i backlogged packets (unbacklogged and backlogged packets in a multiple node are transmitted with a probability equal to one).Besides, following assumptions ( 1) and ( 5), P as is defined as the probability of an unbacklogged simple node to have a new packet to transmit at the beginning of the slot, that is, probability of a packet arrival of a Poisson process, and P am is the probability of the multiple node to have z unbacklogged packets to transmit at the beginning of the slot, that is, the probability of exactly z arrivals of a Poisson process when the maximum multiple-user buffer size is not reached, or the probability of z or more arrivals of a Poisson process when the maximum buffer size is reached.Therefore, In ( 8), S(x, y, z) determines whether it is possible to evolve from state (i, n) to state ( j, k) when a total of m = x + y + z + i packets are transmitted.Hence, S(x, y, z) is defined as (10) where

S(x, y, z)
Equation ( 10) is perhaps the most important equation in order to understand the behavior of the system.We analyze it step by step.First, as it was mentioned in Section 2, one of the characteristics of this network is the fact that simple nodes choose codes randomly and hence, two or more packets sent by simple nodes might collide.This is what is evaluated in the first term of expression (10).Particularly, s x+y,t (see (11)) is the probability of having t noncollided packets among the x + y packets that are sent by simple nodes.A proof of s x+y,t is shown in the appendix.Hence, given t, the total number of noncollided packets L is equal to t added to the z + i packets that are sent by the multiple node (see (14)).For the system to evolve from state (i, n) to state ( j, k), l packets (distributed between the simple nodes and the multiple node as in ( 13)) must be successfully received.The second term in (10) computes the number of combinations of l successfully received packets when there are a total of m sent packets and L among them are noncollided ones.Finally, in (10), the network MPR capability defined in Section 3 (r m,l (M f , L)) is used to compute the probability of successfully received l packets when a total of m packets have been sent.

Throughput and delay optimization
The network throughput is defined as the average number of packets successfully received by their intended nodes in one time slot when the system is in its steady state.Given the system is in state (i, n), the expected number of packets successfully received by their intended nodes is (18) Therefore, averaging for all the possible states, the network throughput, depending on N c and P r , becomes Besides, the packet delay defined as the time on the average since the packet is generated until it is successfully received can be computed following [22]: In (20), R is referred to as the deterministic delay which is the transmission delay (one slot) added to the average delay since the packet is generated until it is transmitted for the first time (half slot).Hence, It is well known that Aloha systems may present some instability [21].However, according to [22], it is possible to properly adjust P r in order to stabilize the system and consequently maximize the throughput and minimize the delay in the steady state.In our system, we use two parameters (P r and N c ) to stabilize the system.For system optimization, (19) and ( 20) must be maximized and minimized numerically as follows: (

ANALYSIS VERIFICATION
To model a system as described in Sections 2 and 3, one should consider an M-dimensional Markov chain in which each state would be described by the number of backlogged packets in the buffer of each node.Then, in each time slot, the evolution of the network from one state to another would depend on the packet arrivals at each buffer, on the number of successfully received packets of each node, and on the particular multiple node for that slot.The interaction amongst buffers of different nodes in an Aloha system is very complex and has been largely studied for the classical collision channel (i.e., single-packet communications in multiple-access channels) [23].No closed-form solution for the stability region has been found until now for systems with more than two nodes.Furthermore, very few have been reported regarding multipacket communications [24].Clearly, some simplifications are necessary in order to make our problem tractable.
In Section 4, we have modeled the behavior of our system by means of a Markov chain such that it is a two-dimensional chain in which each state describes the number of backlogged packets in the buffer of the multiple node and the number of backlogged simple nodes.By means of assumptions (5a), (5b), and (6) in Section 4, we have simplified the interaction among buffers and consequently simplified the analysis of the system.Notice that assumptions (5a) and (5b) are very similar to the standard assumptions considered in the analysis of Aloha systems [14,21].However, assumption (6) might induce some doubts on the validity and accuracy of our results.
We have decided to compare our theoretical results with the results obtained by simulating the so-called "real" system.In a real system, every node can become a multiple node and no packets should be lost due to the transition from a multiple node to a simple node.Hence, we define a real system as a system like the one described in Sections 2 and 3 and considering assumptions from (1) to ( 6) in Section 4.However, assumptions (5a) and ( 6) are rewritten as follows.
(5a) If a simple node holds at least one packet, a simple node is blocked in the sense that it cannot generate (or accept form its input source) a new packet for transmission.However, a simple node can hold at most N c packets at a time.(6) The multiple node changes once every s slots.Assumption (5a) comes from the fact that it must be considered that a simple node might have more than one packet in its buffer.Note that, since in the transition of a multiple node to a simple node, the multiple node might hold N c packets at the most, when this node becomes a simple node its buffer size can be up to N c packets long.On the other hand, assumption ( 6) is modified since, as described in Section 2, all nodes must have the capability to become a multiple node.
We have simulated a five-node ad hoc network (M = 5) with five codes (N = 5) and with the values presented in Table 1.Results plotted in Figures 4 and 5 show the throughput and delay corresponding to a theoretical analysis and to a real system in which the multiple node changes once every 1, 5, 10, and 15 slots.We observe that our analytical results do not really match with a real system, where the multiple node changes once every slot (s = 1 slot).However, we observe that if we give time for the system to be stabilized (e.g., s = 5 slots), our analytical results are very accurate.Obviously, the proper value of s depends on N c the sense that, the smaller the N c , the smaller the s.
We observe that the main consequence of changing the multiple node once every s slots (s = 1) is that we emphasize the TDMA component of the protocol, hence, increasing the packet delay and reducing the network throughput at low traffic loads.For the same reason, at high traffic loads, the delay is reduced and the throughput is increased.

SIMULATIONS
In this section, we present the results obtained from simulations of a five-node ad hoc network, that is, M = 5, for various designs.First, we have considered an N-code LAMANbased ad hoc network as the one described throughout this paper.Under assumptions presented in Section 4, the performance of the network in terms of throughput and delay has been evaluated for N = 2, 3, 4, and 5. Finally, a five-node Aloha-based CDMA ad hoc network has been also simulated and results have been compared.Values used in simulations are shown in Table 1.

Aloha-based CDMA ad hoc network description
The Aloha-based CDMA ad hoc network considered is the decentralized system presented in [14].This system considers a time-slotted ad hoc network with M nodes, where each node can communicate with any other node and where no hidden or exposed terminals are considered.Besides, it is a CDMA network where each node has a unique assigned code for transmission (then the number of codes N is equal to the number of nodes M) and the access to the channel is controlled by means of an Aloha procedure with retransmission probability P r .Although this is not the aim of the work    presented in [14], that system can be optimized, in terms of throughput and delay, by adjusting P r in accordance with the traffic load λ.This is what we have done in simulations in order to make comparisons with the LAMAN-based system.

Throughput and delay
Figures 6 and 7 show throughput and delay for the Alohabased CDMA system.Results obtained are as expected according to [22] and show that by adjusting P r , it is possible to maximize throughput and minimize delay of an Aloha-based system in the steady state.Regarding the LAMAN-based system, Figures 8 and 9 depict the dependence of throughput and delay as a function of the retransmission probability P r and the number of codes N c when λ = 0.6 packet/slot and N = 5. Figure 8 shows a maximum throughput for N c = 2 and P r = 0.3, while Figure 9 shows a minimum delay for N c = 1 and P r = 0.3.We have seen that values that lead to a maximum throughput do not necessarily correspond to those that minimize delay.The reason for this behavior is that packets might experience different treatment, that is, while packets belonging to the multiple node are retransmitted with probability one, packets from simple nodes are retransmitted with probability P r .Consequently, an increase of N c might increase the number of packets transmitted by the multiple node resulting in a throughput improvement.However, it might also incur unexpected high delay of some packets from simple nodes which, in turn, increases the packet delay in the average.From a design point of view, values of P r and N c for system optimization will depend on whether the data is throughput or delay sensitive.We have also evaluated throughput and delay when the traffic load per user changes from 0.2 packet/slot to 2 packets/slot.Figures 10 and 11 depict the maximum throughput and minimum delay, respectively, for both the Alohabased CDMA system and the LAMAN-based system with N = 2, 3, 4, 5 codes.For each value of λ, the LAMANbased system presents a pair of values (P r , N c ) that maximize the network throughput and minimize packet delay.In the same way, for the Aloha-based CDMA system, a value (P r ) that optimizes performance is shown.We see that for traffic loads higher than 0.7 packet/slot, the LAMAN system with five codes (N = 5) outperforms the CDMA system in terms of throughput.On the other hand, regarding the delay, this improvement in performance is shown to occur at about 1 packet/slot.We can also observe that, even omitting the fact that comparing a system that employs five codes with a system that employs less codes is biased that even in absolute terms (i.e., no throughput normalization), the LAMAN protocol with N = 3 or 4 can outperform a CDMA system with N = 5.Hence, it can be concluded that the LAMAN protocol efficiently manages the allocation of codes in a system where the number of codes is less than the number of nodes.The decentralized way on how codes are assigned is a totally new approach.

Throughput versus SNR
Another interesting point is to analyze the effect of the network MPR capability on the system performance.To that purpose, we evaluated the effect that the SNR has on the throughput of the system.In Figure 12, it is shown that for a LAMAN system with N = 5 and the values in Table 1, the throughput of the system saturates at values of SNR higher than 10 dB.The reason for that behavior is based on the fact that when SNR > 10 dB, the BER mainly depends on the number of interferers rather than on the noise power, that is, the success in a transmission of a packet is interference limited.Hence, in that situation, throughput cannot be maximized by increasing transmission power but by optimally managing the number of interferers.

CONCLUSIONS
In this paper, a novel cross-layer load adaptable MAC for Ad hoc networks (LAMAN) has been presented.Basically, the system described is a hybrid CDMA-TDMA ad hoc network whose network resources are efficiently managed by means of giving priority to different nodes at different time slots, allocating many codes to the node with priority, and adjusting the packet retransmission probability.The analysis of the system is based on a system snapshot approach and closed expressions for throughput and delay are developed.
Optimization of the system performance is based on numerical maximization and minimization of such expressions.Numerical results illustrate that, at high traffic loads, LAMAN outperforms an Aloha-based CDMA ad hoc system.Furthermore, we present the LAMAN protocol as a decentralized efficient way to manage the allocation of spreading codes in a system provided with less codes than nodes.

Reconfigurable MAC
The results obtained through simulations show that the optimal performance is achieved, depending on the traffic load, by different MAC procedures.Hence, these conclusions suggest that further work should be focused on the design of a reconfigurable MAC able to dynamically switch from an Aloha-based CDMA system to a LAMAN-based system.Furthermore, since the decision region does not appear to be clearly defined and might depend on many different parameters, the use of fuzzy logic techniques is proposed in order to take decisions on reconfigurability.

APPENDIX PROOF OF EQUATION (11)
We must consider the factor s x+y,t as the probability of having t packets with one unique code when x + y packets from simple nodes contend for transmission and N − N c codes are available for contention.We state the following equivalent problem in order to solve s x+y,t .We have B balls (equivalently x+ y packets) and C boxes (equivalently N − N c codes) and we want to know the probability P(B, C, t) to have (after arranging all the balls) t and only t boxes with one and only one ball, considering that empty boxes are allowed.
To solve that problem, (1) we first choose the t boxes which will have exactly one ball.There are C t ways to do this; (2) then, choose t balls to go into those t boxes.There are B t ways to do that; (3) choose the arrangement of those balls into these boxes.
There are t! ways to do that; (4) now, for each of those C t B t t! choices, we have to compute how many ways there are to put the remaining B − t balls into the remaining C − t boxes, where no box contains exactly one ball.Let V (C − t, B − t) be the number of ways to arrange B −t balls in C −t boxes with no box containing exactly one ball.Given any M between 1 and C − t, divide the boxes into C − t − M boxes with B − t − k balls and M boxes with k balls.For each k, there are B−t k ways to do this, so we get the recursion where V (1, B − t) = 0 if B − t = 1, and 1 otherwise.
If we consider that there are a total of C B possible combinations, then the answer to our problem is If we then, let B balls = x + y codes and C boxes = N − N c codes, we finally get (11).

Figure 1 :
Figure 1: Cross-layer information between PHY and MAC.

Figure 2 :
Figure 2: Network example with eight nodes and four codes.
Nc,Pr max β Nc,Pr , D min = arg Nc,Pr min D Nc,Pr .

Figure 4 :
Figure 4: Throughput versus λ when the multiple node changes once every s slots.

Figure 5 :
Figure 5: Delay versus λ when the multiple node changes once every s slots.

Figure 8 :Figure 9 :
Figure 8: Throughput versus P r and N c for a LAMAN-based system with λ = 0.6 packet/slot.