Abid Robot
Abid Robot
Research Article
Takagi–Sugeno Fuzzy Controller and Sliding Mode Controller for
a Nonholonomic Mobile Robot
Hafedh Abid
Laboratory of Sciences and Techniques of Automatic Control and Computer Engineering (Lab-STA) Sfax,
National School of Engineering of Sfax, University of Sfax, Sfax, Tunisia
Received 16 April 2021; Revised 18 May 2021; Accepted 8 June 2021; Published 18 June 2021
Copyright © 2021 Hafedh Abid. This is an open access article distributed under the Creative Commons Attribution License, which
permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
This paper focuses on the nonholonomic wheeled mobile robot. We have presented a scheme to develop controllers. Two
controllers have been developed. The first concerns the kinematic behavior, while the second relates to the dynamic behavior of the
mobile robot. For the kinematic controller, we have used a Takagi–Sugeno fuzzy system to overcome the nonlinearities present in
model, whereas for the second controller, we have used the sliding mode approach. The sliding surface has the identical structure
as the proportional integral controller. The stability of the system has been proved based on the Lyapunov approach. The
simulation results show the efficiency of the proposed control laws.
2.1. Fuzzy Kinematic Model of Robot. Based on the New- In order to develop a T-S fuzzy controller, which sta-
ton–Euler equations [16] and the previous hypotheses, the bilizes the system and allows the robot to follow the desired
state equations of the mobile robot are represented by the path, we need a fuzzy model. In this context, we proceed to
following equations’ system [17]: determine a fuzzy model of the robot.
The posture vector error is not specified in the global
x_ � v cos θ, frame coordinate system, but quite as a vector error in the
⎪
⎧
⎪
⎨ local frame coordinate system of the robot: qe (t) �
⎪ y_ � v sin θ, T
e1 e2 e3 .
⎪
⎩_ (2)
θ � ω, The posture vector error qe is computed based on the
������ T
actual posture vector q(t) � x y θ and the reference
v � x_ 2 + y_ 2 , T
posture vector qd (t) � xd yd θd :
Mathematical Problems in Engineering 3
T
where Vm d � vd ωd . Y
So, θr
xd − x ex yr
⎢
⎡
⎢
⎢ ⎤⎥⎥⎥ ⎡⎢
⎢
⎢ ⎤⎥⎥⎥
q � qd − q � ⎢
⎢ ⎥⎥ ⎢
⎢ ⎥⎥
⎣ yd − y ⎥⎥⎦ � ⎢
⎢
⎢ ⎣ ey ⎥⎥⎦.
⎢ (7)
θd − θ eθ 2L
where 2r
X
cos θ sin θ 0 O xr x
⎢
⎡
⎢
⎢ ⎥⎥⎥⎤
Re � ⎢
⎢ −sin θ cos θ 0 ⎥⎥⎥. (9)
⎢
⎣ ⎥⎦ Figure 2: Trajectory tracking.
0 0 1
Equation (8) allows transforming the magnitudes de- The member ship function for the error e3 is given in
scribed in the global coordinate system to the local coor- Figure 3.
dinate system: The rules of the local models are given by the following
expression:
_ q + R q_ .
q_e � R (10)
e e
if e3 is μ1 , then q_e � A1 Vm d + B1 Vm ,
However, by differentiating equation (10), which con- if e3 is μ2 , then q_e � A2 Vm d + B2 Vm , (13)
tains the linear speed and the angular speed terms, we obtain
the derivative of the error vector, which is expressed by the if e3 is μ3 , then q_e � A3 Vm d + B3 Vm .
following equation: The T-S fuzzy model of equation (12) is given by the
⎪ e_1 � ωe2 − ] + ]d cos e3 ,
⎧
⎪
following equation:
⎨
q_e � ⎪ e_2 � −ωe1 + ]d sin e3 , (11) 3
⎪
⎩
e_3 � ωd − ω. q_e � μi Ai Vm d + Bi Vm , (14)
i�1
The posture error model can be rewritten as follows:
where μi and Ai and Bi represent, respectively, the weight
e_1 cos e3 0 −1 e2
⎢
⎡
⎢ ⎤⎥⎥⎥ ⎡ ⎢
⎢ ⎥⎤⎥⎥ vd ⎢
⎡
⎢ ⎥⎤⎥⎥ v assigned to each rule and the matrices associated to the local
⎢
⎢
⎢ _ ⎥
⎥ ⎢
⎢
⎢ ⎥
⎥ ⎢
⎢
⎢ ⎥⎥⎥ .
⎢
⎢ e
⎣ ⎦ ⎣
2 ⎥
⎥ � ⎢
⎢ sin e 3 0 ⎥
⎥
⎦ w + ⎢
⎢
⎣ 0 −e 1 ⎥⎦ w (12) model.
e_3 0 1
d
0 1 With,
1 0
We note that equation (12) contains trigonometric ⎡⎢⎢⎢ ⎥⎥⎤⎥
nonlinearities which are cos (e3) and sin (e3). However, the A1 � ⎢⎢⎢⎣ e3 0 ⎥⎥⎥⎥⎦,
⎢
nonlinearities depend on the error e3, whose range of var- 0 1
iation is from −pi/2 to pi/2.
The advantage of the T-S type fuzzy approach is that it 0 0
⎡⎢⎢⎢ ⎥⎥⎤⎥
allows describing the nonlinear model by linear submodels. A2 � ⎢⎢⎢⎣ 1 0 ⎥⎥⎥⎥⎦,
⎢
Indeed, each submodel represents a local linear relation
0 1
between the inputs and the outputs and all the nonlinearities (15)
are reported in the premises of the fuzzy rules [18]. 0 0
⎡⎢⎢⎢ ⎤⎥⎥⎥
Based on the theory of T-S fuzzy systems, the nonlinear A3 � ⎢⎢⎢⎣ −1 0 ⎥⎥⎥⎥⎦,
model (12) can be transformed into three local models,
which are inferred by fuzzy rules. The three local models are 0 1
described by the following systems of equations: −1 e2
From the weights assigned to each rule, the state vector ⎡⎢⎢⎢ ⎥⎥⎤⎥
B1 � B2 � B3 � ⎢⎢⎢⎢⎣ 0 −e1 ⎥⎥⎥⎥⎦.
of the fuzzy models is inferred as follows (which corresponds
to a barycentric aggregation). 0 1
4 Mathematical Problems in Engineering
m 0 (21)
⎢
M(q) � ⎡
⎣ ⎤⎥⎦,
0 Jg The global T-S fuzzy controller is given by the following
equation:
1⎡ 1 1
⎢
B(q) � ⎣ ⎥⎦⎤,
r L −L 3 3
(19) Vm � ⎡⎣ ]c � μi ]i � K1 e1 + μ1 ]ω
d c � μi ωi
v i�1 i�1
⎢
Vm � ⎡
⎣ ⎤⎥⎦, (22)
T
w ]d e 2
� ωd + K3 e3 + μ1 ]d e2 + μ2 − μ3 .
τr e3
⎢
τ �⎡
⎣ ⎤⎥⎦.
τl If e3 � 0, then μ1 � 1 and μ2 � μ3 � 0, so
Mathematical Problems in Engineering 5
+ μ1 −ωe1 + ]d e3 + μ2 −ωe1 + ]d + μ3 −ωe1 − ]d e2 However, the derivatives of the sliding surfaces sv (t) and
sw (t) are given by the following expressions:
+ μ1 ωd − ω + μ2 ωd − ω + μ3 ωd − ωe3 .
(25) S_v (t) � e_v (t) + kv ev (t),
(33)
So, S_w (t) � e_w (t) + kw ew (t).
] e
V_ � −] + μ1 ]d e1 + μ1 ]d e2 + ωd + μ2 − μ3 d 2 − ωe3 . The dynamic motion of the robot is described by
e3 equation (7) which can be transformed as
(26)
V_ m � (M(q))− 1 B(q)τ. (34)
If we choose the following linear and angular velocities,
Equation (34) can be written as
]c � K1 e1 + μ1 ]d ,
V_ m � Bτ, (35)
3 (27)
]d e2 where B � (M)− 1 B
ωc � μi ωi � ωd + K3 e3 + μ1 ]d e2 + μ2 − μ3 .
i�1
e3 Based on the sliding mode theory, the controller includes
two terms which are known as equivalent control law and
Equation (26) becomes switching control. The global control law is expressed as
V_ � −K1 e21 − K3 e23 ≤ 0, if e3 ≠ 0. (28) u � τ � ueq + us � τ eq + τ s . (36)
If e3 � 0, then μ1 � 1 and μ2 � μ3 � 0. So, ]c � K1 e1 + ]d The equivalent control law ueq is computed by recog-
and ωc � 3i�1 μi ωi � ωd + K3 e3 + ]d e2 . nizing that S_ � 0 which is a necessary condition for the state
Also, trajectory to stay in the sliding surface [19, 20]. The de-
V_ � −K1 e21 − K3 e23 ≤ 0. (29) rivative of the sliding surface is
_ � e_e (t) + Kee (t),
S(t) (37)
The derivative of the Lyapunov function is negative and
the stability of the system is guarantee. with e_e � (V_ c − V_ m ) and ee � (Vc − Vm ).
Thus, substituting (35) for (37), we obtain
3.2. Dynamic Controller Based on Sliding Mode. In this 0
section, we are interested in the development of a controller, _ � V_ c − Bτ
S(t) + Kee (t) � , (38)
which guarantees the convergence of the posture error qe 0
6 Mathematical Problems in Engineering
1 ⎡ J J with
� M− 1 B �
B ⎣ g g ⎦⎤,
rmJg mL mL
(39)
mL Jg
− 1 � r ⎢
B ⎡
⎣ ⎥⎦⎤,
2L mL −Jg
−1 1 ⎡ L 1
B � ⎣ ⎦⎤.
2Lr L −1
]_ c � K1 e_1 + μ1 ]_ d
⎢
⎡
⎢
⎢ ⎤⎥⎥⎥
⎢
⎢ ⎥⎥⎥
V_ c � ⎢
⎢
⎢
⎢
⎥⎥⎥. (41)
⎣ ω_ � ω_ + K e_ + μ ]_ e + ] e_ + μ − μ ]_ d e2 + ]d e_2 e3 − ]d e2 e_3 ⎥⎥⎦
⎢
⎢
c d 3 3 1 d 2 d 2 2 3
e23
So,
rm rJg K1 e_1 + μ1 ]_ d
⎢
⎡
⎢
⎢ ⎥⎥⎤⎥ ⎡ ⎢ ⎤⎥⎥⎥
ueqr 2 2L ⎜ ⎟
⎡⎢⎢⎢⎣
⎢
⎢
⎤⎥⎥⎥⎦ � ⎢
⎢
⎥
⎥
⎥⎥⎥⎜ ⎛
⎜
⎜
⎜
⎢
⎢
⎢
⎢ ⎥⎥⎥ ⎡⎢⎢ λev ⎤⎥⎥⎞⎟
⎟
⎟
⎟
⎢
⎢
⎢ ⎥
⎥⎥⎥⎜⎜
⎜ ⎢
⎢
⎢ ⎥
⎥ + ⎣ ⎦ ⎟
⎟
⎟ ,
⎢
⎢ ⎥ ⎜
⎝ ⎢
⎢
⎣ ]
_ e + ] _
e e − ] e _
e ⎥
⎥
⎦ ⎟
⎠
ueql ⎢
⎣ rm rJg ⎥⎦
⎢ ω_ d + K3 e_3 + μ1 ]_ d e2 + ]d e_2 + μ2 − μ3 d 2 d 2 3 d 2 3 λe w
− e3
2 2L
rm rJg K1 e_1 + μ1 ]_ d + λev
⎢
⎡ ⎥⎤⎡
ueqr ⎢
⎢
⎢
⎢
⎢ 2 2L ⎥⎥⎥⎥⎥⎢ ⎢
⎢
⎢
⎤⎥⎥⎥
⎥⎥⎥
⎡⎢⎢⎢⎣ ⎤⎥⎥⎥⎦ � ⎢
⎢
⎢ ⎥⎥⎥⎢⎢
⎢ ⎥⎥⎥,
⎢
⎢ ⎥
⎥ ⎢
⎢
⎢ ⎥⎥
⎢ ⎥⎢ ]_ e ] e ] e e_
ueql ⎣ rm rJg ⎥⎥⎦⎣ ω_ d + K3 e_3 + μ1 ]_ d e2 + ]d e_2 + μ2 − μ3 d 2 + d 2 − d 22 3 + λew ⎦
⎢
⎢
− e3 e3 e3
2 2L
rm rJg ]_ e + ]d e_2 e3 − ]d e2 e_3
⎢
⎡
⎢
⎢ K1 e_1 + μ1 ]_ d + λev + ω_ d + K3 e_3 + μ1 ]_ d e2 + ]d e_2 + μ2 − μ3 d 2 + λew ⎤⎥⎥⎥
ueqr ⎢
⎢
⎢
⎢
2 2L e23 ⎥⎥⎥
⎥⎥⎥
⎡⎢⎢⎢⎣ ⎢
⎤⎥⎥⎥⎦ � ⎢
⎢ ⎥⎥⎥.
⎢
⎢
⎢ ⎥⎥⎥
⎢
⎢ ⎥⎥
ueql ⎢
⎢
⎣ rm K e_ + μ ]_ + λe − rJg ω_ + K e_ + μ ]_ e + ] e_ + μ − μ ]_ d e2 + ]d e_2 e3 − ]d e2 e_3 + λe ⎥⎥⎦
⎢
1 1 1 d v d 3 3 1 d 2 d 2 2 3 w
2 2L e23
(42)
Finally, we obtain
V_ � ST S_ � ST V_ c − B
τ eq + τ s + Kee (t). Figure 6: Evolution of inertia of the robot.
We note k1s � (ks rm)/2 and k2s � (ks rJg )/2L. So, Figure 8: Evolution of the robot trajectory along the x-axis (blue
denotes the trajectory and magenta denotes the reference
V_ � −ks sv + sw − k2s sv − sw ≺0. (48) trajectory).
1.2 –0.15
0 1000 2000 3000 4000 5000
1
0.8 Figure 13: Evolution of the error xr2 − x2.
0.6
0.4 Evolution of error X1ref – X1
0.2 0.05
0 1000 2000 3000 4000 5000
Figure 10: Evolution of linear speed v. 0
–0.05
Evolution of error speed
0.6 –0.1
0.4
–0.15
0.2
–0.2
0
–0.2 –0.25
0 1000 2000 3000 4000 5000
–0.4 Figure 14: Evolution the error xr1 − x1.
–0.6
0 1000 2000 3000 4000 5000
Figures 5–7 show, respectively, the evolution in time of
Figure 11: Evolution of the error of the linear speed ev � vr − v. mass, inertia, and radius of the robot.
Figures 8 and 9 show, respectively, the evolution in time
of the robot along the x- and y-axis (the trajectories of robot
⎧
⎪ v � vro + 910− 7 t, for t ≤ 15 s, and its reference).
⎪
⎪
⎨ r Figures 10 and 11 show, respectively, the behavior
⎪ vr � vr , for 15 ≤ t ≤ 27 s, (49) evolution of linear speed v and the error speed ev � vr − v.
⎪
⎪
⎩ −7 Figures 8–10 show that all the signals follow quickly the
vr � vr − 910 t, for t≻27 s and vr ≥ 0.8.
reference. The curves of the reference signals and the re-
The initial speeds have been chosen as vro � 0.8, sponses overlap in a very short time after start-up.
vd � 0.78, and vg � 0.38. Figure 12 shows the evolution the angular error e3.
Mathematical Problems in Engineering 9