A simple, easy to use PID controller
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)
# 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)
To install, run:
python -m pip install simple-pid
Documentation, including a user guide and complete API reference, can be found here.
This project has a test suite using
pytest. To run the tests, install
pytest and run:
Licensed under the MIT License.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for simple_pid-2.0.0-py3-none-any.whl