Particle Swarm Optimization (PSO) Tuning of PID Control on DC Motor

(1) Eka Suci Rahayu Mail (Universitas Ahmad Dahlan, Indonesia)
(2) * Alfian Ma'arif Mail (Universitas Ahmad Dahlan, Indonesia)
(3) Abdullah Çakan Mail (Konya Technical University, Turkey)
*corresponding author


The use of DC motors is now common because of its advantages and has become an important necessity in helping human activities. Generally, motor control is designed with PID control. The main problem that is often discussed in PID is parameter tuning, namely determining the value of the Kp, Ki, and Kd parameters in order to obtain optimal system performance. In this study, one method for tuning PID parameters on a DC motor will be used, namely the Particle Swarm Optimization (PSO) method. Parameter optimization using the PSO method has stable results compared to other methods. The results of tuning the PID controller parameters using the PSO method on the MATLAB Simulink obtained optimal results where the value of Kp = 8.9099, K = 2.1469, and Kd = 0.31952 with the value of rise time of 0.0740, settling time of 0.1361 and overshoot of 0. Then the results of hardware testing by entering the PID value in the Arduino IDE software produce a stable motor speed response where Kp = 1.4551, Ki= 1.3079, and Kd = 0.80271 with a rise time value of 4.3296, settling time of 7.3333 and overshoot of 1.


PID Control; PSO; Angular Speed; Arduino; Tuning



Article metrics

10.31763/ijrcs.v2i2.476 Abstract views : 2196 | PDF views : 917




Full Text



[1] I. S. Okoro and C. O. Enwerem, “Robust control of a DC motor,” Heliyon, vol. 6, no. 12, 2020,

[2] M. L. Dezaki, S. Hatami, A. Zolfagharian, and M. Bodaghi, “A pneumatic conveyor robot for color detection and sorting,” Cognitive Robotics, vol. 2, pp. 60–72, 2022,

[3] M. M. Ahmed, W. S. Hassanien, and M. A. Enany, “Modeling and evaluation of SC MPPT controllers for PVWPS based on DC motor,” Energy Reports, vol. 7, pp. 6044–6053, 2021,

[4] Hendra, S. Pebriyanto, Hernadewita, Hermiyetti, and Yoserizal, “Applying Programmable Logic Control (PLC) for Control Motors, Blower and Heater in the Rubber Drying Processing,” Jurnal Ilmiah Teknik Elektro Komputer dan Informatika, vol. 7, no. 1, pp. 131–141, 2021,

[5] M. Auzan, R. M. Hujja, M. R. Fuadin, and D. Lelono, “Path Tracking and Position Control of Nonholonomic Differential Drive Wheeled Mobile Robot,” Jurnal Ilmiah Teknik Elektro Komputer dan Informatika, vol. 7, no. 3, pp. 368–379, 2021,

[6] A. Maarif, R. D. Puriyanto, and F. R. T. Hasan, “Robot Keseimbangan Dengan Kendali Proporsional-Integral-Derivatif (PID) dan Kalman Filter,” IT Journal Research and Development (ITJRD), vol. 4, no. 2, pp. 117–127, 2020,

[7] R. Ashokkumar, M. Suresh, B. Sharmila, H. Panchal, C. Gokul, K. V. Udhayanatchi, K. K. Sadasivuni, and M. Israr, “A novel method for Arduino based electric vehicle emulator,” International Journal of Ambient Energy, 2021,

[8] D. Puangdownreong, “Fractional Order PID Controller Design for DC Motor Speed Control System via Flower Pollination Algorithm,” ECTI Transactions on Electrical Engineering, Electronics, and Communications, vol. 17, no. 1, pp. 14–23, 2019,

[9] E. Eker, M. Kayri, S. Ekinci, and D. Izci, “A New Fusion of ASO with SA Algorithm and Its Applications to MLP Training and DC Motor Speed Control,” Arabian Journal for Science and Engineering, vol. 46, no. 4, pp. 3889–3911, 2021,

[10] T. H. Mohamed, M. A. M. Alamin, and A. M. Hassan, “Adaptive position control of a cart moved by a DC motor using integral controller tuned by Jaya optimization with Balloon effect,” Computers & Electrical Engineering, vol. 87, p. 106786, 2020,

[11] T. P. Cabré, A. S. Vela, M. T. Ribes, J. M. Blanc, J. R. Pablo, and F. C. Sancho, “Didactic platform for DC motor speed and position control in Z-plane,” ISA Transactions, 2021,

