Saturday 29 September 2018

MUSINGS / MEASUREMENTS: A look at Intersample Peaks and Overload Tolerance... (RME ADI-2 Pro FS, TEAC UD-501, Oppo UDP-205)


I suspect that many audiophiles were introduced to the topic of intersample peaks (ISP) when Benchmark first released their DAC2 HGC which advertised and discussed the provision of +3.5dB overhead for digital conversion back in late 2012. Over the years they've discussed this in their blog such as this post that came out to discuss the technical bits of the Sabre DAC and DAC2 in particular.

Remember however that ISPs and the potential for intersample overloading have been discussed in the technical literature for years. For a good review of the topic, have a look at this paper from Nielsen and Lund "Overload in Signal Conversion" presented at the AES Conference in 2003. Because almost all modern DACs utilize oversampling filters, the internal interpolation creates extra "points" between samples. For loud music (common since the late 1990's!) with samples approaching the 0dBFS level if not already clipping, it's likely that many of these intermediate points created will be above 0dBFS. Even in 2003, the paper listed a number of albums and showed that quite a few have "hot spots" where the "true peak amplitude", after going through an interpolator would be above 0dBFS. (A NOS DAC doesn't do digital intersample interpolation but could still overload with analogue filters [as per Mans' comment].)

A simple way to demonstrate what this looks like is to reconstruct the sine wave test signals listed in the paper at 44.1kHz (I used 24-bits, but 16-bits would work). By using even fractions of the samplerate starting at a specific phase, we can create waveforms with predictable interpolated peaks above digital 0dBFS:
fs/4 = 11025Hz with samples at 0dBFS --> +3.01dBFS peaks
fs/6 = 7350Hz with samples at 0dBFS --> +1.25dBFS peaks
fs/8 = 5512.5Hz with samples at 0dBFS --> +0.685dBFS peaks
To visualize this, the fs/4 waveform listed above will look like this when constructed in Adobe Audition...


Basically, because the sample points are all in line at -3.01dBFS when we create a 0dBFS sine wave at the exact fs/4 frequency and starting phase of 45ยบ, we can amplify the signal by +3.01dBFS such that the sample points reach 0dBFS. When the reconstruction filter interpolates the sample points, it would have to "fill in" those points above 0dBFS. Hence the potential for overload conditions in the DAC. Furthermore, even if the digital interpolator were able to recreate points above 0dBFS, there is no guarantee that the analogue output is capable of providing the extra voltage.

So, with the test files in hand, let's have a look at how the RME ADI-2 Pro FS volume turned up to full 0dB handles these signals beyond 0dBFS using the digital oscilloscope ("Sharp" filter setting, TS unbalanced output at +19dBu):

 




As you can see, the RME ADI-2 Pro FS handles the +0.68dB and +1.25dB signals quite well with maintained sine wave peaks appearing rounded as they should. The only time we see an issue is with the +3.01dBFS signal. In fact, for clarity, we can make one of the channels 0dBFS while the other channel the +3.01dBFS sine wave and overlay them to see this:


Using the gain in Vpp, we see that the DAC is capable of giving us about +2.1dB extension. Obviously it's not capable of pushing up to the full +3.01dB level (Vpp for the yellow tracing would be around 28V if it did). As a result, we see a squaring off / clipping of the yellow peaks.

What we can say from this test is that the RME ADI-2 Pro FS's DAC output is capable of handling overload beyond +1.25dBFS but lower than +3.01dBFS. With the "Sharp" filter, the overhead is about +2dBFS overhead.

Remember that when I perform the "Digital Filter Composite" test and showed the result of the "Sharp" filter last week:


The overloading in the form of elevated ultrasonic frequencies we see comparing the "wideband white noise (0dBFS peaks)" with the "(-4dBFS peaks)" is an indication of clipping distortions from intersample overload. This 0dBFS white noise test signal specifically is capable of showing us intersample overloading of the filter up to around +3dBFS.

Looking at a couple of other DACs, I see that the TEAC UD-501 is actually rather poor at handling these intersample overs:


Notice that it has no ability to handle the intersample peaks above 0dBFS at all!

In comparison, the Oppo UDP-205 has no trouble reproducing a +3.01dBFS sinusoidal waveform as suggested by its DFC measurements and as per this oscilloscope output:


To see the effect of the intersample clipping, we can run a FFT which would show us the elevated odd-order harmonics due to the squaring off of the output. Here's what the clipping looks like with the TEAC UD-501 using all 3 of the Nielsen & Lund sine waves with intersample peaks above 0dBFS:


