ENG  Vol.12 No.9 , September 2020
Implementation of Control Algorithms in Small Embedded Systems
Abstract: This work describes how a control algorithm can be implemented in a small (8-bit) microcontroller for the main purpose of merging embedded systems and control theory in electrical engineering undergraduate classes. Two different methods for discretizing the control expression are compared: Euler transformation and bilinear transformation. The sampling rate’s impact on the algorithm is discussed and theoretical results are verified by an application to a temperature control system in a heating plant. Four control algorithms are compared: PID and PI algorithms discretized with Euler and bilinear transformation, respectively. It is shown that for the heating plant used in this work, a bilinear PI algorithm implemented in a small 8-bit microcontroller outperforms a commercial controller from Panasonic. It is also demonstrated that all the derived algorithms can be implemented using integer calculations only, obviating the need for expensive and time-consuming floating-point calculations. This work bridges the gap between control theory equations and the implementation of control systems in small embedded systems with no inherent floating-point processing power.
Cite this paper: Bengtsson, L. (2020) Implementation of Control Algorithms in Small Embedded Systems. Engineering, 12, 623-639. doi: 10.4236/eng.2020.129044.

[1]   Harris, T., Seppala, C. and Desborough, L. (1999) A Review of Performance Monitoring and Assessment Techniques for Univariate and Multivariate Control Systems. Journal of Process Control, 9, 1-17.

[2]   Ziegler, J. and Nichols, N. (1942) Optical Settings for Automatic Controllers. Transactions of the American Society of Mechanical Engineers, 64, 759-768.

[3]   Ahmed, S., Huang, B. and Shah, S. (2007) Novel Identification Method from Step Response. Control Engineering Practice, 15, 545-556.

[4]   Bi, Q., Cai, W.-J., Lee, E.-L., Wang, Q.-G., Hang, C.-C. and Zhang, Y. (1999) Robust Identification of First-Order plus Dead-Time Model from Step Response. Control Engineering Practice, 7, 71-77.

[5]   Ljung, L. (1999) System Identification. Prentice-Hell, New Jersey.

[6]   Basilo, J. and Matos, S. (2002) Design of PI and PID Controllers with Transient Performance Specification. IEEE Transactions on Education, 45, 364-370.

[7]   Chesaru, V., Dan, C. and Bodea, M. (2006) PID Algorithm for Controller Processors. 2006 International Semiconductor Conference, Sinaia, 27-29 September 2006, 429-432.

[8]   Sarin, S., Hindersah, H. and Prihatmanto, A. (2012) Fuzzy PID Controllers Using 8-Bit Microcontroller for U-Board Speed Control. 2012 International Conference on System Engineering and Technology, Bandung, 11-12 September 2012, 1-6.

[9]   Uzunovic, T., Zunic, E., Badnjevic, I., Miokovic, I. and Konjicia, S. (2010) Implementation of Digital PID Controller. The 33rd International Convention MIPRO, Opatija, 24-28 May 2010, 1357-1361.

[10]   Xu, C., Huang, D.G., Huang, Y.P. and Gong, S.G. (2008) Digital PID Controller for Brushless DC Motor Based on AVR Microcontroller. 2008 IEEE International Conference on Mechatronics and Automation, Takamatsu, 5-8 August 2008, 247-252.

[11]   Kalúz, M., Klauco, M. and Kvasnica, M. (2015) Real-Time Implementation of a Reference Governor on the Arduino Microcontroller. 2015 20th International Conference on Process Control, Strbske Pleso, 9-12 June 2015, 350-356.

[12]   Boudreaux, R.R., Nelms, R.M. and Hung, J.Y. (1997) Simulation and Modeling of a DC-DC Converter by an 8-Bit Microcontroller. Proceedings of APEC 97—Applied Power Electronics Conference, Atlanta, 27 February 1997, 963-969.

[13]   Aslam, S., Hannan, S., Sajjad, U. and Zafar, W. (2016) Implementation of PID on PIC24F Series Microcontroller for Speed Control of a DC Motor Using MPLAB and Proteus. Advances in Science and Technology Research Journal, 10, 40-50.

[14]   Krivic, S., Hujdur, M., Mrzic, A. and Konjicija, S. (2012) Design and Implementation of Fuzzy Controller on Embedded Computer for Water Level Control. 2012 Proceedings of the 35th Convention MIPRO, Opatija, 21-25 May 2012, 1747-1751.

[15]   Arzak, M., Sunarya, U. and Hadiyoso, S. (2016) Design and Implementation of Wheelchair Controller Based on Electroencephalogram Sinal Using Micronctroller. International Journal of Electrical and Computer Engineering, 6, 2878-2886.

[16]   Das, A. and Banerjee, K. (2009) Fast Prototyping of a Digital PID Controller on a FPGA Based Soft-Core Microcontroller for Precision Control of a Brushed DC Servo Motor. 2009 35th Annual Conference on IEEE Industrial Electronics, Porto, 3-5 November 2009, 2825-2830.

[17]   Youness, H., Moness, M. and Khaled, M. (2014) MPSoCs and Multicore Microcontrollers for Embedded PID Control: A Detailed Study. IEEE Transactions on Industrial Informatics, 10, 2122-2133.

[18]   Chan, Y., Moallem, M. and Wang, W. (2007) Design and Implementation of Modular FPGA-Based PID Controllers. IEEE Transactions on Industrial Electronics, 54, 1898-1906.

[19]   Gosh, S., Barai, R., Bhattarcharya, S., Bhattarcharya, P., Rudra, S., Dutta, A. and Pyne, R. (2013) An FPGA Based Implementation of a Flexible Digital PID Controller for Motion Control System. 2013 International Conference on Computer Communication and Informatics, Coimbatore, 4-6 January 2013, 1-6.

[20]   Lita, I., Visan, A. and Cioc, I. (2009) FPAA Based PID Controller with Application in the Nuclear Domain. 2009 32nd International Spring Seminar of Electronics Technology, Brno, 13-17 May 2009, 1-4.

[21]   Moallem, M. (2004) A Laboratory Testbed for Embedded Computer Control. IEEE Transactions on Education, 47, 340-347.

[22]   Kheriji, A., Bouani, F., Ksouri, M. and Ahmed, M. (2011) A Microcontroller Implementation of Model Predictive Control. International Journal of Electrical, Computer, Energetic, Electronic and Communication Engineering, 5, 600-606.

[23]   Bohner, M. and Peterson, A. (2002) Laplace Transform and Z-Transform: Unification and Extension. Methods and Applications of Analysis, 9, 151-158.

[24]   Shannon, C. (1949) Communication in the Presence of Noise. Proceedings of the Institute of Radio Engineers, 37, 10-21.

[25]   Proakis, J. and Manoakis, D. (2004) Digital Signal Processing. 2nd Edition, Macmillan Publishing Company, New York.

[26]   Microchip Technology Inc. (2018) PIC16(L)F1764/5/8/9. Microchip Tech. Inc., Tucson.

[27]   Analog Devices (2015) TMP35/TMP36/TMP37 Low Voltage Temperature Sensors. Rev. H ed., Norwood, Maine.

[28]   Panasonic, S. (2017) Relays—Polarized Power Relays. ASCTB207E ed., Osaka.

[29]   Laplante, P. (2004) Real-Time Systems Design and Analysis. John Wiley & Sons, Inc., Hoboken.

[30]   Panasonic (2020) Panasonic Industrial Automation.