Ettus Research X310 Twin Rx - Unable to run MATLAB Example

5 次查看(过去 30 天)
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

回答(1 个)

Harsh
Harsh 2023-5-16
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 个评论
Karunya Choppara
Karunya Choppara 2023-6-14
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Communications Toolbox 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by