Genetic Algorithm-based Approach to Spectrum Allocation and Power Control with Constraints in Cognitive Radio Networks

This study presents a genetic algorithm for spectrum allocation and power control, both with constraints, in cognitive radio networks. The models for spectrum allocation and power control with constraints are formulated in a partially distributed manner, then the scheme based on genetic algorithms is presented. Simulation results demonstrate that the proposed genetic algorithm-based scheme is efficient for spectrum allocation and power control in cognitive radio networks.


INTRODUCTION
Cognitive radio is a promising technique for overcoming the apparent spectrum scarcity problem, as well as improving communication efficiency.An ideal cognitive radio can be defined as a wireless system with the capability for sensing, perceiving, orienting, planning, decision making and autonomous learning (Mitola and Maguire, 1999) about radio status in surroundings.Therefore, a cognitive radio needs to continuously observe and learn the environmental parameters, identify the primary requirements and objectives of the user and appropriately decide upon the transmission parameters in order to improve the overall efficiency of the radio communications.
In this study, we consider how a CRN (Cognitive Radio Network) in a dynamic spectrum environment can utilize the available spectrum efficiently through applying Genetic Algorithm (GA) to channel allocation and power control problems.This study is inspired from the study of (Zhao et al., 2009).They have presented a genetic algorithm for sharing the available spectrum bands which are detected unoccupied by primary nodes among the coexisting cognitive radios.In this study, we extend the problem scope to incorporate power control and develop a distributed formulation for the spectrum allocation and power control problem.
In this study, we deal with constraints on both power control and spectrum allocation; thus we are facing a constrained optimization problem.We proposed to use the genetic algorithm for solving the latter.Our choice of genetic algorithm is because; it has demonstrated success with a large number of difficult problems (Haupt and Haupt, 2004), also by its flexibility in solving a wide variety of computationally challenging problems.

LITERATURE REVIEW
In this section, we review some of the works that are closely related to our study in terms of applying optimization and heuristic algorithms to the channel allocation-power control problem in the context of CRNs.Shi and Hou (2007) developed a mathematical formulation for the cross layer power control, scheduling and flow routing problem to support a predefined set of user communication sessions in the network.Then they applied a solution procedure based on the branch-andbound technique and convex hull relaxation on their model.Using this solution procedure, they guarantee a (1xi) optimal solution, where xi reflects the accuracy required.Hoang and Liang (2006 a, b) proposed two different solutions to improve the network throughput of CRNs through channel and power allocation.First, they proposed a heuristic channel allocation-power control algorithm to maximize the spectrum utilization of a CRN by constructing a dynamic interference graph.They formulated a control framework that guarantees the primary nodes' interference protection.They provided a realistic interference model based on Signal-to-Interference plus Noise Ratio (SINR).Second, they proposed a Two-Phase Resource Allocation (TPRA) scheme to improve network throughput.In the first phase of their scheme, channels and power are allocated to base stations.Then in the second phase, each base station allocates channels within its cell.Ma and Tsang (2007) presented a cross layer design including channel allocation and power control.They Fig. 1: The general layout of the cognitive radio network considered in this work developed a binary integer linear programming formulation for the cross layer problem.They simplified their formulation by assuming that all nodes transmit at the same power level.However, assuming a common transmission power to all nodes not only simplifies the formulation, but also limits its efficiency.In general, most of the previous study use centralized algorithms and still use the cellular networks model.In contrast, we apply a distributed algorithm and provide a model for spectrum allocation and power control for using the genetic algorithm.Genetic algorithm has been successfully applied to channel allocation problem.Chakraborty and Chakraborty (1999) used a centralized GA to compute a fixed channel allocation.Matsui et al. (2005) applied a distributed GA to a fixed channel allocation problem.Fu et al. (2006) combined a greedy algorithm with a centralized GA to perform dynamic channel allocation.However, all of these applications are for cellular networks.
A distributed bargaining and voting approach to solve spectrum assignment was proposed (Cao and Zheng, 2005), in addition to a distributed optimization algorithm for multi-hop routing and scheduling (Shi and Hou, 2008).The latter employed both a conservative approach and an aggressive approach for the optimization of network resource utilization.Finally, a distributed channel assignment mechanism designed for multi-radio multi-hop networks was proposed (Ko et al., 2007), where each node is equipped with multiple IEEE 802.11 wireless transceivers.

