Main Content

nrPUSCHCodebook

Generate PUSCH precoding matrix

Description

example

w = nrPUSCHCodebook(nLayers,nPorts,tpmi) returns the physical uplink shared channel (PUSCH) precoding matrix for codebook-based transmission. nLayers is the number of layers, nPorts is the number of antenna ports, and tpmi is the transmitted precoding matrix indicator (TPMI). By default, this function disables transform precoding. The returned matrix, w, is the transpose of the precoding matrix defined in TS 38.211 Section 6.3.1.5 [1]. The matrix orientation of w allows the precoding operation to be performed by matrix multiplication on the output of the nrLayerMap function and w.

w = nrPUSCHCodebook(nLayers,nPorts,tpmi,transformPrecode) specifies transform precoding as a logical value. When transformPrecode is set to true, the function applies the transform precoding defined in TS 38.211 Section 6.3.1.4 [1].

w = nrPUSCHCodebook(___,codebookType) specifies the codebook type in addition to the input arguments in any of the previous syntaxes when nPorts is 8. (since R2024a)

Examples

collapse all

Modulate a random sequence of binary values of length 600 by using 64-QAM modulation. Split the modulated symbols into two layers.

modulation = '64QAM';
nlayers = 2;
in = randi([0 1],600,1);
data = nrSymbolModulate(in,modulation);
y = nrLayerMap(data,nlayers);

Generate the PUSCH precoding matrix for four antennas, two layers, and the specified TPMI.

nports = 4;
tpmi = 7;
w = nrPUSCHCodebook(nlayers,nports,tpmi)
w = 2×4 complex

   0.5000 + 0.0000i   0.0000 + 0.0000i   0.5000 + 0.0000i   0.0000 + 0.0000i
   0.0000 + 0.0000i   0.5000 + 0.0000i   0.0000 + 0.0000i   0.0000 + 0.5000i

Precode the layered modulation symbols by using the codebook matrix.

z = y * w
z = 50×4 complex

  -0.0772 - 0.3858i   0.3858 - 0.5401i  -0.0772 - 0.3858i   0.5401 + 0.3858i
  -0.3858 + 0.0772i  -0.5401 - 0.0772i  -0.3858 + 0.0772i   0.0772 - 0.5401i
  -0.5401 - 0.2315i  -0.2315 + 0.0772i  -0.5401 - 0.2315i  -0.0772 - 0.2315i
  -0.3858 + 0.2315i  -0.2315 - 0.0772i  -0.3858 + 0.2315i   0.0772 - 0.2315i
  -0.0772 - 0.3858i   0.5401 + 0.2315i  -0.0772 - 0.3858i  -0.2315 + 0.5401i
  -0.5401 + 0.5401i  -0.0772 + 0.2315i  -0.5401 + 0.5401i  -0.2315 - 0.0772i
  -0.3858 + 0.2315i  -0.0772 + 0.5401i  -0.3858 + 0.2315i  -0.5401 - 0.0772i
  -0.3858 + 0.5401i   0.5401 + 0.3858i  -0.3858 + 0.5401i  -0.3858 + 0.5401i
  -0.2315 + 0.0772i   0.2315 - 0.5401i  -0.2315 + 0.0772i   0.5401 + 0.2315i
  -0.2315 - 0.0772i   0.3858 - 0.3858i  -0.2315 - 0.0772i   0.3858 + 0.3858i
      ⋮

Input Arguments

collapse all

Number of transmission layers, specified as an integer from 1 to 8.

  • For one codeword, specify an integer from 1 to 4.

  • For two codewords, specify an integer from 5 to 8.

For more information, see TS 38.211 Section 6.3.1.3.

Data Types: double

Number of antenna ports, specified as 1, 2, 4, or 8. For more information, see TS 38.211 Section 6.3.1.5.

Data Types: double

Transmitted precoding matrix indicator, specified as an integer from 0 to 304. The valid range of tpmi depends on the specified number of transmission layers, nLayers, number of antenna ports, nPorts, and codebook type, codebookType. For more information, see TS 38.211 Tables 6.3.1.5-1 to 6.3.1.5-47.

Data Types: double

Transform precoding, specified as false or true. For more information, see TS 38.211 Section 6.3.1.4.

Data Types: double | logical

Since R2024a

Codebook type, specified as 'codebook1_ng1n4n1', 'codebook1_ng1n2n2', 'codebook2', 'codebook3', or 'codebook4'. Use this input together with the nLayers and tpmi inputs to specify the precoding matrix W from TS 38.211 Tables 6.3.1.5-9 to 6.3.1.5-47 for codebook transmissions with 8 antenna ports, that is, when nPorts=8.

Use this table to identify which codebook type to use for a specific number of antenna groups (Ng) and a specific table from TS 38.211. For a single antenna group (Ng=1), the table also shows the geometrical distribution of the antenna ports in each antenna group [N1 N2]. N1 is the number of antenna ports in the horizontal direction and N2 is the number of antenna ports in the vertical direction.

CodebookType Ng

[N1 N2]

Tables from TS 38.211
'codebook1_ng1n4n1'1

[4 1]

Tables 6.3.1.5-9 to 6.3.1.5-16
'codebook1_ng1n2n2'1

[2 2]

Tables 6.3.1.5-17 to 6.3.1.5-24
'codebook2'2N/ATables 6.3.1.5-25 to 6.3.1.5-36
'codebook3'4N/ATables 6.3.1.5-37 to 6.3.1.5-46
'codebook4'8N/ATable 6.3.1.5-47

Output Arguments

collapse all

PUSCH precoding codebook, returned as a complex matrix of size nLayers-by-nPorts. If nLayers and nPorts are both 1, then w is 1. Otherwise, the function returns the transpose of the matrix selected from Tables 6.3.1.5-1 to 6.3.1.5-7 in TS 38.211 [1].

Data Types: double
Complex Number Support: Yes

References

[1] 3GPP TS 38.211. “NR; Physical channels and modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2019a

expand all

See Also

Functions