-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '211-constellation-evm' into 'master'
Constellation EVM Evaluation Closes #211 See merge request barkhauseninstitut/wicon/hermespy!172
- Loading branch information
Showing
30 changed files
with
446 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
================================== ======================================================== | ||
================================== ================================================================= | ||
Performance Indicator Performance Indicator | ||
================================== ======================================================== | ||
================================== ================================================================= | ||
:doc:`modem.evaluators.ber` Errors comparing two bit streams | ||
:doc:`modem.evaluators.bler` Errors comparing two bit streams divided into blocks | ||
:doc:`modem.evaluators.fer` Errors comparing two bit streams divided into frames | ||
:doc:`modem.evaluators.throughput` Rate of correct frames multiplied by the frame bit rate | ||
================================== ======================================================== | ||
:doc:`modem.evaluators.evm` Root mean square error between transmitted and received symbols | ||
================================== ================================================================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
====================== | ||
Error Vector Magnitude | ||
====================== | ||
|
||
.. inheritance-diagram:: hermespy.modem.evaluators.ConstellationEVM hermespy.modem.evaluators.EVMArtifact hermespy.modem.evaluators.EVMEvaluation | ||
:parts: 1 | ||
:top-classes: hermespy.core.monte_carlo.Evaluator, hermespy.core.monte_carlo.Evaluation, hermespy.core.monte_carlo.Artifact | ||
|
||
Considering two linked modems denoted by :math:`(\alpha)` and :math:`(\beta)`, | ||
with modem :math:`(\alpha)` transmitting a symbol sequence | ||
|
||
.. math:: | ||
\mathbf{s}_{\mathrm{Tx}}^{(\alpha)} = \left[ s_{\mathrm{Tx}}^{(\alpha,1)}, s_{\mathrm{Tx}}^{(\alpha,2)}, \ldots, s_{\mathrm{Tx}}^{(\alpha,B)} \right]^{\mathsf{T}} \in \mathbb{C}^{S} | ||
and modem :math:`(\beta)` receiving a decoded symbol sequence | ||
|
||
.. math:: | ||
\mathbf{s}_{\mathrm{Rx}}^{(\beta)} = \left[ s_{\mathrm{Rx}}^{(\beta,1)}, s_{\mathrm{rx}}^{(\beta,2)}, \ldots, s_{\mathrm{Rx}}^{(\beta,B)} \right]^{\mathsf{T}} \in \mathbb{C}^{S} | ||
Hermes defines the symbol Error Vector Magnitude (EVM) as the root mean square (RMS) of the difference between the transmitted and received symbols | ||
|
||
.. math:: | ||
\mathrm{EVM}^{(\alpha,\beta)} = \sqrt{\frac{ \lVert \mathbf{s}_{\mathrm{Tx}}^{(\alpha)} - \mathbf{s}_{\mathrm{Rx}}^{(\beta)} \rVert_2^2 }{S}} \ \text{.} | ||
In practice, the number of symbols :math:`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: | ||
|
||
.. literalinclude:: ../scripts/examples/modem_evaluators_evm.py | ||
:language: python | ||
:linenos: | ||
:lines: 10-31 | ||
|
||
.. autoclass:: hermespy.modem.evaluators.ConstellationEVM | ||
|
||
.. autoclass:: hermespy.modem.evaluators.EVMArtifact | ||
|
||
.. autoclass:: hermespy.modem.evaluators.EVMEvaluation | ||
|
||
.. footbibliography:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import matplotlib.pyplot as plt | ||
|
||
from hermespy.core import dB | ||
from hermespy.modem import ConstellationEVM, TransmittingModem, ReceivingModem, RootRaisedCosineWaveform | ||
from hermespy.simulation import Simulation | ||
|
||
|
||
# Create a new simulation featuring two devices | ||
simulation = Simulation() | ||
device_alpha = simulation.new_device() | ||
device_beta = simulation.new_device() | ||
|
||
# Create a transmitting and receiving modem for each device, respectively | ||
modem_alpha = TransmittingModem(device=device_alpha) | ||
modem_beta = ReceivingModem(device=device_beta) | ||
|
||
# Configure the modem's waveform | ||
waveform_configuration = { | ||
'symbol_rate': 1e8, | ||
'num_preamble_symbols': 10, | ||
'num_data_symbols': 100, | ||
} | ||
modem_alpha.waveform = RootRaisedCosineWaveform(**waveform_configuration) | ||
modem_beta.waveform = RootRaisedCosineWaveform(**waveform_configuration) | ||
|
||
simulation.add_evaluator(ConstellationEVM(modem_alpha, modem_beta)) | ||
simulation.new_dimension('snr', dB(0, 2, 4, 8, 10, 12, 14, 16, 18, 20), device_beta) | ||
simulation.num_samples = 1000 | ||
result = simulation.run() | ||
|
||
result.plot() | ||
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.