No description
| .gitignore | ||
| .python-version | ||
| main.py | ||
| model_exploration.ipynb | ||
| pyproject.toml | ||
| README.md | ||
| room.model | ||
| room.scaler | ||
| room_data.csv | ||
| room_data_clean.csv | ||
| uv.lock | ||
| X_test.pkl | ||
| y_test.pkl | ||
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.ipynbJupyter notebook for model identification. Uses data to fit a linear regression model of the system dynamics. -
main.pyImplementation 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.
- Install
uv(see the installation guide). - Sync dependencies:
uv sync - 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.