'N': sc.N, 'm': sc.m, 'n': sc.n, 'A': sc.A, 'B': sc.B, 'C': sc.C, 'D': sc.D, 'P': sc.P, 'X': sc.X, 'F': sc.F, } m = MJLS(**args) (Fs, Ys, Ys_H) = mjlstd(p, m) Fs_H = [get_F(m, zeros_like(m.F), y).copy() for y in Ys_H] Ys_H_error = [(y - sc.X).flatten() for y in Ys_H] Fs_H_error = [(f - sc.F).flatten() for f in Fs_H] plt.figure(1) plt.subplot(211) plt.plot(Ys_H_error) plt.grid(True) plt.title("Initializing with \"Riccati\" data") plt.ylabel("Y(t) - X_ric") plt.xlabel("t") plt.subplot(212) plt.plot(Fs_H_error)
'n': sc.n, 'A': sc.A, 'B': sc.B, 'C': sc.C, 'D': sc.D, 'P': sc.P, 'F': sc.F, 'X': zeros_like(sc.X), } m = MJLS(**args) (Fs, Ys, Ys_H) = mjlstd(p, m) Fs_H = [] for y in Ys_H: f = get_F(m, zeros_like(m.F), y).copy() Fs_H.append(f) Ys_H_error = [y.flatten() for y in Ys_H] Fs_H_error = [f.flatten() for f in Fs_H] plt.figure(1) plt.subplot(211) plt.plot(Ys_H_error) plt.grid(True) plt.title("Initializing with \"Riccati\" data") plt.ylabel("Y(t) - X_ric") plt.subplot(212) plt.plot(Fs_H_error)
def test_get_F(self): npt.assert_array_almost_equal( mjlstd.get_F(self.mjls_obj, self.cf.F_0.copy(), self.cf.X_0), self.cf.F_0)