-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
DocumentationIssues related to the SciPy documentation. Also check https://github.com/scipy/scipy.orgIssues related to the SciPy documentation. Also check https://github.com/scipy/scipy.orgscipy.signal
Milestone
Description
Formula of Tustin formula in scipy.signal.bilinear misses "fs*2"
The Tustin formula in
is described as (z-1) / (z+1)
but it should be fs2(z-1) / (z+1)
The implementation is correct, its only the formula in
that is wrong.
Here a simple example of the discretization of the lti
Reproducing Code Example
from scipy.signal import bilinear
num, den = bilinear([0, 1], [1, 0], 1/T)
print(num, den)
num_m = (T/2)*np.array([1, 1]) # manual usage of Tustin reads as ((2/T)*(z-1)/(z+1)))^-1
den_m = np.array([1, -1])
print(num_m, den_m)
Error message
no error
SciPy/NumPy/Python version information
1.5.0 1.18.5 sys.version_info(major=3, minor=8, micro=3, releaselevel='final', serial=0)
Metadata
Metadata
Assignees
Labels
DocumentationIssues related to the SciPy documentation. Also check https://github.com/scipy/scipy.orgIssues related to the SciPy documentation. Also check https://github.com/scipy/scipy.orgscipy.signal