**4. System model**

SSHC stationary end nodes (Figure 6) are able to communicate from one side with MTs and from the other side with MSSs or MBS via their PHY layers in both sides. In the following subsections we develop a genetic based system for scheduling the packets waiting in the SSHCs queues.

**Figure 6.** Topology of the scenario

#### **4.1. Basic assumptions**

In this chapter we consider a WMN with one MBS and some MSSs (Figure 6). We consider access traffic in the mesh network, so the routes of the traffic form a binary tree rooted at the MBS. MSSs relay numerous traffic types (data, voice or video) between their MTs and other MSSs or the MBS. The MBS, MSSs, and MTs share the same frequency band. The routing tree that is made by the MBS is a binary tree [14], and we assume that it's known in advanced.

8 Wireless Mesh Networks – Efficient Link Scheduling, Channel Assignment and Network Planning Strategies

*Precedence* field indicates the likelihood of a packet being dropped during congestion.

SSHC stationary end nodes (Figure 6) are able to communicate from one side with MTs and from the other side with MSSs or MBS via their PHY layers in both sides. In the following subsections we develop a genetic based system for scheduling the packets waiting in the

In this chapter we consider a WMN with one MBS and some MSSs (Figure 6). We consider access traffic in the mesh network, so the routes of the traffic form a binary tree rooted at the MBS. MSSs relay numerous traffic types (data, voice or video) between their MTs and other

**Figure 5.** Mesh CID format

**Figure 6.** Topology of the scenario

**4.1. Basic assumptions** 

**4. System model** 

SSHCs queues.

prioritize the transmission of management messages transmitted in the data sub-frame (e.g., messages for uncoordinated distributed scheduling). The *Reliability* field is employed to specify unacknowledged transmitted packets (when ARQ is enabled). This allows the packet to be retransmitted for up to four times. The *Priority/Class* field allows the classification of the messages into eight priority classes. This can be used by the queuing and forwarding mechanisms at each node to differentiate the packet treatment for different classes. The *Drop* 

For better support of QoS, we consider MBS and MSSs use TDMA-based scheduling in their MAC layer; however, because of IEEE 802.11 deployment in most mobile devices (laptops and cell phones), MTs use contention-based medium access method. In a given TDMA frame (of the length for example 20ms), some MSSs are sending frames upward or downward the network, while the others are collecting (distributing) frames from (to) MTs. Since the tree rooted at the MBS is a binary one, each MSS has maximum of six logical links to its neighbor MSSs; three for sending and another three for receiving packets (Figure 1). As wireless transceivers are usually half duplex [8], they can't be used for reception and transmission at the same time. So there are six queues in each MSS, three of these are to store the outbound packets and three others are for inbound packets to queue for reception. However, in our model receiving queues are ignored as they are considered in sending nodes; hence at most three queues are considered for scheduling. It's worthy to note that we schedule only one queue at each leaf node and two queues at the MBS. Moreover we schedule only the links that have non-empty queues. Each queue is filled by MTs (shown in Figure 6) or the receiving links at that node. For example in Figure 1, the queue of *e2* can be filled by the queue of *e4*.

Let, *M* be the set of all the stations (including MSSs and the MBS) in the system, indexed by *m*=1,2,…,*M*. We consider *M*>1; i.e., there is at least one MSS. In most of the mesh networks, the frame length is fixed and may not be changed; otherwise the whole system should be restarted [8]; hence the frame length is fixed at *L* milliseconds. Each transmission in the frame is along with some overheads, so the number of transmissions for each link should be limited to one per frame to minimize transmission overhead.

Let � be the set of all the links in the system. We take a subset *I* of � (*I*��) , in which the links have non empty queues. Each *i*∈*I* has one queue per traffic type which are assumed to have unlimited sizes for the sake of simplicity.

Each queue has some restricted QoS traffic specifications; this means that each queue should be scheduled appropriately and get emptied in a desired time. Since the frame length is fixed and all of the links in the system should be scheduled at each frame (because of their restricted QoS requirements), there is a limited interval for each queue to get scheduled. Nevertheless, some of the nodes may not find enough transmission opportunity to evacuate all of their queues, causing the system not to be able to fulfill QoS constraints of delay sensitive traffic types. So, a scheduling method is strongly necessary to satisfy QoS requirements of voice and video traffic. On the other hand, bandwidth allocation to more stringent QoS traffic types may cause starvation for elastic traffic. As such, we define a threshold (*k*), to assure the elastic traffic types to be scheduled at each *k* frames.

Let *k*m*,i,j* be the length of the *j*th queue (filled by MTs or other MSSs), associated with *i*th outgoing link, related to *m*th MSS. So, [*k*m*,i,j*] is an *M* × *I* × *J* matrix. Each queue should be


