LinearSystems.LowpassToHighpass Method

Overload List

#SignatureDescription
1procedure LowpassToHighpass(const A: TMtx; const B: TVec; const C: TVec; var D: Double; Freq: Double);Transform a lowpass filter prototype in state space form to highpass filter.
2procedure LowpassToHighpass(const z: TVec; const p: TVec; var k: Double; Freq: Double);Frequency transformation from a lowpass to a highpass filter in s-domain.

Overload 1: procedure LowpassToHighpass(const A: TMtx; const B: TVec; const C: TVec; var D: Double; Freq: Double);

Transform a lowpass filter prototype in state space form to highpass filter.

#NameTypeDescription
1ATMtx
2BTVec
3CTVec
4DDouble
5FreqDoublescalar

Result: stored in self (calling object)

See Also: LinearSystems.LowpassToLowpass, LinearSystems.LowpassToBandstop, LinearSystems.LowpassToBandpass, LinearSystems.LowpassToLowpassZ, LinearSystems.LowpassToBandpassZ, LinearSystems.LowpassToBandstopZ, LinearSystems.LowpassToHighpassZ

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

Frequency transformation from a lowpass to a highpass filter in s-domain.

#NameTypeDescription
1zTVec
2pTVec
3kDouble
4FreqDoublescalar

Result: stored in self (calling object)

Remarks:

Transform a lowpass filter prototype in zero-pole form to a highpass filter, where the new cutoff frequency is Freq. Assumed sampling frequency is 2. The transformation is defined as ([1], p. 258): s -> W_u/s

Wu - new cutoff frequency

The routine also adds zeros at 0. It adds one zero, if the lowpass filter order is odd and already has zeros. If the filter does not have zeros, it adds sufficient zeros at 0 to match the order of the filter.

References:

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

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

procedure TForm42.Button1Click(Sender: TObject);
var z,p, num,den, FreqFr,Response: Vector;
Order: integer;
k,Wc,BW: Double;
begin
    Order := 5; //design a fifth order filter.
    EllipticAnalog(Order,0.2,40,z,p,k);  //design analog protype
    Wc := 0.2;
    LowpassToHighpass(z,p,k,WC);  //frequency transformation in s-domain
    ZeroPoleToTransferFun(num,den,z,p,k);
    //Define the frequency grid (logarithmic)
    FreqFr.Length := 1000;
    LogRamp(FreqFr,-1,1); //between 0.1 (=10^(-1)) and 10 (=10^1) rad/sec
    FrequencyResponseS(num,den,FreqFr,Response); //Laplace
    DrawIt(Response); //Y axis linear, X axis logarithmic
end;