You are on page 1of 13

Journal of the Brazilian Society of Mechanical Sciences and Engineering (2020) 42:561

https://doi.org/10.1007/s40430-020-02645-3

TECHNICAL PAPER

Sliding mode control of a line following robot


Huseyin Yildiz1 · Nuray Korkmaz Can2 · Omur Can Ozguney2 · Nurkan Yagiz2

Received: 17 June 2020 / Accepted: 25 September 2020


© The Brazilian Society of Mechanical Sciences and Engineering 2020

Abstract
Line following robots have ability to track a given path autonomously using feedback mechanisms. The path is usually a
black line on a white surface or a white line on a black surface. Today, line following robots are used in medical, industrial
and automotive industries. Therefore, the studies on the line following robots have been increased recently. In this study, a
robust, non-chattering sliding mode control (SMC) is designed and applied for a line following robot. The mobile robot is
designed to sense the straight or curved path with its infrared sensors mounted on the robot. Therefore, these infrared sensors
provide continuous streaming of the defined path to guide or direct changes in robot by activating motors on right wheel or/
and left wheel. The control strategy is curial to track complex paths accurately and to have a fast, stable and accurate line
following robot. Thus, for comparison, conventional proportional-integral-derivative (PID) is also applied to robot. The
main purpose of this study is to investigate performance of sliding mode control during path tracking. For this, numerical
solution and experimental study were carried out. From the results, it was understood that sliding mode controller is highly
efficient in tracking the path.

Keywords Line following robot · Sliding mode control · PID control · Experimental study

1 Introduction health care management system for decreasing the cost of


health care and providing continuous monitoring of the
Line following robots have been used frequently in medical, patients. Illias et al. [2] constructed a mobile robot which
educational, industrial and entertainment fields in recent follows the nurse, carry load and medical equipment during
years. Punetha et al. [1] designed a line following robot- daily routines of nurses. Since hospital nurses bring instru-
based health care management system. Their line following ments, medicines or meals using cart, this can be tiresome
robot carried medicines to the patients via following the for nurses. Thus, their research focused on development of
line drawn on the floor whenever they pressed the switch. hardware and sensor integration for nurse following robot. It
Their aim is to develop a safe, efficient and patient-centred was found that the proposed robot was suitable for hospital
daily usage. Since robotics is very popular in education at
all levels recently Makrodimitris et al. [3] developed an
Technical Editor: Adriano Almeida Gonçalves Siqueira. interactive game for children over seven years with a semi-
autonomous color line following mobile robots. Hence,
* Omur Can Ozguney the children can learn new technologies and its applica-
omur.ozguney@istanbul.edu.tr
tions with efficient and entertaining methods. The results
Huseyin Yildiz of their study shown that the developed game with color
huseyin.yildiz@istanbul.edu.tr
line was very reliable and the robot cost was reasonable
Nuray Korkmaz Can as well. Other application of the line following robots is
nkorkmaz@istanbul.edu.tr
automated equipment carriers in industrial facilities. Kai-
Nurkan Yagiz ser et al. [4] designed an autonomous robot that manages
nurkany@istanbul.edu.tr
the products from the production stage to the storage pro-
1
Department of Mechanical and Metal Technologies, Istanbul cess. The developed robot has the task of defining a path
University, Cerrahpasa, Istanbul 34500, Turkey for blind people working in the office. By adding a hand
2
Department of Mechanical Engineering, Istanbul University, and object detector to the robot, it is aimed to reach places
Cerrahpasa, Istanbul 34320, Turkey

13
Vol.:(0123456789)
561 Page 2 of 13 Journal of the Brazilian Society of Mechanical Sciences and Engineering (2020) 42:561

