Sunday, September 25, 2022
HomeElectronicsUtilizing the BlasterAmp – down a rabbit gap of specs

Utilizing the BlasterAmp – down a rabbit gap of specs


The BlasterAmp [1] has confirmed helpful to me in testing all types of analog-to-digital converter (ADC) circuits, even my digital oscilloscopes. Whereas I primarily conceived it to check built-in ADCs in microprocessors, it may be used to check even RF ADCs. Sure, even that a number of hundred MHz downsampling ADC may be examined with an audio tone, as you’ll be able to at all times break into the sign path proper earlier than the ADC and inject a baseband take a look at sign.

This not solely exams that the ADC is mainly functioning correctly, however that the sign processing code is mainly working correctly as nicely. Through the years, I’ve seen a good quantity of improperly functioning code that was blamed on the ADC being “dangerous”.

What To Measure

Figuring out a helpful analog-to-digital converter (ADC) metric that a wide range of individuals with various technical backgrounds can simply use and perceive is without doubt one of the targets of the BlasterAmp challenge for me. Due to the complicated specs and measurement strategies between ADC producers, many instances the ADC appears to be picked on the uncooked variety of digital bits alone.

That may be a superb metric then, the “variety of bits” (N), or for an imperfect ADC, the “efficient variety of bits” (ENOB), as everybody can visualize that metric. That’s everybody’s important objective anyway – to have some minimal variety of bits of their sign processing.

I’m positive that everybody has seen the basic ADC signal-to-noise ratio (SNR) calculation [2],

            SNR = 1.76 + 6.02(N) (Eq. 1)

The place SNR is the signal-to-noise ratio in dB, and N is the best variety of ADC bits.

Equation 1 is derived by calculating what a superbly linear ADC’s quantization error is, so that is the best-case SNR for any good N-bit ADC. By simple extension, you’ll be able to rearrange the equation to unravel for the variety of bits, N given a measured SNR.

            N = (SNR – 1.76) / 6.02 (Eq. 2)

Sadly, that is the place issues get unclear shortly. Equation 1 was derived from an ideal ADC, whereas any actual ADC may have linearity errors, which is able to result in harmonic distortion. Additionally any actual ADC may have noise above the perfect case calculation, and a few random spurious alerts are thrown in for good measure.

To make issues worse, some ADC producers outline SNR as a measurement of the ADC’s noise ground solely, excluding harmonics and random spurious content material, whereas others outline SNR because the ratio between the sign and the subsequent worst single spurious sign. But all spurs and harmonics that can’t be processed away should rely in opposition to the efficient decision or ENOB of the ADC.

This then requires a distinct measurement that takes under consideration the non-ideal behaviors, and most producers name this Sign Together with Noise and Distortion or SINAD for brief,

            SINAD = Sign / (Sign + Distortion + Noise + Every thing Else) (Eq.3)

To make issues much more complicated the ADC individuals have redefined the classical definition of SINAD that has been used because the beginnings of radio as a measure of a radio receiver’s efficiency [3], so watch out to not use the classical radio receiver definition or get confused by it.

How Onerous May This Be?

When Hewlett-Packard first began making high-performance Waveform Digitizers, they’d calculate ENOB by digitizing a excessive purity sine wave with enough factors after which curve becoming an ideal sine-wave to the measured information. The distinction between the true ADC information and the right sine wave could be the sum of all of the distortion merchandise and noise.

This SINAD worth was positioned into Equation 3 and the ENOB was calculated [3]. The issue with that technique is that it largely requires a variable frequency supply that may be added to no matter sampling price was getting used to get a enough variety of factors to faithfully signify a sine wave.

That is one thing that the BlasterAmp will not be designed to do, as it could actually solely produce audio vary alerts, making the purpose about digitizing sufficient of a waveform considerably problematic when you’ve gotten just one variable to manage, i.e., the sampling price.

At present fourier transforms (FT) are used to measure ADC’s, and normally a 1 or 2 kHz full-scale enter sign is used, however this too has pitfalls. The primary is that the noise ground that you simply see can be completely different relying on what number of samples within the FT you’ve gotten taken. That is referred to as processing acquire and is a results of the noise spectral density being the identical, however while you improve the variety of samples, the FT bin width decreases, and therefore the noise in every bin decreases and the FT bin seems to get decrease in amplitude (Determine 1).

Determine 1 Processing acquire lowers the obvious noise ground by an element of PG = 10*log10(M) dB, the place M is the variety of factors within the FT. Right here the distinction between 1,000 factors (blue hint) and 100k factors (pink hint) within the FT ends in a processing acquire and obvious noise ground distinction of 20 dB.

