A Portable PID Control Learning Tool by Means of a Mobile Robot

—A proportional-integral-derivative (PID) controller is a classical controller that has been applied in numerous applications. One learning lesson of PID control theory is to tune its proportional, integral, and derivative parameters so that the performance of system is optimal. Besides, teaching PID control theory verbally is challenging especially when transient response characteristics e.g. overshoot, rise time, and settling time are introduced. Thus, this study investigates the feasibility of a low cost mobile robot in conveying the knowledge of PID control theory. First, an inexpensive open-source mobile robot was modified so that the position of the robot can be recorded and visualized wirelessly. Second, a graphical user interface was built to visual-ize the movement of the robot. Lastly, the PID parameters were tuned and their effects were recorded and analyzed quantitatively. Findings show that the proposed method is capable of demonstrating the effects of P and D parameters correctly.


INTRODUCTION
One effective way to teach an abstract theory to engineering learners is using laboratory experiments in which the learners could link the abstract theory to the real world after completing a given experiment in the laboratory [1]. However, this conventional approach requires expensive resources e.g. space and equipment. Remote and virtual laboratory may be an effective affordable alternative in providing educative experiences to learners [2], the learning atmosphere by means of a computer display unit may not be exciting and interesting to some learners.
In order to attract the interest of learners, innovative education tools e.g. mobile robots have been proposed and investigated in engineering education at university level. This is because hands-on experience can make the learning process more exciting [3]. For instance, a selfbalancing human transportation vehicle has been proposed as an active and inexpensive pedagogical tool that is capable of conveying feedback control theory and practice experiences to learners via various hands-on experiments [4]. Besides, a line following robot has been proposed in teaching fuzzy logic control theory that has enhanced the interest of learners [5]. This is in agreement with the findings in which more than 200 university students satisfied the use of mobile robots as teaching tools for 3 years [6]. Additionally, Chin et al. found that overall learning interest and motivation was better when robot-based learning systems were implemented, compared to a PowerPointbased learning system [7]. Mc Lurkin et al. concluded that robots are effective inexpensive tools in recruiting, retaining, and training the next generation of engineers in sci-ence, technology, engineering, and mathematics (STEM) topics after a three semesters of experiments [8].
A proportional-integral-derivative (PID) controller is one of popular classical controllers that has been applied in numerous applications e.g. temperature control [9]. One learning lesson of PID control theory is to tune its proportional, integral, and derivative parameters so that the performance of system is optimal. Teaching PID control theory verbally is challenging especially when transient response characteristics e.g. overshoot, rise time, and settling time are introduced. A better way to convey the knowledge of PID control theory and to improve the understanding of learners is worthy to be developed and investigated. Thus, this study aims to investigate the feasibility of a low mobile robot in conveying the knowledge of PID control theory. Figure 1 illustrates the demonstration field that used in this study with a continuous tracking line. The tracking line was a black line tape with a width of 1.7 cm. The background of the tracking line was a white tape with a width of 4.9 cm. The 10 bit analog reading from the IR sensors on the white and the black were zero and 800 analog values, respectively. The total length of the tracking line was 252 cm. The distance between the border and the tracking line was 8 cm. The challenge of this study was that the robot must control the direction and the speed of its motors in ways that the robot can continuously follow the given line that contains straight lines and 90 degree lines.

B. Mobile 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). The robot was powered by a 7.4 V rechargeable lithium battery. The height, width, and length of the robot are 5, 7, and 7 cm, respectively, as that illustrated in Figure 2.

C. The reflectance Sensor Array
The six reflectance infrared (IR) sensors of the reflectance sensor array was directly connected to the analog pins of the microcontroller so that the position of the robot on a given line can be estimated more precisely. The height between the IR sensors and the demonstration field SHORT PAPER A PORTABLE PID CONTROL LEARNING TOOL BY MEANS OF A MOBILE ROBOT  is 0.7 cm. The distance between each IR sensor is 1.2 cm. The distance between the IR receiver and the IR transmitter is 0.3 cm. As a result, the black line would only be partially detected by two IR sensors simultaneously when the robot is moving along the given straight line.

D. Position of the Robot
From six pairs of reflectance sensors (i.e. R 0 , R 1 , R 2 , R 3 , R 4 , and R 5 ), the position of the line tracking robot on a given line can be modelled using the following formula.
When the line was on the middle of the reflectance sensor array, the position value would be 2500, also known as the desired position. When the position of the line was approached to the left and the right of the reflectance sensor array, the position value would approach to zero and 5000, respectively.
The performance of the mobile robot was investigated on the demonstration field ( Figure 1). The aim of the PID controller in this study was to ensure the robot would follow the given black line smoothly. The disturbance was introduced when the robot reached the 90 degree corner in which its position would be instantly varied significantly from its desired position. Consequently, the robot must counter this error properly so that the robot can tracking the line continuously on the demonstration field.

