Particle Swarm Optimization Based Fuzzy-Neural Like PID Controller for TCP / AQM Router

In this paper a PID Fuzzy-Neural controller (FNC) is designed as an Active Queue Management (AQM) in internet routers to improve the performance of Fuzzy Proportional Integral (FPI) controller for congestion avoidance in computer networks. A combination of fuzzy logic and neural network can generate a fuzzy neural controller which in association with a neural network emulator can improve the output response of the controlled system. This combination uses the neural network training ability to adjust the membership functions of a PID like fuzzy neural controller. The goal of the controller is to force the controlled system to follow a reference model with required transient specifications of minimum overshoot, minimum rise time and minimum steady state error. The fuzzy membership functions were tuned using the propagated error between the plant outputs and the desired ones. To propagate the error from the plant outputs to the controller, a neural network is used as a channel to the error. This neural network uses the back propagation algorithm as a learning technique. Firstly the parameters of PID of Fuzzy-Neural controller are selected by trial and error method, but to get the best controller parameters the Particle Swarm Optimization (PSO) is used as an optimization method for tuning the PID parameters. From the obtained results, it is noted that the PID Fuzzy-Neural controller provides good tracking performance under different circumstances for congestion avoidance in computer networks.


Introduction
The term "congestion control" is used to describe the efforts made by network nodes to prevent or respond to overload conditions.Congestion in a computer network is a state in which performance degrades due to the saturation of network resources such as communication links, processor cycles, and memory buffers.Network congestion has been well recognized as a resource-sharing problem.When too many packets are difficult to be described as a mathematical model, and the controller can be designed to apply heuristic rules contending for the same link, the queue overflows and packets have to be dropped.
When such drops become common events, the network is said to be congested.Most networks provide a congestion-control mechanism to deal with just such a situation [1].The Internet Engineering Task Force (IETF) has proposed the deployment of active queue management (AQM) mechanisms [2] at gateways to improve the performance of TCP congestion control.AQM has been a very active research area in the Internet community.Random early detection (RED) [3] is an extensively studied AQM algorithm that can detect congestion.It controls congestion by randomly dropping packets with certain probability that is a function of the average queue size (q avg ).In recent years, the more needs for the congestion controllers having enough ability which is more logically predictable and reliable are occurred.For this reason, the traditional control algorithms which have been used only for mechanical or electrical systems are adopted to the area of congested network and their performances which are known as relatively good.Consequently, the more controllers which have various featured types have been adopted to the network congestion control area using control theories.On the issue of applying control theories to the network, especially AQM Router, a proportional (P) controller and a proportionalplus-integral (PI) controller for AQM [4] were designed based on the classical control theory and the dynamic model of the TCP congestion control [5] and its liearized model [6].And also, [7] proposed an adaptive fuzzy AQM for congestion avoidance in TCP/AQM networks.More recently [8] developed a new AQM algorithm based on neural networks.The proposed controller is simple and can be easily implemented in high-speed routers.
In [9] proposed the adoption of a Fuzzy Proportional Integral (FPI) base genetic controller as an AQM for internet router.
Here, a Fuzzy-Neural like PID controller based PSO is designed as an AQM for internet router.
Developments in intelligent control had been made in the past years through the development of fuzzy logic control (FLC) and Neural Networks (NN) [10].
The main advantage of the Fuzzy Logic Controller (FLC) is that it can be applied to plants that are that reflect the experience of human experts.PID FLCs have been successfully applied to a variety of practical problems.In spite of its practical success, there is no standard procedure for tuning PID FLCs [11].
Artificial Neural Network (ANN) is a combination of processing elements that perform certain tasks through learning weights.
Neural Networks provide a different approach to problem solving from linguistic or algorithmic systems such as FLC.
By combining both algorithms of NNs and FLCs together a robust controller may be achieved, which can give precise actions and learn to enhance its performance.A FLC can represent human reasoning while NN can simulate human learning [12].
The organization of the paper is as follows: Section 2 describes the linearized AQM model.Section 3 describes the Fuzzy Neural Network (FNN) design.
The simulation results are given in Section 4 to verify the proposed controller using MATLAB package.Finally, a conclusion is given in section 5.

