Advances in Fuzzy Systems
Volume 2020 (2020), Article ID 8835511, 9 pages
https://doi.org/10.1155/2020/8835511

Research Article

T-S Fuzzy System Controller for Stabilizing the Double Inverted Pendulum

Boutaina Elkinany,¹ Mohammed Alfidi,¹ Redouane Chaibi,² and Zakaria Chalh¹

¹Laboratory of Engineering Systems and Applications, Sidi Mohammed Ben Abdellah University, Fez, Morocco
²Department of Physics, Sidi Mohammed Ben Abdellah University, LESSI, Fez, Morocco

Correspondence should be addressed to Boutaina Elkinany; boutaina.elkinany@gmail.com

Received 4 May 2020; Accepted 15 November 2020; Published 7 December 2020

Academic Editor: Ping-Feng Pai

Copyright © 2020 Boutaina Elkinany et al. 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.

Abstract.

This article provides a representation of the double inverted pendulum system that is shaped and regulated in response to torque application at the top rather than the bottom of the pendulum, given that most researchers have controlled the double inverted pendulum based on the lower part or the base. To achieve this objective, we designed a dynamic Lagrangian conceptualization of the double inverted pendulum and a state feedback representation based on the simple convex polytypic transformation. Finally, we used the fuzzy state feedback approach to linearize the mathematical nonlinear model and to develop a fuzzy controller , given its great ability to simplify nonlinear systems in order to reduce the error rate and to increase precision. In our virtual conceptualization of the inverted pendulum, we used MATLAB software to simulate the movement of the system before applying a command on the upper part of the system to check its stability. Concerning the nonlinearities of the system, we have found a state feedback fuzzy control approach. Overall, the simulation results have shown that the fuzzy state feedback model is very efficient and flexible as it can be modified in different positions.

1. Introduction

A double pendulum is made up of two individual pendulums which mimic a nonlinear and unstable dynamic system [1–5]. It displays a perfect model of nonlinear and chaotic movements. Unlike the previous system, the simple pendulum is not as sophisticated and advanced as the double pendulum although its simple structure and instability are highly utilized for experimental research [6–8]. A double pendulum or the underactuated system has more joints than actuators, and its control is a subject of great interest for researchers because of its high applicability in robotics.

One of the well-known models is the double pendulum on a cart [9–12]. It poses a control problem regarding its architecture which is composed of a straight-line moving cart, one rotary inverted pendulum around the cart’s mass center, and another around the mass center of the first inverted pendulum. To reach the desired equilibrium state, Neusser and Valášek [13] tried to control this system by applying the nonlinear quadratic regulator. Bogdanov [9] also tested a combination between the linear quadratic regulator, the neural network, and the Riccati equation in order to reach the overall stability of this model. The key downside of this approach lies in the large number of complex calculations. Concerning the double-pendulum crane model, the system consists of a payload attached to a hook. The combination of the double pendulum system with a crane became interesting because of its high utility and applicability in the industry. To provide more details about the functionality of this model, Chen et al. [14] presented the dynamics of the double-pendulum crane and proposed a time-optimal trajectory planning approach in order to achieve the control objectives. Muhammad et al. [15], moreover, focused on stabilizing the double-pendulum crane by using the linear matrix inequality method. Eventually, the simulation results proved a high effectiveness of this controller. Jaafar et al. [16] also employed this system and improved its vibration control by designing the model reference command shaping (MRCS) approach. In addition to this, Wu et al. and Yang et al. [17, 18] developed an adaptive output-feedback controller to avoid the instability and disturbances of this system.

The stabilization of the Furuta double pendulum is one of highly recommended examples to study the double pendulum system. It is equipped with two pendulums and a rotating arm. Ismail and Liu [19] depicted a new optimal control technique to swing up the Furuta double pendulum model.

From another point of view, a double inverted pendulum system represents a typical group of underactuated mechanical systems used in control theory which includes the modeling of an unstable chaotic system by formulating its motion equations, designing a stabilizing controller for the nonlinear systems, and establishing a numerical stability state simulation in order to show the good stability of this system.

