GeezerVison is showing github.com — I/O system improvements: linearize, interconnect, docstrings by murrayrm · Pull Request #497 · python-control/python-control
Conversation
murrayrm
commented
Jan 2, 2021
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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.
coveralls
commented
Jan 2, 2021
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Coverage decreased (-0.02%) to 87.51% when pulling 5ed0f96 on murrayrm:linearize_named_signals into 8f5d8e5 on python-control:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Coverage decreased (-0.2%) to 87.37% when pulling ff4a351 on murrayrm:linearize_named_signals into 383e7a4 on python-control:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|