Skip to content

fix testMimoW123 #320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2019
Merged
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions control/tests/robust_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def testMimoW3(self):
@unittest.skipIf(not slycot_check(), "slycot not installed")
def testMimoW123(self):
"""MIMO plant with all weights"""
from control import augw, ss, append
from control import augw, ss, append, minreal
g = ss([[-1., -2], [-3, -4]],
[[1., 0.], [0., 1.]],
[[1., 0.], [0., 1.]],
Expand Down Expand Up @@ -295,10 +295,10 @@ def testMimoW123(self):
self.siso_almost_equal(w2[1, 1], p[3, 3])
# u->z3 should be w3*g
w3g = w3 * g;
self.siso_almost_equal(w3g[0, 0], p[4, 2])
self.siso_almost_equal(w3g[0, 1], p[4, 3])
self.siso_almost_equal(w3g[1, 0], p[5, 2])
self.siso_almost_equal(w3g[1, 1], p[5, 3])
self.siso_almost_equal(w3g[0, 0], minreal(p[4, 2]))
self.siso_almost_equal(w3g[0, 1], minreal(p[4, 3]))
self.siso_almost_equal(w3g[1, 0], minreal(p[5, 2]))
self.siso_almost_equal(w3g[1, 1], minreal(p[5, 3]))
# u->v should be -g
self.siso_almost_equal(-g[0, 0], p[6, 2])
self.siso_almost_equal(-g[0, 1], p[6, 3])
Expand Down