フィルターのクリア

How do I normalize this signal

21 ビュー (過去 30 日間)
Mikael
Mikael 2014 年 5 月 13 日
編集済み: Greg Dionne 2014 年 5 月 20 日
I have a noisy data set that I am trying to find peaks for (I am using the peakfinder function). The function works great when the baseline of the signal does not change, but when it does it no longer finds peaks well - I was thinking of filtering the data, but was unsure what kind of filter would actually help. Any help would be greatly appreciated. A sample below:
  1 件のコメント
Image Analyst
Image Analyst 2014 年 5 月 13 日
Please attach your data file.

サインインしてコメントする。

採用された回答

Star Strider
Star Strider 2014 年 5 月 13 日
I suggest a low-order bandpass filter, perhaps Butterworth 3 or 4. That will eliminate your baseline drift and most of the noise, making it much easier for findpeak to work.
  6 件のコメント
Mikael
Mikael 2014 年 5 月 15 日
awesome! thanks so much, I think I can use this.
Star Strider
Star Strider 2014 年 5 月 15 日
My pleasure!

サインインしてコメントする。

その他の回答 (2 件)

Greg Dionne
Greg Dionne 2014 年 5 月 13 日
Since your peaks appear well-defined and are spaced far enough apart, I would suggest estimating the baseline by using medfilt1().
  6 件のコメント
Mikael
Mikael 2014 年 5 月 15 日
the findpeaks you used doesn't seem to be working. the spikes are "negative" because the data is a negative electrical signal, but they are trending towards positive, which is what I want.
what I am trying to figure out is how to basically pad the data so that it begins after the artifact created by the filtering - I just want to start the analysis a couple of seconds forward from the data...
Greg Dionne
Greg Dionne 2014 年 5 月 20 日
編集済み: Greg Dionne 2014 年 5 月 20 日
OK. It might be helpful to post your data file.
If you're not comfortable posting your data... maybe try something like:
[~,locs] = findpeaks(x-medfilt1(x,100),'MinPeakHeight',.01e4)
x(locs)

サインインしてコメントする。


Image Analyst
Image Analyst 2014 年 5 月 13 日
Some of those peaks are just barely above other peaks that don't have the red circle. Are you setting some threshold for how much a peak must exceed the "baseline" signal before it can be called a peak? What about using sgolayfilt() in the Signal Processing Toolbox. I have a demo available upon request.
  2 件のコメント
Mikael
Mikael 2014 年 5 月 14 日
My issue with sgolayfilt() is similar to my issue with butterworth; namely, that I can't really use it because I don't understand the parameters in terms of my own data: for example, I have no idea what the window length is. But again I appreciate the help.
Image Analyst
Image Analyst 2014 年 5 月 15 日
Sounds like you don't even have an interest in even trying to understand, and have decided in advance that you "can't really use it" without understanding it. For example, you haven't attached your data file to let anyone help you by trying things.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeEEG/MEG/ECoG についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by