Returns the zero frequency (s=0) value of numer/denom. :param numer: Numerator of a rational function of the Laplace variable :type numer: sympy.Expr :param denom: Denominator of a rational function of the Laplace variable :type denom: sympy.Expr :return: zero freq
(numer, denom, var)
| 381 | return (newPoles, newZeros) |
| 382 | |
| 383 | def _zeroValue(numer, denom, var): |
| 384 | """ |
| 385 | Returns the zero frequency (s=0) value of numer/denom. |
| 386 | |
| 387 | :param numer: Numerator of a rational function of the Laplace variable |
| 388 | :type numer: sympy.Expr |
| 389 | |
| 390 | :param denom: Denominator of a rational function of the Laplace variable |
| 391 | :type denom: sympy.Expr |
| 392 | |
| 393 | :return: zero frequency (s=0) value of numer/denom. |
| 394 | :rtype: sympy.Expr |
| 395 | """ |
| 396 | # numer = sp.simplify(numer) |
| 397 | # denom = sp.simplify(denom) |
| 398 | numerValue = numer.xreplace({var: 0}) |
| 399 | denomValue = denom.xreplace({var: 0}) |
| 400 | if numerValue == 0 and denomValue == 0: |
| 401 | try: |
| 402 | gain = sp.limit(numer/denom, var, 0) |
| 403 | except: |
| 404 | gain = sp.sympify("undefined") |
| 405 | elif numerValue == 0: |
| 406 | gain = sp.N(0) |
| 407 | elif denomValue == 0: |
| 408 | gain = sp.oo |
| 409 | else: |
| 410 | gain = sp.simplify(numerValue/denomValue) |
| 411 | return gain |
| 412 | |
| 413 | def findServoBandwidth(loopgainRational): |
| 414 | """ |