12-27-2006 07:31 AM
12-28-2006 07:10 PM - edited 12-28-2006 07:10 PM
Hi Frank,
Your intervals (df or frequency resolution in SVT terms) are the result of Acquisition rate/number of samples. In your case 100KS/s/1562S = ~64.02Hz as you've seen. What this means is that your frequencies come as multiples of 64.02 - in this case 2000/64.02 = 31.24. This rounds down to 31 which gives us 31*64.02 = 1984.64Hz. What this comes down to is that you will not be able to directly get 64Hz intervals starting at 2K.
There are a couple different ways to work with this though. The greatest common factor (who said you'd never need to use that again) 🙂 between 64 and 2000 is 16, so this is a good frequency resolution to shoot for. Working this out 100kS/S/16Hz = 6250 samples. This, in theory, should give us an exact start at 2000Hz (more on that later). We can then decimate the data (pull out every 4th sample) and we now have a data set with 64 Hz intervals starting at 2000Hz.
In practice, you'll notice that we again get a starting frequency (f0) of 1984Hz. This isn't a problem though, because we know that our magnitudes are at 16 Hz steps, so if we start at index 1 (instead of 0) in the magnitude array we will be starting at 1984 + 16 = 20 Hz. You can then pull out every 4th sample and you will have your desired data. Something along these lines should work -
Another alternative would just be to use 100k samples and then just pull out every 64 sample. You could also just work with a higher resolution, but it sounds like you're running a comparison so that may not be an option.
Hepe this helps. Please post back if I didn't answer your question, or this doesn't work for you.
Cheers,
Andrew S.
National Instruments
Message Edited by stilly32 on 12-28-2006 07:12 PM
Message Edited by stilly32 on 12-28-2006 07:12 PM
Message Edited by stilly32 on 12-28-2006 07:13 PM
Message Edited by stilly32 on 12-28-2006 07:13 PM
Message Edited by stilly32 on 12-28-2006 07:24 PM
12-29-2006 07:28 AM
Andrew,
Thanks, sort of, I've implemented something along those lines (no pun intended). The only problem is that now I'm going to be under-reporting the magnitudes in all of the frequencies of interest. I'll be partitioning the energy into all the other bins with the greater resolution and therefore not binning out that energy into the 64 Hz bins. I need to be able to do this with 64 Hz bins.
I've even tried resampling to the next higher and lower sampling rates that work out more amenable to the 64 Hz resolution I'm interested in. Given your insight into how the vi arrives at the start frequency, I'll go back to the resampling technique and see if I can't get the right combination of sampling rate and # samples to get a start at 2 kHz.
Frank