You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This behavior is actually correct: all LTI systems (including the TransferFunction class) have a timebase dt. The timebase can any of the following (as described here):
dt = None: no timebase specified
dt = 0: continuous time system
dt > 0: discrete time system with sampling period ‘dt’
dt = True: discrete time with unspecified sampling period
If you create system without a timebase (the default case) then it will automatically be converted to the appropriate timebase when it is operated upon.
The following code demonstrates the behavior:
tf1 = control.TransferFunction([1,1],[1,2,3]) # unspecified timebase
tf2 = control.TransferFunction([1,1],[1,2,3], 0) # continuous time
tf3 = control.TransferFunction([1,1],[1,2,3], True) # discrete time, unspecified sampling
tf4 = control.TransferFunction([1,1],[1,2,3], 1) # discrete time, with sample time
tf1*tf2 # OK; convert tf1 to continuous time
tf1*tf3 # OK; convert tf1 to discrete time
tf1*tf4 # OK; convert tf1 to discrete time time
tf2*tf3 # Error; incompatible timebases
tf2*tf4 # Error; incompatible timebases
tf3*tf4 # OK; convert tf3 to fixed sample time
It just multiplies the two as rational polynomials without any conversion of sampling times
The text was updated successfully, but these errors were encountered: