Devices#

class Laser(P_dBm: float = -10, linewidth: float = 0, theta0: float = None, seed: int = None, fs: float = 1000000000.0, freq_offset: float = 0, name: str = 'Laser')#

A class representing a laser.

This object modelizes the envelope of a laser signal

Parameters#

P_dBmfloat

The laser power [dBm]

linewidthfloat

The laser linewidth [Hz]

theta0: float

The initial phase [rad]

seedint

The seed for theta0 and the random phase noise

fsfloat

The sample frequency

freq_offsetfloat

The optical-carrier frequency offset [Hz] which corresponds to the relative offset from the laser wavelength simulation (laser TX)

nb_samplesint

The number of desired samples

class Optical90HybridCircuit(is_ideal: bool = True, sensitivity: float = 0.6, laser_in: Laser | None = None, name: str = 'Optical90HybridCircuit')#

Models an optical 90-degree hybrid circuit for coherent detection in optical communication systems.

This class represents an optical 90° hybrid circuit used for coherent detection, simulating the Optic-Electro conversion process with an option for ideal or non-ideal operation. In an ideal scenario, the circuit directly converts optical signals to electrical signals without modification. In a non-ideal scenario, the conversion process accounts for non-linearities and sensitivity factors.

Attributes#

is_idealbool

If True, represents an ideal Electro-Optic conversion. If False, includes non-idealities such as sensitivity variations and laser defaults.

sensitivityfloat

Sensitivity factor of the circuit, affecting the Electro-Optic conversion in non-ideal mode. Represents the half-wave voltage in volts (V).

laser_inObjet of Laser class

The local laser used for coherent detection

Notes#

The optical 90-degree hybrid circuit is a key component in coherent optical communication systems, allowing for the mixing of the signal with a local oscillator in a coherent receiver. The ‘forward’ method of this class models the behavior of the circuit under different operating conditions, simulating the impact of circuit sensitivity and ideal versus non-ideal conversion scenarios on the signal processing.

class PowerControl(P_moy: float = 1, unit: Literal['natural', 'dBm'] = 'natural', name: str = 'power_control')#

Implements a simple power control mechanism for signal processing.

This class is designed to adjust the power level of a signal to a specified average power. It can operate in two modes: ‘natural’ and ‘dBm’. In ‘natural’ mode, the average power is adjusted to a specified linear scale value. In ‘dBm’ mode, the power is adjusted to a specified value in decibel-milliwatts (dBm), commonly used in telecommunications to express power levels.

Attributes#

P_moyfloat

Target average power level. The interpretation of this value depends on the ‘Unit’ parameter.

unitstr, optional

The unit in which ‘P_moy’ is specified. Can be ‘natural’ for linear scale or ‘dBm’ for decibel-milliwatts. Defaults to ‘natural’.

Notes#

The power control is a fundamental aspect in various signal processing applications, especially in communication systems where maintaining a specific power level is crucial for effective signal transmission and reception. The ‘forward’ method is key in this process, allowing for dynamic adjustment of signal power according to the specified target level and unit.

class ErbiumDopedFiberAmplifier(gain: float, N_ase: float, name: str = 'ErbiumDopedFiberAmplifier', seed: int = None)#

Models an Erbium-Doped Fiber Amplifier (ErbiumDopedFiberAmplifier) in optical communication systems.

This class simulates the operation of an ErbiumDopedFiberAmplifier, which is used to amplify optical signals in fiber-optic communication systems. It applies a gain to the input signal to compensate for the loss incurred during transmission through optical fibers. The gain is calculated based on the fiber loss parameter and the span length of the fiber.

Attributes#

namestr, optional

Identifier for the ErbiumDopedFiberAmplifier instance. Defaults to “ErbiumDopedFiberAmplifier”.

N_asefloat

Noise spectral density per state of polarization

seedint

Seed for the noise generator (default to None)

References#

Notes#

ErbiumDopedFiberAmplifiers are crucial in long-haul fiber-optic communication systems to boost the signal strength and maintain signal quality over long distances.

class MachZehnderModulator(is_ideal: bool = False, Vpi: float = 6, k: float = 1, gI: float = 1, Phi: float = 1.5707963267948966, laser_in: callable | None = None, name: str = 'MachZehnderModulator')#

Mach-Zehnder Modulator (MZM) with IQ modulation.

Parameters#

is_idealbool

If True, performs ideal linear modulation without imbalance.

Vpifloat

Half-wave voltage (Vπ).

kfloat

Peak-to-peak voltage ratio relative to Vpi.

gIfloat

Gain coefficient on the I branch.

Phifloat

Phase offset between I and Q branches (radians).

laser_inOptional[callable]

Input laser field generator function or None.

namestr

Instance name.

References#

  • [1] C. Peucheret, “Generation and Detection of Optical Modulation Format,” 2012.

Notes#

The modulator functions by varying the intensity of the optical field based on the input electrical signals. The ‘forward’ method normalizes the input signal and applies the modulation process, considering the modulator’s configuration parameters. In the non-ideal mode, the modulation also accounts for the gain imbalance and voltage variations in the in-phase and quadrature branches.