Skip to content

Second order sections#18

Merged
jlogan03 merged 19 commits into
jlogan03:mainfrom
mvernacc:mv/sos
Nov 30, 2025
Merged

Second order sections#18
jlogan03 merged 19 commits into
jlogan03:mainfrom
mvernacc:mv/sos

Conversation

@mvernacc

@mvernacc mvernacc commented Nov 29, 2025

Copy link
Copy Markdown
Contributor

Added

  • sos::SisoSosFilter, an implementation of cascaded second order sections
    • includes new_interpolated initializer, which interpolates the SOS coefficients versus cutoff ratio from a lookup table
    • generic over f32 and f64
    • FMA and non-FMA implementations, configured by the existing fma feature
  • functions to generate SOS Butterworth lowpass filters from lookup tables: sos::{butter2, butter4, butter6}
    • provides orders 2, 4 and 6 for f32 and f64
    • cutoff_ratio region of validity is enforced and tested for each combination of filter order and float type
    • cutoff_ratio region of validity is larger than existing Butterworth implementation for orders 4 and up
      • e.g. for order 4, f32: old 0.032, new 0.005
    • SOS does not improve region of validity for order 2 filter
  • python script to autogenerate the SOS Butterworth lookup tables: scripts/generate_butter_sos_tables.py
  • benchmarking with criterion, and a benchmark of sos::butter4::<f64>

Changed

  • !Renamed flaw::SisoIirFilter::initialize to set_steady_state

@mvernacc mvernacc marked this pull request as ready for review November 29, 2025 21:19
@jlogan03 jlogan03 self-requested a review November 30, 2025 03:28
@jlogan03 jlogan03 merged commit 8629571 into jlogan03:main Nov 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants