Jurnal Choirul Anam 41417120125

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 12

SINERGI Vol. xx, No.

x, February 20xx: xxx-xxx


http://publikasi.mercubuana.ac.id/index.php/sinergi
http://doi.org/10.22441/sinergi.xxxx.x.xxx

IMPLEMENTATION OF ADAPTIVE NEURO FUZZY INFERENCE


SYSTEM AS A CLASSIFICATION OF DISTANCE DETECTION ON
AUTONOMOUS OBSTACLE AVOIDANCE MOBILE ROBOT
Choirul Anam1, Andi Adriansyah2
1
Department of Electrical Engineering, Faculty of Engineering, Universitas Mercu Buana
2
Department of Electrical Engineering, Faculty of Engineering, Universitas Mercu Buana

Abstract Keywords:
In recent years, many techniques have been developed and Adaptive Neuro Fuzzy
applied to design autonomous obstacle avoidance mobile robots. Inference System,
This robot uses sensors as input to be processed into a decision to Autonomous Obstacle
deal with its environment to avoid a collision. One of the sensors Avoidance Mobile Robot,
that is ofteni implemented in this robot is the ultrasonic sensor. In ultrasonic sensor, control
order for the robot to get more information about the environment, system.
more than one sensor is installed as an input. However, with the
Article History:
installation of more than one sensor, a control system with the Received:
right and optimal algorithm is needed to process every input Revised:
obtained by the sensor in order to produce the right robot moving Accepted:
Published:
decisions. In this experiment, the robot uses three wheels which
two wheels are at the front of the robot and one wheel is at the Corresponding Author:
back of the robot. Three ultrasonic sensors are implemented on the Choirul Anam
robot and the control system applied in this experiment is the Electrical Engineering
Department, Universitas Mercu
Adaptive Neuro Fuzzy Inference System (ANFIS) which is Buana, Indonesia
implemented in the Arduino microcontroller. The purpose of Email: [email protected]
implementing ANFIS is to process input from ultrasonic sensors to
produce a robot motion decision algorithm based on environmental
conditions without a collision. Based on the results of testing the
training data and testing the ANFIS data, the RMSE value of the
training data is 0.0024303 and the RMSE testing data is 0.002362.
The ANFIS architecture applied has a number of membership
functions: [3 3 3], type of membership function: Trimf, learning
method: Backpropagation, and epochs: 1000. The results of
reading serial monitor tools on the Arduino Ide platform prove that
the decision results from the ANFIS training process are
appropriate. with scenarios designed to avoid collisions.

This is an open access article under the CC BY-NC license

A. Adriansyah et al., Author Template for SINERGI 1


SINERGI Vol. xx, No. x, xxxxxx 20xx: xxx-xxx

