07-10-2019 06:20 PM
Hello.
I want to measure frequency of mains very precise in real time.Signal is acquired through PCI-6014. I would need a resolution at least 0.1Hz or better (0.01Hz).
For tone measurement general recommendation is to sample signal at 5-10 times higher frequency and to have at least 3-5 signal periods for valid frequency measurement. What that means in math sense? What would be resolution of FFT implemented in Tone Measurement vi? For regular DFFT frequency resolution is equal to fs/N. So if I want resolution of 0.1Hz in spectrum does it mean I would need a 10 seconds of sampled data? If so , is it possible to acquire 1 period of signal and then fill rest of signal with sampled values until 10th second. When this is done with zeros it is zero padding
in DFFT and with this we can not get better resolution. I am thinking to do padding with allready acquired samples and just repeating them until I have wanted signal length so I can get better resolution of frequency components in “real time” and not waiting and sampling 10 s of data and then calculating spectrum of signal.
thank you
Solved! Go to Solution.
07-10-2019 06:38 PM
Yes you need 10 seconds worth of data to see 0.1 Hz resolution. That is the way FFT's work.
07-11-2019 01:57 PM
Okey, understood.
07-11-2019 04:42 PM
Couple thoughts for you:
1. You mentioned a special signal processing vi "Extract Tone", which can give you a higher-resolution estimate for a specific frequency peak than you'd get from a general direct FFT. I don't know all the mathematical details, but you could probably expect to estimate your dominant frequency to within 0.1 Hz without needing a full 10 sec of data. I expect it works best with signals that are low-noise and with widely separated dominant frequencies.
2. There's a technique for reading data from the task buffer where you could retrieve 10 sec of data at any rate you like. You can set up properties that let you retrieve the most recent 10 sec of data any time you call the Read function. You could, for example, call it once a second and each 10-second chunk would be 10% new, 90% the same as the previous read.
Here's an example I once posted about how to set that up.
Some combo of both things might let you get a precise frequency estimate (from a known nominal freq) that doesn't depend on a full 10 sec of data and that can be recalculated at whatever rate you like.
-Kevin P