Spectrum allocation and power control models:
The general layout of the architecture of the cognitive radio network considered in this study is shown in Fig. 1.
We have used the concept of supernode to help doing the distributed optimization in an ad-hoc cognitive radio network.We consider a primary network which can be centralized or distributed, a supernode which will collect the information about the primary system and perform the channel assignment optimization for cognitive users (secondary nodes).
For the power control, we consider a distributed optimization, where each node possesses its own optimization engine.
The supernode will provide the assigned channels for every node and each node will allocate a power for each of his assigned channel.
We adopt the approach using the "supernode", in order to decrease the overheads between the multiple nodes, since the supernode will send one packet to each node, instead of exchanging information between one another.It will also decrease the complexity of computing for the nodes, as it will do the task of the channel allocation.
Spectrum allocation model: Consider a cognitive network consisting of a collection of N cognitive nodes competing for M licensed channels indexed from 1 to M which are non-overlapping orthogonal.We assume that the cognitive nodes are capable of operating on multiple channels simultaneously.
The general spectrum allocation model comprises a channel availability matrix L, a channel reward matrix B, an interference constraint matrix C and a conflict free channel assignment matrix A.
Channel availability matrix: L = {l i,m |l i,m Î{0,1}} N×M is a N by M binary matrix representing the channel availability.If l i,m = 1, channel m is available for user i; l i,m = 0, channel m is occupied by primary nodes and not available for cognitive user I.
Interference constraint matrix: C = {c i, j |c i, j Î{0, 1}} N×N is a N by N binary matrix representing the interference between two cognitive users when they occupy the same channel.c i, j = 1, if user i and j would interfere with each other if they use the same channel simultaneously.Otherwise, c i, j = 0.
Channel rewards matrix: B = {b i, m |b i, m >0} N×M is a N by M matrix representing the rewards that can be obtained by user i when using channel m.

Channel assignment matrix:
The assignment matrix must meet the interference constraint, i.e., two cognitive users that interfere with each other can't share the same channel, as shown in Eq. ( 1): (1) .., ), ( ,..., ) Our aim in the spectrum allocation is to maximize the network utilization under the condition of no conflict between users, for that we choose the system objective function as the product of channel assignment matrix A and channel rewards matrix B, as follows: (2) Hence, given the model above, the spectrum allocation problem can be defined as the following optimization problem: (3) where, L is the set of feasible assignment strategies that satisfy Eq. ( 1) and A * is the desired spectrum assignment.

Power control model:
The objective of the power control is to minimize the power usage of the cognitive user, while subject to a minimum power at the receiver necessary for a successful reception of the transmitted signal.
This function is a crucial component in the optimization when considering portable devices, whose energy supply is limited.
We assume that a transmission from user i to its receiver is considered successful only if the received power at the receiver exceeds a certain threshold, say P rth .So the objective function for each node is defined as maximizing the following function, satisfying the constraint on the power received: (4) where, p i,m is the transmitted power of user i in channel m.P max is the maximum power that any node can transmit.It may depend on node capabilities or battery level.p i rec is the power received at receiver i.It is calculated as Eq. ( 5): (5)


