8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf6c446 commit 2c25b73Copy full SHA for 2c25b73
control/tests/modelsimp_test.py
@@ -50,6 +50,18 @@ def testModredMatchDC(self):
50
np.testing.assert_array_almost_equal(rsys.C, Crtrue,decimal=3)
51
np.testing.assert_array_almost_equal(rsys.D, Drtrue,decimal=2)
52
53
+ def testModredUnstable(self):
54
+ # Check if an error is thrown when an unstable system is given
55
+ A = np.matrix('4.5418, 3.3999, 5.0342, 4.3808; \
56
+ 0.3890, 0.3599, 0.4195, 0.1760; \
57
+ -4.2117, -3.2395, -4.6760, -4.2180; \
58
+ 0.0052, 0.0429, 0.0155, 0.2743')
59
+ B = np.matrix('1.0, 1.0; 2.0, 2.0; 3.0, 3.0; 4.0, 4.0')
60
+ C = np.matrix('1.0, 2.0, 3.0, 4.0; 1.0, 2.0, 3.0, 4.0')
61
+ D = np.matrix('0.0, 0.0; 0.0, 0.0')
62
+ sys = ss(A,B,C,D)
63
+ np.testing.assert_raises(ValueError, modred, sys, [2, 3])
64
+
65
def testModredTruncate(self):
66
#balanced realization computed in matlab for the transfer function:
67
# num = [1 11 45 32], den = [1 15 60 200 60]
0 commit comments