Abstract

Model predictive control (MPC) has been used successfully in industry. The basic characteristic of these algorithms is the formulation of an optimization problem in order to compute the sequence of control moves that minimize a performance function on the time horizon with the best information available at each instant, taking into account operation and plant model constraints. The classical algorithms Infinite Horizon Model Predictive Control (IHMPC) and Model Predictive Control with Reference System (RSMPC) were used for the experimental application in the multivariable control of the pilot plant (level and pH). The simulations and experimental results indicate the applicability and limitation of the control technique.

1. Introduction

The process control is related to the application of the automatic control principles to industrial processes. The globalization effect upon industries brought a perception of the importance associated to the product quality over organization profits. Because of that, the process control has been more and more demanded and explored, in order not only to assure that the process is according to acceptable performance levels but also to address legal requirements in terms of safety and quality of the products [1]. In this context, predictive controllers are able to deal with system requirements in a proper way and simple to be implemented. One of the biggest concerns on control theory is related to the stability of closed loop of systems. It is natural that only stable closed-loop response is considered for real implementation. A representative algorithm of this controller class is Infinite Horizon Model Predictive Control (IHMPC) [2].

During the closed-loop project, there are some theoretical tools that can be incorporated into the controllers and aggregate desirable characteristics. This is the case of predictive controllers that incorporate a reference path in their formulation (RSMPC) [3]. In this case, the value of control action is computed from a QDMC (Quadratic Dynamic Matrix Control) problem that has a first-order reference system incorporated directly into the formulation. Consequently, there is an effort for eliminating undesirable situations of too high speed and for balancing the system response.

Most industrial chemical processes have a nonlinear characteristic, although linear controllers are used in many of these systems. The great advantage of this approximation is having an analytical solution to the control problem and also the low computational complexity. This kind of approach is very common in the industry practice.

The pH system is used as a benchmark for applications in process control, mainly because of its strong nonlinear behavior. For the experimental application case addressed in this work, it is a control of multiple inputs and multiple outputs (MIMO), in which inputs are acid and base flows and outputs are reactor level and stream pH output. This system presents not only a nonlinear feature, but also an interaction between inputs and outputs linked to the system directionality. In this kind of system, classical controllers do not work to keep the stability and required performance. In addition, MPC solves the problem of open loop optimal control in real time, considering the current state of the system to be controlled as much as a policy feedback offline. As can be seen in the experimental data, the multivariable system could not be controlled with optimal classical controllers. That is why it was chosen to implement IHMPC and RSMPC predictive controllers in real time [4].

Section 2 presents the control algorithms used in the implementation described in this work. In Section 3 there is a description of the experimental system. Section 4 presents the simulations with the controllers and experimental results of the closed loop. Section 5 shows the main conclusions of this paper.

2. Model Predictive Control

The model predictive control (MPC) theory was originated in the end of 1970s decade and developed considerably ever since [5โ€“10]. MPC became an important control strategy of industrial applications, mainly due to great success of its implementations in the petrochemical industry. The reason for MPC being so popular might be due to its ability to deal with quite difficult control challenges, although other characteristics such as its ability to control constrained multivariable plants, have been claimed as one of the most important features [6]. The ability to handle input, output, and internal state constraints can be assigned as the most significant contribution to the many successful industrial applications [11โ€“13]. Other benefits to consider are the possibility of embedding safety limits, the possibility of obtaining advantages in using it in highly nonlinear plants as well as in time-varying plants, the consideration of process noise in the formulation, the high level of control performance, reduced maintenance requirements, and improved flexibility and agility [14].

The various predictive control algorithms differ from each other depending on the way the predictive model is used to represent the process, the noise description, and on the cost function to be minimized. There are many control predictive applications well succeeded not only in chemical industry but also in other areas [15]. The use of state-space models, in spite of other formulations, was responsible for a substantial maturing of the predictive control theory during the 1990s decade [16]. The state-space formulation not only allows the application of linear system theorems already known, but also it makes easier to generalize for more complex cases. In this situation, the MPC controller can be understood as a compensator based on a state observer and its stability, performance, and robustness are determined by the observer poles, established directly by parameter adjustment, and by regulator poles, determined by performance horizons and weights [17]. Figure 1 shows the receding horizon strategy, which is the center of the MPC theory.

Figure 2, based on Richalet [18] and Richards and How [19], shows interfacial areas of the MPC control developments.

Considering its application to MIMO processes, MPC deals directly with coordination and balancing interactions between inputs and outputs and also with associated constraints [20]. In spite of being really effective in suitable situations, MPC still has limitations as, for instance, operation difficulties, high maintenance cost (as it demands specialized work) and flexibility loss, which can result in a controller weakness. These limitations are not connected only to the algorithm itself, but also to the necessity of a plant model, for which is necessary maintenance. In practical terms, the limits of MPC applicability and performance should not be connected to the algorithm deficiencies, but to the issues linked to the modeling difficulties, sensor adequacy, and insufficient robustness in the presence of faults [15, 21].

2.1. IHMPC

