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

Design an analog highpass filter with transition band between 1 and 4 rad/sec and with at least 50dB attenuation at the end of the transition band and. The passband should not have more then 0.1dB ripple. 

 

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

  procedure TForm1.Button1Click(Sender: TObject);
  var z,p, num,den, FreqFr,Response: Vector;
      Order: integer;
      k,BW: double;
      WcArray: TDoubleArray; //modified 3dB frequency
  begin
      SetLength(WcArray,1);
      Order := ChebyshevIOrder([1,4],0.1,50,ftHighpass,WcArray,True);
      ChebyshevIAnalog(Order,0.1,z,p,k);  //design analog protype
      LowpassToHighpass(z,p,k,WcArray[0]);  //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"
#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, WcArray;
    int Order;
    double k,Wc,BW;

    WcArray.Size(1);
    Order = ChebyshevIOrder(OPENARRAY(double,(1,4)),0.1,50,ftHighpass,WcArray.PValues1D(0),WcArray.Length-1,true);
    ChebyshevIAnalog(Order,0.1,z,p,k);  //design analog protype
    LowpassToHighpass(z,p,k,WcArray[0]);  //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.