-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
607 additions
and
12 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
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,63 @@ | ||
================ | ||
SionnaRT Channel | ||
================ | ||
|
||
|
||
.. inheritance-diagram:: hermespy.channel.sionna_rt_channel.SionnaRTChannel hermespy.channel.sionna_rt_channel.SionnaRTChannelRealization hermespy.channel.sionna_rt_channel.SionnaRTChannelSample | ||
:parts: 1 | ||
|
||
|
||
The :class:`SionnaRTChannel<hermespy.channel.sionna_rt_channel.SionnaRTChannel>` is an adapter for `Sionna Ray Tracing <https://nvlabs.github.io/sionna/api/rt.html>`_ module. | ||
|
||
It is deterministic, defined by the given `sionna.rt.Scene <https://nvlabs.github.io/sionna/api/rt.html#scene>`_. Meaning, given same devices and positions, different channel samples (:class:`SionnaRTChannelSample<hermespy.channel.sionna_rt_channel.SionnaRTChannelSample>`) and realizations (:class:`SionnaRTChannelRealization<hermespy.channel.sionna_rt_channel.SionnaRTChannelRealization>``) would not introduce any random changes and would produce equal state and propagation results. | ||
|
||
This channel model requires `sionna.rt.Scene` to operate. It should be loaded with `sionna.rt.load_scene` and provided to the :class:`SionnaRTChannel<hermespy.channel.sionna_rt_channel.SionnaRTChannel>` `__init__` method. | ||
|
||
Current assumptions in the adapter implementation are: | ||
|
||
* All the transmitting and receiving antennas utilize isometric pattern (`"iso"`) and a single vertical polarization (`"V"`). | ||
* The antenna arrays are `synthetic <https://nvlabs.github.io/sionna/api/rt.html?highlight=synthetic_array#sionna.rt.Scene.synthetic_array>`_. | ||
* The delays are not `normalized <https://nvlabs.github.io/sionna/api/rt.html?highlight=normalize_delays#sionna.rt.Paths.normalize_delays>`_. | ||
* If not a single ray hit was cought, then a zeroed signal or state are returned. | ||
|
||
It should be noted that `sionna.rt.Scene` is a singleton class. So when a new scene is loaded, a conflict with the previous existing instance will occure. Thus usage of several scenes at once must be avoided. | ||
|
||
.. mermaid:: | ||
|
||
classDiagram | ||
|
||
direction LR | ||
|
||
class SionnaRTChannel { | ||
|
||
_realize() : SionnaRTChannelRealization | ||
} | ||
|
||
class SionnaRTChannelRealization { | ||
|
||
_sample() : SionnaRTChannelSample | ||
} | ||
|
||
class SionnaRTChannelSample { | ||
|
||
propagate(Signal) : Signal | ||
} | ||
|
||
SionnaRTChannel --o SionnaRTChannelRealization : realize() | ||
SionnaRTChannelRealization --o SionnaRTChannelSample : sample() | ||
|
||
click SionnaRTChannel href "#hermespy.channel.sionna_rt_channel.SionnaRTChannel" | ||
click SionnaRTChannelRealization href "#hermespy.channel.sionna_rt_channel.SionnaRTChannelRealization" | ||
click SionnaRTChannelSample href "#hermespy.channel.sionna_rt_channel.SionnaRTChannelSample" | ||
|
||
The following minimal example outlines how to configure the channel model | ||
within the context of a :class:`Simulation<hermespy.simulation.simulation.Simulation>`: | ||
|
||
.. literalinclude:: ../../../scripts/examples/channel_SionnaRT.py | ||
:language: python | ||
:linenos: | ||
:lines: 11-36 | ||
|
||
.. autoclass:: hermespy.channel.fading.exponential.Exponential | ||
|
||
.. 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import matplotlib.pyplot as plt | ||
import numpy as np | ||
|
||
from hermespy.core import dB, Transformation | ||
from hermespy.channel.sionna_rt_channel import SionnaRTChannel, rt | ||
from hermespy.modem import BitErrorEvaluator, RRCWaveform, SimplexLink, SCLeastSquaresChannelEstimation, SCZeroForcingChannelEqualization | ||
from hermespy.simulation import Simulation | ||
|
||
|
||
# Initialize two devices to be linked by a channel | ||
simulation = Simulation() | ||
alpha_device = simulation.new_device( | ||
carrier_frequency=24e9, pose=Transformation.From_Translation(np.array([8.5, 21., 27.]))) | ||
beta_device = simulation.new_device( | ||
carrier_frequency=24e9, pose=Transformation.From_Translation(np.array([45., 90., 1.5]))) | ||
|
||
# Load the desired scene | ||
scene = rt.load_scene(rt.scene.munich) | ||
|
||
# Create a channel between the two devices | ||
channel = SionnaRTChannel(scene=scene, gain=1., seed=42) | ||
simulation.set_channel(alpha_device, beta_device, channel) | ||
|
||
# Configure communication link between the two devices | ||
link = SimplexLink(alpha_device, beta_device) | ||
|
||
# Specify the waveform and postprocessing to be used by the link | ||
link.waveform = RRCWaveform( | ||
symbol_rate=1e8, oversampling_factor=2, num_data_symbols=1000, | ||
num_preamble_symbols=10, pilot_rate=10) | ||
link.waveform.channel_estimation = SCLeastSquaresChannelEstimation() | ||
link.waveform.channel_equalization = SCZeroForcingChannelEqualization() | ||
|
||
# Configure a simulation to evaluate the link's BER and sweep over the receive SNR | ||
simulation.add_evaluator(BitErrorEvaluator(link, link)) | ||
simulation.new_dimension('noise_level', dB(0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20), beta_device) | ||
|
||
# Run simulation and plot resulting SNR curve | ||
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
Oops, something went wrong.