Saturday, July 16, 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 possibly can 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 checks that the ADC is mainly functioning correctly, however that the sign processing code is mainly working correctly as properly. Through the years, I’ve seen a good quantity of improperly functioning code that was blamed on the ADC being “unhealthy”.

What To Measure

Figuring out a helpful analog-to-digital converter (ADC) metric that quite a lot of folks with various technical backgrounds can simply use and perceive is without doubt one of the objectives of the BlasterAmp mission 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 will be 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 foremost purpose anyway – to have some minimal variety of bits of their sign processing.

I’m positive that everybody has seen the traditional 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 excellent N-bit ADC. By straightforward extension, you possibly can 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 rapidly. 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 very best case calculation, and a few random spurious indicators are thrown in for good measure.

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

This then requires a special 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 part Else) (Eq.3)

To make issues much more complicated the ADC folks 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 Exhausting 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 ample factors after which curve becoming an ideal sine-wave to the measured information. The distinction between the true ADC information and the proper sine wave can 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 principally requires a variable frequency supply that may be added to no matter sampling charge was getting used to get a ample variety of factors to faithfully symbolize a sine wave.

That is one thing that the BlasterAmp isn’t designed to do, as it could solely produce audio vary indicators, making the purpose about digitizing sufficient of a waveform considerably problematic when you’ve gotten just one variable to regulate, i.e., the sampling charge.

In the present day 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 flooring that you simply see shall be completely different relying on what number of samples within the FT you’ve gotten taken. That is known as processing achieve and is a results of the noise spectral density being the identical, however once you enhance 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 achieve lowers the obvious noise flooring 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 (purple hint) within the FT leads to a processing achieve and obvious noise flooring distinction of 20 dB.

The second downside is that noise can’t be measured the identical manner as indicators are after a traditional FT that has a window utilized to the uncooked information. Usually, some window perform 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 isn’t completely coherent with the sampling sign [4]. The window perform provides a achieve or loss time period to the FT that have to be accounted for.

With indicators, that is generally known as the “coherent achieve” and to make issues much more tough, the window provides a special achieve time period for noise evaluation that’s generally known as the “incoherent achieve”. 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, you might want to be utilizing a special window correction issue [5].

You’ll have run throughout this in the event you use a Spectrum Analyzer and need to measure noise. Most Spectrum Analyzers have a “Noise Marker” perform that offers 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 indicators and noise in another way, with a contemporary FT-based spectrum analyzer, a special correction is required due to the window perform that must be added to the ADC information earlier than the FT. I’ve discovered that many on-line tutorials miss this essential distinction and therefore should not calculating their FT noise correctly.

Keep in mind all we needed 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 in addition on completely different FT scale elements that have to be utilized to correctly measure noise and indicators… Like at all times, we find yourself with this rabbit gap of complicated phrases, completely different definition of phrases, and calculation steps which are many instances not mentioned. Is nothing straightforward anymore?

The Easy Route

I didn’t need to write 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} gadgets.

Analog Units has an fascinating evaluation program known as VisualAnalog [6]. It’s fascinating as a result of it could work with precise {hardware} or act as a considerably general-purpose DSP simulator. VisualAnalog is a drag-and-drop, block-based GUI that with just some 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 varied bit depths, additive noise, and spurious indicators. Since my Python simulation began with recognized, but separate sign, noise and distortion merchandise, I used to be in a position to 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 have 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 indicators as noise. Only a few real-world ADC’s have giant quantities of non-harmonic spurs, however it’s one thing to control.

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 beneath varied sampling charges. I present the assorted 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 can 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 flooring is drastically completely different trying in every plot, welcome to the true world!

Taking a look at Determine 3a, you may surprise if the “spike” sort of indicators within the noise flooring are spurious indicators, 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 flooring associated and should not discrete spurs.

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

That is an illustration of the issue of measuring SINAD correctly. A choice 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. Because the 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. Because the bin width is a continuing 1 Hz for every run in Determine 3, the size elements are the identical for all of the runs.

We are able to 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 part and vice versa. Each misidentified part could possibly be added to the ultimate outcome with a 3 dB error. The impact this has in your closing outcome will rely on the amplitude and variety of parts misidentified.

The error could possibly be a lot worse, nevertheless. For example, if the pattern charge was 1 MSPS and the FT measurement was 32,000 factors, then the window scale issue distinction between sign and noise can be on the order of 18 dB as an alternative of three dB. Typically, 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 leads to 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 tough to check 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 simple to make use of and perceive time period for audiences of quite a lot of technical backgrounds, because it immediately pertains to the decision of any digitized level, and it forgoes any point out of dB which confuses quite a lot 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:

  • It is very important measure your ADCs, particularly ones embedded in different ICs.
  • It is very important discover some evaluation algorithm that’s dependable and to keep it up, as each piece of study software program offers you completely different outcomes.
  • Preserve it straightforward 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, Could 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 strategies,

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

[6] Analog Units, 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/foremost/VisualAnalog

[8] G. Heinzel, A. Rudiger, and R. Schilling, “Spectrum and spectral density estimation by the Discrete Fourier rework (DFT), together with a complete listing of window features 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 certainly one of my open-source libraries to run the calculations for your self,

Steve Hageman has been a confirmed “Analog-Loopy” since concerning 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 gear for digital wi-fi merchandise. Steve is aware of that every one fashionable designs can’t be performed with Rs, Ls, and Cs, so he dabbles with programming PCs and embedded methods simply sufficient to get the job performed.

Associated Content material




RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments