GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tf2ss() returns unstable system · Issue #935 · python-control/python-control

tf2ss() returns unstable system #935

New issue
Copy link
New issue
Copy link
Closed
Closed
tf2ss() returns unstable system#935
Copy link
Assignees
murrayrm
Labels
onholdWaiting for changes or inputWaiting for changes or input

Description

@pooyasf
pooyasf
opened on Oct 17, 2023
Issue body actions

I have the following transfer function:

_sys1.den=[[array([9.43513863e-11, 6.05312352e-08, 7.92752628e-07, 5.23764693e-06, 1.82502556e-05, 1.24355899e-05, 8.68206174e-06, 2.73818482e-06, 4.29133144e-07, 3.85554417e-08, 1.62631575e-09, 8.41098151e-12, 9.85278302e-15, 4.07646645e-18, 5.55496497e-22, 3.06560494e-26, 5.98908988e-31])]]

'_sys1.num=[[array([9.94004350e-13, 2.67602795e-11, 2.31058712e-10, 1.15119493e-09,
5.04635153e-09, 1.34066064e-08, 2.11938725e-08, 2.39940325e-08,
2.05897777e-08, 1.17092854e-08, 4.71236875e-09, 1.19497537e-09,
1.90815347e-10, 1.00655454e-11, 1.47388887e-13, 8.40314881e-16,
1.67195685e-18])]]'

asking for poles:

_sys1.poles()=array([-6.28318525e+02+0.00000000e+00j, -6.28318531e+00+0.00000000e+00j, -3.14159265e+00+5.44139809e+00j, -3.14159265e+00-5.44139809e+00j, -1.19380521e-01+5.84842723e-01j, -1.19380521e-01-5.84842723e-01j, -1.88495559e-01+0.00000000e+00j, -6.63225116e-02+9.92624461e-02j, -6.63225116e-02-9.92624461e-02j, -1.00530965e-01+0.00000000e+00j, -4.32233973e-03+0.00000000e+00j, -6.28318476e-04+0.00000000e+00j, -6.28318592e-04+0.00000000e+00j, -6.29820167e-05+2.60763321e-07j, -6.29820167e-05-2.60763321e-07j, -6.25315230e-05+0.00000000e+00j])

All negative. System is stable. But then when converting _sys1 to state space using tf2ss() returns a system which have positive poles (unstable). I am using Slycot.

I also repeated the same conversion but using scipy and it gives me a stable state space as a result.

python-control version: '0.9.3.post2'

Activity

  1. murrayrm commented on Oct 19, 2023

    @murrayrm
    murrayrm
    on Oct 19, 2023
    Member
    More actions

    This looks like a bug in SLICOT, since tf2ss (which eventually calls statesp._convert_to_statespace) just calls the SLICOT td04ad routine. Confirmed that using scipy.signal.tf2ssgives the correct answer.

    Needs a closer took to make sure there is not a python-control bug someplace. If not, we should transfer to the slycot issues list.

  2. murrayrm
    self-assigned this
    on Oct 19, 2023
  3. murrayrm
    added 2 commits that reference this issue on Oct 22, 2023

    add unit test illustrating issue python-control#935 + add keyword for…

    fb9e012

    add unit test illustrating issue python-control#935 + add keyword for…

    fe8888f
  4. murrayrm commented on Oct 22, 2023

    @murrayrm
    murrayrm
    on Oct 22, 2023
    Member
    More actions

    I've created a slycot issue (#222) reporting this issue. PR coming that includes a unit test for this case and also adds a method keyword to tf2ss, plus some documentation pointing out the new functionality and the slycot bug.

    Reacted by Tim
  5. murrayrm
    added
    onholdWaiting for changes or inputWaiting for changes or input
    on Oct 22, 2023
  6. murrayrm
    linked a pull request that will close this issueAdd unit test illustrating issue #935 + add method keyword for tf2ss #937on Oct 22, 2023
  7. murrayrm
    removed a link to a pull requestAdd unit test illustrating issue #935 + add method keyword for tf2ss #937on Oct 22, 2023
  8. murrayrm commented on Nov 23, 2024

    @murrayrm
    murrayrm
    on Nov 23, 2024
    Member
    More actions

    Closing this out since this is no longer a python-control issue.

  9. murrayrm
    closed this as completedon Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @murrayrm
    murrayrm

Labels

onholdWaiting for changes or inputWaiting for changes or input

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.