필터 지우기
필터 지우기

Ettus Research X310 Twin Rx - Unable to run MATLAB Example

조회 수: 5 (최근 30일)
Md Anowar Hossain
Md Anowar Hossain 2023년 3월 12일
댓글: Karunya Choppara 2023년 6월 14일
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