Skip to content

create_statefbk_iosystem sets system name incorrectly #848

Description

@murrayrm

The create_statefbk_iosystem sets the name of the closed loop system that it creates to one of the system inputs. For example:

import numpy as np
import control as ct
sys = ct.ss([[0, 10], [-1, 0]], [[0], [1]], np.eye(2), 0, name='sys')
K, _, _ = ct.lqr(sys, np.eye(sys.nstates), np.eye(sys.ninputs))
ctrl, clsys = ct.create_statefbk_iosystem(sys, K)
print(clsys)

gives

<LinearICSystem>: u[0]
Inputs (3): ['xd[0]', 'xd[1]', 'ud[0]']
Outputs (3): ['y[0]', 'y[1]', 'u[0]']
States (2): ['sys_x[0]', 'sys_x[1]']

which has the name of the system as u[0] instead of something like sys[3].

Activity

  1. self-assigned this
    on Jan 14, 2023
  2. linked a pull request that will close this issueSmall fixes based on Caltech CDS 112 course #849on Jan 14, 2023
  3. henklaak commented on Feb 1, 2023

    @henklaak
    Contributor

    Problem is in the iosys.py 2871, where 'name' variable gets clobbered.

    Submitted PR.

  4. henklaak commented on Feb 2, 2023

    @henklaak
    Contributor

    Close?

  5. bnavigator commented on Feb 2, 2023

    @bnavigator
    Contributor

    Closed by #857

  6. linked a pull request that will close this issueFix Interconnect name clobbering #857on Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions