designNotchPeakIIR
Formation of a higher-order Butterworth notch filter or peak IIR filter.
| Library |
|
Syntax
Function call
-
B,A,SV = designNotchPeakIIR()— generates a peak IIR filter with the filter order2, the central frequency0.5rad/s and Q-factor2.5.BandAThey contain the coefficients of the second-order sections for the numerator and denominator of the peak IIR filter, respectively. ArraysBandAhave a size , where — the number of filter sections equal to half the filter order.Argument
SystemObjectthe default value isfalse. To implement the filter, assign the filter coefficients to the objectSOSFilter.
-
B,A,SV = designNotchPeakIIR(Name=Value)— sets parameters using one or more name-value arguments.For example,
B, A, SV = designNotchPeakIIR(Response="notch", FilterOrder=10, CenterFrequency=0.55, Bandwidth=0.3)designs a notch BIH filter with filter order10, the central frequency0.55rad/s and bandwidth3dB0.3.If you specify only a partial list of filter parameters, the function designs the filter, setting the default values for the remaining parameters.
-
B,A,SV = designNotchPeakIIR(Name=Value)— also returns scale values if you specified the argumentHasScaleValues. ArgumentSVIt is a vector of units if for the argumentHasScaleValuesthe value is setfalse, and a vector of scale values if —true.
-
filtObj = designNotchPeakIIR(Name=Value)— designs a notch or peak BIH filter and implements the objectSOSFilter.This syntax is used if for the argument
SystemObjectthe value is settrue.
Arguments
Name-value input arguments
Specify optional argument pairs as Name=Value, where Name — the name of the argument, and Value — the appropriate value. Name-value arguments should be placed after other arguments, but the order of the pairs does not matter.
# Response — filter characteristic
+
"peak" (by default) | "notch"
Details
The filter characteristic, set as "peak" or "notch".
| Типы данных |
|
# FilterOrder — the order of the notch or peak IIR filter
+
2 (default) | an even non-negative integer
Details
Order a notch or peak IIR filter, specified as an even non-negative integer.
| Типы данных |
|
# CenterFrequency — the center frequency of the notch or peak IIR filter
+
0.5 (by default) | normalized scalar
Details
Central frequency notch or peak IIR filter in rad/s, set as a normalized scalar in the range:
-
[0, 1]when specifying the input argumentBandwidth; -
(0, 1]when specifying the input argumentQualityFactor.
| Типы данных |
|
# QualityFactor — the quality of the notch or peak IIR filter
+
2.5 (by default) | positive scalar
Details
Q-factor (or Q-factor) a notch or peak IIR filter, set as a positive scalar. The Q-factor is defined as the central frequency divided by the bandwidth That is , . A higher Q-factor corresponds to a narrower notch or peak band.
| Типы данных |
|
#
Bandwidth —
bandwidth 3 dB of the notch or peak IIR filter
+
scalar in the range [0, 1]
Details
Bandwidth 3 dB a notch or peak IIR filter, set as a normalized scalar in the range [0, 1].
| Типы данных |
|
# HasScaleValues — the flag for calculating scale values for each section
+
false (default) | true
Details
The flag for calculating scale values for each section, set as true or false. If you set the value for this parameter true the function returns scale values that can be applied before and after each section of the second-order filter.
| Типы данных |
|
# SystemObject — flag for creating a system object
+
false (by default) | true
Details
The flag for creating a system object, set as
-
false— the function returns matrices of coefficients of sections of the second order; -
true— the function returns an objectSOSFilter.
| Типы данных |
|
# Verbose — the flag for printing a function call in Engee
+
false (by default) | true
Details
The flag for printing a function call in Engee, set as
-
false— the function does not output a function call; -
true— the function outputs the entire function call, including the default values for type argumentsName=Valuewhich were not specified when calling the function.Use this value to view all the parameters used by the function to design and implement the filter.
| Типы данных |
|
Output arguments
# B — numerator coefficients of the notch or peak IIR filter
+
the N/2×3 array
Details
Numerator coefficients of a notch or peak IIR filter, returned as an array of size , where — the number of filter sections, and — filter order.
| Типы данных |
|
# A — coefficients of the denominator of the notch or peak IIR filter
+
the N/2×3 array
Details
Denominator coefficients of a notch or peak IIR filter returned as an array of size , where — the number of filter sections, and — filter order.
The highest coefficient of the denominator is always equal to 1.
| Типы данных |
|
# SV — scale values
+
column vector
Details
Scale values between sections returned as a column vector of length , where — the number of filter sections, and — filter order.
If for an argument HasScaleValues the value is set true Then SV it will be a column vector of units.
| Типы данных |
|
# filtObj — filter object
+
the SOSFilter object
Details
The filter object returned as an object SOSFilter. Function designNotchPeakIIR updates arguments HasScaleValues and SV in the object SOSFilter depending on what value is set for the argument when calling the function. HasScaleValues — true or false .