2

As I understand Model Predictive Control (MPC) in practice takes the form of a convex QP something like $$\min_{u_1,...,u_T,x_1,...,x_T} \sum_{t=1}^{T}(x_t-r_t)^{T}Q_t(x_t-r_t) + u_t^{T}R_tu_t$$ $$s.t. \ Ax_t+Bu_t=x_{t+1} \ \forall t \in \{1,...,T-1\} $$ and there can be additional constraints on state or control.

Where $r_t$ are the reference states.

Say we have reference waypoints $w_1,...,w_m$ that we want to track such as going around a turn in a car. We don't know what time it is possible to get there without solving the QP so how do we decide the relationships between waypoints and references?

I've seen blog posts based on a Udemy course that fit a polynomial to these waypoints and but they don't detail how the polynomial is used to construct the objective.

Edit: Upon doing a little more research it seems this is a question of taking a path (ordered set of states without time info according to these answers) $w_1,...,w_m$ and turning it into a suitable reference trajectory $r_1,...,r_T$ for a model predictive controller. Which I don't know how to do but at least I know the correct terminology.

Arashium
  • 2,569

1 Answers1

2

This question has not been answered for a long time so, I respond to this.

I am not fully sure that I have understood your point. So, please clarify where I am wrong.

The first point is that the driving is a nonlinear system. So, better using nonlinear MPC (NMPC) for it than a linear MPC. So the cost function will more look like a complicated cost like $J = \min \sum_{t=1}^{N_p} f(t,\boldsymbol u(t),\boldsymbol x(t,\boldsymbol u(t)))$.

Second point, what is really optimized?

  • the path error subjected to steering as input and constant velocity

  • Reaching a less error and driving a longer path within the prediction time.

  • etc

Also, the car trajectory is a nonlinear function of states and the input. Once the input and initial state is clear, the rest of states will be calculated as a nonlinear function of them. For any known input the car trajectory is clear. The goal is to optimize input $\boldsymbol u(t)$ for minimizing the cost function. Apparently, the reference trajectory is a function of car trajectory itself.

Arash
  • 1,201