INTRODUCTION (R: 31, G: 78, B: 121) Algorithm for Mobile Robot Navigation, and Ant
In an autonomous mobile robot, a colony optimization algorithm and other
control system is needed so that the robot can nondeterministic algorithms for mobile robot
work properly. The control system can be said to navigation. [5]
be intelligent if the system has independent Based on research that has been done
capabilities or has intelligence in processing the previously, the researcher get an idea to solve
information obtained to make a decision. [1] the problem in this study, which will design an
Some examples of the application of autonomous obstacle avoidance mobile robot
autonomous mobile robot applications include based on:
transportation, planetary investigations carried • Using three ultrasonic sensors mounted
out by NASA, reconnaissance carried out by on the front, right and left sides of the robot to
soldiers in several countries, and so on. From absorb input information in the form of the
several examples of the application of distance between the robot and obstacles.
autonomous mobile robots, the function of • Using the Adaptive Neuro Fuzzy
planning an obstacle-free path or obstacle Inference System (ANFIS) method which is used
avoidance is the main thing in a mobile robot [2]. as a control system that processes input from
Autonomous obstacle avoidance mobile sensors into decisions to move the robot.
robots in general can be designed using one or a ANFIS is a system that combines fuzzy
combination of several sensors, including logic and artificial neural networks to form
ultrasonic sensors, laser sensors, vision sensors, powerful algorithms that can study data sets,
and so on, depending on the environmental modify various parameters in membership
conditions encountered. [3] In some studies, to functions, and process linguistic variables. The
deal with static obstacles, ultrasonic sensors above-mentioned characteristics of the ANFIS
become efficient sensors to use. network illustrate its suitability for autonomous
Autonomous obstacle avoidance mobile mobile robot navigation. The data set for training
robot requires information from ultrasonic the ANFIS network has been obtained by
sensors about the distance between the obstacle designing a fuzzy logic controller and navigating
object and the robot to avoid a collision. a mobile robot using a fuzzy logic controller in
However, ultrasonic sensors have some different environments. The data set obtained
limitations when applied to this robot. The was used to train the ANFIS network [6].
ultrasonic sensor has an optimal detection angle The autonomous mobile robot's decision-
range of 30°. This is a major issue to be applied making to turn or find an empty space at a certain
to autonomous obstacle avoidance mobile robots distance can be optimized by this method. The
because the robot will face a wide and unknown distance deviation that occurs between the robot
environment. It takes more than one ultrasonic and the obstacle object can also be minimized by
sensor so that the robot can absorb information optimizing the fuzzy logic controller (FLC) given a
well to its environment. With the application of dataset. This design shortens the runtime and
more than one sensor, it is necessary to process can optimize the membership function input and
information from each input to be used as output output parameters of the fuzzy controller and
in the form of motion decisions. Therefore, a rearrange the fuzzy rules to increase the
control system with the right algorithm is needed efficiency of the overall approach. [7]
to overcome this problem.
Budiharto, W., et al (2018) conducted a
research that is build and design of an indoor METHOD
obstacle avoidance robot where the authors used Materials
ultrasonic sensors as detectors of static In this study, several components were
obstacles and vision sensors for dynamic used to design an autonomous obstacle
obstacles [4]. Pandey, A., et al (2020) conducted avoidance mobile robot:
a study that resulted in a review of several A. Ultrasonic Sensor HC-SR04
methods that can be applied to robot obstacle Ultrasonic sensor HC-SR04 is an
avooidance including: Fuzzy logic technique for electrical device that has a function as a
mobile robot navigation, Hybridization of fuzzy sensor that works based on the principle of
and nondeterministic algorithm, Neural network the reflection of a sound wave that is used to
technique for mobile robot navigation, Neuro - detect the presence of a certain object in front
fuzzy technique for mobile robot navigation, of it. This sensor works at frequencies sound
Genetic algorithm for mobile robot navigation, waves betwen 40 KHz to 400 KHz and has a
Simulated annealing algorithm for mobile robot range of 3 cm – 300 cm. This ultrasonic wave
navigation, Particle Swarm Optimization propagates through the air at a speed of 344

2 A. Adriansyah et al., Author Template for SINERGI


p-ISSN: 1410-2331 e-ISSN: 2460-1217

meters per second. This sensor has a pin that


is used to trigger a measurement and report
the distance measured.

Figure 2. Motor Driver L298N

L298 is a type of motor driver IC that


can control the direction of rotation and speed
.
of a DC motor or stepper motor. Able to issue
Figure 1. Ultrasonic Sensor HC-SR04
a voltage output for dc motors and stepper
motors of 50 volts. IC 1298 consists of logical
The ultrasonic sensor HC-SR04 is a
transistors (TTL) with nand gates that make it
sensor that converts physical quantities
easy to determine the direction of rotation of a
(sound) into electrical quantities. In this
dc motor and stepper motor. This IC can
sensor ultrasonic waves are generated
control 2 for dc motors, and its also can only
through an object called a piezoelectric. This
control 1 stepper motor. Its use is most often
piezoelectric will produce ultrasonic waves
for line follower robots. Its small size allows it
with a frequency of 40 kHz when an oscillator
to minimize the manufacture of line follower
is applied to the object. The ultrasonic sensor
robots. As the name implies, the L298N Dual
HC-SR04 is generally used for a variety of
H-Bridge Motor Driver Module functions to
non-touch disclosures such as distance
drive or in other words make it easier for us to
measurement applications. This tool generally
control DC motors using a microcontroller. We
emits ultrasonic sound waves towards a target
know that the logic level output from the
which reflects the waves back towards the
microcontroller is 3.3V and 5V with a very
sensor. Then the system measures the time it
limited current, so we cannot control the motor
takes for the transmitted wave to return to the
directly, especially since the motor requires a
sensor and calculates the target distance
higher voltage and current level. [9]
using the speed of sound in the medium. The
series of components of this ultrasonic sensor
C. Arduino Uno
consists of a transmitter, receiver, and
Arduino Uno is an open source
comparator. [8]
electronics kit specially designed for anyone
interested in creating objects or developing
B. Motor Driver L298N
electronic devices that can interact with a
The L298N motor driver is the most
wide variety of sensors and controllers.
widely used DC motor driver module or used
Arduino is a microcontroller board that is fully
in the electronics world which is used to
controlled by ATMega 328.
control the speed and direction of rotation of
the DC motor. IC L298 is an IC type Hbridge
capable of controlling inductive loads such as
relays, solenoids, DC motors and stepper
motors. The L298 IC consists of logical
transistors (TTL) with nand gates that function
to make it easier to determine the direction of
rotation of a dc motor or stepper motor. For
the market, there is already a motor driver Figure 3. Arduino Uno
module using the L298 IC, so it is more
practical to use because the I / O pins are Arduino Uno has 14 digital
already neatly packaged and easy to use. The input/output pins (6 of which are used as
advantages of this L298N motor driver module PWM outputs), 6 analog inputs, a 16Mhz
are in terms of precision in controlling the crystal oscillator, a USB connection, a power
motor so that the motor is easier to control. jack, an ICSP header and a reset button. The
Arduino Uno contains everything needed to
support the microcontroller, it's easy to
connect it to a computer with a USB cable or
supply it with an AC to DC adapter or use a
battery to get started. [10]

