You are on page 1of 7

APPLICATION OF FUZZY GENETIC ALGORITHM FOR ACTIVE QUEUE

MANAGEMENT (AQM) PROBLEM


Abstract:
Today, all information services tend to be integrated on the Internet. In order to
transfer a large amount of data and provide good support for applications on the Internet
such as VOIP and video, it is necessary to design algorithms that control blocking and
manage queues effectively. In this papers, we introduce an algorithm for queue managing
named GA-Fuzzy-AQM (Genetic Algorithm-Fuzzy-Active Queue Management), a fuzzy
improvement of the famous algorithm for queue management called RED (Random Early
Detection). Simulation results show that the proposed GA-Fuzzy-AQM algorithm has
higher effectiveness compared to the traditional RED.
1. General Introduction
Queue management is a group of methods for queue managing and scheduling. This
is a mechanism for providing quality of service (QoS). Buffer management decides
buffer allocation and discards incoming packages in a determined manner when
appropriate or necessary. Whereas, scheduling allows managing broadband allocated to
streams or, in other words, it decides which package will be chosen from which queue.
FIFO (First-In First-Out) is the most popular scheduling algorithm. The lost package can
be regarded as an implicit way to notify the blockage.
There are many effective algorithms proposed to manage queues; for buffer
management: RED, Blue, PBS (Partial Buffer Sharing), DT-Drop Tail….; Scheduling:
RR, WFQ, EDF (Earliest Deadline First)…; queue management algorithms based on
streams include RED, xRED, based on speed include: Blue, PI, KT, Bat, Green, Purple
[1, 2, 6, 7, 8, 9, 10]...
When the rate of incoming package is higher than that rate of outgoing package of router,
the size of the queue will increase and eventually the size is larger than the size of the buffer.
Once the buffer is full, some packages will be lost; Drop Trail (DT) is the most popular type of
package lost. If a package comes in when the buffer is full, it will be discarded. Therefore, DT
mechanism interacts poorly with blockage control mechanism of TCP and, consequently, leads to
low level of effectiveness. Active Queue Management (AQM) is a method which actively notifies
the sender when the first sign of blockage appears before the buffer is overflow. By using AQM,
the sender is notified soon about the blockage and can act accordingly [6, 9, 10, 12].
Random Early Detection (RED) [7, 9, 12] an AQM mechanism, proposed to solve
problems related to DT as pointed out earlier. RED uses randomness to solve both the
outgoing key and the full queue problems productively without requiring any change at
terminals. The purpose of RED is to avoid buffer overflowing by discarding random
packages.
RED set the minimum limit for lost package as min th and maximum limit for lost
package as maxth. If the average size of the queue (avg) exceeds minth, RED starts to
discard packages based on a probability of avg. If avg exceeds maxth, all following
packages are discarded [[8, 9]. Because the size of the queue is used as a blockage flag,
the entire level of blockage is not expressed accordingly. On the other hand, the average
size of the queue changes over the level of blockage and setting parameters leads to delay
queuing of RED be too sensitive to load and setting parameters[11].
To solve problems of traditional RED mechanism, authors of this paper propose the
GA-Fuzzy-AQM algorithm based on proposed RED. The main idea of GA-Fuzzy-AQM
is integrating fuzzy GA into RED in order to optimize parameters of fuzzy control rules
aiming at better effectiveness compared to variations of Fuzzy – AQM [[10, 12].
2. Fuzzy GA in AQM
2.1 Topo of the system
Overall diagram: Assume that there is a network structure as in figure 1:
10Mbps
1

15Mbps 10Mbps
A B d
2 15ms 15ms

15ms
n

Figure 1: Illustrating a bottleneck from A to B


Figure 1 illustrates a bottleneck by using connections from router A to router B. the
data transmission speed between A and B is 15Mbps (about 15000 packages/second).
Each package contains 125 bytes with delay time of around 15 millisecond. All
connections to A have the speed of 10Mbps and the delay of 15ms and the size of the
queue is 300 packages. Queue A operates with mentioned mechanisms. Developing fuzzy
GA for control AQM will be implemented in two steps: constructing fuzzy control
system and refining the control system by using GA.
2.2 Fuzzy control system for AQM
q0 + e(kT)
sGi
- Bộ p(kT) Đối tượng q
điều sG0 ĐK
Trễ T
khiển
sGi mờ
e(kT - T)

Figure 2: Model of the fuzzy control system for AQM


Developing fuzzy algorithm, fuzzy GA for AQM has several differences compared
to developing PI or PID algorithms. With PI and I, it is difficult to make prediction based
on errors that occur in the future. PID is a traditional algorithm which is used widely in
industries. The fuzzy control and fuzzy GA for controlling AQM introduces new results
with the following features:
+ Able to integrate experts’ knowledge into the system which controls AQM
+ Controllers which use fuzzy algorithm, fuzzy GA are flexible.
+ Able to fine global variables.
+ Building mathematical model for the control system is unnecessary
+ A buffer with big size is not mandatory…
Rules system for the fuzzy control system is shown in Table 1 and language values
for input variables and output variables are illustrated in Figure 3a, 3b, and Table 1 [3].

p(kT) qc_err (kT - T)


NVB NB NS Z PS PB PVB
NVB H H H H H H H
NB B B B VB VB H H
NS T VS S S B VB VB
qerr(kT) Z Z Z Z T VS S B
PS Z Z Z Z T T VS
PB Z Z Z Z Z Z T
PVB Z Z Z Z Z Z Z
Table 1: Illustrating fuzzy rules for the fuzzy controller

a)

b) . c)
Figure 3 Inputs a), outputs b) and reasoning surface c) of the fuzzy controller
2.3 Fuzzy GA for AQM
GA is used as optimal searching for types of membership function and is
implemented as follows: Production, Selection, and Mutation.
2.3.1 Encoding
Encoding is the process of transform a fuzzy model to parameters in one-
dimensional space of individuals. In other words, each individual (a series of values)
contains parameters for constructing this fuzzy model. Here, the fuzzy model of rules as
“if … and … then…” will have the conditions as triangular type of membership function
with its right, center, and left width. That means an individual encompass the following
information in GA:
- Values that express position for building membership function
- Right, left and center width of membership function
- Real values of the fuzzy series as results of rules showed in figure 3.
The encoding process uses linear mapping as:
b
Cij= C min  L ( C max  C min ) (1)
2 1
Where:
+ b is a decimal value converted to binary string
+ L is the length of binary string
+ Cmax, Cmin are maximum and minimum values of gene as users define.

