Ian David Lockhart Bogle and Michael Fairweather (Editors), Proceedings of the 22nd European Symposium on Computer Aided Process Engineering, 17 - 20 June 2012, London. c 2012 Elsevier B.V. All rights reserved. Run-to-Run MPC Tuning via Gradient Descent Gene A. Bunin, Fernando Fraire Tirado, Grégory François, and Dominique Bonvin Laboratoire d’Automatique, École Polytechnique Fédérale de Lausanne, CH-1015 Lausanne, Switzerland. Abstract A gradient-descent method for the run-to-run tuning of MPC controllers is proposed. It is shown that, with an assumption on process repeatability, the MPC tuning parameters may be brought to a locally optimal set. SISO and MIMO examples illustrate the characteris- tics of the proposed approach. Keywords: Model predictive control, Run-to-run adaptation, Gradient descent. 1. MPC Formulation and Tuning The success of model predictive control (MPC) is well documented. With the ability to explicitly handle constraints, to “look ahead”, and to calculate an adequate model-based control action even with a very rough linear model of the dynamics, its use has now expanded into many diverse fields and applications (Qin and Badgwell (2003)). MPC tuning, however, remains somewhat ad hoc. Though there now exists a fair body of literature for good heuristic tuning choices, which can allow an operator to tune the MPC offline before applying it to the real process (Garriga and Soroush (2010)), the obtained parameters will only be nominally optimal and, when the model uncertainty is significant, may be unable to yield satisfactory performance in practice. A particular case where this problem can be solved in a general, algorithmic manner is the one of batch processes, where the MPC controller may be asked to track the same reference profile many times – for example, when maintaining a cooling profile in a crystallizer (Shen et al. (1999)). In this paper, we propose to solve this run-to-run (or “batch-to-batch”) problem via gradient- descent optimization, noting that a simpler realization of what is essentially the same idea but with a single tuning parameter may be found in the work of Magni et al. (2009). Any MPC controller requires a dynamical model of the system, [ ˆ y k+1 , ..., ˆ y k+n ]= f (u k , ..., u k+n−1 ), that is able to predict how the outputs y ∈ R n y ×1 will evolve when driven by the inputs u ∈ R n u ×1 over some discrete prediction interval [k + 1, k + n] 1 . The majority of MPC schemes use this model to calculate the optimal control action at the current iteration k, u ∗ k , by solving the following problem over the constrained set U : minimize u k ,...,u k+n−1 k+n ∑ i=k+1 ‖Q(y set ,i − ˆ y i − d k )‖ + k+n−1 ∑ i=k ‖R(u i − u i−1 )‖ subject to u k , ..., u k+m−1 ∈ U ; u k+m+ j = u k+m−1 , ∀ j = 0, ..., n − m − 1 (1) where Q ∈ R n y ×n y , R ∈ R n u ×n u are diagonal weighting matrices, m is the control horizon, and d k is the output bias at the time instant k, which is estimated via the filtering law, d k = K(y k − ˆ y k )+(I n y − K)d k−1 , with K ∈ R n y ×n y a diagonal matrix of bias filters. 1 (ˆ ·) denotes a model-based prediction, while (·) denotes a measured value. 1