The second drawback is that noise can’t be measured the identical approach as alerts are after a traditional FT that has a window utilized to the uncooked information. Usually, some window operate is utilized to the ADC information earlier than the FT to scale back the spurious sidebands that come up as a result of the enter take a look at sign will not be completely coherent with the sampling sign [4]. The window operate provides a acquire or loss time period to the FT that have to be accounted for.

With alerts, that is generally referred to as the “coherent acquire” and to make issues much more troublesome, the window provides a distinct acquire time period for noise evaluation that’s generally referred to as the “incoherent acquire”. This implies if you’re measuring FT sign amplitudes, it’s a must to use one window correction issue, and if you’re measuring noise, it’s good to be utilizing a distinct window correction issue [5].

You could have run throughout this when you use a Spectrum Analyzer and wish to measure noise. Most Spectrum Analyzers have a “Noise Marker” operate that provides the marker an accurate readout of any noise being measured. With analog spectrum analyzers, this correction for noise measurement was required as a result of the log detectors used responded to alerts and noise in another way, with a contemporary FT-based spectrum analyzer, a distinct correction is required due to the window operate that must be added to the ADC information earlier than the FT. I’ve discovered that many on-line tutorials miss this necessary distinction and therefore should not calculating their FT noise correctly.

Bear in mind all we wished was a easy ENOB metric and now we’re all hung up not solely on learn how to measure the true signal-to-noise ratio but additionally on completely different FT scale elements that have to be utilized to correctly measure noise and alerts… Like at all times, we find yourself with this rabbit gap of complicated phrases, completely different definition of phrases, and calculation steps which might be many instances not mentioned. Is nothing simple anymore?

The Easy Route

I didn’t wish to write yet one more FT SINAD / ENOB evaluation program, and I’d simply moderately use some pre-made resolution. Whereas all ADC producers have some kind of evaluation software program for his or her ADC’s most are closed supply and may solely be used with the bit-streams out of their precise {hardware} units.

Analog Gadgets has an attention-grabbing evaluation program referred to as VisualAnalog [6]. It’s attention-grabbing as a result of it could actually work with precise {hardware} or act as a considerably general-purpose DSP simulator. VisualAnalog is a drag-and-drop, block-based GUI that with only a few blocks may be programmed to learn a textual content file containing any ADC information, after which analyze the outcomes as proven in Determine 2.

Determine 2 VisualAnalog program script to learn ADC information from a take a look at file after which analyze it. This script, together with directions, may be downloaded from Github, see reference [7].

To check whether or not VisualAnalog was measuring the ADC information correctly, I made an ideal quantizer simulation in Python to generate numerous bit depths, additive noise, and spurious alerts. Since my Python simulation began with recognized, but separate sign, noise and distortion merchandise, I used to be capable of sum these all individually within the time area to seek out the precise SINAD. I saved the info from each simulation run and analyzed it with VisualAnalog, which is FT primarily based, after which in contrast the outcomes to my Python evaluation. The outcomes had been at all times lower than a 0.2 dB distinction from my calculations.

So I really feel fairly assured that VisualAnalog is doing a correct calculation throughout a spread of eventualities. The one place the place VisualAnalog fails is that it seems to deal with non-harmonically spurious alerts as noise. Only a few real-world ADC’s have giant quantities of non-harmonic spurs, however it’s one thing to keep watch over.

Some precise examples

To point out the standard sorts of output one will get when testing an ADC, I measured a 12-bit embedded ADC with the BlasterAmp underneath numerous sampling charges. I present the varied measurements and ensuing FT transforms in Determine 3.

Determine 3 Utilizing the BlasterAmp as an enter, I measured a 12-bit embedded ADC, utilized a Blackman-Harris 92 window (BH92) [8], after which took the FT of the ensuing information. I adjusted the variety of ADC samples in order that the bin width could be 1 Hz in all of the examples above. (a) 100 kSPS, 100k factors, (b) 20 kSPS, 20k factors, (c) 1.1kSPS, 1,100 factors. This final plot exhibits the 1 kHz BlasterAmp enter tone aliased to an obvious 100 Hz.

The very first thing that’s noticeable from the FT plots in Determine 4 is that the noise ground is drastically completely different wanting in every plot, welcome to the true world!

Taking a look at Determine 3a, you may surprise if the “spike” form of alerts within the noise ground are spurious alerts, or noise of some kind. One fast method to inform is to rerun the FT with a smaller variety of samples. If the “spikes” change in amplitude, then they’re noise ground associated and should not discrete spurs.

On this instance, I did rerun the FT evaluation with fewer factors and the “Spike like” alerts did change in amplitude, thus indicating that they’re certainly noise, not sign, and needs to be processed as such.

That is an illustration of the problem of measuring SINAD correctly. A call must be made about every FT bin to the impact of: “Is the FT bin noise such that it will get the window noise correction issue utilized, or sign and thus will get the window sign correction issue utilized?”

