• No results found

8. Chapter VIII

8.3 CDMA-codes and address hashing

characteristics when receiving the RTS frame and calculates the appropriate bit and power-loading allocation. The results of this calculation is transferred back to the receiver in the CTS message. The transmitter will subsequently modulate sub-carriers in accordance with the received modulation parameters. Their simulations indicate that for higher SNRs the increase in throughput is as much as 10 Mbps compared to when standard adaptive bit and power loading schemes are applied.

This is further specified in [8] where a method is described to insert a wideband training probe into the RTS message in order to receive the needed channel state information. In [9] it is specified how the RTS and CTS can provide channel infor-mation used to achieve a dynamic fast adaptive Waterfilling approach.

This chapter describes a solution that achieves fast OFDM link adaptation through a RTS and CTS handshake, in combination with a simple CDMA code assignment scheme that in addition is able to achieve diversity forwarding.

8.3 CDMA-codes and address hashing

In [10], a dynamic and distributed code assignment protocol is presented. Each code is here defined as a unique channel, and in order to agree on a data trans-mission code, RTS and CTS messages are exchanged. The code to be used by a transmitter is randomly chosen from a list of available code, and included in the RTS. If the code is not available, an out of band busy tone is transmitted.

The system and method presented in this chapter, includes a pool of predefined and orthogonal CDMA-codes, as used in spread spectrum systems as described above. The number of codes should be as large as possible in order to allow many simultaneous transmitters, but a trade-off might exist between the number of codes, the orthogonality and the resulting noise level.

The system presented specifies a common and predefined hash function, that maps a specific node address, or node address pair, to a specific CDMA-code. This means that the address used to identify a specific node, or the addresses used to identify a link, directly maps to a specific code. When a node has data that it wishes to transmit to another nearby node, it uses the hash function to determine a code that will be used to encode and spread the data signal. The protocol does not rely upon the use of busy tones, but uses network topology information to determine if a primary collision is possible.

The address used by the system in the hash function can be any address that identifies a certain node, but using a network address has several advantages. The first advantage is that network addresses are generally not assigned randomly. Nor-mally, some administration is involved when a node receives a network address, whether it be automated by a protocol, or manually assigned by a human admin-istrator. As the hash-function is also assumed to be known by the authority that assigns addresses, it will allow the system to take into account already assigned addresses in order to minimize code collisions. Secondly, the network itself might be aware of where and when collisions might occur through the topology

informa-tion. For example, nodes in the network might know the address of other nodes in its local neighborhood, that may have been provided by a routing protocol or some other application.

Fig. 8.1: 3 hop code collision area

The topology information needed to determine if a collision is possible, is the set of nodes and node identifiers within the 3-hop neighborhood. Please consider figure 8.1. Node B,C and D are within the 3-hop neighborhood of A. If A is trans-mitting to B using code c, and C is transtrans-mitting to D using the same code c, B will experience a collision as it will also receive the transmission from C.

The topology of the network can be represented by an undirected graph G = (V,E), where V is the set of network nodes, and E is the set of links between the nodes. If(u, v) ∈ E, then (v, u) ∈ E and node u and v are within transmission range of each other and can exchange packets with each other using some code.

The nodes u and v are then one-hop neighbors of each other, such as for example node A and B in figure 8.1. The set of one-hop neighbors of a particular node i is denoted byNi1.

Each node has available a pool of well chosen codes, for example quasi-orthogonal PN codes,Cpn={ck}. Each code is identified by the superscript k = 0, 1, 2, ..., |Cpn|−

1.

When a node wishes to calculate the code to be used when transmitting to a

HASH (k) {

h =Hash(k);

code = hmod|Cpn|

}

HASH (i,k) {

h =Hash(i⊕ k) code = hmod|Cpn|

}

8.3. CDMA-codes and address hashing 157

node k, it uses the method HASH(k). One implementation of the functionHash(x) is to use an integer pseudo-random number generator that generates the message digest from a byte-stream input x. This integer is then modulod to the number of available codes. This implementation is a good choice if addresses are assigned randomly in the network, or if there is no administration to assign addresses. If there is a centralized addressing authority available, this authority can assign ad-dress incrementally in such a way that no code collision will occur while the num-ber of assigned addresses are less than the numnum-ber of available codes. This hash function could then be implementedx mod y, where x is the address and y is the number of codes. If the used address consists different parts, for example as in IP addresses, the function might need to be modified slightly to take this into account.

In these cases a receiver based code used, but it also possible to use a link based code, as defined in HASH(i,k), where the link between i and k is assigned a code.

This means that each link,(i, j)∈ E, is assigned a code.

Set Codes (i) {

for (j∈ Ni1)

for (∀k ∈ Nj1∪ (S

l∈Nj1Nl1)){ code =HASH(k)

k.TxCode =ccode R←− k.T xCode }

}

The Set Codes(i) method calculates the set of codes, R to be used by a node i by calculating the code corresponding to each node in the 3-hop neighborhood.

Calc Collisions (i) {

for (j∈ Ni1)

for (∀k ∈ Nj1∪ (S

l∈Nj1Nl1)){ if (∃k.T xCode ∈ R, k 6= i) {

Q←− k }

} }

After this, node i uses the method Calc Collisions (i) to calculate the set of nodes, Q, within the neighborhood that share the same code.

A node wishing to transmit data to a certain node, can therefore check if a code collision is possible due to two or more local nodes using the same code,

Check Collision (j) {

if (Q ==∅) return false else if (∃j ∈ Q)

return true else

return false }

before the transmission takes place, by using Check Collision(j). If two nodes in the neighborhood is using the same code, any node that wishes to transmit to them, first uses a CSMA scheme in order to determine if some other node is currently transmitting on that code. See Packet To TX(j).

Packet To TX (j) {

F ←− f0;

if (Check Collision(j))

Perform Carrier Sense on: F, j.TxCode else

Transmit RTS to j on: F, j.TxCode F,P, R ←−Receive CTS(j)

Transmit DATA on: F, j.TxCode, using P and R }