Hello all, Does anyone know an IIR form that would prevent/reduce the effects of limit cycles? Just so everyone is clear about what I mean when I say "limit cycles": It is the phenomena whereby fixed point DSP's cannot quantize very precise multiplies within a feedback (a-terms) mac's of an IIR filter. This can cause what appears to be moments of instabilities at very low input levels. (only a couple of lsb's toggling) a.k.a. small scale limit cycles. In the audio processing wold, I've seen this manifest itself as a subwoofer grumbling when several low cutoff LPF's were used in series. It was essentially reacting to the noise floor of the A/D converters and providing a signal much louder than the input. I have heard from another DSP Engineer that there is an IIR form that reduces the effect of limit cycles so that it is barely noticable. Today we use double-precision data storage to eliminate this problem, but I want to remove this MIPS hit if possible. Any ideas? Jeff

# IIR Form to prevent Limit Cycles?

Started by ●December 18, 2007

Posted by ●December 18, 2007

sparafucile17 wrote:> Hello all, > > Does anyone know an IIR form that would prevent/reduce the effects of > limit cycles? Just so everyone is clear about what I mean when I say > "limit cycles": > > It is the phenomena whereby fixed point DSP's cannot quantize very precise > multiplies within a feedback (a-terms) mac's of an IIR filter. This can > cause what appears to be moments of instabilities at very low input > levels. (only a couple of lsb's toggling) a.k.a. small scale limit > cycles. > > In the audio processing wold, I've seen this manifest itself as a > subwoofer grumbling when several low cutoff LPF's were used in series. It > was essentially reacting to the noise floor of the A/D converters and > providing a signal much louder than the input. > > I have heard from another DSP Engineer that there is an IIR form that > reduces the effect of limit cycles so that it is barely noticable. Today > we use double-precision data storage to eliminate this problem, but I want > to remove this MIPS hit if possible.Search for "fraction saving" in this newsgroup. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������

Posted by ●December 18, 2007

Jerry Avins wrote:> sparafucile17 wrote: >> Hello all, >> >> Does anyone know an IIR form that would prevent/reduce the effects of >> limit cycles? Just so everyone is clear about what I mean when I say >> "limit cycles": >> It is the phenomena whereby fixed point DSP's cannot quantize very >> precise >> multiplies within a feedback (a-terms) mac's of an IIR filter. This can >> cause what appears to be moments of instabilities at very low input >> levels. (only a couple of lsb's toggling) a.k.a. small scale limit >> cycles. >> >> In the audio processing wold, I've seen this manifest itself as a >> subwoofer grumbling when several low cutoff LPF's were used in >> series. It >> was essentially reacting to the noise floor of the A/D converters and >> providing a signal much louder than the input. >> >> I have heard from another DSP Engineer that there is an IIR form that >> reduces the effect of limit cycles so that it is barely noticable. Today >> we use double-precision data storage to eliminate this problem, but I >> want >> to remove this MIPS hit if possible. > > Search for "fraction saving" in this newsgroup.That may greatly greatly increase the compute requirement, by stretching the word length beyond the machine's. Adding TPD noise to each bi-quad (assuming it's a biquad structured filter) can be effective amd more efficient. Steve

Posted by ●December 19, 2007

On Dec 18, 10:44 pm, Steve Underwood <ste...@dis.org> wrote:> Jerry Avins wrote: > > sparafucile17 wrote: > >> Hello all, > > >> Does anyone know an IIR form that would prevent/reduce the effects of > >> limit cycles? Just so everyone is clear about what I mean when I say > >> "limit cycles": > >> It is the phenomena whereby fixed point DSP's cannot quantize very > >> precise > >> multiplies within a feedback (a-terms) mac's of an IIR filter. This can > >> cause what appears to be moments of instabilities at very low input > >> levels. (only a couple of lsb's toggling) a.k.a. small scale limit > >> cycles. > > >> In the audio processing wold, I've seen this manifest itself as a > >> subwoofer grumbling when several low cutoff LPF's were used in > >> series. It > >> was essentially reacting to the noise floor of the A/D converters and > >> providing a signal much louder than the input. > > >> I have heard from another DSP Engineer that there is an IIR form that > >> reduces the effect of limit cycles so that it is barely noticable. Today > >> we use double-precision data storage to eliminate this problem, but I > >> want > >> to remove this MIPS hit if possible. > > > Search for "fraction saving" in this newsgroup. > > That may greatly greatly increase the compute requirement, by stretching > the word length beyond the machine's. Adding TPD noise to each bi-quad > (assuming it's a biquad structured filter) can be effective amd more > efficient.i don't quite get it, Steve. would not a LSW (least significant word) be needed in either case? at least with the old 56K (or with the current SHArC, if you use the 80-bit accumulator), saving the LSW and restoring it (zero extended) for the next sample's accumulation, is much cheaper than computing two decent rectangular samples of noise (so to add them together to get TPD). one reason for "fraction-saving" (otherwize known as: round-to-neg- infinity truncation surrounded by first-order noise shaping with a single zero at z=1 in the transfer function for quantization error to output) is that it requires so little complexity in the implementation. r b-j

Posted by ●December 19, 2007

robert bristow-johnson wrote:> On Dec 18, 10:44 pm, Steve Underwood <ste...@dis.org> wrote: >> Jerry Avins wrote: >>> sparafucile17 wrote: >>>> Hello all, >>>> Does anyone know an IIR form that would prevent/reduce the effects of >>>> limit cycles? Just so everyone is clear about what I mean when I say >>>> "limit cycles": >>>> It is the phenomena whereby fixed point DSP's cannot quantize very >>>> precise >>>> multiplies within a feedback (a-terms) mac's of an IIR filter. This can >>>> cause what appears to be moments of instabilities at very low input >>>> levels. (only a couple of lsb's toggling) a.k.a. small scale limit >>>> cycles. >>>> In the audio processing wold, I've seen this manifest itself as a >>>> subwoofer grumbling when several low cutoff LPF's were used in >>>> series. It >>>> was essentially reacting to the noise floor of the A/D converters and >>>> providing a signal much louder than the input. >>>> I have heard from another DSP Engineer that there is an IIR form that >>>> reduces the effect of limit cycles so that it is barely noticable. Today >>>> we use double-precision data storage to eliminate this problem, but I >>>> want >>>> to remove this MIPS hit if possible. >>> Search for "fraction saving" in this newsgroup. >> That may greatly greatly increase the compute requirement, by stretching >> the word length beyond the machine's. Adding TPD noise to each bi-quad >> (assuming it's a biquad structured filter) can be effective amd more >> efficient. > > i don't quite get it, Steve. would not a LSW (least significant word) > be needed in either case? at least with the old 56K (or with the > current SHArC, if you use the 80-bit accumulator), saving the LSW and > restoring it (zero extended) for the next sample's accumulation, is > much cheaper than computing two decent rectangular samples of noise > (so to add them together to get TPD). > > one reason for "fraction-saving" (otherwize known as: round-to-neg- > infinity truncation surrounded by first-order noise shaping with a > single zero at z=1 in the transfer function for quantization error to > output) is that it requires so little complexity in the > implementation.Its also known as "don't throw away what you aren't really forced to". When you have long enough registers you certainly aren't forced to throw information away, and you are a fool if you do. However, this does assumes you can keep all the bits through all the stages. When you need to store intermediate results things can get messier. I could have expressed myself more clearly, I guess. The reason I said about dithering each bi-quad is that's typically the level at which you have to store values in smaller spaces, or suffer big overheads. Steve

Posted by ●December 19, 2007

jeff, approach 1. a second order IIR section that is free of zero input limit cycles is given on page 726 of sanjit k mitra book. fig 12.54. 3rd edition, digital signal processing. I am not too confident about this structure as limit cycle oscillations are caused by the quantizers in the structure and not by the structures themselves. limit cycle oscillations are caused mainly by 2's complement arithmetic, either when the iir coefficients are negative (which is mostly the case), or if the input goes both positive and negative. normally when we floor negative numbers their bias increases more towards minus infinity. This is the prime reason behind the oscillations. Hence choosing a structure won't help. You need to change the way how you would quantize things in the loop. Hence I would recommend approach 2. approach 2. limit cycles can completely be eliminated by using a "fix quantizer" fix is a terminology used by matlab. you can type "help fix" for more details. Fix quantizer will floor the data towards 0 for both positive and negative numbers. This flooring towards 0 of both positive and negative data causes dead band near origin which results in some amount harmonic distortion. you need to perform SNR analysis and check if you are ok with THD. providing some extra fractional bits helps in reducing or eliminating harmonic distortion. Regards Bharat Pathak Founder and CEO Arithos Designs www.arithos.com>Hello all, > >Does anyone know an IIR form that would prevent/reduce the effects of >limit cycles? Just so everyone is clear about what I mean when I say >"limit cycles": > >It is the phenomena whereby fixed point DSP's cannot quantize veryprecise>multiplies within a feedback (a-terms) mac's of an IIR filter. This can >cause what appears to be moments of instabilities at very low input >levels. (only a couple of lsb's toggling) a.k.a. small scale limit >cycles. > >In the audio processing wold, I've seen this manifest itself as a >subwoofer grumbling when several low cutoff LPF's were used in series.It>was essentially reacting to the noise floor of the A/D converters and >providing a signal much louder than the input. > >I have heard from another DSP Engineer that there is an IIR form that >reduces the effect of limit cycles so that it is barely noticable.Today>we use double-precision data storage to eliminate this problem, but Iwant>to remove this MIPS hit if possible. > >Any ideas? > >Jeff >

Posted by ●December 19, 2007

"sparafucile17" <sparafucile17@hotmail.com> wrote in message news:MaCdnYFVzoMYovXanZ2dnUVZ_ommnZ2d@giganews.com...> Hello all, > > Does anyone know an IIR form that would prevent/reduce the effects of > limit cycles?There can't be such thing. However: 1. You can implement noise shaping (as suggested by Jerry and RBJ) 2. You can dither (as suggested by Steve) 3. You can use some sort of nonlinear processing (noise gate or crossover notch) 4. You can do the FIR filter instead of IIR What would be the preferred way depends on what is your hardware and what are you trying to accomplish. Vladimir Vassilevsky DSP and Mixed Signal Consultant www.abvolt.com

Posted by ●December 19, 2007

> >"sparafucile17" <sparafucile17@hotmail.com> wrote in message >news:MaCdnYFVzoMYovXanZ2dnUVZ_ommnZ2d@giganews.com... >> Hello all, >> >> Does anyone know an IIR form that would prevent/reduce the effects of >> limit cycles? > >There can't be such thing. However: > >1. You can implement noise shaping (as suggested by Jerry and RBJ) >2. You can dither (as suggested by Steve) >3. You can use some sort of nonlinear processing (noise gate orcrossover>notch) >4. You can do the FIR filter instead of IIR > >What would be the preferred way depends on what is your hardware andwhat>are you trying to accomplish. > >Vladimir Vassilevsky >DSP and Mixed Signal Consultant >www.abvolt.com > >Thanks guys, I like where this discussion is going. Just to re-cap, I am currently implementing a double-precision data storage to solve the problem. My data/coefficients are 28-bit and the accumulator is 56-bits. So when the output sample from the biquad is stored I use the entire 56-bit value. This requires one additional data store and two more MAC's. See below: [single-precision data storage] ==> 6 cycles MAC B0 MAC B1 MAC B2 MAC A1 MAC A2 STORE ACCUM-HI [double-precision data storage] ==> 9 cycles (* are extra precision instr.) MAC B0 MAC B1 MAC B2 MAC A1-HI MAC A1-LO* MAC A2-HI MAC A2-LO* STORE ACCUM-HI STORE ACCUM-LO* This method works for my application but can be MIPS intensive. I'm using up to 100 biquads so this 3 cycle difference translates into 300 cycles! and this is huge for me. Thus it would be nice to keep the 6 cycle biquad but prevent small-scale limit cycles from occuring. So any solution for me needs to be less than a 9 cycle biquad. I have used the round-to-0 approach at my former employer to solve the same problem. I just wonder if I can do the same but less than 3 cycles!! I will also quiz one of our European branch of DSP guys to see if they can elaborate on the *new IIR form* (That's who I heard this nasty rumor from) Thanks, Jeff

Posted by ●December 19, 2007

On Dec 19, 7:21 am, "bharat pathak" <bha...@arithos.com> wrote:> > approach 1. > > a second order IIR section that is free of zero input limit > cycles is given on page 726 of sanjit k mitra book. fig 12.54. > 3rd edition, digital signal processing. I am not too confident > about this structure as limit cycle oscillations are caused > by the quantizers in the structure and not by the structures > themselves. limit cycle oscillations are caused mainly by 2's > complement arithmetic, either when the iir coefficients are negative > (which is mostly the case), or if the input goes both positive and > negative. normally when we floor negative numbers their bias > increases more towards minus infinity. This is the prime reason > behind the oscillations. Hence choosing a structure won't help. > You need to change the way how you would quantize things in the > loop.i don't have this book. could you draw out the structure using "ASCII- art" or spell it out with pseudo-code (or C code or MATLAB/Octave code)?> ... Hence I would recommend approach 2. > > approach 2. > > limit cycles can completely be eliminated by using a "fix quantizer" > fix is a terminology used by matlab. you can type "help fix" for more > details. Fix quantizer will floor the data towards 0 for both positive > and negative numbers.yes, that will eliminate the one problem of the filter getting stuck on a non-zero output even after the input goes to zero and is held at zero.> This flooring towards 0 of both positive and > negative data causes dead band near origin which results in some amount > harmonic distortion.yes, it has crossover distortion that is less of a problem for loud signals and more of a problem with very quiet signals. it is the crap that you get with signals fading to silence which was one of the first motivations for additive dither. i still think that fraction saving is the cheapest means to solve the specific problem of limit-cycles in an IIR causing your output to be stuck to a non-zero value even when dead silence is going in. unless your hardware is designed to do "round-toward-zero", actually rounding toward zero requires either sign-magnitude arithmetic or at least a couple of conditional execution statements which DSPs are not well suited for. On Dec 19, 10:19 am, "sparafucile17" <sparafucil...@hotmail.com> wrote:> My data/coefficients are 28-bit and the accumulator is 56-bits. > So when the output sample from the biquad is stored I use the entire 56-bit > value. > > This requires one additional data store and two more MAC's. See below: > > [single-precision data storage] ==> 6 cycles > MAC B0 > MAC B1 > MAC B2 > MAC A1 > MAC A2 > STORE ACCUM-HI > > [double-precision data storage] ==> 9 cycles (* are extra precision > instr.) > MAC B0 > MAC B1 > MAC B2 > MAC A1-HI > MAC A1-LO* > MAC A2-HI > MAC A2-LO* > STORE ACCUM-HI > STORE ACCUM-LO* > > This method works for my application but can be MIPS intensive. I'm using > up to 100 biquads so this 3 cycle difference translates into 300 cycles!i don't know your instruction set (is this the ADI Sigma DSP?) but fraction saving really *is* cheap. consider this as pseudo-code (since i dunno the instruction set) CLEAR ACCUM-HI (perhaps this won't be necessary) RESTORE ACCUM-LO (whatever you stored at the last sample) MAC B0 MAC B1 MAC B2 MAC A1 MAC A2 STORE ACCUM-HI (this truncated word is your output sample) STORE ACCUM-LO that's it. that's all you have to do to implement "fraction saving". r b-j

Posted by ●December 19, 2007

robert bristow-johnson wrote:>>This flooring towards 0 of both positive and >> negative data causes dead band near origin which results in some amount >> harmonic distortion. > > > yes, it has crossover distortion that is less of a problem for loud > signals and more of a problem with very quiet signals. it is the crap > that you get with signals fading to silence which was one of the first > motivations for additive dither. > > i still think that fraction saving is the cheapest means to solve the > specific problem of limit-cycles in an IIR causing your output to be > stuck to a non-zero value even when dead silence is going in. unless > your hardware is designed to do "round-toward-zero",The noise shaping has to be done at every biquad stage. The nonlinear thing or a noise gate can be done only once for the whole system, hence it could be simpler. But usually the problem with IIRs is not only because of the limit cycles. The loss of precision is bad, and the only way to deal with that is the noise shaping. BTW, BlackFin architecture is very inconvenient for that purpose. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com

Posted by ●December 20, 2007

On Dec 20, 8:16 am, Vladimir Vassilevsky <antispam_bo...@hotmail.com> wrote:> ... although all modern DSPs are about the > same sort of crap.So what would you do differently in a DSP chip's design so that you wouldn't label it as some sort of excrement?

Posted by ●December 20, 2007

Vladimir Vassilevsky wrote:>> you get a conditional IF-THEN-ELSE control of program >> flow. when you don't have a simple branch instruction, it becomes >> pretty clear how necessary they are to do anything decent. > > Exactly. With the stupid DAPs, you have to do all of the processing at > once, and there is only the limited number of things that you can do.There's only a limited number of things the volume users want them to do. :-) Steve

Posted by ●December 20, 2007

robert bristow-johnson wrote:>>>WOW... That's creepy. How'd you know it was a Sigma DSP?! I didn't think >>>anyone in the world knew about this part other than me. >> >>It is obvious to anyone who works with the audio. There are only few >>so-called DAPs from AD, TI, AKM, Cirrus Logic, NXP. I prefer working >>with the true general purpose DSP though. > > > at least (with the genuine, bona fide general purpose DSP - which one > would that be?)My current workhorse is BlackFin, although all modern DSPs are about the same sort of crap.> you get a conditional IF-THEN-ELSE control of program > flow. when you don't have a simple branch instruction, it becomes > pretty clear how necessary they are to do anything decent.Exactly. With the stupid DAPs, you have to do all of the processing at once, and there is only the limited number of things that you can do. VLV

Posted by ●December 20, 2007

>On Dec 19, 4:17 pm, Vladimir Vassilevsky <antispam_bo...@hotmail.com> >wrote: >> sparafucile17 wrote: >> > WOW... That's creepy. How'd you know it was a Sigma DSP?! I didn'tthink>> > anyone in the world knew about this part other than me. >> >> It is obvious to anyone who works with the audio. There are only few >> so-called DAPs from AD, TI, AKM, Cirrus Logic, NXP. I prefer working >> with the true general purpose DSP though. > >at least (with the genuine, bona fide general purpose DSP - which one >would that be?) you get a conditional IF-THEN-ELSE control of program >flow. when you don't have a simple branch instruction, it becomes >pretty clear how necessary they are to do anything decent. > >r b-j >Rick, I agree, conditionals are almost always a performance killer on any DSP. I personally prefer to work on audio processors than general purpose parts because they are simple and fast. Too me it gets back to the basics of DSP coding: one interrupt loop and raw assembly code. This type of design is efficient and honed to the application. You don't always need DMA/RTOS/C-complier/EBIU/cache/etc for simple filtering/delay/mixing applications. And this is what a lot of audio applications are. Plus you can't beat the cost. Audio processors can be $3-$4 and GP DSPs can range from $5-$10 for the basic ones! I personally know that my company has won business by beating the competitors price by less than 50 cents! So in a market like this, several dollars of savings means everything! ;) ------------------- Back to original thread... Rick, can you answer my previous question about the fraction-saving you proposed? "When you say that you "RESTORE ACCUM-LO" is this the lower 28-bits of the last y[n]? And what about cascaded IIR's, how would you carry this through each biquad stage?" Thanks, Jeff

Posted by ●December 19, 2007

On Dec 19, 4:17 pm, Vladimir Vassilevsky <antispam_bo...@hotmail.com> wrote:> sparafucile17 wrote: > > WOW... That's creepy. How'd you know it was a Sigma DSP?! I didn't think > > anyone in the world knew about this part other than me. > > It is obvious to anyone who works with the audio. There are only few > so-called DAPs from AD, TI, AKM, Cirrus Logic, NXP. I prefer working > with the true general purpose DSP though.at least (with the genuine, bona fide general purpose DSP - which one would that be?) you get a conditional IF-THEN-ELSE control of program flow. when you don't have a simple branch instruction, it becomes pretty clear how necessary they are to do anything decent. r b-j

Posted by ●December 19, 2007

On Dec 19, 4:08 pm, "sparafucile17" <sparafucil...@hotmail.com> wrote:> >i don't know your instruction set (is this the ADI Sigma DSP?) but > >fraction saving really *is* cheap. consider this as pseudo-code > >(since i dunno the instruction set) > > > CLEAR ACCUM-HI (perhaps this won't be necessary) > > RESTORE ACCUM-LO (whatever you stored at the last sample) > > MAC B0 > > MAC B1 > > MAC B2 > > MAC A1 > > MAC A2 > > STORE ACCUM-HI (this truncated word is your output sample) > > STORE ACCUM-LO > > >that's it. that's all you have to do to implement "fraction saving". > > >r b-j > > WOW... That's creepy. How'd you know it was a Sigma DSP?!i think i heard you mention "28-bit". but the fact is, i didn't know and i was hedging my bets with "pseudocode".> I didn't think > anyone in the world knew about this part other than me. Do you know Bob > Adams or something?i guess so. but i would s'pose other users of the Sigma DSP would recognize the syntax. BTW, even though i looked at the data from ADI a little, i have never used or coded or anything for a Sigma DSP.> When you say that you "RESTORE ACCUM-LO" is this the lower 28-bits of the > last y[n]?no, it's crappy pseudocode from someone who doesn't know the Sigma DSP. i dunno how the indexing works in the Sigma, maybe the STORE ACCUM-LO and RESTORE ACCUM-LO instructions have to work with a different buffer (and index) than whatever those MAC instructions are using.> And what about cascaded IIR's, how would you carry this > through each biquad stage?even for (especially for) cascaded IIRs, you need to quantize at the output of every section (i, and i think Bob, would recommend cascaded Direct Form 1 sections) at least for the feedback states, but also for the input to the next section. so this fraction saving should be employed at every stage. i remember a couple of years ago stopping at the ADI booth at the AES and Bob showing me this. someone else had coded a double-precision IIR kernel for it, and i was trying to explain the difference between "fraction saving" and "double precision" (since fraction saving *does* store a double precision result, but it deals with the high word and low word differently than double precision). anyway, i can't remember who this ADI person was, but i remember that i was not successful at explaining the difference to this person at that time. Jeff, can you tell me how many simultaneous buffers (or buffer pointers) you can have with the Sigma DSP? you might need a couple extra for noise states, if you do noise shaping. r b-j

Posted by ●December 19, 2007

sparafucile17 wrote:> WOW... That's creepy. How'd you know it was a Sigma DSP?! I didn't think > anyone in the world knew about this part other than me.It is obvious to anyone who works with the audio. There are only few so-called DAPs from AD, TI, AKM, Cirrus Logic, NXP. I prefer working with the true general purpose DSP though. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com

Posted by ●December 19, 2007

>i don't know your instruction set (is this the ADI Sigma DSP?) but >fraction saving really *is* cheap. consider this as pseudo-code >(since i dunno the instruction set) > > CLEAR ACCUM-HI (perhaps this won't be necessary) > RESTORE ACCUM-LO (whatever you stored at the last sample) > MAC B0 > MAC B1 > MAC B2 > MAC A1 > MAC A2 > STORE ACCUM-HI (this truncated word is your output sample) > STORE ACCUM-LO > >that's it. that's all you have to do to implement "fraction saving". > > >r b-j >WOW... That's creepy. How'd you know it was a Sigma DSP?! I didn't think anyone in the world knew about this part other than me. Do you know Bob Adams or something? When you say that you "RESTORE ACCUM-LO" is this the lower 28-bits of the last y[n]? And what about cascaded IIR's, how would you carry this through each biquad stage? - Jeff

Posted by ●December 19, 2007

robert bristow-johnson wrote:>>The noise shaping has to be done at every biquad stage. The nonlinear >>thing or a noise gate can be done only once for the whole system, hence >>it could be simpler. > > > in audio, often the filters are a single resonant biquad. but > nonetheless, the nonlinear thingie or noise gate thingie might be > something that leaves audible artifactsAgreed. But quite often there is a tradeoff about how to do it right vs what fits the bill.>>But usually the problem with IIRs is not only because of the limit >>cycles. > > it's a common problem, at least in audio. a *very* common problem. > at least limit cycles with spurious DC in the output. that's a very, > very common scourge of IIR filters in audio.Exactly. The people who didn't work with the audio don't realize how serious this problem can be.>>BTW, BlackFin architecture is very inconvenient >>for that purpose. > > > a long time ago, before there was the "Sigma DSP", i was looking at > Blackfin and decided that, unless one were using the sheer speed of > the chip to do double-precision processing, that it was not really a > good choice for audio.I would rather characterize the speed of BlackFin as moderate, since it is barely adequate for the real time video unpacking. As for the audio, Blackfin can efficiently do MACs with 31 x 31 = 31 bit precision. But for the noise shaping you need all 64 bits of the result, and this is difficult with BlackFin. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com

Posted by ●December 19, 2007

On Dec 19, 1:51 pm, Vladimir Vassilevsky <antispam_bo...@hotmail.com> wrote:> robert bristow-johnson wrote: > > > > i still think that fraction saving is the cheapest means to solve the > > specific problem of limit-cycles in an IIR causing your output to be > > stuck to a non-zero value even when dead silence is going in. unless > > your hardware is designed to do "round-toward-zero", > > The noise shaping has to be done at every biquad stage. The nonlinear > thing or a noise gate can be done only once for the whole system, hence > it could be simpler.in audio, often the filters are a single resonant biquad. but nonetheless, the nonlinear thingie or noise gate thingie might be something that leaves audible artifacts (when the gate opens and closes, whatever) when all we want is a nice and quiet filter that, when silence goes in, the output VU meter goes to -inf dB rather than getting stuck on -65 dB.> But usually the problem with IIRs is not only because of the limit > cycles.it's a common problem, at least in audio. a *very* common problem. at least limit cycles with spurious DC in the output. that's a very, very common scourge of IIR filters in audio. as far as i am concerned, when at all possible (some special purpose signal flow architectures make this difficult or impossible), either dither or this noise-shaping should be used in every fixed-point IIR filter for audio use. and this "fraction saving" (a specific kind of noise shaping applied to "round-to-negative-infinity" truncation) is cheaper than nearly any other decent solution. i might apply triangular p.d.f. dither (and further quantize, perhaps to 16 bit) at the back end of the algorithm, but this fraction saving can be and should be applied to each quantization point in the IIR filter. that is one per biquad in cascade.> The loss of precision is bad, and the only way to deal with that > is the noise shaping. BTW, BlackFin architecture is very inconvenient > for that purpose.a long time ago, before there was the "Sigma DSP", i was looking at Blackfin and decided that, unless one were using the sheer speed of the chip to do double-precision processing, that it was not really a good choice for audio. r b-j