Abstract
With the development of computer science and the Internet, using virtual experiments to improve teaching effects is becoming increasingly popular. This paper describes a framework of virtual experiments for control courses in college. It includes three layers: the user interface layer based on Flash technology, the data exchange layer based on Webservice technology, and the calculation module in the data process layer based on the Modelica language. This framework provides a friendly user interface and solves the problem of multifarious calculations required for simulating real phenomena in control experiments. An example of a virtual experiment is shown at the end of this paper. This framework can also be used for virtual experiments in other college education courses.
Introduction
Control engineering is a foundational yet abstract field of study. Concepts such as proportional-integral-derivative (PID) control and frequency domain analysis are often difficult for students to grasp without hands-on experimentation. However, physical laboratories present significant challenges: they are expensive to maintain, have limited operating hours, and cannot easily accommodate the growing number of remote learners.
While virtual labs offer a solution, they often struggle to balance user interactivity with computational rigor. Standard web pages frequently lack the "real-feel" interactivity of a physical lab, and simulating real-world physics requires solving complex differential equations. While MATLAB is the industry standard for such calculations, its high cost and the technical difficulty of integrating its heavy computational engine into a lightweight, browser-based environment make it a suboptimal choice for widespread academic use. This paper proposes a three-layer framework designed to be both highly interactive and mathematically rigorous, accessible via a standard web browser.
The Three-Layer Framework
The proposed architecture decouples the user experience from the underlying mathematical processing through three distinct layers.
1. User Interface Layer
The "face" of the system is built using Adobe Flex/Flash technology. This layer provides a Rich Internet Application (RIA) experience, handling vector animations—such as liquid levels rising in a tank—and providing interactive components like buttons and input boxes. This allows students to manipulate the virtual apparatus in a way that mimics a physical laboratory.
2. Data Exchange Layer
Acting as the "glue" of the system, this layer utilizes Web Services (SOAP/WSDL) running on a Tomcat server. It serves as a bridge, passing user-defined parameters from the browser to the server and returning calculation results to update the user interface in real-time.
3. Data Process Layer
The "brain" of the framework utilizes Modelica, an open-source, object-oriented, equation-based modeling language. By using OpenModelica, physical models (written in .mo files) are compiled into standalone executable (.exe) files. When a student adjusts a parameter, the Web Service writes to a parameter file, triggers the executable, and reads the resulting output file to send back to the user. This approach avoids the need for expensive MATLAB licenses while maintaining high mathematical accuracy.
Case Study: Process Control Experiment
To demonstrate the framework's efficacy, the authors implemented a "Process Control" experiment. In this scenario, students are tasked with controlling the liquid level in a bottle by adjusting a pump via a PID controller.
Students can interact with the system by opening a settings window to input $K_p$, $K_i$, and $K_d$ parameters. The system provides real-time feedback by generating response curves (liquid level vs. time), allowing students to visualize critical control concepts like overshoot and settling time. This "real behavior" philosophy ensures that the virtual apparatus reacts to inputs exactly as its physical counterpart would.
Conclusion and Future Work
The three-layer architecture successfully provides a modular and cost-effective solution for virtual engineering labs. By separating visual properties from calculation properties, the system allows for independent updates to the UI or the underlying physics models.
However, there are notable limitations. The reliance on Flash/Flex, while effective at the time of the study, is now obsolete as Flash has been deprecated. Future implementations would require migrating the UI layer to modern standards like HTML5 or WebAssembly. Additionally, while the framework handles individual simulations well, further research is needed to address server scalability for high-concurrency environments, such as large classes accessing the system simultaneously. Despite these challenges, the framework remains a robust model for adapting various engineering and science courses to a virtual format.
Summary updated