Transform lowpass IIR filter to different lowpass filter
[num,den] = iirlp2lp(b,a,wc,wd)
[G,AllpassNum,AllpassDen] = iirlp2lp(Hd,Wo,Wt)
Hd is a
[num,den] = iirlp2lp(b,a,wc,wd) with
numerator and denominator coefficients (zeros and poles) for a lowpass
iirlp2lp transforms the magnitude response
from lowpass to highpass.
the coefficients for the transformed highpass filter. For
enter a selected frequency from your lowpass filter. You use the chosen
frequency to define the magnitude response value you want in the highpass
filter. Enter one frequency for the highpass filter — the value
that defines the location of the transformed point — in
Note that all frequencies are normalized between zero and one. Notice
also that the filter order does not change when you transform to a
When you select
wc and designate
the transformation algorithm sets the magnitude response at the
of your bandstop filter to be the same as the magnitude response of
your lowpass filter at
wc. Filter performance between
the values in
wd 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
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, but in a highpass version. Without designing the highpass filter from the beginning.
In some cases transforming your filter may cause numerical problems,
resulting in incorrect conversion to the highpass filter. Use
fvtool to verify the response of your
[G,AllpassNum,AllpassDen] = iirlp2lp(Hd,Wo,Wt) returns
a lowpass magnitude response. The coefficients
the allpass mapping filter for mapping the prototype filter frequency
the target frequencies vector
Wt. Note that in
Hd is a
with a lowpass magnitude response.
This example transforms an IIR filter from lowpass to high pass
by moving the magnitude response at one frequency in the source filter
to a new location in the transformed filter. To generate a lowpass
filter whose passband extends out to 0.2, select the frequency in
the lowpass filter where the passband starts to rolloff (
0.0175) and move it to the new location at
wd = 0.2.
[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]); wc = 0.0175; wd = 0.2; [num,den] = iirlp2lp(b,a,wc,wd); fvtool(b,a,num,den);
Moving the edge of the passband from 0.0175 to 0.2 results in a new lowpass filter whose peak response in-band is the same as the original filter: same ripple, 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.
Mitra, Sanjit K, Digital Signal Processing. A Computer-Based Approach, Second Edition, McGraw-Hill, 2001.