Precoded GMSK flow graph actually attached this time.

________________________________
From: Estrada Lupianez, Jenniffer Marie
Sent: Tuesday, June 20, 2017 2:59 PM
To: discuss-gnuradio@gnu.org
Subject: Question on using the GMSK Mod Block and GLFSR Block



Hi,

1. There appears to be an issue with the GMSK modulation blocks within GNU 
Radio. See the attached screen shots, where I've removed the the USRP 
completely from the flow graph, and am running it entirely within GNU Radio on 
a x64 host, comparing the two GMSK modulation blocks (GMSK Mod and GMSK 
Modulator) available in GNU Radio.


2. Also, I am looking at the GLFSR block in GNU Radio, and I am wondering what 
the correct input for the GLFSR block parameters should be for what seems like 
a very odd configuration, since I want only 13 bits of a 16 bit stream 
comprised of 0xA5A5. All three fields, Degree, Mask, and Seed are type INT. I 
am looking to use a single length 13 LFSR polynomial, and have an initial seed 
of 0xA5A5 (How the 16 bits are handled to get the 13 bits of interest, depends 
on what software we are using, like MATLAB vs System Generator, and the GNU 
Radio implementation has to match).


What I have currently:

Type: Byte

Degree: 13 (int between 0 and 32 according to source code on-line, 13 seems 
like the correct input, but is causing some confusion for me with the Seed 
value)


and while I am fairly certain of those, the following parameters are what I am 
uncertain of:



Mask (int format)

Seed  (int format)


Am I correct in thinking the Mask parameter is 0x0000100D, in correlation to 
the the polynomial degree that I want (13)? I found this at 
http://wiki.spench.net/wiki/GNU_Radio_Notes.<http://wiki.spench.net/wiki/GNU_Radio_Notes>
 If I understand the GNU Radio Doxygen documentation and (Balint Seeber's) 
notes on the website, then leaving the Mask as 0 will have GNU Radio pick the 
correct one for me based on the polynomial degree I enter.


If that is the case, then the only thing that is really catching me is the Seed 
being a type int, when I am using Type: Byte. Is the input to this parameter 
then the 8 bits within the byte? If so, how would I go about creating the 13 
degree polynomial with that configuration? I was trying to see if the Packet 
Encoder block or the vector Source block would be useful for this, but I am not 
sure it really is what I need for this. I have a 16 bit hexadecimal value 
(0xA5A5) that I am to use only 13 bits out of, but it must be consistent with 
the formats in System Generator and MATLAB explained below:


Current Method:
A single length-13 LFSR polynomial is used. The feedback polynomial can be 
defined in the following formats, all equivalent:

SystemGenerator/Xilinx:
0x1901

Matlab:
[13, 12, 11, 8, 0]

Koopman (users.ece.cmu.edu/~koopman/lfsr/):
0x1013

In the Matlab format, the first array entry defines the obligatory 
shift-register head, while the last entry likewise defines the tail. In both 
the sysgen/xilinx and Koopman formats, the shift-reg head is implied. However, 
the resulting binary sequence, without the head bit, and in hex, is reversed. 
In other words, SystemGenerator/Xilinx has the implied head on the left, and 
Koopman has it on the right. Thus, the format difference can cause confusion.

The Koopman method is useful, because his website tabulates millions of 
different feedback-polynomials for max-length PRN sequences of differing 
lengths.


M-Code Polynomial     (Koopman Format)       Reg Init
0x1601                            0x100D                          0xA5A5


So, this is the GLFSR configuration that I currently have:


[cid:91c1e808-3656-41e6-ae1e-42289f1d469e]


If context is needed, I am trying to implement a pre-coded GMSK signal 
transmission of a 13 degree LSFR source with the 0xA5A5 seed, of which I can 
control how many times the output of the LFSR is generated (I notice that the 
repeat option in the LFSR source is only able to be set as "yes" or "no", but I 
assume I can tweak that within the python generated code to override 
somehow??), using an Ettus E310 SDR. The general layout of the blocks in the 
final flow graph could be something like:


GLFSR source --> Differential Encoder --> GMSK modulator --> USRP Sink


As seen in the precoded_gmsk.grc flowgraph and generated python code attached.


Any assistance is appreciated.


Thank you,


Jenn


#!/usr/bin/env python2
# -*- coding: utf-8 -*-
##################################################
# GNU Radio Python Flow Graph
# Title: Precoded Gmsk
# Generated: Tue Jun 20 14:57:07 2017
##################################################

from gnuradio import digital
from gnuradio import eng_notation
from gnuradio import gr
from gnuradio import uhd
from gnuradio.eng_option import eng_option
from gnuradio.filter import firdes
from optparse import OptionParser
import time


class precoded_gmsk(gr.top_block):

    def __init__(self):
        gr.top_block.__init__(self, "Precoded Gmsk")

        ##################################################
        # Variables
        ##################################################
        self.samp_rate = samp_rate = 4e6

        ##################################################
        # Blocks
        ##################################################
        self.uhd_usrp_sink_0 = uhd.usrp_sink(
        	",".join(("", "")),
        	uhd.stream_args(
        		cpu_format="fc32",
        		channels=range(1),
        	),
        )
        self.uhd_usrp_sink_0.set_samp_rate(samp_rate)
        self.uhd_usrp_sink_0.set_center_freq(200e6, 0)
        self.uhd_usrp_sink_0.set_gain(20, 0)
        self.uhd_usrp_sink_0.set_antenna("TX/RX", 0)
        self.digital_gmskmod_bc_0 = digital.gmskmod_bc(4, 2, 0.5)
        self.digital_glfsr_source_x_0 = digital.glfsr_source_b(13, True, 0x0000100D, 0xA5A5)
        self.digital_diff_encoder_bb_0 = digital.diff_encoder_bb(2)

        ##################################################
        # Connections
        ##################################################
        self.connect((self.digital_diff_encoder_bb_0, 0), (self.digital_gmskmod_bc_0, 0))    
        self.connect((self.digital_glfsr_source_x_0, 0), (self.digital_diff_encoder_bb_0, 0))    
        self.connect((self.digital_gmskmod_bc_0, 0), (self.uhd_usrp_sink_0, 0))    

    def get_samp_rate(self):
        return self.samp_rate

    def set_samp_rate(self, samp_rate):
        self.samp_rate = samp_rate
        self.uhd_usrp_sink_0.set_samp_rate(self.samp_rate)


def main(top_block_cls=precoded_gmsk, options=None):

    tb = top_block_cls()
    tb.start()
    try:
        raw_input('Press Enter to quit: ')
    except EOFError:
        pass
    tb.stop()
    tb.wait()


if __name__ == '__main__':
    main()

Attachment: precoded_gmsk.grc
Description: precoded_gmsk.grc

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to