Wednesday, 5 June 2013

MEASUREMENTS: Digital Filters and Impulse Response... (TEAC UD-501)

By now, I suspect that most of us have read reviews and comments about the different types of digital filters available in many of the modern DAC's these days. A number of years ago - 2006 to be precise - I remember reading in Stereophile about these filter types and first saw the impulse response graphs in this article by Keith Howard. At that time, I remember being perplexed by all the variation of filter types possible but remembered how "cool" it seemed that here is another factor beyond jitter which may differentiate the "digital sound" from analogue... Furthermore, those graphs looked a little scary - Wow! Look at all that ringing!

Skip forward a few years and we see the introduction of new DAC's with various filter options available. I remember taking notice with the introduction of the Meridian 808.2 around 2009 with their "apodizing", minimal phase filter. In time, folks on forums would talk about how detrimental the whole "pre-ringing" would be with various manufacturers following the minimum phase filter design as selling points. Of course, in life, almost nothing is that simple; as if simply getting rid of one "issue" (like pre-ringing) would lead to joy and happiness without some price to pay. In terms of filter types, the price to pay includes a combination of early frequency roll-off and potential aliasing products.

As I have shown previously, the TEAC UD-501 has interesting properties including 2 digital filters based on the Burr-Brown/TI PCM1795 (SHARP and SLOW), as well as an OFF mode which results in removal of the oversampling filter and hence a "NOS" mode of operation. Today, let us have a look at the impulse response graphs, and consider issues like aliasing...  I even found another little surprise from this DAC!

First consider the sine wave frequency roll-off I previously found - this is why NOS DAC's sound a bit rolled off on the top end:

I. SHARP (Linear Phase) filter.

Let us start with the SHARP filter because this is the standard filter implemented in most DACs where you do not have a choice of settings. As you can see from the frequency graph above, this looks like the "classic" brick wall, and as you have no doubt seen, the impulse graph looks "classic" as well:

I played back a 16/44 "impulse" file and "recorded" it with my E-MU 0404USB at 24/192 to obtain that image above from Adobe Audition if you're wondering. Notice the positive deviation (up) which correlates with the phase of the impulse file therefore the TEAC maintained absolute phase. This is the standard "linear phase" filter with moderate amounts of pre and post-ringing. Here are graphs using white-noise to demonstrate the steep filter roll-off around the Nyquist frequency.

16/44 - White noise:

24/96 - White noise:

