IIR Filter
Implement infinite impulse response (IIR) filter
- 库:
Motor Control Blockset / Signal Management
Description
TheIIR Filterblock implements a discrete first-order infinite impulse response (IIR) filter on the specified input signal. The block supports fixed-point and floating-point data types. The block is also optimized for code generation when used with the model settings and configuration adopted by the examples shipped in Motor Control Blockset™.
We recommend that you use fixed-step discrete solver for this block to enable code generation and ensure accurate simulation.
Equations
You can configure the IIR filter by using the filter coefficient ( ) block parameter for a given cutoff frequency (fc).
This equation describes computation of the filter coefficient from the cutoff frequency:
也或者,块计算系统结构ical cutoff frequency for the given sample time using a filter coefficient:
Use theFilter typeparameter to configure the block either as a low-pass or high-pass filter.
Low-pass filter:
High-pass filter:
where:
fcis the cutoff frequency of the IIR filter.
is the filter coefficient in the range (0, 1].
is the filtered output value at time .
is the filtered output value at time .
is the sampled input value at time .
is the filtered output value at time .
Tsis the sample time of the IIR Filter block.