Wednesday, 4 April 2012


Sampling Frequency & Bit Depth
Equally important for Sound Quality?

A week ago I attended the Audio World HiFi 2012 show in Weybridge, UK with my wife.  In one of the rooms we overheard two people discussing the different Sampling Frequencies and Bit depths available in high resolution music.  As we left the room, she asked me:  What is more important - Bit Rate or Sampling Frequency? As I started my explanation she looked a bit blank, so I went back to the basics. This is more or less what I explained to her. 
 
The first thing to realise is that these two parameters are completely independent. As an example:

A CD has a Sampling Frequency of 44.1kHz and a Bit depth of 16 Bits.
Sampling Frequency is how many times per second a continuous signal (analog) was "recorded" or sampled to make a discrete or digital signal.  With a CD this is 44,100 times per second.
Bit depth is how many values are available for each sample.  Bit depth is calculated by 2N .  Where N is the number of Bits.  So a CD has 216  = 65,536 different values available for each sample.

Are both Sampling Frequency and Bit Depth equally important to sound quality in home audio systems? Let’s start with Bit depth.

Bit Depth

A Bit is the abbreviation for a single binary digit, represented by a 0 or a 1.  For example, here is a 16-Bit binary number:

0110111110111010

The right most Bit is called Bit 0 and the left most Bit is called Bit 15.  0 through 15 equals a total of 16 Bits.

The left most Bit is called the "Most Significant Bit" (MSB) and is equal to 2N-1, where N = the Bit number.  In this case N = 16 so the MSB is equal to 32,768.

The second Bit is the 2nd left most Bit and is equal to 2N-2

The third Bit is the 3nd left most Bit and is equal to 2N-3

The fourth Bit is the 4nd left most Bit and is equal to 2N-4
·                    
The 16th Bit is the right most Bit and is equal to 2N-N  or 20 = 1. This is also called the “Least Significant Bit” (LSB).

In the above 16-Bit binary number Bits 15, 12, 6, 2 and 0 are all zero, so these Bit values are equal to zero and contribute nothing to the output.

So the 16-Bit Binary number above is equal to:

214 + 213 + 211 + 210 + 29 + 28 + 27 + 25 + 24 + 23 + 21
Which equals: 

16,384 + 8192 + 2048 + 1024 + 512 + 256 + 128+ 32 + 16 + 8 + 2 = 28,602

If all the Bits in the 16-Bit binary number were equal to 1's like this: 1111111111111111 That would be the maximum output of the device, which is 216 = 65,536.

If all the Bits in the 16-Bit binary number where equal to 0's like this:  0000000000000000 That would be the minimum output of the device, which is 0.

This means with a 16 Bit system we have 65,536 individual values available.  In an "ideal" 16 Bit DAC the DAC can output 65,536 different values. 

Here is how the Bit numbers relate to the DAC output values:

1)  The "Most Significant Bit" (MSB) is equal to half of the maximum output of the DAC.
 
2)  The next (2nd) significant Bit will be half of the MSB.
 
3)  The third will be half of the 2nd MSB and so on. 

4)  The (LSB) can be calculated by the equation:  max output of DAC / 2N, where N is the number of Bits the DAC has. 

Think of the MSB as the coarse tuning knob on a radio and the LSB as the fine tuning knob on a radio.

To make it easier assume we have a 16 Bit "ideal" DAC Integrated Circuit (IC).   Some DACs output voltage, others output current.  Let's assume our "ideal" DAC outputs current.

Let’s also assume the maximum output of our 16 Bit "ideal" DAC is 5 milliamps.  The value of each Bit is then:

Bit 15 (MSB) = 2.50 mA
 Bit 14 = 1.25 mA
Bit 13 = 0.625 mA
Bit 12 = 0.3125 mA
Bit 11 = 0.015625 mA
Bit 10 = 78.125 uA
Bit 9 = 39.0625 uA
Bit 8 = 19.5313 uA
Bit 7 = 9.76563 uA
Bit 6 = 4.88281 uA
Bit 5 = 2.44141 uA
Bit 4 = 1.22070 uA
Bit 3 = 0.610352 uA
Bit 2 = 0.305176 uA
Bit 1 = 0.152588 uA
Bit 0 (LSB) = 0.0762939 uA

So the LSB involves only 0.0762929 uA of current!  That is 76.3 x 10-9 AMPS!

In a 24 Bit system where the maximum output of the DAC IC is 5mA the LSB will only be 2.98 x10-10 amps.

