Teks penuh


Particle Swarm Optimization and Fuzzy Logic Control in

School of Electrical Engineering and Informatics Institut Teknologi Bandung process of robot become optimal, and the complexity to deal with unstructured environments. Combination of Particle Swarm Optimization(PSO) and Fuzzy Logic Control(FLC) can answer these challenges, PSO role as each robot can conduct cooperation in the searching process of robots, where robots can tell the nearest other robot best position. FLC roles to handle complexity in avoiding other robots and obstacles so that the robot can avoid obstacles smoothly. As results of the simulation showed that PSO-FLC control can detect gas leak’s source better based on the output of velocity and turning control as well as better travel time search, compared with the control of mobile robots without any PSO or FLC.

Keywords swarm robot; swarm intelligence; particle swarm optimization; fuzzy logic control; mobile robot; gas leakage detector;


With the development of robot technology recently, further research is increasingly developed, especially on mobile robotic technology. Mobile robots have been applied to many aspects of life so that direct human intervention can be avoided. For example, gas leak detector, which would be very dangerous if the people who do it directly.

Gas leakage searching process can be performed by the mobile robot automatically, but in the search process, there are three challenges to be faced. First, the search space is vast can make the searching process becomes longer. Secondly, it takes a certain level of intelligence so that the search process on the mobile robot to be optimal. Third, the complexity in handling an object such as an obstacle or a wall in unstructured environments.

The wide scope of the search (search space) can make the search process becomes longer. Therefore, we need more than one mobile robot and the coordination of the robots that search becomes more optimal.

Cooperation number of robots can improve the efficiency of the robot and make the robot can perform a complex task, which cannot be done by just one robot only. Another advantage in the use of multi-robots include increased spatial dynamic range and greater fault tolerance [1].

Recent developments in robotics are where multi-robot swarm robot swarm intelligence or swarm intelligence. One of the concept of swarm intelligence algorithm is Particle Swarm Optimization (PSO).

PSO is a population-based algorithms in the form of a set of candidates from the solution of a problem, where each candidate solution called "a particle" which will be engaged in a search space that contains the set of solutions [2]. This method uses a simple analogy of social interaction, rather than purely individual cognitive ability [3].

In the third challenge, human reasoning has the ability to handle the complexity of the object (obstacle) in unstructured environments. Fuzzy Logic Control(FLC) approach can facilitate this [4].

This research is to design a gas leak detection control. As in the previous research, the process of finding a specific target covers only the control of PSO alone [5] or FLC alone [6], [7]. Taking into consideration the three challenges above, in this paper will be used control of gas leak detection for mobile robot using a combination of methods Particle Swarm Optimization and Fuzzy Logic Controller (PSO-FLC).


A. Particle Swarm Optimization(PSO) Concept

Particle Swarm Optimization (PSO) is defined as a population-based algorithm that has the characteristics of a set of candidate solutions, where each solution is the "particles" that move in the search space [2]. PSO is introduced for the first time by Kennedy and Eberhart [8], which has the objective to introduce new methodologies in computational intelligence / computational intelligence. This technique uses a simple analogy of social interaction, rather than only individual cognitive skills [3].

In PSO, a simple entity, called a particle, which is located within the search space of the problem or specific functions. The particles then evaluate the fitness function in their current location. Each particle can determine the movement in the search space by considering some aspect of the history of the best position of one or several members of the swarm with some random behavior. The next iteration occurs when there is an update of all the particles. Each individual particle in a 2015 International Conference on Automation, Cognitive Science, Optics, Micro Electro-Mechanical System, and

Information Technology (ICACOMIT), Bandung, Indonesia, October 29–30, 2015


swarm that is characterized by three-dimensional vector D, where D is the size of the search space and is associated with the following values [1]:

 actual position, xi  previous best position, pi  particle velocity, vi

Current position or xi may be seen as a point in the search space. At each iteration of the algorithm, the current position is considered as a solution to this problem. If these locations obtained the best fitness values, coordinates saved into the vector pi. The best global results can be published in a variable named to be compared with the results that obtained from the next iteration. The goal is to record the best position that achieved and then memorized.

B. Fuzzy Logic Controller(FLC) Concept

Fuzzy Logic Controller (FLC) is an expert control system given certain rules. Process uncertain information using rules that based on common-sense and using natural language statements as the basic control of fuzzy logic.

The general structure of a Fuzzy Logic Controller (FLC), consists of three basic parts: the fuzzification unit in input part, inference engine that built on the rule-based fuzzy logic control as its core, and the unit defuzzyfication at the output, as shown in Figure 1.

