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 — Bugs in InterconnectedSystem: different dt's [fixed] and non-proper TFs [open] · Issue #399 · python-control/python-control

Bugs in InterconnectedSystem: different dt's [fixed] and non-proper TFs [open] #399

New issue
Copy link
New issue
Copy link
Closed
#492
#490
Closed
Bugs in InterconnectedSystem: different dt's [fixed] and non-proper TFs [open]#399
#492
#490
Copy link
Assignees
murrayrm
Labels
bug
Milestone
0.9.0

Description

@samlaf
samlaf
opened on May 14, 2020
Issue body actions

Hi, I found a bug in InterconnectedSystem when connecting two systems with different dt, one of which is None. I believe the correct semantic is for the new system to take the dt of the non-None system, but the way it is implemented, the order of the systems matters.

import control as ct
sys1 = ct.tf2io(ct.tf('s'))
sys2 = ct.NonlinearIOSystem(lambda t,x,u: x, name='sys2', states=('x'), inputs=('u'))
ct.InterconnectedSystem((sys2,sys1))

This code works, but changing the order of sys1 and sys2, as in ct.InterconnectedSystem((sys1,sys2)) gives a bug:

TypeError Traceback (most recent call last)
in
2 sys1 = ct.tf2io(ct.tf('s'))
3 sys2 = ct.NonlinearIOSystem(lambda t,x,u: x, name='sys2', states=('x'), inputs=('u'))
----> 4 ct.InterconnectedSystem((sys1,sys2))

/usr/local/lib/python3.7/site-packages/control-0.8.3-py3.7.egg/control/iosys.py in init(self, syslist, connections, inplist, outlist, inputs, outputs, states, params, dt, name)
892 dt = sys.dt
893 elif dt != sys.dt:
--> 894 raise TypeError("System timebases are not compatible")
895
896 # Make sure number of inputs, outputs, states is given

TypeError: System timebases are not compatible

Activity

  1. murrayrm
    added this to the 0.8.4 milestone on Jul 11, 2020
  2. murrayrm
    added
    bug
    on Jul 11, 2020
  3. murrayrm
    self-assigned this
    on Jul 11, 2020
  4. bnavigator
    removed this from the 0.8.4 milestone on Aug 17, 2020
  5. bnavigator
    linked a pull request that will close this issueDefault dt is 0 #431on Aug 17, 2020
  6. bnavigator
    added this to the 0.9.0 milestone on Aug 17, 2020
  7. bnavigator commented on Aug 17, 2020

    @bnavigator
    bnavigator
    on Aug 17, 2020
    Contributor
    More actions

    Fixed by #431, but that will likely have to wait until 0.9.0. Reassigning milestone.

  8. bnavigator
    linked a pull request that will close this issueRebased #431: Default dt is 0 #490on Dec 31, 2020
  9. murrayrm commented on Dec 31, 2020

    @murrayrm
    murrayrm
    on Dec 31, 2020
    Member
    More actions

    I checked and #490 (rebased #431) fixes the initial bug that was reported regarding mixed timebases.

    However, it uncovered another bug: the command sys1 = ct.tf2io(ct.tf('s')) tries to generate a state space system having transfer function s (differentiator). This is not possible since you state space systems always have proper transfer functions and s is not proper => it should generate an error.

    Leaving this bug open until this is fixed. I'll also update the title.

  10. murrayrm
    changed the title [-]Bug in InterconnectedSystem[/-] [+]Bugs in InterconnectedSystem: different dt's [fixed] and non-proper TFs [open][/+] on Dec 31, 2020
  11. murrayrm
    linked a pull request that will close this issuegenerate error for tf2ss of non-proper transfer function #492on Dec 31, 2020
  12. bnavigator
    closed this as completedin #490on Dec 31, 2020
  13. bnavigator
    reopened this on Dec 31, 2020
  14. bnavigator
    closed this as completedin #492on Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @murrayrm
    murrayrm

Labels

bug

Type

No type

Projects

No projects

    Milestone

    • 0.9.0

    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.