Multiplierless FIR filter design in Python
A lowpass filter is a type of signal processing tool that allows low-frequency signals to pass through while reducing or blocking high-frequency signals. The “multiplierless” aspect means the filter is designed to work without using multiplication operations, which can be beneficial in certain hardware implementations.
The code uses several mathematical operations and transformations, including spectral factorization and its inverse, which are advanced concepts in signal processing. It also uses the CSD number representation, which is a special way of representing numbers that’s useful in digital filter design.
The output of this code is not a final filter design, but rather an intermediate step in an iterative optimization process. It provides updated filter coefficients and frequency response characteristics that can be used in further iterations of the design process.
This code is part of a larger system for designing digital filters, specifically tailored for situations where multiplication operations need to be avoided. It’s a specialized tool that would be used by engineers or researchers working on digital signal processing systems with specific hardware constraints.
ellalgo and numpy modules.import numpy as np
from multiplierless.spectral_fact import spectral_fact
# Define auto-correlation coefficients
r = np.array([1.0, 0.5, 0.2, 0.1])
# Compute minimum-phase impulse response
h = spectral_fact(r)
print("Impulse response:", h)
Run benchmarks with pytest-benchmark:
pip install pytest-benchmark
pytest --benchmark-only
This project has been set up using PyScaffold 4.0.2. For details and usage information on PyScaffold see https://pyscaffold.org/.