## 1. Introduction

There are a few advanced control methods, including model reference adaptive control [

1], fault-tolerant control [

2], stochastic control [

3], fuzzy control [

4] and Model Predictive Control (MPC) [

5,

6]. In particular, MPC algorithms make it possible to obtain excellent control quality in the case of Multiple-Input Multiple-Output (MIMO) processes with constraints. As a result, MPC methods have been used to numerous industrial processes [

7], e.g., chemical reactors [

8], distillation columns [

9], waste water treatment plants [

10], solar power stations [

11], cement kilns [

12], pasteurization plants [

13] and pulp digesters [

14]. In addition to that, MPC algorithms are more and more popular in other areas; example applications are: fuel cells [

15], active vibration attenuation [

16], combustion engines [

17], robots [

18], synchronous motors [

19], mechanical systems [

20], freeway traffic congestion control [

21] and autonomous driving [

22].

Tuning of MPC is an important issue since a good choice of parameters is likely to significantly increase control quality. The prediction and control horizons may be determined taking into account the process dynamics, the possible sampling period of the controller and the computational performance of the hardware platform used [

23,

24]. Additionally, it is possible to use the automatic tuning methodology [

25] in which a step response model is experimentally obtained from the process, and the horizons are chosen using some hands-on tuning rules. A thorough review on how to find proper MPC horizons was given in [

26]. On the other hand, the choice of numerous coefficients of the minimised MPC cost function is always an issue. This task is particularly important in the case of MIMO processes with strong interactions between the consecutive inputs and outputs. A few tuning methods have been discussed in the literature. In some simple cases, it is possible to explicitly calculate the tuning coefficients [

27,

28]. A tuning method based on the Robust Performance Number (RPN) was described in [

29]. It is also possible to dynamically calculate set-points for MPC to accommodate user-defined output importance [

30]. Multi-objective performance optimisation using the goal attainment approach was considered in [

31]. A thorough comparison of a few heuristic optimisation algorithms was reported in [

32] (the Particle Swarm Optimisation (PSO) method, the firefly algorithm, the grey wolf optimiser and the Jaya algorithm were used). An application of the genetic algorithm was described in [

12], whereas the PSO algorithm used to find the parameters of MPC with model uncertainty was considered in [

33]. In general, the optimisation-based tuning methods are very computationally demanding as there are numerous decision variables, which means that a large number of simulations must be performed. As a practical solution, a relatively computationally simple simulation optimisation tuning method presented in [

34] may be used. It needs only a very limited number of simulations. The considered tuning method was discussed in [

35] for the MPC employed for vehicle obstacle avoidance.

The tuning method discussed in [

34] typically uses step set-point changes. In this work, a more industrially practical scenario is considered, i.e., compensation of disturbances that affect the process. The disturbances considered include process uncontrolled inputs and measurement noises. For a MIMO distillation column, the tuning procedure is detailed. Two cases are considered: a perfect model case and a more practical case in which the model is characterised by some error. It is shown that the discussed tuning approach makes it possible to use very good control quality, much better than in the most common case in which all tuning parameters are constant. The multicriteria control assessment is used since the control quality is assessed taking into account three factors: the sum of squared errors, the Huber standard deviation and the entropy [

36,

37].

The article is structured in the following way. First, in

Section 2, the MPC task and its tuning parameters are recalled. Next, in

Section 3, the tuning procedure is detailed, and the indicators used for control quality assessment are defined.

Section 4 reports an application of the considered method for a MIMO distillation process with industrial disturbances. Finally,

Section 5 summarises the article.

## 2. MPC Problem Formulation

In this work, we deal with MIMO processes that have as many as

${n}_{\mathrm{u}}$ manipulated variables (inputs) and

${n}_{\mathrm{y}}$ controlled variables (outputs). Hence, the following vectors are used:

$u={\left[{u}_{1}\dots {u}_{{n}_{\mathrm{u}}}\right]}^{\mathrm{T}}$ and

$y={\left[{y}_{1}\dots {y}_{{n}_{\mathrm{y}}}\right]}^{\mathrm{T}}$. At each discrete sampling instant,

$k=0,1,\dots $, the MPC algorithm calculates on-line the vector of decision variables, which is defined by the increments of the future manipulated variables [

6]:

where

${N}_{\mathrm{u}}$ is the control horizon. The MPC decision variables (

1) are found as a result of a computational procedure in which the predicted control quality is optimised. An example of the minimised MPC cost function is:

The first part of the cost function measures the control errors predicted over the prediction horizon

N. The set-points and predicted values for the future sampling instant

$k+p$ known at the sampling instant

k are denoted by

${y}_{n}^{\mathrm{sp}}(k+p|k)$ and

${\widehat{y}}_{n}(k+p|k)$, respectively, for all process outputs, i.e.,

$n=1,\dots ,{n}_{\mathrm{y}}$. The role of the second part of the cost function is to minimise unwanted big changes of the manipulated variables. In some applications for the cost function (

2), the predicted squared values of the future manipulated variables may be also taken into account. The tuning coefficients are:

${\psi}_{p,n}\ge 0$ for

$p=1,\dots ,N$,

$n=1,\dots ,{n}_{\mathrm{y}}$ and

${\lambda}_{p,n}>0$ for

$p=0,\dots ,{N}_{\mathrm{u}}-1$,

$n=1,\dots ,{n}_{\mathrm{u}}$. Typically, the penalties

${\lambda}_{p,n}$ are chosen in such a way that the manipulated variables do not change rapidly. As far as the coefficients

${\psi}_{p,n}$ are concerned, the choice is more difficult. This is because these coefficients prioritise the predicted control errors of the consecutive controlled variables. Additionally, predicted control errors for different sampling instants over the prediction horizon may be taken into account in a different way. In practice, however, for simplicity, all coefficients

${\psi}_{p,n}$ are set to a constant value. Unfortunately, as is shown in

Section 4, this may deteriorate the resulting control quality. The cost function (

2) may be conveniently rewritten in a compact form:

where the set-point vector for the sampling instant

$k+p$ is denoted by

${y}^{\mathrm{sp}}(k+p|k)$, the predicted vector of the output variables for the sampling instant

$k+p$ is denoted by

$\widehat{y}(k+p|k)$ and both vectors are of length

${n}_{\mathrm{y}}$. The semidefinite-positive matrix

${\mathbf{\Psi}}_{p}=\mathrm{diag}({\psi}_{p,1},\dots ,{\psi}_{p,{n}_{\mathrm{y}}})$ is of dimensionality

${n}_{\mathrm{y}}\times {n}_{\mathrm{y}}$, and the definite-positive matrix

${\mathbf{\Lambda}}_{p}=\mathrm{diag}({\lambda}_{p,1},\dots ,{\lambda}_{p,{n}_{\mathrm{u}}})$ is of dimensionality

${n}_{\mathrm{u}}\times {n}_{\mathrm{u}}$. In practice, we usually consider some constraints put on process variables. The typical rudimentary MPC optimisation problem is:

where the vectors

${u}^{min}$ and

${u}^{max}$ define the minimal and maximal values of the manipulated variables, respectively, the vectors

$\u25b5{u}^{min}$ and

$\u25b5{u}^{max}$ define the minimal and maximal changes of the manipulated variables, respectively, and the vectors

${y}^{min}$ and

${y}^{max}$ define the minimal and maximal predicted values of the controlled variables, respectively. In spite of the fact that as many as

${n}_{\mathrm{u}}{N}_{\mathrm{u}}$ decision variables (

1) are computed at every sampling instant

k, only the first

${n}_{\mathrm{u}}$ of them are actually applied to the process; in the consecutive sampling instants, the whole calculation procedure is repeated.

In this work, the Dynamic Matrix Control (DMC) algorithm [

38] is considered. A characteristic feature of the DMC algorithm is the fact that for prediction, i.e., to calculate the scalars

${\widehat{y}}_{n}(k+p|k)$ or the vectors

$\widehat{y}(k+p|k)$, a discrete-time step-response model of the controlled process is used. The model may be obtained in a very simple way from the real process; no complicated identification algorithms need be used, which is a huge advantage. Since the step-response model is linear in terms of the manipulated variables, minimisation of the MPC optimisation task (

4) is, in fact, a quadratic optimisation problem. Details related to the implementation of the DMC algorithm for MIMO processes may be found in [

6].

## 3. MPC Tuning Procedure

When all parameters

${\psi}_{p,n}$ for

$p=1,\dots ,N$,

$n=1,\dots ,{n}_{\mathrm{y}}$ are optimised at the same time, the optimisation problem has as many as

${n}_{\mathrm{y}}N$ decision variables [

12,

32,

33]. For typical lengths of the prediction horizon and a few controlled variables, the resulting optimisation problem is quite difficult. In order to simplify the computational task, the discussed tuning method is based on the following two rules:

