Article View: sci.electronics
Article #16698Re: "1-bit DAC"
From: Peter Herweijer
Date: Fri, 08 Jan 1993 13:28
Date: Fri, 08 Jan 1993 13:28
57 lines
3179 bytes
3179 bytes
In <1993Jan7.235144.15771@clsi.COM> kevin@clsi.COM (Kevin Cameron) writes:
>In article <C0F8Hp.84n@ve7frg.ampr.org>, doug@ve7frg.ampr.org (Doug Collinge - VE7GNU) writes:
>> If my CD with a "1 bit DAC" and the aid of "8 times oversampling"
>> can produce audio as good as an older CD with no "oversampling" and
>> a 16-bit DAC then can my circuit with an 8-bit DAC be replaced
>> with a 1-bit DAC and 4-times oversampling?
>>
>> How? What's the math behind this concept anyway?
[explanation deleted]
>I'm not sure what scheme the "1 bit DAC" actually uses, but the implication is
>that you would need 256 times over-sampling for 8bits.
Mostly right, but let me put in my $0.02:
in order to produce an average DC signal of 1/256 part of maximum, an
1-bit DAC produces 255 0's to every 1. For a 'dumb' 1-bit DAC, this
would imply that in order to get 8-bit resolution, 256 times oversampling
is required; for 16-bit resolution, 65536 times oversampling.
However audio signals are never static (except when silent). By making
the place where the 1's and the 0's are put, corresponding to one input
sample, dependent on the shape of the input as a whole, it is possible
to produce a more accurate result using the same oversampling rate
(excuse me for my rather clumsy way of putting this). This is achieved
at the cost of a very chaotic behaviour of small trains of 0's and 1's,
as you can imagine. The net effect is that the quantisation noise
( = DAC error) is moved from low frequencies (the audio band) to high
frequencies (just below the oversampling frequency where they can be
easily filtered out). Hence the term "noise shaping".
The simplest (first order) noise shaping algorithm goes like this:
error := 0
loop begin
data := sample { 0<sample<1 }
for n:= 1 to oversampling_rate begin
output := round(data + error) { round(x) = 0 if x<0.5 }
error := error + data - output { 1 otherwise }
end
end
The error made by converting the input to 1 bit is carried over to the
next sample, etc. For, say, a DC level of 1/256, this noise shaper would
behave just as a 'dumb' 1-bit DAC, and a tone of 1/256 the sampling
frequency would be audible, but for real world signals this performs
much better. For large oversampling rates, by the way, this simple
algorithm breaks down and higher-order algorithms are needed.
This is about all I know about it. If someone out there can tell what
the theoretical S/N ratio for this scheme is, and how higher-order noise
shaping algorithms work: I, for one, would be interested to hear!
Peter Herweijer
pieterh@sci.kun.nl
Technical Details
Message-ID:
<C0JEr2.68o@sci.kun.nl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!sci.kun.nl!pieterhReferences:
<C0F8Hp.84n@ve7frg.ampr.org> <1993Jan7.235144.15771@clsi.COM>Show Full Headers
Complete Article Headers
Newsgroups: sci.electronics Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!sci.kun.nl!pieterh From: pieterh@sci.kun.nl (Peter Herweijer) Subject: Re: "1-bit DAC" Message-ID: <C0JEr2.68o@sci.kun.nl> Sender: news@sci.kun.nl (News owner) Nntp-Posting-Host: wn2.sci.kun.nl Organization: University of Nijmegen, The Netherlands References: <C0F8Hp.84n@ve7frg.ampr.org> <1993Jan7.235144.15771@clsi.COM> Date: Fri, 8 Jan 1993 13:28:13 GMT Lines: 57