scipy butterworth filter has sos output option. Please help understand what it is and what the benefit in layman's term.
output{‘ba’, ‘zpk’, ‘sos’}, optional
Type of output: numerator/denominator (‘ba’), pole-zero (‘zpk’), or second-order sections (‘sos’). Default is ‘ba’ for backwards compatibility, but ‘sos’ should be used for general-purpose filtering.
Googled second order sections. Most articles lists math formulas and electric circuits and unable to find simple explanation.
According to ChatGPT, it looks a way to build N order filter as a cascade of multiple 2nd order filters, but not sure this ChatGPT answer is correct or relevant to scipy output option.
Higher-order filters can be constructed by cascading multiple second-order sections. This cascade structure simplifies the design and implementation process, as well as the optimization of filter performance.
Imagine you're building a really sophisticated filter for sound or data signals. Instead of making it all in one big complicated piece, you split it into smaller parts that are easier to handle. Each of these smaller parts is called a "second-order section."
In summary, "second-order sections" refer to the subdivision of a higher-order filter into smaller, more manageable second-order building blocks. This approach enhances flexibility, stability, efficiency, and ease of implementation in both analog and digital filter designs.
How to implement band-pass Butterworth filter with Scipy.signal.butter indicated stability but not sure it is specific to scipy implementation and not sos in general.
SciPy bandpass filters designed with b, a are unstable and may result in erroneous filters at higher filter orders. Instead, use sos (second-order sections) output of filter design.