Communication Evaluators

This module introduces several evaluators for performance indicators in communication scenarios. Refer to the PyMonte documentation for a detailed introduction to the concept of Evaluators.

classDiagram ArtifactTemplate <|-- FrameErrorArtifact CommunicationEvaluator <|-- BlockErrorEvaluator Serializable <|-- BlockErrorEvaluator CommunicationEvaluator <|-- FrameErrorEvaluator Serializable <|-- FrameErrorEvaluator Serializable <|-- BitErrorEvaluator FrameErrorEvaluator <|-- ThroughputEvaluator ArtifactTemplate <|-- BitErrorArtifact ArtifactTemplate <|-- BlockErrorArtifact CommunicationEvaluator <|-- BitErrorEvaluator Serializable <|-- ThroughputEvaluator Evaluator <|-- CommunicationEvaluator Artifact <|-- ThroughputArtifact

The implemented CommunicationEvaluators all inherit from the identically named common base which gets initialized by selecting the two Modem instances whose communication should be evaluated. The currently considered performance indicators are

Evaluator

Artifact

Performance Indicator

BitErrorEvaluator

BitErrorArtifact

Errors comparing two bit streams

BlockErrorEvaluator

BlockErrorArtifact

Errors comparing two bit streams divided into blocks

FrameErrorEvaluator

FrameErrorArtifact

Errors comparing two bit streams divided into frames

ThroughputEvaluator

ThroughputArtifact

Rate of correct frames multiplied by the frame bit rate

Configuring CommunicationEvaluators to evaluate the communication process between two Modem instances is rather straightforward:

# Create two separate modem instances
modem_alpha = Modem()
modem_beta = Modem()

# Create a bit error evaluation as a communication evaluation example
communication_evaluator = BitErrorEvaluator(modem_alpha, modem_beta)

# Extract evaluation artifact
communication_artifact = communication_evaluator.evaluate()

# Visualize artifact
communication_artifact.plot()
class CommunicationEvaluator(transmitting_modem, receiving_modem)

Bases: hermespy.core.monte_carlo.Evaluator[hermespy.core.scenario.Scenario], abc.ABC

Base class for evaluating communication processes between two modems.

Parameters
  • transmitting_modem (Modem) – Modem transmitting information.

  • receiving_modem (Modem) – Modem receiving information.

property transmitting_modem: hermespy.modem.modem.Modem

Modem transmitting information.

Returns

Handle to the transmitting modem.

Return type

Modem

property receiving_modem: hermespy.modem.modem.Modem

Modem receiving information.

Returns

Handle to the receiving modem.

Return type

Modem

class BitErrorArtifact(artifact)

Bases: hermespy.core.monte_carlo.ArtifactTemplate[numpy.ndarray]

Artifact of a block error evaluation between two modems exchanging information.

Parameters

artifact (AT) – Artifact value.

to_scalar()

Scalar representation of this artifact’s content.

Used to evaluate premature stopping criteria for the underlying evaluation.

Returns

Scalar floating-point representation. None if a conversion to scalar is impossible.

Return type

Optional[float]

plot()
Return type

List[Figure]

class BitErrorEvaluator(transmitting_modem, receiving_modem)

Bases: hermespy.modem.evaluators.CommunicationEvaluator, hermespy.core.factory.Serializable

Evaluate bit errors between two modems exchanging information.

Parameters
  • transmitting_modem (Modem) – Modem transmitting information.

  • receiving_modem (Modem) – Modem receiving information.

yaml_tag: Optional[str] = 'BitErrorEvaluator'

YAML serialization tag

evaluate(investigated_object=None)

Evaluate the state of an investigated object.

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

Parameters

investigated_object (MO) – Investigated object, configured to an independent random state.

Returns

Artifact \(X_m\) resulting from the evaluation.

Return type

Artifact

property abbreviation: str

Short string representation of this evaluator.

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

Returns

String representation

Return type

str

property title: str

Long string representation of this evaluator.

Used as plot title.

Returns

String representation

Return type

str

