Utils#

compute_beta2(lamb, cd_coefficient, speed_of_light)#

Compute the Chromatic Dispersion coefficient β₂ in ps²/km

Parameters#

lambfloat

Wavelength (nm)

cd_coefficient: float

Chromatic Dispersion coefficient (ps/nm/km)

speed_of_light: float

Speed of light (m/s)

The formula is given by :

\[\beta_2 = -\frac{10^3 \cdot D \cdot \lambda^2}{2\pi c}\]

Warning

  • All input values must be in the units specified above.

  • Output β₂ is given in picosecond squared per kilometer (ps²/km).

Returns#

beta2: float

Group velocity dispersion β₂ (in ps²/km)

Example 1#

>>> lamb = 1550         # in nm
>>> cd_coefficient = 17 # in ps/nm/km
>>> c = 299792458       # in m/s
>>> beta2 = compute_beta2(lamb, cd_coefficient, c)
>>> print(beta2)
-21.682619391414896

Notes#

  • The formula is derived from Eq. (4) and (5) of [Savory, 2008].

References#

  • [1] Savory, Seb J. “Digital filters for coherent optical receivers.” Optics express 16.2 (2008): 804-817.

  • [2] Eghbali, Amir, et al. “Optimal least-squares FIR digital filters for compensation of chromatic dispersion in digital coherent optical receivers.” Journal of lightwave technology 32.8 (2014): 1449-1456.

apply_chromatic_dispersion(x, z, beta2, alpha_dB=None, fs=1, direction=1)#

Apply chromatic dispersion effects in optical fiber communications.

Apply chromatic dispersion effects in the frequency domain for fiber-optic communication systems. It applies a dispersion-induced phase shift to the input signal in the frequency domain and considers signal attenuation [1].

Parameters#

x: numpy array

Complex signal

zfloat

Step length in meters (km).

beta2: float

coefficient in ps**2/km

alpha_dB: float, optional

gain in dB / km (defaut: None)

fsfloat, optional

Sampling frequency in hertz (Hz).

directionint, optional

Propagation direction, 1 for forward and -1 for backward. Defaults to 1.

Returns#

y: numpy array

Complex signal after chromatic dispersion

References#

  • [1] Savory, Seb J. “Digital filters for coherent optical receivers.” Optics express 16.2 (2008): 804-817.

  • [2] Eghbali, Amir, et al. “Optimal least-squares FIR digital filters for compensation of chromatic dispersion in digital coherent optical receivers.” Journal of lightwave technology 32.8 (2014): 1449-1456.

apply_kerr_nonlinearity(x, z, gamma, gain=1, direction=1)#

Apply Kerr nonlinearity phase rotation to a signal.

Parameters#

xnp.ndarray

Input complex signal.

zfloat

Fiber length in km.

gammafloat

Kerr coefficient in rad/W/km.

gainfloat, optional

Gain factor. Default is 1.

directionint, optional

Propagation direction (1=forward, -1=backward). Default is 1.

Returns#

np.ndarray

Signal after Kerr nonlinear phase rotation.

compute_erbium_doped_fiber_amplifier_gain(alpha_dB, L_span)#

Compute the amplitude gain of an EDFA that compensates for fiber loss.

Parameters#

alpha_dBfloat

Fiber loss in dB/km.

L_spanfloat

Span length in km.

Returns#

float

Amplitude gain factor.

compute_erbium_doped_fiber_N_ase(alpha_dB, L_span, NF_dB, h=6.62607015e-34, nu=193414489032258.06)#

Compute ASENoise params

Parameters#

alpha_dBfloat

Fiber loss (dB/km)

L_spanfloat

Length of the link (in km)

NF_dB: float

Noise Figure (dB)

The formula is given by :

\[N_{ASE} = (e^{\alpha L}-1) h \nu n_{sp}\]

where

\[\alpha =\alpha_{dB}/10 \log_{10}(e)\]

References#

  • [1] Essiambre, René-Jean, Gerhard Kramer, Peter J. Winzer, Gerard J. Foschini, and Bernhard Goebel. “Capacity limits of optical fiber networks.” Journal of Lightwave technology 28, no. 4 (2010): 662-701.

get_linear_step_size(L_span, StPS)#

Compute uniformly spaced step sizes for the split-step Fourier method.

Parameters#

L_spanfloat

Span length in km.

StPSint

Number of steps per span.

Returns#

np.ndarray

Array of step sizes, each equal to L_span / StPS.

get_logarithmic_step_size(L_span, StPS, alpha_dB=0, step_log_factor=0.4)#

Compute logarithmically spaced step sizes for the split-step Fourier method.

Parameters#

L_spanfloat

Span length in km.

StPSint

Number of steps per span.

alpha_dBfloat, optional

Fiber loss in dB/km. Default is 0.

step_log_factorfloat, optional

Logarithmic step factor. Default is 0.4.

Returns#

np.ndarray

Array of logarithmically spaced step sizes.

References#

  • [1] O. V. Sinkin et al., “Optimization of the split-step Fourier method in modeling optical-fiber communications systems,” J. Lightwave Technol., vol. 21, no. 1, pp. 61-68, Jan. 2003.