[12] H. E. A. Ibrahim, F. N. Hassan, and A. O. Shomer, “Optimal PID control of a brushless DC motor using PSO and BF techniques,” Ain Shams Engineering Journal, vol. 5, no. 2, pp. 391–398, 2014,

[13] S. E. I. Hasseni, L. Abdou, and H. E. Glida, “Parameters tuning of a quadrotor PID controllers by using nature-inspired algorithms,” Evolutionary Intelligence, vol. 14, no. 1, pp. 61–73, 2019,

[14] M. H. A. Yaseen and H. J. Abd, “Modeling and control for a magnetic levitation system based on SIMLAB platform in real time,” Results in Physics, vol. 8, pp. 153–159, 2018,

[15] J. Yoon and J. Doh, “Optimal PID control for hovering stabilization of quadcopter using long short term memory,” Advanced Engineering Informatics, vol. 53, p. 101679, 2022,

[16] J. J. Wang and T. Kumbasar, “Optimal PID control of spatial inverted pendulum with big bang-big crunch optimization,” IEEE/CAA Journal of Automatica Sinica, vol. 7, no. 3, pp. 822–832, 2020,

[17] D. Bakria, M. Azzouzi, and D. Gozim, “Chaos Control and Stabilization of a PID Controlled Buck Converter Using the Spotted Hyena Optimizer,” Engineering, Technology & Applied Science Research, vol. 11, no. 6, pp. 7922–7926, 2021,

[18] T. Kobaku, R. Jeyasenthil, S. Sahoo, R. Ramchand, and T. Dragicevic, “Quantitative Feedback Design-Based Robust PID Control of Voltage Mode Controlled DC-DC Boost Converter,” IEEE Transactions on Circuits and Systems II: Express Briefs, vol. 68, no. 1, pp. 286–290, 2021,

[19] S. B. Joseph, E. G. Dada, A. Abidemi, D. O. Oyewola, and B. M. Khammas, “Metaheuristic algorithms for PID controller parameters tuning: review, approaches and open problems,” Heliyon, vol. 8, no. 5, p. e09399, 2022,

[20] R. P. Borase, D. K. Maghade, S. Y. Sondkar, and S. N. Pawar, “A review of PID control, tuning methods and applications,” International Journal of Dynamics and Control, vol. 9, pp. 818–827, 2021,

[21] A. Kherkhar, Y. Chiba, A. Tlemçani, and H. Mamur, “Thermal investigation of a thermoelectric cooler based on Arduino and PID control approach,” Case Studies in Thermal Engineering, vol. 36, p. 102249, 2022,

[22] F. Xu, X. Liang, M. Chen, and W. Liu, “Robust Self-Learning PID Control of an Aircraft Anti-Skid Braking System,” Mathematics, vol. 10, no. 8, p. 1290, 2022,

[23] P. Božek and Y. Nikitin, “The Development of an Optimally-Tuned PID Control for the Actuator of a Transport Robot,” Actuators, vol. 10, no. 8, p. 195, 2021,

[24] J. Sun, H. Zhou, X. Ma, and Z. Ju, “Study on PID tuning strategy based on dynamic stiffness for radial active magnetic bearing,” ISA Transactions, vol. 80, pp. 458–474, 2018,

[25] Y. Fan, J. Shao, G. Sun, and X. Shao, “Improved Beetle Antennae Search Algorithm-Based Lévy Flight for Tuning of PID Controller in Force Control System,” Mathematical Problems in Engineering, vol. 2020, 2020,

[26] D. Potnuru, K. Alice Mary, and C. Sai Babu, “Experimental implementation of Flower Pollination Algorithm for speed controller of a BLDC motor,” Ain Shams Engineering Journal, vol. 10, no. 2, pp. 287–295, 2019,

[27] B. B. Alagoz, F. N. Deniz, and M. Koseoglu, “An efficient PID-based optimizer loop and its application in De Jong’s functions minimization and quadratic regression problems,” Systems & Control Letters, vol. 159, p. 105090, 2022,

[28] W. Farag, “Complex Trajectory Tracking Using PID Control for Autonomous Driving,” International Journal of Intelligent Transportation Systems Research, vol. 18, no. 2, pp. 356–366, Sep. 2019,

[29] S. Ulusoy, S. M. Nigdeli, and G. Bekdaş, “Novel metaheuristic-based tuning of PID controllers for seismic structures and verification of robustness,” Journal of Building Engineering, vol. 33, p. 101647, 2021,

