Main Content

nrSSBMeasurements

SSB-based physical layer measurements

Since R2022b

    Description

    example

    meas = nrSSBMeasurements(ssbGrid,ncellid) returns physical layer measurements meas for synchronization signal block (SSB) ssbGrid, as defined in TS 38.215 Sections 5.1.1 and 5.1.3 [1]. The returned structure meas contains the reference signal received power (RSRP), received signal strength indicator (RSSI), and reference signal received quality (RSRQ). The input ssbGrid specifies a single SS block. The input ncellid specifies the physical layer cell identity number.

    example

    meas = nrSSBMeasurements(___,ibarSSB) also specifies the time-dependent part of the DM-RS scrambling initialization, ibarSSB, in addition to the input arguments in the previous syntax. Use this syntax to include the physical broadcast channel demodulation reference signal (PBCH DM-RS) symbols in the RSRP measurement.

    Examples

    collapse all

    Create an SSB for one receive antenna.

    ssblock = zeros(240,4);

    Set the cell identity and the corresponding PSS symbols.

    ncellid = 17;
    pssSymbols = nrPSS(ncellid);
    ssblock(nrPSSIndices) = pssSymbols;

    Set the SSS symbols.

    sssSymbols = nrSSS(ncellid);
    ssblock(nrSSSIndices) = sssSymbols;

    Perform OFDM modulation on the SS block.

    scs = 15;
    initialNSlot = 0;
    txWaveform = nrOFDMModulate(ssblock,scs,initialNSlot);

    Pass the time-domain waveform through an AWGN channel with a signal-to-noise ratio of 10 dB.

    snr = 10;
    rxWaveform = awgn(txWaveform,snr,"measured");

    Demodulate the received waveform and perform SSB-based measurements.

    nrb = 20;
    ssbGrid = nrOFDMDemodulate(rxWaveform,nrb,scs,initialNSlot);
    meas = nrSSBMeasurements(ssbGrid,ncellid)
    meas = struct with fields:
        RSRPPerAntenna: 30.0225
        RSSIPerAntenna: 48.2352
        RSRQPerAntenna: -5.2024
    
    

    Create an SSB for one receive antenna.

    ssblock = zeros(240,4);

    Set the cell identity and the corresponding PSS symbols.

    ncellid = 17;
    pssSymbols = nrPSS(ncellid);
    ssblock(nrPSSIndices) = pssSymbols;

    Set the SSS symbols.

     sssSymbols = nrSSS(ncellid);
     ssblock(nrSSSIndices) = sssSymbols;

    Create and set the PBCH symbols, using a random codeword, the cell identity, and a scrambling sequence phase of 0.

    cw = randi([0 1],864,1);
    v = 0;
    pbchSymbols = nrPBCH(cw,ncellid,v);
    pbchIndices = nrPBCHIndices(ncellid);
    ssblock(pbchIndices) = pbchSymbols;

    Create and set the PBCH DM-RS symbols using the cell identity and the time-dependent part of the DM-RS scrambling initialization.

    ibarSSB = 0;
    dmrsSymbols = nrPBCHDMRS(ncellid,ibarSSB);
    dmrsIndices = nrPBCHDMRSIndices(ncellid);
    ssblock(dmrsIndices) = dmrsSymbols;

    Perform OFDM modulation on the SS block.

    scs = 15;
    initialNSlot = 0;
    txWaveform = nrOFDMModulate(ssblock,scs,initialNSlot);

    Apply power scaling to the transmitted waveform.

    EsdBm = -50;
    rxWaveform = txWaveform * sqrt(10^((EsdBm-30)/10));

    Demodulate the received waveform and perform the SSB-based measurements, including the PBCH DM-RS symbols.

    nrb = 20;
    ssbGrid = nrOFDMDemodulate(rxWaveform,nrb,scs,initialNSlot);
    meas = nrSSBMeasurements(ssbGrid,ncellid,ibarSSB)
    meas = struct with fields:
        RSRPPerAntenna: -50
        RSSIPerAntenna: -26.8298
        RSRQPerAntenna: -10.1599
    
    

    Input Arguments

    collapse all

    SSB grid, specified as a complex-valued array of size 240-by-4-by-R, where R is the number of receive antennas.

    Data Types: single | double
    Complex Number Support: Yes

    Physical layer cell identity number, specified as an integer from 0 to 1007.

    Data Types: double

    Time-dependent part of the DM-RS scrambling initialization, specified as an integer from 0 to 7. Specify this input based on the least significant bits (LSBs) of the SS/PBCH block index and the half-frame number from the SS burst configuration.

    • If the number of SS/PBCH blocks per half-frame is 4, ibarSSB = iSSB + 4 × nhf, where iSSB is the two LSBs of the SS/PBCH block index (0 to 3). nhf is the half-frame number within the frame (0,1).

    • If the number of SS/PBCH blocks per half-frame is 8 or 64, ibarSSB is the three LSBs of the SS/PBCH block index (0 to 7).

    Data Types: double

    Output Arguments

    collapse all

    SSB-based physical layer measurements, returned as a structure containing these fields.

    FieldValueDescription
    RSRPPerAntennaReal-valued column vectorVector of RSRP values in dBm relative to 1 milliwatt in 1 ohm
    RSSIPerAntennaReal-valued column vector

    Vector of RSSI values in dBm relative to 1 milliwatt in 1 ohm

    RSRQPerAntenna Real-valued column vector

    Vector of RSRQ values in dB

    The rows of these column vectors correspond to receive antennas.

    Data Types: struct

    References

    [1] 3GPP TS 38.215. “NR; Physical layer measurements.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

    Extended Capabilities

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2022b