equalisation#
Adaptive equaliser routines
Adaptive equaliser functions#
Functions for adaptive equalisation and filer application.
The following adaptive equaliser methods are provided:
Non-decision based:
Constant Modulus Algorithm (CMA) after [1]
Radius Directed Error (RDE) [1]
Modfied Constant Modulus Algorithm (MCMA) after [2]
Modified Radius Directed Error (MRDA) after [3]
Signed based CMA [1]
Decision based:
Symbol Based Decision (SBD) after [3]
Modified Decision Directed Modulus Algorithm (MDDMA) after [4]
Decision-directed LMS after [1]
Adaptive Step Size Algorithms:
In addition algorithms can use a adaptive stepsize based on the step size adoption in [5] It is possible to use an adaptive step for all equalisers using the adaptive_stepsize keyword parameter
Real-valued equalisers:
A subset of the equalisers can be run as real-valued equalisers.
Data aided:
In addition there is a data aided SBD algorithm and real_valued DD algorithm
The available methods are specified in the following sets
- qampy.equalisation.DATA_AIDED = ('dd_data_real', 'sbd_data')#
Data-aided equalisation methods
- qampy.equalisation.TRAINING_FCTS = ('sbd', 'mddma', 'dd', 'sbd_data', 'dd_real', 'dd_data_real', 'cma', 'cma2', 'mcma', 'rde', 'mrde', 'cma_real', 'sgncma_real', 'sgncma')#
All available equaliser method#:
- qampy.equalisation.NONDECISION_BASED = ('cma', 'cma2', 'mcma', 'rde', 'mrde', 'cma_real', 'sgncma_real', 'sgncma')#
Non-decision based equalisation methods
- qampy.equalisation.DECISION_BASED = ('sbd', 'mddma', 'dd', 'sbd_data', 'dd_real', 'dd_data_real')#
Decision based equalisation methods
- qampy.equalisation.REAL_VALUED = ('cma_real', 'dd_real', 'dd_data_real', 'sgncma_real')#
Real-valued equalisation methods
References
- qampy.equalisation.DATA_AIDED = ('dd_data_real', 'sbd_data')#
Data-aided equalisation methods
- qampy.equalisation.DECISION_BASED = ('sbd', 'mddma', 'dd', 'sbd_data', 'dd_real', 'dd_data_real')#
Decision based equalisation methods
- qampy.equalisation.NONDECISION_BASED = ('cma', 'cma2', 'mcma', 'rde', 'mrde', 'cma_real', 'sgncma_real', 'sgncma')#
Non-decision based equalisation methods
- qampy.equalisation.REAL_VALUED = ('cma_real', 'dd_real', 'dd_data_real', 'sgncma_real')#
Real-valued equalisation methods
- qampy.equalisation.TRAINING_FCTS = ('sbd', 'mddma', 'dd', 'sbd_data', 'dd_real', 'dd_data_real', 'cma', 'cma2', 'mcma', 'rde', 'mrde', 'cma_real', 'sgncma_real', 'sgncma')#
All available equaliser method#:
- qampy.equalisation.apply_filter(sig, wxy, method='pyt', frames=[0])#
Apply the equaliser filter taps to the input signal.
- Parameters:
sig (SignalObject) – input signal to be equalised
wxy (tuple(array_like, array_like,optional)) – filter taps for the x and y polarisation
method (basestring) – which apply filter method to use (pyx=cython, py=python)
frames (list(int), optional) – if signal object is a pilot signal the frames to be equalised. If False, empty or None, do not perform a frame sync and apply filter to the whole signal.
- Returns:
sig_out – equalised signal
- Return type:
SignalObject
- qampy.equalisation.dual_mode_equalisation(sig, mu, Ntaps, TrSyms=(None, None), Niter=(1, 1), methods=('mcma', 'sbd'), adaptive_stepsize=(False, False), symbols=None, modes=None, apply=True, **kwargs)#
Blind equalisation of PMD and residual dispersion, with a dual mode approach. Typically this is done using a CMA type initial equaliser for pre-convergence and a decision directed equaliser as a second to improve MSE.
- Parameters:
sig (SignalObject) – single or dual polarisation signal field (2D subclass of SignalBase)
mu (tuple(float, float)) – step size parameter for the first and second equaliser method
Ntaps (int) – number of filter taps. Either this or wxy need to be given. If given taps are initialised as [00100]
TrSyms (tuple(int,int) optional) – number of symbols to use for filter estimation for each equaliser mode. Default is (None, None) which means use all symbols in both equaliser.
Niter (tuple(int, int), optional) – number of iterations for each equaliser. Default is one single iteration for both
method (tuple(string,string), optional) – equaliser method for the first and second mode has to be one of cma, rde, mrde, mcma, sbd, mddma, sca, dd_adaptive, sbd_adaptive, mcma_adaptive
adaptive_stepsize (tuple(bool, bool), optional) – whether to adapt the step size upon training for each of the equaliser modes
modes (array_like, optional) – array or list of modes to equalise over (default=None equalise over all modes of the input signal)
apply (Bool, optional) – whether to apply the filter taps and return the equalised signal
- Returns:
if apply –
- sig_outSignalObject
equalised signal X and Y polarisation
(wx, wy) (tuple(array_like, array_like)) – equaliser taps for the x and y polarisation
(err1, err2) (tuple(array_like, array_like)) – estimation error for x and y polarisation for each equaliser mode
if apply is False do not return sig_out
- qampy.equalisation.equalise_signal(sig, mu, wxy=None, Ntaps=None, TrSyms=None, Niter=1, method='mcma', adaptive_stepsize=False, symbols=None, modes=None, apply=False, **kwargs)#
Blind equalisation of PMD and residual dispersion, using a chosen equalisation method. The method can be any of the keys in the TRAINING_FCTS dictionary.
- Parameters:
sig (SignalObject) – single or dual polarisation signal field (2D complex array first dim is the polarisation)
mu (float) – step size parameter
wxy (array_like, optional) – the wx and wy filter taps. Either this or Ntaps has to be given.
Ntaps (int) – number of filter taps. Either this or wxy need to be given. If given taps are initialised as [00100]
TrSyms (int, optional) – number of symbols to use for filter estimation. Default is None which means use all symbols.
Niter (int, optional) – number of iterations. Default is one single iteration
method (string, optional) – equaliser method has to be one of cma, rde, mrde, mcma, sbd, mddma, sca, dd_adaptive, sbd_adaptive, mcma_adaptive
adaptive_stepsize (bool, optional) – whether to use an adaptive stepsize or a fixed
modes (array_like, optional) – array or list of modes to equalise over (default=None equalise over all modes of the input signal)
apply (Bool, optional) – whether to apply the filter taps and return the equalised signal
- Returns:
if apply –
- sig_outSignalObject
equalised signal X and Y polarisation
(wx, wy) (tuple(array_like, array_like)) – equaliser taps for the x and y polarisation
err (array_like) – estimation error for x and y polarisation
- qampy.equalisation.pilot_equaliser(signal, mu, Ntaps, apply=True, foe_comp=True, wxinit=None, frame=0, verbose=False, **eqkwargs)#
Pilot based equalisation on a single frame
- Parameters:
signal (SignalObject) – Pilot-based signal object, has to be synced already
mu (float) – Step size parameter
Ntaps (int) – Number of equaliser taps
apply (bool, optional) – Apply the filter to the signal
foe_comp (bool, optional) – Do frequency offset compensation
wxinit (array_like, optional) – Initialisation taps for the equaliser. If this is given Ntaps will not be used
frame (int, optional) – Which frame to equalise, frame numbers start at 0
verbose (bool, optional) – Return verbose output
**eqkwargs – Dictionary of values to pass to the equaliser functions
- Returns:
taps (array_like) – filter taps
if apply also return –
- out_sigSignalObject
equalised signal
if verbose also return –
- foe_allarray_like
estimated frequency offset
- ntapstuple
Tuple of equaliser and synchronization taps
- qampy.equalisation.pilot_equaliser_nframes(signal, mu, Ntaps, apply=True, foe_comp=True, frames=[0], wxinit=None, verbose=True, **eqkwargs)#
Pilot based equalisation over multiple frames
- Parameters:
signal (SignalObject) – Pilot-based signal object, has to be synced already
mu (float) – Step size parameter
Ntaps (int) – Number of equaliser taps
apply (bool, optional) – Apply the filter to the signal
foe_comp (bool, optional) – Do frequency offset compensation
frames (array_like, optional) – List of frames to process the first frame is frame 0
**eqkwargs – Dictionary of values to pass to the equaliser functions
- Returns:
taps (array_like) – filter taps for each frame
if apply also return –
- out_sigSignalObject
equalised signal per frame
if verbose also return –
- foe_allarray_like
estimated frequency offset per frame
- ntapstuple
Tuple of equaliser and synchronization taps per frame