A stable and efficient PID controller with derivative filtering and anti-windup protection.
- Optimized Gains:
K_p=1.2,K_i=1.1999,K_d=0.8 - Noise Reduction: First-order derivative filter (
N=6) - Anti-Windup: Prevents integral saturation
- Realistic Simulation: Dynamic plant model included

Comparison of step responses (Simulink vs this implementation)
Data: Time_Plot_Data.txt
- Compile:
gcc pid_controller.c -o pid -lm
Free to use (MIT)