make_step¶
Class method.
-
do_mpc.simulator.Simulator.make_step(self, u0, v0=None, w0=None)¶ Main method of the simulator class during control runtime. This method is called at each timestep and computes the next state or the current control input
u0. The method returns the resulting measurement, as defined indo_mpc.model.Model.set_meas.The initial state
x0is stored as a class attribute. Use this attributex0to change the initial state. It is also possible to supply an initial guess for the algebraic states through the attributez0and by callingset_initial_guess().Finally, the method can be called with values for the process noise
w0and the measurement noisev0that were (optionally) defined in thedo_mpc.model.Model. Typically, these values should be sampled from a random distribution, e.g.np.random.randnfor a random normal distribution.The method prepares the simulator by setting the current parameters, calls
simulator.simulate()and updates thedo_mpc.dataobject.Parameters: - u0 (numpy.ndarray) – Current input to the system.
- v0 (numpy.ndarray (optional)) – Additive measurement noise
- w0 (numpy.ndarray (optional)) – Additive process noise
Returns: y_next
Return type: numpy.ndarray
This page is auto-generated. Page source is not available on Github.