Ijser: Modeling and Simulation of A Differential Drive Mobile Robot
Ijser: Modeling and Simulation of A Differential Drive Mobile Robot
ISSN 2229-5518
Abstract—Differential drive robots have wide application in the fields of defense, reconnaissance, in house hold applications like house cleansing robot
and many others. This paper intends to present a simple and a reliable method to circumvent the physical intricacies of the actual world, by developing a
realistic simulation system. A prototype model was first made to understand the logic of obstacle detection using ultrasonic sensors and Arduino Uno as
the microcontroller, but optimizing the robot physically by experimentation was very difficult. Therefore to solve this problem an identical simulation is
carried out in matlab for easy optimization. The Kinematic equations used to control the robot is presented.The output data of the kinematic model is
used to actuate the 3D model in virtual reality toolbox of matlab. The rotation of the robot about the central axis is also observed. The obstacles are de-
tected by the ultrasonic sensors mounted on the robot which enables the robot to navigate in an unknown environment.
Index Terms— Arduino, differential drive robot, kinematics, matlab, mobile robot, object avoidance, simulation, simulink.
—————————— ——————————
1 INTRODUCTION
Robotics today has become a part in our day to day life. We
IJSER
can now develop highly maneuverable, functional and intelli- Class (3, 0) robots also called omnidirectional robots
gent robots for the high-end military applications to the more have no steering wheels(s=0) that is they are only
mundane applications of the household. Locomotion system equipped with Swedish or castor wheels. They have
for mobile robots can be broadly classified under legged and complete mobility in a plane which means that they
wheeled systems. Legged robots are very useful under cir- can move in any direction without changing their ori-
cumstances of extremely difficult terrain or when there are entation. (m=3)
high terrain discontinuities. The main advantage of this articu-
lated walking machines is that they can adapt their posture to Class (2, 0) robots also have no steering wheel(s=0)
the uneven terrain making locomotion very easy. However, but at least one of the wheels is fixed with a common
articulated robots are difficult to control, have size restrictions axle, restricting the mobility of the plane to two-
and are not as fast as compared to wheeled robots. [1] dimensional motion in the plane.(m=2)
Locomotion systems bases on wheels are relatively simple
as the number of articulations in a walking robot is far less Class (2, 1) robots have at least one steering wheel
than that in a wheeled robot. Therefore, wheeled robot are far (s=1) and no fixed wheel, which means that all the
faster, reliable simple and easy to control if it is required to wheels can rotate independently. If the number of
operate it on a rugged ground, roads, or any other relatively steering wheels is more than two than they must be
level surface.[2] coordinated and the mobility is restricted to a two
Understanding how wheeled mobile robots (WMR) move dimensional plane.(m=2)
with reference to the command inputs is essential for naviga-
tion tasks like path planning, obstacle avoidance and guidance Class (1, 1) robots have one or more fixed wheels on a
systems. common axle and also one or more steering wheels
such that the centers of the steering wheels should not
coincide with the common axle of the fixed wheel and
2. Wheeled Mobile Robots
the orientations must be coordinated.(s=1). The Mo-
The wheeled mobile robots are classifies under five classes bility of the robot depends upon the orientation of the
corresponding to the pair of indices (m, s), where m is the mo- steering wheel and is restricted to one dimensional
bility degree and s is the steer ability. [3] plane.(m=1)
————————————————
Anirudh Topiwala is currently pursuing bachlor’s degree program in Class (1, 2) robots should at least have two steering
mechanical engineering engineering in Institute of Technology, Nirma wheels(s=2) and no fixed wheel. The Mobility is de-
University, Inida, PH-+919712903712. pendent on the orientation of the two steering wheels
E-mail: [email protected]
and is restricted to one dimensional plane.(m=1)
IJSER © 2016
http://www.ijser.org
1411
International Journal of Scientific & Engineering Research Volume 7, Issue ŝǰȱ¢-2016
ISSN 2229-5518
In this paper I have developed a class (2, 0) type of differen- 3.2 The Electronical aspects
tial drive robot.
An Arduino Uno board controls the robot. [4] The bot is
Nomenclature
equipped with two high torque 800 rpm Robokits motors
angular velocity of the robot
which are bidirectional and operate at 12 volts. The motors are
R mounted such that their axis of rotation is in one line. The two
distance between ICC and the midpoint between the
ultrasonic sensors used here are of HC-SRO4 model that oper-
wheels
l ate at 5 volts provided by the Arduino board. The Arduino
distance between the wheels
Vr linear velocity of the right wheel measures the distance by calculating the time required for the
Vl linear velocity of the left wheel ultrasonic waves emitted by the sensor to reflect back from
angle of the robot with X axis
the obstacle. Using this data the Arduino determines whether
to take a left or right turn and change the direction of motor
accordingly with the help of motor controller. The motor con-
3. The Prototype Model troller used here is RKI-1004(Robokits India). The motor con-
3.1 The Mechanical aspects troller helps us connect a higher power source to the motors,
here it is 12 volts. Thus once the robot is able to detect obsta-
The prototype model made here is of class (2, 0) [3] which cles and move accordingly it just needs an input signal to start
means that it has no steering wheel and the mobility is restrict- after which it can act autonomously. A Bluetooth module con-
ed to two dimensional plane. The chassis is made up of a rec- nected to the Arduino provides this input signal. The Blue-
tangular hard wood which has motor mountings mounted on tooth module used here is HC-06. . In case of any failures, this
it.The two driving wheels used here are of plastic material and Bluetooth module can also provide manual actuations to the
has a rubber layer on them to increase the tractive force. To robot. Communication to the module can be established in
IJSER
balance the robot and preventing it from not falling over two many ways, here we have developed an app in MIT appinven-
support castor wheels are added at the front and the back side. tor which uses a mobile phone’s Bluetooth to control the robot.
If the material of the chassis is changed to aluminum than it [5]
can have practical applications in industries as it can carry
heavy weights with high mobility and speed. The capability of 3.3 Need for simulation
the robot to rotate about its own axis adds in to the advantages
of using it in industries. While making the prototype robot we faced a lot of difficulties.
Some of them include the availability of certain components.
Also the sensors and the Arduino board used are very expen-
sive. Another important problem is the time required to exper-
iment different data values which can be easily done using
simulations. Optimizing the model experimentally can be a
painstaking task which can be easily and efficiently done using
different simulators. Graphs can be plotted between input and
output values to generate a comprehensive view of the collect-
ed data.
(a)
4. Differential Drive Robot
The mobile robot developed for the simulation is a class (2, 0)
type differential drive robot which is very similar to the proto-
type model developed. There are many design alternatives but
the two wheel drive robot is by far the most popular design.
The CAD software used to develop the model for simulation is
Solid Works 2014. The Differential drive robot consists of four
main parts which are the chassis, the wheels, the castor wheel
mounting and the castor wheel.
(b)
The chassis is cuboidal shaped and hollow at the center to ac-
Fig. 1. Front view of the prototype model showing different
commodate for the circuitry of the robot and also to reduce
components like ultrasonic sensors, bread board, Bluetooth
weight of the robot. The chassis is symmetric about the central
module, etc. (b) showing the remaining components which are
planes which hepls the robot to rotate about the cental axis at
the Arduino uno board, 12V supply power, motor controller,
its own position.
power bank to supply the Arduino board.
IJSER © 2016
http://www.ijser.org
1412
International Journal of Scientific & Engineering Research Volume 7, Issue ŝǰȱ¢-2016
ISSN 2229-5518
The different parts of the robot are connected to the chassis by 5. Kinematic Equations for differential drive
giving relations between the parts, which is called giving ma- robot
tes. The rotary parts are connected to the chassis by mainly
5.1 Differential Drive Kinematics
giving two mates the coincident mate and the cocentric ma-
For Navigation of the robot autonomously it has to know its
te.The castor wheel is connected to the far end of the chassis
position at all times, that is the translational and the rotational
and is only used to give support to the robot. The two inde-
matrices. When we change the velocity of the wheels to have
pendent driving wheels are connected to the front end of the
different motions the robot must rotate about a point that lies
chassis
along the common axis of both the driving wheels, this point is
known as the Instantaneous Center of Curvature (ICC)
The robot also has eight ultrasonic sensor mountings on the
(Fig.2(b))[6]. The angular velocity developed due to this rota-
front side for the sensors. The mechanical integrity of the robot
tion is denoted by and the following equations can be writ-
is maintained by having a front bumper which protects the
ten:
robot from impacts or collisions.
R+ l/2)=Vr (1)
Different parts of the model-robot have different material con- R- l/2)=Vl
siderations. Aluminium alloy is the preferred material of con- (2)
stuction, because the parts are light in weight and are not very
expensive. The wheels have an aluminium rim and the tires Where ‘l’ is the track of the robot or the distance between the
are made out of plastic which a rubber covering for traction. two wheels, Vr and Vl are the right and the left wheel linear
velocities respectively, R is the distance between the ICC (In-
stantaneous Center of Curvature)[6][7] and the midpoint be-
tween the wheels. At any instant of time we can solve for R
IJSER
and as:
IJSER © 2016
http://www.ijser.org
1413
International Journal of Scientific & Engineering Research Volume 7, Issue ŝǰȱ¢-2016
ISSN 2229-5518
IJSER
Once we are done with the modeling of the robot it is import-
ed into matlab using the Simulink Link add in in the CAD
software. The imported XML file is of second generation type.
The block diagram for the cad model is than generated using
the built in function H = smimport (“File Name.xml'). This
generates the block diagram wherein the relations between the
chassis and the different components can be easily seen. The
mates in the cad software for the robot are represented by rev-
olute blocks and can be altered so that we can change parame-
ters like internal mechanics, actuation, and sensing. [7] We can
give constant or varied velocity inputs to the robot through
this revolute block.
Fig. 6. It is the kinematic subsystem block. This block takes in The first transform sensor senses the rotation of the robot
IJSER
the input velocities w_l and w_r and calculates the final posi- while the second sensor senses the ‘x’ and the ‘y’ translations.
tions of the robot according to the governing equations de-
scribed above. The Matlab Function box consists of a user defined code to
calculate the position of the sensors with respect to the envi-
6.3 Control Logic for the simulation ronment which is possible because of the know position of the
Once the robot can move in the environment the next step is robot. The obstacles present in the environment are in the
to be aware of the obstacles present in the environment. There form of ones and zeroes in the simulation and therefore the
are many ways to sense the obstacles present in the vicinity of sensor ranges can be calculated by interpolating values from
the robot but the sensors used here are ultrasonic sensors. the virtual sensor lookup block. [10] Once we get the different
These sensors work on the principle of reflection of ultrasonic sensor values we can use stateflow which is the control logic
waves. The distance of the obstacle can be calculated by meas- of the robot, to decide whether to take a left or a right turn
uring the time taken by the ultrasonic wave to reflect back depending on the value of the allowable sensor ranges. In this
from the obstacle. [10] project depending upon the sensor readings we have a total of
In this simulation we have used a virtual sensor subsystem to six conditions, which are wide turn, tight turn and turn in
detect and find the range of the obstacles from the robot. place for both left and right side. Thus, the robot will be able
In this subsystem first we use two transform sensors to pas- to navigate in the unknown environment autonomously.
sively sense the 3D time varying transformation and send it to
the user define matlab function through the ‘SSC to SSL’ sub-
system as seen in Fig. 7, which converts the physical signal
into simulink signal.
IJSER © 2016
http://www.ijser.org
1415
International Journal of Scientific & Engineering Research Volume 7, Issue ŝǰȱ¢-2016
ISSN 2229-5518
IJSER
[4] A. Medina-Santiago*1, J. L. Camas-Anzueto1, J. A.
Vazquez-Feijoo1, 2, H. R. Hernández-de León1, R. Mota-
Grajales1, Neural Control System in Obstacle Avoidance in
Mobile Robots Using Ultrasonic Sensors. (7-8) (2014).
[5]Mit app inventor website.
http://appinventor.pevest.com/?p=520
Fig.8. Virtual reality environment.
[6] Dudek and Jenkin, Computational Principles of Mobile
Robotics. (9-11)(2013).
[7] Thomas Hellström Department of Computing Science
7. Conclusion
Umeå University, Kinematics Equations for Differential Drive
This paper intends to present a simple and a reliable method and Articulated Steering (8-9) (2014).
to avoid the intricacies of physical modelling, by carrying out [8] Egerstedt, M., 2013. Control of mobile robots.
a simulation of the robot, in matlab. In particular, the paper [9] A. Mahfouz Ahmad, A. Aly Ayman, A. Salem Farhan
starts with the making of a prototype model which can detect
Mechatronics Design of a Mobile Robot System,IJISA, 5 (3)
obstacles and navigate accordingly, using ultrasonic sensors
and Arduino uno as the microcontroller. Because of the diffi- (2008), pp. 23–33 2013
culties faced during physical modeling of the robot, an alter- [10] Swarooph Seshadri, webinar on Mobile robot simulation
native solution is used, to carry out an identical simulation of for collision avoidance with simulink (2014).
the robot in simulink, which can be further optimized easily.
The kinematic equations associated with a differential drive
robot of class (2, 0) is then discussed and implemented in the
simulation using the simulink library. Finally, the control as-
pect of the robot is discussed, and 3D outputs are obtained
through the virtual reality toolbox of matlab.
IJSER © 2016
http://www.ijser.org