Physical Downlink Shared Channel-PTRS
This modules generates a resource grid with Phase Tracking Reference Signal (PTRS) for physical downlink shared channel (PDSCH) mapped to a resource grid.
Generating PDSCH-PTRS Resource Grid Case-1:
numBatches = 7
numRB = 20
pdschMappingType = "PDSCH-mapping-type-A"
maxLength = "len1"
startSymbol = 0
numSymbols = 4
configurationType = "Configuration-type-1"
ld = numSymbols
rank = 2
rnti = np.random.randint(65536, size=numBSs*numBatches)
scramblingID = int(np.random.randint(65535, dtype = int)) # or Cell-ID for Initial Access
nSCID = int(np.random.randint(2, dtype = int))
#PTRS parameters
offsetIndex = '00'
lptrs = 1
kptrs = 2
RMptrspdsch = ResourceMapperPTRSpdsch(lptrs,kptrs,offsetIndex)
resourceGrid = RMptrspdsch(rank,configurationType,startSymbol,ld,numRB,rnti,scramblingID,nSCID,numBatches,numBSs=1)
Display the PTRS-PDSCH Resource Grid:
fig0, ax0 = RMptrspdsch.DisplayResourceGrid()
Generating PDSCH-PTRS Resource Grid Case-2:
numBatches = 3
numRB = 40
pdschMappingType = "PDSCH-mapping-type-B"
maxLength = "len2"
startSymbol = 1
numSymbols = 7
configurationType = "Configuration-type-2"
ld = numSymbols
rank = 4
rnti = 12557
scramblingID = 34956
nSCID = 0
#PTRS parameters
offsetIndex = '00'
lptrs = 4
kptrs = 4
RMptrspdsch = ResourceMapperPTRSpdsch(lptrs,kptrs,offsetIndex)
resourceGrid = RMptrspdsch(rank,configurationType,startSymbol,ld,numRB,rnti,scramblingID,nSCID,numBatches,numBSs=1)
Note: The Rank, Start Symbol and Number of Symbol must be chosen in accordance to the configuration, mapping types and max length
Display the PTRS-PDSCH Resource Grid:
fig1, ax1 = RMptrspdsch.DisplayResourceGrid()
- class toolkit5G.ResourceMapping.ResourceMapperPTRSPDSCH(lptrs, kptrs, offsetIndex)[source]
To Generate Phase Tracking reference Signal and Allocate it resource Elements in accordance with 7.4.1.2.2 3GPP TS38.211
- Parameters:
lptrs (int) – Defines the Time Density \(\in \{1, 2, 4\}\). This variable is defined in 3GPP TS 38.211 Section 7.4.1.2.2 as \(L_{PT-RS}\).
kptrs (int) – Defines the Frequency Density \(\in \{2,4\}\). This variable is defined in 3GPP TS 38.211 Section 7.4.1.2.2 as \(K_{PT-RS}\).
offset Index (str) – Used to compute resource element Offset \(\in \{00,01,10,11\}\). This variable is defined in 3GPP TS 38.211 Section 7.4.1.2.2, Table 7.4.1.2.2-1 as \(\{\) ‘offset00’, ‘offset01’, ‘offset10’, ‘offset11’ \(\}\).
- Input:
rank (str) – Defines the number of Ports \(\in \{1,2, \dots ,8\}\) for ‘Configuration-type-1’ and \(\in \{1,2, \dots ,12\}\) for ‘Configuration-type-2’
configurationType (str) – Defines configuration type for PDSCH \(\in \{\) ‘Configuration-type-1’, ‘Configuration-type-2’ \(\}\).
pdschStartSymbol (int) – Defines the starting symbol for PDSCH allocation :math in {0,1,dots,4} for ‘Single/Double Symbol Mapping Type A’ and \(\in \{0,1,\dots,13\}\) for ‘Single Symbol Mapping type B’ and \(\in \{0,1,\dots,7\}\) for ‘Double Symbol Mapping type B’
ld (int) – Defines Number of symbols taken for PDSCH Transmission \(l_d\) parameter of PDSCH-DMRS. It takes values \(\in \{2,3,4,5,6,7,8,9,10,11,12,13\}\)
numRBs (int) – Defines number of physical resource blocks (PRBs) occupied for PDSCH transmission.
scramblingID (int) – Defines the scramblingID \(\in \{0,1,\dots,65535\}\).
nSCID (int) – Defines the quantity \(\text{𝑛}_{\text{SCID}} \in \{0,1\}\) is given by the DM-RS sequence initialization field.
- Output:
[
numBatches
,numBSs
,numPorts
, 14,numResourceBlocks*12
], np.complex32 – Phase Tracking reference signal (PTRS) for PDSCH (PTRS-PDSCH) Grid.- Raises:
ValueError – [Error PDSCH-PTRS RM] PTRS Not supported for Configuration-type-1 when rank greater than 4
ValueError – [Error PDSCH-PTRS RM] Enter valid offset index
ValueError – [Error PDSCH-PTRS RM] Enter a Valid configuration
ValueError – [Error PDSCH-PTRS RM] lptrs must be an Integer value
ValueError – [Error PDSCH-PTRS RM] lptrs can take values 1,2 and 4 only
ValueError – [Error PDSCH-PTRS RM] kptrs must be an Integer value
ValueError – [Error PDSCH-PTRS RM] kptrs can tale values 2 and 4 only
ValueError – [Error PDSCH-PTRS RM] offsetIndex must be a string
ValueError – [Error PDSCH-PTRS RM] offsetIndex can take values 00,01,10 & 11 only
ValueError – [Error PDSCH-PTRS RM] configurationType must be an string
ValueError – [Error PDSCH PTRS RM] ‘configurationType’ must be ‘Configuration-type-1’ or ‘Configuration-type-2’!
- References:
- [3GPPTS38211_pdschDMRS]
(3GPP TS 38.211 version 17.1.0 Release 17) 5G;NR;Physical channels and modulation ‘5.2.2 Low-PAPR sequence generation type 1’