100% found this document useful (1 vote)
188 views7 pages

The Effectiveness of LEGO Mindstorms NXT in Following Complicated Path Using Improved Fuzzy-PID Controller

Line follower robots are monotype mobile robot having the ability to follow a line very accurately. Though many researchers are studying regarding line follower robot but most of the concepts are concentrated on theoretical design. The performance of the conventional type of controller in controlling line follower robot is still being a popular topic to be discussed. The traditional controller cannot deal with uncertainty data such as the amount of light whether it is too high or too low light that received by the light sensor which leads to the inaccurate movement of the line follower robot. This research presents an application of improving fuzzy-PID controller method in controlling LEGO Mindstorms NXT while following the complicated path with more accurate and high velocity. LEGO Mindstorms NXT with single light sensor is used as a line follower robot to tracking the complicated black line drawn on the white surface. The investigation of existing method for line following application will help in identifying the best controller method of inspecting the pattern of line follower robot movement. At the end of the research, the movement of LEGO Mindstorms NXT robot is more accurate with high complexity of line by using improved fuzzy-PID controller. The improved fuzzy-PID controller also increases the velocity of the robot when tracking the complicated path.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
188 views7 pages

The Effectiveness of LEGO Mindstorms NXT in Following Complicated Path Using Improved Fuzzy-PID Controller

Line follower robots are monotype mobile robot having the ability to follow a line very accurately. Though many researchers are studying regarding line follower robot but most of the concepts are concentrated on theoretical design. The performance of the conventional type of controller in controlling line follower robot is still being a popular topic to be discussed. The traditional controller cannot deal with uncertainty data such as the amount of light whether it is too high or too low light that received by the light sensor which leads to the inaccurate movement of the line follower robot. This research presents an application of improving fuzzy-PID controller method in controlling LEGO Mindstorms NXT while following the complicated path with more accurate and high velocity. LEGO Mindstorms NXT with single light sensor is used as a line follower robot to tracking the complicated black line drawn on the white surface. The investigation of existing method for line following application will help in identifying the best controller method of inspecting the pattern of line follower robot movement. At the end of the research, the movement of LEGO Mindstorms NXT robot is more accurate with high complexity of line by using improved fuzzy-PID controller. The improved fuzzy-PID controller also increases the velocity of the robot when tracking the complicated path.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Volume 2, Issue 7, July 2017 International Journal of Innovative Science and Research Technology

ISSN No: - 2456 2165

The Effectiveness of LEGO Mindstorms NXT in


Following Complicated Path Using Improved
Fuzzy-PID Controller
Nurul Nadirah Mohamad Khairi Sharifah Sakinah Syed Ahmad
Department of Information Technology and Communication Department of Information Technology and Communication
University of Technical Malaysia Malacca University of Technical Malaysia Malacca
Malacca, MALAYSIA. Malacca, MALAYSIA.
[email protected] [email protected]