In this regard, Slavka and Anna [20] aimed at presenting the double inverted pendulum (DIP) modeling and control by developing a Simulink block library in MATLAB software. Demirci [21], furthermore, laid down the pole placement and the linear quadratic regulator (LQR) methods to achieve the satisfactory stability results in very small regions of this system equilibrium. Zhang and Zhang [22] also based their model on the LQR self-adjusting technique in order to maintain control over the planar DIP. Moysis [23], as well, focused on keeping the DIP on the upright equilibrium position by first employing the linear quadratic regulator and Laguerre functions.

Other researchers [24–26] dealt with swinging up the DIP at the upright vertical position by creating a simulation prototype of this system and trying to maintain it on the vertical point.

Since the DIP is a nonlinear model with a high level of nonlinearities widely applied in testing new control approaches, different nonlinear and intelligent methods have been used to control it. Al-Hadithi et al. [27], for instance, contributed to the stabilization of the DIP by employing a new optimal fuzzy controller. Lo and Lin [28] proposed a new approach that is based on the sliding mode controller to eliminate the chattering-generated phenomenon. Yang et al. [29] also employed the adaptive backstepping technique and the fuzzy logic system to form the fuzzy logic system-based adaptive fault-tolerant controller to stabilize a wheeled system.

The state feedback fuzzy approach is regarded as the most effective device for explaining the dynamic behavior of the nonlinear system in an adequate way. Consequently, the novelty and the efficiency of this method are manifested in relevance to the following factors: the dynamic response, the complexity degree of the algorithm, the number of detectors, and the implementation cost.

The majority of the researchers interested in the double pendulum system has used algorithms to achieve control over this system while applying a torque on both pendulums. Stabilizing the model through applying a torque on the second pendulum rather than the first is still a mystery to researchers; eventually, in this study, we aim to surmount such a challenge while making use of the state feedback fuzzy theory to control the DIP on the upright position. The second part presents a mathematical formulation of the DIP based on the Lagrangian approach, illustrated by a graphical modeling, which is rooted in the virtual reality and MATLAB software, as displayed in the third part. The fourth part provides a general overview of the state feedback fuzzy technique simulation results using MATLAB/Simulink, while the fifth and last part sum up all significant results and perspectives of this study.

2. Modeling of the System

The objective of this section is to determine motion equations of the system and to establish the graphical model of the DIP. As a matter of fact, Lagrangian was firstly calculated. After that, the system was drawn using MATLAB software.

Figure 1 illustrates our conceptualization of the double inverted pendulum system; once a torque F was applied on the upper part of the double inverted pendulum, both pendulums deviated on their gravity centers.

Figure 1: Double inverted pendulum system.

Table 1 shows the technical parameters for using this system.

Table 1: Parameters of the double inverted pendulum system.

Parameters and value
Description

Mass of the first pendulum

Mass of the second pendulum

Length of the first pendulum

Length of the second pendulum

 = 9.81 N/kg
Coefficient of the gravity

Inertia moment of the first pendulum

Inertia moment of the second pendulum

Rotation angle of the first inverted pendulum

Rotation angle of the second inverted pendulum

Applied torque on the second pendulum (the upper part)

2.1. DIP Mathematical Modeling

Lagrangian of a mechanical system is extracted by the difference between its kinetic energy and its potential energy. From this Lagrangian, the equations of the DIP system are derived using Euler–Lagrange, as shown in the following.

The kinetic energy of the system is

The potential energy of the system is

Lagrangian is given by

In accordance with the Lagrangian formulation, the entire dynamic model of the DIP system is provided by

with

Note. We will consider and .

According to the dynamic model presented in (5) and (7), the nonlinear state-space representation can take the following form:

The double inverted pendulum model can be depicted by its nonlinear state-space form as

So, the nonlinear representation of the DIP can be given as , where

3. Initial Unstable Equilibrium Position

Regarding continuous system (10), the most complicated task is to achieve stability at its equilibrium point. We, therefore, need to select a convenient initial position to implement a controller that enables the system to move from an unstable equilibrium position to a stable one.

As illustrated in Figure 2, the Lyapunov approach is used for the examination of the equilibrium point stability movement in consonance with the DIP system’s motion while focusing on one positive scalar function.

Figure 2: Convex and concave region of the Lyapunov function.

