fix issue with multiplying MIMO LTI system by scalar by murrayrm · Pull Request #1078 · python-control/python-control
Navigation Menu
{{ message }}
python-control / python-control Public
- Notifications You must be signed in to change notification settings
- Fork 453
Merged
slivingston merged 4 commits intopython-control:mainfrom
Dec 11, 2024Merged
fix issue with multiplying MIMO LTI system by scalar#1078
slivingston merged 4 commits intopython-control:mainfrom
fix issue with multiplying MIMO LTI system by scalar#1078
slivingston merged 4 commits intopython-control:mainfrom
Conversation
Copy link Copy Markdown
Member
This PR addresses #1075 and also fixes a small bug with constant FRD systems with small numbers of frequency points.
Changes:
- Multiplying (*), adding (+), or subtracting (-) a constant from any (MIMO) LTI object now acts element-wise (same as ndarray's). This fixes a bug where multiplying a MIMO LTI system by a constant was multiplying by a matrix filled with the constant rather than a diagonal matrix (scaled identity).
- Specifying an FRD system with fewer than 4 frequency points was generating an error because the default settings try to set up a smooth (interpolating) response and the default degree of the fit was 3. The SciPy interpolation function requires k+1 data points for a degree k fit, so an exception was generated.
- Added unit tests that catch the bug in Multiplying a MIMO
TransferFunctionby1.0multiplies by a matrix of ones, not identity #1075 but also check across all LTI system representations (frd, ss, tf).
murrayrm
mentioned this pull request
Copy link Copy Markdown
slivingston
self-requested a review
slivingston reviewed Dec 10, 2024
control/xferfcn.py
Outdated
Show resolved
Hide resolved
control/xferfcn.py Outdated Show resolved Hide resolved
slivingston reviewed Dec 10, 2024
control/xferfcn.py
Outdated
Show resolved
Hide resolved
control/xferfcn.py Outdated Show resolved Hide resolved
slivingston reviewed Dec 10, 2024
control/xferfcn.py
Outdated
Show resolved
Hide resolved
control/xferfcn.py Outdated Show resolved Hide resolved
slivingston added 3 commits
December 10, 2024 16:03
slivingston
merged commit
8b6d041
into
python-control:main
murrayrm
added this to the
0.10.2 milestone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment