Ettus Research X310 Twin Rx - Unable to run MATLAB Example

5 views (last 30 days)
Dear Sir,
I am trying to capture signal using Ettus Research X310 Twin Rx.
Everything is fine when I use "findsdru" and "probesdru"
However, I am getting the following error,
===============================================================================
======================================================================================
I am using the following codes from MATLAB example.
======================================================================================
rx = comm.SDRuReceiver(...
'Platform','X310', ...
'IPAddress','192.168.10.33', ...
'OutputDataType','double', ...
'IsTwinRXDaughterboard',true, ...
'EnableTwinRXPhaseSynchronization',true, ...
'ChannelMappin',[1 2 3 4]
'MasterClockRate',200e6, ...
'DecimationFactor',200, ...
'Gain',35, ...
'CenterFrequency',2.45e9, ...
'SamplesPerFrame',4000);
frameduration = (rx.SamplesPerFrame)/(200e6/200);
time = 0;
timeScope = timescope('TimeSpanSource','Property','TimeSpan',...
4/30e3,'SampleRate',200e6/200);
spectrumScope = dsp.SpectrumAnalyzer('SampleRate',200e6/200);
spectrumScope.ReducePlotRate = true;
disp("Reception Started");
while time < 10
data = rx();
amp(1) = max(abs(data(:,1)));
amp(2) = max(abs(data(:,2)));
amp(3) = max(abs(data(:,3)));
amp(4) = max(abs(data(:,4)));
maxAmp = max(amp);
if any(~amp)
NormalizedData = data;
else
NormalizedData(:,1) = maxAmp/amp(1)*data(:,1);
NormalizedData(:,2) = maxAmp/amp(2)*data(:,2);
NormalizedData(:,3) = maxAmp/amp(3)*data(:,3);
NormalizedData(:,4) = maxAmp/amp(4)*data(:,4);
end
freqOfFirst = fft(NormalizedData(:,1));
freqOfSecond = fft(NormalizedData(:,2));
freqOfThird = fft(NormalizedData(:,3));
freqOfFourth = fft(NormalizedData(:,4));
angle1 = rad2deg(angle(max(freqOfFirst)/max(freqOfSecond)));
angle2 = rad2deg(angle(max(freqOfFirst)/max(freqOfThird)));
angle3 = rad2deg(angle(max(freqOfFirst)/max(freqOfFourth)));
timeScope([real(NormalizedData),imag(NormalizedData)]);
spectrumScope(NormalizedData);
end
time = time + frameduration;
end

Answers (1)

Harsh
Harsh on 16 May 2023
Hi Anowar,
I understand that you are facing an error while trying to receive signal using X310 USRP.
In the following points, I am suggesting a few steps to resolve this issue:
  • “ChannelMapping” property is wrongly spelled in the definition of “comm.SDRuReceiver” that you have shared. Therefore, feel free to use the following definition:
rx = comm.SDRuReceiver(...
'Platform','X310', ...
'IPAddress','192.168.10.33', ...
'OutputDataType','double', ...
'IsTwinRXDaughterboard',true, ...
'EnableTwinRXPhaseSynchronization',true, ...
'ChannelMapping',[1 2 3 4], ...
'MasterClockRate',200e6, ...
'DecimationFactor',200, ...
'Gain',35, ...
'CenterFrequency',2.45e9, ...
'SamplesPerFrame',4000);
  • If the above does not help, please share your MATLAB version and OS information. It will allow to better debug the issue. You can obtain this information by running “ver” command in the MATLAB command line.
  1 Comment
Karunya Choppara
Karunya Choppara on 14 Jun 2023
Yes please update the code as per the suggestions provided in the last answer.
Also get the latest version of Support Package, by checking for the Updates.

Sign in to comment.

Categories

Find more on Communications Toolbox in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!