Localization and Obstacle Avoidance Using Fuzzy Logic and Neural Network
Localization and Obstacle Avoidance Using Fuzzy Logic and Neural Network
II. ANALYSIS
In the progress of experimenting, we can observer 3
different issues of difficulties. We try to analysis the problem
and to clarify 3 different parts about sensor issue, mechanical
issue and task control algorithm issue.
A. Sensor Issues
This part is the first step in this system, when this part is
wrong it will cause all decision and control will wrong as well.
In sensor problem observation, we construct several conditions
of the obstacles and command to mobile robot to reading the
data. The data will be analyzed and compared to the real
Fig 6 Constructed obstacle to find the laser data error
(2) Learning
Neural Network algorithm is adopted as a training
mechanism and using Backpropagation method to train the
environment. We found the problem here that we need many
set data training to be trained to the mobile robot. This is little
bit hard to construct many conditions so that we get enough
data to be trained.
Fig 5 there are error data reading of laser data in region a3 and a14
III. METHODOLOGY
This part has same method as sonar observation. Figure 6 A. Technical Problems
shows the obstacle constructed and we read the data.
When mobile robot does not move like we want, it will
cause mobile robot hit the obstacle although system
understand where mobile robot should go. In this observation,
we need to find error angle between real turn and command so
that we can command mobile robot well. In this part, we use
computer to type the command and protractor to check how B. Algorithm Problems
many angle error. The last problem is algorithm problem (Fuzzy logic and
We observe behavior of the mobile robot when given simple Neural Network). If all information and technical are solved
command (left turn and right turn). We design fix turn left and but wrong in command it will make mobile robot can’t avoid
turn right of the mobile robot with certain parameter. Figure 7 obstacle well. In this part we use sonar and laser range finder
is design of mobile robot turning, while Figure 8 is design of to get data, computer to type the command and measurer to
mobile robot angular velocity. look appropriate distance when mobile robot give response.
After we get the fix design, we command to the mobile We assumed that the sensor data error was found, so we use
robot to turn in certain degree and look for the error. the data as input in Fuzzy Logic and Neural Network control.
To study the problem, we construct maze to look the respond
and analyze the behavior.
1. Fuzzy logic
R
VL VR To design this control, we have to design output of system,
input membership function, use several Fuzzy Logic rules and
look the respond. These three parts will be important part in
ICR
Fuzzy Logic design. To get good output, usually it needs many
trial and error so that we get appropriate rule and system
configuration. Figure 9 is configuration of the laser range
finder with three defined region (close, middle and far). Figure
10 shows the output of Fuzzy control whether Figure 11 shows
the input. Figure 12 is the flow chart for the Fuzzy Logic
L L
control.
2 2
Fig 7 Instantaneous center of rotation (ICR)
Angular Angular
velocity velocity
WL
WR
t0 t1 t2 t3 Time t0 t1 t2 t3 Time
close
Fig 8 Design of angular velocity
middle
With far(obstacle)
Fig 9 Configuration of laser range finder as input of control
§ Output
left left-left front left front-front front right front- front right
right -right front
clo se m id d le fa r start
Quantization to be 18 region
§ Rule
no no
theta =0? theta < 0 ?
S1
S2
S3
S4
S5 OUTPUT
S6
Fig 14 Obstacle in right front S7
S8
start
φ
reading data from
laser range finder
Fig 15 Respond of mobile robot Quantization to be 8 region and
set to be zero/ one based on data distance
yes yes
§ Neural Network training
go forward turn left turn right
To train data and build Neural Network, we will use Matlab
Neural Network function.
In this project, we use Backpropagation with several method
e.g. gradient descend (traingd), gradient descend with adaptive
no
learning rate (traingda), Levenberg-Marquardt (trainlm), stop?
Fletcher-Reeves Update (traincgf). We try all method and look
for best method can recognize the pattern and give smallest yes
error.
First, we make new network. Then we set parameters, such
stop
as how many iteration in simulation, Mean Square Error Fig 17 Neural Network control flow chart
(MSE), how fast simulation learn the pattern of relationship
between input and target, and when the Matlab show the
simulation result (in this setting, Matlab will show the result IV. EXPERIMENTAL RESULTS
every 100 iteration). If goal is reached (convergent), Matlab
will stop the simulation. The final result of simulation is that A. Sensor Observation
we get the weight values connecting among input to hidden In this observation, we want to find valid data from
layers and output.
environment. We use sonar and laser range finder to get data.
After we try several algorithm methods and hidden layer Figure 18 shows the error data found in laser range finder.
amount combination, we decide that combination with 9
neurons in hidden layers 1, 8 neurons in hidden layer 2, and 6
neurons in hidden layer 3 are Neural Network structure we
use. This combination is chosen manually after trying possible
combination of hidden layer or neurons. Figure 16 shows the
Neural Network structure. Figure 17 is the flow chart for
Neural Network control.
Laser data reading error in 118 From several method we have tried, we find that neural
3000
network with three hidden layer (with 9 neurons in hidden
2500 layer 1, 8 neurons in hidden layer 2, and 6 neurons in hidden
layers three) is the best structure of neural network. It is mean
2000
that this system can recognize the data pattern trained. Then
Distance(mm)
1000
500
0
Error data
-500
0 200 400 600 800 1000 120
0
Laser detector number
B. Technical Observation
In this part, we observe behavior of the mobile robot when
given simple command (left turn and right turn).
From this observation, we get minimum angle so that
mobile robot cannot move and get mobile robot turning same
as we command. Table 2 shows the turning error and Table 3 Fig 19 Target output and Neural Network output
shows the minimum turning error.
V. DISCUSSION
Table 2 Turning error for this design
A. Sensor Observation
command result
In this observation we get conclusion that sonar can’t read
45 90 data well in maze structure. We get the error in sonar 2 and
90 135 sonar 6. This is caused by material of maze consisting of
aluminum and wood. Alternatively, we use laser range finder
135 270 to get the data. Although laser ranger finder also sometimes
270 315 has error data, we can eliminate it by taking average data but
in no zero point.