enter image description here

enter image description here

As shown in two pictures,setting a different bandwidth-value in the module, the value of the coordinate axis change accordingly. How did it happen? And I want to know if gnuradio can tell us the bandwidth of signal.


GNU Radio, like any DSP system, works primarily in terms of sample counts, not time. Therefore, you have to add on time information — a sample rate — to get correct frequency-domain information. GNU Radio does not automatically figure out what the matching sample rates between parts of your flow graph are, so you have to set them up correctly yourself.

The QT GUI Frequency Sink always starts out displaying the entire range of frequencies in the digital signal — that is, between -1 and 1 cycles/sample, or $-π$ and $π$ radians/sample, or $-\frac{f_s}2$ to $+\frac{f_s}2$ where $f_s$ is the sample rate. But the sink does not know what the sample rate of your signal is, so you have to tell it that in order to get a correctly labeled frequency axis. That is what the (unfortunately named) “Bandwidth” parameter of the QT GUI Frequency Sink block does — it sets the scale for the frequency axis.

You should always set that parameter to the sample rate of the signal you are providing to it.

In order to actually measure the bandwidth:

  1. Once you have set the sample rate properly,
  2. mouse over the left and right edges of your signal, note down the Hz values that are displayed,
  3. and subtract the larger from the smaller.

I do not know of any GR blocks that automatically measure bandwidth, but you could certainly arrange to capture FFT data and calculate it on your own outside of GR (using whatever definition of bandwidth suits your application).

  • 1
    $\begingroup$ Nice answer! And yes, the real problem is defining what the bandwidth of a signal is. That's easy for most digital modes (as those tend to work with constant symbol rates), you just (mathematically) define an arbitrary point beyond which you claim "the rest of the signal doesn't matter". That's really not easy for things like analog FM: if your RF frequency swing (and hence, your bandwidth) depends on the amplitude of the audio signal (as well as its bandwidth), does the "quiet music radio station" have the same bandwidth as "Grindcore FM 95.0 MHz – We blow out your brains"? $\endgroup$ – Marcus Müller Oct 13 '17 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.