By way of explanation, a continuous scalar function is 0 at the origin and positive at a certain point surrounding the origin, i.e.,

Since the potential energy (3) is a positive and continuous scalar function, we consider it as a Lyapunov function.

So, based on the Lyapunov approach, the initial unstable equilibrium position is determined by

Accordingly,

4. Virtual Reality via MATLAB Software

The visual representation of the movement of the double inverted pendulum is highly required for its design development. Such a representation is not only used for regulating this system’s degrees of freedom but also crucial for picking up a convenient controller. In this regard, the creation of a virtual prototype of this model on MATLAB requires using V-Realm builder for model’s drawing and MATLAB/Simulink (M-Script) for its animation.

Figure 3 captures the motion of the created model in various positions. The double inverted pendulum rotates when a torque is applied on the top of the model, causing the pendulums to move left and right.

Figure 3: DIP system representation in V-Realm builder.

5. State Feedback Fuzzy Problem Formulation and Controller Design

5.1. DIP State Feedback Fuzzy Problem Formulation

The fuzzy controller system operates according to the so called fuzzy rules, namely, the if-then statements, fuzzy sets, logic, and inference. These rules are extremely useful for depicting sophisticated controls and models and for connecting input and output variables of fuzzy controllers. The most well-known types of fuzzy rules are Mamdani and T-S (state feedback).

In fact, it has been shown that state feedback fuzzy models represent precisely some nonlinear systems using fuzzy if-then rules. Thus, these state feedback fuzzy models provide a simple and efficient method to complement other nonlinear control strategies and to decrease the complexity of the system in order to optimize the error rate in the simulation results and using mathematical nonlinear models.

Consequently, we are more concerned in this paper with the state feedback fuzzy approach. So, the total membership state feedback fuzzy functions are set according to the following conditions:

where

where the parameters are the input variables. Generally speaking, these variables are theoretically defined as either continuous or discrete, yet in practical terms, only the continuous variables are the most feasible because all fuzzy controllers and models are applied using digital computers.

are, respectively, the minimum and the maximum of and , so

The membership functions and assigned each variable are given as follows:

The weighting functions of the state feedback fuzzy model are

So, the global state feedback fuzzy model is

where the subsystems are established as

So,

Lemma 1 (see [26]). The following statements concerning the continuous-time unforced nominal system are equivalent:

(1)There exists a matrix such that

(2) is a stable system, and the disturbed system satisfies the performance.

5.2. State Feedback Fuzzy Controller Design

Assessing the previous matrices for each T-S fuzzy model linear subsystem for the double inverted pendulum system and taking into consideration the parameters of nonlinear system (10) provided , and and presuming that the pair is controllable and observable, it will be feasible to develop the stable state feedback fuzzy controller design.

The T-S controller design is based on establishing the feedback gain for the linear pair that satisfies the following theorem of stability.

Theorem 1. Consider closed-loop fuzzy system (17) and a scalar ; the system is asymptotically stable with the performance if there exist symmetric matrix and matrices such that the following LMIs hold:

where

and the gain matrices are given by .

Obviously, the LMI conditions (24) and (25) can be rewritten as follows:

which is verified if

Before and after multiplying both sides of (28) by and applying the change of variables and , we obtain inequality (19). This completes the proof.

To represent the stability study and design techniques of the T-S fuzzy output feedback controller for the developed system, we should design the feedback gain of the linear submodels as follows:

MATLAB/Simulink was implemented to simulate the performance of the state feedback fuzzy controller. Figure 4 shows the block diagram of the DIP system.

Figure 4: State feedback fuzzy block diagram for the DIP system.

6. Numerical Simulations

In this section, tracking the effectiveness and balance of the double inverted pendulum is simulated by the implementation of the state feedback fuzzy model.

6.1. Results

To verify the suggested state feedback fuzzy model of the DIP system, simulations were implemented via Simulink as shown in Figure 4. The results showed that the double inverted pendulum can be balanced at the upright position regardless of the presence or the absence of perturbation as shown in Figures 5 and 6. The DIP system is incarnated into Matlab/Simulink based on nonlinear dynamic formulation (10). The linearized subsystems are also represented in Simulink based on the obtained data of the linearized model in equations, as illustrated in Section 5.

