The UE does channel estimation and based on that chooses a precoding matrix .
Precoding for spatial multiplexing involves a set of precoder matrices, called a codebook.
This precoding matrix to be used can be dynamically changed on a subframe basis according to the feedback of CQI/PMI/RI from the UE. RI indicates the layers which are associated with codebook Index.
LTE accepts up to two code words (CW0 and CW1) in Precoding process. One or two code words can be used depending on the prevailing channel conditions (setting by a parameter in the system) and use case. To identify each CW when CW0 and CW1 are supported by the UE, the spatial multiplexing must be used with close-loop. The codebook is based on precoding. LTE uses the codebook to map the layers to the antenna ports. UE reports codebook index indicated in PMI (Precoding Matrix Index) to use in case Close-Loop MIMO can be supported by the UE in TM4 (Transmission Mode 4). eNB selects the codebook index based on PMI UE report. Therfore, PMI must be used in CL-spatial multiplexing mode.
For example, with the MIMO available network, UE may have a chance to report following scenarios:
•Close-Loop Spatial Multiplexing Mode (Codebook Index table is used)
*UE reports the CQI, RI and PMI
*It is triggered by a parameter of DL SINR threshold between CL-MIMO one layer and Tx Diversity
•Open-Loop Spatial Multiplexing Mode (Fixed codebook is used)
*UE only reports CQI and RI
Please refer to 36.211 section 6.3.4