The IHMPC formulation was introduced by Muske and Rawlings [2]. For simplicity the algorithm will be presented only for stable systems. For unstable systems see the reference section [2]. The discrete dynamical system used is shown in (1) in which ๐ฒ is the vector output, ๐ฎ is the vector input, and ๐ฑ is the states vector:๐ฑ๐‘˜+1=๐€๐ฑ๐‘˜+1+๐๐ฎ๐‘˜,๐ฒ๐‘˜=๐‚๐ฑ๐‘˜.(1) The receding horizon regulator is based on the minimization of the infinite horizon open-loop quadratic objective function at time ๐‘˜ (2). ๐ is a symmetric positive semidefinite penalty matrix on the outputs. ๐‘ is a symmetric positive semidefinite penalty matrix on the inputs. ๐’ is a symmetric positive semidefinite penalty matrix on the rate of the input change with ฮ”๐ฎ=๐ฎ๐‘˜+๐‘–โˆ’๐ฎ๐‘˜. The vector ๐ฎ๐‘contains the ๐‘ future open-loop control moves (3). The infinite horizon open-loop objective function can be expressed as a finite horizon open-loop objective. For stable system, ๐ is defined as the infinite sum (4). This infinite sum can be determined from the solution of the discrete Lyapunov equation (5). Using simple algebraic manipulation, the quadratic objective is show in (6). The matrices ๐‡, ๐†, and ๐… are showed in (7)โ€“(9):๐ฝ๐‘˜=min๐ฎ๐‘โˆž๎“๐‘–=0๐ฒ๐‘‡๐‘˜+๐‘–๐๐ฒ๐‘˜+๐‘–+๐ฎ๐‘‡๐‘˜+๐‘–๐‘๐ฎ๐‘˜+๐‘–+ฮ”๐ฎ๐‘‡๐‘˜+๐‘–๐’ฮ”๐ฎ๐‘˜+๐‘–,(2)๐ฎ๐‘=โŽกโŽขโŽขโŽขโŽขโŽขโŽขโŽฃ๐ฎ๐‘˜๐ฎ๐‘˜+1โ‹ฎ๐ฎ๐‘˜+๐‘โˆ’1โŽคโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฆ,(3)๐=โˆž๎“๐‘–=0๐€๐‘‡๐‘–๐‚๐‘‡๐๐‚๐€๐‘–,(4)๐=๐‚๐‘‡๐๐‚+๐€๐‘‡๐๐€,(5)minฮฆ๐‘˜๐ฎ๐‘=min๐ฎ๐‘๐ฎ๐‘๐‘‡๐‡๐ฎ๐‘+2๐ฎ๐‘๐‘‡๎€ท๐†๐ฑ๐‘˜โˆ’๐…๐ฎ๐‘˜โˆ’1๎€ธ,(6)โŽกโŽขโŽขโŽขโŽขโŽขโŽขโŽฃ๐๐‡=๐‘‡๐๐+๐‘+2๐’๐๐‘‡๐€๐‘‡๐๐โˆ’๐’โ‹ฏ๐๐‘‡๐€๐‘‡๐‘โˆ’1๐๐๐๐‘‡๐๐€๐โˆ’๐’๐๐‘‡๐๐+๐‘+2๐’โ‹ฏ๐๐‘‡๐€๐‘‡๐‘โˆ’2๐๐๐โ‹ฎโ‹ฎโ‹ฑโ‹ฎ๐‘‡๐๐€๐‘โˆ’1๐๐๐‘‡๐๐€๐‘โˆ’2๐โ‹ฏ๐๐‘‡โŽคโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฆ๐๐+๐‘+2๐’,(7)โŽกโŽขโŽขโŽขโŽขโŽขโŽขโŽฃ๐๐†=๐‘‡๐๐๐€๐‘‡๐๐€2โ‹ฎ๐๐‘‡๐๐€๐‘โŽคโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฆ,(8)โŽกโŽขโŽขโŽขโŽขโŽขโŽขโŽฃ๐’๐ŸŽโ‹ฎ๐ŸŽโŽคโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฆ๐…=.(9)

2.2. RSMPC

