Zero-pole-gain complex shift frequency transformation
[Num,Den,AllpassNum,AllpassDen] = zpkshiftc(Z,P,K,0,0.5)
[Num,Den,AllpassNum,AllpassDen] = zpkshiftc(Z,P,K,0,-0.5)
[Z2,P2,K2,AllpassNum,AllpassDen] = zpkshiftc(Z,P,K,Wo,Wt) returns zeros, Z2, poles, P2, and gain factor, K2, of the target filter transformed from the real lowpass prototype by applying a first-order complex frequency shift transformation. This transformation rotates all the features of an original filter by the same amount specified by the location of the selected feature of the prototype filter, originally at Wo, placed at Wt in the target filter.
It also returns the numerator, AllpassNum, and the denominator, AllpassDen, of the allpass mapping filter. The prototype lowpass filter is given with zeros, Z, poles, P, and the gain factor, K.
Design a prototype real IIR halfband filter using a standard elliptic approach:
[b, a] = ellip(3,0.1,30,0.409); z = roots(b); p = roots(a); k = b(1);
Rotation by -0.25:
[z2,p2,k2] = zpkshiftc(z, p, k, 0.5, 0.25); hfvt = fvtool(b,a,k2*poly(z2),poly(p2));
[z3,p3,k3] = zpkshiftc(z, p, k, 0, 0.5); addfilter(hfvt,k3*poly(z3),poly(p3)); legend(hfvt,'Original Filter','Rotation by -\pi/4 radians/sample',... 'Rotation by \pi/2 radians/sample');
[z2,p2,k2] = zpkshiftc(z, p, k, 0.5, -0.5); fvtool(b, a, k2*poly(z2), poly(p2));
After performing the rotation, the resulting filter shows the features desired.
Similar to the first example, performing the Hilbert transformation generates the desired target filter, shown here.
Finally, using the inverse Hilbert transformation creates yet a third filter, as the figure shows.
Zeros of the prototype lowpass filter
Poles of the prototype lowpass filter
Gain factor of the prototype lowpass filter
Frequency value to be transformed from the prototype filter
Desired frequency location in the transformed target filter
Zeros of the target filter
Poles of the target filter
Gain factor of the target filter
Numerator of the mapping filter
Denominator of the mapping filter
Frequencies must be normalized to be between -1 and 1, with 1 corresponding to half the sample rate.