How to change nrDLCarrierConfig to FR2?

조회 수: 1 (최근 30일)
Al
Al 2023년 11월 6일
답변: Umeshraja 2024년 10월 4일
Just trying to play around with the code here, I am trying to added in parameters to get FR2 instead of FR1 but it isnt working. I know I need to change SCS but I seem to be doing it wrong:
scs1 = nrSCSCarrierConfig;
scs2 = nrSCSCarrierConfig('SubcarrierSpacing',60,'NSizeGrid',275);
waveconfig = nrDLCarrierConfig('FrequencyRange','FR2','SCSCarriers', {scs1,scs2},'ChannelBandwidth',60);
%waveconfig.PDSCH{1}.PRBSet = 0:10;
%waveconfig.ChannelBandwidth = 60;
[waveform,waveformInfo] = nrWaveformGenerator(waveconfig);
% Plot spectrogram of waveform for first antenna port
samplerate = waveformInfo.ResourceGrids(1).Info.SampleRate;
nfft = waveformInfo.ResourceGrids(1).Info.Nfft;
figure;
spectrogram(waveform(:,1),ones(nfft,1),0,nfft,'centered',samplerate,'yaxis','MinThreshold',-130);
title('Spectrogram of 5G Downlink Baseband Waveform');
Is there somewhere with an example? Or can someone please help guide me?

답변 (1개)

Umeshraja
Umeshraja 2024년 10월 4일
Hi @Al,
To create an 'nrDLCarrierConfig' object for Frequency Range 'FR2', specific constraints apply to the configuration parameters. According to the MATLAB R2023b documentation, the channel bandwidth for 'FR2' must be one of the following: 50, 100, 200, 400, 800, 1600, or 2000 MHz.
Additionally, the maximum transmission bandwidth configuration (TS 38.104 Tables 5.3.2-2 and 5.3.2-3) for 'FR2' varies based on the UE channel bandwidth and subcarrier spacing, as shown in the table below:
Here is how you can generate an NR downlink carrier waveform in FR2:
% Downlink configuration
cfgDL = nrDLCarrierConfig('FrequencyRange', 'FR2', ...
'ChannelBandwidth', 50);
%% SCS specific carriers
% Carrier 1
scscarrier1 = nrSCSCarrierConfig('SubcarrierSpacing', 60, 'NSizeGrid', 66, 'NStartGrid', 3);
% Carrier 2
scscarrier2 = nrSCSCarrierConfig('SubcarrierSpacing', 120, 'NSizeGrid', 32, 'NStartGrid', 2);
cfgDL.SCSCarriers = {scscarrier1, scscarrier2};
%% Bandwidth Parts
bwp = nrWavegenBWPConfig;
bwp.SubcarrierSpacing = 60;
bwp.NSizeBWP = 66;
bwp.NStartBWP = 3;
cfgDL.BandwidthParts = {bwp};
%% Synchronization Signals Burst
ssburst = nrWavegenSSBurstConfig;
ssburst.BlockPattern = 'Case D';
%'Case D' — For FR2 and 120 kHz SCS.
%'Case E' — For FR2 and 240 kHz SCS.
%'Case F' — For FR2 and 480 kHz SCS.
%'Case G' — For FR2 and 960 kHz SCS.
ssburst.TransmittedBlocks = ones([1 64]); % 4/8-bit binary vector for FR1 and 64-bit binary vector for FR2
ssburst.SubcarrierSpacingCommon = 60; % 15/30 for FR1 and 60/120 for FR2
cfgDL.SSBurst = ssburst;
%% Generation
[waveform,info] = nrWaveformGenerator(cfgDL);
Fs = info.ResourceGrids(1).Info.SampleRate; % Specify the sample rate of the waveform in Hz
%% Visualize
% Spectrum Analyzer
spectrum = spectrumAnalyzer('SampleRate', Fs);
spectrum(waveform);
release(spectrum);
Alternatively, you can use the 5G Waveform Generator App of MATLAB’s 5G Toolbox to easily generate standard-compliant NR uplink and downlink carrier waveforms. Please refer to the following documentation to get started
For more information, please refer to the MATLAB R2023b documentation

카테고리

Help CenterFile Exchange에서 5G Toolbox에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by