Real Time Optimal Tuning of Quadcopter Attitude Controller Using Particle Swarm Optimization


  • Musa Omar Abdalla The University of Jordan, Mechanical Enineering. Department, Amman 11942,
  • Salam Al-Baradie The University of Jordan, Mechanical Enineering. Department, Amman 11942,



fuzzy control, PID control, PSO tuning, quadcopter, PID tuning


A real-time novel algorithm for proportional, integral and derivative (PID) controller tuning for quadcopters is introduced. The particle swarm optimization (PSO) method is utilized to search the quadcopter solution space to find the best PID controller parameters. A fuzzy logic (FL) controller is used to provide proper velocity reference signals to serve as tracking set points to be achieved by the PID controller. This nested loop design is proposed for stabilizing the quadcopter, where the fuzzy logic controller (FL) is used in the stable loop (i.e. outer loop) to control the desired angle, while the PID controller is used for the rate loop (i.e. inner loop). Finally, the optimum generated PID parameters were achieved in real time using the PSO search algorithm. The generated parameters were tested successfully using an experimental quadcopter setup at the University of Jordan.


Download data is not yet available.


Ahirwar, S., Swarnkar, R., Bhukya, S. &, Namwade, G., Application of Drone in Agriculture, Int. J. Curr. Microbiol. App. Sci., 8(1), pp. 2500-2505, 2019. DOI: 10.20546/ijcmas.2019.801.264.

Olov, A., Mariusz, W. & Patrick, D., Deep Learning Quadcopter Control via Risk-aware Active Learning, AAAI Conference on Artificial Intelligence, Thirty-First AAAI Conference on Artificial Intelligence, 2017.

Chen, M.Y., Designing a Spatially Aware and Autonomous Quadcopter, in 2013 IEEE Systems and Information Engineering Design Symposium, 26-26 April, pp. 213-218, 2013. DOI: 10.1109/SIEDS.2013.6549521.

Vergouw, B., Nagel, H., Bondt, G. & Custers, B., Drone Technology: Types, Payloads, Applications, Frequency Spectrum Issues and Future Developments, in the Future of Drone Use: Opportunities and Threats from Ethical and Legal Perspectives, B. Custers Ed. The Hague: T.M.C. Asser Press, pp. 21-45, 2016.

Zhang, B., Yoon, G. & Lim, H., Attitude Control and Altitude Control of a Four-rotor Flying Robot, in 2018 14th International Conference on Natural Computation, Fuzzy Systems and Knowledge Discovery (ICNC-FSKD), 28-30 July, pp. 1323-1328, 2018, DOI: 10.1109/FSKD.2018.8687282.

Wang, J., Attitude Free Position Control of a Quadcopter using Dynamic Inversion, in Infotech@Aerospace, Proceedings of the American Institute of Aeronautics and Astronautics, 2011.

Njinwoua, B.J. & Wouwer, A.V., Cascade Attitude Control of a Quadcopter in Presence of Motor Asymmetry at University of Mons, Mons, Belgium, IFAC-PapersOnLine, 51(4), pp. 113-118, 2018/01/01/ 2018, DOI: 10.1016/j.ifacol.2018.06.055.

Nemati, A. & Kumar, M., Modeling And Control of a Single Axis Tilting Quadcopter, in 2014 American Control Conference, 4-6 June, pp. 3077-3082, 2014, DOI: 10.1109/ACC.2014.6859328.

Praveen V. & Pillai A., Modeling and Simulation of Quadcopter Using PID Controller, International Journal of Control Theory and Applications, 9, pp. 7151-7158, 2016.

Cedro, L. & Wieczorkowski, K., Optimizing PID Controller Gains to Model the Performance of a Quadcopter, Transportation Research Procedia, 40, pp. 156-169, 2019/01/01/ 2019, DOI: 10.1016/j.trpro. 2019.07.026.

Ferdaus, M.M., Pratama, M., Anavatti, S.G., Garratt, M.A. & Lughofer, E., PAC: A Novel Self-adaptive Neuro-fuzzy Controller for Micro Aerial Vehicles, Information Sciences, 512, pp. 481-505, 2020/02/01/ 2020. DOI: 10.1016/j.ins.2019.10.001.

