Keywords

1 Introduction

Along the last decades, model predictive control (MPC) has had a significant impact on industrial control engineering. Its implementation in process industry is justified by its capabilities of handling multi-variable control problems in a natural form, while taking into account actuator limitations and other physical and operational constraints, [8, 20]. Given the computational burden associated to the optimization problem solved online when an MPC controller is implemented, the use of this control technique was preferred for control architectures formed by two levels: the former, as a supervisory/management level, where set-points for regulatory controllers at the lower level are computed, and the latter, as the proper regulatory level, where the control actions are applied to the dynamical system. Notice that the regulatory controllers attempt to hide the non-linear behaviours of the systems, allowing the supervisory controller to use a simpler control-oriented model , [21]. Thus, MPC controllers, acting as supervisory ones, are based then on those simpler models and hence their associated optimization problems get less computational burden (see, e.g., [6, 17] and references therein).

Nevertheless, relevant technological advances during the last years make possible the real-time implementation of MPC controllers based on more complex and large dynamical models. Therefore, several possibilities arise when implementing real-time predictive controllers for industrial processes. The possible topologies can be such as the aforementioned two-level schemes, where the MPC acts as a supervisory controller, topologies where the MPC is the unique controller within the closed loop, and topologies where there is a convenient combination of the MPC controller with a twofold function and classical regulatory controllers (such as PIDs), interacting altogether.

On the other hand, a pasteurization system involves typical behaviours of industrial processes, where considering complex dynamical models with nonlinearities imply important challenges when a suitable controller should be designed. In that sense, some previous modelling approaches and control schemes have been already proposed. The so-called divide-and-conquer technique for modelling the system is applied in [9], where the input–output mathematical model of the system is obtained from the decomposition of the plant in functional subsystems. Other non-linear models from the whole system and/or some subsystems are obtained in [1, 12]. Regarding its control, in [5] it is proposed a scheme based on PID with Smith predictor in order to compensate delays when some temperatures are regulated. In [10], a dynamic matrix control (DMC) is designed and implemented using the system models proposed in [9], where the delay and the energy reduction of the system were not improved. The regulation of both water and milk temperatures by using MPC is recently reported in [16], where transient behaviours have been suitably handled with respect to other control techniques such as cascade generic model control.

According to the previous discussions, this chapter performs the design and implementation of three control topologies based on MPC , where the temperature of the output product in a small-scale pasteurization plant is regulated, while the energy consumption required to this end is simultaneously reduced. Therefore, the main contribution of this chapter is not only the suitable design of controllers and topologies in order to satisfy the control objectives fulfilling system constraints, but also the real-time experimental implementation of those MPC-based topologies in the real system and the analysis of the performance results in order to highlight the advantages and disadvantages for each topology. This analysis aims at motivating the use of MPC controllers interacting within the existing industrial topologies, where it is well known the hegemony of the PID controllers.

The mathematical models of the pasteurization plant are properly obtained from the experimental data , [13], but the deep description of the system identification procedures for the corresponding subsystems is out of the scope of this chapter. None of the models previously reported in the literature were considered for the study performed in this chapter since the real pilot plant considered here is quite different with respect to those used in [1, 9, 16], among others. Final results where the energy consumption comparison is performed are taken into account with respect to a control scheme based only on PID controllers properly tuned by using well-known existing tools, [2, 4, 19]. In any case, these PID controllers have been accurately tuned by using the available tools in Matlab \(^{\copyright }\), achieving a proper response and avoiding the unfair comparison between topologies based on the possibly wrong PID tunings.

The remainder of the chapter is structured as follows. In Sect. 12.2, the pasteurization plant test bench is described. Section 12.3 presents the general statement of the MPC problems considered in this chapter. Besides the mathematical models, control problem formulations and main experimental results for each one of the three proposed topologies are presented and discussed. Section 12.4 performs the discussion of the results presented throughout the chapter. Finally, in Sect. 12.5 the main conclusions are drawn.

2 System Description

A process plant trainer for control purposes is used in this chapter as a real benchmark to test the different proposed control topologies. Specifically, the small-scale pasteurization plant PCT23 MKII from Armfield is used, [3]. Only those parts of the system that are relevant to the chapter are described in this section (see Fig. 12.1).

Fig. 12.1
figure 1

Pasteurization plant diagram

The system emulates an industrial high-temperature short-time (HTST) pasteurization process. In this process, the goal is to heat and keep the product, which is usually a liquid, at a predetermined temperature for a minimum time, typically for bacteriological purposes. This is achieved by circulating the heated liquid through a holding tube that delays the product stream.

