Skip to content

Commit 1de184e

Browse files
bnavigatormurrayrm
authored andcommitted
fix testMimoW123 (#320)
1 parent 7e8a08a commit 1de184e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

control/tests/robust_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def testMimoW3(self):
245245
@unittest.skipIf(not slycot_check(), "slycot not installed")
246246
def testMimoW123(self):
247247
"""MIMO plant with all weights"""
248-
from control import augw, ss, append
248+
from control import augw, ss, append, minreal
249249
g = ss([[-1., -2], [-3, -4]],
250250
[[1., 0.], [0., 1.]],
251251
[[1., 0.], [0., 1.]],
@@ -295,10 +295,10 @@ def testMimoW123(self):
295295
self.siso_almost_equal(w2[1, 1], p[3, 3])
296296
# u->z3 should be w3*g
297297
w3g = w3 * g;
298-
self.siso_almost_equal(w3g[0, 0], p[4, 2])
299-
self.siso_almost_equal(w3g[0, 1], p[4, 3])
300-
self.siso_almost_equal(w3g[1, 0], p[5, 2])
301-
self.siso_almost_equal(w3g[1, 1], p[5, 3])
298+
self.siso_almost_equal(w3g[0, 0], minreal(p[4, 2]))
299+
self.siso_almost_equal(w3g[0, 1], minreal(p[4, 3]))
300+
self.siso_almost_equal(w3g[1, 0], minreal(p[5, 2]))
301+
self.siso_almost_equal(w3g[1, 1], minreal(p[5, 3]))
302302
# u->v should be -g
303303
self.siso_almost_equal(-g[0, 0], p[6, 2])
304304
self.siso_almost_equal(-g[0, 1], p[6, 3])

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy