介绍
- PDSCH及其关联的DM-RS和PT-RS
- PDCCH及其相关的DM-RS
- PBCH及其相关的DM-RS
- PSS和SSS
- CSI-RS
波形和载波配置
- waveconfig = nrDLCarrierConfig(); % Create an instance of the waveform’s parameter object
- waveconfig.NCellID = 0; % Cell identity
- waveconfig.ChannelBandwidth = 40; % Channel bandwidth (MHz)
- waveconfig.FrequencyRange = ‘FR1’; % ‘FR1’ or ‘FR2’
- waveconfig.NumSubframes = 10; % Number of 1ms subframes in generated waveform (1,2,4,8 slots per 1ms subframe, depending on SCS)
- % Define a set of SCS specific carriers, using the maximum sizes for a
- % 40 MHz NR channel. See TS 38.101-1 for more information on defined
- % bandwidths and guardband requirements
- scscarriers = {nrSCSCarrierConfig(),nrSCSCarrierConfig()};
- scscarriers{1}.SubcarrierSpacing = 15;
- scscarriers{1}.NSizeGrid = 216;
- scscarriers{1}.NStartGrid = 0;
- scscarriers{2}.SubcarrierSpacing = 30;
- scscarriers{2}.NSizeGrid = 106;
- scscarriers{2}.NStartGrid = 1;</font>
复制代码
SS Burst
% SS burst configurationssburst = nrWavegenSSBurstConfig();ssburst.Enable = 1; % Enable SS Burstssburst.Power = 0; % Power scaling in dBssburst.BlockPattern = ‘Case B’; % Case B (30kHz) subcarrier spacingssburst.TransmittedBlocks = [1 1 1 1]; % Bitmap indicating blocks transmitted in a 5ms half-frame burstssburst.Period = 20; % SS burst set periodicity in ms (5, 10, 20, 40, 80, 160)ssburst.NCRBSSB = []; % Frequency offset of SS burst (CRB), use [] for the waveform center
带宽部分
- % Bandwidth parts configurations
- bwp = {nrWavegenBWPConfig(),nrWavegenBWPConfig()};
- bwp{1}.BandwidthPartID = 1; % Bandwidth part ID
- bwp{1}.SubcarrierSpacing = 15; % BWP subcarrier spacing
- bwp{1}.CyclicPrefix = ‘Normal’; % BWP cyclic prefix for 15 kHz
- bwp{1}.NSizeBWP = 25; % Size of BWP
- bwp{1}.NStartBWP = 12; % Position of BWP, relative to point A (i.e. CRB)
- bwp{2}.BandwidthPartID = 2; % Bandwidth part ID
- bwp{2}.SubcarrierSpacing = 30; % BWP subcarrier spacing
- bwp{2}.CyclicPrefix = ‘Normal’; % BWP cyclic prefix for 30 kHz
- bwp{2}.NSizeBWP = 50; % Size of BWP
- bwp{2}.NStartBWP = 51; % Position of BWP, relative to point A (i.e. CRB)</font>
复制代码
CORESET和搜索空间配置
- 指定时隙中每个CORESET监视机会的第一个符号的OFDM符号
- 一个时段内已分配时隙块的持续时间
- 分配模式的周期性
- CORESET持续时间,以符号表示,分别为1、2或3
- 定义CORESET的已分配物理资源块(PRB)的位图。请注意,CORESET频率分配是在6个PRB的块中定义的,以公共资源块(CRB)编号对齐,即相对于点A。位图中的每个位选择包含它的CRB对齐块中的所有6个PRB。
- CCE到REG的映射可以“交错”或“非交错”
- 基于CORESET持续时间的资源元素组(REG)捆绑包大小(L),为(2,6)或(3,6)
- 交织器大小为2、3或6
- 移位索引,范围为0 … 274的标量值
- % CORESET and search space configurations
- coresets = {nrCORESETConfig()};
- coresets{1}.CORESETID = 1; % CORESET ID
- coresets{1}.Duration = 3; % CORESET symbol duration (1,2,3)
- coresets{1}.FrequencyResources = [1 1 0 1]; % Bitmap indicating blocks of 6 PRB for CORESET (RRC – frequencyDomainResources)
- coresets{1}.CCEREGMapping = ‘noninterleaved’; % Mapping: ‘interleaved’ or ‘noninterleaved’
- coresets{1}.REGBundleSize = 3; % L (2,6) or (3,6)
- coresets{1}.InterleaverSize = 2; % R (2,3,6)
- coresets{1}.ShiftIndex = waveconfig.NCellID; % Set to NCellID
- searchspaces = {nrSearchSpaceConfig()};
- searchspaces{1}.SearchSpaceID = 1; % Search space ID
- searchspaces{1}.CORESETID = 1; % CORESET associated with this search space
- searchspaces{1}.SearchSpaceType = ‘ue’; % Search space type, ‘ue’ or ‘common’
- searchspaces{1}.SlotPeriodAndOffset = [5,0]; % Allocated slot period and slot offset of search space pattern
- searchspaces{1}.Duration = 2; % Number of slots in the block of slots in pattern period
- searchspaces{1}.StartSymbolWithinSlot = 0; % First symbol of each CORESET monitoring opportunity in a slot
- searchspaces{1}.NumCandidates = [8 8 4 2 0]; % Number of candidates at each AL (set to 0 if the AL doesn’t fit in CORESET)</font>
复制代码
PDCCH实例配置
- 启用/禁用PDCCH序列
- 指定携带PDCCH的BWP
- PDCCH实例功率,以dB为单位
- 启用/禁用DCI通道编码
- 在CORESET监视时机序列内分配的搜索空间
- 携带PDCCH实例的搜索空间(和CORESET)
- 分配的周期性。如果将其设置为空,则表示没有重复
- PDCCH的聚合等级(AL)(控制信道元素(CCE)的数量)
- 分配的候选者指定用于PDCCH传输的CCE
- RNTI
- 此PDCCH及其相关的DM-RS的加扰NID
- DM-RS功率提升
- DCI消息有效负载大小
- DCI消息数据源。您可以使用一个位数组或以下标准PN序列之一:“ PN9-ITU”,“ PN9”,“ PN11”,“ PN15”,“ PN23”。生成器的种子可以使用形式的单元格数组指定{‘PN9’,seed}。如果未指定种子,则生成器将全部初始化。
- pdcch = {nrWavegenPDCCHConfig()};
- pdcch{1}.Enable = 1 ; % Enable PDCCH sequence
- pdcch{1}.Power = 1.1; % Power scaling in dB
- pdcch{1}.Coding = 1; % Enable DCI coding
- pdcch{1}.BandwidthPartID = 1; % Bandwidth part
- pdcch{1}.SearchSpaceID = 1; % Search space
- pdcch{1}.SlotAllocation = 0; % Slots used with period
- pdcch{1}.Period = 5; % Period of transmission pattern
- pdcch{1}.AggregationLevel = 8; % Aggregation level (1,2,4,8,16 CCEs)
- pdcch{1}.AllocatedCandidate = 1; % PDCCH candidate in search space (1 based)
- pdcch{1}.RNTI = 0; % RNTI
- pdcch{1}.DMRSScramblingID = 1; % PDCCH and DM-RS scrambling NID
- pdcch{1}.DMRSPower = 0; % Additional power boosting in dB
- pdcch{1}.DataBlockSize = 20; % DCI payload size
- pdcch{1}.DataSource = ‘PN9’; % DCI data source</font>
复制代码
PDSCH实例配置
- 启用或禁用此PDSCH序列
- 指定携带PDSCH的BWP。PDSCH将使用为此BWP指定的SCS
- 功率缩放单位:dB
- 启用或禁用DL-SCH传输信道编码
- 传输块数据源。您可以使用一个位数组或以下标准PN序列之一:“ PN9-ITU”,“ PN9”,“ PN11”,“ PN15”,“ PN23”。生成器的种子可以使用形式的单元格数组指定{‘PN9’, seed}。如果未指定种子,则生成器将全部初始化。
- 用于计算传输块大小的目标码率
- 开销参数
- 符号调制
- 层数
- 冗余版本(RV)序列
- 启用或禁用虚拟到物理资源块映射的交错。如果未指定此参数,则考虑直接的,非交错的映射
- 交错图的捆绑包大小,由较高层参数vrb-ToPRB-Interleaver指定。如果未指定此参数,则捆绑包大小设置为2
- pdsch = {nrWavegenPDSCHConfig()};
- pdsch{1}.Enable = 1; % Enable PDSCH sequence
- pdsch{1}.BandwidthPartID = 1; % Bandwidth part of PDSCH transmission
- pdsch{1}.Power = 0; % Power scaling in dB
- pdsch{1}.Coding = 1; % Enable DL-SCH transport channel coding
- pdsch{1}.DataSource = ‘PN9’; % Channel data source
- pdsch{1}.TargetCodeRate = 0.4785; % Code rate used to calculate transport block sizes
- pdsch{1}.XOverhead = 0; % Rate matching overhead
- pdsch{1}.Modulation = ‘QPSK’; % ‘QPSK’, ’16QAM’, ’64QAM’, ‘256QAM’
- pdsch{1}.NumLayers = 2; % Number of PDSCH layers
- pdsch{1}.RVSequence = [0,2,3,1]; % RV sequence to be applied cyclically across the PDSCH allocation sequence
- pdsch{1}.VRBToPRBInterleaving = 0; % Disable interleaved resource mapping
- pdsch{1}.VRBBundleSize = 2; % vrb-ToPRB-Interleaver parameter</font>
复制代码
- 您可以设置以下参数来控制PDSCH分配。请注意,这些参数是相对于BWP的。指定的PDSCH分配将避开用于SS突发的位置。
分配给每个PDSCH实例的时隙中的符号帧中用于PDSCH序列的时隙时隙分配周期。如果为空,则表示没有重复分配的PRB相对于BWPRNTI。此值用于将PDSCH链接到PDCCH的实例用于加扰PDSCH位的NID
- pdsch{1}.SymbolAllocation = [2,9]; % First symbol and lengthpdsch{1}.SlotAllocation = 0:9; % Allocated slot indices for PDSCH sequencepdsch{1}.Period = 15; % Allocation period in slotspdsch{1}.PRBSet = [0:5, 10:20]; % PRB allocationpdsch{1}.RNTI = 0; % RNTIpdsch{1}.NID = 1; % Scrambling for data part</font>
复制代码
- The PDSCH can be rate matched around one or more CORESETs
- The PDSCH can be rate matched around other resource allocations
- pdsch{1}.ReservedCORESET = 1; % Rate matching pattern, defined by CORESET IDs</font>
复制代码
- % Antenna port and DM-RS configuration (TS 38.211 section 7.4.1.1)
- pdsch{1}.MappingType = ‘A’; % PDSCH mapping type (‘A'(slot-wise),’B'(non slot-wise))
- pdsch{1}.DMRSPower = 0; % Additional power boosting in dB
- pdsch{1}.DMRS.DMRSPortSet = [] ; % DM-RS antenna ports used ([] gives port numbers 0:NumLayers-1)
- pdsch{1}.DMRS.DMRSTypeAPosition = 2; % Mapping type A only. First DM-RS symbol position (2,3)
- pdsch{1}.DMRS.DMRSLength = 1; % Number of front-loaded DM-RS symbols (1(single symbol),2(double symbol))
- pdsch{1}.DMRS.DMRSAdditionalPosition = 0; % Additional DM-RS symbol positions (max range 0…3)
- pdsch{1}.DMRS.DMRSConfigurationType = 2; % DM-RS configuration type (1,2)
- pdsch{1}.DMRS.NumCDMGroupsWithoutData = 1; % CDM groups without data (max range 1…3)
- pdsch{1}.DMRS.NIDNSCID = 1; % Scrambling identity (0…65535)
- pdsch{1}.DMRS.NSCID = 0; % Scrambling initialization (0,1)</font>
复制代码
- % PT-RS configuration (TS 38.211 section 7.4.1.2)
- pdsch{1}.EnablePTRS = 0; % Enable or disable the PT-RS (1 or 0)
- pdsch{1}.PTRSPower = 0; % Additional PT-RS power boosting in dB
- pdsch{1}.PTRS.TimeDensity = 1; % Time density (L_PT-RS) of PT-RS (1,2,4)
- pdsch{1}.PTRS.FrequencyDensity = 2; % Frequency density (K_PT-RS) of PT-RS (2,4)
- pdsch{1}.PTRS.REOffset = ’00’; % PT-RS resource element offset (’00’,’01’,’10’,’11’)
- pdsch{1}.PTRS.PTRSPortSet = 0; % PT-RS antenna ports must be a subset of DM-RS ports
- % When PT-RS is enabled, the DM-RS ports must be in range 0 to 3 for DM-RS
- % configuration type 1 and in range 0 to 5 for DM-RS configuration type 2.
- % Nominally the antenna port of PT-RS is the lowest DM-RS port number.</font>
复制代码
- pdsch{2} = pdsch{1};
- pdsch{2}.Enable = 1;
- pdsch{2}.BandwidthPartID = 2; % PDSCH mapped to 2nd BWP
- pdsch{2}.SymbolAllocation = [0,12];
- pdsch{2}.SlotAllocation = [2:4,6:20];
- pdsch{2}.PRBSet = [25:30, 35:38]; % PRB allocation, relative to BWP</font>
复制代码
CSI-RS
- 启用或禁用这组CSI-RS资源
- 指定承载此CSI-RS资源集的BWP。CSI-RS资源配置将使用为此BWP指定的SCS
- 以dB为单位指定功率比例。提供标量可定义单个CSI-RS资源或所有已配置的CSI-RS资源的功率缩放。提供向量可为每个CSI-RS资源定义一个单独的功率电平。
- <pre style=”box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; line-height: 1.42; color: rgb(64, 64, 64); word-break: normal; overflow-wrap: normal; background: transparent; border: none; border-radius: 0px;”>csirs = {nrWavegenCSIRSConfig()};
- csirs{1}.Enable = 0;
- csirs{1}.BandwidthPartID = 1;
- csirs{1}.Power = 3; <span style=”box-sizing: border-box; color: rgb(34, 139, 34);”>% in dB</span></pre></font>
复制代码
- CSI-RS资源的类型(“ nzp”,“ zp”)
- 行号对应于TS 38.211表7.4.1.5.3-1(1 … 18)中定义的CSI-RS资源
- CSI-RS资源的频率密度(“一个”,“三个”,“ dot5even”,“ dot5odd”)
- 资源块(RB)中的CSI-RS资源的子载波位置
- 分配给CSI-RS资源的RB数(1 … 275)
- 相对于载波资源网格的CSI-RS资源分配的起始RB索引(0 … 274)
- 时隙内CSI-RS资源的OFDM符号位置
- CSI-RS资源的时隙的周期和偏移量(基于0)。此参数可以是向量或向量的单元格数组。在后一种情况下,每个小区对应一个单独的CSI-RS资源。在向量的情况下,所有CSI-RS资源都使用相同的时隙集
- 加扰身份与用于伪随机序列生成的CSI-RS资源相对应(0 … 1023)
- csirs{1}.CSIRSType = {‘nzp’,’zp’};
- csirs{1}.RowNumber = [3 5];
- csirs{1}.Density = {‘one’,’one’};
- csirs{1}.SubcarrierLocations = {6,4};
- csirs{1}.NumRB = 25;
- csirs{1}.RBOffset = 12;
- csirs{1}.SymbolLocations = {13,9};
- csirs{1}.CSIRSPeriod = {[5 0],[5 0]};
- csirs{1}.NID = 5;</font>
复制代码
- csirs{2} = nrWavegenCSIRSConfig();
- csirs{2}.Enable = 0;
- csirs{2}.BandwidthPartID = 2;
- csirs{2}.Power = 3; % in dB
- csirs{2}.CSIRSType = {‘nzp’,’nzp’};
- csirs{2}.RowNumber = [1 1];
- csirs{2}.Density = {‘three’,’three’};
- csirs{2}.SubcarrierLocations = {0,0};
- csirs{2}.NumRB = 50;
- csirs{2}.RBOffset = 50;
- csirs{2}.SymbolLocations = {6,10};
- csirs{2}.CSIRSPeriod = {[10,1],[10,1]};
- csirs{2}.NID = 0;</font>
复制代码
波形产生
- waveconfig.SSBurst = ssburst;
- waveconfig.SCSCarriers = scscarriers;
- waveconfig.BandwidthParts = bwp;
- waveconfig.CORESET = coresets;
- waveconfig.SearchSpaces = searchspaces;
- waveconfig.PDCCH = pdcch;
- waveconfig.PDSCH = pdsch;
- waveconfig.CSIRS = csirs;
- [waveform,info] = nrWaveformGenerator(waveconfig);
- % Plot the magnitude of the baseband waveform for the set of antenna ports defined
- figure;
- plot(abs(waveform));
- title(‘Magnitude of 5G Downlink Baseband Waveform’);
- xlabel(‘Sample Index’);
- ylabel(‘Magnitude’);
- % Plot spectogram of waveform for first antenna port
- samplerate = info.ResourceGrids(1).Info.SampleRate;
- nfft = info.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’);</font>
复制代码
- 每个BWP对应的资源网格
- 包含每个BWP中的信道和信号的总带宽的资源网格
- 具有对应于每个BWP的信息的信息结构。第一个BWP的此信息结构的内容如下所示。