Figure 1. General Structure of Fuzzy Logic Controller [9]


Robot environment modeling represented in a two-dimensional plane, where each object in the environment has coordinates (x, y) that are the coordinates of robot r(xr,yr),

obstacle coordinates h (xh, yh) and target coordinates t (xt, yt).

Modeling environment has a size of 900 x 600 pixels and has a pixel scale of 20: 20 cm in the real world. In that environment, there are several mobile robot objects, obstacles and targets which can be illustrated in Figure 2.

Figure 2. Robot Environment Modelling

Mobile robot. Mobile robot modeled in the form of a circle, the coordinates of the position of the robot are determined by modeling the circle center point of the robot is r (xr, yr), and the size of the robot is determined

from the diameter of the mobile robot model is 18 pixels.  Obstacle. Obstacle modeled in a rectangular shape,

coordinate position determined obstacle at the top left of obstacle shape h(xh, yh). The Obstacle has a dimension in

the form of size of width and height in pixels. The obstacle has a varying width and height.

Target / gas leakage source. Target is the ultimate goal of the robot which is the center of a gas leakage in the form of coordinates of the target position t (xt, yt),

whereas the robot is trying to locate as close as possible to the direction of the center of the gas leakage.

In this study, there are several modeling sensors that used by robots in detecting gas leakage, such as:

Position sensor. Position sensor is a sensor that used a robot to get the actual position of the robot, which will be used to notify the position of a robot to another robot. Representation of the data from the sensor position coordinates of the robot is r (xr, yr), the x-axis and y-axis

environment, in pixel units.

Gas Sensor. In this simulation, a gas leak sensor is used as the calculation of fitness for PSO in robot against gas leaks. Fitness value in this simulation are assumed by the distance between the robot to the target.

Direction Sensor. Direction sensor is a sensor that used a robot to get directions robot which refers to the x-axis of environment, which will be used to determine the direction of the robot, and can measure the degree of angle steering that may be taken or that have been taken by robot, illustrated in Figure 3. Representation of data from sensors robot is the degree to values between 0o to 359o towards the x-axis.

Figure 3. Direction Sensor towards x-axis of Environment


-45o from the direction of the robot (left sensor), 0 ° of the direction of the robot (sensor center), and 45 ° from the direction of the robot (right sensor). In this research, data representation obstacle is pixels, with a maximum distance range obstacle detection is 40 pixels. Configuring the three distance sensor on the robot as illustrated in Figure 4.

Figure 4. Obstacle Distance Sensor towards Robot Center


In this section will be done designing the input and output PSO functions, designing of input and output FLC membership functions, and designing FLC rules that correspond to the behavior of a gas leakage detection

A. Designing the Input and Output PSO Function

Designing of the input function on PSO will determine fitness values for each robot, while the design of the output function will determine what action taken by the robot, that is the speed and direction changes. This research use function of distance between the robot and the target gas leaks, as the fitness function in PSO. Fitness calculation using the Pythagorean formula described in equation (1).


In this study, there are two dimensions D used, Dx and Dy

representing representative of the x-axis and y-axis. PSO algorithm used is as follows [1]:

1). Initialize an array of particles with random positions and velocities of the two-dimensional D search, that is Dx and


2). Start the iteration.

3). For each particle, evaluate the fitness value using equation (1).

4). Compare the fitness value of each particle with a value of , if the current value is better than the value in the variable , set the current value to , and add phi value to the current position .

5). Compare the fitness value of each particle with a value of , if the current value is better than the value in the variable , set the current value to , and add phi value to the current position .

6). Select the particles in the population who have obtained the best fitness value and set its position to the variable

and .

7). Update the velocity and position of the particle according to following equation:

) (2)

) (3) t (4) . t (5)

Where is a random matrix with uniformly distributed value between , which is randomly generated for every iteration and for every particle, whereas t is iteration time with a value of 1.

8). If the criteria are met (based on a threshold value fitness function or the maximum number of iterations), stop the loop. If not, go back to the sequence 3.

B. Designing FLC Membership Function Input

For distance input of FLC, used two linguistic that is near and far. Membership values of x or μ(x) in each linguistic can be determined with the function shown in Figure 5.

Figure5. FLC Membership Function Input

C. Designing FLC Rule

Design FLC rules determine the output of the FLC. In this study, FLC rules used are defined in Table 1 as follows:

Table 1. FLC Rule Design


FLC Input FLC Output

Left Sensor

Middle Sensor


Sensor Speed Steering

1 near near near slow right

2 near near far slow right

3 near far near slow right

4 near far far moderate right

5 far near near slow left