Notice that of the 3 test signals, it is only with the 5512.5Hz signal that the elevated 3rd harmonic is within the audible spectrum (16537.5Hz). The other two signals will have their 3rd harmonic >20kHz and typically inaudible.

Since the RME ADI-2 Pro FS's DAC output only overloads above +2dBFS, if I were to plot the FFT as above, it would only be with the 11025Hz +3.01dBFS signal that we would see the overloading and the effect would be elevated odd order harmonics beginning at 33075Hz - significantly outside the audible spectrum. This is worth thinking about because even if a song contains "intersample overs" that overwhelms the DAC's ability, the induced distortions may actually only affect inaudible frequencies.

While +3.01dBFS is probably a good target to achieve for overhead, note that there is no simple absolute target that will guarantee that intersample overloads do not happen. There are examples of extremely "pathological" samples where one could find intersample peaks extending over +10dBFS! (For further discussion as well, see this page from iZotope.)

In practice, the +3.5dB overhead offered by Benchmark appears to be a good level to use even though this is arbitrary. While I have not systematically studied my music collection, what I have seen indicates that +3.01dBFS overhead (which would tame my 0dBFS wideband noise in the "Digital Filter Composite" graph used to test DACs) appears to be fine for the vast majority of ISPs I have come across.

In this Hydrogen Audio thread, Rescator's test of about 6500 audio tracks (look at the 2nd page and final results), it looks like <1% of ISP's hit above +3dBFS with a collection of quite a bit of modern dynamically compressed music. Remember that this is a count of music tracks with higher ISPs, not an indicator of audibility... Even if a song had an extreme amount of  intersample peaks >0dBFS amounting to 500ms or the time between 20,000 samples at CD resolution throughout a 3-minute song, that still means that 99.7% of the song is unaffected.

Ultimately, I think it's important to remember that what we're talking about here is mostly academic. One expects that a well mastered piece of music really should have a low enough average amplitude and relatively few ~0dBFS digital peaks such that the potential for intersample overloading is vanishingly low. And conversely, one expects that any album that frequently hits the peak level and goes into overload conditions is purposely threatening to trigger clipping if not already inherently distorted in all kinds of ways even before the signal has reached one's DAC. Not unexpectedly (touched upon here, here, here), almost all the recordings running the risk of significant intersample overloading are dynamic range compressed and "loudness war" affected tracks which should have been better recorded/mixed/mastered. There are already many tools available to audio engineers to measure and limit true peak amplitude in their recordings including DIGICheck for those using the RME products - there is no excuse.

My feeling is that while tests can show the potential for overload distortions, and as a perfectionistic audiophile, it would be nice to one day see that most DACs are able to protect against this; I'm certainly not suggesting that the distortion is audible much of the time (I guess anything can be audible if severe enough). Furthermore, while one could look for the amount of intersample overhead in the specifications when looking for a new DAC, I'm not suggesting anyone needs to upgrade the hardware if "suddenly" you find that your DAC can't handle intersample peaks like the TEAC UD-501!

There are ways to mitigate the effect of intersample overloading quite easily... For the RME ADI-2 Pro FS, simply turn down the volume by 1 or 2 dB's will do the trick with those +3dBFS peaks! Remember that the ADI-2 Pro has a +24dBu balanced output level (and +19dBu unbalanced) which is high for home use, so reducing this is rather normal and one would not hear any loss in sound quality with the attenuation. Or if your DAC doesn't have a good volume control, maybe try using your own oversampling with -3.01dB applied (similar to my discussion here where I put in a 4dB attenuation to the "Goldilocks" filter) and ReplayGain scanning and volume reduction likely will also do the trick to tame all that loud music.

As usual, be rational with the facts on hand... In many ways, this issue is like "ringing" with digital filters on one's DAC. Yes, with linear phase filters, once awhile, potentially objectionable pre-ringing might show up with suboptimal music productions. Yeah, we can do something to significantly reduce it (minimum phase or intermediate phase settings), but even if you don't, it's not really a big deal to begin with and only the most anxious, neurotic audiophiles need be emotionally perturbed IMO! :-)

Amazingly, it's the 30th anniversary of Cowboy Junkies' Trinity Sessions this year! My how time flies. Was listening to the album this past week working on this post.

Have a great week ahead and enjoy the music, everyone...

Next time, we finish off our look at the RME ADI-2 Pro FS's DAC performance!

------------------------------

Addendum:
I was curious, since the Oppo UDP-205 has the ability to handle +3.01dBFS overhead, what is the limit that it could potentially deal with?

So far, while I have been using the 3 test tones documented in the Nielsen & Lund paper above, it's not hard to create an extreme intersample peak signal when passed through typical sinc interpolation. For example, with a little waveform editing, we can create this "beauty" (notice that the frequencies on either side of the high ISP are ~22kHz):