TCP/AQM System Model
AQM has been extensively analyzed using control-theoretical methods.Control-theoretical approaches lead to stable, effective, and robust congestion control operation.In [5], the non-linear dynamic model for multiple TCP flows control has been developed based on fluid-flow theory to model the interactions of a set of TCP flows and AQM routers in computer networks which consist of a system of nonlinear differential equations.For the control theoretical analysis, it was approximated as a linearized constant model by small signal linearization about an operating point (W 0 , q 0 , p 0 ), see [6] for linearization details, which leads to the following : where δW(t) ≈ W − W 0 , δq(t) ≈ q − q 0 , δp(t) ≈ p − p 0 , denotes the time-derivative of W(t),   denotes the time derivativeof q(t), and W: Expected TCP window size (packets); q: Expected queue length (packets); R 0 : Round-trip time (seconds); C: Link capacity (packets/second); N: Load factor (number of TCP sessions); p: Probability of packet mark/drop; t: Time.The expected queue length q and the expected TCP window size W are positive value and bounded quantities.And also, the probability of packet (mark/drop) p takes value only in [0,1].
Taking the Laplace transform of Equation ( 1) and rearranging the following transfer functions are obtained: So, the overall plant transfer function becomes: And can be expressed as: Thus, the block diagram of linearized AQM control system is shown in Figure 1.In this diagram P TCP (s) denotes the transfer function from loss probability δp(t) to window size δW(t), P queue (s) denotes the transfer function from δW(t) to queue length δq(t), and C(s) denotes the transfer function of controller.Taking the Z-transform to Equation ( 6), the designed plant transfer function is obtained after considering the sampling time half of R 0 .Precisely and for consider the case study with N = 60, C = 3750 packets/sec and R 0 = 0.253 sec the following discrete transfer function are obtained.

Fuzzy Neural Network Design
In order to design a FNC a Neural Network (NN) should be designed first.This NN represents the structure of FLC.It's called Fuzzy Neural Network (FNN) Structure.In this work, it assumed that a Mamdani type FLC with two inputs of error and rate of error and one output is used.The memberships used for the inputs and output are bill shaped type with 7 memberships for each.These rules are reduced from 7 × 7 to 7 only since any input has some contribution in all of the fuzzy sets and will circle around the main diagonal of the fuzzy rule table and settle in the center of this table.Hence, fuzzy rule table will be as shown in Table 1.
where the abbreviations of the table represent: PB as Positive Big, PM as a Positive Medium, PS as Positive Small, Z as Zero, NS as Negative Small, NM as Negative Medium and NB as Negative Big.Moreover, the rules are implied using product for AND operation.Furthermore, the defuzzification used in this controller is a center of gravity type.

FNN Structure
The structure of FNN is shown in Figure 2.This structure consists of five layers which are: 1) Input layer: in the input layer, each node transmits the corresponding input to the antecedent layer, thus: where I is the i th network input, X is the node input, and i I is the output.The subscript refers to the node number while the superscript refers to the layer number.
2) Antecedent layer: this layer will transmits each value of input to the corresponding linguistic set, hence: where i = 1,2 ••• 14, j = 1,2, , m ij is the center of bill shaped fuzzy membership function, s ij is the standard deviation, i refers to the antecedent node while j refers to the input node.
3) Rule layer: this layer performs the implication of AND operation.The rule is implied using product operation.Since only 7 rules will contribute the rules which represent the diagonal of the fuzzy rule table mentioned in Table 1, then: and ( 13) 4) Consequent layer: only two nodes are available in this layer which performs the center of gravity defuzzification algorithm.The first node has a weighted input and the second is of the strength of unity, thus: where i = 1,2.n is the number of rules i is the weight between the rule and the consequent layers.
5) Action layer: the completion of center of gravity defuzzificztion algorithm is done in this layer, so the input and output of each node is given by:

FNN Learning Algorithm
FNN structure is expressed analytically in the previous section, such that the optimization method (Steepest Descent) can be applied on such structure.Hence, it can be implemented in the layers as follows: 1) Consequent layer (layer four): where η is the learning rate, O d is the desired output.
2) Antecedent layer (layer two): In this layer, the learning equation of back propagation is: and Equations ( 19), (20), and (21) will perform the back propagation procedure.Initializing the parameters in FNN is very important since it may reduce the learning time of the network, thus these parameters have been chosen at the same bases of choosing them in an ordinary fuzzy logic controller.That is m ij will divide the universe of discourse to 7 equal intervals, while s ij will give the bill shaped functions a reasonable width.Finally, y i is scattered along the output universe of discourse in an equal intervals.

PID-Like Fuzzy Neural Controller (PID-FNC)
The equation of PID controller in time domain is: where K P , K I and K D are the proportional, integral and derivative gains of the PID respectively.Thus, in the discrete case of a PID like fuzzy controller one has an additional process state variable, namely sumof-error to dente the integral part.Unfortunately, if any input is described with (m) linguistic value, then since PID controller has three inputs and since any rule has three conditions, then there is a need of m × m × m = m 3 rules.So, it is too much work to write m 3 rules.The PIDlike fuzzy controller can be constructed as a parallel structure of a PD-like fuzzy controller and a PI-like fuzzy controller and the output can be approximated as [13]: However, the first part of Equation ( 23) represents PD controller.PD controller for any pair of the values of e and δe, calculates the control signal (u a ).

    
The fuzzy controller should do the same thing.For any pair of error (e) and change of error (δe), it should work out the control signal though rules.In fuzzy rules, the sampling time will be omitted since such a rule expresses a causal relationship between the process state and control output variables, which holds for any sampling time.
Moreover, the second part of Equation ( 23) represents PI controller, which can represent PI like fuzzy controller.The Fuzzy controller and the rules table have other inputs; error and sum of error.It means that, the rules themselves should be reformulated.Since only the diagonal of the rule table will be used, it is found that the rules of PI-controller part are the same rules mentioned in Table 1.However, the equation of PI controller is: The proposed PID-FNC will consist of two FNNs.The first one is for PD like controller action mentioned in Equation ( 23), while the second FNN is for PI like controller action mentioned in Equation ( 25).The general block diagram of PID-FNC is shown in Figure 3.The parameters of K ua and K ub are the output scaling factors of PD like and PI like fuzzy controllers respectively.It will be assumed in this work that there is no need to any rule definition, since the rule layer is fixed and take the optimal rules of the fuzzy logic controller.However, the general Block Diagram of the PID-FNC Controlled System is shown in Figure 4.In this figure, Neural Network Emulator (NNE) is used to emulate the plant model.Hence, it is used to generate the required propagated error signal to PID-FNC (FNCe).This NNE uses the back propagation algorithm as a learning technique and uses the error between the plant and NNE, (NNEe), as the learning signal to adjust its weights.PID-FNC uses the  error between the plant output and the reference model output to generate both error, sum of error and change of error internally.Then after generating the controller action, it updates its weights using FNCe; which is the error between the reference model output and the plant output propagated through NNE.

