How hnainiamohamedamine29/pid_control works
This is a small embedded-friendly discrete-time PID library. A caller initializes controller gains and state, then calls the compute routine at a fixed sampling time and applies its output to an actuator. The implementation maintains integral and previous-error state while calculating the proportional, integral, and derivative terms. The README also identifies MATLAB/Simulink simulation as optional; its source was not sampled, so its connection is left unverified.
Main entry points: pid.c PID Controller · pid_simulation.m PID Simulation · pid.h PID API
Components 5
Other components
- Application Caller
- PID API
src/pid.h - PID Controller
src/pid.c - PID Simulation
simulation/pid_simulation.m - Actuator
Connections 4
- PID Controller → PID API: implements
src/pid.c - Application Caller → PID Controller: initializes and computes
README.md - PID Controller → Actuator: output applied
README.md - PID Simulation → PID Controller: may simulate