The tuning coefficients for only one manipulated variable are calculated at the same time, i.e., ${\psi}_{1,n},\dots ,{\psi}_{N,n}$, for the consecutive process outputs $n=1,\dots ,{n}_{\mathrm{y}}$.

If all the coefficients

${\psi}_{1,n},\dots ,{\psi}_{N,n}$ were optimised directly at the same time by a numerical optimisation procedure, we still would have as many as

N decision variables. As an alternative, that sequence of coefficients is parameterised using Gauss-like functions [

34]. At first, a very general approximation of the Gauss function is used in which for one point, the function has a value of

${K}_{n}$; for all other points, it has a default value equal to one:

The function (

5) is characterised by two parameters:

${m}_{n}$ and

${K}_{n}$. The first one defines the chosen sampling instant within the prediction horizon for which the function has the value of

${K}_{n}$. When the parameters

${m}_{n}$ and

${K}_{n}$ are selected, the trajectory of the weights is calculated precisely from the Gauss function:

where

${a}_{n}$ defines the spread.

All things considered, irrespective of the number of process outputs and the prediction horizon, in the discussed approach, there are always only three decision variables: ${m}_{n}$, ${K}_{n}$ and ${a}_{n}$. What is important is that they are not calculated at the same time, but always, only one parameter is found. Calculations are repeated for all process outputs, $n=1,\dots ,{n}_{\mathrm{y}}$. Unlike fully-fledged optimisation-based tuning methods, in our simulation-based approach, we simply assess how the consecutive parameters influence the value of the performance indices, and we choose the parameters for which the best results are possible. No numerical optimisation is used, but we simply evaluate the values of control the performance indices for a chosen set of tuning parameters. Of course, our procedure is suboptimal, i.e., one may expect that full numerical optimisation of all tuning parameters at the same time may give better results, but our procedure is deliberately rather uncomplicated and is recommended to be used in industrial applications in which all tuning parameters are usually constant.

The tuning procedure is comprised of the following steps:

The trajectory of the N coefficients ${\psi}_{1,n},\dots ,{\psi}_{N,n}$ is found for the controlled variable n. All other coefficients are tuned or have their default value.

- (a)
The best trajectory (

5) is found, i.e., its parameters

${m}_{n}$ and

${K}_{n}$ are determined.

The constant value of the parameter ${K}_{n}$ is assumed. Its value has to be larger than one, and it should result in a noticeable change in control quality in comparison with the control quality achieved for the scenario in which all coefficients ${\psi}_{p,n}=1$.

The performance indices are calculated from simulations of the MPC algorithm for a few values of the parameter ${m}_{n}$. It is recommended to start the tests from ${m}_{n}=N/2$ and analyse the results obtained in some neighbourhood of this value first.

The value of the parameter ${m}_{n}$ is chosen for which the performance indices are the best.

For the chosen value of ${m}_{n}$, the performance indices are calculated from the simulations of the MPC algorithm for a few values of the parameter ${K}_{n}$. This step should start with the values of the parameter that are lower than those assumed in the first step. Next, it is increased. It is recommended not to choose too large values of ${K}_{n}$ as this may result in dangerously large values of the manipulated variables.

The value of the parameter ${K}_{n}$ is chosen for which the performance indices are the best.

- (b)
The best trajectory (

6) is found, i.e., its parameter

${a}_{n}$ is determined.

The selected parameters ${m}_{n}$ and ${K}_{n}$ are used.

The performance indices are calculated from the simulations of the MPC algorithm for a few values of the parameter ${a}_{n}$. It is recommended to perform simulations starting from relatively low values of the parameter, e.g., ${a}_{n}=1$, and slowly increase it until it is clear that any further increment results in no improvement of control quality.

The value of the parameter ${a}_{n}$ is chosen for which the performance indices are the best.

Tuning is repeated for the consecutive manipulated variables, for $n=1,\dots ,{n}_{\mathrm{y}}$, i.e., the algorithm goes to Step 1.

Having completed the above procedure, the values of the coefficients

${\psi}_{1,n},\dots ,{\psi}_{N,n}$ are calculated from Equation (

6) for the found parameters

${a}_{n}$,

${K}_{n}$ and

${m}_{n}$, for all

$n=1,\dots ,{n}_{\mathrm{y}}$. The flowchart of the tuning procedure is depicted in

