8000 A bug in bdalg.connect function · Issue #421 · python-control/python-control · GitHub
[go: up one dir, main page]

Skip to content
A bug in bdalg.connect function #421
Closed
@SeungKil-Paek

Description

@SeungKil-Paek

Dear all,

I found a bug in the connect function in the bdalg.py:

335: elif outp < 0 and -outp >= -sys.outputs:

if outp < 0, the index meant is -outp because the negative sign is to tell it is negative feedback.
(-outp) must be in the range [1, sys.outputs]. As outp < 0, -outp > 0 already. Hence, the remaining thing is that -outp <= sys.outputs. The code must be corrected like this:

335: elif outp < 0 and -outp <= sys.outputs:

Regards.

Seung-Kil

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0