Returns a normalized Bessel polynomial of the n-th order of the Laplace variable. Zero-frequency value = 1, -3dB frequency (magnitude = 2) is 1 rad/s. :param n: order :type n: int :return: Bessel polynomial of the n-th order of the Laplace variable :rtype: sympy.Expre
(n)
| 1362 | return P_s |
| 1363 | |
| 1364 | def besselPoly(n): |
| 1365 | """ |
| 1366 | Returns a normalized Bessel polynomial of the n-th order of the Laplace |
| 1367 | variable. |
| 1368 | |
| 1369 | Zero-frequency value = 1, -3dB frequency (magnitude = 2) is 1 rad/s. |
| 1370 | |
| 1371 | :param n: order |
| 1372 | :type n: int |
| 1373 | |
| 1374 | :return: Bessel polynomial of the n-th order of the Laplace variable |
| 1375 | :rtype: sympy.Expression |
| 1376 | """ |
| 1377 | s = ini.laplace |
| 1378 | P_s = 0 |
| 1379 | for k in range(n+1): |
| 1380 | P_s += (sp.factorial(2*n-k)/((2**(n-k)) * |
| 1381 | sp.factorial(k)*sp.factorial(n-k)))*s**k |
| 1382 | P_s = sp.simplify(P_s/P_s.xreplace({s: 0})) |
| 1383 | # Normalize 3 dB frequency |
| 1384 | w = sp.Symbol('w', real=True) |
| 1385 | B_w = sp.Abs(P_s.xreplace({s: sp.I*w}))**2 |
| 1386 | func = sp.lambdify(w, B_w - 2) |
| 1387 | w3dB = float2rational(fsolve(func, 10)[0]) |
| 1388 | P_s = P_s.xreplace({s: s*w3dB}) |
| 1389 | return P_s |
| 1390 | |
| 1391 | def chebyshev1Poly(n, ripple): |
| 1392 | """ |
no test coverage detected