that cannot be reached by human hands. They tried to detect tracking control for wheeled mobile robots in the presence
moving objects using a motion sensor. One of the popular of unknown external disturbances and inertia uncertainties.
applications of line follower robots is autonomous vehi- The simulation results illustrated that the proposed control
cles. Febtriko and Yulianti [5] suggested a bus transporta- strategy was effective to track the reference trajectory. Yet,
tion system for Pekanbaru with a line follower robot as a there are no experimental results in their studies. Korayem
trans-metro simulation bus which works with photodiode et al. [13] investigated the performance of optimal control
sensors and ultrasonic sensors. Therefore, the robot stops for mobile robots in the presence of multiple obstacles. The
automatically at every stop or place and is monitored with simulation and experiment results indicated that the sug-
the global positioning system (GPS). Line following robots gested method was feasible for these robots.
are also very popular to use in shopping malls, museums, Sliding mode control was first introduced in the late
etc. for navigating people certain locations with minimum 1950’s in the Soviet Union. Yet, the method was not well
effort. One of the applications of the line follower robot is known in the western literature until 1970’s due to linguistic
store and retrieve systems. Ali and Rashid [6] performed difficulties. After 1970’s, sliding mode control found many
simulations for object store systems with circular path and application areas. The method is successfully applied to
modified circular path. N-ary tree and digital algorithm automatic flight control, control of electric motors, chemical
were used to reduce the rabble occurs on the line follower processes control, helicopter stability augmentation systems,
system during movement. Simulation results were shown space systems and robot manipulators.
that there was significant progress in the length of the path The idea of the method is to drive and constrain the
and arrival time. system state to lie within a neighbourhood of a switch-
Controllers are commonly used to get a better tracking ing function. This approach has two main advantages.
performance on robots. Oktarina et al. [7] designed a line First, the dynamic behaviour of the system may be tai-
follower robot for throwing away trash in the shopping lored by the choice of the switching function. Second,
centres. They used PID controller to adjust the movement the closed loop response becomes totally insensitive to
of the robot. They found that P value is effective to move a particular class of uncertainty. Utkin [14] investigated
more stable. Pakdaman and Sanaatiyan [8] designed line the properties of sliding modes on their studies in the
follower robot for a competition. They used eight infra- late 1970’s. Early works about sliding mode control are
red sensors on the robot to track the curve and cycle path given in Utkin [15]. The main disadvantage of using
accurately. Yet, they didn’t apply any control strategies for SMC in practical implementations is chattering problem
their model. The robot direction was changed by driver due which is caused by unmodelled dynamics, switching gain
to receive data from sensors. Roy and Noel [9] presented value and discontinuous sign function in classical slid-
three different control strategies (neural network, learning ing model control [16]. Many methods have been pro-
vector quantization and reinforcement learning) for line posed to reduce or remove the chattering problem such
following robot to follow tight curves at high speeds. The as a boundary layer method [17], disturbance observer
developed robot shows high performance in reducing vibra- [18], filtering of control signal [19], terminal sliding
tions during motion. Also, low energy consumption and mode control [20] and others. Suryawanshi et al. [21]
low cost are its advantages. They designed a benchmark suggested boundary layer control to overcome the chat-
path to compare the effectiveness of pure adaptive neural tering problem. In their method, the control is continuous
network and proposed hybrid control. When the results are inside the boundary layer by switching to uncertainty and
examined, the role of the developed hybrid controller in disturbance estimator (UDE) and control is discontinuous
vibration reduction can be clearly seen. Engin and Engin outside the boundary layer. The saturation function was
[10] designed a line follower wheeled mobile robot with used inside the boundary layer at conventional SMC. Yet,
PID controller algorithm. They proposed PID controller in proposed control scheme, the saturation function was
to increase the navigation accuracy of the line follower substituted with a first- or second-order UDE with filter
mobile robot. They were suggested from the experimental time constant. Therefore, the value of filter time constant
results that, the proposed control strategy can successfully and order of filter affected the accuracy of estimation
track the straight line and circular path, sharp-turn line and directly [21]. While adding a boundary layer in classical
S-shape line tracking. Elayaraja and Ramabalan [11] have SMC to the chattering problem it reduces the controller’s
studied on a fuzzy logic controller and regression method performance and may cause to a residual tracking error
to find optimum design parameters for a line following [19]. The proposed terminal sliding mode control mod-
robot with minimum path completion time. Zai and Song els [20, 22] in literature achieve good performance. Yet,
[12] were proposed an adaptive sliding mode trajectory terminal sliding mode control has the singularity problem

13
Journal of the Brazilian Society of Mechanical Sciences and Engineering (2020) 42:561 Page 3 of 13 561

[23]. In order to overcome uncertainties on their system, where x, f(x), [B], u represent states, nonlinear terms, con-
Bessa et al. [24] suggested the combination of sliding trol matrix and control inputs. The aim of the controller is
mode control and an adaptive neural network to compen- to control the variable x under the system uncertainties and
sate hydrodynamic effects due to fluid–body interaction. hold the system on a sliding surface S. In order to obtain a
However, their main problem is ineffectiveness to obtain stable solution of the system, it must stay on this surface as
the bounds of the estimation error [25]. shown in Fig. 1.
Sliding mode controller proposed in this study provides The surface is described as:
an effective control on linear and nonlinear systems in the
presence of parameter uncertainties and unmodelled dynam-
S = {x− ∶ 𝜎− (x, t) = 0} (2)
ics. This control approach is based on converting nth-order The sliding surface equation for a control system can be
tracking problem into first-order stability problem. Moreo- selected as follows:
ver, sliding modes can be applied on unstable systems.
Since the method is based on Lyapunov’s direct method 𝜎 = [G] Δx = [G](xref − x) = [G]e (3)
(also called as the second method of Lyapunov), the stabil-
Δx is the difference between the reference value and the
ity of the system is guaranteed. Therefore, the controlled
system response which results in error vector e. [G] is the
system always becomes stable ever if they were not. The
matrix which represents the sliding surface slopes. This
controller forces the system to converge towards sliding
equation can be rearranged as follows:
surface by moving on different paces of trajectories while
states go zero. The major disadvantage could be the chat- 𝜎 = [G] xr −[G]x
tering problem which is a harmful to, especially mechani- ⏟⏟⏟ (4)
cal components of the engineering systems [16]. However, 𝜑(t)

the chattering problem is completely solved with enhanced


or
approaches in this paper.
This study aims to investigate the performance of a line 𝜎 = 𝜑(t) − [G]x (5)
following robot with SMC and traditional PID controller.
Since the usage of line following robots are increasing and For stability, the following Lyapunov function candidate has
used in factories and hospitals, it is crucial to enhance effi- to be positive definite and its derivative has to be negative
cient tracking performance. It was performed numerical and semi-definite:
experimental trials with a line following which was designed
( ) 𝜎T 𝜎
to recognize the path with nine infrared sensors. These sen- 𝜈 𝜎 = >0 (6)
sors obtained continuous streaming of the errors and motors 2
on the left and right wheel are changing direction to guide
the defined path. Due to unknown mechanical characteristics
of the robots such as friction on wheel and other parts of
the robot, the modelling and controlling of a line follower
robot might become complicated. Therefore, the robust non-
chattering SMC was preferred and compared with PID con-
troller. The parameters of both PID and SMC controller were
determined numerically. The experimental and numerical
results have been used to evaluate the effectiveness of the
controllers and discussed at the end.

2 Non‑chattering sliding mode controller


design

A controlled nonlinear dynamic system is described by the


following state space form:
ẋ = f (x) + [B] u (1)
Fig. 1  Phase plane of the state variables

13
561 Page 4 of 13 Journal of the Brazilian Society of Mechanical Sciences and Engineering (2020) 42:561

( )
≤0
d𝜈 𝜎 𝜎̇ T 𝜎 𝜎 T 𝜎̇
= + (7)
dt 2 2
If the limit condition is applied:
( )
d𝜈 𝜎
=0 (8)
dt
Since σ cannot be zero, than dσ/dt = 0,

d𝜎 d 𝜑(t)
= − [G]ẋ = 0 (9)
dt dt
From Eq. (1), Fig. 2  Time history of σ

d𝜑
− [G] (f (x) + [B] ueq ) = 0 (10)
dt
𝜎(t) = e−[𝛤 ] t + 𝜎(0) (15)
ueq is the controller input of the limit case and from Eq. (8),
( )
d 𝜑(t) As a result, non-chattering action is reached since it
(11)
−1
ueq = [G B] − [G] f (x)
dt does not contain sign term in Eq. (12) and satisfies condi-
tions of Lyapunov stability criteria. [Γ] is selected during
The classical sliding mode control theory suffers of two application.
problems: Then defining;
(1) The discontinuity in the control signal because of the
sign term in derivative of selected Lyapunov function: [K] = [GB]−1 [𝛤 ] (16)

v̇ = −𝜎 T [𝛤 ]sign 𝜎 ≤ 0 The control input vector is obtained:


( )
(12)
u = ueq + [K] 𝜎 (17)
[Γ] is a positive matrix. But in this classical sliding mode
control theory there becomes chattering because of the Second, the solution of poor system knowledge failure is
on–off action of the sign term which harms the mechanical presented below:If the knowledge of f(x) vector and [B]
components seriously.(2) If the system knowledge is poor, matrix is very poor, then the equivalent calculated control
that means the knowledge of f(x) vector and [B] matrix is inputs will be too far off from the actual equivalent con-
poor, then the equivalent calculated control inputs u­ eq in trol inputs. Therefore, in this study, it is suggested that the
Eq. (11) will be too far off from the actual equivalent control equivalent control is the average of the total control. The
inputs resulting in unsatisfactory control performance. design of an averaging filter for estimation of the equivalent
Two new approaches have been improved for solving control is suggested:
these two problems:
First, the solution to the chattering problem is presented û eq =
1
u (18)
below: 𝜏s + 1
The derivative of a new Lyapunov function is chosen as This is actually a low-pass filter. The value of 1/τ gives
follows: the cut-off frequency. The logic behind the designing a
v̇ = −𝜎 T [𝛤 ]𝜎 < 0 (13) low-pass filter is that low frequencies determine the char-
acteristics of the signal and high frequencies come from
Equating, Eq. (7) and Eq. (13): unmodelled dynamics. Note that there is no need for system
knowledge of f(x) and [B] in this new solution. Then, the
𝜎̇ + [𝛤 ]𝜎 = 0 (14) control action becomes:
[Γ] decides the velocity of approach to sliding surface. Solv- u = û eq + [K] 𝜎 (19)
ing the Eq. (14) (Fig. 2):

