5G Toolkit Logo
R24a.0.3

Contents:

  • Release Notes
  • Install 5G Toolkit
    • System Requirements:
    • Dependent Libraries
    • Install Miniconda
    • Install Jupyter Notebook
    • Install 5G Toolkit
    • Final Confirmation
    • License 5G Toolkit
    • Activate the 5G Toolkit License
    • Installation Tutorial: Video
  • Getting Started
    • Understanding API Documentation
    • Hello World!
      • Import Python Libraries
        • How to import 5G Toolkit Libraries
        • Create Objects for all the Modules
        • Generate Payload bits and Encode them
        • Symbol Mapping the Encoded Bits
        • Pass through AWGN Channel
        • Demapping the Symbols
        • Detect Error in the Blocks
        • Compute Bit and Block Error Rate
        • Constellation Diagrams at the Tx and Rx
        • Link Level Simulation
        • Bit/Block Error Rate Performance
    • Resources and Scripts
  • API Documentation
    • Sequence Generation
      • Primary Synchronization Signal
        • PSS
      • Secondary Synchronization Signal
        • SSS
      • Demodulation Reference Sequence (DMRS)
        • DMRS
      • Positioning Reference Sequence (PRS)
        • PRS
      • Channel State Information Reference Sequence (CSI-RS)
        • CSIRS
      • Sounding Reference Sequence (SRS)
        • SRS
          • SRS.lengthOfSequence
          • SRS.nrOfCyclicShift
          • SRS.nrofSymbols
          • SRS.sequenceId
          • SRS.slotIndex
          • SRS.startPosition
          • SRS.symbolIndices
          • SRS.transmissionComb
      • Pseudo Random (PN) Sequence
        • PNSequence
      • PUCCH Format 0 Sequence
        • PUCCHFormat0Sequence
          • PUCCHFormat0Sequence.controlInfo
          • PUCCHFormat0Sequence.indexPUCCH
          • PUCCHFormat0Sequence.initial_CyclicShift
          • PUCCHFormat0Sequence.m_CS
          • PUCCHFormat0Sequence.nID
          • PUCCHFormat0Sequence.numBatches
          • PUCCHFormat0Sequence.numInterlacedRBs
          • PUCCHFormat0Sequence.numRBs
          • PUCCHFormat0Sequence.numberOfSymb
          • PUCCHFormat0Sequence.pucch_GroupHopping
          • PUCCHFormat0Sequence.seqNumber
          • PUCCHFormat0Sequence.slotNumber
          • PUCCHFormat0Sequence.start_SymbIndex
      • PUCCH Format 1 Sequence
        • PUCCHFormat1Sequence
          • PUCCHFormat1Sequence.indexPUCCH
          • PUCCHFormat1Sequence.initial_CyclicShift
          • PUCCHFormat1Sequence.m_CS
          • PUCCHFormat1Sequence.maxNumPRBs
          • PUCCHFormat1Sequence.nHop
          • PUCCHFormat1Sequence.nID
          • PUCCHFormat1Sequence.numInterlacedRBs
          • PUCCHFormat1Sequence.numRBs
          • PUCCHFormat1Sequence.numberOfSymb
          • PUCCHFormat1Sequence.pucch_GroupHopping
          • PUCCHFormat1Sequence.slotNumber
          • PUCCHFormat1Sequence.start_SymbIndex
      • Low PAPR Sequence Type 1
        • LowPAPRSequenceType1
          • LowPAPRSequenceType1.baseSequenceNumber
          • LowPAPRSequenceType1.cyclicShift
          • LowPAPRSequenceType1.delta
          • LowPAPRSequenceType1.groupNumber
          • LowPAPRSequenceType1.lengthOfSequence
          • LowPAPRSequenceType1.numRBs
      • Low PAPR Sequence Type 2
        • LowPAPRSequenceType2
          • LowPAPRSequenceType2.cinit
          • LowPAPRSequenceType2.delta
          • LowPAPRSequenceType2.groupNumber
          • LowPAPRSequenceType2.groupNumber_Or_cinit
          • LowPAPRSequenceType2.lengthOfSequence
          • LowPAPRSequenceType2.numRBs
      • Primary Synchronization Signal for Sidelink (S-PSS)
        • S_PSS
      • Secondary Synchronization Signal for Sidelink (S-SSS)
        • S_SSS
    • Resource Mapping
      • Synchronization Signal Block (SSB) Grid Generation
        • SSB_Grid
          • SSB_Grid.displayGrid()
          • SSB_Grid.dmrsIndices
          • SSB_Grid.pbchIndices
          • SSB_Grid.pssIndices
          • SSB_Grid.sssIndices
      • Synchronization Signal Block (SSB) Resource Mapping
        • ResourceMapperSSB
      • Physical Downlink Shared Channel-DMRS
        • ResourceMapperDMRSPDSCH
          • ResourceMapperDMRSPDSCH.displayCDMPattern()
          • ResourceMapperDMRSPDSCH.displayResourceGrid()
      • Physical Downlink Shared Channel-PTRS
        • ResourceMapperPTRSPDSCH
      • Physical Downlink Control Channel (PDCCH)
        • ResourceMappingPDCCH
      • Control Resource Set
        • CORESET
          • CORESET.displayCoresetREG_CCE_Mapping()
      • Search Space Set
        • SearchSpaceSet
      • Channel state Information reference signal (CSI-RS)
        • ResourceMapperCSIRS
          • ResourceMapperCSIRS.displayCDMPattern()
          • ResourceMapperCSIRS.displayResourceGrid()
      • Positioning Reference Signal (PRS)
        • ResourceMapperPRS
      • Physical Uplink Control Channel (PUCCH)
        • PUCCH Format-0
          • PUCCH Format 0 Resource Mapping
          • PUCCH Format 0 Resource De-Mapping
        • PUCCH Format-1
          • PUCCH Format-1 Resource Mapping
          • PUCCH Format-1 Resource De-Mapping
          • PUCCH Format-1 Spreading
          • PUCCH Format-1 De-Spreading
        • PUCCH Format-2
        • PUCCH Format-3
        • PUCCH Format-4
      • Sidelink Synchronization Signal Block (SSB) Grid Generation
        • SSSB_Grid
          • SSSB_Grid.displayGrid()
      • Physical Sidelink Control Channel (PSCCH)
        • ResourceMappingPSCCH
    • Physical Channels
      • Physical Downlink Shared Channel (PDSCH)
        • PDSCH Transmitter
          • PDSCH: Upper Physical layer Chain
          • PDSCH: Lower Physical layer Chain
        • PDSCH Receiver
          • PDSCH: Upper Physical layer Chain Decoder
          • PDSCH: Lower Physical layer Chain Decoder
        • PDSCH Components
          • Transport Block Size Computation
          • Transport Block Processing
          • Code Block Segmentation
          • Low Density Parity Check Codes
          • Rate Matching
          • Code Block Concatenation
          • Scrambling: PDSCH
          • Modulation
          • Layer Mapper
          • Physical Downlink Shared Channel-DMRS
      • Physical Downlink Control Channel (PDCCH)
        • PDCCH Transmitter
          • PDCCH
        • PDCCH Receiver
          • PDCCHDecoder
        • PDCCH Components
          • Cyclic Redundency Check
          • RNTI Masking
          • Input Bit Interleaver
          • Polar Coder
          • Rate Matching
          • Scrambling: PDCCH
          • Modulation
      • Physical Broadcast Channel (PBCH)
        • PBCH Transmitter
          • PBCH
        • PBCH Receiver
          • PBCHDecoder
        • PBCH Components
          • Cyclic Redundency Check
          • RNTI Masking
          • Input Bit Interleaver
          • Polar Coder
          • Rate Matching
          • Scrambling: PDCCH
          • Modulation
      • Physical Uplink Shared Channel (PUSCH)
      • Physical Uplink Control Channel (PUCCH)
        • PUCCH Format 0
        • PUCCH Format 1
        • PUCCH Format 2
        • PUCCH Format 3
        • PUCCH Format 4
      • Physical Random Access Channel (PRACH)
      • Physical Sidelink Broadcast Channel (PSBCH)
        • PSBCH Transmitter
          • PSBCH
        • PSBCH Receiver
          • PSBCHDecoder
        • PSBCH Components
          • Cyclic Redundency Check
          • RNTI Masking
          • Input Bit Interleaver
          • Polar Coder
          • Rate Matching
          • Scrambling: PDCCH
          • Modulation
      • Physical Sidelink Control Channel (PSCCH)
        • PSCCH Transmitter
          • PSCCHUpperPhy
          • PSCCHLowerPhy
        • PSCCH Receiver
          • PSCCHUpperPhyDecoder
          • PSCCHLowerPhyDecoder
        • PSCCH Components
          • Cyclic Redundency Check
          • Input Bit Interleaver
          • Polar Coder
          • Rate Matching
          • Scrambling: PDCCH
          • Modulation
    • Payload Generation
      • Master Information Block (MIB)
        • MIB Generation
          • MIBGeneration
        • MIB Extraction
          • MIBExtraction
      • Downlink Control Information (DCI)
        • DCIGeneration
        • DCIExtraction
    • Forward Error Correction
      • Hamming Coder
        • Hamming coder
          • HammingEncoder
        • Hamming Decoder
          • HammingDecoder
        • Hamming Decoder - Sphere Decoding
          • HammingSphereDecoder
        • Hamming Decoder - Syndrome Based Decoding
          • HammingSyndromeDecoder
      • Low Density Parity Check Codes
        • LDPC Encoder
          • LDPCEncoder5G
        • LDPC Decoder
          • LDPCDecoder5G
        • LDPC Codec Subcomponents
          • LDPC Parameters Computation
          • Codeblock Processing: Transmitter
          • Codeblock Processing: Receiver
      • Polar Codes
        • Polar Encoder
          • PolarEncoder5G
        • Polar Decoder
          • PolarDecoder5G
        • Polar Codec Components
          • Code-block Processing: Transmitter
          • Code-block Processing: Receiver
          • Input Bit Interleavers
      • Reed Muller Codes
        • Reed Muller Encoder 5G
          • ReedMullerEncoder5G
        • Reed Muller Decoder 5G
          • ReedMullerDecoder5G
    • Rate matching
      • Rate matching for LDPC
        • Bit Selection for LDPC
          • Bit Selection
          • Bit De-selection
        • Bit Interleaver for LDPC
          • Bit Interleaver
          • Bit De-interleaver
        • RatematchParameters
          • RatematchParameters.baseGraph
          • RatematchParameters.enableLBRM
          • RatematchParameters.k0
          • RatematchParameters.liftingFactor
          • RatematchParameters.modOrder
          • RatematchParameters.numCodeBlocks
          • RatematchParameters.numCodedBits
          • RatematchParameters.numLayers
          • RatematchParameters.rvID
          • RatematchParameters.tbSize
      • Rate matching for Polar coder
        • Sub Block Interleaver for Polar Coder
          • Sub-block Interleaver
          • Sub-block De-interleaver
        • Bit Selection for Polar Coder
          • Bit Selection
          • Bit De-selection
        • Channel Interleaver for Polar Coder
          • Channel Interleaver
          • Channel De-interleaver
    • Interleavers
      • PBCH Interleaver
        • PBCH Interleaver
          • PBCHInterleaver
        • PBCH DeInterleaver
          • PBCHDeInterleaver
      • Input Bit Interleaver
        • Input Bit Interleaver
          • InputBitInterleaver
        • Input Bit DeInterleaver
          • InputBitDeInterleaver
      • Sub Block Interleaver
        • Sub Block Interleaver
          • Subblock_Interleaver
        • Sub Block Interleaver
          • Subblock_DeInterleaver
      • Channel Interleaver
        • Channel Interleaver
          • ChannelInterleaver
        • Channel De-interleaver
          • ChannelDeInterleaver
      • Bit Interleavers
        • Bit Interleaver
          • BitInterleaver
        • Bit Deinterleaver
          • BitDeinterleaver
    • Orthogonal Frequency Division Multiplexing
      • OFDM: Demodulator
        • OFDMDemodulator
      • OFDM: Modulator
        • OFDMModulator
      • Transform Decoding
        • TransformPrecoding
      • Transform Decoding for 5G
        • TransformDecoding5G
      • Transform Precoding
        • TransformPrecoding
      • Transform Precoding for 5G
        • TransformPrecoding5G
    • Channel Processing and Hardware Impairment
      • Apply Channel to Transmitted Signal
        • ApplyChannel
          • ApplyChannel.enableInterTxInterference
          • ApplyChannel.isFrequencyDomain
          • ApplyChannel.memoryConsumptionLevel
      • Add Noise and CFO at Receiver
        • AddNoise
    • Symbol Mapping
      • Mapper
        • Mapper
      • Demapper
        • Demapper
    • Scrambling
      • Scrambler
        • Scrambler
          • Scrambler.Lmax
          • Scrambler.c_init
          • Scrambler.id
          • Scrambler.mu
          • Scrambler.nID
          • Scrambler.purpose
          • Scrambler.q
          • Scrambler.rnti
          • Scrambler.ssbIndex
      • Descrambler
        • DeScrambler
          • DeScrambler.Lmax
          • DeScrambler.c_init
          • DeScrambler.id
          • DeScrambler.mu
          • DeScrambler.nID
          • DeScrambler.purpose
          • DeScrambler.q
          • DeScrambler.rnti
          • DeScrambler.ssbIndex
      • RNTI Masking
        • RNTImasking
          • RNTImasking.rnti
    • Channel Models
      • Antenna Array
        • AntennaArrays
        • Antenna Elements
          • 3GPP_38_901 Antenna Element
          • Hertzian Dipole Antenna Element
          • Linear Dipole Antenna Element
      • Node Mobility
        • NodeMobility
          • NodeMobility.displayRoute()
        • Mobility Models
          • Random-Walk
          • Circular Route
          • Vehicle Drops on HighWays
      • Simulation Layout
        • SimulationLayout
          • SimulationLayout.BSLocations
          • SimulationLayout.ISD
          • SimulationLayout.UELocations
          • SimulationLayout.UEdistibution
          • SimulationLayout.UEheightDistribution
          • SimulationLayout.bsAntennaArray
          • SimulationLayout.bsRoute
          • SimulationLayout.carrierFrequency
          • SimulationLayout.clutterDensity
          • SimulationLayout.clutterHeight
          • SimulationLayout.clutterSize
          • SimulationLayout.correlationDistanceIndoor
          • SimulationLayout.correlationDistanceLoS
          • SimulationLayout.correlationTypeIndoor
          • SimulationLayout.correlationTypeLoS
          • SimulationLayout.enableSpatialConsistencyIndoor
          • SimulationLayout.enableSpatialConsistencyLoS
          • SimulationLayout.force3GPPSpatialConsistencyParameters
          • SimulationLayout.forceLOS
          • SimulationLayout.heightOfBS
          • SimulationLayout.heightOfRoom
          • SimulationLayout.heightOfUE
          • SimulationLayout.indoorUEfraction
          • SimulationLayout.layoutLength
          • SimulationLayout.layoutType
          • SimulationLayout.layoutWidth
          • SimulationLayout.lengthOfIndoorObject
          • SimulationLayout.maxNumberOfFloors
          • SimulationLayout.memoryEfficient
          • SimulationLayout.minNumberOfFloors
          • SimulationLayout.minUEBSDistance
          • SimulationLayout.numOfBS
          • SimulationLayout.numOfSectorsPerSite
          • SimulationLayout.numOfSnapShots
          • SimulationLayout.numOfUE
          • SimulationLayout.radiusForCircularUEDrop
          • SimulationLayout.routeType
          • SimulationLayout.terrain
          • SimulationLayout.ueAntennaArray
          • SimulationLayout.ueDropMethod
          • SimulationLayout.ueRoute
          • SimulationLayout.widthOfIndoorObject
        • BS Layouts
          • Hexagonal Layout
          • Rectangular Layout
        • UE Drops
          • Rectangular Drop
          • Circular Drop
          • Hexagonal Drop
      • Channel Parameter Generator
        • ParameterGenerator
      • Channel Generator
        • ChannelGenerator
    • MIMO Processing
      • Code-Books
        • Type-1 Code-Book
          • TypeICodeBook
          • SearchFree
    • Scheduler
      • PDCCH Scheduler
        • PDCCHScheduler
      • Link Adaptation
        • LinkAdaptation
          • LinkAdaptation.selectMCS()
      • Rank Adaptation
        • RankAdaptation
      • Round Robin Scheduler
        • RoundRobinScheduler
          • RoundRobinScheduler.firstAcrossTime
          • RoundRobinScheduler.numRB
          • RoundRobinScheduler.numSymbol
          • RoundRobinScheduler.numUEscheduledAcrossFreq
          • RoundRobinScheduler.numUEscheduledAcrossTime
    • Cyclic Redundancy Check
      • CRC Encoder
        • CRCEncoder
      • CRC Decoder
        • CRCDecoder
    • Receiver Algorithms
      • Carrier Frequency Offset (CFO) Estimation
        • CarrierFrequencyOffsetEstimation
      • Channel Estimation and Symbol Equalization for PBCH
        • ChannelEstimationAndEqualizationPBCH
      • Channel Estimation and Symbol Equalization for PDCCH
        • ChannelEstimationAndEqualizationPDCCH
      • Channel Estimation and Symbol Equalization for PDSCH
        • ChannelEstimationAndEqualizationPDSCH
      • SSB Parameters Estimation
        • DMRSParameterDetection
      • Time Synchronization and PSS/Cell ID-2 Detection
        • PSSDetection
      • SSS/Cell ID-1 Detection
        • SSSDetection
      • Downlink Channel Estimation using CSI-RS
        • ChannelEstimationCSIRS
      • Uplink Channel Estimation using SRS for Positioning
        • ChannelEstimationSRS
    • Position Estimation
      • Position Estimation
        • PositionEstimation
      • Submodules
        • Time of Arrival (ToA)/Delay Estimation
          • ToAEstimation
          • DFT based Method
          • ESPRIT based ToA Estimation
          • MUSIC based ToA Estimation
        • Direction of Arrival Estimation
          • DoAEstimation
          • DFT based AoA Method
          • ESPRIT based DoA Estimation
          • MUSIC based DoA Estimation
        • Optimization Algorithms
          • Least Squares based Position Estimator for TDoA
          • Gradient Descent based Position Estimator for TDoA
          • Newton Raphson based Position Estimator for TDoA
          • Least Squares based Position Estimator for ToA/mRTT
          • Least Squares based Position Estimator for DoA
          • Gradient Descent based Position Estimator for DoA
          • Least Square based Position Estimator for Hybrid ToA/mRTT and DoA
          • Least Square based Position Estimator for Hybrid TDoA and DoA
    • 5G Configurations
      • Channel state information reference signal (CSI-RS) Configurations
        • CSIConfiguration
      • SSB/PBCH Configurations
        • GenerateValidSSBParameters
      • PDSCH Lower Physical Layer Configurations
        • PDSCHLowerPhyConfiguration
      • PDSCH Upper Physical Layer Configurations
        • PDSCHUpperPhyConfiguration
      • Sounding Reference Signal (SRS) Configurations
        • SRSConfiguration
          • SRSConfiguration.bHop
          • SRSConfiguration.bSRS
          • SRSConfiguration.betaSRS
          • SRSConfiguration.cSRS
          • SRSConfiguration.combOffset
          • SRSConfiguration.enableStartRBHopping
          • SRSConfiguration.freqDomainPosition
          • SRSConfiguration.freqDomainShift
          • SRSConfiguration.freqScalingFactor
          • SRSConfiguration.groupOrSequenceHopping
          • SRSConfiguration.lengthOfSequence
          • SRSConfiguration.nrOfCyclicShift
          • SRSConfiguration.nrofSRS_Ports
          • SRSConfiguration.nrofSymbols
          • SRSConfiguration.offsetInSlots
          • SRSConfiguration.periodicityInSlots
          • SRSConfiguration.purpose
          • SRSConfiguration.repetitionFactor
          • SRSConfiguration.resourceGridSizeinRBs
          • SRSConfiguration.resourceType
          • SRSConfiguration.sequenceId
          • SRSConfiguration.slotIndex
          • SRSConfiguration.startPosition
          • SRSConfiguration.startRBIndex
          • SRSConfiguration.symbolIndices
          • SRSConfiguration.systemFrameNumber
          • SRSConfiguration.transmissionComb
      • SSB/PBCH Configurations
        • SSBConfiguration
      • Time-Frequency 5G-Configurations
        • TimeFrequency5GParameters
          • TimeFrequency5GParameters.getGaurdBand_FR1()
          • TimeFrequency5GParameters.getGaurdBand_FR2()
          • TimeFrequency5GParameters.getNumberRB_FR1()
          • TimeFrequency5GParameters.getNumberRB_FR2()
  • Tutorials
    • Hamming Codes
      • Import Libraries
        • Python Libraries
        • 5G Toolkit Libraries
      • Hamming Codes Parameters
      • Simulation Setup
      • Performance Evaluation: SNR vs BER
      • Performance Evaluation: SNR vs BLER
      • Conclusions
    • Reed Muller Codes in 5G
      • Table of content:
      • Import Libraries
        • Python Libraries
        • 5G Toolkit Libraries
      • Mapper and Demapper Parameters
      • Simulation Parameters
      • Simulation
      • Performance Evaluation
        • Performance Plot: Averaged over 65 datasets of 5000 points each.
    • Polar Codes in 5G
      • Table of content:
      • Import libraries
        • Python Libraries
        • 5G Toolkit libraries
      • Symbol Mapping Configurations
      • Polar Coder Configurations
      • Simulation: AWGN Channel
      • Performance Evaluations
      • Performance Evaluations: Averaging over a 100 dataset of 100 points each
    • Low Density Parity Check (LDPC) Codes in 5G
      • Import Libraries
        • Python LIbraries
        • 5G Toolkit Libraries
      • Symbol Mapping Configurations
      • Simulation: Variation in Reliability with code-rate for fixed block-length
        • LDPC Parameters
        • Simulation Procedure
      • Performance Evaluation: BER vs SNR for different code-rates
      • Simulation: Variation in Reliability with block-length for fixed coderate
      • Performance Evaluation: BER vs SNR for different block lengths
      • Following results are averaged over 100 results
        • BER vs SNR
      • BER vs TB-size
    • Performance comparison of OFDM and DFT-s-OFDM in 5G Networks
      • Import Libraries
        • Import Python Libraries
      • Import 5G-Toolkit Libraries
      • Simulation Parameters
      • Peak to Average Power Ratio (PAPR) Analysis
        • PAPR Analysis: CP-OFDM
        • PAPR Analysis: DFT-s-OFDM
      • PAPR Performance Comparison: CP-OFDM vs DFT-s-OFDM
      • ACLR Analysis: CP-OFDM vs DFT-s-OFDM
      • ACLR Comparison of OFDM and DFT-s-OFDM
      • References
    • Detailed Tutorials on 3GPP Channel Models
      • Wireless Channel Generation for Outdoor Terrains deployed in Hexagonal Geometry
        • Import Libraries
          • Import Python Libraries
          • Import 5G Toolkit Libraries
        • Simulation Parameters
        • Generate Antenna Arrays
        • Generate Simulation Layout
        • Generate Channel Parameters
        • Generate Channel Coefficients
        • Generate OFDM Channel
          • Frequency Domain : Magnitude Response Plot
          • Time Domain Channel response
      • Wireless Channel Generation for a Dense High Indoor Factory Terrain Deployed at millimeter band.
        • Import Libraries
          • Import Python Libraries
          • Import 5G Toolkit Libraries
        • Simulation Parameters
        • Generate Antenna Arrays
        • Generate Simulation Layout
        • Generate Channel Parameters
        • Generate Channel Coefficients
        • Generate OFDM Channel
          • Frequency Domain : Magnitude Response Plot
          • Time Domain Channel response
      • Genarating the Wireless Channel for Indoor Open Office Terrain
        • Import Libraries
          • Import Python Libraries
          • Import 5G Toolkit Libraries
        • Simulation Parameters
        • Generate Antenna Arrays
        • Generate Simulation Layout
        • Generate Channel Parameters
        • Generate Channel Coefficients
        • Generate OFDM Channel
          • Frequency Domain : Magnitude Response Plot
          • Time Domain Channel response
      • Wireless Channel Generation for Outdoor Mobile User Connected to Rural Macro Site
        • Import Libraries
          • Python Libraries
          • 5G Toolkit Libraries
        • Simulation Parameters
        • Antenna Arrays
        • Node Mobility
        • Simulation Layout
        • Channel Parameters, Channel Coefficients and OFDM Channel
        • Variation in Channel Power across Time
        • Animation: Displaying the variation in receiver power of a UE time snapshots
          • Functions to Animate the Plot
          • Simulation Animation
          • Further Study
      • Channel Generation for Dual Mobility Scenarios in 5G and Beyond
        • Import Libraries
          • Import Python Libraries
          • Import 5G Libraries
        • Simulation Parameters
        • Generate Antenna Array
          • Generate Transmit Arrays
          • Generate Receiver Arrays
        • Generate the Routes
          • Generate the BS Routes
          • Generate the UE Routes
        • Simulation Layout
        • Channel Parameters, Channel Coefficients and OFDM Channel
        • Variation in Channel Power across Time
      • Wireless Channel Generation for Multiple Carrier Frequencies
        • Import Libraries
          • Python Libraries
          • 5G Toolkit Libraries
        • Simulation Parameters
        • Generate Antenna Array
        • Node Mobility
        • Generate Simulation Layout
        • Generate Channel Parameters
        • Generate Channel Coefficients
        • Generate OFDM Channel
          • Frequency Domain : Magnitude Response Plot
          • Time Domain Channel response
      • Propagation Characteristics of Outdoor Terrains
        • Simulation Parameters
        • Antenna Arrays
        • Simulation Layout
        • Compute the Rough estimate of the Probability of line of sight
        • Parameter Generator
        • Path-loss Characteristics
          • Distribution of Shadow fading
          • Probability Distribution of Rician K factor
        • Delay Spread Charateristics
        • Angular Spread Characteristics
          • Probability distribution of Azimuth-AoA
          • Probability distribution of Azimuth-AoD
          • Probability distribution of Elevation-AoA
          • Probability distribution of Elevation-AoD
      • Beam Domain and Delay Domain Sparsity in Wireless Channel Models
        • Import Libraries
          • Import Python Libraries
        • Import 5G Toolkit
        • Simulation Parameters
        • Antenna Arrays
          • Antenna Array at Rx
          • Antenna Array at Tx
        • Simulation Layout
        • Channel Parameters, Channel Coefficients and OFDM Channel
        • Demonstrating the Beam Domain Sparsity
        • Demonstrating the Delay Domain Sparsity
      • Generate Spatially Consistent Statistical Channels for Realistic Simulations
        • Import Libraries
          • Import Python Libraries
        • Import 5G Toolkit
        • Simulation Parameters
        • Antenna Arrays
          • Antenna Array at Rx
          • Antenna Array at Tx
        • Node Mobility
        • Simulation Layout
        • Channel Parameters, Channel Coefficients and OFDM Channel
        • Frequency Domain Consistency
          • Amplitude Spectrum: Each subcarrier accross time
          • Amplitude Spectrum: One subcarrier accross time
          • Amplitude Heatmap
          • Phase Spectrum
        • Doppler Domain Sparsity
        • Delay/Time Domain: Sparsity
    • Initial Access in 5G
      • Import Libraries
        • External Libaries
        • 5G Toolkit Modules
      • System Parameters
      • PBCH Information
      • Transmission-side Processing
        • Generate Primary Synchronization Sequence (PSS)
        • Generate Secondary Synchronization Sequence (SSS)
        • Generate Demodulation Reference Sequence (DMRS)
        • Generate the PBCH Payload
      • Constellation Diagram: Tx
        • Construct SSB Grid
        • Mapping SSB to Transmission Grid for ODFM
        • OFDM-Modulator
        • Analog Beamforming
      • Channel Generation
      • Pass Tx signal through Wireless Channel
      • Noise addition at receiver
      • SSB Receiver Side
        • Receiver combining
        • PSS Detection: largest peak
        • Largest peak
        • OFDM Demodulation: Resource Grid reconstruction
        • SSB Extaction from Resource Grid
        • Comparing Transmitted and Received SSB Grid
        • Spectrum Analysis
        • (SSS Detection: PSS channel assisted) + Cell-ID estimation
        • DMRS Parameters Detection + DMRS Sequence Generation
        • Channel Estimation and PBCH Symbol Equalization
      • Constellation Diagram: Rx
        • PBCH Decoding
        • Information Aggregation
      • Performance Evaluations: BER + Cell-IDs + DMRS Parameter Detection
        • Cell-IDs Detection
        • DMRS Parameter Detection
        • BER computation
    • Coverage Evaluation of Physical Broadcast Channels (PBCH) in 5G Networks
      • Import Libraries
        • Import Python Libraries
        • Import 5G Toolkit Libraiers
      • Simulation Parameters
      • Generate the Wireless Channel : CDL-A
      • Set SSB and Time-Frequency OFDM Configurations/Parameters
      • Generate the Synchronization Signal Block (SSB) Grid
      • Generate the Transmission Grid
      • Pass through the Wireless Channel
      • Display the Heatmap for the Received Grid
      • Link level Simulation: BLER for each SNR value
      • Block Error Rate Performance
      • Block Error Rate: Averaged over a 10000 batches
    • Link Level Simulation for Physical Downlink Control Channels
      • Import Libraries
        • Import Basic Python Libraries
      • Import 5G-Toolkit Libraries
      • Simulation Parameters
      • CORESET Parameters
      • Generate Wireless Channel: CDL-A
      • Link level Simulation: For each Aggregation level and Each SNR value
      • Reliability Performance: BER/BLER vs SNR
      • Reliability Performance: BER/BLER vs SNR for 20000 Batches
    • Link Level Simulation for Physical Downlink Shared Channel in 5G
      • Import Python Libraries
      • Import 5G-Toolkit Libraries
      • Simulation Parameters
      • Generate Channel
      • PDSCH Configurations
      • PDSCH Implementation
      • SVD based Precoding and Beamforming
      • Pass through the Wireless Channel
      • Recevier Side Processing
      • Simulation Results
      • Simulation Results: Averaged over 10000 batches
      • Save Results
    • BER Performance of PUCCH Format 0
      • Table of Contents
      • Import Libraries
        • Python Libraries
        • 5G ToolKit Libraries
      • Simulation Parameters
      • Format 0
      • Format 0 Decoder
      • M_CS Estimation
      • Information content based on MCS value
      • Simulation
      • Performance Evaluation
        • Performance Plot
    • SVD based Downlink Precoding and Combining for Massive MIMO 5G Networks
      • Import Python Libraries
        • Import Python Libraries
        • Import 5G-Toolkit Libraries
      • Simulation Parameters
      • Generate Wireless Channel: CDL-A
      • Link level simulation: BLER/BER/Throughput/SE vs SNR for different ranks
      • Simulation Results
      • Simulation Results: Averaged over 10000 batches
    • Type-1 codebook based Downlink Precoding and Combining for Massive MIMO 5G Networks
      • Import Python Libraries
        • Import Python Libraries
        • Import 5G-Toolkit Libraries
      • Simulation Parameters
      • Generate Wireless Channel: CDL-A
      • Link level simulation: BLER/BER/Throughput/SE vs SNR for different ranks
      • Simulation Results
      • Simulation Results: Averaged over 10000 batches
    • P1 Procedure: Beam management in 5G networks using SSB
      • Import librariers
        • Import Python libraries
        • Import 5G Toolkit libraries
      • Simulation Parameters
      • Generate Wireless Channel
      • Generate Time Frequency Parameters and MIB+ATI Parameters
      • Generate OFDM Resource/Transmission Grid
      • Pass through the Wireless Channel
      • Power Heatmap of Received Grid
      • Add Noise
      • RSRP Computation
      • Visualization of All Beam RSRP
      • Selected Base-station and Beam
      • Simulation Topology
    • Downlink Channel Estimation using CSI-RS
      • Import Python Libraries
        • Import Python Libraries
        • Import 5G-Toolkit Libraries
      • Simulation Parameters
      • Generate Channel
      • CSI Configurations
      • Generate CSI-RS Resource Grid
      • Generate the Transmit Grid
      • Transmit Beamforming
      • Pass through the Channel
      • Add noise at Receiver
      • Extract the Resource Grid
      • Estimate the Channel using CSI-RS
        • Display the Estimated channel
      • Estimate the Rank and Condition number
      • SVD of Channel and Condition number
      • Estimate the Precoder: Type-I
    • Search space, CORESET and blind decoding of PDCCH channels in 5G Networks
      • Import Libraries
        • Python Libraries
        • 5G Toolkit Libraries
      • Simulation Parameters
      • CORESET and Search Space Set Parameters
      • Transmitter Side Processing
      • Displaying Resource Grid
      • Wireless Channel : CDL-A
      • Receiver Side Processing and Blind Decoding of UE
    • Downlink Time of Arrival based Positioning in 5G and Beyond Networks
      • Positioning Procedure
      • Table of Content:
        • Import Libraries
      • Python Libraries
      • 5G Toolkit Libraries
        • Simulation Parameters
        • Channel Generation
      • Channel Parameters:
        • Position Reference Signal
        • OFDM Transmitter: Create Transmission Grid
      • Display Transmission Grid
        • Transmit Beamforming
        • Pass the Beamformed Grid Through Wireless Channel
        • Add Noise
        • Extracting the Resource Grid
        • Channel Estimation + Interpolation
      • Display the quality of Channel Estimates
        • ToA Estimation
      • Visualization: Time of Arrival locus Circles
        • Position Estimation + K-Best Measurement Selection (Genie Aided)
          • Measurement Selection:
      • Visualization of Positioning
        • Performance Analysis of Positioning Error for ToA based method
        • Performance Analysis: For 2000 UEs
        • Further Study
    • Downlink TDoA Based Positioning for Industrial IoT Devices in Millimeter Wave 5G Networks
      • Import Libraries
        • Python Libraries
        • 5G Toolkit Libraries
      • Simulation Parameters
      • Channel Generation
        • Channel Parameters:
      • Position Reference Signal
      • OFDM Transmitter: Create Transmission Grid
        • Display Transmission Grid
      • Transmit Beamforming
      • Pass the Beamformed Grid Through Wireless Channel
      • Add Noise
      • Extracting the Resource Grid
      • Channel Estimation + Interpolation
        • Display the quality of Channel Estimates
      • ToA Estimation
        • Visualization: Time of Arrival locus Circles
      • Position Estimation + K-Best Measurement Selection (Genie Aided)
        • Measurement Selection:
        • Visualization of Positioning
      • Performance Analysis of Positioning Error for ToA based method
      • Performance Analysis: For 2000 UEs
      • Further Study
    • Positioning the Outdoor UEs using 5G Urban Micro cell sites based Uplink Time Difference of Arrival (UL-TDoA) method
      • Import Libraries
        • Import Basic Python Libraries
        • Import 5G Toolkit Libraries
      • Simulation Parameters
      • Generate Wireless Channels
      • SRS Configurations
      • Slot by Slot Simulation
      • Position Estimation: Based on UL-ToA
      • Visualization of Estimated Position
      • Performance Analysis of Positioning Error for ToA based method
      • Performance Analysis: For 2000 UEs
    • Positioning the Indoor Open Office UEs using Uplink ToA method
      • Python Libraries
      • 5G Toolkit Libraries
      • Simulation Parameters
      • Generate Wireless Channels
      • SRS Configurations
      • Slot by Slot Simulation
      • Position Estimation: Based on UL-ToA
      • Visualization of Estimated Position
      • Performance Analysis of Positioning Error for Uplink-ToA based method
      • Performance Analysis: For 2000 UEs
    • Uplink AoA (UL-AoA) based Localization of the Indoor Factory UEs using millimeter 5G Networks
      • Python Libraries
      • 5G Toolkit Libraries
      • Simulation Parameters
      • Generate Wireless Channels
      • SRS Configurations
      • Slot by Slot Simulation
      • Position Estimation: Based on UL-ToA
      • Visualization: Direction of Arrival Locus Lines
      • Visualization of Estimated Position and its accuracy
      • Performance Analysis of Positioning Error for UL-AoA method
      • Performance Analysis for UL-AoA method: 1300 UEs
    • Downlink Angle of Departure based Positioning for Rural Macro Terrain in 5G and Beyond Network
      • Positioning Procedure
      • Table of Content:
        • Import Libraries
      • Python Libraries
      • 5G Toolkit Libraries
        • Simulation Parameters
        • Channel Generation
      • Channel Parameters:
        • Position Reference Signal
        • OFDM Transmitter: Create Transmission Grid
        • Compute the Measurement Windows
      • Transmit Beamforming
      • Add Noise
      • Pass the Beamformed Grid Through Wireless Channel
        • RSRP vs beam Index
      • AoD Estimation
        • Position Estimation + K-Best Measurement Selection (Genie Aided)
          • Measurement Selection:
      • Visualization of Positioning
        • Performance Analysis of Positioning Error for ToA based method
        • Performance Analysis for DL-AoD method: 2000 UEs
        • Further Study
  • Projects
    • Learning to Demap: Database Generation, Preprocessing, Postprocessing, Training, Validation and Inferences from the LLRNet
      • Table of Contents
      • Import Libraries
        • Import Python Libraries
        • Import 5G Toolkit Modules
      • Learning to Demap the Symbols
        • Input Output Mapping for M = 4
        • Input Output Mapping for M = 6
        • Input Output Mapping for M = 8
      • Throughput and BER Performance of LLRnet
        • Import Libraries
        • Simulation Parameters
        • PDSCH Parameters
        • LLRnet Parameters
          • Training Framework
          • Deployment Framework
      • Simulation Section
      • Performance Evaluation
        • Throughput vs SNR (dB) for 16-QAM, 64-QAM and, 256-QAM
        • Bit Error rate (BER) vs SNR (dB) for 16-QAM, 64-QAM and, 256-QAM
        • Block Error Rate (BLER) vs SNR (dB) for 16-QAM, 64-QAM and, 256-QAM
      • Performance Evaluation: 10000 batches and 64000 training samples for LLRNet
        • Throughput vs SNR (dB) for 16-QAM, 64-QAM and, 256-QAM.
        • Bit Error rate (BER) vs SNR (dB) for 16-QAM, 64-QAM and, 256-QAM.
        • Block Error rate (BER) vs SNR (dB) for 16-QAM, 64-QAM and, 256-QAM.
        • Complexity Analysis
      • Conclusion
        • Positives of the LLRnet:
        • Limitations of the LLRnet:
      • References:
    • Blockage Probability Analysis for RedCap Devices in 5G Networks
      • Analysis of Blocking Probability for different Coverage Conditions
        • Import Python Libraries
        • Import 5G Toolkit Libraries
        • Simulation Parameters
        • PDCCH Scheduling Parameters
        • PDCCH Scheduling for Good Coverage Scenarios
        • PDCCH Scheduling for Medium Coverage Scenarios
        • PDCCH Scheduling for Extreme Coverage Scenarios
        • Plotting the results
          • References
      • Variation in Blocking Probability with Different Aggregation Levels (ALs)
        • Python Libraries
        • 5G-Toolkit Libraries
        • Simulation Parameters
        • PDCCH Scheduling Parameters
          • Impact of AL 1
          • Impact of AL 2
          • Impact of AL 4
          • Impact of AL 8
          • Impact of AL 16
        • Plot the Variation in Blocking Probability with number of UEs for different Aggregation levels.
        • References
      • Analyzing the effect of Number of Candidates on Blocking Probability
        • Simulation Parameters
        • PDCCH Scheduling Parameters
        • Plot the Variation in Blocking Probability with number of PDCCH candidates
        • References
      • Analyzing the Impact of Scheduling Strategy on Blocking Probability
        • Python Libraries
        • 5G-Toolkit Libraries
        • Simulation Parameters
        • PDCCH Scheduling Parameters
        • Simulation for Scheduling Strategy-I
          • Blocking probability vs number of UEs to be scheduled.
        • Simulation for Scheduling Strategy-II
        • Plotting Blocking Probability vs Number of UEs for Scheduling Strategy
          • References
      • Analyze the Impact of UE Capability on Blocking Probability
        • Python Libraries
        • 5G-Toolkit Libraries
        • Simulation Parameters
        • PDCCH Scheduling Parameters
        • Simulating the Reference Case
          • Plot Blocking Probability for Different CORESET Sizes for Different UEs
        • Simulating Reduced Blind Decoding Case-A
        • Simulating Reduced Blind Decoding Case-B
        • Plot Blocking Probability for Different CORESET Sizes for Different UEs
          • References
      • Selection of minimum CORESET Size for a Given Target Block Probability
        • Python Libraries
        • 5G-Toolkit Libraries
        • Simulation Parameters
        • PDCCH Scheduling Parameters
        • Compute minimum coreset size for numUEs = 5.
        • Compute minimum coreset size for numUEs = 10.
        • Compute minimum coreset size for numUEs = 15.
        • Display Minimum CORESET size required to meet the Target Blocking Probability for different number of UEs.
          • References
    • Artificial Intelligence and Machine Learning (AI-ML) for CSI Compression and Reconstruction in 5G Networks
      • CSI Compression and Reconstruction using CSINet for TDD Massive MIMO 5G Networks
        • Import Libraries
          • Import Python Libraries
          • Import 5G Toolkit Libraries
        • Simulation Parameters
        • Wireless Channel Generation: CDL-A
        • Reconstrunction Performance of CSI-Net
        • PDSCH Parameters
        • PDSCH: Transmitter
        • SVD Based Beamforming: Perfect CSI
        • Pass through Channel
        • Link Level Simulation: SVD based Beamforming using Perfect CSI
        • SVD Based Beamforming: CSI Reconstructed using CSINet
        • Pass through Wireless Channel
        • Link Level Simulation: SVD based Beamforming using Imperfect CSI
      • Performance Evaluations
        • Throughput Evaluations
        • BLER Evaluations
        • References
      • Wireless Channel Dataset Generation for Training the AI based Models
        • Import Python Libraries
          • Import Basic Python LIbraries
          • Import 5G Toolkit Libraries
        • Simulation Parameters
        • Set Channel Parameters and Generate Common Parameters
        • Generate the Wireless Channels Databases and Preprocess it before storage.
        • Aggregate all the Datasets into a single Dataset
        • Display Sparsity of Wireless Channels
      • Training the CSINet
        • Import Libraries
          • Import Python Libraries
        • Important AI-ML Libraries
        • Load Datasets
        • Set Training Parameters
    • Comparative Study of Reed Muller codes, Polar Codes and LDPC codes
    • Link Level Simulations and Lnk budget Analysis for 5G Non Terrestrial Networks
      • Coverage Evaluation of Physical Broadcast Channels (PBCH) in 5G Non-Terrestrial Networks
        • Evaluation Methodology
          • Import Libraries
        • Import Python Libraries
        • Import 5G Libraries
          • Simulation Parameters
          • Generate NTN Channel
          • Generate MIB and PBCH Configurations for NTN
          • PSS, SSS, PBCH, PBCH-DMRS and SSB Generation
          • Transmission OFDM Resource Grid
          • Pass through the Wireless Channel
          • Heatmap of Received Grid
          • Link Level Simulation: PBCH
          • Displaying the Received Noisy Resource Grid
          • Displaying Noisy SSB Grid
          • Performance Evaluations: SNR vs BLER
      • Link Level Simulation for Physical Downlink Control Channels in 5G Non-Terrestrial Networks (NTN)
        • Import Libraries
          • Import Basic Python Libraries
        • Import 5G-Toolkit Libraries
        • Simulation Parameters
        • CORESET Parameters
        • Generate Wireless Channel: NTN-TDL-C
        • Link level Simulation: For each Aggregation level and Each SNR value
        • Reliability Performance: BER/BLER vs SNR
      • Link Level Simulation for Physical Downlink Shared Channel (PDSCH) in 5G Non Terrestrial Networks (NTN)
        • Import Python Libraries
        • Import 5G-Toolkit Libraries
        • Simulation Parameters
        • Generate Channel
        • PDSCH Configurations
        • PDSCH Implementation
        • Pass through the Wireless Channel
        • Recevier Side Processing
        • Simulation Results: Reliability
        • Simulation Results: Throughput
        • Simulation Results: Reliability (Averaged over 32000 batches)
        • Simulation Results: Throughput (Averaged over 32000 batches)
    • Hybrid Automatic repeat Request in 5G and Beyond
    • Constellation Learning in an AWGN Channel
      • PHY layer as AutoEncoder
      • Steps
        • Importing Libraries
        • Parameters of AutoEncoder
        • Training Data
        • Testing Data
        • Normalization Functions
        • Defining AutoEncoder Model
        • Training AutoEncoder
        • Defining Tx, Channel and Rx from Trained AutoEncoder
        • Block Error Rate (BLER) performance
        • Hamming Codes
      • Transmitter
      • BLER plot : comparison of AutoEncoder BLER with base line (n,k) Hamming Code BLER
        • Constellation Learning
      • learned constellation plot
        • References
    • Downlink Synchronization using SSB in 5G systems
    • Uplink Synchronization using PRACH in 5G systems
    • Performance comparison between different Positioning Methods for millimeter wave 5G Networks
      • Import Libraries
        • Import Python Libraries
        • Import 5G Toolkit Libraries
      • Simulation Parameters
      • Generate Wireless Channels
      • SRS Configurations
      • Slot by Slot Simulation
      • Position Estimation: Based on UL-ToA
      • Visualization of Estimated Position
      • Performance Analysis of Positioning Error for ToA based method
      • Positioning Results Averaged over 2000 UEs
  • Integration with Other Tools
    • Integration with SDRs
      • Time/OFDM Symbol Synchronization using PSS in 5G
        • Downlink Time/Frame Synchronization using PSS in 5G Networks
          • Import Libraries
          • Emulation Parameters
          • Generate SSB Parameters
          • Construct Transmission Grid and Generate Time Domain Samples
          • SDR-Setup Configurations
          • Transmission: SDR RF Transmitter
          • Reception: SDR RF Receiver
          • Time Synchronization: Based on PSS Correlation
          • Frame Synchronization: Visualization
          • Saving Running frames
        • [BS Side Implementation]-Downlink Time/Frame Synchronization using PSS in 5G Networks
          • Import Libraries
          • Emulation Parameters
          • Generate SSB Parameters
          • Construct Transmission Grid and Generate Time Domain Samples
          • SDR-Setup Configurations
          • Transmission: SDR RF Transmitter
        • [UE Side Implementation]-Downlink Time/Frame Synchronization using PSS in 5G Networks
          • Import Libraries
          • Emulation Parameters
          • SDR-Setup Configurations
          • Reception: SDR RF Receiver
          • Time Frequency Configurations
          • Time Synchronization: Based on PSS Correlation
      • Downlink Synchronization using SSB in 5G Networks
        • Downlink Synchronization in 5G Networks: SSB
          • Import Libraries
          • Emulation Configurations
          • Transmitter Implementation
          • Generate the SSB Grid for synchronization
          • Constellation Diagram
          • OFDM Modulation: Tx
          • SDR-Setup Configurations
          • Transmission: SDR RF Transmitter
          • Receiver Implementation
          • Reception: SDR RF Receiver
          • Time Synchronization: Based on PSS Correlation
          • OFDM Demodulation and SSB Extraction
          • SSB Grid: Transmitter and Receiver
          • Spectrum: Transmitted Grid and Received Grid
          • Parameter Estimation for SSB and PBCH
          • Channel Estimation and PBCH Symbol Equalization
          • PBCH Decoding and Constellation
          • Performance Verification
      • Downlink Data Communication using PDSCH in 5G Networks
        • Downlink Data Communication in 5G Networks
          • Import Python Libraries
          • 5G Toolkit Libraries
          • Simulation Parameters
          • PDSCH Transmitter Implementation
          • Generate the PDSCH related parameters: Use PDSCH Configurations
          • Generate the PDSCH Resource Grid
          • SSB Transmitter Implementation
          • Generate the SSB Resource Grid
          • SDR-Setup Configurations
          • Transmission: SDR RF Transmitter
          • Receiver Implementation: SSB
          • Reception: SDR RF Receiver
          • Time Synchronization: Based on PSS Correlation
          • PBCH Receiver
          • SSB Grid: Transmitter and Receiver
          • Spectrum: Transmitted Grid and Received Grid
          • PBCH Decoding and Constellation
          • Performance Verification
          • PDSCH Recourse Implementation
          • Extract PDSCH Resource Grid
          • PDSCH Receiver
          • Key Performance Indicators
    • Integration with MATLAB
      • Hamming Codes
        • Import Python Libraries: 5G-Toolkit and NumPy
        • Import Modules for Simulations: Demapper | Mapper | HammingEncoder | HammingDecoder
        • Hamming Code Configurations
        • Payload Generation
        • Hamming Encoder
        • Symbol Mapping
        • Link Level Simulation: SNR vs BLER
        • Performance Evaluation: SNR vs BLER
      • Downlink TDoA Based Positioning in 5G Networks
        • Import Python Libraries
        • Import 5G Toolkit Libraries
        • Simulation Parameters
        • Generate Wireless Channel
          • Generate Antenna Arrays
          • Generate Simulation Layout
          • Generate Channel Parameters | Generate Channels | OFDM Channel
        • Generate Positioning Reference Signal (PRS) and PRS Resource Grid
        • Generate OFDM Grid for Every BS
        • Beamform and Power Allocation
        • Pass through Channel
        • Add Noise
        • Extract Resource Grid
        • Channel Estimation using PRS
        • ToA Estimation
        • Position Estimation
        • Performance Evaluation
  • Learning Resources
    • Introductory Course on 5G Standards
    • Hardware Emulations using 5G Toolkit and SDRs
  • Tentetive list of Feature
    • In Progress (To be Released soon):
    • Next Quarter
    • Before September 2023
    • Before March 2024
  • Research work carried out using 5G Toolkit
  • Challenge Of this Week
    • Solution of this Months Problems
    • Arxiv-ed Challenges
  • License
    • Trademarks
    • Source Code
    • Content
  • Previous Versions
    • R23a
  • Discussion Forum
