Designer¶
- class fird.designer.FIRDesigner(filter_order: int, objective: Objective, constraints: Constraint | Sequence[Constraint] | None = None, *, fractional_bits: int | None = None, even_symmetry: bool = True, cascade_filter: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None = None, period: int = 1, bigM: float = 100)¶
Bases:
objectBase class for designing FIR filters.
- Parameters:
- filter_orderint
Order of the filter to be designed.
- objective
Objective The objective function to optimize for.
- constraints
Constraintor sequence ofObjective, optional The constraints to consider during optimization.
- fractional_bitsint, optional
Number of fractional bits for fixed-point coefficients. If not provided, continuous (floating-point) coefficients are used.
- even_symmetrybool, default: True
If the filter to be designed is of odd or even symmetry.
- cascade_filter1D array, optional
The optional filter in cascade with the designed.
- periodint, default: 1
The period of the designed filter in relation to the specification.
- bigMfloat, default: 100
The big-M value to use for Linf constraints. An estimate of the maximum absolute coefficient value expected. Smaller values gives tighter constraints and faster solving times, but may lead to worse approximations if set too small.