GA-PID Control for Ball and Beam: Simulation and Experiment

Van-Chinh Pham*, Duy-Tan Hoang, Van-Dong-Hai Nguyen, Quoc-Dai Cao, Huu-Thanh-Thuat Nguyen, Dinh-Trung Thai, Tan-Dat Le, Vo-Trung-Thong Le

Ho Chi Minh city University of Technology and Education (HCMUTE)
Street, No.1, Vo Van Ngan, Linh Chieu, Thu Duc, Ho Chi Minh City, Viet Nam
* Corresponding author. E-mail:

Robotica & Management, Vol. 27, No. 2, pp. 29-35

Abstract: The Ball and Beam system with Deviated Axis is a single input-muti output (SIMO) system commonly used in laboratories to test control algorithms. In this paper, we build and investigate an PID-GA controller in simulation and apply to real model. The controller demonstrates the ability to control the balancing statement in different desired positions. Next, we conduct a survey of the above method in the object name Ball and beam system with deviated axis through STM32F4. Through simulation and experiment, our PID controller has successfully controlled the system and GA-PID has optimize well PID parameters. In addition, the control parameters had been adjusted to verify and summerize the theoretical rules.

Keywords: PID control, Ball and Beam, genetic algorithm, STM32F4, SIMO system.

Full text


[1] Nguyen M.T., Dao M.T., Vu D.D., Ho T.N., Nguyen, M.H., Nguyen V., Đông H., Nguyen T.O.: “Method of sliding mode control for ball – beam systems”, Journal of Technical Education Science, (39), 37–42, 2016.

[2] Quanser company: “Quanser Ball and Beam: User Manual BB01”.

[3] Link:

[4] Ang K.H, Chong G., Li Y.: “PID control system analysis, design, and technology”, in IEEE Transactions on Control Systems Technology, vol. 13, no. 4, pp. 559-576, July 2005.

[5] Anand S., Prasad R.: “Modeling and Control of Ball and Beam system”, International Journal of Engineering Research in Electronics and Communication Engineering (IJERECE), ISSN: 2394-6849, Vol. 4, Issue 9, pp. 1-7, Sep-2017.

[6] Hoang H.T.: “Intelligent Control System”, Publish House of National University of Ho Chi Minh city, 2006.

[7] Nguyen V.D.H.: “Building feedback linearization control for cart and pole system”, Master Thesis of Automation and Control, 2011.

[8] Almutairi N.B., Zribi M.: “On the sliding mode control of a Ball on a Beam system”, Springer Science+Business Media B.V. 200, June, 2009.

[9] Shah M., Ali R., Malik F.M.: “Control of Ball and Beam with LQR Control Scheme using Flatness Based Approach”, International Conference on Computing, Electronic and Electrical Engineering (ICE Cube), 2018.

[10] Devan V.: “Sliding Mode Control – A Survey”, Master thesis of Engineering (Aerospace), Defence Institute of Advanced Technology Deemed University, November 2014.

[11] Moraga C.: “Introduction to Fuzzy Logic”, Facta Universitatis, Serie E.E., University of Nis, Serbia, 18(2). 2005.

[12] Grossi E., Buscema M.: “Introduction to artificial neural networks”, European Journal of Gastroenterology & Hepatology, January 2008.