A simple, easy to use PID controller
Project description
simple-pid
A simple and easy to use PID controller in Python. If you want a PID controller without external dependencies that just works, this is for you! The PID was designed to be robust with help from Brett Beauregards guide.
Usage is very simple:
from simple_pid import PID
pid = PID(1, 0.1, 0.05, setpoint=1)
# Assume we have a system we want to control in controlled_system
v = controlled_system.update(0)
while True:
# Compute new output from the PID according to the systems current value
control = pid(v)
# Feed the PID output to the system and get its current value
v = controlled_system.update(control)
Installation
To install, run:
python -m pip install simple-pid
Documentation
Documentation, including a user guide and complete API reference, can be found here.
Tests
This project has a test suite using pytest. To run the tests, install pytest and run:
pytest -v
License
Licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simple_pid-2.0.1.tar.gz.
File metadata
- Download URL: simple_pid-2.0.1.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5771761c54541c900e597d6c2e4ea93fd2cc98f4e48cb9eca265fba2e65be99e
|
|
| MD5 |
79fc6af22bb66553674026a3e4b7cf74
|
|
| BLAKE2b-256 |
780ac670a4f4dea4b21c0b074b193c54698e5e047479e688c8d5495d264c9921
|
File details
Details for the file simple_pid-2.0.1-py3-none-any.whl.
File metadata
- Download URL: simple_pid-2.0.1-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d53ed76b03d949ceea46b538fb22999d27899e2e655aa19b99c40f6edcedca6
|
|
| MD5 |
810debb6057ea1e2157a632646769113
|
|
| BLAKE2b-256 |
ee0e4d4fe01b21558a31a12e029a57cf677666c89c1b00cb82c1b53d0025cd63
|