A. Adriansyah et al., Author Template for SINERGI 3


SINERGI Vol. xx, No. x, xxxxxx 20xx: xxx-xxx

Methods
Blok Diagram
In the block diagram design there are three
important parameters, namely input, process and
output. Here is a block diagram of the system on
the tool:

Figure 4. Blok Diagram

Based on figure. 4, it can be seen that each block


has the following functions:
1. Input/Input
The input from the system is in the form
of three ultrasonic sensors HC-SR04 which are
positioned in front of the robot, the right side of
the robot, and the left side of the robot to receive
the information in the form of distance of obstacle
around the robot.
2. Process
The ANFIS controller will work as a
recipient of information from the input, then
processed using the algorithm to produce an
output in the form of a decision based on the
value of the input received. Then it will be
processed by the Arduino Uno Microcontroller to
find the decisions generated by the ANFIS
controller which are then used to drive the
actuator, namely the DC motor.
3. Output
The output of this system is the motion of
a DC motor. Before entering the DC motor, the Figure 5. Flowchart
processing results from the Arduino Based on figure. 5, the autonomous
microcontroller are entered into the motor driver obstacle avoidance mobile robot system works
first because the current from the microcontroller by utilizing three ultrasonic sensor inputs. When
is not able to meet the needs of the DC motor the robot starts to run, the robot will move
where the change in direction and rotational forward until one of the ultrasonic sensors
speed of the DC motor depends on the voltage detects an obstacle. When an obstacle is
value given to the motor driver input itself. detected, the robot will process the information to
make a decision to use the ANFIS control system
Flowchart algorithm. The robot will continue to move
A flow chart is a diagram that describes a work forward until the distance with the obstacle
flow or process. The flow chart is also used as a reaches 25 cm, then when the obstacle is 25 cm
reference for making programs in this research. from the robot, the robot will turn to avoid the
The following is a flow chart of the entire system. obstacle. The robot will turn left if the sensor on
the right side and or the front side of the robot
detects an obstacle at a distance of 25 cm from
the sensor. Then the robot will turn right if the
sensor on the left side of the robot detects an
obstacle with a distance of 25 cm from the
sensor. All of these systems are controlled by the
ANFIS algorithm with a preset set point output.

4 A. Adriansyah et al., Author Template for SINERGI


p-ISSN: 1410-2331 e-ISSN: 2460-1217

 Layer 3
Adaptive Neuro Fuzzy Inference System Each node in this layer is given the
(ANFIS) notation N. The i-th node calculates the
ANFIS (Adaptive Neural Network ratio of the i-th weighting power to the
Inference System) is a combination of fuzzy logic sum of all weights.
and artificial neural networks. Fuzzy logic and
artificial neural networks are two popular AI
techniques used in the design of mobile robots.
Fuzzy logic can express subjective uncertainty in The output of this layer is called
the human mind and process data in natural normalized weighting.
linguistic variables. Meanwhile, the artificial  Layer 4
neural network process stages are very long and Each node i in this layer is an adaptive
complicated so that it is not effective on networks node with a function node:
that are large enough and have the ability to
learn and adapt but do not have the reasoning
ability as in fuzzy logic. [11] Which is is the normalized weight of
ANFIS is a multi-input single-output layer 3 and i is the parameter of this node
architecture based on the Takagi-Sugeno fuzzy set. The parameters in this layer are
inference system. Based on its architecture, known as consequent parameters.
ANFIS has 5 layers or layers, each of which has  Layer 5
different similarities and functions. The structure One node denoted by Σ in this layer
of each layer of ANFIS is described below: functions to aggregate all output from
layer 4 (sum of all incoming signals):

To measure the accuracy of ANFIS


network output, a quantization device is needed.
To calculate the difference between ANFIS
output and target data in the training process,
MSE (Mean Square Error) is used based on the
following quation:
Figure 6. ANFIS Architecture
 Layer 1
