DSPRelated.com
Forums

relationship between wordlength and saturation limit/bound

Started by iarif September 4, 2015
Hi all, as you know, saturation arithmetic can be employed to avoid
overflow oscillations in discrete time systems. I want to know that if we
have calculated the saturation limit, how can the word-length (number of
bits) be calculated from this information? Is there any specific
relation?
Waiting for your response
Thanks


---------------------------------------
Posted through http://www.DSPRelated.com
On 9/4/15 9:42 AM, iarif wrote:
> Hi all, as you know, saturation arithmetic can be employed to avoid > overflow oscillations in discrete time systems. I want to know that if we > have calculated the saturation limit, how can the word-length (number of > bits) be calculated from this information? Is there any specific > relation?
i dunno. i s'pose for a fixed-point bipolar signal: numBits = 1 + log2(saturationLimit) where saturationLimit>0 is in units of the LSB. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
"iarif" <108405@DSPRelated> writes:

> Hi all, as you know, saturation arithmetic can be employed to avoid > overflow oscillations in discrete time systems. I want to know that if we > have calculated the saturation limit, how can the word-length (number of > bits) be calculated from this information? Is there any specific > relation?
If you assume two's complement representation, the relationship is N >= log_2(MAX), unsigned N >= log_2(MAX) + 1, signed, including -MAX but excluding +MAX N >= log_2(MAX) + 2, signed, including -MAX and +MAX -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
On 9/4/15 12:14 PM, Randy Yates wrote:
> "iarif"<108405@DSPRelated> writes: > >> Hi all, as you know, saturation arithmetic can be employed to avoid >> overflow oscillations in discrete time systems. I want to know that if we >> have calculated the saturation limit, how can the word-length (number of >> bits) be calculated from this information? Is there any specific >> relation? > > If you assume two's complement representation, the relationship > is > > N >= log_2(MAX), unsigned > > N >= log_2(MAX) + 1, signed, including -MAX but excluding +MAX
but this does include +MAX-1, no?
> > N >= log_2(MAX) + 2, signed, including -MAX and +MAX
as well as -2*MAX AND +2*MAX-1 -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
robert bristow-johnson <rbj@audioimagination.com> writes:

> On 9/4/15 12:14 PM, Randy Yates wrote: >> "iarif"<108405@DSPRelated> writes: >> >>> Hi all, as you know, saturation arithmetic can be employed to avoid >>> overflow oscillations in discrete time systems. I want to know that if we >>> have calculated the saturation limit, how can the word-length (number of >>> bits) be calculated from this information? Is there any specific >>> relation? >> >> If you assume two's complement representation, the relationship >> is >> >> N >= log_2(MAX), unsigned >> >> N >= log_2(MAX) + 1, signed, including -MAX but excluding +MAX > > but this does include +MAX-1, no?
Yes.
>> >> N >= log_2(MAX) + 2, signed, including -MAX and +MAX > > as well as -2*MAX AND +2*MAX-1
True. The inequality nevertheless sets the bound. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
>On 9/4/15 9:42 AM, iarif wrote: >> Hi all, as you know, saturation arithmetic can be employed to avoid >> overflow oscillations in discrete time systems. I want to know that if
we
>> have calculated the saturation limit, how can the word-length (number
of
>> bits) be calculated from this information? Is there any specific >> relation? > >i dunno. > >i s'pose for a fixed-point bipolar signal: > > numBits = 1 + log2(saturationLimit) > >where saturationLimit>0 is in units of the LSB. > > > >-- > >r b-j rbj@audioimagination.com > >"Imagination is more important than knowledge."
what does it mean by "saturationLimit>0 is in units of the LSB"?. --------------------------------------- Posted through http://www.DSPRelated.com
what does it mean by "saturationLimit>0 is in units of the LSB".?
what is LSB unit?
---------------------------------------
Posted through http://www.DSPRelated.com
On Fri, 04 Sep 2015 08:42:37 -0500, iarif wrote:

> Hi all, as you know, saturation arithmetic can be employed to avoid > overflow oscillations in discrete time systems. I want to know that if > we have calculated the saturation limit, how can the word-length (number > of bits) be calculated from this information? Is there any specific > relation? > Waiting for your response Thanks
Apply some common sense to the problem: What's the largest magnitude (plus or minus) that the variable needs to hold for your algorithm to work? And, what's the largest truncation or round-off error that can be tolerated for the algorithm to work? Answer those two questions, then get out a pencil and paper and figure out how big of a word you need. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
>"iarif" <108405@DSPRelated> writes: > >> Hi all, as you know, saturation arithmetic can be employed to avoid >> overflow oscillations in discrete time systems. I want to know that if
we
>> have calculated the saturation limit, how can the word-length (number
of
>> bits) be calculated from this information? Is there any specific >> relation? > >If you assume two's complement representation, the relationship >is > > N >= log_2(MAX), unsigned > > N >= log_2(MAX) + 1, signed, including -MAX but excluding +MAX > > N >= log_2(MAX) + 2, signed, including -MAX and +MAX > >-- >Randy Yates >Digital Signal Labs >http://www.digitalsignallabs.com
Does it imply that if saturation bound is +/-1 (as in case of global saturation arithmetic to avoid overflow), no of bits chosen should be greater than 2? --------------------------------------- Posted through http://www.DSPRelated.com
On 9/5/15 9:05 AM, iarif wrote:
>> "iarif"<108405@DSPRelated> writes: >> >>> Hi all, as you know, saturation arithmetic can be employed to avoid >>> overflow oscillations in discrete time systems. I want to know that if > we >>> have calculated the saturation limit, how can the word-length (number > of >>> bits) be calculated from this information? Is there any specific >>> relation? >> >> If you assume two's complement representation, the relationship >> is >> >> N >= log_2(MAX), unsigned >> >> N >= log_2(MAX) + 1, signed, including -MAX but excluding +MAX >> >> N >= log_2(MAX) + 2, signed, including -MAX and +MAX >> > > Does it imply that if saturation bound is +/-1 (as in case of global > saturation arithmetic to avoid overflow), no of bits chosen should be > greater than 2?
you'll do fine with 2-bit words. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."