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

Bug: Incorrect ValueError: incompatible timebases #754

Closed
Assignees
murrayrm
Labels
@dc5048

Description

@dc5048

Using control.series to connect several discrete state-space systems, all with dt=0.05, is resulting in "ValueError:Systems have incompatible timebases" from "common_timebase" in namedio.py line 340 in release 0.9.2.

File "/usr/local/anaconda3/envs/c/lib/python3.9/site-packages/control/bdalg.py", line 108, in series return reduce(lambda x, y:y*x, sysn, sys1)

File "/usr/local/anaconda3/envs/c/lib/python3.9/site-packages/control/bdalg.py", line 108, in return reduce(lambda x, y:y*x, sysn, sys1)

File "/usr/local/anaconda3/envs/c/lib/python3.9/site-packages/control/iosys.py", line 184, inmul newsys = InterconnectedSystem(

File "/usr/local/anaconda3/envs/c/lib/python3.9/site-packages/control/iosys.py", line 895, ininit dt = common_timebase(dt, sys.dt)

File "/usr/local/anaconda3/envs/c/lib/python3.9/site-packages/control/namedio.py", line 340, in common_timebase raise ValueError("Systems have incompatible timebases")

ValueError: Systems have incompatible timebases

In my case, the calling functioninit in iosys.py, line 895 is initializing "dt" as 0 from the global default then passing this as the first arg to common_timebase, while the second arg is the sys.dt from the first system in the list of systems being combined. This results in the ValueError. All systems in syslist have dt = 0.05 and pass common_timebase with each other when passed as args manually while stopped in debugger.

It seems like the intent for the objectinit functions in this module is probably that dt should be initialized as the dt of the first system in the syslist, but that is not what the code is doing.

As a work-around, running the same script with release 0.9.1 works.

Metadata

Metadata

Assignees

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