Change in slope detection

조회 수: 5 (최근 30일)
Michal Kotze
Michal Kotze 2015년 2월 13일
답변: Michal Kotze 2015년 2월 14일
Hi
I have a bin that is filled with water, when it is full it wil start to overflow but the volume measured when it reaches the full level should be constant but due to the errors in volume sensors it is not always perfect. The level of the if the bin can be changes thus overflow could occur at a lower volume, thus i cannot use a threshold method. I also cannot use the last value of the data set to use as threshold as the volume measurement is not always perfect and could result in picking to high threshold or to low. In a perfect world the filling of bin should be straight line measurement and when overflow is reached it should be a straight line. If this was the case i could take the second derivative to find the change is slope. Unfortunately this is not the case and when i take the second order derivative I get the the results shown in the attached picture. Is there a way to detect this change in slope with better method. Keep in mind, since the level (Volume) can change and the rate at which it fills up no data set will be the same. I not not have the information of what level the bin is set in the data logs. Since the slope changes and the duration before overflow i cannot curve fit the slope as this changes between measurements. Doing it manually it is easy to spot but i need algorithm that automatically detects the change in slope. Thank for any help.
  댓글 수: 2
John D'Errico
John D'Errico 2015년 2월 13일
What attached picture? Try again.
Michal Kotze
Michal Kotze 2015년 2월 13일
I attached the figure now

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

답변 (1개)

Michal Kotze
Michal Kotze 2015년 2월 14일
Hi
I solved the problem. By finding the average of the last couple of sample at the end of data set I could find an estimate of the max volume in bin and then i subtract a value from it which will give me a point on the sloped line segment. I then to a first order curve fit and find the line equation. I then subtract the measured volume from this line equation. By setting a threshold limit i can find the indices where the line splits from the straight line segment (volume full section). This allowed me to automate the process. This gives a good approximation of the start of overflow of the bin. Just a brief description, however i would still like to know if there is another better method to detect this change in slope with some algorithm?
Any input will be appreciated
Met vriendelijke groeten / Met vriendelike groete
Michal Kotzé

카테고리

Help CenterFile Exchange에서 Curve Fitting Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by