%pylab inline
Populating the interactive namespace from numpy and matplotlib
from scipy import signal
tau = 5.0 * 60 # 5 minutes
h_times = arange(0.0, 10 * tau, 0.1)
sys = signal.lti(1, [1, 1.0 / tau])
step_response = sys.step(T=h_times)[1]
plot(h_times, step_response / step_response.max()) # normalized
axhline(0.63, color='red')
axvline(tau, color='red')
xlabel('t')
title('Step response')
show()
/usr/lib/python3/dist-packages/scipy/signal/ltisys.py:554: ComplexWarning: Casting complex values to real discards the imaginary part GT = dot(dot(vti, diag(numpy.exp(dt * lam))), vt).astype(xout.dtype) /usr/lib/python3/dist-packages/scipy/signal/ltisys.py:568: ComplexWarning: Casting complex values to real discards the imaginary part vt).astype(xout.dtype)
scipy.signal.iirdesign()
-> http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.iirdesign.html#scipy.signal.iirdesign
scipy.signal.lfilter()
-> http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.lfilter.html#scipy.signal.lfilter