sdr.ErrorRate.add(snr: float, x: ArrayLike, x_hat: ArrayLike) tuple[int, int, int]

Measures the number of bit or symbol errors at the given signal-to-noise ratio (SNR).

Parameters:
snr: float

The signal-to-noise ratio (SNR) in dB. This can be \(E_b/N_0\), \(E_s/N_0\), \(S/N\), \(C/N_0\), or other SNR quantities. However, users are cautioned to be consistent for a given class instance.

x: ArrayLike

The transmitted bits or symbols \(x[k]\).

x_hat: ArrayLike

The received bits or symbols \(\hat{x}[k]\).

Returns:

  • The number of errors.

  • The number of bits or symbols.

  • The error rate.

See also

sdr.pack, sdr.unpack

Examples

See the class Examples section.