Est. read time: 1 minute | Last updated: December 17, 2024 by John Gentile


Contents

Open In Colab

from rfproto import filter

FIR Filters

The discrete-time convolution of MM filter coefficients with input samples x[n]x[n] can be seen as:

y[n]=x[n]h[n]=k=0M1h[k]x[nk]y[n] = x[n] * h[n] = \sum_{k=0}^{M-1}h[k]x[n-k]

image.png

Picture link

test_filt = filter.fir_filter([0, 0, 1, 0, 0])
for i in range(10):
    print(test_filt.step(i+1))

0.0 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0

Filter Design

Complex-Valued Filters

Rarely you’ll need to use a complex-valued filter- often you’re looking to apply a filter on complex-valued input signals. In this case, the same real filter tap values and convolution process can happen in parallel on both real and imaginary parts of the signal.

References

Parallel/Vectorized Filter/Convolution

image.png

References