EngeeDSP.VariableBandwidthIIRFilter
IIR filter with variable bandwidth.
| Library |
|
Description
To implement an IIR filter with variable bandwidth that filters each channel of the input signal, follow these steps:
-
Create an object EngeeDSP.VariableBandwidthIIRFilter and set its properties.
-
Call the object with arguments as if it were a function.
To learn more about how to work with system objects, see Engee System Objects.
Syntax
Creation
-
vbwIIR = EngeeDSP.VariableBandwidthIIRFilter()— returns the IIR filter objectvbwIIRwith variable bandwidth, which independently filters each channel (column) of the input signal during successive calls to the algorithm. This system object uses a specified IIR filter implementation. The bandwidth frequency of the filter can be adjusted during the filtering operation. An IIR filter with a variable bandwidth is formed using the elliptical method. The filter is configured using IIR spectral transformations based on full-pass filters. -
vbwIIR = EngeeDSP.VariableBandwidthIIRFilter(Name=Value)— returns the IIR filter objectvbwIIRwith the specified properties as a pairName=Value, whereName— the name of the property, andValue— the appropriate value. You can specify multiple pairs «name-value» the order of the pairs does not matter. Unspecified properties retain their default values.
Arguments
Input arguments
x — input signal
+
scalar | vector | the matrix
Details
An input signal specified as a scalar, vector, or matrix. This system object supports variable-size input data. After locking the object, you can change the size of each input channel, but you cannot change the number of channels.
| Типы данных |
|
| Support for complex numbers |
Yes |
Output arguments
y — filtered output signal
+
scalar | vector | the matrix
Details
The filtered output signal returned as a scalar, vector, or matrix. The size, data type, and complexity of the output signal are the same as the input signal.
| Типы данных |
|
| Support for complex numbers |
Yes |
Features
# filterType — type of filter characteristic
+
"Lowpass" (by default) | "Highpass" | "Bandpass" | "Bandstop"
Details
The type of filter characteristic, set as "Lowpass", "Highpass", "Bandpass" or "Bandstop".
# FilterOrder — IIR filter order
+
8 (by default) | scalar
Details
The order of the IIR filter, given as a positive integer scalar.
| Типы данных |
|
# PassbandFrequency — filter bandwidth frequency
+
512 (by default) | scalar
Details
The frequency of the filter bandwidth in Hz or in normalized frequency units, set as a positive scalar.
If the property NormalizedFrequency is set to:
-
false— The bandwidth frequency value is specified in Hz. The value must be less than half of the value of the SampleRate. -
true— The bandwidth frequency value is specified in normalized frequency units. The value must be a positive scalar less than1.0.
Dependencies
To use this property, set the [Property:filterType] value Lowpass or Highpass.
| Типы данных |
|
# CenterFrequency — the center frequency of the filter
+
11025 (by default) | scalar
Details
The center frequency of the filter in Hz or in normalized frequency units, set as a positive scalar.
If the property NormalizedFrequency is set to:
-
false— the value of the central frequency is indicated in Hz. The value must be less than half of the value of the SampleRate. -
true— the value of the center frequency is indicated in normalized frequency units. The value must be a positive scalar less than1.0.
Dependencies
To use this property, set the [Property:filterType] value Bandpass or Bandstop.
| Типы данных |
|
# Bandwidth — filter bandwidth
+
7680 (by default) | scalar
Details
The filter bandwidth in Hz or in normalized frequency units, set as a positive scalar.
If the property NormalizedFrequency is set to:
-
false— the bandwidth value is specified in Hz. The value must be less than half of the value of the SampleRate. -
true— The bandwidth value is specified in normalized frequency units. The value must be a positive scalar less than1.0.
Dependencies
To use this property, set the [Property:filterType] value Bandpass or Bandstop.
| Типы данных |
|
# PassbandRipple — unevenness of the filter bandwidth
+
1 (by default) | scalar
Details
The unevenness of the filter bandwidth in dB, set as a positive scalar.
| Типы данных |
|
# StopbandAttenuation — attenuation of the filter delay band
+
60 (by default) | scalar
Details
Attenuation of the filter’s delay band in dB, set as a positive scalar.
| Типы данных |
|
# NormalizedFrequency — specifying frequencies in normalized units
+
false (default) | true
Details
If you set this property to:
-
true— the filter bandwidth frequency, center frequency, and filter bandwidth should be set in normalized frequency units, and their values should be less than1.0. -
false— The filter bandwidth frequency, center frequency, and filter bandwidth must be set in Hz. You can specify the sampling rate of the input signal using the SampleRate.
| Типы данных |
|
# * SampleRate* is the sampling rate of the input signal
+
44100 (by default) | scalar
Details
The sampling frequency of the input signal in Hz, set as a positive scalar.
Dependencies
To use this property, set the NormalizedFrequency property to false.
| Типы данных |
|
Algorithms
This filter provides frequency conversion. The algorithm calculates a prototype of a low-frequency IIR filter using the elliptical method based on specified values of order, bandwidth frequency, unevenness in the bandwidth and attenuation in the delay band. The unevenness in the bandwidth and attenuation in the delay band are equal to the values of the properties PassbandRipple and StopbandAttenuation. The algorithm sets the bandwidth frequency of the prototype filter to 0.5. If the property is [Property:filterType] has a value "Lowpass" or "Highpass", the filter order is equal to the value FilterOrder. If the property is [Property:filterType] has a value "Bandpass" or "Bandstop", the filter order is FilterOrder / 2. The prototype is a cascade of second-order sections with a transposed direct form II (biquad filter). The prototype filter is converted into the required filter using digital frequency conversion algorithms. Each second-order section of the prototype is transformed separately. If [Property:filterType] has a value "Lowpass" or "Highpass", then the resulting filter is a cascade of second-order sections with a transposed direct form II. If [Property:filterType] has a value "Bandpass" or "Bandstop", then the resulting filter is a cascade of fourth-order sections with a transposed direct form II.