- Notifications
You must be signed in to change notification settings - Fork441
Closed
Description
Systems that have a pole at the origin return inconsistent values:
import control as ctsys_tf = ct.tf([1], [1, 0])sys_ss = ct.tf2ss(sys_tf)sys_tf(0) # returns (inf+0j) with divide by zero warningsys_tf(0j) # returns (inf+nanj) with divide by zero warningsys_ss(0) # LinAlgError: Singular matrixsys_tf.dcgain() # returns array(inf)sys_ss.dcgain() # returns array(nan)
I think all of these should returninf
(orarray(inf)
).
If you have a pole and zero at the origin, you getnan
or 1:
sys_tf = ct.tf([1, 0], [1, 0])sys_ss = ct.tf2ss(sys_tf)sys_tf(0) # returns (nan+0j) with invalid value warningsys_ss(0) # returns (1+0j) [state space system is empty]sys_tf.dcgain() # returns array(nan)sys_ss.dcgain() # returns (1+0j) [state space system is empty]
I think all of these cases should producenan
.
I have a partial fix in a branch, but want to see what people think the "right" answer is before committing it.
Metadata
Metadata
Assignees
Labels
No labels