Figure 5: DIP system control effort without perturbation.

Figure 6: DIP response without perturbation.

6.1.1. Discussion

The effectiveness of the state feedback fuzzy controller has been verified by the simulation of the double inverted pendulum in MATLAB software.

The injected perturbation and the used state feedback fuzzy control effort are shown in Figures 7 and 8.

Figure 7: DIP response with perturbation.

Figure 8: Applied perturbation to the DIP system.

As mentioned in Figures 5 and 9, the selected state feedback fuzzy model brings up the system to the equilibrium point in [0, 10] s, without applying a perturbation, while in Figure 7, the controller with applying perturbation brings up the system to the equilibrium point in [0, 20] s.

Figure 9: DIP system control effort with perturbation.

Eventually, the state feedback fuzzy model selected without perturbation not only ensured the fast response but also provided good precision of controlling the DIP system.

7. Conclusion

In the present paper, we introduced a nonlinear dynamic model of a double inverted pendulum. The modeling of the DIP system was based on two representations: a mathematical representation by applying the Lagrangian approach and, at the same time, a graphic illustration using the virtual reality for drawing the system in MATLAB/Simulink in order to check the motion of the double inverted pendulum. A nonlinear model was developed, and a state feedback fuzzy model was established, so as to achieve good stability of the system. Finally, results showed the validity of this approach. In future works, we aim to add two pendulums to the inverted pendulum in a way to increase the number of pendulums until arriving to control n pendulums in different equilibrium positions.

8. Limitations

The major limitation of this system is the nonlinearity resulting from the integration of more than one arm in the system and to be controlled by the state feedback fuzzy approach.

Data Availability

The material and data involved in this study can be shared. Individual requests for further information on the study can be sent to the corresponding author.

Disclosure

This study was carried out in Sidi Mohammed Ben Abdellah University, National School of Applied Sciences, Laboratory of Engineering Systems and Applications, Fez, Morocco.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

References

K. Perev, “Inverted pendulum control: an overview,” Information Technologies and Control, vol. 1, pp. 34–41, 2011.

S. Jadlovska and J. Sarnovsky, “Classical double inverted pendulum–a complex overview of a system,” in Proceedings of the IEEE 10th International Symposium on Applied Machine Intelligence and Informatics, Herl’any, Slovakia, January 2012.

H. Biglari and A. Jami, “The double pendulum numerical analysis with Lagrangian and the Hamiltonian equations of motions 2 the double pendulum numerical analysis with Lagrangian and the Hamiltonian equations of motions,” in Proceedings of the International Conference on Mechanical and Aerospace Engineering, London, UK, July 2016.

L. Chen, “Research on the nonlinear dynamical behavior of double pendulum,” in Proceedings of the International Conference on Mechatronic Science, Electric Engineering and Computer, Jilin City, China, August 2011.

R. Espindola, G. Del Valle, G. Hernánde, I. Pineda, D. M. Díaz, and S. Guijosa, “The double pendulum of variable mass: numerical study for different cases,” Journal of Physics Conference Series, vol. 1221, p. 12049, 2019.

L. Song Qing-kun and W. Dong, “The design and stability study of double inverted pendulum controller,” in Proceedings of the Seventh International Symposium on Computational Intelligence and Design, Hangzhou, China, December 2014.

D. Ali and D. Teerapong, “Control of double inverted pendulum first approach,” in Proceedings of the Degree Project in Electrical Engineering, Karlskrona, Sweden, December 2015.

A. Cerda-Lugo, A. Gonzalez, A. Cardenas, and D. Piovesan, “Experimental estimation of a second order, double inverted pendulum parameters for the study of human balancing,” in Proceedings of the 41st Annual International Conference of the IEEE Engineering in Medicine and Biology Society, pp. 4117–4120, Berlin, Germany, July 2019.

A. Bogdanov, “Optimal control of a double inverted pendulum on a cart,” Tech. Rep., Oregon Health & Science University, Portland, Oregon, 2004, Technical Report CSE-04-006.

Y. Hao, J. Yi, D. Zhao, and D. Qian, Robust Control Using Incremental Sliding Mode for Underactuated Systems with Mismatched Uncertainties, American Control Conference Westin Seattle Hotel, Seattle, Washington, USA, 2008.

