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 H∞, 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.
Double inverted pendulum system.
Table 1 shows the technical parameters for using this system.
Parameters of the double inverted pendulum system.
Parameters and value
Description
m1
Mass of the first pendulum
m2
Mass of the second pendulum
L1
Length of the first pendulum
L2
Length of the second pendulum
g = 9.81 N/kg
Coefficient of the gravity
J1=m1.L12/12
Inertia moment of the first pendulum
J2=m2.L22/12
Inertia moment of the second pendulum
α
Rotation angle of the first inverted pendulum
β
Rotation angle of the second inverted pendulum
F
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(1)T=12⋅m1⋅L12⋅α˙2+12⋅m2⋅L1⋅α˙2+L22⋅β˙2−L1⋅L2⋅α˙⋅β˙cosα⋅cosβ+sinα⋅sinβ+12⋅J1⋅α˙2+12⋅J2⋅β˙2.
The potential energy of the system is(2)V=m12+m2⋅g⋅L1⋅cosα−m22⋅g⋅L2⋅cosβ.
Lagrangian is given by(3)ℒ=T−V.
In accordance with the Lagrangian formulation, the entire dynamic model of the DIP system is provided by(4)α¨=1ζλ⋅ξ⋅F−μ⋅sinβ−γ⋅α˙2+λaγ⋅β˙2+ν⋅sinα+γ⋅β˙2+ν⋅sinα,(5)β¨=1ξF−μ⋅sinβ−γ⋅α˙2+λaγ⋅β˙2+ν⋅sinα,with(6)a=m1⋅L124+J1+m2⋅J22,λ=m22⋅L1⋅L2⋅cosα−β,γ=m22⋅L1⋅L2⋅sinα−β,ν=m12+m2⋅g⋅L1,η=m2⋅L224+J2,ξ=1η−λ2/a.
Note. We will consider m1=3/4⋅m2 and L1=3/4⋅L2.
According to the dynamic model presented in (5) and (7), the nonlinear state-space representation can take the following form:(7)Q=αα˙ββ˙T=q1q2q3q4T.
The double inverted pendulum model can be depicted by its nonlinear state-space form as(8)q1.=q2,q2.=1ζλ⋅ξ⋅F−μ⋅sinq3−γ⋅q22+λaγ⋅q42+ν⋅sinq1+γ⋅q42+ν⋅sinq1,q3.=q4,q4.=1ξF−μ⋅sinq3−γ⋅q22+λaγ⋅q42+ν⋅sinq1.
So, the nonlinear representation of the DIP can be given as Q˙=fq+gq⋅u, where(9)fq=q2−1ζλ⋅ξ⋅μ⋅sinq3+γ⋅q22−λaγ⋅q42+ν⋅sinq1−γ⋅q42−ν⋅sinq1q4−1ξμ⋅sinq3+γ⋅q22−λaγ⋅q42+ν⋅sinq1,gq=0λ⋅ξζ01ξ.
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.
Convex and concave region of the Lyapunov function.
By way of explanation, a continuous scalar function Vx is 0 at the origin and positive at a certain point surrounding the origin, i.e., (10)V0=0,Vx>0,∀x>0,x⟶∞⟹Vx⟶∞,V˙x<0,∀x≠0.
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(11)VConvex=∂2U∂t2∈R+.
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.
DIP system representation in V-Realm builder.
5. State Feedback Fuzzy Problem Formulation and Controller Design5.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:(13)∑i=14hiz1t,z3t,0≤hiz1t,z3t≤1,i=1,…,4,where(14)z1=q1,z3=q3,where the parameters qi 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.
min2,min4,max2,max4 are, respectively, the minimum and the maximum of q2 and q4, so(15)min2<q2<max2,min4<q4<max4.
The membership functions Mk,min and Mk,max assigned each variable are given as follows:(16)M11q2=q2−min2max2−min2,(17)M12q2=max2−q2max2−min2,(18)M21q4=q4−min4max4−min4,(19)M22q4=max4−q4max4−min4.
The weighting functions of the state feedback fuzzy model are(20)h1=M11q2⋅M21q4,h2=M11q2⋅M22q4,h3=M12q2⋅M21q4,h4=M12q2⋅M22q4.
So, the global state feedback fuzzy model is(21)q˙t=∑i=14hiztAi⋅qt+Bi⋅qt+D⋅wt,zt=∑i=14hiCi⋅qt,i=1,…,4,where the subsystems are established as(22)A=0100νξλa+1−γξq2−λaμξγξλa+10001−λaν−γξ−μξ−λaγq4,B=0λaξ01ξ.
The following statements concerning the continuous-time unforced nominal system are equivalent:
There exists a matrix P=PT>0 such that
(24)PAij+AijTPPEiCiT∗−γ2IDiT∗∗−I<0.
x˙=Aijxt is a stable system, and the disturbed system x˙=Aijxt+Eiωt satisfies the H∞ 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 m1=0.5kg,m2=0.75kg,L1=0.5m, and L2=0.75kg and presuming that the pair Ai,Bi 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 Ki for the linear pair Ai,Bi that satisfies the following theorem of stability.
Theorem 1.
Consider closed-loop fuzzy system (17) and a scalar γ>0; the system is asymptotically stable with the H∞ performance γ if there exist symmetric matrix Q and matrices Yi such that the following LMIs hold:(25)Ωii<0,i=1,2,…,r,(26)Ωij+Ωji<0,i<j=i+1,2,…,r,where(27)Ωij=Ωij11EiQCiT∗−γ2IDiT∗∗−I<0,Ωij21=AiQ+QAiT+BiYj+YjTBiT,and the gain matrices are given by Ki=YQ−1.
Obviously, the LMI conditions (24) and (25) can be rewritten as follows:(28)∑i=1rhi2Ωii+∑i=1r−1∑j=i+1rhihjΩij+Ωij<0,which is verified if(29)Ωij=Ωij11EiQCiT∗−γ2IDiT∗∗−I<0.
Before and after multiplying both sides of (28) by diagQ−1,I,I and applying the change of variables Q−1=P and Yj=KjQ, 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 Ki of the linear submodels as follows:(30)K1=−9.3504−0.43111.08671.1527,K2=−9.3754−0.43211.08681.1552,K3=−9.3750−0.43091.08681.1551,K4=−9.3501−0.42991.08671.1526.
MATLAB/Simulink was implemented to simulate the performance of the state feedback fuzzy controller. Figure 4 shows the block diagram of the DIP system.
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.
DIP system control effort without perturbation.
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 wt=2⋅sin2⋅π⋅t and the used state feedback fuzzy control effort are shown in Figures 7 and 8.
DIP response with perturbation.
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.
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.
PerevK.Inverted pendulum control: an overview201113441JadlovskaS.SarnovskyJ.Classical double inverted pendulum–a complex overview of a systemProceedings of the IEEE 10th International Symposium on Applied Machine Intelligence and InformaticsJanuary 2012Herl’any, SlovakiaBiglariH.JamiA.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 motionsProceedings of the International Conference on Mechanical and Aerospace EngineeringJuly 2016London, UKChenL.Research on the nonlinear dynamical behavior of double pendulumProceedings of the International Conference on Mechatronic Science, Electric Engineering and ComputerAugust 2011Jilin City, ChinaEspindolaR.Del ValleG.HernándeG.PinedaI.DíazD. M.GuijosaS.The double pendulum of variable mass: numerical study for different cases201912211204910.1088/1742-6596/1221/1/0120492-s2.0-85067803670Song Qing-kunL.DongW.The design and stability study of double inverted pendulum controllerProceedings of the Seventh International Symposium on Computational Intelligence and DesignDecember 2014Hangzhou, ChinaAliD.TeerapongD.Control of double inverted pendulum first approachProceedings of the Degree Project in Electrical EngineeringDecember 2015Karlskrona, SwedenCerda-LugoA.GonzalezA.CardenasA.PiovesanD.Experimental estimation of a second order, double inverted pendulum parameters for the study of human balancingProceedings of the 41st Annual International Conference of the IEEE Engineering in Medicine and Biology SocietyJuly 2019Berlin, Germany41174120BogdanovA.Optimal control of a double inverted pendulum on a cart2004Portland, OregonOregon Health & Science UniversityTechnical Report CSE-04-006HaoY.YiJ.ZhaoD.QianD.2008Seattle, Washington, USAAmerican Control Conference Westin Seattle HotelHungL.-C.LinH.-P.ChungH.-Y.New adaptive fuzzy sliding-mode control for uncertain non-linear systems200728422923910.1504/ijcat.2007.0145562-s2.0-34548050663AlexanderM. C.Neural control model for an inverted double pendulum2019282239249NeusserZ.ValášekM.Control of the double inverted pendulum on a cart using the natural motion201353688388910.14311/ap.2013.53.08832-s2.0-84896881183ChenH.FangY.SunN.A swing constrained time-optimal trajectory planning strategy for double pendulum crane systems20178921513152410.1007/s11071-017-3531-02-s2.0-85018327232MuhammadM.AbdullahiA.BatureA.BelloM.LMI-based control of a double pendulum crane, applications of modeling and simulations2018224150JaafarH. I.MohamedZ.ShamsudinM. A.Mohd SubhaN. A.RamliL.AbdullahiA. M.Model reference command shaping for vibration control of multimode flexible systems with application to a double-pendulum overhead crane201911567769510.1016/j.ymssp.2018.06.0052-s2.0-85048894097WuY.SunN.ChenH.FangY.Adaptive output feedback control for 5-DOF varying-cable-length tower cranes with cargo mass estimation2020110.1109/tii.2020.3006179YangT.SunN.ChenH.FangY.Observer-based nonlinear control for tower cranes suffering from uncertain friction and actuator constraints with experimental verification2020110.1109/tie.2020.2992972IsmailJ.LiuS.Efficient planning of optimal trajectory for a Furuta double pendulum using discrete mechanics and optimal control2017501104561046110.1016/j.ifacol.2017.08.19752-s2.0-85031799869SlavkaJ.AnnaJ.Inverted pendula simulation and modeling-a generalized approachProceedings of the International Conference Process ControlJune 2010Banff, CanadaDemirciM.Control of a double-inverted pendulum for nonlinear system2007812743ZhangJ.-L.ZhangW.LQR self-adjusting based control for the planar double inverted pendulum2012241669167610.1016/j.phpro.2012.02.246MoysisL.Balancing a double inverted pendulum using optimal control and laguerre functions2016Thessaloniki, GreeceAristotle University of ThessalonikiTechnical ReportSrikanthK.KumarN.Stabilization at the upright equilibrium position of a double inverted pendulum with unconstrained bat optimization20155510.5121/ijcsa.2015.5508YamakitaM.NonakaK.FurutaK.Swing up control of a double pendulumProceedings of 1995 American Control ConferenceJune 1995Hotel Seattle, WA, USAAstromK.FurutaK.IwashiroM.HoshinoT.Energy based strategies for swinging up a double pendulum32Proceedings of the 14th Triennial World Congress of IFACJuly 1999Beijing, China26450645510.1016/s1474-6670(17)57101-3Al-HadithiB.BarraganA. J.AndujarJ. M.JimenezA.Fuzzy optimal control for double inverted pendulum1996793315321LoJ.-C.LinM.-L.Observer-based robust20041235035910.1109/tfuzz.2004.8259922-s2.0-3042547163YangH.JiangY.YinS.Adaptive fuzzy fault tolerant control for markov jump systems with additive and multiplicative actuator faults20201110.1109/TFUZZ.2020.2965884