Professional Documents
Culture Documents
12 - Advanced Sliding Mode Control Techniques For Inverted Pendulum
12 - Advanced Sliding Mode Control Techniques For Inverted Pendulum
a r t i c l e i n f o a b s t r a c t
Article history: Numerous practical applications like robot balancing, segway and hover board riding and operation of a
Received 20 December 2017 rocket propeller are inherently based on Inverted Pendulum (IP). The control of an IP is a sophisticated
Revised 25 May 2018 problem due to various real world phenomena that make it unstable, non-linear and under-actuated sys-
Accepted 12 June 2018
tem. This paper presents a comparative analysis of linear and non-linear feedback control techniques
Available online xxxx
based on investigation of time, control energy and tracking error to obtain best control performance
for the IP system. The implemented control techniques are Linear Quadratic controller (LQR), Sliding
Keywords:
Mode Control (SMC) through feedback linearization, Integral Sliding Mode Control (ISMC) and
Inverted Pendulum (IP)
Sliding mode control
Terminal Sliding Mode Control (TSMC). Considering cart position and pendulum angle, the designed con-
Lyapunov stability trol laws have been subjected to various test signals so as to characterize their tracking performance.
Comparative results indicate that ISMC gives a rise time of 0.6 s with 0% overshoot and over-performs
compared to other control techniques in terms of reduced chattering, less settling time and small steady
state error.
Ó 2018 Karabuk University. Publishing services by Elsevier B.V. This is an open access article under the CC
BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/).
https://doi.org/10.1016/j.jestch.2018.06.010
2215-0986/Ó 2018 Karabuk University. Publishing services by Elsevier B.V.
This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/).
Please cite this article in press as: S. Irfan et al., Advanced sliding mode control techniques for Inverted Pendulum: Modelling and simulation, Eng. Sci.
Tech., Int. J. (2018), https://doi.org/10.1016/j.jestch.2018.06.010
2 S. Irfan et al. / Engineering Science and Technology, an International Journal xxx (2018) xxx–xxx
system. The chattering phenomena present in first order SMC, law To implement LQR [17] on this set of equations, we need to lin-
can be handled by higher order sliding mode control technique earize the non-linear terms h_ 2 When pendulum is stable at h
which also improves the system performance [14]. ffi 0; h_ 2 ffi 0 and cosð0Þ ¼ 1, the mathematical model is reduced to
In this paper a comparative analysis of control strategies i.e. (3) and (4).
LQR, SMC, ISMC, TSMC have been presented. All these algorithms
have been implemented on IP. The comparison is carried out based ðM þ mÞ€x þ Bx_ ml€h ¼ F ð3Þ
on various parameters like time, control energy and chattering
ðI þ ml Þh€ mglh ¼ ml€x
2
phenomena. The results depict efficacy of ISMC over LQR, SMC ð4Þ
and TSMC. The remaining paper is organized as follows: Section 2
The transfer functions of the cart position and angle of pendulum is
derives linear and non-linear model of IP. Section 3 details the con-
given as,
trol techniques under study while, Section 4 presents the results
and discussion of the implemented control strategies. Finally, Sec- ðIþml2 Þs2 mgl
XðsÞ q
tion 5 presents the conclusion of this paper. ¼ ð5Þ
UðsÞ s4 þ bðIþml2 Þ s3 ðMþmÞmgl s2 bmgl s
q q q
ðM þ mÞ€x þ mL€h cos h mlh_ 2 sin h þ Bx_ ¼ F ð1Þ The output matrix can be written as,
2 3
x
ðI þ ml Þ€h þ mglsinh ¼ ml€xcosh 6 7
2
ð2Þ 1 0 0 0 6 x_ 7 0
yðtÞ ¼ 6 7þ uðtÞ ð9Þ
0 0 1 0 4h5 0
h_
The system has four poles with two in the right half plane which
makes the system unstable. Therefore, a linear controller needs to
be designed to force the poles in the left half plane. The calculated
open loop poles are located at: S = 0–5.6041 5.5651–0.1428.
Please cite this article in press as: S. Irfan et al., Advanced sliding mode control techniques for Inverted Pendulum: Modelling and simulation, Eng. Sci.
Tech., Int. J. (2018), https://doi.org/10.1016/j.jestch.2018.06.010
S. Irfan et al. / Engineering Science and Technology, an International Journal xxx (2018) xxx–xxx 3
The Riccati equation is given in (12) whereas the generic repre- r_ 4 ¼ L4f ðT 1 ðrÞÞ þ Lg L3f hðT 1 ðrÞÞu
sentation of the linear system is given in (13).
Lf hðxÞ is the Lie derivative of hðxÞ along vector f ðxÞ. The output of the
AT P þ PA PBR1 BT R þ Q ¼ 0 ð12Þ system is defined as,
_
xðtÞ ¼ AxðtÞ þ BUðtÞ ð13Þ 1 þ sinx3
y ¼ hðxÞ ¼ x1 þ l ln ð23Þ
cosx3
The control law for the linear system is given as,
UðtÞ ¼ KxðtÞ ð14Þ The transformed states thus obtained through feedback lin-
earization are given in the following equations
For computing the gains open loop response of the system can
be written as, 1 þ sinx3
r1 ¼ hðxÞ ¼ x1 þ l ln ð24Þ
_
xðtÞ ¼ AxðtÞ BKxðtÞ ð15Þ cosx3
_
xðtÞ ¼ ðA BKÞxðtÞ ð16Þ lx4
r2 ¼ Lx hðxÞ ¼ x2 þ ð25Þ
cosx3
3.2. Feedback linearization !
2
lx4
r3 ¼ Lf 2 hðxÞ ¼ tanx3 gþ ð26Þ
Feedback linearization is a common approach to control the cosx3
behavior of the non-linear systems. A system is said to be feedback
linearizable if, non-linear dynamics of the system can be trans- 2 1 4 3g
r4 ¼ Lf 3 hðxÞ ¼ lx3 þ 2g x4 ð27Þ
formed into an equivalent fully or partially controllable linear sys- 2
cos x3 cosx3 2
cos x3
tem dynamics cancelling the nonlinearities [20]. In our system
relative degree is two and order of the system is four which is where,
greater than the relative degree of the system so, we use input out-
6sinx3 sinx3 4 6gsinx3 2
put linearization control technique to make relative degree equal f ðxÞ ¼ l x 4 þ x
cos4 x3 cos2 x3 cos3 x3 4
to the order of the system. Transform (3) and (4) to get the canon-
ical form given as, 2gsinx3 gsinx3 3g gsinx3
þ 3x 2
4 þ 2g ð28Þ
cos3 x3 cosx3 cos2 x3 l
x_ 1 ¼ x2
6w24 3g 2gcosw3
x_ 2 ¼ o1 þ i1 F gðxÞ ¼ þ 3w24 þ ð29Þ
cos2 w3 lcosw3 l
x_ 3 ¼ x4 Feedback linearizable non-linear equation in the ‘r’ system is
shown as,
x_ 4 ¼ o2 þ i2 F
r_ 1 ¼ r 2
where x is the state space vector, F is the force need to move cart
and o1 , o2 ; i1 and i2 are nominal non-linear functions is defined as
r_ 2 ¼ r 3
follows:
Please cite this article in press as: S. Irfan et al., Advanced sliding mode control techniques for Inverted Pendulum: Modelling and simulation, Eng. Sci.
Tech., Int. J. (2018), https://doi.org/10.1016/j.jestch.2018.06.010
4 S. Irfan et al. / Engineering Science and Technology, an International Journal xxx (2018) xxx–xxx
3
d where,
S¼ þk e ð31Þ
dt e ¼ e1 ed ð40Þ
where k is a positive constant and e is the tracking error signal and
is the difference between actual and desired output i.e. e ¼ e1 ed s ¼ ev þ k3 e þ 3k2 e_ þ 3k€e þ z ð41Þ
u ¼ ueq þ udis V_ ¼ Sðf ðxÞ þ gðxÞðueq þ udis Þ þ k3 ðx2 x_ d Þ þ 3k2 ðx3 €xd Þ
First order SMC suffers from the chattering phenomena, which þ 3kðx4 ev d Þ þ z_ Þ ð48Þ
is an oscillatory motion occurring around the sliding manifold. To
ensure the stability of the system, the Lyapunov function is defined V_ ¼ SðksignðsÞ fsÞ ð49Þ
as,
V_ 6 kjsj fs2 ð50Þ
1 2
V¼ S ð35Þ
2 where kandf are positive constants and their value is greater
than zero. As V_ is negative definite, hence the system dynamics
V_ ¼ SS_ ð36Þ will converge to the sliding surface in finite time.
Taking the time derivative of (32) and putting them in above
expression, (37) is obtained 3.5. Terminal sliding mode control (TSMC)
V_ ¼ SðksignðsÞÞ ð37Þ The convergence of state in SMC is infinite time while in TSMC
the state convergence is in finite time. The precise sliding surface is
V_ 6 kjsj ð38Þ designed in terminal sliding mode control and the purpose of con-
trol law is to retain the system on the defined surface. When the
illustrative point of the system move on the sliding surface, TSMC
3.4. Integral sliding mode control (ISMC) is established and infinite convergence is guaranteed [25]. Sliding
surface for terminal sliding mode control is chosen as
High frequency turbulences in SMC damage the system and 3
reduce the life of actuators while the settling time also gets d q
S¼ þk e þ bep1 ð51Þ
enhanced. ISMC minimize the cost function and chattering in dt
which system dynamic are weak against the uncertainties [24].
q q
System trajectories start from the sliding surface while, the reach- S ¼ ev þ k3 ðx1 xd Þ þ 3k2 ðx2 x_ d Þ þ 3kðx3 €xd Þ þ b ep1 e1 ð52Þ
ing phase is eliminated in the integral mode sliding control. The p
ISMC improves the results by generalizing the higher order system The time derivative of sliding surface is given in (53).
derivatives and by involving system trajectories into the sliding
q q
surface. The performance of the error is also improved in ISMC. S_ ¼ ev þ k3 ðx2 x_ d Þ þ 3k2 ðx3 €xd Þ þ 3kðx4 ev d Þ þ b ep1 e_ 1 ð53Þ
By using the reaching phase, it handles the matched uncertainties p
and stabilizes system asymptotically. States are directed towards
sliding manifolds and stabilization depends on sliding constraints. Putting the sliding surface at s_ ¼ 0, the equivalent control part
ISMC are most suitable for complex and MIMO system. In ISMC, for TSMC is given in (54).
q
sliding surface is chosen as (39) f ðxÞ þ k3 ðx2 x_ d Þ þ 3k2 ðx3 €xd Þ þ 3kðx4 ev d Þ þ b pq ep1 e2
3 ueq ¼
d gðxÞ
S¼ þk eþz ð39Þ
dt ð54Þ
Please cite this article in press as: S. Irfan et al., Advanced sliding mode control techniques for Inverted Pendulum: Modelling and simulation, Eng. Sci.
Tech., Int. J. (2018), https://doi.org/10.1016/j.jestch.2018.06.010
S. Irfan et al. / Engineering Science and Technology, an International Journal xxx (2018) xxx–xxx 5
1 2
V¼ S ð56Þ
2
V_ ¼ SS_ ð57Þ
Putting (53) in the above expression, (58) is obtained.
where kandf is positive constant and greater than zero. The deriva-
tive of Lyapunov function V_ becomes negative definite and system Fig. 3. Step response of pendulum angle based on LQR, SMC, ISMC and TSMC laws.
dynamics converges to origin in finite time.
Table 3
Tuning parameters of control strategies.
Fig. 2. Step response of cart position based on LQR, SMC, ISMC and TSMC laws. Fig. 5. Sliding surface based on SMC, ISMC and TSMC laws.
Please cite this article in press as: S. Irfan et al., Advanced sliding mode control techniques for Inverted Pendulum: Modelling and simulation, Eng. Sci.
Tech., Int. J. (2018), https://doi.org/10.1016/j.jestch.2018.06.010
6 S. Irfan et al. / Engineering Science and Technology, an International Journal xxx (2018) xxx–xxx
Table 4
Performance analysis of control strategies.
Fig. 6. Sinusoidal response of cart position based on SMC, ISMC and TSMC laws.
Please cite this article in press as: S. Irfan et al., Advanced sliding mode control techniques for Inverted Pendulum: Modelling and simulation, Eng. Sci.
Tech., Int. J. (2018), https://doi.org/10.1016/j.jestch.2018.06.010
S. Irfan et al. / Engineering Science and Technology, an International Journal xxx (2018) xxx–xxx 7
[2] S.A. Ajwad, N. Asim, R.U. Islam, J. Iqbal, Role and review of educational robotic
platforms in preparing engineers for industry, Maejo Int. J. Sci. Technol. 11
(2017) 17–34.
[3] M. Bettayeb, C. Boussalem, R. Mansouri, U. Al-Saggaf, Stabilization of an
inverted pendulum-cart system by fractional PI-state feedback, ISA Trans. 53
(2014) 508–516.
[4] J. Iqbal, M. Ullah, S.G. Khan, B. Khelifa, S. Ćuković, Nonlinear control systems-A
brief overview of historical and recent advances, Nonlinear Eng. 6 (2017) 301–
312.
[5] O. Khan, M. Pervaiz, E. Ahmad, J. Iqbal, On the derivation of novel model and
sophisticated control of flexible joint manipulator, Revue Roumaine des
Sciences Techniques-Serie Electrotechnique et Energetique 62 (2017) 103–
108.
[6] S.A. Ajwad, J. Iqbal, M.I. Ullah, A. Mehmood, A systematic review of current and
emergent manipulator control approaches, Front. Mech. Eng. 10 (2015) 198–
210.
[7] R. Toscano, A simple robust PI/PID controller design via numerical
optimization approach, J. Process Control 15 (2005) 81–88.
[8] L. Melkou, M. Hamerlain, A. Rezoug, Fixed-wing UAV attitude and altitude
control via adaptive second-order sliding mode, Arabian J. Sci. Eng. (2017) 1–
12.
Fig. 10. Cart position with disturbance based on SMC, ISMC and TSMC laws. [9] M.I. Ullah, S.A. Ajwad, M. Irfan, J. Iqbal, Non-linear control law for articulated
serial manipulators: Simulation augmented with hardware implementation,
Elektronika ir Elektrotechnika 22 (2016) 3–7.
[10] S.G. Khan, J. Jalani, Realisation of model reference compliance control of a
humanoid robot arm via integral sliding mode control, Mech. Sci. 7 (2016) 1.
[11] S.A. Ajwad, J. Iqbal, A.A. Khan, A. Mehmood, Disturbance-observer-based
robust control of a serial-link robotic manipulator using SMC and PBC
techniques, Stud. Inf. Control 24 (2015) 401–408.
[12] B. Xiao, C. Xu, L. Xu, System model and controller design of an inverted
pendulum, in: IEEE International Conference on Industrial and Information
Systems, 2009, pp. 356–359.
[13] S. Jadlovský, J. Sarnovský, Modelling of classical and rotary inverted pendulum
systems–a generalized approach, J. Electr. Eng. 64 (2013) 12–19.
[14] S.A. Ajwad, M.I. Ullah, B. Khelifa, J. Iqbal, A comprehensive state-of-the-art on
control of industrial articulated robots, J. Balkan Tribol. Assoc. 20 (2014) 499–
521.
[15] S.A. Ajwad, A. Mehmood, M.I. Ullah, J. Iqbal, Optimal v/s Robust control: A
study and comparison for articulated manipulator, J. Balkan Tribol. Assoc. 22
(2016) 2637–2643.
[16] L.B. Prasad, B. Tyagi, H.O. Gupta, Modelling and simulation for optimal control
of nonlinear inverted pendulum dynamical system using PID controller and
LQR, in: Modelling Symposium (Ams), 2012 Sixth Asia, 2012, pp. 138–143.
[17] S.A. Ajwad, J. Iqbal, R.U. Islam, A. Alsheikhy, A. Almeshal, A. Mehmood, Optimal
and robust control of multi DOF robotic manipulator: design and hardware
Fig. 11. Pendulum angle with disturbance based on SMC, ISMC and TSMC laws. realization, Cybern. Syst. 49 (2018) 77–93.
[18] S. Ozana, M. Pies, Z. Slanina, R. Hajovsky, Design and implementation of LQR
controller for inverted pendulum by use of REX control system, in: IEEE
International Conference on Circuits and Systems, 2012, pp. 343–347.
utmost importance is a mechanism to deal with consequences of [19] E.V. Kumar, J. Jerome, Robust LQR controller design for stabilizing and
components failures. Reliable control ensures that the desired trajectory tracking of inverted pendulum, Procedia Eng. 64 (2013) 169–178.
specifications of a system are met even in case of breakdown in [20] J. Lee, R. Mukherjee, H.K. Khalil, Output feedback stabilization of inverted
pendulum on a cart in the presence of uncertainties, Automatica 54 (2015)
one or more components [27]. Reliability function may be based 146–157.
on Riccati equation, linear matrix identity method, coprime factor- [21] R.-J. Wai, L.-J. Chang, Adaptive stabilizing and tracking control for a nonlinear
ization and Lyapunov function. An adaptive SMC based law finds inverted-pendulum system via sliding-mode technique, IEEE Trans. Ind.
Electron. 53 (2006) 674–692.
its potential in cases where complete information about external [22] H. Li, J. Wang, H. Du, H.R. Karimi, Adaptive sliding mode control for Takagi-
disturbance, limits on actuator faults and nonlinearity bounds is Sugeno fuzzy systems and its applications, IEEE Trans. Fuzzy Syst. 26 (2018)
not available [28]. To simultaneously handle several of the afore- 531–542.
[23] W. Alam, A. Mehmood, K. Ali, U. Javaid, S. Alharbi, J. Iqbal, Nonlinear control of
mentioned issues, research works in [29–31] highlights the bene-
a flexible joint robotic manipulator with experimental validation, Strojniški
fits of robust H1 SMC. vestnik-Journal of Mechanical Engineering 64 (2018) 47–55.
[24] S. Seshagiri, H.K. Khalil, On introducing integral action in sliding mode control,
5. Conclusion in: IEEE Conference on Decision and Control, 2002, pp. 1473–1478.
[25] Y. Feng, X. Yu, Z. Man, Non-singular terminal sliding mode control of rigid
manipulators, Automatica 38 (2002) 2159–2167.
In this research paper linear and non-linear control strategies [26] R. Sakthivel, B. Kaviarasan, C.K. Ahn, H.R. Karimi, Observer and stochastic
has been successfully designed and simulated. Robust control tech- faulty actuator-based reliable consensus protocol for multiagent system, IEEE
Trans. Syst., Man, Cybern.: Syst. (2017).
niques have been discussed for IP to ensure the stability to achieve [27] Y. Wei, J. Qiu, H.R. Karimi, Reliable output feedback control of discrete-time
better response of system. Robust control techniques for this study fuzzy affine systems with actuator faults, IEEE Trans. Circuits Syst. I Regul. Pap.
include SMC, ISMC and TSMC. Based on analysis and design struc- 64 (2017) 170–181.
[28] H. Li, P. Shi, D. Yao, Adaptive sliding-mode control of Markov jump nonlinear
ture, all the laws are capable of controlling the IP. Result of each
systems with actuator faults, IEEE Trans. Autom. Control 62 (2017) 1933–
controller has been plotted and compared. Overall performance 1939.
comparison concludes that ISMC gives the best performance over [29] H.R. Karimi, A sliding mode approach to H1 synchronization of master–slave
time-delay systems with Markovian jumping parameters and nonlinear
the other control techniques.
uncertainties, J. Franklin Inst. 349 (2012) 1480–1496.
[30] Y. Kao, J. Xie, C. Wang, H.R. Karimi, A sliding mode approach to H1 non-fragile
References observer-based control design for uncertain Markovian neutral-type
stochastic systems, Automatica 52 (2015) 218–226.
[1] J. Iqbal, R.U. Islam, Z.A. Syed, A.K. Abdul, S.A. Ajwad, Automating industrial [31] H. Zhang, X. Liu, J. Wang, H.R. Karimi, Robust H1 sliding mode control with
tasks through mechatronic systems – A review of robotics in industrial pole placement for a fluid power electrohydraulic actuator (EHA) system, Int. J.
perspective, Tehnički vjesnik – Technical Gazette 23 (2016) 917–924. Adv. Manuf. Technol. 73 (2014) 1095–1104.
Please cite this article in press as: S. Irfan et al., Advanced sliding mode control techniques for Inverted Pendulum: Modelling and simulation, Eng. Sci.
Tech., Int. J. (2018), https://doi.org/10.1016/j.jestch.2018.06.010