I have an application continuously receiving speed values (m/s). These values generates some noise and variations. This speed varies all the time, but there is some real changes that is worth noticing. For example when the speed value drops significantly there may be a turn.
Right now I'm using the average
of the last X values, where X typically is a number between 5-15. I plot these values in excel to see the difference from the raw data. This works quite well, but the lower
the history value is, the less
smooth my curve gets. The higher
history value, the smoother
my curve gets, but then it also reacts late changes and neglects some of them.
I have also tried to to weight the last value in the average calculation. The result is a curve with still plenty of noise, but just a little less than the raw data.
What I'm looking for is a more sophisticated method to filter out the noise which can give me values close to the raw data, but also neglects small variations and noise.
What method could that be or is there anything I could do with my existing setup?