Hybrid Fuzzy Congestion Controllers for Computer Networks Tuned by Modified Particle Swarm Optimization

One of the most debated issues nowadays is the quality of computer network service. The best internet service must provide a fast processing of the traffic. Each router has a queue of packets that provides a buffer space, where the packets wait for processing. Transmission Control Protocol (TCP) is a packets congestion control theory. Active Queue Management (AQM) is a mechanisms proposed to employ at gateways to improve the performance of TCP congestion control. AQM mechanisms aim to provide high link utilization with low loss rate and low queuing delay while reacting to load changes quickly. Random Early Detection (RED) is an extensively studied AQM algorithm that can detect congestion by dropping packets randomly with certain probability that serves as the function of the average queue size. In this work, hybrids Fuzzy Logic Controllers (FLC) are proposed to measure the router queue size directly by use them as a congestion controllers. A multiple hybrid fuzzy controllers are proposed, where (Proportional Integral Derivative controller (PID) -like FLC-Particle Swarm Optimization (PSO) Based, Proportional Derivative (PD)-like FLC with conventional I-PSO Based and PID tuned by Fuzzy Logic-PSO Based), which is provided to regulate the queue length, round trip time and packet loss. The Particle Swarmed Optimization (PSO) algorithm is used for tuning the gains of hybrid fuzzy logic controller which helps in reducing the error of the queue size. This is achieved through minimizing the rise time, peak time, settling time and overshoot of the AQM response. The empirical results revealed a high-performance improvement regarding the proposed method in comparison to previous works of other researchers.


I. INTRODUCTION
Computer networks are one of the most used communication means and their importance can extend to various aspects of life. This dependence and high usage of networks results in massive traffic of data, which leads to data congestion. Congestion happens when the total demand for a resource surpass the available range of the resource and result in distortion of network performance. High delay in data delivery resulted from congestion can lead to lavished resources by missing or dropping packets, in which it increases the possibility of congestion occurrence. Such issues can cripple communications and disable the network.
The mechanisms which used to avoid congestion in computer networks are; the Transmission Control Protocol, which used to detect the congestion by sensing in advance or calculating the processing time and tune the TCP window sizes of senders [1], the Active Queue Management AQM approaches, which used to notify the senders in advance about congestion and respond for management and The Random Early Detection approach, which used for randomization of packets to manage queue congestion problems. This works on breaking problem performance without changing at the senders end. This done by dropped randomly the packets from source of various TCP networks at different states [2]. AQM controls the congestion by random packets dropping with certain probability weight for each packet that serves as a function for the average queue size. The development of algorithms for congestion avoidance leads to control theories for robust, predictable and reliable controlled signal [3].
However, many controllers which own different attributes have been developed to solve the network congestion management and control by utilizing modern control theories.
In 2014, Amjad J. et al., two controllers were developed; the PID and Model Predictive Control (MPC). These controllers are based on the nonlinear model and timevarying part. The system based on MPC controller is more robust than PID controller in some characteristics [1]. An active queue management uses the fuzzy logic controller to calculate which packet will be dropped and which will not was designed in [2]. A PID Fuzzy-Neural controller was designed, as AQM to the internet routers. The performance of Fuzzy controller was improved by tuning the controller parameters using traditional as an optimization method [3].
In 2015, Shajahan designed a structure for traffic management to provide the quality of service for different service applications, this done by managing the internet congestion [4]. Hazem and Karam presents a robust PID controller was used for designing AQM algorithm based on H∞ approach to improve the system performances in the presence of system uncertainties and disturbance. The controllers were subjected to Ant Colony optimization method for tuning the controller parameters to reach the desired objectives [5]. A controller was developed to regulate the TCP traffic using a state feedback control law that works on the packet rejection rate, which used as an observer allowing estimating the state of the network that result in increasing the performance of the controller [6].
Xinhao and Ze designed a multiple model adaptive control for AQM, where the adaptive method regulates the weight of the local congestion controller to manage the queue length efficiently in the bottleneck router around the desired point [7]. Another interesting work by Hossein et al., in 2012, proposed an AQM scheme using fuzzy logic controller as hybrid Fuzzy PID controller to provide the performance of congestion control of high utilization, with low packets loss and minimum delay time [8]. A Fuzzy Proportional Integral (FPI) controller was designed as AQM for getting the best controller parameters. These performances reached by PI controller with the Genetic Algorithm that was used as an optimization method for tuning the FPI parameters [9].
A Novel autonomous Proportional and Differential RED (NPD-RED) scheme was proposed to improve the performance of RED congestion algorithm. The instantaneous queue length stability of NPD-RED have been analyzed, and given guidelines for choosing control gains as presented in [10]. Vishal et al., developed a methodology to model and obtain expected transient behavior of networks which works as AQM for routers supporting TCP flows [11]. A combined TCP and AQM model from a control theoretic standpoint was proposed in [12]. A design guideline was presented for choosing parameters that lead to stable operation of the linear feedback control system.
Satish and Zafar designed a hybrid fuzzy PD plus I controller, which works as AQM for controlling the congestion in router queue [13]. Many drawbacks in the modeling and controlling methodologies of the congestion TCP/AQM model can be found in the literature works. Some of them take the nonlinear model with time-variant parameters, but the results have undesirable responses due to the controlled system characteristic. In addition, the linearized models have undesirable controlled signal of highly rise time, peak time, settling time and overshoot.
In this work, a PID-like FLC, hybrid PD-like FLC plus conventional I controller and hybrid PID controller tuned by fuzzy system are designed for controlling the linearized TCP/AQM model. These controllers improve the congestion control in network and give the optimized controlled signal characteristics. To tune the controller's gains, a modified version of the PSO is used with each controller to apply the optimized controlled signal characteristic for AQM. The controllers regulate the queue window size to maintain the minimized rise time, peak time, settling time and overshoot.
The obtained results showed a noteworthy improvement in the optimized signals when compared to previous works.
This article is arranged as follows: in Section 2, the linearized mathematical and Simulink model of TCP/AQM is shown, while in Section 3, the PID-like FLC is designed and simulated. In Section 4, the hybrid PD-like FLC plus I conventional controller is also designed and simulated.
In Section 5, a hybrid PID controller tuned by fuzzy logic system will be designed and simulated using MATLAB Simulink. Also, the fuzzy logic controller's simulation results are displayed. In Section 6, a modified PSO structure as tuning algorithm for controller parameters are presented. In Section 7, the results of controller's simulation based on PSO and the percentage of enhancement are compared with the previously tackled works are presented. Finally, the conclusions for this work are stated in Section 8.

