pms67/PID logo

pms67/PID

Free

PID controller implementation written in C.

FreeFree tier
Type
Open Source

About pms67/PID

PID is an open-source C library implementing a PID (Proportional-Integral-Derivative) controller. It provides a compact, efficient implementation suitable for embedded systems and control applications. The controller uses derivative-on-measurement to avoid derivative kick, making it more stable for setpoint changes. The repository includes source files (PID.c, PID.h), a test file (PID_Test.c), and a PDF document explaining the implementation. Licensed under MIT, the project has received 922 stars and 256 forks on GitHub.

Key Features

PID controller algorithm implemented in C
Derivative-on-measurement technique to avoid derivative kick
Includes header, source, and test files
Comes with a PDF explanation of the implementation
Lightweight and efficient for embedded systems
MIT licensed open-source project

Pros & Cons

Pros
  • Simple and easy to integrate into C projects
  • Lightweight, minimal dependencies
  • Derivative-on-measurement reduces noise amplification
  • Well-documented with a PDF guide
  • Open-source under permissive MIT license
Cons
  • Limited to C language only
  • No pre-built binaries or releases
  • Basic implementation without advanced features like anti-windup or filtering
  • Not actively maintained (single contributor, last commit unknown)

Best For

Embedded control systemsRobotics motor controlIndustrial automationEducational demonstrations of PID algorithmsSensor feedback loops in IoT devices

FAQ

What license does this PID implementation use?
The project is licensed under the MIT license.
How does derivative-on-measurement differ from derivative-on-error?
Derivative-on-measurement uses the measurement signal instead of the error signal for differentiation. This avoids derivative kick when the setpoint changes suddenly, making control smoother.
Is this implementation suitable for embedded systems?
Yes, the code is written in C, lightweight, and has minimal dependencies, making it ideal for microcontrollers and embedded applications.
Does this project include documentation?
Yes, the repository includes a PDF file titled 'PID Controller Implementation in Software.pdf' that explains the implementation.
What files are included in the repository?
The repository contains PID.c, PID.h, PID_Test.c, a PDF documentation file, a README.md, and a .gitattributes file.