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 [15]. 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 [68]. 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 [912]. 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 [2426] 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.

Table 1 shows the technical parameters for using this system.

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 bywith

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.

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.

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:wherewhere 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 iswhere 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:whereand 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.

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.

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.

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.

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.