discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] GRC: sending IQ samples of square is resulting with l


From: srinivas naga vutukuri
Subject: [Discuss-gnuradio] GRC: sending IQ samples of square is resulting with lot of noise.
Date: Wed, 27 Jan 2010 15:01:52 +0530
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Hi,

I am using Gnu Radio Companion, and USRP2 RFX1800 daughter card. I created on Tx end: a File source and USRP2 sink, and on Rx End: created USRP2 Source and A File sink. The two USRP2's are connected with RF cable with attenuator, to see under less noise conditions the trials and are separated by around 2-3 meters.

Am sending a +1 to -1 amplitude square wave samples from Tx and when i capture on Rx end its not almost a square wave. I have generated the above .py scripts using grc. Kindly help me out in correcting the above scripts, if am not correctly done, As a newbie to gnuradio.

At least i got some wave form on the rx end. But when i try to execute the tx_samples, rx_streaming_samples, i did't even got this result for the same Interp and decimation factor, what am making mistake in the experiment?. And am using the encode.cc and decode.cc to encode IQ samples text file and decode the <complex> samples into I Q form, to analyse in the gnuplot(MATLAB,etc). Can also see the files here.


best regards,
srinivas.
#!/usr/bin/env python
##################################################
# Gnuradio Python Flow Graph
# Title: Top Block
# Generated: Wed Jan 27 10:51:57 2010
##################################################

from gnuradio import gr
from gnuradio import usrp2
from gnuradio.eng_option import eng_option
from grc_gnuradio import wxgui as grc_wxgui
from optparse import OptionParser
import wx

class top_block(grc_wxgui.top_block_gui):

        def __init__(self):
                grc_wxgui.top_block_gui.__init__(self, title="Top Block")

                ##################################################
                # Variables
                ##################################################
                self.samp_rate = samp_rate = 32000

                ##################################################
                # Blocks
                ##################################################
                self.gr_file_source_0 = gr.file_source(gr.sizeof_gr_complex*1, 
"/home/srinivasv/ensquaresignal.txt", True)
                self.usrp2_sink_xxxx_0 = usrp2.sink_32fc("eth0", 
"00:50:c2:85:33:bb")
                self.usrp2_sink_xxxx_0.set_interp(4)
                self.usrp2_sink_xxxx_0.set_center_freq(1800000000)
                self.usrp2_sink_xxxx_0.set_gain(70)

                ##################################################
                # Connections
                ##################################################
                self.connect((self.gr_file_source_0, 0), 
(self.usrp2_sink_xxxx_0, 0))

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

if __name__ == '__main__':
        parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
        (options, args) = parser.parse_args()
        tb = top_block()
        tb.Run(True)

#!/usr/bin/env python
##################################################
# Gnuradio Python Flow Graph
# Title: Top Block
# Generated: Wed Jan 27 11:04:20 2010
##################################################

from gnuradio import gr
from gnuradio import usrp2
from gnuradio.eng_option import eng_option
from grc_gnuradio import wxgui as grc_wxgui
from optparse import OptionParser
import wx

class top_block(grc_wxgui.top_block_gui):

        def __init__(self):
                grc_wxgui.top_block_gui.__init__(self, title="Top Block")

                ##################################################
                # Variables
                ##################################################
                self.samp_rate = samp_rate = 32000

                ##################################################
                # Blocks
                ##################################################
                self.gr_file_sink_0 = gr.file_sink(gr.sizeof_gr_complex*1, 
"/home/srinivasv/testoutput.txt")
                self.usrp2_source_xxxx_0 = usrp2.source_32fc("eth0", 
"00:50:c2:85:33:ba")
                self.usrp2_source_xxxx_0.set_decim(4)
                self.usrp2_source_xxxx_0.set_center_freq(1800000000)
                self.usrp2_source_xxxx_0.set_gain(0)

                ##################################################
                # Connections
                ##################################################
                self.connect((self.usrp2_source_xxxx_0, 0), 
(self.gr_file_sink_0, 0))

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

if __name__ == '__main__':
        parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
        (options, args) = parser.parse_args()
        tb = top_block()
        tb.Run(True)


reply via email to

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