Main Content

iirlp2lp

Transform lowpass IIR filter to different lowpass filter

Description

example

[num,den] = iirlp2lp(b,a,wo,wt) transform lowpass IIR filter to different lowpass filter.

The iirlp2lp function returns the numerator and denominator coefficients of the transformed lowpass digital filter. The function transforms the magnitude response from lowpass to a different lowpass. The prototype lowpass filter is specified with the numerator b and denominator a For more details, see Lowpass IIR Filter to Different Lowpass Filter Transformation.

[num,den,allpassNum,allpassDen] = iirbpc2bpc(b,a,wo,wt) in addition returns the numerator and the denominator coefficients of the allpass mapping filter.

Examples

collapse all

This example transforms the passband of a lowpass IIR filter by moving the magnitude response at one frequency in the source filter to a new location in the transformed filter.

Generate a least P-norm optimal IIR lowpass filter with varying attenuation levels in the stopband. Specify a numerator order of 10 and a denominator order of 6. Visualize the magnitude response of the filter.

[b,a] = iirlpnorm(10,6,[0 0.0175 0.02 0.0215 0.025 1], ...
    [0 0.0175 0.02 0.0215 0.025 1],[1 1 0 0 0 0], ...
    [1 1 1 1 10 10]);

fvtool(b,a)

Figure Filter Visualization Tool - Magnitude Response (dB) contains an axes and other objects of type uitoolbar, uimenu. The axes with title Magnitude Response (dB) contains an object of type line.

To generate a lowpass filter whose passband extends out to 0.2π rad/sample, select the frequency in the lowpass filter at 0.0175π, the frequency where the passband starts to roll off, and move it to the new location. Compare the magnitude responses of the filters using FVTool.

wc = 0.0175;
wd = 0.2;
[num,den] = iirlp2lp(b,a,wc,wd);

hvft = fvtool(b,a,num,den);
legend(hvft,'Prototype','Target')

Figure Filter Visualization Tool - Magnitude Response (dB) contains an axes and other objects of type uitoolbar, uimenu. The axes with title Magnitude Response (dB) contains 2 objects of type line. These objects represent Prototype, Target.

Moving the edge of the passband from π to 0.2π results in a new lowpass filter whose peak response in-band is the same as in the original filter, with the same ripple and the same absolute magnitude. The rolloff is slightly less steep and the stopband profiles are the same for both filters. The new filter stopband is a "stretched" version of the original, as is the passband of the new filter.

Input Arguments

collapse all

Numerator coefficients for a prototype lowpass IIR filter, specified as a row vector.

Data Types: single | double
Complex Number Support: Yes

Denominator coefficients for a prototype lowpass IIR filter, specified as a row vector.

Data Types: single | double
Complex Number Support: Yes

Frequency value to be transformed from the prototype filter, specified as a real positive scalar. Frequency wo must be normalized to be between 0 and 1, with 1 corresponding to half the sample rate.

Data Types: single | double

Desired frequency location in the transformed target filter, specified as a real positive scalar. Frequency wt must be normalized to be between 0 and 1, with 1 corresponding to half the sample rate.

Data Types: single | double

Output Arguments

collapse all

Numerator of the transformed lowpass filter, returned as a row vector.

Data Types: single | double
Complex Number Support: Yes

Denominator of the transformed lowpass filter, returned as a row vector.

Data Types: single | double

Numerator coefficients of the mapping filter, returned as a row vector.

Data Types: single | double

Denominator coefficients of the mapping filter, returned as a row vector.

Data Types: single | double

More About

collapse all

Lowpass IIR Filter to Different Lowpass Filter Transformation

Lowpass IIR filter to different lowpass filter transformation takes a selected frequency from your lowpass filter, wo, and maps the corresponding magnitude response value onto the desired frequency location in the transformed lowpass filter, wt. Note that all frequencies are normalized between zero and one and that the filter order does not change when you transform to the target lowpass filter.

When you select wo and designate wt, the transformation algorithm sets the magnitude response at the wt values of your bandstop filter to be the same as the magnitude response of your lowpass filter at wo. Filter performance between the values in wt is not specified, except that the stopband retains the ripple nature of your original lowpass filter and the magnitude response in the stopband is equal to the peak response of your lowpass filter. To accurately specify the filter magnitude response across the stopband of your bandpass filter, use a frequency value from within the stopband of your lowpass filter as wc. Then your bandstop filter response is the same magnitude and ripple as your lowpass filter stopband magnitude and ripple.

The fact that the transformation retains the shape of the original filter is what makes this function useful. If you have a lowpass filter whose characteristics, such as rolloff or passband ripple, particularly meet your needs, the transformation function lets you create a new filter with the same characteristic performance features.

In some cases transforming your filter may cause numerical problems, resulting in incorrect conversion to the target filter. Use fvtool to verify the response of your converted filter.

References

[1] Nowrouzian, B., and A.G. Constantinides. “Prototype Reference Transfer Function Parameters in the Discrete-Time Frequency Transformations.” In Proceedings of the 33rd Midwest Symposium on Circuits and Systems, 1078–82. Calgary, Alta., Canada: IEEE, 1991. https://doi.org/10.1109/MWSCAS.1990.140912.

[2] Nowrouzian, B., and L.T. Bruton. “Closed-Form Solutions for Discrete-Time Elliptic Transfer Functions.” In [1992] Proceedings of the 35th Midwest Symposium on Circuits and Systems , 784–87. Washington, DC, USA: IEEE, 1992. https://doi.org/10.1109/MWSCAS.1992.271206.

[3] Constantinides, A.G.“Spectral transformations for digital filters.” Proceedings of the IEEE, vol. 117, no. 8: 1585-1590. August 1970.

See Also

Functions

Introduced in R2011a