You are here: Symbol Reference > Dew.Signal Namespace > IIRFilters Class > IIRFilters Methods > ChebyshevIIAnalog Method
Dew DSP for .NET
Contents
PreviousUpNext
IIRFilters.ChebyshevIIAnalog Method

Design analog Chebyshev type I IIR prototype filter.

C#
public ChebyshevIIAnalog(int Order, double StopRipple, TVec z, TVec p, ref double k);

Design analog Chebyshev type II lowpass prototype filter of order Order. Place the resulting transfer function in zero-pole form in Z (zeros), P (poles) and K (gain). Ripple defines the StopRipple (dB) of the stopband.The cutoff frequency of the prototype filter is preset to 1 rad/sec, the unit circle. 

Chebyshevs type II filters have poles and zeros and are equiripple in the stopband. The design formulas are found in [1] p. 232:


                          Wr
Zeros: z[k] = j* ---------------------
                 cos((2*k-1)/(2*n)*Pi)

Poles: p[k] = s[k] + j*W[k]

              Wr*a[k]
s[k]  = -----------------
         a[k]^2  + b[k]^2

             -Wr*b[k]
W[k]  = -----------------
         a[k]^2  + b[k]^2

a[k] = -sinh(Phi)*sin((2*k-1)*Pi/(2*n))
b[k] =  cosh(Phi)*cos((2*k-1)*Pi/(2*n))

sinh(phi) =  0.5*(v - 1/v)
cosh(phi) =  0.5*(v + 1/v)

v = (A  + (A^2 - 1)^0.5)^(1/n),    A = 1/sr^2

n - order of the filter
k = 1,...,n
Wr - stopband edge
sr - stopband ripple
 

 

References:  

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

ChebyshevIFilter, LowpassToHighpass, Bilinear

Design an analog bandpass filter with passband between 2 and 3 rad/sec and with 20dB ripple in the stopband. 

 

  using Dew.Math;
using Dew.Math.Editors;
using Dew.Math.Units;
using Dew.Signal;
using Dew.Signal.Units;
using Dew.Math.Tee;
using Dew.Signal.Tee;

private void button1_Click(object sender, EventArgs e)
{
    Vector z = new Vector(0);
    Vector p = new Vector(0);
    Vector num = new Vector(0);
    Vector den = new Vector(0);
    Vector Response = new Vector(0);
    Vector FreqFr = new Vector(0);
    double k, Wc;
    int Order = 5; //design a fifth order filter.

    IIRFilters.ChebyshevIIAnalog(Order,20,z, p, out k);  //design analog protype
    Wc = Math.Sqrt(3*2); //cutoff frequency
    double BW = 3 - 2;
    LinearSystems.LowpassToBandpass(z, p, ref k, Wc,BW);
    LinearSystems.ZeroPoleToTransferFun(num, den, z, p, k);
    FreqFr.Length = 1000;
    SignalUtils.LogRamp(FreqFr, -1, 1);

    SignalUtils.FrequencyResponseS(num, den, FreqFr, Response, 0);
    TeeChart.DrawIt(Response, "Frequency response", false);
}
What do you think about this topic? Send feedback!
Copyright (c) 1999-2010 by Dew Research. All rights reserved.