MATLAB: Determining the precoding matrix used for a RMC in the lte PDSCH function

lte system toolboxLTE Toolboxltedlschltepdschprecoding

Hi, I am trying to track how modulated symbols are processed through the precoding operation in the LTE PDSCH signal processing chain. To do this I configured the enb structure, DLSCH and PDSCH using the RMCs available. In the PDSCH, the modulated symbols undergo the Layer mapping operation before undergoing the Precoding operation. I placed temporary counters within the ltePDSCH function to observe the modulated symbols, the layer mapped symbols and the precoded symbols. Now for RMC = 'R.10' the output of the modulator for 16QAM for a codeword length of 80 bits provides a 1 by 1 cell that has 20 by 1 complex array, a layer mapped output of 10 by 2 complex double and the precoder output of 20 by 2 complex double.
For RMC = 'R.10', it uses two antenna ports and that explains why the 20 by 1 becomes a 10 by 2 due to layer mapping. For RMC = 'R.10', it can be applied for spatial multiplexing or transmit diversity and that explains why the 10 by 2 becomes a 20 by 2 since a precoding matrix was applied to it.
The issue is I can't think of a way to find the precoding matrix used within the existing ltePDSCH function used. So can someone help me find a way to determine the precoding matrix used. This is the code I used below:
enb.RC = 'R.10';
enb = lteRMCDL(enb);
[cwout,~] = lteDLSCH_edited(enb,enb.PDSCH,80,enb.PDSCH.TrBlkSizes);
enb.PDSCH.Modulation = '16QAM';
[symbols,tempM,tempP,tempL] = ltePDSCH_edited(enb,enb.PDSCH,cwout);
The tempM, tempP, and tempL are my temporary variables to hold the output of the modulation, precoding and layer mapping operations respectively. I saved the ltePDSCH function in a new file I renamed ltePDSCH_edited. I never edit the original function files from the toolbox.

Best Answer

The transmission scheme associated with the above configuration (R.10) is transmit diversity (see the 'TxScheme' parameter in enb.PDSCH). The precoding matrices are therefore the fixed values defined in TS 36.211 section 6.3.4.3, dependent on the 'CellRefP' parameter in enb. The number of CRS ports should be 2 or 4 for transmit diversity.
Cheers,
Graham