13
Journal of the Brazilian Society of Mechanical Sciences and Engineering (2020) 42:561 Page 5 of 13 561

where ûeq is as defined in Eq. (18). m). The range of error was between − 8 and 8. If the error is
On the other hand, the conventional PID control is one of − 8 or 8, it means that the last sensor of the right or left side
the traditional control method that is still used today. There of the robot can detect the line. Two motors were used at
are several studies on this subject. Pati and Kala [26] pre- the rear of the line following robot to take corrective action
sented robot following based on computer and PID control based on the error signal. Therefore, pulse width modulated
for a different wheel robots. They designed two robots. One (PWM) signals were provided to control the motors and the
of this is designed for working as a master and the other one right or left wheel was span to move the robot forward or
is working as a follower. They applied PID controller for fol- to change the direction of the robot. Power input was made
lower robot. From the experimental results, they understood with 11.1 V 2100 mAh lipo battery. DC to DC step down
that the follower robot with PID controller could follow the converter was used to adjust the voltage (Fig. 3).
master robot with minimum tracking error. Singh and Chou- On the other hand, before starting experiment, the math-
han [27] designed a new, simple control methodology for ematical model is derived and simulated on computer using
differential drive line following robot. The method contains the model in Fig. 4. The mathematical model of the line
of a single PID controller to follow the line with constant following robot is shown in equations below, and the experi-
linear velocity. They presented simulation and experimental mental line following robot was run afterwards. The param-
results. eters used in simulation, the list of electronic components
The main purpose of the PID control is to minimize the
error between the desired and actual state. Theoretically, the
reduction of the error is achieved by the proportional, deriv-
ative and integral controllers present in the control structure.
[ ]

Ti ∫
1 de(t)
u(t) = K e(t) + e(t)dt + Td (20)
dt

The transfer function of the PID controller is shown in


Eq. (20). u(t); control input, e; term of the error, K; propor-
tional gain, Ti; proportional time constant, Td; derivative
time constant.

3 Experimental set‑up and mathematical


model

Arduino Mega is used as a microcontroller. Nine infrared


