How to smooth this curve so that I can find the sharpest turning point

조회 수: 6 (최근 30일)
zzzhhh
zzzhhh 2016년 6월 28일
답변: zzzhhh 2016년 6월 29일
I have a curve plotted below:
I want to find out the sharpest turning point indicated in the figure by locating the maximal second derivative. But since the curve is not smooth, the second derivative has many peaks, even after I filtered the curve. The same is true for calculating curvatures. So I was wondering if I can fit the curve by some "good" smooth curve which has a single peak of the second derivative so that I can easily pick out the sharpest turning point via diff function. But since I'm not very familiar with curve-fitting, I ask here in hope that someone can help. Btw, if you think you have a better idea than the curve-fitting and calculating the the second derivative, you are welcomed to post your (correct) idea here. Thanks a lot.

채택된 답변

KSSV
KSSV 2016년 6월 28일

추가 답변 (2개)

KSSV
KSSV 2016년 6월 28일
Other method is go by slope.....calculate the slope..If you have n points you will get (n-1) slopes..pick three consecutive slopes...check the sign of slopes. If the sign of slopes is [-1 +1 -1] or [+1 -1 +1]; it implies there is a turn point. I hope this would be the simplest of all.

zzzhhh
zzzhhh 2016년 6월 29일
Thank you for the reply. I later found out the reason why my original method, i.e., smooth+ locating the maximal second-order derivative, did not work. My mind was confined by the diff function; it was just locked to the calculation of the second-order derivative using consecutive samples. The noise has a strong power focusing on the original, so even after a very strong smoothing filter, I still got multiple peaks from the computed second-order derivative. But the psd of noise drops drastically so I calculate second-order derivative with a span of 10 and then smooth it with an average window of width 21, Now I got a single peak as desired.
The methods mentioned in your reply, especially the RDP algorithm, is interesting, so I accept your answer and hope I can use this algorithm in the future. Thanks a lot.

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by