| Filter Design Toolbox™ | ![]() |
[AllpassNum,AllpassDen] = allpassshiftc(Wo,Wt)
[AllpassNum,AllpassDen] = allpassshiftc(0,0.5)
[AllpassNum,AllpassDen] = allpassshiftc(0,-0.5)
[AllpassNum,AllpassDen] = allpassshiftc(Wo,Wt) returns the numerator, AllpassNum, and denominator, AllpassDen, vectors of the allpass mapping filter for performing a complex frequency shift of the frequency response of the digital filter by an arbitrary amount.
[AllpassNum,AllpassDen] = allpassshiftc(0,0.5) calculates the allpass filter for doing the Hilbert transformation, i.e. a 90 degree counterclockwise rotation of an original filter in the frequency domain.
[AllpassNum,AllpassDen] = allpassshiftc(0,-0.5) calculates the allpass filter for doing an inverse Hilbert transformation, i.e. a 90 degree clockwise rotation of an original filter in the frequency domain.
Design the allpass filter precisely rotating the whole filter by the amount defined by the location of the selected feature from an original filter, Wo=0.5, and its required position in the target filter, Wt=0.25:
Wo = 0.5; Wt = 0.25; [AllpassNum, AllpassDen] = allpassshiftc(Wo, Wt);
Calculate the frequency response of the mapping filter in the full range:
[h, f] = freqz(AllpassNum, AllpassDen, 'whole');
Plot the phase response normalized to π, which is in effect the mapping function Wo(Wt):
plot(f/pi, angle(h)/pi, Wt, Wo, 'ro');
title('Mapping Function Wo(Wt)');
xlabel('New Frequency, Wt');
ylabel('Old Frequency, Wo');The figure shows you that the transformation by the mapping filter does exactly what you intend.

| Variable | Description |
|---|---|
| Wo | Frequency value to be transformed from the prototype filter |
| Wt | Desired frequency location in the transformed target filter |
| AllpassNum | 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.
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.
![]() | allpassshift | autoscale | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |