Cognitive Radio Spectrum Allocation Using Evolutionary Algorithms
Cognitive Radio Spectrum Allocation Using Evolutionary Algorithms
Cognitive Radio Spectrum Allocation Using Evolutionary Algorithms
Abstract—Cognitive radio has been regarded as a promis- for dynamic spectrum access, including game theory [4],
ing technology to improve spectrum utilization significantly. In pricing and auction mechanisms [5]-[6], local bargaining [7],
this letter, spectrum allocation model is presented firstly, and and graph coloring [8]-[9]. Assuming that the environmental
then spectrum allocation methods based on genetic algorithm
(GA), quantum genetic algorithm (QGA), and particle swarm conditions are static during the time it takes to perform
optimization (PSO), are proposed. To decrease the search space spectrum assignment, an allocation model is proposed in
we propose a mapping process between the channel assignment [9], and color sensitive graph coloring (CSGC) is used to
matrix and the chromosome of GA, QGA, and the position of solve the allocation problem. As the allocation model can
the particle of PSO, respectively, based on the characteristics of be inherently seen as an optimization problem, we propose
the channel availability matrix and the interference constraints.
Results show that our proposed methods greatly outperform the to use evolutionary algorithms for cognitive radio spectrum
commonly used color sensitive graph coloring algorithm. allocation in this paper.
Evolutionary algorithms are stochastic search methods that
Index Terms—Cognitive radio, spectrum allocation, genetic
algorithms, quantum genetic algorithm, particle swarm optimiza- mimic natural evolution and/or the social behavior of species.
tion. The first evolutionary-based technique introduced in the lit-
erature was genetic algorithms (GAs) [10]. Quantum genetic
algorithm (QGA) [11] combines quantum computation and
I. I NTRODUCTION genetic algorithm, while particle swarm optimization (PSO)
1 0 1 0 0 1 1 0 0 0 0 0
0 0 0 1 1 0 0 0 0 1 1 0
L= 0 1 0 0 0 1 A= 0 0 0 0 0 1
0 0 0 1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 1 0 0 0 0 0
In real applications, the spectrum environment varies slowly space is greatly decreased. Fig. 1 illustrates the structure of
while users quickly perform network-wide spectrum alloca- an example chromosome, where 𝑁 = 5, and 𝑀 = 6. Note
tion. We assume that the location, available spectrum, etc. are that encoding all the elements needs 30 bits, while encoding
static during the spectrum allocation, thus 𝐿, 𝐵, and 𝐶 are only the elements with underline only needs 9 bits. In order
constant in an allocation period. to evaluate the fitness of the chromosome, we need to map the
The conflict free channel assignment matrix 𝐴 = chromosome to the channel assignment matrix, as the arrows
{𝑎𝑛,𝑚 ∣𝑎𝑛,𝑚 ∈ {0, 1}}𝑁 ×𝑀 represents the channel assign- show in Fig. 1.
ment, where 𝑎𝑛,𝑚 = 1 if channel 𝑚 is allocated to secondary The value of every bit in the chromosome is randomly
user 𝑛, and 𝑎𝑛,𝑚 = 0 otherwise. 𝐴 must satisfy the interfer- generated at the initial population and determined by crossover
ence constraints defined by 𝐶: and mutation in the evolution process, thus it may not satisfy
the interference constraints defined by 𝐶. We propose the
𝑎𝑛,𝑚 ⋅ 𝑎𝑛,𝑘 = 0, 𝑖𝑓 𝑐𝑛,𝑚 = 1, ∀1 ≤ 𝑛, 𝑘 ≤ 𝑁, 1 ≤ 𝑚 ≤ 𝑀. following process to ensure that the chromosome satisfies the
(1) interference constraints: (1) for all 𝑚 (1 ≤ 𝑚 ≤ 𝑀 ), search
Given a conflict free channel assignment, the reward user 𝑛 all (𝑛, 𝑘) that satisfies 𝑐𝑛,𝑘,𝑚 = 1, and (2) check whether both
∑𝑀 of the two bits corresponding to the element in the 𝑛th line
gets is defined as 𝑟𝑛 = 𝑎𝑛,𝑚 ⋅ 𝑏𝑛,𝑚 . We use 𝑅 = {𝑟𝑛 = and 𝑚th column of 𝐴 and the element in the 𝑘th line and 𝑚th
𝑚=1
∑
𝑀 column of 𝐴 are equal to 1; if so, randomly set one of them
𝑎𝑛,𝑚 ⋅ 𝑏𝑛,𝑚 }𝑁 ×1 to represent the reward vector that each to 0.
𝑚=1
user gets for a given channel assignment. Let Λ𝐿,𝐶 be the set The direction of GA search is determined by the fitness
of conflict free channel assignment for a given 𝐿 and 𝐶. The of the individuals in the population. The objective function
spectrum allocation is to maximize network utilization 𝑈 (𝑅). provides the mechanism for evaluating each chromosome. We
Given the model above, the spectrum allocation problem can directly use the objective function as the fitness function: 𝑓 =
be defined as the following optimization problem [9]: 𝑈 (𝑅).
The proposed GA-based spectrum allocation algorithm
𝐴∗ = argmax 𝑈 (𝑅), (2) (GA-SAA) proceeds as follows:
𝐴∈Λ𝐿,𝐶
Step 1: given 𝐿 = {𝑙𝑛,𝑚 ∣𝑙𝑛,𝑚 ∈ {0, 1}}𝑁 ×𝑀 , 𝐵 =
where 𝐴∗ is the optimal conflict free channel assignment {𝑏𝑛,𝑚 }𝑁 ×𝑀 , and 𝐶 = {𝑐𝑛,𝑘,𝑚 ∣𝑐𝑛,𝑘,𝑚 ∈ {0, 1}}𝑁 ×𝑁 ×𝑀 ,
matrix. In this paper, we consider three objective functions ∑𝑁 ∑ 𝑀
∑
𝑁 set the length of the chromosome as 𝑙𝑛,𝑚 , and set
as in [9]: (1) Max-Sum-Reward (MSR): 𝑈 (𝑅) = 𝑟𝑛 , (2) 𝑛=1 𝑚=1
𝑛=1 𝐿1 = {(𝑛, 𝑚)∣𝑙𝑛,𝑚 = 1} such that elements in 𝐿1 are
Max-Min-Reward (MMR): 𝑈 (𝑅) = min 𝑟𝑛 , and (3) Max- arranged increasingly in 𝑛 and 𝑚.
1≤𝑛≤𝑁
∏
𝑁 1 Step 2: randomly generate an initial population based on
Proportional-Fair (MPF): 𝑈 (𝑅) = ( (𝑟𝑛 + 10−6 )) 𝑁 . binary coding mechanism.
𝑛=1
Step 3: for all chromosomes, map the 𝑗th bit of the
B. Spectrum allocation based on genetic algorithm chromosome to 𝑎𝑛,𝑚 , where (𝑛, 𝑚) is the 𝑗th element in 𝐿1
∑
𝑁 ∑ 𝑀
GAs are rooted in the mechanisms of evolution and natural and 1 ≤ 𝑗 ≤ 𝑙𝑛,𝑚 . For all 𝑚, search all (𝑛, 𝑘) that
genetics. A solution to a given problem is represented in the 𝑛=1 𝑚=1
satisfies 𝑐𝑛,𝑘,𝑚 = 1, and check whether both of the two bits
form of a string called ‘chromosome’, consisting of ‘genes’
corresponding to the element in the 𝑛th line and 𝑚th column
which hold a set of values for the optimization variables [13].
of 𝐴 and the element in the 𝑘th line and 𝑚th column of 𝐴
In the proposed GA-based spectrum allocation, a chromosome
are equal to 1; if so, randomly set one of them to 0.
specifies a possible conflict free channel assignment. As
𝑎𝑛,𝑚 = 0 when 𝑙𝑛,𝑚 = 0, if we use one bit to encode Step 4: compute the fitness of each individual of the current
every element in 𝐴, there will be a lot of redundancy in the population.
chromosome. So we propose to encode only those elements Step 5: carry out roulette wheel selection scheme, two-point
which may take the value 1, i.e., 𝑎𝑛,𝑚 where (𝑛, 𝑚) satisfies crossover scheme and the mutation operation.
𝑙𝑛,𝑚 = 1. As a consequence, the length of the binary string is Step 6: if it reaches the predefined maximum generation,
equal to the number of elements equal to 1 in 𝐿, and the search stop; if not, go to step 3.
IEEE TRANSACTIONS ON WIRELESS COMMUNICATIONS, VOL. 8, NO. 9, SEPTEMBER 2009 4423
C. Spectrum allocation based on quantum genetic algorithm the best particle. Mapping the preserved best position at the
QGA uses qubits to represent a chromosome. The 𝑖th last iteration to 𝐴, the optimal spectrum allocation is obtained.
chromosome with 𝑙-qubit at the 𝑔th generation, 𝑞𝑖𝑔 , can be In conclusion, the proposed PSO-based spectrum allocation
represented as [14]: algorithm (PSO-SAA) proceeds as follows:
[ 𝑔 𝑔 ] Step 1: given 𝐿, 𝐵, 𝐶, set 𝐿1 the same as that in step 1 of
𝑔 𝛼𝑖1 𝛼𝑖2 . . . 𝛼𝑔𝑖𝑙 ∑
𝑁 ∑ 𝑀
𝑞𝑖 = 𝑔 𝑔 , (3) GA-SAA, set 𝐷 = 𝑙𝑛,𝑚 .
𝛽𝑖1 𝛽𝑖2 . . . 𝛽𝑖𝑙𝑔 𝑛=1 𝑚=1
2
Step 2: set 𝑡 = 0, and randomly generate the position
where 𝛼𝑔𝑖𝑗 𝑔
𝛽𝑖𝑗
and ∣𝛼𝑔𝑖𝑗 ∣
must satisfy 𝑔 2
+
∣𝛽𝑖𝑗 ∣ = 1, 𝑖 = and velocity of particle 𝑖, 𝑥𝑡𝑖 = [𝑥𝑡𝑖1 , 𝑥𝑡𝑖2 , . . . , 𝑥𝑡𝑖𝐷 ] and
1, 2, . . . , 𝑃 , 𝑗 = 1, 2, . . . , 𝑙, where 𝑃 denotes the population 𝑣𝑖𝑡 = [𝑣𝑖1 𝑡
, 𝑣𝑖2𝑡 𝑡
, . . . , 𝑣𝑖𝐷 ], where 𝑥𝑡𝑖𝑑 ∈ {0, 1} and 𝑣𝑖𝑑 𝑡
∈
size. The population of QGA can be denoted as√ 𝑄(𝑔) = [−𝑉𝑚𝑎𝑥 , +𝑉𝑚𝑎𝑥 ], 1 ≤ 𝑖 ≤ 𝑆.
{𝑞1𝑔 , 𝑞2𝑔 , . . . , 𝑞𝑃𝑔 }. 𝛼0𝑖𝑗 and 𝛽𝑖𝑗
0
are initialized to 1/ 2 on the Step 3: map 𝑥𝑡𝑖𝑑 (𝑖 ≤ 𝑖 ≤ 𝑆) to 𝑎𝑛,𝑚 , where (𝑛, 𝑚) is the
initial population. 𝑑th element in 𝐿1 . For all 𝑚, search all (𝑛, 𝑘) that satisfies
The observed binary string of a chromosome in QGA plays 𝑐𝑛,𝑘,𝑚 = 1, and check whether both of the two dimensions of
the same role as the binary encoded chromosome in GA such the position corresponding to the element in the 𝑛th line and
that the observed state of a chromosome specifies a possible 𝑚th column of 𝐴 and the element in the 𝑘th line and 𝑚th
solution of the optimization problem. We use the same process column of 𝐴 are equal to 1; if so, randomly set one of them
as in GA-SAA to ensure that the observed binary string to 0.
satisfies the interference constraints. As in GA, we directly Step 4: compute the fitness value of each particle and set
use 𝑈 (𝑅) as the fitness function in QGA. The proposed QGA- 𝑝𝑡𝑖 = [𝑥𝑡𝑖1 , 𝑥𝑡𝑖2 , . . . , 𝑥𝑡𝑖𝐷 ] and 𝑝𝑡𝑏 = [𝑥𝑡𝑏1 , 𝑥𝑡𝑏2 , . . . , 𝑥𝑡𝑏𝐷 ], where 𝑏
based spectrum allocation algorithm (QGA-SAA) proceeds as is the index of the particle which has the highest fitness value.
follows: Step 5: set 𝑡 = 𝑡 + 1, and update 𝑣𝑖𝑑 𝑡
and 𝑥𝑡𝑖𝑑 as in [17].
Step 1: given 𝐿, 𝐵, and 𝐶, set 𝐿1 the same as that in step Step 6: repeat the processes in step 3, and compute the
1 of GA-SAA, set population size 𝑃 , set the number of qubits fitness value of each particle. For particle 𝑖, if it’s fitness
∑
𝑁 ∑ 𝑀
value is greater than the fitness value of 𝑝𝑡−1 , then set 𝑝𝑡𝑖 =
in the chromosome as 𝑙 = 𝑙𝑛,𝑚 . 𝑖
𝑡 𝑡 𝑡
𝑛=1 𝑚=1 [𝑥𝑖1 , 𝑥𝑖2 , . . . , 𝑥𝑖𝐷 ]. If particle 𝑖’s fitness value is greater than
Step 2: set 𝑔 = 0, initialize 𝑄(𝑔) = {𝑞1𝑔 , 𝑞2𝑔 , . . . , 𝑞𝑃𝑔 }, and the fitness value of 𝑝𝑡−1 𝑡 𝑡 𝑡 𝑡
𝑏 , then set 𝑝𝑏 = [𝑥𝑖1 , 𝑥𝑖2 , . . . , 𝑥𝑖𝐷 ].
observe every chromosome in 𝑄(𝑔) to obtain a set of states Step 7: if 𝑡 equals to the predefined value, terminate the
(binary strings) 𝑃 (𝑔) = {𝑝𝑔1 , 𝑝𝑔2 , . . . , 𝑝𝑔𝑃 }. algorithm; otherwise, go to step 5.
Step 3: map the 𝑗th (𝑗 = 1, 2, . . . , 𝑙) bit of 𝑝𝑔𝑖 (𝑖 =
1, 2, . . . , 𝑃 ) to 𝑎𝑛,𝑚 , where (𝑛, 𝑚) is the 𝑗th element in 𝐿1 .
III. S IMULATION R ESULTS
For all 𝑚, search all (𝑛, 𝑘) that satisfies 𝑐𝑛,𝑘,𝑚 = 1, and check
whether both of the two bits corresponding to the element in A. Parameter settings for evolutionary algorithms
the 𝑛th line and 𝑚th column of 𝐴 and the element in the 𝑘th In this paper, we choose the parameters of the evolutionary
line and 𝑚th column of 𝐴 are equal to 1; if so, randomly set algorithms such that the total times of fitness evaluation is
one of them to 0. the same in the three algorithms. For GA, the population size
Step 4: compute the fitness values of 𝑃 (𝑔), store the best is set to 20, and the crossover probability and the mutation
solution. probability are set to 0.8 and 0.01, respectively. The GA is
Step 5: if it reaches the maximum generation, terminate the configured to replace 85% of its population each generation,
algorithm; else, go to step 6. 17 of every 20 population members. As for QGA, the popula-
Step 6: set 𝑔 = 𝑔 + 1, observe chromosomes in 𝑄(𝑔 − 1) tion size is 20 and the increment of rotation angle of quantum
to obtain 𝑃 (𝑔) = {𝑝𝑔1 , 𝑝𝑔2 , . . . , 𝑝𝑔𝑃 }. gates is decreased linearly from 0.1𝜋 at the first generation to
Step 7: repeat the processes in step 3, compute the fitness 0.005𝜋 at the last generation. In PSO, the number of particles
values of 𝑃 (𝑔), update the best solution, update 𝑄(𝑔 − 1) to in a swarm is set to 20, the two acceleration coefficients [17]
obtain 𝑄(𝑔) as in [15], and go to step 5. are equal to 2, and 𝑉𝑚𝑎𝑥 = 4. All the three algorithms will
be terminated after 300 iterations (generations).
D. Spectrum allocation based on particle swarm optimization
In PSO, each solution is a ‘bird’ in the flock and is B. Results and discussions
referred to as a ‘particle’. In the proposed PSO-based spectrum The commonly used algorithm to solve the spectrum al-
allocation, a particle specifies a possible conflict free channel location problem presented in Section II is color sensitive
assignment. Note that the position of the particle is analogous graph coloring algorithm (CSGC). For more information of
to the chromosome using binary encoding mechanism in GA CSGC, please refer to [9]. The labeling rules used are collab-
[16], so the structure of the position of the particle in the orative labeling rules proposed in [9]. In order to evaluate the
proposed PSO is analogous to the structure of the chromosome performance of the proposed evolutionary algorithms-based
proposed in GA-SAA. spectrum allocation methods, we compare them with CSGC
We use the same process as in GA to ensure that the in our simulations.
position of the particle satisfies the interference constraints. Table I shows the average rewards over 50 experiments
For fitness evaluation, we directly use 𝑈 (𝑅) as the fitness where 𝑁 = 5, 𝑀 = 5 and 𝑁 = 20,𝑀 = 22. 𝑁 , 𝑀 , 𝐵, 𝐿, and
function. As iteration 𝑡 increases, so does the fitness value of 𝐶 are kept the same under all experiments under a particular
4424 IEEE TRANSACTIONS ON WIRELESS COMMUNICATIONS, VOL. 8, NO. 9, SEPTEMBER 2009
TABLE I
AVERAGE REWARD .
60 TABLE II
C OMPARISON TO OPTIMAL VALUES .
50
N=20,M=22 Generation Algorithm Relative difference (%)
40 or iteration
MSR MMR MPF
Min Reward
Evolutionary algorithms have been used to solve a lot of [3] S. Haykin, “Cognitive radio: brain-empowered wireless communications,”
optimization problems in real applications. However, there still IEEE J. Select. Areas Commun., vol. 23, no. 2, pp. 201–220, 2005.
[4] N. Nie and C. Comaniciu, “Adaptive channel allocation spectrum etiquette
lacks general theoretical analysis of the convergence properties for cognitive radio networks,” in Proc. IEEE DySPAN 2005, pp. 269–278,
of the general evolutionary algorithms, especially QGA and 2005.
PSO, in the literatures. In order to evaluate the convergence [5] J. Huang, R. Berry, and M. L. Honig, “Auction-based spectrum sharing,”
ACM Mobile Networks and Applications (MONET), vol. 11, no. 3, pp.
time of the proposed algorithms, we’ve done experiments 405–418, 2006.
when 𝑁 = 𝑀 = 5. The experiments were run on a 1.66GHz [6] C. Kloeck, H. Jaekel, and F. K. Jondral, “Dynamic and local combined
double processor laptop PC with 1GB of memory. MATLAB pricing, allocation and billing system with cognitive radios,” in Proc.
IEEE DySPAN 2005, pp. 73–81, 2005.
7.0 was used for simulation evaluation. Results show that [7] L. Cao and H. Zheng, “Distributed spectrum allocation via local bargain-
the average computation time of GA-SAA, QGA-SAA, PSO- ing,” in Proc. IEEE DySPAN 2005, pp. 475–486, 2005.
SAA after 10 iterations and CSGC is 0.093s (second), 0.123s, [8] H. Zheng and C. Peng, “Collaboration and fairness in opportunistic
spectrum access,” in Proc. 40th annual IEEE International Conference
0.092s, 0.018s respectively. Even though the computation time on Communications (ICC), pp. 3132–3136, 2005.
of the evolutionary algorithms is larger than that of CSGC, [9] C. Peng, H. Zheng, and B. Y. Zhao, “Utilization and fairness in spectrum
it is obvious that the evolutionary algorithms are fairly easy assignment for opportunistic spectrum access,” ACM Mobile Networks
and Applications (MONET), vol. 11, no. 4, pp. 555–576, 2006.
for real-time implementation for such a small number of
[10] J. H. Holland, Adaptation in Natural and Artificial Systems. Ann Arbor,
iterations, say, 10. MI: University of Michigan Press, 1975.
[11] A. Narayanan and M. Moore, “Quantum inspired genetic algorithm,” in
IV. C ONCLUSIONS Proc. 1996 IEEE International Conference on Evolutionary Computation,
pp. 61–66, 1996.
In this paper, three spectrum allocation methods, GA-SAA, [12] J. Kennedy and R. Eberhart, “Particle swarm optimization,” in Proc.
QGA-SAA and PSO-SAA, are proposed, and CSGC is used IEEE International Conference on Neural Networks, pp. 1942–1948,
for performance comparison. Results show that our proposed 1995.
[13] D. E. Goldberg, Genetic Algorithms in Search, Optimization, and
methods greatly outperform CSGC under all experiments. Machine Learning. Addison-Wesley Publishing Co., 1989.
Furthermore, PSO-SAA is generally found to perform better [14] K.-H. Han and J.-H. Kim, “Genetic quantum algorithm and its ap-
than GA-SAA and QGA-SAA under objectives MSR and plication to combinatorial optimization problems,” in Proc. 2000 IEEE
Conference on Evolutionary Computation, pp. 1354–1360, 2000.
MPF in terms of converged solution quality, while QGA-SAA
[15] J. Yang and Z. Zhuang, “Multi-universe parallel quantum genetic
performs the best under objective MMR. algorithm and its application to blind source separation,” in Proc. IEEE
International Conference on Neural Network and Signal Processing, pp.
R EFERENCES 14–17, 2003.
[16] E. Elbeltagi, T. Hegazy, and D. Grierson, “Comparison among five
[1] FCC, Facilitating opportunities for flexible, efficient, and reliable spec-
evolutionary-based optimization algorithms,” Advanced Engineering In-
trum use employing cognitive radio technologies: notice of proposed rule
formatics, vol. 19, pp. 43–53, 2005.
making and order. FCC Document ET Docket No. 03-108, 2003.
[17] J. Kennedy and R. Eberhart, “A discrete binary version of the particle
[2] I. F. Akyildiz, W. Lee, M. C. Vuran, and S. Mohanty, “Next gen-
swarm algorithm,” in Proc. Conference on Systems, Man, and Cybernet-
eration/dynamic spectrum access/cognitive radio wireless networks: a
ics, pp. 4104–4109, 1997.
survey,” Computer Networks, vol. 50, no. 13, pp. 2127–2159, 2006.