DSPRelated.com
Forums

Thoughts on a 'Companion' FIR Filter Design

Started by cweston July 30, 2015
I have and interesting design that involves designing two filters that are
very related. (I call them companion not to confuse the word with
matched)

Filter 1 is set by the system. That is H(jw_1) in some frequency band
cannot be changed (both magnitude and phase over some frequency band) -
lets call it w0 - w1.  The out of band frequency response can be arbitrary
over the out of band frequency range, call it  (w2 - w3).


Filter 2 frequency response H(jw_2) must exactly Filter 1 in the out of
band region (w2-w3) in both magnitude and phase MINUS some linear term. 
That is, it is ok to add delay to the filter response in Filter 2, but
other than that the magnitude and phase of Filter 2 must match that of
filter 1 in the prescribed range.

I thought this problem was interesting so I approached it using a linear
programming method.  I set constraints on Filter 1 in the unchangeable
region and set some equality constraints on the DFT of the two filters. 
After some time... I DID get some my 'Companion' filters, but not exactly
what I wanted. Very long simulation times and a TON of constraints that
weren't met-- Then I got to scratching my head and figured out this may
not be as easy as I initially thought.


How would you guys approach such a problem?  Do you guys know any methods
out there that are more specific to describing DFT constraints.  Any
modifications that can be done to an Remez Exchange type algorithm?  

I would be interesting in hearing from you.




---------------------------------------
Posted through http://www.DSPRelated.com
On Thu, 30 Jul 2015 09:37:59 -0500, "cweston" <107520@DSPRelated> wrote:

>Filter 2 frequency response H(jw_2) must exactly Filter 1 in the out of >band region (w2-w3) in both magnitude and phase MINUS some linear term.
Filter 2 does NOT have to match Filter 1 (or the system) in the range w0-w1, right?
>That is, it is ok to add delay to the filter response in Filter 2, but >other than that the magnitude and phase of Filter 2 must match that of >filter 1 in the prescribed range. > >How would you guys approach such a problem? Do you guys know any methods >out there that are more specific to describing DFT constraints.
For Filter 1 I would use FDLS with *system* frequency response values in the range w0-w1, but NO frequency response values in the range w2-w3. It will create a filter that matches the system response in the w0-w1 range, but has some unconstrained response in the w2-w3 range. For Filter 2 I would use FDLS with *Filter 1* frequency response values in the range w2-w3, but NO frequency response values in the range w0-w1. It will create a filter that matches the Filter 1 response in the w2-w3 range, but has some unconstrained response in the w0-w1 range. Once you have the FDLS models, you can transform them into DFT coefficients by sampling their frequency responses. Greg
>On Thu, 30 Jul 2015 09:37:59 -0500, "cweston" <107520@DSPRelated> wrote: > >>Filter 2 frequency response H(jw_2) must exactly Filter 1 in the out of >>band region (w2-w3) in both magnitude and phase MINUS some linear term.
> >Filter 2 does NOT have to match Filter 1 (or the system) in the range >w0-w1, right? > >>That is, it is ok to add delay to the filter response in Filter 2, but >>other than that the magnitude and phase of Filter 2 must match that of >>filter 1 in the prescribed range. >> >>How would you guys approach such a problem? Do you guys know any
methods
>>out there that are more specific to describing DFT constraints. > >For Filter 1 I would use FDLS with *system* frequency response values in >the range w0-w1, but NO frequency response values in the range w2-w3. It >will create a filter that matches the system response in the w0-w1 >range, but has some unconstrained response in the w2-w3 range. > >For Filter 2 I would use FDLS with *Filter 1* frequency response values >in the range w2-w3, but NO frequency response values in the range w0-w1. >It will create a filter that matches the Filter 1 response in the w2-w3 >range, but has some unconstrained response in the w0-w1 range. > >Once you have the FDLS models, you can transform them into DFT >coefficients by sampling their frequency responses. > >Greg
--------------------------------------------------------------------
>Filter 2 does NOT have to match Filter 1 (or the system) in the range >w0-w1, right?
Greg Thanks for the reply... I forgot to mention one huge thing. Filter 2 is a half band filter. Every other sample in h[n]_2 is zero. Hence... the filter has to match the filter response of Filter 1 out of band (w2-w3), but in the w0-w1 band there is some implicit conjugate symmetry associated with the response. --------------------------------------- Posted through http://www.DSPRelated.com
On Thu, 30 Jul 2015 10:46:12 -0500, "cweston" <107520@DSPRelated> wrote:

>I forgot to mention one huge thing. Filter 2 is a half band filter. Every >other sample in h[n]_2 is zero. Hence... the filter has to match the >filter response of Filter 1 out of band (w2-w3), but in the w0-w1 band >there is some implicit conjugate symmetry associated with the response.
https://groups.google.com/d/msg/comp.dsp/qgYsnf5aIXs/NSg6VSXhkqoJ https://groups.google.com/d/msg/comp.dsp/qgYsnf5aIXs/X9ubn0kKBQEJ View in fixed-width font.
>On Thu, 30 Jul 2015 10:46:12 -0500, "cweston" <107520@DSPRelated> wrote: > >>I forgot to mention one huge thing. Filter 2 is a half band filter.
Every
>>other sample in h[n]_2 is zero. Hence... the filter has to match the >>filter response of Filter 1 out of band (w2-w3), but in the w0-w1 band >>there is some implicit conjugate symmetry associated with the response.
> >https://groups.google.com/d/msg/comp.dsp/qgYsnf5aIXs/NSg6VSXhkqoJ >https://groups.google.com/d/msg/comp.dsp/qgYsnf5aIXs/X9ubn0kKBQEJ > >View in fixed-width font.
Greg, Thanks for this links. I see you have tackeled this subject in the past. Googleing the FDLS also turned up your paper. thanks for the post. I would like to play with your matlab submission of the FLDS algorithm but it looks like the link to http://apollo.ee.columbia.edu/spm/i=external/tipsandtricks doesn't seem to exist any more. Could you point me to your matlab submission? Ill do some investigation on how to force the alternating zero coefficients and how to make the filter FIR. --------------------------------------- Posted through http://www.DSPRelated.com
On Thu, 30 Jul 2015 11:52:20 -0500, "cweston" <107520@DSPRelated> wrote:

>I would like to play with your matlab submission of the FLDS algorithm >but it looks like the link to >http://apollo.ee.columbia.edu/spm/i=external/tipsandtricks >doesn't seem to exist any more. Could you point me to your matlab >submission?
The Tips and Tricks link has never been very reliable. Send me an email message and I'll send the code to you directly. gjberchin at charter dot net Others are welcome to do the same. Greg