MATLAB Examples

Create Frame with CellRS in Subframes

This example shows how to create a frame containing the cell-specific reference signals (CellRS) in each subframe. The radio frame is represented in the LTE System Toolbox™ product by the use of a succession of 10 cell-wide settings structures with the NSubframe field set from 0 through 9 in each case.


Initialize Cell-wide Setting Structure and Create Empty Resource Grid

Modify the NDLRB parameter to set the number of resource blocks. Modify CellRefP to set one transmit antenna port. Modify NCellID to set the cell ID. Specify normal cyclic prefix and antenna port zero.

enb.NDLRB = 6;
enb.CellRefP = 1;
enb.NCellID = 1;
enb.CyclicPrefix = 'Normal';
antenna = 0;

Create an empty resource grid to be populated with subframes.

txGrid = [];

Populate Resource Grid For Each Subframe

  • Create an empty resource grid for each subframe and set the current subframe number.
  • Generate cell-specific reference signal symbols and indices.
  • Map the cell-specific reference signal to the grid and append the subframe to the grid to be transmitted.
for sf = 0:9
    subframe = lteDLResourceGrid(enb);
    enb.NSubframe = sf;
    cellRsSym = lteCellRS(enb,antenna);
    cellRsInd = lteCellRSIndices(enb,antenna);
    subframe(cellRsInd) = cellRsSym;
    txGrid = [txGrid subframe];