Esempio n. 1
0
 /// <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)));
 }
Esempio n. 2
0
 /// <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)));
 }
Esempio n. 3
0
 /// <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)));
 }
Esempio n. 4
0
 /// <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)));
 }
Esempio n. 5
0
 /// <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)));
 }