Extracting features from curves

조회 수: 12 (최근 30일)
jlt199
jlt199 2016년 6월 22일
댓글: Star Strider 2016년 6월 23일
I would like to be able to identify and features that occur in a curve. A typical feature can be seen in the attached image. The features may be big, or barely visible above the background noise. The all have the same shape though: From a baseline, drop to a trough, climb up to a peak and drop back down to a trough.
I do not know how many features are present before I start the analysis, although I can see them if I look at the data visually.
I have tried searching for peaks and searching for valleys using Prof O'Haver's code http://terpconnect.umd.edu/~toh/spectrum/PeakFindingandMeasurement.htm#Valleys and now I'm trying to see if there is only positive gradient between a trough and the neighbouring peak. But I think this far from the best way and doesn't seem to be working.
Any suggestions please?
  댓글 수: 6
Star Strider
Star Strider 2016년 6월 23일
Your signal has a relatively low amplitude resolution, so the resulting quantisation noise is making it difficult for us to understand what you want to identify as peaks (other than the one significant deflection).
If you could post a second image on which you manually identify what you want to detect, that would help.
jlt199
jlt199 2016년 6월 23일
Thanks for your comment Star Strider. I have attached a figure with all of the features in the signal shown. I understand that the first one is difficult to see above the noise, so if I miss this one with my algorithm it wouldn't be the end of the world. Thanks again

댓글을 달려면 로그인하십시오.

답변 (1개)

Star Strider
Star Strider 2016년 6월 23일
My pleasure.
If you’re doing what appears to be signal acquisition (it looks like a biomedical signal) and want to work with your signals, you need the Signal Processing Toolbox.
You have low-frequency baseline variation in your signal as well as high-frequency noise, so I would first do a fft on it to determine the signal frequency range and the noise frequency range. I would then use that information to design a bandpass filter to eliminate the low-frequency baseline variation and any high-frequency noise. Filter your signal, then use findpeaks to identify your peaks of interest. That should be much easier on your filtered signal.
There are several ways to design filters in MATLAB, including fdatool, dfilt, and others. My IIR filter design procedure is here: How to design a lowpass filter for ocean wave data in Matlab? A filter for your signal may be challenging to design, but not impossible.
I will do what I can to help you process your signals.
  댓글 수: 3
jlt199
jlt199 2016년 6월 23일
Can I use the fft if my signal isn't time-based? I actually take a reading every xmm. Thanks
Star Strider
Star Strider 2016년 6월 23일
Sure. You will get back spatial frequencies (cycles/millimetre) rather than cycles/time_unit.
For the fft, your data just have to be regularly-sampled. The fft really doesn’t care what your independent variable is, providing the interval between samples is constant, and known. The same applies to the filter design and implementation functions.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Smoothing and Denoising에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by