DSPRelated.com
Forums

Duplicating coefficients generated by Matlab's firpm/remez function

Started by cford April 12, 2005
"cford" <cameron.p.ford@L-3com.com> wrote in message 
news:hMCdnYudQojWYsLfRVn-tA@giganews.com...
> All, > Once again thanks for your help. I have been able to duplicated the > coefficients almost perfectly for the few small Low Pass filters that I > have tried so far. It actually was quite surprizing to see that it > duplicats Matlab so closely. I thought there would be some variation. > Maybe I will see differences as I try more complicated filters? When I > first posted I was seeing quite a deviation (which is why I posted), but > that was due to a bug where the Lagrange interpolation was being done on > one too many points as well as trying to use the same coefficients for the > delta calculation and the interpolation calculation. I finally realized > that these coefficient equations look identical except that the delta > coefficients equation goes one step further than the interpolation > coefficient equation.
...... Don't be surprised. In principle they all should agree exactly. It's not as if the approach is different or if the basis functions were different. There is one and only one best minimax solution to the problem that is posed. This comes in the proof that the method(s) converges and that the solution gets better at each iteration. So, variations have to be in roundoff errors and the stopping criterion - still heading toward the same unique solution. Fred
David Kirkland wrote:

> I played with Jake Janovetz's code. I modified it to work in double > precision. In comparing it to the matlab results, when the filters
you
> require get longer then the differences show up. > > For Jake's code I was able to design filters around 1000 taps. Using > matlab I was able to get filters around 1600-1800 taps. > > If you are able to find an older version of matlab the low level
design
> function is implemented as an m file. At the start of version 6 they
put
> it in as a built in function.
In Matlab 7 the remez function is tagged as "obsolete". Don't be surprised if it is replaced by something in the Signal Processing Toolbox when Matlab 8 is released.
> Even in matlab there are differences in different versions. On an
older
> version I wouldn't get convergence - on the newer version it appears
to
> converge just fine.
I checked out the recent Parks/McClellan article Stan mentioned. The authors are very clear on that they used some sort of interpolation routine they claim to be particularly robust in the first place, and that they fiddeld a bit with it, to ensure convergence. You should check the paper out. It's available through IEEExplore. Rune