A water heating unit is available in order to provide the necessary heat to the product. This unit consists of a water pump that circulates the hot water through a heat exchanger, and a hot water tank equipped with a temperature sensor (\(T_{2}\)) and an electrical resistor. The water heat is transferred to the product inside the first phase of the heat exchanger. A temperature sensor (\(T_{3}\)) at the heat exchanger outlet is used to ensure that the product has gained the desired temperature. The product is always pumped at a constant flow velocity in order to guarantee that it remains inside the holding tube at a constant pasteurization temperature (adiabatic phase of the process) for the minimum required time. With this end in view, a PID controller is implemented to regulate the product flow by means of a pump (feeding the product into the plant) and a flow metre located before the holding tube. This control loop will be considered fixed and out of the study carried out in this chapter. A temperature sensor (\(T_{1}\)) at the output of the holding tube is used to monitor the product temperature after the pasteurization process. Finally, the product is cooled in the second phase of the heat exchanger, where residual heat is transferred to the inlet product.

In summary, from a control point of view, the pasteurization plant can be seen as a multiple-input and multiple-output (MIMO) system with electric heater power, P, and water pump speed, N, as inputs, and temperatures, \(T_{1}\), \(T_{2}\), and \(T_{3}\) as outputs. The control objectives are twofold: i) the temperature \(T_{1}\) must follow a predefined profile (tracking control problem), and ii) the energy consumption should be minimized.

It is considered that the pasteurization plant will be operated around the working point defined by

$$\begin{aligned}&P^{o}=290\,\text {W}, \quad N^{o}=65\,\%, \quad T_{1}^{o}=55.5\,^{\circ }\text {C}, \nonumber \\&T_{2}^{o}=66\,^{\circ }\text {C}, \quad T_{3}^{o}=56\,^{\circ }\text {C}, \end{aligned}$$
(12.1)

which will be used to obtain the linear models required throughout the chapter. The design and simulation of the controllers have been performed in Matlab \(^{\copyright }\) R2012b by using Tomlab Optimization Software [7] in an Intel Xeon CPU E31225 - 4 cores, 3.10 GHz and 4 GB RAM. The discretization of all dynamics as well as the implementation of the MPC controllers for experimentation were performed using a sampling time of 1 s. In particular, the dynamical model of the pump N was obtained by selecting a lower sampling time (0.5 s) given the fast dynamics shown by this element compared with the remainder processes.

3 Predictive Control Schemes

3.1 MPC Problem Statement

Given that the proposed controllers consider dynamical models around the working point (12.1), they are expressed in the discrete-time state-space linear form

$$\begin{aligned} \mathbf{x}(k+1)&= \mathbf{A}\,\mathbf{x}(k) + \mathbf{B}\,\mathbf{u}(k), \end{aligned}$$
(12.2a)
$$\begin{aligned} \mathbf{y}(k)&= \mathbf{C}\,\mathbf{x}(k), \end{aligned}$$
(12.2b)

where \(\mathbf{x} \in \mathcal {X} \subseteq \mathbb {R}^{n_x}\), \(\mathbf{u} \in \mathcal {U} \subseteq \mathbb {R}^{n_u}\) and \(\mathbf{y} \in \mathcal {Y} \subseteq \mathbb {R}^{n_y}\) correspond to the vector of system states, the vector of input signals and the vector of measured outputs, respectively, and \(k \in \mathbb {Z}_+\) denotes the discrete time. \(\mathbf{A}\), \(\mathbf{B}\) and \(\mathbf{C}\) are the system matrices of suitable dimensions. In the sequel, identified models obtained as transfer functions are conveniently expressed by their equivalent controllable realizations in state space as in (12.2). Moreover, letFootnote 1

$$\begin{aligned} \hat{\mathbf {u}}(k) \triangleq \left( \mathbf{u}(0|k),\dots , \mathbf{u}(H_p-1|k) \right) \end{aligned}$$
(12.3)

be the sequenceFootnote 2 of input signals over a fixed-time prediction horizon \(H_p\). Notice that (12.3) depends on the initial condition \(\mathbf{x}(0|k)\triangleq \mathbf{x}(k)\). Therefore, the design of the different MPC controllers for the proposed control topologies/schemes in this chapter is based on Problem 12.1.

Problem 12.1

[MPC Design] The MPC design is based on the solution of the open-loop optimization problem (OOP)

$$\begin{aligned} \mathop {\min } \limits _{\{ \hat{\mathbf {u}}(k) \in \mathcal {U}^{H_p}, \, \hat{\varvec{ \xi }}(k) \in \mathbb {R}^{H_p} \}} {J}(\mathbf{x}(k),\hat{\mathbf {u}}(k), \hat{\varvec{\xi }}(k)), \end{aligned}$$
(12.4a)

subject to

