Didactic Hardware in the Loop Platform: A Low-Cost Open-Source Approach
Keywords:
Control systems, Education, HIL simulation, Open-source hardware, Open-source softwareAbstract
In evaluating and validating a physical system, real-time Hardware in the Loop (HIL) emulation offers advantages such as time and cost reduction, fault prevention, and the ability to conduct validations in an environment similar to its final application. On the other hand, low-cost technologies such as microcontrollers, digital signal processors, and FPGAs have been employed to leverage the advantages of HIL emulation in the teaching process. This article describes the implementation of a low-cost, open-access HIL didactic platform for use in subjects such as differential equations, systems dynamics, and control systems, among others. The platform is based on a Raspberry Pi Pico development board and features a graphical user interface (GUI). In the GUI, the user can visualize graphs of the emulated system’s variables and real-time animation of its state and export the acquired data to a comma-separated file. The functionalities offered by the platform make it an affordable tool that allows users to evaluate the response of a dynamic system, whether it is open-loop or closed-loop, without the need for classrooms or specialized equipment. Unlike similar works where HIL techniques with low-cost hardware are employed for educational purposes, the proposal in this work is more cost-effective and integrates the described GUI. All the files necessary for implementing the didactic platform are openly available in a public repository, including those needed for PCB manufacturing.
Downloads
References
F. Mihalič, M. Truntič, and A. Hren, “Hardware-in-the-Loop Simulations: A Historical Overview of engineering challenges,” Electronics, vol. 11, no. 15, p. 2462, Aug. 2022, doi: 10.3390/electronics11152462
J. Montoya et al., “Advanced laboratory testing methods using Real-Time Simulation and Hardware-in-the-Loop techniques: A survey of Smart Grid International Research Facility Network activities,” Energies, vol. 13, no. 12, p. 3267, Jun. 2020, doi: 10.3390/en13123267
J. Martínez-Nolasco, V. Sámano-Ortega, J. Botello-Álvarez, J. Padilla-Medina, C. Martínez-Nolasco, and M. Bravo-Sánchez, “Development of a Hardware-in-the-Loop platform for the validation of a Small-Scale Wind System Control Strategy,” Energies, vol. 16, no. 23, p. 7813, Nov. 2023, doi: 10.3390/en16237813
L. Estrada, N. Vázquez, J. Vaquero, Á. De Castro, and J. Arau, “Real-Time hardware in the loop simulation Methodology for power converters using LabVIEW FPGA,” Energies, vol. 13, no. 2, p. 373, Jan. 2020, doi: 10.3390/en13020373
L. F. Quesada, J. D. Rojas, O. Arrieta, and R. Vilanova, “Open-source low-cost Hardware-in-the-loop simulation platform for testing control strategies for artificial pancreas research,” IFAC-PapersOnLine, vol. 52, no. 1, pp. 275–280, Jan. 2019, doi: 10.1016/j.ifacol.2019.06.074
R. F. Bastos, F. B. Silva, C. R. Aguiar, G. Fuzato, and R. Q. Machado, “Low‐cost hardware‐in‐the‐loop for real‐time simulation of electric machines and electric drive,” IET Electric Power Applications, vol. 14, no. 9, pp. 1679–1685, May 2020, doi: 10.1049/iet-epa.2019.0951
A. Sanchez, A. De Castro, M. S. Martínez-García, and J. Garrido, “LOCOFloat: a Low-Cost Floating-Point format for FPGAs.: Application to HIL simulators,” Electronics, vol. 9, no. 1, p. 81, Jan. 2020, doi: 10.3390/electronics9010081
X. Dai, C. Ke, Q. Quan, and K.-Y. Cai, “RFlySim: Automatic test platform for UAV autopilot systems with FPGA-based hardware-in-the-loop simulations,” Aerospace Science and Technology, vol. 114, p. 106727, Apr. 2021, doi: 10.1016/j.ast.2021.106727
A. Rosa, “Integrated PBL and HIL practices for real-time simulations applied in technical and engineering teaching using embedded systems,” Prz. Elektrotech, vol. 97, no. 1, pp. 46–52, Jan. 2021, doi: 10.15199/48.2021.01.08
X. Tang and Y. Xi, “Application of hardware‐in‐loop in teaching power electronic course based on a low‐cost platform,” Computer Applications in Engineering Education, vol. 28, no. 4, pp. 965–978, Jun. 2020, doi: 10.1002/cae.22274
W. Jiang, L. Sun, Y. Chen, H. Ma, and S. Hashimoto, “A Hardware-in-the-Loop-on-Chip development system for teaching and development of dynamic systems,” Electronics, vol. 10, no. 7, p. 801, Mar. 2021, doi: 10.3390/electronics10070801
Y. Martinez-Armero, S. Lopez-Blandon, and E. Giraldo, “Low-cost Arduino-based Hardware-In-the-Loop Platform for Simulation and Control of Dynamic Systems,” IAENG International Journal of Computer Science, vol. 50, no. 4, pp. 1312–1318, Dec. 2023.
Y. P. C. González, S. Z. J. Mora, and R. G. M. Morillo, “Tendencias y desafíos políticos y socio culturales de la educación superior contemporánea en Latinoamérica.,” Revista Boletín Redipe, vol. 11, no. 1, pp. 71–91, Jan. 2022, doi: 10.36260/rbr.v11i1.1628
L. M. S. Santana, M. Maximo, and L. C. S. Goes, “Physical modeling and parameters identification of the MG995 servomotor,” in 26th International Congress of Mechanical Engineering, Florianópolis, Santa Catarina, Brazil, 2021.
A. Taifour Ali, A. M. Ahmed, H. A. Almahdi, O. A. Taha, and A. N. A, “Design and implementation of ball and beam system using PID Controller,” Automatic Control and Information Sciences, vol. 3, no. 1, pp. 1–4, Aug. 2017, doi: 10.12691/acis-3-1-1
B. Meenakshipriya and K. Kalpana, “Modelling and Control of Ball and Beam System using Coefficient Diagram Method (CDM) based PID controller,” IFAC Proceedings Volumes, vol. 47, no. 1, pp. 620–626, Jan. 2014, doi: 10.3182/20140313-3-in-3024.00079
S. Anand and R. Prasad, “Modeling and control of Ball and Beam system,” International Journal of Engineering Research in Electronics and Communication Engineering (IJERECE), vol. 4, no. 9, pp. 2394–6849, Sep. 2017.
K. Sehgal and N. Harsh, “Modelling and control of dynamical ball and beam system using SA tuned PIDA and PIAD controllers,” in 2021 IEEE International Conference on Electronics, Computing and Communication Technologies (CONECCT), Bangalore, India, 2021, pp. 1–6.
J. C. Castro-Mendoza, C. J. Cabrera-Velázquez, E. Ríos-Montiel, D. Pérez-Silva, and R. Villafuerte-Segura, “Sistema Bola-Viga: Construcción y aplicación de técnicas de control,” PÄDI Boletín Científico De Ciencias Básicas E Ingenierías Del ICBI, vol. 10, no. 6, pp. 107–116, Nov. 2022, doi: 10.29057/icbi.v10iespecial6.9217
Sreenivasappa, B., & Udaykumar, R. (2010). Analysis and implementation of discrete time PID controllers using FPGA. International journal of electrical and computer engineering, 2(1), 71-82.
Kocur, M., Kozak, S., & Dvorscak, B. (2014, May). Design and implementation of FPGA-digital based PID controller. In Proceedings of the 2014 15th International Carpathian Control Conference (ICCC) (pp. 233-236). IEEE.
VictorSamano. Didactic-HIL, GitHub Repository. 2025. Available online: https://github.com/VictorSamano/Didactic-HIL (accessed on 21 January 2025).