private double Ω_ZR(double m, double k) { // Analog Electronic Filters pp.178 // Equation 4.34 double z = (2.0 * m - 1) / 2 / mN + 0.5; double y = Math.Exp(-Math.PI * Functions.AGM(1, Math.Sqrt(1.0 - k * k)) / Functions.AGM(1, k)); return(1.0 / Math.Sqrt(k) * Functions.JacobiTheta1(z, y) / Functions.JacobiTheta0(z, y)); }
/// <summary> /// discremination factor L_N(Ωs) /// </summary> private static double L_N(double Ωs, int N) { #if false // Analog Electronic Filters pp.178 // Equation 4.36 double k = 1.0 / Ωs; double numer = Math.Pow(Ωs, N); double denom = 1; double Kk = Functions.CompleteEllipticIntegralK(k); int η = N & 1; double x = Math.Exp(-Math.PI * Functions.AGM(1, Math.Sqrt(1.0 - k * k)) / Functions.AGM(1, k)); for (int m = 1; m <= (N - η) / 2; ++m) { denom *= Math.Pow(Functions.EllipticSine(((2.0 * m - 1 + η) / N + 1) * Kk, k), 4); } return(numer / denom); #else // Analog Electronic Filters pp.178 // Equation 4.37 int η = N & 1; double k = 1.0 / Ωs; double r = 1.0; if (η == 1) { r = 1.0 / k; } for (int m = 1; m <= (N - η) / 2; ++m) { double z = (2.0 * m - 1 + η) / 2 / N + 1.0 / 2.0; double y = Math.Exp(-Math.PI * Functions.AGM(1.0, Math.Sqrt(1.0 - k * k)) / Functions.AGM(1.0, k)); var θ04 = Math.Pow(Functions.JacobiTheta0(z, y), 4); var θ14 = Math.Pow(Functions.JacobiTheta1(z, y), 4); r *= θ04 / θ14; } return(r); #endif }