LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Curve Fit Analysis

Solved!
Go to solution

Hello All, I'm struggling very hard in to adjust the data on the readings I have from a tensile machine, The plot is attached and also the text data. What I'm trying to do is to calculate the area under the curve at every displacement position intervals (X-axis) e.g from 2.3mm to 15 mm. The first column on the text file will be the displacement (mm) and the second column is defined as the Force (N), the shape of the curve is uneven (jpeg file). I have tried different tools such as numeric integration, least square fit, etc. but still not having reliable results. Does anybody here have any idea on how to perform the analysis I'm concern from?

 

Please give me advice !!!!

0 Kudos
Message 1 of 13
(3,580 Views)

Here is the Text File...I forgot to attach it

 

Please Help !

0 Kudos
Message 2 of 13
(3,578 Views)

Hi

 

Please find the attached VI, If area under the curve is of interest then I believe integration would do.

 

 

0 Kudos
Message 3 of 13
(3,544 Views)

Could you please post what you have tried so we don't send you down a wrong path again?  Numeric integration is what you want to do.  It can be either simple (add the Y values and multiply by the value increment) or complex, using something like Bode's or Simpson's rules.  You need to pay attention to how you treat your endpoints (open or closed interval).  LabVIEW can easily do all of these, and all will give you slightly different values.  I would recommend you read the chapter on numerical integration in the online version of Numerical Recipes.  You should then be able to solve your issue.  Let us know if we can be of further help.

0 Kudos
Message 4 of 13
(3,534 Views)

Hi NaruF1, can you send your VI on Labview version 8.5 or previous, I'm not able to see it

I really appreciate your help

 

 

0 Kudos
Message 5 of 13
(3,526 Views)

Sure DFgray I'm attaching the VI I made (is on development and working fine, labview version 8.6), the purpose of it, is to analyze the force-displacement curve coming from the tensile machine.

I putted two cursors to define the limits of integration and the desired area to integrate, the text data attached previously will work with this VI

Please take a look on it, I'll wait for your response

Thanks a lot!

 

 

0 Kudos
Message 6 of 13
(3,524 Views)

Your VI has three major issues:

 

  1. You assume the X values are point index when choosing a subset of the data.  This is not true.  Your X values are the actual X values of the data.  You can find the actual indices using the Threshold 1D Array function in the array palette.
  2. Your current integration routine does not have he dX value input wired, so your data will be off by a constant.  This point is moot based on the next item.
  3. Your data is not evenly spaced in time.  The integration VI you have chosen assumes evenly spaced points.  Use the unevenly spaced integration VI, with the appropriate subset of your X and Y data, to get a more correct answer.

If you need more help, let us know.  Good luck.

 

0 Kudos
Message 7 of 13
(3,506 Views)

Thanks DFGray,

 

I'm trying to implement what you just suggested, everything you stated has sense, actually I did not take care of the data indexing, however this is the first time I'm dealing with the threshold 1D array function, do you have any suggestion to me using this function ? I know it interpolates data on based threshold however i don't know how to create a new array of data containing the new column for the indexed values corresponding for each force and displacement parameters, please let me know if you have some brief and clear explanation other than labview help

 

I really appreciate your support

 

 

0 Kudos
Message 8 of 13
(3,493 Views)
Solution
Accepted by SergeArmz

Assume you have a set of X data points {1.5, 3, 4, 5.5, 7}.  These are unequally spaced.  You get a start and end X value from your cursors on the graph.  Start value is 2.5 and end value is 4.5 from the cursors.  You now need to find what index in your points to start with.  2.5 is between 1.5 and 3, indices 0 and 1 in your X array.  Similarly, 4.5 is between 4 and 5.5, indices 2 and 3 in your array.  You need a function to determine the fractional index of a value given an array of values.  Our first point, 2.5, has fractional index 0.67 since it is two thirds of the way between the index 0 and index 1 points.  Similarly, the end point has fractional index 2.67 since it is two thirds of the way between indices 2 and 3.  The threshold 1D array function gives you this fractional index.  Your full X array is the array input.  The X value from your cursors is the threshold input.  The output will be the fractional index.  To use this, you need to convert to any integer.  To do this, you need to decide whether you want to round the fractional index up, down, or to the nearest integer.  You can use the three rounding primitives in the Numeric palette to do any of these.  Once you have your indices, use the array subset primitive from the arrays palette to get the pieces of the X and Y arrays (two subset operations) for integration.  Then use the integration routine I mentioned above.

0 Kudos
Message 9 of 13
(3,476 Views)

I would have access to LabVIEW only tommorow, However, your could post your request on Forum Conversion Board.

Also please note you would need to select the data points using Graph cursors for area of interest

 

I shall post the 8.5 tomorrow.

 

Thanks.

0 Kudos
Message 10 of 13
(3,471 Views)