make_step¶
Class method.
-
do_mpc.simulator.Simulator.
make_step
(self, u0, x0=None, z0=None, 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
x0
is stored as a class attribute but can optionally be supplied. The algebraic statesz0
can also be supplied, if they are defined in the model but are only used as an intial guess.Finally, the method can be called with values for the process noise
w0
and the measurement noisev0
that were (optionally) defined in thedo_mpc.model.Model
. Typically, these values should be sampled from a random distribution, e.g.np.random.randn
for a random normal distribution.The method prepares the simulator by setting the current parameters, calls
simulator.simulate()
and updates thedo_mpc.data
object.Parameters: - u0 (numpy.ndarray) – Current input to the system.
- x0 (numpy.ndarray (optional)) – Current state of the system.
- z0 (numpy.ndarray (optional)) – Initial guess for current algebraic states
- v0 (numpy.ndarray (optional)) – Additive measurement noise
- w0 (numpy.ndarray (optional)) – Additive process noise
Returns: x_nsext
Return type: numpy.ndarray
This page is auto-generated. Page source is not available on Github.