GSoC: Filter Design tool update

Hi all,

A brief update on the new features added to the filter design tool[1]

–IIR Filter Design (Scipy Based)
-Butterworth
-Elliptic
-Chebyshev-1
-Chebyshev-2
-Bessel
–Pole-zero plot now supports addition, deletion of poles/zeros with
conjugate support.

A small video showing some of the added features can be found here[2].

At first I started using Robert McGwier’s existing code[3] and added
features to that as suggested by Tom and Martin. Later finding that
Scipy’s filter design functions[4] are very much optimized and robust, I
decided to use those. Martin also pointed out that it will just be a
duplication of work and suggested me to use scipy for IIR design.

I did a basic integration of the code to gr-filter component of GNU
Radio[5]. I haven’t pushed icons yet to the branch. It would be really
helpful if anyone can comment on the current integration, so that I can
make suitable modifications.

In next few weeks I will be adding some special filters like half-band
filter to the design tool, then will proceed with integration of
gr_filter_design to GRC and will try to add QA tests for filter design
routines wherever they are missing.

[1]GitHub - zeroXzero/gr-filtdes: Filter design module for gnuradio

[2]GSOC: New features in GNU Radio filter design tool - YouTube
[3]http://gnuradio.org/cgit/n4hy.git/log/?h=n4hy_iir
[4]Signal processing (scipy.signal) — SciPy v1.11.1 Manual
[5]https://github.com/zeroXzero/gnuradio-sreeraj Branch: filtdes_gui


Regards
Sreeraj Rajendran
http://home.iitb.ac.in/~rsreeraj

In next few weeks I will be adding some special filters like
half-band filter to the design tool, then will proceed with
integration of gr_filter_design to GRC and will try to add QA tests
for filter design routines wherever they are missing.

Need any help with the GRC integration? I know there was some talk about
creating modules to call into, etc so the hooks into GRC would be
simpler.

Let me know.
Thanks!
-josh

On Mon, Jul 23, 2012 at 2:24 PM, Josh B. [email protected] wrote:

In next few weeks I will be adding some special filters like
half-band filter to the design tool, then will proceed with
integration of gr_filter_design to GRC and will try to add QA tests
for filter design routines wherever they are missing.

Need any help with the GRC integration? I know there was some talk about
creating modules to call into, etc so the hooks into GRC would be simpler.

This would be great.

Johnathan

In next few weeks I will be adding some special filters like
half-band filter to the design tool, then will proceed with
integration of gr_filter_design to GRC and will try to add QA tests
for filter design routines wherever they are missing.

Need any help with the GRC integration? I know there was some talk about
creating modules to call into, etc so the hooks into GRC would be simpler.

Let me know.
Thanks!
-josh

Could you please share the discussion link if there is one. You and
Martin already gave me various hints regarding this before. Still if
there is a standard way of doing this, that info will be really helpful.

regards
Sreeraj

On 07/23/2012 10:15 PM, sreeraj r wrote:

would be simpler.

Let me know. Thanks! -josh

Could you please share the discussion link if there is one. You and
Martin already gave me various hints regarding this before. Still if
there is a standard way of doing this, that info will be really
helpful.

I didnt mean to imply that there was some kind of formal discussion tool
like a forum thread. I was just referring to these emails:

https://lists.gnu.org/archive/html/discuss-gnuradio/2012-05/msg00142.html

https://lists.gnu.org/archive/html/discuss-gnuradio/2012-05/msg00146.html

I think that a new parameter tag would include an import statement and a
function to call. Example:

Taps taps [0] float_vector from gnuradio.filter import awesome awesome.function_to_call
  • I guess the idea would be that GRC adds a gui button the parameter
    that will invoke this launcher. It then calls
    awesome.function_to_call(current_param_setting) and when the function
    returns, the new value is set for the parameter.

  • Its not the only way to do this but that is one way to solve the
    problem in a generic fashion. I think the important part vs the idea you
    first purposed is that GRC does not have to know how to execute a
    program, it just calls a python function, which is something that it can
    easily do.

  • Once such a launcher is possible, it would not only be nice to add
    this to blocks with parameters that take taps. But it would also be nice
    to add a new variable block to GRC that simultaneously allows the user
    to use this tool, but set its output to a GRC variable. Because I think
    that it will be more desirable in certain cases to set the result to a
    variable.

  • Another block idea, how-about a GRC block that instantiates a GUI
    element that also calls the filter generation tool and sets the taps in
    a callback like fashion. This would give you access to using this tool
    in a live/running flowgraph!

Let me know what you think,
-josh

I didnt mean to imply that there was some kind of formal discussion tool
like a forum thread. I was just referring to these emails:

Re: [Discuss-gnuradio] GRC: New xml tags

Re: [Discuss-gnuradio] GRC: New xml tags

awesome.function_to_call

  • I guess the idea would be that GRC adds a gui button the parameter
    that will invoke this launcher. It then calls
    awesome.function_to_call(current_param_setting) and when the function
    returns, the new value is set for the parameter.
  • Its not the only way to do this but that is one way to solve the
    problem in a generic fashion. I think the important part vs the idea you
    first purposed is that GRC does not have to know how to execute a
    program, it just calls a python function, which is something that it can
    easily do.

Ok. I will proceed as you mentioned.

  • Once such a launcher is possible, it would not only be nice to add
    this to blocks with parameters that take taps. But it would also be nice
    to add a new variable block to GRC that simultaneously allows the user
    to use this tool, but set its output to a GRC variable. Because I think
    that it will be more desirable in certain cases to set the result to a
    variable.
  • Another block idea, how-about a GRC block that instantiates a GUI
    element that also calls the filter generation tool and sets the taps in
    a callback like fashion. This would give you access to using this tool
    in a live/running flowgraph!

Let me know what you think,
-josh

Some users may just need fixed taps and some would like change those
during runtime. I haven’t looked into the code for flowgraph creation
and execution of GRC yet, still it seems to be reasonable to give access
to the filter design tool while the flowgraph is running. I will discuss
this with Martin during the next call (I am sure he will see this mail )
and will start GRC integration ASAP. Integrating the tool to GRC will
help me to find more bugs in my code, as many users will actually try
filter design tool. I will try to accomodate all the features that you
suggested.

Thanks a lot for your comments and suggestions.

-Sreeraj

Thank you. It would be great to see this finished and not left in the
state I had to leave it.

Thanks the great view of your project in your links.

Bob

Adaptive filtering, whether FIR or IIR, will change the taps
dynamically.

I love the design tool idea.

Bob