5G Toolkit
  • Tutorials
  • Downlink Channel Estimation using CSI-RS

YouTube logo Watch on YouTube View on GitHub Download notebook

Downlink Channel Estimation using CSI-RS

Type-1 codebook-based downlink precoding and combining for massive MIMO (Multiple Input Multiple Output) in 5G networks refers to a technique used to enhance the efficiency and performance of wireless communication systems, particularly in scenarios with a large number of antennas at the base station. SVD stands for Singular Value Decomposition, a mathematical technique used to decompose a matrix into three other matrices, which helps in analyzing and manipulating the properties of the original matrix.

  • The first part of the SVD, known as left signular matrix, is used for signal Combining at the receiver,

  • The third part of the SVD, known as left signular matrix, is used for signal Precoding at the transmitter,

  • The middle part of the SVD, contains the eigen values which, is used for selection of rank.

In the context of downlink precoding and combining in massive MIMO systems, SVD is applied to the channel matrix to extract the spatial characteristics of the communication channels.

Type-1 codebook based precoding is applied to PDSCH data and at the Rx the combiner from SVD has been used

The tutorial is organized as following

  • Import Libraries

    • Import Python Libraries

    • Import 5G-Toolkit Libraries

  • Simulation Parameters

  • Generate Wireless Channel

  • CSI Configurations

