moat-lib-pid
% start main % start synopsis
An advanced PID controller in Python. It does not require a fixed feed rate, supports anti-windup, and contains an optional first-order filter for the derivative term.
% end synopsis
This module was vendorized from the advanced-pid module by Erkan Adali erkanadali91@gmail.com.
MoaT improvements include
- a
CPIDsubclass with a settable reference - saving internal state, for crash recovery and rebooting
- introspection
Usage
Usage is very simple:
from moat.lib.pid import PID
# Create PID controller
pid = PID(Kp=2.0, Ki=0.1, Kd=1.0, Tf=0.05)
# Control loop
reference = 1.0
while True:
# Get current measurement from system
timestamp, measurement = system.get_measurement()
# Calculate control signal by using PID controller
control = pid(reference - measurement, t=timestamp)
# Feed control signal to system
system.set_input(control)
The package's examples includes a toy mass-spring-damper system model for testing.
% end main
License
Licensed under the MIT License.
Metadata
Release files for moat-lib-pid 0.8.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| moat_lib_pid-0.8.4.tar.gz | 9.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| moat_lib_pid-0.8.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.8 kB
Release files / moat_lib_pid-0.8.4.tar.gz
| Download URL | moat_lib_pid-0.8.4.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
389845556078cef225fb2b148e5d449ddeef326679466dd8765aa5b35b098579
|
|
BLAKE2b-256 checksum How to use checksums |
98ab1b656eb40474c4194ba4eeea0fc484c2ab7b4a576722b36b28a4ba176207
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / moat_lib_pid-0.8.4-py3-none-any.whl
| Download URL | moat_lib_pid-0.8.4-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7922b33f3427a3cfd315fd3ae9d2a9ec4867751b29a29e3b03cb0f436c316188
|
|
BLAKE2b-256 checksum How to use checksums |
f4d57180c57c223137dbbdb23cdf53254c6b442e0d737f0514958321dff80364
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|