And here is what a 19kHz -10dB sine wave looks like with this filter measured up to ~100kHz (similar to John Atkinson's recent measurement changes in Stereophile which he discussed in the April 2013 issue, page 180):

We see a number of harmonics present with the largest being up at 38kHz (-90dB amplitude so obviously inaudible) representing one octave above the primary signal at 19kHz.

Although there is pre-ringing in the impulse response - hence lower temporal resolution, the good thing about the linear phase filter is that audible phase distortions are minimized. Also linear filters tend to measure very well compared to other implementations mainly because of the high frequency resolution which is what we usually look at with our FFT measures like frequency response, intermodulation distortion measurements, etc.

II. SLOW (Linear Phase) filter.

Next, let us consider the SLOW filter with a more gradual and earlier top end roll-off. I believe in some circles, the term "apodizing" may be used to refer to these filters although other places seem to also associate this term with minimal phase filters - if there's a simple consensus definition of "apodizing" as it refers to digital audio, please help clarify this for me. Here's the impulse response:

Nice...  It's still a symmetrical profile so it's a linear phase filter with low phase distortion. The (supposedly bad) pre-ringing is significantly reduced, hence better temporal characteristics, but here's the price one pays:

16/44 - White noise:

24/96 - White noise:

Notice that in both graphs, the roll-off doesn't hit the noise floor until well beyond the Nyquist frequency; we're looking at close to 35kHz for 16/44 and almost 75kHz with 24/96! No doubt this will result in aliasing distortions (the 19kHz -10dB graph):

There you go. Notice that high amplitude 25kHz aliasing distortion showing up now almost up to the level of the 19kHz primary.

So, basically we see a compromise with the SLOW filter...  Allow more aliasing, but also significantly decreasing the duration of the pre-ringing in the impulse response plot.

III. Digital filter OFF ("NOS").

The last of the TEAC UD-501 standard settings is of course with the digital filter OFF - the "NOS mode".

Impulse response:

Wow... No pre-ringing. It's essentially a square wave representing the duration of a single 16/44 sample. But in order to achieve this of course, the price to pay is tremendous:

16/44 - White noise:

24/96 - White noise:

Without any filtering, all the aliasing distortions get through. NOS DACs are said to sound "dirty" for this reason although of course many folks subjectively find the sound pleasing. Behold the 19kHz -10dB signal and all the aliasing and harmonics that gets through:

"Impressive"... Again, the price to pay for essentially having "perfect" impulse response with zero pre- or post-ringing. I would say that these effects are the most audible. So for those folks who really advocate for the "NOS sound", I guess it just means they prefer noisy, inaccurate reproduction with numerous harmonics and aliasing distortions. (I would love to see how these graphs look like on those expensive Audio Note NOS DAC's!)

IV. Minimal Phase filter!

Surprise! The TEAC UD-501 also has a minimal phase filter mode. This one is implemented by the 24/192 upsampling setting coupled with the digital filter turned OFF. Here's the impulse response:

As you can see, with a minimal phase filter, pre-ringing is not an issue. However, all that "energy" has been shifted into post-ringing. In fact, given the long ripple trail (about 4ms compared to SHARP filter 0.8ms start to finish of impulse), the absolute temporal resolution is the worst with this filter. However, since many believe that post-ringing is more "natural" and furthermore masked by the primary signal, its presence isn't particularly problematic (according to them). Here's the rest of the graphs:

16/44 - White noise:

24/96 - White noise:

Using an onboard ASRC chip, the upsampling algorithm does a excellent job achieving a sharp frequency roll off to prevent signals going beyond Nyquist.

Here's the 19kHz -10dB signal:

Very nice - even cleaner than the SHARP filter (as one would predict given the lower temporal resolution). Some harmonics present but no aliasing distortion.

What's the price to pay for minimal phase filters? The post-ringing duration is quite long in this implementation. Also, given the non-linear characteristic, there may be audible phase distortion.

V. So what?

Yup... Now you know what the graphs look like and the options available on the TEAC DAC (and of course variants of these filters with other DACs)...

So what?

Objectively, I think it can be said that the fact that NOS DAC's don't just plain sound awful really speaks to just how forgiving our ears are!

Subjectively, as one who aims for accuracy in waveform reproduction, I've found that my "favourite" remains the standard linear phase (SHARP) filter both based on what I hear and intellectual satisfaction. I've never been a fan of the NOS sound - the rolled off highs and slight "dirtiness" to the sound quality robs it of resolution IMO (I presume this is secondary to the high aliasing distortion). I will however give a thumbs up to the TEAC engineers for the minimum phase upsampling with digital filter turned OFF. Some audiophiles have commented that in many DAC chips, it's actually not the pre-ringing that is an issue, but rather the processing of the digital filters themselves and taking out these built-in filters improves the sound quality... At least there's that opportunity on the TEAC - I'll have to listen a bit more...

One final thing. Consider this, just how audible is pre-ringing anyways? Realize that music isn't an impulse so these graphs are artificial exacerbations of the "ringing", just like testing with square waves generally do not show perfect instantaneous transitions in real life equipment. But even if I zoom into that SHARP impulse response (note I purposely inverted this impulse), this is what I see:

We have 7 waves over 60 samples, measured at 192kHz. This means we're looking at low amplitude pre-ringing at around the Nyquist frequency ~22kHz (remember 16/44 impulse signal). Hmmm, what kind of human physiology has the capability to hear that lead up to the primary impulse wave? Has anyone ever proven this is audible in music? Any references to controlled trials? Even the golden ears at Stereophile seemed unclear about the significance of these filters in that 2006 article before folks started claiming pre-ringing was "bad" (they were even listening to maximal phase filters with lots of pre-ringing and didn't dislike that nor show clear preference to the minimal phase filter).

As usual, if anyone has information/data/results about the audibility of these digital filters, please drop a note!

Time to go listen to  those 2013 Eagles remasters now...

(PS: Looking at the oversampling function of this TEAC DAC, I was hoping ASUS could have done something similar with the XONAR Essence One as I noted a few months ago - instead they made a gimp upsampler which rolled off way too early! Unfortunate.)

Addendum: As suggested by Shoddy in the comments - if I just have a look at the pre-ringing waveform from the SHARP (linear phase) filter, boost the levels and check the FFT; here's what it looks like:

Indeed, most of the energy of the pre-ringing waveform seems to be clustering around the Nyquist frequency and measures about 10 dB louder than what I assume is low frequency noise...


  1. Nice post as ever. One query though- I'm not sure that it is correct to say that the ringing is "at nyquist" in the sense that the energy before and after the main event is all at 22.05kHz. As I understand it the energy distributed before and after the main event contains all of the frequencies in the filtered signal. I accept however that looking at the zero crossings the ringing does seem related to nyquist. Is there any way of taking an FFT of the pe-ringing alone?

    1. Hi shoddy. Thanks for the comment. Yes, you're right, the energy does appear in the high frequency range but not necessarily at the Nyquist frequency... I'll see what I can do this evening with isolating the pre-ringing and running the FFT.

  2. Good read..

    The latest plot is 'hairy' because of too little samples being used to determine the FR spectrum. The more samples the lower these spikes will be due to averaging (AFAIK)

    As always in the pulse test a single pulse is used that is 1 sample long (16/44) and thus contains the highest possible frequency and harmonics above it.

    When for instance a sinewave is used of say 5kHz which is stopped at the 0 crossing what would the ringing be ?

    The NOS picture of the 'NOS' doesn't seem real NOS and seems to be oversampled with slight pre and post ringing.
    Is this caused by the sampling on the measuring side and how would it look on a fast oscilloscope or is it because the DAC always works on the highest possible rate ?
    Real NOS DAC's would actually show a really square square-wave.
    When followed by a real brick filter that is configured for each sample frequency the harmonics would be much lower and only post ringing at the filter frequency would remain. Also FR response would not roll-off like it does in the TEAC
    This will be very hard to make when the NOS DAC also has to 'do' higher bitrates.

    In 'subjective' circles some prefer a NOS DAC without analog filtering. This will probably be even worse than the TEAC shows.
    The 'love' for these devices can be explained in 2 ways for 2 different 'groups' of hifi afficianados.
    A: It shows how 'forgiving' and imperfect the (over rated) hearing abilities actually are.
    B: It shows analog and digital filters are detrimental to the sound and should not be used.

    Pick your poison... I know my preference.

    1. Good points.
      Yes, it's tough to isolate that pre-ringing... It's of low frequency and polluted by noise from the ADC as well, but I just wanted to pull out the FFT to show the main frequency component as requested.

      Good question about a "pulse" 5kHz - let me have a look at that tonight. Have already created a test waveform to have a look at - single 5kHz sine wave.

      That NOS waveform was of course "recorded" with my ADC at 192kHz into PCM - hence the extra minute ringing. A fast oscilloscope will help.

      I think a *sine wave* frequency sweep will look rolled off on NOS DAC's like the TDA and this TEAC. However the white noise signal will still get through in the graphs above and I don't see any analogue filter for the TEAC... I'll see about putting a post together on this.

  3. Excellent read.

    Did you measure the impulserespons using the SHARP and SLOW filters when using upsampling til 192kHz? Are they the same as without upsampling?

    1. Good question Thomaskl.

      I had a look tonight. The SHARP/SLOW filters with 192kHz upsampling *doesn't* change the 16/44 impulse waveform compared to filter OFF.

      To be expected since these filters are really only changing the PCM1795 settings and I'm not sure if the DAC even cares about the roll-off at 192kHz. If it does care, the difference would be way up at around 90kHz and way out of audible spectrum.

      I suppose it would have been interesting if TEAC implemented a more gradual roll-off for 44/48kHz upsampling such that the post-ringing became shorter when the SLOW setting is set :-)