You are here: Symbol Reference > IIRFilters Namespace > Functions > IIRFilters.EllipticAnalog Function
DSP Master VCL
ContentsIndex
PreviousUpNext
IIRFilters.EllipticAnalog Function

Design analog Elliptic type IIR prototype filter.

Pascal
procedure EllipticAnalog(Order: integer; PassRipple: double; StopRipple: double; const z: TVec; const p: TVec; out k: double); overload;

Design analog elliptic prototype filter of order Order. Place the resulting transfer function in zero-pole form in Z (zeros), P (poles) and K (gain). PassRipple defines the ripple (dB) of the passband and StopRipple defines the ripple of the stopband (dB). The cutoff frequency of the prototype filter is preset to 1 rad/sec. For pole and zero specifications see [1] p. 187. 

References:  

[1] Digital Filter Design, T.W.Parks and C.S.Burrs, John Wiley and Sons, 1987.

Design an analog bandstop filter with stopband between 1 and 3 rad/sec and with 20dB ripple in the stopband and 0.1dB in the passband. 

 

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

  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.1,20,z,p,k);  //design analog protype
      Wc := Sqrt(1*3);
      BW := 3-1;
      LowpassToBandstop(z,p,k,Wc,BW);  //frequency transformation in s-domain
      ZeroPoleToTransferFun(num,den,z,p,k);
      FreqFr.Length := 1000;         //Define the frequency grid (logarithmic)
      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;

 

    #include "MtxExpr.hpp" //MtxVecCPP.cpp must be included in the project
  #include "MtxVecEdit.hpp"
  #include "MtxVecTee.hpp"
  #include "SignalUtils.hpp"
  #include "IirFilters.hpp"
  #include "LinearSystems.hpp"

  void __fastcall TForm1::BitBtn1Click(TObject *Sender)
  {
    sVector z,p, num,den, FreqFr, Response;
    int   Order;
    double k,Wc,BW;

    Order = 5; //design a fifth order filter.
    EllipticAnalog(Order,0.1,20,z,p,k);  //design analog protype
    Wc = Sqrt(1*3);
    BW = 3-1;
    LowpassToBandstop(z,p,k,Wc,BW);  //frequency transformation in s-domain
    ZeroPoleToTransferFun(num,den,z,p,k);
    FreqFr.Length = 1000;         //Define the frequency grid (logarithmic)
    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;
  }
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!