$$\sum\_{m \in \mathcal{M}} \sum\_{l \in \mathcal{I}} \sum\_{l' \in \mathcal{I}} Tr\_{m,l,l}^F \ge F, \quad \forall F = kL, \ k = 1, 2, 3, \dots \tag{1}$$

$$\min\_{K} \left( \sum\_{m \in \mathcal{M}} \sum\_{l \in I} \sum\_{j \in I} K\_{m,l,j}^{F} - \sum\_{m \in \mathcal{M}} \sum\_{l \in I} \sum\_{j \in I} Tr\_{m,l,j}^{F} \right), \quad \forall F = kL \tag{2}$$

$$Tr\_{m,l,1}^F > 0, \ \forall F = kL \tag{3}$$

$$Tr\_{m,l,2}^F > 0, \ \forall F = kL \tag{4}$$

$$Tr\_{m,l,3}^F > 0, \ \forall F = kL \tag{5}$$

$$Tr\_{m,l,1}^F > Tr\_{m,l,3}^F \; \land \; Tr\_{m,l,2}^F > Tr\_{m,l,3}^F \; \land \; Tr\_{m,l,1}^F > Tr\_{m,l,2}^F \quad \forall F = kL \tag{6}$$

$$\min\_{K} \left( \sum\_{m=1}^{M} \sum\_{l=1}^{3} \sum\_{j=1}^{3} K\_{m,l,j}^{kL} - \sum\_{m=1}^{M} \sum\_{l=1}^{3} \sum\_{j=1}^{3} T r\_{m,l,j}^{kL} \right), \quad k > 2\tag{7}$$

$$
\Sigma\_{m=1}^{M} \Sigma\_{l=1}^{3} \Sigma\_{j=1}^{3} \operatorname{Tr}\_{m,l,j}^{L} \ge L \tag{8}
$$

$$Tr\_{m,l,1}^L > 0\tag{9}$$

$$Tr\_{m,l,2}^{2L} > 0\tag{10}$$

$$Tr\_{m,l,3}^{kL} > 0, \quad k > 2 \tag{11}$$

$$K\_{m,l,1}^{L} > 0 \quad \lor \quad K\_{m,l,2}^{2L} > 0 \quad \lor \quad K\_{m,l,3}^{kL} > 0, \quad k > 2 \tag{12}$$

#### **4.3. Admission control**

The CBR queue should be emptied at the end of its schedule or the backlogged packets are to be dropped. So, the new connection should be rejected if the following equation is not satisfied:

$$K\_{m,l,1}^L - Tr\_{m,l,1}^L = 0 \quad m \in M, l \in I \tag{13}$$

Application of Genetic Algorithms in Scheduling of TDMA-WMNs 13

The highest ranking solution's fitness is reaching or has reached a plateau such that

At each stage, crossover and mutation genetic operators may be applied to the new strings. Crossover is a genetic operator that combines two chromosomes (parents) to produce a new chromosome (offspring). The idea behind crossover is that the new chromosome may be better than both of the parents if it takes the best characteristics from each of the parents.

As an example, suppose there are two chromosomes 1 and 2 which are represented as a

Chromosome 1 1101100100110110 Chromosome 2 1101111000011110

Crossover selects genes from parent chromosomes and creates a new offspring. The simplest way how to do this is to choose randomly some crossover point and everything before this point copy from the first parent and everything after the crossover point copy from the

Chromosome 1 11011 | 00100110110 Chromosome 2 11011 | 11000011110 Offspring 1 11011 | 11000011110 Offspring 2 11011 | 00100110110 After performing the crossover, mutation is used to maintain genetic diversity from one generation of population chromosomes to the next. It introduces some local modifications of the individuals in the current population on order to explore new possible solutions. For binary encoding of chromosome, we can switch a few randomly chosen bits from 1 to 0 or

> Original offspring 1 1101111000011110 Original offspring 1 1101100100110110 Mutated offspring 1 1100111000011110 Mutated offspring 2 1101101100110110

3. Repeat on this generation until termination: (time limit, sufficient fitness achieved, etc.)

ii. Breed new individuals through crossover and mutation operations to give birth to

binary string, the most used way of encoding a chromosome, as the following:

second parent. | is the crossover point. The following shows this process:

from 0 to 1. For our example, the mutation process is shown as the following:

The pseudo-code of a basic GA is summarized as follows:

2. Evaluate the fitness of each individual in that population

1. Choose the initial population of individuals

i. Select the best-fit individuals for reproduction.

iii. Evaluate the individual fitness for new individuals. iv. Replace least-fit population with new individuals.

offspring.

successive iterations no longer produce better results.

Manual inspection

Combinations of the above.

While the VBR queue get filled in different intervals, we put a threshold on the top of its queue. If the number of the packets available in the queue is greater than this threshold, then any new call will be rejected. So:

$$K\_{m,l,2}^{2L} - Tr\_{m,l,2}^{2L} < \tau\_1 \quad m \in M, l \in I \tag{14}$$

The elastic traffic queue can be filled every time a packet is generated, but may cause undesirable delay, so, we impose a threshold (τ*2*) on the third queue as well. However τ*2* should be greater than τ*<sup>1</sup>*, since elastic data types have lighter QoS constraints than VBR data types.

$$K\_{m,l,3}^{kL} - Tr\_{m,l,3}^{kL} < \tau\_1 \quad k > 2, m \in M, l \in I \tag{15}$$

## **5. Application of genetic algorithm in scheduling of SSHCs queues**

In the following subsections we first present an overview of genetic algorithm, and then we develop a GA-based scheduling mechanism for the problem.

#### **5.1. Genetic algorithm: An overview**

The genetic algorithm is a search heuristic that mimics the process of natural evolution. This heuristic is routinely used to generate useful solutions to optimization problems. Genetic algorithms belong to the larger class of evolutionary algorithms, which generate solutions to optimization problems using techniques inspired by natural evolution, such as inheritance, mutation, selection, and crossover [17], [18].

In a genetic algorithm, a population of strings (called chromosomes or the genotype of the genome), which encode candidate solutions (called individuals, creatures, or phenotypes) to an optimization problem, evolves toward better solutions. An initial population is created from a random selection of solutions (which are analogous to chromosomes). A value for fitness is assigned to each solution (chromosome) depending on how close it actually is to solve the problem and arrive to the answer of the problem. Those chromosomes with higher fitness values are more likely to reproduce offspring. The offspring is a product of the father and mother, whose composition consists of a combination of genes from them (this process is known as crossing over). This generational process is repeated until a termination condition has been reached. Common terminating conditions are:


������

������

� � �������

�� � �������

The CBR queue should be emptied at the end of its schedule or the backlogged packets are to be dropped. So, the new connection should be rejected if the following equation is not

While the VBR queue get filled in different intervals, we put a threshold on the top of its queue. If the number of the packets available in the queue is greater than this threshold,

The elastic traffic queue can be filled every time a packet is generated, but may cause

**5. Application of genetic algorithm in scheduling of SSHCs queues** 

In the following subsections we first present an overview of genetic algorithm, and then we

The genetic algorithm is a search heuristic that mimics the process of natural evolution. This heuristic is routinely used to generate useful solutions to optimization problems. Genetic algorithms belong to the larger class of evolutionary algorithms, which generate solutions to optimization problems using techniques inspired by natural evolution, such as inheritance,

In a genetic algorithm, a population of strings (called chromosomes or the genotype of the genome), which encode candidate solutions (called individuals, creatures, or phenotypes) to an optimization problem, evolves toward better solutions. An initial population is created from a random selection of solutions (which are analogous to chromosomes). A value for fitness is assigned to each solution (chromosome) depending on how close it actually is to solve the problem and arrive to the answer of the problem. Those chromosomes with higher fitness values are more likely to reproduce offspring. The offspring is a product of the father and mother, whose composition consists of a combination of genes from them (this process is known as crossing over). This generational process is repeated until a termination condi-

τ

� � ������� � �� � � � (13)

�� � �������� � �� � � � (14)

�� � �������� � �� � � �� � � � (15)

*<sup>1</sup>*, since elastic data types have lighter QoS constraints than VBR

*2*) on the third queue as well. However