Abstract Line follower robots are monotype mobile robot recovery process which takes longer. So will cause the
having the ability to follow a line very accurately. Though many movement of robots are increasingly chaotic and unstable. On
researchers are studying regarding line follower robot but most other hand, Hagras [3] found that to design a robust controller
of the concepts are concentrated on theoretical design. The which can provide copacetic performance in the face of
performance of the conventional type of controller in controlling
line follower robot is still being a popular topic to be discussed.
skeptical and imprecision, fuzzy logic controller is credited
The traditional controller cannot deal with uncertainty data such with being an adequate methodology.
as the amount of light whether it is too high or too low light that
received by the light sensor which leads to the inaccurate II. BACKGROUND STUDIES
movement of the line follower robot. This research presents an
application of improving fuzzy-PID controller method in A. Comparison of Improved Fuzzy-PID and Non-Improved
controlling LEGO Mindstorms NXT while following the Fuzzy-PID
complicated path with more accurate and high velocity. LEGO
Mindstorms NXT with single light sensor is used as a line In the before technology, they were many methods used to
follower robot to tracking the complicated black line drawn on design and implement, and also different algorithms were used
the white surface. The investigation of existing method for line for line follower robot. The most common and popular line
following application will help in identifying the best controller tracing methods are simple Boolean logic, PID controller, and
method of inspecting the pattern of line follower robot fuzzy logic controller. Each line following controller
movement. At the end of the research, the movement of LEGO technique has its own advantages and disadvantages. In this
Mindstorms NXT robot is more accurate with high complexity of section, the proposed fuzzy-PID controller that is improved
line by using improved fuzzy-PID controller. The improved
fuzzy-PID is compared with non-improved fuzzy-PID. In
fuzzy-PID controller also increases the velocity of the robot when
tracking the complicated path. previous studies [2, 4, 5], the authors does not proven the
fuzzy-PID controller that their introduced will improve the
Keywords Improved Fuzzy-PID, Complicated Path, LEGO performance of the robot from aspect accuracy and velocity
Mindstorms NXT, Accurate, Velocity. while following the complicated line following. Table I show
the differences between the proposed fuzzy-PID which is
called as an improved fuzzy-PID controller and the non-
I. INTRODUCTION improved fuzzy-PID controller.
Line following is one of the most practical application as it
allow the robot to moving from one point to another to Table I. Differences of Proposed or Improved Fuzzy-PID Controller and Non-
perform tasks as previous study [1]. The situations become Improved Fuzzy-PID Controller
worst when robots need to follow the complicated and small Type of Differences
thickness of line such as thin sharp curve line. The existing Fuzzy-PID
methods to control line following robot is still being issue on Non-Improved Fuzzy logic serves to help determine
how to improve the performance of line follower robot. The Fuzzy-PID the value parameter error and the
traditional algorithm for line follower robot movement is, it previous error value changes (Derror)
will turn left when there is no line detected by the sensor and it [2].
will turn right when the line is detected by the sensor. This
algorithm is very slow and not accurate, wasting valuable time Non-Improved PID controller serves for steering
and battery power. Line follower robot algorithm using Fuzzy-PID purpose and fuzzy controller serves
conventional PID is much better than the earlier algorithm but for efficient velocity of robot [4].
the robot still will be unsteady about the line. Mas Pratama et
al. [2] stated that the disadvantages of PID control system is, if Improved PID controller serves to calculate the
given light sensor value are increasingly sensitive the response Fuzzy-PID error which then will be used to
will overshoot and undershoot. However, if the light sensor evaluate the fuzzy rule.
value is made less sensitive to the response, there will be a

IJISRT17JL91 www.ijisrt.com 155


Volume 2, Issue 7, July 2017 International Journal of Innovative Science and Research Technology

ISSN No: - 2456 2165

III. IMPLEMENTATION OF IMPROVED FUZZY- PID controller for next steps. The result of error will use for a
PID fuzzy controller rule evaluation. The result of motor power for
each control will be summed together which is used to control
In accordance with the research title, the performance of
the movement of the LEGO Mindstorms NXT robot.
line follower control system will be discussed in this research
based hybrid between PID controller methods with fuzzy logic
controller method. There will be two control methods that A. Fuzzy Logic Controller
work together in the system. As on the basis of the theory of In this section, the implementation of the fuzzy logic
control systems, there is something which is the goal, the controller which is including the fuzzification process, rule
system needs to be controlled. The purpose of the form of the base evaluation and defuzzification process is elaborated. The
set point on line follower robot is a situation where the intensity of the reflected light is sensed to provide the function
movement of the robot needs to remain accurate and faster. for tracing a path following. For simplified the system, one
light sensor is utilized. In this research, MATLAB Fuzzy
The block diagram of the proposed or improved fuzzy-PID Logic Toolbox is used to avail in fuzzy logic controller design.
controller is shown in Fig 1. Fig 1 show the block diagram of The input and output membership functions are defined and
the proposed fuzzy-PID controller. The first part of a program are related with sets of rules. The outputs of fuzzy controllers
is a fuzzy logic controller while the second part of a program control the power of two motors of the LEGO Mindstorms
is a PID controller. After reading the light sensor value, NXT robot. Fig 2 show the fuzzy logic inference system
ARM7 microcontroller executes the fuzzy logic controller and where there will be one input and to output in this research
PID controller steps in sequence. After evaluation of sensor which the input is light intensity, and the output is left motor
value in the fuzzy controller, this information will be sent to power and right motor power.

