Variable bandwidth IIR filter
VariableBandwidthIIRFilter object filters
each channel of the input using IIR filter implementations. It does
so while having the capability of tuning the bandwidth. This filter
supports double and single precision inputs.
To filter each channel of the input:
Define and set up your variable bandwidth IIR filter. See Construction.
step to filter
each channel of the input according to the properties of
The behavior of
step is specific to each object in
Starting in R2016b, instead of using the
HIIR = dsp.VariableBandwidthIIRFilter returns
a System object,
HIIR, which independently filters
each channel of the input over successive calls to the
This System object uses a specified IIR filter implementation.
The filter's passband frequency may be tuned during the filtering
operation. The variable bandwidth IIR filter is designed using the
elliptical method. The filter is tuned using IIR spectral transformations
based on allpass filters.
HIIR = dsp.VariableBandwidthIIRFilter(' returns a variable bandwidth IIR filter System object,
with each property set to the specified value. You can specify additional
name-value pair arguments in any order as (
Input sample rate
Specify the sampling rate of the input in Hertz as a finite numeric scalar. The default is 44.1 kHz. This property is non-tunable.
Specify the type of the filter as one of
IIR filter order
Specify the order of the IIR filter as a positive integer scalar. The default is 8. This property is non-tunable.
Filter passband frequency
Specify the filter passband frequency in Hz as a real, positive
scalar, smaller than the
Filter center frequency
Specify the filter center frequency in Hz as a real, positive
scalar, smaller than
Specify the filter bandwidth in Hertz as a real, positive scalar,
Filter passband ripple
Specify the filter passband ripple as a real, positive scalar in decibels (dB). The default is 1 dB. This property is non-tunable.
Filter Stopband attenuation
Specify the filter stopband attenuation as a real, positive scalar in decibels (dB). The default is 60 dB. This property is non-tunable.
|clone||Create variable bandwidth IIR filter with same property values|
|isLocked||Locked status for input attributes and nontunable properties|
|release||Allow property value and input characteristics changes|
|reset||Reset internal states of variable bandwidth IIR filter|
|step||Filter signal using variable bandwidth algorithm|
Note: This example runs only in R2016b or later. If you are using an earlier release, replace each call to the function with the equivalent
step syntax. For example, myObject(x) becomes step(myObject,x).
This examples shows you how to tune the center frequency and bandwidth of the IIR filter.
Fs = 44100; % Input sample rate % Define a bandpass variable bandwidth IIR filter: hiir = dsp.VariableBandwidthIIRFilter('FilterType','Bandpass',... 'FilterOrder',8,... 'SampleRate',Fs,... 'CenterFrequency',1e4,... 'Bandwidth',4e3); htfe = dsp.TransferFunctionEstimator('FrequencyRange','onesided'); hplot = dsp.ArrayPlot('PlotType','Line',... 'XOffset',0,... 'YLimits',[-120 5], ... 'SampleIncrement', 44100/1024,... 'YLabel','Frequency Response (dB)',... 'XLabel','Frequency (Hz)',... 'Title','System Transfer Function'); FrameLength = 1024; hsin = dsp.SineWave('SamplesPerFrame',FrameLength); for i=1:500 % Generate input x = hsin() + randn(FrameLength,1); % Pass input through the filter y = hiir(x); % Transfer function estimation h = htfe(x,y); % plot transfer function hplot(20*log10(abs(h))) % Tune bandwidth and center frequency of the IIR filter if (i==250) hiir.CenterFrequency = 5000; hiir.Bandwidth = 2000; end end
This filter covers frequency transformations. A lowpass IIR
prototype is designed, using the elliptical method by specifying its
order, passband frequency, passband ripple and stopband attenuation.
The passband ripple and stopband attenuation are equal to the values
The prototype passband frequency is set to 0.5. If the
the prototype's order is equal to the value of
FilterType property is
the prototype filter order is equal to
The prototype is a Direct Form II Transposed cascade of second-order
sections (Biquad filter). The prototype is transformed into the desired
filter using the algorithms used in Digital Frequency Transformations. Each prototype
SOS section is transformed separately. When
the resulting filter remains a Direct Form II Transposed cascade of
second order sections. If the
the resulting filter is a cascade of Direct Form II Transposed cascade
of fourth order sections.
 A. G. Constantinides. "Spectral transformations for digital filters", Proc. Inst. Elect. Eng. Vol. 117, No. 8, 1970, pp. 1585-1590.