08-26-2013 05:05 PM
Hi there,
I'm trying to update some older code by implementing some sort of FFT. Currently, my program acquires X data points, averages them, and spits out the Mean value into a graph (Signal as a function of wavelength) (Spectrofluorimeter). This is done a number of times with the instrument moving to a different wavelength between each sample scan. I've tried to incorporate the Filter Express VI but it does not seem to be doing what I'd like it to. I have it wired to my Signal Acquisition Express VI with the Filter set to Low-pass 100 Hz with the result being passed through the "Mean" VI and then graphed with the Build XY Graph Express VI.
When I graph the Power Spectrum, I am seeing that the maximum observable frequency is always 1/50th my sampling rate (regardless of my low/high/bandpass settings). For example: my # of samples is set to 100, and my sampling rate is 8000 and I observe a maximum frequency of 160 Hz. If my # of samples is set to 100 and my sampling rate to 6000, the maximum frequency is 120 Hz. If I try the Filter Express VI with very basic wiring and just hook up a battery to it, I see all sorts of frequencies all the way up to my sampling rate divided by 2 (i.e. 8000 -> 4000 Hz) so this seems very strange to me.
I'm not sure what is causing this and perhaps its a limitation of the Filter Express VI and I'm supposed to filter using a different method? I was thinking that perhaps I would need to store all of the dynamic data and then wire it to the Filter Express VI once the entire scan was completed and filter that way but I'm not sure how to save or buffer this dynamic data.
I'm hoping this is a common problem and someone would be so kind as to offer me any suggestions!
Thank you for your help!
08-26-2013 05:07 PM
I think I should clarify that these aren't necessarily "Single Samples". I take X number of samples at a specific wavelength, filter that, then take X number of samples at a different wavelength, filter that, and the goal is to have a frequency filtered data set at the end.
08-26-2013 05:10 PM
Is the result of the acquisition Dynamic Data Type or a waveform? Sounds like "dt" is getting lost. If it's a waveform, "Get Waveform Components" can tell you what the dt is.
08-26-2013 05:23 PM
08-26-2013 06:11 PM
I haven't used Dynamic Data. There's a "Convert From Dynamic Data" Express VI that will let you turn it into a waveform.
08-27-2013 03:58 PM
I used the Convert from Dynamic Data express VI and I'm able to find the dt component. Is there a specific way I am supposed to be wiring it for it to work properly?
08-27-2013 04:21 PM
You can output the dt and see what it is. If it's wrong, and you know the sample rate, you can change it.
08-28-2013 12:17 PM
I wasn't able to apply your suggestion to make it work so what I did as a successful alternative was I just resorted to "post-processing" by acquiring the data for a full scan, and then passing it through the filter.
Thank you for your suggestions though!