Key Performance Parameters - Throughput vs SNR - BLER vs SNR - BER vs SNR

Import Python Libraries

Import Python Libraries

[1]:
# from IPython.display import display, HTML
# display(HTML("<style>.container { width:95% !important; }</style>"))

import os
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'

# %matplotlib widget
import matplotlib.pyplot  as plt
import matplotlib.patches as mpatches
import matplotlib as mpl

import numpy      as np
import numpy.matlib
import scipy      as sp
import scipy.io   as spio
import scipy.constants
from   scipy import interpolate

Import 5G-Toolkit Libraries

[2]:
import sys
sys.path.append("../../../")


from toolkit5G.ChannelModels      import AntennaArrays, SimulationLayout, ParameterGenerator, ChannelGenerator
from toolkit5G.ResourceMapping    import ResourceMapperCSIRS
from toolkit5G.Configurations     import CSIConfiguration
from toolkit5G.ChannelProcessing  import AddNoise
from toolkit5G.ReceiverAlgorithms import ChannelEstimationCSIRS
from toolkit5G.MIMOProcessing     import TypeICodeBook

Simulation Parameters

[3]:
propTerrain      = "UMa"         # Propagation Scenario or Terrain for BS-UE links
carrierFrequency = 3.6*10**9         # Array of two carrier frequencies in GHz
scs              = 30*10**3
Nfft             = 1024
numOfBSs         = 6 # number of BSs
nBSs             = np.prod(numOfBSs)
nUEs             = 11              # number of UEs
numRBs           = 84
numSlots         = 1
bandwidth        = 30*10**6
print()
print("*****************************************************")
print("                   Terrain: "+str(propTerrain))
print("             Number of UEs: "+str(nUEs))
print("             Number of BSs: "+str(numOfBSs))
print("         carrier Frequency: "+str(carrierFrequency/10**9)+" GHz")
print(" Number of Resource Blocks: "+str(numRBs))
print("        Subcarrier Spacing: "+str(scs))
print("                  FFT Size: "+str(Nfft))
print("*****************************************************")
print()

