A high-fidelity digital twin of the Temperature Control Lab (TCLab), designed for process control education and experimentation.
This web-based simulator provides a realistic physics simulation of the TCLab hardware, allowing users to experiment with heat transfer dynamics and feedback control without needing the physical device. It models the two-heater, two-sensor system with configurable physics parameters.
- Realistic Heat Transfer: Models convection, radiation, and conduction between heaters.
-
Configurable Parameters: Adjust heat transfer coefficient (
$U$ ), mass, specific heat ($C_p$ ), heater power factors ($\alpha_1, \alpha_2$ ), emissivity ($\epsilon$ ), and ambient temperature. - Dynamic Visualization: 3D-style visualizer with real-time heat glow effects based on temperature and power.
- Manual Control: Direct slider control of Heater 1 (Q1) and Heater 2 (Q2) power (0-100%).
-
PID Controller: Built-in closed-loop PID controller with:
- Configurable gains (
$K_p, K_i, K_d$ ) - Individual setpoints for T1 and T2
- Anti-windup protection
- Smooth manual/auto switching
- Configurable gains (
- Live Plotting: Interactive real-time graphs for Temperature (T1, T2) and Power (Q1, Q2).
- Time Window Selection: View data for the last 1 minute, 5 minutes, 10 minutes, or the entire session.
- Data Export: Download full simulation history as CSV for analysis in Python/MATLAB/Excel.
-
Clone the repository
```bash git clone https://github.com/abe-mart/tclab-sim.git cd tclab-sim
-
Install dependencies
npm install
-
Run the simulator
npm run dev
Open http://localhost:5173 in your browser.
The simulation solves the following energy balance equations in real-time:
Where:
-
$Q_{C12}$ is conduction between heaters -
$Q_{R12}$ is radiation between heaters
MIT License