The RSMPC strategy is basically a transformation of an optimization problem with constraints into a quadratic programming problem [3]. The RSMPC development is presented next. Consider a general system described by (10). By linearizing (10) with the Taylorโ€™s series expansion around the point immediately before the current operational point, one obtains (11). The matrices are defined in (12)โ€“(16). Equation (11) is integrated from ๐‘ก to ๐‘ก+ฮ”๐‘ก and by assuming ๐ฎ๐‘˜ constant between samples, one can write (17):๐‘‘๐ฑ๐‘‘๐‘ก=๐Ÿ(๐ฑ,๐ฎ),๐ฒ=๐ก(๐ฑ),(10)๐‘‘๐ฑ๐‘‘๐‘ก=๐€๐‘˜โˆ’1๐ฑ+๐๐‘˜โˆ’1๐ฎ+๐Ÿ๐‘˜โˆ’1,๐ฒ=๐‚๐‘˜โˆ’1๐ฑ+๐ก๐‘˜โˆ’1๐€,(11)๐‘˜โˆ’1=๎‚€๐œ•๐Ÿ๎‚|||๐œ•๐ฑ๐ฑ=๐ฑ๐‘˜โˆ’1,๐ฎ=๐ฎ๐‘˜โˆ’1๐,(12)๐‘˜โˆ’1=๎‚€๐œ•๐Ÿ๎‚|||๐œ•๐ฎ๐ฑ=๐ฑ๐‘˜โˆ’1,๐ฎ=๐ฎ๐‘˜โˆ’1๐‚,(13)๐‘˜โˆ’1=๎‚€๐œ•๐ก๎‚|||๐œ•๐ฑ๐ฑ=๐ฑ๐‘˜โˆ’1๐Ÿ,(14)๐‘˜โˆ’1||=๐Ÿ(๐ฑ,๐ฎ)๐ฑ=๐ฑ๐‘˜โˆ’1,๐ฎ=๐ฎ๐‘˜โˆ’1๐ก,(15)๐‘˜โˆ’1||=๐ก๐ฑ=๐ฑ๐‘˜โˆ’1ฬ‚๐ฑ,(16)๐‘˜+1=๐šฝ๐ฑ๐‘˜+๐šฟ๐๐ฎ๐‘˜+๐šฟ๐Ÿ๐‘˜โˆ’1,ฬ‚๐ฒ๐‘˜=๐‚๐ฑ๐‘˜+๐ก๐‘˜โˆ’1,(17) where ๐šฝ=๐‘’๐€ฮ”๐‘ก,๐šฟ=๐€โˆ’1๎€ท๐‘’๐€ฮ”๐‘ก๎€ธโˆ’๐ˆ๐,๐›€=๐€โˆ’1๎€ท๐‘’๐€ฮ”๐‘ก๎€ธโˆ’๐ˆ.(18) Since ๐ด is not singular, then (17) can be written for each prediction instant from ๐‘˜=1 to ๐‘˜=๐‘ƒ, where ๐‘ƒ is the prediction horizon and ๐‘ is the control horizon, with ๐‘ƒโ‰ฅ๐‘ and ฮ”๐ฎ๐‘˜+๐‘—=๐ŸŽ to ๐‘โ‰ค๐‘—โ‰ค๐‘ƒ. The resulting set of equation is showed below, whereฬ‚ฬ‚๎‚ƒฬ‚๐ฒ๐ฒ=๐šชฮ”๐ฎ+๐œธ,(19)๐ฒ=๐‘˜+1ฬ‚๐ฒ๐‘˜+2โ‹ฏฬ‚๐ฒ๐‘˜+๐‘โ‹ฏฬ‚๐ฒ๐‘˜+๐‘ƒ๎‚„๎‚ƒ,(20)ฮ”๐ฎ=ฮ”๐ฎ๐‘˜+1ฮ”๐ฎ๐‘˜+2โ‹ฏฮ”๐ฎ๐‘˜+๐‘๎‚„.(21) The controller is designed in order to transform the closed-loop behavior in a fist-order system behavior according to (24). To overcome the problem of infeasible solutions of the MPC optimization problem, a slack variable (๐€) is introduced in order to allow the system to deviate from reference system and to satisfy hard constraints [3] resulting in (25). This equation can be written for each prediction instant (26): โŽกโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽฃ๐‚๎ƒฉ๐šช=๐‚๐šฟ๐ŸŽโ‹ฏ๐ŸŽโ‹ฎโ‹ฎโ‹ฎ๐‚(๐šฝ+๐ˆ)๐šฟ๐‚๐šฟโ‹ฏ๐ŸŽโ‹ฎโ‹ฎโ‹ฎ๐‘๎“๐‘–=1๐šฝ๐‘–โˆ’1๎ƒช๎ƒฉ๐šฟ๐‚๐‘โˆ’1๎“๐‘–=1๐šฝ๐‘–โˆ’1๎ƒช๐‚๎ƒฉ๐šฟโ‹ฏ๐‚๐šฟโ‹ฎโ‹ฎโ‹ฎ๐‘ƒ๎“๐‘–=1๐šฝ๐‘–โˆ’1๎ƒช๎ƒฉ๐šฟ๐‚๐‘ƒโˆ’1๎“๐‘–=1๐šฝ๐‘–โˆ’1๎ƒช๎ƒฉ๐šฟโ‹ฏ๐‚๐‘ƒโˆ’๐‘๎“๐‘–=1๐šฝ๐‘–โˆ’1๎ƒช๐šฟโŽคโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฆ,(22)โŽกโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽฃ๐ฒ๐œธ=๐‘˜+๐‚๐šฝฮ”๐ฑ๐‘˜๐ฒ๐‘˜๎ƒฉ+๐‚2๎“๐‘–=1๐šฝ๐‘–๎ƒช๐šซ๐ฑ๐‘˜โ‹ฎ๐ฒ๐‘˜๎ƒฉ+๐‚๐‘๎“๐‘–=1๐šฝ๐‘–๎ƒช๐šซ๐ฑ๐‘˜โ‹ฎ๐ฒ๐‘˜๎ƒฉ+๐‚๐‘ƒ๎“๐‘–=1๐šฝ๐‘–๎ƒช๐šซ๐ฑ๐‘˜โŽคโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฆ,(23)๐‘‘๐ฒ๎€ท๐ฒ๐‘‘๐‘ก=๐ŠSP๎€ธโˆ’๐ฒ,(24)๐‚๐Ÿ๐‘˜โˆ’1+๐‚๐€๐‘˜โˆ’1๐ฑ๐‘˜+๐‚๐๐‘˜โˆ’1๐ฎ๐‘˜+๐€๐‘˜๎€ท๐ฒ=๐ŠSP๎€ธโˆ’๐ฒ,(25)๐ƒ๐Š=๐›,(26) where ๎‚ƒ๐Š=ฮ”๐ฎ๐‘˜โ‹ฏฮ”๐ฎ๐‘˜+๐‘๐€๐‘˜โ‹ฏ๐€๐‘˜+๐‘ƒ๎‚„,(27)โŽกโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽฃ๐›=๐Š๐ฒSP๐‘˜โˆ’(๐‚๐€+๐Š๐‚)๐ฑ๐‘˜โˆ’๐‚๐Ÿ๐‘˜โˆ’1๐Š๐ฒSP๐‘˜+1โˆ’(๐‚๐€+๐Š๐‚)๐šฝ๐ฑ๐‘˜๐Š๐ฒSP๐‘˜+2โˆ’(๐‚๐€+๐Š๐‚)๐šฝ2๐ฑ๐‘˜โ‹ฎ๐Š๐ฒSP๐‘˜+๐‘ƒโˆ’(๐‚๐€+๐Š๐‚)๐šฝ๐‘ƒ๐ฑ๐‘˜โŽคโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฆ,(28)โŽกโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽขโŽฃ(๐ƒ=๐‚๐๐ŸŽโ‹ฏ๐ŸŽ๐ˆ๐ŸŽ๐ŸŽ๐ŸŽโ‹ฏ๐ŸŽ๐‚๐€+๐Š๐‚)๐šฟ๐‚๐โ‹ฏ๐ŸŽโˆ’๐ˆ๐ˆ๐ŸŽ๐ŸŽโ‹ฏ๐ŸŽ(๐‚๐€+๐Š๐‚)๐šฟ๐‚(๐‚๐€+๐Š๐‚)๐šฟโ‹ฏ๐ŸŽ๐ŸŽโˆ’๐ˆ๐ˆ๐ŸŽโ‹ฏ๐ŸŽโ‹ฎโ‹ฎโ‹ฑโ‹ฎโ‹ฎโ‹ฎโ‹ฎโ‹ฎโ‹ฑโ‹ฎ(๐‚๐€+๐Š๐‚)๐šฝ๐‘ƒโˆ’1๐šฟ(๐‚๐€+๐Š๐‚)๐šฝ๐‘ƒโˆ’2๐šฟโ‹ฏ(๐‚๐€+๐Š๐‚)๐šฝ๐‘ƒโˆ’๐‘€โˆ’1โŽคโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฆ๐šฟ๐ŸŽ๐ŸŽ๐ŸŽ๐ŸŽโ‹ฏ๐ˆ.(29)The cost function can be written as (30). This equation can also be reorganized as a quadratic programming problem (31):min๎€ทฮ”๐ฎ(๐‘˜),โ€ฆ,ฮ”๐ฎ๐‘˜+๐‘๐‘š๎€ธ๎€ท๐€(๐‘˜),โ€ฆ,๐€๐‘˜+๐‘๐‘๎€ธ1๐ฝ=2๎€ทฮ”๐ฎ๐‘‡๐‘ฮ”๐ฎ+๐€๐‘‡๎€ธ๐’๐€,(30)min๎€ท๐œ(๐‘˜),โ€ฆ,๐œ๐‘˜+๐‘๐‘š+๐‘๐‘๎€ธ+21๐ฝ=2๐Š๐‘‡๐ฎ๐œบ๐Šsubjectto:๐ƒ๐Š=๐›min๐‘˜+๐‘—โ‰ค๐ฎ๐‘˜+๐‘—โ‰ค๐ฎmax๐‘˜+๐‘—โˆ’||ฮ”๐ฎmin||๐‘˜+๐‘—โ‰คฮ”๐ฎ๐‘˜+๐‘—โ‰ค||ฮ”๐ฎmax||๐‘˜+๐‘—๐‘—=0,โ€ฆ,๐‘ƒ(31) in whichโŽกโŽขโŽขโŽฃ๐‘[๐ŸŽ][๐ŸŽ]๐’โŽคโŽฅโŽฅโŽฆ๐œบ=.(32) The controller cannot eliminate offset unless (33) is handled [3]:๐‚๐Ÿ๐‘˜โˆ’1โ‰ˆ๐ฒ๐‘˜โˆ’๐ฒ๐‘˜โˆ’๐Ÿ.ฮ”๐‘ก(33)