*****************************************************
                   Terrain: UMa
             Number of UEs: 11
             Number of BSs: 6
         carrier Frequency: 3.6 GHz
 Number of Resource Blocks: 84
        Subcarrier Spacing: 30000
                  FFT Size: 1024
*****************************************************

Generate Channel

The process of channel generation is as follows:

  • Generate Antenna Arrays

    • Generate Antenna Arrays for BSs

    • Generate Antenna Arrays for UEs

  • Generate Simulation Topology

  • Generate Propagation parameters (LSPs | SSPs | Intial random phases)

  • Generate Wireless Channel ==> Get OFDM Channel

[4]:
# Antenna Array at UE side
# assuming antenna element type to be "OMNI"
# with 2 panel and 2 single polarized antenna element per panel.
ueAntArray = AntennaArrays(antennaType = "OMNI",  centerFrequency = carrierFrequency, arrayStructure  = np.array([1,1,2,2,2]))
ueAntArray()

# # Radiation Pattern of Rx antenna element
# ueAntArray.displayAntennaRadiationPattern()


# Antenna Array at BS side
# assuming antenna element type to be "3GPP_38.901", a parabolic antenna
# with 4 panel and 4 single polarized antenna element per panel.
bsAntArray = AntennaArrays(antennaType = "3GPP_38.901", centerFrequency = carrierFrequency, arrayStructure  = np.array([1,1,4,4,2]))
bsAntArray()