6 far near far slow right

7 far far near moderate left


D. Designing FLC Output

FLC output using Sugeno FIS, linguistic expressed in the form of singleton and use weights on each linguistics. Weights used for the speed output as follows:

Slow = 0

Moderate = 2

Fast = 5

while weights used for the steering output as follows: Turn Left = -15o

Move Straight = 0o Turn Right = 15o


Designing the behavior of PSO-FLC determine what action will be done by each robot. The robot has two behaviors, PSO that has the behavior to find the gas leakage source and find the center of the leakage, the behavior of others is the FLC that has behavior to avoid obstacles and avoid another robot. Flowchart behavior of PSO-FLC used in this research can be seen in Figure 6.

Figure 6. PSO-FLC Behaviour Flowchart


Final result of this research is in the form of simulation software applications that can generate a number of mobile robot gas leakage detector using PSO-FLC, in which the robot model can move to towards the target that had been predetermined, by doing the cooperation between robots and avoid the obstacles that lies in the environment.

Evaluation results will be discussed about evaluation of cooperation and performance of the PSO-FLC mobile robot gas leakage detector, by using the PSO-FLC based trajectory

path that has been taken by robot or robot trajectory, and performance of the robot to change its speed and steering.

A. Simulation Testing with Obstacle

In this research, the test was done by placing the robot and the target mobile robot on the environment and there are some obstacle and robot models facing random directions. In the testing process, conducted experiments without PSO-FLC control and with PSO-FLC control. Results of the simulation are shown in Figure 7.

(a) without PSO-FLC control

(b) with PSO-FLC control

Figure 7.Mobile Robot Simulation with Obstacle

In the simulations carried out with six robots with an obstacle with the part (a), the robot trouble to find the center point of a gas leak because no PSO on the robot. The absence of coordination between the robots make the six robots run individually and will avoid it when there is an obstacle or another robot.


B. Testing of Gas Leakage Detection Elapsed Time

Testing of searching elapsed time performed by calculating the time of robots in performing the search process of the gas leak from initialisation position until the gas leakage has founded. Travel time is calculated by calculating step process conducted by simulation.

Tests conducted ten times for the environment with obstacle in the environment, with the configuration of the environment stated in the previous section. Results of elapsed time of searching process in the environment can be seen in Table 2

Table 2. Elapsed Time in Environment with Obstacle(in step)


1 333 492 248 250

2 1801 1015 257 244

3 2501 2490 293 206

4 607 478 219 270

5 1600 657 299 198

6 1325 1896 263 200

7 875 1467 284 198

8 257 585 257 232

9 260 252 256 203

10 1139 985 275 233


avg 1069.8 1031.7 265.1 223.4

min 257 252 219 198

max 2501 2490 299 270

Without PSO control, the search process becomes long because each robot does not do a cooperation to conduct a gas leak, where the search time tends to fluctuate and the fastest time obtained is only obtained when the gas leak are in the direct path of the robot when the robot performed the initialization direction. Search becomes longer because the environment has some obstacles that add to the complexity of the search environment, so that the robot has difficulty in finding the center of a gas leak. With the control of the PSO, the robot can coordinate to find the gas leak, so the search process becomes faster.

C. PSO-FLC Performance Evaluation

In this section, evaluation conducted to the speed and steering produced by the control of FLC-PSO and without PSO-FLC control. Data of speed and steering was obtained by recording the performance output of the robot for each step. Environmental testing based on Figure 7. Speed performance results shown in Figure 8 and Figure 9.

Figure 8. Speed Output without PSO-FLC

Figure 9. Speed Output with PSO-FLC

In Figure 8 showed the speed is not stable where the robot will run faster on the control of PSO and will be slowed if detected obstacle.

In Figure 9, the speed of the robot adapted to the direction of the robot against center of gas leaks in PSO control. When detected an obstacle, FLC control will calculate the obstacle distance detection, and will move slowly according to the distance obstacle. When the obstacle still far from the robot, the control will only do a slight slowdown, but after walking and the robot detects that the obstacle is getting close, then the robot will be very slow.

Performance result of steering output shown in Figure 10 and Figure 11.


Figure 11. Steering Output with PSO-FLC

In part (a) is obtained unstable steering where the robot will walk straight when there is no obstacle and will turn if detect obstacle.

The results obtained in part (b), the robot can go to the center of the gas leak and can avoid obstacles well. Where PSO will direct the robot to the center point of a gas leak and if the obstacle is detected, the control of the FLC will estimate the angle changes according to the obstacle distance detection.

C. Experimental Result Analysis

