Model Predictive Control (MPC)

MPC is used to optimize control inputs by approximating a reference trajectory using dt, N and T variables in a finite(2-3 seconds) time-horizon.

This reference trajectory should encompass very small values of dt which will be multiplied by N (should be a number that when multiplied by dt is 2-3 seconds) to create a full low cost vector of control inputs for a finite time-horizon,.

This vector which encompasses also future constraints (2-3 seconds ahead) is in fact the discrete path between each action, which is calculated repeatedly between each action, but only the first vector step is taken in each action before calculated again.

In the case of latency the MPC can be helpful because it can recieve a future model state done by a Real Time model-simulation and provide a good approximation of the action that should be taken on a later time.