Error Vector Magnitude¶
Considering two linked modems denoted by \((\alpha)\) and \((\beta)\), with modem \((\alpha)\) transmitting a symbol sequence
and modem \((\beta)\) receiving a decoded symbol sequence
Hermes defines the symbol Error Vector Magnitude (EVM) as the root mean square (RMS) of the difference between the transmitted and received symbols
In practice, the number of symbols \(S\) may differ between transmitter and receiver. In this case, the longer sequence is truncated to the length of the shorter sequence.
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()
8device_alpha.transmitters.add(modem_alpha)
9modem_beta = ReceivingModem()
10device_beta.receivers.add(modem_beta)
11
12# Configure the modem's waveform
13waveform_configuration = {
14 'symbol_rate': 1e8,
15 'num_preamble_symbols': 10,
16 'num_data_symbols': 100,
17}
18modem_alpha.waveform = RootRaisedCosineWaveform(**waveform_configuration)
19modem_beta.waveform = RootRaisedCosineWaveform(**waveform_configuration)
20
21simulation.add_evaluator(ConstellationEVM(modem_alpha, modem_beta))
22simulation.new_dimension('noise_level', dB(0, 2, 4, 8, 10, 12, 14, 16, 18, 20), device_beta)
23simulation.num_samples = 1000
24result = simulation.run()
- class ConstellationEVM(transmitting_modem, receiving_modem, plot_surface=True)[source]¶
Bases:
CommunicationEvaluator
Evaluate the error vector magnitude (EVM) of a constellation diagram.
- Parameters:
transmitting_modem (TransmittingModem) – Communication modem transmitting information.
receiving_modem (ReceivingModem) – Communication 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:
- class EVMArtifact(artifact)[source]¶
Bases:
ArtifactTemplate
[float
]Artifact of a error vector magnitude (EVM) evaluation between two modems exchanging information.
- Parameters:
artifact (AT) – Artifact value.
- class EVMEvaluation(transmitted_symbols, received_symbols)[source]¶
Bases:
EvaluationTemplate
[float
,PlotVisualization
]- Parameters:
transmitted_symbols (numpy.ndarray) – Originally transmitted communication symbols.
received_symbols (numpy.ndarray) – Received communication symbols.