discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] DQPSK Transmitter and Receiver


From: devin kelly
Subject: Re: [Discuss-gnuradio] DQPSK Transmitter and Receiver
Date: Tue, 27 Apr 2010 15:07:07 -0400

Hello everyone,

Tom, thanks for that, that was a good start for me, but I'm still am having the problems.

This is how I make my modulator for dqpsk, the way I make the modulator for dbpsk is mostly the same.  Tom, at first I thought you meant I might need to change the samples_per_symbol paramter.  I did this, on the transmitter and receiver, with no results.  I'm pretty sure you were talking about something else, 

Here are my modulators.  All I'm doing is switching between them.

modulator = gnuradio.blks2impl.dbpsk.dbpsk_mod(
samples_per_symbol=2,
excess_bw=0.35,
gray_code=True,
verbose=False,
log=False)


modulator = gnuradio.blks2impl.dqpsk.dqpsk_mod(
samples_per_symbol=4,
     excess_bw=0.35,
     gray_code=True,
     verbose=False,
     log=False

Here is my transmitter.

class tx_top_block(gr.top_block):

    def __init__(self, mod):
        gr.top_block.__init__(self)

        modulator=mod

        self.packet_modulator = blks2.mod_pkts(
            modulator,
            access_code=None,
            msgq_limit=4,
            pad_for_usrp=True,
            use_whitener_offset=False
            )

        usrp2_sink = usrp2.sink_32fc(network_interface)
        usrp2_sink.set_interp(interpolation)
        usrp2_sink.set_center_freq(center_freq)
        usrp2_sink.set_gain(usrp2_sink.gain_max())

        self.connect(self.packet_modulator, usrp2_sink)


    def main_loop(self):
        packet_size        = 1000
        max_num_packets    = 100000
        repeat_packets     = True

        try:
            data = "" World!\n"
            data = "" + (packet_size-len(data))*' '  # pad rest of packet

            self.start()
   print "Started Transmitter"
            while True:
                for pkt_num in xrange(0,max_num_packets):
                    self.packet_modulator.send_pkt(data, False)
                if not repeat_packets:
                    break
            self.packet_modulator.send_pkt('', True)  # Tell the source to block if it is done transmitting
            self.wait()                               # Wait for radio to finish.
            
        except KeyboardInterrupt:
            pass

        print "\n\nExiting."

Thanks For Any Help,
Devin

On Mon, Apr 26, 2010 at 10:35 AM, Tom Rondeau <address@hidden> wrote:
On Mon, Apr 26, 2010 at 1:30 AM, devin kelly <address@hidden> wrote:
> Hello Everyone,
> I've made a basic DBPSK transmitter and receiver.  I can receive ASCII
> strings fine and the spectrum looks exactly as it should.
> However, if I swap the DBPSK modulator/demodulator for the DQPSK
> modulator/demodulator, my system breaks.   I can no longer receive the same
> strings and the spectrum looks very strange.  It's much wider and triangular
> shaped.
> Same goes for the D8PSK system and the D16PSK system I recently was asking
> about.
> I believe marcin_w asked a similar question a few days ago and I haven't
> seen a reply yet (am I wrong?)  My question is, should I be doing something
> different?  Do I need to add in some extra block when I switch from DBPSK to
> DQPSK?  While searching old posts, I found some people talking about DQPSK
> not working correctly, but that was about a year ago.
> Any help would be greatly appreciated.
> Devin


Well, you haven't really told us what you are doing (code-wise), so
it's hard to tell...

Have you compared your code to the dbpsk/dbpsk2 and dqpsk/dqpsk2
blocks in the source code? That might give you a hint.

My best (blind) guess is that you are feeding the modulator the wrong
number of bits per sample. You have to send a dbspk a chunk size of 1
bit / byte while the dqpsk takes 2 bits/byte chunks.

Tom



--
http://users.wpi.edu/~dkelly/

reply via email to

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