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 — "Interconnect" input specification. · Issue #1015 · python-control/python-control

"Interconnect" input specification. #1015

New issue
Copy link
New issue
Copy link
Closed
#1017
Closed
"Interconnect" input specification.#1015
#1017
Copy link
Assignees
murrayrm
Labels
bug
Milestone
0.10.1

Description

@bonidydy
bonidydy
opened on Jun 29, 2024
Issue body actions

Hi,

In this code I want "interconnect" to build a system with just one input "sys.u1". It tries to create two inputs and as a result catches an exception. Am I getting it wrong?

import numpy as np
import control as ct

f = np.array([[-35, 1], [-225, -5]])
j = np.array([[0], [5]])
g = np.array([[-965], [-8775]])
cobs = np.eye(2)
dobs = np.zeros((2, 2))

a = np.array([[0, 1, 0], [0, -1, 1], [0, 0, -5]])
b = np.array([[0], [0], [5]])
c = np.array([[1, 0, 0]])
d = 0

plant = ct.ss(a, b, c, d,
              inputs=["u1"], outputs=["y1"], name="plant")
observer = ct.ss(f, np.hstack((g, j)), cobs, dobs,
                 inputs=["u1", "u2"], outputs=["y1", "y2"], name="observer")

sys = ct.interconnect([plant, observer],
                      connections=[["observer.u1", "plant.y1"]],
                      inplist=[["plant.u1", "observer.u2"]],
                      outlist=[["plant.y1"], ["observer.y1"], ["observer.y2"]],
                      inputs=["u1"],
                      outputs=["y1", "y2", "y3"],
                      debug=True)

Activity

  1. murrayrm
    self-assigned this
    on Jun 29, 2024
  2. murrayrm
    added
    bug
    on Jun 29, 2024
  3. murrayrm commented on Jun 29, 2024

    @murrayrm
    murrayrm
    on Jun 29, 2024
    Member
    More actions

    Looks like a bug in the way input (and output) lists are handled. The code is not catching the fact that a single input is going to multiple subsystems.

    Fix coming in a bit.

  4. murrayrm
    added a commit that references this issue on Jun 29, 2024

    fix interconnect() issue python-control#1015

    2e872f8
  5. murrayrm
    linked a pull request that will close this issuefix parallel input or output interconnect bug (issue #1015) #1017on Jun 29, 2024
  6. bonidydy commented on Jun 30, 2024

    @bonidydy
    bonidydy
    on Jun 30, 2024
    Author
    More actions

    It seems there is also a mistake in the documentation of "interconnect", "inplist" argument:

    inplist (list of input connections, optional) –
    List of connections for how the inputs for the overall system are mapped
    to the subsystem inputs. The input specification is similar to the form
    defined in the connection specification, except that connections do not
    specify an input-spec, since these are the system inputs. The entries for a
    connection are thus of the form:
    [input-spec1, input-spec2, …]

    I believe the bold text should be output-spec.

  7. murrayrm
    added this to the 0.10.1 milestone on Jun 30, 2024
  8. murrayrm
    added a commit that references this issue on Jun 30, 2024

    updated documentation per comment from @bonidydy in python-control#1015

    421131c
  9. murrayrm
    closed this as completedin #1017on Jul 7, 2024
  10. murrayrm
    added a commit that references this issue on Jul 7, 2024

    Merge pull request #1017 from murrayrm/interconnect_bug-29Jun2024

    8c1ddec
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.10.1No due date

    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.