Figure 1.

Let us define the control error for the sampling instant

k and process output

n:

Although different performance criteria may be used to assess control accuracy, in this work, we use the multicriteria approach based on the following three indicators [

36,

39]:

the Sum of Squared Errors (${\mathrm{SSE}}_{n}$) of the control error ${e}_{n}$,

the Huber standard deviation ${\sigma}_{n}$ of the control error ${e}_{n}$,

the rational entropy ${H}_{n}$ of the control error ${e}_{n}$.

The above indicators are calculated for all $n=1,\dots ,{n}_{\mathrm{y}}$ controlled variables.

In addition to the Gauss function (

6), the application of other functions such as bell-shaped, triangular and trapezoidal ones was studied in [

34]. The tuning procedure is similar, i.e., we do not optimise all parameters at the same time, but the influence of the consecutive parameters is analysed, while the best ones are chosen. It turns out that the proposed Gauss function results in the best control quality. This conclusion is based on the authors’ experiences with various MPC control algorithms, applied to a few Single-Input Single-Output (SISO) and MIMO processes.

## 4. Simulation Results

The discussed tuning method is verified in the control system of a simulated binary distillation column, which separates a two component mixture of water and methanol. The linear approximation of the process (scaled) is described by the following transfer function model introduced by Wood and Berry [

40]:

The controlled variables, ${Y}_{1}$ and ${Y}_{2}$, are: the top product (distillate) composition and the bottom product composition, respectively. The manipulated variables, ${U}_{1}$ and ${U}_{2}$, are: the reflux flow rate and the vapour flow, respectively. The uncontrolled process input (the disturbance), F, is the flow rate of the input stream. All variables are deviations from a typical operating point, and all variables are dimensionless.

The sampling time of MPC is 1 min. To obtain a discrete process representation that is used to determine the step-response model necessary for prediction in the DMC algorithm [

6], we use the forward Euler method and the zero-order holder. As a result, the following transfer function representation of the model (

8) is obtained:

A resulting step-response model is obtained and next used for prediction in the DMC algorithm [

6].

The horizons used in the DMC algorithm are: the prediction horizon

$N=30$, the control horizon

${N}_{u}=5$ and the horizon of process dynamics

$D=100$ (the horizon of process dynamics is the number of step-response coefficients taken into account by the model used in the DMC algorithm) [

39]. All values of the weights that penalise the excessive increments of the manipulated variables, i.e.,

${\lambda}_{p,n}$, are equal to one. In this work, the objective of the controller is to effectively compensate the influence of three types of disturbances: changes of the flow rate of the input stream

F, as well as the measurement noise of the first and the second process outputs, denoted as

${\delta}_{1}$ and

${\delta}_{2}$, respectively. As many as 600,000 min (samples) are considered, i.e., approximately 417 days. It must be emphasised that in this work, the disturbances are not generated artificially, but real industrial disturbances recorded in a distillation process are used [

39]. All 600,000 samples of the disturbances are shown in

Figure 2.

All coefficients

${\lambda}_{p,n}=1$ for

$p=0,\dots ,{N}_{\mathrm{u}}-1$,

$n=1,\dots ,{n}_{\mathrm{u}}$ [

39]. The problem to solve is to carefully select the tuning parameters

${\psi}_{p,n}$ for

$p=1,\dots ,N$,

$n=1,\dots ,{n}_{\mathrm{y}}$. For this purpose, the tuning procedure presented in

Section 3 is used.

Let us first concentrate on tuning the coefficients

${\psi}_{p,1}$, i.e., for the first process output,

$p=1,\dots ,N$. Initially, the trajectory of the weights

${\psi}_{p,1}$ is parameterised by means of Equation (

5), which is characterised by the parameters

${m}_{1}$ and

${K}_{1}$. In the first step of the tuning procedure, the influence of the coefficient

${m}_{1}$ on the performance criteria

${\mathrm{SSE}}_{1}$,

${\mathrm{SSE}}_{2}$,

${\sigma}_{1}$,

${\sigma}_{2}$,

${\mathrm{H}}_{1}$ and

${\mathrm{H}}_{2}$ is analysed, and the results are shown in

Figure 3. We take into account all three criteria for the first process output, i.e., the indices

${\mathrm{SSE}}_{1}$,

${\sigma}_{1}$ and

${\mathrm{H}}_{1}$, and we choose the value

${m}_{1}=2$ because it gives the best control quality. Next, for the chosen parameter

${m}_{1}=2$, in the second step, we assess the influence of the parameter

${K}_{1}$, and it is shown in

Figure 4. It is clear that the best results are obtained for

${K}_{1}=100$. Finally, the trajectory of the weights

${\psi}_{p,1}$ is parameterised by means of Equation (

6), which is characterised by the parameter

${a}_{1}$ as well as the fixed parameters

${m}_{1}$ and

${K}_{1}$.

Figure 5 depicts the influence of the parameter

${a}_{1}$ on the considered performance indices. The best set of control quality criteria is obtained for

${a}_{1}=2$.

Next, having tuned the coefficients

${\psi}_{p,1}$, let us concentrate on tuning the coefficients

${\psi}_{p,2}$, i.e., for the second process output,

$p=1,\dots ,N$. In the first step of the tuning procedure, the influence of the coefficient

${m}_{2}$ on the performance criteria is analysed, and the results are shown in

Figure 6. We take into account all three criteria for the first process output, i.e., the indices

${\mathrm{SSE}}_{2}$,

${\sigma}_{2}$ and

${\mathrm{H}}_{2}$. We easily find the best value

${m}_{2}=3$. Next, for the chosen parameter

${m}_{2}=3$, in the second step, we assess the influence of the parameter

${K}_{2}$, and it is shown in

Figure 7. It is clear that the best results are obtained for

${K}_{1}=100$. Finally,

Figure 8 depicts the influence of the parameter

${a}_{1}$ on the considered performance indices. The best results are obtained for

${a}_{2}=1$.

All things considered, the coefficients

${\psi}_{p,1}$ are characterised by the set of parameters

${m}_{1}=2$,

${K}_{1}=100$ and

${a}_{1}=2$, while the coefficients

${\psi}_{p,2}$ by the parameters

${m}_{2}=3$,

${K}_{2}=100$ and

${a}_{1}=1$. The actual values of the coefficients used in MPC optimisation are computed from Equation (

6).

To evaluate the efficiency of the chosen parameters

${\psi}_{p,1}$ and

${\psi}_{p,2}$, let us consider the values of all six performance criteria. We not consider only the found coefficients, but additionally, we take into account the most practically cases in which all coefficients are constant, i.e.,

${\psi}_{p,1}={\psi}_{p,2}$. In the latter case, we consider six values of the coefficients: 0.1, 1, 10, 100, 1000 and 10,000. The values of the obtained performance criteria are given in

Table 1. For almost all considered indices (the only exception is

${\sigma}_{2}$, but the difference is not significant), the discussed tuning method gives the best results. For constant weights

${\psi}_{p,1}={\psi}_{p,2}$ greater than 10,000, the results do not change.

Let us now consider histograms of the control errors for constant values of the coefficients

${\psi}_{p,1}$,

${\psi}_{p,2}=0.1,\phantom{\rule{4pt}{0ex}}1,\phantom{\rule{4pt}{0ex}}10$ and for the tuned ones. They are shown in

Figure 9. Two observations are possible. Firstly, our tuning method gives the most narrow histograms. Secondly, they do not have long “tails”, which means that our method eliminates large negative and positive control errors.

Figure 10 depicts the first 1000 samples of the control errors for constant values of the coefficients

${\psi}_{p,1}$,

${\psi}_{p,2}=0.1,\phantom{\rule{4pt}{0ex}}1,\phantom{\rule{4pt}{0ex}}10$ and for the tuned ones. The obtained trends confirm the observations made on the basis of the histograms, i.e., our tuning method gives the best control quality.

In the second part of the simulations, we use the obtained set of tuning coefficients, but all gains of all input-output process channels are increased by 20%. Such a case is particularly interesting since the model used in MPC is (practically) never perfect.

Table 2 shows the values of all six performance criteria. Additionally, we consider six cases in which all coefficients are constant and have the values 0.1, 1, 10, 100, 1000 and 10,000, respectively. For almost all considered indices (the only exception is

${\sigma}_{2}$, but the difference is not significant), the discussed method gives the best results. For constant weights

${\psi}_{p,1}={\psi}_{p,2}$ greater than 10,000, the results do not change.

The histograms of the control errors are given in

Figure 11, and

Figure 12 depicts the first 1000 samples of the control errors. Similar to the perfect model case (

Figure 9 and

Figure 10), our tuning method gives the best results.