MATLAB Answers


minimum DAQ analog output frequency resolution?

Asked by Mike
on 8 Feb 2012
Latest activity Edited by Image Analyst
on 5 Oct 2013

I'm using an NI USB-6351 to generate a SE analog output sine wave. The generated frequency range can range from 10KHz to 100KHz. Experimentally I've confirmed with 2 frequency counters, I am getting ~ 2 Hz resolution. The master clock for the system has a 100MHz clock. The DAQ output sample frequency is 2MHz, but I cannot figure out how to calculate the minimum frequency resolution from those parameters. I'd like to theoretically calculate if I can get 10,000 and 10,002, 10,004, etc, from system parameters, so I have an idea what is actually going on...

I was referenced to the below knowledgebase, but with it I don't get agreement with experiment.. It would insist on ~1KHz resolution, not 2 Hz.

Frequency Resolution of the Analog Output of a DAQ Device


2 Answers

Answer by Walter Roberson
on 8 Feb 2012

That device has three base clocks, 20 MHz, 10 MHz, and 100 kHz, and maximum divisor of 16. 2 MHz would need a divisor of 10, and by using the +/- 1 on the divisor as shown in the link, I calculate roughly 200 Khz as the resolution.

To get 10000 Hz you would have to use the 100 kHz clock with a divisor of 10, which would get you a resolution of roughly 1000 Hz, which would be at all close to your 2 Hz desire.

When you measured the range using the frequency counters, were you requesting rates near to your 2 MHz and seeing what the minimum difference in generated frequencies was? Or were you measuring the variability in the frequency of the 2 MHz output? The precision of an frequency is different than the resolution. The spec for the precision of the output frequency is 50 ppm of the sampling rate; at 2 MHz that would come out as 100 Hz. It is plausible (to me) that you happen to be getting enough better than that in practice (since that is worst case) to see 2 Hz variability.


on 8 Feb 2012

I used an HP frequency counter with sub-hertz resolution. It integrated for a period and provided an answer which indicated when I increased or decreased the frequency by 2 Hz, the corresponding count was measured. The counter measured excellent repeatability.

The DAQ output has a LPF on it to smooth out the samples and there were 40 samples per waveform. The 2MHz should not have been apparent to the counters with the appropriate LPF attached (smoooooth sine wave). The counter does not have a requested range.

The DAQ itself, using the DAQ TB input, sets the divide down for the clocks.

As I read your post I think you meant *not* "be at all close to your 2 Hz desire"? I agree, the link points to an answer which does not work according to actual performance.

I will see if I can find anything in the user manual, but that will probably have to wait a few hours.

Answer by Mike
on 23 Feb 2012

I have yet to work through the suggestions in this post, but I think it will provide more understanding if not an answer. thanks for your help.


Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!