Swarm-Based Design of Proportional Integral and Derivative Controllers Using a Compromise Cost Function: An Arduino Temperature Laboratory Case Study
Abstract
:1. Introduction
- New formulation for an additive compromise (or aggregated) cost function involving the Integral Absolute Error (IAE) and Total Variation (TV). Major control design criteria concern optimizing set-point tracking and disturbance rejection, while minimizing the control signal variation. This proposed technique significantly simplifies the PID controller design procedure combining these criteria into a single-objective optimization formulation.
- PSO algorithm to design PID controllers that minimize a cost function weighting IAE and TV. A simple PSO algorithm constitutes an excellent design tool for the PID controller, with practical interest for control engineers. The proposed technique is compared with the original GWO algorithm, in a TCLab temperature control case study, providing a similar control performance.
- Both the simulation and practical validation with TCLab tests, show an effectiveness to design PID controllers by softening the control signal.
2. PID Control Design: Problem Statement
3. Classical Particle Swarm Optimization
Algorithm 1 PSO algorithm |
1. t = 0 |
2. Initiate m,ω |
3. Initialize swarm X(t) |
4. Evaluate X(t) |
while(not (termination criterion)) |
5. determine personal and global bests |
for i = 1 to m |
6. Update vi(t + 1) |
7. Update xi(t + 1) |
endfor |
8. Update ω |
9. t = t + 1 |
endwhile |
4. Temperature Control Laboratory (TCLab)
5. TCLab Results
5.1. First-Order Plus Time Delay Model Identification
- A swarm with size m = 40 particles.
- Each simulation was run for 50 iterations.
- The search intervals used for the controllers gains K, T, and L are: [0.1 3], [20 s 160 s], and [4 s 45 s], respectively. The FOPTD model parameters obtained with a classical step-response method (e.g., two-point method (see [28])) can be used to define the search interval.
- The inertia weight was initial and final values were ωinit = 0.7 and ωfin = 0.4. These values were deemed appropriate with 50 iterations.
5.2. PID Controller Tuning
- A swarm with size m = 30 particles.
- Each simulation was run for 70 iterations.
- The search intervals used for the controller gains Kp, Ti, and Td are: [0.1 20], [10 s 150 s], and [1 s 12 s], respectively. The tuning gains obtained with classical tuning rules can be used (e.g., CC) to define the search interval. The interval used for the integral gain was widened to see if the PSO converged for slower TCLab control system responses.
- The inertia weight for initial and final values were ωinit = 0.7 and ωfin = 0.4. These values were deemed appropriate considering the number of iterations used, as it can be observed from Figure 8. In this figure, four different inertia weight intervals [ωinit, ωfin] were considered: (a) [0.9, 0.2], (b) [0.9, 0.4], [0.7, 0.4], and [0.4, 0.4].
- I: α = 1 and β = 0.
- II: α = 1 and β = 70.
- III: α = 1 and β = 80.
- IV: α = 1 and β = 100.
6. Conclusions
- The use of an additive compromise cost function involving the minimization of two performance criteria: The Integral Absolute Error (IAE) and the Total Variation (TV). By using a simple compromise cost function, the proposed PID controller design technique simultaneously considers the following major control design criteria: Set-point tracking, load disturbance rejection, and control signal variation.
- By using the proposed cost function, it was shown that it is quite simple to select the PSO heuristic parameters with a special emphasis on the inertia weight decay.
- The PSO was used to both perform the TCLab system identification as well as PID controller tuning. In both optimization problems, the proposed technique blends quite well with classical design techniques. One of the problems with the use of optimization algorithms in practical problems is to define appropriate decision variable search intervals. The identification of a first-order plus time delay model with the PSO technique uses the two-point step response method [39,40] to define the model parameter search space. The Cohen-Coon PID controller tuning rules were used to define the controller gain search space.
- The PSO results for the specific TCLab control case performs as well as a much more recently introduced metaheuristic: The grey wolf optimization.
- The proposed technique was tested with an Arduino Temperature Control Laboratory (TCLab) and compared with well-established PID tuning methods. Both the simulation as well as physical TCLab results were presented to provide evidence of improved control performance. The results show a good agreement between the simulation and measured results to validate the dynamic model identified with PSO.
- The TCLab Arduino kit was introduced as a simple to use portable laboratory to test simulation results obtained with the proposed PSO-based technique. The same device has great potential to test other optimization and artificial intelligence-based techniques.
Author Contributions
Funding
Conflicts of Interest
References
- Starr, K.; Bauer, M.; Horch, A. An Industry Sponsored Video Course for Control Engineering Practitioners. IFAC PapersOnLine 2015, 48, 59–64. [Google Scholar] [CrossRef]
- PID-18. In Proceedings of the 3rd IFAC Conference on Advances in Proportional-Integral-Derivative Control, Ghent, Belgium, 9–11 May 2018; Available online: https://www.sciencedirect.com/journal/ifac-papersonline (accessed on 20 October 2020).
- Ziegler, J.G.; Nichols, N.B. Optimum settings for automatic controllers. Trans. ASME 1942, 31, 759–768. [Google Scholar] [CrossRef]
- Peng, Y.; Vrančić, D.; Hanus, R. Anti-windup, bumpless, and conditioned transfer techniques for PID controllers. IEEE Control Syst. Mag. 1996, 16, 4. [Google Scholar] [CrossRef]
- Åström, K.J.; Hägglund, T. Advanced PID Control; ISA: Research Triangle Park, NC, USA, 2006; ISBN 1-55617-942-1. [Google Scholar]
- Seborg, D.; Edgar, T.F.; Mellichamp, D.A.; Doyle, F.J., III. Process Dynamics and Control, 4th ed.; Wiley: Hoboken, NJ, USA, 2017; ISBN 978-1-119-28591-5. [Google Scholar]
- Visioli, A.; Vilanova, R. PID Control in the Third Millennium: Lessons Learned and New Approaches; Springer: Berlin/Heidelberg, Germany, 2012; ISBN 978-1-4471-2424-5. [Google Scholar]
- Rossiter, A.; Zakova, K.; Huba, M.; Serbezov, A.; Visioli, A. A First Course in Feedback, Dynamics and Control: Findings from 2019 Online Survey of the International Control Community. In Proceedings of the IFAC-2020 World Congress, Berlin, Germany, 11–17 July 2020. [Google Scholar]
- Holland, J.H. Adaptation in Natural and Artificial Systems; The University of Michigan Press: Ann Arbor, MI, USA, 1975. [Google Scholar]
- Dorigo, M.; Maniezzo, V.; Colorni, A. Ant system: Optimization by a colony of cooperating agents. IEEE Trans. Syst. Man Cybern. 1996, 26, 29–41. [Google Scholar] [CrossRef] [Green Version]
- Koza, J.R. Genetic Programming: A Paradigm for Breeding Populations of Computers Programs to Solve Problems; Technical Report STAN-CS-90-1314; Stanford University: Stanford, CA, USA, 1990. [Google Scholar]
- Storn, R.; Price, K.V. Differential Evolution—A Simple and Efficient Adaptive Scheme for Global Optimization over Continuous Spaces. J. Global Optim. 1997, 11, 341–359. [Google Scholar] [CrossRef]
- Kennedy, J.; Eberhart, R.C. Particle swarm optimization. In Proceedings of the International Conference on Neural Networks, Perth, WA, Australia, 27 November–1 December 1995; pp. 1942–1948. [Google Scholar]
- Yang, X.-S.; Deb, S. Cuckoo Search via Lévy Flights. In Proceedings of the World Congress on Nature & Biologically Inspired Computing (NaBIC), Coimbatore, India, 8–10 February 2009; pp. 210–214. [Google Scholar]
- Yang, X.-S. Firefly Algorithm, Lévy Flights and Global Optimization. In Research and Development in Intelligent Systems XXVI; Bramer, M., Ellis, R., Petridis, M., Eds.; Springer: London, UK, 2010. [Google Scholar] [CrossRef]
- Krishnanand, K.N.; Ghose, D. Glowworm swarm based optimization algorithm for multimodal functions with collective robotics applications. Multiagent Grid Syst. Int. J. 2006, 2, 209–222. [Google Scholar] [CrossRef] [Green Version]
- Rashedi, E.; Nezamabadi-Pour, H.; Saryazdi, S. GSA: A Gravitational Search Algorithm. Inf. Sci. 2009, 179, 2232–2248. [Google Scholar] [CrossRef]
- Seyedali, M.; Mohammad, S.M.; Lewis, A. Grey wolf optimizer. Adv. Eng. Softw. 2014, 69, 46–61. [Google Scholar]
- Moura Oliveira, P.B.; Vrancic, D.E. Grey Wolf, Gravitational Search and Particle Swarm Optimizers: A Comparison for PID Controller Design. In CONTROLO 2016; Lecture Notes in Electrical Engineering; Springer: Guimarães, Portugal, 2016; Volume 402, pp. 239–249. [Google Scholar] [CrossRef]
- De Moura Oliveira, P.B.; Freire, H.; Solteiro Pires, E.J. Grey Wolf Optimization for PID Controller Design with Prescribed Robustness Margins. Soft Comput. 2016, 20, 4243–4255. [Google Scholar] [CrossRef]
- Rathore, N.S.; Singh, V.P.; Kumar, B. Controller design for Doha water treatment plant using grey wolf optimization. J. Intell. Fuzzy Syst. 2018, 35, 5329–5336. [Google Scholar] [CrossRef]
- Gupta, S.; Singh, V.P.; Singh, S.P.; Prakash, T.; Rathore, N.S. Elephant herding optimization based PID controller tuning. Int. J. Adv. Technol. Eng. Explor. 2016, 3, 194. [Google Scholar] [CrossRef]
- Jones, A.H.; De Moura Oliveira, P.B. Genetic Auto-Tuning of PID Controllers. In Proceedings of the First IEE Conference on Genetic Algorithms in Engineering Systems: Innovations and Applications (GALESIA’95), Sheffield, UK, 12–14 September 1995; Volume 414, pp. 141–145. [Google Scholar]
- Fleming, P.J.; Purshouse, R.C. Evolutionary algorithms in control systems engineering: A survey. Control Eng. Pract. 2002, 10, 1223–1241. [Google Scholar] [CrossRef]
- Coelho, P.C.; De Moura Oliveira, P.B.; Boaventura Cunha, J. Greenhouse Air Temperature Control using the Particle Swarm Optimisation Algorithm. Comput. Electron. Agric. 2005, 49, 330–344. [Google Scholar] [CrossRef] [Green Version]
- Moura Oliveira, P.B.; Solteiro Pires, E.J.; Boaventura Cunha, J.; Pinho, T.M. Review of Nature and Biologically Inspired Metaheuristics for Greenhouse Environment Control. Trans. Inst. Meas. Control 2020, 42, 2338–2358. [Google Scholar] [CrossRef]
- Fan Shu-Kai, S.; Zahara, E. A hybrid simplex search and particle swarm optimization for unconstrained optimization. Eur. J. Oper. Res. 2007, 181, 527–548. [Google Scholar]
- Fan, S.-K.S.; Jen, C.-H. An Enhanced Partial Search to Particle Swarm Optimization for Unconstrained Optimization. Mathematics 2019, 7, 357. [Google Scholar] [CrossRef] [Green Version]
- Irigoyen, E.; Larzabal, E.; Priego, R. Low-cost platforms used in Control Education: An educational case stud. In Proceedings of the 10th IFAC Symposium Advances in Control Education, Sheffield, UK, 28–30 August 2013. [Google Scholar]
- Reguera, V.; García, D.; Domínguez, M.; Prada, M.A.; Alonso, S. A low-cost open source hardware in control education. Case study: Arduino-Feedback MS-150. IFAC PapersOnLine 2015, 48, 117–122. [Google Scholar] [CrossRef]
- McLoone, S.C.; Maloco, J. A Cost-effective Hardware-based Laboratory Solution for Demonstrating PID Control. In Proceedings of the UKACC 11th International Conference on Control (CONTROL), Belfast, UK, 31 August–2 September 2016. [Google Scholar]
- Prima, E.C.; Saeful, K.; Utarib, S.; Ramdanib, R.; Putri, E.R.; Darmawatib, S.M. Heat Transfer Lab Kit using Temperature Sensor based Arduino TM for Educational Purpose. Procedia Eng. 2017, 170, 536–540. [Google Scholar] [CrossRef]
- Rossiter, J.A.; Pope, S.A.; Jones, B.L.; Hedengren, J.D. Evaluation and demonstration of take-home laboratory kit, Invited Session: Demonstration and poster session. In Proceedings of the 12th IFAC Symposium on Advances in Control Education, Philadelphia, PA, USA, 7–9 July 2019. [Google Scholar]
- Juchem, J.; Chevalier, A.; Dekemele, K.; Loccu, M. Active learning in control education: A pocket-size PI(D) setup. In Proceedings of the IFAC-2020 World Congress, Berlin, Germany, 11–17 July 2020. [Google Scholar]
- Hedengren, J.D. Temperature Control Lab Kit. Available online: https://apmonitor.com/heat.htm (accessed on 20 September 2020).
- Hedengren, J.D.; Martin, R.A.; Kantor, J.C.; Reuel, N. Temperature Control Lab for Dynamics and Control. In Proceedings of the AIChE Annual Meeting, Orlando, FL, USA, 10–15 November 2019. [Google Scholar]
- Park, J.; Patterson, C.; Kelly, J.; Hedengren, J.D. Closed-Loop PID Re-Tuning in a Digital Twin by Re-Playing Past Setpoint and Load Disturbance Data. In Proceedings of the AIChE Spring Meeting, New Orleans, LA, USA, 31 March–4 April 2019. [Google Scholar]
- Park, J.; Martin, R.A.; Kelly, J.D.; Hedengren, J.D. Benchmark Temperature Microcontroller for Process Dynamics and Control. J. Comp. Chem. Eng. 2020, 135, 6. [Google Scholar] [CrossRef]
- Moura Oliveira, P.B.; Hedengren, J.D. An APMonitor Temperature Lab PID Control Experiment for Undergraduate Students. In Proceedings of the 24th IEEE International Conference on Emerging Technologies and Factory Automation (ETFA), Zaragoza, Spain, 10–13 September 2019; pp. 790–797. [Google Scholar]
- Moura Oliveira, P.B.; Hedengren, J.D.; Rossiter, J.A. Introducing Digital Controllers to Undergraduate Students using the TCLab Arduino Kit. In Proceedings of the IFAC-2020 World Congress, Berlin, Germany, 11–17 July 2020. [Google Scholar]
- Freire, H.; Moura Oliveira, P.B.; Pires, E.J. From Single to Many-objective PID Controller Design using Particle Swarm Optimization. Int. J. Control Autom. Syst. 2017, 15, 918–932. [Google Scholar] [CrossRef]
- Bansal, J.C.; Singh, P.K.; Saraswat, M.; Verma, A.; Jadon, S.S.; Abraham, A. Inertia Weight Strategies in Particle Swarm Optimization. In Proceedings of the IEEE Third World Congress on Nature and Biologically Inspired Computing, Salamanca, Spain, 19–21 October 2011; pp. 633–640. [Google Scholar]
- Cohen, G.H.; Coon, G.A. Theoretical consideration of retarded control. Trans. ASME 1953, 75, 827–834. [Google Scholar]
Method | Kp | Ti | Td |
---|---|---|---|
Cohen-Coon | |||
AMIGO |
Method | Kp | Ti (s) | Td (s) | IAE | TV |
---|---|---|---|---|---|
PSO-I | 13.83 | 39.54 | 7.14 | 4442.0 | 2843.8 |
GWO-I | 13.82 | 39.49 | 7.13 | 4441.8 | 2843.8 |
PSO-II | 9.64 | 49.29 | 5.70 | 3831.4 | 2444.7 |
GWO-II | 10.40 | 47.55 | 6.08 | 3834.4 | 2429.0 |
PSO-III | 10.36 | 47.70 | 6.05 | 4438.5 | 2921.4 |
GWO-III | 10.23 | 47.97 | 5.97 | 4437.5 | 2924.8 |
PSO-IV | 9.53 | 49.69 | 5.65 | 4430.7 | 2936.6 |
GWO-IV | 10.17 | 48.14 | 5.93 | 4436.8 | 2927.0 |
Method | Kp | Ti (s) | Td (s) | IAE | TV |
---|---|---|---|---|---|
CC | 13.47 | 45.99 | 7.00 | 2389.4 | 2962.2 |
AMIGO | 4.69 | 72.96 | 9.48 | 3004.9 | 1972.3 |
PSO-I | 13.83 | 39.54 | 7.14 | 2273.6 | 3600.4 |
PSO-II | 9.64 | 49.29 | 5.70 | 2298.5 | 2216.7 |
PSO-III | 10.36 | 47.70 | 6.05 | 2392.5 | 2164.8 |
PSO-IV | 9.53 | 49.69 | 5.65 | 2482.7 | 1888.4 |
Method | IAE | TV |
---|---|---|
CC | 2300.9 | 2647.9 |
AMIGO | 2953.5 | 1860.6 |
PSO-I | 2235.8 | 3594.1 |
PSO-II | 2259.9 | 2102.6 |
PSO-III | 2351.1 | 2065.8 |
PSO-IV | 2442.0 | 1788.8 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
de Moura Oliveira, P.B.; Hedengren, J.D.; Solteiro Pires, E.J. Swarm-Based Design of Proportional Integral and Derivative Controllers Using a Compromise Cost Function: An Arduino Temperature Laboratory Case Study. Algorithms 2020, 13, 315. https://doi.org/10.3390/a13120315
de Moura Oliveira PB, Hedengren JD, Solteiro Pires EJ. Swarm-Based Design of Proportional Integral and Derivative Controllers Using a Compromise Cost Function: An Arduino Temperature Laboratory Case Study. Algorithms. 2020; 13(12):315. https://doi.org/10.3390/a13120315
Chicago/Turabian Stylede Moura Oliveira, P. B., John D. Hedengren, and E. J. Solteiro Pires. 2020. "Swarm-Based Design of Proportional Integral and Derivative Controllers Using a Compromise Cost Function: An Arduino Temperature Laboratory Case Study" Algorithms 13, no. 12: 315. https://doi.org/10.3390/a13120315
APA Stylede Moura Oliveira, P. B., Hedengren, J. D., & Solteiro Pires, E. J. (2020). Swarm-Based Design of Proportional Integral and Derivative Controllers Using a Compromise Cost Function: An Arduino Temperature Laboratory Case Study. Algorithms, 13(12), 315. https://doi.org/10.3390/a13120315