@@ -565,6 +565,57 @@ def test_mul_mimo_siso(self, left, right, expected):
565565 np .testing .assert_array_almost_equal (expected_frd .omega , result .omega )
566566 np .testing .assert_array_almost_equal (expected_frd .fresp , result .fresp )
567567
568+ def test_truediv_mimo_siso (self ):
569+ omega = np .logspace (- 1 , 1 , 10 )
570+ tf_mimo = TransferFunction ([1 ], [1 , 0 ]) * np .eye (2 )
571+ frd_mimo = frd (tf_mimo , omega )
572+ ss_mimo = ct .tf2ss (tf_mimo )
573+ tf_siso = TransferFunction ([1 ], [1 , 1 ])
574+ frd_siso = frd (tf_siso , omega )
575+ expected = frd (tf_mimo .__truediv__ (tf_siso ), omega )
576+ ss_siso = ct .tf2ss (tf_siso )
577+
578+ # Test division of MIMO FRD by SISO FRD
579+ result = frd_mimo .__truediv__ (frd_siso )
580+ np .testing .assert_array_almost_equal (expected .omega , result .omega )
581+ np .testing .assert_array_almost_equal (expected .fresp , result .fresp )
582+
583+ # Test division of MIMO FRD by SISO TF
584+ result = frd_mimo .__truediv__ (tf_siso )
585+ np .testing .assert_array_almost_equal (expected .omega , result .omega )
586+ np .testing .assert_array_almost_equal (expected .fresp , result .fresp )
587+
588+ # Test division of MIMO FRD by SISO TF
589+ result = frd_mimo .__truediv__ (ss_siso )
590+ np .testing .assert_array_almost_equal (expected .omega , result .omega )
591+ np .testing .assert_array_almost_equal (expected .fresp , result .fresp )
592+
593+ def test_rtruediv_mimo_siso (self ):
594+ omega = np .logspace (- 1 , 1 , 10 )
595+ tf_mimo = TransferFunction ([1 ], [1 , 0 ]) * np .eye (2 )
596+ frd_mimo = frd (tf_mimo , omega )
597+ ss_mimo = ct .tf2ss (tf_mimo )
598+ tf_siso = TransferFunction ([1 ], [1 , 1 ])
599+ frd_siso = frd (tf_siso , omega )
600+ ss_siso = ct .tf2ss (tf_siso )
601+ expected = frd (tf_siso .__rtruediv__ (tf_mimo ), omega )
602+
603+ # Test division of MIMO FRD by SISO FRD
604+ result = frd_siso .__rtruediv__ (frd_mimo )
605+ np .testing .assert_array_almost_equal (expected .omega , result .omega )
606+ np .testing .assert_array_almost_equal (expected .fresp , result .fresp )
607+
608+ # Test division of MIMO TF by SISO FRD
609+ result = frd_siso .__rtruediv__ (tf_mimo )
610+ np .testing .assert_array_almost_equal (expected .omega , result .omega )
611+ np .testing .assert_array_almost_equal (expected .fresp , result .fresp )
612+
613+ # Test division of MIMO SS by SISO FRD
614+ result = frd_siso .__rtruediv__ (ss_mimo )
615+ np .testing .assert_array_almost_equal (expected .omega , result .omega )
616+ np .testing .assert_array_almost_equal (expected .fresp , result .fresp )
617+
618+
568619 @pytest .mark .parametrize (
569620 "left, right, expected" ,
570621 [
0 commit comments