mokka.synchronizers.phase.torch

Module implementing phase synchronizers in PyTorch.

Submodule implementing methods for the blind phase search.

class mokka.synchronizers.phase.torch.bps.BPS(Mtestangles, symbols, N, diff, temperature_per_epoch, no_sectors, avg_filter_type='tri', trainable=False)

Bases: Module

The blind phase search algorithm (BPS).

This class implements the differentiable and non-differentiable versions of the BPS.

bps_torch(x)

Perform a blind phase search according to [1].

Parameters

xarray_like

input signal (single polarisation)

Returns

Eoutarray_like

signal with compensated phase

pharray_like

unwrapped angle from phase recovery

References

[1] Timo Pfau et al, Hardware-Efficient Coherent Digital Receiver Concept With Feedforward Carrier Recovery for M-QAM Constellations, Journal of Lightwave Technology 27, pp 989-999 (2009)

forward(x, *args)

Perform blind phase search.

Parameters:

x – received complex symbols

Returns:

property normalized_filter

Return normalized filter.

Returns:

normalized filter taps

select_angles_torch(angles, idx)

Perform selection on angles.

Parameters:
  • angles – vector of angles

  • idx – vector of indices

Returns:

selected angles

set_constellation(constellation)

Set constellation points in blind phase equalizer.

Parameters:

constellation – array of (complex) constellation points

property temperature_per_epoch

Get temperature setting for differentiable BPS.

Returns:

temperature value.

train(mode)

Enable training.

Parameters:

mode – if true enable training and differentiable mode.

Returns:

the BPS in trainable mode