^{1}

^{1}

^{2}

^{1}

^{2}

A novel approach applied to Particle Swarm Optimization (PSO) and Ant Colony Optimization is presented. The main contribution of this work is the use of fuzzy systems to dynamically update the parameters for the ACO and PSO algorithms. In the case of ACO, two fuzzy systems are designed for the Ant Colony System (ACS) algorithm variant. The first system adjusts the value for the pheromone evaporation parameter from the global pheromone trail update equation and the second system adjusts the values for the pheromone evaporation parameter from the local pheromone trail update equation. In the case of PSO, a fuzzy system is designed to find the values for the inertia weight parameter from the velocity equation. Fuzzy logic controllers (FLCs) are optimized with ACO and PSO, respectively, to prove the performance of the proposed approach. The particular benchmark problems considered to test the proposed methods are the water level control in a tank and temperature control in a shower. Therefore, PSO and ACO algorithms are applied in the optimization of the parameters of the FLCs. The achievement of the proposed fuzzy ACO and PSO algorithms is compared with the original results of each benchmark control problem.

In automating the design of fuzzy controllers, the use of metaheuristic algorithms has been amply proposed. The proposed approach is based on the swarm intelligence models [

ACO is a metaheuristic algorithm based on the collaboration of artificial ants in a colony to search for an optimal solution for complex problems. In ACO algorithms, the collaboration between the artificial ants is an important part, and this consists in assigning the computational resources to artificial ants (artificial agents) by indirect communication mediated by the environment. ACO algorithms are utilized to solve many paradigmatic problems, like the Travelling Salesman Problem (TSP) [

The inspiration of PSO is based on the social behavior of flock of birds or fishes. The procedure of PSO to encounter the optimal solution is based on the task of this animal community. In a PSO method, in the search space, a swarm of particles (individuals) is scattered. Each particle can be an aspirant solution for the problem at optimization. The PSO has been implemented, obtaining optimal results, to different optimization problems, such as benchmark functions [

Unlike other algorithms that have been applied for control problems, we have proposed the design of fuzzy systems to adjust some parameters for each of the optimization algorithms. The algorithms, both ACO and PSO, are applied to optimize control systems [

The novelty in the contribution of this work is the development of fuzzy systems to dynamically adjust parameters of the ACO and PSO algorithms [

In the PSO parameters control problems in this work, the membership functions will help in automating the fuzzy control [

The organization of this paper is as follows: Section

The fuzzy logic control is utilized in ill-defined complex process that can be operated by a trained human without knowing the dynamics of the system.

In a FLC, the basic idea consists in utilizing the knowledge of an expert operator for the construction of the FLC that performs the control for a system; the input-output variables for the system are represented by fuzzy rules (IF-THEN) at difference to a complicated mathematical model. In the design of the FLC, the use of fuzzy rules with linguistic variables and the fuzzy reasoning allows incorporating the experience of the human expert. A traditional scheme for a FLC is shown in Figure

Scheme of fuzzy logic control (FLC).

PSO works with particles for representing a potential solution to the optimization problem [

where

In this work, we utilized the gbest PSO variant, in which the experience neighborhood for each particle is obtained from the entire swarm. For each particle

where

Some research work has been developed to enhance the convergence and the optimal solution obtained with the basic PSO, like the velocity constriction [

In this paper, a modification of the gbest PSO variant using the inertia weight (

A number of works to dynamically adjust the inertia weight

The learning factors

We have designed a fuzzy inference system for the adaptation of the inertia weight and learning factors; the design consists of the following:

Two inputs: the number of iterations (

Three outputs: the change in inertia weight (

Three membership functions for each input and outputs in the fuzzy inference systems: they are shown in Figure

Membership functions for the inputs and outputs of the fuzzy inference system.

Figure

To obtain the new

If

then

Fuzzy inference system to adjust the

The rules were obtained by empirical knowledge obtained by experimenting and are shown in Table

The range of

The mathematical descriptions for

where

where

Fuzzy rules for

Rule number | Input | Output | |||
---|---|---|---|---|---|

| | | | | |

1 | 1 | 1 | 3 | 1 | 1 |

| |||||

2 | 1 | 2 | 1 | 3 | 3 |

| |||||

3 | 1 | 3 | 1 | 3 | 3 |

| |||||

4 | 2 | 1 | 3 | 1 | 1 |

| |||||

5 | 2 | 2 | 2 | 1 | 3 |

| |||||

6 | 2 | 3 | 1 | 3 | 3 |

| |||||

7 | 3 | 1 | 3 | 1 | 1 |

| |||||

8 | 3 | 2 | 1 | 3 | 3 |

| |||||

9 | 3 | 3 | 1 | 3 | 3 |

For obtaining the values of the variable, the Mamdani FIS model is utilized.

The method of the centroid of area is performed to obtain the defuzzification:

The first algorithm to fall into the framework of the ACO metaheuristics was the Ant System (AS) [

The update of the pheromone trails is performed after all the ants build their routes. To reach the update, first the pheromone values on the arcs are reduced by a constant factor and later, on the arcs which the ants passed, pheromone is added. This action is called pheromone evaporation and is performed as follows:

where

where

where

Many research works dealing with the updating rules for

In this paper, we used an Ant Colony System (ACS) [

ACO has a process in which it does not use heuristic values and the part of the consequent can be merely selected as follows:

In ACS, the ant

where

In the global pheromone trial update for ACS, in each iteration, only the global best ant has authorization to add the pheromone. Accordingly, the update in ACS is performed as follows:

where

We have defined a fuzzy inference system for pheromone evaporation

Two inputs: the value of

One output: the change in pheromone evaporation

Three membership functions for each input and output: LOW, MEDIUM, and HIGH, respectively, represented as membership functions of left triangle, middle triangle, and right triangle. Figure

Nine fuzzy rules are considered from which the changes in

The ranges of

Fuzz rules

Rule number | Input | Output | |
---|---|---|---|

| | | |

1 | 1 | 1 | 3 |

| |||

2 | 1 | 2 | 2 |

| |||

3 | 1 | 3 | 1 |

| |||

4 | 2 | 1 | 3 |

| |||

5 | 2 | 2 | 2 |

| |||

6 | 2 | 3 | 1 |

| |||

7 | 3 | 1 | 3 |

| |||

8 | 3 | 2 | 2 |

| |||

9 | 3 | 3 | 1 |

Fuzzy system to adjust the pheromone evaporation

In ACS, besides the global pheromone trail update rule, a local pheromone update rule is applied after the ants cross an arc (

where

We have defined a fuzzy inference system for pheromone evaporation

Two inputs: the maximum probability of choosing the next node

One output: the change in pheromone evaporation

Three membership functions for each input and output: LOW, MEDIUM, and HIGH, respectively, represented as membership functions of left triangle, middle triangle, and right triangle. Figure

Nine fuzzy rules are considered from which the changes in

The ranges of

Fuzz rules

Rule number | Input | Output | |
---|---|---|---|

| | | |

1 | 1 | 1 | 3 |

| |||

2 | 1 | 2 | 2 |

| |||

3 | 1 | 3 | 3 |

| |||

4 | 2 | 1 | 2 |

| |||

5 | 2 | 2 | 2 |

| |||

6 | 2 | 3 | 2 |

| |||

7 | 3 | 1 | 1 |

| |||

8 | 3 | 2 | 2 |

| |||

9 | 3 | 3 | 3 |

Fuzzy system to adjust the pheromone evaporation

The water tank model and the control of this water tank using a fuzzy control system is the system used for the experiments of the proposed approach [

Water tank representation.

The controller needs to be efficient to manage flow in the pipe and maintain the current level of water in the tank. The water level error is the input for the controller (the difference between the desired water level and the current water level) and the rate of opening or closing for the valve is the output.

As Figure

Original representation of the fuzzy system for water tank.

For the fuzzy system of the water tank, 11 membership functions were used: 3 per each input and 5 at the output and all this is illustrated in Figure

If (level is OKAY) then (valve in NO_CHANGE)

If (level is LOW) then (valve in OPEN_FAST)

If (level is HIGH) then (valve in CLOSE_FAST)

If (level is OKAY) and (rate is POSITIVE) then (valve in CLOSE_SLOW)

If (level is OKAY) and (rate is NEGATIVE) then (valve in OPEN_SLOW)

We also used as basis for our experiments the problem of temperature control and the fuzzy system presented in [

Original representation of the fuzzy system for temperature control.

For the fuzzy system of the temperature control, 16 membership functions were used: 3 per each input and 5 at the output and all this is illustrated in Figure

If (temp is COLD) and (flow is SOFT) then (cold is OPENSLOW) and (hot is OPENFAST)

If (temp is COLD) and (flow is GOOD) then (cold is CLOSESLOW) and (hot is OPENSLOW)

If (temp is COLD) and (flow is HARD) then (cold is CLOSEFAST) and (hot is CLOSESLOW)

If (temp is GOOD) and (flow is SOFT) then (cold is OPENSLOW) and (hot is OPENSLOW)

If (temp is GOOD) and (flow is GOOD) then (cold is STEADY) and (hot is STEADY)

If (temp is GOOD) and (flow is HARD) then (cold is CLOSESLOW) and (hot is CLOSESLOW)

If (temp is HOT) and (flow is SOFT) then (cold is OPENFAST) and (hot is OPENSLOW)

If (temp is HOT) and (flow is GOOD) then (cold is OPENSLOW) and (hot is CLOSESLOW)

If (temp is HOT) and (flow is HARD) then (cold is CLOSESLOW) and (hot is CLOSEFAST)

In this section, the PSO and ACO algorithms are implemented for the optimization of two FLC systems [

The objective function is built to represent the fitness of a solution and is considered as an interface between optimization problem and the algorithm. In order to determine the fitness of the fuzzy model, the mean square error (MSE) is used (defined in (

where

In this case, we represented the problem as is shown in Figure

Example of the graphical representation of the PSO particles for the membership functions.

PSO is used to optimize fuzzy controllers for two cases. In one, PSO is used to optimize the FLC from the water control in a tank and in the other PSO is used to optimize the temperature control in a shower. They both used a set of 200 particles and 300 iterations and they perform 30 experiments. We use 200 particles and 300 iterations because after making several tests the best results were obtained with these values. In Section

In the search space of the problem, we use random values for the positions and velocities of the particles; this is to create and initialize the population.

The fitness (in the fuzzy controller) is evaluated for all particles using the established objective function, MSE.

A comparison between the current fitness against the previous fitness of each particle is applied. If the current fitness is better than the previous fitness, then the current value is established for the

A comparison among the current fitness of each particle against the best global fitness (

The evaluation is performed with the star topology:

In base to (

Actualize the particle position using (

Steps (2) to (6) are repeated until the algorithm reaches the maximum number of iterations or the best fitness is better than the desired value.

FOR each particle

_{id} randomly

_{id} randomly

END FOR

Iteration k=1

DO

_{1} and c_{2} with the fuzzy inference system

_{ id } (k+1) = w _{id} (k) + c_{1}_{1} (_{id} - _{id}) + c_{2} Rand_{2} (_{id})

_{ id } (k+1) = x_{id} (k) + _{id} (k+1)

k = k + 1

WHILE Maximum iterations or mínimum error criteria are not attained

The flowchart of PSO.

Figure

Representation of the PSO for the optimization of membership functions.

Figure

Representation of PSO for the optimization of membership functions.

In the Ant Colony Optimization algorithm, the problem to optimize must be represented as a combinatorial problem; in this case, the types of membership functions should be represented as a graph; it means that the potential values require to be represented as a graph. This is an important part, for the reason that ACO operates with this type of representation. Each node must be a possible solution that an ant can take.

The ant can consider each node like a potential solution to choose. At the end of the iterations, every ant will have a graph with the potential values to make the evaluation; in this graph, if we suppose that the problem to optimize is used to design a graph with_{i} nodes, the node value is determined as _{i} (_{ij}). After the division, a network that is composed of variables and their division is constructed as depicted in Figure

Variable division and ant search path.

The flowchart for ACO is displayed in Figure

The ant colony is created and initialized with random positions. We set the initial parameters for ACO making several trial and error experiments. For each ant, construct a graph (for the fuzzy controller).

The next node is selected in function to the probability obtained with (

Reduce the local pheromone trail (evaporation) according to (

Reduce the global pheromone trail (evaporation) according to (

Steps (2) to (4) are repeated until the algorithm reaches the maximum iterations or the best fitness is better than the desired value.

FOR each ant i

END FOR

Iteration k=1

DO

WHILE Maximum iterations or mínimum error criteria are not attained

The flowchart of the ACO algorithm.

In this paper, the design of fuzzy logic control (FLC) is performed using Ant Colony System. Figure

Representation of the potential solutions in the pheromone matrix for the water system.

We also used the Ant Colony System algorithm for this case. Figure

Representation of the potential solutions in the pheromone matrix for temperature system.

In this part, the results of the optimization of the FLCs for the water level control and temperature control systems with Particle Swarm Optimization and Ant Colony Optimization are presented. For comparison purposes, we used FLCs provided by [

Figure

Membership functions for the water tank FLC without optimization.

Figure

Behavior of the water level in the tank with the FLC not optimized.

The best experiments, with the smaller error of 0.026952, are presented in Figure

Behavior for the optimized water tank FLC with PSO.

Membership functions optimized with PSO for the water tank FLC.

The best experiments, with a smaller error of 0.045792, are presented in Figure

Behavior for the optimized water tank FLC with ACO.

Membership functions optimized for the water tank FLC with ACO.

Figure

Membership functions not optimized for the temperature control FLC.

Figure

Behavior of the not optimized temperature control in the FLC for the shower.

The best experiment, with a smaller error of 0.0003758, is presented in Figure

Behavior for the optimized temperature control FLC with PSO.

Membership functions optimized for the temperature control FLC with PSO.

The best experiment, with a smaller error of 0.00076356, is presented in Figure

Behavior for the optimized temperature control FLC with ACO.

Membership functions optimized for the temperature control FLC with ACO.

In this section, we included a statistical test to validate in the best way our approach between the ACO and PSO optimized methods. We made 100 experiments for the case of the temperature control with both methods. The following table shows the results with a Student’s

Student’s

| Mean | Standard deviation | SE mean |
---|---|---|---|

30 | 0.190 | 0.163 | 0.030 |

| |||

30 | 0.807 | 0.434 | 0.079 |

Difference =

Estimate for difference: -0.6164.

95% lower bound for difference: -0.7593.

Experimental results with ACO and PSO.

Experiment | PSO | ACO |
---|---|---|

1 | 1.1456 | 0.0067823 |

| ||

2 | 1.2076 | 0.012086 |

| ||

3 | 0.90314 | 0.0281 |

| ||

4 | 0.42635 | 0.033326 |

| ||

5 | 0.20136 | 0.051824 |

| ||

6 | 0.75873 | 0.066958 |

| ||

7 | 0.093008 | 0.077077 |

| ||

8 | 0.68108 | 0.080195 |

| ||

9 | 1.1802 | 0.083176 |

| ||

10 | 1.1365 | 0.10675 |

| ||

11 | 1.1563 | 0.10827 |

| ||

12 | 0.31743 | 0.12463 |

| ||

13 | 1.2254 | 0.13095 |

| ||

14 | 1.0505 | 0.13263 |

| ||

15 | 1.2925 | 0.13276 |

| ||

16 | 0.40378 | 0.14014 |

| ||

17 | 1.2477 | 0.14722 |

| ||

18 | 1.1119 | 0.16984 |

| ||

19 | 0.63035 | 0.17191 |

| ||

20 | 1.0559 | 0.17539 |

| ||

21 | 0.41091 | 0.22107 |

| ||

22 | 0.069772 | 0.22883 |

| ||

23 | 1.2036 | 0.23622 |

| ||

24 | 1.1208 | 0.3004 |

| ||

25 | 0.078089 | 0.30398 |

| ||

26 | 1.071 | 0.30562 |

| ||

27 | 0.30528 | 0.4007 |

| ||

28 | 1.2911 | 0.49584 |

| ||

29 | 1.1934 | 0.57976 |

| ||

30 | 0.23343 | 0.65851 |

| ||

Error average | 0.806756967 | 0.19036481 |

In this work, we have applied the Ant Colony Optimization (ACO) and Particle Swarm Optimization (PSO) metaheuristics for the design of fuzzy systems. For this purpose, we have adopted one ACO variant, namely, the Ant Colony System (ACS). Both algorithms, ACS and PSO, have changing parameters with fuzzy dynamic adaptation during execution. For the ACS algorithm, the global and local evaporation of the pheromone is dynamically adapted using a fuzzy system. For the PSO algorithm, the inertia weight and the parameters_{1} and_{2} are adapted dynamically with a fuzzy system. The type of membership functions and the parameters of membership function of the fuzzy logic controllers for temperature control and water level control were optimized with ACO and PSO algorithms, respectively. The results of both optimization algorithms are compared. Those results show good solutions in comparison with the original problem that is not optimized.

The use of metaheuristic algorithms is amply utilized in optimization of problems; for the benchmark problems of temperature control and water level control, the implemented fuzzy systems are used to adjust parameters of the ACO and PSO and improve the results of the algorithms.

As a general conclusion with the statistical test applied with both analyzed methods, we can demonstrate that, with the dynamic parameter adaptation, ACO and PSO can be good alternatives to solve some cases of control; the experimental results are very similar to the two optimized methods; however, for the case of temperature control in a shower, ACO was slightly superior to PSO. Also, there are other experiments to validate this approach with other cases, for example, the water tank control, and in some cases PSO is better than ACO.

For future work, we plan to hybridize these algorithms to compare results and test with fuzzy inference systems for different membership functions or implement type 2 fuzzy inference systems to enhance the results of the work.

The data used to support the findings of this study are available from the corresponding author upon request.

The authors declare that there are no conflicts of interest of any kind regarding the publication of this paper.

The authors would like to express their gratitude to CONACYT and Tijuana Institute of Technology for the facilities and resources granted for the development of this research.