High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Determining the sample rate and acquisition record length

The text below is from the digitizer help documentation. In the example it gives 1000 samples at 20MS/s.  By Nyquist I can measure up to a 10Mhz signal, but what determines the number of samples to take for a certain signal? How do I know if I'm taking too few or too many samples?

 

Record Length

Record length refers to the number of samples, or data points, the digitizer acquires for each channel in a single acquisition.

To determine record length, call the niScope Actual Record Length VI or the niScope_ActualRecordLength function. You can also obtain the record length using the Acutal Record Length property or the NISCOPE_ATTR_HORZ_RECORD_LENGTH attribute.

Maximum Duration

Record length limits the maximum duration of a single-shot acquisition. For example, with a 1,000-sample record and a sample rate of 20 MS/s, the duration of acquisition is 50 µs (the number of points multiplied by the acquisition time per sample, or 1,000 x 50 ns. With a 100,000-sample record and a sample rate of 20 MS/s, the duration of the acquisition is 5 ms (100,000 x 50 ns).

0 Kudos
Message 1 of 3
(10,026 Views)

Towleb1,

 

With the NI Digitizers you will need to determine the length of acquisition that you want to perform on your signal. For example 1000 samples at 20MS/s will get you 1000/20,000,000 of a second or 50 us as the documentation indicates. Where Nyquist comes into play is with your signals rate. For instance if your signal was a 20kHz sine wave, the period of that sine wave would be 50 us as well. This means that you will get 1000 samples from your digitizers ADC and that group of samples will represent 1 period of your sine wave.

 

If your signal is 200kHz, the period would be 5 us and because your sample rate is 20MS/s you would get 100 samples per period of your sine wave and because your acquisition is 1000 samples long you would get 10 periods of the 200kHz signal in your record or acquisition.

 

Hope that clears up the question.

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 2 of 3
(10,020 Views)

The somewhat confusing reliance on record length is actually rooted in a mechanism to make sure you can interchange instruments and still get about the same data (it does come from the IVI standard, which NI-SCOPE follows).  When you specify an acquisition rate, there is no guarantee that the device can produce that rate.  Most acquisition rate clocks are divided down from a master clock, so you get integral divisors of a base rate (e.g. 20MHz divided by 2, 3, 4, etc.).  If you request an acquisition rate the device does not support, you get the next highest rate.  If the acquisition rate increases, the acquisition time decreases.  In most applications, this is poor behavior, so the driver coerces the number of data points upward, as well, so that the acquisition time remains a constant.  This causes issues when trying to perform analysis which is dependent upon the actual number of points (e.g. FFT), but in most cases, is desired behavior.  Thus, there are functions to return the actual sample rate and record length.

0 Kudos
Message 3 of 3
(10,010 Views)