A General PSO Algorithm for Allocation of Multiple Base Stations
CHAPTER 8 Experimental Results
8.2 Experimental Results for Multiple Base Stations
8.2 Experimental Results for Multiple Base Stations
Experiments were made to show the performance of the proposed PSO algorithm on finding the optimal positions of base stations. They were performed in C language on an AMD PC with a 2.0GHz processor and 1G main memory and running the Microsoft Window XP operating system. The simulation was done in a two-dimensional real-number space of 100*100. That is, the ranges for both x and y axes were between 0 to 100. The data transmission rate was limited between 1 to 10 and the range of initial energy was limited between 10000000 to 99999999. The data of all ANs, each with its own location, data transmission rate and initial energy, were randomly generated.
Experiments were first made to show the convergence of the proposed PSO algorithm for two base stations when the acceleration constant (c1) for a particle moving to its pBest was set at 2, the acceleration constant (c2) for a particle moving to its gBest was set at 2, the inertial weight (w) was set at 0.6, the distance-independent parameter (αj1) was set at zero, and the distance-dependent parameter (αj2) was set at one. The experimental results of the resulting lifetime along with different generations
for 50 ANs and 5 particles in each generation are shown in Figure 22.
0 200 400 600 800 1000 1200
0 50 100 150 200 250 300
Generations
Lifetime
Figure 22: The lifetime for 50 ANs and 5 particles
It is easily seen from Figure 22 that the proposed PSO algorithm could converge very fast (below 100 generations). Next, experiments were made to show the effects of different parameters on the lifetime. The influence of the acceleration constant (c1) for a particle moving to its pBest on the proposed algorithm was first considered. The process was terminated at 300 generations. When w = 1 and c2 = 2, the nearly optimal lifetimes for 50ANs and 5 particles along with different acceleration constants (c1) are shown in Figure 23.
860 880 900 920 940 960 980 1000
0 0.5 1 1.5 2 2.5 3 3.5 4
c1
Lifetime
Figure 23: The lifetimes along with different acceleration constants (c1)
It can be observed from Figure 23 that the lifetime first increased and then decreased along with the increase of the acceleration constant (c1). When the value of the acceleration constant (c1) was small, the velocity update of each particle was also small, causing the convergence speed slow. The proposed PSO algorithm might thus not get the optimal solution after the predefined number of generations. On the contrary, when the value of the acceleration constant (c1) was large, the velocity change would be large as well, causing the particles to move fast. It was then hard to converge. In the experiments, the optimal c1 value was about 2. Next, experiments were made to show the effects of the acceleration constant (c2) for a particle moving to its gBest on the proposed algorithm. When w = 1 and c1 = 2, the experimental
results are shown in Figure 24.
880 900 920 940 960 980 1000
0 0.5 1 1.5 2 2.5 3 3.5 4
c2
Lifetime
Figure 24: The lifetimes along with different acceleration constants (c2)
It can be observed from Figure 24 that the lifetime first increased and then decreased along with the increase of the acceleration constant (c2). The reason was the same as above. In the experiments, the optimal c2 value was about 2. Next, experiments were made to show the effects of the inertial weight (w) on the proposed algorithm. When c1 = 2 and c2 = 2, the experimental results are shown in Figure 25.
0 200 400 600 800 1000 1200
0 0.5 1 1.5 2 2.5
w
Lifetim
3
e
Figure 25: The lifetimes along with different inertial weights (w)
It can be observed from Figure 25 that the lifetime first increased and then decreased along with the inertial weight (w). This was because when the value of the inertial weight was large, the particles would move fast due to the multiple of the old velocity. It was then hard to converge. In the experiments, the optimal w value was about 0.6. Experiments were then made to show the effects of the distance-independent parameter (α1) on the lifetime. In the experiments, all ANs had the same value of the distance-independent parameter. The experimental results are shown in Figure 26.
0 200 400 600 800 1000 1200
0 2000 4000 6000 8000 10000
α1
Lifetime
Figure 26: The lifetimes along with different values of the distance-independent parameter (α1)
It can be observed from Figure 26 that the lifetime decreased along with the increase of the value of the distance-independent parameter (α1). It was consistent with the formula of energy consumption. Next, experiments were made to show the effects of the distance-dependent parameter (α2) on the lifetime. The experimental results are shown in Figure 27.
0 200 400 600 800 1000 1200
0 1 2 3 4 5
α2
Lifetime
Figure 27: The lifetimes along with different values of the distance-dependent parameter (α2)
It can be observed from Figure 27 that the lifetime decreased along with the increase of the distance-dependent parameter (α2). It was also consistent with the formula of energy consumption. Besides, the relation between the lifetime and the value of the distance-dependent parameter presented an approximately inverse proportion. Next, experiments were made to show the relation between lifetimes and numbers of ANs. The experimental results are shown in Figure 28.
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
0 10 20 30 40 50 60 70 80 90 100
ANs
Lifetime
Figure 28: The lifetimes along with different numbers of ANs
It can be seen from Figure 28 that the lifetime decreased along with the increase of the number of ANs. It was reasonable since the probability for at least one AN in the system to fail would increase when the number of ANs grew up. The execution time along with different numbers of ANs is shown in Figure 29.
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14
0 20 40 60 80 1
ANs
Time (sec.)
00
Figure 29: The execution time along with different numbers of ANs
It can be observed from Figure 29 that the execution time increased along with the increase of numbers of ANs. The relation was nearly linear. Experiments were then made to show the relation between lifetimes and numbers of particles for 50 ANs and 300 generations. The internal weight was set at 1. The experimental results are shown in Figure 30.
970 980 990 1000 1010 1020 1030 1040 1050 1060 1070
0 10 20 30 40 5
Particles
Lifetime
0
Figure 30: The lifetimes along with different numbers of particles
It can be seen from Figure 30 that the lifetime increased along with the increase of numbers of particles. The execution time along with different numbers of particles is shown in Figure 31.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
0 10 20 30 40
Particles
Time (sec.)
50
Figure 31: The execution time along with different numbers of particles for 50 ANs
It can be observed from Figure 31 that the execution time increased along with the increase of numbers of particles. The relation was nearly linear. This was reasonable since the execution time would be approximately proportional to the number of particles. Next, experiments were made to show the relation between lifetimes and numbers of base stations. The experimental results are shown in Figure 32.
0 1000 2000 3000 4000 5000 6000 7000
0 1 2 3 4 5 6 7
Base stations
Lifetime
Figure 32: The lifetimes along with different numbers of base stations
It can be seen from Figure 32 that the lifetime increased along with the increase of the number of base stations. This is because the distance from an AN to a desired base station would become shorter for a larger number of base stations. The execution time along with different number of base stations is shown in Figure 33.
0 0.05 0.1 0.15 0.2 0.25
0 1 2 3 4 5 6
Base stations
Time (sec.)
7
Figure 33: The execution time along with different numbers of base stations and 50 ANs
It can be observed from Figure 33 that the execution time increased along with the increase of the number of base stations. The relation was nearly linear. This was reasonable since the execution time would be approximately proportional to the number of base stations
Note that no optimal solutions can be found in a finite amount of time since the problem is NP-hard. For a comparison, an exhaustive search using grids was used to find nearly optimal solutions. The approach found the lifetime of the system when a BS was allocated at any cross-point of the grids. The cross-point with the maximum lifetime was then output as the solution. A lifetime comparison of the PSO approach and the exhaustive search are shown in Table 30.
Table 30: A lifetime comparison of the PSO approach and the exhaustive grid search Method Lifetime
The proposed PSO algorithm 1123.3463 The exhaustive grid search
(grid size = 1) 1122.1773
It can be observed from Table 30 that the lifetime obtained by our proposed PSO algorithm was better than those by the exhaustive grid search. The lifetime by the proposed PSO algorithm was 1123.3463 and was 1122.1773 for the exhaustive search when the grid size was set at 1. The execution time by the two approaches is shown in Table 31.
Table 31: A comparison of execution time by the two approaches Method Time (sec.)
The proposed PSO algorithm 0.07 The exhaustive grid search
(grid size = 1) 3983.515
It can be seen from Table 31 that the exhaustive grid search spent much more execution time than the proposed PSO algorithm.