discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] High Pass and Low Pass performance not inverse


From: Andrej Rode
Subject: Re: [Discuss-gnuradio] High Pass and Low Pass performance not inverse
Date: Mon, 26 Mar 2018 16:55:51 +0200
User-agent: Mutt/1.7.2 (2016-11-26)

Hi John, 

On Tue, Mar 13, 2018 at 09:15:33AM -0400, John Ackermann N8UR wrote:
> I'm setting up a measurement program to look at the channel power inside 
> and outside a defined bandwidth centered at zero.  The idea is to get 
> the ratio of the power within a low pass filter (nominally 500 Hz), and 
> the power in the rest of the spectrum (192 kHz) with that same 500 Hz 
> chunk notched out.  Attached are a screenshot of the the flowgraph and 
> of an FFT showing the results.
> 
> What puzzles me is that the low pass filter has a defined flat-top, 
> while the high pass filter shows a very narrow notch.  I would expect 
> the two to have a similar shape.  (I'm using rectangular windows because 
> I want to get the actual noise power for the given bandwidth.)

Running this short python script will generate filtertaps from the
firdes functions in GNU Radio and plot the amplitude of their transfer functions
linearly.

```
#!/usr/bin/env python2

from gnuradio import filter
import numpy as np
import matplotlib.pyplot as plt


def main():
  lp = filter.firdes_low_pass(1.0, 192e3, 250.0, 25.0, 
filter.firdes.WIN_RECTANGULAR)
  hp = filter.firdes_high_pass(1.0, 192e3, 250.0, 25.0, 
filter.firdes.WIN_RECTANGULAR)

  plt.plot(np.abs(np.fft.fftshift(np.fft.fft(lp))))
  plt.plot(np.abs(np.fft.fftshift(np.fft.fft(hp))))
    
  plt.show()
  return True

if __name__ == "__main__":
  exit(not main())

```

Given your GNU Radio modules are in the Python path and you have
Matplotlib installed.
You can also run more verifications using the impulse responses.

> 
> Any thoughts on why this is happening, or on ways to make the two 
> responses more precisely mirror each other?

According to the impulse responses they mirror each other pretty well
and shouldn't cause what you are seeing.  I did not look at the source
code of the firdes_* functions though.

Cheers
Andrej

-- 
Andrej Rode
GPG Key: 750B CBBB 4A75 811A 4D5F 03ED 5C23 7FB8 9A7D A2AA

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]