band Module#

This module provides classes for optical transmission bands and their parameters used in multi-band optical network planning.

Module Overview#

This module is responsible for:

  • Defining optical transmission bands (e.g., C-band, L-band)

  • Storing and computing fiber and system parameters for optical modeling

  • Computing channel frequency grids (spectra)

  • Associating band characteristics with a given network topology

  • Preparing the frequency plan for optical performance evaluation

Key Classes#

OpticalParameters#

class sixgman.core.band.OpticalParameters(h_plank=6.626e-34, target_ber=0.01, phi_MFL=<factory>, epsilon=0, beta_3=1.4e-40, Cr=2.8e-17, alpha_db=0.2, beta_2=-2.17e-26, gama=0.00121, F_C=<factory>, F_L=<factory>, Rs_mat=40000000000.0, MFL=<factory>, rof=0.1)#

Bases: object

A data class to store and compute fiber and system parameters for optical network modeling.

Example:#

>>> from sixgman.core.band import OpticalParameters
>>> # Define C-band parameters
>>> c_band_params = OpticalParameters()
h_plank: float = 6.626e-34#

Planck’s constant (J·s)

target_ber: float = 0.01#

Target bit error rate

phi_MFL: ndarray#

Modulation format penalty factors

epsilon: int = 0#

Auxiliary variable for modeling purposes

beta_3: float = 1.4e-40#

Third-order dispersion coefficient (s^3/m)

Cr: float = 2.8e-17#

Chromatic dispersion coefficient (1/(m·Hz²))

alpha_db: float = 0.2#

Fiber attenuation (dB/km)

beta_2: float = -2.17e-26#

Second-order dispersion coefficient (s²/m)

gama: float = 0.00121#

Nonlinear coefficient (1/(W·m))

F_C: float#

Noise figure in linear scale for C-band.

F_L: float#

Noise figure in linear scale for L-band

Rs_mat: float = 40000000000.0#

Symbol rate (Baud)

MFL: ndarray#

Available modulation format levels (1 to 6)

rof: float = 0.1#

Roll-off factor

alpha_norm: float#

Normalized attenuation (1/m)

L_eff_a: float#

Effective fiber length (m)

B_ch_mat: float#

Channel bandwidth (Hz)

B_ch: float#

Channel bandwidth (Hz) [alias]

target_SNR_dB: ndarray#

Target SNR of modulation formats to reach the target_ber (dB)

Band#

class sixgman.core.band.Band(name, start_freq, end_freq, opt_params, network_instance, channel_spacing=0.05)#

Bases: object

Class representing an optical transmission band with its characteristics.

Used in multi-band optical network planning. Stores frequency grid information for the specified band (e.g., C-band, L-band), and provides utilities to compute the channel frequencies.

name#

Band identifier (e.g., ‘C’, ‘L’)

Type:

str

start_freq#

Start frequency in THz

Type:

float

end_freq#

End frequency in THz

Type:

float

channel_spacing#

Channel spacing in THz (default: 0.05 THz = 50 GHz)

Type:

float

spectrum#

Array of center frequencies for each channel

Type:

np.ndarray

num_channels#

Total number of channels in the band

Type:

int

__init__(name, start_freq, end_freq, opt_params, network_instance, channel_spacing=0.05)#

Initialize Band instance.

Args:#

name (str):

Band name (e.g., ‘C’, ‘L’)

start_freq (float):

Start frequency in THz

end_freq (float):

End frequency in THz

opt_params (OpticalParameters):

Optical transmission parameters

network_instance (Network):

Reference to the associated network

channel_spacing (float, optional):

Frequency spacing between channels in THz

Example:#

>>> from sixgman.core.band import Band
>>> # Create C-band instance
>>> c_band = Band(
... name = 'C', # Band name
... start_freq = 190.65, # start frequency of this band in THz
... end_freq = 196.675, # end frequency of this band in THz
... opt_params = c_band_params, # the optical parameters instance
... network_instance = net, # the network instance
... channel_spacing = 0.05 # 50 GHz Channel spacing
... )
spectrum: ndarray#
num_channels: int#
calc_spectrum()#

Compute the frequency grid (spectrum) for this band based on start_freq, end_freq, and channel_spacing.

Return type:

ndarray

Output:#

np.ndarray:

Array of center frequencies in THz.

Example:#

>>> # define C-band frequency slots
>>> spectrum_C = c_band.calc_spectrum()
>>> # define total number of frequency slots
>>> num_fslots = len(spectrum_C)

Processes the GSNR and throughput of all links at a given hierarchy level.

Args:#

f_c_axis (np.ndarray):

Center frequencies of the channels [THz].

Pch_dBm (np.ndarray):

Launch power per channel [dBm].

num_Ch_mat (np.ndarray):

Channel indices or count for modulation processing.

spectrum_C (np.ndarray):

C-band frequency set (used for band-dependent params).

Nspan_array (np.ndarray):

Number of fiber spans per link.

hierarchy_level (int):

Current hierarchy level of the network topology.

minimum_hierarchy_level (int):

Lowest level to include in analysis.

result_directory (Path):

Output directory for caching intermediate results.

Output:#

Tuple:

GSNR matrix, throughput per power, optimal throughput, and optimal power array.

Example:#

>>> f_c_axis = spectrum_C * 1e12  # Convert to Hz
>>> Pch_dBm = np.arange(-6, -0.9, 0.1)  # Channel power in dBm
>>> num_Ch_mat = np.arange(1, len(spectrum_C) - 1)  # Channel indices
>>> # Calculate GSNR and throughput for the HL2 links
>>> results_dir = Path('results')  # Define your results directory
>>> GSNR_opt_link, _, _, _ = c_band.process_link_gsnr(
...     f_c_axis = f_c_axis,
...     Pch_dBm = Pch_dBm,
...     num_Ch_mat = num_Ch_mat,
...     spectrum_C = spectrum_C, # C-band frequency spectrum
...     Nspan_array = np.ones(network.all_links.shape[0], dtype=int),
...     hierarchy_level = 4, # Current hierarchy level
...     minimum_hierarchy_level = 4, # minimum hierarchy level to include in analysis
...     result_directory = results_dir # Directory to save results
... )

Key Methods#

  • process_link_gsnr(f_c_axis, Pch_dBm, num_Ch_mat, spectrum_C, Nspan_array, hierarchy_level, minimum_hierarchy_level, result_directory)

    Processes the GSNR and throughput of all links at a given hierarchy level.