| Author |
Message |
Bhaskar Thiagarajan
Guest
|
Posted:
Tue Dec 20, 2005 1:16 am Post subject:
Re: Digital filter simulators? |
|
|
"Joerg" <notthisjoergsch@removethispacbell.net> wrote in message
news:0PGpf.43240$6e1.27620@newssvr14.news.prodigy.com...
| Quote: | 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
| Quote: |
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 |
|
|
| Back to top |
|
 |
Joerg
Guest
|
Posted:
Tue Dec 20, 2005 1:16 am Post subject:
Re: Digital filter simulators? |
|
|
Hello Bhaskar,
| Quote: |
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 |
|
| Back to top |
|
 |
Joerg
Guest
|
Posted:
Tue Dec 20, 2005 1:16 am Post subject:
Re: Software documentations Was: Digital filter simulators? |
|
|
Hello Rune,
| Quote: | So what I have done in my programming projects, is to write the
basics in LaTeX and document the code so that HTML documents
can be generated with Doxygen. These tools are free, and are
available to students, but can not necessarily be used by companies.
Are there alternatives available that can be used in commercial
projects,
that can be used for other programming languages than C/C++?
|
No idea, I don't code much. But if I do I document everything in HTML.
Code, module specs, schematics, revision history and so on. I am a
strong believer that source code comments are not a sufficient form of
documentation.
Regards, Joerg
http://www.analogconsultants.com |
|
| Back to top |
|
 |
Joerg
Guest
|
Posted:
Tue Dec 20, 2005 1:16 am Post subject:
Re: Digital filter simulators? |
|
|
Hello Sivakanth,
| Quote: | Try Octave! The syntax is very much similar to MATLAB
|
Would love to. But I am not a great MATLAB user either. I need something
that is simple, like some of the configurable FFT programs out there. A
few of these almost do what I need but stop just short of coefficient
granularization.
Regards, Joerg
http://www.analogconsultants.com |
|
| Back to top |
|
 |
Rune Allnor
Guest
|
Posted:
Tue Dec 20, 2005 1:16 am Post subject:
Re: Digital filter simulators? |
|
|
Joerg wrote:
| Quote: | I have some filter design software that came with DSP books but they
don't go that far. They assume 'ideal' coefficient granularity base on
the available word width. Didn't find anything with Google but maybe I
hadn't used optimal search phrases.
|
Out of curiosity: What is "coefficient granularity"?
Never heard the term before.
Rune |
|
| Back to top |
|
 |
Joerg
Guest
|
Posted:
Tue Dec 20, 2005 1:16 am Post subject:
Re: Digital filter simulators? |
|
|
Hello Tim,
| Quote: |
If someone would fund me, and if I thought the Scilab team would pay
attention, I'd love to dig in and write _good_ documentation for that
package.
|
That's exactly the point. Many excellent SW packages and even some uC
are so poorly documented that they don't make it into mainstream for
that reason. Academians often won't go below the highest level of
abstraction and there are no "Heathkit style" grunt work examples. But
all this will be needed to get engineers on board. Especially the busy
ones who can't spend weeks reading up on stuff.
Even in many books it's like that. My favorite here is Haddad Parsons
but when it comes to practical implementation they immediately assume
you can always have the horsepower of a TMS320. Well, it just ain't so
with most projects. Sometimes you'll simply have to concede and accept
that there absolutely will not be a HW multiplier because it's 50 cents
too much. It is like the farmer who has to make do with his old F250
because he can't have that new truck with the Cummins in there.
Regards, Joerg
http://www.analogconsultants.com |
|
| Back to top |
|
 |
Rune Allnor
Guest
|
Posted:
Tue Dec 20, 2005 1:16 am Post subject:
Software documentations Was: Digital filter simulators? |
|
|
Joerg wrote:
| Quote: | Hello Tim,
If someone would fund me, and if I thought the Scilab team would pay
attention, I'd love to dig in and write _good_ documentation for that
package.
That's exactly the point. Many excellent SW packages and even some uC
are so poorly documented that they don't make it into mainstream for
that reason. Academians often won't go below the highest level of
abstraction and there are no "Heathkit style" grunt work examples. But
all this will be needed to get engineers on board. Especially the busy
ones who can't spend weeks reading up on stuff.
|
Academics don't know what the term "documentation" means. A couple of
weeks ago, the professor who took up the methods and techniques I used
to work with, called me and wanted to discuss some questions. The
questions concerned a computer I last worked with 5 years ago, that I
got
10 years ago from somebody who had modified 15 years old public domain
code. The "documentation" of the original PD code consisted of a 6-page
short summary of a general technique, where some variables were
stated "without proof". In the program (Fortran 77) the variables
were named as "acc", "bb", "cmn"... with no comments and apparently
with no connection to the article. The program was written in the
"implicit declaration" style that fortran allows, where a variable
needs
not be declared but where its data type (real, complex, integer) is
implicitly given by its name. An utter nightmare. The professor had
spent two months getting the thing to compile and run, due to the less
than standardized way fortran works. It would have been way faster to
write the program from scratch.
I'm happy that other people take over those tasks; I'm pretty fed up
with the stuff. But if I ever get a call like that again, I'll charge
$250 per
hour.
So what I have done in my programming projects, is to write the
basics in LaTeX and document the code so that HTML documents
can be generated with Doxygen. These tools are free, and are
available to students, but can not necessarily be used by companies.
Are there alternatives available that can be used in commercial
projects,
that can be used for other programming languages than C/C++?
Rune |
|
| Back to top |
|
 |
Joerg
Guest
|
Posted:
Tue Dec 20, 2005 1:16 am Post subject:
Re: Digital filter simulators? |
|
|
Hello Tim,
| Quote: |
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.
| Quote: | 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.
| Quote: | 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 |
|
| Back to top |
|
 |
Tim Wescott
Guest
|
Posted:
Tue Dec 20, 2005 1:16 am Post subject:
Re: Digital filter simulators? |
|
|
Joerg wrote:
| Quote: | 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.
| Quote: | 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 |
|
| Back to top |
|
 |
Tim Wescott
Guest
|
Posted:
Tue Dec 20, 2005 1:16 am Post subject:
Re: Digital filter simulators? |
|
|
Joerg wrote:
| Quote: | 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 |
|
| Back to top |
|
 |
Joerg
Guest
|
Posted:
Tue Dec 20, 2005 1:16 am Post subject:
Re: Digital filter simulators? |
|
|
Hello Tim,
| Quote: |
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 |
|
| Back to top |
|
 |
Joerg
Guest
|
Posted:
Tue Dec 20, 2005 7:16 am Post subject:
Re: Digital filter simulators? |
|
|
Hello Tim,
| Quote: | 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.
| Quote: | 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 |
|
| Back to top |
|
 |
Tim Wescott
Guest
|
Posted:
Tue Dec 20, 2005 7:26 am Post subject:
Re: Digital filter simulators? |
|
|
Joerg wrote:
| Quote: | 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 |
|
| Back to top |
|
 |
Joerg
Guest
|
Posted:
Tue Dec 20, 2005 7:54 am Post subject:
Re: Digital filter simulators? |
|
|
Hello Tim,
| Quote: | (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 |
|
| Back to top |
|
 |
Jon Harris
Guest
|
Posted:
Tue Dec 20, 2005 9:16 am Post subject:
Re: Digital filter simulators? |
|
|
"Joerg" <notthisjoergsch@removethispacbell.net> wrote in message
news:FXIpf.35147$dO2.14183@newssvr29.news.prodigy.net...
| Quote: |
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. |
|
| Back to top |
|
 |
|
|
|
|