While there is nothing technically wrong with this library, the implementation found at https://github.com/m-lundberg/simple-pid is more elegant. It follows the same methodology as Brett Beauregard's original.
PID controller with integral-windup & derivative-kick prevention and bumpless manual-to-auto-mode transfer.
- Github: https://github.com/Dennis-van-Gils/python-dvg-pid-controller
- PyPI: https://pypi.org/project/dvg-pid-controller
Installation:
pip install dvg-pid-controller
Based on C++ code by:
/****************************************************************************** * Arduino PID Library - Version 1.2.1 * by Brett Beauregard <[email protected]> brettbeauregard.com * * This Library is licensed under the MIT License ******************************************************************************/
- More information:
Ported to Python by Dennis van Gils.
Modifications:
- Code refactoring.
- P_ON_M mode has been removed.
- Made the proportional, integrative and derivative terms accessible.
- Made the last error accessible.
- Added optional argument differential_input to have the PID controller regulate a specific difference with respect to the main argument current_input. The specific difference that will be regulated is set by setpoint. Contributor: https://github.com/antonverburg.