Added PID regulation (still incomplete)