How kjkoster/stability-preserving-pid-autotuner works
This repository is an experimental stability-preserving PID auto-tuner for a simulated or hardware plant. Its main workflow proposes PID gains, runs a supervised control episode, evaluates the episode, and feeds the result back to the learner. The README also emphasizes conventional plant control and fallback supervision as distinct stages. The graph reflects sampled runtime code and documented design; some internals and optional integrations are described at directory or module level where source excerpts were incomplete.
Main entry points: autotuning_supervised_plant_control.py Auto-tuning Driver · ddpg_torch.py DDPG Agent · plant_control.py Plant Control Loop · supervised_plant_control.py Stability Supervisor
Components 16
Plant Control
- Stability Supervisor
supervised_plant_control.py - Plant Control Loop
plant_control.py - PID Controller
plant_control.py - Simulated Or Hardware Plant
plant_control.py
Tuning And Learning
- Auto-tuning Driver
autotuning_supervised_plant_control.py - Random Tuner
random_but_stable_pid_autotuner.py - DDPG Agent
ddpg_torch.py - Actor Network
ddpg_torch.py - Critic Network
ddpg_torch.py - Replay Buffer
ddpg_torch.py
Episode Data
- Episode Utilities
episodes.py - Episode Files
Results Analysis
- Learning Plotter
plot_learning.py
Other components
- Engineer
- TCLab Interface
- Human Operator
Connections 22
- Engineer → Auto-tuning Driver: starts training
- Auto-tuning Driver → Stability Supervisor: runs episodes
- Auto-tuning Driver → DDPG Agent: chooses gains
- Auto-tuning Driver → DDPG Agent: records reward
- Auto-tuning Driver → Episode Utilities: saves episode
- Auto-tuning Driver → Actor Network: scales actions
- DDPG Agent → Actor Network: predicts actions
- DDPG Agent → Critic Network: updates values
- DDPG Agent → Replay Buffer: stores transitions
- DDPG Agent → Replay Buffer: samples transitions
- Stability Supervisor → Plant Control Loop: steps plant
- Stability Supervisor → Plant Control Loop: sets fallback gains
- Plant Control Loop → PID Controller: computes control
- Plant Control Loop → Simulated Or Hardware Plant: applies output
- Simulated Or Hardware Plant → Plant Control Loop: returns measurements
- Simulated Or Hardware Plant → TCLab Interface: uses interface
- Human Operator → Plant Control Loop: runs control
- Random Tuner → Stability Supervisor: runs episodes
- Random Tuner → Episode Utilities: saves episode
- Episode Utilities → Episode Files: writes episode
- Engineer → Learning Plotter: analyzes runs
- Learning Plotter → Episode Files: reads episodes