class BlockErrorArtifact(artifact)

Bases: hermespy.core.monte_carlo.ArtifactTemplate[numpy.ndarray]

Artifact of a block error evaluation between two modems exchanging information.

Parameters

artifact (AT) – Artifact value.

to_scalar()

Scalar representation of this artifact’s content.

Used to evaluate premature stopping criteria for the underlying evaluation.

Returns

Scalar floating-point representation. None if a conversion to scalar is impossible.

Return type

Optional[float]

class BlockErrorEvaluator(transmitting_modem, receiving_modem)

Bases: hermespy.modem.evaluators.CommunicationEvaluator, hermespy.core.factory.Serializable

Evaluate block errors between two modems exchanging information.

Parameters
  • transmitting_modem (Modem) – Modem transmitting information.

  • receiving_modem (Modem) – Modem receiving information.

yaml_tag: Optional[str] = 'BlockErrorEvaluator'

YAML serialization tag

evaluate(investigated_object=None)

Evaluate the state of an investigated object.

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

Parameters

investigated_object (MO) – Investigated object, configured to an independent random state.

Returns

Artifact \(X_m\) resulting from the evaluation.

Return type

Artifact

property title: str

Long string representation of this evaluator.

Used as plot title.

Returns

String representation

Return type

str

property abbreviation: str

Short string representation of this evaluator.

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

Returns

String representation

Return type

str

class FrameErrorArtifact(artifact)

Bases: hermespy.core.monte_carlo.ArtifactTemplate[numpy.ndarray]

Artifact of a frame error evaluation between two modems exchanging information.

Parameters

artifact (AT) – Artifact value.

to_scalar()

Scalar representation of this artifact’s content.

Used to evaluate premature stopping criteria for the underlying evaluation.

Returns

Scalar floating-point representation. None if a conversion to scalar is impossible.

Return type

Optional[float]

class FrameErrorEvaluator(transmitting_modem, receiving_modem)

Bases: hermespy.modem.evaluators.CommunicationEvaluator, hermespy.core.factory.Serializable

Evaluate frame errors between two modems exchanging information.

Parameters
  • transmitting_modem (Modem) – Modem transmitting information.

  • receiving_modem (Modem) – Modem receiving information.

yaml_tag: Optional[str] = 'FrameErrorEvaluator'

YAML serialization tag

evaluate(investigated_object=None)

Evaluate the state of an investigated object.

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

Parameters

investigated_object (MO) – Investigated object, configured to an independent random state.

Returns

Artifact \(X_m\) resulting from the evaluation.

Return type

Artifact

property title: str

Long string representation of this evaluator.

Used as plot title.

Returns

String representation

Return type

str

property abbreviation: str

Short string representation of this evaluator.

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

Returns

String representation

Return type

str

class ThroughputArtifact(bits_per_frame, frame_duration, frame_errors)

Bases: hermespy.core.monte_carlo.Artifact

Artifact of a 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

to_scalar()

Scalar representation of this artifact’s content.

Used to evaluate premature stopping criteria for the underlying evaluation.

Returns

Scalar floating-point representation. None if a conversion to scalar is impossible.

Return type

Optional[float]

class ThroughputEvaluator(transmitting_modem, receiving_modem)

Bases: hermespy.modem.evaluators.FrameErrorEvaluator, hermespy.core.factory.Serializable

Evaluate data throughput between two modems exchanging information.

Parameters
  • transmitting_modem (Modem) – Modem transmitting information.

  • receiving_modem (Modem) – Modem receiving information.

yaml_tag: Optional[str] = 'ThroughputEvaluator'

YAML serialization tag

evaluate(investigated_object=None)

Evaluate the state of an investigated object.

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

Parameters

investigated_object (MO) – Investigated object, configured to an independent random state.

Returns

Artifact \(X_m\) resulting from the evaluation.

Return type

Artifact

property title: str

Long string representation of this evaluator.

Used as plot title.

Returns

String representation

Return type

str

property abbreviation: str

Short string representation of this evaluator.

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

Returns

String representation

Return type

str