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
relationship between wordlength and saturation limit/bound
Started by ●September 4, 2015
Reply by ●September 4, 20152015-09-04
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."
Reply by ●September 4, 20152015-09-04
"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
Reply by ●September 4, 20152015-09-04
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 +MAXbut this does include +MAX-1, no?> > N >= log_2(MAX) + 2, signed, including -MAX and +MAXas well as -2*MAX AND +2*MAX-1 -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by ●September 4, 20152015-09-04
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-1True. The inequality nevertheless sets the bound. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Reply by ●September 4, 20152015-09-04
>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 ifwe>> have calculated the saturation limit, how can the word-length (numberof>> 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
Reply by ●September 4, 20152015-09-04
what does it mean by "saturationLimit>0 is in units of the LSB".? what is LSB unit? --------------------------------------- Posted through http://www.DSPRelated.com
Reply by ●September 5, 20152015-09-05
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 ThanksApply 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
Reply by ●September 5, 20152015-09-05
>"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 ifwe>> have calculated the saturation limit, how can the word-length (numberof>> 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.comDoes 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
Reply by ●September 5, 20152015-09-05
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."