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

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

Closed
Assignees
murrayrm
Labels
Milestone
@samlaf

Description

@samlaf

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 ctsys1 = 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 inct.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 ininit(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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp