Research Article  Open Access
Nonlinear/Linear Switched Control of Inverted Pendulum System: Stability Analysis and RealTime Implementation
Abstract
This paper treats the problems of stability analysis and control synthesis of the switched inverted pendulum system with nonlinear/linear controllers. The proposed control strategy consists of switching between backstepping and linear state feedback controllers on swingup and stabilization zones, respectively. First, the backstepping controller is implemented to guarantee the rapid convergence of the pendulum to the desired rod angle from the vertical position. Next, the state feedback is employed to stabilize and maintain the system on the upright position inherently unstable. Based on the quadratic Lyapunov approach, the switching between the two zones is analyzed in order to determine a sufficient domain in which the stability of the desired equilibrium point is justified. A realtime experimentation shows a reduction of of the samples below the classical scheme when using only the backstepping control in the entire operating region. Furthermore, the reduction percentage has become 92% in comparison with the composite linear/linear controller.
1. Introduction
For several years, stability analysis and control synthesis of switched systems have received an increasing interest. This class of systems consists of a finite number of subsystems and a logical rule that orchestrates switching between them. Mathematically, these subsystems are usually described by differential equations. Examples of such switched systems can be found in chemical processes [1], power converters [2], automotive industry, electrical circuits [3], and many other fields.
The most control structure of switched systems used in literature is to design the same number of linear subsystems and linear subcontrollers. Therefore, necessary and sufficient stability conditions are in general based on switched quadratic Lyapunov functions [4]. However, the main disadvantage of this structure consists of the complexity in designing several controllers and that does not easily account for all interactions between them. Lately, some researchers suggested another switching structure by applying only one controller [5]. Thus, a common quadratic Lyapunov function is used for all subsystems which ensures the asymptotic quadratic stability [5]. Despite the simplicity of this structure, there are many control and performance problems that could profit from it, for instance, the existence of systems that cannot be asymptotically stabilized by a single control law.
Among the large variety of analysis and control problems of switched systems is the guarantee of a sufficient stability domain of the desired equilibrium point. In fact, the knowledge if a given initial state lies within such a stable region is a question of practical importance in many engineering applications as the synthesis of the preferment nonlinear controller [6]. Therefore, the majority of studies concerned with this object are setting in the Lyapunov method which is essentially applied to complex and nonlinear systems. Nevertheless, stability analysis of switched systems used in general is the Popov criterion [7], the circle criterion [8], and the positivereal lemma.
In this paper, we have focused on an alternative switched control structure which includes both backstepping and linear feedback control laws. Indeed, this strategy ensures the rapidity of the system behavior in the closed loop and the minimization of subsystems and subcontroller numbers. Thereafter, the switch between these models has been analyzed using the quadratic Lyapunov approach and Sylvester’s criterion.
One of the most important mechanical systems which treats extensively the issues cited above is the inverted pendulum. This system, inherently unstable with highly nonlinear dynamics, belongs to the class of underactuated systems having fewer control inputs than degrees of freedom. This renders the control task more challenging making this process a classical benchmark for testing and comparing different control techniques.
The evolution space of the considered system can be decomposed into two operating zones: swingup and stabilization zones in which nonlinear and linear feedback controllers are applied, respectively.
This paper is organized as follows: Section 2 depicts the proposed alternative switched control strategy. Section 3 outlines the mathematical model and the design of nonlinear/linear composite controller of the inverted pendulum system. Section 4 deals with determination of a sufficient domain in which the stability of the equilibrium point is justified.
2. Problem Formulation
A switched system consists of a finite number of dynamical subsystems and a switching unit that orchestrates between them. Indeed, the most control structure used, as depicted in Figure 1, contains the same number of linear models , for , and linear subcontrollers , for . At each switching time instant, only one model and its subcontroller are active.
Therefore, some important results of necessary and sufficient stability conditions have been obtained in [9, 10]. However, the major disadvantage of this structure is in the design of several subcontrollers and that does not easily account for all interactions between them.
Some other researchers suggested another switched control structure, shown in Figure 2, which consists of the design of a linear centralized controller for all linear models . This technique is simple to implement since it requires the design of only one controller.
On the contrary, there are many control and performance problems that could profit from this approach; for instance, various objectives cannot be met by a single controller.
In this paper, we have focused on an alternative switched structure, as can be seen in Figure 3. Therefore, we have designed linear and nonlinear controllers in swingup and stabilization zones, respectively. Indeed, this method ensures the rapidity of the closedloop system behavior and the minimization of subsystems and subcontroller numbers. Thereafter, the switch between the two zones has been analyzed in order to determine a sufficient stability domain using the quadratic Lyapunov approach and Sylvester’s criterion.
This alternative switch structure can be perfectly applied to the inverted pendulum system, the mechanical model of which is illustrated in Figure 4 [11, 12].
This process consists of a rod and a moving cart in the horizontal direction. Its parameters are defined in Table 1.

