NAIM NDX - User Manual - page 5
Copyright Naim Audio 2010
Page 5 of 8
Fortunately there is a smarter way of generating the new
samples. First we ‘zero stuff’ the digital signals – in other
words, insert the required extra samples but give them all
a value of zero. When we do the result is a waveform and
spectrum like those shown above.
Note that the spectrum is very similar to that shown previously
but all the out-of-band peaks are now of the same height as
the in-band peak (0dB). If we can remove all the extra tones
(above 24kHz in the example below) then we will create
a DAC output signal that has smaller steps – provided, of
course, that the DAC supports the new higher sample rate.
That in turn means that the remaining unwanted frequency
components will be higher in frequency, allowing them to be
removed using a simpler low-pass analogue filter.
Digital filtering using Naim algorithms
If we insert 15 zeros between each pair of input samples
as the first stage of 16x oversampling, the frequency
spectrum of the zero-stuffed signal will contain lots of
unwanted components, as shown previously.
All the frequency content occurs above half the sample
rate, ie above 22.05kHz in the case of CD, and must be
removed by the digital filter. While it is fairly easy to design
a digital filter that applies a high degree of attenuation
to everything above 22.05kHz while having minimal effect
on frequency response below 20kHz, we need to ensure
that we use sufficient mathematical precision to keep
the filter’s arithmetic noise below –144dB (the theoretical
signal-to-noise ratio of 24-bit PCM audio) at all times.
As the incoming audio can have up to 24-bit resolution,
24-bit processing will not be sufficiently accurate as it
will incur rounding and/or truncation errors of the same
resolution as the incoming audio. The normal solution
is to use 32-bit floating point processing instead but
in 32-bit IEEE floating point arithmetic the mantissa is
24 bits long, so if we have sample values close to 1 –
where the exponent will be 0 – we will again achieve
only 24-bit precision. (For readers unfamiliar with
floating point arithmetic, numbers are represented in
the basic form 1.23456E+5, where the first part of the
number – 1.23456 in this case – is termed the mantissa
and the second part, here +5, is the exponent, ie the
power of 10 by which the mantissa is multiplied. In
conventional integer arithmetic 1.23456E+5 is written
as 123,456. Note that IEEE floating point numbers use
base 2 (binary) rather than base 10 representation, but
the structure is the same.)
In reality it is very hard to estimate the resulting precision
using floating point numbers. The best way to assess it
in the context of filter designs is to use real-world signals,
send them through the filter and check the outcome to
see what precision was achieved. A quick test along
these lines verifies that 32-bit floating point processing
does not achieve the precision we require. Fortunately,
more powerful processors from Analog Devices support
a new type of floating point number, 40-bit floating
point. Instead of having a 24-bit mantissa these use a
32-bit mantissa with 7 bits of exponent. This gives the
resolution we require but keeps memory requirements
fairly low (only one more byte compared to 32 bits). If we
send music signals through our implementation of a filter
with 40-bit floating point and analyse the results we see
that arithmetic noise is at about –180dB, which is well
below the noise floor of the DAC chips.
The same 1kHz signal as before (left) and its spectrum (right), sampled originally at 48kHz but now zero-stuffed with
15 zero-valued samples between each adjacent pair of original samples. The sample rate is now (16 x 48 =) 768kHz