Analysis of the test results performed by comparing the performance of each of the control based on cooperation, elapsed time and the level of output smoothness of the movement to the robot models. PSO role that each robot can carry out cooperation in the search robot, which is the closest robot can tell the other robot best position, so that other robots can follow these robots and find a position that is closer to the position of a gas leakage, so the search for gas leaks became faster, FLC role in handling complexity in avoiding other robots and obstacles, which the robot can detect and calculate the distance between the robot with other robots or obstacle in order to provide an appropriate control to avoid it, so that the robot can avoid obstacles with the smooth output.

PSO-FLC is a combination of the two controls mentioned above. So that the robot can accommodate both above control role. Where robots can cooperate with other robots to search for gas leakage source and can avoid another robot or obstruction.


Based on the results of comparative analysis of the control performance on the robot cooperation, travel time and the smoothness of the robot movement in unstructured environments, it can be concluded as follows:

1. Swarm robot cooperation and the robot's performance in handling the complexity constraints unstructured environments. With control of the PSO-FLC, the

robot has a better performance compared to the movement of a mobile robot without PSO-FLC. 2. PSO control role that each robot can carry out

cooperation in the search robots, FLC control role in handling complexity in avoiding other robots and obstacles. PSO-FLC is a combination of the two controls that have been mentioned, so that the robot can accommodate both these roles.


[1] N. E. Zoghby, V. Loscri, E. Natalizio, and V. Cherfaoui, "Robot Cooperation and Swarm Intelligence," Wireless Sensor and Robot Networks: From Topology Control to

Communication Aspects., 2014.

[2] H. Zhu, C. Pu, K. Eguchi, and J. Gu, "Euclidean Particle Swarm Optimization," in In Intelligent Networks and

Intelligent Systems (ICINIS), 2009.

[3] R. Poli, J. Kennedy, and T. Blackwell, "Particle Swarm Optimization," Swarm Intelligence, vol. 1, pp. 33-57, 2007.

[4] H. Boubertakh, M. Tadjine, and P.-Y. Glorennec, "A Simple Goal Seeking Navigation Method for a Mobile Robot Using Human Sense, Fuzzy Logic and Reinforcement Learning," Journal Of Automatic Control,

University Of Belgrade, pp. 23-27, 2008.

[5] W. Jatmiko, et al., Swarm Robot Dalam Pencarian Sumber Asap. Depok: Fakultas Ilmu Komputer Universitas Indonesia, 2010.

[6] A. Menon, R. Akmeliawati, and S. Demidenko, "Towards a Simple Mobile Robot with Obstacle Avoidance and Target Seeking Capabilities using Fuzzy Logic," in IEEE

International Instrumentation and Measurement

Technology Conference, Victoria, 2008.

[7] B. B. K. Reddy, et al., "Goal seeking with obstacle avoidance behavior for mobile robots ," in Circuits and

Systems, 2003 IEEE 46th Midwest Symposium on, Cairo,


[8] R. Eberhart and J. Kennedy, "A New Optimizer Using Particle Swarm Theory," in Micro Machine and Human Science, 1995. MHS '95., Proceedings of the Sixth

International Symposium on, 1995, pp. 39-43.

[9] G. Chen and T. T. Pham, Introduction to Fuzzy Sets, Fuzzy

Logic, and Fuzzy Control Systems. New York: CRC Press,


Figure 1. General Structure of Fuzzy Logic Controller [9]

Figure 1.

General Structure of Fuzzy Logic Controller 9 . View in document p.2
Figure 3. Direction Sensor towards x-axis of Environment

Figure 3.

Direction Sensor towards x axis of Environment . View in document p.2
Figure 2. Robot Environment Modelling

Figure 2.

Robot Environment Modelling . View in document p.2
Table 1. FLC Rule Design

Table 1.

FLC Rule Design . View in document p.3
Figure 4. Obstacle Distance Sensor towards Robot Center

Figure 4.

Obstacle Distance Sensor towards Robot Center . View in document p.3
Figure 7.Mobile Robot Simulation with Obstacle

Figure 7.

Mobile Robot Simulation with Obstacle . View in document p.4
Figure 8. Speed Output without PSO-FLC

Figure 8.

Speed Output without PSO FLC . View in document p.5
Table 2. Elapsed Time in Environment with Obstacle(in step)

Table 2.

Elapsed Time in Environment with Obstacle in step . View in document p.5
Figure 10. Steering Output without PSO-FLC

Figure 10.

Steering Output without PSO FLC . View in document p.5
Figure 11. Steering Output with PSO-FLC

Figure 11.

Steering Output with PSO FLC . View in document p.6