$$\begin{aligned} \mathbf{x}(i+1|k)&=\mathbf{A}{} \mathbf{x}(i|k)+\mathbf{B}{} \mathbf{u}(i|k), \quad \forall \,\,i\in [0,H_p-1], \end{aligned}$$
(12.4b)
$$\begin{aligned} \mathbf{y}(i|k)&=\mathbf{C}{} \mathbf{x}(i|k), \quad \forall \,\,i\in [0,H_p-1], \end{aligned}$$
(12.4c)
$$\begin{aligned} \mathbf{x}(k)&\in \mathbb {R}^{n_x}, \quad \forall \,\,k, \end{aligned}$$
(12.4d)
$$\begin{aligned} \mathbf{u}(i|k)&\in \mathcal {U}, \quad \forall \,\,i\in [0,H_p-1], \end{aligned}$$
(12.4e)
$$\begin{aligned} \mathbf{G_1} \mathbf{y}(i|k)&+ \mathbf{G_2}\, \mathbf{\xi } (i|k) \le \mathbf{g}, \quad \forall \,\, i\in [0,H_p-1], \end{aligned}$$
(12.4f)

where \(J(\cdot ):\mathcal {U}^{n_u\,H_p} \times \mathbb {R}^{H_p} \mapsto \mathbb {R}\) in (12.4a) is the cost function, \(H_p\) denotes the prediction horizon and \(\mathbf{G_1}\), \(\mathbf{G_2}\) and \(\mathbf{g}\) are matrices of suitable dimensions. Moreover, \(\xi \in \mathbb {R}\) is the slack variable for softening the output constraints (12.4f), and \(\hat{\varvec{\xi }}(k)\triangleq \left( \mathbf{\xi } (0|k),\dots , \mathbf{\xi } (H_p-1|k) \right) \in \mathbb {R}^{H_p}\). Notice that, in this chapter, expression in (12.4d) means the unconstrained nature of the system states. Assuming that the OOP (12.4) is feasible, i.e., \(\mathbf {u}(k) \ne \emptyset \), there will be an optimal solution for the sequence of control inputs

$$\begin{aligned} \mathbf {u}(k)^* \triangleq \left( \mathbf{u}(0|k)^*,\mathbf{u}(1|k)^*,\dots ,\mathbf{u}(H_p-1|k)^* \right) , \end{aligned}$$
(12.5)

and then, according to the receding horizon philosophy, \(\mathbf{u}^{*}(0|k)\) is applied to the system, while the whole process is repeated for the next time instant \(k \in \mathbb {Z}_+\). \(\square \)

The following subsections present and discuss three closed-loop control schemes based on different roles of the MPC controllers wherein the main control objectives need to be accomplished. Aspects such as the model used, the controller design and the corresponding experimental results are explained for each considered topology.

3.2 Topology 1: MPC as a Supervisory Controller

The pasteurization plant described in Sect. 12.2 can be simply controlled by using a PID-based control scheme, [15, 18, 22]. A typical approach to track the temperature \(T_{1}\) is to implement two PID controllers in cascade, [3]. The inner control loop, denoted here as PID\(_{T_3}\), regulates \(T_{3}\) by manipulating the pump velocity, N, whereas the outer loop, denoted here as PID\(_{T_1}\) provides the reference for the inner-loop controller. On the other side, another control loop, denoted here as PID\(_{T_2}\) is typically implemented to regulate the temperature of the water heating unit \(T_{2}\). The PID\(_{T_2}\) controller manipulates the power of the electrical heater, P, in order to maintain the temperature \(T_{2}\) at a certain constant and high value in order to guarantee that enough energy can be transferred to the product. Hence, no energy saving is considered.

In this section, this standard PID-based configuration is used. Nevertheless, the reference \(T_{2}^r\), provided to regulate the temperature \(T_{2}\), is supervised by an MPC (see Fig. 12.2) with the objective of saving energy. For the sake of space and because it does not involve any additional difficulty, the implementation of the PID controllers is not here presented. Instead, the chapter is focused on the supervisory MPC design.

Fig. 12.2
figure 2

Topology 1: MPC as a supervisory controller

3.2.1 System Identification and Control-Oriented Model

To accomplish the proposed control configuration, suitable models of the pasteurization plant are needed. In particular, two transfer functions are identified. These transfer functions relate the measured outputs \(T_{1}\) and \(T_{2}\) to their corresponding input references, \(T_{1}^r\) and \(T_{2}^r\). By applying parametric identification methods (mainly based on least squares) to different model structures, [14], the following transfer functions are obtained:

$$\begin{aligned} \frac{T_{1}(z)}{T_{1}^r(z)}=\frac{0.0008008}{z^{30}-1.963z^{29}+0.9639z^{28}} \end{aligned}$$
(12.6)

