GP Discrete Time State Space Models #15
Labels
documentation
Improvements or additions to documentation
Content-Length: 243154 | pFad | http://github.com/hilo-mpc/hilo-mpc/issues/15
71
@brunomorampc I am trying to use a GP Model in an MPC setting where I am trying to write the state-space equations as
x1(t+1) = gp1(x(t), u(t))
x2(t+1) = gp2(x(t),u(t)),
where x = [x1;x2], u = [u1;u2]
I have currently written code as follows. However I am still stuck at writing the correct syntax for writing gp into the equation. I would really appreciate some help with this.
Thank you in advance!
Create GP Prediction Model
gp_model = Model(plot_backend='bokeh', name='GP_Model', discrete=True)
Set states and inputs
s = gp_model.set_dynamical_states(['x1','x2'])
u = gp_model.set_inputs(['u1','u2'])
gp_model.set_measurement_equations([s[0], s[1]])
x1 = s[0]
x2 = s[1]
u1 = u[0]
u2 = u[1]
x_next = gp1.predict([x1,x2,u1,u2])
y_next = gp2.predict([x1,x2,u1,u2])
gp_model.set_dynamical_equations(['x1', 'x2' ])
Set up the model
gp_model.setup(dt=0.01)
Set initial conditions
x0_GP = [1, 1]
gp_model.set_initial_conditions(x0=x0_GP)
The text was updated successfully, but these errors were encountered: