A Comparative Study of Traditional PID Tuning Techniques and AI-Based Algorithmic Approaches Utilizing the Python Control Library

Authors

DOI:

https://doi.org/10.33019/jurnalecotipe.v12i1.4574

Keywords:

Artificial Intelligence, Genetic Algorithm, Particle Swarm Optimization, PID Parameter, Ziegler-Nichols

Abstract

This study aims to compare PID parameter settings with conventional tuning methods and tune methods using AI (artificial intelligence) algorithms. This study was conducted by means of simulation using a computer program created in Python and utilizing AI libraries to solve the problem of determining PID (proportional-integral-derivative) parameters. Two AI algorithms used in this study, namely the Genetic Algorithm (GA) and Particle Swarm Optimization (PSO) methods, were compared with the conventional Ziegler-Nichols method. The study was conducted by applying the PID parameters obtained to a certain transfer function and then comparing them on several related aspects. The results of the study showed that the solution obtained using the AI method requires a longer execution time, more than 2 seconds for PSO and more than 3 seconds for GA, while ZN requires less than 1 second. However, the AI method can provide better solutions, as can be seen from the magnitude of the ITAE that occurs, where GA and PSO provide ITAE less than 1 while ZN is more than 22.

Downloads

Download data is not yet available.

References

[1] K. Ogata, “Modern Control Engineering. in Instrumentation and Controls Series”. Prentice Hall, 2010. [Online]. Available: https://books.google.co.id/books?id=Wu5GpNAelzkC

[2] J. G. Ziegler and N. B. Nichols, “Optimum Settings for Automatic Controllers,” Journal of Fluids Engineering, vol. 64, no. 8, pp. 759–765, Nov. 1942, doi: 10.1115/1.4019264.

[3] G. van Rossum, “Python Programming Language,” in USENIX Annual Technical Conference, 2007. [Online]. Available: https://api.semanticscholar.org/CorpusID:45594778

[4] C. R. Harris et al., “Array programming with NumPy” Nature, vol. 585, no. 7825, pp. 357–362, Sept. 2020, doi: 10.1038/s41586-020-2649-2.

[5] J. D. Hunter, “Matplotlib: A 2D Graphics Environment,” Computing in Science & Engineering, vol. 9, no. 3, pp. 90–95, 2007, doi: 10.1109/MCSE.2007.55.

[6] D. H. Kim, “Advanced Lecture for PID Controller of Nonlinear System in Python,” IJRTE, vol. 9, no. 6, pp. 20–29, Mar. 2021, doi: 10.35940/ijrte.F5375.039621.

[7] S. Fuller, B. Greiner, J. Moore, R. Murray, R. Van Paassen, and R. Yorke, “The Python Control Systems Library (python-control),” in 2021 60th IEEE Conference on Decision and Control (CDC), Austin, TX, USA: IEEE, Dec. 2021, pp. 4875–4881. doi: 10.1109/CDC45484.2021.9683368.

[8] P. Saraf, M. Gupta, and A. M. Parimi, “A Comparative Study Between a Classical and Optimal Controller for a Quadrotor,” Sept. 28, 2020, arXiv: arXiv:2009.13175. doi: 10.48550/arXiv.2009.13175.

[9] B. Smith, “Building a Simulated PID Controller in Python,” Medium. Accessed: July 31, 2025. [Online]. Available: https://medium.com/@bsmith4360/building-a-simulated-pid-controller-in-python-111b08ccae1a

[10] D. H. Kim and H. Alemayehu, “A study on Teaching Method of Control Engineering by Using Python Based PID,” International Advanced Research Journal in Science, Engineering and Technology, vol. 7, no. 9, pp. 1–9, Sept. 2020, doi: 10.17148/IARJSET.2020.7901. R. V. Petrosian, I. A. Pilkevych, and A. R. Petrosian, “Algorithm for optimizing a PID controller model based on a digital filter using a genetic algorithm,” in doors, 2023. [Online]. Available: https://api.semanticscholar.org/CorpusID:259115656

[11] A. A. Salem, M. A. Moustafa, and M. E. Ammar, “Tuning PID Controllers Using Artificial Intelligence Techniques.,” 2014. [Online]. Available: https://api.semanticscholar.org/CorpusID:199020399

[12] A. Taeib, A. Ltaeif, and A. Chaari, “A PSO Approach for Optimum Design of Multivariable PID Controller for nonlinear systems,” June 26, 2013, arXiv: arXiv:1306.6194. doi: 10.48550/arXiv.1306.6194.

[13] D. Goldberg, “Genetic Algorithm in Search, Optimization, and Machine Learning,” Addison-Wesley, Reading, Massachusetts, vol. xiii, Jan. 1989.

[14] J. Kennedy and R. Eberhart, “Particle swarm optimization,” in Proceedings of ICNN’95 - International Conference on Neural Networks, Nov. 1995, pp. 1942–1948 vol.4. doi: 10.1109/ICNN.1995.488968.

[15] D. Oliva, A. Ramos Michel, M. Navarro, E. H. Haro, and A. Casas, “Particle Swarm Optimization,” 2023, pp. 49–71. doi: 10.5281/zenodo.7537827.

Downloads

Published

30.10.2025

How to Cite

[1]
P. J. W. Widodo, “A Comparative Study of Traditional PID Tuning Techniques and AI-Based Algorithmic Approaches Utilizing the Python Control Library”, JurnalEcotipe, vol. 12, no. 2, pp. 234–244, Oct. 2025, doi: 10.33019/jurnalecotipe.v12i1.4574.