#include <Filters/FIRFilter.hpp>
Finite Impulse Response filter implementation.
Implements the following difference equation:
\[ y[n] = \sum_{i=0}^{N-1} b_i \cdot x[n-i] \]
Definition at line 18 of file FIRFilter.hpp.
Public Member Functions | |
FIRFilter (const AH::Array< T, N > &coefficients) | |
Construct a new FIR Filter object. More... | |
T | operator() (T input) |
Update the internal state with the new input \( x[n] \) and return the new output \( y[n] \). More... | |
Private Attributes | |
uint8_t | index_b = 0 |
AH::Array< T, N > | x = {} |
AH::Array< T, 2 *N - 1 > | coefficients |
|
inline |
Construct a new FIR Filter object.
The coefficients \( b \) can be derived from the transfer function:
\[ H(z) = b_0 + b_1 z^{-1} + \ldots + b_{N_b} z ^{-N_b} \]
coefficients | The coefficients of the transfer function numerator. |
Definition at line 32 of file FIRFilter.hpp.
|
inline |
Update the internal state with the new input \( x[n] \) and return the new output \( y[n] \).
input | The new input \( x[n] \). |
Definition at line 45 of file FIRFilter.hpp.
|
private |
Definition at line 66 of file FIRFilter.hpp.
|
private |
Definition at line 67 of file FIRFilter.hpp.
|
private |
Definition at line 68 of file FIRFilter.hpp.