Line Tracking Robot
Line Tracking Robot
Corresponding Author:
Kim Seng Chia,
Faculty of Electrical and Electronic Engineering,
Universiti Tun Hussein Onn Malaysia, 86400 Parit Raja, Batu Pahat, Malaysia.
Email: kschia@uthm.edu.my
1. INTRODUCTION
Line follower or line tracking robots have been widely implemented in various applications e.g.
delivery services, transportation systems, blind assistive, and educational [1] applications. This could be due
to its simplicity and reliability in terms of its design and performance. A line follower robot is a self-
operating robot that is designed to work on a given line. Generally, the speed and direction of a line follower
robot can be controlled using a simple logic that based on the state of sensors [2, 3]. However, this might be
less flexible due to the limited states that are available for a combination of a few sensors.
A proportional-integral-derivative (PID) controller is one of popular classical controllers in
numerous applications. One of the challenges for a PID controller is to obtain the optimal values of its
proportional, integral, and derivative parameters. Even though abundant strategies have been proposed to
automatically tune these parameters [4], e.g. Artificial Bee Colony [5]. However, these strategies are rarely to
be applied due to their complexity. Consequently, classical PID tuning methods, e.g. Ziegler Nichols rule, are
still widely applied in industries due to their robustness and simplicity [6, 7].
2. RESEARCH METHOD
2.1. Differential Wheeled Robot
An Arduino-controllable tracked robot platform (Pololu Zumo Robot), also known as a differential
wheeled robot, was used in this study. This robot consists of a Zumo shield, an Arduino UNO R3
microcontroller, two high speed (30:1 high power micro metal gear) DC brushed motors, and a reflectance
sensor array (six pairs of reflectance sensors); and is powered by four AA rechargeable batteries.
Indonesian J Elec Eng & Comp Sci, Vol. 9, No. 1, January 2018 : 221 – 226
Indonesian J Elec Eng & Comp Sci ISSN: 2502-4752 223
VL = V – ωL/2 (1)
VR = V + ωL/2 (2)
Where, VL and VR are the speeds of the left and right motors, respectively; V denotes the desired
speed; L is the axial length of the robot; and ω is the output of the P, PI, or PID controller that is used to
adjust the speeds of the DC motors. A good controller should estimate a suitable ω continuously so that the
speed of both left and right motors can be adjusted properly in such ways that the robot can follow the given
line with a minimum deviation.
Pu
Figure 2. The position of the differential wheeled robot versus the time
After that, the movement of the mobile robot was captured using a video camera. From the captured
video, the time taken for the mobile robot to complete 20 stable oscillations continuously was recorded. After
that, the ultimate period, Pu can be approximated by dividing the time taken by 20. This strategy was used to
estimate the Pu because the time taken to complete an oscillation is less than two seconds. The ultimate gain
Kc, on the other hand, is the same as the Kp that caused the consistent oscillation. The above procedure was
repeated using two different speeds of 50 cm/s and 75 cm/s.
After completing the experiment with three different speeds, the estimated P u and Ku values were
used to estimate the initial parameters of P, PI, and PID controllers for each speed using the classical Ziegler
Nichols formulae as that tabulated in Table 1.
Table 1. The formulae used to estimate the values of Kp, KI and KD for P, PI, and PID controllers using Ku
and Pu
Controller KP KI KD
P Ku ÷ 2 0 0
PI Ku ÷ 2.2 1.2KP ÷ Pu 0
PID Ku ÷ 1.7 2KP ÷ Pu KPPu ÷ 8
Table 2. The values of Ku and Pu for the mobile robot with different speeds
Speed (cm/s) Ultimate gain, Ku Ultimate period, Pu
(second)
25 0.056 1.40
50 0.060 1.25
75 0.070 1.71
Table 3. The parameters of P, PI, and PID controllers for the mobile robot with different speeds
Speed (cm/s) Controller KP KI KD
P 0.028 0 0
0.1
25 PI 0.025 0
2
0.0 0.00
PID 0.033
46 6
P 0.030 0 0
1.1
PI 0.027 0
50 08
0.6 0.16
PID 0.035
65 6
P 0.035 0 0
1.4
PI 0.032 0
75 25
0.8 0.21
PID 0.041
55 4
Table 4 tabulates the performance of the mobile robot for completing a circle of the line tracking
application when different speeds and controllers were applied. By inspection, the mobile robot that used a
proportional controller achieved the best performance among other controllers for the three different speeds.
Interestingly, the mobile robot that used the initial estimated PID controller produced the worst performance
for the three different speeds. This suggests that the Ziegler Nichols rule has successfully estimated a good
value for proportional controller only for the application. Manual optimization based on a rule of thumb or a
heuristic approach is needed to optimize the performance for PI and PID controllers.
It is worth to highlight that an integral controller is commonly used to remove an existing offset.
However, an offset might not exist in this line tracking process. In other words, adding an integral controller
could be redundant, and consequently it could degrade the performance of the mobile robot. This is possible
because an integral controller tends to slow down the response of a controller. For example, the mobile robot
that used a PI controller is only able to achieve similar or worse performance compared to that used P
controller for the thre. However, only the mobile robot that applied P and PI controllers demonstrated this
expected performance. The mobile robot that used PID for a speed of 75 cm/s, in contrast, achieved the
worse performance than that applied PID for a speed of 50 cm/s. This is because the mobile robot with the
Indonesian J Elec Eng & Comp Sci, Vol. 9, No. 1, January 2018 : 221 – 226
Indonesian J Elec Eng & Comp Sci ISSN: 2502-4752 225
speed of 75cm/s had the higher rising time and significant damping oscillations when the robot turned 90
degrees. Consequently, more time was needed to complete the given task.
Table 4. The time taken for the mobile robot to complete a cycle in the testing field
Speed (cm/s) Controller Time taken (s)
P 9.33
25 PI 9.33
PID 11.00
P 5.00
50 PI 5.33
PID 6.67
P 4.33
75 PI 4.33
PID 8.00
The main challenge of a closed-loop Ziegler Nichols tuning rule is to accurately estimate the
ultimate period, Pu and the ultimate gain Kc. Recent study uses a visual inspection based on whether the
mobile robot performed a noticeable oscillation without wild ones during line tracking [13]. However, this
approach trends to be less reliable and subjective. On the other hand, the proposed approach by means of a
video camera that records the observation can eliminate the unwanted uncertainty in estimating the P u and Kc.
Consequently, the repeatability and reproducibility of a study can be improved.
4. CONCLUSION
Findings indicate that the Ziegler-Nichols rule is a systematic approach to estimate the parameters of
P, PI, and PID controllers for the line tracking process. This can be accomplished by using the approximated
ultimate gain, Ku and ultimate period of oscillation, P u to estimate these parameters based on the Ziegler-
Nichols’ formulae. In other words, a trial-and-error tuning method to estimate the parameters of the
controllers can be avoided. Nevertheless, background knowledge is needed to identify a suitable controller to
suit particular applications. The best controller for the line tracking process was the P controller among PI
and PID controllers.
The higher the speed of a mobile robot, the higher the Kp value was required to maintain a
consistent oscillating movement. The best performance was achieved by P controllers for the three different
speeds. Findings also show that the selection of the type of controllers is crucial to achieve the best
performance. Particularly, the use of a complex controller, i.e. PID controller, did not achieve the best
performance when the estimated parameters by means of the Ziegler-Nichols rule. Thus, the selection of a
suitable controller should be made according to the nature of a given system. Besides, a simple controller,
e.g. P controller, should be considered first before more complex controllers are implemented.
ACKNOWLEDGMENTS
The author would like to acknowledge Research and Innovation Fund provided by the Office for
Research, Innovation, Commercialization and Consultancy Management (ORICC), RMC, Universiti Tun
Hussein Onn Malaysia (UTHM) for providing financial support, and Faculty of Electrical and Electronic
Engineering, UTHM for providing facilities for this study; and Mr Amir Yasser for acquiring the data needed
in this study.
REFERENCES
[1] Ibrahim, D. and Alshanableh, T. An undergraduate fuzzy logic control lab using a line following robot. Computer
Applications in Engineering Education, 2011; 19(4): 639-646.
[2] Pakdaman, M. and Sanaatiyan, M.M. Design and Implementation of Line Follower Robot. Second International
Conference on Computer and Electrical Engineering. 2009; 2: 585-590.
[3] Hasan, K.M., Al-Nahid, A., and Al Mamun, A. Implementation of autonomous line follower robot. International
Conference on Informatics, Electronics & Vision (ICIEV). 2012: 865-869.
[4] Kiam Heong, A., Chong, G., and Yun, L. PID control system analysis, design, and technology. IEEE Transactions
on Control Systems Technology, 2005; 13(4): 559-576.
[5] Elsisi, M., Soliman, M., Aboelela, M., and Mansour, W. ABC Based Design of PID Controller for Two Area Load
Frequency Control with Nonlinearities. Indonesian Journal of Electrical Engineering and Computer Science, 2015;
16(1): 58-64.
Ziegler-Nichols Based Proportional-Integral-Derivative Controller… (Kim Seng Chia)
226 ISSN:2502-4752
[6] Mallesham, G., Mishra, S., and Jha, A.N. Ziegler-Nichols based controller parameters tuning for load frequency
control in a microgrid. International Conference on Energy, Automation, and Signal (ICEAS). 2011: 1-8.
[7] Abdulameer, A., Sulaiman, M., Aras, M., and Saleem, D. Tuning Methods of PID Controller for DC Motor Speed
Control. Indonesian Journal of Electrical Engineering and Computer Science, 2016; 3(2): 343-349.
[8] Fu-hua, J. and Bao Trung, M. Building an autonomous line tracing car with PID algorithm. 10th World Congress on
Intelligent Control and Automation (WCICA). 2012: 4478-4483.
[9] Chia, K.S. and Yap, X.Y. A Portable PID Control Learning Tool by Means of a Mobile Robot. International
Journal of Online Engineering, 2016; 12(6): 54-57.
[10] Korkmaz, M., Aydogdu, O., and Dogan, H. Design and performance comparison of variable parameter nonlinear
PID controller and genetic algorithm based PID controller. International Symposium on Innovations in Intelligent
Systems and Applications (INISTA). 2012: 1-5.
[11] Kanojiya, R.G. and Meshram, P.M. Optimal tuning of PI controller for speed control of DC motor drive using
particle swarm optimization. International Conference on Advances in Power Conversion and Energy Technologies
(APCET). 2012: 1-6.
[12] Abdulameer, A., Sulaiman, M., Aras, M., and Saleem, D. GUI Based Control System Analysis using PID Controller
for Education. Indonesian Journal of Electrical Engineering and Computer Science, 2016; 3(1): 91-101.
[13] Ding, J., Li, Z., and Pan, T. Control System Teaching and Experiment Using LEGO MINDSTORMS NXT Robot.
International Journal of Information and Education Technology, 2017; 7(4): 309-313.
Indonesian J Elec Eng & Comp Sci, Vol. 9, No. 1, January 2018 : 221 – 226