Professional Documents
Culture Documents
Abstract
This project studies the application of the genetic algorithm in
optimizing cellular radio networks. The aim of the algorithm is to
allocate the available frequency channels in such a way that the average
quality of the signals that the mobile stations receive is maximized,
while meeting the minimum requirement even for the worst signals.
In this study, a genetic algorithm for solving the channel allocation
problem is implemented in MATLAB environment and the parameters
of the genetic algorithm are tuned so that the algorithm converges
nicely. Also, results for an example case are presented. The MATLAB
code written for this project is given in appendix.
1
CONTENTS
Contents
1 Introduction 3
2 The network 4
2.1 Topology of the network . . . . . . . . . . . . . . . . . 4
2.2 Propagation modeling . . . . . . . . . . . . . . . . . . 4
3 On the Genetic Algorithm 6
4 Implementation 9
4.1 Initialization . . . . . . . . . . . . . . . . . . . . . . . 9
4.2 Crossover . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.3 Mutation . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.4 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.5 Selection . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5 GA parameter tuning 12
5.1 Crossover probability . . . . . . . . . . . . . . . . . . . 12
5.2 Mutation probability . . . . . . . . . . . . . . . . . . . 13
5.3 Number of generations . . . . . . . . . . . . . . . . . . 14
6 Results 15
6.1 Maximum tness with dierent numbers of frequency
channels . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6.2 Comments on the performance . . . . . . . . . . . . . 16
7 Summary and discussion 17
A MATLAB code 18
A.1 rungene.m . . . . . . . . . . . . . . . . . . . . . . . . . 18
A.2 crossover.m . . . . . . . . . . . . . . . . . . . . . . . 19
A.3 mutate.m . . . . . . . . . . . . . . . . . . . . . . . . . 20
A.4 scores.m . . . . . . . . . . . . . . . . . . . . . . . . . 21
A.5 NWsetup.m . . . . . . . . . . . . . . . . . . . . . . . . . 22
A.6 hexarandom.m . . . . . . . . . . . . . . . . . . . . . . . 23
2
1 INTRODUCTION
1 Introduction
The received signal quality in cellular radio networks depends basically
on three things: the received signal power, the interference power, and
the level of background noise. The received signal power depends on
the distance between the transmitter and the receiver, and thus, it can-
not be optimized. Also, the level of background noise is something that
cannot be changed. Therefore, optimizing the signal quality must be
done by minimizing the interference. In this project, only co-channel
interference is taken into account.
The sources of the interference that the mobile stations receive are the
other connections on the same frequency channel in the other parts
of the network. The closer the interferer, the higher the interference
it causes. This gives rise to a question of `how should the available
frequency channels be allocated to the mobile stations so that the per-
formance of the network is optimized'. In any matured cellular network
the number of users is much larger than the number of frequency chan-
nels. Therefore, each channel is shared by several users, but if their
connections do not take place too close to each other, then they do not
interfere each other too much.
In this project the applying of genetic algorithms for radio network
optimization problems is studied. Given the network topology and the
locations of the mobile stations in it, one of the available frequency
channels is allocated for each mobile. If the number of available chan-
nels is and the number of mobile stations in the network is , then
N M
there are N possible allocation combinations. For any real life net-
M
work N
M
is such a big number that there is no way to go through
all the combinations in searching the most suitable one. Genetic algo-
rithms provide means for solving the problem more eectively.
This study includes the formulation of the cellular network optimiza-
tion problem in such a way that it can be solved using a genetic algo-
rithm, and the implementation of the algorithm in MATLAB environ-
ment. The behavior of the algorithm is studied, and the its parameters
are tuned accordingly. Results for an example network are also pre-
sented.
This document has the following structure: Section 2 gives the setup
of the example network under study and introduces some basic prop-
agational results that are used. In Section 3, the basics of the genetic
algorithms are introduced. The implementation of the algorithm is ex-
plained in Section 4, and its parameters are tuned in Section 5. Some
results for the example network are presented in Section 6. Section 7
summarizes the work done.
3
2 THE NETWORK
2 The network
2.1 Topology of the network
The topology of the network under study is presented in Figure 1 be-
low. The network consists of 19 base transceiver stations, each serving
one cell with a radius of one kilometer. The cells form a hexagonal
grid.
In each cell there are three mobile stations. The locations of the mo-
biles are chosen at random from a distribution that is uniform over the
corresponding hexagonal cell.
4
1
y [km]
−1
−2
−3
−4
−5 −4 −3 −2 −1 0 1 2 3 4 5
x [km]
Figure 1: The topology of the network under study. Base transceiver stations
are in the middle of the cells, and mobile stations are marked by crosses.
where
4
2.2 Propagation modeling
2000 MHz, and adding the antenna gain of 9 dB [5], we get the total
loss, , as a function of only:
L R
L = 119 1 + 37 6 log( )
: : R : (2)
P Rx = Tx ,
P L (3)
where Tx is the transmission power of 43 dBm.
P
The quality of the received signal not only depends on the received
signal power, Rx , but also on the amount of interference and noise.
P
where
SINR is the SINR for mobile station j on the linear scale,
j
5
3 ON THE GENETIC ALGORITHM
Initialization
Yes
Terminate
Initialization
In the initialization, one generates, often randomly, a population from
which new generations are formed. At this point one also needs to de-
ne the terminating condition so that the the algorithm stops running
once an acceptable solution is found.
Crossover
Crossover is one of the genetic operator used in producing new candi-
dates using the features of the existing ones. The crossover procedure
is illustrated in Figure 3 below.
6
3 ON THE GENETIC ALGORITHM
2 2 2 2 2 2 2 2 2
2 2 2 2 2 2 2 2 2
2 2 1 1 1 2 2 2 2
The crossover procedure consists of three parts. First one selects two
parents from the population. Then the crossover points are selected.
The selection of crossover points is done at random, usually so that
the distribution from which the points are drawn from is uniform. In
Figure 3 two crossover points are marked with dotted lines. Once the
points are dened two osprings are generated by interchanging the
values between the two parents as illustrated in the gure.
In the genetic algorithm crossover is the operator that spreads the
advantageous characteristics of the members around the population.
Mutation
In the genetic algorithm mutation is the operator that causes totally
new characteristics to appear in the members of the population. In
many cases the mutations, of course, result in osprings that are worse
than the other members, but sometimes the result has such character-
istics that make it better.
Figure 4 below demonstrates the mutation operation. First, one selects
a member from the population to be mutated and a point of mutation.
Then the values at the point of mutation is replaced by another value
that is picked randomly from the set of all possible values.
7
3 ON THE GENETIC ALGORITHM
1 1 1 1 1 1 1 1 1
1 1 2 1 1 1 1 1 1
Figure 4: Mutation.
Evaluation
After the population is manipulated using the genetic operators, the
tness of each of the new osprings is evaluated. For this one needs
to have a numerical function, tness function.
Selection
In the selection the weakest individuals in the population are elimi-
nated. The most t osprings survive to the next generation.
8
4 IMPLEMENTATION
4 Implementation
A genetic algorithm that searches for optimal channel allocations for
the example network presented in Subchapter 2.1 was implemented
in MATLAB environment. In this section the details of the imple-
mentation are presented, the complete MATLAB code is given in Ap-
pendix A.
4.1 Initialization
The population is formed so that there are 12 individuals that are
represented as vectors. The length of each of the individuals is the
same as the number of mobile stations connected to the network. The
ith value in the vector gives the frequency channel that mobile station
i is using.
Because one of the purposes of this project is to study the performance
of the genetic algorithm, the individuals are initialized corresponding
to a worst case situation, i.e., such case in which all the mobile stations
are allocated to the same channel. In this case the one selected is the
channel number one.
The terminating condition is dened by the number of generations to
be produced. In order to better compare the dierent evolutions the
length of the run should be constant. Later, this `age' of the population
is selected so that the algorithm works optimally.
4.2 Crossover
In crossover procedure the population of 12 parents is collected into
pairs of two so that the rst parent is paired with the twelfth one,
the second parent with the eleventh one, and so on. The crossover is
executed twice for each pair of parents. Therefore, they will get four
children.
Overall, the size of the population of children is 24. The order of the
children is mixed so that the siblings are not always next to each other
in the new generation, see Figure 5.
In crossover there is also a probability, namely crossover probability,
involved. With this probability the crossover is done, otherwise the
children are identical to their parents. The crossover probability is
one of the parameters of the algorithm to be tuned later on.
A MATLAB implementation of crossover is presented in Appendix A.2.
9
4.3 Mutation
1 12 2 11 3 10 4 9 5 8 6 7
1 7 13 19 2 8 14 20 3 9 15 21 4 10 16 22 5 11 17 23 6 12 18 24
Figure 5: Crossovers.
4.3 Mutation
Mutation is carried out for the individuals after the crossover proce-
dure. In mutation one changes one of the values in a vector represent-
ing an individual. This is carried out with a pre-dened probability,
mutation probability. Just like crossover probability, this mutation
probability is one of the parameters of the algorithm.
A MATLAB implementation of mutation is presented in Appendix A.3.
4.4 Evaluation
A smart channel allocation has basically two characteristics. Firstly,
the average signal-to-interference-and-noise ratio, SINR, that mobile
stations receive must be as high as possible. This reects the overall
performance of the network. On the other hand, the minimum SINR
requirement for all the users must be met. In this case the minimum
requirement is set at SINR = 9 dB.
The tness function in this case has the following form:
tness d + penalty + jitter
= SINR ; (7)
where
d
SINR is the SINR that the mobile stations experience on
average in dB,
penalty decreases the tness if some mobiles experience a
SINR that is lower than 9 dBm, and
jitter adds randomness.
The penalty and jitter, respectively, are calculated with the following
formulas:
penalty = ,5 9 , min 9 min (SINR ) ; (8)
10
jitter =
# +1 G
U; (9)
where
10
4.5 Selection
and
U is a random number from a uniform distribution between
0 and 1.
Obviously, the eect of jitter becomes negligible in higher generations.
In the beginning however, when # is small, jitter has an eect on
G
the tness ; this way none of the individuals do not start to dominate
the others too much at a point when all of the individuals are equally
bad.
A MATLAB implementation for tness function, scores.m, is pre-
sented in Appendix A.4.
4.5 Selection
A simple selection scheme is utilized. Of the 24 individuals the worse
half is eliminated and the rest will contribute to the next generation.
In the MATLAB implementation, selection is carried out in function
rungene.m, see Appendix A.1 for details.
11
5 GA PARAMETER TUNING
5 GA parameter tuning
There are three parameters related to the implementation of the ge-
netic algorithm that must be tuned before the algorithm is used. These
parameters are crossover probability (Subsection 4.2), mutation proba-
bility (Subsection 4.3), and the number of generations to be produced
(Subsection 4.1). Crossover and mutation probability aect on how
the population evolves in time, and the number of generation must be
chosen so that the optimal, or at least a good one, solution is found
but not too many generations are produced in vain.
20
10
0
Score
−10
−20
P(crossover)=0.2
−30 P(crossover)=0.4
P(crossover)=0.6
P(crossover)=0.8
P(crossover)=1.0
−40
0 50 100 150 200 250 300 350 400 450 500
Generation
From Figure 6 it can be seen that with all the values of crossover
probability the evolution converges pretty nicely. Even though there
are some dierences between the runs, the time of convergence seems
to be mostly a matter of luck. With the crossover probabilities closer
to one the evolution converges slightly faster, and therefore, a value of
0.8 is chosen to be the crossover probability with which the nal results
12
5.2 Mutation probability
20
10
0
Score
−10
−20
P(mutation)=0.2
−30 P(mutation)=0.4
P(mutation)=0.6
P(mutation)=0.8
P(mutation)=1.0
−40
0 50 100 150 200 250 300 350 400 450 500
Generation
13
5.3 Number of generations
14
6 RESULTS
6 Results
The performance of the algorithm in optimizing cellular radio networks
is studied in this section. In the system to be optimized there are 19
base stations as illustarted in Figure 1 and three mobile stations in
each cell. The locations of the mobile stations are chosen randomly,
but the coordinates have been the same in every case. Because the
mobile positions aect on the tness, having the locations unchanged
decreases the unwanted variability in the results.
30
25
20
15
Final Score
10
−5
−10
−15
4 6 8 10 12 14 16 18 20 22
Number of Frequencies
The results are plotted in Figure 8. With the lowest numbers of fre-
quency channels the maximum tness is very bad. In these cases not
all of the moibile stations experience a SINR higher than 9 dB. This
results in penalty term dominating the tness. In other worls, the mo-
bile stations are packed so tightly on the available frequency channels
that it is not possible to meet the minimum requirements for all the
15
6.2 Comments on the performance
of them. In cases where there are more than 9 frequency channels the
maximum tness increses with a slope smaller than that with cases
where there are less than 9 frequency channels. In this case the mini-
mum requirements of SINR = 9 dB is met for all the mobile stations
and the tness is dominated by the average SINR. The eect of jitter
10 1 0 025. Therefore, its eect can not be
is at most equal to 400+1 :
seen in Figure 8.
in the network. In the cases studied here this goes from 457 2 1034
to 2157 2 1075 . Clearly, nding the optimal allocations by going
through all the possibilities is not possible, which justies the use of
more intelligent methods such as genetic algorithms. With the imple-
mentation of a genetic algorithm used here the number of allocations to
be evaluated is 24 400 = 9600 even though a very conservative safety
margin was selected for the number of generations to be produded.
16
7 SUMMARY AND DISCUSSION
17
A MATLAB CODE
A MATLAB code
A.1 rungene.m
This is the core of the algorithm that runs the process and from which
the other functions are called. One should note that some parameters
must be initialized beforehand with NWsetup.m (Appendix A.5).
N_MS = length(MS_cell);
co_prob = 0.8;
mt_prob = 0.4;
% Initialization
% Start with a population of 12
% Worst case individuals (in each combination all the
% MSs are using the same frequency)
%
% Run the algo here.
%
gen_number=1;
while (gen_number<=N_gen)
18
A.2 crossover.m
% Crossover
for i=1:6
temp=crossover(MS_freq_sel(i,:),MS_freq_sel((12-i+1),:),co_prob);
MS_freq_pro(i,:) = temp(1,:);
MS_freq_pro((i+6),:) = temp(2,:);
temp=crossover(MS_freq_sel(i,:),MS_freq_sel((12-i+1),:),co_prob);
MS_freq_pro(i+12,:) = temp(1,:);
MS_freq_pro((i+18),:) = temp(2,:);
end;
% Mutation
for i=1:24
MS_freq_pro(i,:) = mutate(MS_freq_pro(i,:), N_freqs, mt_prob);
end;
gen_number = gen_number + 1;
end;
A.2 crossover.m
This function carries out the crossover procedure.
19
A.3 mutate.m
%
% This function carries out a crossover for two vectors
% with a probability of prob.
%
% USAGE: crossover(vect1, vect2, prob)
%
% vect1 and vect2 are vectors of the same size
% prob is the crossover probability
%
if (rand<prob)
position1 = ceil((length(vect1)-2)*rand) + 1;
position2 = ceil((length(vect1)-2)*rand) + 1;
if (position1>position2)
temp = position1;
position1 = position2;
position2 = temp;
end;
for i=position1:position2
temp = vect1(i);
vect1(i) = vect2(i);
vect2(i) = temp;
end;
end;
cc = [vect1; vect2];
A.3 mutate.m
This function mutates the individual that is given as input.
%
% This function mutates the values in vect with
% a probability of prob. Possible values go
20
A.4 scores.m
% from 1 to maxvalue.
%
% USAGE: mutate(vect, maxvalue, prob);
%
if (rand<prob)
position = ceil(length(vect)*rand);
vect(position) = ceil(maxvalue*rand);
end;
bb = vect;
A.4 scores.m
This function evaluates the individual that is given as input. The
tness is calculated by (7).
%
% This function computes the score for vector MS_freq
% in the genetic algorithm.
%
% USAGE: scores(MS_freq, MS_cell, RxP_dB)
%
% MS_freq is a vector that tells which frequency each MS
% is using
% MS_cell tells in which cell each MS is
% RxP_dB is a matrix with entry (i,j) how much power MS i
% receives from BTS j
% gen is the number of the corresponding generation
%
N_MS = length(MS_freq);
21
A.5 NWsetup.m
for i=1:N_MS
for j=1:N_MS
if (MS_freq(j)==MS_freq(i) & j~=i)
I_mW(i) = I_mW(i) + 10^(RxP_dB(i,MS_cell(j))/10);
elseif (j==i)
C_mW(i) = 10^(RxP_dB(i,MS_cell(j))/10);
end;
end;
end;
for i=1:length(MS_freq)
I_dB(i) = 10 * log10(I_mW(i));
C_dB(i) = 10 * log10(C_mW(i));
CIR_dB(i) = C_dB(i) - I_dB(i);
end;
dd = mean(CIR_dB)-5*(9-min(9,min(CIR_dB)))+10/(gen+1)*rand;
A.5 NWsetup.m
This script initializes some parameters and must be run before the
rungene.m (Appendix A.1). The base station coordinates and the
number of mobile stations per cell are dened here.
clear all;
cell_radius = 1; % Cell radius in km
cell_mobiles = 3; % Number of mobile staions per cell
% BTS coordinates
22
A.6 hexarandom.m
for i=1:(cell_mobiles*length(BTS_loc)),
j = ceil(i/3);
MS_loc(i,:) = BTS_loc(j,:) + hexarandom(cell_radius);
MS_cell(i) = j;
end;
MS_cell=MS_cell';
for i=1:N_MS
for j=1:N_BTS
R = max(0.015,sqrt(sum((MS_loc(i,:)-BTS_loc(j,:)).^2)));
p_losses(i,j) = 119.1+37.6*log10(R);
end;
end;
RxP_dB = 43 - p_losses;
A.6 hexarandom.m
This function randomly pick coordinates from a uniform distribution
inside a hexagon with a radius of 1. The implementation is such that
only two random numbers are generated, which makes it computation-
ally eective.
function aa = hexarandom(cell_radius);
x = rand;
y = 3 * rand;
23
A.6 hexarandom.m
x = x + y/2;
y = y*sqrt(3)/2;
if (sector == 2)
x=x-1;
elseif (sector==3)
x=x-3/2;
y=y-sqrt(3)/2;
elseif (sector==4)
x=x-2;
y=y-sqrt(3);
elseif (sector>=5)
x=x-3/2;
y=y-3*sqrt(3)/2;
end;
aa = cell_radius*[x y];
24
REFERENCES
References
[1] European Telecommunications and Standards Institute, ETSI TR
101 112 version 3.2.0, Universal Mobile Telecommunications Sys-
tem (UMTS); Selection procedures for the choise of radio trans-
mission technologies for the UMTS, 1998
[2] Steven W. Smith, The Scientist and Engineer's Guide to Digital
Signal Processing, California Technical Publishing, 1998
[3] Hans-Paul Schwefel, Evolution and Optimum Seeking, John Wi-
ley & Sons, New York, 1994
[4] George F. Luger and William A. Stubbleeld, Articial Intelli-
gence: Structures and Strategies for Complex Problem Solving,
3rd ed., Addison-Wesley, Massachusetts, 1998
[5] www.mobilemark.com/PCS_WLL_Wireless_antennas.html1
25