peter01 Posted July 28, 2005 Report Share Posted July 28, 2005 HI! Does anybody know a program, which calculates the derivative from X,Y points?? Best regards, Peter Quote Link to comment
ahlers01 Posted July 28, 2005 Report Share Posted July 28, 2005 HI!Does anybody know a program, which calculates the derivative from X,Y points?? Best regards, Peter 5427[/snapback] - convert your (X,Y) points into two arrays [X] and [Y] - use LV's 'derivative.vi' to calculate arrays [dX] and [dY] - divide the two to get [dY/dX] (this assumes that the points (X,Y) are sorted with respect to X) Quote Link to comment
peter01 Posted July 28, 2005 Author Report Share Posted July 28, 2005 Hallo ahlers01 Danke f Quote Link to comment
ahlers01 Posted July 28, 2005 Report Share Posted July 28, 2005 Kannst Du das VI f Quote Link to comment
peter01 Posted July 29, 2005 Author Report Share Posted July 29, 2005 HI! Danke f Quote Link to comment
ahlers01 Posted July 29, 2005 Report Share Posted July 29, 2005 Meine X,Y - Werte beschreiben eine Kurve wie in der Grafik darunter. Von diesen Punkten br Quote Link to comment
peter01 Posted July 30, 2005 Author Report Share Posted July 30, 2005 Hallo Franz! Danke f Quote Link to comment
peter01 Posted August 1, 2005 Author Report Share Posted August 1, 2005 Hallo Franz! Ich hab dir im Anhang den Datensatz gepostet sowie eine Grafik den gezeichneten Datensatz darstellt. Die erste Spalte stellt die Y-Werte und die 2te Spalte die X-Werte dar. Eine halbwegs genaue Darstellung der Messwerte w Quote Link to comment
ahlers01 Posted August 1, 2005 Report Share Posted August 1, 2005 Ich habe bei der 6er Version die Vollwersion. K Quote Link to comment
peter01 Posted August 2, 2005 Author Report Share Posted August 2, 2005 Hallo Franz! Danke f Quote Link to comment
malef Posted August 2, 2005 Report Share Posted August 2, 2005 Peter, have a look at SplineInterpolant.vi it will calculate the second derivatives for you. Boundaries can remain to default with your data. Manfred Quote Link to comment
ahlers01 Posted August 3, 2005 Report Share Posted August 3, 2005 Hallo Franz!Danke f Quote Link to comment
peter01 Posted August 4, 2005 Author Report Share Posted August 4, 2005 HI FRANZ! Thank you for your programs! Could you explain me the method III please? For what did you use the variable "N"? Do you use this variable to control the border of the dates? Best regards, Peter Quote Link to comment
ahlers01 Posted August 4, 2005 Report Share Posted August 4, 2005 HI FRANZ!Thank you for your programs! Could you explain me the method III please? For what did you use the variable "N"? Do you use this variable to control the border of the dates? Best regards, Peter 5531[/snapback] Hi Peter, Method iii is the one described in the 3rd paragraph of my last posting: "Then the best solution would be to perform a polynomial fit to a subset of the original data which is centered symmetrically around point (Xi,Yi). Take 2N+1 data Xi-N, ... , Xi, ... , Xi+N (and the corresponding Yi-N,...,Yi+N) and fit a polynomial, then take the (analytical) 2nd derivative at point Xi as an estimate of the 2nd derivative of the original dataset." N is the number of data to the left and to the right of a specific data point i, so the total number of data taken for a polynomial fit is 2N+1. Data points i towards the beginning and end of the dataset may have less than N points to the left or right, and then of course less than 2N+1 data are taken. Example for dataset of size m: For N=2 the following fits are performed: for i=0 points 0,1,2 are fitted for i=1 points 0,1,2,3 are fitted for i=2 points 0,1,2,3,4 are fitted for i=3 points 1,2,3,4,5 are fitted for i=4 points 2,3,4,5,6 are fitted . . . for i=m points m-2,m-1,m are fitted I think what I implemented is called a smoothing polynomial filter, but here it is not used to filter the original data, rather only the 2nd derivatives of the data are obtained. If for each data point Xi a new Yi were computed from the polynomial and would replace the original Yi, one would indeed have the implementation of a smoothing polynomial filter. The VI I posted can be easily modified for that. regards Franz Quote Link to comment
peter01 Posted August 4, 2005 Author Report Share Posted August 4, 2005 HI FRANZ! Thank you for your explanation. I thin the problem is when i filter the original data, i would lose some geometric details and i think it*s better to filter the 2nd derivatives. There should not be so a big difference, between the method with filtering the original data and filtering the 2nd derivatives!?? Is that right?? Best regards, PETER Quote Link to comment
ahlers01 Posted August 4, 2005 Report Share Posted August 4, 2005 HI FRANZ!Thank you for your explanation. I thin the problem is when i filter the original data, i would lose some geometric details and i think it*s better to filter the 2nd derivatives. There should not be so a big difference, between the method with filtering the original data and filtering the 2nd derivatives!?? Is that right?? Best regards, PETER 5537[/snapback] Peter, whatever you do to your data depends on what information you want to extract. If you want curvature (=2nd derivative), go with method iii) above, I can hardly figure a better way to find a 2nd derivative for noisy data. If you want to compare complete curves, and the curvature is only a tool you use for comparison, there might be better ways to make a reliable comparison, but that depends on details of you setup which I do not know. But in any case, you should try to reduce the noise in you data beforehand as good as possible. E.g. I've seen 2 or 3 outliers in your data (outliers in the X-data set) which you should try to avoid or, if unavoidable, exclude from the analysis. Another comment (again without knowing the details): if a derivative is the signal of interest, it is often best to do some kind of modulation spectroscopy, i.e. you modulate the signal which represents your x-axis sinusoidally with a small amplitude and detect the y-signal with a lock-in amplifier. Then you measure directly the 1st deivative with a much better signal to noise ratio than calculating it from y(x) data. But probably a modulation is not possible in your setup? good luck Franz Quote Link to comment
peter01 Posted August 4, 2005 Author Report Share Posted August 4, 2005 HI Franz! With the second derivatives and other factors, i calculate the bending strength ( the 2nd derivative is the main factor in the formula). I need this bending strength to compare several synthetic material bars. So it*s very important to have the right formula-calculation for my comparison. In my program i will youse the method free, because i saw that it was the best solution for my program. Yes thats the problem, the modulation setup is not possible in my setup, so i will use method tree. With this method you help me very much!!!! :worship: In that case i will thank you for your help! Best regards, PETER Fischbacher Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.