and

$$\begin{aligned} \frac{T_{2}(z)}{T_{2}^r(z)}=\frac{0.00358z}{z^{2}-1.937 z+0.9406}, \end{aligned}$$
(12.7)

where z is the z-transform variable. Observe that the transfer function (12.6) has order 30 because the transportation delay induced by the holding tube. In addition, it is worth noting that, since the PID control loops are considered in the plant modelling, the two input/output pairs can be decoupled.

Models (12.6) and (12.7) are validated with real data from the pasteurization plant obtaining satisfactory results. In Fig. 12.3 a comparison between the real system behaviour and model-obtained temperatures is depicted.

Fig. 12.3
figure 3

Responses from the models (12.6)–(12.7) and comparison with real data

3.2.2 Control Problem Setup

In order to design the corresponding MPC , the constraints and the cost function in Problem 12.1 should be defined. For the proper system operation, \(T_2\) must always be greater than \(T_1\). According to the performed experiments, this temperature difference between \(T_{2}\) and \(T_{1}\) should be greater than \(D=11.8\,^{\circ }\)C. The value of D is considered as a design parameter, which was determined by iterative simulations in order to have a safety temperatures difference taking into account the variations given by the devices dynamics and signal noises. Given that the system is operated around the working point (12.1), this difference can be conveniently adapted through a soft constraint of the form

$$\begin{aligned} T_2(k) - T_1(k) \ge D + \xi (k), \end{aligned}$$
(12.8)

where \(\xi \in \mathbb {R}\) allows to avoid infeasibility of the OOP in (12.4). On the other hand, looking at the energy consumption of the actuators, the water pump consumes 35 VA for flows between 100–300 ml/min, [23], while the heater resistor consumes about 300 W. Therefore, minimization of the energy consumption is done through the heater resistor since its consumption is significantly greater than the energy consumption of the pump. Hence, \(T_{2}^r\) should be minimized. Finally, the minimization of the slew rate, \(\varDelta T_2^r(k) \triangleq T_2^r(k)-T_2^r(k-1)\), is also considered in order to reduce oscillations in \(T_2\). Thus, the OOP (12.4) for this topology is defined as

$$\begin{aligned} \mathop {\min } \limits _{\{ \hat{\mathbf {T}}\mathbf {_{2}^{r}}(k), \, \hat{\varvec{\xi }}(k) \}} \, \left\| \hat{\mathbf {T}}\mathbf {_{2}^{r}}(k) \right\| _\mathbf{W_1}^2+ \left\| \hat{\varvec{\Delta } \mathbf {T}}\mathbf {_{2}^{r}}(k) \right\| _\mathbf{W_2}^2+ \left\| { \hat{\varvec{\xi }} (k)} \right\| _\mathbf{W_3}^2, \end{aligned}$$
(12.9a)

subject to

$$\begin{aligned} \mathbf{x}(i+1|k)&= \mathbf{A_1} \mathbf{x}(i|k) + \mathbf{B_1} \left[ \begin{array}{c} T_1^r(i|k) \\ T_2^r(i|k) \end{array} \right] , \end{aligned}$$
(12.9b)
$$\begin{aligned} \left[ \begin{array}{c} T_1(i|k) \\ T_2(i|k) \end{array} \right]&= \mathbf{C_1} \mathbf{x}(i|k), \end{aligned}$$
(12.9c)
$$\begin{aligned} T_2(i|k)-T_1(i|k)&\ge D + \xi (i|k), \end{aligned}$$
(12.9d)

for all \(i\in [0,H_p-1]\), where

$$\begin{aligned} \hat{\mathbf { T}}\mathbf {_{2}^{r}}(k)&=(\mathbf{T}_2^r(0|k),\dots ,\mathbf{T}_2^r(H_p-1|k)),\\ \hat{\varvec{\Delta }\mathbf { T}}\mathbf {_{2}^{r}}(k)&=(\varvec{\Delta }{} \mathbf{T_2^r}(0|k),\dots ,\varvec{\Delta }{} \mathbf{T_2^r}(H_p-1|k)), \end{aligned}$$

and \(W_i\), \(i=1,2,3\), are the weighting matrices needed to prioritize the different control goals within the multi-objective cost function. Notice that, in general, \(\mathbf{W}_i = \omega _i \mathbf{I}\), where \(\mathbf{I}\) is the identity matrix of suitable dimensions and \(\omega _i \in \mathbb {R}\). Here, the prediction model in (12.9b)–(12.9c) is derived from (12.6) and (12.7).

Fig. 12.4
figure 4

Controlled temperatures, \(T_{1}\) and \(T_{2}\), with Topology 1

