Wait wait... you misread... Keep sampling the current at every waveform and keep doing the rolling average thing. What i meant was, can you do the PI thing at 4 or 8kHz? Adjust your PWM duty every 2 or 4 pwm cycles. You are reacting on every single cycle to a value that is averaged out over the last X cycles.
If you find that the throttle is being read smoothly, then don't bother filtering it. I would assume that you already have a filter capacitor on the throttle, that should be fine.
|