Вы находитесь на странице: 1из 5

1 Experiment # 2

2 Behavior based obstacle negotiation of mobile robot

Whenever a stimulus is applied to the behavior based mobile robot, it generates a


response accordingly. In this experiment, we designed and implemented one such
differential mobile robot using MobotSim. Programming in MobotSim is done on
BASIC Language.

3 MobotSim

MobotSim is a Graphical User Interface (GUI) based software for easy simulation of a
differential Mobile Robot in 2D environment. It uses BASIC language for programming
and for that purpose it has a BASIC editor. We can create macros using some predefined
functions in software to make our Mobot (MObile roBOT) moving.

Mobotsim offers many features like using as many mobots as we wish, different shapes
of obstacles so that we can make desired environment for simulation of mobot, flexible
configuration of both mobots and ranging sensors, BASIC programming IDE and some
other features like third party activeX controls etc. An overview of these features is
shown in figures below

Figure 1: Mobot Configuration (General)

Figure 2:
Mobot Configuration (Geometry)
Figure 3: Ranging Sensor Configuration Figure 4: BASIC
IDE

4 Design Assignment

A differential mobot was designed for Wall Following Behavior. These steps were
carried away for the implementation of this behavior
A- Two input parameters were fuzzified for implementation of logic. These
parameters are
i- Minimum of the distances of mobot from wall obtained using multiple (let
say 3) sensors i.e. dw
ii- Change in distance with time dw = dw (t1) - dw (to)
Positive value of dw indicates that mobot is moving away from wall while
negative value indicates that mobot is moving towards wall.
For distance calculations, ultrasonic sensors were used. Sensor conditioning was
also done i.e. if wall is out of range of sensor then output of sensor is assigned a
value of -1

dw dw Left Wheel Velocity Right Wheel


Velocity
Near -ve large VVL Zero
Near -ve medium PVL Zero
Near zero PL Zero
Near +ve large PL PL
Near +ve medium PL PVL
Medium -ve large PVL ZM
Medium -ve medium PVL M
Medium zero PL PL
Medium +ve large M PVL
Medium +ve medium ZM PVL
Far -ve large PL PL
Far -ve medium PL PVL
Far zero M PVL
Far +ve large ZM PVL
Far +ve medium ZM VVL

Membership functions were defined for input parameters


ss_left_mf (b,c,x) ss_right_mf (a,b,x)
B- Premise
matrix was
calculated
using
Prem[i, j] =
min{mf1(i),
mf2(j)}
From this a
rule matrix
of size 3 x
5 was
calculated
ss_center_mf (a,b,c,x) ds_left_mf (a,b,x) such that
rule(i,j)
was on to
a value
equal to
Prem[i, j]

C- Membershi
p functions
for output
i.e. velocity
(left wheel
& right
wheel) is
drawn
below
D- Output velocity either for right wheel or for left wheel was calculated with the help
of area of trapezoids of corresponding membership functions.

Output velocity=
Area ( i, j )rule peak value(i, j)
Area ( i , j )

5 Code

Вам также может понравиться