Argentim, L.M., Rezende, W.C., Santos, P.E. & Aguiar, R.A., PID, LQR and LQR-PID on A Quadcopter Platform, in 2013 International Conference on Informatics, Electronics and Vision (ICIEV), 17-18 May, pp. 1-6, 2013. DOI: 10.1109/ICIEV.2013.6572698.

Olivares-Mendez, M.A., Mejias, L., Campoy, P. & Mellado-Bataller, I., Quadcopter See and Avoid Using a Fuzzy Controller, in Uncertainty Modeling in Knowledge Engineering and Decision Making, World Scientific Proceedings Series on Computer Engineering and Information Science, 7, pp. 1239-1244, 2012.

Jiinec, T., Stabilization and Control of Unmanned Quadcopter, Master Thesis, Lule University of Technology Department of Computer Science, Electrical and Space Engineering, 2011.

Pyrkin, A.A., Bobtsov, A.A., Kolyubin, S.A., Borisov, O.I. & Gromov, V.S., Output Controller for Quadcopters Based on Mathematical Model Decomposition, in 22nd Mediterranean Conference on Control and Automation, 16-19, pp. 1281-1286, 2014. DOI: 10.1109/MED.2014. 6961552.

Ferdaus, M.M., Anavatti, S.G., Garratt, M.A. & Pratama, M., Fuzzy Clustering Based Nonlinear System Identification and Controller Development of Pixhawk Based Quadcopter, in 2017 Ninth International Conference on Advanced Computational Intelligence (ICACI), 4-6 Feb, pp. 223-230, 2017. DOI: 10.1109/ICACI.2017.7974513.

Andaluz, V.H., Nonlinear Controller of Quadcopters for Agricultural Monitoring, in Advances in Visual Computing, Bebis, G., Boyle, R., Parvin, B., Koracin, D., Ushizima, D., Chai, S., Sueda, S., Lin, X., Lu, A., Thalmann, D., Wang, C., Xu, P., Eds., 2015// 2015: Springer International Publishing, pp. 476-487, 2015.

Fatan, M., Sefidgari, B.L. & Barenji, A.V., An Adaptive Neuro PID for Controlling the Altitude of Quadcopter Robot, in 2013 18th International Conference on Methods & Models in Automation & Robotics (MMAR), 26-29 Aug., pp. 662-665, 2013. DOI: 10.1109/MMAR.2013.6669989.

Gonzalez-Vazquez, S. & Moreno-Valenzuela, J., A New Nonlinear PI/PID Controller for Quadrotor Posture Regulation, in 2010 IEEE Electronics, Robotics and Automotive Mechanics Conference, IEEE, pp. 642-647, 2010.

Moreno-Valenzuela, J., Perez-Alcocer, R., Guerrero-Medina, M. & Dzul, A., Nonlinear PID-Type Controller for Quadrotor Trajectory Tracking, IEEE/ASME Transactions on Mechatronics, 23(5), pp. 2436-2447, 2018.

Sahul, M.P.V., Chander, V.N. & Kurian, T., A Novel Method on Disturbance Rejection PID Controller for Quadcopter Based on Optimization Algorithm, IFAC Proceedings Volumes, 47(1), pp. 192-199, 2014/01/01/ 2014. DOI: 10.3182/20140313-3-IN-3024.00016.

Lukmana, M.A. & Nurhadi, H., Preliminary Study on Unmanned Aerial Vehicle (UAV) Quadcopter Using PID Controller, in 2015 International Conference on Advanced Mechatronics, Intelligent Manufacture, and Industrial Automation (ICAMIMIA), 15-17 Oct., pp. 34-37, 2015. DOI: 10.1109/ICAMIMIA.2015.7507997.

Paiva, E., Soto, J., Salinas, J. & Ipanaque, W., Modeling, Simulation and Implementation of A Modified PID Controller for Stabilizing A Quadcopter, in 2016 IEEE International Conference on Automatica (ICA-ACCA), 19-21 Oct., pp. 1-6, 2016. DOI: 10.1109/ICA-ACCA.2016.7778507.

Tesch, D.A., Eckhard, D. & Guarienti, W.C., Pitch and Roll control of a Quadcopter using Cascade Iterative Feedback Tuning, IFAC-PapersOnLine, 49(30), pp. 30-35, 2016/01/01/ 2016. DOI: 10.1016/ j.ifacol.2016.11.118.