# # Radiation Pattern of Tx antenna element
# bsAntArray[0].displayAntennaRadiationPattern()

# Layout Parameters
isd                  = 200          # inter site distance
minDist              = 10          # min distance between each UE and BS
ueHt                 = 1.5         # UE height
bsHt                 = 25          # BS height
bslayoutType         = "Hexagonal" # BS layout type
ueDropType           = "Hexagonal" # UE drop type
htDist               = "equal"       # UE height distribution
ueDist               = "random"       # UE Distribution per site
nSectorsPerSite      = 3             # number of sectors per site
maxNumFloors         = 1             # Max number of floors in an indoor object
minNumFloors         = 1             # Min number of floors in an indoor object
heightOfRoom         = 5.1             # height of room or ceiling in meters
indoorUEfract        = 0.5           # Fraction of UEs located indoor
lengthOfIndoorObject = 3             # length of indoor object typically having rectangular geometry
widthOfIndoorObject  = 3             # width of indoor object
forceLOS             = True          # boolen flag if true forces every link to be in LOS state
# forceLOS             = False       # boolen flag if true forces every link to be in LOS state

# simulation layout object
simLayoutObj = SimulationLayout(numOfBS = numOfBSs,
                                numOfUE = nUEs,
                                heightOfBS = bsHt,
                                heightOfUE = ueHt,
                                ISD = isd,
                                layoutType = bslayoutType,
                                layoutWidth = 50,
                                layoutLength = 120,
                                ueDropMethod = ueDropType,
                                UEdistibution = ueDist,
                                UEheightDistribution = htDist,
                                numOfSectorsPerSite = nSectorsPerSite,
                                ueRoute = None)

