Skip to main content

simple-pid

Tests PyPI Read the Docs License Downloads Code style: black

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.

Metadata

Release files for simple-pid 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simple-pid 2.0.1
File Size Uploaded
simple_pid-2.0.1.tar.gz 15.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for simple-pid 2.0.1
File Interpreter ABI Platform
simple_pid-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 22.8 kB

Release files / simple_pid-2.0.1.tar.gz

Download URL simple_pid-2.0.1.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5771761c54541c900e597d6c2e4ea93fd2cc98f4e48cb9eca265fba2e65be99e
BLAKE2b-256 checksum
How to use checksums
780ac670a4f4dea4b21c0b074b193c54698e5e047479e688c8d5495d264c9921
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / simple_pid-2.0.1-py3-none-any.whl

Download URL simple_pid-2.0.1-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d53ed76b03d949ceea46b538fb22999d27899e2e655aa19b99c40f6edcedca6
BLAKE2b-256 checksum
How to use checksums
ee0e4d4fe01b21558a31a12e029a57cf677666c89c1b00cb82c1b53d0025cd63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page