Implementation of Sum Slope Function

5 views (last 30 days)
Lucrezia Mattia
Lucrezia Mattia on 30 Mar 2022
Commented: William Rose on 30 Mar 2022
Hello, i'm working with piezoelectric signals detetioned on a patient. I extracted the signal and filtered it with a butterworth of fourth order. Now i am trying to implement the Sum Slope Function, to distinguish the picks of the signal from the noise but i am not reaching this goal. Anyone has got a ready code on this argument? I need to extract the peacks of the signal not considering the picks of the noise. thank you

Answers (1)

William Rose
William Rose on 30 Mar 2022
Can you attach a text file with the raw signal, and your code? Specifiy the sampling rate. If possible, please post a simplified version of your code that captures the essential aspects of this problem. That will make it easier for others to assist you.
I understand that you want to find peaks in the signal. The signal is noisy. You do not want to find peaks that are due to noise. You have low-pass filtered the signal with a 4th order Butterworth, in order to reduce the noise, but you are not happy with the results.
What cutoff frequency did you try? Why are you not satisfied with the results?
The Sum Slope algorithm (availabel at physionet.org) was designed to find the beginning of the upstroke of arterial pressure. Depending on the kind of peaks you want to find and the shape of your signal, it may not be the best for your application. Matlab's findpeaks() is very nice. It has good optional arguments that can help you find the peaks you want. You may find it useful as an alternative to the SumSlope algorithm.
  2 Comments
Lucrezia Mattia
Lucrezia Mattia on 30 Mar 2022
This is my signal and the second small wave is the noise. I don't know how to start with the function itself. I tried to look on physionet website but i didn't find the article. Can you post it please ?
William Rose
William Rose on 30 Mar 2022
I didn't find the Sum Slope algorithm on physionet. The 2003 article says they posted the routine to physionet, so I assumed that was true. But that was a long time ago. You can follow the description of the algorithm in the 2003 article, to create your own sum slope algorithm. This will take some time, since the algorithm is complicated.
Thank you for posting the image of your filtered and unfiltered signal. Your signal is very clean, even before filtering! Can you post the unfiltered signal as a text file, instead of an image (as I requested previously)?
If your goal is to dtermine HR, then I recommend using peakfind() to find the peaks. If you need to find the foot of the rising phase of systole, then you ca either re-create the Sum Slope algorithm, or make your own algorithm. Sum Slope looks difficult to replicate, so if I were doing it, I would make my own routine.
Here's one idea:
  1. Filter the signal (which I will call y) to remove noise. You have done this. Call the filtered signal yf.
  2. Compute d(yf)/dt.
  3. Use findpeaks() to find the locations of the peaks of dyf/dt. You are trying to find the point on the rising systolic phase of each beat where the slope is maximum. Use the options in findpeaks() to get only the peaks you want. For example, consider using 'MinPeakHeight', 'MinPeakProminence', and/or 'MinPeakDistance'. See the help for findpeaks() for details.
  4. From each peak location found above, proceed backward along the filtered signal until you find the first (gong backward) minimum. This is the foot of the rising systolic pressure wave.
Modification of above idea: Skip step 2, and in step 3, find the peaks of yf, instead of finding the peaks in d(yf)/dt. This could be a good alternative, if it is hard to find the peaks in d(yf)/dt, whic could happen if the signal is too noisy, even after filtering.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!