Skip to main content
Log in

Robust Control of Rotary Inverted Pendulum Using Metaheuristic Optimization Techniques Based PID and Fractional Order P\({{\text{I}}}^{\uplambda }{{\text{D}}}^{\upmu }\) Controller

  • Original Paper
  • Published:
Journal of Vibration Engineering & Technologies Aims and scope Submit manuscript

Abstract

Purpose

Rotary inverted pendulum (RotIP) innates unstable and underactuated behaviour that is helpful in the realisation of many real-world problems. It is very challenging to identify and control the dynamics of RotIP system due to its nonlinear, complex, underactuated and unpredictable nature. The primary objective of this work is to improve the swing-up and stabilization performances of RotIP in comparison to the existing approaches. This paper aims to propose the modelling and optimal design of a PID and Fractional Order PID (\({{\text{PI}}}^{\uplambda }{{\text{D}}}^{\upmu }\)) controller with Integral ANTI-WINDUP technique along with variable velocity setpoints for the robust stabilization and control of the RotIP system by using metaheuristic optimization techniques.

Methods

Different controllers like PID, Fractional order PID with Integral ANTI-WINDUP technique with variable velocity setpoints (Vsw), are implemented over the RotIP system. The parameters P, I, λ, D and μ of the Fractional Order PID (\({{\text{PI}}}^{\uplambda }{{\text{D}}}^{\upmu }\)) controller are tuned by two optimization techniques i.e. genetic algorithm (GA) and particle swarm optimization (PSO) based on Integral Time Absolute Error (ITAE). Simulation and real-time experimentation analysis of the transient response and steady-state response has been done for both the controllers to see the overall control performances in comparison to conventional PID controller for RotIP system. The pendulum angle, rotary arm angle and controlled input voltage comparisons are executed with the developed control schemes for both simulation and real-time experimentation purpose.

Results

This study uses the QUARC target libraries in MATLAB to provide a hardware-in-loop structure to enable a real-time controller interface. Swing-up and balancing control responses of inverted pendulum have been carried out in simulation and real time with PID, Fractional Order PID controller and optimization using GA and PSO. The responses of rotary arm angle (\(\varnothing\)), pendulum angle (β) and controlled input voltage (ap) are observed in simulation and in real-time operation respectively. The responses and parametric data of State feedback Balance control, PID and FOPID controllers implied that when rotary arm angle (\(\varnothing\)) is tracking a ± 20° angle square wave in case of State feedback Balance control and ± 8° angle square wave in case of PID and FOPID, maximum pendulum angle (βmax) and maximum controlled input voltage (amax) for both Simulated and experimental responses are within the specified limits of |β| < 20 (deg) and maximum control effort \(\left({a}_{max}\right)=10v\).

Conclusion

The analysis of transient response and steady-state response of both simulation and real-time experimentation implies that Fractional Order PID (\({{\text{PI}}}^{\uplambda }{{\text{D}}}^{\upmu }\)) compensator provides overall better control performances as compared to conventional PID controller for RotIP system. Simulation and real-time experimentation results shows that GA & PSO tuned PID provides better optimized responses as compared to PID response but PSO tuned PID reduced the peak overshoot very significantly as compared to PID and GA tuned PID. In case of settling time, both GA & PSO tuned controllers gives somewhat similar results. GA & PSO tuned Fractional order PID controller reduced the peak overshoot and settling time very significantly as compared to fractional order PID controller. Between optimization algorithms, PSO tuned \({{\text{PI}}}^{\uplambda }{{\text{D}}}^{\upmu }\) controller provides overall better optimized results. PSO provides much better optimized results for both PID and \({{\text{PI}}}^{\uplambda }{{\text{D}}}^{\upmu }\) controllers as compared to the results provided by GA. The primary feature of the proposed controllers is that it resolves the issue of robustness, accuracy, dependability and complexity as compared to many existing algorithms.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

Data Availability

