I am trying to use sysid to regress an ARX model periodically, then evaluate the predictive ability of that model by simulating with the future inputs and comparing the output with the experimental data. When I try to solve using m.solve() I get the following error: Exception: Data arrays must have the same length, and match time discretization in dynamic problems
The following is an MRE:
X = [[ 0.9, 0.], [ 0.9, 0.],[ 0.9,0.],[ 0.9,0.],[ 0.9, 0.],[ 0.5,0.],[0.5,0.],[0.5,0.],[0.5,0.], [ 0.5, 0.]] # 2 values for inputs at each time step
Y = [20.3, 20.3, 20.2, 20.2, 20.1, 20.1, 20.1, 20., 19.9, 19.8,] # 1 output at each time step
t = np.linspace(0, 9*300, 10) # 10 points 5 minutes apart each
na = 1 # output coefficients
nb = 2 # input coefficients
res, p, K = m.sysid(t, X, Y, na, nb, pred='meas')
m.time = t - t[0]
y_, u_ = m.arx(p)
u_[0].value = X[0]
u_[1].value = X[1]
m.options.imode = 4
m.options.nodes = 2
# simulate
m.solve()
I don't want to control, rather apply the experimental values to future timesteps and see how the ARX model extrapolates.
Thanks for your help
