필터 지우기
필터 지우기

How to apply moving average filter for continious strem of incomming data?

조회 수: 2 (최근 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?

채택된 답변

Star Strider
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개)

카테고리

Help CenterFile Exchange에서 Measurements and Statistics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by