tfest
1.0.0
通过频率响应的传输函数估计。 python等效于matlab tfest(但算法并不完全相同)
目前仅与SISO系统一起使用。
pip install tfest要获得Scipy转移功能:
import tfest
# u: input
# y: output
te = tfest . tfest ( u , y )
# n_zeros, n_poles
te . estimate ( 3 , 4 , time = 1 )
te . get_transfer_function ()“时间”是秒数的仿真长度。绘制其Bode图:
te . plot_bode ()默认方法计算频率响应y/u是H1估计器,如果要使用H2或频率/频率,只需将方法设置为“ H2”或“ FFT”,并指定了模拟的时间长度(以秒为单位,默认为1):
te . estimate ( 3 , 4 , method = "h2" , time = 1 )
te . estimate ( 3 , 4 , method = "fft" , time = 1 )使用L2正则化设置Lambda L1的值(默认L1 = 0):
te . estimate ( 3 , 4 , time = 1 , l1 = 0.1 )