Open-source PID tuning python library
by Matt · raised 1,800 credits · spent 661 credits · pool 1,139 credits
Create an Open-source PID tuning python library
Back this build
Sign in to backMilestones — est. total target 15,200 credits
Full technical design document: library architecture, module layout, public API specification (controller classes, tuner interfaces, plant/simulation abstractions), survey of tuning methods to be implemented (Ziegler-Nichols, Cohen-Coon, AMIGO, IMC/lambda, relay autotuning, optimization-based), data model for process models (FOPDT, SOPDT, arbitrary transfer functions), error-handling and extensibility conventions, and a contributor-facing roadmap. Delivered as Markdown docs plus API stub files with full docstrings.
Working Python package skeleton with: discrete and continuous PID controller implementations (parallel/standard/series forms), anti-windup strategies (clamping, back-calculation), derivative filtering, setpoint weighting, bumpless transfer; a plant simulation framework supporting FOPDT/SOPDT/state-space models with noise and disturbance injection; step-response and closed-loop simulation utilities; pyproject packaging and initial unit tests for all core components.
Implementation of classical tuning rules: Ziegler-Nichols (step and ultimate-cycle), Cohen-Coon, AMIGO, IMC/lambda tuning, and Tyreus-Luyben; system identification module that fits FOPDT/SOPDT models from step-response or logged process data (least-squares and graphical methods); a unified Tuner interface so all methods are interchangeable; unit tests validating each rule against published textbook results.
Advanced tuners: relay-feedback (Åström-Hägglund) autotuning with describing-function analysis, frequency-domain tuning to gain/phase-margin specs, and optimization-based tuning minimizing IAE/ISE/ITAE via gradient-free optimizers with constraints on overshoot and control effort; robustness metrics (Ms, gain/phase margins) reported for every tuning result; tests covering convergence and edge cases (integrating and unstable plants).
Comprehensive benchmark suite running every tuning method against a standard battery of plant models (Åström-Hägglund benchmark set, dead-time-dominant, lag-dominant, integrating, oscillatory processes); automated report generation comparing IAE, overshoot, settling time, and robustness across methods; full pytest test suite targeting high coverage, property-based tests for controller invariants, and regression baselines.
Complete user documentation: Sphinx/MkDocs site sources with quickstart, theory primers for each tuning method, full API reference docstrings polished, six tutorial notebooks-as-scripts (e.g., tuning a temperature loop, relay autotuning a flow loop, handling noisy data), README, CONTRIBUTING guide, changelog, GitHub Actions CI/CD configs, and PyPI release packaging for a v1.0 open-source launch.