Function to convert crisp numbers into
fuzzy numbers using fuzzy sets. The Which is p is the number of data pairs.
output of this layer is: Prediction accuracy with the ANFIS method in
this study was calculated using the MAPE (Mean
Absolute Percentage Error) criteria with the
equation:
Which is x and y are the input values for
the node and Ai or Bi is the fuzzy set. So,
each node in layer 1 functions to
generate membership degrees. Which is :
 Layer 2 = Actual Data
If the first layer only involves each input,
= Prediction Data
in the second layer each input goes to
N = Total of Data
the same layer to determine the firing
strength. In general, layer 2 uses the
AND operation. Fuzzy sets are multiplied Design of Adaptive Neuro Fuzzy Inference
from one input to another with the System (ANFIS)
following relationship: The architectural design of ANFIS is an
important stage in this research, because ANFIS
So, can be used to provide motion or decision
algorithms for autonomous obstacle avoidance
mobile robots. By entering the input value in the
form of the distance range of the three ultrasonic

A. Adriansyah et al., Author Template for SINERGI 5


SINERGI Vol. xx, No. x, xxxxxx 20xx: xxx-xxx

sensors HC-SR04 then the value of the distance RESULTS AND DISCUSSION
range is processed by ANFIS. Before being A. Results of Designing Hardware Autonomous
processed by ANFIS, the data obtained by the Obstacle Avoidance Mobile Robot
three ultrasonic sensors was first normalized to At the hardware design stage, the
ensure data dependencies before being autonomous obstacle avoidance mobile robot is
processed. Then ANFIS will issue a value which made with three wheels, where there are only
is the robot's decision to move and is expected to two wheels on the front that can move and one
have a stable system response. The following is wheel on the back as a counterweight and help
the flow chart of the ANFIS controller: turn. The two wheels on the right and left front of
the robot are driven by a DC motor which is
controlled by the L298N motor driver. At the front
of the robot there are three ultrasonic sensors
HC-SR04 as input for the robot. The placement
of this ultrasonic sensor is set facing the right
tilted 30° as ultrasonic sensor 1, straight 90° as
ultrasonic sensor 2, and tilted left 30° as
ultrasonic sensor 3. At the top of the robot there
is a breadboard that is used to help or make it
easier to connect the robot circuit circuit, L298N
motor driver to regulate the work of the DC
motor, and there is an arduino uno
microcontroller that processes all input and
output on the robot. At the bottom of the robot
there are two 4.5v batteries connected in series
as a power supply for the robot's electrical circuit
which is connected to the switch before entering
the circuit. All of these components are designed
in such a way that they become a single unit. The
following is the result of the realization of the
hardware circuit that has been made previously.

Figure 7. Flowchart ANFIS Controller

Based on figure. 7, how the ANFIS controller


works, starting from the three HC-SR04 sensors
detecting obstacles which then get the distance Figure 8. Prototype Autonomous Obstacle
to be processed by ANFIS. Then the distance Avoidance Mobile Robot
value will be normalized first before being
B. Result of ANFIS Architecture Design
processed by ANFIS to get the output decision
The way to get the maximum ANFIS
value. The output value of this decision will be in
architecture is to test several of the ANFIS
the form of numbers 0, 1, and 2 after being
architectures and then look for the lowest RMSE
denormalized. Which 0 means moving forward, 1
from the results of training data and data testing
means turn right, and 2 means turn left. Then the
(Anshary and Nazori, 2017). [12] Following are
output value of the decision is used to determine
the steps to test the ANFIS architecture:
how the L298N motor driver works to move the
1. Preprocess
DC motor so that the robot moves according to
The preprocessing stage is the dataset
the decision process generated by ANFIS. Then
collection stage. The dataset collection in this
the process returns to the sensor detecting
study uses the simulation method first with a
obstacle stage, and so on. This process is carried
serial monitor on the Arduino microcontroller and
out repeatedly so that the robot continues to
concludes the best possible system response
adapt to every environmental situation it faces.
scenario. A good system response will have a
small undershoot and overshoot. After that the

6 A. Adriansyah et al., Author Template for SINERGI


p-ISSN: 1410-2331 e-ISSN: 2460-1217

distance data from the ultrasonic sensor HC- picture of the results of training data for
SR04 1, ultrasonic sensor HC-SR04 2, ultrasonic autonomous obstacle avoidance control system
sensor HC-SR04 3 and the decision output mobile robot architecture row number 5.
values are used as datasets. After the datasets
are collected then the datasets need to be
normalized in order to avoid too much difference
between one parameter and another. The
normalization used for this research is using the
Z-Score normalization type, where to normalize
the data using the Z-Score function. [13]

