Experience the live closed-loop simulation in your browser:
👉 https://parth-bot-crypto26-autonomous-production-choke-contr-app-mr9poo.streamlit.app/
In oil and gas production, a production choke valve at the wellhead regulates fluid flow from the reservoir.
- Manual Operator Limitations: Today, choke adjustments are performed manually based on periodic operator observations. As operators manage dozens of wells, manual setpoint adjustments become inconsistent and non-optimal.
-
Safety vs. Production Dilemma: Opening the choke increases oil production rate (
$Q$ ), but rapidly accelerates pressure drawdown at the wellhead ($WHP$ ) and bottomhole ($BHP$ ). -
Operational Risks:
- Opening too conservative leads to lost oil production revenue.
- Opening aggressively drops wellhead pressure below minimum safe operating envelopes (
$WHP < 215 \text{ psi}$ ), risking wellbore collapse, gas flaring, or separator flooding. - Rapid choke position jumps cause severe mechanical valve wear and thermal shock.
We developed a Closed-Loop Autonomous Model Predictive Control (MPC) system that operates without human intervention every
[ Real-time Telemetry ] ──> [ Dynamic System ID ] ──> [ 10-hr Prediction Horizon ]
(Q, WHP, FLP, BHP, WHT, AP) (R² > 0.993) │
▼
[ Autonomous Choke Action ] <── [ Ramp Rate Limit ] <─── [ SLSQP Optimizer ]
(Forward Injection) (|Δu| <= 5%/hr) (Enforce WHP, FLP, BHP)
-
Empirical Dynamic Model Identification: Fit multi-variable dynamic state-space transfer functions (
$u \to Q, WHP, FLP, BHP$ ) on step-test data, achieving$R^2 > 0.993$ accuracy across all process variables. - Constrained Horizon Predictive Optimization: Implemented a 10-hour prediction horizon using Sequential Least Squares Programming (SLSQP).
-
Hard Constraint Enforcement:
- Actuator Ramp Rate Limit: Strictly clamped at
$|\Delta u| \le 5.0% / \text{hr}$ . - Active Pressure Safety Envelopes:
$WHP \ge 215.0 \text{ psi}, FLP \ge 150.0 \text{ psi}, BHP \ge 2880.0 \text{ psi}$ .
- Actuator Ramp Rate Limit: Strictly clamped at
-
Autonomous Infeasible Target Saturation: If an excessive flow target (e.g.
$200 \text{ bbl/hr}$ ) is requested, the controller automatically rejects unsafe choke positions and clamps operation at the maximum safe flow rate ($\sim 159 \text{ bbl/hr}$ ).
From 120 hours of step-response data (Autonomous_Choke_Control_Simulated_Dataset.csv), dynamic equations were extracted:
$$\min_{{u_k, \dots, u_{k+N-1}}} \sum_{i=0}^{N-1} \left[ 10.0 \left(\hat{Q}{k+i} - Q{\text{target}}\right)^2 + 2.0 \left(u_{k+i} - u_{k+i-1}\right)^2 \right]$$ Subject to:
$0% \le u_i \le 100%$ $|u_i - u_{i-1}| \le 5.0%$ - $\hat{WHP}{k+i} \ge 215.0 \text{ psi}, \quad \hat{FLP}{k+i} \ge 150.0 \text{ psi}, \quad \hat{BHP}_{k+i} \ge 2880.0 \text{ psi}$
Proves why classical PID causes choke hunting and WHP safety breaches, whereas MPC achieves 100% constraint compliance.

Demonstrates automatic rejection of unsafe choke moves and safe clamping at maximum feasible flow rate.

| Metric | Target / Benchmark | Solution Achieved | Safety Compliance |
|---|---|---|---|
| Model Fit Accuracy ( |
✅ PASSED (100%) | ||
| Choke Ramp Rate Constraint | Max |
✅ PASSED (100%) | |
| WHP Safety Breach Rate | ✅ PASSED (100%) | ||
| FLP Safety Breach Rate | ✅ PASSED (100%) | ||
| Scenario C Safe Clamping | Safe Saturation | Settles at |
✅ PASSED (100%) |
| Execution Latency | ✅ PASSED (100%) |
├── dataset.py # Reconstructed dataset loader
├── system_id.py # Dynamic System Identification (R^2 > 0.993)
├── mpc_controller.py # Constrained SLSQP MPC Controller
├── benchmark_controllers.py # Comparative PID vs Rule-Based vs MPC engine
├── run_all_scenarios.py # Executes Scenarios A, B, and C
├── demo_live_run.py # Terminal CLI live demonstration script
├── app.py # Streamlit Industrial Digital Twin Web UI
├── Autonomous_Choke_Control.ipynb # Complete Executable Jupyter Notebook
├── Engineering_Report.md # Detailed Technical Engineering Report
└── SIH_Idea_Presentation_Deck.md # Official 6-Slide Presentation Deck Content
git clone https://github.com/Parth-bot-crypto26/Autonomous-Production-Choke-Controller.git
cd Autonomous-Production-Choke-Controllerpip install -r requirements.txtpython system_id.pypython run_all_scenarios.pystreamlit run app.pyOpen http://localhost:8501 in your browser.

