DSPRelated.com
Forums

Adding dither when increasing signal level?

Started by Jon Harris December 2, 2003
The benefits of adding dither when reducing word-length or attenuating a
signal are well known.  However, is there any advantage to adding dither
when _increasing_ the signal level?  A colleague and I had a disagreement
over this and so I wanted to here some other opinions.  Assume that the new
boosted signal still fits into the word length of the processor, i.e. there
is no possibility of clipping.

I'll reserve my opinion for now as not to influence the discussion.


Jon Harris wrote:

> The benefits of adding dither when reducing word-length or attenuating a > signal are well known. However, is there any advantage to adding dither > when _increasing_ the signal level? A colleague and I had a disagreement > over this and so I wanted to here some other opinions. Assume that the new > boosted signal still fits into the word length of the processor, i.e. there > is no possibility of clipping. > > I'll reserve my opinion for now as not to influence the discussion.
I believe that dither is advantageous whenever amplitude information needs to be rounded to fit the ADC. Any process that modifies amplitudes in any way fits that description in general. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
In article bqirqn$22m06p$1@ID-210375.news.uni-berlin.de, Jon Harris at
goldentully@hotmail.com wrote on 12/02/2003 15:20:


> Assume that the new > boosted signal still fits into the word length of the processor, i.e. there > is no possibility of clipping.
clipping is not the only thing that increases the word length. just multiplying be a coefficient does. what if you multiply your signal by about 1.13 (about 1 dB) depending on exactly how accurately you represent that coefficient (1.13) in binary, there will be a bunch of bits in the coef. an N-bit signed number times a M-bit signed number makes an (N+M-1) bit signed number. now what if you have to cast it back into an N-bit number again? that's a word length reduction and you should dither it. r b-j
Jon Harris wrote:
> The benefits of adding dither when reducing word-length or attenuating a > signal are well known. However, is there any advantage to adding dither > when _increasing_ the signal level?
Hi Jon, I would suggest that when you increase the signal level, dithering is not needed. This only becomes an issue when you requantize the signal. To explain in a more detail: Say you have a 16bit signal with sufficient headroom and you would like to add some gain. The gain coefficient is quantized with 32 bits, for example. The resulting signal will use more bits than 16 (how much more depends on scaling and quantization of the gain value).Now you only need to apply dither when you requantize this new signal back to 16bits. If you leave it at the new resolution, you don't have to do anything. Regards, Andor
"robert bristow-johnson" <rbj@surfglobal.net> wrote in message
news:BBF2B104.670D%rbj@surfglobal.net...
> In article bqirqn$22m06p$1@ID-210375.news.uni-berlin.de, Jon Harris at > goldentully@hotmail.com wrote on 12/02/2003 15:20: > > > > Assume that the new > > boosted signal still fits into the word length of the processor, i.e.
there
> > is no possibility of clipping. > > clipping is not the only thing that increases the word length. just > multiplying be a coefficient does. what if you multiply your signal by > about 1.13 (about 1 dB) depending on exactly how accurately you represent > that coefficient (1.13) in binary, there will be a bunch of bits in the > coef. an N-bit signed number times a M-bit signed number makes an (N+M-1) > bit signed number. now what if you have to cast it back into an N-bit > number again? that's a word length reduction and you should dither it. > > r b-j
OK, how about if I just applied gain in ~6.02dB step via left shifting? It seems then I'm not adding any new information, so no dither would be required? Also, in r b-j's example, it sounds like the amount (level) of added dither would be dependent on the level of requantization and independent of the amount of gain replied, correct? In other words, if I am understanding correctly, regardless of whether I add 1dB or 100dB of gain, the same amount of dither is added, related to the level of the LSB.
Jon Harris wrote:

> "robert bristow-johnson" <rbj@surfglobal.net> wrote in message > news:BBF2B104.670D%rbj@surfglobal.net... > >>In article bqirqn$22m06p$1@ID-210375.news.uni-berlin.de, Jon Harris at >>goldentully@hotmail.com wrote on 12/02/2003 15:20: >> >> >> >>> Assume that the new >>>boosted signal still fits into the word length of the processor, i.e. > > there > >>>is no possibility of clipping. >> >>clipping is not the only thing that increases the word length. just >>multiplying be a coefficient does. what if you multiply your signal by >>about 1.13 (about 1 dB) depending on exactly how accurately you represent >>that coefficient (1.13) in binary, there will be a bunch of bits in the >>coef. an N-bit signed number times a M-bit signed number makes an (N+M-1) >>bit signed number. now what if you have to cast it back into an N-bit >>number again? that's a word length reduction and you should dither it. >> >>r b-j > > > OK, how about if I just applied gain in ~6.02dB step via left shifting? It > seems then I'm not adding any new information, so no dither would be > required?
but then, you are always rounding toward minus infinity. That makes a symmetrical waveform asymmetric, introducing even harmonics. Dithering randomizes the error, effectively converting it to noise which is largely masked. Fraction saving is probably better than random dithering here.
> Also, in r b-j's example, it sounds like the amount (level) of added dither > would be dependent on the level of requantization and independent of the > amount of gain replied, correct? In other words, if I am understanding > correctly, regardless of whether I add 1dB or 100dB of gain, the same amount > of dither is added, related to the level of the LSB.
I believe that fraction saving alone works once the data are in digital form. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
In article bqlf7b$24bmjb$1@ID-210375.news.uni-berlin.de, Jon Harris at
goldentully@hotmail.com wrote on 12/03/2003 15:03:

