No description
Find a file
2025-09-18 15:54:51 +02:00
.gitignore feat: initial commit 2025-09-18 15:54:51 +02:00
.python-version feat: initial commit 2025-09-18 15:54:51 +02:00
main.py feat: initial commit 2025-09-18 15:54:51 +02:00
model_exploration.ipynb feat: initial commit 2025-09-18 15:54:51 +02:00
pyproject.toml feat: initial commit 2025-09-18 15:54:51 +02:00
README.md feat: initial commit 2025-09-18 15:54:51 +02:00
room.model feat: initial commit 2025-09-18 15:54:51 +02:00
room.scaler feat: initial commit 2025-09-18 15:54:51 +02:00
room_data.csv feat: initial commit 2025-09-18 15:54:51 +02:00
room_data_clean.csv feat: initial commit 2025-09-18 15:54:51 +02:00
uv.lock feat: initial commit 2025-09-18 15:54:51 +02:00
X_test.pkl feat: initial commit 2025-09-18 15:54:51 +02:00
y_test.pkl feat: initial commit 2025-09-18 15:54:51 +02:00

MPC Controller with Data-Driven Model Identification

This project demonstrates how to identify a linear system model from data and then design a Model Predictive Controller (MPC) around it.

Project Structure

  • model_exploration.ipynb Jupyter notebook for model identification. Uses data to fit a linear regression model of the system dynamics.

  • main.py Implementation of a basic grid search MPC controller that leverages the identified model to compute optimal control inputs.

Installation

This project uses uv for dependency management.

  1. Install uv (see the installation guide).
  2. Sync dependencies:
    uv sync 
    
  3. Activate the virtual environment:
    source .venv/bin/activate
    

Usage

Run model_exploration.ipynb to generate or inspect the identified linear model.

Run the controller: bash python main.py

All dependencies are pinned and managed via uv.