cbf_precoding_matrix#
- sionna.phy.mimo.cbf_precoding_matrix(h: torch.Tensor, precision: Literal['single', 'double'] | None = None) torch.Tensor[source]#
Computes the conjugate beamforming (CBF) Precoder.
This function computes the CBF precoding matrix for a MIMO link, assuming the following model:
\[\mathbf{y} = \mathbf{H}\mathbf{G}\mathbf{x} + \mathbf{n}\]where \(\mathbf{y}\in\mathbb{C}^K\) is the received signal vector, \(\mathbf{H}\in\mathbb{C}^{K\times M}\) is the known channel matrix, \(\mathbf{G}\in\mathbb{C}^{M\times K}\) is the precoding matrix, \(\mathbf{x}\in\mathbb{C}^K\) is the symbol vector to be precoded, and \(\mathbf{n}\in\mathbb{C}^K\) is a noise vector.
The precoding matrix \(\mathbf{G}\) is defined as:
\[\mathbf{G} = \mathbf{V}\mathbf{D}\]where
\[\begin{split}\mathbf{V} &= \mathbf{H}^{\mathsf{H}} \\ \mathbf{D} &= \mathop{\text{diag}}\left( \lVert \mathbf{v}_{k} \rVert_2^{-1}, k=0,\dots,K-1 \right).\end{split}\]The matrix \(\mathbf{D}\) ensures that each stream is precoded with a unit-norm vector, i.e., \(\mathop{\text{tr}}\left(\mathbf{G}\mathbf{G}^{\mathsf{H}}\right)=K\). The function returns the matrix \(\mathbf{G}\).
- Parameters:
h (torch.Tensor) – Channel matrices with shape […, K, M]
precision (Literal['single', 'double'] | None) – Precision used for internal calculations and outputs. If set to None,
precisionis used.
- Outputs:
g – […, M, K], torch.complex. Precoding matrices.
Examples
h = torch.complex(torch.randn(4, 8), torch.randn(4, 8)) g = cbf_precoding_matrix(h) # g.shape = torch.Size([8, 4])