The datasets used and/or analyzed during the current study available from the corresponding author on reasonable request.

Code Availability

Code is available.

References

  1. Chen Y-F, Huang A-C (2012) Controller design for a class of underactuated mechanical systems. IET Control Theory Appl 6(1):103–110

    Article  MathSciNet  Google Scholar 

  2. Aguilar-Avelar C, Moreno-Valenzuela J (2015) A composite controller for trajectory tracking applied to the Furuta pendulum. ISA Trans 57:286–294

    Article  Google Scholar 

  3. Iqbal J, Ullah M, Khan SG, Khelifa B, Ćukovic S (2017) Nonlinear control systems -A brief overview of historical and recent advances. Nonlinear Eng 6:301–312

    Article  Google Scholar 

  4. Hamza MF et al (2019) Current development on using rotary inverted pendulum as a benchmark for testing linear and nonlinear control algorithms. Mech Syst Signal Process 116:347–369

    Article  Google Scholar 

  5. Limebeer DJN, Massaro M (2018) Dynamics and Optimal Control of Road Vehicles. Oxford University Press, Oxford, UK

    Book  Google Scholar 

  6. Gurriet T, Mote M, Singletary A, Nilsson P, Feron E, Ames AD (2020) ‘A scalable safety critical control framework for nonlinear systems.’ IEEE Access 8:187249–187275

    Article  Google Scholar 

  7. Minorsky N (1941) ‘Control problems.’ J Franklin Inst 232(6):519–551

    Article  Google Scholar 

  8. Younis W, Abdelati M (2009) Design and implementation of an experimental segway model, in AIP Conference Proceedings, Vol. 1107, no. 1, pp. 350–354, AIP

  9. Elhasairi A, Pechev A (2015) Humanoid robot balance control using the spherical inverted pendulum mode. Frontiers in Robotics and AI. https://doi.org/10.3389/frobt.2015.00021

    Article  Google Scholar 

  10. Hughes PC (2012) Spacecraft Attitude Dynamics. Courier Corporation, Dover, UK

    Google Scholar 

  11. Wang P, Man Z, Cao Z, Zheng J, Zhao Y (2016) Dynamics modelling and linear control of quadcopter, International Conference on Advanced Mechatronic Systems (ICAMechS-16), pp. 498-503.

  12. Boubaker O (2013) ‘The inverted pendulum benchmark in nonlinear control theory: A survey.’ Int J Adv Robotic Syst 10(5):1–9

    Google Scholar 

  13. Kumar EV, Jerome J (2013) Robust LQR controller design for stabilizing and trajectory tracking of inverted pendulum. Procedia Eng 64:169–178

    Article  Google Scholar 

  14. Rojas-Moreno A, Hernandez-Garagatti J, Vega PDL, Lopez-Lozano L (2016) FO based-LQR stabilization of the rotary inverted pendulum, in Proceedings of the 28th Chinese Control and Decision Conference (CCDC 2016), pp. 4292–4297.

  15. Wen J, Shi Y, Lu X (2017) Stabilizing a Rotary inverted pendulum based on Logarithmic Lyapunov function. J Control Sci Eng 2017:1–17

    MathSciNet  Google Scholar 

  16. Türker T, Görgün H, Cansever G (2012) Lyapunov’s direct method for stabilization of the Furuta pendulum. Turk J Electr Eng Comput Sci 20:99–110

    Google Scholar 

  17. Wang J-J (2011) Simulation studies of inverted pendulum based on PID controllers. Simul Model Pract Theory 19(1):440–449

    Article  Google Scholar 

  18. Tang TF, Chong SH, Pang KK (2020) Stabilisation of a rotary inverted pendulum system with double-PID and LQR control: experimental verification. Int J Autom Control 14(1):18–33

    Article  Google Scholar 

  19. Abut T, Soyguder S (2019) Real-time control and application with self tuning PID-type fuzzy adaptive controller of an inverted pendulum. Int J Robot Res Appl 46:159–170

    Article  Google Scholar 

  20. Moreno-Valenzuela J (2016) Adaptive neural network control for the trajectory tracking of the furuta pendulum. IEEE Trans Cybern 46:3439–3452

    Article  Google Scholar 

  21. de Carvalho A, Justo JF, Angélico BA, de Oliveira AM, da Silva Filho JI (2021) Rotary Inverted pendulum identification for control by paraconsistent neural network. IEEE Access 9:74155–74167

    Article  Google Scholar 

  22. Kim J-B et al (2019) Imitation reinforcement learning-based remote rotary inverted pendulum control in OpenFlow network. IEEE Access 7:36682–36690

    Article  Google Scholar 

  23. Dai Y, Lee K, Lee S (2021) A real-time HIL control system on rotary inverted pendulum hardware platform based on double deep Q-network. Measurement and Control 54(3–4):417–428

    Article  Google Scholar 

  24. Hazem ZB, Fotuhi MJ, Bingül Z (2020) Development of a Fuzzy-LQR and Fuzzy-LQG stability control for a double link rotary inverted pendulum. J Franklin Inst 357(15):10529–10556

    Article  MathSciNet  Google Scholar 

  25. Susanto E, Wibowo AS, Rachman EG (2020) ‘Fuzzy swing up control and optimal state feedback stabilization for self-erecting inverted pendulum.’ IEEE Access 8:6496–6504

    Article  Google Scholar 

  26. Ilhami Y (2017) Model free sliding mode stabilizing control of a real rotary inverted pendulum. J Vib Control 23(10):1–18

    MathSciNet  Google Scholar 

  27. Mofid O, Alattas KA, Vu MT, Mobayen S, Bouteraa Y (2023) Adaptive finite-time command-filtered backstepping sliding mode control for stabilization of a disturbed rotary-inverted-pendulum with experimental validation. J Vib Control 29(5–6):1431–1446

    Article  MathSciNet  Google Scholar 

  28. Bingbing W, Chaoying L, Xueling S et al. (2015) Design and implementation of the inverted pendulum optimal controller based on hybrid genetic algorithm, International conference on automation, mechanical control and computational engineering, China, pp. 623–629, April 2015.

  29. Huang J, Zhang T, Fan Y, Sun J-Q (2019) Control of rotary inverted pendulum using model-free Backstepping technique. IEEE Access 7:96965–96973

    Article  Google Scholar 

  30. Yang X, Zheng X (2018) ‘Swing-up and stabilization control design for an underactuated rotary inverted pendulum system: Theory and experiments.’ IEEE Trans Ind Electron 65(9):7229–7238

    Article  Google Scholar 

  31. Waszak M, Langowski R (2020) ‘An automatic self-tuning control system design for an inverted pendulum.’ IEEE Access 8:26726–26738

    Article  Google Scholar 

  32. Lin L-G, Xin M (2020) Nonlinear control of two-wheeled robot based on novel analysis and design of SDRE scheme. IEEE Trans Control Syst Technol 28(3):1140–1148

    Article  MathSciNet  Google Scholar 

  33. Gonzalez O, Rossiter A (2020) Fast hybrid dual mode NMPC for a parallel double inverted pendulum with experimental validation. IET Control Theory Appl 14(16):2329–2338. https://doi.org/10.1049/iet-cta.2020.0130

    Article  MathSciNet  Google Scholar 

  34. Alamir M, Murilo A (2008) Swing-up and stabilization of a twin-pendulum under state and control constraints by a fast NMPC scheme. Automatica 44(5):1319–1324

    Article  MathSciNet  Google Scholar 

  35. Mehedi IM, Al-Saggaf UM, Mansouri R, Bettayeb M (2019) Stabilization of a double inverted rotary pendulum through fractional order integral control scheme. Int J Adv Robot Syst 16(4):1–9. https://doi.org/10.1177/1729881419846741

    Article  Google Scholar 

  36. Patra AK, Biswal SS, Rout PK (2022) Backstepping linear quadratic gaussian controller design for balancing an inverted pendulum. IETE J Res 68(1):150–164. https://doi.org/10.1080/03772063.2019.1592716

    Article  Google Scholar 

  37. Pratheep V, Priyanka E, Thangavel S, Gomathi K (2022) Genetic algorithm–based robust controller for an inverted pendulum using model order reduction. J Test Eval 49(4):2441–2455

    Article  Google Scholar 

  38. El-Sousy FFM, Alattas KA, Mofid O, Mobayen S, Fekih A (2022) Robust adaptive super-twisting sliding mode stability control of underactuated rotational inverted pendulum with experimental validation. IEEE Access 10:100857–100866. https://doi.org/10.1109/ACCESS.2022.3208412

    Article  Google Scholar 

  39. Zabihifar SH, Yushchenko AS, Navvabi H (2020) Robust control based on adaptive neural network for Rotary inverted pendulum with oscillation compensation. Neural Comput Appl 32(18):14667–14679. https://doi.org/10.1007/s00521-020-04821-x

    Article  Google Scholar 

  40. Hamza MF, Yap HJ, Choudhury IA (2015) Genetic algorithm and particle swarm optimization based cascade interval type 2 fuzzy PD controller for rotary inverted pendulum system. Math Probl Eng 2015:1–15. https://doi.org/10.1155/2015/695965

    Article  MathSciNet  Google Scholar 

  41. Jain A, Sharma A, Jately V, Azzopardi B, Choudhury S (2021) Real-time swing-up control of non-linear inverted pendulum using Lyapunov based optimized fuzzy logic control. IEEE Access 9:50715–50726. https://doi.org/10.1109/ACCESS.2021.3058645

    Article  Google Scholar 

  42. Abdullah M, Amin AA, Iqbal S, Mahmood-ul-Hasan K (2021) Swing up and stabilization control of rotary inverted pendulum based on energy balance, fuzzy logic, and LQR controllers. Meas Control (United Kingdom) 54(9–10):1356–1370. https://doi.org/10.1177/00202940211035406

    Article  Google Scholar 

  43. Chawla I, Singla A (2018) Real-time control of a rotary inverted pendulum using robust LQR-based ANFIS controller. Int J Nonlinear Sci Numer Simul 19(3–4):379–389

    Article  MathSciNet  Google Scholar 

  44. Dolatabad MR, Pasharavesh A, Khayyat AAA (2022) Analytical and experimental analyses of nonlinear vibrations in a rotary inverted pendulum. Nonlinear Dyn 107:1887–1902. https://doi.org/10.1007/s11071-021-06969-0

    Article  Google Scholar 

  45. Shalaby R, El-Hossainy M, Abo-Zalam B (2019) Fractional order modeling and control for under-actuated inverted pendulum. Commun Nonlinear Sci Numer Simul 74:97–121

    Article  MathSciNet  Google Scholar 

  46. Ghaleb AF, Oglah AA, Humaidi AJ, Al-Obaidi ASM, Ibraheem K (2023) Optimum of fractional order fuzzy logic controller with several evolutionary optimization algorithms for inverted pendulum. Int Rev Appl Sci Eng 14(1):1–12

    Google Scholar 

  47. Yang Y, Zhang HH (2023) RM Voyles “Optimal fractional-order proportional–integral–derivative control enabling full actuation of decomposed rotary inverted pendulum system.” Trans Inst Meas Control 45(10):1986–1998

    Article  Google Scholar 

  48. Zakeri E, Moezi SA, Eghtesad M (2019) Optimal interval type-2 fuzzy fractional order super twisting algorithm: A second order sliding mode controller for fully-actuated and under-actuated nonlinear systems. ISA Trans 85:13–32

    Article  Google Scholar 

  49. Mondal R, Dey J (2022) A novel design methodology on cascaded fractional order (FO) PI-PD control and its real time implementation to Cart-Inverted Pendulum System. ISA Trans 130:565–581

    Article  Google Scholar 

  50. Mondal R, Dey J (2020) Performance analysis and implementation of fractional order 2-DOF control on cart–inverted pendulum system. IEEE Trans Ind Appl 56(6):7055–7066

    Article  Google Scholar 

  51. Mondal R, Chakraborty A, Dey J, Halder S (2020) Optimal fractional order PIλDμ controller for stabilization of cart-inverted pendulum system: Experimental results. Asian Journal of Control 22(3):1345–1359

    Article  MathSciNet  Google Scholar 

  52. Balogh T, Insperger T (2023) Extending the admissible control-loop delays for the inverted pendulum by fractional-order proportional-derivative controller. J Vib Control 10775463231181662:1–9

    Google Scholar 

  53. Mukherjee D, Kundu P, Ghosh A (2019) A better stability control of inverted pendulum system using FMINCON based FOPID controller over fractional order based MRAC controller. Int J Natural Comput Res (IJNCR) 8(1):18–30

    Article  Google Scholar 

  54. Zangeneh-Madar MR, Mazinan AH (2020) Control of the inverted pendulum system: a Smith fractional-order predictive model representation. Sādhanā 45:1–5. https://doi.org/10.1007/s12046-020-01356-8

    Article  MathSciNet  Google Scholar 

  55. Dwivedi P, Pandey S, Junghare AS (2017) Stabilization of unstable equilibrium point of rotary inverted pendulum using fractional controller. J Franklin Inst 354(17):7732–7766

    Article  MathSciNet  Google Scholar 

  56. Saleem O, Mahmood-ul-Hasan K (2019) Robust stabilisation of rotary inverted pendulum using intelligently optimised nonlinear self-adaptive dual fractional-order PD controllers. Int J Syst Sci 50(7):1399–1414. https://doi.org/10.1080/00207721.2019.1615575

    Article  MathSciNet  Google Scholar 

  57. Pandey A, Adhyaru DM (2023) Robust control design for rotary inverted pendulum with unmatched uncertainty. Int J Dyn Control 11:1166–1177. https://doi.org/10.1007/s40435-022-01047-8

    Article  Google Scholar 

  58. Pramanik S, Anwar S (2022) Robust controller design for rotary inverted pendulum using H∞ and μ-synthesis techniques. J Eng 3:249–260

    Google Scholar 

  59. Mehedi IM, Ansari U, AL-Saggaf UM (2020) Three degrees of freedom rotary double inverted pendulum stabilization by using robust generalized dynamic inversion control: Design and experiments. J Vib Control 26:2174–2184

    Article  MathSciNet  Google Scholar 

  60. Mehedi IM, Ibrahim M, Ansari U, Bajodah AH, U. M. AL-Saggaf, B. Kada and M. J. Rawa, (2020) Underactuated rotary inverted pendulum control using robust generalized dynamic inversion. J Vib Control 26:2210–2220

    Article  MathSciNet  Google Scholar 

  61. Gupta N, Dewan L (2023) Modified grey wolf optimised adaptive super-twisting sliding mode control of rotary inverted pendulum system. J Control Decision 10(2):270–279. https://doi.org/10.1080/23307706.2022.2062621

    Article  MathSciNet  Google Scholar 

  62. Wang JJ, Liu GY (2019) Hierarchical sliding-mode control of spatial inverted pendulum with heterogeneous comprehensive learning particle swarm optimization. Inf Sci 495:14–36

    Article  MathSciNet  Google Scholar 

  63. Alimoradpour S, Rafie M, Ahmadzadeh B (2022) Providing a genetic algorithm-based method to optimize the fuzzy logic controller for the inverted pendulum. Soft Comput 26:5115–5130. https://doi.org/10.1007/s00500-022-07008-9

    Article  Google Scholar 

  64. Mai-Phuong DT, Van-Hung P, Ngoc-Khoat N, Van-Minh P (2022) Balancing a practical inverted pendulum model employing novel meta-heuristic optimization-based fuzzy logic controllers. Int J Adv Comp Sci Appl. https://doi.org/10.14569/IJACSA.2022.0130464

    Article  Google Scholar 

  65. Masrom MF, Ghani NMA, Tokhi MO (2021) Particle swarm optimization and spiral dynamic algorithm-based interval type-2 fuzzy logic control of triple-link inverted pendulum system: A comparative assessment. J Low Frequency Noise Vib Active Control 40(1):367–382

    Article  Google Scholar 

  66. Şen FN, Beldek U (2022) Genetic algorithm based stabilization of rotary inverted pendulum by state feedback, pp. 1–26.

  67. Llama M, Flores A, Garcia-Hernandez R, Santibañez V (2020) Heuristic global optimization of an adaptive fuzzy controller for the inverted pendulum system: Experimental comparison. Appl Sci 10(8):6158

    Article  Google Scholar 

  68. Bejarbaneh EY, Bagheri A, Bejarbaneh BY, Buyamin R (2018) Optimization of model reference adaptive controller for the inverted pendulum system using CCPSO and DE algorithms. Autom Control Comput Sci 52(4):256–267

    Article  Google Scholar 

  69. Babushanmugham S, Srinivasan S, Sivaraman E (2018) Assessment of optimisation techniques for sliding mode control of an inverted pendulum. Int J Appl Eng Res 3:11518–11524

    Google Scholar 

  70. Vishnu D, Joseph FM (2013) A non linear PID fuzzy approach for stabilization of inverted pendulum using particle swarm optimisation. Int J Eng Res Technol (IJERT). https://doi.org/10.17577/IJERTV2IS80073

    Article  Google Scholar 

  71. Gutarra A, Palomino S, Alegria EJ, Cisneros J (2022) Fuzzy controller design for rotary inverted pendulum system using genetic algorithms, 2022 IEEE ANDESCON, Barranquilla, Colombia, pp. 1–6, doi: https://doi.org/10.1109/ANDESCON56260.2022.9989988.

  72. Nagarajan A, Victoire AA (2023) Optimization reinforced PID-sliding mode controller for rotary inverted pendulum. IEEE Access 11:24420–24430. https://doi.org/10.1109/ACCESS.2023.3254591

    Article  Google Scholar 

  73. Blondin MJ, Pardalos PM (2020) A holistic optimization approach for inverted cart-pendulum control tuning. Soft Comput 24(6):4343–4359

    Article  Google Scholar 

  74. Quanser Inc., “Instructor Workbook—Inverted Pendulum Experiment for MATLAB®/Simulink® Users,” Markham, ON, Canada, 2011.

Download references

Funding

The authors received no specific funding for this study.

Author information

Authors and Affiliations

Authors

Contributions

Basant Tomar: Conceptualization and methodology, writing-original draft preparation, investigation, software, validation, editing; Narendra Kumar and Mini Sreejeth: Research design, formal analysis, guidance, and reviewing. All authors have read and approved the final manuscript.

Corresponding author

Correspondence to Basant Tomar.

Ethics declarations

Conflict of Interest

On behalf of all authors, the corresponding author states that there is no conflict of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary Information

Below is the link to the electronic supplementary material.

Supplementary file1 (DOCX 904 KB)

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Tomar, B., Kumar, N. & Sreejeth, M. Robust Control of Rotary Inverted Pendulum Using Metaheuristic Optimization Techniques Based PID and Fractional Order P\({{\text{I}}}^{\uplambda }{{\text{D}}}^{\upmu }\) Controller. J. Vib. Eng. Technol. (2024). https://doi.org/10.1007/s42417-024-01399-9

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s42417-024-01399-9

Keywords

Navigation