> "robert bristow-johnson" <rbj@surfglobal.net> wrote in message > news:BBF2B104.670D%rbj@surfglobal.net... >> In article bqirqn$22m06p$1@ID-210375.news.uni-berlin.de, Jon Harris at >> goldentully@hotmail.com wrote on 12/02/2003 15:20: >> >> >>> Assume that the new >>> boosted signal still fits into the word length of the processor, i.e. there >>> is no possibility of clipping. >> >> clipping is not the only thing that increases the word length. just >> multiplying be a coefficient does. what if you multiply your signal by >> about 1.13 (about 1 dB) depending on exactly how accurately you represent >> that coefficient (1.13) in binary, there will be a bunch of bits in the >> coef. an N-bit signed number times a M-bit signed number makes an (N+M-1) >> bit signed number. now what if you have to cast it back into an N-bit >> number again? that's a word length reduction and you should dither it. >> >> r b-j > > OK, how about if I just applied gain in ~6.02dB step via left shifting? It > seems then I'm not adding any new information, so no dither would be > required?
well, actually, 6.02 dB is a factor of 1.99986186963274, so dithering is needed, but i know what you mean. in that special case (6.02059991327962 dB or a factor of 2.0000000000), no dithering would be needed (and indeed, might not be desired). there *is* danger of clipping (which really doesn't have anything to do with dithering, now that i think of it). but if you change the knob to 6.03 dB, you need dithering.
> Also, in r b-j's example, it sounds like the amount (level) of added dither > would be dependent on the level of requantization and independent of the > amount of gain replied, correct?
no and yes. it is dependent only on where the quantization point is. you need dither that is triangular p.d.f. and as big as 2 LSBs. doesn't matter what the signal is and shouldn't matter either since dither is supposed to make the quantization noise sound independent (or "uncorrelated" for a better term) from the input. so it is independent of the signal level (if i understand what you mean by "level") and independent of the amount of gain.
> In other words, if I am understanding > correctly, regardless of whether I add 1dB or 100dB of gain, the same amount > of dither is added, related to the level of the LSB.
yes. r b-j
Jon Harris wrote:
> "robert bristow-johnson" <rbj@surfglobal.net> wrote in message > news:BBF2B104.670D%rbj@surfglobal.net... > >>In article bqirqn$22m06p$1@ID-210375.news.uni-berlin.de, Jon Harris at >>goldentully@hotmail.com wrote on 12/02/2003 15:20: >> >> >> >>> Assume that the new >>>boosted signal still fits into the word length of the processor, i.e. > > there > >>>is no possibility of clipping. >> >>clipping is not the only thing that increases the word length. just >>multiplying be a coefficient does. what if you multiply your signal by >>about 1.13 (about 1 dB) depending on exactly how accurately you represent >>that coefficient (1.13) in binary, there will be a bunch of bits in the >>coef. an N-bit signed number times a M-bit signed number makes an (N+M-1) >>bit signed number. now what if you have to cast it back into an N-bit >>number again? that's a word length reduction and you should dither it. >> >>r b-j > > > OK, how about if I just applied gain in ~6.02dB step via left shifting? It > seems then I'm not adding any new information, so no dither would be > required?
Hey Jon, You've got Robert's answer to this (and he *is* an expert in the subject), but let me give you a different way to look at it. To answer your immediate question, you are correct - no dither would be needed if you are simply shifting left or right, i.e., multiplying by a factor of 2^a/2^b. Let your data value that is being gained up be denoted by "x" and the gain by "g." Assume x is represented as a signed, two's complement number, and assume g is some positive value from the real numbers. The problem is that the result g*x is not necessarily a value that is perfectly representable used signed, two's complement representation. So in a very real sense you have to "requantize" g*x back to two's complement, and we all know how dither is useful in requantization. However, if you know that g is of the form 2^a/2^b, then you know the result g*x is representable as two's complement (and in the same number of bits if you haven't overflowed or underflowed), therefore you don't have to requantize. I hope that sheds some light on it. -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO http://home.earthlink.net/~yatescr
Andor Bariska wrote:

> Jon Harris wrote: > >> The benefits of adding dither when reducing word-length or attenuating a >> signal are well known. However, is there any advantage to adding dither >> when _increasing_ the signal level? > > > Hi Jon, > > I would suggest that when you increase the signal level, dithering is > not needed. This only becomes an issue when you requantize the signal. > > To explain in a more detail: > Say you have a 16bit signal with sufficient headroom and you would like > to add some gain. The gain coefficient is quantized with 32 bits, for > example. The resulting signal will use more bits than 16 (how much more > depends on scaling and quantization of the gain value).Now you only need > to apply dither when you requantize this new signal back to 16bits. If > you leave it at the new resolution, you don't have to do anything.
??? Original sample is +400. Increase the signal by 4 dB; it is now 633.9573. What will you send to the DAC or store in an integer array? Please explain why dithering is useless here, while it would have helped had the signal been diminished by 4 dB (252.3829). Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Randy Yates <yates@ieee.org> wrote:

|To answer your immediate question, you are correct - no dither would
|be needed if you are simply shifting left or right, i.e., multiplying
|by a factor of 2^a/2^b.

This is correct for a right shift, but a left shift truncates data,
therefore shouldn't it be dithered?

Phil