Figure 9. Graph of ANFIS Training Data

Which is: It can be seen from Figure 9 that the


RMSE value of the training data is 0.0024303
X = Value of real data with the parameter number of membership
function: [3 3 3], type of membership function:
X’ = Value of normalization data Trimf, learning method: Backpropagation, and
epochs: 1000. After training the data, then the
2. Training and Testing architecture needs to be validated in the form of
At this stage, the process uses the data testing. The following is a picture of the
Matlab R2012b software. Where the data that results of data testing.
has been normalized is divided into 70% for
training data and 30% for testing data.

3. Evaluation of ANFIS Arsitektur Architecture


In the process of evaluating the ANFIS
architecture, it is done by evaluating several
ANFIS architectures by testing several
parameters, namely the number and type of
membership functions, learning methods and
epochs. From these parameters, the lowest
RMSE training data and testing data values are
sought, so that is the best and optimal ANFIS
architecture when implemented in the system. Figure 10. Graph of ANFIS Testing Data
To get the best ANFIS architecture for the
autonomous obstacle avoidance mobile robot
system, an evaluation of the training and testing
Data Normalisasi
of the dataset was carried out. This evaluation Num RMSE
was carried out 16 times with various types of N
o
ber MF Optim. Epo
parameters being tested. And the following is a . of Type Method chs Training Testing
MFs
table of the evaluation of the ANFIS architecture [3 3 100 0.5992
1 Trimf Hybrid 0.61809
of the autonomous obstacle avoidance control 3] 0 8
[3 3 Trapm 100 0.5833
system of the mobile robot. 2
3] f
Hybrid
0
0.63574
5
[3 3 Gbell 100 0.00010
3 Hybrid 5.9253
3] mf 0 155
[3 3 Gauss 100 0.4276
4 Hybrid 0.49985
3] mf 0 7
[3 3 Backpropagat 100 0.00231 0.0023
5 Trimf
3] ion 0 33 736
6
[3 3 Trapm Backpropagat 100 0.00247 0.0035
3] f ion 0 03 636
Table 1. ANFIS Architecture Evaluation 7
[3 3 Gbell Backpropagat 100
0.3839
0.3820
3] mf ion 0 7
[3 3 Gauss Backpropagat 100 0.8619
8 0.89751
3] mf ion 0 1
Based on table 1 it can be seen that the 9
[5 5
Trimf Hybrid
100
0.26092
22.146
5] 0 8
lowest RMSE training data and testing data 1 [5 5 Trapm 100
values are 0.002313 and 0.002374 which are 0 Hybrid 0.36177 3.3081
5] f 0
contained in row number 5. The following is a 1
1
[5 5 Gbell
Hybrid
100
0.13391
26.664
5] mf 0 9
1 [5 5 Gauss 100 28.891
2 Hybrid 0.12476
5] mf 0 9
1 [5 5 Backpropagat 100
3 Trimf - -
A. Adriansyah et al., Author Template for SINERGI 5] ion 0 7
1 [5 5 Trapm Backpropagat 100 0.09511 0.3177
4 5] f ion 0 3 6
1 [5 5 Gbell Backpropagat 100 0.3384
5 0.33841
5] mf ion 0 4
1 [5 5 Gauss Backpropagat 100 0.8690
6 0.85521
5] mf ion 0 3
SINERGI Vol. xx, No. x, xxxxxx 20xx: xxx-xxx

From Figure 10, the value of the RMSE


testing data is 0.0023632. After that, the best
ANFIS structure was obtained, here is a picture
of the ANFIS structure for the autonomous
obstacle avoidance control system of the mobile
robot.

Figure 13. Normalization Input of HC-SR 04 2

Input Normalization Ultrasonic Sensor


HC-SR04 2 pounds is the same as the design,
which consists of three membership functions,
and has the following values:

Figure 11. ANFIS Architecture for Autonomous Dekat2 : [-2.448 -1.071 0.251]
Obstacle Avoidance Mobile RObot Sedang2 : [-0.726 0.0936 1.33]
Jauh2 : [0.04408 1.424 2.932]
After the training, input variables are
obtained, namely the normalization of the
distance of the ultrasonic sensor HC-SR04 1,
ultrasonic sensor HC-SR04 2, and ultrasonic
sensor HC-SR04 3, with the memberhip function
values that have been optimal according to data
training carried out. The following is a picture of
the normalization input of the ultrasonic sensor
distance HC-SR04 1, ultrasonic sensor HC-SR04
2, and ultrasonic sensor HC-SR04 3.

Figure 14. Normalization Input of HC-SR 04 3

The normalization input of the HC-SR04


3 Ultrasonic Sensor also has the same value as
the design, which consists of three membership
functions, and has the following values:

