This work describes an online experimentation system that provides visualized experiments, including the visualization of theories, concepts, and formulas, visualizing the experimental process with three-dimensional (3-D) virtual test rigs, and visualizing the control and monitoring system using widgets such as charts and cameras.
Experimentation is crucial in engineering education. This work explores visualized experiments in online laboratories for teaching and learning and also research. Interactive and visualizing features, including theory-guided algorithm implementation, web-based algorithm design, customizable monitoring interface, and three-dimensional (3-D) virtual test rigs are discussed. To illustrate the features and functionalities of the proposed laboratories, three examples, including the first-order system exploration using a circuit-based system with electrical elements, web-based control algorithm design for virtual and remote experimentation, are provided. Using user-designed control algorithms, not only can simulations be conducted, but real-time experiments can also be conducted once the designed control algorithms have been compiled into executable control algorithms. The proposed online laboratory also provides a customizable monitoring interface, with which users can customize their user interface using provided widgets such as the textbox, chart, 3-D, and camera widget. Teachers can use the system for online demonstration in the classroom, students for after-class experimentation, and researchers to verify control strategies.
Laboratories are vital infrastructure for research and education. When conventional laboratories are not available and/or accessible due to different causes, for example, unaffordable purchases and maintenance cost, safety considerations, and crises such as the coronavirus disease 2019 (COVID-19) pandemic, online laboratories can offer alternatives1,2,3. Like conventional laboratories, significant progress such as interactive features4 and customizable experiments5 have been achieved in the online laboratories. Before and during the COVID-19 pandemic, online laboratories are providing experimental services to users throughout the world6,7.
Among online laboratories, remote laboratories can provide users with an experience similar to hands-on experiments with the support of physical test rigs and cameras8. With the advancement of the Internet, communication, computer graphics, and rendering technologies, virtual laboratories also provide alternatives to conventional laboratories1. The effectiveness of remote and virtual laboratories to support research and education has been validated in related literature1,9,10.
Providing visualized experiments is crucial for online laboratories, and visualization in online experimentation has become a trend. Different visualization techniques are achieved in online laboratories, for example, curve charts, two-dimensional (2-D) test rigs, and three-dimensional (3-D) test rigs11. In control education, numerous theories, concepts, and formulas are obscure to comprehend; thus, visualized experiments are vital to enhancing teaching, student learning, and research. The involved visualizing can be concluded into the following three categories: (1) Visualizing theories, concepts, and formulas with web-based algorithm design and implementation, with which simulation and experimentation can be conducted; (2) Visualizing the experimental process with 3-D virtual test rigs; (3) Visualizing control and monitoring using widgets such as a chart and a camera widget.
In this work, three separate visualized examples are provided to enhance teaching and learning and research, which can be accessed via the Networked Control System Laboratory (NCSLab https://www.powersim.whu.edu.cn/react).
1. Example 1: First-order system using circuit-based experimentation protocol
2. Example 2: Interactive and visualized virtual experimentation protocol
3. Example 3: Research with remote and virtual laboratories protocol
The proposed laboratory system has been used in several different disciples at Wuhan University, such as the Automation, Power and Energy Engineering, Mechanical Engineering, and other universities, such as Henan Agricultural University6.
Teachers/students/researchers are provided with great flexibility to explore the system using different virtual and/or physical test rigs, define their control algorithms, and customize their monitoring interface; thus, users at different levels can benefit from the proposed system. The visualized experiments provided by the proposed approach can potentially enhance understanding theories, concepts, and formulas.
The proposed system can be used for different types of algorithm design (Figure 1 and Figure 3 are two examples) and multi-purposes such as teaching, learning, and research (three protocols can be regarded as three application examples). The first-order system is an example that the system can be applied to typical system analysis using circuit-based diagrams.
Figure 3 and Figure 5 demonstrate that the proposed online laboratory can design simple and complex control algorithms using the designed blocks, verified through simulation and real-time experimentation with 3-D virtual and physical test rigs, respectively, as shown in Figure 4 and Figure 6.
The three examples demonstrate that the proposed interactive and visualized laboratory can achieve the following visualization as aforementioned. (1) Theory, formulas, and schematic diagrams can be visualized through web-based algorithm design and implementation, with which simulation and experimentation can be conducted. (2) With the support of the 3-D virtual test rigs, experimental processes can be visualized in the absence of physical test rigs and cameras deployed at the test rig site. In remote laboratories, the integration of 3-D test rigs can also benefit users, allowing users to view the details of the test rigs from different angles. Combining 3-D virtual test rigs with physical test rigs at the remote side can potentially enhance user experience. (3) Using developed widgets such as a chart, a camera widget, and a textbox, the monitoring, and control during the experimental process can be visualized.
Figure 1: Construction of the first-order system with blocks from the ELECTRICAL ELEMENTS library in NCSLab. The user can drag any block from the left-side block library panel and construct a system by linking the selected blocks properly. Please click here to view a larger version of this figure.
Figure 2: Real-time experiment of the first-order system with the designed control algorithm. The parameters are tunable, and the signals can be monitored with the provided widgets. Please click here to view a larger version of this figure.
Figure 3: Web-based PID control algorithm design and implementation for the dual tank system. The simulation result is included, which shows that the water level of the second tank can be controlled to the set-point value of 10 cm. Please click here to view a larger version of this figure.
Figure 4: Real-time experimentation with the dual tank system. After tuning the integral term from 0.1 to 0.01, the set-point is reset from 15 cm to 25 cm. It can be seen that the overshoot has been eliminated. Please click here to view a larger version of this figure.
Figure 5: IMC control of the fan speed control system. The inverse model of the identified fan model is an improper transfer function (for a proper transfer function, the order of the transfer function numerator must be less than or equal to the order of the denominator), which is constructed with general blocks based on the identified model. To enable a tunable filter, the filter is also built with blocks. The lambda in the figure represents the reciprocal of the λ in Equation 6 and can be tuned easily. Please click here to view a larger version of this figure.
Figure 6: Real-time control and fan speed monitoring using the fan speed control remote laboratory combined with a 3-D virtual fan system. The physical fan system is located at Wuhan University and provides remote laboratory services to users worldwide. Please click here to view a larger version of this figure.
Figure 7: Schematic diagram of the first-order system. The first-order circuit design and implementation in NCSLab are based on this diagram. Please click here to view a larger version of this figure.
Figure 8: 3-D virtual dual tank system in NCSLab. The purpose of the control is to control the water level in the second tank to the set-point value. Please click here to view a larger version of this figure.
Figure 9: Schematic of the internal model control architecture. Gm(s) is the model of the real plant G(s), Gm(s)-1 is the inverse model of Gm(s), F(s) and is the filter. The F(s), Gm(s)-1, and Gm(s) constitute the IMC controller. Please click here to view a larger version of this figure.
Parameter | Value |
R0 | 200 kΩ |
R1 | 200 kΩ |
C | 1 µF |
R2 | 200 kΩ |
R3 | 200 kΩ |
Input | 1 V |
Table 1: Parameter configurations for the first-order circuit system. R2 and R3 are used to cancel the phase shift combined with the op-amp.
Supplementary Figure 1: Simulation warning interface when a user fails to ground a circuit. The result will warn the users, which can help them to recheck the designed circuit. Please click here to download this File.
Supplementary Figure 2: Compilation warning interface when a user fails to ground a circuit. The result will warn the users, which can help them to recheck the designed circuit. Please click here to download this File.
Supplementary Figure 3: Simulation result when a user reverses the polarity of the capacitor. A regular capacitor instead of the variable capacitor has been selected to illustrate this example. No warning message is shown, and the result is similar to Supplementary Figure 4. Please click here to download this File.
Supplementary Figure 4: Simulation result when the polarity of the capacitor is correct. A regular capacitor instead of the variable capacitor has been selected to illustrate this example. The simulation result will pop up to help the users to check the circuit. Please click here to download this File.
The presented protocol describes a hybrid online laboratory system that integrates physical test rigs for remote experimentation and 3-D virtual test rigs for virtual experimentation. Several different block libraries are provided for the algorithm design process, such as the electrical elements for circuit-based design. Users from control backgrounds can focus on learning without programming skills. The proper design of a control algorithm that can be applied to a suitable test rig should be considered. It is also challenging to design a controller to guarantee a good control performance (considering control performance index, including overshoot, settling time, and steady error) before applying it to the controlled test rig. Before compiling a control algorithm that can be used for real-time experimentation, simulation should be conducted to address potential issues. Control algorithms can be applied to other different test rigs using the system once they are integrated into the proposed system.
The background and theoretical knowledge regarding the three examples are as follows.
For the first-order system, the principle of the first-order system can be analyzed using circuit theory with the provided circuit in Figure 7. According to circuit theory12, the following two equations can be obtained. From the input side view of the op-amp, the current is
(1)
From the output side view of the op-amp, Equation 2 can be obtained
(2)
where is the impedance of the RC parallel circuit.
By combining Equation 1 and 2, the transfer function of the system can be calculated as
(3)
in which the minus sign (-) indicates a 180° phase shift of the output voltage, which is neglected in the analysis in the following steps.
Denote K = R1/R0, T = R1C, and then the transfer function of the system can be represented as
(4)
For the dual tank system, the designed 3-D water tank system is illustrated in Figure 8. The design and implementation of a previous version using Flash have been explored in the work of W. Hu et al. in 201413. The control purpose of this test rig is to control the water level in the second tank to the value of the set point. A PID controller has been used to control the dual tank. Theoretically, the PID can be expressed as14
(5)
where Kp, Ki, Kd are the coefficients for P, I, and D terms, respectively.
IMC is simple to tune with good set-point tracking performance and has been widely used to control real-life applications15. The control architecture of IMC is shown in Figure 9, in which G(s) is the real plant and Gm(s) is the model of the plant. Gm(s) is usually obtained through system identification. Gm(s)-1 is the inverse model of Gm(s), and F(s) is the filter. R(s), Y(s), and E(s) are the reference, output, and error, respectively. The F(s), Gm(s)-1, and Gm(s) constitute the IMC controller. A standard default filter F(s)16 is used in this work as Equation 6
, (6)
where λ is the filter time constant, and order n is selected to ensure a proper or semi-proper IMC compensator (F(s)*Gm(s)-1).
The IMC control algorithm has been designed and applied to control the physical fan speed system through calculation, analysis, and proper design. In this work, G(s) represents a physical fan speed control system, whose model Gm(s) is identified as a second-order system
. (7)
The order n of the filter F(s) is set to 1. For tuning purposes, the lambda in Figure 5 represents the reciprocal of the λ in Equation 6 and can be easily tuned. The filter is set to be the following
. (8)
Web-based algorithm design allows users at an advanced level to design more complex algorithms with the support of S-function. However, more advanced control strategies for research and education, such as control strategies for multi-agent systems or networked control strategies with time constraints, are under consideration for further upgrading the proposed laboratory system.
The circuit-based system is based on simulation. One of the advantages of simulation is that the users can conduct their operations freely. They do not have to worry about the consequences since their misoperation will cause no harm to themselves and the system and test rigs, especially in an online experimentation system.
After a circuit-based system is designed, the user is supposed to run a simulation. For some cases, such as failing to ground the circuit, the simulation and compilation results will warn the users, which can help them to recheck the designed circuit (Supplementary Figure 1 and Supplementary Figure 2). For other cases, for example, reversing the capacitor's polarity (Supplementary Figure 3), no warning message will be shown when a user tries to conduct a simulation or compilation, the result of which is similar to that of a correct circuit as shown in Supplementary Figure 4.
Currently, the main limitation of the online experimentation system is that it can primarily be used for users with a control background. The circuit-based system can only be used for simulation with no hardware setups. To cover diverse engineering fields, hardware for circuit systems that can be applied to electrical and electronics engineering can be integrated. More test rigs for other areas should also be considered.
Compared with MATLAB/Simulink, a standalone MATLAB/Simulink for each user is not required using the proposed methodology. Moreover, real-time experimentation with 3-D virtual test rigs and physical test rigs is more than pure simulation in the proposed laboratory. Compared with the MATLAB/Simulink-based remote laboratory presented by I. Santana et al.9, the proposed laboratory can be used to design controllers and the entire control system with the circuit-based system, 3-D virtual, and physical test rigs. Experimentation environment (EE) offers practical controller design methods with Blockly-based visual design for simple experiments and a JavaScript-based textual design for complex experiments5. Considering students are more familiar with MATLAB/Simulink, a block-based algorithm design interface similar to MATLAB/Simulink can be a good option for designing the control system.
The proposed system can be utilized for teaching, learning, and research for teachers, students, and researchers. Currently, the system has been mainly used in control engineering-related disciplines. The system can potentially be applied to electrical and electronics engineering, industrial electronics, and industrial control.
The authors have nothing to disclose.
This work was supported by the National Natural Science Foundation of China under Grant 62103308, Grant 62173255, Grant 62073247, and Grant 61773144.
Fan speed control system | / | / | Made by our team |
https://www.powersim.whu.edu.cn/react | Made by our team |