Skip to content

Commit 166fe9c

Browse files
committed
declare timebase in timeresp_test explicitely (python-control#431 independent)
1 parent 899b0e5 commit 166fe9c

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

control/tests/timeresp_test.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def siso_ss1(self):
4040
B = np.array([[5.], [7.]])
4141
C = np.array([[6., 8.]])
4242
D = np.array([[9.]])
43-
T = TSys(StateSpace(A, B, C, D))
43+
T = TSys(StateSpace(A, B, C, D, 0))
4444

4545
T.t = np.linspace(0, 1, 10)
4646
T.ystep = np.array([9., 17.6457, 24.7072, 30.4855, 35.2234,
@@ -55,7 +55,7 @@ def siso_ss1(self):
5555
def siso_ss2(self, siso_ss1):
5656
"""System siso_ss2 with D=0"""
5757
ss1 = siso_ss1.sys
58-
T = TSys(StateSpace(ss1.A, ss1.B, ss1.C, 0))
58+
T = TSys(StateSpace(ss1.A, ss1.B, ss1.C, 0, 0))
5959
T.t = siso_ss1.t
6060
T.ystep = siso_ss1.ystep - 9
6161
T.initial = siso_ss1.yinitial - 9
@@ -67,7 +67,7 @@ def siso_ss2(self, siso_ss1):
6767
@pytest.fixture
6868
def siso_tf1(self):
6969
# Create some transfer functions
70-
return TSys(TransferFunction([1], [1, 2, 1]))
70+
return TSys(TransferFunction([1], [1, 2, 1], 0))
7171

7272
@pytest.fixture
7373
def siso_tf2(self, siso_ss1):
@@ -108,7 +108,7 @@ def mimo_ss2(self, siso_ss2):
108108
C[1:, 2:] = siso_ss2.sys.C
109109
D = np.zeros((2, 2))
110110
T = copy(siso_ss2)
111-
T.sys = StateSpace(A, B, C, D)
111+
T.sys = StateSpace(A, B, C, D, 0)
112112
return T
113113

114114
# Create discrete time systems
@@ -164,7 +164,8 @@ def mimo_tf2(self, siso_ss2, mimo_ss2):
164164
# construct from siso to avoid slycot during fixture setup
165165
tf_ = ss2tf(siso_ss2.sys)
166166
T.sys = TransferFunction([[tf_.num[0][0], [0]], [[0], tf_.num[0][0]]],
167-
[[tf_.den[0][0], [1]], [[1], tf_.den[0][0]]])
167+
[[tf_.den[0][0], [1]], [[1], tf_.den[0][0]]],
168+
0)
168169
return T
169170

170171
@pytest.fixture
@@ -173,7 +174,8 @@ def mimo_dtf1(self, siso_dtf1):
173174
# construct from siso to avoid slycot during fixture setup
174175
tf_ = siso_dtf1.sys
175176
T.sys = TransferFunction([[tf_.num[0][0], [0]], [[0], tf_.num[0][0]]],
176-
[[tf_.den[0][0], [1]], [[1], tf_.den[0][0]]])
177+
[[tf_.den[0][0], [1]], [[1], tf_.den[0][0]]],
178+
True)
177179
return T
178180

179181
@pytest.fixture

0 commit comments

Comments
 (0)