コード例 #1
0
    def testSISOssdata(self, siso):
        """Call ssdata()

        At least test for consistency between ss and tf
        """
        ssdata_1 = ssdata(siso.ss2)
        ssdata_2 = ssdata(siso.tf2)
        for i in range(len(ssdata_1)):
            np.testing.assert_array_almost_equal(ssdata_1[i], ssdata_2[i])
コード例 #2
0
 def __init__(self, dt):
     num = np.array([0.01, 0.01, 0.02])
     den = np.array([0.001, 1, 0])
     sys_tf = ctrl.tf(num, den)
     self.A, self.B, self.C, self.D = ctrl.ssdata(
         ctrl.c2d(sys_tf, dt, 'foh'))
     self.X = np.zeros((self.A.shape[0]))
コード例 #3
0
 def testMIMOssdata(self, mimo):
     """Test ssdata() MIMO"""
     m = (mimo.ss1.A, mimo.ss1.B, mimo.ss1.C, mimo.ss1.D)
     ssdata_1 = ssdata(mimo.ss1)
     for i in range(len(ssdata_1)):
         np.testing.assert_array_almost_equal(ssdata_1[i], m[i])