IIR Filter
Implement infinite impulse response (IIR) filter
- Library:
Motor Control Blockset / Signal Management
Description
The IIR Filter block 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:
Alternatively, the block also computes the theoretical cutoff frequency for the given sample time using a filter coefficient:
Use the Filter type parameter to configure the block either as a low-pass or high-pass filter.
Low-pass filter:
High-pass filter:
where:
fc is 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 .
Ts is the sample time of the IIR Filter block.
Ports
Input
Output
Parameters
Extended Capabilities
Version History
Introduced in R2020a