Variable Bandwidth IIR Filter
Design tunable bandwidth IIR filter
Library
Filtering / Filter Designs
dspfdesign
Description
The Variable Bandwidth IIR Filter block filters each channel of the input signal over time using specified IIR filter specifications. This block offers tunable filter design parameters, which enable you to tune the filter characteristics while the simulation is running.
The block designs the IIR filter according to the filter parameters set in the block dialog box. The output port properties, such as datatype, complexity, and dimension, are identical to the input port properties.
Each column of the input signal is treated as a separate channel. If the input is a two-dimensional signal, the first dimension represents the channel length (or frame size) and the second dimension represents the number of channels. If the input is a one-dimensional signal, then it is interpreted as a single channel.
This block supports variable-size input, enabling you to change the channel length during simulation. To enable variable-size input, clear the Inherit sample rate from input check box. The number of channels must remain constant.
Algorithms
This block brings the capabilities of dsp.VariableBandwidthIIRFilter
System object™ to the Simulink® environment.
The IIR filter is designed using the elliptical method. The IIR filter is tuned using
IIR spectral transformations based on allpass filters. For more information on the
algorithms used by the Variable Bandwidth IIR Filter block, see the 'Algorithms' section
of dsp.VariableBandwidthIIRFilter
.
Parameters
- Filter type
Type of IIR filter. You can set this parameter to:
Lowpass
(default)Highpass
Bandpass
Bandstop
This parameter is nontunable.
- IIR filter order
Order of the IIR filter, specified as a positive integer scalar. The default is
8
. This parameter is nontunable.- Specify passband frequency from input port
When you select this check box, the filter passband frequency is input through the Fp port. When you clear this check box, the passband frequency is specified on the block dialog through the Filter passband frequency (Hz) parameter.
This parameter applies when you set Filter type to
Lowpass
orHighpass
.- Filter passband frequency (Hz)
Passband frequency of the IIR filter, specified as a real positive scalar that is less than half the sample rate of the input signal. This parameter applies when you set Filter type to
Lowpass
orHighpass
, and clear the Specify passband frequency from input port parameter. The default is1000
. This parameter is tunable.- Specify center frequency from input port
When you select this check box, the center frequency of the IIR filter is input through the Fc port. When you clear this check box, the center frequency is specified on the block dialog through the Filter center frequency (Hz) parameter.
This parameter applies when you set Filter type to
Bandpass
orBandstop
.- Filter center frequency (Hz)
Center frequency of the IIR filter, specified as a real positive scalar that is less than half the sample rate of the input signal. This parameter applies when you set Filter type to
Bandpass
orBandstop
, and clear the Specify center frequency from input port parameter. The default is10000
. This parameter is tunable.- Specify bandwidth from input port
When you select this check box, the bandwidth of the IIR filter is input through the BW port. When you clear this check box, the filter bandwidth is specified on the block dialog through the Filter bandwidth (Hz) parameter.
This parameter applies when you set Filter type to
Bandpass
orBandstop
.- Filter bandwidth (Hz)
Bandwidth of the IIR filter, specified as a real positive scalar that is less than half the sample rate of the input signal. This parameter applies when you set Filter type to
Bandpass
orBandstop
, and clear the Specify bandwidth from input port parameter. The default is2000
. This parameter is tunable.- Filter passband ripple (dB)
Passband ripple of the IIR filter, specified as a real positive scalar. The default is
1
. This parameter is nontunable.- Filter Stopband attenuation (dB)
Stopband attenuation of the IIR filter, specified as a real positive scalar. The default is
60
. This parameter is nontunable.- Inherit sample rate from input
When you select this check box, the block’s sample rate is computed as N / Ts, where N is the frame size of the input signal and Ts is the sample time of the input signal. When you clear this check box, the block’s sample rate is the value specified in Input sample rate (Hz). By default, this check box is selected.
- Input sample rate (Hz)
Sample rate of the input signal, specified as a positive scalar. The default is
44100
. This parameter applies when you clear the Inherit sample rate from input check box. This parameter is nontunable.- View Filter Response
Opens the Dynamic Filter Visualizer window and displays the magnitude and phase response of the variable bandwidth IIR filter. The response is based on the parameters you select in the Block Parameters dialog box. To update the response while the visualizer is running, modify the parameters in the dialog box and click Apply.
You can configure the plot settings and the frequency response measurements from the interface of the visualizer.
On the Plot tab, you can enable the legend, specify to plot both magnitude and phase responses of the filter, modify the plot settings, generate a script to re-create the plot, and even save or share the settings.
On the Measurements tab, you can enable data cursors, and display the peak values of the filter response.
For more details on the Dynamic Filter Visualizer interface and its tools, see Configure Dynamic Filter Visualizer.
- Simulate using
Type of simulation to run. You can set this parameter to:
Code generation
(default)Simulate model using generated C code. The first time you run a simulation, Simulink generates C code for the block. The C code is reused for subsequent simulations, as long as the model does not change. This option requires additional startup time but provides faster simulation speed than
Interpreted execution
.Interpreted execution
Simulate model using the MATLAB® interpreter. This option shortens startup time but has slower simulation speed than
Code generation
.
Supported Data Types
Port | Supported Data Types |
---|---|
Input |
|
Output |
|
References
[1] A. G. Constantinides. "Spectral Transformations for Digital Filters." Proceedings of the Institution of Electrical Engineers 117, no. 8 (1970):1585-1590.
See Also
Biquad Filter | DSP System Toolbox |
Variable Bandwidth FIR Filter | DSP System Toolbox |
dsp.VariableBandwidthFIRFilter | DSP System Toolbox |
dsp.VariableBandwidthIIRFilter | DSP System Toolbox |
Extended Capabilities
Version History
Introduced in R2015a