Represent Resource Grids
Represent LTE resource grids by using multidimensional arrays.
Before orthogonal frequency-division multiplexing (OFDM) or single-carrier frequency-division multiple access (SC-FDMA) modulation, the physical channels and signals in LTE must be mapped to different portions of the resource grid. You can represent the resource grid as a multidimensional array, which the toolbox refers to as a resource array. The first dimension of this array represents the subcarrier. The second dimension represents the OFDM or SC-FDMA symbols in the downlink or uplink, respectively. The third dimension represents the antenna ports.
The resource array spans a subframe, equivalent to two slots, in the time domain, except for narrowband internet of things (NB-IoT) uplink transmissions, in which the resource grid spans a slot. The subframe resource array is a three-dimensional array of size 12NRB-by-2Nsym-by-P, where NRB is the number of resource blocks spanning the available bandwidth, Nsym is the number of OFDM or SC-FDMA symbols per slot, and P is the number of antenna ports. For the single-antenna case, you can use a matrix of size 12NRB-by-2Nsym. The slot resource array is an array of size 12NRB-by-Nsym-by-P. Because NB-IoT uplink transmissions use only one antenna port, you can use a matrix of size 12NRB-by-Nsym. Because a resource block contains 12 subcarriers, the resource array represents a slot for NB-IoT uplink configurations or a subframe for any other configuration and whole bandwidth.
Create Empty Resource Array
Initialize Required Parameters
Create a parameter structure for a normal cyclic prefix, nine downlink resource blocks, and one transmit antenna.
enb = struct('CyclicPrefix','Normal','NDLRB',9,'CellRefP',1);
Define seven symbols per slot for use in the
symbolsPerSlot = 7;
Create Empty Resource Arrays
Create an empty subframe resource array using each method.
resourceGrid1 = lteDLResourceGrid(enb); resourceGrid2 = zeros(enb.NDLRB*12,symbolsPerSlot*2,enb.CellRefP);
Compare Resource Arrays
Compare the two resource arrays. Because both approaches generate the same result, you can use either to create an empty downlink resource array. Similarly, you can create an empty uplink, sidelink, or narrowband resource array by using the
lteNBResourceGrid function, respectively, or the
ans = logical 1