simLayoutObj(terrain = propTerrain,
             carrierFreq = carrierFrequency,
             ueAntennaArray = ueAntArray,
             bsAntennaArray = bsAntArray,
             indoorUEfraction = indoorUEfract,
             heightOfRoom = heightOfRoom,
             lengthOfIndoorObject = lengthOfIndoorObject,
             widthOfIndoorObject = widthOfIndoorObject,
             forceLOS = forceLOS)

# displaying the topology of simulation layout
fig, ax = simLayoutObj.display2DTopology()


paramGen = simLayoutObj.getParameterGenerator()

# paramGen.displayClusters((0,0,0), rayIndex = 0)
channel = paramGen.getChannel()
Hf      = channel.ofdm(scs, Nfft)[0]

Nt        = bsAntArray.numAntennas # Number of BS Antennas
Nr        = ueAntArray.numAntennas
../../../_images/api_Tutorials_Tutorial28_Downliink_Channel_Estimation_using_CSI-RS_7_0.png

CSI Configurations

[5]:
config = CSIConfiguration(rowIndex = 4, numSlots = nBSs, startPRB = 0, nrofPRBs = numRBs)

subcarrierSpacing = int(np.random.choice([15000, 30000, 60000, 120000, 240000]))
startPRB          = config.startPRB
nrofPRBs          = config.nrofPRBs
numSubcarriers    = 12*(nrofPRBs+startPRB)
Nfft              = config.Nfft