Fig 1. The Block Diagram of Improved Fuzzy-PID Controller


1) Fuzzification
The input and output membership functions are defined
and are related to sets of rules [6, 7]. The input interface
obtains the input values and maps them into suitable fuzzy sets
represented by the membership functions. This process is also
called the fuzzification [8]. To fuzzify the data deviate the
central of dark line and white ground, the membership
Fig 2. Fuzzy Logic Inference System function of input intensity of light reflected is designed.
Membership function shown in Fig 3 is used to fuzzify the

IJISRT17JL91 www.ijisrt.com 156


Volume 2, Issue 7, July 2017 International Journal of Innovative Science and Research Technology

ISSN No: - 2456 2165

value of the variable. The membership function considered


here is a Trapezoidal type which input to a fuzzy logic (6)
controller that is the light is described by two fuzzy sets that
are Black ( ) where light is black and White ( ) where light In which are the motor power of the right motor and
is white or bright. The range of light value being from 0 to 100 are the motor power of the left motor in which the
where the input of light is considered black if the range of the subscripts s represent slow and the subscripts f represent
value is between 0 to 30. While the input of light is considered fast.
white if the range of the value is between 40 to 100. The
description of these fuzzy sets is shown in Table II. Fig 3
show the membership functions for light which are described
by the general expressions below:

(1)

(2)
Fig 4. Right Motor Membership Function

Table II. Fuzzy Sets that Represent the Input


Fuzzy Set Description
The sensor value when to detecting the
black line
The sensor value when no black line is
detected

In which and are the input of the light in which the


subscripts b represent black and the subscripts w represent
white.

Fig 5. Left Motor Membership Function

2) Rule Base
There are only two rules for determining desired power to
follow the pre-defined path whether the right or left motor is
Fig 3. Input Intensity of Light Reflected Membership Function fast or slow depends on the value of light readings. In this
research, the value of light reading is between our minimum
The membership function for the aimed output of the right and maximum light readings which are in the range between 0
motor and left motor is shown in Fig 4 and Fig 5. The to 100. The value of light is an error (e) that have been
membership function is a triangular type which right motor calculated in PID controller part where error value is
(RM) and left motor (LM) speeds are described by two fuzzy calculated using the variable from the intensity light value.
sets that are Slow and Fast. The definition of these sets is The light error is considered black if the range of the value is
shown in Table III. between zero to 30. While the light error is considered white if
the range of the value is between 40 to 100. The value of the
Table III. Fuzzy Sets Defined for Output error will be used when the correction is set to the robot
Fuzzy Set Description motors. The description of the fuzzy rules is as Table IV.
Slow Speed of left or right motor is low
Fast Speed of left or right motor is high Table IV. Fuzzy Rules of Desired Power
/ Right Motor Left Motor
The membership functions for Right Motor and Left Black Slow Fast
Motor, as shown in Fig 4 and Fig 5, are described by the White Fast Slow
expressions:
(3) Because we can absorb and simplify rules into two
rules, a curve line appears on the surface viewer with the
(4) graph of desired power and the light reflected intensity which
is shown in Fig 6 and Fig 7.
(5)

IJISRT17JL91 www.ijisrt.com 157


Volume 2, Issue 7, July 2017 International Journal of Innovative Science and Research Technology

ISSN No: - 2456 2165

= (7)

Where P is proportional, is the proportional constant


value, e (t) is the error value is always going to change.
Different with the basis of the theory of PID, which the error
value obtained from:

e: error = PV SP (8)
Fig 6. Graph of Light versus Right Motor
Where SP is Setpoint, PV is the Process Variable. If converted
into the syntax of the program will be becomes:
Setpoint = 45
= 1.5
error = 69.3 45 = 24.3
P= error
P = 1.5 24.3 = 36.45

2) Integral

The basic formula of Integral controller is:


