-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: The Sionna Team <[email protected]>
- Loading branch information
Showing
94 changed files
with
11,456 additions
and
2,786 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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, | ||
} | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,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. |
Oops, something went wrong.