LinearSystems.LowpassToLowpassZ Method

Overload List

#SignatureDescription
1procedure LowpassToLowpassZ(const Num: TVec; const Den: TVec; Freq: Double; PrototypeFreq: Double);Apply frequency band transformation from lowpass to lowpass in the z-domain.
2procedure LowpassToLowpassZ(const z: TVec; const p: TVec; var k: Double; Freq: Double; PrototypeFreq: Double);The function returns modified z (zeros), p (poles) and k (gain).

Overload 1: procedure LowpassToLowpassZ(const Num: TVec; const Den: TVec; Freq: Double; PrototypeFreq: Double);

Apply frequency band transformation from lowpass to lowpass in the z-domain.

#NameTypeDescription
1NumTVec
2DenTVec
3FreqDoublescalar
4PrototypeFreqDoublescalar

Result: stored in self (calling object)

Remarks:

Freq is the cutoff frequency of the new filter. The function returns modified num and den. PrototypeFreq is the cutoff frequency of the prototype lowpass filter after it has been mapped to z-domain. Freq and PrototypeFreq must be between 0 and 1 (Sampling frequency = 2). The transformation is defined with the following mapping ([1] p. 260 and [2] p. 434, [3] p. 352): z^(-1) -> (z^(-1) - a)/(1 - a z^(-1)) a = (sin((wc - wn)/2))/(sin((wc + wn)/2))

wc - old cutoff frequency
wn - new (desired) cutoff frequency

References:

[1] Theory and application of digital signal processing, Lawrence R. Rabiner and Bernard Gold. Prentice-Hall, 1975

[2] Discrete-time signal processing, Oppenheim and Schafer, Prentice-Hall, 1989

[3] Digital signal processing, Vinay K. Ingle and John G. Proakis, Brooks-Cole, 2000

Examples
uses MtxExpr, Math387, MtxVec, MtxVecTee, MtxVecEdit,
LinearSystems, IirFilters, SignalUtils;

procedure TForm42.Button1Click(Sender: TObject);
var z,p,num,den,Response: Vector;
Order: integer;
k,Wc: Double;
begin
    Order := 4;//design a fourth order filter.
    EllipticAnalog(Order,0.1,30,z,p,k);  //design analog protype
    Bilinear(z,p,k,2); //bilinear with sampling frequency 2Hz.
    Wc := 0.5;   //desired cutoff at 0.5 Hz.

    LowpassToLowpassZ(z,p,k,Wc,BilinearUnwarp(1)); //move cutoff to 0.5 Hz.
    ZeroPoleToTransferFun(num,den,z,p,k);

    //Alternative:
    //       ...
    //      ZeroPoleToTransferFun(num,den,z,p,k);
    //      LowpassToLowpassZ(num,den,Wc,BilinearUnwarp(1)); //move cutoff to 0.5 Hz.

    FrequencyResponse(num,den,Response,64);
    DrawIt(Response);
end;

Overload 2: procedure LowpassToLowpassZ(const z: TVec; const p: TVec; var k: Double; Freq: Double; PrototypeFreq: Double);

The function returns modified z (zeros), p (poles) and k (gain).

#NameTypeDescription
1zTVec
2pTVec
3kDouble
4FreqDoublescalar
5PrototypeFreqDoublescalar

Result: stored in self (calling object)

See Also: LinearSystems.Bilinear, LinearSystems.RationalSubstitution