3. The Experimental System

The experimental system built was a neutralization process that occurs in a shaken reactor tank. Figure 3 presents a photo of the experimental system.

Figure 4 shows a diagram indicating how the system works. The numbers indicate acid flow (1), base flow (2), buffer flow (3), and output flow (4). This number is used in the indexes of the modeling of the experimental system. The flows of acid (๐‘ž1) and base (๐‘ž2) are the manipulated variables (๐ฎ); the flow of buffer solution (๐‘ž3) is the unmeasured or measured disturbance (๐), depending on how it is treated in the control formulation. For the case of this study, the buffer solution flow was used only to make simulation tests. The level height of the reactor (โ„Ž) and the output flow pH (๐‘ž4) are the controlled variables or the outputs (๐ฒ).

The system was specially chosen for this study because of its strong nonlinear dynamic behavior and low operational cost, considering the consumption of inputs as electrical energy and raw material [3, 22]. The system becomes interesting under the control perspective, as it is a multivariable and nonlinear process in which the static gain suffers strong variations inside the flow operation band. Figure 5 presents the system titration curve. It can be observed that the process pH changes from 4 to 9 in the [0.87;1.22] interval of the ratio ๐‘ž2/๐‘ž1. This change in the process gain is just what makes the neutralization problem difficult to solve under the control perspective, as small modifications on the relation ๐‘ž2/๐‘ž1 can cause big or small pH variations, depending on where the operating point is in the operational region. It has to be emphasized that, in an analytical process of titration, only one drop is enough to change the pH from 4 to 9. Thus, it can be inferred that the sensitivity of the dynamic process associated to this offers a challenge problem for control in real time. It can be noticed that, once a buffer solution is added, the nonlinear behavior of the system smoothes up, so that the controller action gets easier, according to what the simulation curves with this solution indicate. If the system was linear, the relation given by pH ร—๐‘ž2/๐‘ž1 plots would be a line whose approximation can be realized by the simulated curve of larger amount of buffer solution. Montandon [3] presented results for the closed-loop system using pH control of the acid flow with classical PID controller. The conclusion was that this implementation was not able to reject disturbances in a satisfactory manner. During the preparation of this work it has been studied certain PID testing for the MIMO case, but the answers proved to be mostly unstable and hard to tune.

