11-13-2013 03:11 PM - edited 11-13-2013 03:13 PM
I have a high speed ADC board and I wanted to run some tests on it's samples which are in a binary file. Tests like the Histogram of noise , SNR , INL , DNL , …
For start I want to open with Histogram but problem was that the volume of the file which has samples in it is too way large. Total samples are about 500Mega samples. It's in a binary file sampled at 100MHz and stored as 16 bit (A2D has 14 bit output data and input of A2D has been connected to ground through a 50 ohm resistance to sample A2D noise)
What I did was simply reading 1Mega samples every time (in a For Loop) and take histogram of this samples and register Histogram data in that loop. After Loop is completed I just plot Histogram data. I'm not sure I'm getting right results this way. Is this a right method or what ? What else do you guys think I should do ?
I also don’t know how to obtain "Probability Mass Function" or "Probability Density Function" plot out of Histogram plot cause it makes more sense when somebody wants to analyze ADC performance using Noise Histogram
Please take a look at inside the attached VI . As I explained I cant attach samples file!
11-13-2013 05:45 PM
I would say this is not entirely accurate, but close. Reason I say that is that your bin sizes and center points are dynamically determined by calculations based on each segment (1e6 samples). A more accurate method is to make the bin max and min static/constant and then add (not append using shift register) the histogram (Y) results of each FOR loop iteration. If you have 50 bins, you should always get the same 50 X values (don't add these) and by adding the iterations together you'll get 50 Y values.
You can make the start/top points of the bins extra wide to accomodate the enire expected range of your signal and make the bin count elatively large to achieve resolution without too much of a memory hit.
11-14-2013 06:16 AM
Thank you. I suppose youre right. I just didn't quite understand what you told me to do!
Noise samples are between 430 and 460 . But I dont know number of bins. Besides what do you mean by "add" instead of appending ? I dont get it ! whats wrong with appending ?
Could you modify the VI according to your comments ? I think it's better this way if I'm not asking too much
Thank you anyway
11-15-2013 11:04 AM - edited 11-15-2013 11:09 AM
Hi Zwired1
Would you take a look at the attached VI ?
I guess it's what you meant. Now it's adding results instead of appending and now it's correct. Thank to you
Next step is to obtain Probability Density plot out of taken histogram. So I looked at LabVIEW Probability Density.vi example and I realized how to make that plot. But I'm not getting correct result. Could you tell me what is it that I'm doing wrong ?
Unfortunately I couldn't exactly figure out what is "dt" in Integral x(t).vi or Derivative x(t).vi and another input parameters like conditions and how does they matter. So I'm not sure if I'm giving them correct values. I used LabVIEW "Probability Density example values !
According to this example I decided to use "Histogram.vi" instead of "General Histogram.vi". Again, I dont know whats the difference ! I just did.
Just open VI without execute it. I saved last results on Controls and Indicators of Front Panel and you do not have to Run the VI. I want a PDF plot instead of what I'm seeing now on "Mosi Probability Density Plot" Indicator. Something like "Probability Density" Indicator in LabVIEW "Probability Density.vi" example.
Thank you for your help. I really need help !
11-15-2013 11:16 AM
please send your .dat file
11-15-2013 11:49 AM
I told you it's way to large. It's about 1GB ! Why do you need it for ? I used "Make Current Values Default" so you can see the last result I got.
Would that be enough if I save 10e6 samples ? If so then wait so I'll save first 10e6 samples or more and then I'll attach it.
By the way one of my big questions is number of "bins" . Cause for each bins number I get pretty different Histogram or PDF result. How is that ?
Sorry it seems I've left a "General Histogram.vi" in the middle of For Loop. Simply delete it.
11-15-2013 12:52 PM - edited 11-15-2013 12:55 PM
Here is the first 11e6 samples.
Use these files.
11-16-2013 01:49 AM
OK, here's the deal:
1] you have integer data
2] specifying the number of bins and not also specifying min and max does not guarantee interger bin widths
3] a non-integer bin width messes with the "inclusion" of some of the data, giving you double-counts in some bins and undercounts in others
4] some of your segments ran into this, some didn't, so the data looked "almost right"
I rewired the VI and made the max and min fixed and consistent for all of the FOR loop iterations. I made the number of bins equal to the difference of max and min -- more bins than there are integers between the endpoints leads to bins that have zero counts (try setting the # of bins 36, min to 438, max to 456. Think through that and then try # of bins=24).
You may want to look even closer at the bins -- it may be that you really need the number of bins to be equal to ( Max-Min +1) but I'm not sure. The lack of a +1 , if it is needed, probably isn't enough to affect the appearance of the graphs, but it might affect the accuracy of your results.
11-16-2013 07:11 AM
Dude could you save it as LabVIEW 2010 ?!
I can not open this VI .
11-16-2013 12:48 PM