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 — I/O system improvements: linearize, interconnect, docstrings by murrayrm · Pull Request #497 · python-control/python-control

Conversation

@murrayrm

@murrayrm murrayrm commented Jan 2, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This PR implements a couple of enhancements for the I/O systems package, mainly related to linear systems:

  • The linearize command now preserves signal names for the linearized system, so that you can use signal names when forming and InterconnectedSystem.

  • Interconnections of LinearIOSystems are now treated as LinearICSystems (a subclass of InterconnectedSystem and LinearIOSystem) so that StateSpace functions will still work on them and they still keep track of the underlying interconnection structure.

  • There is now an interconnect function that allows the construction of an LinearICSystems or a InterconnectedSystem depending on whether the subsystems are all linear or not. This basically serves as a replacement for the connect function for LTI systems and allows named interconnection of linear or nonlinear systems.

In addition, I cleaned up the description for how to specify interconnections so that tuples are only used for the lowest level signal descriptions; everything else is a list. (Tuples will still work, but there are some ambiguities when you use tuples since outlist=(3, 2, 1) could be interpreted as a signal description for a single signal (subsystem 3, signal 2, with gain 1) or as a list of signals for SISO systems (the single outputs from subsystems 3, 2, and 1).

Additional small changes:

  • The rss and drss functions now allow the strictly_proper keyword, which sets the D matrix to zero. (I needed this to avoid occasional errors in unit tests for the interconnect function.

  • Added some configuration variables that allow you to change the way that states in interconnected systems are named (default was sys.state but is sys_state for 0.9+) and the way that duplicate systems are named (default was copy of sys but is sys$copy for 0.9+).

  • Added unit tests for all of the above.

  • Updated examples to match the newly documented conventions for signal list specification.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
murrayrm added 7 commits December 31, 2020 21:11
@murrayrm
allow naming of linearized system signals
fa041b6
@murrayrm
PEP8 cleanup
4f08382
@murrayrm
append _linearize for system name + unit tests
e343a33
@murrayrm
add keyword to geterate strictly proper rss systems
50e61a0
@murrayrm
update docs, tests for InterconnectedSystem + small refactoring of ga…
4e46c4a
…in parsing
@murrayrm
create LinearInterconnectedSystems for interconnections of linear sys…
da04036
…tems
@murrayrm
turn off selected unit tests for scipy-0.19
ff4a351
@coveralls

coveralls commented Jan 2, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.02%) to 87.51% when pulling 5ed0f96 on murrayrm:linearize_named_signals into 8f5d8e5 on python-control:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coveralls

coveralls commented Jan 2, 2021

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.2%) to 87.37% when pulling ff4a351 on murrayrm:linearize_named_signals into 383e7a4 on python-control:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

murrayrm added 3 commits January 2, 2021 14:59
@murrayrm
updated sphinx documentation + changed to LinearICSystem
4f04f48
@murrayrm
allow default linearized system name to be customized
14fc96e
@murrayrm
fix bug in iosys unit test (reset_defaults)
e767986
@murrayrm murrayrm mentioned this pull request Jan 4, 2021
TransferFunction array priority plus system type conversion checking #498
Merged
bnavigator
bnavigator reviewed Jan 4, 2021
View reviewed changes
Comment thread control/tests/iosys_test.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread control/tests/iosys_test.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread control/tests/iosys_test.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread control/tests/iosys_test.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread control/tests/iosys_test.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@murrayrm
use editdefaults fixture and matrixfilter mark for unit testing
488edf5
@murrayrm
murrayrm force-pushed the linearize_named_signals branch from 18ffe2e to 488edf5 Compare January 5, 2021 03:32
@bnavigator

bnavigator commented Jan 5, 2021

Copy link
Copy Markdown
Contributor

https://travis-ci.org/github/python-control/python-control/jobs/752920076#L2029

_______________ TestIOSys.test_linearize_named_signals[arrayout] _______________
....
E       PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
...
FAILED control/tests/iosys_test.py::TestIOSys::test_linearize_named_signals[arrayout]
FAILED control/tests/iosys_test.py::TestIOSys::test_sys_naming_convention[arrayout]
FAILED control/tests/iosys_test.py::TestIOSys::test_signals_naming_convention_0_8_4[arrayout]
FAILED control/tests/iosys_test.py::TestIOSys::test_duplicates[arrayout] - Pe...

Autouse fixture matarrayout defines matrixerrorfilter, which is not overridden by matrixfilter. You need to locally override matarrayout.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@murrayrm
fix issue with np.matrix deprecation in iosys_test.py
5ed0f96
@murrayrm
murrayrm merged commit 4103688 into python-control:master Jan 5, 2021
@murrayrm murrayrm mentioned this pull request Jan 6, 2021
Create functions for better indexing of MIMO transfer functions #256
Closed
@murrayrm
murrayrm deleted the linearize_named_signals branch January 14, 2021 07:05
@murrayrm murrayrm added this to the 0.9.0 milestone Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@bnavigator bnavigator bnavigator left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

0.9.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@murrayrm @coveralls @bnavigator
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.