3.1. Phenomenological Model

Hall [23] developed the physical model of this process, which is based on the hypotheses of the perfect mixture, constant density, and total solubility of the present ions. The chemical reactions involved in the acid-base neutralization (HNO3โ€“NaOH) are shown in (34)โ€“(38). In order to have a complete model it will be considered the presence of a buffer (NaHCO3). However, for the experimental results, this solution was not used:HNO3โŸถH++NO3โˆ’,(34)NaOHโŸถNa++OHโˆ’H,(35)2OkwโŸทH++OHโˆ’,(36)NaHCO3+H2OโŸถNaOH+H2CO3,H2CO3ka1โŸทH++HCO3โˆ’,(37)HCO3โˆ’ka2โŸทH++CO3โˆ’2,(38) whereka1=โŒŠHCO3โˆ’โŒ‹๎H+๎ž๎€บH2CO3๎€ป,(39)ka2=โŒŠCO3โˆ’โŒ‹๎H+๎ž๎€บHCO3โˆ’๎€ป.(40) The amounts of ๐‘Š๐‘Ž and ๐‘Š๐‘ are called as invariants, because their concentrations are not affected along the reaction. The reactions are fast enough to allow the system to be considered as in equilibrium. Then, the equilibrium reactions can be used to determine the concentration of the hydrogen (H) ions through the concentration of the reaction invariants. Equation (41) gives the equilibrium concentration. According to Gustafsson and Waller [24], there are two reaction invariants defined for the ๐‘–th stream and presented in (42) and (43), which, when are combined, result in an implicit relation of H, ๐‘Š๐‘Ž, and ๐‘Š๐‘, as (44) shows:๎H๐‘˜๐‘ค=+๎žโŒŠOHโˆ’๐‘ŠโŒ‹,(41)๐‘Ž๐‘–=๎H+๎ž๐‘–โˆ’โŒŠOHโˆ’โŒ‹๐‘–โˆ’โŒŠHCO3โˆ’โŒ‹๐‘–๎โˆ’2CO3โˆ’2๎ž๐‘–๐‘Š,(42)๐‘๐‘–=๎€บH2CO3๎€ป๐‘–+๎€บHCO3โˆ’๎€ป๐‘–๎€บโˆ’2CO3โˆ’2๎€ป๐‘–๐‘Š,(43)๐‘Ž=Hโˆ’kwHโˆ’๐‘Š๐‘(ka1/H)+2(ka1ka2)/H2๎€ท1+(ka1/H)+ka1ka2/H2๎€ธ.(44) Making the mass balance in the reactor, together with the invariant equations and considering that the density is constant by hypothesis, will result in a differential equation system (45)โ€“(47):๐‘‘โ„Ž=1๐‘‘๐‘ก๎€ท๐‘žAr1+๐‘ž2+๐‘ž3โˆ’๐‘ž4๎€ธ,(45)๐‘‘๐‘Š๐‘Ž=1๐‘‘๐‘ก๎€ท๐‘žVr1๎€ท๐‘Š๐‘Ž1โˆ’๐‘Š๐‘Ž๎€ธ+๐‘ž2๎€ท๐‘Š๐‘Ž2โˆ’๐‘Š๐‘Ž๎€ธ+๐‘ž3๎€ท๐‘Š๐‘Ž3โˆ’๐‘Š๐‘Ž,๎€ธ๎€ธ(46)๐‘‘๐‘Š๐‘=1๐‘‘๐‘ก๎€ท๐‘žVr1๎€ท๐‘Š๐‘1โˆ’๐‘Š๐‘๎€ธ+๐‘ž2๎€ท๐‘Š๐‘2โˆ’๐‘Š๐‘๎€ธ,+๐‘ž3๎€ท๐‘Š๐‘3โˆ’๐‘Š๐‘,๎€ธ๎€ธ(47) where Ar is the reactor area, Vr is the reaction volume; โ„Ž is the solution height in the reactor; ๐‘Š๐‘Ž is the acid reaction invariant; ๐‘Š๐‘ is the base reaction invariant.

The flow output of the system is driven by gravity. The output flow (๐‘ž4) is done by a globe-type valve (48). This equation shows the relation between output flow and the reactor height and the parameters to be estimated (๐‘๐‘ฃ and ๐‘7). The valve parameters were estimated by using the model and experimental data from open loop. After this process of defining the parameters of the valve it was locked so as to avoid modifying these parameters. Nominal operation conditions are presented in Table 1:๐‘ž4=๐‘๐‘ฃโ„Ž๐‘7.(48)

For estimation and validation of the model, the plant operation must be done through the inputs that excite all the dynamic modes and in a large frequency band, so that the outputs have enough information for that procedure. These are the most usual excitation types: ramp, step, and impulse. However, in order to gather information in a broader range of frequency, random inputs made of sequences of steps with variable amplitude and duration are applied, as it is indicated by Montandon [3]. The sampling time for the process was 10โ€‰s. The acid and base flows vary as ๐‘ž1โˆˆ[9.85613.310], ๐‘ž2โˆˆ[9.97713.215], with a step probability equal to 0,8, in which the duration of each step was 120โ€‰s. The flows in which the variations occurred were 12โ€‰mL/s each, in order to keep the flow sum inside the limit given by ๐‘ž1+๐‘ž2โˆˆ[21.524.5]. The values presented were defined in such a way that, during the operation, the reactor did not get empty nor presents overflow. A set of experimental data composed by 6000 acquisition points was used. The estimation procedure used half of the data and the validation employed the remaining data, in order to assure that the model would have the ability for predicting unknown data. The estimation is a nonlinear solution of the approximation curve that uses the least square method with a first trial given by a random value and a step equal to 15. The estimated values that resulted were ๐‘๐‘ฃ=20.4477 and ๐‘7=0.0523. Figure 6 shows the error in predicting โ„Ž. Figure 7 presents the set of input random data. Figure 8 presents the results of the simulation and the experimental ones for the closed-loop run, in which one can notice that the model is very representative of the process, with difficulties to predict around pH 7; this phenomenon was already expected, taking into account the titration curve of the system. Figure 9 shows the validation of the model by the prediction of the output that comes very close to the experimental data.

3.2. State-Space Model

