DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I subtract two curves of different lengths.

I've ran a Force vs Deflection test.  In this test created a tdms that contains two channels, Force and Deflection.  As a baseline, I tested the Force vs Deflection of a spring.  A picture of this curve is attached labeled "FvsD Spring".  I then tested another part and got a F vs D curve for it.  The picture for this is also attached, labeled "FvsD Part".  What I want to do is subtract the curve from the "FvsD Spring" picture, from the curve in the "FvsD Part" picture.  How can I do this, as the channel lengths are different for both files?

Download All
0 Kudos
Message 1 of 5
(5,622 Views)

anyone?

0 Kudos
Message 2 of 5
(5,601 Views)

Hi apatelsigma,

 

First load each data set into DIAdem so that you have 2 groups in the Data Portal, one for each data set.  Then use the ANALYSIS dialog "Curve Fitting >> Linear Mapping" to create a version of the slow baseline that has the same number of data points as the fast real data set.  Once you have linear mapped the baseline to the same timebase as the measured data, you can use the ANALYSIS dialog "Basic Math >> Subtract" to subtract them, since they now line up row-by-row.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 3 of 5
(5,584 Views)

thanks for the response!  I get an error saying it can't execute because the channel is not monotonic increasing from line 3 onwards.  I've attached the tdms files.

0 Kudos
Message 4 of 5
(5,570 Views)

Hi apatelsigma,

 

Sorry, I forgot that with hysteresis curves the X channel values loop back on themselves.  Here's a VBScript that breaks each data set into separate upper (Top) and lower (Bot) lobes, making a total of 4 Groups in the Data Portal-- it also sorts the values of the channels in each lobe by the measured deflection, then does the linear mapping to a preset number of Xvalues (10000 currently).  Now you can subtract the upper lobes of the 2 runs and the lower lobes of the 2 runs all you want to.  I'm also including the VIEW layout I made to look at the results.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 5 of 5
(5,548 Views)