Findpeaks based on signal frequency
1 view (last 30 days)
Show older comments
Hello,
I am trying to use findpeaks on a signal that has a specific frequency component. This signal is repiratory audio, and I am trying to separate the inhales vs the exhales. After obtaining the respiratory rate, I am trying to use findpeaks to isolate inhale vs exhale, but it does not always work properly. I was hoping someone here could help me refine this.
I calculate repspiratory rate using the FFT of the envelope of the signal. Then use findpeaks like below.
snip_lo = max(inverted_snip);
[v1, vv] = findpeaks(inverted_snip, "MinPeakDistance", Fs*((RespRate)/2), "MinPeakHeight", snip_lo *.85);
Whe it works out I can later isolate each valley to get a plot like this.
When it does not work out, the inhales and exhales get out of sync.
Each red plot should represent an exhale while the green represents an inhale, however, in the second image, the signal is too noisy in the center to decern between the peaks for the method I am using.
Any help would be very much appreciated.
Thank you.
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!