j_fun#

sionna.phy.fec.utils.j_fun(mu: torch.Tensor) torch.Tensor[source]#

Computes the J-function.

The J-function relates mutual information to the mean of Gaussian-distributed Log-Likelihood Ratios (LLRs) using the Gaussian approximation. This function implements the approximation proposed in [Brannstrom]:

\[J(\mu) \approx \left( 1 - 2^{H_\text{1}(2\mu)^{H_\text{2}}}\right)^{H_\text{3}}\]

where \(\mu\) represents the mean of the LLR distribution, and the constants are defined as \(H_\text{1}=0.3073\), \(H_\text{2}=0.8935\), and \(H_\text{3}=1.1064\).

Input values are clipped to [1e-10, 1000] for numerical stability.

Parameters:

mu (torch.Tensor) – Tensor of arbitrary shape, representing the mean of the LLR values.

Outputs:

mi – Tensor of the same shape and dtype as mu, containing the calculated mutual information values.

Examples

import torch
from sionna.phy.fec.utils import j_fun

mu = torch.tensor([0.1, 1.0, 5.0])
mi = j_fun(mu)
print(mi)