I am looking for an example in Matlab or Python that will show how to solve the optimization problem when we do not have a classic model in the state space, only a model, e.g. in the form of a nuron network or only u and y.
Model predictive control (MPC) is an established control methodology that systematically uses forecasts to compute real-time optimal control decisions. In MPC, at each time step an optimization problem is solved over a moving horizon.