LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculating derivative of array data set

Hi everyone. In my current project, I generate two numeric arrays of data, for voltage and current measurements. I want to calculate a derivative array of voltage with respect to current (dV/dI). Does anyone know how I can accomplish this in Labview?

0 Kudos
Message 1 of 7
(469 Views)

Check the function Derivative vi  do a search on help 

 

LVNinja_0-1722523366544.png

 

0 Kudos
Message 2 of 7
(464 Views)

Maybe I'm misunderstanding, but it looks like derivative.vi calculates dx/dt, with a set dt. It doesn't find the derivative of one array with respect to another array. Is there a way that I can use this function to find dy/dx rather than dy/dt or dx/dt?

0 Kudos
Message 3 of 7
(456 Views)

you can plot voltage x current (Assuming they are sampled at the same time), then calculate the derivative point by point (angular coeficient) of every two points.

0 Kudos
Message 4 of 7
(443 Views)

Most derivative tools assume a fixed dx. You have xy data and I assume that x is not equally spaced.

 

There are plenty of ways to do what you want. Maybe you can fit it to a polynomial and calculate the derivative from the coefficients using known math. You could also do a spline interpolation.

 

Can you attach a simple example so we can see how the data looks like? For example are the x and y-values sorted in some way or are there loops.

0 Kudos
Message 5 of 7
(441 Views)

I ran into a similar problem finding slopes with points with non-equal spacing.  Zabercs suggested using finite difference method.

PVT calculations 

 

The Wikipedia reference gives an equation that reduces to the same form as an equally spaced derivative calculation if the spacing is actually equal.

Finite difference calculation 

0 Kudos
Message 6 of 7
(399 Views)

Depending on the nature of the problem, it might be better to express the slop as an angle, because the derivative blows up for vertical segments.

 

We still have not seen any data. Often current/voltage curves can follow some established theory that can be fit to a model. Again, once you have a fit, you can calculate the analytical or numeric derivative.

 

How much noise is in the data? Piecewise derivatives tend to amplify noise. Often fitting or even filtering is needed for a nice result.

0 Kudos
Message 7 of 7
(388 Views)