GFSK modulation/demodulation with GNU Radio and USRP

16,131

Solution 1

I was finally able to solve the problem. All I did was re-implementing the GFSK demod in GRC. If you go into source of gfsk.py, you will find out that the blocks used are Quadrature Demod --> M&M Clock recovery --> Binary slicer which can easily be connected in GRC directly. As Marcus suggested in my other thread, GFSK demodulation with Xlating filter in GNU Radio , I replaced the M&M Clock recovery block with PFB block. My flowgraph is shown below. enter image description here

Solution 2

Even if I can not answer all of your questions, I provide below some thoughts:

  1. When using hardware devices the Throttle MUST be removed from the flow-graph. The hardware device is now responsible for the rate limiting. Mixing hardware device and the Throttle block may break the real-time boundary of your flow-graph required by the device. Underflows or Overflows messages should be produced by the UHD driver in such a case.

  2. Are you sure that the USRP can support the requested sampling rate? You may need also to change the master_clock_rate of the device, if the requested sampling rate is not an integer decimation of the clock. If this is not possible consider some kind of re-sampling.

EDIT: The B200 can not provide 192e3 sampling rate with the default clock. You can set the master_clock_rate at 19.2e6. The hardware will apply then the proper decimation. The master_clock_rate can be changed either by the device specific arguments or the Clock Rate field of the UHD Sink/Source blocks that presents in the latests GNU Radio versions.

Share:
16,131
Moses Browne Mwakyanjala
Author by

Moses Browne Mwakyanjala

Updated on August 06, 2022

Comments

  • Moses Browne Mwakyanjala
    Moses Browne Mwakyanjala almost 2 years

    Im currently creating a satellite ground station which will be used to control our cubesat in coming months. The modulation scheme used is GFSK and the baud rate is 9600. I have tried to run some tests by using a USRP board before I could try to communicate with the satellite by directly connecting the tx and rx blocks in the flowgraph.I was able to send and receive a png file using this flowgraph.

    However, when I connect the tx and rx output to my USRP B210 TX/RX(transmission sink) and RX2(reception source) as shown below, I receive no data even though the two the source and sinks have been connected to each other carefully by RF cables with attenuators.

    GNU Radio Flowgraph

    Below are the assumptions I took into account when I was making the second flowgraph. Please tell me if im on the right path.

    1. Transmitter side : The packet decoder and GFSK mod blocks use 20 samples per symbol. Baud rate is 9600 and sample rate is 20*baud rate = 192K. Since the expected symbol rate by the satellite is baud_rate = 9600, I included a rational resampler and set UHD symbol rate to baud_rate. Is my logic correct?

    2. GFSK mod and demod : For both of these blocks, I calculated sensitivity as S = Pi * Modulation_index/Samples_Per_Symbol. The default BT value of 0.5 is used. Are my calculations sound? Is there a link for to find documentation for GFSK blocks? My derivations are based on the GFSK python source code which is a poor substitute for documentation.

    3. Packet Encoder/Decoder : The output of packet decoder is null even though the GFSK demod block give some kind of output which is rather meaningless. Is this normal? What is the meaning of the threshold variable and why its value is -1?

    I'm a newbie in GNU Radio as well as GFSK in general. So please drop me any further references.

    Thanks in advance.

    Moses.

  • Moses Browne Mwakyanjala
    Moses Browne Mwakyanjala over 8 years
    Hello there. thanks for the suggestions. I modified the circuit and things were working a bit. i was able to send a png file and receive some data. The file seem to be corrupted though as a few bytes were missing. Unfortunately, the flowgraph is unable to communicate with our cubesat. I could clearly see the GFSK signal though. The packet decoder seems to block everything. I looked online and I have seen a lot people struggling with the same problem. Do you happen to know what is exactly happening in packet encoder and decoder blocks? Thanks in advance.
  • Moses Browne Mwakyanjala
    Moses Browne Mwakyanjala over 8 years
    By the way, this is the file i received in my usrp. The baud rate is 9600 and sample rate is 20 * baud-rate = 192000 baud. Modulation index used in 2/3. Could you have a look at it as well? dropbox.com/s/qfxnhn7cupflqpl/data_9600_gain_40.txt?dl=0
  • Manos
    Manos over 8 years
    I am also involved in a satellite project with GNU Radio using FSK. To be honest I did not even try the GNU Radio FSK en- de-coder and I am currently implementing my own. I will take a look at your file and I will post back if something notable appears.
  • lceans
    lceans over 3 years
    I came across this and it fits my application perfectly. However, is there a way to implement excursion between the FSK and the carrier wave?
  • lceans
    lceans over 3 years
    I came across this and it fits my application perfectly. However, is there a way to implement excursion between the FSK and the carrier wave?
  • Moses Browne Mwakyanjala
    Moses Browne Mwakyanjala over 3 years
    @lceans Are you trying to implement an FSK receiver? I didn’t get the question very well.
  • lceans
    lceans over 3 years
    I am trying to do both a transceiver and receiver. This works perfect for the receiver end of things. On your file source, can you alter it to include excursion or do you know of a way I can do that?
  • Moses Browne Mwakyanjala
    Moses Browne Mwakyanjala over 3 years
    I’m not what you mean by excursion. But it is possible to modify the gfsk transmitter (gfsk.py) into an FSK one. This can be done by eliminating the Gaussian filter.
  • lceans
    lceans over 3 years
    By excursion, I mean the deviation in frequency between the carrier wave and the fsk signal