"""pidtune — an open-source PID tuning library. ``pidtune`` provides: * **Process models** — :class:`FOPDTModel`, :class:`SOPDTModel`, and :class:`TransferFunctionModel`, all implementing the common :class:`ProcessModel` interface (``pidtune.models``). * **Controller representations** — the :class:`PIDGains` value object (with parallel/standard/series form conversions via :class:`ControllerForm`) and a production-quality discrete :class:`PIDController` (``pidtune.controllers``). * **Tuners** — Ziegler-Nichols, Cohen-Coon, AMIGO, IMC/lambda, relay autotuning, and optimization-based tuning, all behind the common :class:`Tuner` / :class:`TuningResult` interface (``pidtune.tuners``). * **Simulation** — open- and closed-loop simulation utilities for validating tunings before deployment (``pidtune.simulation``). * **Identification** — fitting process models from step-test data (``pidtune.identification``). * **Metrics** — IAE/ISE/ITAE, overshoot, settling time, and related performance measures (``pidtune.metrics``). Quick example (API per ``docs/design/04_api_specification.md``):: import pidtune model = pidtune.FOPDTModel(gain=2.0, time_constant=10.0, dead_time=1.5) result = pidtune.IMCTuner(lambda_factor=2.0).tune(model) print(result.gains) # PIDGains(kp=..., ki=..., kd=...) The package depends only on NumPy at its core; optimization-based tuning requires SciPy (``pip install pidtune[optim]``). """ from __future__ import annotations # Exception hierarchy ------------------------------------------------------ from pidtune.exceptions import ( PIDTuneError, ModelError, ModelValidationError, IdentificationError, TuningError, TuningNotApplicableError, ConvergenceError, SimulationError, ConfigurationError, MissingDependencyError, ) # Process models ----------------------------------------------------------- from pidtune.models import ( ProcessModel, FOPDTModel, SOPDTModel, TransferFunctionModel, ) # Controllers -------------------------------------------------------------- from pidtune.controllers import ( ControllerForm, PIDGains, PIDController, ) # Tuners -------------------------------------------------------------------- from pidtune.tuners import ( Tuner, TuningResult, ZieglerNicholsTuner, CohenCoonTuner, AMIGOTuner, IMCTuner, RelayAutotuner, OptimizationTuner, ) # Subpackages re-exported as namespaces (their members are accessed as # e.g. ``pidtune.simulation.ClosedLoopSimulator``); see each # subpackage's ``__init__`` for its public surface. from pidtune import identification, metrics, models, simulation # noqa: F401 __version__ = "0.1.0.dev0" __all__ = [ "__version__", # exceptions "PIDTuneError", "ModelError", "ModelValidationError", "IdentificationError", "TuningError", "TuningNotApplicableError", "ConvergenceError", "SimulationError", "ConfigurationError", "MissingDependencyError", # models "ProcessModel", "FOPDTModel", "SOPDTModel", "TransferFunctionModel", # controllers "ControllerForm", "PIDGains", "PIDController", # tuners "Tuner", "TuningResult", "ZieglerNicholsTuner", "CohenCoonTuner", "AMIGOTuner", "IMCTuner", "RelayAutotuner", "OptimizationTuner", # subpackage namespaces "models", "simulation", "identification", "metrics", ]