08-28-2013 12:09 PM
Now I am fairly new to labview, and I don't really know how to even start with such a set-up and some help on how to get started would be greatly appreciated.
Ill first give you an impression of the calculation I want to do. I have two continuous streams of data and I sample these signals at a sample rate of 200 hertz. Now what I want to do is collect data for 6 seconds, and then calculate the mean of both the signals over that 6-second period. This should then be added to an array that saves the last 40 6-second means tat should be updated after every 6 second window. .
Next a Pearson correlation coefficient should be calculated over the last 40 6-second means of both signals. This Pearson correlation coefficient should be updated after every 6-second window.
08-28-2013 12:28 PM
Well, you've really only got two significantly different things to do: (1) collect data at a fixed rate, and (2) do math with what you (then) already have.
You could start with either task. For me personally, the routine to take the data is the more difficult (there's always some condition I haven't thought about that adds another fork in your routine), so I'd start tackling that one first.
The math, well basically it's a matter of getting used to how LabVIEW handles arrays, and once you've got that down, it's smooth sailing (hint: one way is to use FOR loops and shift registers). There are enough built-in math functions in LabVIEW (including the Pearson correlation coefficient) that you can easily do just about anything.
Cameron
08-29-2013 02:11 AM
Hello Camerond,
There's one other thing he should think about/keep in mind:
How he's going to implement his 40 "6 second mean" buffers.
Basically a simple circular buffer should do the trick, but still there are different ways to do/implement this.
Vitual: Which part have you already tested/tried?