Fig 7. Graph of Light versus Left Motor
= (9)
3) Defuzzification
If the values considered in the fuzzy sets are regarding Where I was Integral, is the integral constant value, e (t)
degree variation then in the final output the fuzzy values is the value of the error, is the rate of change of time
should be converted into a crisp value by using any (second). The Integral controller cannot be used alone, so it
defuzzification method. Center of Area (COA) is the easiest must be coupled with a controller proportional. If converted
and commonly defuzzification method. As inference with into the syntax of the program will be becomes:
Matlab utility, Fig 8 is shown for rules viewer of the
membership function. As shown above words of Fig 8, while Setpoint = 45
we drag the vertical red-line of light membership function serror = 69.3 45 = 24.3
with the mouse in Matlab utility, we can get the output of the P= error
right motor and left motor. And the vertical red-line is the P = 1.5 24.3 = 36.45
output of defuzzification with COA method, as shown with I1 = error
29.1 for right motor and 67.9 for left motor when the I = I1
input of the light error that received from the PID controller is I = 24.3 0.001 = 2.403
24.3. PI = P + I
PI = 36.45 + 2.403 = 38.853

3) Derivatives
The basic formula of the controller derivatives are:

= (10)

Where D is derivatives, is a constant value of


derivatives, de (t) is the rate of change of the error, dt is the
rate of change of time (second). Likewise with Integral
Fig 8. Rules Viewer for the Membership Function controller, derivatives controller also cannot be used alone, but
also must be combined with proportional controller. If not,
then the controller Derivatives will not be able to perform any
B. PID Controller action, because there is no change in the error. If converted
1) Proportional into the syntax of the program will be becomes:
The value of light sensor reading from the fuzzy part is Setpoint = 45
used by a proportional controller to calculate the error which error = 69.3 45 = 24.3
then will be used to evaluate the fuzzy rule. The basic formula P= error
of a proportional controller is: P = 1.5 24.3 = 36.45

IJISRT17JL91 www.ijisrt.com 158


Volume 2, Issue 7, July 2017 International Journal of Innovative Science and Research Technology

ISSN No: - 2456 2165

D1 = error last_error
D1 = 69.5 69.3
D = D1
D = 0.2 15 = 3
PD = P + D
PD = 36.45 + 3 = 39.45
So if all three controllers are combined, then the syntax of the
program will be:
Setpoint = 45
error = PV SP
P= error
P = 1.5 24.3 = 36.45
I1 = error
I = I1
Fig 9. LEGO Mindstorms NXT
I = 24.3 0.001 = 2.403
D1 = error last_error
D1 = 69.5 69.3 B. Pre-Defined Path Following
D = D1 To validate the proposed control algorithm, a pre-defined
D = 0.2 15 = 3 path is constructed as represented in Fig 10. The pre-defined
last_error = error path track was constructed by pasting a 3.5 cm black tape on a
PD = P + D white chart. The length of the track is set at 914.4 cm which
PD = 36.45 + 3 = 39.45 consisting a curve line, sharp curve line, zigzag curve line and
PID = PD + I straight line make the track is complicated to follow. The path
PID = 39.45 + 2.403 = 41.583 following is developed with nine critical point lines that were
The proportional, integral and derivative outputs are used the circle with red as shown in Fig 10. There is two type of
to calculate the value of turning point which if converted into pre-defined path following that is large thickness of pre-
syntax of the program will be: defined path following and small thickness of pre-defined path
Right Motor = Turning point PID following track. Critical point line here means the line that
Right Motor = 15 41.583 = 26.583 hard to be followed by the LEGO Mindstorms NXT robot and
Left Motor = Turning Point + PID also described as a type of line that has a curve on it.
Left Motor = 15 + 41.583 = 56.583

sThis value is after that will be used to calculate the motor


power which is used to sum with the output of the Fuzzy
Cripst output. The result of the sum will be used to control the
motor power of LEGO Mindstorms NXT robot. It can be
shown pieces program syntax summation and control the
speed of rotation of the motor as follows:
Right Motor = Fuzzy Output + PID Output
Right Motor = 29.1 + 26.583 = 55.683
Left Motor = Fuzzy Output + PID Output Fig 10. Pre-Defined Path Following
Left Motor = 67.9 + 56.583 = 124.483

