MATLAB Examples

# Resource Blocks

The 3GPP documents describes a resource block to be a group of resource elements spanning 12 consecutive subcarriers in the frequency domain and one slot in the time domain. For processing efficiency, the LTE System Toolbox™, operates on a subframe (two timeslot) basis and describes a resource block pair to represent 12 consecutive subcarriers spanning in the frequency domain and one subframe (two slots) in the time domain. For example, the command ltePDSCHIndices uses the parameter PRBSet to define the set of physical resource block (PRB) indices for a subframe of data.

Create the cell-wide settings structure and define the PDSCH configuration.

```enb.CellRefP = 4; enb.CFI = 1; enb.NCellID = 1; enb.NSubframe = 0; enb.NDLRB = 6; enb.CyclicPrefix = 'Normal'; enb.DuplexMode = 'FDD'; pdsch.TxScheme = 'TxDiversity'; pdsch.Modulation = 'QPSK'; pdsch.RNTI = 1; pdsch.PRBSet = (0:5).'; ```

Create a set of PDSCH PRB indices for the initialized configuration.

```pdschIndices = ltePDSCHIndices(enb,pdsch,pdsch.PRBSet); size(pdschIndices) pdschIndices(1:10,:) pdsch ```
```ans = 384 4 ans = 10x4 uint32 matrix 145 1153 2161 3169 146 1154 2162 3170 147 1155 2163 3171 148 1156 2164 3172 149 1157 2165 3173 150 1158 2166 3174 151 1159 2167 3175 152 1160 2168 3176 153 1161 2169 3177 154 1162 2170 3178 pdsch = struct with fields: TxScheme: 'TxDiversity' Modulation: 'QPSK' RNTI: 1 PRBSet: [6x1 double] ```

pdsch.PRBSet can be either a column vector or a two-column matrix. If you provide a column vector, the resource allocation is the same in both slots of the subframe, which means the set of resource indices applies to both subframe time slots. On the other hand, if you provide a two-column matrix, the PRB indices refer to each slot individually.