# Throughput¶

Considering two linked modems denoted by $$(\alpha)$$ and $$(\beta)$$, with modem $$(\alpha)$$ transmitting a bit stream

$\mathbf{b}_{\mathrm{Tx}}^{(\alpha)} = \left[ b_{\mathrm{Tx}}^{(\alpha,1)}, b_{\mathrm{Tx}}^{(\alpha,2)}, \ldots, b_{\mathrm{Tx}}^{(\alpha,B)} \right]^{\mathsf{T}} \in \lbrace 0, 1 \rbrace^{B}$

and modem $$(\beta)$$ receiving a bit stream

$\mathbf{b}_{\mathrm{Rx}}^{(\beta)} = \left[ b_{\mathrm{Rx}}^{(\beta,1)}, b_{\mathrm{Rx}}^{(\beta,2)}, \ldots, b_{\mathrm{Rx}}^{(\beta,B)} \right]^{\mathsf{T}} \in \lbrace 0, 1 \rbrace^{B}$

which can be partitioned into $$L$$ bit block segments of equal length

$\begin{split}\mathbf{b}_{\mathrm{Tx}}^{(\alpha)} &= \left[ b_{\mathrm{B,Tx}}^{(\alpha,1)\mathsf{T}}, b_{\mathrm{B,Tx}}^{(\alpha,2)\mathsf{T}}, \ldots, b_{\mathrm{B,Tx}}^{(\alpha,L)\mathsf{T}} \right] \in \lbrace 0, 1 \rbrace^{B} \\ \mathbf{b}_{\mathrm{Rx}}^{(\beta)} &= \left[ b_{\mathrm{B,Rx}}^{(\beta,1)\mathsf{T}}, b_{\mathrm{B,Rx}}^{(\beta,2)\mathsf{T}}, \ldots, b_{\mathrm{B,Rx}}^{(\beta,L)\mathsf{T}} \right] \in \lbrace 0, 1 \rbrace^{B}\end{split}$

Hermes defines the data througput (DRX) as the exepcted number of block errors between the streams, i.e.,

$\mathrm{DRX}^{(\alpha,\beta)} = \mathbb{E} \lbrace \| b_{\mathrm{B,Tx}}^{(\alpha,l)} - b_{\mathrm{B,Rx}}^{(\alpha,l)} \|_2^2 > 0 \rbrace \frac{\mathrm{bit}}{T_\mathrm{F}} \ \text{.}$

Note that Hermes currently does not support the concept of Protocal Data Units (DPU). Hence, the data throughput is estimated based on frame errors. In practice, the number of bits $$B$$ may differ between transmitter and receiver. In this case, the shorter bit stream is padded with zeros.

The following minimal examples outlines how to configure this evaluator within the context of a simulation campaign:

 1# Create a new simulation featuring two devices
2simulation = Simulation()
3device_alpha = simulation.new_device()
4device_beta = simulation.new_device()
5
6# Create a transmitting and receiving modem for each device, respectively
7modem_alpha = TransmittingModem(device=device_alpha)
8modem_beta = ReceivingModem(device=device_beta)
9
10# Configure the modem's waveform
11waveform_configuration = {
12    'symbol_rate': 1e8,
13    'num_preamble_symbols': 10,
14    'num_data_symbols': 100,
15}
16modem_alpha.waveform = RootRaisedCosineWaveform(**waveform_configuration)
17modem_beta.waveform = RootRaisedCosineWaveform(**waveform_configuration)
18
20simulation.new_dimension('noise_level', dB(0, 2, 4, 8, 10, 12, 14, 16, 18, 20), device_beta)
21simulation.num_samples = 1000
22result = simulation.run()

class ThroughputEvaluator(transmitting_modem, receiving_modem, plot_surface=True)[source]

Evaluate data throughput between two modems exchanging information.

Parameters:
• transmitting_modem (TransmittingModem) – Modem transmitting information.

• receiving_modem (ReceivingModem) – Modem receiving information.

• plot_surface (bool, optional) – Plot the surface of the evaluation result in two-dimensional grids. Defaults to True.

evaluate()[source]

Evaluate the state of an investigated object.

Implements the process of extracting an arbitrary performance indicator, represented by the returned Artifact $$X_m$$.

Returns: Artifact $$X_m$$ resulting from the evaluation.

Return type:

ThroughputEvaluation

property abbreviation: str

Short string representation of this evaluator.

Used as a label for console output and plot axes annotations.

property title: str

Long string representation of this evaluator.

Used as plot title.

yaml_tag: Optional[str] = 'ThroughputEvaluator'

YAML serialization tag

class ThroughputArtifact(artifact)[source]

Artifact of a throughput evaluation between two modems exchanging information.

Parameters:

artifact (AT) – Artifact value.

class ThroughputEvaluation(bits_per_frame, frame_duration, frame_errors)[source]

Throughput evaluation between two modems exchanging information.

Parameters:
• bits_per_frame (int) – Number of bits per communication frame

• frame_duration (float) – Duration of a single communication frame in seconds

• frame_errors (np.ndarray) – Frame error indicators

artifact()[source]

Generate an artifact from this evaluation.

Returns: The evaluation artifact.

Return type:

ThroughputArtifact

property title: str

Title of the visualizable.

Returns: Title string.