Skip to content

Repository files navigation

Tennessee Eastman Process (TEP) Simulator

A web-based interactive simulation, control, and machine learning benchmarking platform for the Tennessee Eastman Process (TEP) benchmark chemical plant model (Downs & Vogel, 1993).

Designed for control system engineers, process safety researchers, and data scientists, this application provides high-fidelity dynamic process simulation, interactive P&ID visualization, custom machine learning model deployment, and batch dataset generation for fault detection and diagnosis (FDD).


📸 Platform Demos & Visuals

1. 📊 Dataset Generation for AI/ML Model Training

Use the Batch Data Generator to produce rich, multi-variable process datasets (41 XMEAS + 12 XMV) across normal and disturbed plant conditions. This data is directly exported as CSV and serves as the training set for custom AI/ML models (e.g., Autoencoders, LSTMs, Random Forests).

Data Generation & Production


2. ⚡ Real-Time Simulation & Anomaly Detection Demonstration

Live demonstration of the Real-Time Simulator running a custom uploaded ML model. Injected process disturbances (IDV) are detected in real-time with instant anomaly probability scoring, root-cause sensor contribution ranking, and active fault detection latency stopwatch tracking.

Real-Time Anomaly Detection Demo


🌟 Key Features

1. ⚙️ High-Fidelity Dynamic Process Simulation

  • Full State Vector: Simulates all 41 Process Measurement Variables (XMEAS_141) and 12 Manipulated Valve Variables (XMV_112).
  • 20 Industrial Disturbances (IDV 1–20): Real-time injection of step changes, random variations, slow drifts, sticking valves, and unknown feed composition changes.
  • Dual Control Modes: Toggle seamlessly between Closed-Loop PID Control and Manual Open-Loop Control.
  • Real-time Variable Execution Speed: Configurable execution rates from 1x (Real-Time) up to 250x (Instant Acceleration).
  • Plant Safety Interlock System: Automatic emergency shutdown trip system for overpressure, liquid overflow, or temperature runaway with detailed shutdown diagnostics.

2. 🏭 Interactive Piping & Instrumentation Diagram (P&ID)

  • Visual animated schematic of main plant units: Reactor, Separator, Stripper, Compressor, and Condenser.
  • Dynamic stream property badges indicating live pressure, temperature, liquid levels, and flow rates.
  • Interactive control valve feedback indicators and alarm state highlighting.

3. 🧠 Live Machine Learning & Anomaly Detection Workbench

  • Flexible Model Architectures:
    • Sensor Threshold Rules: Simple rule-based limits on key process indicators.
    • Principal Component Analysis (PCA): Multivariate Statistical Process Control (MSPC) projection and SPE/Q-statistic tracking.
    • Deep Autoencoders: Neural network reconstruction error monitoring.
    • Custom Model Upload: Upload JSON weights and scaling parameters trained in Google Colab / Jupyter Notebooks.
  • Inference Monitoring HUD:
    • Live anomaly probability score & binary alert indicator.
    • Active Fault Response Stopwatch: Tracks exact detection latency (seconds) from fault injection to alarm trigger.
    • Root-Cause Attribution: Live ranking of top contributing sensor variables to the anomaly.

4. 📊 Multi-Episode Batch Data Generator

  • Generate synthetic multi-run datasets for offline model training (e.g., LSTMs, Autoencoders, XGBoost, Random Forests).
  • Configurable parameters: Episode Count, Run Duration, Sampling Rate, Target Fault Types, and Process Noise level.
  • Single-click CSV Export containing run_id, time steps, 41 XMEAS, 12 XMV, active fault code, and binary anomaly target flags.

5. 📈 Time-Series Analytics & State Logs

  • Interactive multi-parameter trend graphs using high-performance charting libraries.
  • Complete tabular event logging with filtering and raw CSV data export capabilities.

📐 Process Overview & Variables

The Tennessee Eastman Process consists of 5 major plant operating units:

  1. Reactor: Exothermic gas-phase reaction converting gaseous feeds A, C, D, and E to liquid products G and H.
  2. Condenser: Cools reactor effluent to condense liquid products.
  3. Vapor-Liquid Separator: Separates non-condensable recycle gas from liquid effluent.
  4. Recycle Compressor: Returns unreacted feeds back to the reactor loop.
  5. Stripper: Removes residual light feed components from final liquid product.

Standard Variables Reference

  • Measurement Variables (XMEAS 1–41): Temperatures, pressures, liquid levels, flow rates, and component concentrations.
  • Manipulated Variables (XMV 1–12): Feed control valves, purge valve, separator liquid valve, stripper liquid valve, and reactor cooling water valve.
  • Disturbances (IDV 1–20): Step/drift/random variations in A/C/D/E feed conditions, cooling water temperatures, and valve failures.

🚀 Getting Started

Prerequisites

  • Node.js: v18.0.0 or higher
  • npm or bun / yarn

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/tennessee-eastman-simulator.git
    cd tennessee-eastman-simulator
  2. Install dependencies:

    npm install
  3. Start the local development server:

    npm run dev
  4. Open your browser and navigate to http://localhost:3000.


🧪 Machine Learning Workflow

  1. Generate Training Data: Open the Batch Data Generator tab, select target faults (or normal steady-state runs), and click Generate & Export CSV.
  2. Train Model: Load the exported CSV into your Python environment (Jupyter / Colab) using pandas and train your model (Autoencoder, PCA, Random Forest, etc.).
  3. Export & Upload: Export model weights/scalers as JSON and upload them directly into the Machine Learning tab in the simulator for real-time validation!

📜 Citation & References

  • Downs, J. J., & Vogel, E. F. (1993). A plant-wide industrial process control problem. Computers & Chemical Engineering, 17(3), 245-255.
  • Bathelt, L., Ricker, N. L., & Jelali, M. (2015). Revision of the Tennessee Eastman Process Model in MATLAB/Simulink.

About

TEP-Process-Simulator

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages