aspcore.adaptivefilter

Implements several basic adaptive filters. Including least mean squares (LMS), recursive least squares (RLS), and fast block LMS.

These are all constructed for an abritrary number of input and output channels. In addition, the filters work for streaming input, where not the full signals are availabe at once. The adaptive filters have not be heavily optimized, and can likely be improved a lot with regards to computational cost.

References

[dinizAdaptive2020] P. S. R. Diniz, Adaptive filtering: algorithms and practical implementation. Cham: Springer International Publishing, 2020. doi: 10.1007/978-3-030-29057-3. [link]

Functions

abstractmethod(funcobj)

A decorator indicating abstract methods.

Classes

AdaptiveFilterBase(ir_len, num_in, num_out)

AdaptiveFilterFreq(num_freq, num_in, num_out)

BlockLMS(ir_len, num_in, num_out, stepSize)

Block based processing and normalization Dimension of filter is (input channels, output channels, IR length) Normalizes with a scalar, common for all channels identical to FastBlockLMS with scalar normalization

FastBlockLMS(block_size, num_in, num_out, ...)

Identical to BlockLMS when scalar normalization is used

FastBlockWeightedLMS(blockSize, num_in, ...)

LMS(ir_len, num_in, num_out, step_size, ...)

Sample by sample processing, although it accepts block inputs - Dimension of filter is (input channels, output channels, IR length)

RLS(ir_len, num_in, num_out, forget_factor, ...)

Dimension of filter is (input channels, output channels, IR length)