How to use a Sgolayfilter?

2 views (last 30 days)
Sanne Feiner
Sanne Feiner on 7 Jun 2017
Answered: Jan on 7 Jun 2017
Hi there,
Can someone explain how to choose the best filterorde and framesize filter when you want to find the heart rate peaks in a noisy plethysmogram?
We now use filterorde 5 and framesize 191, but this choice is based on nothing. See attachment for used data.
Thank you in advance!
  1 Comment
Adam
Adam on 7 Jun 2017
Mostly you just have to experiment. There is no one correct answer. I have tried many different combinations when trying to smooth my data and then just settled on one which seems to give a good balance.

Sign in to comment.

Answers (1)

Jan
Jan on 7 Jun 2017
This question cannot be answered reliably, because the term "best" is not uniquely defined. It depends on what you are looking for. You should consider if the Savitzky Golay filter is a suiting filter at all. The best idea is to analyse the noise exactly, perhaps by recording a neutral signal. If you know the spectrum of the noise, specific "best" filter method and parameters can be defined. This is much better than applying some guessed filter parameters and choosing the one with the nicest result. Maybe this would filter away an important but unexpected signal.

Community Treasure Hunt

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

Start Hunting!