Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
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?

Respuesta aceptada

Star Strider
Star Strider el 20 de Feb. de 2016
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.

Más respuestas (0)

Categorías

Más información sobre Measurements and Statistics en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by