Astudillo, A., Munoz, P., lvarez, F. & Rosero, E., Altitude and Attitude Cascade Controller for A Smartphone-Based Quadcopter, in 2017 International Conference on Unmanned Aircraft Systems (ICUAS), 13-16 June 2017, pp. 1447-1454, 2017. DOI: 10.1109/ICUAS.2017.7991400.

Santos, M.F., Simulation and Comparison between a Linear and Nonlinear Technique Applied to Altitude Control in Quadcopters, in 2017 18th International Carpathian Control Conference (ICCC), 28-31 May, pp. 234-239, 2017. DOI: 10.1109/CarpathianCC.2017.7970403.

Paiva, E.A., Soto, J.C., Salinas, J.A. & Ipanaque, W., Modeling And PID Cascade Control of A Quadcopter for Trajectory Tracking, in 2015 CHILEAN Conference on Electrical, Electronics Engineering, Information and Communication Technologies (CHILECON), 28-30 Oct., pp. 809-815, 2015. DOI: 10.1109/Chilecon.2015.7404665.

Khodja, M., Tadjine, M., Boucherit, M. & Benzaoui, M., Tuning PID Attitude Stabilization of A Quadrotor Using Particle Swarm Optimization (Experimental), Int. J. Simul. Multisci. Des. Optim., 8, A8,2017.

Abbas, N. & Sami, A., Tuning of PID Controllers for Quadcopter System using Hybrid Memory based Gravitational Search Algorithm - Particle Swarm Optimization, International Journal of Computer Applications 172(4), pp. 9-18, August 2017.

Astrom, K.J., The Future of PID Control, Control Engineering Practice, 9(11), pp. 1163-1175, 2000.

Mann, G.K.I., Hu, B. G. & Gosine, R.G., Two-Level Tuning of FL-PID Controllers, IEEE Trans. on System, Man, and Cybernetics, 31(2), pp. 263-269, 2001.

Carvajal J., Chen G. & Ogmen H., FL-PID Design, Performance, and Stability, Info Science, 123(3), pp. 249-270, 2000.

Fodor, J, Left-continuous T-norms in Fuzzy Logic: An Overview, Acta Polytechnica Hungarica, 1(2), pp. 35-47, 2004.

El Gmili, N., Mjahed, M., El Kari, A. & Ayad, H., Particle Swarm Optimization Based Proportional-Derivative Parameters for Unmanned Tilt-Rotor Flight Control and Trajectory Tracking, Automatika, 61(2), pp. 189-206, 2020.

Noordin, A., Basri, A., Mohamed, Z. & Zainal Abidin, A.F., Modelling and PSO Fine-Tuned PID Control of Quadrotor UAV, International Journal on Advanced Science, Engineering and Information Technology, 7(4), pp. 1367-1373, 2017. DOI: 10.18517/ijaseit.7.4.3141.

Tran, H.K. & Chiou, J.S., PSO-Based Algorithm Applied to Quadcopter Micro Air Vehicle Controller Design, (in eng), Micromachines (Basel), 7(9), pp. 168, 2016. DOI: 10.3390/mi7090168.

Mac, T.T., Copot, C., Duc, T.T. & Keyser, R.D., AR.Drone UAV Control Parameters Tuning Based on Particle Swarm Optimization Algorithm, in 2016 IEEE International Conference on Automation, Quality and Testing, Robotics (AQTR), 19-21 May, pp. 1-6, 2016. DOI: 10.1109/ AQTR.2016.7501380.

Robinson, J. & Rahmat-Samii, Y., Particle Swarm Optimization in Electromagnetics, IEEE Transactions on Antennas and Propagation, 52(2), pp. 397-407, 2004. DOI: 10.1109/tap.2004.823969.

Lim, S.Y., Montakhab, M. & Nouri, H., A Constriction Factor Based Particle Swarm Optimization for Economic Dispatch, paper presented at The European Simulation and Modelling Conference, October 2009.

Abdalla, M., Al-Jarah, T., Optimal Fuzzy Controller: Rule Base Optimized Generation, Control Engineering and Applied Informatics 20(1), pp. 76-86, 2018.




How to Cite

Abdalla, M. O., & Al-Baradie, S. (2020). Real Time Optimal Tuning of Quadcopter Attitude Controller Using Particle Swarm Optimization. Journal of Engineering and Technological Sciences, 52(5), 745-764.