sensors mounted in front of the robot were used to get the
current deviation of line follower robot from the centre of
the black path (distance between each sensor 10.16 × 10−3 Fig. 4  Robot model

Fig. 3  Line following robot and


trajectory

13
561 Page 6 of 13 Journal of the Brazilian Society of Mechanical Sciences and Engineering (2020) 42:561

and Arduino connection pins are given in the “Appendices long, 2.45 m wide white ground. The path which the robot
A1 and A2”. must follow is designed to be 2.5 × 10−2 m width, black and
Iz is the total inertia, α is the angle between vertical global consists of 6 sections. Different path profiles were used to
y axis and the direction of robot displacement p, whereas examine the movement of the robot in each section as shown
­mt is the total mass of the robot. The angular speed of α is in Fig. 5.
given below in terms of angular speeds of wheels, θ1 and θ2,
respectively [28].
r ̇ 5 The numerical and experimental results
𝛼̇ = (𝜃 − 𝜃̇ 2 ) (21)
2L 1
The purpose of the study is that the robot tracks the desired
L is the between wheels, r is the radius of each wheel. The path with minimum trajectory error. For this, SMC and
speed of the robot is obtained by: PID control for comparison have been applied. The opti-
r ̇ mum parameter values of the sliding mode controller were
ṗ = (𝜃 + 𝜃̇ 2 ) (22) found by numerical solution. PID control parameters are also
2 1
obtained during numerical solution using the Ziegler–Nich-
Using the Lagrange equations and performing necessary ols method. They are given in “Appendix A1”.
manipulations, robot dynamic model is presented; In Fig. 6, the trajectory tracking errors of PID and SMC
[ ][ ̈ ] [ ][ ̇ ] [ ] controllers are presented. For both controllers, experimental
I11 I12 𝜃1 b1 0 𝜃1 𝜏1
+ = (23) and simulation results are shown at the same graph. When
I21 I22 𝜃̈2 0 b2 𝜃̇ 2 𝜏2 the figures are examined, it is seen that simulation and
experimental results give similar responses. It also appears
τ1 and τ2 are the control torques resulting of tractive effort from figures that the SMC controller performs better both
acting on left and right wheels, respectively. Their expres- in simulation and experiment.
sions in terms of control voltages, inertia matrix elements In simulation code, both engine models are the same,
­Iij and rotational viscous friction matrix elements ­bi are pre- there is no speed difference between the two wheels. For
sented in “Appendices A1 and A3”. this reason, when simulation starts, the robot moves on
straight line (Section 1–2) without any mistakes. However,
in experiment, since noise occurs during motor control, there
4 Path design are minor differences in the motors. This situation causes
small wobbles on robot during the straight line.
Both SMC and PID control parameters are obtained in In simulation, the sensors read data over the picture. It is
computer environment and then applied to robot for test not exposed to light changes and reflections. In fact, IR sen-
laboratory. The actual experimental path consists of 2.45 m sors are affected by neighbouring sensors due to reflection.

Fig. 5  Path design

13
Journal of the Brazilian Society of Mechanical Sciences and Engineering (2020) 42:561 Page 7 of 13 561

Fig. 6  Trajectory tracking errors


of SMC and PID

This situation causes delays in the perception of the lines. As except for Section 5–6 (Table 1). In Section 5–6, the results
a result, small time shifts occur between simulation studies of the two controllers are very close to each other. It is clear;
and experimental studies. Since SMC controller produces however, that the SMC controller is again better. Accord-
fast responses compared to PID Controller, the simulation ing to experimental data, the SMC controller consumes less
and experimental data with SMC are close to each other as energy than the PID controller and finishes the trajectory
shown in Fig. 6. more quickly (Table 2). Throughout the whole path, the
In Fig. 7, the experimental results of trajectory tracking SMC controller has %30 less total error than PID using the
errors of SMC and PID are shown. Each different sections equations.
in trajectory is determined by the section lines. Thus, the ti+1
behaviour of the controllers is clearly investigated. It is
Δti ∫
1
understood from the error values that the SMC controller is Average Section 𝐄𝐑𝐑𝐎𝐑 = |e|dt (24)
more successful in trajectory tracking in experimental path. ti
It is also seen that the SMC controller gives faster reactions,
adapts to changing conditions faster and stabilizes the error 5
ti+1
1 ∑
Δt i=1 ∫
in a shorter time. It must also emphasize that SMC con- Average Total 𝐄𝐑𝐑𝐎𝐑 = |e|dt (25)
trolled robot completes the track in 29.5 s, whereas PID one
t1
completes the track in 32.7 s experimentally.
When each section is examined separately, the SMC con- In Fig. 8, the controller voltages and total power used by
troller gives much better results than PID in each section PID and SMC controllers are presented for experimental

13
561 Page 8 of 13 Journal of the Brazilian Society of Mechanical Sciences and Engineering (2020) 42:561

Fig. 7  Experimental trajectory


tracking errors of SMC and PID

Table 1  Experimental Section 1–2 Section 2–3 Section 3–4 Section 4–5 Section 5–6
performance of controllers
Time elapsed (s)
SMC 2.8575 4.6275 7.3425 5.0925 9.5550
PID 3.1350 5.1600 8.2425 5.6175 10.5150
Average sectional error (m)
SMC 0.960 × 10−4 2.688 × 10−4 6.113 × 10−4 4.287 × 10−4 6.964 × 10−4
PID 2.892 × 10−4 8.705 × 10−4 6.938 × 10−4 6.715 × 10−4 6.433 × 10−4
Energy consumed (J)
SMC 0.0010 0.0018 0.0030 0.0019 0.0038
PID 0.0012 0.0020 0.0035 0.0024 0.0044

Table 2  Experimental performance of controllers throughout the total SMC controller needs lower voltages both in sharp turns and
trajectory straight lines on the path. Moreover, it seems that the sliding
Time(s) Average total error (m) Energy mode controller is more stable and requires lower voltage
consumed values than PID controller during the entire path.
(J) The visual experimental results of the tracking perfor-
SMC 29.4750 5.032 × 10−4 0.0116 mance of two controllers are presented in Fig. 9. Although
PID 32.6700 6.622 × 10−4 0.0135 SMC responds faster and provides better tracking perfor-
mance than PID controller in sharp turns, both SMC and
PID controllers are successful on the road with low distur-
bance. Yet, it is seen that the SMC controller is more effec-
and numerical results. It shows that the PID controller is tive on the road with dashed lines (Section 2–3) consumes
trying to track the trajectory by generating higher control less energy and finishes the track at a considerably shorter
voltages even on the straight line. It is understood that the time. Note that robot with SMC completes the track in

13
Journal of the Brazilian Society of Mechanical Sciences and Engineering (2020) 42:561 Page 9 of 13 561

Fig. 8  Controller voltages and


the power consumed

29.5 s, whereas the PID controlled robot barely completes 0.060 m long tracking line part has been cut and removed
the track in 32.7 s. ahead having 0.075 m offset. Then, the tracking perfor-
In order to visualize the robust behaviour of the sliding mances of SMC and PID controlled robots have been
mode controlled robot, for different robot mass values, the checked experimentally as presented in Fig. 12 and their
numerical solution of the tracking performance of the line error history is in Fig. 13.
following robot is presented in Fig. 10. There is no sig- As tabulated on Fig. 13, the average total error of SMC
nificant performance change for SMC controlled robot as controlled robot after a faulted line test is much less than
expected. the one of PID.
On the other hand, the tracking performance of the SMC
and PID controlled robot models has been simulated on a
harder trajectory and presented in Fig. 11. As observed in 6 Conclusion
Fig., the SMC controlled robot has a much superior tracking
performance than the PID one. The purpose of this study is to design a successful controller
As a last test, a tracking line fault has been produced at for line following robots. Therefore, the non-chattering slid-
the beginning of the track Section 1–2. At the beginning, ing mode controller was designed and compared with PID

13
561 Page 10 of 13 Journal of the Brazilian Society of Mechanical Sciences and Engineering (2020) 42:561

Fig. 9  Experimental results of the tracking performance Fig. 10  Tracking performance of SMC controlled robot for different
mass values

one. A complicated test path was used for this purpose. The errors of them. When the experimental data are examined, it
test path consists of five sections having different tracking is observed that the SMC controller recovers the robot faster
difficulties. in sharp turns. It is also understood that it has less trajectory
Two different controllers are applied to robot. First, PID tracking errors in the dashed line section on which it is hard
controller, which is one of the commonly used control meth- to follow. It is generally deduced that the SMC controller is
ods in industry is designed for comparison. Then, SMC and much more successful than PID controller in terms of track-
PID parameters were obtained in numerical analysis before ing performance. Moreover, it is also seen that the SMC con-
experimental tests. troller is consuming less energy and finishes the trajectory
Both computer simulation and experimental study were more quickly than PID one. As a result, SMC finishes the
presented in figures together with the trajectory tracking track % 10.83 faster, produces error % 31.60 lower, consumes

Fig. 11  Tracking performance


of SMC and PID controlled
robots on an alternative test
trajectory

13
Journal of the Brazilian Society of Mechanical Sciences and Engineering (2020) 42:561 Page 11 of 13 561

Fig. 12  Experimental tracking


performance of SMC and PID
controlled robots after a faulted
start line

Fig. 13  Experimental tracking


errors and average total errors
of SMC and PID controlled
robots after a faulted start line

energy % 16.38 less on the track. Afterwards, the robust-


ness of the SMC controlled robot has been tested for differ-
ent robot masses resulting in expected success. Then, SMC
and PID controlled robots have been run on a harder track
resulting in superior performance of SMC one. Then, experi-
mentally SMC and PID controlled robots have been started
on a faulted track line, and it has been verified that SMC
controlled robot finishes the track having very low average
tracking error compared with the other controller. Finally, it
has been concluded that non-chattering SMC controlled line
following robot proposed in this study has a very satisfactory
tracking performance under all hard working conditions.

Appendices

A1

Fig. 14  Electronic and mechanical parts of the robot See Table 3.

13
561 Page 12 of 13 Journal of the Brazilian Society of Mechanical Sciences and Engineering (2020) 42:561

Table 3  Robot, SMC and PID parameters Table 5  Arduino pin connections

mt 0.6 kg Total mass Arduino pins Components


Iz 1.3853 × 10−3 ­kgm2 Total inertia A0 Sensor 1
b1,b2 0.0011 N.m.s/rad Rotational viscous friction
A1 Sensor 2
r 0.0295 m Radius of the wheel
A2 Sensor 3
L 0.1276 m Distance between wheels
A3 Sensor 4
τmax 0.0387 N.m Maximum torque
A4 Sensor 5
K 23.4 Proportionality constant
A5 Sensor 6
Ti 79.7954 s Integral time constant
A6 Sensor 7
Td 0.002 s Derivative time constant
A7 Sensor 8
Γi 75 SMC coefficient
A8 Sensor 9
τi 1.5 s SMC time constant
A14 Sensor 10 (side face)
A15 Sensor 11 (side face)
D06 Left engine forward
D09 Left engine back
D10 Right engine forward
A2: Electronic and mechanical part list
D11 Right engine back
D00 (Rx) Serial communication transmitter
See Tables 4 and 5.
D01 (TX) Serial communication transmitter

A3

Table 4  The materials list of line following robot (Fig. 14) Coefficients of mass matrix:
( 2 )
Number Materials name Iz r mt r2
I11 = I22 = +
1 Lipo battery L2 4
2 Body
3 Left motor holder
( )
mt r2 Iz r2
4 O-Ring I12 = I21 = − 2
4 L
5 Left DC motor
6 Arduino Mega Electrical equations of motors [29]:
7 Right motor holder
8 Right DC motor
din (t)
Vn (t) = Rn in (t) + Ln + Kn wn (t) n = 1, 2.
9 Wheel body dt
10 Line following module (2 Sensors) 𝜏n (t) = Kn wn (t)
11 1.5 × 10−2 m metal ball en (t) = Kn In (t)
12 5 × 10−3 m metal ball Pin
n (t) = Vn In (t)
13 Free wheel body
Pout
n (t) = 𝜏n wn (t)
14 Line following module (9 sensors)
15 3 × 10−2 m upgrade part Where,
16 L298N motor driver
Vn Input voltage;
In Armature current;

13
Journal of the Brazilian Society of Mechanical Sciences and Engineering (2020) 42:561 Page 13 of 13 561

Rn Armature resistance; 14. Utkin VI (1977) Variable structure systems with sliding
Ln Armature inductance; modes. IEEE Trans Automat Contr 22(2):212–222. https​://doi.
org/10.1109/TAC.1977.11014​46
Kn EMF constant; 15. Utkin VI (1992) Sliding modes in control and optimization.
θ An angular displacement of rotor; Springer, New York
𝜏1 , 𝜏2 Motor torque; 16. Balamurugan S, Venkatesh P, Varatharajan M (2017) Fuzzy
en Back electromotive force (EMF); sliding-mode control with low pass filter to reduce chattering
effect: an experimental validation on Quanser SRIP. Sādhanā
Pin
n Input power; 42:1693–1703. https​://doi.org/10.1007/s1204​6-017-0722-9
Pout
n Output power 17. Burton A, Zinober ASI (1986) Continuous approximation of
variable structure control. Int J Syst Sci 17(6):875–885. https​
://doi.org/10.1080/00207​72860​89268​53
18. Yang J, Li S, Yu X (2013) Sliding-mode control for systems
with mismatched uncertainties via a disturbance observer. IEEE
Trans Ind Electron 60(1):160–169. https​: //doi.org/10.1109/
References TIE.2012.21838​41
19. Tseng M-L, Chen M-S (2010) Chattering reduction of sliding
1. Punetha D, Kumar N, Mehta V (2013) Development and applica- mode control by low-pass filtering the control signal. Asian J
tions of line following robot based health care management sys- Control 12(3):392–398. https​://doi.org/10.1002/asjc.195
tem. Int J Adv Res Comput Eng Technol 2(8):2446–2450 20. Abidi K, Xu J, She J (2009) A discrete-time terminal sliding-
2. Ilias B, Nagarajan R, Murugappan M, Helmy K, Awang Omar AS, mode control approach applied to a motion control problem. IEEE
Abdul Rahman MA (2014) Hospital nurse following robot: hard- Trans Ind Electron 56(9):3619–3627. https​://doi.org/10.1109/
ware development and sensor integration. Int J Med Eng Inform TIE.2008.20102​03
6(1):1–13. https​://doi.org/10.1504/ijmei​.2014.05852​1 21. Suryawanshi PV, Shendge PD, Phadke SB (2016) A boundary
3. Makrodimitris M, Nikolakakis A, Papadopoulos E (2011) Semi- layer sliding mode control design for chatter reduction using
autonomous color line-following educational robots: design and uncertainty and disturbance estimator. Int J Dyn Control 4:456–
implementation. In: 2011 IEEE/ASME international conference 465. https​://doi.org/10.1007/s4043​5-015-0150-9
on advanced intelligent mechatronics (AIM), Budapest, Hungary, 22. Feng Y, Yu X, Zheng X (2006) Second-order terminal sliding
pp 1052–1057. https​://doi.org/10.1109/aim.2011.60270​98 mode control of input-delay systems. Asian J Control 8(1):12–20.
4. Kaiser F, Islam S, Imran W, Khan KH, Islam KMA (2014) Line https​://doi.org/10.1111/j.1934-6093.2006.tb002​46.x
follower robot: fabrication and accuracy measurement by data 23. Ahmed SF, Raza Y, Mahdi HF, Muhamad WW, Joyo MK, Shah A,
acquisition. In: International conference on electrical engineering Koondhar MY (2019) Review on sliding mode controller and its
and information & communication technology, Dhaka, Bangla- modified types for rehabilitation robots. In: 2019 IEEE 6th inter-
desh, pp 1–6. https​://doi.org/10.1109/ICEEI​CT.2014.69191​37 national conference on engineering technologies and applied sci-
5. Febtriko A, Yulianti W (2019) Application of the concept and ences, Kuala Lumpur, Malaysia, pp 1–8. https​://doi.org/10.1109/
monitoring of robot line follower as a prototype of pekanbaru ICETA​S4836​0.2019.91173​9
trans metro bus towards the industry revolution 4.0. J Komtek Inf 24. Bessa WM, Brinkmann G, Duecker D-A, Kreuzer E, Solow-
6(2):117–126. https​://doi.org/10.35134​/komte​kinfo​.v6i2.899 jow E (2018) A biologically inspired framework for the intel-
6. Ali FR, Rashid AT (2018) Design and implementation of static ligent control of mechatronic systems and its application to a
and dynamic objects store systems using line follower robots. In: micro diving agent. Math Probl Eng 2018:1–16. https​://doi.
International conference on advance of sustainable engineering org/10.1155/2018/96481​26
and its application, Wasit, Iraq, pp 37–42. https:​ //doi.org/10.1109/ 25. Lima GS, Trimpe S, Bessa WM (2020) Sliding mode control with
ICASE​A.2018.83709​52 Gaussian process regression for underwater robots. J Intell Robot
7. Oktarina Y, Nawawi M, Tulak WG (2017) Analysis of the sen- Syst 99:487–498. https​://doi.org/10.1007/s1084​6-019-01128​-5
sor line on line follower robot as an alternative transport the tub 26. Pati CS, Kala R (2017) Vision-based robot following using PID
trash in the shopping center. VOLT 2(2):101–108. https​://doi. control. Technologies 5(34):1–17. https​://doi.org/10.3390/techn​
org/10.30870​/volt.v2i2.1859 ologi​es502​0034
8. Pakdaman M, Sanaatiyan MM (2009) Design and implementa- 27. Singh J, Chouhan PS (2017) A new approach for line following
tion of line follower robot. In: Second international conference robot using radius of path curvature and differential drive kin-
on computer and electrical engineering, Dubai, United Arab ematics. In: 6th International conference on computer applica-
Emirates, pp 585–590. https​://doi.org/10.1109/ICCEE​.2009.43 tions in electrical engineering-recent advances, Roorkee, India,
9. Roy A, Noel MM (2016) Design of a high-speed line following pp 497–502. https​://doi.org/10.1109/CERA.2017.83433​80
robot that smoothly follows tight curves. Comput Electr Eng 28. Wang L (2011) Advanced line-follower robot. Master thesis,
56:732–747. https​://doi.org/10.1016/j.compe​lecen​g.2015.06.014 Cleveland State University
10. Engin M, Engin D (2012) Path planning of line follower robot. 29. Kanojiya RG, Meshram PM (2012) Optimal tuning of PI control-
In: 5th European DSP education and research conference, ler for speed control of DC motor drive using particle swarm opti-
Amsterdam, Netherlands, pp 1–5. https​: //doi.org/10.1109/ mization. In: 2012 International conference on advances in power
EDERC​.2012.65322​13 conversion and energy technologies, Andhra Pradesh, India, pp
11. Elayaraja D, Ramabalan S (2017) Investigation in autonomous 1–6. https​://doi.org/10.1109/APCET​.2012.63020​00
line follower robot. J Sci Ind Res 76:212–216
12. Zhai J, Song Z (2018) Adaptive sliding mode trajectory tracking Publisher’s Note Springer Nature remains neutral with regard to
control for wheeled mobile robots. Int J Control 92(10):2255– jurisdictional claims in published maps and institutional affiliations.
2262. https​://doi.org/10.1080/00207​179.2018.14361​94
13. Korayem MH, Nazemizadeh M, Nohooji HR (2014) Optimal
point-to-point motion planning of non-holonomic mobile robots
in the presence of multiple obstacles. J Braz Soc Mech Sci Eng
36(1):221–232. https​://doi.org/10.1007/s4043​0-013-0063-5

13

You might also like