diff --git a/PID.c b/PID.c index 877c32d..4f41e6b 100644 --- a/PID.c +++ b/PID.c @@ -1,7 +1,19 @@ +/* + * PID Controller implementation + * + * Features: + * - Proportional, Integral, Derivative control + * - Anti-windup via integrator clamping + * - Band-limited differentiator (derivative on measurement) + * + * Suitable for embedded and real-time systems. + */ #include "PID.h" void PIDController_Init(PIDController *pid) { + if (pid == 0) return; + /* Clear controller variables */ pid->integrator = 0.0f; pid->prevError = 0.0f;