[Top][All Lists]

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

[Discuss-gnuradio] Fwd: Cyclic Time drift while sending I&Q samples thro

From: Madan
Subject: [Discuss-gnuradio] Fwd: Cyclic Time drift while sending I&Q samples through USRP2
Date: Mon, 8 Mar 2010 10:47:31 +0530

Hi there,

            I am working on a project, where in it requires the OFDM I&Q samples of my Tx -Rx C program  to be transmitted from one USRP2 to another USRP2.

For initial trails i am trying to transmit  a text file which contain set of 4M I&Q Samples of SINE WAVE (1 KHz) in two separate columns.

This file containing I&Q samples i am encoding it std::complex <float> type of 4 bytes each, .i.e., 32 bit value  and using at the Tx. Similarly i am Decoding every 4 bytes of data into 16 bit I&Q samples into two separate columns in file.

The first trail i tried was using GRC and building a simple block at the


 FILE SOURCE ----->  USRP2 SINK (f 1.8G, Gain:- 0db)
  (repeat yes)

and Receiver

(f 1.8G, Gain :- 40 db)

Before i started dumping into the file, i first connected Graphical sink to the USRP2 SOURCE block(in receiver side) and started the transmitter and checked the wave form of sine by varying the interpolation and decimation rates in the Tx and Rx so that , i get an exact period of the sine wave getting transmitted, after selecting the appropriate Interpolation and Decimation Rates, I connected the FILE SINK and captured the data.

When i plotted the Sent I&Q samples of SINE wave and received I&Q samples of Sine Wave in MATLAB...., I see the sine wave has come correctly, but there seems to be a cyclic time drift. The Recieved and transmitted wave are matching perfectly at 350 samples and that point to next 350 samples the sine wave slowly starts getting out of phase and at 350+350 sample, the periods of the two transitted sine wave are completely out of phae by 180 degree, this continues in this manner,..

Samples :-        0        350          700          1050       1400        1750 ......
Phase shift:-     0   90  180    0    -90   -180    0    90    180   0    90..........(in degrees)

(Sorry i am not able to attach the resultant plot)

The same results i have been getting with various programs as specified below.

       Tx                           Rx

 1)tx_samples.cc              rx_streaming_samples.cc
 2)tx_samples.cc              usrp_rx_cfile.py
 3)GRC block(mentioned   usrp_rx_cfile.cc

Since benchmark_tx.py and benchmark_rx.py  were working fantastically,   I tried tapping by inserting my I&Q samples through a file in the gr_frequency_modulator_fc.cc(gr_complex *out[i])  and receiving at the gr_quadrature_demod_cf.cc (gr_complex *in[i]) .

Even then , the results were showing the time drift as you can see in the plotted snapshot.
Can you please Help me....?

1) Is this synchronization error between TWO RF's.

2)Do i have to synchronize the two USRP2's with a master clock using GPS receiver ?  (because in the benchmark_tx.py and benchmark_rx.py ....certain algorithms are being used for CLOCK Recovery ( Muller & Muller), and i am not in favour of using these programs being a overhead to my programs which are processing OFDM I&Q samples.

If yes, then can you please suggest me which are the compatible GPS receiver available and How to connect and synchronize the USRP2's step by step.

3) Can you please suggest me are there any better ways to for me SEND and RECIEVE  I&Q samples properly.?
4) Also can you tell me , if my current configuration is sufficient to utilize the maximum bandwidth and throughput of USRP2 ?

My USRP2 Configuration and Setup:

Two USRP2's having RF1800 dughterboards

First USRP2 is connected to Intel Core 2 Quad Q8400 (2.66GHz),3GB RAM  and similarly Second USRP2 is connected to Intel Core 2 Quad Q 8300 (2.5GHz),3GB RAM both are connected via inbuilt GIGABIT ethernet cards running UBUNTU 9.04

The RF of two USRP2's are connected using 20db(2W) * 3 attenuators (Female to Male SMA) and 1 mtr RF cable(Male to Male). achieving an total attenuation of 60db (as per USRP requirement).


Sondur Madan

reply via email to

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