Examples

class Examples.BaseExample[source]

Base class for examples. All example classes should be derived from this class.

An example class should set all parameters that users are encouraged to change as public attributes during construction. The constructor should not ask additional parameters from the user. After setting the attributes, the constructor of the example class should configure itself by calling reconfigure(). This method needs to be implemented by the example class itself.

The reconfigure method should set the following private attributes based on the public attributes of the example class set during construction:

  • _constellation
  • _modulator
  • _link
  • _normalization
  • _tx_filter
  • _rx_filter

Users are provided read-only access to these private attributes through the properties constellation, modulator, link, normalization, tx_filter and rx_filter, respectively, which are already implemented in this base class.

The private attributes above should be objects of a class derived from the corresponding base classes, i.e., BaseConstellation, BaseModulator, BaseLink, Normalization and BaseFilter, respectively.

Users should be able to change any of the public attributes set in the constructor, after which they are expected to manually call reconfigure().

constellation

Provides read-only access to self._constellation.

evaluate_results(tx_data, rx_data)[source]

Evaluates the results of a simulation by showing several plots and printing some key measures to the console.

Parameters:
  • tx_data (dictionary) – Fiber input data generated by run() or prepare_fiber_inputs()
  • rx_data (dictionary) – Fiber output data generated by run() or transceive_fiber_inputs()

Provides read-only access to self._link.

modulator

Provides read-only access to self._modulator.

normalization

Provides read-only access to self._normalization.

prepare_fiber_input(n_blocks, seed=None)[source]

Generates random fiber inputs that can be passed to transceiver_fiber_input().

The function generates n_blocks pulses. For each pulse, it draws self.modulator.n_symbols_per_block random symbols from the constellation. It then uses the modulator to generate the corresponding fiber inputs both in the time and nonlinear Fourier domain. The time domain input is denormalized to real-world units using the normalization.

Parameters:
  • n_blocks (int) – Number of blocks (pulses) to be generated.
  • seed (None or int) – If not None, this seed is to initialize the random number generator.
Returns:

tx_data – Dictionary with the fields

”t” : numpy.array(float)

Vector of time points.

”q” : array

Array of length n_blocks containing the generated pulses q_tx(t). Each element of the array is a numpy.array(complex) vector which contains the values of q_tx(t) at the corresponding time specified in the “t” field.

”nfspecs” : array

Array containing the nonlinear Fourier spectra of the generated pulses. Each element of the array is a NFSpectrum object.

”symbols” : array

Array containing the tx symbols. Each entry of the array is a numpy.array(complex) vector that the contains the symbols modulated into the corresponding pulse q(t).

”n_blocks” : int

Number of blocks that was provided to this function.

Return type:

dictionary

reconfigure()[source]

Updates self._constellation, self._modulator, self._link, self._normalization, self._tx_filter and self._rx_filter based on the public attributes set in the constructor.

Any example needs to implement this.

run(n_blocks, seed=None)[source]

This function performs a complete simulation. It first calls prepare_fiber_inputs() to generate the tx_data, passes it transceive_fiber_input() in order to obtain rx_data, and returns both.

Parameters:
  • n_blocks (int) – See the documentation of prepare_fiber_input()
  • seed (int) – See the documentation of prepare_fiber_input()
Returns:

  • tx_data (dictionary) – See the description of prepare_fiber_input(…).
  • rx_data (dictionary) – See the description of transceive_fiber_input(…).

rx_filter

Provides read-only access to self._rx_filter.

transceive_fiber_input(tx_data)[source]

Transmits and demodulates fiber inputs generated by prepare_fiber_input().

The function concatenates the individual time domain pulses in tx_data and transmits the results using the link. It then splits the received signal again into blocks, denormalizes each block and estimates the received symbols using the modulator.

Parameters:tx_data (dictionary) – Data generated by prepare_fiber_input()
Returns:Dictionary with the fields
”t” : numpy.array(float)
Vector of time points (in secs)
”q” : array
Array of length n_blocks containing the fiber outputs q_rx(t). Each element of the array is a numpy.array(complex) vector which contains the values of q_rx(t) at the corresponding time specified in the “t” field.
”nfspecs” : array
Array containing the nonlinear Fourier spectra of the received pulses. Each element of the array is a NFSpectrum object.
”symbols” : array
Array containing the rx symbols. Each entry of the array is a numpy.array(complex) vector that the contains the symbols modulated into the corresponding pulse q_rx(t).
Return type:dictionary
tx_filter

Provides read-only access to self._tx_filter.

class Examples.BuelowArefIdler2016[source]

This example loosely recreates the experiment presented in the paper

“Transmission of Waveforms Determined by 7 Eigenvalues with PSK-Modulated Spectral Amplitudes” by H. Buelow, V. Aref and W. Idler

presented at the 42nd European Conference on Optical Communication (ECOC 2016).

Tscale

Time scale used during normalization in s.

alpha

Loss coefficient in 1/m.

beta2

Dispersion coefficient in s**2/m.

constellation_level

Level of the QAM constellation (4, 16, 256, …).

eigenvalues

Eigenvalue pattern.

fiber_span_length

Length of a fiber span in m.

gamma

Nonlinearity coefficient in (W m)**(-1).

n_spans

Number of fiber spans.

n_steps_per_span

Number of spatial steps per fiber span during simulations.

