Re: GSoC: Filter Design tool update

Hello,

I downloaded your updates to the filter design tool from


(zeroXzero-gr-filtdes-6cd8f37.zip)

After unzipping the archive, I followed the build instructions, using
the cmake command, as follows:

cmake -DCMAKE_INSTALL_PREFIX:PATH=
/home/mcody/…/zeroXzero-gr-filtdes-6cd8f37 /usr/local

The build and install appeared to proceed well, but when I execute
gr_filter_design at the command prompt, I get the following error
message:

Traceback (most recent call last):
File “/usr/local/bin/gr_filter_design”, line 55, in
from filtdes.banditems import *
File “/usr/local/lib/python2.6/dist-packages/filtdes/banditems.py”,
line 193, in
lpfItems.append(lpfsLines())
File “/usr/local/lib/python2.6/dist-packages/filtdes/banditems.py”,
line 79, in init
self.poly << QtCore.QPointF(3,5)
TypeError: unsupported operand type(s) for <<: ‘QPolygonF’ and ‘QPointF’

Prior to running gr_filter_design, I had to set LD_LIBRARY_PATH
to /usr/local/lib.

I don’t know what I am doing wrong. Should your distribution be placed
in
a specific location? I am using GNU Radio 3.6.1git-47-g884c23ef if that
is of any help. I am running Kubuntu 10.04.

Thanks,

Mac / AE5PH

Hi Mac,

Could you please specify your version of pyqt. I have tested the tool
with version 4.9.1. The error has nothing to do with gnuradio version.


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


From: Mac A. Cody [email protected]
To: [email protected]
Sent: Thursday, 9 August 2012 9:56 AM
Subject: Re: [Discuss-gnuradio] GSoC: Filter Design tool update

Hello,

I downloaded your updates to the filter design tool from
https://github.com/zeroXzero/gr-filtdes
(zeroXzero-gr-filtdes-6cd8f37.zip)

After unzipping the archive, I followed the build instructions,
using
the cmake command, as follows:

cmake -DCMAKE_INSTALL_PREFIX:PATH=
/home/mcody/…/zeroXzero-gr-filtdes-6cd8f37 /usr/local

The build and install appeared to proceed well, but when I execute
gr_filter_design at the command prompt, I get the following error
message:

Traceback (most recent call last):
File “/usr/local/bin/gr_filter_design”, line 55, in

from filtdes.banditems import *
File
“/usr/local/lib/python2.6/dist-packages/filtdes/banditems.py”,
line 193, in
lpfItems.append(lpfsLines())
File
“/usr/local/lib/python2.6/dist-packages/filtdes/banditems.py”,
line 79, in init
self.poly << QtCore.QPointF(3,5)
TypeError: unsupported operand type(s) for <<: ‘QPolygonF’
and ‘QPointF’

Prior to running gr_filter_design, I had to set LD_LIBRARY_PATH
to /usr/local/lib.

I don’t know what I am doing wrong. Should your distribution be
placed in
a specific location? I am using GNU Radio 3.6.1git-47-g884c23ef
if that
is of any help. I am running Kubuntu 10.04.

Thanks,

Mac / AE5PH

The error that you were getting was from some dead code (I tried to add
one arrowtop to the configurable band-diagrams and later left that
feeling that it looks bad, but forgot to remove the code).

I have updated the repo now. Please clone my latest code and let me know
if you are still facing that issue.

regards
Sreeraj


From: sreeraj r [email protected]
To: Mac A. Cody [email protected]; “[email protected]
[email protected]
Sent: Thursday, 9 August 2012 10:27 AM
Subject: Re: [Discuss-gnuradio] GSoC: Filter Design tool update

Hi Mac,

Could you please specify your version of pyqt. I have tested the tool
with version 4.9.1. The error has nothing to do with gnuradio version.


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


From: Mac A. Cody [email protected]
To: [email protected]
Sent: Thursday, 9 August 2012 9:56 AM
Subject: Re: [Discuss-gnuradio] GSoC: Filter Design tool update

Hello,

I downloaded your updates to the filter design tool from
https://github.com/zeroXzero/gr-filtdes
(zeroXzero-gr-filtdes-6cd8f37.zip)

After unzipping the archive, I followed the build instructions,
using
the cmake command, as follows:

cmake -DCMAKE_INSTALL_PREFIX:PATH=
/home/mcody/…/zeroXzero-gr-filtdes-6cd8f37 /usr/local

The build and install appeared to proceed well, but when I execute
gr_filter_design at the command prompt, I get the following error
message:

Traceback (most recent call last):
File “/usr/local/bin/gr_filter_design”, line 55, in

from filtdes.banditems import *
File
“/usr/local/lib/python2.6/dist-packages/filtdes/banditems.py”,
line 193, in
lpfItems.append(lpfsLines())
File
“/usr/local/lib/python2.6/dist-packages/filtdes/banditems.py”,
line 79, in init
self.poly << QtCore.QPointF(3,5)
TypeError: unsupported operand type(s) for <<: ‘QPolygonF’
and ‘QPointF’

Prior to running gr_filter_design, I had to set LD_LIBRARY_PATH
to /usr/local/lib.

I don’t know what I am doing wrong. Should your distribution be
placed in
a specific location? I am using GNU Radio 3.6.1git-47-g884c23ef
if that
is of any help. I am running Kubuntu 10.04.

Thanks,

Mac / AE5PH


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

Sreeraj,

