Butterworth IIR filter design and application using second-order sections. More...
#include <iirfilter.h>
Public Types | |
| enum | FilterType { LowPass = 0 , HighPass = 1 , BandPass = 2 , BandStop = 3 } |
| Filter type selector. More... | |
Static Public Member Functions | |
| static QVector< IirBiquad > | designButterworth (int iOrder, FilterType type, double dCutoffLow, double dCutoffHigh, double dSFreq) |
| static Eigen::RowVectorXd | applySos (const Eigen::RowVectorXd &vecData, const QVector< IirBiquad > &sos) |
| static Eigen::RowVectorXd | applyZeroPhase (const Eigen::RowVectorXd &vecData, const QVector< IirBiquad > &sos) |
| static Eigen::MatrixXd | applyZeroPhaseMatrix (const Eigen::MatrixXd &matData, const QVector< IirBiquad > &sos) |
Butterworth IIR filter design and application using second-order sections.
All filter types (LP, HP, BP, BS) are supported via the classical analogue-prototype → bilinear-transform design route with pre-warped cutoff frequencies. The resulting biquad cascade is numerically stable for high filter orders.
Typical usage:
Definition at line 106 of file iirfilter.h.
Filter type selector.
Definition at line 113 of file iirfilter.h.
|
static |
Apply a biquad cascade to one data row (causal, single-pass).
| [in] | vecData | Input row vector. |
| [in] | sos | Second-order sections from designButterworth(). |
Definition at line 384 of file iirfilter.cpp.
|
static |
Apply a biquad cascade with zero-phase (forward + backward pass) to one row. The effective order is doubled and there is no phase distortion.
| [in] | vecData | Input row vector. |
| [in] | sos | Second-order sections from designButterworth(). |
Definition at line 415 of file iirfilter.cpp.
|
static |
Apply zero-phase filtering to every row of a matrix (each row = one channel).
| [in] | matData | Input matrix (n_channels x n_samples). |
| [in] | sos | Second-order sections from designButterworth(). |
Definition at line 436 of file iirfilter.cpp.
|
static |
Design a Butterworth filter as a cascade of second-order sections.
| [in] | iOrder | Filter order (≥ 1). For BP/BS the effective order is 2*iOrder. |
| [in] | type | Filter type: LowPass, HighPass, BandPass, or BandStop. |
| [in] | dCutoffLow | Lower cutoff frequency in Hz. Used for LP, HP, BP, BS. |
| [in] | dCutoffHigh | Upper cutoff frequency in Hz. Used for BP and BS only. |
| [in] | dSFreq | Sampling frequency in Hz. |
Definition at line 175 of file iirfilter.cpp.