Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

Oscillations on measurements made with USB 6211

Hi all,


I'm using an NI USB 6211 DAQ card to measure the optical power reflected from an interferometer as a function of temperature. The temperature is being changed by the presence of a high intensity ultrasound field. 


My problem is this: I have to montior the reflected power over time and depending on the value change a parameter on our laser. The temperature rises are happening over a matter of seconds and I may need to update the laser parameters several times per second. I've implemented 2 methods of doing this but have encountered a strange problem.


Method 1: Software timed acquisition.

In this method, I have set up a simple data acquisition scheme which has the DAQ channel set up to do a finite acquisition when requested. I then run a loop which reads back the finite number of data points on each iteration and then decides whether or not to update the laser parameters. This works ok, and I get a reasonable sampling rate of about 60 Hz. However, the application really requires a higher sampling rate and one which is more consistent (since this is software timed and is using the USB bus, the sampling rate is not constant and can be affected by other activity on the PC).


Method 2: Hardware timed acquisiton.

To overcome the limitations of the above, I now set the card to acquire data continuously at a rate of 200 Hz. I then read that data back in blocks of 10 data points and use that data to decide whether to update the laser. This method works very nicely if I induce the temperature changes "non-acoustically", i.e. by using heated water or somesuch.


The problem I have is that, when an ultrasound source is used, the second method shows small oscillations on the temperature measurement. The oscillations are highly sinusoidal and occur at a frequency of approximately 8-9 Hz. The ultrasound frequency is approx. 1.8 MHz. But the software timed method (whilst clearly having a high enough sampling rate to produce an 8 Hz sinusoid) does not show this effect.


I don't understand where this oscillation can be coming from or how to get rid of it! The only thing I can think of is that its some kind of EM pick-up by the DAQ card, but why only when a constant sampling rate is used and where does the 8 Hz come from?! 


Any thoughts would be most gratefully recieved!


Paul Morris 

0 Kudos
Message 1 of 7

Hi Paul,


Perhaps the ultrasound source is introducing noise into your signal, which is being aliased to about 8 Hz?  The best solution would be to implement a low-pass filter in hardware, but there are software functions available in LabVIEW as well.

It is very typical to use a low-pass filter when taking temperature measurements (for the specific purpose of removing noise from your signal).  Let me know if implementing a low-pass filter does not show an improvement in your measurements.



Message Edited by RT4CY on 01-26-2009 06:07 PM
Rod T.
0 Kudos
Message 2 of 7

Hi Rod,


Shortly after I posted the question that same thought occured to me too! With the huge difference in frequency between the ultrasound (typically in excess of 1 MHz) and the sampling rate of 200 Hz, it never occured to me! I also "forgot" that the signal used for the temperature measurement does also include a modulation at the acoustic frequency - making aliasing a likely source of this issue!


I'm hoping to test it tomorrow with a low-pass filter between the photodiode and the DAQ card. I don't think the USB 6211 has the facility of a built in anti-aliasing filter...


Just one other thing, surely if it is aliasing I can't do anything about it in software? at least not without losing information in the frequency range of the oscillation...


Anyway, thanks for the reply, I'll post back with an update tomorrow hopefully!


Thanks again



0 Kudos
Message 3 of 7

Hey Paul,


You are correct.  We need to be in the analog world, to prevent aliasing.  So a hardware low-pass filter should improve your measurements.  

Rod T.
0 Kudos
Message 4 of 7

An easy way to test for aliasing is to change the sample rate slightly and see if the measured frequency moves.  A sample rate of 200 S/s (20 MHz/100000) will measure 1.000008 MHz as 8 Hz.  But a sample rate of 200.02 S/s (20 MHz/99990) will measure 1.000008 MHz as around 92 Hz.  With a little work, you may be able to find a sample rate where the aliased noise (if that's what it is) is out of band and can be filtered in software.  A hardware solution would remove any sample-rate sensitivity. 



0 Kudos
Message 5 of 7

Thanks for the reply, just a quick question re sampling rates.


Using the USB 6211 DAQ card, can I set a sampling rate of 200.02? I don't have labview in front of me right now to test it, but can I just write a value of 200.02  in the "rate" of the daqmx timing VI? or do I have to do something more exciting(complicated!)?





0 Kudos
Message 6 of 7

Hey Paul,


Sorry for the delayed response.  The DAQ card has a Programmable Clock Divider which divides down the timebase (20 MHz if using the AI Sample Clock Timebase) to achieve the sample rate.  See the M-series User Manual for a detailed explanation of this (page 4-25).  So the short answer is yes, as long as the sample rate you choose is an integer multiple of 20 MHz it is valid.

20,000,000 / 200.02 = 99,990 


Also, take a look at this great KB which explains how your sample rate may be coerced if you do not choose an integer multiple of the timebase.

Message Edited by RT4CY on 02-04-2009 02:00 PM
Rod T.
0 Kudos
Message 7 of 7