Skip to content
","upvoteCount":1,"answerCount":3,"acceptedAnswer":{"@type":"Answer","text":"

You can accomplish this interconnection using the following:

\n
    sys = ct.interconnect(\n        [sys1, sys2],\n        connections=None,\n        inplist=[\n            ['sys1.u1', 'sys2.u2']      # Input connects to multiple signals\n        ],\n        inputs='external_input',\n        outlist=['sys1.pos', 'sys2.pos'],\n        outputs=['pos1', 'pos2'],\n    )    \n
\n

The reason this works is that if you specify a list as an entry for inplist, it will connect that input (external_input) here to all of the signals in that list.

\n

I also like the alternative syntax you have proposed above, so I've added issue #1049 to track its implementation.

","upvoteCount":1,"url":"https://github.com/python-control/python-control/discussions/1047#discussioncomment-10923719"}}}
Discussion options

You must be logged in to vote

You can accomplish this interconnection using the following:

    sys = ct.interconnect(
        [sys1, sys2],
        connections=None,
        inplist=[
            ['sys1.u1', 'sys2.u2']      # Input connects to multiple signals
        ],
        inputs='external_input',
        outlist=['sys1.pos', 'sys2.pos'],
        outputs=['pos1', 'pos2'],
    )    

The reason this works is that if you specify a list as an entry for inplist, it will connect that input (external_input) here to all of the signals in that list.

I also like the alternative syntax you have proposed above, so I've added issue #1049 to track its implementation.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@corbinklett
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by corbinklett
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants