Professional Documents
Culture Documents
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 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
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