The MPC controller has been implemented in Matlab \(^{\copyright }\) and tested on the pasteurization plant . The controller has been experimentally tuned for the weight values \(\omega _1=\omega _2=0.1\), \(\omega _3=10\), whereas a prediction horizon \(H_p =35\) has been set.Footnote 3 It should be note that, in this case, shorter horizons degrade the closed-loop performance, while a larger horizon does not improve the results and moreover takes longer in solving the optimization problem (12.9 ) . The controlled temperatures from the real plant (i.e., \(T_{1}\) and \(T_{2}\)) are shown in Fig. 12.4 together with their corresponding references, where \(T_{2}^r\) is in this case the control variable. Observe that the MPC tries to keep \(T_{2}\) as lower as possible and fulfil constraint (12.8) at the same time. This is particularity difficult when \(T_{1}\) decreases (e.g., time \(k=1500\) s and \(k=2000\) s) since \(T_{2}\) should be reduced by the MPC , accordingly. However, there is no actuator to reduce \(T_{2}\) and the water tank is really cooled by dissipating the heat to the atmosphere.

3.3 Topology 2: MPC as Unique Controller

Another possibility to control the pasteurization plant is a holistic approach by means of one single MPC controller that directly operates the actuators from the system measurements (see Fig. 12.5).

Fig. 12.5
figure 5

Topology 2: MPC as unique controller

3.3.1 System Identification and Control-Oriented Model

A complete model of the pasteurization plant is needed for this topology. However, due to the complexity of the system, it is not feasible to identify the whole plant at once. Instead, the different subsystems are identified and modelled separately.

Holding tube subsystem: From a thermodynamic point of view, the holding tube can be modelled as a single-input and single-output system, where temperature \(T_{3}\) is the input and temperature \(T_{1}\) is the output. By experimentation, the following discrete transfer function is obtained:

$$\begin{aligned} \frac{T_{1}(z)}{T_{3}(z)}=\frac{0.2231}{z^{30}-0.7649z^{29}}. \end{aligned}$$
(12.10)

The measurement of \(T_{3}\) has been used to validate the model. In Fig. 12.6, the responses of \(T_{1}\) obtained by applying the same measurement of \(T_{3}\) in both, the real plant and the model (12.10) are compared.

Fig. 12.6
figure 6

Response from the model of the holding tube

Hot water tank subsystem: The dynamics of the temperature \(T_{2}\) in the water tank of the heating unit system are derived from first principles of thermodynamics [11]. Specifically, the following differential equations is used:

$$\begin{aligned} c_{w}\frac{dT_{2}(t)}{dt}=P(t)-c_{s}F(k)(T_{out}(t)-T_{in}(t)) -k_{l}(T_{2}(t)-T_{a}(t)), \end{aligned}$$
(12.11)

where \(c_{w}\) is the heat capacity coefficient of the water mass in the tank, P is the power provided by the electrical resistor, \(c_{s}\) the specific heat capacity of the water, F is the water flow given by the pump, \(T_{out}\) and \(T_{in}\) are the output and input water temperatures, \(k_{l}\) is the heat loss coefficient and \(T_{a}\) is the atmospheric temperature. Note that the water flow is proportional to the pump speed, therefore \(F=\alpha _{1} N\). For the sake of simplicity, it is assumed that the output water temperature is the same as the measured water tank temperature, i.e., \(T_{out}=T_{2}\), and also that the \(T_{in}\), which cannot be measured, is proportional to \(T_{3}\), i.e., \(T_{in}=\alpha _{2} {T_{3}}\). In addition, \(T_{a}\) is assumed to be known and constant.

The unknown parameters of (12.11) are properly identified (by using parametric identification based on least squares, [13, 14]) and then the model is discretized and linearized around the working point in (12.1). The resulting discrete linear model for the hot water tank system is

$$\begin{aligned} T_{2}(k+1)=&9.98\times 10^{-1} T_{2}(k)+ 1.2\times 10^{-4} P(k) \nonumber \\&-4.26 \times 10^{-4} N(k) -1.64\times 10^{-4}T_{3}(k). \end{aligned}$$
(12.12)

Temperature \(T_{2}\) from both, real plant and model (12.12) are shown in Fig. 12.7. In this case, the resistor power P and pump speed N are slightly modified from the working point in (12.1), while input temperature \(T_{3}\) is taken from the real plant.

Fig. 12.7
figure 7

Response from the model of the hot water tank

Heat exchanger subsystem: The first phase of the heat exchanger is here modelled. For simplicity, the input product temperature is assumed to be known and constant. Therefore, the dynamics of the output product temperature, \(T_{3}\), are only directly affected by the pump speed, N. It should be noted that the temperature \(T_{3}\) is indirectly affected by both \(T_{2}\) and the pasteurized product temperature \(T_{1}\) since the latter circulates through the second phase of the heat exchanger, which is in contact with the first phase. However, in order to keep the simplicity of the model, these side effects on \(T_{3}\) are not taken into account. They can be seen as unknown disturbances.

The obtained model is represented in discrete transfer function as

$$\begin{aligned} \frac{T_{3}(z)}{N(z)}=\frac{0.01141}{z - 0.8796 }. \end{aligned}$$
(12.13)

The real and the model-predicted temperature \(T_{3}\) are compared in Fig. 12.8.

Fig. 12.8
figure 8

Response from the model of the heat exchanger

3.3.2 Control Problem Setup

As in the Topology 1, the control objectives remain the same, remarking the priority on the reduction of the energy consumption . In this case, the management of the power dissipated by the heater resistor determines the performance of the closed-loop control. Now, the MPC controller must compute the direct control actions to the actuators, while performing the tracking task with \(T_1\). This task implies the minimization of the tracking error \(e_{T_1}(k) \triangleq T_1(k)-T_1^r(k)\), while the control actions are minimized and smoothed, and the softening of the operational constraint (12.8) is penalized. Thus, the OOP (12.4) for this topology is defined as

$$\begin{aligned} \mathop {\min } \limits _{\{[\hat{\mathbf { N}}(k) \,\, \hat{\mathbf { P}}(k)]^T, \, \hat{\varvec{\xi }}(k) \}} \, \left\| \hat{\mathbf { P}}(k) \right\| _\mathbf{W_1}^2 + \left\| { \left[ \begin{array}{c} \hat{\varvec{\Delta }\mathbf { N}}(k) \\ \hat{\varvec{\Delta }\mathbf { P}}(k) \end{array} \right] } \right\| _\mathbf{W_2}^2 + \left\| { \hat{\varvec{ \xi }} (k)} \right\| _\mathbf{W_3}^2 + \left\| \hat{\mathbf { e}}\mathbf {_{T_1}}(k) \right\| _\mathbf{W_4}^2, \end{aligned}$$
(12.14a)

subject to

$$\begin{aligned} \mathbf{x}(i+1|k)&= \mathbf{A_2} \mathbf{x}(i|k) + \mathbf{B_2} \left[ \begin{array}{c} N(i|k) \\ P(i|k) \end{array} \right] , \end{aligned}$$
(12.14b)
$$\begin{aligned} \left[ \begin{array}{c} T_1(i|k) \\ T_2(i|k) \end{array} \right]&= \mathbf{C_2} \mathbf{x}(i|k), \end{aligned}$$
(12.14c)
$$\begin{aligned} N(i|k)&\in [-40,15], \quad P(i|k) \in [-0.3,1.3], \end{aligned}$$
(12.14d)
$$\begin{aligned} T_2(i|k)&- T_1(i|k) \ge D + \xi (i|k), \end{aligned}$$
(12.14e)

for all \(i\in [0,H_p-1]\), where

$$\begin{aligned} \hat{\mathbf {P}}(k)&=(\mathbf{P}(0|k),\dots ,\mathbf{P}(H_p-1|k)),\\ \hat{\varvec{\Delta }\mathbf { N}}(k)&= (\varDelta N(0|k),\dots ,\varDelta N(H_p-1|k)),\\\hat{\varvec{\Delta }\mathbf { P}}(k)&= (\varDelta P(0|k),\dots ,\varDelta P(H_p-1|k)),\\\hat{\mathbf { e}}\mathbf {_{T_1}}(k)&= (\mathbf{e_{T_1}}(0|k),\dots ,\mathbf{e_{T_1}}(H_p-1|k)), \end{aligned}$$

and \(W_4\) is the weighting matrix related to the tracking error of \(T_1\). Notice here that \(W_2\) is a block diagonal matrix, whose elements are matrices \(\varOmega _2= { \left[ {\begin{array}{*{20}c} \varOmega _{21} &{} 0 \\ 0 &{} \varOmega _{22} \\ \end{array}} \right] } \). In this case, the prediction model (12.14b)–(12.14c) comes from merging of the equivalent controllable realizations of (12.10), (12.12) and (12.13). Moreover, input constraints (12.14d) should be stated since

Fig. 12.9
figure 9

Controlled temperatures, \(T_{1}\) and \(T_{2}\), with Topology 2

  • both the dead zone of the pump (which is up to 25 % of its operating range) and the definition of a safety range below 80 % also of its operating range (over this value some elements can deteriorate rapidly) should be taken into accountFootnote 4; and

  • the heating power of the resistor, P, can take values in the range [0, 1.6] kW. Notice that values in (12.14d) consider the working point (12.1).

