DSPRelated.com
Forums
Online · Live + on demand
February 9-11, 2027
Price goes up Nov 1: register now to lock in today's rate
Register Now →

Digital filter simulators?

Started by Joerg ●December 18, 2005
"Joerg" <notthisjoergsch@removethispacbell.net> wrote in message
news:0PGpf.43240$6e1.27620@newssvr14.news.prodigy.com...
> Hello Rune, > > > > Out of curiosity: What is "coefficient granularity"? > > Never heard the term before. > > > > The reduction of the total available number of coefficients to less than > the word width would theoretically allow. IOW causing the selection to > be more granular than usual.
I'm fairly sure that we've had discussions on comp.dsp where the filter coeffs were restricted to powers of two - this would help eliminate the need for hw multipliers. I remember there was atleast one paper cited in the discussion. You might want to google with 'fir' and 'power of 2 coeffs' or something similar to see if you can find this thread. Here is one paper that seems to talk about this http://www.ittc.ku.edu/Projects/FPGA/Filters_and_CAD.pdf I think Y.C.Lim is another author that has done some work in this area - you can try using his name in your search criteria as well. Ah...here is the thread I was talking about http://tinyurl.com/dt9td Cheers Bhaskar
> > For example let's say a certain project cannot afford a device with a HW > multiplier and must also run on batteries, limiting the processor clock > frequency. To save on processor cycles the amount of ones in an eight > bit data word that is to be used as a multiplier may have to be limited > to, say, four or five. > > Granularity is probably not a common word in the DSP world. It is often > used in radar and ultrasound beamforming which is my home turf. > > Regards, Joerg > > http://www.analogconsultants.com
Hello Bhaskar,
> > Ah...here is the thread I was talking about > http://tinyurl.com/dt9td > >
Thank you. That thread also mentioned the other important term you DSP guys use, Canonic Signed Digit. So now I can search some more. I can afford some shift-adds, just not a whole lot. HW multipliers must be like those premium channels on cable TV that you only get when you pay a whole lot more (we don't have cable TV at all...). Regards, Joerg http://www.analogconsultants.com
Hello Tim,
> > You should stick to "quantization" if you want us poor DSP types to > understand. >
Ok, I'll try to be better in the future. Quantization it is. I guess I'll also have to lose some other slang, apodization, CFAR and all that. Regards, Joerg http://www.analogconsultants.com
Joerg wrote:

> Hello Tim, > >> Jeorg: You mean quantization, right? >> > > Kind of. It's like picking the low hanging fruit, coefficients that have > the least number of ones in there. I have pretty much given up on the > luxury of a HW multiplier for the project at hand (or the proposal > thereof). Too expensive. > > >> You shouldn't overlook data quantization, either. Both coefficient >> and data quantization can be easily modeled and analyzed without >> having to simulate, although its usually a good idea to simulate so >> you'll find out what you forgot to account for. >> > > True. In my case it might not easily work though because I have to > filter first and then 'level select'. I need a huge dynamic range. > Ranging before the filters would cost too much precious horsepower and > RAM. So data will be 16 bits while the coefficients are probably going > to have to be 6-8 bits. > > Regards, Joerg > > http://www.analogconsultants.com
I'm not sure what you mean by 'level select'. You can still analyze for the effect of coefficient quantization. It doesn't get as much attention as data quantization in the DSP world, perhaps because its a better defined problem -- data quantization must be treated as noise or simulated, with coefficient quantization you can just calculate the transfer functions post-quantization and go from there. If you are analyzing things in the frequency domain you can generate trial filters and generate bode plots for them with a number of packages (including Scilab). If you're doing stuff in the time domain then yes, you'll have to simulate (but Scilab will do that pretty quick, too). If you have something advanced like Scilab, Matlab or Octave you can give it some rules for finding coefficients that don't have too many ones and do a massive search for the 'best' one. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Joerg wrote:

> Hello Bhaskar, > >> >> Ah...here is the thread I was talking about >> http://tinyurl.com/dt9td >> >> > Thank you. That thread also mentioned the other important term you DSP > guys use, Canonic Signed Digit. So now I can search some more. > > I can afford some shift-adds, just not a whole lot.
I recall seeing a paper from IEEE CCS about efficient ways of implementing multiplies for coefficients with lots of ones. It boiled down to recognizing that (for example) 15 = 16 - 1, so computing (x << 4) - x was quicker that computing (x << 3) + (x << 2) + (x << 1) + x and came up with the same result. You ended up with at worst 1/2 as many shift-and-adds (with a coefficient that goes 10101010...) as the maximum for a coefficient of 11111111. You could even write an assembler macro for this if you had a good enough macro assembler.
> HW multipliers must > be like those premium channels on cable TV that you only get when you > pay a whole lot more (we don't have cable TV at all...).
We have a cable modem. It really ticks my kid off that we don't also have cable TV. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Hello Tim,
> > I'm not sure what you mean by 'level select'. >
It is the determination of how much energy there is in one frequency range versus the others. There can also be nothing there, just unwanted spectra or noise. The level of the input signal is not known except that it will (have to) fit into 16 bits.
> You can still analyze for the effect of coefficient quantization. It > doesn't get as much attention as data quantization in the DSP world, > perhaps because its a better defined problem -- data quantization must > be treated as noise or simulated, with coefficient quantization you can > just calculate the transfer functions post-quantization and go from there. >
Alfred Fettweis did that for WDF and maybe I can find a copy of his 1986 IEEE paper. The other paper was from Ulrich Kaiser but almost as long ago in a German magazine so maybe that one is gone by now.
> If you are analyzing things in the frequency domain you can generate > trial filters and generate bode plots for them with a number of packages > (including Scilab). If you're doing stuff in the time domain then yes, > you'll have to simulate (but Scilab will do that pretty quick, too). If > you have something advanced like Scilab, Matlab or Octave you can give > it some rules for finding coefficients that don't have too many ones and > do a massive search for the 'best' one. >
I'd love to but I am not that good with programs like Scilab. It's a steep learning curve. I'll probably wing it to get something prototyped and then analyze and verify that it is stable. Or punch a behaviorial model into SPICE and simulate that. Meantime I also found good design hints in a book from Otto Mildenberger (only got the German version). It came with a DOS design tool that I bought in the late 80's and where it might thus be possible to hack the coefficients. The only question now is where'd I put it? Luckily I kept an old 5 1/4" floppy drive. Regards, Joerg http://www.analogconsultants.com
Hello Tim,

> I recall seeing a paper from IEEE CCS about efficient ways of > implementing multiplies for coefficients with lots of ones. It boiled > down to recognizing that (for example) 15 = 16 - 1, so computing (x << > 4) - x was quicker that computing (x << 3) + (x << 2) + (x << 1) + x and > came up with the same result. You ended up with at worst 1/2 as many > shift-and-adds (with a coefficient that goes 10101010...) as the maximum > for a coefficient of 11111111. > > You could even write an assembler macro for this if you had a good > enough macro assembler. >
That would be neat. Looks like one more reason why this stuff usually isn't done in C.
>> HW multipliers must be like those premium channels on cable TV that >> you only get when you pay a whole lot more (we don't have cable TV at >> all...). > > We have a cable modem. It really ticks my kid off that we don't also > have cable TV. >
It's a good thing that you don't have cable TV. I see it destroy healthy family living all around us in the neighborhood. But how did you manage to get cable modem w/o TV? They send all these fliers around but when I called they told me that the bargain rates are only applicable when also subscribing to their TV. No way. Without TV the cable modem monthly rate shoots up to well above DSL. So I kept DSL. Regards, Joerg http://www.analogconsultants.com
Joerg wrote:
> Hello Tim, > >> I recall seeing a paper from IEEE CCS about efficient ways of >> implementing multiplies for coefficients with lots of ones. It boiled >> down to recognizing that (for example) 15 = 16 - 1, so computing (x << >> 4) - x was quicker that computing (x << 3) + (x << 2) + (x << 1) + x >> and came up with the same result. You ended up with at worst 1/2 as >> many shift-and-adds (with a coefficient that goes 10101010...) as the >> maximum for a coefficient of 11111111. >> >> You could even write an assembler macro for this if you had a good >> enough macro assembler. >> > > That would be neat. Looks like one more reason why this stuff usually > isn't done in C. > > >>> HW multipliers must be like those premium channels on cable TV that >>> you only get when you pay a whole lot more (we don't have cable TV at >>> all...). >> >> >> We have a cable modem. It really ticks my kid off that we don't also >> have cable TV. >> > > It's a good thing that you don't have cable TV. I see it destroy healthy > family living all around us in the neighborhood. But how did you manage > to get cable modem w/o TV? They send all these fliers around but when I > called they told me that the bargain rates are only applicable when also > subscribing to their TV. No way. Without TV the cable modem monthly rate > shoots up to well above DSL. So I kept DSL. > > Regards, Joerg > > http://www.analogconsultants.com
(a) it's an itty bitty telephone cooperative & cable TV company (b) when I called about DSL they told me "we don't do that; for broadband we do cable modems" (c) I didn't ask about rates for the modem if I succumbed to the TV thing. We have enough trouble pulling the kids off of the half-dozen channels that we get, why should I want to get 50 or 100? -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Hello Tim,

> (c) I didn't ask about rates for the modem if I succumbed to the TV > thing. We have enough trouble pulling the kids off of the half-dozen > channels that we get, why should I want to get 50 or 100? >
What entices them to watch? We get the same aerial coverage, actually a dozen channels but half of them in Spanish. Thought there'd be some good old Christmas movies this week but when the TV guide came with the morning paper we found a grand total of three. Pretty sad. I found the Mildenberger filter program in the CAD binder to try if I can do coefficient wiggling with it. Cool. Whenever I fire up one of those old DOS dinosaurs I am amazed how fast they are. It states that an IBM XT with at least 300K of RAM is required and now it probably thinks it's sitting on a rocket. Regards, Joerg http://www.analogconsultants.com
"Joerg" <notthisjoergsch@removethispacbell.net> wrote in message 
news:FXIpf.35147$dO2.14183@newssvr29.news.prodigy.net...
>> >> We have a cable modem. It really ticks my kid off that we don't also have >> cable TV. >> > > It's a good thing that you don't have cable TV. I see it destroy healthy > family living all around us in the neighborhood. But how did you manage to get > cable modem w/o TV? They send all these fliers around but when I called they > told me that the bargain rates are only applicable when also subscribing to > their TV. No way. Without TV the cable modem monthly rate shoots up to well > above DSL. So I kept DSL.
Around here, the cable company charges about $10 extra per month if you get cable modem without some type of cable TV service. The cheapest cable TV you can get (basic service, which includes the local over-air channels and a few extras) costs slightly more than $10. So usually people opt to get the basic service since it is essentially almost free. But you can choose to pay the extra $10 instead if you want. In the hilly area I live in, over-air reception can be bad to non-existent for many people even with a good antenna, so the basic cable service is popular.