The educational kit of the considered process, shown in Figure 5, consists of a track of 1 m length with limit switches between and , PC Pentium 4 with PCI1711 card, cable adaptor, optical encoders with HCTL2016 ICs, digital pendulum controller, cart, DC motor, pendulum with weight, Advantech PCI1711 device driver, and adjustable feet with belt tension adjustment.
In the next section, the proposed control structure will be applied to the inverted pendulum system in order to show its efficiency.
3. Switched Control Design
Our work aims to design a nonlinear (NL) control law, in the swingup zone, to guarantee the rapid convergence of the pendulum from down position into the stabilization zone. Then, the switch to the linear (L) controller permits to stabilize it at the desired openloop unstable equilibrium point.
3.1. Mathematical Modeling
The mathematical model of the inverted pendulum is depicted by the following nonlinear equations:where (m) is the position of the cart, (m/s) is the velocity, (rad) is the rod angle from the vertical position, (rad/s) is the angular velocity, and (N) is the force.
ForEquation (1) can be rewritten as follows:with
3.2. Composite NL/L Controller
The proposed control strategy is based on switching between backstepping and linear state feedback on swingup and stabilization zones, respectively. Therefore, the switching rule of the global control law is distributed into and in swingup and stabilization zones, respectively, as depicted in Figure 6.
3.2.1. Linear Feedback Control in the Stabilization Zone
In this zone, system (3) can be linearized using the smallangle approximations which are as follows: , and . Then, it can be described by the following linear state equation:with
Based on the pole placement technique, we have applied the linear state feedback controller:where is the state feedback gain. From equations (5) and (7), we have in closed loop:where .
3.2.2. Backstepping Controller in SwingUp Zone
Backstepping control is known as a construction approach in the sense that it has a systematic way of constructing the Lyapunov function along with the control input design. To ensure the negativeness of the derivative of the every step Lyapunov function, it usually requires the cancelation of the indefinite crosscoupling terms [13].
This NL controller is used to move the cart until attains . The design of in the swingup zone is illustrated as below:
Step 1. A new control variable is defined aswhere is the desired setpoint. Then, the derivative of is obtained asThe function of stabilization is presented as follows:where is a positive constant.
Step 2. A second error is given by the following equation:The derivative of is described as follows:Thereafter, the backstepping control law is depicted aswhere is a positive constant.
4. System Analysis in the Stabilization Zone: Estimation of a Stability Domain
It is necessary to guarantee the switched NL/L controlled system stability, when it is provided by the linear feedback control law (7). Therefore, we have to determine the sufficient stability domain:where is a realpositive constant and is the positive definite quadratic Lyapunov function expressed as follows:
The symmetric positive definite matrix is determined by solving the Lyapunov equation:where . Asymptotic stability of the equilibrium of the nonlinear model (3) provided of a feedback linear control law (7) is guaranteed when the derivative of :is negative definite.
Equation (18) can be rewritten aswhereand the parameters are detailed in Appendix.
As also, the matrix can be transformed in the following symmetric form:
By applying Sylvester’s criterion, the closedloop system is asymptotically stable if . Accordingly, the elementary determinants , for , should satisfywhere .
Subsequently, by solving the inequality system (22), the condition leads to which can be rewritten aswhere . Thus, we state the following result.
Theorem 1. The equilibrium point of the nonlinear system (3) provided of a feedback linear control law (7) is asymptotically stable in the attraction domain:if there exist a positive definite matrix , a solution of Lyapunov equation (17), and a not unitary orthogonal matrix S such that .
Proof 1. The proof of the above theorem is based on the quadratic Lyapunov function described by equation (16) and its time derivative given by equation (19). Therefore, based on the eigen decomposition, the matrix P can be reduced in the form:where is an orthogonal matrix and D is a diagonal matrix. Then, by writing , we obtainwhere .
Consequently, the quadratic Lyapunov function can be expressed by the following equation:where . Then, the condition leads to inequality (23) which becomesOn the contrary, we haveFrom conditions (28) and (29), we consider thator otherwise,Therefore, the asymptotic stability domain given in (24) is justified.
5. Results and Discussion
This section deals with the results obtained using the composite NL/L controller in real time. Indeed, we have set the backstepping controller parameters in the swingup zone: and . In the stabilization zone, by selecting the desired closedloop poles: , we have determined the following state feedback controller gain: .
Furthermore, by applying the proposed theorem, we have numerically obtained the following:
Hence, the evolution of the four elementary determinants is depicted in Figures 7–10, respectively.
Based on the proposed strategy, we have carried out the realtime control experiment of the inverted pendulurm system. Therefore, the composite backstepping/linear state controller feedback has been implemented to swing rapidly the pendulum from its initial position into the desired angle and, then, to guarantee its stabilization.
The experimental results of position (m), angle (rad), and force (N) are shown in Figure 11.
(a)
(b)
(c)
To valid the above experimental study, we have verified, at the switch time corresponding to , that where the realtime values of the considered state variables are given by , , , and .
In conclusion, realtime results show that the NL/L controller provides excellent performance. In fact, this type of control guarantees more rapidity with comparison to the response of the backstepping controller in the entire operating region, illustrated in Figure 12, and on the contrary with the response of the composite L/L controller, depicted in Figure 13. Indeed, the swingup phase has taken 15.4 and 42 seconds to stabilize the inverted pendulum when using the NL controller in the entire operating zone and the composite L/L controller, respectively.
(a)
(b)
(c)
(a)
(b)
(c)
The reader can find a video that shows the performance of the realtime composite backstepping/linear state feedback controller implemented for the inverted pendulum system: https://www.youtube.com/watch?reload=9v=m2PsGHmlH04feature=youtu.be.
6. Conclusion
In this paper, we have applied an alternative switched control structure consisting of backstepping and linear state feedback controllers in swingup and stabilization zones, respectively. Indeed, the nonlinear controller was implemented to guarantee the rapid convergence of the pendulum from down position into the stabilization zone. Then, the switch to the linear controller stabilizes it at the equilibrium point.
Based on the quadratic Lyapunov approach and Sylvester’s criterion, we have determined a sufficient stability domain in which the equilibrium point of the considered closedloop system is justified.
A realtime experimentation shows the effectiveness of the proposed control strategy and proves a reduction of of the samples below the conventional scheme when applying only the backstepping controller in the entire operating region. Furthermore, the reduction percentage has become in comparison with the composite linear/linear controller.
Appendix
The parameters of the triangular matrix , given in equation (20), are as follows:
Data Availability
No data were used to support this study.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Supplementary Materials
The video that shows the performance of the realtime composite backstepping/linear state feedback controller implemented for the inverted pendulum system. (Supplementary Materials)
References
 B. Niu, X. Zhao, X. Fan, and Y. Cheng, “A new control method for stateconstrained nonlinear switched systems with application to chemical process,” International Journal of Control, vol. 88, no. 9, pp. 1693–1701, 2015. View at: Publisher Site  Google Scholar
 R. Ma, Y. Liu, S. Zhao, M. Wang, and G. Zong, “Global stabilization design for switched power integrator triangular systems with different powers,” Nonlinear Analysis: Hybrid Systems, vol. 15, pp. 74–85, 2015. View at: Publisher Site  Google Scholar
 Y. Hu, T. Kudoh, and M. Koibuchi, “A case of electrical circuit switched interconnection network for parallel computers,” in Proceedings of the 18th International Conference on Parallel and Distributed Computing, Applications and Technologies (PDCAT), pp. 276–283, Taipei, Taiwan, December 2017. View at: Publisher Site  Google Scholar
 D. Liberzon and A. S. Morse, “Basic problems in stability and design of switched systems,” IEEE Control Systems, vol. 19, no. 5, pp. 59–70, 1999. View at: Publisher Site  Google Scholar
 S. H. Hosseinnia, I. Tejado, and B. M. Vinagre, “Robust fractional order PI controller for switching systems,” in Proceedings of the FDA’2012 5th Symposium on Fractional Differentiation and Its Applications, Hohai University, Nanjing, China, May 2012. View at: Google Scholar
 N. B. Braiek, H. Jerbi, and A. Bacha, “A technique of a stability domain determination for nonlinear discrete polynomial systems,” IFAC Proceedings Volumes, vol. 41, no. 2, pp. 8690–8694, 2008. View at: Publisher Site  Google Scholar
 J. C. Geromel and G. S. Deaecto, “Stability analysis of Lur’etype switched systems,” IEEE Transactions on Automatic Control, vol. 59, no. 11, pp. 3046–3050, 2014. View at: Publisher Site  Google Scholar
 M. Bedillion and W. Messner, “The multivariable circle criterion for switched continuous systems,” in Proceedings of the 42nd IEEE International Conference on Decision and Control, pp. 5301–5306, Maui, HI, USA, December 2003. View at: Publisher Site  Google Scholar
 D. Afolabi, “Sylvester’s eliminant and stability criteria for gyroscopic systems,” Journal of Sound and Vibration, vol. 182, no. 2, pp. 229–244, 1995. View at: Publisher Site  Google Scholar
 M. Fiacchini and M. Jungers, “Necessary and sufficient condition for stabilizability of discretetime linear switched systems: a settheory approach,” Automatica, vol. 50, no. 1, pp. 75–83, 2014. View at: Publisher Site  Google Scholar
 F. Z. Taousser, M. Defoort, M. Djemai, and S. Nicaise, “Stability analysis of switched linear systems on nonuniform time domain with unstable subsystems,” IFACPapersOnLine, vol. 50, no. 1, pp. 14873–14878, 2017. View at: Publisher Site  Google Scholar
 K. J. Åström and K. Furuta, “Swinging up a pendulum by energy control,” Automatica, vol. 36, no. 2, pp. 287–295, 2000. View at: Publisher Site  Google Scholar
 M. Valeri, “Application of neural networks for control of inverted pendulum,” WSEAS Transactions on Circuits and Systems, vol. 10, no. 2, pp. 49–58, 2011. View at: Google Scholar
 A. Sassi, C. Ghorbel, and A. Abdelkrim, “Tracking control of nonlinear systems via backstepping design,” in Proceedings of the IEEE 12th International MultiConference on Systems, Signals & Devices (SSD15), Mahdia, Tunisia, March 2015. View at: Publisher Site  Google Scholar
 A. Ohsumi and T. Izumikawa, “Nonlinear control swingup and stabilization of an inverted pendulum,” in Proceedings of the 34th IEEE Conference on Decision and Control, pp. 3873–3880, New Orleans, LA, USA, December 1995. View at: Publisher Site  Google Scholar
 W.D. Chang, R.C. Hwang, and J.G. Hsieh, “A selftuning PID control for a class of nonlinear systems based on the Lyapunov approach,” Journal of Process Control, vol. 12, no. 2, pp. 233–242, 2002. View at: Publisher Site  Google Scholar
 J.J. Wang, “Simulation studies of inverted pendulum based on PID controllers,” Simulation Modelling Practice and Theory, vol. 19, no. 1, pp. 440–449, 2011. View at: Publisher Site  Google Scholar
 M. Moghaddas, “Design of optimal PID controller for inverted pendulum using genetic algorithm,” International Journal of Innovation, Management and Technology, vol. 3, no. 4, pp. 440–442, 2012. View at: Publisher Site  Google Scholar
 S. S. Sonone and N. V. Pate, “LQR controller design for stabilization of cart model inverted pendulum,” International Journal of Science and Research, vol. 4, no. 7, pp. 1172–1176, 2013. View at: Google Scholar
 S. Elloumi and E. Ben Braiek, “Robust decentralized control for multimachine power systems: the LMI approach,” in Proceedings of the IEEE International Conference on Systems, Man and Cybernetics, Hammamet, Tunisia, October 2002. View at: Publisher Site  Google Scholar
 L. B. Prasad, B. Tyaji, and H. O. Gupta, “Optimal control of nonlinear inverted pendulum system using PID controller and LQR: performance analysis without and with disturbance input,” International Journal of Automation and Computing, vol. 11, no. 6, pp. 661–670, 2014. View at: Publisher Site  Google Scholar
 D. Wu, M. Chen, H. Gong, and Q. Wu, “Robust backstepping control of wing rock using disturbance observer,” Applied Sciences, vol. 7, no. 3, pp. 219–221, 2017. View at: Publisher Site  Google Scholar
 Y. M. Liu, Z. Chen, D. Xue, and X. Xu, “Realtime controlling of inverted pendulum by fuzzy logic,” in Proceedings of the 2009 IEEE International Conference on Automation and Logistics, Shenyang, China, August 2009. View at: Publisher Site  Google Scholar
 F. K. Tsai and J. S. Lin, “Backstepping control design of 360degree inverted pendulum systems,” in Proceedings of the 2003 Automatic Control Conference, pp. 138–143, Sophia Antipolis, France, July 2003. View at: Google Scholar
 S. Elloumi and N. Benhadj Braiek, “On feedback control techniques of nonlinear analytic systems,” Journal of Applied Research and Technology, vol. 12, no. 3, pp. 500–513, 2014. View at: Publisher Site  Google Scholar
 R. Coban and B. Ata, “Decoupled sliding mode control of an inverted pendulum on a cart: an experimental study,” in Proceedings of the 2017 IEEE International Conference on Advanced Intelligent Mechatronics (AIM), pp. 993–997, Munich, Germany, July 2017. View at: Publisher Site  Google Scholar
 J. Yi and N. Yubazaki, “Stabilization fuzzy control of inverted pendulum systems,” Artificial Intelligence in Engineering, vol. 14, no. 2, pp. 153–163, 2000. View at: Publisher Site  Google Scholar
Copyright
Copyright © 2019 Amira Tiga 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.