Prev: FFT Return Values
Next: free space optics....
From: Pete Fraser on 7 Aug 2010 21:26 I'm new to Matlab, and to IIR design, so sorry in advance if these questions are dumb. I've been playing with filterbuilder and FDATool just to get familiar with the options / design flow. There seems to be a lot of overlap. Why would somebody want to use filterbuilder rather the FDATool? Say I design a 6th order, DFII Butterworth LPF, with Fs = 48000 and Fc = 10800. I do a fixed point quantization with the default settings. Input word length is 16, and input fraction length 15. I assume that means that the input is considered to run from -1.0 to +(2^15 -1)/2^15. Is that correct? When the "avoid overflow" box on the output is checked, it seems to operate as a 16 bit output with a fraction length of ten bits. Why is that? I would have assumed that, if the input is considered to have one bit before the point, then the output would need two bits to accommodate overshoots in the step response. Why are six bits needed? I'm not sure what the Magnitude Response Estimate does. I'm guessing it shows the difference between a white pseudo-noise input and the associated ouput spectrum. The response in the stop-band is a combination of the actual frequncy resposne, and the stop-band noise caused by pass-band components being quantized. Is that right? Thanks Pete
From: Steve Pope on 7 Aug 2010 22:06 Pete Fraser <pfraser(a)covad.net> wrote: >I'm new to Matlab, and to IIR design, so >sorry in advance if these questions are dumb. > >I've been playing with filterbuilder and FDATool >just to get familiar with the options / design flow. >There seems to be a lot of overlap. > >Why would somebody want to use filterbuilder rather >the FDATool? > >Say I design a 6th order, DFII Butterworth LPF, >with Fs = 48000 and Fc = 10800. > >I do a fixed point quantization with the default settings. >Input word length is 16, and input fraction length 15. > >I assume that means that the input is considered to run >from -1.0 to +(2^15 -1)/2^15. Is that correct? > >When the "avoid overflow" box on the output is checked, >it seems to operate as a 16 bit output with a fraction length >of ten bits. Why is that? I would have assumed that, if the >input is considered to have one bit before the point, then >the output would need two bits to accommodate >overshoots in the step response. Why are six bits needed? > >I'm not sure what the Magnitude Response Estimate does. >I'm guessing it shows the difference between a white >pseudo-noise input and the associated ouput spectrum. >The response in the stop-band is a combination of the actual >frequncy resposne, and the stop-band noise caused by >pass-band components being quantized. Is that right? I guess my first recommendation would be to use fdatool to generate the (full precision) filter coefficients, then do your own quantization study from scratch. This will avoid putting you in the position of having to guess what the tool is doing. Steve
From: Rick Lyons on 8 Aug 2010 08:35 On Sun, 8 Aug 2010 02:06:42 +0000 (UTC), spope33(a)speedymail.org (Steve Pope) wrote: >Pete Fraser <pfraser(a)covad.net> wrote: > >>I'm new to Matlab, and to IIR design, so >>sorry in advance if these questions are dumb. >> [Snipped by Lyons] >> >>I'm not sure what the Magnitude Response Estimate does. >>I'm guessing it shows the difference between a white >>pseudo-noise input and the associated ouput spectrum. >>The response in the stop-band is a combination of the actual >>frequncy resposne, and the stop-band noise caused by >>pass-band components being quantized. Is that right? > >I guess my first recommendation would be to use fdatool to generate >the (full precision) filter coefficients, then do your own quantization >study from scratch. This will avoid putting you in the position >of having to guess what the tool is doing. > > >Steve Hi Steve, I agree with your advice to Pete. Although I might even go further and suggest that Pete not use the fdatool software either. I say that because some time ago I was experimenting with the fdatool software, on a company computer, and that software seemed a little "buggy" to me. (For example, I designed a high-order tapped-delay line FIR lowpass filter. Then when I tried to view its impulse response, the software gave me an error message!! This is not a good thing.) I believe the safest thing to do is write your own in-line MATLAB code, that way you know exactly what the code is doing. [-Rick-]
From: Richard Owlett on 8 Aug 2010 15:21 Rick Lyons wrote: > [Much snipped by Owlett] > I believe the safest thing to do is write your own > in-line MATLAB code, that way you know exactly what > the code is doing. > I would like to paraphrase, for benefit of students and other NEWBIES, as: 'the safest thing to do is write your own {insert tool of choice} code, that way you know exactly what the code is doing. You might also learn why designer made specific choices. Not to mention that you discover holes in your understanding.' By expertise I'm a newbie, by age I'm older than most of group ;)
From: Steve Pope on 8 Aug 2010 16:46
Richard Owlett <rowlett(a)pcnetinc.com> wrote: >Rick Lyons wrote: >> I believe the safest thing to do is write your own >> in-line MATLAB code, that way you know exactly what >> the code is doing. >I would like to paraphrase, for benefit of students and other >NEWBIES, as: >'the safest thing to do is write your own {insert tool of choice} > code, that way you know exactly what the code is doing. You >might also learn why designer made specific choices. Not to >mention that you discover holes in your understanding.' >By expertise I'm a newbie, by age I'm older than most of group ;) I doubt you're a newbie in any normal sense of the term. Back to the OP's problem -- it occurs to me that if he is intending to use fdatool's design path through to HDL generation, then he is probably stuck figuring out how the tool's fixed-point modes work, thus making the advice given in this thread of limited value. (But I would still do a grounds-up quantization study independent of the tool even in this case, approaching it as I outlined in response to OP's previous question.) Steve |