Skip to content

Commit

Permalink
Release v0.11.0
Browse files Browse the repository at this point in the history
Signed-off-by: The Sionna Team <[email protected]>
  • Loading branch information
gmarcusm committed Sep 13, 2022
1 parent c5a709b commit 2fcad58
Show file tree
Hide file tree
Showing 94 changed files with 11,456 additions and 2,786 deletions.
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

16 changes: 15 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,18 @@ all-tests-tf-2.9.1:
when: always
reports:
junit: test/report-tf-2.9.1.xml
when: manual
when: manual
all-tests-tf-2.10.0:
image: gitlab-master.nvidia.com:5005/nvresearch-gcml/sionna/test-sionna-tensorflow:2.10.0-gpu-jupyter
stage: test
script:
- nvidia-smi
- cd test
- pytest --junitxml=report-tf-2.10.0.xml
tags:
- test
artifacts:
when: always
reports:
junit: test/report-tf-2.10.0.xml
when: manual
2 changes: 1 addition & 1 deletion DOCKERFILE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM tensorflow/tensorflow:2.9.1-gpu-jupyter
FROM tensorflow/tensorflow:2.10.0-gpu-jupyter
EXPOSE 8888
COPY . /tmp/
WORKDIR /tmp/
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Sionna&trade; is an open-source Python library for link-level simulations of dig
The official documentation can be found [here](https://nvlabs.github.io/sionna/).

## Installation
Sionna requires [Python](https://www.python.org/) and [Tensorflow](https://www.tensorflow.org/).
Sionna requires [Python](https://www.python.org/) and [Tensorflow](https://www.tensorflow.org/).
In order to run the tutorial notebooks on your machine, you also need [Jupyter](https://jupyter.org/).
You can alternatively test them on [Google Colab](https://colab.research.google.com/).
Although not necessary, we recommend running Sionna in a [Docker container](https://www.docker.com).
Although not necessary, we recommend running Sionna in a [Docker container](https://www.docker.com).

Sionna requires [TensorFlow 2.6-2.9](https://www.tensorflow.org/install) and Python 3.6-3.9. We recommend Ubuntu 20.04.
Sionna requires [TensorFlow 2.6-2.10](https://www.tensorflow.org/install) and Python 3.6-3.9. We recommend Ubuntu 20.04.

We refer to the [TensorFlow GPU support tutorial](https://www.tensorflow.org/install/gpu) for GPU support and the required driver setup.

Expand All @@ -35,7 +35,7 @@ On macOS, you need to install [tensorflow-macos](https://github.com/apple/tensor
```
>>> import sionna
>>> print(sionna.__version__)
0.10.0
0.11.0
```

3.) Once Sionna is installed, you can run the [Sionna "Hello, World!" example](https://nvlabs.github.io/sionna/examples/Hello_World.html), have a look at the [quick start guide](https://nvlabs.github.io/sionna/quickstart.html), or at the [tutorials](https://nvlabs.github.io/sionna/tutorials.html).
Expand Down Expand Up @@ -94,7 +94,7 @@ We recommend to do this within a [virtual environment](https://docs.python.org/3
```
>>> import sionna
>>> print(sionna.__version__)
0.10.0
0.11.0
```

## License and Citation
Expand Down
137 changes: 137 additions & 0 deletions doc/source/_ext/made_with_sionna.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
#
# SPDX-FileCopyrightText: Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#

# Custom extension to automate the "Made with Sionna" section

import os
import sys

sys.path.insert(0, os.path.abspath('../..'))

from docutils import nodes
from docutils.parsers.rst import directives
from sphinx.util.docutils import SphinxDirective

class MadeWithSionna(SphinxDirective):
has_content = True
required_arguments = 0
option_spec = {
'title': directives.unchanged_required,
'authors': directives.unchanged_required,
'version': directives.unchanged_required,
'year': directives.unchanged_required,
'link_colab': directives.unchanged,
'link_arxiv': directives.unchanged,
'link_pdf': directives.unchanged,
'link_github': directives.unchanged,
'link_code': directives.unchanged,
'abstract': directives.unchanged_required,
}
def run(self):

title = self.options.get('title')
authors = self.options.get('authors')
version = self.options.get('version')
year = self.options.get('year')
abstract = self.options.get('abstract')

# parse optional arguments
try:
link_colab = self.options.get('link_colab')
except:
link_colab = None
else:
pass
try:
link_arxiv = self.options.get('link_arxiv')
except:
link_arxiv = None
else:
pass
try:
link_github = self.options.get('link_github')
except:
link_github = None
else:
pass
try:
link_pdf = self.options.get('link_pdf')
except:
link_pdf = None
else:
pass
try:
link_code = self.options.get('link_code')
except:
link_code = None
else:
pass

html_str = f'<embed>' \
f'<h2 style="margin-bottom:0; font-size:19px;">{title}</h2>' \
f'<i style="margin-bottom:0; font-size:16px;">{authors}</i>' \
f'<p style="margin-top: 1; margin-bottom:0; padding-top:0;">' \
f'Released in {year} and based on Sionna v{version}.</p>' \
f'<div style="margin-top:2; margin-bottom:10px;">'\
f'<table>'

if link_arxiv is not None:
html_str += f'<td style="padding: 4px 0px;">'\
f'<a href="{link_arxiv}" style="vertical-align:text-bottom">'\
f'<img alt="Arxiv logo" src="_static/arxiv_logo.png" ' \
f'style="width: 40px; min-width: 40px"></a>'\
f'</td><td style="padding: 4px 4px;">'\
f'<a href="{link_arxiv}" style="vertical-align:text-bottom">'\
f'Read on arXiv</a></td>'\

if link_pdf is not None:
html_str += f'<td class="wy-breadcrumbs-aside"' \
f' style="padding: 0 0px;">'\
f'<a href="{link_pdf}" style="vertical-align:text-bottom">'\
f'<i class="fa fa-file" style="font-size:24px;"></i>'\
f' View Paper</a></td>'

if link_github is not None:
html_str += f'<td class="wy-breadcrumbs-aside"' \
f' style="padding: 0 30px;">'\
f'<a href="{link_github}" style="vertical-align:text-bottom">'\
f'<i class="fa fa-github" style="font-size:24px;"></i>'\
f' View on GitHub</a></td>'

if link_code is not None:
html_str += f'<td class="wy-breadcrumbs-aside"' \
f' style="padding: 0 30px;">'\
f'<a href="{link_code}" style="vertical-align:text-bottom">'\
f'<i class="fa fa-code" style="font-size:24px;"></i>'\
f' View Code</a></td>'

if link_colab is not None:
html_str += f'<td style="padding: 0px 0px;">'\
f'<a href="{link_colab}"' \
f'style="vertical-align:text-bottom">'\
f'<img alt="Colab logo" src="_static/colab_logo.svg" '\
f'style="width: 40px; min-width: 40px"></a></td>'\
f'<td style="padding: 4px 0px;">'\
f'<a href="{link_colab}" style="vertical-align:text-bottom">'\
f'Run in Google Colab</a></td>'

html_str += f'</table></div>'\
f'<p>{abstract}</p></embed>'

node = nodes.raw(text=html_str, format='html')

return [node]


def setup(app):
app.add_directive("made-with-sionna", MadeWithSionna)

return {
'version': '0.1',
'parallel_read_safe': True,
'parallel_write_safe': True,
}


Binary file added doc/source/_static/arxiv_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
155 changes: 155 additions & 0 deletions doc/source/api/channel.optical.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
=======
Optical
=======

This module provides layers and functions that implement channel models for (fiber) optical communications.
The currently only available model is the split-step Fourier method (:class:`~sionna.channel.SSFM`) that can be combined with an Erbium-doped amplifier (:class:`~sionna.channel.EDFA`).

The following code snippets show how to setup and simulate the transmission
over a single-mode fiber (SMF) by using the split-step Fourier method.

.. code-block:: Python
# init fiber
span = sionna.channel.optical.SSFM(
alpha=0.046,
beta_2=-21.67,
f_c=193.55e12,
gamma=1.27,
length=80,
n_ssfm=200,
n_sp=1.0,
t_norm=1e-12,
with_amplification=False,
with_attenuation=True,
with_dispersion=True,
with_nonlinearity=True,
dtype=tf.complex64)
# init amplifier
amplifier = sionna.channel.optical.EDFA(
g=4.0,
f=2.0,
f_c=193.55e12,
dt=1.0e-12)
@tf.function
def simulate_transmission(x, n_span):
y = x
# simulate n_span fiber spans
for _ in range(n_span):
# simulate single span
y = span(y)
# simulate amplifier
y = amplifier(y)
return y
Running the channel model is done as follows:

.. code-block:: Python
# x is the optical input signal, n_span the number of spans
y = simulate_transmission(x, n_span)
For further details, the tutorial `"Optical Channel with Lumped Ampflication" <../examples/Optical_Lumped_Amplification_Channel.html>`_ provides more sophisticated examples of how to use this module.

For the purpose of the present document, the following symbols apply:

+---------------------------------+-----------------------------------------------------------------------------+
| :math:`T_\text{norm}` | Time normalization for the SSFM in :math:`(\text{s})` |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`L_\text{norm}` | Distance normalization the for SSFM in :math:`(\text{m})` |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`W` | Bandwidth |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`\alpha` | Attenuation coefficient in :math:`(1/L_\text{norm})` |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`\beta_2` | Group velocity dispersion coeff. in :math:`(T_\text{norm}^2/L_\text{norm})` |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`f_\mathrm{c}` | Carrier frequency in :math:`\text{Hz}` |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`\gamma` | Nonlinearity coefficient in :math:`(1/L_\text{norm}/\text{W})` |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`\ell` | Fiber length in :math:`(L_\text{norm})` |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`h` | Planck constant |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`N_\mathrm{SSFM}` | Number of SSFM simulation steps |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`n_\mathrm{sp}` | Spontaneous emission factor of Raman amplification |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`\Delta_t` | Normalized simulation time step in :math:`(T_\text{norm})` |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`\Delta_z` | Normalized simulation step size in :math:`(L_\text{norm})` |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`G` | Amplifier gain |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`F` | Amplifier's noise figure |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`\rho_\text{ASE}` | Noise spectral density |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`P` | Signal power |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`\hat{D}` | Linear SSFM operator [A2012]_ |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`\hat{N}` | Non-linear SSFM operator [A2012]_ |
+---------------------------------+-----------------------------------------------------------------------------+
| :math:`f_\textrm{sim}` | Simulation bandwidth |
+---------------------------------+-----------------------------------------------------------------------------+


**Remark:** Depending on the exact simulation parameters, the SSFM algorithm may require ``dtype=tf.complex128`` for accurate simulation results. However, this may increase the simulation complexity significantly.

Split-step Fourier method
=========================

.. autoclass:: sionna.channel.SSFM
:members:
:exclude-members: call, build

Erbium-doped fiber amplifier
============================

.. autoclass:: sionna.channel.EDFA
:members:
:exclude-members: call, build

Utility functions
=================

time_frequency_vector
---------------------

.. autofunction:: sionna.channel.utils.time_frequency_vector


References:
.. [SSFM] R. H. Hardin and F. D. Tappert,
"Applications of the Split-Step Fourier Method to the Numerical Solution of Nonlinear and Variable Coefficient Wave Equations.",
SIAM Review Chronicles, Vol. 15, No. 2, Part 1, p 423, 1973.
.. [SymSSFM] J. A. Fleck, J. R. Morris, and M. D. Feit,
"Time-dependent propagation of high energy laser beams through the atmosphere",
Appl. Phys., Vol. 10, pp 129–160, 1976.
.. [RamanASE] N. J. Muga, M. C. Fugihara, M. F. S. Ferreira, and A. N. Pinto,
"ASE Noise Simulation in Raman Amplification Systems",
Conftele, 2009.
.. [A2012] G. P. Agrawal,
"Fiber-optic communication systems",
4th ed. Wiley series in microwave and optical engineering 222. New York: Wiley, 2010.
.. [EKWFG2010] R. J. Essiambre, G. Kramer, P. J. Winzer, G. J. Foschini, and B. Goebel,
"Capacity Limits of Optical Fiber Networks",
Journal of Lightwave Technology 28, No. 4, 2010.
.. [BGT2000] D. M. Baney, P. Gallion, and R. S. Tucker,
"Theory and Measurement Techniques for the Noise Figure of Optical Amplifiers",
Optical Fiber Technology 6, No. 2, 2000.
.. [GD1991] C.R. Giles, and E. Desurvire,
"Modeling Erbium-Doped Fiber Amplifiers",
Journal of Lightwave Technology 9, No. 2, 1991.
Loading

0 comments on commit 2fcad58

Please sign in to comment.