Real Time smoothing algorithm

I am working on a Transformer Winding Resistance Meter, which gives me fairly accurate values of resistance(17 readings per second).

I have been trying to smoothen the data real time. So far what I’ve done is discard the unreliable first few seconds data and apply a moving average filter with a size of 300 for the values henceforth. The moving average filter takes in the current value if the current value is within +-0.1% of the current average, otherwise it is ruled as noise and not included in the average. However, if the current data is more than +-0.3% of the average OR if the current data is regularly more than +-0.1% of current average then it means that the current data is a trend or a major problem rather than noise, so the previous 300 values are discarded and a new moving average is shown. (this is because for example values have been around 50.3 to 50.4 ohm but power goes off, the value should drop to 0 but doesn’t instantly with moving average, so a +-0.3% helps with getting to these abnormalities faster.)

My issues – The last 2 digits still flickers a lot, but I cannot afford to increase the moving average size(300 is already big enough as it takes 17 seconds to update fully with 17 samples per second). I would like to stabilise this digit unless there has been a drastic change(+-0.3%). Is my logic correct and its just hardware issues or have I been mistaken somewhere?

Also is there a better way to smoothen things?

submitted by /u/Bakanyanter
[link] [comments]

Published by

Nevin Manimala

Nevin Manimala is interested in blogging and finding new blogs https://nevinmanimala.com

Leave a Reply

Your email address will not be published. Required fields are marked *