From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

derivative of waveform data

I've converted the code to LV 6.0 and updated the link on our website.

regards

Kurt
Kurt Friday
www.sciware.com.au
0 Kudos
Message 11 of 25
(3,901 Views)
Great - thanks so much,

Suzanne
0 Kudos
Message 12 of 25
(3,899 Views)
A bit of googling turned up the following algorithm on a LAVA discussion board. Hope it works for you. I converted from LV 6.1 to LV 6.0, but don't have 6.0 installed to test it.

The VI was written by Sergey Leiberman and kindly shared by him in 1997. It was downloaded from http://solidusintegration.com/Savitsky-Golay.llb.
0 Kudos
Message 13 of 25
(3,895 Views)
I realize this topic is quite old but it fairly close to what I am attempting to do right now. 

I am trying to use the Savitzky Golay smoothing to read in a set of X(time) and Y (analog voltage) values and smooth out the noise a little bit and give me the first derivative. I have gone through the program and understand the basics of what it is trying to do in exception the nitty gritty of the numerical method.

Basically I want to be able to display the smoothed Y and smoothed dY/dx on the fly. I don't think the downloadable files allow this sort of thing without some modifications. Basically what I tried (and what I want some feedback on) is I took out the Buffer Function seperatly as well as the Orthogonal Smooth.

The Buffer function will put the values into the specified window as values are put in continuously, and feeds it to the orthogonal smooth which will smooth the values over the window. Am I able just to Index the last value of each of the smoothed arrays to get a values I can display on a chart (or a digital readout which I would like as well).

For the Chart I would like to put the Smoothed Y and Raw Y on the same plot. To do this I have tried putting the x and y data into an cluster and then put an array of clusters into the plot but it doesn't seem to want to display anything other then the Raw data.

Any help would be great,

Thanks!
Mac
0 Kudos
Message 14 of 25
(3,479 Views)
Ok.. I didn't realize that the output of the pt by pt was actually just an array of a single value so if I just index it I can get that value and input it into a chart. But it still won't allow me to put multiple plots on a single chart. I probed both values and they are different, and when put on a chart it just goes between the two values back and forth with a single line.

I have tried indexing the one and only position of the output array of the smoothing function and put it into a build array with the current raw data value (to compare the two)... but with no luck.
0 Kudos
Message 15 of 25
(3,454 Views)
What version of LabVIEW are you using?  Savitzky-Golay derivatives are supported natively in version 8.2 and above.  With this, you should easily be able to display analyzed data on the fly.

If you need to modify the posted code and need more information on Savitzky-Golay filters (essentially a convolution filter), check out the online version of Numerical Recipes in C (see section 14.8).

Please start a new thread if you need more help.
0 Kudos
Message 16 of 25
(3,453 Views)
You can pass multiple traces to a chart by passing in a cluster containing all the Y values.  See the main LabVIEW help and examples for details.
0 Kudos
Message 17 of 25
(3,450 Views)
Thanks, that was exactly what the problem was... I was trying to build an array when I should have been using just a cluster.


0 Kudos
Message 18 of 25
(3,431 Views)

Hi,

Is there any way to get orthogonalSmooth 6.0 software.

 

Cheers.

Boussairi.

0 Kudos
Message 19 of 25
(1,994 Views)

Hi Boussari,

 

what exactly are you looking for in this very old thread - instead of creating your own one?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 20 of 25
(1,982 Views)