T o help you understand how small this value is say our maximum output is a distance equal to 10 miles. In a 24 Bit system the LSB is equal to:  0.03777 inches!  We are talking very small here!

I have chosen 5mA as the maximum output of the DAC.  Some DACs will have a higher maximum output which of course increases the value of the LSB.  But as the value of the LSB increases the resolution of the DAC decreases.  Many DACs have a maximum output that is less than 5mA - meaning the LSB value will be even smaller.

Assume we have a 24 Bit DAC with a maximum output level of 15mA.  The LSB will still have a value of only 8.94 x 10-10  amps.

In a perfect world the LSB should be as small as possible because it would allow a higher resolution and hopefully better sound quality.  Unfortunately the world is not perfect - there is noise and in addition to that there is “jitter”. At a simple level, jitter is related to timing errors. These timing errors also decrease resolution.

An issue I see with Bit depths that are 24 Bit (or higher) is that the LSBs are so small that the LSBs can easily drop below system noise level.  It is difficult enough to get full 16 Bit resolution.

Signal to Noise ratio (S/N) of a DAC is a reference output level of the DAC divided by the minimum level.  The reference output level must be declared when the S/N value is given.  The minimum level is the noise of the system.  

Dynamic range is related to S/N.  If the S/N reference level is the maximum output of the DAC then S/N and dynamic range are the same.

In a perfect world the S/N and dynamic range of a 16 Bit system is theoretically 96dB and a 24 Bit System is theoretically 144dB.  For each 1-Bit increase in Bit depth the S/N and dynamic range can theoretically increase by 6dB.  Dynamic range is the difference between the quietest sound and the loudest. In the real world 140dB is about where your ears start to hurt.  It is impossible for any audio system to have a dynamic range anywhere near 140dB. 

Another technology that is used to increase resolution is Dither.  Dither can be used to increase the resolution of digital audio by adding noise.  At first this does not make much sense (at least to me!).  Here is on one of the simpler explanations of Dither:

http://en.wikipedia.org/wiki/Dither#Digital_audio

I do not want to get any more technical in this discussion but as soon as you start looking at how noise, jitter and frequency affect the LSBs you can quickly see we can get in trouble.  Being an electrical engineer myself I would not want to be the person responsible for designing a circuit where the S/N and jitter levels have to be low enough to be able to take full advantage of a 24 Bit system.

Sampling Frequency


For a DAC, "Sampling Frequency" is actually an incorrect term, even though we all use it.  An Analogue to Digital Converter (ADC) takes "samples" at specific intervals (frequencies).  A DAC has a maximum rate (frequency) that it can accept data.  What we are really talking about when we say "DAC Sampling Frequency" is the "speed" or "throughput rate" that the DAC can accept data.
DAC chips are specified for what their maximum throughput rate is and this varies greatly.  But the key issue here is that unlike Bit depth, throughput rates up to 192kHz and higher do not pose a difficult technical issue for the home audio DAC designer.  Higher throughput rates can of course cause issues, but nothing that is comparable to the issues cause by the LSBs of high Bit depth.

There are some downsides of Higher Sampling Rates:

It requires more CPU power to process audio at higher rates simply because the computer has more processing to do, but this is not a big issue with modern day computers.  Higher sampling rates generally increase Bit depth errors and can increase noise and jitter levels.  It will also heat the DAC chip up more.  The Nyquist–Shannon sampling theorem states that when the sampling frequency is twice the maximum frequency of the signal being sampled that perfect reconstruction of the recorded signal is possible.  Human hearing is said to extend to 20kHz.  To satisfy the Nyquist–Shannon theorem the sample rate would have to be at least two times 20Khz, or 40kHz.  This is why CD sample rates are 44.1kHz.  There is quite a bit of discussion on the web about the possible benefits and drawbacks of using higher sample rates even though the Nyquist–Shannon sampling theorem says it is not required.
 
Real Life Test

Please trust your ears!  If you can or cannot hear a difference than that is ALL that matters for home audio.

The above discussion was hopefully interesting to you but at the end of the day the best test instrument for home audio we have in my opinion is our ears.

I would ask the readers of this that have a DAC that can play 192kHz / 24 Bit files to try this experiment:

Take your favourite 192kHz / 24 Bit track and make two test files from this track.

One test file will be 44.1kHz / 24Bit and the other will be 192kHz / 16 Bit.

I will explain how to do this using dBpoweramp R14.x because this is what I use.  You can use any converter software you have but it is crucial that the software uses dither when reducing the Bit depth from 24 down to 16.  Please read the Wiki link I provided about dither to understand why.

