# Berchin's FDLS arbitrary filter design algorithm

I'm trying to use Berchin's FDLS methods (for those that don't know what it is, it's a way to design arbitrary magnitude and phase of an IIR Eq)

I tried different things but neither gave me what i asked:

1. I tried to design an allpass filter with arbitrary phase response (nothing fancy just a linear phase and a short deviation for 5 points) and it didn't worked as planned. Actually what i want to do is to counter the phase change of an IIR filter

2. I tried a linear phase response for a $-12\textrm{ dB}$ notch and the same way it didn't worked (in black the desired response)

I used a samplerate of $316$, $M=158$ points and a filter order of around $50$.

Do I need to use more points to increase the filter order or is it just impossible to design my filters using that algorithm?

• @PeterK.: Although it is brief, you might consider making that an answer. Since the OP seems to have disappeared, there probably won't be any better resolution to the problem. Commented Sep 22, 2013 at 23:59
• @JasonR: Done! And set to Community Wiki.
– Peter K.
Commented Sep 23, 2013 at 14:59

I haven't used the technique, but an IIR filter order of 50 sounds remarkably high, and possibly prone to numerical problems. Try starting out with much smaller values for M and filter order, and slowly ramping them up. The paper you quote uses $M=8$ and $N=9$.