Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
9acbfbb
fix issue with multiplying MIMO LTI system by scalar
murrayrm Dec 7, 2024
fed6c8d
Merge pull request #1 from murrayrm/fix_scalar_tfops-06Dec2024
sdahdah Dec 9, 2024
acc5086
Add append for FRD
sdahdah Dec 9, 2024
686a9b3
Add SISO FRD append test
sdahdah Dec 9, 2024
94481ac
Add MIMO FRD test
sdahdah Dec 9, 2024
053c3c6
Add append for TFs
sdahdah Dec 9, 2024
b6b032f
Move tf_close_coeff to xferfcn
sdahdah Dec 9, 2024
09fca2c
Add append TF tests
sdahdah Dec 9, 2024
aafaa06
Make append() return type of first argument
sdahdah Dec 13, 2024
4cf26b5
Implement transfer function __mul__ dimension promotion
sdahdah Dec 13, 2024
0f59701
Implement TF __rmul__
sdahdah Dec 13, 2024
7aaf355
Add TF __truediv__ and __rtruediv__
sdahdah Dec 13, 2024
3cea5c5
Add __mul__, __rmul__, __truediv__, and __rtruediv__ tests
sdahdah Dec 13, 2024
7dcf256
Rename promoted_self to self
sdahdah Dec 13, 2024
8212a86
Change way bdalg is imported to avoid circular import and add broadca…
sdahdah Dec 13, 2024
525e245
Add failing unit test
sdahdah Dec 13, 2024
cf5a0ab
Implement SS __rmul__ and add __mul__ unit tests
sdahdah Dec 16, 2024
7de9715
Add pow, truediv, and rtruediv
sdahdah Dec 18, 2024
76f9c9f
Fix type conversion error
sdahdah Dec 18, 2024
5636061
Add more truediv and rtruediv tests
sdahdah Dec 18, 2024
a5fe1c1
Add __mul__ and __rmul__ for frdata
sdahdah Dec 19, 2024
cda9afe
Add more __mul__ and __rmul__ frd tests
sdahdah Dec 19, 2024
bbf605d
Add MIMO-SISO truediv and rtruediv
sdahdah Dec 19, 2024
508bc8b
Add MIMO-SISO add for TF
sdahdah Dec 19, 2024
021e34c
Add TF add, sub, radd, rsub tests
sdahdah Dec 19, 2024
4f6fab7
Add SS SISO MIMO add, sub, radd, rsub tests
sdahdah Dec 19, 2024
e0c86a3
Add FRD add promotion
sdahdah Dec 19, 2024
a4afa39
Add FRD add, sub, radd, rsub tests
sdahdah Dec 19, 2024
3e82260
Merge branch 'main' into main
sdahdah Dec 19, 2024
e5358df
Remove randomized state-space matrices
sdahdah Dec 19, 2024
123914b
Add slycotonly to tests
sdahdah Dec 19, 2024
0de8c28
Add split_tf and combine_tf to docs
sdahdah Dec 19, 2024
ff63613
Replace control with ct to fix doctests
sdahdah Dec 19, 2024
bf7f40d
Remove line breaks messing up doctest
sdahdah Dec 19, 2024
612d19b
Fix combine_tf docstring typo
sdahdah Dec 20, 2024
d9a28e5
Merge branch 'main' of github.com:python-control/python-control
sdahdah Jan 17, 2025
e89a727
Use new _ifunc instead of ifunc
sdahdah Jan 17, 2025
2b59fab
Fix typos in docstrings
sdahdah Jan 17, 2025
4a1e034
Adjust indentation style mismatch
sdahdah Jan 17, 2025
9a03dd2
Change some tests to SS comparison instead of TF
sdahdah Jan 17, 2025
ce2f2aa
Get rid of redundant check
sdahdah Jan 17, 2025
ccf9ce1
Update docstring hashes
sdahdah Jan 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add TF add, sub, radd, rsub tests
  • Loading branch information
sdahdah committed Dec 19, 2024
commit 021e34c5140a8ef2562bb9c928cc5f1579573fae
26 changes: 26 additions & 0 deletions control/tests/xferfcn_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,32 @@ def test_pow(self):
with pytest.raises(ValueError):
TransferFunction.__pow__(sys1, 0.5)

def test_add_sub_mimo_siso(self):
for op in [
TransferFunction.__add__,
TransferFunction.__radd__,
TransferFunction.__sub__,
TransferFunction.__rsub__,
]:
tf_mimo = TransferFunction(
[
[[1], [1]],
[[1], [1]],
],
[
[[10, 1], [20, 1]],
[[20, 1], [30, 1]],
],
)
tf_siso = TransferFunction([1], [5, 0])
tf_arr = ct.split_tf(tf_mimo)
expected = ct.combine_tf([
[op(tf_arr[0, 0], tf_siso), op(tf_arr[0, 1], tf_siso)],
[op(tf_arr[1, 0], tf_siso), op(tf_arr[1, 1], tf_siso)],
])
result = op(tf_mimo, tf_siso)
assert _tf_close_coeff(expected.minreal(), result.minreal())

@pytest.mark.parametrize(
"left, right, expected",
[
Expand Down