The MPC controller was implemented with the trial-and-error weight values \(\omega _1=2\), \(\omega _{21}=10^{-3}\), \(\omega _{22}=10^{-2}\), \(\omega _{3}=10^2\) and \(\omega _{4}=10^3\). Moreover, \(H_p=35\).

Results obtained by applying this topology are depicted in Fig. 12.9. As before, the temperature \(T_{2}\) ensures enough transfer heating to the product (i.e., constraint (12.8) is satisfied). In addition, now the delay caused by the holding tube is compensated. On the other hand, although it is not evident in the figure, the steady-state error in \(T_{1}\) is not null. This is mainly due to two reasons: i) the models, especially the heat exchanger model in (12.13), are not accurate and ii) the pump actuator range is limited to \(80\,\%\) which degrades the controller performance. It is well known that it can be corrected by using an integrator-in-series configuration but it was not implemented here due to the small amount of such error.

3.4 Topology 3: MPC and PID

The last control topology presented in this chapter is a combination of the previous ones. A PID controller, denoted as PID\(_{T_3}\), is used to control \(T_{3}\) by means of the pump speed N, whereas the MPC provides the set-point for PID\(_{T_3}\) and drives directly the electric resistor at the same time (see, Fig. 12.10). In this topology, it is intended that a simple PID controller is more suitable for controlling \(T_{3}\) because fast dynamics are present in both the temperature \(T_{3}\) and the pump speed N. Furthermore, by using PID\(_{T_3}\) controller, the effect of the unknown disturbances over \(T_{3}\) are mitigated which means that the model used in the MPC becomes more accurate.

Fig. 12.10
figure 10

Topology 3: MPC and PID

3.4.1 System Identification and Control-Oriented Model

The models used in this topology can easily be derived by combining the previous models. For instance, the dynamics of \(T_{3}\) driven by \(T_{3}^r\) can straightforwardly be obtained by computing the corresponding PID closed-loop transfer function with (12.13). Therefore, no new models are needed for this topology.

3.4.2 Control Problem Setup

The control design for this topology combines an MPC coping with the regulation of P, together with PID\(_{T_3}\) that manages N but which receives its reference from the MPC controller. Given the control objectives and aforementioned operational constraints, the OOP (12.4) for this topology is defined as

$$\begin{aligned} \mathop {\min } \limits _{ \{[\mathbf {P}(k) \,\, \mathbf {T_3^r}(k)]^T \, \varvec{\xi }(k) \}} \, \left\| \mathbf {P}(k) \right\| _\mathbf{W_1}^2 + \left\| { \hat{\varvec{\Delta }\mathbf { T}}\mathbf {_3^r}(k) } \right\| _\mathbf{W_2}^2 + \left\| { \hat{\varvec{ \xi }} (k)} \right\| _\mathbf{W_3}^2+ \left\| \mathbf {e_{T_1}}(k) \right\| _\mathbf{W_4}^2, \end{aligned}$$
(12.15a)

subject to

$$\begin{aligned} \mathbf{x}(i+1|k)&= \mathbf{A_3} \mathbf{x}(i|k) + \mathbf{B_3} \left[ \begin{array}{c} P_{i|k} \\ T_{3}^r(i|k) \end{array} \right] , \end{aligned}$$
(12.15b)
$$\begin{aligned} \left[ \begin{array}{c} T_1(i|k) \\ T_2(i|k) \end{array} \right]&= \mathbf{C_2} \mathbf{x}(i|k), \end{aligned}$$
(12.15c)
$$\begin{aligned} P(i|k)&\in [-0.3,1.3], \quad T_3^r(i|k) \in [-2,7], \end{aligned}$$
(12.15d)
$$\begin{aligned} T_2(i|k)&-T_1(i|k) \ge D + \xi (i|k), \end{aligned}$$
(12.15e)

for all \(i\in [0,H_p-1]\), where

$$\hat{\varvec{\Delta }\mathbf { T}}\mathbf {_3^r}(k) = (\varvec{\Delta }{} \mathbf{T_3^r}(0|k),\dots ,\varvec{\Delta }{} \mathbf{T_3^r}(H_p-1|k)),$$

and the constraints for input \(T_{3}^r\) are given considering a small range of variation around the system working point (12.1). The prediction model (12.15b)–(12.15c) is obtained for this topology by merging the controllable realizations of (12.10) and (12.12). Notice here that the induction to a smooth behaviour of \(T_{3}^r\) implies less oscillations of \(T_2\). For the implementation of this control topology with the real system, the tuning parameters are set to \(\omega _1=10^{-5}\), \(\omega _2 = 300\), \(\omega _3=1\), \(\omega _4= 10\), and \(H_p=35\).