Removing that code appears to have fixed the startup problem. When I
execute gr_filter_design, the following message is displayed on the
console prior to the display of the gr_filter_design GUI:

QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No
such file or directory
QFileSystemWatcher: failed to add paths: /home/mcody/.config/ibus/bus
Bus::open: Can not get ibus-daemon’s address.
IBusInputContext::createInputContext: no connection to ibus-daemon

I’m not sure what this is for or if it is critical to proper operation
of
gr_filter_design.

I am trying to emulate an 8th-order Butterworth low-pass filter using
gr.iir_filter_ffd in GNU Radio. I cannot seem to implement an IIR
filter
with such a steep roll-off in gr_filter_design. The filter
characteristic
I want are as follows:

Sample Rate: 128,000 sps
Cut-off (3 dB) frequency: 1200 Hz (0.009375 normalized)
End of Passband: 900 Hz (0.00703125 normalized)
Start of Stop Band: 6000 Hz (0.046875 normalized)
Max Loss in Pass Band: 1 dB
Min Attenuation in Stop Band: 110 dB

When I plug in the last four values above into gr_filter_design and
press
the Design button, the following message is displayed on the console:

/usr/lib/python2.6/dist-packages/scipy/signal/filter_design.py:221:
BadCoefficients: Badly conditionned filter coefficients (numerator):
the results may be meaningless
“results may be meaningless”, BadCoefficients)

If I adjust the parameters to more conservative values, I can keep the
error message from displaying. Unfortunately the designed Butterworth
filter does not meet my specifications.

In the end, I was hoping that the new functionality in gr_filter_design
would help with solving another problem that I am having. That is that
I cannot seem to get gr.iir_filter_ffd to execute properly. I tried
plugging in different sets of feed-forward (b) and feedback (a)
coefficients generated withother IIR filter design tools (and now
gr_filter_design) without success. I always end up with strange NaN
errors when I run GNU Radio scripts that include gr.iir_filter_ffd. I
have searched without success in finding useful guidelines for using
gr.iir_filter_ffd.

Thanks,

Mac

Sreeraj,

Thanks for the explanation and the GRC files. Your explanation was
right
in line with how I expected gr.iir_filter_ffd to work and what it needed
for parameters. It turns out that I was using gr.iir_filter_ffd
correctly,
but the filter coefficients I was using were causing the numerical
problems.
When I designed a filter with a less restrictive roll-off, the generated
coefficients worked properly ingr.iir_filter_ffd. As you stated, I need
to use a more relaxed specification. I guess when you have “b”
coefficients with values on the order of 10^-13, you end up with
numerical
instability or mathematical underflow/overflow. Perhaps the IIR filter
calculation tools I was using generated invalid coefficients (Website
http://www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html and Octave’s
butter function).

Mac

I am trying to emulate an 8th-order Butterworth low-pass filter using

gr.iir_filter_ffd in GNU Radio. I cannot seem to implement an IIR filter
with such a steep roll-off in gr_filter_design. The filter characteristic
I want are as follows:

Sample Rate: 128,000 sps
Cut-off (3 dB) frequency: 1200 Hz (0.009375 normalized)
End of Passband: 900 Hz (0.00703125 normalized)
Start of Stop Band: 6000 Hz (0.046875 normalized)
Max Loss in Pass Band: 1 dB
Min Attenuation in Stop Band: 110 dB

When I plug in the last four values above into gr_filter_design and press
the Design button, the following message is displayed on the console:

/usr/lib/python2.6/dist-packages/scipy/signal/filter_design.py:221:
BadCoefficients: Badly conditionned filter coefficients (numerator):
the results may be meaningless
“results may be meaningless”, BadCoefficients)

Scipy is throwing this warning as the designed filter parameters(b) for
your filter specifications are really small (less than 1e-14).
gr_filter_design directly uses scipy’s iirdesign and iirfilter
functions. I followed the normal design procedure to make sure whether
things are right

import scipy.signal as sg
sg.buttord(0.00703125, 0.046875, 1, 110) — gave me this (8,
0.009642594623660591)
sg.butter(10, 0.009642594623660591) — again gave me bad coefficients
error.

I believe you have to relax some specifications to get some practical
filter parameters.

In the end, I was hoping that the new functionality in
gr_filter_design
would help with solving another problem that I am having. That is that
I cannot seem to get gr.iir_filter_ffd to execute properly. I tried
plugging in different sets of feed-forward (b) and feedback (a)
coefficients generated with other IIR filter design tools (and now
gr_filter_design) without success. I always end up with strange NaN
errors when I run GNU Radio scripts that include gr.iir_filter_ffd. I
have searched without success in finding useful guidelines for using
gr.iir_filter_ffd.

You may be ending up with NaN errors because you might be specifying the
feedback taps wrongly. iir_filter_ffd expects the transfer function in
this format

H(z) = \ frac{\sum_{k=0}^{M} b_k z^{-k}}{1 - \sum_{k=1}^{N} a_k z^{-k}}

Usually scipy or any other filter design tool, might not be returning
the filter coefficients in this “1 - a_k” format. So please make sure
that you reverse the sign of a_ks.

I am also attaching two sample grc files which use iir_filter_ffd. The
filters (one butter and elliptic) are designed using gr_filter_design
with the following normalized spec and the feedback taps negated as I
already mentioned.
End of pass band = 0.2
Start of stop band = 0.45
Max loss in pb = 1dB, Min atten in sb = 110dB.

I am also a newbie and could be wrong somewhere. Hope this helps.

-Sreeraj

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs