Expand description
Digital control: IIR filters (Butterworth, Chebyshev Type I), PID controller.
Provides biquad (second-order section) cascade filters designed via the
bilinear transform, and a discrete-time PID controller with anti-windup
and derivative filtering. All code is no-std compatible with no complex
feature dependency — pole computation uses real arithmetic only.
§Examples
use numeris::control::{butterworth_lowpass, BiquadCascade};
// 4th-order Butterworth lowpass at 1 kHz, 8 kHz sample rate
let mut lpf: BiquadCascade<f64, 2> = butterworth_lowpass(4, 1000.0, 8000.0).unwrap();
let y = lpf.tick(1.0); // filter one sampleuse numeris::control::Pid;
// PID controller at 100 Hz with output clamping
let mut pid = Pid::new(2.0_f64, 0.5, 0.1, 0.01)
.with_output_limits(-10.0, 10.0);
let u = pid.tick(1.0, 0.0); // setpoint=1, measurement=0Structs§
- Biquad
- A single second-order section (biquad) filter using Direct Form II Transposed.
- Biquad
Cascade - A cascade of
Nbiquad (second-order) sections. - Pid
- Discrete-time PID controller with anti-windup and derivative filtering.
Enums§
- Control
Error - Errors from filter design functions.
Functions§
- butterworth_
highpass - Design a Butterworth highpass filter as a cascade of
Nbiquad sections. - butterworth_
lowpass - Design a Butterworth lowpass filter as a cascade of
Nbiquad sections. - chebyshev1_
highpass - Design a Chebyshev Type I highpass filter as a cascade of
Nbiquad sections. - chebyshev1_
lowpass - Design a Chebyshev Type I lowpass filter as a cascade of
Nbiquad sections.