Struct Chebyshev Design
pub struct ChebyshevDesign { /* private fields */ }Expand description
Fixed16-section f64 design, LP/HP order1..32 or band total even order2..32. CONTROL allocation-free design checks finite arithmetic/gains and strict Jury stability; there are no coefficient, frequency or ripple repairs. Extreme unrepresentable margins reject. Actual response inspection is CONTROL work.
Implementations§
§impl ChebyshevDesign
impl ChebyshevDesign
pub fn new(
kind: ChebyshevKind,
response: ChebyshevResponse,
rate: f64,
order: usize,
) -> Result<Self, FilterError>
pub fn new( kind: ChebyshevKind, response: ChebyshevResponse, rate: f64, order: usize, ) -> Result<Self, FilterError>
Prewarp the edge(s), transform prototype poles and finite/infinite zeros, and bilinear-map into stable real sections. Type I even prototype degree retains DC gain10^(-ripple/20), with pass peaks1; odd degree has DC1. Type II prototype DC1 and finite stop notches; even far-stop limit is 10^(-attenuation/20), odd limit0. These parity rules apply after frequency transforms, so Type II endpoints must not be assumed Butterworth zeros.
pub fn lowpass_spec(
family: ChebyshevType,
rate: f64,
pass_hz: f64,
stop_hz: f64,
rp: f64,
atten: f64,
) -> Result<Self, FilterError>
pub fn lowpass_spec( family: ChebyshevType, rate: f64, pass_hz: f64, stop_hz: f64, rp: f64, atten: f64, ) -> Result<Self, FilterError>
LP automatic edge/order selection: finite0<Rp<As<=300dB,Rp<=120dB, 0<pass<stop<rate/2. Type I derives rippleRp; Type II attenuationAs. Start at analytic minimum, choose its admissible warped-edge geometric midpoint and verify actual rounded supplied-edge amplitudes against both strict requested bounds. Failed/unrepresentable candidates retry through order32, otherwise reject. Report actual kind/edge/order. Nominal ripple shape and supplied-edge verification are distinct from continuous interval certification or a search of every representable f64 edge.
pub fn highpass_spec(
family: ChebyshevType,
rate: f64,
pass_hz: f64,
stop_hz: f64,
rp: f64,
atten: f64,
) -> Result<Self, FilterError>
pub fn highpass_spec( family: ChebyshevType, rate: f64, pass_hz: f64, stop_hz: f64, rp: f64, atten: f64, ) -> Result<Self, FilterError>
High-pass equivalent of Self::lowpass_spec, stop_hz<pass_hz.
pub fn kind(&self) -> ChebyshevKind
pub fn kind(&self) -> ChebyshevKind
Actual prototype family and ripple/attenuation parameter.
pub fn response(&self) -> ChebyshevResponse
pub fn response(&self) -> ChebyshevResponse
Actual edge(s), including those selected from specifications.
pub fn stages(&self) -> &[BiquadCoefficients]
pub fn stages(&self) -> &[BiquadCoefficients]
Active normalized sections in deterministic processing order.
pub fn magnitude_at(&self, f: f64) -> Result<f64, FilterError>
pub fn magnitude_at(&self, f: f64) -> Result<f64, FilterError>
Actual rounded-section linear amplitude at finite normalized0..=0.5.
Trait Implementations§
§impl Clone for ChebyshevDesign
impl Clone for ChebyshevDesign
§fn clone(&self) -> ChebyshevDesign
fn clone(&self) -> ChebyshevDesign
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more