10-30-2014 06:31 PM
bonjour,
j'ai une coube de la caractéristique courant en fonction de la tension, et je voudrais tracer la dérivé dV/dI.
j'ai essayer avec la dérivé x(t), mais je trouve pas relier les entré de cette fonction.
quelqu'un peut m'aider.
merci.
10-31-2014 01:39 AM
Is either the Voltage or the Current regularly spaced? If so, use a single value for the sample interval (for instance the voltage step) wired to dt. Wire the array of data for the other variable (for instance current) to the "x" terminal of the derivitive function. Wire the output array (dX/dt) to a waveform graph.
10-31-2014 05:16 AM
the current and the voltage are not regulary spaced in the dara array? can i make any sample interval.
tnank you.
10-31-2014 05:27 AM
I'm not able to find any LV functions to handle non-periodic sampling but it seems like there probably is and I'm just not finding them.
One thought is to fit a curve to your data, sample (calculate) the current (i) values of the fitted curve at regularly spaced voltage (v) intervals and pass that to the derivitive function.
10-31-2014 05:59 AM - edited 10-31-2014 06:00 AM
in the attachement you will see my curve.
11-01-2014 12:44 AM
Not crazy about how it turned out, but here is a VI doing what I was suggesting.
I faked some data (irregularly-sampled and with noise) that approximates the picture of your data. Fit a 10th order polynomial to it, regularly sampled the fit curve, and took the derivitive. Having the coefficients of the polynomial you could just figure out f'(x) values directly but the way it is in my VI is more general (in case you want to try different non-poly curve fits, for instance).
11-01-2014 04:30 PM
thank you,
i saw your VI, i try to understood it today, but i would to ask you about the function of the "power x'y", because when i make my array data in the VI, i had wrong results in the derivative data.
11-01-2014 08:00 PM
The x^y function takes the coefficients of the poylnomial fit and uses that to generate an arbitrary number of data points on that curve. The outer FOR loop says "I want 200 points", the inner FOR loop calculates the terms of the polynomial at each X value which get summed to yield the Y value at that point. The first iteration of the inner loop calculates the constant (x^0) term, the second iteration does the x^1 term, etc.
You could take the dynamic datatype output of the curve fitting function, convert it to a single waveform, and use get waveform components to get the regularly-spaced Y values (and spacing) that represent the fitted curve but in that case you're stuck with however many data points the curve fitting express VI descides to output.
11-01-2014 08:48 PM
Disregard the second paragraph in my earlier post -- the curve fit data is NOT regularly spaced but is instead spaced exactly as your orignal data. The "x" position of the curve fit data points is the same as your original data. The first paragraph is still valid.
A second look at your VI -- I would be cautious about doing independent "sort array" operations on your X and Y data (current and voltage). There's no guarantee that the ordered pairs will maintain their relationship within the arrays.
11-02-2014 07:53 AM
thank you so mcuch, all is clair.