How to receive a sine wave signal from USRP2?
I am a student using the USRP N210 for the first time.
I have a USRP N210 with the LFRX daughter board. I am using Matlab to communicate with the USRP. Right now I am trying to familiarize myself with the USRP.
Using a signal generator, I am feeding a simple sine wave at around 2Mhz, 0dBm. I am trying to write a simple Matlab program that will be able to read the received sine wave through the USRP and plot it. I am having trouble producing the correct code to do so. Would the code below be in the right direction? Thanks.
RXObj = comm.SDRuReceiver(findsdru, …
‘CenterFrequency’, 2e6, …
‘DecimationFactor’, 100, …
‘OutputDataType’, ‘double’)
SigLog = dsp.SignalSink;
SigCount = 0;
while 1
% Get samples from RX at 100MHz/100 sample rate
[x, len] = step(RXObj);
if len > 0
step(SigLog, x)
SigCount = SigCount + 1;
end
if SigCount > 2000
break
end
end
data = SigLog.Buffer; %put logged data into array
release(hSDRu);
Now, this code just outputs complex doubles of really small magnitudes to data.
0.00000000000000 + 0.00000000000000i
0.00000000000000 + 0.00000000000000i
0.00000000000000 + 0.00000000000000i
0.00000000000000 + 3.05185094759972e-05i
6.10370189519944e-05 + 3.05185094759972e-05i
0.00000000000000 + 3.05185094759972e-05i
0.00000000000000 + 3.05185094759972e-05i
0.00000000000000 + 0.00000000000000i
-3.05185094759972e-05 + 0.00000000000000i
-3.05185094759972e-05 – 3.05185094759972e-05i
-3.05185094759972e-05 + 0.00000000000000i
0.00000000000000 + 0.00000000000000i
-3.05185094759972e-05 + 0.00000000000000iI am a student using the USRP N210 for the first time.
I have a USRP N210 with the LFRX daughter board. I am using Matlab to communicate with the USRP. Right now I am trying to familiarize myself with the USRP.
Using a signal generator, I am feeding a simple sine wave at around 2Mhz, 0dBm. I am trying to write a simple Matlab program that will be able to read the received sine wave through the USRP and plot it. I am having trouble producing the correct code to do so. Would the code below be in the right direction? Thanks.
RXObj = comm.SDRuReceiver(findsdru, …
‘CenterFrequency’, 2e6, …
‘DecimationFactor’, 100, …
‘OutputDataType’, ‘double’)
SigLog = dsp.SignalSink;
SigCount = 0;
while 1
% Get samples from RX at 100MHz/100 sample rate
[x, len] = step(RXObj);
if len > 0
step(SigLog, x)
SigCount = SigCount + 1;
end
if SigCount > 2000
break
end
end
data = SigLog.Buffer; %put logged data into array
release(hSDRu);
Now, this code just outputs complex doubles of really small magnitudes to data.
0.00000000000000 + 0.00000000000000i
0.00000000000000 + 0.00000000000000i
0.00000000000000 + 0.00000000000000i
0.00000000000000 + 3.05185094759972e-05i
6.10370189519944e-05 + 3.05185094759972e-05i
0.00000000000000 + 3.05185094759972e-05i
0.00000000000000 + 3.05185094759972e-05i
0.00000000000000 + 0.00000000000000i
-3.05185094759972e-05 + 0.00000000000000i
-3.05185094759972e-05 – 3.05185094759972e-05i
-3.05185094759972e-05 + 0.00000000000000i
0.00000000000000 + 0.00000000000000i
-3.05185094759972e-05 + 0.00000000000000i I am a student using the USRP N210 for the first time.
I have a USRP N210 with the LFRX daughter board. I am using Matlab to communicate with the USRP. Right now I am trying to familiarize myself with the USRP.
Using a signal generator, I am feeding a simple sine wave at around 2Mhz, 0dBm. I am trying to write a simple Matlab program that will be able to read the received sine wave through the USRP and plot it. I am having trouble producing the correct code to do so. Would the code below be in the right direction? Thanks.
RXObj = comm.SDRuReceiver(findsdru, …
‘CenterFrequency’, 2e6, …
‘DecimationFactor’, 100, …
‘OutputDataType’, ‘double’)
SigLog = dsp.SignalSink;
SigCount = 0;
while 1
% Get samples from RX at 100MHz/100 sample rate
[x, len] = step(RXObj);
if len > 0
step(SigLog, x)
SigCount = SigCount + 1;
end
if SigCount > 2000
break
end
end
data = SigLog.Buffer; %put logged data into array
release(hSDRu);
Now, this code just outputs complex doubles of really small magnitudes to data.
0.00000000000000 + 0.00000000000000i
0.00000000000000 + 0.00000000000000i
0.00000000000000 + 0.00000000000000i
0.00000000000000 + 3.05185094759972e-05i
6.10370189519944e-05 + 3.05185094759972e-05i
0.00000000000000 + 3.05185094759972e-05i
0.00000000000000 + 3.05185094759972e-05i
0.00000000000000 + 0.00000000000000i
-3.05185094759972e-05 + 0.00000000000000i
-3.05185094759972e-05 – 3.05185094759972e-05i
-3.05185094759972e-05 + 0.00000000000000i
0.00000000000000 + 0.00000000000000i
-3.05185094759972e-05 + 0.00000000000000i usrp, dsp, communication MATLAB Answers — New Questions