Design and Implementation of a Ball and Beam PID Control System Based on Metaheuristic Techniques

  • Ahmad Taher Azar
  • Nourhan AliEmail author
  • Sarah MakaremEmail author
  • Mohamed Khaled DiabEmail author
  • Hossam Hassan Ammar
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 1058)


The paper introduces a comparative analysis between three meta-heuristic techniques in the optimization of Proportional-Integral-Derivative (PID) controller for a cascaded control of a ball and beam system. The meta-heuristic techniques presented in this study are Particle Swarm Optimization (PSO), Artificial Bee Colony (ABC) and Bat Algorithm Optimization (BAO). The model uses a DC motor with encoder to move the beam and a camera as a feedback for the ball position on the beam. The control theory of the system depends on two loops; the first (inner) loop is the DC motor for position control. The three meta-heuristic techniques are applied for the tuning of the PID parameters then the efficiency of each algorithm is compared based on the time response, overshoot and steady state error. The BAT algorithm has proved to be more efficient in optimizing the controller for the motor position control. The same three algorithms are then applied for the outer loop: the Simulink model of the ball and beam system. Having the time response, overshoot and steady state error as the criteria, the PSO algorithm showed better performance in optimizing the controller for the overall system.


PID controller Cascaded control Meta-heuristics Optimization problems Ball and beam 


  1. 1.
    Negash, A., Singh, N.P.: Position control and tracking of ball and plate system using fuzzy sliding mode controller. In: Abraham, A., Krömer, P., Snasel, V. (eds.) Afro-European Conference for Industrial Advancement. Advances in Intelligent Systems and Computing, vol. 334. Springer, Cham (2015)Google Scholar
  2. 2.
    Yang, D.: Tuning of PID parameters based on particle swarm optimization. IOP Conf. Ser. Mater. Sci. Eng. 452, 042179 (2018). Scholar
  3. 3.
    Azar, A.T., Vaidyanathan, S.: Handbook of Research on Advanced Intelligent Control Engineering and Automation. Advances in Computational Intelligence and Robotics (ACIR) Book Series. IGI Global, USA (2015). ISBN 9781466672482Google Scholar
  4. 4.
    Kumar, J., Azar, A.T., Kumar, V., Rana, K.P.S.: Design of fractional order fuzzy sliding mode controller for nonlinear complex systems. In: Mathematical Techniques of Fractional Order Systems, Advances in Nonlinear Dynamics and Chaos (ANDC) Series, pp. 249–282 (2018)Google Scholar
  5. 5.
    Abdelmalek, S., Azar, A.T., Dib, D.: A novel actuator fault-tolerant control strategy of DFIG-based wind turbines using Takagi-Sugeno Multiple models. Int. J. Control Autom. Syst. 16(3), 1415–1424 (2018)CrossRefGoogle Scholar
  6. 6.
    Ammar, H.H., Azar, A.T., Tembi, T.D., Tony, K., Sosa, A.: Design and implementation of fuzzy PID controller into multi agent smart library system prototype. In: The International Conference on Advanced Machine Learning Technologies and Applications (AMLTA2018), AMLTA 2018. Advances in Intelligent Systems and Computing, vol. 723, pp. 127–137. Springer, Cham (2018)Google Scholar
  7. 7.
    Meghni, B., Dib, D., Azar, A.T.: A Second-order sliding mode and fuzzy logic control to optimal energy management in PMSG wind turbine with battery storage. Neural Comput. Appl. 28(6), 1417–1434 (2017)CrossRefGoogle Scholar
  8. 8.
    Azar, A.T., Serrano, F.E.: Design and modeling of anti wind up PID controllers. In: Zhu, Q., Azar, A.T. (eds.) Complex System Modelling and Control Through Intelligent Soft Computations, Studies in Fuzziness and Soft Computing, vol. 319, pp. 1–44. Springer (2015)Google Scholar
  9. 9.
    Ziegler, J., Nichols, N.B.: Optimum settings for automatic controllers. Trans. ASME 64(8), 759–768 (1942)Google Scholar
  10. 10.
    Meshram, P.M.R., Kanojiya, R.G.: Tuning of PID controller using Ziegler-Nichols method for speed control of DC motor. In: IEEE-International Conference on Advances in Engineering, Science and Management (ICAESM-2012), 30–31 March 2012, Nagapattinam, Tamil Nadu, India (2012)Google Scholar
  11. 11.
    Liu, G.P., Daley, S.: Optimal-tuning PID control for industrial systems. Control Eng. Pract. 9(11), 1185–1194 (2001)CrossRefGoogle Scholar
  12. 12.
    Azar, A.T., Serrano, F.E.: Robust IMC-PID tuning for cascade control systems with gain and phase margin specifications. Neural Comput. Appl. 25(5), 983–995 (2014)CrossRefGoogle Scholar
  13. 13.
    Azar, A.T., Ammar, H.H., de Brito Silva, G., Razali, M.S.A.B.: Optimal proportional integral derivative (PID) controller design for smart irrigation mobile robot with soil moisture sensor. In: The International Conference on Advanced Machine Learning Technologies and Applications (AMLTA2019), AMLTA 2019. Advances in Intelligent Systems and Computing, vol. 921, pp. 349–359. Springer, Cham (2020)Google Scholar
  14. 14.
    Gorripotu, T.S., Samalla, H., Jagan Mohana Rao, C., Azar, A.T., Pelusi, D.: TLBO algorithm optimized fractional-order PID controller for AGC of interconnected power system. In: Nayak, J., Abraham, A., Krishna, B., Chandra Sekhar, G., Das, A. (eds.) Soft Computing in Data Analytics. Advances in Intelligent Systems and Computing, vol. 758, pp. 847–855. Springer, Singapore (2019)Google Scholar
  15. 15.
    Luke, S.: Essentials of Metaheuristics. Lulu (2013)Google Scholar
  16. 16.
    Kennedy, J., Eberhart, R.: Particle swarm optimization. In: Proceedings of ICNN 1995 - International Conference on Neural Networks, vol. 4, pp. 1942–1948 (1995)Google Scholar
  17. 17.
    Karaboga, D.: An idea based on honey bee swarm for numerical optimization. Tech. Rep. J. Funct. Program. 15(4), 615–650 (2005)CrossRefGoogle Scholar
  18. 18.
    Yang, X.S.: A new metaheuristic bat-inspired algorithm. In: González, J.R., Pelta, D.A., Cruz, C., Terrazas, G., Krasnogor, N. (eds.) Nature Inspired Cooperative Strategies for Optimization (NICSO 2010). Studies in Computational Intelligence, vol. 284. Springer, Heidelberg (2010)Google Scholar
  19. 19.
    Ahmad, B., Hussain, I.: Design and hardware implementation of ball & beam setup. In: 2017 Fifth International Conference on Aerospace Science & Engineering (ICASE), Islamabad, Pakistan, 14–16 November 2017, pp. 1–6 (2017).
  20. 20.
    Corke, P.: Robotics, Vision and Control: Fundamental Algorithms In MATLAB. Springer Tracts in Advanced Robotics Book Series, STAR, vol. 73. Springer (2011)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  1. 1.School of Engineering and Applied ScienceNile UniversityGizaEgypt
  2. 2.College of EngineeringPrince Sultan UniversityRiyadhKingdom of Saudi Arabia
  3. 3.Faculty of Computers and Artificial IntelligenceBenha UniversityBenhaEgypt

Personalised recommendations