L.-C. Hung, H.-P. Lin, and H.-Y. Chung, “New adaptive fuzzy sliding-mode control for uncertain non-linear systems,” International Journal of Computer Applications in Technology, vol. 28, no. 4, pp. 229–239, 2007.

M. C. Alexander, “Neural control model for an inverted double pendulum,” Complex Systems Journal, vol. 28, no. 2, pp. 239–249, 2019.

Z. Neusser and M. Valášek, “Control of the double inverted pendulum on a cart using the natural motion,” Acta Polytechnica, vol. 53, no. 6, pp. 883–889, 2013.

H. Chen, Y. Fang, and N. Sun, “A swing constrained time-optimal trajectory planning strategy for double pendulum crane systems,” Nonlinear Dynamics, vol. 89, no. 2, pp. 1513–1524, 2017.

M. Muhammad, A. Abdullahi, A. Bature, and M. Bello, “LMI-based control of a double pendulum crane, applications of modeling and simulations,” Journal, vol. 2, no. 2, pp. 41–50, 2018.

H. I. Jaafar, Z. Mohamed, M. A. Shamsudin, N. A. Mohd Subha, L. Ramli, and A. M. Abdullahi, “Model reference command shaping for vibration control of multimode flexible systems with application to a double-pendulum overhead crane,” Mechanical Systems and Signal Processing, vol. 115, pp. 677–695, 2019.

Y. Wu, N. Sun, H. Chen, and Y. Fang, “Adaptive output feedback control for 5-DOF varying-cable-length tower cranes with cargo mass estimation,” IEEE Transactions on Industrial Informatics, p. 1, 2020.

T. Yang, N. Sun, H. Chen, and Y. Fang, “Observer-based nonlinear control for tower cranes suffering from uncertain friction and actuator constraints with experimental verification,” IEEE Transactions on Industrial Electronics, p. 1, 2020.

J. Ismail and S. Liu, “Efficient planning of optimal trajectory for a Furuta double pendulum using discrete mechanics and optimal control,” IFAC Papers OnLine, vol. 50, no. 1, pp. 10456–10461, 2017.

J. Slavka and J. Anna, “Inverted pendula simulation and modeling-a generalized approach,” in Proceedings of the International Conference Process Control, Banff, Canada, June 2010.

M. Demirci, “Control of a double-inverted pendulum for nonlinear system,” Journal of Applied Mathematics, vol. 8, no. 1, pp. 27–43, 2007.

J.-L. Zhang and W. Zhang, “LQR self-adjusting based control for the planar double inverted pendulum,” Physics Procedia, vol. 24, pp. 1669–1676, 2012.

L. Moysis, “Balancing a double inverted pendulum using optimal control and laguerre functions,” Tech. Rep., Aristotle University of Thessaloniki, Thessaloniki, Greece, 2016, Technical Report.

K. Srikanth and N. Kumar, “Stabilization at the upright equilibrium position of a double inverted pendulum with unconstrained bat optimization,” International Journal on Computational Science and Applications, vol. 5, no. 5, 2015.

M. Yamakita, K. Nonaka, and K. Furuta, “Swing up control of a double pendulum,” in Proceedings of 1995 American Control Conference, Hotel Seattle, WA, USA, June 1995.

K. Astrom, K. Furuta, M. Iwashiro, and T. Hoshino, “Energy based strategies for swinging up a double pendulum,” in Proceedings of the 14th Triennial World Congress of IFAC, vol. 32, no. 2, pp. 6450–6455, Beijing, China, July 1999.

B. Al-Hadithi, A. J. Barragan, J. M. Andujar, and A. Jimenez, “Fuzzy optimal control for double inverted pendulum,” Fuzzy Sets and Systems Journal, vol. 79, no. 3, pp. 315–321, 1996.

J.-C. Lo and M.-L. Lin, “Observer-based robust,” IEEE Transactions on Fuzzy Systems, vol. 12, pp. 350–359, 2004.

H. Yang, Y. Jiang, and S. Yin, “Adaptive fuzzy fault tolerant control for markov jump systems with additive and multiplicative actuator faults,” IEEE Transactions on Fuzzy Systems, vol. 1, no. 1, 2020.