Depending on the digital filter settings, there is the potential for the ISP to be up +8dBFS (I've called this the ">6dBFS sample"). Of course we hope not to see this kind of waveform in actual music but using something like this, we can examine the maximum voltage that a DAC can pump out.

Here's what the Oppo UDP-205 produced running the signal above through its "linear phase slow" filter (the "fast" filter attenuated too much of the high frequencies and did not result in the intended ISP):



Notice that the voltage peak is up at 4.65V. Compared to the 0dBFS sine wave at 3.07V peak, this is a +3.6dB gain. Allowing for a little overshoot, my belief then is that the Oppo UDP-205 can handle peaks up to +3.5dBFS like with the Benchmark DACs.

To double check, I also ran the signal through the RME ADI-2 Pro FS:


Yup, we're still seeing just above +2dBFS overhead for the RME ADI-2 Pro FS.

And here's the TEAC UD-501 for completeness - minimal ability to handle beyond 0dBFS:


Final "score" for ISP overhead:
TEAC UD-501 - 0dBFS
RME ADI-2 Pro FS - +2.1dBFS
Oppo UDP-205 - +3.5dBFS
The test is easy enough to do, so will probably incorporate it into future DAC measurements.

-------------------------------------------

Speaking of NOS in the comments...

Here's the TEAC UD-501 with digital filter off playing the fs/4 signal with 0dBFS & +3.01dBFS "sine":


Of course the TEAC is using a modern TI/BB PCM1795 DAC inside. So how about "old skool" NOS? Here's my old Muse Mini TDA1543 (old 1991 multibit Philips DAC) with 4 chips in parallel using the TI DIR9001 S/PDIF receiver (circa 2006):


Fed from TosLink using my Raspberry Pi 3 B+ running piCorePlayer:


Hmmm, not exactly an accurate +3dB between the channels... But looks about what I expected.

18 comments:

  1. Thank you very much for doing this test, Archi! I am happy that you could confirm RME's ISP headroom claim. Also showing the max headroom with an oscilloscope this way is so easy and logical - why did no one else had that idea before?

    Will you provide a download link for that nice +8 dBFS signal?

    ReplyDelete
    Replies
    1. Happy to share Techland... Here's the Amazon Drive link:

      https://www.amazon.ca/clouddrive/share/PIlwGoK43pND87lF8ftVNZBCTZ0u4BMg1iZ4CG4HtYx

      Short signal; I just put it on repeat of course...

      Delete
    2. Just to add to this, here's the 11025Hz (fs/4) +3.01dBFS Intersample Peak test file where one channel (left) is at 0dBFS and the other is +3.01dBFS:

      https://www.amazon.ca/clouddrive/share/jVsVVT5rMOX6Un7N0St4GU8byukpDUB5Yh872BYMMiw

      The reason I'm sharing this one as well is because this is much more consistent to use than the +8dBFS one above.

      As you can see in my blog text, in order to find the peak level for the Oppo UDP-205, I had to switch to the "Linear Phase Slow" filter because the "Linear Phase Fast" setting attenuated the high frequencies near Nyquist too much and didn't allow the +8dBFS peak to be "propelled" that high. As such, the extreme +8dBFS test file is highly dependent on your device and the digital filter you have set.

      On the other hand, at just around 11kHz, the +3.01dBFS test sample will be much more consistent. If you want to run these tests, I recommend starting with the +3.01dBFS signal first and see if your DAC can handle that. If it clips below +3.01dBFS, you've got your answer. If it however passes the +3dBFS level, like the Oppo UDP-205, then try out the +8dBFS signal and see just how high the device can go.

      *** Disclaimer: Remember these are test files that go beyond 0dBFS on your DAC and highly likely will result in signal clipping. DO NOT LISTEN TO THEM! DO NOT HAVE YOUR AMPLIFIER BLASTING THIS THROUGH YOUR SPEAKERS! HIGH LIKELIHOOD OF DAMAGING TWEETERS. You have been warned! ***

      Delete
  2. Great writeup as usual, Archimago. Thank you. As an audio engineer (especially dealing with classical and opera), intersample peaks are something I carefully avoid.
    Coincidentally, I read this article from Ian Shepherd (a mastering engineer who is concerned with loudness and dynamic range) this morning. http://productionadvice.co.uk/spotify-upload-true-peak/
    In my experience, a well-configured lossy codec does not greatly increase max dBTP (within 0.5dB) but if uploading to a service, you can't be too sure.
    Regardless, we use a light touch with a transparent mastering limiter and don't exceed -1dBTP. This does not sacrifice any appreciable loudness while giving plenty of room for dithering and lossy conversion.
    As you said, this becomes largely academic when you attenuate prior to playback. I gladly embraced the r128 volume leveling in JRiver Media Center and later Roon. I also use the "Low" volume level in my Spotify settings so dynamic range is preserved with the tradeoff of a lower output level. https://support.spotify.com/us/using_spotify/system_settings/high-quality-streaming/

    The true loudness control these days is the volume button or knob on playback. Still, it is good to see these measurements and understand exactly where things start to break up. Thanks as always, and now that I have an account I'll be sure to comment more.

    ReplyDelete
    Replies
    1. Thanks for the note Simon and for the Ian Shepherd link!

      Good to see some standards being put in place on services like Spotify. All the best...

      Delete
  3. Nice testing, but you're wrong about NOS DACs. They use an analogue filter, and this too can overload.

    ReplyDelete
    Replies
    1. Thanks for the feedback Mans. Good to know; not sure I'm run into this over the years... Will modify that line.

      Delete
    2. Consider how a NOS DAC handles your fs/4 sine wave.

      Delete
    3. Okay. I'll have a peek with the TEAC...

      Delete
    4. Hey Mans,
      The TEAC UD-501 does have a digital filter defeat mode similar to the RME with "NOS" filter setting.

      I can dig up my old NOS TDA1543 DAC and see if that guy still works...

      Delete
    5. The UD-501 uses the PCM1795 DAC chip. In filter bypass mode, the sigma-delta stage runs at the usual rate using zero-order hold oversampling from whatever input rate is supplied. With the fs/4 test tone, the analogue output from the chip will resemble a square wave. If a fixed analogue filter is used, its cutoff is probably chosen for normal 8x oversampling operation, i.e. somewhere in the 200 kHz vicinity. With a 12 kHz square wave input, even the 13th harmonic will be unaffected. The 15th and higher harmonics are probably not strong enough to cause clipping in the filter. The final output will simply be a slightly less square waveform. While still horribly distorted compared to the desired sine wave, filter overload is not the cause. The same thing will happen with any NOS DAC designed to operate at a high rate.

      To see clipping in the analogue filter, you need to use a NOS DAC designed for 44.1/48 kHz operation. These are rare, and for good reason. Very old Sony CD players are just about the only ones.

      Delete
    6. Nice Mans,
      Thanks for the background. Will have to revisit this one day if I get my hands on one of these old Sony CD players to have a look...

      Delete
  4. Thank you, excellent article. Roon has a headroom management option that applies -3dB to the digital data. This probably helps fix this issue for any DAC you care to use with Roon.

    ReplyDelete
  5. Hi Archie
    Great. Thumbs Up.
    Juergen

    ReplyDelete
  6. The very core of this intersample peak issue is some audiophiles believe in the so-called "bit-perfect" operation and they are unwilling to change volume digitally by using software volume control, ReplayGain or other headroom management systems. It doesn't make sense since the ultimate target of the whole D/A process is "A"-- analog has no bits. On the other hand it is perfectly sensible to adjust the bits to obtain the optimal analog signal.

    My opinions and approach are further described in the posts below:
    https://audiosciencereview.com/forum/index.php?threads/invitation-audible-intersample-clipping-test.2231/
    https://audiosciencereview.com/forum/index.php?threads/intersample-over-test.3730/post-89453

    Also, almost all modern lossy codecs are working in floating point so they are very likely to have non-intersample 0dBFS+ values after conversion and I would say all lossy codecs listening tests without considering this issue can produce invalid results.
    https://forum.cockos.com/showthread.php?p=2001665#post2001665

    ReplyDelete
  7. Thanks for this article. Especially with common DACs (in phones, or amplifiers like WM8718) reducing volume by 1-3 dB before upsampling/sending to the DAC helps, since a lot of them do not have guard for intersample peaks. With todays often already very loud 16/44.1 masterings, the results can be better. Of course when applying universally, it will reduce a volume of the playback in general, but 1-3 dB probably will not harm the resolution (bit depth) that much.
    The other alternative is to use offline resampler and guard for clipping when upsampling to 176.4/192 kHz.

    ReplyDelete
  8. Interesting reviews.

    I am planing to get RME ADI-2 DAC, and I have a question:

    I am planning to use it as a amp/dac for my headphones. It will be enough to lower the volume directly from the knob or I have to do other steps? Sorry I do not have any knowledge with RME or it's software or hardware. (In order to have better overload tolerance)

    Thanks,
    Daniel

    ReplyDelete