Vyresince Posted July 14, 2006 Report Share Posted July 14, 2006 I have an NI USB 6009 DAQ that takes voltage data for me. It's the 14-bit version, and I know it has a max sampling rate of 48 kS/s (though I happen to sample much slower than this), but what about the precision of the numbers it gives me? Will it only give me numbers it's sure of or could some of my numbers potentially be garbage? The reason I'm asking this is because I recently had to rewrite a view VI's to work with doubles instead of sinlges due to precision concerns, and from this I started wondering about the source of my raw data. For the most part, my voltage just oscillates from about +1 V to -1V (although it will occasionally exceed these limits). Am I stupid to worry, will the device only give me numbers it knows; or could this be like the situation with single precision where it will give you plenty of numbers but can only be relied upon to give you 6-7 accurate numbers? Just in case it's helpful, here are some examples of voltage readings I'm getting: -1.1792, -0.336914, 1.19385, 0.532227, -0.644531. Thanks in advance for all wisdom imparted and I really do apologize if I'm wasting forum space with elementary questions. EDIT: The numbers I provided came from a VI that logs the DAQ data, and it saves the numbers in single precision (though I may change this in the future), so I don't know if that has an effect on the numbers or not, but I thought I should mention it. Perhaps saving in single causes them to lose precision? Quote Link to comment
Guillaume Lessard Posted July 14, 2006 Report Share Posted July 14, 2006 First, in order to maximize your precision, make sure your measurement range is coherent with what you're measuring. If you're measuring a value between -1 and +1 with a -10 to +10 range, you're potentially throwing bits away. Second, the lower order bits generally measure noise-related fluctuations. Unless you have a really exquisitely-built low-noise circuit, I wouldn't pay attention to anything below 0.1 millivolt. Note that this gives you a dynamic range of about 4 orders of magnitude; not bad! Have you quantified your electrical noise? A millivolt rms or more is quite common! The card cannot know whether its measurement has 14 bits worth of good information or whether some of them simply measured a fluctuation in the noise. That's *your* job, as a user. The card reports, you interpret. Finally, single-precision floats have 24 bits worth of mantissa. It's hard to see how assigning 14 bits from a 16-bit integer to a single would lose any information... Quote Link to comment
Vyresince Posted July 14, 2006 Author Report Share Posted July 14, 2006 First, in order to maximize your precision, make sure your measurement range is coherent with what you're measuring. If you're measuring a value between -1 and +1 with a -10 to +10 range, you're potentially throwing bits away. I believe I have the range set on -10/+10 in order to catch the sufficiently common fluctuations beyond -1/+1. I might talk with some of the other people I work with and see if there would be any danger in narrowing this range a bit. Second, the lower order bits generally measure noise-related fluctuations. Unless you have a really exquisitely-built low-noise circuit, I wouldn't pay attention to anything below 0.1 millivolt. Note that this gives you a dynamic range of about 4 orders of magnitude; not bad! Have you quantified your electrical noise? A millivolt rms or more is quite common!The card cannot know whether its measurement has 14 bits worth of good information or whether some of them simply measured a fluctuation in the noise. That's *your* job, as a user. The card reports, you interpret. I hadn't really thought too much about that. I mainly work on the data analysis, but I can certainly mention your comments to those that actually set up the electrical devices/sensors. Finally, single-precision floats have 24 bits worth of mantissa. It's hard to see how assigning 14 bits from a 16-bit integer to a single would lose any information... I didn't think was losing anything to single precision assignment, but I wasn't sure either. Much thanks for all your help, you've certainly cleared many things up for me. I have another question related to my first (once again, please forgive my ignorance). Were I to upgrade to a 16-bit DAQ, how much would this buy me in terms of precision/significant digits? As I said, right now I get about 6 digits of precision. Would a 16-bit DAQ significantly improve upon this, or is it likely I'll end up just measuring more noise? Quote Link to comment
i2dx Posted July 15, 2006 Report Share Posted July 15, 2006 [...] Would a 16-bit DAQ significantly improve upon this, or is it likely I'll end up just measuring more noise? of course 16 bit resolution are better then 14 bit and 24 bit are better then 16 bit, but with more resolution the daq-boards get more expensive, so mostly you choose the card that fits your accuracy needs and not more. you can easyly calculate, which resolution you need: a 16 bit card divides a 20 V signal (from -10 to 10V) into 2^16 = 65536 parts, which means that you can resolve 20 V / 65536 = 0,00030517578125 V or 0,305 mV a 14 bit card divides a 20V signal into 16384 parts => you can resolve 0,001220703125 V or 1 mV I'd consider at least the last bit as noise in every measurement, so I'd rely on 13 bits on a 14 bit card, and on 15 bits on a 16 bit card, but that also depends on the type of measurement, and the noise in your electric circuit ... BTW: if you are using DAQmx you can simply set the output format to I16 / U16 and "see" the raw data from the ADC ... Quote Link to comment
crelf Posted July 15, 2006 Report Share Posted July 15, 2006 I'd consider at least the last bit as noise in every measurement, so I'd rely on 13 bits on a 14 bit card, and on 15 bits on a 16 bit card, but that also depends on the type of measurement, and the noise in your electric circuit ... That's a really important point that must not be taken lightly. You need to consider the resolution and the accuracy (and the sensitivity). Quote Link to comment
Vyresince Posted July 20, 2006 Author Report Share Posted July 20, 2006 Thank you both very much i2dx and Crelf. I believe all my questions have been answered, and I will definitely take into account noise and the accuracy of the last significant bit. Once again, thanks to everyone who has helped me with my precision woos. Quote Link to comment
crelf Posted July 20, 2006 Report Share Posted July 20, 2006 Thank you both very much i2dx and Crelf. I believe all my questions have been answered, and I will definitely take into account noise and the accuracy of the last significant bit. Once again, thanks to everyone who has helped me with my precision woos. No worries Vyresince - any time Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.