The encoding process for a gene involves in individulas. Assume that each
parameters has the length of 10 bits then each gene will hold a total of 10×3×7×3
= 630 bits. This means the fuzzy system with rules as if…and …then... will fall
into the following form:
1 2 3 4 5…29 30 211 … 239 240 421… …698 599 601 … 629 630
Input of individual 1.1 Input of individual 2.1 In put of Output of
individuals from 1 individual 7
Left, Center, Right Left, Center, Right to 6 Left, Center, Right

Figure 4: A chrosomone for the encoding string


Figure 4 shows the relationship of values of the string and the structure of input parameters
of membership function with a chromosome. It’s the position of each corresponding membership
function which affects the rate ................ There are 3 layers of values used for each individual. In
practice, there are many individuals and individuals are obtained randomly and the process is
implemented according to genetic operations.
As in figure 4, the left point of the first membership function is the following bits: 1, 2, ....,
10, the center of the first membership function is the following bits: 11, 12, ..., 20 and the right
point of the first membership function is the following bits: 21, 22, ..., 30. There are 7
membership functions for the first input variable, thus the first 30x7 bits of the gene are for the
first input variable. the left point of the second membership function is the following bits: 221,
222, ...., 230, the center of the second membership function is the following bits: 231, 232, ...,
240 and the right point of the second membership function is the following bits: 421, 422, ..., 630.
Similaly, there are 7 membership functions for the second input variable, thus the first 30x7 bits
of the gene are for the condition part. For genes (421, ..., 630) will provide us the output of 7
output variables. With that results, we can calculate real values and calculate fuzzy solution
afterwards according to the center method. Therefore, the position of gene in the input space will
change in the algorithm implementation process.
2.3.2 Crossover
Crossover operation is iimplemented by changing sorted positions for a membership
function. Two parent individuals in the population will be chosen randomly. The crossover
process is also done by chosing values for positions of membership function. The structure of
genes will be changed at crossover points. Children generations will inherate from their parents:
individual A (father) and individual B (mother). It means changed values of membership function
have effect on their children. Children will inherate good characteristics of their parents.
2.3.3 Mutation
Mutation process is applied to individuals by using crossover with probability of
Pm. The mutation process is selection by changing values of bits to 1 or 0. New
individuals are created by mutation and crossover.
2.3.4 Fitness function
Fitness function is used to evaluate the quality of the fuzzy model. It reflects the
natural selection process according to some fitness level. This model built reflects
changing process as by the level of fitness of the system. In other words, the fitness levels
of individuals are calculated as follows:
f m (k )  exp([(  (k ) / e(k ))  1] 2 (2)
Where: Δε(k) is the error between two generations
e(k) is the control error
The AQM controlling diagram using general controlling algorithm can be illustrated as
in figure 5.
q0(k) e(k) u(k) q(k)
Controlling G(s)
algorithm Objects
-

Figure 5: The diagram of the general control system AQM


3. Experiments
3.1 Mathematical Model
The control system using fuzzy GA will be illustrated in figure 6.
The assumption is that the system is modeled with parameters calculated as in [3],
C 2  Rs
e
G ( s)  2 N
 2N  1
 s  2  s  
 R C  R (3)
Where: C is the speed of transmission line (packages/second), q0 is the expected value of
the queue, q is the actual output value, N load (the version of TCP), R is RTT (round-trip time);
R=2(q/C +Tp), Tp is a determined value., P is the probability that the package be lost/ marked.
In order to examine the working environment of the network, we give a simulation
example as follows: A network of computers operates like TCP/IP with following parameters:
Cc is the capacity of the transmission line, Cc = 105 packages/second = 100Mbps;, Rc is
RTT, Rc = 0.03s, Nc = 30. The above parameters are in the domains as: C  (0, Cc); R  (0, Rc);
N  (Nc,  );
The transmission function of AQM system used for RED, calculated from (2):
C 2  Rs 5 8 0,03s
e .10 e
Gdt ( s)  2N  3
(4)
 2 N  1  2  100 
 s  2  s    s   s  
 R C  R  3  3 
  100 T  
 3 z 3
z  e 3
T  z 
5.1010  98 98   
Wdt (z )   2
 100
 2  (5)
3.98   T  T
 
100
T  
ze 3
z e 3
z e 3  

   
Change Z of the Object (4) will result in (5). Plug T = 1 we obtain:
q  k  1  0,513417119q  k   3, 42782.1015 q  k  1  5,72143.1030 q  k  2 
(6)
2672933,733u  k   2,82558.107 u  k  1
3.2 Experimental results
Create new Y N
 Continue?
population End

Training data Best fitness value Standard


Rule 1  error
Result
Reasoning Rule 2
Run fuzzy 1.0
Measure
rules  model µ ments
 0
x  errors
Parameters Rule n
Open Apply rules on
Optimizing by
 Valid data
knowledge valid data
using GA database

Figure 6: Refining of fuzzy model by using GA

a) Response signal (d) Response signal


