Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
109 views

Project Report Introduction To Autonomous Mobile Robots MCG 5138H

This document describes a navigation system for an autonomous differential wheeled robot using PID control. The system utilizes three basic navigation behaviors - go to goal, avoid obstacles, and go to goal while avoiding obstacles. These behaviors are simulated in MATLAB using the Sim.I.Am simulator. PID controllers are used to define the behaviors and different techniques for merging the controllers are explored. Simulation results are presented and discussed to compare the performance of each module and technique.

Uploaded by

Falky Rabb
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views

Project Report Introduction To Autonomous Mobile Robots MCG 5138H

This document describes a navigation system for an autonomous differential wheeled robot using PID control. The system utilizes three basic navigation behaviors - go to goal, avoid obstacles, and go to goal while avoiding obstacles. These behaviors are simulated in MATLAB using the Sim.I.Am simulator. PID controllers are used to define the behaviors and different techniques for merging the controllers are explored. Simulation results are presented and discussed to compare the performance of each module and technique.

Uploaded by

Falky Rabb
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Navigation and Obstacle Avoidance Control of an Autonomous

Differential Wheeled Robot Using PID Controller in Matlab Simulation


Project Report
Introduction to Autonomous Mobile Robots
MCG 5138H
Syed Tasnim Ahmed
Student no. 300099267
Email: sahme197@gmail.com
Mechanical And Aerospace Engineering Department
Carleton University
Ottawa
April 4, 2019

Abstract basic navigation behaviors: go to goal, avoid obstacle,


go to goal avoiding obstacle. These behaviors will allow
This paper represents an autonomous navigation sys-
the robot to orient and position itself in a predefined
tem using PID control for a differential drive mobile
map and find an obstacle-free route to reach its goal,
robot composed of 3 basic navigation behaviors: go to
using sensor response. This will be simulated using the
goal, avoid obstacle and go to goal avoiding obstacles.
Sim.I.am simulator, a Matlab based simulator developed
The algorithms for these behaviors were modularly de-
by J.P de la Croix [1] at the Georgia Robotics and Intel-
signed and simulated in a Matlab based simulator called
ligent Systems Laboratory (GRITS) of Georgia Institute
Sim.I.Am. To navigate the robot to a particular goal
of Technology, USA.
avoiding obstacles on its path, two techniques; blend-
ing and hard switch were explored for merging the con-
trollers. A hybrid of blending and hard switch technique 2 Quickbot
is designed which exploits the advantages of both. Simu- The mobile robot used in the simulatoion, named
lation results for each module and techniques are shown Quickbot, is a two-wheel differential drive mobile robot
and discussed with a comparison based on their perfor- based on the design of the Khepera 3 robot.
mance. Suitable values for PID gain and other necessary
parameters for safe and effective navigation of the robots
are presented.

1 Introduction
An autonomous mobile robot has the ability to nav-
igate without any external human intervention. The
robot can reach the desired target while avoiding static (a) Actual (b) Simulation
or dynamic obstacles along the way. For this, it has to
Figure 1: Quickbot
determine its own position with respect to both a world
and local frame. In autonomous navigation of mobile The QuickBot is equipped with five infrared (IR)
robot, different control strategies are followed such as range sensors, of which, three are located in the front
PID, Fuzzy Logic, Genetic Algorithm, Neural Network and two are located on its sides (as shown in figure 1).
etc. In this project, PID controller is used to define 3 These sensors are effective in the range 0.04 m to 0.3 m,

