本文整理汇总了Python中sympy.Poly.monic方法的典型用法代码示例。如果您正苦于以下问题:Python Poly.monic方法的具体用法?Python Poly.monic怎么用?Python Poly.monic使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sympy.Poly
的用法示例。
在下文中一共展示了Poly.monic方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: symbols
# 需要导入模块: from sympy import Poly [as 别名]
# 或者: from sympy.Poly import monic [as 别名]
from sympy import symbols, Poly
import numpy as np
a, b, T, s, w, x, z, I = symbols('a b T s w x z I')
bilinear_transform = {s : 2/T*(z-1)/(z+1)}
# Continuous time transfer function from I(s) to w(s) of the following plant
# model:
# dw/dt = a*w + b*I
G_s = b/(s-a)
G_z_num, G_z_den = G_s.subs(bilinear_transform).as_numer_denom()
G_z_den = Poly(G_z_den, z)
G_z_num = Poly(G_z_num / G_z_den.LC(), z) # divide by leading coefficient of den
G_z_den = G_z_den.monic() # make denominator monic
assert(G_z_den.coeffs()[0] == 1)
kp = Poly(G_z_num.coeffs()[0], z)
G_z_N_p = G_z_num - kp * G_z_den
print(kp)
print(G_z_N_p)
print(G_z_den)
from sympy import symbols, Poly
import numpy as np
a, b, T, s, w, x, z, I = symbols('a b T s w x z I')
bilinear_transform = {s : 2/T*(z-1)/(z+1)}