LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

derivative of waveform data

How can I calculate the first derivative of my analog input WAVEFORM? I have read various earlier posts related to this, but haven't had any success with the suggestions. What should I do in this particular instance? Can I use the "derivative x(t)" VI?
0 Kudos
Message 1 of 25
(13,075 Views)
Okay, I've had some success myself since posting (see attached VI - LabVIEW 6.0.2), but if anyone can improve on this please do. My real signal won't be a sine wave, I'm just using this to play with.
0 Kudos
Message 2 of 25
(13,059 Views)
I hope the attached example can help you...
0 Kudos
Message 3 of 25
(13,058 Views)
Can't open it - I'm LabVIEW 6.0.2...
0 Kudos
Message 4 of 25
(13,057 Views)
I looked at your code and it looks fine.
Just take care for the initial and final conditions.
You can remove the data array (Y) from the waveform and get the initial and final conditions from it.
0 Kudos
Message 5 of 25
(13,054 Views)
Thanks for your help 🙂
0 Kudos
Message 6 of 25
(13,042 Views)
The derivative function you are using is very susceptible to noise. If your actual waveform has any noise, it will be amplified in the derivative. A much better method is the Savitzky-Golay filter. These can be used to get derivatives of any order and can be easily tailored to the characteristics of your data. A Savitzky-Golay filter does the equivalent of a polynomial least squares fit to the points surrounding the point of interest, then takes the value, or a derivative of the resultant equation. This gives much better noise immunity than the two-point scheme used by the LabVIEW utility. I have used this in the past to analyze data that was unusable with a two-point scheme.

Unfortunately, said analysis was done at another company and I do not have code to share. Fortunately, the algorithms are relatively simple. Find a second edition or better of Numerical Recipes in C by Press, et. al. (in most university libraries and larger public libraries). The book does a good job of explaining the algorithm and its application. If you can't find a copy, you can probably browse the section at Amazon.com.

Good luck!
Message 7 of 25
(13,029 Views)
Sounds good - I have access to the book you referred to, but it could take some time... I have no experience of this kind of thing, but I'm willing to learn!
0 Kudos
Message 8 of 25
(13,022 Views)
You can download an implementation of the Savitzky-Golay smoothing filter from www.sciware.com.au

This implementation allows you to efficiently smooth and differentiate non uniformly spaced data. Also you can perform point by point non-uniform smoothing which is useful for smoothing data while acquiring or processing large data sets.

Regards

SciWare
Kurt Friday
www.sciware.com.au
0 Kudos
Message 9 of 25
(12,976 Views)
Again, sounds good BUT ... I'm LabVIEW 6.0.2. Any chance of an earlier version? (or even a jpg screen capture of the block diagram - I'll have a go at building it myself). In the meantime I'll check out the Analytical Chemistry article. Thanks for your help,

Suzanne
0 Kudos
Message 10 of 25
(12,971 Views)