1
the same as an actual IR sensor used in Quickbot [1]. 2.2 Odometry
In the simulator, there is a function that converts the In order to determine robots position in the environ-
IR sensor responses to a distance in meters. Each wheel ment, Odometry is used in mobile robotics. In odome-
is actuated by a separate motor with a wheel encoder try position is determined by measuring the change from
attached. The radius of the wheel is 32.5mm, the dis- a known initial position of the Quickbot. The general
tance between the wheels is 99.25mm. The design of the idea is to use wheel encoders to measure the distance
Quickbot comes with the simulator. Figure 1 shows the the wheels have turned over a small period of time, and
simulated and actual QuickBot mobile robot. use this information to approximate the change in pose
of the robot [3]. The pose of the robot is composed of its
2.1 Differential Drive Kinematics
position (x, y) and its orientation θ on a 2 dimensional
As a differential drive robot, the Quickbot has 3 de- plane. The Quickbot has moved by dleft and dright from
grees of freedom (x, y, θ). The navigation of the Quick- a starting point (x, y, θ ) to a new position, (x0 , y 0 , θ0 )
bot has to be controlled by specifying the rotational ve- which has to be computed.
locities of the right and left wheel (vr , v` ) . These ve-
locities are computed by a transformation from the lin-
ear and angular velocity of the robot unicycle (v, w) to
(vr , v` ). (vr , v` ) . Here R is the radius of a wheel, and L
is the distance separating the two wheels.

Figure 3: Odometry Geometry


Figure 2: Differential Drive Geometry The center of the robot also travels along an arc dcenter
The dynamics of the unicycle are defined as: and the change in direction is ∆θ. The odometry equa-
tions for the new position of the robot is:
ẋ = v cos(θ), ẏ = v sin(θ), θ̇ = w (1) dleft + dright
dcenter =
The dynamics of the differential drive are defined as, 2
dright − dleft
R ∆θ =
ẋ = (vr + v` ) cos(θ) L (5)
2
θ0 = θ + ∆θ
R
ẏ = (vr + v` ) sin(θ) (2) x0 = x + dcenter cos(θ)
2
R y 0 = y + dcenter sin(θ)
θ̇ = (vr − v` )
L Now, dleft and dright is measured with the encoder.
The transformation from unicycle dynamics to differ- If the encoder has N ticks per revolution, and for each
ential drive dynamics that is converting from (v, ω) to revolution of a wheel of radius R , the wheel travels 2πR
wheel speeds (vr , vl ) . distance, then the distance is measured from the number
of thicks.
2v + wL
vr = ∆tick
2R (3) d = 2πR (6)
2v − wL N
v` =
2R
2.3 Frame Transformation
The following equations will give the transformation
from differential drive to unicycle dynamics. Obstacle detection is done by using the IR distances
measured by the five IR sensors and then transforming
R these to points in reference frame of the quick and then
v= (vr + v` )
2 (4) world frame [1]. The transformation matrix that applies
R a translation by (x, y) and a rotation by θ can be ex-
w = (vr − v` )
L pressed by:

2
 
cos(θ) − sin(θ) x eI = EK + eK ∗ dt (12)
R(x, y, θ) =  sin(θ) cos(θ) y  (7)
Derivative Response: The Derivative response in a
0 0 1
PID controller is calculated by determining the slope of
The transformation of the IR distance measured by the error over time and multiplying this rate of change
each sensor to a point in the reference frame of the Quick- by the derivative gain (KD ).[5] The derivative response
bot is found by: is given by:
 
0 vi d(e(t))
vi = R (xsi , ysi , θsi ) (8) Dout = KD ∗ = KD ∗ eD (13)
1 dt
where, vi = [di , 0]T is the vector coordinate of a point In matlab simulator, the derivative error term is de-
pi from the sensor i which is at di distance. (xsi , ysi , θsi ) fined as the following, where eK1 is the error in previous
is the pose (location and orientation) of the sensor in the time step.
reference frame of the Quickbot. eK − eK1
The second transformation is to determine where the eD = (14)
dt
point, pi is located in the world. (x, y, θ) is the pose of
the robot. The transformation of the Quickbot from its
reference frame to the world frame is given by: PID controller Output The controller output which
is the angular speed (w) of the Quickbot for this project,
vi00 = R(x, y, θ)vi0 (9) can be computed by combining equations 10, 11 and 13
as following:
2.4 PID Controller
w = KP ∗ eK + KI ∗ eI + KD ∗ eD (15)
A proportional-integral-derivative (PID) controller
is a generic control loop feedback mechanism consists
of three basic coefficients; Proportional, Integral and 3 Design of Control Algorithms and
Derivative which are varied to get optimal response. Simulation
The basic idea behind a PID controller is to read
a sensor, then compute the desired actuator output For navigation, 3 basic behaviors are modularly
by calculating Proportional, Integral, and Derivative designed and simulated in Matlab based simulator
responses and summing those three components to Sim.I.Am. They are as following: go to goal (GoT oGoal
compute the output. [2] or gtg), avoid obstacles (AvoidObstacles or ao), avoid
obstacles and go to goal (AOandGT G). As the design
Proportional Response: The Proportional term is modular, all three controller algorithms are designed
produces an output value that is proportional to the cur- in three separate modules. Some necessary codes such
rent error value eK . This is done by multiplying the error as world environment, Quickbot dynamics,IR sensors,
by a constant called the proportional gain (Kp ).[5] wheel encoders and the platform for implementing the
control algorithms are provided in the simulator. Basic
Pout = KP ∗ e(t) = KP ∗ eK (10) algorithms were implemented according to the guidelines
Integral Response: The Integral component sums [1] provided with the simulator.
the error term over time. The result is that even a small The output variables of any of the designed controllers
error term will cause the integral component to increase are the angular velocity, w and linear velocity, v.
slowly. The integral term in a PID controller is the sum QBSupervisor file acts as the supervisor of the Quickbot
of the instantaneous error over time and gives the ac- and decides which controller to use for different circum-
cumulated offset that should have been corrected previ- stances. The output angular velocity, w is controlled
ously. The accumulated error is then multiplied by the with PID controller where the PID try to mitigate the
integral gain (KI ) and added to the controller output.[5] difference between the desired angle (θd ) for the goal and
Z t current heading angle (θ) of the Quickbot.
Iout = KI e(τ )dτ = KI ∗ eI (11) Before designing the main 3 behaviors, a simple
0 GoT oAngle controller was designed to test if the dif-
Where, τ is the variable of integration, takes on values ferential drive and odometry are working properly with
from time 0 to present time, t. In simulator, the integral the simulator.
error term is defined as the sum of total accumulated Some events are specified for quickbot’s supervisor
error EK and error for current time step. (QBSupervisor) for the implementation of Finite State

3
Machine (FSM) that chooses controller states in different
circumstances.

Event name Description When True


at goal Goal reached ∆(x,y) < dstop
at obstacle Obstacle nearby IR< dobstacle
unsaf e Obstacle too close IR< dunsaf e
obstacle cleared No obstacle IR> dobstacle
Where, Figure 4: GoToAngle Controller: Simulation of Qickbot
IR = Any IR sensor distance, range upto 0.3 meter turning to the desired angle
∆(x,y) = kx − xg , y − yg k,
which is the difference between the current coordinate
(x, y) and the goal coordinate (xg , yg ). and ensuring the heading angle to goal. The input vari-
ables are defined as goal coordinate (xg , yg ) and linear
3.1 Go to Angle Algorithm velocity, v. Heading angle, θg can be measured from the
Differential Drive dynamics, odometry algorithms are distance between goal and Quickbot’s position which is
implemented according to section 2.1 and 2.2. The ob- ux in X direction, uy in Y. To keep the angle in the range
jective of GoT oAngle controller is to turn Quickbot to [−π, π], atan2 command is used [1]. Now, the outputs
the desired angle, θd . A simple Proportional controller are defined as linear velocity, v and angular velocity, w.
with a unit gain (KP = 1) is used for this task. The PID controller is implemented to control w according to
controller computes the angular velocity, w and then the section 2.4. The gains KP , KI and KD are specified for
left and right wheel speeds (vl , vr ) for go to angle are the go to goal operation which are tuned manually. The
computed with the transformation of unicycle to differ- current error (eK = θg − θ) is set to 0 which will change
ential dynamics (equation 3). Error tracking is done by with time according to quickbot’s motion. The error for
continuously calculating the difference between the de- proportional, integral and derivative term (eP , eI , eD ) is
sired angle ’θd ’ and the current angle, θ measured from calculated accordingly. eP is the current error eK . eI , eD
the data from wheel encoders and odometry. The robot is found using equation 12 and 14 respectively. Finally,
will continue this process until the error becomes zero. the equation for PID output (w) is derived according
For error tracking, atan2 command is used to keep the to equation 15. The pseudocode of the algorithm for
error in the range [−π, π]. the finite state machine (FSM) which is implemented in
QBSupervisor is given below:
Simulation 1: Go To Angle: All the parameters for Algorithm 1 GoToGoal
this simulation are shown in following table.
if Event: at goal then
Quickbot’s supervisor file: QBSupervisor.m Switch to controller: Stop
Input linear velocity, v 0.1ms−1 else
Desired angle, θd 3pi/4, 2.3562 radian Switch to controller: GoT oGoal
Angle achieved 2.315 radian end if

GoT oAngle Controller: GoT oAngle.m


Proportional gain (KP ) 1 Simulation 2: Go to Goal All the important param-
P Error, eP θd − θ eters for this simulation are shown in following table.
Output angular velocity, e KP ∗ eP
Quickbot’s supervisor file: QBSupervisor.m
From simulation result shown in figure 4, we can see that
Input linear velocity, v 0.2ms−1
Quickbot took a turn of 2.315 radian which indicates the
Goal Location , (xg , yg ) (−1.3m, 0.5m)
odometry and differential drive was implemented cor-
dstop 0.05
rectly.
3.2 Go to goal Algorithm
GoT oGoal Controller: GoToGoal.m
The objective of go to goal behavior is to drive the PID Gain (KP , KI , KD ) 4.5, 0.01, 0.01
Quickbot towards the goal with a constant linear veloc-
ity (v), using PID controller. PID controller will nav- The controller can not detect obstacles, since it focuses
igate the robot by controlling its angular velocity (w) only on the goal. Starting at (0, 0) with the goal set to

4
(−1.3, 0.5), the Quickbot first rotate (counter-clockwise) 3.3 Avoid Obstacles
to adjust its heading angle towards the goal with a pos- The objective of this controller is to steer the robot
itive angular velocity (w) controlled by PID. Then, it successfully away from obstacle to avoid a collision. In
moves with a constant linear velocity (v) until the dis- the simulator, the provided IR sensors allow us to mea-
tance of the goal is less than dstop (shown in figure 5). sure the distance from Quickbot to obstacles in the en-
vironment. For this, IR distances measured by five sen-
sors have to be transferred to five points in the reference
frame of the robot and then compute a vector ui for each
sensor to its corresponding point from the robot. The
transformation of a point in robot reference frame and
world frame is followed according to section 2.3. Each
vector has to be weighted with αi according to their im-
portance for obstacle avoidance task. The weights are
Figure 5: Simulation 2 result: Qickbot going to a fixed symmetric with respect to the left and right sides of the
goal Quickbot [1]. Finally, a single vector ua0 was derived
by summing up these five vectors. The vectors that cor-
respond to directions with large IR distances will con-
tribute the most to uao ). So, this steers the Quickbot
away from obstacles in a direction with free space.[1].
A PID controller is implemented to keep heading angle
(θ) as close as possible to the desired angle (θg ). θg is
calculated from the vector ua0 . Section 2.4 is followed
to calculate all the error term (eP , eI , eD )and the PID
output, w.
(a) Undershoot and slow settle time(before tuning)

Figure 7: Simulation 3 result: Qickbot avoiding obstacle


on its path

(b) No undershoot, better settle time with some Simulation 3: Obstacle Avoidance Important pa-
steady oscillation (after tuning) rameters including the suitable PID gains for this sim-
ulation is shown in the table. As no goal is specified in
Figure 6: Simulation 2 result: Output angle θ controlled
this controller, quickbot starts moving forward with the
with PID Controller
input linear velocity v.
PID tuning: PID gains has to be tuned to get a fast Quickbot’s supervisor file: QBSupervisor.m
settle time (θ matches θg within 10% in three seconds or Input linear velocity, v 0.2ms−1
less), no undershoot and maximum overshoot should not
increase beyond 10% of the θg [1]. Initially, all the gains AvoidObstacles Controller: AvoidObstacles.m
were set to zero except KP was 1. Then the simulation Linear velocity (reduced) 1/2 ∗ v = 0.1ms−1
was launched. As shown in the figure 6(a), there was a PID Gain (KP , KI , KD ) 5, 0.01, 0.01
little undershoot and the settling time was slow. This
can be fixed by increasing KP . By trial and error, the When it reaches any obstacle, the vector uao shown in
undershoot was fixed for a KP of 4.5. But there was figure 7 by red dotted line changes the direction to steer
still some unsteady oscillation. Adding some KI and the robot away from the obstacle. In figure 7 , starting
KD (0.01), gives a better tracking and steady oscillation at (0, 0), the 2 front sensors (left and middle) detect the
(figure 6). box and the Quickbot reacts turning to the right. Once

5
Algorithm 2 Hard Switch Logic
if Event: at goal then
Switch to controller: Stop
else if Event: at obstacle then
Switch to controller: AvoidObstacles
else
Switch to controller: GoT oGoal
end if

Figure 8: Simulation 3 result: Output angle θ controlled Simulation 4: Hard Switch Logic: Different val-
with PID controller ues were tested in simulation. Following values ensure a
stable navigation for avoid obstacles and go to goal.
Quickbot’s supervisor file: QBSupervisor.m
it is away from the box, it moves forward until the front
Input linear velocity, v 0.2ms−1
left sensor detects a new obstacle, causing the robot to
Goal Location, (xg , yg ) (−1m, 1m)
turn left to drive away from the wall. Due to a small
dstop 0.05m
asymmetry in IR sensors position, the Quickbot steer
dobstacle 0.22m
slightly right when its away from obstacles.
GoT oGoal Controller: GoToGoal.m
3.4 Avoid Obstacle and Go to Goal PID Gain (KP , KI , KD ) 4, 0.01, 0.01
With the controller developed so far, the Quickbot can
either go to a goal with GoT oGoal controller or avoid AvoidObstacles Controller: AvoidObstacles.m
collision with obstacles on its path with AvoidObstacles Linear velocity (reduced) 1/3 ∗ v = 0.067ms−1
Controller. So, these two controllers need to be imple- PID Gain (KP , KI , KD ) 5, 0.01, 0.01
mented together in a way that it will allow the Quickbot
to drive to a goal, while not colliding with any obstacles 3.4.2 Blending Controller
on the way. Two arbitration mechanisms are explored
Instead of switching between 2 controller, GoT oGoal and
in this project: blending and hard switch. Each of them
AvoidObstacle controller is combined into a single con-
has advantages and disadvantages which were discussed
troller that blends the two behaviors. In avoid obstacles
with simulation results.
controller, vector uao is used for pointing from the robot
to a point in space away from obstacles. Now, a new vec-
3.4.1 Hard Switching tor, ugtg is developed which is pointing to the goal from
the quickbot. These two vectors are combined (blended)
In Hard switching logic, the robot continuously switches linearly into a single component vector uao,gtg by weigh-
between its two objectives: go to goal and avoid obsta- ing each vector according to their importance. Vector
cle, such that the robot avoids any nearby obstacles and uao,gtg points the quickbot both away from obstacle and
drives to the goal when clear of any obstacles. So, in- towards the goal [1].
stead of executing both GoT oGoal and AvoidObstacles
controller simultaneously, Quickbot only executes uao,gtg = α ∗ ugtg + (1 − α)uao (16)
one controller at a time, but switch between the two where 0 < α < 1. α needs to be carefully tuned to get
controllers whenever a certain condition is satisfied. the best balance between go-to-goal and avoid-obstacles
This is done by implementing a simple if-else algorithm behavior. This is difficult to choose as a lower value is
for the finite state machine (FSM) implemented in good for avoiding obstacles, but it may not be efficient
QBSupervisor. The pseudocode is given here. for go to goal behavior.
Though the GoT oGoal controller uses the full in- So, instead of using a single value for α, two values, a
put linear velocity, v; AvoidObstacle controller is mod- lower and a higher, is used for two conditions. A lower
ified to reduce v to ensure a smooth navigation around value gives more priority to AvoidObstacles controller
obstacles. Quickbot supervisor switches to controller when the obstacle is near. When obstacles are cleared, a
AvoidObstacle when obstacles are nearby, then v is re- higher value ensures the dominance of go to goal behav-
duced to 1/3 of the input v. When the obstacle is cleared, ior. The pseudocode for the blended vector component
supervisor switches to GoT oGoal and v is restored. is given below:

6
Algorithm 3 Blended vector uao,gtg its IR sensor is detecting the obstacle and move away
1. dobstacle < 0.3 meter (Distance of obstacle, within from it simultaneously.
IR sensor range)
2. αao = Lower value
3. αao,gtg = Higher Value

if any IR sensor distance < dobstacle then


uao,gtg = αao ∗ ugtg + (1 − αao )uao
else
uao,gtg = αao,gtg ∗ ugtg + (1 − αao,gtg )uao
end if
Figure 9: Qickbot moving to goal avoiding obstacles us-
ing hard switch method
The pseudocode of blended controller for finite state
machine (FSM) is given below: ’QBSupervisor’ is given
below:
Algorithm 4 Blending Controller Logic
if Event: at goal then
Switch to controller: Stop
else
Switch to controller: Blending AvoidObstacles and
GoT oGoal
end if
Figure 10: Simulation 4 Output angle θ controlled with
PID controller

Simulation 5: Blending Controller: Different val-


ues for α, dobstacle were tested in simulation. Following
values ensure a stable navigation for avoid obstacles and
go to goal.

Quickbot’s Supervisor file: QBSupervisor.m


Input linear velocity, v 0.2ms−1
Goal Location, (xg , yg ) (−1m, 1m)
dstop 0.08m

Blending Controller: AOandGTG.m Figure 11: Simulation 5 results: Output angle θ con-
dobstacle 0.20m trolled with PID controller
αao and αao,gtg 0.07 and 0.35 In hard switch, Quickbot’s heading angle always
PID Gain (KP , KI , KD ) 4, 0.01, 0.01 changes from the goal when its busy avoiding obstacles.
It forgets about the goal. So everytime, when obstacles
3.4.3 Observation of Simulation 4 and 5: Hard are clear, Quickbot has to adjust its heading angle. But
Switch and Blending in bending, Quickbot try to keep the heading towards
the goal even if its avoiding an obstacle. It smoothly
As shown in figure 9, initial position of the Quickbot blends go to goal and avoid obstacles behavior together.
is (0, 0) and the goal is fixed to (−1, 1). In hard switch, This is also observed from the output angle curves shown
Quickbot’s supervisor activates AvoidObstacle controller in figure 10 and 11. Output curve for blending is more
to move away from the obstacle detected by the right smooth and has fewer oscillations. An interesting obser-
sensor. When this obstacle is cleared, Quickbot switches vation is that Quickbot takes less time to reach goal for
to GoT oGoal and adjusted robots heading to goal and blending method. The reason is that additional time is
start moving towards it and so on. On the other hand, in needed for the quickbot to adjust its heading towards the
blending robots adjust the heading angle to goal while goal in hard switch method.

7
Which technique is more effective? The Hard Algorithm 6 Implmentation of Blending and Hard
switching technique has greater efficiency in performing Switch
the objective (avoid obstacle and go to goal) at higher if Blending then
linear velocities. But as the output curve has depicted, if (Event: at goal) then
the switching technique causes heavy vibrations in the Switch to controller: Stop
robot, which can cause damage to the internal hardware else
of an actual robot. This makes blending technique more Switch to controller: Blending AvoidObstacle and
acceptable as it uses a priority based technique. When GoT oGoal
the priority is more to avoid obstacle the robot will per- end if
form only avoid obstacle objective, otherwise it will per- else
form go to goal. This process causes a much smoother if (Event: at goal) then
transition between GotoGoal and AvoidObstacle. Switch to controller: Stop
Based on this observation, a hybrid of blending and else if (Event: at obstacle) then
hard switch algorithm is designed which utilizes the ben- Switch to controller: AvoidObstacles
efit of each technique in their favorable conditions. else
Switch to controller: GoT oGoal
end if
end if
3.4.4 Hybrid of Blending and Hard switch

Blending method’s smoothly blends go to goal and avoid Quickbot’s supervisor file: QBSupervisor.m
obstacle together which gives it the advantage of navigat- Input linear velocity, v 0.2ms−1
ing smoothly around obstacles. However, the quickbot Goal Location, (xg , yg ) (−1m, 1m)
sometimes comes too close to obstacles for its go to goal dstop 0.05m
behavior which results in collision. Another limitation of dobstacle 0.22m
blending is that its goal tracking is not that efficient as
a GoT oGoal controller. For these reason, it is better to Blending Controller: AOandGTG.m
purely use GoT oGoal when there is no obstacle around PID Gain (KP , KI , KD ) 4, 0.01, 0.01
and when obstacles are dangerously close, it is better to Linear velocity (reduced) 2/3 ∗ v = 1.33ms−1
only use AvoidObstacles. The switching logic gives a α 0.20
better performance in these conditions.
AvoidObstacles Controller: AvoidObstacles.m
Algorithm 5 Condition for Blending PID Gain (KP , KI , KD ) 5, 0.01, 0.01
if (Event: unsaf e) then Linear velocity (reduced) 1/3 ∗ v = 0.067ms−1
Blending = false
else if (Event: obstacle cleared) then GoT OGoal Controller: GoToGoal.m
Blending = false PID Gain (KP , KI , KD ) 4, 0.01, 0.01
else if (Event: at obstacle) then
Similar to simulation 4 and 5, Quickbots initial position
Blending = true
and goal is set to (0, 0) and (-1,1). Quickbot uses all 3
end if
controllers for navigation. At the start, where there is
an obstacle at a distance defined as unsaf e, controller
A hybrid algorithm is designed exploiting these advan- uses AvoidObstacles and moves to a safe distance. Then
tages in suitable conditions for blending and hard switch it uses blending AOandGT G around obstacles keeping
technique. heading angle as close to goal as possible. When the ob-
stacles are cleared it switches to GoT OGoal which purely
follow go to goal behavior to ensure the shortest path
Simulation 6: Hybrid of Blending and Hard towards goal. Different color in the output curve shown
Switch: Important parameters associated with this in figure 12 also depicts the usage of different controller
simulation are presented in the table. Suitable values used at that time. The time to reach goal is higher then
of these parameters are found from simulation, which simulation 4 and 5. The reason is the reduction of linear
will ensure a stable navigation of quickbot for moving velocity v in blending AOandGT G and AvoidObstacles
towards goal avoiding collision. controller which ensures the safest path to goal. The

8
output angle curve (figure 12) indicates a more stable IEEE Transactions on Control Systems Technol-
heading angle. ogy, vol. 13 (4), pp. 559-576, July 2005.
[3] E. Olson,“A Primer on Odometry and Motor
Control”, MIT, 2009.

[4] J. C. V. Oliver, “Neural Control to Simu-


late 4 Autonomous Navigation Behaviors in a
Differential-Drive Mobile Robot”, IEEE URU-
CON 2017.

[6] P.I. Ro, B.R. Lee, “Neural-fuzzy hybrid system


for mobile robot path-planning in a partially
Figure 12: Simulation 6 result: Output angle θ controlled known environment”, American Control Confer-
with PID controller ence ACC’95, 1995.
[5] K. Agarwal1, S. Mahtab, S. Bandyopadhyay, S.
D. Gupta, “A Proportional-Integral-Derivative
4 Discussion and Conclusion Control Scheme of Mobile Robotic platforms us-
While Blending ensures smoother navigation around ing MATLAB”, Journal of Electrical and Elec-
obstacles and minimizes vibration, Hard Switching is tronics Engineering (IOSR-JEEE), Vol 7(6),PP
more efficient when the obstacles get too close and goal 32-39, Sep 2013.
tracking when no obstacles are near. Instead of blend-
[7] Y. Chung, C. Park and F. Harashima, “A po-
ing or hard switching avoid, both techniques were com-
sition control differential drive wheeled mobile
bined into a hybrid model which utilizes the best con-
robot”, IEEE Transactions on Industrial Elec-
troller in their favorable conditions. Several simulations
tronics, Vol 48(4) , Aug 2001.
were carried out and it was observed that sometimes the
Quickbot was failing to avoid an collision when it was [8] H. Omrane, M. Masmoudi, “Fuzzy Logic Based
approaching a sharp corner of an obstacle. This hap- Control for Autonomous Mobile Robot Navi-
pened for the gap in front sensors and can be resolved by gation”, Computational Intelligence and Neuro-
attaching 2 more IR sensors at the front. before implant- science, vol 2016(2), pp 1-10,2016.
ing the designed algorithms on an actual robot, there are
some limitations of the simulator that has to be noted. [9] D. Katić, A. Ćosić, Ţ. Despotović, B. Milo-
The actual IR proximity sensor is influenced by ambient radović, “QuickBot as Educational and Research
lighting and other sources of interference, which is not Platform for Multi Mobile Robotic Systems”,
considered in the simulator. There may be some error MECHEDU, Vol 5, 2015.
while estimating the current position with odometry as
the wheels can slip and skid.
Further work is needed to fine tune the PID gains and
other parameters to reduce vibration. Future work
will include developing an algorithm that will allow the
Quickbot to follow the wall of an obstacle while its ap-
proaches goal instead of moving away from it. Also ex-
ploring different control approaches such as fuzzy logic
and neural network to replace PID would be an interest-
ing study.

References
[1] J. P. de la Croix, “Sim.I.am: A Robot Simula-
tor”, GRITS Lab, Georgia Institute of Technol-
ogy, 2014.
[2] K. H. Ang, G. Chong and Y. Li, ““PID con-
trol system analysis, design, and technology,” in

You might also like