LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I find the slopes of two different portions of my XY graph?



@dVaughn wrote:
Here is the typical data that you asked for. Thank you again for your help.
 


Hi, Dave,

here is a VI which implements the derivative w/ histogram method.
The method only works after heavy filtering of the data, since otherwise the noise leads to extremely broad histogram peaks.

Probably another method (user selection of nearly linearly sloped segments, fitting of linear curve int that region) gives better results. That method would also allow to quantify the quality of the linear fit and therby produce an estimate of the non-linearity which could give valuable hints on whether the observed process behaves as expected.

The code comments are brief, so don't hesitate to ask if you have questions


Franz
0 Kudos
Message 11 of 15
(1,159 Views)

Franz,

I do not have the Mittlewert Filter vi so I can't open the package. Is that a vi or LIB that you made or is that in the package somewhere?

Dave

0 Kudos
Message 12 of 15
(1,138 Views)
Sorry, I forgot to include it, here it is (it just implements a sliding average filter where each value is recalculated as the average of itself and N neighboring points to the right and left):



-Franz

Message Edited by ahlers01 on 05-15-2006 12:55 PM

Download All
0 Kudos
Message 13 of 15
(1,130 Views)

Franz,

I'm not sure if I'm following this right. The first square says that it extracts the first part of the 2nd channel? Is that the -1 on the Max/Min? Then the dominant slopes are calculated from the histogram correct?

Dave

0 Kudos
Message 14 of 15
(1,124 Views)


@dVaughn wrote:

Franz,

I'm not sure if I'm following this right. The first square says that it extracts the first part of the 2nd channel? Is that the -1 on the Max/Min? Then the dominant slopes are calculated from the histogram correct?

Dave



ok, in the leftmost rectangle first I extract channel #2 (with the 'split signal' function). Then I look at which index the max of the Y-data array occurs, subtract 1 from ths index value 8to avoid the max itself) and take the subarray from 0 to maxindex-1. This is what I figured your data was, as it was presented in your startup post.

In rectangle 2 I filter the data, take the derivatives and plot them.

The 'dominant' slopes are correct (I believe) but you have to divide them by the correct dt of your measurement. In your original dynamic data set dt equals 1, and is therefore probably not correct.

Franz


0 Kudos
Message 15 of 15
(1,119 Views)