E. Data Acquisition
A Bluetooth module (HC-05) was integrated with the mobile robot as a wireless transceiver for sending and receiving data to and from a laptop computer via UART communication protocol. Another Bluetooth module (HC-05) was connected to a TTL-USB module that was plugged-in the USB port of the laptop computer so that the data received from the mobile robot would be recorded for analysis. The performance of the robot was recorded wirelessly in each 15 ms.
F. Proportional, Integration, and differentiation controller Theoretically, the rise time of a system can be reduced by increasing the proportional parameter, K p ; the overshoot and the settling time can be decreased by increasing the differentiation parameter, K d , and the steady-state error can be removed using a suitable integral parameter, K i . Thus, these transient response characteristics were investigated using the line tracking mobile robot in this study with the rise time from 0% to 100%, and the settling time of ±2%.
A general PID manual tuning method was used in this study. First, K p , K i , and K d were set to zero. After that, K p was increased until the robot performed an oscillation when the robot was trying to correct back to its desired position immediately after the 90 degree corner. Next, the K p was halved, and K i was tuned to eliminate any steadystate error. Lastly, the K d was tuned until a satisfactory overshoot and settling time were achieved. Figure 3 illustrates the performance of the mobile robot that acquired wireless using the Bluetooth module for different K p values when K i = 0 and K d = 0. When the robot reached the 90 degree corner, the value of the position was less than 1000 points. In order to reach its desired position of 2500 points, the robot with a good control system should be able to return to this desired position steadily. Table 1 tabulates the transient response of the robot during K p tuning. The results show that the overshoot of the mobile robot was increased from 486 units to 1117 units when the K p value was increased from 0.15 to 0.30. However, the robot would be unstable and oscillating along the line when the K p was more than 0.25. This observation is expected because a system will response faster when higher K p is used, and a system will be unstable when its response is too fast.

SHORT PAPER A PORTABLE PID CONTROL LEARNING TOOL BY MEANS OF A MOBILE ROBOT
It is worth to highlight that the overshoot was slightly higher when K p was 0.10, compared to that was 0.15. This was because one of the motors of the robot was not moved when the error was small. Consequently, the trajectory of mobile robot would be different and more time was needed when only one of its motors was moving while another motor was stopped to correct its position back to 2500 points.
The rise time of the robot was reduced when the K p was increased. This is because the robot with higher K p has higher rate of reaction toward its feedback error. The settling time (i.e. ±2% of the desired position) of the mobile robot, on the other hand, was fluctuated when different K p was used between 0.100 and 0.225. After that, the performance of the robot was unstable due to its overreaction.
Since the robot performed a constant oscillation when K p was 0.30, K p of 0.15 (i.e. K p equals 0.30 multiplied by 0.5) was used for K d tuning. K i was set to zero because the offset was zero. Figure 4 illustrates that the overshoot and settling time of the mobile robot were gradually reduced when the K d was increased from 0.01 to 0.15. This indicates that the performance of the robot could be gradually improved by using a suitable K d value. The rise time, on the other hand, was progressively increased when the K d was increased. This demonstrates the side effect of higher K d value that causes a system responses slower. Table II tabulates the performance of the mobile robot during K d tuning when K i = 0 and K p = 0.15. When the K d was increased from 0.01 to 0.15, the overshoot and the settling time was reduced. This indicates that the robot was able to achieve its desired position faster when the K d was increased. However, the robot that used K d more than 0.15 was taking too much time to reach its desired position. Thus, the mobile robot that used K p of 0.15 and K d of 0.15 achieved the best performance with zero overshoot and a settling of 0.392 seconds in this study.

IV. CONCLUSION
This paper presents an alternative way to demonstrate the effects of K p and K d in PID tuning by means of the mobile robot. The performance of the mobile robot could be directly observed in-situ when different K p and K d values were applied. This could provide real experience to learners by observing the movement of the mobile robot when it was tracking the given line with specific K p and K d values. Besides, the results show that the effects of different K p and K d values toward the mobile robot are inline with the control theory, i.e. the higher K p value, the higher the overshoot and shorter the rise time; and the overshoot of the system can be reduced using an optimal K d value. Thus, the proposed system is promising to be an alternative in conveying the knowledge of PID control theory.
Additionally, the performance of the mobile robot could be analyzed quantitatively using the wirelessly acquired data graphically, in which, the rise time, settling time and the amount of the overshoot could be visualized and computed. However, the proposed learning tool is unable to demonstrate the effect of K i because the proposed system does not contain an offset.  In future, a lab sheet will be developed so that the designed PID learning tool by means of the mobile robot will be evaluated based on the learning performance of students.