iirshift
Shift frequency response of IIR filter
Syntax
[Num,Den,AllpassNum,AllpassDen] =
iirshift(B,A,Wo,Wt)
Description
[Num,Den,AllpassNum,AllpassDen] =
iirshift(B,A,Wo,Wt)
returns the numerator and denominator
vectors, Num
and Den
respectively,
of the target filter transformed from the real lowpass prototype by
applying a second-order real shift frequency mapping.
It also returns the numerator, AllpassNum
,
and the denominator of the allpass mapping filter, AllpassDen
.
The prototype lowpass filter is given with the numerator specified
by B
and the denominator specified by A
.
This transformation places one selected feature of an original filter located at frequency Wo to the required target frequency location, Wt. This transformation implements the "DC Mobility," which means that the Nyquist feature stays at Nyquist, but the DC feature moves to a location dependent on the selection of Wo and Wt.
Relative positions of other features of an original filter do not change in the target filter. This means that it is possible to select two features of an original filter, F1 and F2, with F1 preceding F2. Feature F1 will still precede F2 after the transformation. However, the distance between F1 and F2 will not be the same before and after the transformation.
Choice of the feature subject to the real shift transformation is not restricted to the cutoff frequency of an original lowpass filter. In general it is possible to select any feature; e.g., the stopband edge, the DC, the deep minimum in the stopband, or other ones.
This transformation can also be used for transforming other types of filters; e.g., notch filters or resonators can change their position in a simple way without designing them from the beginning.
Examples
Design a prototype real IIR halfband filter using a standard elliptic approach:
[b, a] = ellip(3, 0.1, 30, 0.409);
Perform the real frequency shift by defining where the selected
feature of the prototype filter, originally at W
o=0.5
,
should be placed in the target filter, W
t=0.75
:
Wo = 0.5; Wt = 0.75; [num, den] = iirshift(b, a, Wo, Wt);
Verify the result by comparing the prototype filter with the target filter:
fvtool(b, a, num, den);
Shifting the specified feature from the prototype to the target generates the response shown in the figure.
Arguments
Variable | Description |
---|---|
B | Numerator of the prototype lowpass filter |
A | Denominator of the prototype lowpass filter |
Wo | Frequency value to be transformed from the prototype filter |
Wt | Desired frequency location in the transformed target filter |
Num | Numerator of the target filter |
Den | Denominator of the target filter |
AllpassNum | Numerator of the mapping filter |
AllpassDen | Denominator of the mapping filter |
Frequencies must be normalized to be between 0 and 1, with 1 corresponding to half the sample rate.
Version History
Introduced in R2011a