GSoC: Filter design enhancements progress

Hi all,
During the initial phase of SoC, I was concentrating on improving the
GUI for filter designing. A brief list of some of the major features
added to the filter design tool (gr_filter_design) is given below

–Support for multiple views (grid and old tabbed view)

–Stop-band attenuation configuration via Band-diagram
–Editable pole-zero plots with conjugate movement support
–Impulse, Step responses, phase delay plots
–Overlay plots

A complete update history along with the code can be found in the github
repository(GitHub - zeroXzero/gr-filtdes: Filter design module for gnuradio). A small video on
the current status of the tool can be found here
GSoC: Filter desgin tool for GNU Radio - YouTube

The tool is not completely tested
as some more bugs need to be patched. A few more feature additions like
add/delete buttons for poles and zeros, alignment of band-diagram,
addition of button icons etc are still pending. All these additions will
be done with in a few days. In the meantime it would be really helpful
if the community can provide feedback in terms of feature additions or
bugs so that I can improve the design.

After finishing this work I will
start working on the actual IIR filter designs as gr-filter has already
been merged to the master.


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

On Sun, Jun 24, 2012 at 10:05 AM, sreeraj r [email protected]
wrote:

feature additions or bugs so that I can improve the design.

After finishing this work I will start working on the actual IIR filter
designs as gr-filter has already been merged to the master.


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

Hi Sreeraj,

I don’t have anything constructive to say about things right now. I’ve
looked at the video but have not looked at the code or played with it
myself. All I wanted to say was that this is looking fantastic! I’m
really happy with the functionality (and future work you’ve talked
about). The flexibility and design capabilities are great. I
particularly like the pole-zero plot, both in the ability to see what
the filter looks like and how you can manipulate them graphically to
adjust the filter taps. I think this will be a great educational tool,
now, too.

Thanks for the update.

Tom

Sreeraj -

I just wanted to echo Tom’s thoughts that this look really, really
great!
I can’t wait to see the final version! This will really be a
significant
contribution to the capabilities of GNU Radio, in my opinion.

Cheers,
Ben

That is pretty awesome, Sreeraj. Is the output of the program a set of
co-efficients to be copy-pasted, a compilable block, or something else?
It might be useful to have a feature where the user can call a custom
python script with the co-efficients passed as arguments. This would
allow users to easily generate formatted files, like those used by
Xilinx coregen or some custom format that might be poked to the FPGA,
for example. It would be neat to make some updates to GRC to allow the
user to open the utility and re-generate co-efficients as they do in
MATLAB.

This is making me think of some other potential projects, like a similar
‘digital modulation designer’. For example, we might use a single block
for all modulation types, select the modulation type and parameters, run
simulations to determine BER vs. Eb/N0, theoretical discrete
constellations, ACPR, PAR, etc. Or perhaps, a “packet designer” where
you can graphically configure FEC, interleaving, sync words, etc.
Obviously, the complexity on this one could grow /real fast/.

Just ideas… Hopefully you’ll have a chance to present your approach to
this at the GNU Radio conference.

-John

Yes, I know. Speaking from the standpoint of design flow, it would be
helpful if the user doesn’t need to touch those lines of code if they’d
like to take advantage of the filter designer.

For example, if you could output the co-efficients to a file, and your
code calls:

 coeffs = get_coeffs_from_file(my_coeffs_file.csv)

you’d be able to take advantage of the analytical features of the filter
designer without modifying your code. And lets say someday you had a
FIR filter hardware. A custom script might generate a file of a
specified format, and the device driver could pick up the file and poke
the coefficients. In short, having the ability to call a custom script
allows the user to produce a file of arbitrary format, or do any other
arbitrary operation with the coeffecients.

-John

Hi John,
As Marcus already mentioned you can use design functions from firdes
module (gr_filter_design also uses these modules).

Martin, Josh and Tom gave me many suggestions regarding adding the
designer to GRC, so that users can launch the designer from GRC itself
(something like this
GSoC_grc_gnuradio - YouTube). This feature
will be added to GRC once the design tool is complete.

Thank you for your suggestions.


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


From: John M. [email protected]
To: [email protected]
Sent: Tuesday, 26 June 2012 10:51 PM
Subject: Re: [Discuss-gnuradio] GSoC: Filter design enhancements
progress

That is pretty awesome, Sreeraj. Is the output of the program a set of
co-efficients to be copy-pasted, a compilable block, or something else?
It might be useful to have a feature where the user can call a custom
python script with the co-efficients passed as arguments. This would
allow users to easily generate formatted files, like those used by
Xilinx coregen or some custom format that might be poked to the FPGA,
for example. It would be neat to make some updates to GRC to allow the
user to open the utility and re-generate co-efficients as they do in
MATLAB.

This is making me think of some other potential projects, like a
similar ‘digital modulation designer’. For example, we might use a
single block for all modulation types, select the modulation type
and parameters, run simulations to determine BER vs. Eb/N0,
theoretical discrete constellations, ACPR, PAR, etc. Or perhaps, a
“packet designer” where you can graphically configure FEC,
interleaving, sync words, etc. Obviously, the complexity on this
one could grow real fast.

Just ideas… Hopefully you’ll have a chance to present your
approach to this at the GNU Radio conference.

-John

On 06/26/2012 09:35 AM, Ben H. wrote:
Sreeraj -



