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

Design analog Elliptic type IIR prototype filter.

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

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.

EllipticFilter, LowpassToHighpass, Bilinear

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. 

 

  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.EllipticAnalog(Order,0.1,20,z, p, out k);  //design analog protype
    Wc = Math.Sqrt(3*1); //cutoff frequency
    double BW = 3 - 1;
    LinearSystems.LowpassToBandstop(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.