II. TCP/AQM MODEL
The fluid-flow theory and the analysis of stochastic differential equation are used for driving the dynamic model of TCP system by doping TCP timeout mechanism developed as in [12]. The following nonlinear differential equations can describe the model: Where t is the time in (sec), W is expected TCP window size in (packets), q is the expected queue length in (packets), R is the round-trip time in (sec), C is the link capacity in (packets/sec), N is the number of TCP sessions and p probability of packet mark/drop. The queue length q and window size W is positive and bounded quantities; i.e., q [0, q ] and W  [0,W ] where q and W denote buffer capacity and maximum window size respectively. In addition, the marking probability takes value only in [0 1]. The nonlinear AQM characteristics can be linearized around the operating point (W0, p0, q0) to generate the following linearized model [5], [12]: Where the G is the transfer function of the linearized model, the parameters of the operating point is selected with N=60 TCP sources, R0=0.253 sec. and C=15 Mbps (3750 packets/sec) as shown in Fig The block diagram model for the TCP/AQM mathematical equations is shown in Fig. 2, each control system proposed in this work incorporates the FLC as main control structure for the model. The fuzzy logic controller is chosen for congestive control, because of the fact that fuzzy logic controller is capable of dealing with nonlinear and uncertain systems and gives the described results with the linearized system models. First, the PI-like FLC is proposed to control the model (has the same settings as PID-like FLC shown in section three, except the D part), after that the auto-tuned (by MATLAB) PID conventional controller with filter coefficient N (used for sets the location of the pole in the derivative filter controller) is proposed for controlling the model. Each controller has a saturation of limits [0 1], that represents the probability of dropping mechanism for AQM structure. These two controllers have drawbacks in controlling the signal characteristic. The results of these two controllers are presented in the section of simulation results. Therefore, there is a need for another control structures capable of dealing with system model for getting the desirable control system characteristic.

