Re: additional frequencies
2012-04-30 14:56:35 GMT
Well that seemed to have done it ! I multiplied them with an amplitude of 0.1 and set the rx gain to 46dB and now the spectrum is much cleaner. I even tried with 3 and 4 different frequencies.
Yeah, the 2 devices are connected to 2 PCs which are side by side so like 3.5 to 4 feet.
Again, Thanks a bunch!
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);
Also, look at the received signal in time domain. Is the shape same as transmitted? Clipping should be obvious.
Hope it helps,
On 4/30/2012 8:35 PM, Sanat Gulvadi wrote:_______________________________________________ USRP-users mailing list USRP-users <at> lists.ettus.com http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.comGreetings,
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 :
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
USRP-users mailing list
_______________________________________________ USRP-users mailing list USRP-users@... http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com