## CSI-RS Resource Configurations___
rowIndex          = config.rowIndex
nrofPorts         = config.nrofPorts
density           = config.density
cdmType           = config.cdmType
betaCSIRS         = config.betaCSIRS

## CSI-RS Parameters__________________________________________
scramblingID      = config.scramblingID
slotNumber        = config.slotNumber
#_____________________________________________________________

## Time and Frequency resources____________________
firstOFDMSymbolInTimeDomain  = config.firstOFDMSymbolInTimeDomain
firstOFDMSymbolInTimeDomain2 = config.firstOFDMSymbolInTimeDomain2
frequencyDomainAllocation    = config.frequencyDomainAllocation

config.display()

                   row-Index: 4
                   nrofPorts: 4
                     density: 1.0
                     cdmType: fd-CDM2
                scramblingID: 599
                  slotNumber: [ 0  8 12  0  0  4]
 firstOFDMSymbolInTimeDomain: 4
firstOFDMSymbolInTimeDomain2: None
   frequencyDomainAllocation: [0 0 1]
                    nrofPRBs: 84
                    startPRB: 0
                        Nfft: 1024
                   betaCSIRS: 1

Generate CSI-RS Resource Grid

[6]:
rmCSIRS   = ResourceMapperCSIRS(nrofPorts, density, cdmType, scramblingID, slotNumber,
                                frequencyDomainAllocation, firstOFDMSymbolInTimeDomain,
                                firstOFDMSymbolInTimeDomain2)
csirsGrid = rmCSIRS(nrofPRBs, startPRB, resourceGridSizeinRBs=None, beta = betaCSIRS)
[7]:
fig, ax = rmCSIRS.displayCDMPattern()
../../../_images/api_Tutorials_Tutorial28_Downliink_Channel_Estimation_using_CSI-RS_12_0.png

Generate the Transmit Grid

[8]:
## Load the resource grid to Transmission Grid
XGrid     = np.zeros((nBSs, nrofPorts, 14, Nfft), dtype=np.complex64)
bwpOffset = np.random.randint(0,Nfft-(startPRB+nrofPRBs)*12)
XGrid[...,bwpOffset:bwpOffset+(startPRB+nrofPRBs)*12] = csirsGrid


print()
print("*****************************************************")
print("      Size of the Transmission Grid:  "+str(XGrid.shape))
print("         BWP Resoure Element Offset:  "+str(startPRB))
print("      Size of the CSIRS-Resource Grid:  "+str(csirsGrid.shape))
print("*****************************************************")
print()


*****************************************************
      Size of the Transmission Grid:  (6, 4, 14, 1024)
         BWP Resoure Element Offset:  0
      Size of the CSIRS-Resource Grid:  (6, 4, 14, 1008)
*****************************************************

Transmit Beamforming

[9]:
#################################################################
# Beamforming angles
# Inter-element spacing in vertical and horizontal
Pt_dBm= 53
Pt    = 10**(0.1*(Pt_dBm-30))
lamda = 3*10**8/carrierFrequency
d     = 0.5/lamda
theta = 0
# Wt    = np.sqrt(Pt/Nt)*np.exp(1j*2*np.pi*d*np.cos(theta)/(lamda*Nt)*np.arange(0,Nt))
# Xf    = Wt.reshape(-1,1,1)*XGrid1
if(Nt%nrofPorts != 0):
    raise ValueError("'Nt' must be a multiple of 'nrofPorts'!")

rep   = int(Nt/nrofPorts)
# Xf    = np.sqrt(4*Pt/Nt)*XGrid.repeat(rep, axis = 1)
Xf    = XGrid.repeat(rep, axis = 1)

print(" Beamformed Grid: "+str(Xf.shape))
 Beamformed Grid: (6, 32, 14, 1024)

Pass through the Channel

[10]:
Y = (Hf[0,:,:,np.newaxis]@Xf.transpose(0,2,3,1)[:,np.newaxis,...,np.newaxis])[...,0]

print()
print("*****************************************************")
print("          Size of the Channel: "+str(Hf.shape))
print("Size of the Transmited Signal: "+str(Xf.shape))
print("  Size of the Received Signal: "+str(Y.shape))
print("*****************************************************")
print()

*****************************************************
          Size of the Channel: (1, 6, 11, 1024, 8, 32)
Size of the Transmited Signal: (6, 32, 14, 1024)
  Size of the Received Signal: (6, 11, 14, 1024, 8)
*****************************************************

Add noise at Receiver

[11]:
BoltzmanConst = 1.380649*(10**(-23))
temperature   = 300
noiseFiguredBi= 7
noiseFigure   = 10**(noiseFiguredBi/10)
noisePower    = BoltzmanConst*temperature*bandwidth/noiseFigure
noisePower    = 0
kppm          = 0
fCFO          = kppm*(np.random.rand()-0.5)*carrierFrequency*(10**(-6)); # fCFO = CFO*subcarrierSpacing
CFO           = (fCFO/scs)/Nfft
##Yf            = AddNoise(True)(Y, noisePower, CFO)

Yf            = AddNoise(False)(Y, noisePower, 0)    #Added
[12]:
# Plot Resource Grid
#################################################################
bsIndex = 0
ueIndex = 0
fig, ax = plt.subplots()
colors  = ['palegreen', 'white', 'lightcoral', 'gold', 'midnightblue', 'purple']
bounds  = [-1, 0, 1, 2, 3, 4, 5]

cmap    = mpl.colors.ListedColormap(colors)
norm    = mpl.colors.BoundaryNorm(bounds, cmap.N)
ax.pcolor(np.abs(Yf[bsIndex, ueIndex,...,0].T), cmap = "hot")
ax.axvline(x=14, color = 'y', lw = 3)
ax.set_yticks(np.arange(0.5, 12*numRBs, 48), minor=False);
# ax.set_yticks(np.arange(0, 12, 1), minor=False);
# ax.set_xticks(np.arange(0.5, 14*numSlots, 1), minor=True);
ax.set_xticks(np.arange(0, 14*numSlots, 1), minor=False);
# ax.tick_params(axis='both',which='minor', grid_linewidth=2, width=0)
ax.tick_params(axis='both',which='major', grid_alpha = 0.75,
               grid_linewidth=0.05, width=0, grid_linestyle = '--')
