PDSCH: Lower Physical layer Chain
This module implements the lower physical layer of physical downlink shared channel (PDSCH). It consists of scrambling, symbol mapping, layer mapping and resource mapping as shown below.
An Example of how to initialize and call the PDSCH lower PHY
pdschMappingType = 'PDSCH-mapping-type-B'
maxLength = 'len1'
startSymbol = 0
numSymbols = 7
betaDMRS = 1
configurationType = 'Configuration-type-1'
dmrsTypeAPosition = 'pos2'
dmrsAdditionalPosition = 'pos2'
ld = 7
l0 = 0
l1 = 11
rank = 1
scramblingID = 57775
nSCID = 0
pdschLowerPhyChain = PDSCHLowerPhy(pdschMappingType, configurationType, dmrsTypeAPosition, maxLength, dmrsAdditionalPosition, l0, ld, l1)
rnti = np.random.randint(65536, size=numBSs*numBatches)
nID = np.random.randint(1024, size=numBSs*numBatches)
bits2 = codeword[1] if numTBs == 2 else None
resourceGrid = pdschLowerPhyChain(codeword[0], numRB, rank, slotNumber, scramblingID, nSCID, rnti, nID, modOrder, startSymbol, bits2 = bits2)
Results: The Resultant CDM Grid:
pdschLowerPhyChain.displayDMRSGrid()
![Alternative text](api/figures/PhysicalChannels/PDSCHCDM.png)
The Resultant Resource Grid:
pdschLowerPhyChain.displayResourceGrid()
![Alternative text](api/figures/PhysicalChannels/PDSCHResGrid.png)
The details of the input-output interface are provided in following sub-section.
- class toolkit5G.PhysicalChannels.PDSCHLowerPhy(pdschMappingType, configurationType, dmrsTypeAPosition, maxLength, dmrsAdditionalPosition, l0, ld, l1)[source]
Generates the QPSK symbols processed by PBCH chain as per Section 7.3.2.5 of [3GPPTS38211pdsch]. The PBCH symbols generated by the chain can be directly inserted into SSB Grid.
- Parameters:
pdschMappingType (str) – Defines PDSCH mapping type \(\in \{\) ‘PDSCH-mapping-type-A’, ‘PDSCH-mapping-type-B’ \(\}\).
configurationType (str) – Defines configuration type for PDSCH \(\in \{\) ‘Configuration-type-1’, ‘Configuration-type-2’ \(\}\).
dmrsTypeAPosition (str) – Defines dmrsTypeAPosition parameter of PDSCH-DMRS \(\in \{\) ‘pos2’, ‘pos3’ \(\}\).
maxLength (int) – Defines the maxLength parameter of PDSCH-DMRS \(\in \{\) ‘len1’, ‘len2’ \(\}\).
dmrsAdditionalPosition (str) – Defines dmrsTypeAPosition parameter of PDSCH-DMRS \(\in \{\) “pos0”, “pos1”, “pos2”, “pos3” \(\}\).
l0 (int) – Defines \(l_0\) parameter of PDSCH-DMRS \(\in \{1, 2, 3, 4, 5, 6\}\).
ld (int) – Defines \(l_d\) parameter of PDSCH-DMRS. It takes values \(\in \{2,3,4,5,6,7,8,9,10,11,12,13\}\) based on
pdschMappingType
andmaxLength
.l1 (int) – Defines \(l_1\) parameter of PDSCH-DMRS \(\in \{11, 12\}\). Default value is 11.
- Input:
bits1 ((…,numBits1), int) – Transport block-1 encoded bits.
numRB (int) – Defines number of physical resource blocks (PRBs) occupied by DMRS-PDSCH.
rank (int) – Defines rank/num of layers/streams to be transmitted. It must match number of ports \(\in \{1,2,\dots,8\}\) for ‘Configuration-type-1’ and \(\in \{1,2,\dots,12\}\) for ‘Configuration-type-2’.
slotNumber (int) – Defines the slot number within a frame where DMRS-PDSCH is loadedS \(n_{s,f}^{\mu} \in \{0,1,2,\) \(\dots,10*2^{\mu}-1\}\) where \({\mu = \frac{\Delta f}{15 kHz}}\).
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.
rnti ((int or NumPy array, np.int)) – Defines rnti - It defines the radio network temporary identifier (RNTI) \(\in \{1,2,..,65519\}\).
nID ((int or NumPy array, np.int)) – Defines nID - It defines dataScramblingIdentityPDSCH(2), \(\text{n}_{\text{ID}} \in \{0,1,2,..,65535\}\).
modOrder (int) – Defines the modulation order (number of bits per symbol). It must be a multiple of 2.
pdschStartSymbol (int) – Defines the first symbols from where PDSCH is supported to be loaded.
bits2 ((…,numBits2), int) – Default value is set for single TB transmission to None.
- Returns:
Resource Grid containing DMRS and PDSCH symbols.
- Return type:
[
rank
, 14, 12 * (Number of Resource Blocks)], np.complex64- Attributes:
Accessed using
``<PDSCH Lower PHY Object name>.<Attribute name>``
rmDMRSpdsch (object) – The object responsible for mapping PDSCH DMRS onto resource grid Further information can be gathered from ResourceMapping ==> Physical Downlink Shared Channel-DMRS
pdschIndices (tuple of array) – The Indices where pdsch packets are stored in the resource Grid.
.. Note:: – Used in PDSCH Lower Phy Decoder
- PDSCHLowerPhy.displayDMRSGrid(*arg)[source]
Provides the method to display DMRS resource grid. It only displays the t-f locations where DMRS id loaded.
- Input:
index (int) – Define the Index of port whose grid has to be displayed. In case no value is passed, grids for all the ports is displayed.
- PDSCHLowerPhy.displayResourceGrid(portIndex=0)[source]
Provides the method to display resource grid containing DMRS and PDSCH.
- Input:
portIndex (int) – Define the Index of port whose grid has to be displayed. In case no value is passed, grids for all the ports is displayed.