FL Robot
FL Robot
FL Robot
Abstract - In this paper, a fuzzy logic controller is designed for a DC motor which can be used for
navigation control of mobile robots. These mobile robots can be used for agricultural, defense and
assorted social applications. The robots used in these fields can reduce manpower, save human life and
can be operated using remote control from a distant place. The developed fuzzy logic controller is used
to control navigation speed and steering angle according to the desired reference position. Differential
drive is used to control the steering angle and the speed of the robot. Two DC motors are connected
with the rear wheels of the robot. They are controlled by a fuzzy logic controller to offer accurate
steering angle and the driving speed of the robot. Its location is monitored using GPS (Global
Positioning System) on a real time basis. IR sensors in the robot detect obstacles around the robot. The
designed fuzzy logic controller has been implemented in a robot, which depicts that the robot could
avoid obstacle as well as perform its operation efficiently with remote online control.
Keywords: Differential drive, Fuzzy logic controller, GPS, IR sensors, Mobile robots.
352
K. Prema, N. Senthil Kumar and Subhransu Sekhar Dash
trained neural network to achieve the desired performance. The client system can be any PC with internet connection.
General PI and PID controllers are widely used for Fig. 2 shows the block diagram of the control system for
motor control applications. But they do not give motors. The system consists of H-bridge converter for
satisfactory results when control parameters, loading driving the separately excited DC Motor in both forward
conditions and the motor itself are changed. The fuzzy and reverse direction. The performance of DC drive will be
logic controller (FLC) can be designed without the exact based on the choice of controllers. The designed closed
model of the system. This approach of FLC design loop control has two loops. One is outer speed control loop
guarantees the stable operation even if there is a change in and another one is inner current control loop. In outer
the parameters and the motor [12-15]. speed control loop, the motor speed is sensed by a speed
In this paper, a fuzzy logic controller is designed for the sensor and fed back to the microcontroller unit. In the
online speed control of DC motors which are used for microcontroller unit the sensed speed signal is compared
navigation and steering control of remote controlled robots. with set speed. After comparison, error signal is calculated
This task is carried out by specifying a set of rules taking and this error and set speed are given as input to fuzzy
into account the different speeds of a motor. For this controller. The fuzzy controller will attempt to reduce the
purpose the input to the FLC are set speed value and the error to zero by changing duty cycle of switching signal.
error produced by the comparison of set speed and actual Similarly the actual input current of the motor is compared
speed values. The output from FLC is duty cycle of the with the reference current using a comparator. This
converter switch. Thus by controlling the duty cycle of the comparator output is multiplied with fuzzy controller
converter switch, the input supplied to the motor is output. Thus the duty cycle of switching signal is
changed and its speed is controlled. IR sensor is employed controlled to achieve the desired speed and current of the
to detect the obstacle. The sensor status is transmitted to motor [16, 17]. Initially, LabVIEW model of the DC motor
the remote client system from robot through internet. The and the H-bridge converter was developed and simulated to
status of IR sensor helps for path planning and changing verify the design and its functioning.
the direction of robot. When the IR sensor senses the obstacles the set speed of
the motors are changed by the control logic to stop its
movement towards the obstacle. If the direction given by
2. Proposed Approach the remote client is left then the set speed value of left
motor will be zero and right motor will be high and vice
Fig. 1 shows the Internet based control setup of the versa for right direction. When no obstacle is sensed the
proposed system. The Robot is treated as server system equal value of set speed is given to both the DC motors and
with internet connection and is assigned static IP address. the forward movement is achieved. Thus the steering angle
and speed control of the robot is achieved using fuzzy
controller.
A fuzzy controller was designed by using the fuzzy logic
toolbox and then the closed loop operation was simulated.
The speed control loop was simulated and the FLC was
tuned to achieve the desired performance. The designed
FLC was then implemented in a microcontroller. By using
the programmed microcontroller the robots speed and
steering angle is controlled.
dia d
ia Ra +La +Kb =Va (1)
dt dt
Fig. 2. Block Diagram of the proposed motor control system
353
Online Control of DC Motors Using Fuzzy Logic Controller for Remote Operated Robots
d2 d d
J +B =Kt ia (2) y1 =ia ; y == ;y =
dt2 dt 2 dt 3
Where On relating the outputs to the state variables we get,
J - Moment of Inertia of the motor (kg m2)
B - Friction coefficient of the motor (Nm/rad/sec) y1 = x1 ; y = x2 ; y3 = x3
2
Kt - Torque constant of the motor (Nm/A)
Kb Motor back emf constant (V/rad/sec) Therefore the output equation in the matrix form is
ia - Armature current (A)
Va - Armature voltage applied (V) y1 1 0 0 x1
Ra - Armature resistance (ohms) y2 0 1 0 x2 (7)
La - Armature inductance (mH) y3 0 0 1 x3
The state space model of the DC motor is obtained by The state Eq. (6) and the output Eq. (7) together
choosing i , and as state variables. constitute the state model of the armature controlled DC
motor. Based on the above state equations the DC motor
d
x1 =ia ;x2 == ; x3 =;u= can be simulated using LabVIEW as shown in Fig. 3.
dt
d
y1 =ia ; y == ; y3 = 3.2 H-Bridge converter
2 dt
On substituting the state variables for physical variables H-bridge is an electronic circuit that enables a voltage to
in the above equations be applied across a load in either direction. These circuits
are used in robot applications to allow DC motors to run
Ra Kb x2 u forward and backward directions. An H bridge is built with
x1 =- .x1 - + (3)
La La La four switches either solid-state or mechanical switches. The
x2 =
Kt
.x1 -
Bx2
(4) H-bridge circuit structure is shown in Fig. 4. If switch 1
J J and switch 4 are turned on means the motor will rotate in
x3 =x2 (5) forward direction, if switch 2 and switch 3 are turned on
means the motor will rotate in reverse direction. Thus by
On arranging the state equations in the matrix form switching the switches in proper sequence, we change the
direction of the motor.
Ra Kb The H-bridge converter is modeled using the following
x1 - - 0 x1 1
La La
x La equations. Mode 1 is when the switch 1 and switch 4 are
x2
0 2 + 0 (6)
Kt B
- ON and Mode 2 is when the switch 2 and switch 3 are ON.
x3 J J x3
0 1 0 0
Mode 1: (When switch 1 and switch 4 are ON)
The desired output variablesi , and are equated to
dia
standard notations y , y , y . Vs =ia Ra +La + (8)
dt
d
ia =J +B+T (9)
dt
354
K. Prema, N. Senthil Kumar and Subhransu Sekhar Dash
(s) K
The control algorithm of a process that is based on fuzzy
= (15) logic is defined as fuzzy control. The controller which uses
ia (s) JS+B
control based on fuzzy logic is called as fuzzy controller.
Similarly, when the supply voltage is kept constant, the Fuzzy logic, unlike boolean or crispy logic deals with
current gain is given by Vagueness, uncertainty, qualitativeness [18]. It tends to
mimic human thinking which is fuzzy in nature. In
ia (s) Vs (Js+B) conventional set theory, based on boolean logic a particular
= (16) object or a variable is a member of a given set then its
d(s) La s+Ra Js+B +K2
membership value is logic 1, or if it is not a member of a
So under the assumed conditions the final transfer given set then its membership value is logic 0. But in fuzzy
function of the H-bridge converter fed DC motor is set theory based on fuzzy logic, a particular object has a
calculated as in Eq. (17). degree of membership in a given set that may be anywhere
in the range of 0 to 1.
(s) KVs
= (17) In the proposed work, the robot has two DC motors that
d(s) La s+Ra ( Js+B +K2
355
Online Control of DC Motors Using Fuzzy Logic Controller for Remote Operated Robots
are connected with rear wheels. It has IR sensor to detect and right motor speed (RMS). Each input uses three
obstacles and to measure the distance between the linguistic variables like near, medium and far. Similarly
obstacles and the robot. Control logic is developed to each output uses the seven linguistic variables like VVL
decide the direction of robot movement based on the (Very very low), VL (Very low), L (Low), LL (Little low),
obstacle distance and to change the speed of the DC motors M (Medium), N (Normal), and H (High).
according to the direction decided. This control logic is The input to the navigation control fuzzy logic controller
implemented using two fuzzy logic controllers. One is used has two inputs and one output. The inputs are error value,
to decide the direction and the other one is used to control set speed and the output is duty cycle. The fuzzy input
the navigation speed of the robot by changing the motor error uses seven linguistic variables like NB (Negative big),
speed. NM (Negative medium), NS (Negative small), Z (Zero),
PS (Positive small), PM (Positive medium) and PB
5.1 Fuzzy mechanism for robot steering control and (Positive big). The set speed input also uses seven
navigation control linguistic variables like VVL (Very very low), VL (Very
low), L (Low), LL (Little low), ML (Medium low), N
The direction (obstacle avoidance) fuzzy logic controller (Normal), and H (High). The duty cycle output uses eight
has three inputs and two outputs. The inputs are left sensor linguistic variables like VVL (Very very large), VL (Very
distance (LSD), front sensor distance (FSD), right sensor large), L (Large), LL (Little large), ML (Medium large), N
distance (RSD) and the outputs are left motor speed (LMS) (Normal), S (Small) and Z (Zero). The rule tables are given
in Tables 1 and 2.
The control rules for direction fuzzy controller are
Table 1. Rule Table for Navigation Control
defined as follows:
Set speed
VVL VL L LL ML N H
Error
If (LSD is LSDi & FSD is FSDj & RSD is RSDk)
NB Z Z Z Z S N ML Then (LMS is LMSl & RMS is RMSm) (20)
NM Z Z Z S N ML LL
NS Z Z S N ML LL L Where i=1-3, j=1-3, k=1-3, l=1-3 and m=1-3 because
Z Z S N ML LL L VL
LSD, FSD, RSD, LMS and RMS have 3 membership
PS S N ML LL L VL VVL
PM N ML LL L VL VVL VVL functions each.
PB ML LL L VL VVL VVL VVL
The symbolic expression for the control rules of fuzzy
Table 2. Rule table for Steering angle control controller are defined as follows:
S.No LSD FSD RSD LMS RMS
1 Near Near Near Stop Stop If (LSD is LSD(k) & FSD is FSD(k) & RSD is RSD(k))
2 Near Near Med N VVL Then LMS is LMS(k) & RMS is RMS(k) (21)
3 Near Near Far H L
4 Near Med Near ML ML Where LSD(k), FSD(k), RSD(k) are linguistic values from
5 Near Med Med LL LL the term sets
6 Near Med Far H L
7 Near Far Near N N
8 Near Far Med N N
From expression (19) two example rules can be written
9 Near Far Far N N as
10 Med Near Near VVL N
11 Med Near Med M H If (LSD is LSD(k) & FSD is FSD(k) & RSD is RSD(k))
12 Med Near Far H L Then LMS is LMS(k)
13 Med Med Near N N And
14 Med Med Med N N
If (LSD is LSD(k) & FSD is FSD(k) & RSD is RSD(k)) (22)
15 Med Med Far N L
16 Med Far Near N N Then RMS is RMS(k)
17 Med Far Med N N
18 Med Far Far N N The meaning of the above two rules in terms of m-type
19 Far Near Near LL H implication is given as a fuzzy relation R(k) defined on LSD
20 Far Near Med LL ML x RSD x FSD x LMS x RMS.
21 Far Near Far ML LL
22 Far Med Near LL H
23 Far Med Med LL ML
For all LSD, RSD, FSD, RMS
24 Far Med Far ML L R(k) (LSD, RSD, FSD, LMS) = min(LSD(k) (dis),
25 Far Far Near N N FSD(k) (dis), RSD(k) (dis), RMS(k) (speed)) (23)
26 Far Far Med N N
27 Far Far Far N N For all LSD, RSD, FSD, LMS
356
K. Prema, N. Senthil Kumar and Subhransu Sekhar Dash
Fig.5a.Top view of Robot with developed fuzzy logic Fig. 5b. Bottom view of Robot with developed
controller fuzzy logic controller
Fig. 6. Block Diagram of the simulated PID control system for motor speed control
357
Online Control of DC Motors Using Fuzzy Logic Controller for Remote Operated Robots
Fig. 7. Block Diagram of the simulated fuzzy logic control system for motor speed control
358
K. Prema, N. Senthil Kumar and Subhransu Sekhar Dash
specifies the data location by using a familiar networking data from our DataSocket applications. In addition, the
standard, the URL. Just as a Web browser uses a URL to DataSocket Transfer Protocol connects a DataSocket
connect to a Web page, a DataSocket application uses a application to live data by specifying a connection to a
URL to connect to data. By using an industry-standard DataSocket Server. The DataSocket Server manages most
URL, we can quickly and easily bring data into or share of the networking tasks.
359
Online Control of DC Motors Using Fuzzy Logic Controller for Remote Operated Robots
360
K. Prema, N. Senthil Kumar and Subhransu Sekhar Dash
controllers. The system with the developed fuzzy controller racing teams entry in the 2007 Darpa urban
and PID controller was implemented with two 12V DC challenge, Field Robotics Research 25,2008, pp.588-
motors in a robot. 614.
The control logic of developed controllers were [4] P. Fabiani, V. Fuertes, Autonomous flight and
implemented in the embedded system and downloaded in navigation of VTOL UAVs : From autonomy demon-
to the flash memory of the microcontroller using in system strations to out-of-sight flights, Aerospace Science
programming technique. By using these controllers two and Technology 11, 2007, pp.183-193.
12V DC motors speeds are controlled to the reference [5] J.C. Latombe, Robot Motion Planning, Kluwer
speed value of 10 rpm with various loaded conditions and Academic Publishers, Boston, MA, USA, 1991.
measured values are plotted in the graph. The experimental [6] Y.K. Hwang, N. Ahuja, Gross motion planning - a
survey, ACM Computing Surveys, vol. 24, no. 3, 1992,
results produced by the PID controller are shown in Figs.
pp. 219-291.
10-12 and the results produced by the fuzzy logic
[7] Y.H. Joo, H.S. Hwang, K.B. Kim, K.B. Woo, Fuzzy
controllers are shown in Figs. 13, 14 and 15.
system modeling by fuzzy partition and GA hybrid
Based on the experimental results, the time-response schemes, Fuzzy Sets and Systems, vol.86, no. 3, 1997,
specifications of fuzzy logic controller and the PID pp. 279-288.
controller are given in Table 3. [8] T. Fraichard, P. Garnier, Fuzzy control to drive car-
like vehicles, Robotics and Autonomous Systems,
Table 3.Time-response specifications vol.24, 2001, pp.1-22.
Fuzzy logic [9] R. Huq, G.K.I. Mann, R.G. Gosine, Mobile robot
Time-response specifications PID Controller
Controller navigation using motor schema and fuzzy context
Rise time tr 7.1 Sec 10.5 Sec dependent behavior modulation, Applied Soft Com-
Peak time tp 10 Sec 14 Sec puting 8 (1) (2008) 422-436.
Maximum overshoot Mp 3.5 rpm 8 rpm
Steady state error 0 rpm 1rpm
[10] S. K. Pradhan, D. R. Parhi, A. K. Panda, Fuzzy logic
Drop in speed when loaded with Techniques for navigation of several mobile robots,
1. 50% of Load torque 0.15 rpm 1 rpm Applied Soft Computing 9(2009) 290-304.
2. 100% of Load torque 0.30 rpm 2.5 rpm [11] N. S. Kumar, V. Sadasivam, H.M.A. Sukriya , S.
Balakrishnan, Design of low cost universal artificial
neuron controller for chopper fed embedded DC
8. Conclusion drives, Applied Soft Computing, vol. 8, 2008, pp.
1637-1642.
The time-response specifications of the experimental [12] V.S.C. Raviraj, P.C. Sen, Comparative study of
results show that the fuzzy logic controller performance is proportional-integral, sliding mode, and fuzzy logic
better in respect of steady state error and settling time. The controllers for power converters, IEEE Transactions
speed regulation for various loaded conditions of PID on Industry Applications, vol.33, n. 2,1997, pp. 518-
controllers compared with fuzzy logic controller. 524.
Theexperimental results of PID controller and fuzzy logic [13] N. Senthil Kumar, V. Sadasivam, H. M. Asan
Sukriya A Comparative Study of PI, Fuzzy, and
controller confirm that the fuzzy logic controller provides
ANN Controllers for Chopper-fed DC Drive with
better dynamic response and can be used for achieving
Embedded Systems Approach, Electric Power
navigation, steering control of various robots using DC
Components and Systems, vol.36, no. 7, 2008, pp.
motors. It has been seen that by using the proposed fuzzy 680-695.
logic controller and online control technique the robot is [14] R.W. Erickson, Fundamentals of Power Electronics,
able to avoid any obstacles, escape from dead ends and Chapman & Hall, 1997.
travel in the planned direction. [15] N. Senthil Kumar, V. Sadasivam, K. Prema, Design
and Simulation of Fuzzy Controller for closed loop
control of chopper fed embedded DC drives,
References International Conference on POWER SYSTEM
TECHNOLOGY - POWERCON2004, Singapore, 21-
[1] D. M. Helmick, S. I. Roumeliotis, Slip-compensated 24 November, 2004.
path following for planetary exploration rovers, [16] P.T. Krein, Elements of Power Electronics, Oxford
Advanced Robotics, Vol.20, no.11, 2006, pp. 1257- University Press, 2001.
1280. [17] M.H. Rashid, Power Electronics Circuits, Devices
[2] C. Kunz, C. Murphy, Deep sea underwater robotic and Applications, 2nd ed., Prentice-Hall, 1993.
exploration in the ice covered Arctic Ocean with [18] Timothy J. Ross, Fuzzy Logic with Engineering
AUVs, IEEE/RSJ International Conference on Applications, John wiley & sons Ltd, 2010.
INTELLIGENT ROBOTS AND SYSTEMS, 2008. [19] NI documentationand help files
[3] J. Bohren, T. Foote, Little Ben: the Ben Franklin
361
Online Control of DC Motors Using Fuzzy Logic Controller for Remote Operated Robots
362