ax.set_xlabel("OFDM Symbol Index (n)")
ax.set_ylabel("Subcarrier Index (k)")
ax.set_title("Heatmap of Received Grid for UE-"+str(ueIndex))
ax = plt.gca()
ax.grid(color='c', linestyle='--', linewidth=0.5)
# Gridlines based on minor ticks
plt.show()
../../../_images/api_Tutorials_Tutorial28_Downliink_Channel_Estimation_using_CSI-RS_21_0.png

Extract the Resource Grid

[13]:
rxGrid = Yf[...,bwpOffset:bwpOffset+12*nrofPRBs,:]

print("  Size of the Received Signal: "+str(rxGrid.shape))
  Size of the Received Signal: (6, 11, 14, 1008, 8)
[14]:
# Plot Resource Grid
#################################################################
bsIndex = 0
ueIndex = 0
fig, ax = plt.subplots()
colors  = ['palegreen', 'white', 'lightcoral', 'gold', 'midnightblue', 'purple']
bounds  = [-1, 0, 1, 2, 3, 4, 5]

cmap    = mpl.colors.ListedColormap(colors)
norm    = mpl.colors.BoundaryNorm(bounds, cmap.N)
ax.pcolor(np.abs(rxGrid[bsIndex, ueIndex,...,0].T), cmap = "hot")
ax.axvline(x=14, color = 'y', lw = 3)
ax.set_yticks(np.arange(0.5, 12*numRBs, 48), minor=False);
# ax.set_yticks(np.arange(0, 12, 1), minor=False);
# ax.set_xticks(np.arange(0.5, 14*numSlots, 1), minor=True);
ax.set_xticks(np.arange(0, 14*numSlots, 1), minor=False);
# ax.tick_params(axis='both',which='minor', grid_linewidth=2, width=0)
ax.tick_params(axis='both',which='major', grid_alpha = 0.75,
               grid_linewidth=0.05, width=0, grid_linestyle = '--')
ax.set_xlabel("OFDM Symbol Index (n)")
ax.set_ylabel("Subcarrier Index (k)")
ax.set_title("Heatmap of Received Grid for UE-"+str(ueIndex))
ax = plt.gca()
ax.grid(color='c', linestyle='--', linewidth=0.5)
# Gridlines based on minor ticks
plt.show()
../../../_images/api_Tutorials_Tutorial28_Downliink_Channel_Estimation_using_CSI-RS_24_0.png

Estimate the Channel using CSI-RS

[15]:
interpolatorType = np.random.choice(["disabled","NN","Linear","Cubic","Spline","Akima","Pchip", "Spline_and_Denoise"])
interpolatorType = "Linear"
print("Interpolator: "+interpolatorType)
chEst = ChannelEstimationCSIRS()
Hfest = np.zeros((nBSs, nUEs, Nr, nrofPorts, 14, 12*nrofPRBs), dtype=np.complex64)
for nue in range(nUEs):
        print("nue: "+str((nue)))
        Hfest[:,nue] = chEst(rxGrid[:,nue].transpose(0,3,1,2), rmCSIRS, interpolatorType = interpolatorType, order = 5, knots=None, lamda=None)

Interpolator: Linear
nue: 0
nue: 1
nue: 2
nue: 3
nue: 4
nue: 5
nue: 6
nue: 7
nue: 8
nue: 9
nue: 10

Display the Estimated channel

[16]:
txAntIdx = -1
[17]:
bsIndex   = np.random.randint(nBSs)
ueIndex   = np.random.randint(nUEs)
rxAntIdx  = np.random.randint(Nr)
# txAntIdx  = np.random.randint(nrofPorts)
txAntIdx  = txAntIdx + 1

print("txAntIdx: "+str(txAntIdx))
symbIndex = rmCSIRS.ofdmSymbolNumber[0]
Hideal    = np.abs(Hf[0,bsIndex, ueIndex][:,rxAntIdx,:].reshape(Nfft, nrofPorts,-1).sum(-1))[...,txAntIdx]
Hest      = np.abs(Hfest[bsIndex, ueIndex, rxAntIdx, txAntIdx, symbIndex])
# Hest      = np.where(np.isnan(Hest), 0, Hest)
i         = 5
scale     = Hideal[bwpOffset+rmCSIRS.subcarrierIndices[txAntIdx,0,i]]/Hest[rmCSIRS.subcarrierIndices[txAntIdx,0,i]]
# scale     = 1
fig, ax = plt.subplots(figsize=(18,5))

if (rmCSIRS.nrofPorts == 1):
    ax.plot(np.arange(bwpOffset, bwpOffset+12*numRBs), Hest, label = "Interpolated Channel")
    ax.plot(bwpOffset+rmCSIRS.subcarrierIndices[0,0],  Hest[rmCSIRS.subcarrierIndices[0,0]], ".", label = "Estimated Channel")
    ax.plot(np.arange(0, Nfft, 1), np.abs(Hf[0,bsIndex, ueIndex][:,rxAntIdx,:].sum(-1)), "r:", label = "Ideal Channel")

elif (rmCSIRS.nrofPorts == 2):
    ax.plot(np.arange(bwpOffset, bwpOffset+12*numRBs), scale*Hest, label = "Interpolated Channel")
    ax.plot(bwpOffset+rmCSIRS.subcarrierIndices[0,0],  scale*Hest[rmCSIRS.subcarrierIndices[0,0]], ".", label = "Estimated Channel")
    ax.plot(np.arange(0, Nfft, 1), Hideal, "r:", label = "Ideal Channel")

elif (rmCSIRS.rowIndex in [4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]):
    ax.plot(np.arange(bwpOffset, bwpOffset+12*numRBs), scale*Hest, label = "Interpolated Channel")
    ax.plot(bwpOffset+rmCSIRS.subcarrierIndices[txAntIdx,0],  scale*Hest[rmCSIRS.subcarrierIndices[txAntIdx,0]], ".", label = "Estimated Channel")
    ax.plot(np.arange(0, Nfft), Hideal, "r:", label = "Ideal Channel")

ax.legend(loc = 'best')
ax.set_xlabel("Subcarrier Index (k)")
ax.set_ylabel("Magnitude of Channel")
ax.set_title("Frequency Response of the Channel between BS-"+str(bsIndex)+" and UE-"+str(ueIndex))
# ax.set_ylim([0.0000285,0.0000325])
ax.grid()
plt.show()

txAntIdx: 0
../../../_images/api_Tutorials_Tutorial28_Downliink_Channel_Estimation_using_CSI-RS_29_1.png

Estimate the Rank and Condition number

[18]:
maxRank = 8 # max rank that Type-I pRECODING
rank = np.random.randint(1,np.min([Nr,Nt,maxRank]), size = (nUEs,nBSs))
rank
[18]:
array([[5, 3, 2, 5, 1, 5],
       [3, 2, 1, 6, 7, 3],
       [7, 2, 4, 1, 7, 1],
       [6, 3, 3, 4, 3, 1],
       [1, 3, 7, 4, 6, 2],
       [5, 7, 2, 1, 2, 4],
       [1, 4, 5, 4, 2, 2],
       [5, 3, 2, 2, 4, 4],
       [6, 1, 7, 4, 1, 7],
       [6, 5, 1, 3, 4, 7],
       [5, 2, 6, 1, 2, 3]])
[19]:
rank = 2

SVD of Channel and Condition number

[20]:
[U, S, Vh] = np.linalg.svd(Hf)
condition_number = np.max(S, axis = -1)/np.min(S, axis = -1)
[21]:
condition_number.shape
[21]:
(1, 6, 11, 1024)

Estimate the Precoder: Type-I

[22]:
# Specifying the sub-band size

subBandSize      = 8 # sub-band size in PRBs
numSubBands      = int(numRBs/subBandSize) # number of sub-band channels
subBandSCIndices = np.arange(bwpOffset, bwpOffset + numSubBands*subBandSize*12).reshape(numSubBands,-1) # Sub-Carrier indices corresponding to each sub-band


##########################################################
# Single Panel Mode 1, Mode 2 : Valid Ranks are 1 and 2
# Single Panel Mode 1-2       : Valid Ranks are 3,4,5,6,7,8
# Multi Panel Mode 1, Mode 2  : Valid Ranks are 1,2,3,4
##########################################################
codebookType        = "typeI-SinglePanel"
AntennaStructure    = bsAntArray.arrayStructure[-3:-1]
AntennaPolarization = bsAntArray.arrayStructure[-1]

if rank == 1 or rank == 2:
    codebookMode = "1"
else:
    codebookMode = "1-2"

method              = "SearchFree"
numIterations       =  100

type1CB  = TypeICodeBook(codebookType, AntennaStructure, AntennaPolarization)
numPorts = np.prod(AntennaStructure)*AntennaPolarization
type1Precoder = np.zeros((Nfft,numPorts,rank), dtype="complex_")

for nsb in range(numSubBands):
    Hk       = Hf[...,subBandSCIndices[nsb],:,:]
    H        = (np.conj(Hk.transpose(0,1,2,3,5,4))@Hk).mean(-3)
    [S2, V]  = np.linalg.eig(H)
    type1Precoder[subBandSCIndices[nsb],...]  = type1CB(numIterations,V[0,0,0,:,0:rank], rank, codebookMode, method)
[ ]:

Previous Next

© Copyright 2022-2024, Gigayasa Wireless Private Limited.

Built with Sphinx using a theme provided by Read the Docs.