  This paper investigates controller identification given data from a Model
Predictive Controller (MPC) with constraints. We propose an approach for
learning MPC that explicitly uses the gradient information in the training
process. This is motivated by the observation that recent differentiable convex
optimization MPC solvers can provide both the optimal feedback law from the
state to control input as well as the corresponding gradient. As a proof of
concept, we apply this approach to explicit MPC (eMPC), for which the feedback
law is a piece-wise affine function of the state, but the number of pieces
grows rapidly with the state dimension. Controller identification can here be
used to find an approximate lower complexity functional approximation of the
controller. The eMPC is modelled with a Neural Network (NN) with Rectified
Linear Units (ReLUs), since such NN can represent any piece-wise affine
function. A motivation is to replace on-line solvers with neural networks to
implement MPC and to simplify the evaluation of the function in larger input
dimensions. We also study experimental design and model evaluation in this
framework, and propose a hit and run sampling algorithm for input design. The
proposed algorithm are illustrated and numerically evaluated on a second order
MPC problem.