Simulation
In this section the proposed controller is evaluated using MATLAB.
Figure 5 shows the network topology used for this set of simulation in which the shared bottleneck link between router R 1 and router R 2 has a capacity of 15 Mbps with propagation delay of 20 ms and N = 60 and the packet size is set to be 500 bytes and the reference input (queue size) which has rectangular form changes every 50 seconds as shown in Equation (26).The maximum queue length in the AQM router Router 1 is 800 packets.The AQM mechanism is configured at Router1, and drop Tail is used at other gateways First the simulation is done for the system without controller as shown Figure 6.
Figure 6 shows that the system without controller is unable to track the queue length around the queue length to the desired level, where the system goes into a sustained oscillation with high congestion exceeding the  maximum buffer size.In [9] a classical control (PI-controller) is applied in order to eliminate this sustained oscillation and get better tracking performance, also FPI controller is designed to speed up the system response, and FPI based genetic is designed to get the best parameters of FPI controller and to enhance the system response.
In this paper we used the PSO as a suitable optimization method for tuning FPI Parameters, the PSO parameter was: population size 80, the inertia weight factor w is 0.9, acceleration constant c 1 = 1.2 and c 2 = 0.12 and the fitness function is the integral time absolute error ).It is found that that the FPI baesd PSO is better than FPI and could speed up the system response with less computation time than FPI based G.A as shown in Fig- ure 7.
Although the FPI based PS0 shows good performance the system response has overshoot and to overcome this drawback, first we design a Fuzzy-Neural like PI (FNPI) controller to can compare it with FPI and show how can the addition of NN can improve the system response.
To design a FNPI controller, we use the second part only of Figure 3.
The FNPI controller parameters are selected first by trial and error method as follows (K p2 = 200, K i = 7761200, K u = ) and then by using PSO method to find the best parameters of FNPI, we get (K p2 = 300, K i = 8861200, K ub = ).As shown in Figures 8 and  9  From Figure 9 it was found the FNPI based on PSO is better than FPI based PSO by decreasing the overshoot of the system response.
Finally we design a Fuzzy Neural Controller like PID (FNC-PID) and show how it can improve the system response more than the FNPI.
The FNC-PID parameters are selected first by trial and error method as follows (K p1 = 1, K d = 50.1261,K ua = , K p2 = 80.2745,K i = 50.2638, ). and then by using PSO method to find the best parame-  Figure 11 shows that FNC-PID based PSO is best than FNPI based PSO controller by making the response of the system more faster with zero overshoot.
The overall simulation results are shown in Table 2.

Conclusions
From the design and the simulation results, it can be concluded that: 1) The designed FPI based PSO is better than FPI which can improve the system response by decreasing it's overshoot and make it more faster by decreasing it's settling time which proves the efficiency of PSO as a suitable optimization method.
2) By using the PSO to optimally select the best pa    rameters of FNPI, the system response is improved by decreasing its overshoot as shown in Table 2 which also proves the efficiency of PSO as a suitable optimization method.
3) The designed FNPI based PSO controller can decrease the overshoot of system response comparing with FPI based PSO controller.
4) The designed FNC-PID based PSO is better than FNC-PID controller which can improve the system response by making its overshoot zero and faster by decreasing its settling time which also proves the efficiency of the PSO as a suitable optimization method.
5) The designed FNC-PID based PSO controller can decrease the overshoot of system response of FNPI based PSO controller by making it zero and make the system response faster by decreasing its settling time.
6) The designed FNC-PID based PSO controller can deal with congestion problem with a good tracking performance about the desired queue size with high link utilization and faster system response.

Figure 1 .
Figure 1.Block diagram of a linearized AQM as feedback control.

Figure 4 .
Figure 4. General block diagram of PID-FNC controlled system.

Figure 7 .
Figure 7. System response with FPI and FPI based PSO controller.