From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ sample clock dependency with small signals

Solved!
Go to solution

Hi all,

 

I am using a NI-9205 on a NI-cDAQ-9184 and noticing some interesting waveform dependencies on my choosen sample rate. It seems that small changes in the sample clock rate have a large affect on the measured waveform.

 

Quick background, I am measuring a signal with a ~10 mV ripple with a 1.6 V bias. I am not interested in the DC signal, only the AC but the NI-9205 only has DC coupling. The application is a noise cancelling circuit where I expect from simulations the noise allowed past the circuit to be higher at higher frequencies. In the attached waveforms the bottom plot is the applied signal, and the top graph is the resulting signal after the signal has been mostly cancelled out. Both waveforms are measured with the NI-9205.

 

I am aware that this measurement is below the accuracy of the NI-9205 which has a maximum accuracy of ~3 mV in its +/- 5V range. However, if I can at least really on the basic shape that is good enough for me. I am also now quite curious what the DAQ is actually doing to create this 🙂

 

My best idea was that it is some product of the 9205's internal multiplexing with its DACs.

 

This first plot shows the waveform at 20 000 Hz, which is what I would expect:

 

20000.jpg

The second plot shows the waveform at 20 001 Hz which seems to be modulated with a sawtooth save:

20001.jpg

 

The waveform looks as expected for 20 000, 20003, 20004, 20005, 20008, 20009, 20010, and 20011 Hz. The waveform looks modulated for 20001, 20002, 20006, and 20007 Hz.

 

Ideally I would like to understand this problem so that I can setup the measurement in a stable manner that I can rely on the basic shape of the waveform. Anyone seen anything similar?

 

0 Kudos
Message 1 of 15
(5,282 Views)

My first thought is "aliasing." What are the frequencies of the signals involved?

 

You indicate a high pass or differentiation type frequency response for your noise cancelling circuit. Does the bandwidth of that output exceed the Nyquist criterion for your sampling rates?

 

Lynn

0 Kudos
Message 2 of 15
(5,269 Views)

True. The applied signal continuously increases in frequency from only 1 to 110 Hz (the X-axis in the images is Seconds) so 20 000 Hz should be much higher. The noise cancelling is also analog not digital so I don't think I would expect this sort of aliasing from my side.

0 Kudos
Message 3 of 15
(5,267 Views)

Sometimes graphs can give the appearance of aliasing when large amounts of data are plotted.  You can see some of this in the chirp signal in the lower graphs.

 

It appears that your graphs may be about 700-800 pixels wide (plot area) but you are plotting 100000 points. LabVIEW must reduce the data to the number of pixels in the width of the graph plot area.  This is a samped data process working in the space domain rather than the time domain but it can still produce aliasing. 

 

If you expand a section of the graphs so that you can see all the data points as individual pixels, do you see the same effect? For example try expanding the graph near 4 seconds where one of the "modulations" occurs in the 20001 data. Expand it so that the width of the graph covers <35 ms and change the plot style to show only the data points.  I created a chirp pattern with 100000 points and wired it to two graphs. You can clearly see the effects of aliasing on the right side of the upper plot. The lower plot has the same data but the X scale is expanded to show 800 data points in a plot area 800 pixels wide The plot styie is one-pixel dot per point.

 

Lynn

 

Plot Alias.png

Message 4 of 15
(5,249 Views)

Great idea. I zoomed in around 4s where one of the modulations is at its minimum and changed the plotting style to points. It seems to me that the signal is not getting aliased by the plotting window. I will also do a broader test today of different sampling rates (<10kHz) and see if that provides any clues. 

Screenshot_011415_114823_AM.jpg

Screenshot_011415_114823_AM.jpg

 

ZoomedPoints.jpg

 

0 Kudos
Message 5 of 15
(5,223 Views)

I agree.  You have something else going on there.

 

Can you post that set of data so that I can see if I can identify anything interesting in it?

 

Lynn

0 Kudos
Message 6 of 15
(5,220 Views)

Absolutely, I've attached 5 different frequencies saved to waveform files. I also put images of the different results below.

 

There really seems to be a whole array of results possible, with only the 20 000 Hz sampling rate resembling the input signal. The input signal always looks great for any sampling rate. For these tests I took 5 seconds of data (ie. the total number of samples to measure was 5 x sampling rate).

 

Thanks!

 

2000 Hz

2000.jpg

10 000 Hz

10000.jpg

10 001 Hz

10001.jpg

20 000 Hz

20000.jpg

20 001 Hz

20001.jpg

0 Kudos
Message 7 of 15
(5,210 Views)

What is the format of your data files?  I do not want to spend a lot of time trying to figure out how the data is stored.

 

It will probably be tomorrow or Friday before I can put much effort into this.

 

Lynn

0 Kudos
Message 8 of 15
(5,203 Views)

I just used the 'Write Waveforms to File' tool. Just checked reading one with the read tool and it looked accurate. Thanks no rush! 

0 Kudos
Message 9 of 15
(5,200 Views)

I had a look into the 9205 specs and didn't found any specs on possible sampling rates,..... seems to have two conversion times....

So setting the samplerates from 20k + n,  0<n<10 migth be possible in the driver , but not for the hardware??

 

Still vote for aliasing effects... 

 

maybe external

Do you have an analog scope you can hook on the signal?   I have seen unwanted oszillations in the MHz just running over an alias filter designed for some kHz because of sligth misconstructions  .... (more a bandstop than lowpass) (or active LP filters oscillating 🙂 )

 

 

or internal

How is the driver handling the decimation?

 

or both

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 10 of 15
(5,184 Views)