qp-rnn-demo / README.md
mcfloundinho's picture
Merge and update README with proper configuration
ac82dc6
---
title: QP-RNN Interactive Demo
emoji: ๐ŸŽฎ
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.35.0
app_file: app.py
pinned: false
license: mit
---
# QP-RNN: Quadratic Programming Recurrent Neural Network
This is an interactive demo for the paper ["MPC-Inspired Reinforcement Learning for Verifiable Model-Free Control"](https://arxiv.org/abs/2312.05332) (L4DC 2024).
## What is QP-RNN?
QP-RNN is a novel neural network architecture that combines:
- ๐ŸŽฏ **Structure** of Model Predictive Control (MPC)
- ๐Ÿง  **Learning** capabilities of Deep Reinforcement Learning
- โœ… **Verifiable** properties (stability, constraint satisfaction)
At each time step, QP-RNN solves a parameterized Quadratic Program:
```
min 0.5 * y'Py + q(x)'y
s.t. -1 โ‰ค Hy + b(x) โ‰ค 1
```
Where the parameters (P, H, q, b) are learned through RL instead of derived from a model.
## Demo Features
This interactive demo lets you:
- ๐ŸŽฎ Control a double integrator system with QP-RNN
- ๐Ÿ”ง Adjust controller parameters in real-time
- ๐Ÿ“Š Visualize system response and phase portraits
- ๐Ÿ“ˆ See performance metrics and constraint satisfaction
## Key Advantages
1. **Interpretable**: QP structure provides clear understanding
2. **Verifiable**: Enables formal stability and safety analysis
3. **Efficient**: Fixed-iteration solver suitable for real-time control
4. **Robust**: Handles constraints and disturbances naturally
## Links
- ๐Ÿ“„ [Paper](https://arxiv.org/abs/2312.05332)
- ๐Ÿ’ป [GitHub Repository](https://github.com/yiwenlu66/learning-qp)
- ๐Ÿค– [Full Training Code](https://github.com/yiwenlu66/learning-qp)
## Citation
```bibtex
@InProceedings{lu2024mpc,
title={MPC-Inspired Reinforcement Learning for Verifiable Model-Free Control},
author={Lu, Yiwen and Li, Zishuo and Zhou, Yihan and Li, Na and Mo, Yilin},
booktitle={Proceedings of the 6th Conference on Learning for Dynamics and Control},
year={2024}
}
```