The state-space approach resulting from the algebraic manipulation is given by (49)โ€“(55). The terms ๐‘‘๐‘Š๐‘Ž๐‘‘๐‘ง and ๐‘‘๐‘Š๐‘๐‘‘๐‘ง are defined in (56) and (57). Equation (58) presents dydz relation:๎‚ƒ๐ฑ=โ„Ž๐‘Š๐‘Ž๐‘Š๐‘๎‚„๎‚ƒ๐‘ž,(49)๐ฎ=1๐‘ž2๎‚„๎‚ƒ๎‚„๎€บ๐‘ž,(50)๐ฒ=โ„ŽpH,(51)๐=3๎€ปโŽกโŽขโŽขโŽขโŽขโŽขโŽขโŽฃ,(52)๐€=โˆ’๐‘๐‘ฃ๐‘7โ„Ž๐‘7โˆ’1โˆ’๐‘ž001๎€ท๐‘Š๐‘Ž1โˆ’๐‘Š๐‘Ž๎€ธ+๐‘ž2๎€ท๐‘Š๐‘Ž2โˆ’๐‘Š๐‘Ž๎€ธ+๐‘ž3๎€ท๐‘Š๐‘Ž3โˆ’๐‘Š๐‘Ž๎€ธArh2โˆ’๐‘ž1โˆ’๐‘ž2โˆ’๐‘ž30โˆ’๐‘žArh1๎€ท๐‘Š๐‘1โˆ’๐‘Š๐‘๎€ธ+๐‘ž2๎€ท๐‘Š๐‘2โˆ’๐‘Š๐‘๎€ธ+๐‘ž3๎€ท๐‘Š๐‘3โˆ’๐‘Š๐‘๎€ธArh20โˆ’๐‘ž1โˆ’๐‘ž2โˆ’๐‘ž3โŽคโŽฅโŽฅโŽฅโŽฅโŽฅโŽฅโŽฆโŽกโŽขโŽขโŽขโŽขโŽขโŽฃ1Arh,(53)๐=1Ar๎€ท๐‘ŠAr๐‘Ž1โˆ’๐‘Š๐‘Ž๎€ธ๎€ท๐‘ŠArh๐‘Ž2โˆ’๐‘Š๐‘Ž๎€ธ๎€ท๐‘ŠArh๐‘1โˆ’๐‘Š๐‘๎€ธ๎€ท๐‘ŠArh๐‘2โˆ’๐‘Š๐‘๎€ธโŽคโŽฅโŽฅโŽฅโŽฅโŽฅโŽฆโŽกโŽขโŽขโŽขโŽขโŽขโŽฃ1Arh,๐†=๎€ท๐‘ŠAr๐‘Ž3โˆ’๐‘Š๐‘Ž๎€ธ๎€ท๐‘ŠArh๐‘3โˆ’๐‘Š๐‘๎€ธโŽคโŽฅโŽฅโŽฅโŽฅโŽฅโŽฆโŽกโŽขโŽขโŽฃ0Arh,(54)๐‚=100๐‘‘๐‘ฆ๐‘‘๐‘ง๐‘‘๐‘Š๐‘Ž๐‘‘๐‘ง๐‘‘๐‘ฆ๐‘‘๐‘งโŽคโŽฅโŽฅโŽฆ๐‘‘๐‘Š๐‘‘๐‘ง,(55)๐‘‘๐‘Š๐‘Ž๐‘‘๐‘ง=1+kwH2โˆ’๐‘Š๐‘๎€ทโˆ’๎€ทka1/H2๎€ธโˆ’๎€ท4ka1โ‹…ka2/H3๎€ธ๎€ธ๎€ท1+(ka1/H)+ka1โ‹…ka2/H2๎€ธ+๐‘Š๐‘๎€ท๎€ท(ka1/H)+2โ‹…ka1.ka2/H2โˆ’๎€ท๎€ธ๎€ธ๎€ทka1/H2๎€ธ+๎€ท2โ‹…ka1โ‹…ka2/H3๎€ธ๎€ธ๎€ท๎€ท1+(ka1/H)+ka1โ‹…ka2/H2๎€ธ๎€ธ2,๎€ท๎€ท(56)๐‘‘๐‘Š๐‘‘๐‘ง=1+kw/H2๎€ท๎€ธ๎€ธ๎€ท1+(ka1/H)+ka1โ‹…ka2/H2๎€ธ๎€ธ๎€ท(ka1/H)+2โ‹…ka1โ‹…ka2/H2๎€ธโˆ’๎€ทHโˆ’(kw/H)โˆ’๐‘Š๐‘Ž๎€ท๎€ธ๎€ท1+(ka1/H)+ka1โ‹…ka2/H2โˆ’๎€ท๎€ธ๎€ธ๎€ทka1/H2๎€ธโˆ’๎€ท4โ‹…ka1โ‹…ka2/H3๎€ธ๎€ธ๎€ท๎€ท(ka1/H)+2โ‹…ka1โ‹…ka2/H2๎€ธ๎€ธ2+๎€ทHโˆ’(kw/H)โˆ’๐‘Š๐‘Žโˆ’๎€ท๎€ธ๎€ทka1/H2๎€ธโˆ’๎€ท2โ‹…ka1โ‹…ka2/H3๎€ธ๎€ธ(๎€ทka1/H)+2โ‹…ka1โ‹…ka2/H2๎€ธ,(57)๐‘‘๐‘ฆ๐‘‘๐‘ง=โˆ’log10๐‘’H.(58)

4. Results and Discussions

The real-time implementation was done using the successive linearization around the operating point. In this case, the linear form results (11).

A controller designed around a stationary state would not be able to control the system, because, for some regions, the stationary state would be very far from the desired point and so the plant model mismatch. Even with the successive linearization, the system control would not be successful, mainly in regions with high gain. There are several ways to deal with this problem. One of them is to expand the states, creating a new state matrix, and then the original structure of the optimization problem can be kept (59). The term related to the output linearization does originate problems for the controller, because it only maps state output and does not interfere in the systems dynamics as the term ๐Ÿ๐‘˜โˆ’1 does. Once this modification is done, it is possible to work on the controller previously defined. This option was chosen for real-time operation. Another form can be found in Reis [25]:๐‘‘๐ฑ=โŽกโŽขโŽขโŽฃ๐€๐‘‘๐‘ก๐‘˜โˆ’1๐ŸŽ๐ŸŽ๐Ÿ๐‘˜โˆ’1โŽคโŽฅโŽฅโŽฆโŽกโŽขโŽขโŽฃ๐ฑ1โŽคโŽฅโŽฅโŽฆ+๐๐‘˜โˆ’1๐ฎ.(59) For the real application in the experimental system, which has nonlinear characteristics, it is necessary to perform successive linearization of the process model in order to apply linear algorithms. The dynamic evolution of the process results in a time-varying system (LTV). The equation of the IHMPC and RSMPC in an LTV form can be easily extrapolated from the formulation presented herein, and for simplicity its description is omitted.

