Physical Sidelink Control Channel (PSCCH)
This module implements the physical Sidelink control channel.The complete physical layer chain at the transmitter and receiver is divided into upper physical layer chain (upperPhy) and lower physical layer chain (lowerPhy).The upper physical layer consists of 24 Bit CRC addition, Polar Encoding and, rate matching.On the other hand, the lower physical layer module implements scrambling, modulation (symbol mapping),and resource mapping. It return the OFDM resource grid for sub-carrier/sub-band specific precoding/beamforming and other RF specific processing. These modules provides the high level APIs for the PDSCH chains.
PSCCH Transmitter
The details about the transmitter side of the PDSCH are provided in [3GPPTS38211pscch], [3GPPTS38212pscch] and [COMST.2021.3057017]. The chain is bi-parted into upper physical layer and lower physical layer section to entertain both the link-level and system level simulations. The details of the APIs is provided in following sub-sections.
- class toolkit5G.PhysicalChannels.PSCCHUpperPhy(numTargetBits)[source]
To Receive , process 1st stage Sidelink Control Information and return 24-bit-CRC attached,polar encoded,Rate matched Bits
- Parameters:
numtargetBits (int) – Defined the number ofbits expecte after rate matching
- Input:
sciBits (np.ndarray) – 1st stage Sidelink control information
verbose (Boolean) – Flag used to control whether or not verbose
- Output:
sciRM (np.ndarray) – 24-bit-CRC attached,polar encoded,Rate matched 1st stage Sidelink control Information Bits of length numTargetBits
- Raises:
ValueError – [Error-PSCCH Upper Phy] Number of Symbols allocated for Sidelink Control channel transmission must be equal to either 2 or 3
ValueError – [Error-PSCCH Upper Phy] The 1st stage SCI payload size K between 22 and 43
ValueError – [Error-PSCCH Upper Phy] The number of Batches must be a +ve Integer
ValueError – [Error-PSCCH Upper Phy] The number of Target Bits must be a +ve Integer
ValueError – [Error-PSCCH Upper Phy] The sci Bits must an array with binary Digits (0 and 1) only
- class toolkit5G.PhysicalChannels.PSCCHLowerPhy(numRB, symbNumber, slotNumber, scramblingID)[source]
To Receive Rate Matched first stage SCI Bits, generate DMRS and allocate Resource Elements to both with the resource Grid :Parameters: * symbNumber (np.ndarray) – Defines the OFDM symbol Number within the slot. Array of length numSymbols with each element \(\in \{2,3,\dots,14\}\).
slotNumber (int) – Defines the slot number within a frame where DMRS-PSCCH is loaded \(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\}\).
NumRB (int) – Defines the Number of RB allocated for Sidelink Control Channel transmission:math:in {10,12,15,20,25}. This variable is defined in “A Tutorial on 5G NR V2X Communications”, COMST.2021.3057017
- Input:
bits (np.ndarray) – Input bits that are to be allocated resource elements in the resource Grid
- Output:
[
numPorts
, 14,numResourceBlocks*12
], np.complex32 – Demodulation reference signal (DMRS) for PSCCH (DMRS-PSCCH) Grid.payloadIndices: tuple – A tuple Containing locations in ResourceGrid where SCI payload are loaded
- Raises:
ValueError – [Error-PSCCH Lower Phy]: SymbNumber must be a numpy Array containing Integers
ValueError – [Error-PSCCH Lower Phy]: slotNumber must be an Integer between 0 and 65535
ValueError – [Error-PSCCH Lower Phy]: scramblingID must be an Integer between 0 and 65535
ValueError – [Error-PSCCH Upper Phy]: The number of Target Bits must be a +ve Integer
ValueError – [Error-PSCCH Upper Phy]: Number of RB allocated for Sidelink Control Channel transmission can take the values 10,12,15,20,25 only
PSCCH Receiver
The details about the Receiver side of the PDSCH are provided in [3GPPTS38211pscch], [3GPPTS38212pscch] and [COMST.2021.3057017]. The chain is bi-parted into upper physical layer and lower physical layer section to entertain both the link-level and system level simulations. The details of the APIs is provided in following sub-sections.
- class toolkit5G.PhysicalChannels.PSCCHUpperPhyDecoder[source]
Accepts log likelihood ratio of the decoded bits and returns the Estimated Bits @ receiver side (rate Dematched polar decoded and crc removed) and a CRC check array to compute block error rate
- Input:
descrLLRs (np.ndarray) – Defines the array containing Log likelihood ratio of each received Bits
K (int) – Defines the size of 1st stage Sidelink control information in terms of bits \(\in \{22,23, \dots ,43\}\).This variable is Defined in 3 GPP TS 138.211 section 8.3.1.1
N (int) – Defined the number of bits at the output of Polar Encoder
E (int) – Defines the number of target Bits expected after Rate matching
- Output:
rsciBits (np.ndarray) – An array of containing the estimated Bits at receiver side
check (np.ndarray) – An array containing Boolean value where each boolean indicates whether the corresponding block of bits are estimated Correctly
- Raises:
ValueError – [Error-PSCCH Upper Phy Decoder]: descrLLRs must be numpy array containing np.float64 values
ValueError – [Error-PSCCH Upper Phy Decoder]: number of target bits after rate maching in BitSelection must be +ve integer
ValueError – [Error-PSCCH Upper Phy Decoder]: number of bits at the output of Polar Encoder must be +ve integer
ValueError – [Error-PSCCH Upper Phy Decoder]: number of bits at the input of Polar Encoder must be less than or equal E and N!
- class toolkit5G.PhysicalChannels.PSCCHLowerPhyDecoder[source]
Accepts a PSCCH and PSCCH-DMRS loaded resource grid and its corresponding resource mapper object as a input and returns log likelihood ratio of the decoded bits
- Input:
resourceGrid (np.ndarray) – Defines the PSCCH and PSCCH-DMRS loaded resource grid. Array of shape numbatches x numSymbols x NumRB*12
payloadIndices (tuple) – Defines the Indices at which SCI payload is loaded
- Output:
pscchLLR (np.ndarray) – An array of shape `numBatches`x`numtargetBits`[from upper Phy] containing Log Likelihood ratio of each received Bit
- Raises:
ValueError – [Error-PSCCH Lower Phy Decoder]: resourceGrid must have 3 Dimensions:numbatches,numSymbols ,NumRB*12
ValueError – [Error-PSCCH Lower Phy Decoder]: payloadIndices must be a tuple of length 3
ValueError – [Error-PSCCH Lower Phy Decoder]: The number of Batches must be a +ve Integer