Measuring DAC Accuracy

Discussion in 'Source Measurements' started by purr1n, Mar 30, 2017.

  1. purr1n

    purr1n Finding his inner redneck

    Staff Member Friend BWC
    Joined:
    Sep 24, 2015
    Likes Received:
    64,224
    Dislikes Received:
    108
    Trophy Points:
    113
    Location:
    Antarctica
    Hahahahaha. I had this idea on measuring accuracy. Do this at a slower frequency. This way we can see the steps clearer. 200Hz. Again -72db. 16 steps. For a 16 bit ladder, this means bits 12,13,14, and 15 (with 0 as the first bit).

    AGD Singularity 19
    Singularity 2 triangle -72db 200.png

    Modi 2 (SD)
    Modi 2 triangle -72db 200.png

    Modi Multibit (Modi Multibit)
    Mimby triangle -72db 200.png

    Comments:
    1. The S19 steps are all over the place. Some steps are slightly larger than others, some smaller. There is a lot of noise or small glitches. Note that the differences in gap size are consistent on each wave, as would be expected with a ladder DAC.
    2. Modi Multibit seems to have the most consistent steps and best triangle shape. However, there is a glitch at zero crossing. Maybe something to do with flipping 1111111111111111 to 0000000000000000. The worse case scenario because all bits are being flipped at once. I think it's funny John Atkinson of Stereophile thinks the similar zero crossing glitches on the Yggdrasil is the result of using 20bit chips instead of 24 bit. I could be wrong here in what I am thinking, but JA is most certainly wrong. Number of bits was nothing do with with the zero crossing glitch. It's obvious John Atkinson is too obsessed with DACs needing to be 24 bit.
    3. There is a little bit of bowing on the triangle wave with the Modi 2 4490. S19 has his bowing too, but it's lesser and harder to see.
    4. I am surprised that the Modi 2 SD DAC is less accurate than the pure 16 bit Analog Devices part. Looks like @baldr wasn't full of shit after all. One easy way to tell is the up-wave isn't symmetric with the down-wave on the Modi 2 SD. Also, after each peak, the first few steps seem stretched out in the Y-axis, and the last few get squished in just before the peak. I wonder: is the SD wave less accurate because of the digital filter math approximations, or because SD conversion, at least for this chip, is less accurate? Or both?
     
    Last edited: Mar 31, 2017
    Cspirou, bengo, NekoAudio and 30 others like this.
  2. landroni

    landroni Friend

    Friend
    Joined:
    Aug 12, 2016
    Likes Received:
    1,294
    Dislikes Received:
    8
    Trophy Points:
    93
    Hmm, is this the infamous Moffat zero cross-over "glitch"?
     
    Steakface and GoodEnoughGear like this.
  3. kn19h7

    kn19h7 Rando

    Joined:
    Sep 27, 2015
    Likes Received:
    19
    Dislikes Received:
    0
    Trophy Points:
    3
    Location:
    Singapore
    Is the Modi2 running a minimum phase filter? Could that be related to the bowing?
     
  4. purr1n

    purr1n Finding his inner redneck

    Staff Member Friend BWC
    Joined:
    Sep 24, 2015
    Likes Received:
    64,224
    Dislikes Received:
    108
    Trophy Points:
    113
    Location:
    Antarctica
    I am pretty sure the Modi 2 is linear phase.
     
    Psalmanazar likes this.
  5. purr1n

    purr1n Finding his inner redneck

    Staff Member Friend BWC
    Joined:
    Sep 24, 2015
    Likes Received:
    64,224
    Dislikes Received:
    108
    Trophy Points:
    113
    Location:
    Antarctica
    Something like that, at least for the bit to bit accuracy in smaller segments. A more serious potential issue is a series of bad flips of the coil, where the errors pile on top of another. Think of an INL plot that sort of runs away, increasing upwards as we go up in codes, or even worse, an an INL decreasing downwards wildly, (non-monotonic!) Trimming just a few key bits would nip these scenarios in the bud.

    Related to this idea is how the AD5791 (used in Yggdrasil) manages errors in the MSBs, which can totally throw things off because of the larger influence of these bits. The AD5791 uses a string of resistors for its 6 MSBs to guarantee monotonicity (analog output always goes up as code word increases). Even if resistors are off a little bit, output points on a long string of resistors will never go backwards in value. This can't be said for ladders. The problem with string architectures is that we will need 2^n resistor segments for a n-bit DAC, so this implementation is not viable past a certain number of bits.

    Finally, as I mentioned before, there is always the brute-force method, i.e. TotalDAC, where they line up a dozen of these modules (already using precision parts) to average out the errors to get more accuracy.

    LOL. Yes. The more I think about, the more I am convinced it is glitch from the bits flipping. An experiment could be run where we go from 0 to 31 or 62 to 1 (both flipping 5 bits) to see if there is a more overshoot on the step. I was actually thinking about ways to correct this last night in software. Could do something similar to dithering to fuzzy up the transition from 0 to -1 or -1 to 0. There certainly is enough room (samples points) to do this with 44.1kHz content, which is internally upscaled x8. And it only needs to be done for very specific transitions where the glitch happens to be bad.

    Honestly, I'm not sure it's worth it to fix just to appease John Atkinson. I listen to 16 bit recordings, and the glitch isn't even seen on the the -90dbFS undithered 16-bit sine waves in the Stereophile measurements. Haha. Someone should ask the MadamSander guy on CA if he can hear the glitch on 16-bit recordings!

    ---

    The more troubling thing I'm trying to wrap my head around is why the bowing or squaring of the -72db waveforms on the Modi 2 AK4490 and Singularity 19? I'm pretty sure a combination of even and odd order distortion on the FFT represents this. Is this bowing an effect of inaccuracies in digital to analog conversion or distortion in analog circuits?

    I have some data I am pouring through right now. Any ideas reasons or proposed experiments would be appreciated.
     
    Last edited: Mar 31, 2017
  6. ultrabike

    ultrabike Measurbator - Admin

    Staff Member Friend MZR
    Joined:
    Sep 25, 2015
    Likes Received:
    9,270
    Dislikes Received:
    18
    Trophy Points:
    113
    Location:
    Irvine CA
    The rounded, RC constant like, behavior in the SD and Singularity 19 solutions may be due to a tighter DAC reconstruction filter BW relative to the approach with the Analog Devices DAC one. Perhaps it's more rounded as well. The filter used in the Analog Devices solution is fairly large with a very sharp cut-off. Perhaps the fact that the other solutions do not use a crazy FIR like the Burrito Supreme is the cause of their more rounded performance.

    I don't think JA blames the glitch to the number of bits though. I think he feels the glitches are due to the choice of DAC regardless of bit-width. And indeed, it may be due to bits flipping. What I think JA blames on 24-bit to 20-bit conversion w/o dithering is noise floor issues ("...the noise floor looks much more ragged than I usually see." Or what he considers noise floor issues.
     
    Clemmaster and bazelio like this.
  7. purr1n

    purr1n Finding his inner redneck

    Staff Member Friend BWC
    Joined:
    Sep 24, 2015
    Likes Received:
    64,224
    Dislikes Received:
    108
    Trophy Points:
    113
    Location:
    Antarctica
    With undithered 24-bit data at the same level (fig.7), although the overall shape of the reconstructed sinewave is good, you can see significant errors at the signal's zero-crossing points. Again, this will be due to the design choice to use 20-bit converters.

    He didn't say this will be due to the design choice to use these specific Analog Devices converters.
     
    Psalmanazar and ultrabike like this.
  8. ultrabike

    ultrabike Measurbator - Admin

    Staff Member Friend MZR
    Joined:
    Sep 25, 2015
    Likes Received:
    9,270
    Dislikes Received:
    18
    Trophy Points:
    113
    Location:
    Irvine CA
    That is misleading indeed.

    I was reading this:

    The noise floor with 16-bit data (cyan and magenta traces) is actually the dither noise used to encode the data. However, with 24-bit data (blue, red), while the noise floor lies at or below –160dBFS, a regular series of distortion components can be seen, in which the third, fifth, seventh, or ninth harmonics are highest in level. This will be due to the Yggdrasil's use of 20-bit D/A converters; the bottom four bits with 24-bit data will be truncated.

    And I understood by that that he was blaming the distortion components below the 16-bit noise floor to truncation when going from 24-bit to 20-bit. Which may not sound that unreasonable.

    However, I agree with you about that statement. He should have been better off using the Analog Devices converter statement.
     
    Last edited: Mar 31, 2017
  9. Hands

    Hands Overzealous Auto Flusher - Measurbator

    Staff Member Friend MZR
    Joined:
    Sep 27, 2015
    Likes Received:
    11,051
    Dislikes Received:
    39
    Trophy Points:
    113
    Location:
    Colorado
    Home Page:
    The S19 results look as messy and ragged as the DAC sounds! :) LOL
     
  10. Priidik

    Priidik Friend

    Friend BWC
    Joined:
    Sep 27, 2015
    Likes Received:
    1,652
    Dislikes Received:
    3
    Trophy Points:
    93
    Location:
    Estonia
    Can you elaborate on the signal waveform a bit more? Is it supposed to be triangular ?
     
  11. bazelio

    bazelio Friend

    Friend
    Joined:
    Nov 16, 2015
    Likes Received:
    3,451
    Dislikes Received:
    160
    Trophy Points:
    113
    Yeah, agreed. He worded it poorly but I'm sure he's criticizing the device's major carry glitch impulse behavior. TBH though, Marv's measurements make me want to see the Vdd waveform at the transition too... It looks like there may be more than one problem?
     
    Last edited: Apr 1, 2017
  12. purr1n

    purr1n Finding his inner redneck

    Staff Member Friend BWC
    Joined:
    Sep 24, 2015
    Likes Received:
    64,224
    Dislikes Received:
    108
    Trophy Points:
    113
    Location:
    Antarctica
    LOL. I don't give him that much credit considering that the dude kept harping on the insufficiency of 20 bits throughout his commentary.

    Even his conclusion that the odd order harmonics on the 24 bit output was because the converter was 20 bits seems suspect without further evidence or elaboration.

    It's like in his myopic view, he wanted to find 20 bits as the fault for everything and anything. At least that was the jist of it.
     
  13. bazelio

    bazelio Friend

    Friend
    Joined:
    Nov 16, 2015
    Likes Received:
    3,451
    Dislikes Received:
    160
    Trophy Points:
    113
    Maybe the old man has gone senile. It's like he had all these technical concepts floating around in his skull, and was on to something in some cases, flat out wrong in others, and merged/interleaved them in ways that made no sense. Pretty shitty.
     
  14. ultrabike

    ultrabike Measurbator - Admin

    Staff Member Friend MZR
    Joined:
    Sep 25, 2015
    Likes Received:
    9,270
    Dislikes Received:
    18
    Trophy Points:
    113
    Location:
    Irvine CA
    After some thought and a small Octave simulation, I'm fairly confident the issue with the bowing has nothing to do with delta sigma. I've used delta sigma producing signal in the fractions of a Hz with high accuracy.

    I believe that what is going on with the Modi 2 and the AGD is that there is a DC blocking high pass filter in the chain. Either digital or analog. Those would likely be IIR (not linear phase).

    Here is a simulation showing what happens to a stepped triangular 200 Hz periodic signal sampled at 192 kHz and going through a 48 kHz low pass filter, and then through a 10 Hz DC blocking IIR Butterworth with a corner frequency at 10 Hz:

    Triangles.jpg

    The bowing is due to the 10 Hz DC blocking IIR filter.

    Likely the Modi Multibit does not have such DC blocking IIR filter or equivalent.
     
    Last edited: Apr 1, 2017
  15. Scott Kramer

    Scott Kramer Friend

    Friend
    Joined:
    May 3, 2016
    Likes Received:
    1,259
    Dislikes Received:
    3
    Trophy Points:
    93
    Wonder if there's an i2s out header on the AGD S19 board somewhere... might be interesting to route that through the i2s Moby and do this same measurement. @Hands "pyramids" in the jitter measurements looked really bad! Maybe this masks what's going on with their r2r modules... for better or worse. Also an i2s in *after* the digital interfaces/clocks, and re-measure the Dac.

    Of course only worth it if we plan on using this as the sample/sacrificial "bad sounding dac" to really zero in on measurements and what causes problems. Does it seem unclear as to if it's coming from the digital interface or r2r?

    Big guess... I have 0 experience with audio-gd!

    @Marvey, really like this measurement you came up with!
     
    Last edited: Apr 5, 2017
  16. purr1n

    purr1n Finding his inner redneck

    Staff Member Friend BWC
    Joined:
    Sep 24, 2015
    Likes Received:
    64,224
    Dislikes Received:
    108
    Trophy Points:
    113
    Location:
    Antarctica
    Could a DC servo be responsible for this? The servo is basically feedback of the a lowpass.
     
    bengo likes this.
  17. ultrabike

    ultrabike Measurbator - Admin

    Staff Member Friend MZR
    Joined:
    Sep 25, 2015
    Likes Received:
    9,270
    Dislikes Received:
    18
    Trophy Points:
    113
    Location:
    Irvine CA
    I don't think the Moby DAC supports I2S, because the AD5547 appears to use a parallel interface. But I could be wrong.

    Here is some discussion about glitches in precision DACs:
    https://e2e.ti.com/blogs_/b/analogwire/archive/2013/06/14/what-s-with-all-this-glitch-ing

    Possible. A servo in many audio applications is a high pass filter actually, and it may not be a linear phase one at all. Also, one of the main characteristics of an IIR filter is that it has feedback. An FIR does not have feedback.

    The advantage of an IIR is that one can achieve very narrow and nice results (in magnitude) with very few taps, at the expense of linear phase.
     
    Scott Kramer likes this.
  18. ultrabike

    ultrabike Measurbator - Admin

    Staff Member Friend MZR
    Joined:
    Sep 25, 2015
    Likes Received:
    9,270
    Dislikes Received:
    18
    Trophy Points:
    113
    Location:
    Irvine CA
    In a servo for audio applications, one may actively low pass the output signal and feed it back to the inverting input (assuming the signal is going to a non-inverting input) of another op-amp in the signal path, effectively making an active high pass filter w/o the need of large caps (because of the high impedance of the active low pass).

    Most of what I've seen as servos look like IIRs to me with feedback, because they seem to have poles. A simple one pole RC filter, highpass or lowpass, active or passive, has feedback because it has a pole.

    A FIR only has zeros. An IIR has any number of zeros, and at least one pole.

    I don't recall any IIR architecture with exactly linear phase. The closest is a Bessel filter, which is nice with the phase, but very crappy in the cut off and stop band rejection. Definitively the anti-brick-wall filter.
     
    Last edited: Apr 2, 2017
  19. purr1n

    purr1n Finding his inner redneck

    Staff Member Friend BWC
    Joined:
    Sep 24, 2015
    Likes Received:
    64,224
    Dislikes Received:
    108
    Trophy Points:
    113
    Location:
    Antarctica
    I like the lower frequency approach because it shows the flat of the steps better. I doubt there is any way to reverse the effect (find an inverse function) in the measurement other than guessing via an iterative algorithm until a true triangle appears. Might just be easier to use a higher frequency with higher sampling rate to get a similar visualization.

    I am curious if the INLs for each wave would develop an identifiable pattern to establish some sort of INL plot. It appears so from the limited data, but I would feel more comfortable after I analyze a couple hundred waves to confirm the errors are not totally random, and are according to some sort of INL. I don't expect perfect numbers given the random nature of some things in the universe.
     
  20. ultrabike

    ultrabike Measurbator - Admin

    Staff Member Friend MZR
    Joined:
    Sep 25, 2015
    Likes Received:
    9,270
    Dislikes Received:
    18
    Trophy Points:
    113
    Location:
    Irvine CA
    I think you would get stellar INL numbers with DS, if it wasn't for that IIR deal there.

    That IIR deal might actually be external to the AK4490. But not sure.

    As far as removing the effects of the IIR. It might be possible to reduce the effects somewhat actually if there is sufficient SNR. Send me a .wav and I may be able to give you an FIR inverse filter to "cure" the bowing deal. That distortion, while called "non-linear phase", is actually linear.
     
    Last edited: Apr 2, 2017

Share This Page