[30] H. Du, P. Liu, Q. Cui, X. Ma, and H. Wang, “PID Controller Parameter Optimized by Reformative Artificial Bee Colony Algorithm,” Journal of Mathematics, vol. 2022, pp. 1–16, 2022,

[31] H. Wang, H. Du, Q. Cui, and H. Song, “Artificial bee colony algorithm based PID controller for steel stripe deviation control system,” Science Progress, vol. 105, no. 1, pp. 1–22, 2022,

[32] J. Bhookya, M. Vijaya Kumar, J. Ravi Kumar, and A. Seshagiri Rao, “Implementation of PID controller for liquid level system using mGWO and integration of IoT application,” Journal of Industrial Information Integration, vol. 28, p. 100368, 2022,

[33] B. N. Kommula and V. R. Kota, “Direct instantaneous torque control of Brushless DC motor using firefly Algorithm based fractional order PID controller,” Journal of King Saud University - Engineering Sciences, vol. 32, no. 2, pp. 133–140, 2020,

[34] A. Rodríguez-Molina, M. G. Villarreal-Cervantes, J. Álvarez-Gallegos, and M. Aldape-Pérez, “Bio-inspired adaptive control strategy for the highly efficient speed regulation of the DC motor under parametric uncertainty,” Applied Soft Computing, vol. 75, pp. 29–45, 2019,

[35] M. M. Gani, M. S. Islam, and M. A. Ullah, “Optimal PID tuning for controlling the temperature of electric furnace by genetic algorithm,” SN Applied Sciences, vol. 1, no. 8, pp. 1–8, 2019,

[36] J. Bhookya and R. K. Jatoth, “Optimal FOPID/PID controller parameters tuning for the AVR system based on sine–cosine-algorithm,” Evolutionary Intelligence, vol. 12, no. 4, pp. 725–733, 2019,

[37] B. Hekimoğlu, “Sine-cosine algorithm-based optimization for automatic voltage regulator system,” Transactions of the Institute of Measurement and Control, vol. 41, no. 6, pp. 1761–1771, 2018,

[38] Y. Zhou, J. Zhang, X. Yang, and Y. Ling, “Optimization of PID Controller Based on Water Wave Optimization for an Automatic Voltage Regulator System,” Information Technology and Control, vol. 48, no. 1, pp. 160–171, 2019,

[39] F. Loucif, S. Kechida, and A. Sebbagh, “Whale optimizer algorithm to tune PID controller for the trajectory tracking control of robot manipulator,” Journal of the Brazilian Society of Mechanical Sciences and Engineering, vol. 42, no. 1, pp. 1–11, 2019,

[40] B. Guo, Z. Zhuang, J. S. Pan, and S. C. Chu, “Optimal Design and Simulation for PID Controller Using Fractional-Order Fish Migration Optimization Algorithm,” IEEE Access, vol. 9, pp. 8808–8819, 2021,

[41] J. Agarwal, G. Parmar, R. Gupta, and A. Sikander, “Analysis of grey wolf optimizer based fractional order PID controller in speed control of DC motor,” Microsystem Technologies, vol. 24, no. 12, pp. 4997–5006, 2018,

[42] K. Vanchinathan and N. Selvaganesan, “Adaptive fractional order PID controller tuning for brushless DC motor using Artificial Bee Colony algorithm,” Results in Control and Optimization, vol. 4, p. 100032, 2021,

[43] L. Chaib, A. Choucha, and S. Arif, “Optimal design and tuning of novel fractional order PID power system stabilizer using a new metaheuristic Bat algorithm,” Ain Shams Engineering Journal, vol. 8, no. 2, pp. 113–125, 2017,

[44] S. Kadry and V. Rajinikanth, “Design of PID Controller for Magnetic Levitation System using Harris Hawks Optimization,” Jurnal Ilmiah Teknik Elektro Komputer dan Informatika, vol. 6, no. 2, p. 70, 2021,

[45] A. H. Mary, A. H. Miry, and M. H. Miry, “An Optimal Robust State Feedback Controller for the AVR System-Based Harris Hawks Optimization Algorithm,” Electric Power Components and Systems, vol. 48, no. 16–17, pp. 1684–1694, 2021,

[46] L. Jia and X. Zhao, “An Improved Particle Swarm Optimization (PSO) Optimized Integral Separation PID and its Application on Central Position Control System,” IEEE Sensors Journal, vol. 19, no. 16, pp. 7064–7071, 2019,

[47] A. Parnianifard, A. S. Azfanizam, M. K. A. Ariffin, M. I. S. Ismail, M. R. Maghami, and C. Gomes, “Kriging and Latin hypercube sampling assisted simulation optimization in optimal design of PID controller for speed control of DC motor,” Journal of Computational and Theoretical Nanoscience, vol. 15, no. 5, pp. 1471–1479, 2018,

[48] Y. G. Rashid and A. M. A. Hussain, “Implementing optimization of PID controller for DC motor speed control,” Indonesian Journal of Electrical Engineering and Computer Science, vol. 23, no. 2, pp. 657–664, 2021,

[49] S. Ekinci, B. Hekimoğlu, and D. Izci, “Opposition based Henry gas solubility optimization as a novel algorithm for PID control of DC motor,” Engineering Science and Technology, an International Journal, vol. 24, no. 2, pp. 331–342, 2021,

[50] M. S. N. Krishna konijeti and M. L. Bharathi, “Extraction of maximum power from solar with BLDC motor driven electric vehicles based HHO algorithm,” Advances in Engineering Software, vol. 170, p. 103137, 2022,

[51] A. K. Kashyap and D. R. Parhi, “Particle Swarm Optimization aided PID gait controller design for a humanoid robot,” ISA Transactions, vol. 114, pp. 306–330, 2021,

[52] Z. Xiang, D. Ji, H. Zhang, H. Wu, and Y. Li, “A simple PID-based strategy for particle swarm optimization algorithm,” Information Sciences, vol. 502, pp. 558–574, 2019,

[53] H. Feng, W. Ma, C. Yin, and D. Cao, “Trajectory control of electro-hydraulic position servo system using improved PSO-PID controller,” Automation in Construction, vol. 127, p. 103722, 2021,

[54] S. M. H. Mousakazemi and N. Ayoobian, “Robust tuned PID controller with PSO based on two-point kinetic model and adaptive disturbance rejection for a PWR-type reactor,” Progress in Nuclear Energy, vol. 111, pp. 183–194, 2019,

[55] P. Dutta and S. K. Nayak, “Grey Wolf Optimizer Based PID Controller for Speed Control of BLDC Motor,” Journal of Electrical Engineering & Technology, vol. 16, no. 2, pp. 955–961, 2021,

[56] M. A. Shamseldin, R. Barbosa, and I. Jesus, “Optimal Coronavirus Optimization Algorithm Based PID Controller for High Performance Brushless DC Motor,” Algorithms, vol. 14, no. 7, p. 193, 2021,

[57] B. Naidu Kommula and V. Reddy Kota, “Design of MFA-PSO based fractional order PID controller for effective torque controlled BLDC motor,” Sustainable Energy Technologies and Assessments, vol. 49, p. 101644, 2022,

[58] H. R. R. Zaman and F. S. Gharehchopogh, “An improved particle swarm optimization with backtracking search optimization algorithm for solving continuous optimization problems,” Engineering with Computers, pp. 1–35, 2021,

[59] Z. Qi, Q. Shi, and H. Zhang, “Tuning of digital PID controllers using particle swarm optimization algorithm for a CAN-Based DC motor subject to stochastic delays,” IEEE Transactions on Industrial Electronics, vol. 67, no. 7, pp. 5637–5646, 2020,

[60] X. Zhou, J. Zhou, C. Yang, and W. Gui, “Set-Point tracking and Multi-Objective Optimization-Based PID control for the goethite process,” IEEE Access, vol. 6, pp. 36683–36698, 2018,

[61] Y. Li, K. H. Ang, and G. C. Y. Chong, “PID Control System Analysis and Design,” IEEE Control Systems, vol. 26, no. 1, pp. 32–41, 2006,


  • There are currently no refbacks.

Copyright (c) 2022 Eka Suci Rahayu, Alfian Ma'arif, Abdullah Çakan

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.


About the JournalJournal PoliciesAuthor Information

International Journal of Robotics and Control Systems
e-ISSN: 2775-2658
Organized by: Association for Scientific Computing Electronics and Engineering (ASCEE)Peneliti Teknologi Teknik IndonesiaDepartment of Electrical Engineering, Universitas Ahmad Dahlan and Kuliah Teknik Elektro
Published by: Association for Scientific Computing Electronics and Engineering (ASCEE)
Office: Jalan Janti, Karangjambe 130B, Banguntapan, Bantul, Daerah Istimewa Yogyakarta, Indonesia