Dekat3 : [-3.532 -1.865 -0.01495]


Sedang3 : [-2.037 0.1699 2.366]
Figure 12. Normalization Input of HC-SR 04 1 Jauh3 : [0.8065 2.276 4.012]
From Figure 12, it can be seen that the
In addition to the input variables, the
input normalization of the ultrasonic sensor HC-
result of output variables are also the same as
SR04 1 is the same as the previous design. The
the design.
ultrasonic sensor normalization input HC-SR04 1
consists of three membership functions, and has
the following values:

Dekat1 : [-2.62 -1.056 0.4944]


Sedang1 :[-0.6232 0.7089 2.575]
Jauh1 : [0.8067 2.433 3.912]

Figure 15. ANFIS Output Value of Autonomous


Obstacle Avoidance Mobile Robot

8 A. Adriansyah et al., Author Template for SINERGI


p-ISSN: 1410-2331 e-ISSN: 2460-1217

The value of the ANFIS output for the in the dataset and seeing the output results
autonomous obstacle avoidance mobile robot generated in the dataset at ruleviewer.
control system consists of 27 membership
functions, and has the following values: Table 2. Sample of Dataset Testing
Sampel Pengecekan Dataset
Out1mf1 = -0.9334
Out1mf2 = -0.9334 No Inp. Inp. Inp. Nilai
. Sensor 1 Sensor 2 Sensor 3 Output
Out1mf3 = -0.9334
Out1mf4 = 1.07 -
Out1mf5 = 1.069 1.1419540 0.8489593 0.6619795 0.9034026
Out1mf6 = 0.05545 1 01 39 46 59
Out1mf7 = 1.07
- -
Out1mf8 = 1.066 0.5161686 1.1576181 0.5027780 0.9034026
Out1mf9 = 0.1585 2 32 74 92 59
Out1mf10 = -0.9334
Out1mf11 = -0.9334 - - - -
Out1mf12 = -0.9334 1.1002349 0.5674483 1.1290368 0.3011342
3 77 17 12 2
Out1mf13 = -0.008008
Out1mf14 = -0.01605 -
Out1mf15 = -0.04205 1.1525923 1.7538864 0.9803824 1.5056710
Out1mf16 = 0.04633 4 52 53 54 98
Out1mf17 = 0.08757
Out1mf18 = 0.006246
Out1mf19 = -0.9334 The table above is a sample of data from
Out1mf20 = -0.9334 the normalized dataset to be checked in the rule
Out1mf21 = -0.9334 viewer. The following is the result of checking the
Out1mf22 = -0.01296 data:
Out1mf23 = -0.03684
Out1mf24 = -0.0188
Out1mf25 = 0
Out1mf26 = 0
Out1mf27 = 0

Then also obtained rule-based ANFIS as


many as 27 rules. The following is a rule based Figure 17. Result of testing dataset sample from
ANFIS obtained from the data training process Table. 2 No. 1
that has been carried out.
Based on figure. 17, based on the results
obtained from the ANFIS at rule viewer, the input
value for sensor 1 is -1.14, the input value for
sensor 2 is 0.849, and the input value for sensor
3 is 0.662. Then the output value that appears in
the rule viewer is 0.903. This proves that the
fuzzy logic results in ANFIS match the sample
dataset number 1.

Figure 16. ANFIS Rule Viewer of Autonomous Figure 18. Result of testing dataset sample from
Obstacle Avoidance Mobile Robot Table. 2 No. 2

From the results of the training that has Based on figure. 18, based on the results
been carried out, to recheck the input and output obtained from the ANFIS rule viewer, the input
data is in accordance with the dataset scenario value for sensor 1 is -0.516, the input value for
that we have created, it can be done by looking sensor 2 is -1.16, and the input value for sensor 3
at the rule viewer and entering several samples is 0.503. Then the output value that appears in
of the distance values that have been normalized the rule viewer is 0.898. The resulting output has

A. Adriansyah et al., Author Template for SINERGI 9


SINERGI Vol. xx, No. x, xxxxxx 20xx: xxx-xxx

a difference of 0.005 from the dataset. This mobile robot control system. This can be proven
proves that the fuzzy logic results in ANFIS have by looking at the results of the ANFIS output
a deviation of 0.005 from the output value in the values on the Arduino microcontroller program
sample dataset. However, this is not a problem with serial monitor tools on the Arduino Ide
because at a later stage after the output value is platform. This ANFIS output value serves to
denormalized, rounding will be done to the control the L298N motor driver to regulate the
closest decision output value. With a deviation of movement of the DC motor. Here are some
0.005, it will not be an error in the decision to pictures of serial monitor results on the Arduino
move the robot. Ide platform.