Discuss-gnuradio mailing list [email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

John:

Well, there’s already gr.firdes, which can be called
directly from python, and produce coefficients that can be easily
transformed into whatever you need.

Granted, that’s only for
relatively-simple filters.

from gnuradio import gr

coeffs=gr.firdes.low_pass(1.0,samp_rate,corner_freq,transition_width,widnow,beta)

And then do whatever you want with the resulting coefffs (like
scaling to fixed-point 16-bit values, for example)

-Marcus

On 26 Jun
2012 13:21, John M. wrote:

That is pretty awesome, Sreeraj. Is
the output of the program a set of co-efficients to be copy-pasted, a
compilable block, or something else? It might be useful to have a
feature where the user can call a custom python script with the
co-efficients passed as arguments. This would allow users to easily
generate formatted files, like those used by Xilinx coregen or some
custom format that might be poked to the FPGA, for example. It would be
neat to make some updates to GRC to allow the user to open the utility
and re-generate co-efficients as they do in MATLAB.

This is making
me think of some other potential projects, like a similar ‘digital
modulation designer’. For example, we might use a single block for all
modulation types, select the modulation type and parameters, run
simulations to determine BER vs. Eb/N0, theoretical discrete
constellations, ACPR, PAR, etc. Or perhaps, a “packet designer” where
you can graphically configure FEC, interleaving, sync words, etc.
Obviously, the complexity on this one could grow real fast.

Just
ideas… Hopefully you’ll have a chance to present your approach to this
at the GNU Radio conference.

-John

On 06/26/2012 09:35 AM,
Ben H. wrote:

Sreeraj -

I just wanted to echo Tom’s
thoughts that this look really, really great! I can’t wait to see the
final version! This will really be a significant contribution to the
capabilities of GNU Radio, in my opinion.

Cheers,
Ben

On Sun, Jun 24, 2012 at 7:05 AM, sreeraj r <[email protected] [6]>
wrote:

Hi all,
During the initial phase of SoC, I was
concentrating on improving the GUI for filter designing. A brief list of
some of the major features added to the filter design tool
(gr_filter_design) is given below

–Support for multiple views
(grid and old tabbed view)

–Stop-band attenuation
configuration via Band-diagram
–Editable pole-zero plots with
conjugate movement support
–Impulse, Step responses, phase delay
plots
–Overlay plots

A complete update history along
with the code can be found in the github
repository(GitHub - zeroXzero/gr-filtdes: Filter design module for gnuradio [1]). A small video
on the current status of the tool can be found here
GSoC: Filter desgin tool for GNU Radio - YouTube [2]

The
tool is not completely tested as some more bugs need to be patched. A
few more feature additions like add/delete buttons for poles and zeros,
alignment of band-diagram, addition of button icons etc are still
pending. All these additions will be done with in a few days. In the
meantime it would be really helpful if the community can provide
feedback in terms of feature additions or bugs so that I can improve the
design.

After finishing this work I will start working on the
actual IIR filter designs as gr-filter has already been merged to the
master.


Regards
Sreeraj Rajendran

http://home.iitb.ac.in/~rsreeraj [3]


Discuss-gnuradio
mailing list
[email protected] [4]

Discuss-gnuradio Info Page [5]

_______________________________________________ Discuss-gnuradio mailing
list [email protected] [7]
Discuss-gnuradio Info Page [8]

Links:

[1] GitHub - zeroXzero/gr-filtdes: Filter design module for gnuradio
[2]
GSoC: Filter desgin tool for GNU Radio - YouTube
[3]
http://home.iitb.ac.in/~rsreeraj
[4]
mailto:[email protected]
[5]
Discuss-gnuradio Info Page
[6]
mailto:[email protected]
[7] mailto:[email protected]
[8]
Discuss-gnuradio Info Page

On Tue, Jun 26, 2012 at 1:50 PM, sreeraj r [email protected]
wrote:

‘digital modulation designer’. For example, we might use a single block for
all modulation types, select the modulation type and parameters, run
simulations to determine BER vs. Eb/N0, theoretical discrete constellations,
ACPR, PAR, etc. Or perhaps, a “packet designer” where you can graphically
configure FEC, interleaving, sync words, etc. Obviously, the complexity on
this one could grow real fast.

Just ideas… Hopefully you’ll have a chance to present your approach to
this at the GNU Radio conference.

-John

Yeah, I agree with John, it would be nice to be able to get the taps
from the filter design tool into a Python program easily. As Sreeraj
said, this tool uses firdes and optfir from GNU Radio, so you could
just transfer the numbers from one to the other once you’re satisfied
with your filter design, but that seems inefficient.

Before handing this off to Sreeraj for the GSoC, I had implemented a
“save as” feature in the tool that saves the coefficients to a CSV
file, so you could, like to said, John, read in these taps. There’s no
helper for it, yet, though, so you have to open and read the CSV file
from the basics, but it could easily be rolled into a single function.

On the other hand, since the gr_filter_design tool is PyQT based, we
could create a set of signals and slots to be able to change things
programmatically. With a “get_taps” function, we could have this
program be launched as a dialog box, create the taps, and then
directly import them all from a single Python GNU Radio app. You
wouldn’t want to do this all the time, but it could be a nice feature
(for instance, you first check if there is a CSV file of taps, and if
not, launch the design tool to create them and save them for the next
time).

Tom