From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-18-2007 05:34 PM
Hello,
I have a file that has an array of values from a accelerometer. In other words, I sampled at 5000 samples/sec and stored all the values from an trasducer for a period of about 2 mins.
So basically the file has 2*60*5000 values of the transducer.
I was trying to play with this array to be able to decode it. I randomly applied certain SubVIs given in Lab-View, and finally found the right combination to decode the data. I have the VI ready, but cannot figure out what do the SubVIs mathematically do to my array to get the VI working correctly.
I chose the following options in the SubVI:
· Smoothing
· Moving Average
· Rectangular
· Half Width of Moving Average= 200
What do these parameters really do to my data?
The above combination helped me decode my data
I would appreciate it if you could explain me the math in the above 3 steps.
Thanks.
02-18-2007 06:33 PM
DJ101 wrote:I randomly applied certain SubVIs given in Lab-View, and finally found the right combination to decode the data.
That is an interesting approach and should statstically take forever because you have a nearly infinite number of combinations. There has to be a more targeted way. 😄
So, you have a 3D array (2x60x5000) and none of the tools you mentioned (derivative, peak detector) should even work with it. They all can only handle 1D arrays! I suspect that there is a lot of information you're not telling us. Maybe you could attach your VI?
@DJ101 wrote:
What do these parameters really do to my data?
Every single subVI has a help page. Just right-click on its icon on the diagram and choose "help"
Usually the problem is opposite: You know what you want to do, but don't know how. Here you randomly do something and by some miracle the result looks right. How can you possibly know that you are doing the right operations if you don't understand the operations??? 😉
02-18-2007 06:57 PM
That's not what he said.
He has a 1-D array that is 2x60x5000 = 600000 samples.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
02-18-2007 07:07 PM
02-18-2007 07:31 PM
02-18-2007 07:39 PM
I'm trying to figure out what you want to know.
The two-cent definition is the rate of change of something. Consult the HELP window for the DERIVATIVE vi.
If you're measuring acceleration, the first derivative is speed, the second derivative is position.
Noise on that signal will eat your lunch, however.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
02-18-2007 08:34 PM
Ya,
its the noise that was killing me.
I filtered the data, and the results improved.
Thanks
02-18-2007 08:45 PM
You can make the results look prettier by filtering, but that doesn't make them right.
The derivative function is sensitive to noise, and 2nd derivative especially so.
You should start by asking what frequencies you are really interested in, and lower your sample rate to accommodate that.
Then filter accordingly, but carefully.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
02-18-2007 11:23 PM
02-19-2007 07:01 AM
You integrate the acceleration to get speed.
You integrate speed to get position.
And DC OFFSETS will eat your lunch here.
Blog for (mostly LabVIEW) programmers: Tips And Tricks