Figure 19. Result of testing dataset sample from


Table. 2 No. 3

Based on figure. 19, based on the results


obtained from the ANFIS rule viewer, the input
value for sensor 1 is -1.13, the input value for
sensor 2 is -0.567, and the input value for sensor
3 is 0.662. Then the output value that appears in
the rule viewer is -0.301. This proves that the
fuzzy logic results in ANFIS correspond to the Figure 21. View of Tools Serial Monitor When
sample dataset number 3. Robot Going to Turn Right

Based on figure. 21, it can be seen that


the application of the ANFIS control system on
the autonomous obstacle avoidance mobile robot
can be said to be successful. Based on Figure
21, the input of the ultrasonic sensor HC-SR04
can be processed into a suitable decision to
Figure 20. Result of testing dataset sample from move to avoid collision. In Figure 21, it can be
Table. 2 No. 14 seen that sensor 1 reads a distance of 36.10 cm,
sensor 2 reads a distance of 72.79 cm and
Based on figure. 20, based on the sensor 3 reads a distance of 22.41 cm. The result
results obtained from the ANFIS rule viewer, the value of layer 5 ANFIS is 0.30. Then the results
input value for sensor 1 is 1.15, the input value of layer 5 ANFIS values are denormalized to
for sensor 2 is 1.75, and the input value for produce decision output values. The result of the
sensor 3 is 0.98. Then the output value that denormalization is 1 which indicates the robot to
appears in the rule viewer is -1.51. The resulting turn right. This is in accordance with the design
output has a difference of 0.005 from the dataset. scenario that has been made.
This proves that the fuzzy logic results in ANFIS
have a deviation of 0.005 from the output value in
the sample dataset. Just like checking sample
number 2, this is not a problem because at a later
stage after the output value is denormalized,
rounding will be done to the closest decision
output value. With a deviation of 0.005, it will not
be an error in the decision to move the robot.
Thus, the fuzzy logic contained in the
ANFIS architecture is in accordance with the
conditions of the dataset scenario applied to the
ANFIS architecture

C. Result of Robot Motion Using ANFIS Control Figure 22. View of Tools Serial Monitor When
System Robot Going to Turn Left
In this study, it can be seen that ANFIS
works well as an autonomous obstacle avoidance

10 A. Adriansyah et al., Author Template for SINERGI


p-ISSN: 1410-2331 e-ISSN: 2460-1217

In figure. 22 it can be seen that sensor 1 the evaluation show that the architecture that has
reads a distance of 26.50 cm, sensor 2 reads a the lowest RMSE value is the architecture on line
distance of 23.74 cm and sensor 3 reads a number 5 with the RMSE training data value of
distance of 27.41 cm. The result value of layer 5 0.0024303 and the RMSE testing data of
ANFIS is 0.90. Then the results of layer 5 ANFIS 0.002362. The architecture of row number 5 has
values are denormalized to produce decision the number of membership functions: [3 3 3],
output values. The result of the denormalization type of membership function: Trimf, learning
is 2 which indicates the robot to turn right. This is method: Backpropagation, and epochs: 1000.
in accordance with the design scenario that has
been made. 3. In the autonomous obstacle avoidance mobile
robot, ANFIS acts as a control system or decision
maker for the robot to move
independently/automatically based on the state of
the robot's environment. The results of reading
serial monitor tools on the Arduino Ide platform
prove that the decision results from the ANFIS
training process are in accordance with the
scenario designed to avoid collisions. So that the
autonomous obstacle avoidance mobile robot
can move without colliding with obstacles.

