@@ -208,7 +208,6 @@ def testStep(self, siso):
208
208
np .testing .assert_array_almost_equal (yout , youttrue , decimal = 4 )
209
209
np .testing .assert_array_almost_equal (tout , t )
210
210
211
- @slycotonly
212
211
def testStep_mimo (self , mimo ):
213
212
"""Test step for MIMO system"""
214
213
sys = mimo .ss1
@@ -267,7 +266,6 @@ def testImpulse(self, siso):
267
266
np .testing .assert_array_almost_equal (yout , youttrue , decimal = 4 )
268
267
np .testing .assert_array_almost_equal (tout , t )
269
268
270
- @slycotonly
271
269
def testImpulse_mimo (self , mimo ):
272
270
"""Test impulse() for MIMO system"""
273
271
t = np .linspace (0 , 1 , 10 )
@@ -296,7 +294,6 @@ def testInitial(self, siso):
296
294
np .testing .assert_array_almost_equal (yout , youttrue , decimal = 4 )
297
295
np .testing .assert_array_almost_equal (tout , t )
298
296
299
- @slycotonly
300
297
def testInitial_mimo (self , mimo ):
301
298
"""Test initial() for MIMO system"""
302
299
t = np .linspace (0 , 1 , 10 )
@@ -333,7 +330,6 @@ def testLsim(self, siso):
333
330
yout , _t , _xout = lsim (siso .ss1 , u , t , x0 )
334
331
np .testing .assert_array_almost_equal (yout , youttrue , decimal = 4 )
335
332
336
- @slycotonly
337
333
def testLsim_mimo (self , mimo ):
338
334
"""Test lsim() for MIMO system.
339
335
@@ -352,6 +348,25 @@ def testLsim_mimo(self, mimo):
352
348
yout , _t , _xout = lsim (mimo .ss1 , u , t , x0 )
353
349
np .testing .assert_array_almost_equal (yout , youttrue , decimal = 4 )
354
350
351
+ def test_lsim_mimo_dtime (self ):
352
+ # https://github.com/python-control/python-control/issues/764
353
+ time = np .linspace (0.0 , 511.0e-6 , 512 )
354
+ DAC = np .sin (time )
355
+ ADC = np .cos (time )
356
+
357
+ input_Kalman = np .transpose (
358
+ np .concatenate (([[DAC ]], [[ADC ]]), axis = 1 )[0 ])
359
+ Af = [[0.45768416 , - 0.42025511 ], [- 0.43354791 , 0.51961178 ]]
360
+ Bf = [[2.84368641 , 52.05922305 ], [- 1.47286557 , - 19.94861943 ]]
361
+ Cf = [[1.0 , 0.0 ], [0.0 , 1.0 ]]
362
+ Df = [[0.0 , 0.0 ], [0.0 , 0.0 ]]
363
+
364
+ ss_Kalman = ss (Af , Bf , Cf , Df , 1.0e-6 )
365
+ y_est , t , x_est = lsim (ss_Kalman , input_Kalman , time )
366
+ assert y_est .shape == (time .size , ss_Kalman .ninputs )
367
+ assert t .shape == (time .size , )
368
+ assert x_est .shape == (time .size , ss_Kalman .nstates )
369
+
355
370
def testMargin (self , siso ):
356
371
"""Test margin()"""
357
372
#! TODO: check results to make sure they are OK
@@ -582,7 +597,6 @@ def testSISOssdata(self, siso):
582
597
for i in range (len (ssdata_1 )):
583
598
np .testing .assert_array_almost_equal (ssdata_1 [i ], ssdata_2 [i ])
584
599
585
- @slycotonly
586
600
def testMIMOssdata (self , mimo ):
587
601
"""Test ssdata() MIMO"""
588
602
m = (mimo .ss1 .A , mimo .ss1 .B , mimo .ss1 .C , mimo .ss1 .D )
0 commit comments