Upsample IIR filter by integer factor
[Num,Den,AllpassNum,AllpassDen] = iirrateup(B,A,N) returns the numerator and denominator vectors, Num and Den respectively, of the target filter being transformed from any prototype by applying an Nth-order rateup frequency transformation, where N is the upsample ratio. Transformation creates N equal replicas of the prototype filter frequency response.
It also returns the numerator, AllpassNum, and the denominator, AllpassDen, of the allpass mapping filter. The prototype lowpass filter is given with a numerator specified by B and a denominator specified by A.
The 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.
Design a prototype real IIR halfband filter using a standard elliptic approach:
[b, a] = ellip(3, 0.1, 30, 0.409); [num, den] = iirrateup(b, a, 4);
Verify the result by comparing the prototype filter with the target filter:
fvtool(b, a, num, den);
As shown in the figure produced by FVTool, the transformed filter appears as expected.
Numerator of the prototype lowpass filter
Denominator of the prototype lowpass filter
Frequency multiplication ratio
Numerator of the target filter
Denominator of the target filter
Numerator of the mapping filter
Denominator of the mapping filter