The low pass filter you have applied makes a lot of sense. Actually, from your description you have calculated what is called in statistics a "prior moving average" which is probably the best way to smooth the readings for current in our application.
How many samples are you using? If too many, this form of averaging will be too much influenced by past values and you might consider using a weighted moving average (either linear or exponential) to strengthen the importance of the most recent readings.
I'd love to see the code.
Adrian
|