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.3
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.3.tar.gz | 9.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| moat_lib_pid-0.8.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.7 kB
Release files / moat_lib_pid-0.8.3.tar.gz
| Download URL | moat_lib_pid-0.8.3.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
486d978822e5aa932c880d4639040dfd2cb7eac3501aa5bd48764f2f603eeddb
|
|
BLAKE2b-256 checksum How to use checksums |
c511b45cbd0767c24c849a76fbaf908cd4345674cfcfc19ec4df0eb8f1bbc87d
|
| 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.3-py3-none-any.whl
| Download URL | moat_lib_pid-0.8.3-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c60db2f9fb8ea46cfa78bae40a33368d6f983497f9a54701718a65474230a2b
|
|
BLAKE2b-256 checksum How to use checksums |
a578df0f62cf7d824a40fdc8a8de1069c07cebda6a792881cf2583cb37bdf0e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|