In Fig. 12.11, the temperature responses from the pasteurization plant under the control Topology 3 are shown. In this case, the delay is compensated and the null steady-state is achieved. This is because the MPC is now used to compensate the delay by providing a suitable reference to PID\(_{T_3}\), and this in turn provides the perfect tracking in steady-state despite the model inaccuracies. Moreover, the model inaccuracies alleviation also provides a better performance in terms of \(T_{2}\). Observe that now the fluctuations in the temperature \(T_{2}\) have been significantly reduced. However, as far as \(T_1\) goes away from its working point, an undesired overshoot appears in its transient dynamics. It is also produced by the new resultant behaviour of \(T_2\), which also experiments bigger overshoots. This phenomena might be avoided by an accurate tuning of the cost function in (12.15a) (conveniently increasing the prioritization of \(\hat{\varvec{\Delta }\mathbf { T}}\mathbf {_3^r}\)).

Fig. 12.11
figure 11

Controlled temperatures, \(T_{1}\) and \(T_{2}\), with Topology 3

4 Results Discussion

The different proposed control topologies are here compared by means of three performance indices . The values of these indices for each topology are displayed in Table 12.1.

The first index is the MSE (Mean Square Error) between temperature \(T_{1}\) and its reference. This index indicates how accurate the tracking is performed. In this case, Topology 1 presents the worst value. This is mainly due to the fact that the holding tube delay is not compensated. On the other hand, the disturbance effect mitigation accomplished by the PID-based control loop in Topology 3 improves the MSE in front of Topology 2.

Table 12.1 Performance indices

Another performance index is the settling time for temperature \(T_{1}\). Short settling times are crucial in pasteurization processes, since all the product obtained during the settling time is rejected because it does not reach the proper temperature. Topology 1 presents again the worst result while Topology 3 is significantly better that the others. This is because Topology 3 takes advantage of the fast PID-based control loop.

Third index takes into account the energy consumption by showing the percentage of saved energy with respect to the standard approach (only PID controllers with no MPC) in which no energy saving is considered (i.e., temperature \(T_{2}\) is kept at \(75 ^{\circ }\)C all the time). Although all topologies perform similarly, Topology 3 shows better results.

Quantitatively speaking, it would be quite risky to determine the best control topology from those proposed here. From the point of view of energy savings , tuning procedures for cost functions in (12.9a), (12.14a) and (12.15a) might improve the performance of the controllers but the design and application of tuning strategies are out of the scope of this study. On the other hand, MSE index could also be improved by different and accurate tuning criteria, which in turn would allow to reduce or even eliminate some overshoots in temperature dynamics.

Finally, Table 12.2 summarizes the main features presented by the three topologies. It is worth to highlight that Topology 2 presents some small steady-state error as a consequence of model inaccuracies. However, it is the only one that can handle both actuator constraints. From this perspective, Topology 3 can be chosen as an intermediate solution, since null steady-state error is achieved and constraints on the electrical resistor can be handled.

Table 12.2 Qualitative features

5 Conclusions

Although the pasteurization process can be perfectly accomplished by standard PID controllers, in this chapter energy saving is also claimed as a control objective, which makes the MPC approach suitable for operating the plant. Therefore, three different control topologies based on MPC have been proposed in order to study which the role of the MPC should be, i.e., MPC as a supervisor or as a regulatory controller. The study has been carried out from a practical perspective, where conclusions have been drawn from experimental data . Therefore, typical problems in real implementations have been encountered, e.g., noisy signals, model inaccuracies, hardware limitations.

Topology 1 shows a proper performance against model uncertainties because the PID controllers locally compensate the model mismatches. However, the MPC is merely used to compute the set-point for the local controllers wherein some useful dynamics for the optimality of the control objective are not used. In addition, actuator constraints cannot be handled. Notice here that MPC might be suitably replaced by other optimal control techniques such as LQR. On the opposite side, an MPC commanding the actuators directly is tested in Topology 2. In this case, the model of the plant without controllers is used in the optimization despite the inaccuracies. This leads to a loss of optimality due to the optimal for the model differs from the optimal for the plant which, in turn, results in a loss of control performance. Finally, Topology 3 is intended so that the advantages of the two previous topologies are preserved. Therefore, Topology 3 is presented as an intermediate solution between the other two topologies, wherein a local PID controller is used together with the MPC.

According to the results discussion in Sect. 12.4, Topology 3 results to be the most convenient one. This means that the choice of a control topology is not obvious since many intermediate solutions could be possible in a real plant, where a certain number of control loops need to be considered. Therefore, the results obtained in this work motivate and justify the need of further studies in order to determine the best control topology for a given plant.