Butterworth Filter
The ButterworthFilter class provides an implementation of a Digital Butterworth Filter, implemented as biquad sections (second order sections).
API Reference
Header File
Classes
-
template<size_t ORDER, class Impl = BiquadFilterDf1>
class ButterworthFilter : public espp::SosFilter<(ORDER + 1) / 2, BiquadFilterDf1> Digital butterworth filter, implemented as biquad sections (Second Order Sections).
Note
See https://en.wikipedia.org/wiki/Butterworth_filter for more information.
- Template Parameters
ORDER – The order of the filter.
Impl – Which Biquad implementation form to use.
Public Functions
-
inline explicit ButterworthFilter(const Config &config)
Construct the butterworth filter for the given config.
- Parameters
config – The configuration struct for the Butterworth Filter
-
inline float update(float input)
Filter the signal sampled by input, updating internal state, and returning the filtered output.
- Parameters
input – New sample of the input data.
- Returns
Filtered output based on input and history.
-
inline float operator()(float input)
Filter the signal sampled by input, updating internal state, and returning the filtered output.
- Parameters
input – New sample of the input data.
- Returns
Filtered output based on input and history.
-
struct Config
Butterworth configuration.