ACKNOWLEDGMENT
The author expresses gratitude to the
Electrical Engineering Department and Research
Figure 23. View of Tools Serial Monitor When
Center of Mercu Buana University, Jakarta,
Robot Going Straight Forward
Indonesia. Under the guidance, the authors have
Based on figure. 23 it can be seen that been completed this research paper.
sensor 1 reads a distance of 37.60 cm, sensor 2
reads a distance of 34.90 cm and sensor 3 reads REFERENCES
a distance of 37.17 cm. The result value of layer [1] Suhendra, T, Et Al, “Simulasi Kendali
5 ANFIS is -1.51. Then the results of layer 5 Pergerakan Mobile Robot Menggunakan
ANFIS values are denormalized to produce Algoritma A-Star Dalam Menentukan Jarak
decision output values. The result of the Terpendek.” J. Sustainable, Vol 6, Pp. 16-23,
denormalization is 0 which indicates the robot to 2017.
move forward. This is in accordance with the [2] Abhisek, T, “Obstacle Avoidance Algorithms:
design scenario that has been made. A Review.” IOP Conf. Series: Materials Science
CONCLUSION And Engineering, 2020,
Based on the results of the tests carried DOI:0.1088/1757-899X/1012/1/012052.
out, conclusions can be drawn as follows: [3] Abdillah, M & Rohman, F, “Analisis Pengaruh
1. Autonomous obstacle avoidance mobile robot Kecepatan Kendaraan Listrik Dan Kecerahan
has been successfully designed and tested by Lingkungan Terhadap Hasil Pemetaan Ruangan
implementing ANFIS as its control system. This Dari Sensor Laser Scanner”, J. Pena Teknik Vol.
autonomous obstacle avoidance mobile robot 3, Pp. 57-66, 2018.
uses three wheels where two wheels move in the [4] Budiharto, W., Et Al, “A New Obstacle
front which are driven by a DC motor and one Avoidance Method For Service Robots In Indoor
wheel in the back as a balancing wheel and help Environments.” ITB J.Eng Sci. Vol. 44, Pp. 149-
turn. At the front of the robot there are three 168, 2018.
ultrasonic sensors HC-SR04 as robot input. Then [5] Pandey, A., Shalini, P., Parhi D.R., “Mobile
the breadboard, L298N motor driver, and Arduino Robot Navigation And Obstacle Avoidance
microcontroller are placed on the top of the robot. Techniques: A Review.” International Robotics &
The power supply or 9v battery is placed at the Automation Journal, Vol. 2, No. 3, Pp. 96-105,
bottom of the robot. 2017.
[6] Subbash, P & Chong, K.T, “Adaptive Network
2. The ANFIS control system is implemented on Fuzzy Inference System Based Navigation
the autonomous obstacle avoidance mobile Controller For Mobile Robot.”, Front Inform
robot. In the ANFIS architecture for autonomous Technol Electron Eng, Vol. 20, No. 2, Pp. 141-
obstacle avoidance mobile robots, 16 ANFIS 151, 2019.
architectures have been evaluated. The results of

A. Adriansyah et al., Author Template for SINERGI 11


SINERGI Vol. xx, No. x, xxxxxx 20xx: xxx-xxx

[7] Batti, H. B,” Autonomous Smart Robot For Algorithm (Aabc) For The Identification Of
Path Predicting And Finding In Maze Based On Nonlinear Static Systems.” Arabian Journal For
Fuzzy And Neuro Fuzzy Approaches.” Asian Science And Engineering, Vol. 44, No. 4, Pp.
Journal Of Control, Vol. 23, No.1, Pp. 3-12, 2021. 3531-3547, 2019.
[8] Elezer, R.M., “Aplikasi Sensor Ultrasonik Hc- [12] Anshary, N. B., “Model Penduga Penentuan
Sr04 Sebagai Jarak Iring Aman Pada Kendaraan Karyawan Teladan Berbasis Adaptive Adaptive
Berbasis Arduino Nano.”, P. 4-5, 2019. [Online]. Neuro Fuzzy Inference System (ANFIS).”
Available: : STRING (Satuan Tulisan Riset Dan Inovasi
Https://Repositori.Usu.Ac.Id/Bitstream/Handle/12 Teknologi), Vol. 2, No. 2, Pp. 201-212, 2017.
3456789/21263/162408034.Pdf? [13] Adiana, B. E., Soesanti, I., & Permanasari,
Sequence=1&Isallowed=Y. [Accessed February A. E., “Analisis Segmentasi Pelanggan
3, 2022] Menggunakan Kombinasi RFM Model Dan
[9] Aziz, P.F.A., “Implementasi Robot Beroda Teknik Clustering.” Jurnal Terapan Teknologi
Menggunakan Driver L298n Melalui Mpu-6050 Informasi, Vol. 2, No. 1, Pp. 23-32, 2018.
Sebagai Kendali Gestur Tangan.”, P. 14-15,
2020. [Online]. Available:
Https://Repositori.Usu.Ac.Id/Bitstream/Handle/12
3456789/27992/172408047.Pdf?
Sequence=1&Isallowed=Y. [Accessed February
3, 2022]
[10] Hutahayan, R, “Rancang Bangun Pintu
Garasi Otomatis Menggunakan Sensor
Ultrasonic Berbasis Arduino Uno.”, P. 8-9, 2019.
[Online] Available:
Https://Jurnal.Pancabudi.Ac.Id/Index.Php/Fastek/
Article/View/1842/1682. [Accessed February 3,
2020]
[11] Karaboga, D. “Training ANFIS By Using An
Adaptive And Hybrid Artificial Bee Colony

12 A. Adriansyah et al., Author Template for SINERGI

You might also like