b) Error and control signal (e) error and control signal
c) Output membership function of fuzzy controller (f) Output function after
refining by GA.

Figure 7 a), b), c): Results of fuzzy control before using GA


d), e), f): Results of fuzzy control after using GA
Figure 7 illustrates that output data packages are asymptotical to requested data packages
q0 = 200 with a) using fuzzy control algorithm and with f) using fuzzy GA. Similarly, when we
compare error of output with response signal using fuzzy control algorithm in b) and using GA in
e). We can see the change of type of membership function in f) using GA compared to the type of
membership function before using GA in c).
3.3. Assessment
To assess the effectiveness of Fuzzy-GA-AQM compared to RED, we conduct an
experiment using NS-2 for the network in figure 1. With this network, connections are turned on
in 2 seconds and turned off in 3 seconds from one of source nodes (n 1, n2, n3, n4, …, nn) to the
destination node(nd). Moreover, all sources support ECN and are started randomly after the
second time of simulation. Lost packages are recorded in 10 seconds in about 100 seconds of
simulation. Lost packages are also recorded for RES in the same conditions with the same
network. For RED queues, minth and maxth are set as 30% and 90% of the size of the queue.
Blockage notification mechanism of RED was most actively implemented by setting max p to 1. In
this experiment, it was the ideal setting for max p because it will reduce queuing delay and lost
rate of packages for RED.
18 (a) 1000 kết nối 35 (b) 4000 kết nối
16 30
Re d
14
Phần trăm mất gói

Fuz z -GA-AQM
Phần trăm mất gói

25
12
10 20
8 15
6
10
4 Re d
5
2 Fuz z - GA-AQM

0 0
0 50 100 150 200 0 50 100 150 200
Kích thước bộ đệm Kích thước bộ đệ m

Figure 8: Lost rate of packages using RED, BLUE and Fuzz-GA-AQM

You might also like