Skip to Main Content
This paper discusses the development of a real-time digital control system with hardware in the loop (HIL) for modeling and controls education. This environment requires software tools by MathWorks, Inc. and a C++ compiler. The hardware tools include an off-the-shelf data acquisition card and the desired hardware to be controlled. The use of a single environment for dynamic system analysis, control law development, simulation evaluation, and final implementation on an HIL system has many educational advantages as compared to multienvironment settings. This host-target real-time environment is implemented and demonstrated by controlling a nonlinear, open-loop unstable, and time varying custom-built magnetic levitation device. The values of any parameter (control law, reference trajectory) in the Simulink model can be changed dynamically on the host computer without recompiling the control code, and their effects are observed in real-time on the HIL system. This environment allows for extensive experimentation, development of linear and nonlinear controllers, and performance comparison with HIL as shown in the presented examples. The educational features of this environment are presented throughout the paper and were verified in a class setting.