V. RESULTS AND DISCUSSIONS


IV. EXPERIMENTAL SETUP This section describes the analysis of the validation from
the experiment. The analysis is divided into two part where the
A. Lego Mindstorms NXT first part will discuss and analysed the findings when the
In this research, LEGO Mindstorms NXT which is LEGO Mindstorms NXT is following the large thickness of
equipped with the single light sensor and programmed with the pre-defined path using Boolean logic, PID controller,
controller method as shown in Fig 9 is used to follow a pre- fuzzy logic controller, non-improved fuzzy-PID controller and
defined path. The control algorithms are programmed on the improved fuzzy-PID controller. The second part will discuss
RobotC environment. The main component of the LEGO and analysed the findings when the LEGO Mindstorms NXT
Mindstorms NXT kit is a brick computer called NXT is following the small thickness of the pre-defined path using
Intelligent Brick. The NXT intelligent brick has two Boolean logic, PID controller, fuzzy logic controller, non-
microcontrollers which is one of the microcontrollers is use improved fuzzy-PID controller and improved fuzzy-PID
for running the main applications and other one is for controller. In this research, the different between non-
controlling the motors. Both microcontrollers are equipped improved fuzzy-PID controller and improved fuzzy-PID
controller are non-improved fuzzy-PID controller is a normal
with Flash memory so they will not lose the programs nor the
fuzzy-PID controller method that has been used by the
firmware if one removes the batteries.

IJISRT17JL91 www.ijisrt.com 159


Volume 2, Issue 7, July 2017 International Journal of Innovative Science and Research Technology

ISSN No: - 2456 2165

researcher while the improved fuzzy-PID controller is the Table VI. Summarization of Experimental Result Validation
proposed fuzzy-PID controller method that will improve the for Small Thickness of Pre-Defined Path
accuracy and velocity of the robot movement. Small Thickness (1.75 cm
Table V shows the summary of the evaluation and width of black tape)
Method
validation result from the experimental approach for the large Accuracy Time Velocity
thickness of pre-defined path. The column of accuracy and
(%) (s) (cm/s)
velocity validate the implementation of the improved fuzzy-
PID controller is successful in which for all controller methods Boolean Logic 13
evaluated, improved fuzzy-PID controller method achieve the
best result compared to other methods. The result validates PID Controller 23
that velocity of the LEGO Mindstorm NXT robot is faster
when follow the large thickness of pre-defined path. Fuzzy Logic 30
Controller
Table V. Summarization of Experimental Result Validation Non-Improved 80 35 26.13
for Large Thickness of Pre-Defined Path Fuzzy-PID
Large Thickness (3.5 cm Controller
width of black tape)
Method Improved Fuzzy- 93 25 36.58
PID Controller
Accuracy Time Velocity
(%) (s) (cm/s)
From the experimental results, only fuzzy-PID controller
Boolean Logic 20 60 15.24 method can follow all the type of line whether in large
thickness line or small thickness line. By using Boolean logic
PID Controller 47 59 15.50 method, the robot movement is very inaccurate and slow. It is
very traditional method for line follower robot and suitable for
beginner to learn about line follower robot. PID controller and
Fuzzy Logic 57 44 20.78 fuzzy logic controller method make the pattern of robot
Controller movement also inaccurate but better than Boolean logic
method from aspects of accuracy and velocity. However, by
using improved fuzzy-PID controller method, the pattern of
Non-Improved 70 37 24.71 robot movement is more accurate and faster. The significant
Fuzzy-PID improvement of the fuzzy-PID will increase the performance
of the pattern of robot movement in line following application
Controller which is being use in wide area such as transportation,
planetary exploration, surveillance, security and military
targets tracking. In this research, the advantages or the
Improved Fuzzy- 77 33 27.70 effectiveness of improved fuzzy-PID controller method has
been identified, which is the improved fuzzy-PID controller
PID Controller cover a more extensive scope of working conditions, and they
are all the more effectively adjustable in normal dialect terms.
In addition, a self-sorting out fuzzy controller can
consequently channel an underlying surmised set of fuzzy rule
Table VI shows the summary of the evaluation and and uses of improved fuzzy-PID controller enhance the quality
validation result from the experimental approach for small variable.
thickness of pre-defined path. The column of accuracy and
velocity validate the implementation of the improved Fuzzy- VI. CONCLUSION
PID controller is successful in which for all controller methods Usually, line follower robot might be able to follow the
evaluated, improved fuzzy-PID controller method achieve the narrow and simple curve line, but with sharp curve line and
best result of velocity. As shown in Table VI, only non- zigzag line, the pattern of LEGO Mindstorms NXT robot
improved fuzzy-PID controller and improved fuzzy-PID movement will be not accurate and slow. The high complexity
controller method successful finish follow the pre-defined path of line that is sharp curve line and zigzag line indeed give
where the time taken to finish tracking the small thickness of influence in robot movement. Only fuzzy-PID controller
pre-defined path for each method is 35 second and 25 second. method can tracking all type of the line whether in large or
Although non-improved fuzzy-PID controller successful finish small thicknesses of the line. At the end of the experiment,
tracking the small thickness of pre-defined path, however, zigzag line and sharp curve line is identify as the type of line
improved fuzzy-PID controller method achieve the best result that will make robot movement is not accurate, chaotic and
compared to other methods. The result also validates that slow. Although the only single light sensor is installed in
velocity of the LEGO Mindstorm NXT robot is faster when LEGO Mindstorms NXT, however, when the robot is
following the small thickness of pre-defined path compared controlled by the improved fuzzy-PID controller method, the
the large thickness of pre-defined path.

