Feedforward compensation of pid