  Model Predictive Control (MPC) is a powerful and flexible design tool of
high-performance controllers for physical systems in the presence of input and
output constraints. A challenge for the practitioner applying MPC is the need
of tuning a large number of parameters such as prediction and control horizons,
weight matrices of the MPC cost function, and observer gains, according to
different trade-offs. The MPC design task is even more involved when the
control law has to be deployed to an embedded hardware unit endowed with
limited computational resources. In this case, real-time system requirements
limit the complexity of the applicable MPC configuration, engendering
additional design tradeoffs and requiring to tune further parameters, such as
the sampling time and the tolerances used in the on-line numerical solver. To
take into account closed-loop performance and real-time requirements, in this
paper we tackle the embedded MPC design problem using a global, data-driven,
optimization approach We showcase the potential of this approach by tuning an
MPC controller on two hardware platforms characterized by largely different
computational capabilities.
