Accelerating the pace of engineering and science

# zpkshiftc

Zero-pole-gain complex shift frequency transformation

## Syntax

[Z2,P2,K2,AllpassNum,AllpassDen] = zpkshiftc(Z,P,K,Wo,Wt)
[Num,Den,AllpassNum,AllpassDen] = zpkshiftc(Z,P,K,0,0.5)
[Num,Den,AllpassNum,AllpassDen] = zpkshiftc(Z,P,K,0,-0.5)

## Description

[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.

[Num,Den,AllpassNum,AllpassDen] = zpkshiftc(Z,P,K,0,0.5) performs the Hilbert transformation, i.e. a 90 degree counterclockwise rotation of an original filter in the frequency domain.

[Num,Den,AllpassNum,AllpassDen] = zpkshiftc(Z,P,K,0,-0.5) performs the inverse Hilbert transformation, i.e. a 90 degree clockwise rotation of an original filter in the frequency domain.

## Examples

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);
'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));

### Result of Example 1

After performing the rotation, the resulting filter shows the features desired.

### Result of Example 2

Similar to the first example, performing the Hilbert transformation generates the desired target filter, shown here.

### Result of Example 3

Finally, using the inverse Hilbert transformation creates yet a third filter, as the figure shows.

## Arguments

VariableDescription
Z

Zeros of the prototype lowpass filter

P

Poles of the prototype lowpass filter

K

Gain factor of the prototype lowpass filter

Wo

Frequency value to be transformed from the prototype filter

Wt

Desired frequency location in the transformed target filter

Z2

Zeros of the target filter

P2

Poles of the target filter

K2

Gain factor of the target filter

AllpassDen

Numerator of the mapping filter

AllpassDen

Denominator of the mapping filter

Frequencies must be normalized to be between -1 and 1, with 1 corresponding to half the sample rate.

## References

Oppenheim, A.V., R.W. Schafer and J.R. Buck, Discrete-Time Signal Processing, Prentice-Hall International Inc., 1989.

Dutta-Roy, S.C. and B. Kumar, "On digital differentiators, Hilbert transformers, and half-band low-pass filters," IEEE® Transactions on Education, vol. 32, pp. 314-318, August 1989.