III. PID-LIKE FUZZY LOGIC CONTROLLER DESIGN
The PID-like FLC is chosen to fulfill the optimally controlled signal characteristic by minimizing the rise time, peak time, settling time and overshoot. The controller equation is [14]: The inputs to the FLC are e (t) is the error and _ e (t) is the change of error. The Kp, Kd and Ki are the proportional, derivative and integral gains of error signal respectively.
The FLC is Mamdani type. Where Mamdani type involves entails a substantial computational burden. The other type is Sugeno type which is computationally efficient. Also the Mamdani type is well appropriate to human input while the Sugeno type used when involving the mathematical analysis. The inputs and outputs membership functions are seven triangles and Gaussian shaped with [- 10 10] input/output range that adjusted by Ko (is the output gain used to adjust the outputs membership range) to be in a range [0 1] of the probability factor range. The defuzzification mechanism is selected to be the center of the gravity method [14]. Fig. 3 shows the membership functions of inputs and outputs. Table I    Both the hybrid PD-like FLC plus the conventional Integral controller are used in this work [13]. The PD-like FLC part is designed using the same settings and equation of PID-like FLC presented in a previous section except that the I factor is given a higher performance in controlling of AQM. The performance is compared with the results obtained from PID controller at the simulation results section. These conclusions establish the advantage of the proposed PD-like FLC plus conventional I controller. The PID-like FLC with the three inputs: error, integration of error and derivation of error has a rule base that includes only two inputs and excludes the input of integration, which cannot be represented by the rule base due to its complexity. Therefore, the separation of the integral action simplifies the fuzzy rules. The hybrid PD-like FLC plus conventional I controller structure is achieved by placing the PD-like FLC in parallel with the conventional Integral controller. The Simulink model of hybrid PD-like FLC plus conventional I as controller for AQM is shown in Fig. 5.
The term of auto-tuning fuzzy PID controller leads to that the three parameters Kp, Ki and Kd of PID controller are tuned by using fuzzy system tuner. It is necessary to tune the PID parameters automatically in order to get predictable controller capable of working as AQM. The structure of the self-tuning fuzzy PID controller is shown in Fig. 6. The structure of the Fuzzy system is similar to section three but with new output membership function is shown in Fig. 7. In this controller, each one of parameters has minimum and maximum range resulting from the simulation of PID controller (in section three) to obtain feasible rule bases with high inference efficiency, where p K , i K and d K are the tuning signals from fuzzy system that tuned the PID parameters according to parameter equations of [15]: , respectively. Later the minimum and maximum parameter range will be subjected to the global minimum optimization algorithm for finding optimal controller gains limits based on proposed fitness function for satisfying the desired control signal characteristics. The MATLAB Simulink model for the hybrid PID controller tuned by a fuzzy as controller for AQM is shown in Fig. 8.
The parameters of simulation results of the network topology which is exhibited in Fig. 1 are: the shared capacity of the bottleneck between router R1 and router R2 of 15 Mbps with 20ms of propagation delay, N = 60 and 500 bytes as the packet size, the desired input (desired queue size) has rectangular form inconstancy every 50 seconds as follows [3]: qdesired={300 0 < t < 50; 200 50 < t< 100; 400 100 < t <150; 200 150 < t < 200}.
Before starting with intelligent controllers of hybrid fuzzy systems, the PI-like FLC was tested for controlling the AQM by manual tuning of the controller parameters, after many trials the gains of the best result for position response are Kp=0.0000245, Ki=0.0000153, and Ko=0.9245 with the response shown in Fig. 9. In addition, the PID conventional controller with auto tune mechanism by MATLAB Simulink is used for controlling the system, after many trials the gains of the best results for position response are Kp = 0.0000278, Ki =0.0000170, Kd =0.0000001and N= 100, with the response shown in Fig. 10. From the response of two controlled the controlled signal characteristics are illustrated in Table II. One can notice that these characteristics are undesirable because of the highly rise time, peak time, settling time and overshoot, with error steady state in the PID controller response. These results make enactive queue management with distortion in the data (packets) transferring. This distortion because of the congestion problem which results from the delay in managing packets, the delay comes from long duration response of long settling and rise times; peak overshoot is another cause for congestions, which means there is overlapping in transferring packets. So, there is a need for other controllers to maintain active management for data through desirable responses. This can be satisfied by using global minimum optimization algorithm for getting optimal fuzzy controllers gains. These optimal gains make the controller to control the AQM in faster response of minimum rise and settling times; which means there is no congestion and delete the overshoot that resulted from packets overlapping. So as conclusion for finding the controller optimized gains; its lead to solving the congestions in faster and robust way.