where, g i : Is the channel gain from a transmitting node i to its receiving node.
We define g i = d i -g where d i is the distance between transmitting node i and its receiving node.( is the path loss index.F: The ambient noise on each channel (assumed to be the same on all channels) The function f p minimize the power consumption, therefore the larger the transmission power, the lower the f p.

Spectrum allocation and power control based on genetic algorithm:
In this section, we first introduce genetic algorithm.Then we present the details of how we implement and apply the GA to the channel allocation and power control problems developed in the previous section.

Genetic algorithm:
A genetic algorithm is a biologically inspired heuristic search technique that performs well in problems with large search spaces and problems that contain many local maxima.This is due to the fact that GA works on a population of solutions in parallel instead of processing a single solution at a time.This technique allows GA to explore several parts of the solution space in parallel (Holland, 1992).
GA is rooted in the mechanisms of evolution and natural genetics.A solution to a given problem is represented in the form of a string called 'chromosome', consisting of 'genes' which hold a set of values for the optimization variables (Goldberg, 1989).
Standard GA techniques begin with a randomly selected population of chromosomes and evolve over several generations.In each generation, the fitness of individual chromosome is evaluated and checked against stopping criteria.The stopping criteria can be an adequate fitness to be achieved or a time criteria.After the stopping criteria have been met, the GA sends the appropriate set of transmission parameters to the radio.If the stopping criteria are not met, multiple chromosomes are selected from the current population in order to form a new generation.The selection process chooses chromosomes based upon their fitness scores, where higher scoring chromosomes have a better chance to be selected.There exist different ways for chromosome selection, in this study we used the method called Roulette wheel (Goldberg, 1989).Once the system has selected the chromosomes, the next generation is created through two different mechanisms.The first mechanism uses crossover techniques.These techniques combine two chromosomes with the goal of creating a chromosome with a greater fitness.The second mechanism is mutation.The mutation is done randomly which simply flips a bit in the chromosome to allow the system to be more diverse in the exploration of the search space.

Spectrum allocation based on genetic algorithm:
We follow the proposed GA-based spectrum allocation scheme of Zhao et al. (2009).In Zhao et al. (2009), it is required to perform the constraints-free procedure (which will be defined below) as long as the population of genetic algorithm is updated.As the update of the population is the most important part in the evolution of genetic algorithm, and it is performed repeatedly, thus it would bring extra computational complexity.In order to reduce the computational complexity, we propose to do the constraint-free procedure just to the half of the population.
The steps of the genetic spectrum allocation algorithm are as follows: Encoding: Chromosomes indicate a possible conflict free channel assignment.
As the corresponding elements of conflict free assignment matrix A should value 0 when the corresponding elements of channel availability matrix L value 0, if one bit is used to encode every element in A, there will be a lot of redundancy in the chromosome.Therefore, only the elements of L that value 1 are encoded here.Figure 2 shows an example of the structure of a chromosome, where N = 5 and M = 6.

Initializing the population:
We determine the size of population according to the number of cognitive nodes.Then, the population is divided into sets of feasible solutions and randomly updated solutions.Feasible solutions are the assignment strategies that satisfy the interference constraints of spectrum assignment problem.In this study, the constraints-free procedure is done to the half of chromosomes from the population.No additional procedure needs to be done to the randomly updated chromosomes from population.Although the feasibility randomly updated chromosomes is uncertain, but the diversity of the chromosomes is guaranteed by the genetic operators.

Constraints free procedure:
The value of every bit in the chromosome is randomly generated at the initial population, thus it may not satisfy the interference constraints defined by C. The following process ensure that the chromosome satisfies the interference constraints: C For all m (1#m#M), search all (I, j) that satisfies c i, j =1 C Check whether both of the two bits corresponding to the element in the i th line and m th column of A and the element in the j th line and m th column of A are equal to 1; if so, randomly set one of them to 0.  2) as the fitness function.
In order to evaluate the fitness of chromosomes, we need to map the chromosome to the channel assignment matrix, as the arrows shown in Fig. 2.
Genetic operators: Perform roulette wheel selection scheme, crossover scheme and the mutation operation.

Stop criteria:
The stop criteria of genetic algorithm are checked at each cycle.The number of maximum iteration and the difference of fitness value are used as the criteria to determine the termination of the genetic algorithm.
Figure 3 shows the flow chart of the steps of the genetic spectrum allocation algorithm presented above.

Genetic distributed power control algorithm:
After the interference free channel allocation, the supernode will send to each node its assigned channels.Once the node receives its assigned channels, the node will perform power control using the proposed genetic algorithm to decide at which power it will transmit.
The first step in applying genetic algorithms is to define the structure of the chromosomes and the fitness function that is used to evaluate the fitness of the chromosomes.Hence, we start by defining the chromosomes and the fitness function proposed in this study: Chromosomes: The chromosome is defined as the power in each channel mÎ (1,..., M).If a channel is not assigned to the node, the node will assign a zero power to this channel, which means no power.Thus, the power control will just be done on the assigned channels.
Transmission power of a radio is discredited into a finite number of levels.Let q i represents the number of transmission power levels to which node n i can adjust its transmitter.Let q i = {0, 1, 2, . .., Q} be the set of transmission power levels at node n i and Q be the total number of power levels.
We determine the number of bits needed to represent the power level in each channel as log2(Q).
Hence the length of the chromosome (L c ) is the product of the number of bits needed for the power level and the total number of channels M.
Figure 4 shows an example of the chromosome structure, where Q = 8 and M = 6.

Fitness function:
According to the power control optimization described above, we define the fitness function as Eq. ( 7): (7) We express the constraint on the power received by assigning 0 to the chromosomes that do not fulfill the minimum received power required for successful reception.By doing the latter, we decrease the chance of those chromosomes to breed.
Calculate p i from the power level extracted from the chromosomes as Eq. ( 8): The remained steps are resumed following the flow chart shown in Fig. 5.

SIMULATION SETTINGS AND RESULTS
Simulation settings: In our simulation, primary nodes are fixed uniformly within an area of 1000´1000 m region and the M channels are randomly occupied by the primary nodes.
The secondary nodes are randomly distributed within the same area.The channel availability matrix L and interference matrix C are calculated according to locations of the primary nodes and secondary nodes.Here the values of channel reward matrix are normalized to 1.
For GA, the population size is set to 10.The crossover probability and the mutation probability are set to 0.95 and 0.03, respectively.
In the genetic algorithm for power control, the maxim power that a node can use is set to 1 mw (P max = 1 mW), the number of power levels Q = 4, the power threshold is set to 10 -2 mW, s = 1 and the path loss index ( is set to 2.
Because that GA is a randomized algorithm, the results of running the GA on the same network may differ from one run to another.Thus, results are presented as the average of 10 runs rather than a single run.
To show the effectiveness of the proposed spectrum allocation and power control algorithms, we also apply another kind of genetic algorithms, named quantum genetic algorithm.Quantum genetic algorithm is the combination of quantum computation and genetic algorithm, for details in this algorithm the reader can refer to (Han and Kim, 2000).

Performance study of GA based spectrum allocation:
In the following, we study the performance of the proposed genetic spectrum allocation algorithm.Figure 6 shows the values of the average fitness function of proposed genetic spectrum allocation algorithm with increased number of secondary nodes.Figure 7 shows the simulation results of the average fitness function with various available licensed channels.
It can be concluded from Fig. 6 and 7 that the genetic spectrum allocation model proposed in this study, with the consideration of interference constraints between secondary nodes, can achieve good performance since the average fitness increase with the increase in the number of secondary nodes and the number of available licensed channels.By applying the quantum genetic algorithm in the spectrum allocation model, we get nearly the same performance with different number of licensed channels, but we have almost better performance with different number of secondary nodes.
Performance study of GA based power control: In the following subsection, we study the performance of the proposed genetic power control algorithm.The number of primary nodes is set to 6 and the licensed channels M is set to 6. Figure 8 shows the evolution of the fitness function for one user.We can see that after some generations, the fitness function stabilizes, which means that the GA has converged.The oscillations period is due to the chromosomes that can't satisfy the power constrained model, but as the generations increases the algorithm will eliminate these latter and keep the best chromosomes, i.e. the ones that satisfied the power control objective.
Figure 9 shows the average fitness function of the proposed genetic power control algorithm with increased number of secondary nodes.We can conclude that the proposed algorithm performs well with different number of secondary nodes.Additionally, conventional genetic algorithm and quantum genetic algorithm have almost the same performance The effect of power constraint: Power control gives each node the option to adjust its transmission power so as to compromise between minimizing the power consumption and achieving a successful reception.In this subsection, we show that the proposed genetic constrained power control algorithm, effectively achieve this goal.We perform simulations with and without power constraint.Figure 10 and 11 show the power received for 10 secondary nodes, with and without the power received constraint, respectively.Figure 10 shows that with proposed genetic power control algorithm all the nodes can get a received power more than the threshold.Figure 11 shows that, without constraint in the power received, just two nodes could achieve a successful reception and that each node is minimizing the power as much as it can, this is why some of the nodes have zero power transmission.

CONCLUSION
The spectrum allocation and power control are two of the main tasks in resource allocation in cognitive radio networks.The optimization of these two tasks is of great challenges in the distributed systems especially in the case of constraints, as most optimization algorithms need a central entity (e.g., graph theory).In this study we presented models for the power control and spectrum allocation based genetic algorithm.Simulation results show that it converges and that it gives good performances.Simulation results also shown that the constraint improves the power control as it enables minimizing the power consumption while maintaining a successful reception.Furthermore, simulations show that the quantum genetic algorithm performs the same as the conventional genetic algorithm in the proposed power model.

Fig. 6 :
Fig. 6: The average fitness of the proposed genetic spectrum allocation under different number of available (licensed) channels

Fig. 8 :
Fig. 8: Fitness function evolution of one node