Haris Kremo | 30 Apr 2012 15:23

Re: additional frequencies

Sanat,

I'd try reducing the rx gain. Too large input signal can be out of the dynamic range and clipped. (Is the distance between Tx and Rx short?) In frequency domain you'd see additional harmonics introduced as in your plots. You can achieve this in Matlab with something like

clip = find(x>1);
x(clip)=1;
plot(abs(fft(x)))

Also, look at the received signal in time domain. Is the shape same as transmitted? Clipping should be obvious.

Hope it helps,

H.

On 4/30/2012 8:35 PM, Sanat Gulvadi wrote:
Greetings,

I'm using two USRP2 REV4 with UHD_003.004.000-325-g7e296167 and RFX2400 daughterboards for wireless transmission.

I'm transmitting samples generated with the following matlab code :

Fs=6.25e6;
t = [0:1/Fs:.1].';
x = cos(2*pi*t*1.5e6)+ cos(2*pi*t*2.5e6);

I am transmitting the samples from a file using UHD command line application which I based on the tx_samples_from_file.cpp example. The only difference is that I read the whole file contents to a buffer and use a variable called PacketId as an index to read from the buffer one packet at a time, and when all the file samples are read, I just set the index PacketId to 0 and thus it loops over the file contents till the desired number of samples is reached. In my last query, it was suggested by Josh that to avoid any processing overhead by file seek operations, I could use 2 threads to simultaneously read from file and supply the Tx buffer. But before I try that, I wanted to try something simpler and so for now the single file buffer using a std::vector container seems to work without causing any Underflows.

Both the Tx and Rx are tuned to the same 2.45GHz carrier frequency and their sampling rates are 6.25MHz. Rx gain is set to the maximum for the daughterboard which is 70. Transmission occurs as follows :
Start Tx -> wait -> start Rx -> Rx snapshot -> Stop Rx -> Stop Tx.

When I plot the receiver output, I do see the 2 frequencies I transmitted initially but there are many other additional frequencies that show up in the spectrum. I am hoping someone could help me figure out what could be giving rise to these additional components. One thing that occured to me is that since I am looping over the file contents multiple times, it could be that if there was a change in the phase, it could cause something like this. But I'd have imagined that their presence wouldn't be so significant.
The reason I was trying to do this was to see if the the different local oscillators on the 2 devices was causing any frequency offsets. From the plot, am I right in assuming there isn't any? That can't be right can it?

I am plotting using the MATLAB spectrum object as follows :
hopts = spectrum.periodogram;
subplot(211);psd(hopts,x,'Fs',Fs);title('Tx spectrum') %Fs is 6.25e6
subplot(212);psd(hopts,real(xhat),'Fs',Fs); title('Rx spectrum') %xhat is a snapshot taken from the middle of the received samples same length as x

Regards,
Sanat




_______________________________________________ USRP-users mailing list USRP-users-p6fHTpcPDZaz3Dx2OeFgIA@public.gmane.org http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
_______________________________________________
USRP-users mailing list
USRP-users@...
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Gmane