Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Inconsistent evaluation of tf/ss systems with pole at the origin #532

Closed
@murrayrm

Description

@murrayrm

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp