Skip to content

EB/N0 Noise

__init__(ebn0_db=10, fs=128000, Rb=400, seed=None, length_multiplier=1, position_factor=0.5)

Implementation of AWGN noise \(r(t)\), based on \(\left(Eb/N_{0}\right)_{dB}\).

Parameters:

Name Type Description Default
ebn0_db float

Target value of \(Eb/N_{0}\) in \(dB\)

10
fs int

Signal sampling rate in \(Hz\).

128000
Rb int

Bit rate in bits/s.

400
seed int

Seed of the random number generator.

None
length_multiplier float

Multiplier of the signal length.

1
position_factor float

Position factor of the noise.

0.5

Examples:

>>> import argos3
>>> import numpy as np 
>>>
>>> transmitter = argos3.Transmitter(fc=2400, output_print=False, output_plot=False)
>>> t, s = transmitter.transmit(argos3.Datagram(pcdnum=1234, numblocks=1))
>>> 
>>> noise = argos3.NoiseEBN0(ebn0_db=15, fs=128000, Rb=400, seed=11)
>>> s_prime = noise.add_noise(s)
>>>                   
>>> receiver = argos3.Receiver(fc=2400, output_print=False, output_plot=False)
>>> datagramRX, success = receiver.receive(s_prime)
>>> 
>>> print(success)
True
>>> print(datagramRX.parse_datagram())
{
  "msglength": 1,
  "pcdid": 1234,
  "data": {
    "bloco_1": {
      "sensor_1": 37,
      "sensor_2": 198,
      "sensor_3": 9
    }
  },
  "tail": 7
}
  • Time Domain Plot Example: pageplot
  • Frequency Domain Plot Example: pageplot

add_noise(signal)

Adds AWGN noise $n(t) to the input signal $s(t), based on the \(Eb/N0_{dB}\) defined in initialization.

\[ r(t) = s(t) + n(t), \qquad n(t) \sim \mathcal{N}(0, \sigma^2) \]
Where
  • \(r(t)\): Signal returned with AWGN noise added.
  • \(s(t)\): Input signal without noise.
  • \(n(t)\): Noise added, with normal distribution \(\mathcal{N}(0, \sigma^2)\).

The noise variance \(\sigma^2\) is given by:

\[ \sigma^2 = \frac{N_0 \cdot f_s}{2} \]
Where
  • \(\sigma^2\): Noise variance.
  • \(N_0\): Noise density.
  • \(f_s\): Signal sampling rate in \(Hz\).

The noise density \(N_0\) is given by:

\[ N_0 = \frac{\mathbb{E}\!\left[ |s(t)|^2 \right]}{R_b \cdot 10^{\frac{E_b/N_0}{10}}} \]
Where
  • \(N_0\): Noise density.
  • \(\mathbb{E}\!\left[ |s(t)|^2 \right]\): Signal power.
  • \(R_b\): Bit rate in bits/s.
  • \(E_b/N_0\): Target value of \(Eb/N_{0}\) in \(dB\).

Parameters:

Name Type Description Default
signal ndarray

Sinal transmitido \(s(t)\).

required

Returns:

Name Type Description
signal ndarray

Sinal recebido \(r(t)\), com ruído AWGN adicionado.

Examples:

  • Noise Density Plot Example: pageplot
Reference:

Digital communications / John G. Proakis, Masoud Salehi.—5th ed. (pg. 283)

https://rwnobrega.page/posts/snr/