Abstract
In this paper, an adaptive controller is proposed to balance a rotary inverted pendulum with time-varying uncertainties. The goal of the control is to bring the pendulum close to the upright position regardless of the various uncertainties and disturbances. Its underactuated dynamics is first decoupled by Olfati’s transformation into a cascade form, and then an adaptive controller is designed to deal with the uncertainties in the new space. Based on the Lyapunov-like theory, the closed loop stability and boundedness of all internal signals can be proved. The simulation results show that the proposed scheme is capable of giving good performance, as desired.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Avoid common mistakes on your manuscript.
1 Introduction
The rotary inverted pendulum (Fig. 1) was first introduced by Furuta et al. [13]. Since it contains the well-known underactuated dynamics, many reports can be found in the literature for its stabilization [1, 3, 5, 25]. Most of the controls for the rotary inverted pendulum fall into one of several categories [6]. For example, some considered the problem of stabilizing the pendulum around the unstable vertical position [1, 6, 25, 26, 32]. Some swung the pendulum from its hanging position to its upright vertical position [3, 9, 14, 15, 31]. Some others tried to create oscillations around its unstable vertical position [2, 12, 30]. In this paper, we would like to consider the control problem of stabilizing the pendulum around the unstable vertical position when subjected to time-varying uncertainties.
Several robust controllers were proposed for dealing with uncertainties and disturbances in the Furuta system. Yu et al. [34] proposed a robust controller to stabilize the Furuta pendulum under bounded perturbation. Khanesar et al. [22] used a fuzzy sliding controller to drive a rotary inverted pendulum to the vertical position subject to bounded uncertainties and disturbances. Park et al. [29] presented a swing-up and stabilization control with coupled sliding mode control. Some other robust designs can be found in the recent papers by Iraj et al. [21], Muske et al. [24], Ashrafiuon and Whitman [4], and Uchiyama et al. [33]. A common assumption to these robust designs is that the variation bounds of the uncertainties and disturbances have to be available; otherwise, the design is not feasible.
The other approach to deal with system uncertainties is the adaptive control. However, few reports can be found. Matsuda et al. [23] proposed a variable structure system type adaptive controller to stabilize the pendulum at the upright position. Hirata et al. [16] presented a robust adaptive control for the stabilization problem of the Furuta pendulum. Similar to the traditional adaptive design, the uncertainties in these approaches are assumed to be linearly parameterized as a multiplication of a known regressor matrix and an unknown constant vector. If this regressor form cannot be achieved, the adaptive design fails. In this paper, we consider the case when the system dynamics contains time-varying uncertainties that cannot be represented in the regressor form. Therefore, we may not apply the traditional adaptive design. In addition, let us assume that the variation bounds of these time-varying uncertainties are not available; the conventional robust designs are not feasible either. Here, we would like to design a function approximation technique (FAT) based adaptive controller to cover the time-varying uncertainties [7, 8, 17–20].
The rotary inverted pendulum is well-known to be an underactuated system [7, 11] where fewer actuators are used to drive the system than its degree of freedom. To decouple the underactuated dynamics, Olfati’s transformation [27, 28] is used to transform the system into a special cascade form [7]. Together with the FAT-based adaptive controller, the closed loop stability can be justified with the Lyapunov-like method. Simulation cases are designed to justify the effectiveness of the proposed method.
This paper is organized as follows. Section 2 derives the system dynamics and introduces Olfati’s transformation. The FAT-based adaptive controller is proposed in Sect. 3. Section 4 presents the simulation results. The last section concludes the paper.
2 System dynamics and Olfati’s transformation
Consider the rotary inverted pendulum shown in Fig. 1 where I 1 is the moment of inertia of the arm, L 1 is the arm length, m 3 is the mass of the pendulum, ℓ 3 is the distance to the center of gravity of the pendulum, J 3 is the inertia of the pendulum around its center of gravity, θ 1 is the angular displacement of the arm, θ 3 is the angular displacement of the pendulum, F d is the external force disturbance, and τ is the torque applied to the arm. The system dynamics can be represented by the set of differential equations
where \(\boldsymbol{\theta} = [\begin{array}{cccc} \theta_{1} & \theta_{2} & \theta_{3} & \theta_{4} \end{array}]^{T}\) is a vector of states, and functions f 1, f 2, b 1, and b 2 are defined as
Suppose f 1 and f 2 are unknown functions without knowing their variation bounds, while b 1 is known. The uncertain function b 2 is assumed to be bounded as b min≤b 2≤b max with known bounds. The nominal value of b 2 is defined as \(b_{m} = \sqrt{b_{\min} b_{\max}}\) so that we may represent b 2 as b 2=b m Δb where Δb is the uncertainty satisfying \(0 < \delta_{\min} \equiv \frac{b_{\min}}{b_{m}} \le \Delta b \le \frac{b_{\max}}{b_{m}} \equiv \delta_{\max}\).
Since the system is well-known to be underactuated, we would like to apply Olfati’s transformation [27, 28] to represent the system in a special cascade form so that the underactuated dynamics can be eliminated. By using the coordinate transformation
we have the system dynamics in the new space given by
where \(\mathbf{z} = [\begin{array}{cccc} z_{1} & z_{2} & z_{3} & z_{4} \end{array}]^{T}\) is the new state vector and
It is seen that system (3) is in a special cascade form and d is a mismatched time-varying uncertainty without knowing its variation bound. To deal with the mismatched uncertainty, a backstepping-like design called multiple-surface sliding control is employed with the function approximation technique to give appropriate compensation. To unify the derivation, we would like to represent (3) as
where d 1=0 and d 2=d(z).
3 Controller design
Define y=z 1 as the output signal of system (4) and y d (t) is its desired trajectory. Let us consider the error signals
where z id is the desired value forz i . These error signals can be regarded as a set of surfaces in some error space. Let z 1d =y d (t). Then the time derivative of s 1 can be found as
To stabilize (6), we may regard z 2d as a virtual control, and it is selected to be \(z_{2d} = \dot{y}_{d} - c_{1}\frac{s_{1}}{\phi_{1}}\) where c 1 is a positive constant and ϕ 1>0 is the thickness of the boundary layer for the surface s 1=0. With this selection of z 2d , (6) becomes
It can be seen that if s 2 is small, then s 1 will also be small. Taking the time derivative of s 2, we have
where \(\dot{z}_{2d} = \ddot{y}_{d} - \frac{c_{1}}{\phi_{1}}(z_{2} - \dot{y}_{d})\). To stabilize (8), we may regard z 3d as a virtual control which can be designed as
where c 2 and ϕ 2 are positive constants, and \(\hat{d}_{2}\) is an estimate of the mismatched uncertainty d. Hence, (8) can be derived as
If s 3 is small and some update law can be designed so that \(d_{2} - \hat{d}_{2}\) is small, then (10) implies that the magnitude of s 2 is small. To evaluate the dynamics of s 3, let us take its time derivate as
where \(\dot{z}_{3d}\) is a function of the uncertainty d 2, so it is also unknown. To simplify the derivation, let us define \(d_{3} = - \dot{z}_{3d}\) and we may select \(z_{4d} = - \hat{d}_{3} - c_{3}\frac{s_{3}}{\phi_{3}}\) to have
Finally, the dynamics of s 4 is found as
Define \(f = f_{2} - \dot{z}_{4d}\), and we have
We may thus design the control law as
where \(\hat{f}\) is an estimate of f and c 4>0 and ϕ 4>0 are constants and u r is a robust term to be designed. Substituting the control law u into (13), we have
At this stage, we have already obtained the dynamics of error surfaces in (7), (10), (12), and (15). Let us collect them to form the error dynamics for the whole system as
If a robust term u r can be designed so that the term \((1 - \Delta b)(\hat{f} + c_{4}\frac{s_{4}}{\phi_{4}})\) in (16d) can be properly covered, and an update law for \(\hat{f}\) can be found such that \(\hat{f} \to f\), then we may have the convergence of s 4. Likewise, if an update law for \(\hat{d}_{3}\) can be derived to satisfy \(\hat{d}_{3} \to d_{3}\), then (16c) implies the convergence of s 3. Again, if we may design an update law for \(\hat{d}_{2}\) such that \(\hat{d}_{2} \to d_{2}\), then (16b) gives s 2→0. Finally, with the convergence of s 2, we may conclude the convergence of s 1 from (16a). To design these update laws, we would like to apply the function approximation technique [8, 17–20]. Define d 4=f and \(\hat{d}_{4} = \hat{f}\), then we have the representations
where z i is a known vector of basis functions, w i and \(\hat{\mathbf{w}}_{i}\) are respectively the coefficient vector and its estimate, and ε i is the approximation error. Note that d 1=0, and the representation in (17) for d 1 and \(\hat{d}_{1}\) is only for convenience in the following derivation. Hence, we may rewrite (16a)–(16d) as
where \(\tilde{\mathbf{w}}_{i} = \mathbf{w}_{i} - \hat{\mathbf{w}}_{i}\) are approximation errors for the coefficient vectors, and \(\eta_{i} = \frac{c_{i}}{\phi_{i}}\), i=1,…,4 are positive constants. Define a Lyapunov-like function
where Γ 4 is a positive definite matrix. Taking the time derivative of (19) along the trajectory of (18), we have
Select the update law for \(\hat{\mathbf{w}}_{4}\) as
where σ 4 is a positive number. Hence, (20) can be written as
By using the inequalities
Eq. (22) can be derived as
where α 4 is selected as \(\alpha_{4} \le \min \{ \eta_{4},\frac{\sigma_{4}}{\lambda_{\max} (\boldsymbol{\varGamma}_{4})} \}\) to give
Hence, \(\dot{V}_{4} < 0\) whenever
Note that φ 4 is a positive constant, and hence we may conclude that (\(s_{4},\tilde{\mathbf{w}}_{4}\)) is uniformly ultimately bounded. In addition, given any μ 4>0, there exist T 4≥t 0≥0 such that
Along the same line, we can choose the Lyapunov-like functions
By taking the time derivatives of these functions along the trajectory of (18), we may have the update laws to be selected as
After some rearrangements, the time derivative of V i becomes
where \(\alpha_{i} \le \min \{ \eta_{i},\frac{\sigma_{i}}{\lambda_{\max} (\boldsymbol{\varGamma}_{i})} \},i = 1,2,3\). For t 0≤t<T i+1, we may have \(\dot{V}_{i} < 0\) whenever
\(\varphi_{i} \equiv \frac{\sigma_{i}}{2\alpha_{i}}\Vert \mathbf{w}_{i} \Vert ^{2} + \frac{1}{2\alpha_{i}\eta_{i}}[ \sup_{\tau \ge t_{0}}\vert \varepsilon_{i}(\tau ) \vert + \sqrt{2\max \{ \begin{array}{cc} V_{i + 1}(t_{0}), & \phi_{i + 1} + \mu_{i + 1} \end{array}\}} ]^{2}\). This implies that V i is bounded for all t∈[t 0,T i+1], i.e., before convergence of V i+1, V i is bounded. Define \(\varphi '_{i} \equiv \frac{\sigma_{i}}{2\alpha_{i}}\Vert \mathbf{w}_{i} \Vert ^{2} + \frac{1}{2\alpha_{i}\eta_{i}} [ \sup_{\tau \ge t_{0}}\vert \varepsilon_{i}(\tau ) \vert + \sqrt{2(\phi_{i + 1} + \mu_{i + 1})} ]^{2}\), then after the convergence of V i+1 (i.e., when t≥T i+1) to \(\varphi '_{i + 1} + \mu_{i + 1}\), V i is bounded. We have thus proved that (\(s_{i},\tilde{\mathbf{w}}_{i}\)) is uniformly ultimately bounded. Therefore, we have established the order of convergence from s 4 to s 1. During the convergence of s i , the boundedness of s j , j=i−1,…,1 is ensured. Specifically, when t≥T 1, we have
Hence the proposed controller ensures that the output error of the rotary inverse pendulum system will be bounded by some constants adjustable by controller parameters. In this work, the performance is achieved subject to mismatched time-varying uncertainties.
4 Computer simulations
To verify the effectiveness of the proposed design, let us consider the system in Fig. 1 again. The initial condition is assumed to be \(\boldsymbol{\theta} (0) = [\begin{array}{cccc} 1 & 0 & - 1 & 0 \end{array}]^{T}\), and we would like to bring the desired state to the origin. The actual values of system parameters [10] are m 3=5.38×10−2 kg, J 3=1.98×10−4 kg m2, ℓ 3=0.113 m, g=9.8 m/s2, L 1=0.215 m, I 1=1.75×10−2 kg m2. The parameters for modeling b 2 can be computed to be b min=−81.79, b max=−40.08, b m =57.26, δ max=−0.69997, δ min=−1.4284. The weighting matrices are chosen as Γ 2=32I, Γ 3=35I, Γ 4=40I, and the constant σ is set to zero. The external disturbance is applied to the system during 4 to 6 seconds with F d =20sin(20t) as shown in Fig. 2. The initial weighting matrices for the function approximation are set to \(\hat{w}_{i}(0) = [0\ 0 \cdots 0 ]^{T},i = 2,3,4\). The 21-term Fourier series is used as the basis in the function approximation. Two cases are considered in the simulation study.
4.1 CASE 1. Constant parameters
In this case, system parameters m 3 and ℓ 3 are assumed to be unknown constants. The controller parameters are selected as c 1=50,c 2=20,c 3=0.06, c 4=1×10−9 and ϕ i =1,i=1,…,4. The simulation results are shows in Figs. 3 and 4. Figure 3 shows that both the arm and pendulum positions converge to their desired values in 3 seconds regardless of the system uncertainties. With the presence of the external disturbances during 4 to 6 seconds, the pendulum exhibits some deviations in the trajectories. However, the proposed controller is robust enough to keep the states in the neighborhoods of the equilibrium points and bring them back to the desired values right after the absence of the disturbance. Figure 4 shows that the control law is realizable.
4.2 CASE 2. Time-varying parameters
In this case, we consider the case when both values of the pendulum mass and center of gravity are time-varying as
All other system parameters remain the same as those in the previous case. The controller parameters are selected as c 1=60, c 2=30, c 3=0.06, c 4=1×10−8 and ϕ i =1,i=1,…,4. The simulation results are presented in Figs. 5 and 6. Figure 5 shows that both the arm and pendulum converge to their desired values in 3 seconds even with the time-varying parameters. The robustness of the controller is still sufficient to regulate the system in a bounded region near the equilibrium point when the external force appears during 4 to 6 seconds. Figure 6 depicts the control effort.
5 Conclusions
We have proposed an adaptive controller for a rotary inverted pendulum system subject to time-varying uncertainties and external disturbances. We first apply Olfati’s transformation to the system dynamics, and then the function approximation technique is utilized to estimate the uncertainties. Based on the Lyapunov-like stability theory, the closed-loop stability is proved to be ultimately uniformly bounded. Experimental results show that the proposed design is able to give proper performance regardless of various uncertainties and disturbances.
References
Acosta, J.A.: Furuta’s pendulum: a conservative nonlinear model for theory and practice. Math. Probl. Eng. (2010). Article ID 742894
Aguilar, L.T., Boiko, I., Fridman, L., Iriarte, R.: Generating self-excited oscillations via two-relay controller. IEEE Trans. Autom. Control 54(2), 416–420 (2009)
Astrom, K.J., Aracil, J., Gordillo, F.: A family of smooth controller for swinging up a pendulum. Automatica 36(2), 1841–1848 (2008)
Ashrafiuon, H., Whitman, A.M.: Closed-loop dynamic analysis of a rotary inverted pendulum for control design. J. Dyn. Syst. Meas. Control 134, 024503 (2012)
Bartolini, G., Pisano, A., Usai, E.: Second-order sliding-mode control of container cranes. Automatica 38(10), 1783–1790 (2002)
Aguilar-Ibañez, C., Suárez-Castañon, M.S., Gutiérres-Frias, O.O.: The direct Lyapunov method for the stabilisation of the Furuta pendulum. Int. J. Control 83(11), 2285–2293 (2010)
Chen, Y.F., Huang, A.C.: Controller design for a class of underactuated mechanical systems. IET Control Theory Appl. 6(1), 103–110 (2012)
Chien, M.C., Huang, A.C.: Adaptive control of flexible-joint electrically-driven robot with time-varying uncertainties. IEEE Trans. Ind. Electron. 54(2), 1032–1038 (2007)
Fantoni, I., Lozano, R.: Stabilization of the Furuta pendulum around its homoclinic orbit. Int. J. Control 75(6), 390–398 (2002)
Fantoni, I., Lozano, R.: Nonlinear Control for Underactuated Mechanical Systems. Springer, Berlin (2001)
Fang, Y., Dixon, W.E., Dawson, D.M., Zergeroglu, E.: Nonlinear coupling control laws for an underactuated overhead crane system. IEEE/ASME Trans. Mechatron. 8(3), 418–423 (2003)
Freidovich, L., Shiriaev, A., Gordillo, F., Gomez-Estern, F., Aracil, J.: Partial-energy-shaping control for orbital stabilization of high-frequency oscillations of the Furuta pendulum. IEEE Trans. Control Syst. Technol. 17(4), 853–858 (2009)
Furuta, K., Yamakita, M., Kobayashi, S.: Swing-up control of inverted pendulum. In: Proceedings of the International Conference on Industrial Electronics, Control and Instrumentation (IECON’91), pp. 2193–2198 (1991)
Gordillo, F., Acosta, J.A., Aracil, J.: A new swing-up law for the Furuta pendulum. Int. J. Control 76(8), 836–844 (2003)
Hera, P.X.L., Freidovich, L.B., Shiriaev, A.S., Mettin, U.: New approach for swing up the Furuta pendulum: theory and experiments. Mechatronics 19, 1240–1250 (2009)
Hirata, H., Takabe, T., Anabuki, M., Ouchi, S.: Vss robust adaptive control including a self-tuning controller for a rotary inverted pendulum. Electron. Commun. Jpn., Part 2, Electron. 94(6), 48–58 (2011)
Huang, A.C., Chen, Y.C.: Adaptive sliding control for single-link flexible-joint robot with mismatched uncertainties. IEEE Trans. Control Syst. Technol. 12(5), 770–775 (2004)
Huang, A.C., Chen, Y.C.: Adaptive multiple-surface sliding control for non-autonomous systems with mismatched uncertainties. Automatica 40(11), 1939–1945 (2004)
Huang, A.C., Chien, M.C.: Adaptive Control of Robot Manipulators—A Unified Regressor-Free Approach. World Scientific, Singapore (2010)
Huang, A.C., Kuo, Y.S.: Sliding control of nonlinear systems containing time-varying uncertainties with unknown bounds. Int. J. Control 74(3), 252–264 (2001)
Iraj, H., Saleh, M.: Controller design for rotary inverted pendulum system using evolutionary algorithms. Math. Probl. Eng. (2011)
Khanesar, M.A., Teshnehlab, M., Shoorehdeli, M.A.: Fuzzy sliding mode control of rotary inverted pendulum. In: IEEE International Conference on Computational Cybernetics, pp. 57–62 (2007)
Matsuda, N., Izutsu, M., Ishikawa, J., Furuta, K., Artrom, K.J.: Swing-up and stabilization control based on natural frequency for pendulum systems. In: American Control Conference, June 2009, pp. 5291–5296 (2009)
Muske, K.R., Ashrafiuon, H., Nersesov, S., Nikkhah, M.: Optimal sliding mode cascade control for stabilization of underactuated nonlinear systems. J. Dyn. Syst. Meas. Control 134, 021020 (2012)
Nair, S.: A normal form for energy shaping: application to the Furuta pendulum. In: Proc. of IEEE Conference on Decision and Control, Dec. 2002, vol. 1, pp. 516–521 (2002)
Olfati-Saber, R.: Fixed point controllers and stabilization of the cart-pole and rotating pendulum. In: Proceedings of the 38th Conference on Decision and Control, Dec. 1999, vol. 1, pp. 1174–1181 (1999)
Olfati-Saber, R.: Normal forms for underactuated mechanical systems with symmetry. IEEE Trans. Autom. Control 47(2), 305–308 (2002)
Olfati-Saber, R., Megretasi, A.: Controller design for a class of underactuated nonlinear systems. In: Proc. of IEEE Conf. on Decision and Control, Dec. 1998, vol. 4, pp. 4182–4187 (1998)
Park, M.S., Chwa, D.: Swing-up and stabilization control of inverted-pendulum systems via coupled sliding-mode control method. IEEE Trans. Ind. Electron. 56(9), 3541–3555 (2009)
Shiriaev, A.S., Freidovich, L.B., Robertsson, A., Johansson, R., Sandberg, A.: Virtual-holonomic-constraints-based design of stable oscillations of Furuta pendulum: theory and experiments. IEEE Trans. Robot. 23(4), 827–832 (2007)
Sukontanakarn, V., Parnichkun, M.: Real-time optimal control for rotary inverted pendulum. Am. J. Appl. Sci. 6, 1106–1115 (2009)
Turker, T., Gorgun, H., Cansever, G.: Lyapunov’s direct method for stabilization of the Furuta pendulum. Turk. J. Electr. Eng. Comput. Sci. 120(1), 99–110 (2012)
Uchiyama, N.: Robust control of rotary crane by partial-state feedback with integrator. Mechatronics 19(8), 1294–1302 (2009)
Yu, C.H., Wang, F.C., Lu, Y.J.: Robust control of a Furuta pendulum. In: SICE Annual Conference, Aug. 2010, pp. 2559–2563 (2010)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited.
About this article
Cite this article
Chen, YF., Huang, AC. Adaptive control of rotary inverted pendulum system with time-varying uncertainties. Nonlinear Dyn 76, 95–102 (2014). https://doi.org/10.1007/s11071-013-1112-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11071-013-1112-4