why do i get zero vector when using USRP N210 with MATLAB using comm.SDRuReceiver ?

i want to recived real TV signal and using the following functions:
radio = comm.SDRuReceiver( 'Platform','N200/N210/USRP2','IPAddress','192.168.10.2', ...
'CenterFrequency',650e6);
spectrumAnalyzer = dsp.SpectrumAnalyzer('InputDomain','Frequency',....
'SampleRate', 1e9,....
'SpectrumType', 'Power density',...
'YLimits', [-130,20],...
'PlotAsTwoSidedSpectrum', false,...
'SpectralAverages', 50, ...
'FrequencySpan', 'Start and stop frequencies', ...
'StartFrequency', 500e6, ...
'StopFrequency', 800e6,...
'Position', figposition([50 30 30 40])) ;
[rxSig, len ] = radio();
spectrumAnalyzer(rxSig);
why the {rxSig} is zeros and also the plot results is zero.

 採用された回答

Karunya Choppara
Karunya Choppara 2021 年 4 月 17 日

0 投票

When len = 0, the data from radio() call is not a valid data, and we see all zeros in the rxSig output.
When providing data to the spectrumAnalyzer, we need to check the condition that len output is greater then 0.
[rxSig, len ] = radio();
if (len>0)
spectrumAnalyzer(rxSig);
end

4 件のコメント

Hadeel S. Abed
Hadeel S. Abed 2021 年 4 月 17 日
@Karunya Choppara thank you very much .. yes i test the len its zero , but why this problem occure ??
i want to recive the real UHF TV signal through the USRP N210.. can you help me, please.
Karunya Choppara
Karunya Choppara 2021 年 4 月 18 日
@Hadeel S. Abed Currently this is an intended behavior, which happens when the radio is not able to provide the requested number of samples (specified by 'SamplesPerFrame' parameter), to fill the buffer within the specified timeout (internal parameter). You could receive the samples by iteratively calling the radio(), and once the buffer is filled with number of samples equal to 'SamplesPerFrame', the 'len' output returns a non-zero value, and 'rxSig' output will have the received samples from the radio.
for i=1:1000
[rxSig, len ] = radio();
if (len>0)
spectrumAnalyzer(rxSig);
end
end
Sana Rehman
Sana Rehman 2022 年 5 月 10 日
Hi when i am doing the communication betwee usrp n 2920 . the receiver is receiving the messy code rather than the message i sent . the clock is fixed i.e. both the devices are synchronized and also the gain has been changed too but its seems like the gain change in irrelevant. Could you please help how to get the successful communication
Karunya Choppara
Karunya Choppara 2022 年 5 月 10 日
HI Sana,
Have you tried any of the examples available with USRP Support package.
Thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCommunications Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by