# Transmit filtering

**URL:** <https://www.ruby-forum.com/t/transmit-filtering/211490>\
**Category:** GNU Radio\
**Created:** [September 5, 2011, 4:21pm UTC](https://www.ruby-forum.com/t/transmit-filtering/211490 "2011-09-05T16:21:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [September 5, 2011, 4:21pm UTC](https://www.ruby-forum.com/t/transmit-filtering/211490/1 "2011-09-05T16:21:06Z")

</div>

I’m generating two NBFM signals, offsetting them plus and minus 25 kHz  
with FreqXlatingFilters, and combining the output in an adder which then  
drives a USRP sink. It seems sensible to put a bandpass filter on the  
result.

I have a basic conceptual confusion. I would think that you’d specify a  
bandpass filter around zero with a low cutoff of, say, -40e3 and a high  
cutoff of +40e3. However, this doesn’t work – the bandpass filter  
seems to require a number \>0 for the lowpass frequency.

So, in this situation, where I want to filter a spectrum that is  
centered around zero, how do I specify the filter lowpass and highpass  
frequencies?

A second question – there is a signal component on the output directly  
at the USRP center frequency. It’s at most about 30dB below the desired  
signals. I assume this is the equivalent of LO leakage. Is there any  
way to filter this out or at least reduce its amplitude?

As I’m writing this, I wonder if the solution to both problems is to put  
both my signals on one side of the USRP center frequency, say +25 and  
+75 kHz. That would allow a sensible bandpass filter that would remove  
the zero-frequency component. But the downside of that seems to be  
throwing away half the available bandwidth.

Thanks,

John

---

<div class="post-metadata">

**Author:** ![John\_Ackermann\_N8UR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cdc98d/32.png) [@John\_Ackermann\_N8UR](https://www.ruby-forum.com/u/John_Ackermann_N8UR)\
**Post date:** [September 5, 2011, 4:35pm UTC](https://www.ruby-forum.com/t/transmit-filtering/211490/2 "2011-09-05T16:35:19Z")

</div>

On Mon, Sep 05, 2011 at 10:19:54AM -0400, John Ackermann N8UR wrote:

> I would think that you’d specify a bandpass filter around zero with a  
> low cutoff of, say, -40e3 and a high cutoff of +40e3. However, this  
> doesn’t work – the bandpass filter seems to require a number \>0 for  
> the lowpass frequency.

That would be a low-pass filter with a cutoff at 40e3. With  
complex-valued signals, a low-pass filter is essentially a band-pass  
filter centered around 0 Hz.

> there is a signal component on the output directly at the USRP center  
> frequency. It’s at most about 30dB below the desired signals. I  
> assume this is the equivalent of LO leakage. Is there any way to  
> filter this out or at least reduce its amplitude?
> 
> As I’m writing this, I wonder if the solution to both problems is to  
> put both my signals on one side of the USRP center frequency, say +25  
> and +75 kHz.

Yes, you could use an external analog band-pass filter if that center  
spur is a problem for you.

---

<div class="post-metadata">

**Author:** ![John\_Ackermann\_N8UR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cdc98d/32.png) [@John\_Ackermann\_N8UR](https://www.ruby-forum.com/u/John_Ackermann_N8UR)\
**Post date:** [September 5, 2011, 5:47pm UTC](https://www.ruby-forum.com/t/transmit-filtering/211490/3 "2011-09-05T17:47:42Z")

</div>

On 05/09/11 10:19 AM, John Ackermann N8UR wrote:

> I’m generating two NBFM signals, offsetting them plus and minus 25 kHz  
> with FreqXlatingFilters, and combining the output in an adder which  
> then drives a USRP sink. It seems sensible to put a bandpass filter  
> on the result.
> 
> I have a basic conceptual confusion. I would think that you’d specify  
> a bandpass filter around zero with a low cutoff of, say, -40e3 and a  
> high cutoff of +40e3. However, this doesn’t work – the bandpass  
> filter seems to require a number \>0 for the lowpass frequency.  
> Make sure that you specify complex-taps. I assume you’re using GRC. By  
> default, it uses the version of  
> the bandpass filter with real taps. But if you specify complex taps,  
> you can use negative frequencies.

–  
Principal Investigator  
Shirleys Bay Radio Astronomy Consortium

> **[Live Draw HK Tercepat | Result HK | HK Pools | Live HK | HK Prize Hari Ini](https://www.sbrac.org/)**
>
> Temukan live draw hk tercepat melalui halaman hk pools yang resmi dan dapatkan result hk prize melalui live hk secara langsung di situs kami.

---

<div class="post-metadata">

**Author:** ![John\_Ackermann\_N8UR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cdc98d/32.png) [@John\_Ackermann\_N8UR](https://www.ruby-forum.com/u/John_Ackermann_N8UR)\
**Post date:** [September 5, 2011, 7:00pm UTC](https://www.ruby-forum.com/t/transmit-filtering/211490/4 "2011-09-05T19:00:13Z")

</div>

On Mon, Sep 5, 2011 at 12:55 PM, John Ackermann N8UR [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi Marcus –
> 
> I am selecting complex taps from the drop down, but still get an error at  
> runtime if either cutoff frequency is 0 or smaller.
> 
> Thanks,
> 
> ## John

John,

That sounds like a bug in the GRC block, then. I just tried this as a  
complex BPF and it works fine:

gr.firdes.complex\_band\_pass(1, 1, -0.1, 0.2, 0.1)

However, as was already mentioned, if you are trying to create a  
bandpass  
filter from -40 to +40 kHz, that’s just a low pass filter with a  
bandwidth  
of 40 kHz:

gr.firdes.low\_pass(1, 100e3, 40e3, 2e3)

Will give you a filter for this purpose. Substitute your own sampling  
rate  
and transition width, of course.

Tom

---

<div class="post-metadata">

**Author:** ![John\_Ackermann\_N8UR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cdc98d/32.png) [@John\_Ackermann\_N8UR](https://www.ruby-forum.com/u/John_Ackermann_N8UR)\
**Post date:** [September 5, 2011, 6:56pm UTC](https://www.ruby-forum.com/t/transmit-filtering/211490/5 "2011-09-05T18:56:30Z")

</div>

Hi Marcus –

I am selecting complex taps from the drop down, but still get an error  
at runtime if either cutoff frequency is 0 or smaller.

Thanks,

## John

---

<div class="post-metadata">

**Author:** ![John\_Ackermann\_N8UR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cdc98d/32.png) [@John\_Ackermann\_N8UR](https://www.ruby-forum.com/u/John_Ackermann_N8UR)\
**Post date:** [September 5, 2011, 7:12pm UTC](https://www.ruby-forum.com/t/transmit-filtering/211490/6 "2011-09-05T19:12:00Z")

</div>

On 05/09/11 12:55 PM, John Ackermann N8UR wrote:

> Hi Marcus –
> 
> I am selecting complex taps from the drop down, but still get an error at  
> runtime if either cutoff frequency is 0 or smaller.
> 
> Thanks,
> 
> ## John

I just tried it, and it works just fine.

I select: Complex-\>Complex (complex taps) from the menu, with a complex  
I/O, and I’m able to specify  
negative frequency components.

What is the error you’re getting at runtime?

–  
Principal Investigator  
Shirleys Bay Radio Astronomy Consortium

> **[Live Draw HK Tercepat | Result HK | HK Pools | Live HK | HK Prize Hari Ini](https://www.sbrac.org/)**
>
> Temukan live draw hk tercepat melalui halaman hk pools yang resmi dan dapatkan result hk prize melalui live hk secara langsung di situs kami.

---

<div class="post-metadata">

**Author:** ![John\_Ackermann\_N8UR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cdc98d/32.png) [@John\_Ackermann\_N8UR](https://www.ruby-forum.com/u/John_Ackermann_N8UR)\
**Post date:** [September 5, 2011, 7:47pm UTC](https://www.ruby-forum.com/t/transmit-filtering/211490/7 "2011-09-05T19:47:51Z")

</div>

On 09/05/2011 01:10 PM, Marcus D. Leech wrote:

> > 
> 
> I just tried it, and it works just fine.
> 
> I select: Complex-\>Complex (complex taps) from the menu, with a complex  
> I/O, and I’m able to specify  
> negative frequency components.
> 
> What is the error you’re getting at runtime?

Using a band reject filter with low frequency set to -10000 and high  
frequency set to 10000, dropdown of complex(decimating), I get this:

Traceback (most recent call last):  
File “/home/jra/gnuradio/fm\_rx.py”, line 166, in   
tb = fm\_rx()  
File “/home/jra/gnuradio/fm\_rx.py”, line 115, in **init**  
1, 200000, -10000, 10000, 1000, firdes.WIN\_HAMMING, 6.76))  
File  
“/usr/local/lib/python2.7/dist-packages/gnuradio/gr/gnuradio\_core\_general.py”,  
line 3437, in band\_reject  
return \_gnuradio\_core\_general.firdes\_band\_reject(\*args, \*\*kwargs)  
IndexError: gr\_firdes check failed: 0 \< fa \<= sampling\_freq / 2

---

<div class="post-metadata">

**Author:** ![AlliPlatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a88e4f/32.png) [@AlliPlatt](https://www.ruby-forum.com/u/AlliPlatt)\
**Post date:** [April 24, 2020, 5:03pm UTC](https://www.ruby-forum.com/t/transmit-filtering/211490/8 "2020-04-24T17:03:42Z")

</div>

Hi…I have an SDRPlay and we have this religious AM station here in DC/MD on 1120kHz and it blocks out alost every signal below 30 MHz. There is also this religious station out of SC where the guy sounds like a troll and just spews right wing propaganda, very annoying to listen to.  
I found two sites that sell traps but when you call they are out of business; clifton labs and some ham radio guy.  
I have tried everything else but the better the antenna the worse this gets. Even overloads my portable radios. I would make one but cant find the inductors/ dont have the equipment to make one.
