LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tone Measurement frequency resolution

Solved!
Go to solution

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

0 Kudos
Message 1 of 4
(2,161 Views)
Solution
Accepted by topic author bdjinovic

Yes you need 10 seconds worth of data to see 0.1 Hz resolution.  That is the way FFT's work.

0 Kudos
Message 2 of 4
(2,147 Views)

Okey, understood.

 

0 Kudos
Message 3 of 4
(2,113 Views)

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 4 of 4
(2,100 Views)