Main Content

nrORANBlockCompress

O-RAN fronthaul block compression

    Description

    example

    [cGrid,cParam] = nrORANBlockCompress(grid,method,cIQWidth,IQWidth) performs open radio access network (O-RAN) fronthaul block compression on the user plane (U-Plane) IQ data, grid. The input method specifies the compression method. The function implements the block floating point (BFP), block scaling, and μ-law compression methods, as defined in O-RAN.WG4.CUS TS Annexes A.1.1, A.2.1, and A.3.1, respectively [1]. The function returns the compressed grid, cGrid, and the compression parameter, cParam. Inputs IQWidth and cIQWidth specify the bit width of the IQ samples before and after compression, respectively.

    [cGrid,cParam] = nrORANBlockCompress(grid,method,cIQWidth) performs only BFP or μ-law compression.

    Examples

    collapse all

    Generate an NR downlink resource grid to perform O-RAN fronthaul block compression.

    cfg = nrDLCarrierConfig;
    [waveform,info] = nrWaveformGenerator(cfg);
    grid = info.ResourceGrids.ResourceGridBWP;

    Scale the bit width of the IQ samples in the resource grid to 16 bits.

    IQWidth = 16;
    peak = max(abs([real(grid(:)); imag(grid(:))]));
    scaleFactor = peak / (2^(IQWidth-1)-1);
    scaledGrid = round(grid / scaleFactor);

    Specify the bit width for the compressed IQ samples.

    cIQWidth = 9;

    Specify the compression method.

    method = 'BFP';

    Perform O-RAN fronthaul block compression.

    [cGrid,cParam] = nrORANBlockCompress(scaledGrid,method,cIQWidth);

    Perform O-RAN fronthaul block decompression.

    dGrid = nrORANBlockDecompress(cGrid,cParam,method);

    Descale the decompressed grid using the scaling factor from before the compression.

    descaledGrid = dGrid * scaleFactor;

    Input Arguments

    collapse all

    Resource grid of U-Plane IQ data, specified as a K-by-L-by-P complex array. K is the number of subcarriers, a multiple of 12, where 12 corresponds to the resource elements (REs) in a physical resource block (PRB). L is the number of OFDM symbols. P is the number of antennas. The input IQWidth specifies the bit width of the IQ samples in the grid.

    Data Types: double | single
    Complex Number Support: Yes

    O-RAN fronthaul compression method, specified as one of these values.

    • 'BFP' — Specify this value for BFP compression, as defined in O-RAN.WG4.CUS TS Annex A.1.1.

    • 'blockScaling' — Specify this value for block scaling compression, as defined in O-RAN.WG4.CUS TS Annex A.2.1.

    • 'muLaw' — Specify this value for μ-law compression, as defined in O-RAN.WG4.CUS TS Annex A.3.1.

    Data Types: string | char

    Bit width of the compressed IQ samples (in the output cGrid), including the sign bit, specified as one of these values.

    • Integer from 1 to 16 — This value specifies the bit width for all compressed IQ samples.

    • K/12-by-L-by-P integer array with values from 1 to 16 — The vector elements specify the bit width of the compressed IQ samples within a PRB.

    Data Types: double

    Bit width of the IQ samples before compression (in the input grid), specified as an integer from 1 to 32. For μ-law compression, this input must be 16. For BFP compression, the function ignores this input.

    Data Types: double

    Output Arguments

    collapse all

    Compressed resource grid of U-Plane IQ data, returned as a K-by-L-by-P complex array. The input cIQWidth specifies the bit width of the IQ samples in the compressed grid.

    Data Types: double | single
    Complex Number Support: Yes

    Compression parameter, returned as a K/12-by-L-by-P integer array.

    • For BFP compression, cParam is the common exponent applied per compressed PRB, with integer values from 0 to IQWidth – 1.

    • For block scaling compression, cParam is the common scale factor applied per compressed PRB, with integer values from 1 to 128.

    • For μ-law compression, cParam is the common shift applied per compressed PRB, with integer values from 0 to 7.

    Data Types: double

    References

    [1] O-RAN.WG4.CUS TS. “O-RAN Fronthaul Working Group; Control, User and Synchronization Plane Specification” Open Radio Access Network Alliance Technical Specification.

    Extended Capabilities

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

    Version History

    Introduced in R2022b

    See Also

    Functions