IJISRT17JL91 www.ijisrt.com 160


Volume 2, Issue 7, July 2017 International Journal of Innovative Science and Research Technology

ISSN No: - 2456 2165

robot can follow the path more accurate and faster. As a


mention earlier, although a non-improved fuzzy-PID
controller successful finish tracking the small thickness of pre-
defined path, however, improved fuzzy-PID controller method
achieve the best result which is the robot can follow all
complicated path with high accuracy and velocity.

REFERENCES
[1] Pakdaman, M.Sanaatiyan, M.M., Design and
Implementation of Line Follower Robot, Second
International Conference on Computer and Electrical
Engineering TCCEE, pp. 585 - 590, 2009.
[2] I Putu Adinata Mas Pratama, I Nengah Suweden, I.B.
Alit Swamardika, Sistem Kontrol Pergerakan Pada
Robot Line Follower Berbasis Hybrid PID-Fuzzy
Logic, Proceeding Conference on Smart-Green
Technology in Electrical and Information Systems, pp.
159 - 164, 2013.
[3] Hami Hagras, Type-2 FLCs: A New Generation of
Fuzzy Controllers, IEEE Computational Intelligence
Magazine, vol. 2, no 1, pp. 30 - 43, 2007.
[4] Pham Xuan Thuy, NguyenTang Cuong, Vision Based
Autonomous Path/Line Following of a Mobile Robot
Using a Hybrid Fuzzy PID Controller, Proceeding
Publishing House of Science and Technology, 2016.
[5] Nurul Nadirah Mohd Khairi and S. Sakinah, S. Ahmad,
A Comparison of Type-1 and Type-2 Fuzzy Logic
Controllers in Robotics: a Review, International Journal
on Numerical and Analytical Methods in Engineering
(IRENA), vol. 2, no. 5, 2014.
[6] S. Sakinah, S. Ahmad, and W. Pedrycz, Fuzzy Rule-
Based System Through Granular Computing, IEEE
International Conference on Systems, Man, and
Cybernetics, pp. 800 - 805, 2013.
[7] Sabrina Ahmad, Intan Ermahani A Jalil, S. Sakinah S.
Ahmad, An Enhancement of Software Requirements
Negotiation with Rule-based Reasoning: A Conceptual
Model, Journal of Telecommunication, Electronic and
Computer Engineering (JTEC), vol. 8, no. 10, pp. 193 -
198, 2016.
[8] S. Sakinah, S. Ahmad, Fuzzy Modeling through
Granular Computing, PhD thesis, University of Alberta,
2012.

IJISRT17JL91 www.ijisrt.com 161

You might also like