IIRFilters.EllipticAnalog Method

void EllipticAnalog(Int32 Order, Double PassRipple, Double StopRipple, TVec z, TVec p, ref Double k)

Design an analog elliptic (Cauer) lowpass prototype filter of order Order, equiripple in BOTH bands (PassRipple dB passband, StopRipple dB stopband), cutoff fixed at 1 rad/s. Returns zero-pole-gain with finite imaginary-axis zeros: |H(jomega)|^2=1/(1+varepsilon^2 R_n^2(omega,xi)), varepsilon=sqrt(10^(R_p/10)-1), where R_n is the Chebyshev rational (elliptic) function. For a given order the elliptic design gives the narrowest transition band of the five families. At the passband edge omega=1 the magnitude equals 10^(-R_p/20). Domain: 1 <= Order <= MaxIirOrder, PassRipple>0, StopRipple>PassRipple (dB). Poles satisfy Re(p_k)<0 (stable). z and p must share precision or an exception is raised.

#NameTypeDescription
1OrderInt32
2PassRippleDoublescalar
3StopRippleDoublescalar
4zTVecsource TVec
5pTVecsource TVec
6kDouble (ref)output

Result: stored in self (calling object)

Remarks:

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.

Examples
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);
    MtxVecTee.DrawIt(Response, "Frequency response", false);
}
See Also: IIRFilters.EllipticFilter, LinearSystems.LowpassToHighpass, LinearSystems.Bilinear