Control systems courses are common in undergraduate engineering programs. These courses focus on the design of the controller's mathematical model but rarely have students explore the practical issues of implementing the controller. Real-time and embedded systems courses focus on these practical issues with students implementing controllers for simplified Hardware-in-the- Loop plants such as a digital servo motor. Designing controllers for complex physical plants is difficult due to prohibitive costs or the risk of accidents caused by faulty controllers. These difficulties can be overcome if a simulator replaces the hardware-in-the-loop physical plant. We designed and implemented the Control System Plant Simulator (CSPS) as a flexible framework for simulating plant models in control system implementation projects. The framework allows the user to model continuous and discrete plants defined as transfer functions or systems of state-space equations. This paper describes the design of the CSPS framework by highlighting the expansion and modification flexibility it provides with its operating system, non-real-time user interface, and physical device abstraction layers. The CSPS framework has advantages over commercial tools that can provide a hardware-in-the-loop plant simulation. The framework's scope of usage is much narrower than the commercial tools making it easier to learn how to use and modify. Also, we distribute the framework as an open-source project making it readily available for use in any course without licensing, and ensuring that deeper and more complex customizations are possible. The paper concludes with a discussion of our successful experience using the framework in real-time systems course projects, and porting to two operating environments (standard Windows XP and Ardence RTX Real-Time Extensions for Windows), two user interfaces (C-based text, Visual Basic GUI), and two data acquisition devices (USB data acquisition, simulated multi-channel IO device).
Date of creation, presentation, or exhibit
Department, Program, or Center
Software Engineering (GCCIS)
Chandler, David and Vallino, James, "Control system plant simulator: A Framework for hardware-in-the-loop simulation" (2008). Accessed from
RIT – Main Campus