How to apply moving average filter for continious strem of incomming data?
5 次查看(过去 30 天)
显示 更早的评论
i am having accelerometer and i am getting its x,y and z axis values(in g units) continuously from the serial port. i need to filter/smooth-en the incoming data. so i want to apply moving average filter/Savitzky-Golay smoothing filters.. how can i do it?. In http://in.mathworks.com/help/matlab/data_analysis/filtering-data.html they took an 24x3 array.. but in my case array size is not known or it keeps on increasing.. so how to solve this problem?
0 个评论
采纳的回答
Star Strider
2016-2-20
To do real-time filtering, you need the DSP System Toolbox. You probably also need specialised hardware. (I have no experience with the DSP System Toolbox, so I cannot help you with it.)
I seriously doubt that you could do a Savitzky-Golay filter in real time. Instead, save your raw signals and process them later. You will need to do a fft on your saved signals, determine the frequencies of the signals and the frequencies of the noise, then design a bandpass filter to eliminate the d-c offset and slow baseline drift on the low end, and noise at the high end. You cannot eliminate broadband noise with a frequency selective filter, so some noise will remain after the filtering process.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Measurements and Statistics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!