/// <summary> /// Generates transfer function. /// </summary> /// <param name="frequencyLow">Normalized low cutoff frequency in range [0..0.5]</param> /// <param name="frequencyHigh">Normalized high cutoff frequency in range [0..0.5]</param> /// <param name="order">Filter order</param> /// <param name="ripplePass">Passband ripple (in dB)</param> /// <param name="rippleStop">Stopband ripple (in dB)</param> private static TransferFunction MakeTf(double frequencyLow, double frequencyHigh, int order, double ripplePass = 1, double rippleStop = 20) { return(DesignFilter.IirBsTf(frequencyLow, frequencyHigh, PrototypeElliptic.Poles(order, ripplePass, rippleStop), PrototypeElliptic.Zeros(order, ripplePass, rippleStop))); }
/// <summary> /// Generates transfer function. /// </summary> /// <param name="frequencyLow">Normalized low cutoff frequency in range [0..0.5]</param> /// <param name="frequencyHigh">Normalized high cutoff frequency in range [0..0.5]</param> /// <param name="order">Filter order</param> /// <param name="ripple">Ripple (in dB)</param> private static TransferFunction MakeTf(double frequencyLow, double frequencyHigh, int order, double ripple = 0.1) { return(DesignFilter.IirBsTf(frequencyLow, frequencyHigh, PrototypeChebyshevII.Poles(order, ripple), PrototypeChebyshevII.Zeros(order))); }
/// <summary> /// Generates transfer function. /// </summary> /// <param name="frequencyLow">Normalized low cutoff frequency in range [0..0.5]</param> /// <param name="frequencyHigh">Normalized high cutoff frequency in range [0..0.5]</param> /// <param name="order">Filter order</param> private static TransferFunction MakeTf(double frequencyLow, double frequencyHigh, int order) { return(DesignFilter.IirBsTf(frequencyLow, frequencyHigh, PrototypeBessel.Poles(order))); }
/// <summary> /// TF generator /// </summary> /// <param name="f1"></param> /// <param name="f2"></param> /// <param name="order"></param> /// <returns></returns> private static TransferFunction MakeTf(double f1, double f2, int order) { return(DesignFilter.IirBsTf(f1, f2, PrototypeBessel.Poles(order))); }
/// <summary> /// TF generator /// </summary> /// <param name="f1"></param> /// <param name="f2"></param> /// <param name="order"></param> /// <returns></returns> private static TransferFunction MakeTf(double f1, double f2, int order, double ripple = 0.1) { return(DesignFilter.IirBsTf(f1, f2, PrototypeChebyshevI.Poles(order, ripple))); }