DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate knee point without using cursor

Highlighted
 
Hi all,
 
       Is there any method or variable in DIAdem 10 to calculate knee point in a curve (It is a pressure channel) . Using cursors and intersection of lines on the curve we can calculate knee point. But, it'll better if any other method is being used. To script for it I got through the help but I was not able to do so.  Please help me out.
 
Regards and Thanks,
Peter John.
Pizza
0 Kudos
Message 1 of 26
(3,989 Views)
Highlighted

Pizza,

would it be possible to post an example data set ?

Andreas

0 Kudos
Message 2 of 26
(3,974 Views)
Highlighted

Hi Pizza,

What's a "knee point" on a pressure curve, or anywhere for that matter?  Do you mean a local maximum?

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 3 of 26
(3,965 Views)
Highlighted

 

Hi Brad,

     Thanks for your response. I apologize for my delayed reply. I came up with an alternative method. I must thank You all.

 

Thanks and Regards,

Peter John. 

Pizza
0 Kudos
Message 4 of 26
(3,937 Views)
Highlighted

Hi Peter et al.

 

I read this post with some interest. I've got an ongoing problem here trying to automatically determine the knee point on an hysterics curve. I'm hoping that it is a similar problem to the one you solved. I plot displacement versus pressure and need to determine with a good degree of accuracy where the knee point is as the pressure is increased.

 

It has been suggested to use straight lines and points of intersection but I haven't had much success with this approach so far.

 

Are you able to share your scripts/ ideas by any chance?

 

Would also be interested to hear from anybody else who has had some success determining the knee point on a hysteresis curve using vbs scripts.

 

Thanks very much for any assistance in advance.

 

Matthew

0 Kudos
Message 5 of 26
(3,285 Views)
Highlighted

Just to add some further clarification regarding the knee point "definition" problem, I have taken the liberty of attaching a word document containing one picture.

 

Regards

 

Matthew

0 Kudos
Message 6 of 26
(3,281 Views)
Highlighted

Matthew,

would you be willing to post an example data set ? I would think that what you are looking for is the point of maximum curvature in one half of the curve. Having an example would make it possible to play with a few option for a solution.

 

Andreas

0 Kudos
Message 7 of 26
(3,270 Views)
Highlighted

Hi Andreas,

 

Thanks for the reply to my post. I've actually managed to script a solution (I hope so anyway) to this problem now.

 

However I'm interested as I'm sure others are how someone else might approach the problem. I've attached an example dataset as requested. In the dataset you'll notice that the pressure channel ranges from 0 to 3 bar. However in the other datasets I've noticed that this maximum pressure can range from about 1 to 10 bar which could have an impact on the solution.

 

I've also taken the liberty of attaching a word document containing an image which shows the kneepoint being picked out from the script. You'll see from the figure that I've calculated a kneepoint value of 9.8. When I did the task by hand I was obtaining a value of 10.2. So a very small delta between manual and scripted methods

 

Thanks in advance.

 

Matthew

Download All
0 Kudos
Message 8 of 26
(3,259 Views)
Highlighted

Matthew,

 

I have attached a script calculating the knee point(s) of the hysteresis curves. The script does the following:

 

1) Filter the signals to get rid of the noise

2) split the signal into the hysteresis curves

3) split each hysteresis into the increasing and decreasing part

4) find the knee point for each part

 

Finding the knee point is done in the function called "CalculateKneePoint"

This function uses a combination of two algorithms:
 1) The "Kneedle" algorithm
 2) using the point of maximum slope 

While "1)" typically delivers a point above what one would choose manualy, "2)" deliver a point below
CalculateKneePoint uses the result of those algorithms to define an intervall around the desired knee point. Within this intervall, "Kneedle" is 
used to find the desired result point.

 

The algorithm delivers 10.25 for the first segment, compared to 10.2 as a result from your manual selection. Please take a look at the result and let me know whether this is what you were looking for.

The "DataFileLoad" command in the script assumes that the data is in the same directory like the script and the TDM file is named "knee_point_data.TDM". PLease adjust accordingly.

 

Andreas

 

Here is the result for your example data :

 

KneePoint.PNG

 

0 Kudos
Message 9 of 26
(3,244 Views)
Highlighted

Andreas,

 

Thanks very much for the reply. It sounds very similiar to how I scripted the solution. It will be very interesting to compare the two solutions side by side.

 

You mention that you applied filtering to the signals? I noticed that some of the datasets we had required filtering and others did not. I suspect that your filtering parameters are hard coded into the script? Do you know of any techniques to automatically determine the filter parameters?

 

Thanks a lot. I shall report back.

 

Regards

 

Matthew

0 Kudos
Message 10 of 26
(3,239 Views)