1)  dBpoweramp R14.x has the ability to add dither when reducing Bit depth.  Using dBpoweramp R14.x Music Converter this can be done by manually choosing 16 Bit under Bit depth.  Now drop down and click Add by DSP Effects /Options.  Now click Add DSP Effect and choose Bit depth.  It is the forth one down from the top.  Click fixed Bit depth and choose 16.  Open the Apply Dither menu and chose TRIANGULAR (TPDF).  Now convert the file to a new file location and save it with some name so you know what it is.  The next time you open dBpoweramp the DSP effect will still be there so remember to remove it!

2)  Take the same 192kHz / 24 Bit track and use dBpoweramp R14.x Music Converter and convert your file to 44.1kHz. dBpoweramp uses a high quality SSRC frequency conversion by default.  This can be done by choosing "44.1kHz" under Sample.  Now convert the file to a new file location and save it with some name so you know what it is.

3)  Now play the 16 Bit converted file and compared it against the original.  What do you think?

4)  Now play the 44.1kHz converted file and compare it to the original.  What do you think?

5)  Now play the 192kHz / 16 Bit file versus the 44.1kHz / 24 Bit file.   What do you think?

Please let me know what you find! 

2 comments:

  1. Hello,

    I am not sure why I am entering the blog of a £7K DAC maker; it’s not as if I am about to buy one, and it’s not that I am poor, though I would like to keep from becoming so. Anyway, it does look like you could do with a post or two to kick off!

    I don’t have any USB DAC yet so can’t see me trying this experiment any time soon. Never mind; as I understand you are using TDA 1543, I am guessing your point is that 16 bits is enough? I agree; it should be and very probably is (Does one or more 1543s actually give the full 16 bits?). As for 96 & 192 kbps, I am thinking it is less clear, and as I am not sure what you can force a 1543 to run at, I am not so sure of your position: Despite the fashion for thinking otherwise, I am sure an audio bandwidth of 20 kHz is enough, so the only question is how you deal with scrubbing off the out of band noise and what effect that has on the in-band signal. Except for this last point, I don’t see any advantage in up-sampling, and over-sampling too is so out of fashion(!)?

    Though I shall buy soon, I shall not be going out of my way to buy high-bits rate/depth for, despite any idealism, I probably have more music behind me than in front. 99.9% of my digital files are my own ripped CDs. Perhaps 1% might be available at 24/96 but I seriously doubt the original masters have any more to give (by going to higher rates), either by going back to resample original analogue masters – assuming they are still usable, or resampling old Sony PCM 1610 masters. I guess at most, 10% or so may have been originally recorded at 24/96 but I doubt there is any will to release that resolution to the public for the (for the lack of commercial prospect, for the music I like). A quick look on HD Tracks confirms that.

    BTW: I agree on the one input; multiple input DACs are usually worse, much more expensive (though not more so than £7K), or both.

    (In case the tone of this post comes across wrong, I am not baiting, I am just interested)

    Regards,
    Andy

    ReplyDelete
  2. Hello Tony,

    Sorry for the delay but we are currently a bit busy building DACs! I appreciate your response, yours was my first blog comment!

    Yes, our DAC uses the TDA1543. As I wrote, while 24 bits is wonderful in theory, my belief is that in reality we cannot use these LSBs, they get lost in the noise. Which is why I'd love to know if people out there can test it.

    According to Nyquist–Shannon theorem all we need is a sampling rate of twice the maximum frequency of what we are recording. The theory is that since the maximum frequency we can hear is 20KHz (very few of us can actually hear that high), a 40KHz sampling rate should be enough. Now this is where I am not sure if I agree or disagree. I have done quite a bit of listening to 96Khz music and I am pretty sure it is better, but there is so little music out there yet it is really hard to say for 100%. As you say, an awful lot of digital music in people's collections will be 44.1KHz/16 bit quality only; but I guess we're trying to build something that will perform in the long term. As internet bandwidth increases, and memory gets cheaper we think it's likely that more "high resolution" recordings will become available.

    The TDA1543 is specified to accept data up to 192Khz. Our DAC can operate at 192KHz.

    We got into this to try to provide a source with a sound quality level that can compete with anything on the market at any price and interface with a computer. You may or may not think that £6900 is a reasonable price for any home audio component. When I say "reasonable price" I mean reasonable price for the sound quality you get.

    We're gathering dealers to carry the DAC so if there is one in your area, do come along when we do a listening evening, even if you don't think you'd ever buy one yourself. We like feedback from people who listen!

    Best Regards,

    Scott

    ReplyDelete