controllers.mp4
- Manual control (choose the control input with your mouse!)
- Feedforward control (aka open loop control)
- Bang-bang control (aka on/off control)
- PID control
- H2 optimal control (aka LQG control)
The only libraries used are NumPy (matrices), SciPy (linear algebra and integration), Matplotlib (plotting) and PyQt6 (GUI). You can install the most up-to-date versions using:
pip install numpy scipy matplotlib PyQt6
or see below for installing specific versions for guaranteed compatability.
PyQt6
can be easily swapped out for PySide6
by replacing the import
lines in gui.py
and main.py
with:
from PySide6.QtWidgets import ...
from PySide6.QtCore import ...
- Clone the repo to your system:
git clone https://github.com/lorcan2440/Interactive-Control-System.git
- Navigate into the project directory:
cd Interactive-Control-System
(Optional) Create and activate a virtual environment. This helps keep dependencies isolated.
python -m venv venv
# if on Linux / macOS:
source venv/bin/activate
# in on Windows:
venv\Scripts\activate
- Make sure you have Python 3 with pip installed, then run:
pip install -r requirements.txt
- Run the application:
python main.py
- Lead-lag compensator
- Sliding mode control (including boundary layer smoothing)
- Model predictive control (solve using OSQP)
- H∞ optimal control (solve by either CARE or LMI in CVX)
- Neural control (using LSTM)
- Reinforcement learning control (using DDPG)
- Plot the error signal e instead of the output y in the top subplot.
- Show the poles of the OLTF L(s) in the complex plane and allow interactive pole placement.
- Show a Bode/Nyquist plot of L(s) with the gain/phase margins and allow switching between them.
- Add interactive loop-shaping to the lead-lag compensator
- Rewrite to run in a browser (no idea how to do this at present... JavaScript? 😭)