I am designing an FIR filter.my specs are fs=300MHz, Fc=45MHz, Fs=75MHz, passband gain=3dB , stopband attn=>40dB. what parameters I values of a have to provide in firpm for the minimum order filter design. I am putting a=[0.01 0.01]. is it correct?
I suppose you want a low pass filter. Such a filter has one passband and one stopband, and accordingly you need an
a vector with 4 elements:
- the desired magnitude at frequency $0$
- the desired magnitude at the passband edge ($f_c$)
- the desired magnitude at the stopband edge ($f_s$)
- the desired magnitude at Nyquist
If I understood your specs correctly, you should use
a = [sqrt(2) sqrt(2) 0 0], and your
f vector is
f = [0 0.3 0.5 1] because you need to normalize $f_c$ and $f_s$ by the Nyquist frequency $f_s/2=150$MHz. I would suggest you just try some values of
n until you reach the desired stopband attenuation. Since you didn't specify any maximum passband ripple, the response in the passband will be fine anyway. If not, you can add a weight vector to trade off maximum passband ripple with stopband attenuation. See the MathWorks documentation on how to do this.