VI. PSO OFF-LINE TUNING ALGORITHM FOR FUZZY LOGIC POSITION CONTROLLERS GAINS
In Particle Swarm Optimization (PSO) algorithm, each population member is called a particle, and each particle flies around in multidimensional search space with specified velocity, updated constantly depending on the particle's own experience and the experience of the particle's neighbors or the experience of the whole group (swarm). This has already been applied in many areas, such as function optimization, artificial neural network training, pattern classification and fuzzy system control [16].
The PSO algorithm is performed as follows: 1) The particles here are the size of the swarm that makes the population size (n).
2) When Random initialization for the particles starts these particles move in the searching space to minimize the goal fitness function.
3) The parameters estimation (D dimension of the problem, controller gains are 4 with PID-like FLC, 4 with PD-like FLC plus conventional I and 7 with PID tuned by fuzzy controllers) is done through minimization fitness function.
4) The particle fitness evaluation depends on the fitness function to update the x p best (previous best position) of particle and the x g best (global best position) among the positions of all particles as goals in each step of evaluation.
5) The particle is directed to its x p best previous position and the x g best previous global position among the particles.
However, the particles amid to flies for the better searching areas over the searching space. The Modified velocity of i-th particle vi calculated by [16]: Where for the i-th particle in the k-th iteration, the is the current position, the (xpbesti) is the previous best position, the (xgbest) is the previous global best position of particles, the (c1) and (c2) are the acceleration coefficients named by the cognitive and social scaling parameters, the (r1) and (r2) are the two random numbers in the range of [0 1], and (χ) is constriction coefficient given by [17and 18]: where (ɸ =c1+c1, ɸ > 0.04) constriction coefficient used for controlling the convergence of the particle. That prevents explosion and directs particles to convergence, where χ is the modification for the velocity equation in the used PSO algorithm. A new position of the i-th particle is evaluated by: The particle swarm which is used as optimization algorithm serves (off-line) to optimize the best fuzzy controller's gains to satisfy the desired characteristic of minimized rise time, peak time, settling time and overshoot. This minimization gives closer matching between the desired and the actual responses. The PSO runs off-line, thus computing time is not as important as in real time control. All elements of PSO are changed for many tests until reaching the largest enhancement at minimum fitness function. Fig. 11 shows the block diagram of PSO based FLC for (PID-like FLC, PD-like FLC plus conventional I and PID tuned by fuzzy controllers).  Fig. 11. PSO based FLC block diagram.

Plant
The fitness function used to evaluate the fitness of each particle is the Root Mean Squared Error (RMSE) and the overshoot in position responses is included in the fitness function. The equation of RMSE that used is: Where e1(i) is the error of the i-th sample for the queue desired size, L is the number of samples, and k is the iteration number.

VII. PSO BASED FUZZY LOGIC CONTROLLERS SIMULATION RESULTS
In order to improve the results of PI-like FLC and autotune PID controller, the other fuzzy controller's structure are used based on PSO algorithm to specifying the optimal controlled signal characteristic.
The fitness function selection for PSO algorithms is: More than twelve trials have been made for each one of FLC (PID-like FLC, PD-like FLC plus conventional I and PID tuned by fuzzy controllers). Table III illustrates the best trial parameters founded by PSO that have given best gains according to correction criteria (Percentage of enhancement between the fitness found by the PI-like FLC and the PSO-based controllers). Table IV illustrates the optimized gains of these tests that obtained by PSO.  The Fig. 12 shows fitness responses obtained using PSO for each one of the proposed controllers. The Fig. 13 shows the PID-like FLC-PSO based response for desired queue size compared with PI-like FLC and Fig. 14 shows its error. The Fig. 15 shows the hybrid PD-like FLC plus conventional I controller-PSO based response for desired queue size compared with PI-like FLC and Fig. 16 shows its error.
The Fig. 17 shows hybrid PID tuned by fuzzy-PSO based controller response for desired queue size compared with PIlike FLC and Fig. 18 shows it error respectively.    Fig. 19 shows the performance response of all controllers that are employed in this work for AQM controller. These responses have minimized controlled signal characteristics of minimum rise time, peak time, and settling time and overshoot respectively. Table V illustrates the optimized controlled signal characteristic with fuzzy controllers based on PSO. In conclusion, the compression which was established between characteristic is satisfied by controllers of this work with the works presented in [3], [9].  Using the obtained results, it can be concluded that the auto-tuned conventional PID controller has a faster response than the PI-like FLC through minimization of the rise time to 4.114 sec. Furthermore, when the PSO algorithm is used for optimal selection of PID-like FLC gains, the system becomes so fast with a rise time of 3.250 sec and percentage of enhancement of 30.648% when compared with PI-like FLC. In addition, the hybrid PD-like FLC plus conventional I-PSO based controller produced a rise time of 1.921 sec to be faster than all previously proposed controllers and it has a percentage of enhancement of 31.471% by comparing with PI-like FLC. Moreover, the hybrid PID controller tuned by a fuzzy system with gain limits subjected to PSO has a rise time of 1.733 sec to be the fastest controller proposed in this work with the percentage of enhancement 38.216% compared with PI-like FLC. Accordingly, all the controllers proposed in this work are compared with the maintained previous works by its optimal characteristics with the percentage of enhancement in each criterion in that, Table  VI illustrates the criteria of optimal value with enhancement.