DSPRelated.com
Forums

Matlab support for "Frequency-Response Masking" filter design technique

Started by cangiane 1 year ago5 replieslatest reply 1 year ago201 views

Hi all,

Does anyone know whether Matlab includes support for the "Frequency-Response Masking" (FRM) filter design technique first described in:

Y. C. Lim, “Frequency-response masking approach for the synthesis of sharp linear phase digital filters,” IEEE Trans. Circuits Syst., vol. CAS-33, pp. 357–364, Apr. 1986.

"ifir" seems to be a pretty close match, but the FRM approach calls for two masking filters and ifir (as far as I can see) only generates one.

I've not used the FRM approach before and would also be curious to hear about experience others have had with it and any comparisons/tradeoffs with other methods for designing very sharp FIR filters.

Thanks in advance.

Pete

[ - ]
Reply by rbjMay 10, 2023

I had explored this title before and I could not make it work as promised.  It seemed to me to be a little "something for nothing" trick, which also means "If it sounds too good to be true, it probably is."

Here's a good link to someone else's presentation of the technique.  Page 24 is a good pic.

So you design a linear-phase FIR using firpm() or firls() or kaiser() or whatever is your heart's content.  Then you make that filter transition band sharper by making it longer, but you're making it longer by inserting M-1 zeros between each sample of h[n].  But this causes repetitions of the original (and scrunched) LPF in the frequency response.  Then the trick is using the masking filter to mask out the repetitions you don't want.

But multiplying by the masking filter in the frequency domain causes convolution in the time domain.  So then those zeros get filled in because of the convolution of each non-zero sample with the impulse response of the masking filter.

I didn't get how it actually saves you with regularly-spaced zero tap values that can be easily skipped over.

If your end result is an FIR that is linear phase, I would just use firpm() or firls() or kaiser() and see what's the best you can get for a given FIR length.







[ - ]
Reply by Rick LyonsMay 10, 2023
Hi Robert.
The process you describe in your third paragraph describes what's called
an "interpolated FIR" (IFIR) filter. The value of these two-stage IFIR
filters is they can implement narrowband lowpass linear-phase filtering
in a computationally efficient way.

Page 3 of my paper, at the following web page, gives a simple example
of how an IFIR filter reduces a narrowband lowpass filter's computational
workload by roughly 50% over a single-stage traditional FIR lowpass filter:

https://www.researchgate.net/publication/3321449_I...
[ - ]
Reply by kazMay 10, 2023

Hi Pete,


You can model ifir using freqz as in following example (4 delay stages):

You can model 4 delay stages as if each prototype coeff is followed by 3 zero coeffs. 

%%%%%%%%%%%%%%%%%%%%

h = fir1(40,.3);

hz = zeros(1,length(h)*4);

hz(1:4:end) = h;

freqz(hz);

%%%%%%%%%%%%%%%%%%%

you can then apply a gentle LPF to get rid of images

[ - ]
Reply by cangianeMay 10, 2023

Thanks everyone for the quick replies.  The "Interpolated FIR" (IFIR) and "Frequency-Response Masking" (FRM) concepts are clear to me.  With regard to relevant design support in Matlab, "ifir" certainly supports IFIR and *seems* to support FRM as well (its support for wideband lowpass and narrowband highpass filters is what leads me to believe the latter).  What's still a bit confusing is that ifir only returns one mask filter whereas FRM - as originally defined - has two (one following the bandedge-shaping filter and one following the complementary bandedge-shaping filter):


I should have some time today to dig a little deeper into the Matlab implementation ... will report back if it becomes clearer.  Incidentally, I'm using Matlab version R2020a.

Thanks.

Pete

[ - ]
Reply by kazMay 10, 2023

In principle you need a cascade of ifir followed by an image suppressor for your target passband. Whether this image suppressor is one filter or two is up to user. Matlab ifir gives ifir h(z) followed by g(z) suppressor.

Apart from images, ifir is equivalent to interpolating prototype filter itself. The advantage of ifir is that the zeros need no storage or multipliers at the expense of image suppressor which could be relaxed.