scipy.signal.

dstep#

scipy.signal.dstep(system, x0=None, t=None, n=None)[源代码][源代码]#

离散时间系统的阶跃响应。

参数:
系统数组类元组

描述系统的元组。以下给出了元组中元素的数量及其解释:

  • 1: (dlti 的实例)

  • 3: (分子, 分母, 时间步长)

  • 4: (零点, 极点, 增益, 采样时间)

  • 5: (A, B, C, D, dt)

x0类似数组, 可选

初始状态向量。默认为零。

t类似数组, 可选

时间点。如果未提供则计算。

nint, 可选

要计算的时间点数量(如果未给出 t)。

返回:
toutndarray

输出时间点,作为一个一维数组。

ndarray 的元组

系统阶跃响应。元组的每个元素代表系统对每个输入的阶跃响应的输出。

示例

>>> import numpy as np
>>> from scipy import signal
>>> import matplotlib.pyplot as plt
>>> butter = signal.dlti(*signal.butter(3, 0.5))
>>> t, y = signal.dstep(butter, n=25)
>>> plt.step(t, np.squeeze(y))
>>> plt.grid()
>>> plt.xlabel('n [samples]')
>>> plt.ylabel('Amplitude')
../../_images/scipy-signal-dstep-1.png