τ*2*

**4.3. Admission control** 

should be greater than

data types.

then any new call will be rejected. So:

undesirable delay, so, we impose a threshold (

**5.1. Genetic algorithm: An overview** 

mutation, selection, and crossover [17], [18].

τ

������

develop a GA-based scheduling mechanism for the problem.

tion has been reached. Common terminating conditions are:

A solution is found that satisfies minimum criteria.

Fixed number of generations reached.

�� � �������

satisfied:

Combinations of the above.

At each stage, crossover and mutation genetic operators may be applied to the new strings. Crossover is a genetic operator that combines two chromosomes (parents) to produce a new chromosome (offspring). The idea behind crossover is that the new chromosome may be better than both of the parents if it takes the best characteristics from each of the parents.

As an example, suppose there are two chromosomes 1 and 2 which are represented as a binary string, the most used way of encoding a chromosome, as the following:


Crossover selects genes from parent chromosomes and creates a new offspring. The simplest way how to do this is to choose randomly some crossover point and everything before this point copy from the first parent and everything after the crossover point copy from the second parent. | is the crossover point. The following shows this process:


After performing the crossover, mutation is used to maintain genetic diversity from one generation of population chromosomes to the next. It introduces some local modifications of the individuals in the current population on order to explore new possible solutions. For binary encoding of chromosome, we can switch a few randomly chosen bits from 1 to 0 or from 0 to 1. For our example, the mutation process is shown as the following:


The pseudo-code of a basic GA is summarized as follows:


Application of Genetic Algorithms in Scheduling of TDMA-WMNs 15

We developed a TDMA-WMN system based on Orthogonal Frequency Division Multiplexing (OFDM) air interface that works in 5GHz frequency band using NS-2 simulator [20]. Basic OFDM parameters are listed in Table 1. OFDM symbol duration is about 14µs. TDMA frame duration (*L*) is set to 20ms. While TDMA-WMN uses BPSK-1/2 modulation technique, the underlying network (WLAN) uses 16QAM-1/2 modulation technique. Different modulation techniques have been used; because interference between MTs of different SSHCs

We define three types of traffic in the system: CBR, VBR, and ABR traffic streams. CBR traffic (e.g., voice over IP without silent suppression (G.711)), has constant packet size with constant packet interval. VBR traffic (e.g., H.263 video), has variable packet size with variable packet interval feature. At last, elastic traffic (e.g., FTP), can adjust its transmission rate gradually.

a. G.711 voice (CBR traffic) which generates packets of 160 bytes with mean service inter-

b. H.263 video (VBR traffic) which has been obtained from "Jurassic Park I" trace file,

Traffic specifications of these two types of traffic are summarized in Table 2. For the sake of simplicity, we assume that elastic flows are generated using CBR traffic sources with packet

Mean Bit Rate (Kbps) 64 260 Delay Bound (ms) 20 20 Mean SDU Size (Byte) 160 4533.67 Maximum Burst Size (Byte) 160 11817 Minimum Service Interval (ms) 20 0 Maximum Service Interval (ms) 20 40

TSPEC Param. G.711 Voice H.263 Video (Park Jurassic I)

OFDM Parameters Value Scenario Bandwidth 20MHz Sampling rate Depend on BW 23.04MHz Useful time TB 256.T 11.11µs TG/TB 1/4,1/8,1/16,1/32 1/4 CP time TG 2.78µs Symbol time Tsym TG+TB 13.89µs

**6. Simulation results** 

should be avoided (Figure 6).

**Table 1.** Basic OFDM parameters

available in [21].

size of 1000 bytes.

Carriers NFFT 256 Data Carriers 192

Voice and video traffic stream specifications are as follows:

val of 20ms (64 Kb/s of average sending rate).

**Table 2.** Traffic specification parameters of traffic types

#### **5.2. A GA-based approach for the scheduling problem**

In the previous section, the optimization problem which is needed to create a population was formally defined. This population is created by the MBS based on the fact that the MBS gathers queues' statistics of SSHCs through some control messages. Each chromosome of the population is such that every queue gets its service once per frame, so the scheduling overhead could be minimized. Each queue is scheduled as close to the beginning of the frame as possible, so that its transmission does not overlap with transmissions of its conflicting links. The scheduling period is set to two frames, since VBR traffic streams get their services every two frames.

**Figure 7.** A typical frame (chromosome) with its SSecs (genes) associated with Figure 1

Each gene is defined as a scheduling section (SSec). A scheduling section is composed of one or more time slots in which a queue and its non-conflicting queues are scheduled to transmit in parallel. The first scheduling section is started at the beginning of the frame. All the scheduling sections are consecutive and non-overlapping.

The crossover operator is 0.5-uniform crossover [19]. Each SSec of one chromosome can be exchanged with equal-size SSec of another chromosome, with a constant probability of 0.5. Each scheduling section (gene) is subject to random mutation with a small independent probability. We use permutation encoding; hence each gene replaces with a duplicate of other equal-size genes (e.g., replace the SSec3 with the SSec5 in Figure 7).

Finally, we should use some QoS metrics of the network (that we want to optimize) to define the fitness function. It can be seen from the Eq. (7) that we are interested in depletion of all the queues in the scheduling period. On the other hand, when more queues get emptied, higher performance will be reached; hence, Eq. (7) can be explicated as Eq. (16).

$$\max\_{\mathsf{T}^r} \left( \sum\_{m=1}^{M} \sum\_{l=1}^{3} \sum\_{l'=1}^{3} T r\_{m,l,j}^{kL} - k \times L \right) \quad \forall l \in N, k > 2 \tag{16}$$

So we define the fitness function (*F.F.*) as follows:

$$F.F. = \frac{\Sigma\_{m=1}^{M} \Sigma\_{l=1}^{3} \Sigma\_{f=1}^{3} Tr\_{m,l,f}^{RL} - k \times L}{k \times L} \times 100\tag{17}$$