noise

Add ASE noise (lumped amplification only). True or False.

noise_figure

Noise figure in dB.

path_average

Use path-average fiber parameters during normalization. True or False.

post_boost

Boost at end of each span (lumped amplification). True or False.

reconfigure()[source]

Updates self._constellation, self._modulator, self._link, self._normalization, self._tx_filter and self._rx_filter based on the public attributes set in the constructor.

Any example needs to implement this.

residues_amplitude

Spectral amplitudes for each of the eigenvalues. These values get multiplied with symbols drawn from the constellation before pulse generation).

rx_bandwidth

Bandwidth of the ideal low-pass at the receiver in Hz.

tx_bandwidth

Bandwidth of the ideal low-pass at the transmitter in Hz.

class Examples.LeArefBuelow2017[source]

This example loosely recreates the first of the experiments presented in the papers

“125 Gbps Pre-Compensated Nonlinear Frequency-Division Multiplexed Transmission”

and

“High Speed Precompensated Nonlinear Frequency-Division Multiplexed Transmissions”

by Le, Aref and Buelow presented at the 43rd European Conference on Optical Communication (ECOC‘17) and published in the Journal of Lightwave Technology 36(6), 2018, respectively.

It is NFDM system with 64 sinc carriers, a symbol duration of 6ns and a bandwidth of 32GHz that uses 50% precompensation.

T0

The parameter T0 in the paper in s.

Tscale

Time scale used during normalization in s.

alpha

Loss coefficient in 1/m.

beta2

Dispersion coefficient in s**2/m.

block_duration

Duration of one block in s.

center_frequency

Center frequency of the optical signal in Hz.

constellation_level

8, 16, 32, ….

Type:For QAM
Type:4, 16, 64, 256, … For PSK
constellation_type

We support ‘QAM’ and ‘PSK’.

fiber_span_length

Span length in m.

gamma

Nonlinearity coefficient in (W m)**(-1).

n_samples

Number of time domain samples used to represent one block.

n_spans

Number of fiber spans.

n_steps_per_span

Number of spatial steps per span during the numerical simulation of the fiber transmission.

n_symbols_per_block

Number of carriers per block.

noise

Add ASE noise during amplification (only if post_boost == True). True or False.

noise_figure

Noise figure in dB.

path_average

Use path-averaged fiber parameters during normalization. True or False.

percent_precompensation

The effect of fiber propagation leads to a phase-shift in the nonlinear Fourier domain, which can be compensated at the Tx (choose 100), Rx (choose 0) or partially at both (choose 50).

post_boost

Boost at the end of each span (lumped amplification). True or False.

power_control_factor

The power_control_factor below is called “A” in the paper. No value was given in the paper.

reconfigure()[source]

Updates self._constellation, self._modulator, self._link, self._normalization, self._tx_filter and self._rx_filter based on the public attributes set in the constructor.

Any example needs to implement this.

roll_off_factor

We use raised cosine carriers in this example. A roll-off factor of 0.0 corresponds to a sinc, which was used in the paper. Possible values are between 0.0 and 1.0.

rx_bandwidth

Bandwidth of the (ideal) low-pass filter at the receiver in Hz.

time_shift

This parameter let’s us align the generated signals by shifting them before they are truncated to block_duration. Hand-tuned. The value is specified in s.

tx_bandwidth

Bandwidth of the (ideal) low-pass filter at the transmitter in Hz.

use_power_normalization_map

Activates a power normalization map as descriped in Yangzhang et. al (Proc. OFC‘17). Not used in the paper. Does not work well here as it seems to broaden the pulses. Since the block_duration is already very short, the truncation error becomes even more severe. Should be only with a longer block_duration and an adapted power_control_factor. Set to True or False.

class Examples.GuiEtAl2018[source]

This example loosely recreates the experiment presented in the paper

“Nonlinear frequency division multiplexing with b-modulation: shifting the energy barrier ” by T. Gui, G. Zhou, C. Lu, A.P.T. Lau, and S. Wahls

published in Optics Express 26(21), 2018.

Ed

Desired average pulse energy in normalized units. Used during the reshaping of the constellation. (See the paper for details.)

Tscale

Time scale used during normalization in s.

alpha

Loss coefficient in 1/m.

beta2

Dispersion parameter in s**2/m.

constellation_level

Level of the QAM constellation used as input for the reshaping process (4, 16, 256, …).

fiber_span_length

Length of a fiber span in m.

gamma

Nonlinearity parameter in (W m)**(-1).

n_spans

Number of fiber spans.

n_steps_per_span

Number of spatial steps per span during the numerical simulation of the fiber transmission.

n_symbols_per_block

Number of carriers.

noise

Add ASE noise during amplification (only if post_boost == True). True or False.

noise_figure

Noise figure in dB.

path_average

Use path-averaged fiber parameters during normalization. True or False.

post_boost

Boost at the end of each span (lumped amplification). True or False.

reconfigure()[source]

Updates self._constellation, self._modulator, self._link, self._normalization, self._tx_filter and self._rx_filter based on the public attributes set in the constructor.

Any example needs to implement this.

rx_bandwidth

Bandwidth of the (ideal) low-pass filter at the receiver in Hz.

tx_bandwidth

Bandwidth of the (ideal) low-pass filter at the transmitter in Hz.