In the experimental system, there are the states โ„Ž, ๐‘Š๐‘Ž, and ๐‘Š๐‘. For this case, the last two states are not measured, as it was shown in the modeling section of the system, so you need to estimate them (ฬ‚๐ฑ). To this end, we used a Kalman filter [26], (60). For the IHMPC controller, we also used an open-loop observer (61), informing the model that the error (๐ž) enters into the plant and model in order to minimize the interference of state estimation in the system behavior [27]:ฬ‚๐ฑ๐‘˜+1โˆฃ๐‘˜ฬ‚๐ฑ=๐€๐‘˜โˆฃ๐‘˜โˆ’1+๐๐ฎ๐‘˜๎€ท๐ฒ+๐‹๐‘˜ฬ‚๐ฑโˆ’๐‚๐‘˜โˆฃ๐‘˜โˆ’1๎€ธ,(60)๐ž=๐ฒPlantโˆ’๐ฒModel.(61) RSMPC and IHMPC were implemented in real-time operation of the experimental plant, using the interface through LabVIEW and the controller computation, using the routines implemented in Matlab. In the literature there are several techniques of controller tuning. In this work Henson and Seborg [11] and Montadonโ€™s [3] indications were adopted. Besides, a field refinement was done during the initial run in closed loop with each controller, making small adjustments in parameters, so that the system would deliver a better experimental performance in closed loop. Such results were omitted in this paper. Table 2 shows the parameters of each controller resulting from the simulation and used in the experimental run. The controllers were at first tuned with identity matrices and a control horizon equal to 10; besides, a tuning was done until achieving a satisfactory response. Figure 10 presents the structure of the experimental plant, and Figures 11 and 12 show the LabVIEW implementation.

Equation (62) shows that the calibration curves of the instruments. ๐‘‰0,๐‘‰1,๐‘‰2,๐‘‰3, and ๐‘‰4 are channel voltages. The regression coefficients are equal to 1 [4, 28]:๐‘ž1=5.2788๐‘‰0๐‘žโˆ’9.4776,2=5.0997๐‘‰1๐‘žโˆ’9.5541,3=0.2090๐‘‰2โˆ’0.3845,pH=1.8982๐‘‰3โˆ’3.5583,โ„Ž=5.6347๐‘‰4โˆ’9.0838.(62) Setpoint variations were done to evaluate the ability of the controllers to lead with transitions. Starting the system with a pH equal to 7 and a reactor height equal to 18โ€‰cm, variations were done according to the vector in (63), considering that each step took 2000 seconds. For all controller simulations a random noise of average equal to zero was added with about 10% of the outputs (โ„Ž and pH):โŽกโŽขโŽขโŽขโŽขโŽฃโ„Ž๐‘‘โŽคโŽฅโŽฅโŽฅโŽฅโŽฆ=โŽกโŽขโŽขโŽขโŽขโŽฃโŽคโŽฅโŽฅโŽฅโŽฅโŽฆpH1818181818211815187107477777000000000.(63)

Figures 13, 14, 15, and 16 present the closed-loop simulation that uses RSMPC. The performance shown is quite reasonable.

The experimental run was done in two steps to preserve and manipulate the data separately. In the first part was made a variation in the pH setpoint and kept the level constant. In the second part it was done otherwise. Figures 17, 18, 19, and 20 show the experimental run of the pH setpoint changes, and Figures 21, 22, 23, and 24 show the experimental run of level setpoint changes. The system was controlled in all runs. During the experiment, there was a need to increase the weight matrix of the control action (as indicated in Table 2); as the output response started to oscillate, it was not able to reach the desired setpoint. However, the overall response can be considered satisfactory.

The results for the IHMPC simulation are presented in Figures 25, 26, 27, and 28. The results are suitable to apply on line the control to the real process.

Like RSMPC, experimental runs with IHMPC were done in two steps. Figures 29, 30, and 31 show the experimental run of the pH setpoint changes, and Figures 32, 33, and 34 show the experimental run of level setpoint changes. This controller showed a performance superior to the RSMPC controller performance and with satisfactory and adequate response and performance.

5. Conclusions

Through this research it was able to better understand the use of predictive controllers in a real-time application, paving the way for research in the area. The experimental application led to an approximation of reality and industrial practice, experiencing some of the common problems and issues in the implementation of controllers. It was possible to verify the need for a mastery of techniques and concepts of process control, system modeling, parameter identification, scheduling, optimization, and, in addition, common sense engineering to solve the experimental problems.

The control of such class of nonlinear processes is a very challenging area with many possibilities for development and that undoubtedly has importance and influence on the performance of process and in consequence results in their organizations.

This work carried out the experimental application of two predictive controllers: IHMPC and RSMPC, both in simulation environment and in the experimental plant dealing with the level and pH control.

The experimental plant was modeled and has the required parameters identified through the run in open loop. The simulation results were satisfactory and indicated that the model is representative of the real process and suitable for the control purposes that were aimed. The simulation answers of the system outputs subjected to the controllers were adequate and satisfactory. The theoretical and experimental responses of the IHMPC runs were satisfactory.

The controller adjustment for real-time operations was suitable and feasible. The interference of matters related to leaking, process noises, and noises from electrical source and other problems associated to real-time application brought additional difficulties that demanded process knowledge of the process.

The experimental application of robust controllers associated or not to control systems tolerant to failures and the use of online identification employing neural networks will be presented elsewhere.