Desk 1 exhibits the correction issue variations for every of those FT plots. For the reason that bin width is 1 Hz for all of the plots, each the sign and noise window scale elements are the identical for every plot in Determine 3.

Desk 1 The distinction within the BH92 window scale issue for the plots proven in Determine 3 is proven above. For the reason that bin width is a continuing 1 Hz for every run in Determine 3, the dimensions elements are the identical for all of the runs.

We will see from Desk 1 that the distinction between the noise and window scale elements for my examples is 3 dB. This illustrates the issue of misidentifying a sign as a noise element and vice versa. Each misidentified element could possibly be added to the ultimate end result with a 3 dB error. The impact this has in your ultimate end result will rely upon the amplitude and variety of elements misidentified.

The error could possibly be a lot worse, nevertheless. As an example, if the pattern price was 1 MSPS and the FT measurement was 32,000 factors, then the window scale issue distinction between sign and noise could be on the order of 18 dB as an alternative of three dB. Usually, the larger the FT bin width, the larger the delta between the sign and noise window correction issue [9]. Operating a VisualAnalog evaluation on the info from Determine 3a is proven in Determine 4.

Determine 4 The VisualAnalog script outcomes of operating the 100 kSPS, 100k factors information from Determine 3a. The VisualAnalog calculated SINAD is 47.9 dB.

Utilizing the SINAD worth from Determine 4 in Equation 4 ends in an ENOB calculation of seven.7 bits. All of the plots of Determine 3 have the identical SINAD, solely various within the tenths of a dB.

ENOB = (SINAD – 1.76) / 6.02 (Eq. 4)

Conclusion

With all of the confusion on phrases and completely different definitions between semiconductor producers, it’s troublesome to match information sheet parameters past the uncooked variety of digital bits, and digital bits by no means equal “precise bits” of decision.

I’ve discovered that the efficient variety of bits (ENOB) is a straightforward to make use of and perceive time period for audiences of a wide range of technical backgrounds, because it straight pertains to the decision of any digitized level, and it forgoes any point out of dB which confuses lots of much less technical people. Likewise, utilizing ENOB prevents any misinterpretation of the variations between SNR and SINAD measurements, which occurs quite a bit.

The “backside line” for figuring out the efficiency of any ADC is:

  • You will need to measure your ADCs, particularly ones embedded in different ICs.
  • You will need to discover some evaluation algorithm that’s dependable and to keep it up, as every bit of research software program provides you with completely different outcomes.
  • Preserve it simple for others to grasp, use one set of definitions, and watch out for blindly evaluating information sheet numbers between producers.
  • Use a single ADC efficiency definition, like ENOB, and keep it up. 

References

[1] Steve Hageman, “Simplify testing of embedded analog-to-digital converters”, EDN.com, June 2022 https://www.edn.com/simplify-testing-of-embedded-analog-to-digital-converters/

[2] Bonnie Baker, “What does the ADC SNR imply?”, EDN.com, Might 27, 2004 https://www.edn.com/what-does-the-adc-snr-mean/

[3] Classical or Radio SINAD definition (BEWARE: This isn’t the identical definition of SINAD that ADC producers use), https://en.wikipedia.org/wiki/SINAD

[4] Steve Hageman, A sequence of articles on the FFT, DFT, home windows, and methods,

[5] Martin B. Grove; “Measuring Frequency Response and Efficient Bits Utilizing Digital Sign Processing Strategies”, Hewlett-Packard Journal, February 1992. https://archive.org/particulars/hpjournal

[6] Analog Gadgets, Inc. VisualAnalog, https://www.analog.com/en/design-center/interactive-design-tools/visualanalog.html

[7] The VisualAnalog script and take a look at information can be found on my GitHub at, https://github.com/Hagtronics/BlasterAmp/tree/important/VisualAnalog

[8] G. Heinzel, A. Rudiger, and R. Schilling, “Spectrum and spectral density estimation by the Discrete Fourier rework (DFT), together with a complete checklist of window capabilities and a few new flat-top home windows.”, Max-Planck-Institut fur Gravitationsphysik, February 15, 2002

[9] For brevity, I’ve not proven how the correction elements are calculated as I’ve gone over that many instances earlier than. See references [4] and [8], or use one in every of my open-source libraries to run the calculations for your self,

Steve Hageman has been a confirmed “Analog-Loopy” since in regards to the fifth grade. He has had the pleasure of designing op-amps, switched-mode energy provides, gigahertz-sampling oscilloscopes, Lock In Amplifiers, Radio Receivers, RF Circuits to 50 GHz and take a look at tools for digital wi-fi merchandise. Steve is aware of that every one fashionable designs can’t be completed with Rs, Ls, and Cs, so he dabbles with programming PCs and embedded programs simply sufficient to get the job completed.

Associated Content material




RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

16 + fourteen =

Most Popular

Recent Comments