Iterative Learning Control (ILC)-Based ... - American Chemical Society

Feb 16, 2018 - quadratic form, which denotes the difference between the real trajectory and the reference one. Because of the nature of repetitiveness...
0 downloads 0 Views 4MB Size
Article Cite This: Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX

pubs.acs.org/IECR

Iterative Learning Control (ILC)-Based Economic Optimization for Batch Processes Using Helpful Disturbance Information Peng-Cheng Lu,† Junghui Chen,*,‡ and Lei Xie*,† †

State Key Laboratory of Industrial Control Technology, Zhejiang University, Hangzhou 310027, China Department of Chemical Engineering, Chung-Yuan Christian University, Chung-Li, Taoyuan, Taiwan, Republic of China, 32023



ABSTRACT: The control strategies for batch processes in the past are usually categorized into two levels. The higher level is economic optimization running at a low frequency and the lower one tracks the reference given at the higher level using MPC or PID. The lower level regards all of the disturbances as something to reject using a quadratics-based optimization objective. However, not all of the disturbances are unfavorable to batch processes; some of them would be helpful. In this paper, an economic optimization for batch processes is directly applied at the lower level. It replaces the conventional tracking strategy. With the collection of the information on disturbances in the previous batches, the iterative learning control strategy (ILC) can determine better operation profiles. ILC has the advantage of continuously improving the economic performance of the current batch with enriched information on disturbances from batch to batch. The convergence of the proposed ILC-based economic optimization is proved. To demonstrate the potential applications of the proposed design method, a typical dynamic batch reactor is applied.

1. INTRODUCTION Batch processes, unlike continuous processes most often used for high-throughput plants, are usually widely applied to the manufacture of high-quality, low-volume products, such as microelectronics, specialty chemicals, food, pharmaceuticals, and biotechnology.1,2 They provide the flexibility required by multipurpose facilities, and they can be used to produce several different products in various conditions in the same vessel; particularly frequent changeovers are necessary. Although several theories of process control have been significantly developed during the past few decades in industries, most control techniques applied well in continuous processes are not suitable for batch processes, because batch processes exhibit their strong nonlinearity, time-varying dynamics, and the nature of unsteady conditions, involving several transitions and large transient phases that cover large operating envelopes. These issues remain a big challenge in batch processes.3,4 The features of batch processes in design, optimization, and control, like the strategy proposed in continuous processes,5 can be represented as a block diagram of the hierarchical strategy (see Figure 1). The hierarchical strategy divides the whole task into different layers to make the design of each layer more concise and easy. In the highest layer of the hierarchy, © XXXX American Chemical Society

planning and scheduling decisions are made on the order of days or months; economic optimization, end-point property control, and control of batch processes are addressed in the next layers of the hierarchy of Figure 1. They are responsible for process optimization with a metric defining the operating profit and the operating cost to be optimized. A reference trajectory is generated in this layer (real-time optimization (RTO)) and sent to the feedback process control systems, which consist of the supervisory control and regulatory control layers. The process control system tracks the reference trajectory, rejects disturbances, and guides the process dynamic path along the optimal one. In the supervisory control layer, advanced control algorithms are needed to account for process constraints, coupling of process variables and processing units, and the operating performance. One of the algorithms, model predictive control (MPC), has been widely used in batch processes.6 However, in the regulatory layer, proportional− Received: Revised: Accepted: Published: A

November 12, 2017 February 10, 2018 February 15, 2018 February 16, 2018 DOI: 10.1021/acs.iecr.7b04691 Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX

Article

Industrial & Engineering Chemistry Research

mentioned above, Gao et al. proposed robust ILC based on a two-dimensional (2-D) model and made analysis of the behaviors of batch processes easier.8,9,11 The 2-D model integrates the batch index and the time index into one model for the analysis of batch processes. The relevant control performance assessment for those ILC-controlled batch processes in a 2-D system framework has been proposed later.17 In addition, a fuzzy ILC control method was developed for batch processes in order to deal with interval time-varying delays.18 Also, a latent variable model combined with MPC was applied in refs 6 and 10. To have an economic performance of batch processes, a concept from economic MPC (EMPC) proposed in continuous processes was directly applied to batch processes,19 but the method focuses on a single batch only. In reality, it should take the repetitive features of batch-to-batch operations into consideration to promote the economic performance from one batch to the next batch. Recently, a problem of variable duration economic model predictive control of batch processes was considered. A tiered EMPC formulation that optimizes process economics and the batch duration was developed.20 In batch processes, the sequence of operation steps, often directly adapted from laboratory experimental procedures, is referred to as the recipe. Because of differences in equipment and the scale between the laboratory and the industrial batch unit, modifications of the recipes are necessary on an industrial scale in order to ensure productivity, safety, quality, and satisfaction of operational constraints.21,22 Thus, the nominal optimal reference trajectories for batch processes generated from the RTO layer may be highly sensitive,23 which causes the desired economic objective and end-point quality to be infeasible. This can be attributed to the variations in the initial and operating conditions, all of which introduce disturbances in the final product quality. What is worse, it is difficult to obtain the real-time dynamic information on quality variables because of high cost, low reliability, or low sampling rate of the hardware sensor. As a result, the difficulty of design, optimization, and control of batch processes online is increasing. Even with the existence of the disturbances, the solution of robust optimization can be developed, but this method sacrifices optimality, making economic performance conservative under such a circumstance.24 Among all the past work, the reference trajectories are generated in the RTO layer and the main task of the supervisory control layer is to reject disturbances and to track the references perfectly, but there are still some drawbacks under this control structure: • Recipes (or designed trajectories): In batch operations, because of differences in the laboratory and the industrial scale, the operation profiles should be modified while recipes are transferred from the laboratory to the industrial batch unit. This means the optimal reference from the RTO layer should be refined for compensating model errors or disturbances. • Disturbances: The existence of disturbances, both deterministic and stochastic, will affect the dynamics of batch processes. Under such a circumstance, the given reference trajectory in the supervisory control layer would not be tracked perfectly. Disturbances will make the process dynamic path deviate from the reference trajectory. Thus, from the viewpoint of tracking in the control design, all of the disturbances are bad, because the control performance becomes worse. They should be rejected. However, even if the tracking is perfect, the generated reference trajectory may not have the optimal

Figure 1. Traditional hierarchical paradigm employed in industries with batch processes for planning/scheduling, optimization, and control of batch processes.

integral−derivative (PID) is good enough for control loops as the control loops are mostly single-input single-output (SISO). In the past few decades, more attention has been paid to the RTO layer and the advanced processes control layer in batch processes. The purpose of the optimization layer is to generate a suitable reference trajectory for the next layer.3,6−12 The traditional tracking MPC (TMPC) has been implemented to minimize the error between the process dynamic path and the reference trajectory. The objective of TMPC is usually in a quadratic form, which denotes the difference between the real trajectory and the reference one. Because of the nature of repetitiveness in batch processes, iterative learning control (ILC) has been applied to control of batch processes for decades.2,3,7−9,11,13,14 The TMPC technique combined with ILC for batch processes was proposed.7 In this technique, a linear time-varying (LTV) model was used. Also, end product properties and transient profiles of the process variable were integrated in the control structure. This control structure was extended to constrained multivariable control.12 Tracking control of batch processes was also extended to the integration of batch-to-batch ILC and within-batch online control, which could reduce the influences of disturbances and improve the performance of the current batch run.13The models often used in the ILC-based TMPC strategies are linear time-invariant (LTI) or LTV, because of the complexity of mechanism models. A stacked neural-network-based model instead of mechanism models was used.15 Because of model-plant mismatches and the presence of unknown disturbances, a batch-to-batch optimal control strategy based on the linearization of the stacked neural network model was conducted. In addition, a method of predicting parameter estimates for the next batch was proposed for handling batchto-batch parametric drifts.16 A model-based ILC strategy using the generalized hinging hyperplanes (GHH) was proposed in ref 14, because GHH was very suitable for constructing the dynamic model of batch processes. Unlike the method B

DOI: 10.1021/acs.iecr.7b04691 Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX

Article

Industrial & Engineering Chemistry Research

would be better at capturing the instantaneous dynamic behaviors and track the time-varying parameters of the processes than an LTI model. Batch processes, especially chemical batch processes, are relatively slow and they have long duration. The LTV model can well approximate the nonlinear dynamics processes if an appropriate time interval is chosen (the smaller the interval is, the more accurate the LTV model will be). Thus, in this paper, an LTV model is used here to describe the nonlinear dynamic batch process. It is represented by

economic performance in reality. From the viewpoint of the economic performance, the disturbances may be favorable, since they may help enhance the end-point profit or decrease the operating cost to some extent. Thus, in a good control design, what should be done is accept favorable disturbances and reject unfavorable disturbances to improve the economic performance. • ILC-based economic optimization design: The conventional ILC-based TMPC strategies are used to iteratively make the trajectory as close to the reference as possible from one batch to the next batch. They just enhance the control performance only without considering the economic performance. This means ILC-based EMPC would be more useful. The trajectory should be designed as close to the best economic performance as possible from one batch to the next batch. Therefore, it is imperative to develop batch control strategies to enhance the economic performance. In this paper, the strategy based on the economic performance of the batch operation, instead of the errors from the reference trajectories in the supervisor control layer, is proposed. This strategy is similar to the EMPC theory in continuous processes.5,25−27 Two new ILC-based EMPC strategies of the batch processes, including batch-to-batch (BtB) and within-batch (WB), will be developed to improve the economic performance frequently. The EMPC strategy also sufficiently uses the data from the past operating batches to estimate deterministic and stochastic disturbances. Then ILC can repetitively learn the information on disturbances from the past batches to update the control of the next batch runs. The ILC strategy can be divided into two categories: direct and indirect. The former estimates the disturbances directly and the latter infers the disturbances indirectly by estimating states that contain the information on disturbances.28 Although the proposed ILC-based EMPC strategy and the ILC-based TMPC strategy are both implemented around the reference trajectory, they are quite different. That is because the former concentrates on improving the economic performance by searching for a better trajectory and the latter only focuses on eliminating the tracking error. The rest of the paper is organized as follows. In section 2, the problem of ILC-based economic optimization for batch processes is defined. Section 3 discusses the BtB and WB ILC-based EMPC, along with the proof of the convergence of the proposed control strategies. The better economic performance of the WB ILC-based EMPC is also proven in section 3. A case of an industrial batch chemical reactor is presented in section 4. Finally, concluding remarks are given in section 5.

x k(t + 1) = A(t )x k(t ) + Bu(t )uk(t ) + Bd (t )dk(t ) z k (t ) = F (t )x k (t ) + m k (t ) yk(t ) = C(t )x k(t ) + nk(t )

(1)

Here, the subscript k denotes the batch index while t ∈ I0:T denotes the time index within a batch. xk(t) ∈ Rnx, uk(t) ∈ Rnu, dk(t) ∈ Rnd, zk(t)∈ Rnz, and yk(t)∈ Rny denote the state, the input, the unknown disturbance, the output of the process variables, and the output of quality variables at time t of the kth batch, respectively. The output measurements are taken from process sensors and sampled frequently in real time. A(t), Bu(t), Bd(t), and C(t) are the corresponding time-varying matrices obtained by linearizing the mechanism model along the trajectory or system identification at each time point t. The states cannot be obtained directly and only the process variables can be measured. F(t) is the corresponding timevarying matrix of the observations of the process variables. In batch processes, the end-point quality is important, because it provides a detailed evaluation of the reaction product, but the quality measurements are generally only available infrequently (often at the end of one batch process (t = T)). This paper denotes yk(T) as the quality variable and C(T) is the corresponding output matrix at the end of a batch. mk(t) ∈ Rnz and nk(T) ∈ Rny denote the measurement noises of the process variables and the quality variables, respectively, both of which are independent and identically distributed white noises, mk(t) ∼ N(0,σ2m) and nk(T) ∼ N(0,σn2). Consider the outputs (zk) in eq 1 from t = 0 and t = T for the one batch run and assemble the results of state, input, unknown disturbance, and output of the process variables at batch k:

2. PROBLEM DEFINITION In the RTO layer, dynamic nonlinear optimization rather than a static one should be carried out. The optimization problem containing a nonlinear objective function and nonlinear constraints cannot be completely solved at a high frequency. Solving the problem often takes several minutes or even a few hours, which exceed the time interval of the control adjustment in the practical applications. One feasible way is to use a linear model to represent the local behavior of the nonlinear dynamics. Thus, dynamic nonlinear optimization turns into a general static nonlinear optimization. In this situation, online implementation is practical and reasonable, since the computational time is greatly reduced. Although the LTI model is good at describing linear dynamic processes, batch processes often exhibit a significant nonlinear behavior in a wide range of operating conditions. To solve the problem, an LTV model

x k = Φx k(0) + Ψuuk + Ψddk zk = Ωx k + mk yk(T ) = Γx k + nk(T )

(2)

The stacked state, input and output are given as x k = [x k(1)T

x k(2)T ⋯ x k(T )T ]T

uk = [uk(0)T

uk(1)T ⋯ uk(T − 1)T ]T

zk = [zk(1)T

zk(2)T

⋯ zk(T )T ]T

mk = [mk(1)T mk(2)T ⋯ mk(T )T ]T

(3)

Also, the Hankel matrices of input, output, and disturbance are C

DOI: 10.1021/acs.iecr.7b04691 Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX

Article

Industrial & Engineering Chemistry Research ⎡ A(0) ⎤ ⎢ ⎥ ⎢ A(1)A(0)⎥ ⎢ ⎥ ⋮ Φ=⎢ ⎥, ⎢ T−1 ⎥ ⎢ ∏ A(i) ⎥ ⎢⎣ ⎥⎦ i=0

δ x = Ψuδ u + Ψdδ d

With eqs 8 and 9, dropping the high-order component, the following can be obtained: V (x , u) = V (x ref , u ref ) +

Γ = [0 ⋯ C(T )]

In eq 10, if the nominal optimal input is applied directly to the batch process, which means δu = 0, the disturbances will ∂V definitely affect the economic performance. If ∂x Ψdδ d > 0, then V(x, uref) > V(xref, uref) can be obtained, which means the ∂V economic performance becomes worse. Similarly, if ∂x Ψdδ d ≤ 0, then V(x, uref) ≤ V(xref, uref), meaning the economic performance becomes better. Consequently, the effects of the disturbances can be divided into two categories: useful and unfavorable. Since the disturbances might be useful or unfavorable, it is necessary to treat control design in different ways. In the conventional TMPC, the objective function is usually in a quadratic form for minimizing the error of the state and the reference state. Thus, TMPC regards all of the disturbances as bad things and dictates that they should be rejected. This control strategy does not take the advantage of the useful disturbances, resulting in an economic loss. Even if MPC combined with ILC is used to make the tracking perfect, the economic performance would not be good enough. The above issue is simply explained through a graphical representation of the economic performance design shown in Figure 2. In this figure, the horizontal axis denotes the state, and the vertical axis denotes the input. The contour lines show the value of economic performances under different operating conditions. Parallel thin lines (shown in red in Figures 2a and 2b) represent the local LTV model. In the model, the changes of the state and the input should be along the line. The control strategies of TMPC and EMPC are shown in Figures 2a and 2b, respectively. In Figure 2, (x0*,u0*) denotes the initial optimized operating condition obtained from the RTO layer. With the optimized inputs applied into the process, the real operating condition (xr0,u0*) would definitely deviate from the original optimized one, because of the existence of disturbances and uncertainties. To improve the performance, two control strategies (ILC-based TMPC and ILC-based EMPC) based on the local model are used to determine a new optimal operating condition (x1*,u1*) along the local model line. As TMPC and EMPC are quite different, the former can find the new operating condition which is the intersection of the parallel line and the vertical line at x1* = u0*, and the latter can find the new operating condition with the higher economic performance, which is the tangent point of the local model line and contour lines. It would not be difficult to see that the EMPC design has higher economic performance than the TMPC design, mainly because EMPC pays attention to the economic performance by adjusting the input based on the disturbances in the designed system, while TMPC only focuses on how to reject the disturbances and uncertainties in the designed system to make the states exactly reach the optimized one at the initial design (x*0 ). Actually, the disturbances (favorable or unfavorable) would make the state of the process deviate in one of the two directions. Once the design of TMPC is applied to the real system, the input and the actual state would be located at

(4)

⎤ ⎥ ⎥ ⋯ Bu(1) 0 ⎥ ⋮ ⋱ ⋮ ⎥ ⎥ T−1 ∏ A(i)Bu(1) ⋯ Bu(T − 1)⎥⎥ ⎦ i=2 ⋯

0

0

= [ Ψu(0) Ψu(1) ⋯ Ψu(T − 1)] (5)

⎡ Bd (0) ⎢ ⎢ A(1)Bd (0) ⎢ Ψd = ⎢ ⋮ ⎢T−1 ⎢ ⎢∏ A(i)Bd (0) ⎣ i=1

⎤ ⎥ ⎥ ⋯ Bd (1) 0 ⎥ ⋮ ⋱ ⋮ ⎥ ⎥ T−1 ∏ A(i)Bd(1) ⋯ Bd(T − 1)⎥⎥ ⎦ i=2 0



0

= [ Ψd(0) Ψd(1) ⋯ Ψd(T − 1)] (6)

Like economic optimization in the continuous system, the objective function of the economic optimization in the RTO layer is described as the sum of the stage cost function and the terminal cost function. It is defined as follows: T−1

V (x , u ) =

⎛ ∂V ∂V ⎞⎟ ∂V ⎜ Ψ + δu + Ψdδ d ⎝ ∂x u ⎠ ∂u ∂x (10)

Ω = diag[F(1) F(2) ⋯ F(T )],

⎡ Bu(0) ⎢ ⎢ A(1)Bu(0) ⎢ Ψu = ⎢ ⋮ ⎢T−1 ⎢ ⎢∏ A(i)Bu(0) ⎣ i=1

(9)

∑ l(x(t ), u(t ))+Q (y(T )) t=0

(7)

where l:Rnx × Rnu → R is a scalar function that represents the stage cost of each time period of the one batch run. Q:Rny → R is the scalar function that is the terminal cost of the entire batch; apparently, it would be a negative one to describe the terminal profit of the entire batch. With the constraints of the process dynamics and the economic objective function, the optimization problem in the RTO layer is built up. After solving the problem, the nominal optimal trajectory is obtained as a reference (xref,uref). The corresponding process variable reference is denoted as zref. Then, the LTV model can be obtained along the reference by linearization. Different control strategies can be implemented in the following layer. With the optimal reference trajectory, the objective function in eq 7 can be linearized using Taylor series expansion along the reference. V (x , u) = V (x ref , u ref ) +

∂V ∂V δx + δ u + o(δ x , δ u) ∂x ∂u (8)

The relationship between δx and δu is actually given by the LTV model along the reference trajectory described in eq 2: D

DOI: 10.1021/acs.iecr.7b04691 Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX

Article

Industrial & Engineering Chemistry Research

disturbances from the unfavorable ones, because the disturbances are unmeasurable. In this paper, the process states would be estimated to determine which disturbances are helpful or unfavorable and which should be used for the economic optimization design. All of these will be discussed in detail in the next section.

3. ILC-BASED EMPC FOR BATCH PROCESSES With the augmented state-space model (eq 2) and the economic objective function (eq 7) mentioned above, one can optimize the economic performance of the current batch. Because of the process disturbances and uncertainties, the control design cannot effectively compensate for such disturbances. In the past, ILC has been developed to successfully improve the control system for the present operation batch by feeding back the errors of the previous batches between the desired outputs and the real ones. It was also believed to be able to produce a satisfied output product and reduce variability in the output product. Some model-based techniques have been developed based on system inversion29,30 to enhance ILC. To explore good the economic performance of the operating batch, the ILC-based EMPC is proposed for batch processes in this paper to sufficiently use the information on the repetitive nature of the past batches. It can gradually enhance the economic performance using batch-to-batch information when there are batch-wise repeated disturbances. Moreover, two different ILC-based EMPC strategies, including BtB ILC-based EMPC and WB ILC-based EMPC, are respectively developed in this section. 3.1. Batch-to-Batch ILC-Based EMPC. The batch-to-batch optimization is to obtain the best control input according to currently existing knowledge of the effects of the disturbance to the batch processes. According to the objective function described in eq 7, there is no direct relationship between the objective and the disturbance. The disturbance will directly affect the dynamic of the batch processes; then it will indirectly affect the objective function. In this situation, the best choice is to estimate the state, since they have the direct relationships with both the objective function and the disturbances. Whenever there is a disturbance at each batch run, dk = [dTk (0), dTk (1), ..., dTk (T − 1)]T, it is generally understood that the disturbance consists of two inseparable parts: dk = d̅k + vk

(11)

d̅Tk (1), ..., d̅Tk (T − 1)]T is the unknown and vk = [vTk (0),vTk (1), ..., vTk (T − 1)]T is the

[d̅Tk (0),

where d̅k = deterministic part, inherent variability because of random signals during each batch. Besides, as the change of the initial condition is usually random, the disturbances in two successive batches can be represented by

Figure 2. Different control strategies for batch processes: (a) TMPC and (b) EMPC.

d̅k + 1 = d̅k + wk

(xr1,u1*)1 or (xr1,u1*)2 in Figure 2a, better or worse. In contrast, the input and the actual state conditions designed by EMPC are shown in Figure 2b, (xr1,u*1 )1 or (xr1,u*1 )2. Thus, favorable disturbances can help increase the economic performance if they drive the trajectory to a better place, but unfavorable ones would decrease the economic performance if they drive the trajectory to a worse place. Both should have different design strategies, rather than taking all the disturbances as unfavorable effects. Thus, it is necessary to distinguish which disturbances have helpful effects on the economic performance, but it is quite a difficult task to directly distinguish the helpful

(12)

where wk = [wTk (0),wTk (1), ..., wTk (T − 1)]T denotes the variance between two adjacent batches. In eqs 11 and 12, both wk(t), t ∈ I0:T−1 and vk(t), t ∈ I0:T−1 are independent and identically distributed white noises, wk(t) ∼ N(0,σ2w) and vk(t) ∼ N(0,σ2v ), respectively. Since the disturbances contain the deterministic/repetitive part and the stochastic part, with eq 11, the state in eq 2 can be expressed as x k = Φx k(0) + Ψuuk + Ψd(d̅k + vk) E

(13)

DOI: 10.1021/acs.iecr.7b04691 Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX

Article

Industrial & Engineering Chemistry Research Pk | k − 1 = Pk − 1 | k − 1 + Q k

Similarly, the state of the (k + 1)th batch is x k + 1 = Φx k + 1(0) + Ψuuk + 1 + Ψd(d̅k + 1 + vk + 1)

= Pk − 1 | k − 1 + Ψd(wk − 1 + vk − vk − 1)(wk − 1 + vk − vk − 1)T ΨdT

(14)

With eqs 12−14, the incremental form of the process state can be easily obtained.

= Pk − 1 | k − 1

x k + 1 = x k + ΨuΔuk + 1 + Φ(x k + 1(0) − x k(0)) + Ψd(wk + vk + 1 − vk)

R w + 2R v





0

0

⎤ ⎥ 0 ⋯ ⎥ T ⎥Ψd ⋱ ⋮ ⎥ ⋯ R w + 2R v ⎥⎦ ⋯

0

vk(t)vTk (t).

where Rw = and Rv = Pk|k is a posteriori error covariance matrix. It is a measure of the accuracy of the estimated state. With the new measurements, the predicted state and the covariance matrix should be updated. The error between the measurement and the prediction in the process variable and the quality variable is

(16)

⎡ ekz ⎤ ⎡ zk ⎤ ⎡ ⎤ ⎡ zk ⎤ Ω ⎥ − ⎢ ⎥x ̂ k | k − 1 = ⎢ ⎥ − L kx̂ k | k − 1 ek = ⎢ y ⎥ = ⎢ ⎢⎣ yk(T )⎥⎦ ⎢⎣ ek ⎥⎦ ⎢⎣ yk(T )⎥⎦ ⎣ Γ ⎦ (20)

⎤ where Lk = ⎡⎣ Ω Γ ⎦ and ek contains the measurement residual of the process variable and the quality variable. The residual covariance can be calculated in the following equation:

Sk = LkPk | k − 1Lk T + R k = LkPk | k − 1Lk

x k = x k − 1 + ΨuΔuk + Ψd(wk − 1 + vk − vk − 1)

T

zk = Ωx k + mk (17)

= LkPk | k − 1Lk T

With the improvement of the estimation accuracy of the unknown disturbances, more knowledge of the disturbances will be obtained. However, it should be noted here that only the knowledge of deterministic disturbances is useful and it can be estimated. Also, it is helpful for improving the economic performance of batch processes using the proposed iterative learning method. With the batchwise dynamics, process, and quality value measurements described in eq 17, the problem becomes a general estimation of the states from the noisy sensor measurements and the disturbances using the Kalman filter. In the past, Lee et al. also used successfully the estimated states for control design.2,7,29 However, their work was done based on TMPC, not from the economic point of view. The Kalman filter is a recursive filter; only the estimated state from the previous time step and the current measurement are needed to estimate the current state.31 Thus, the estimation at each time point in continuous processes is considered as the estimation at each batch run in batch processes. Therefore, the notation x̂n|m represents the estimate of x at batch n with the given observations up to batch m, m ≤ n. x̂k|k is a posteriori state estimated at the kth batch with the given observations up to batch k. With the state-space model in eq 17, both the expected value of the state and the covariance matrix can be predicted by x̂k | k − 1 = x̂k − 1 | k − 1 + ΨuΔuk

0

0

wk(t)wTk (t)

However, practically, the initial states of all the batches may not be always the same. It is appropriate to make the assumption that the difference between two successive batches obeys the normal distribution. Thus, the difference between two successive batches can be seen as a stochastic disturbance. In this situation, the third term and the fourth term at the right side of eq 15 can be combined, and the problem can still be solved in the proposed framework. Now, the disturbance in eq 2 is replaced with the state of two successive batches in eq 16. Equation 16 is primarily concerned with the changes of the state of the current batch from its state of the previous batch. Thus, the state-space model of the kth batch in eq 2 can be rewritten as

yk(T ) = C(T )x k + nk(T )

+ 2R v

(19) (15)

If the initial states for each of the batches are the same, the third term at the right side of eq 15 can be removed to yield x k + 1 = x k + ΨuΔuk + 1 + Ψd(wk + vk + 1 − vk)

⎡R w ⎢ ⎢ + Ψd⎢ ⎢ ⎢⎣

⎡ m k ⎤⎡ m k ⎤ T ⎥ ⎥⎢ +⎢ ⎣ nk(T )⎦⎣ nk(T )⎦ ⎡R m ⎢ ⎢ ⋮ +⎢ 0 ⎢ ⎢⎣ 0

0⎤ ⎥ ⋱ ⋮ 0⎥ ⋯ Rm ⋮ ⎥ ⎥ 0 ⋯ R n ⎥⎦ ⋯

0

(21)

where Rm = mk(t)mkT(t) and Rn = nk(t)nkT(t), respectively. The optimal Kalman gain is K k = Pk | k − 1LkTS−k 1

(22)

The updated state estimation (x̂k|k) and the updated covariance matrix (Pk|k) are given by x̂k | k = x̂k | k − 1 + K kek

(23)

Pk | k = (I − K kLk)Pk | k − 1

(24)

With the posteriori estimation of the state of the previous batch and the change of the input of the previous batch, the optimization problem of the BtB ILC-based EMPC can be described as follows: min Vk + 1(x̂k + 1 | k , uk + 1) uk + 1

T−1

= min uk + 1

(18)

∑ l(x̂k+ 1 | k(t ), uk+ 1(t )) + Q (yk̂ + 1 | k(T )) t=0

(25)

subject to F

DOI: 10.1021/acs.iecr.7b04691 Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX

Article

Industrial & Engineering Chemistry Research

the BtB ILC-based TMPC. Assume that both the BtB ILCbased EMPC and TMPC have converged with the repetitive disturbances, so the estimations of the states and the disturbances are correct. Then the objective function of the BtB ILC-based TMPC, which is used to eliminate the effects of disturbances, is defined.

x̂k + 1 | k = x̂k | k + ΨuΔuk + 1 uk + 1 = uk + Δuk + 1 yk̂ + 1 | k (T ) = Γx̂k + 1 | k

Note that the advantage of using the states at the next time point and at the current time point in eq 25 is that estimating the disturbance problem can be eliminated. The optimal solution obtained by optimizing the optimization problem of eq 25 is denoted as (x̂*k+1|k,u*k+1) and the corresponding optimal value of the economic objective function is V̂ *k+1. In BtB ILCbased EMPC, the control loop in the batch direction is closedloop, because the control sequence will be updated using information from the previous batches and then be put into the next batch directly. The posteriori estimation of the state x̂k+1|k+1 can be obtained by the Kalman filter at the end of the batch. With the new state estimation, design the next batch using eq 25. Thus, the BtB ILC-based EMPC can be done recursively. The proof of the convergence of the proposed control strategy can be proved easily using properties of Kalman filter. Assume the error between the estimated state and the real one is εk|k = x̂k|k − xk. The following equation can be obtained from the Kalman filter:

min || z ̂ − z ref ||

subject to x = x ref + ΨuΔu + ΨdΔd u = u ref + Δu z ̂ = Ωx

T h e o p t i m a l s o l u t i o n o f e q 3 1 i s Δ u T*M P C = −(ΨTd Ψd)−1ΨTd ΨuΔd. The corresponding economic performance is VTMPC(Xref,uref − ΔuTMPC * ). Also, the objective function of BtB ILC-based EMPC, which is used to improve the economic performance according to the disturbances, can be defined as T−1

min Δu

|E(εk + 1 | k + 1)| < |E(εk | k )|

(26)

lim |E(εk )| = 0

ŷ (T ) = Γx̂

The optimal solution of eq 32 is ΔuEMPC * . The corresponding economic performance is VEMPC(xref + ΨuΔuEMPC * + ΨdΔd,uref + Δu*EMPC). In order to show that the ILC-based EMPC method has better performance than the ILC-based TMPC method, a proof by contradiction is made as follows. ΔuTMPC * is a feasible solution to eq 32, since it meets the constraints. Suppose VEMPC > VTMPC, which means Δu*TMPC produces better economic performance than Δu*EMPC. Δu*EMPC should not be the optimal solution to eq 32, because there is a better solution: ΔuTMPC * . This conflicts with the fact that ΔuEMPC * should be the optimal solution. Thus, it can be concluded that VEMPC ≤ VTMPC always exists, and EMPC achieves a better economic performance than TMPC. Furthermore, the algorithm of BtB ILC-based EMPC is shown as follows: Algorithm: BtB ILC-Based EMPC (1) Obtain the LTV model, the corresponding nominal optimal state sequence xref and the input sequence uref from the RTO layer. Set the batch index k = 0, and initialize the estimation of the state sequence as x̂0|0 = xref and the initial input sequence as u0 = uref, respectively. Set an initial value to the covariance matrix P0|0. (2) Calculate the optimal input sequence uk+1 * by optimizing the economic optimization problem according to eq 25. * . Then, uk+1 ← uk+1 (3) At batch k + 1, apply the input sequence uk+1 successively to the batch process and measure the process variables zk+1 within the batch and the quality variables yk+1(T) at the end of the batch. (4) Update the estimation of the state sequence x̂k+1|k+1 and the covariance matrix Pk+1|k+1, according to eqs 18−24 (5) Set k ← k + 1 and go to (2).

(28)

At the kth batch, the optimal solution according to eq 25 is (x̂k*|k−1,uk*). This means when k → ∞, E(x̂k|k) = E(x̂*k|k−1), uk = u*k . Thus, the expected values of the constraints described in eq 25 at the (k + 1)th batch can be written as E(x̂k + 1 | k ) = E(x̂k | k ) + ΨuE(Δuk + 1) E(uk + 1) = E(uk) + E(Δuk + 1) E(yk̂ + 1 | k (T )) = ΓE(x̂k + 1 | k )

(29)

Given eq 28, eq 29 can be rewritten as E(x̂*k | k − 1) = E(x̂k − 1 | k − 1) + ΨuE(Δu*k ) = E(x̂*k − 1 | k − 2) + ΨuE(Δu*k ) u*k = u*k − 1 + Δu*k

(32)

u = u ref + Δu

In addition, when k → ∞, the error between the priori and posteriori estimation of the states will converge. lim |E(x̂k | k − x̂k | k − 1)| = 0

t=0

x̂ = x̂ ref + ΨuΔu + ΨdΔd

(27)

k →∞

∑ l(x̂(t ), u(t ))+Q (ŷ(T ))

subject to

When k → ∞, the asymptotic behavior of the estimated state is k →∞

(31)

Δu

(30)

In eq 30, lim |E(Δuk)| = 0 exists at the optimal solution. It can k →∞

be proved by contradiction. Assume lim |E(Δuk)| ≠ 0. This k →∞

implies that there is a promotion of the economic performance by changing the input, resulting in V(E(x̂k+1|k),E(uk+1)) < V(E(x̂*k|k−1),E(u*k )), but the assumption is violated with the obtained optimal solution (x̂*k|k−1,u*k ). Thus, lim |E(Δuk)| = 0. k →∞

And the solution of the BtB ILC-based EMPC (eq 25) will converge to the optimal economic performance. Although the convergence of the BtB ILC-based EMPC has been proved, the more important thing is to compare the economic performance between the BtB ILC-based EMPC and G

DOI: 10.1021/acs.iecr.7b04691 Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX

Article

Industrial & Engineering Chemistry Research 3.2. Within-Batch ILC-Based EMPC. As the dynamic batch processes along both the time and batch directions are evolved, the BtB control design is based on the batch data in the entire course; it is an open-loop design for the single batch. The BtB ILC-based EMPC only forms the closed loop in the batch direction but it does not form the closed loop for a single batch in the time direction. In the BtB ILC-based EMPC, the product quality of the current batch is often inspected after the batch run. Using such delayed analysis results to adjust the process may cause major upset from their set points. Moreover, it is unable to handle nonrepeating disturbances, like some unexpected disturbances, during a particular batch run. The nonrepeating disturbances would be propagated into the next batch runs because BtB ILC-based EMPC is implemented. If online measured variables can be made while the batch proceeds, the WB ILC-based EMPC is worth developing to explore the possible adjustments of the future input trajectories. It can handle the (nonrepeating) disturbances just in time and keep the product in specification when this batch is completed. Because the current batch is our focus in this section, the new index of the time point (i) for the current batch is included for clear expression. To easily express the model at each time point (i), the statespace model in eq 17 is rewritten: T−1

xk = xk−1 +

where xh;k(0) = xk−1. To have a more compact form, redefine the control moves at the time index t for the entire batch, u h ; k (t ) = u k − 1 ⎡ ΔuT (0) ⋯ ΔuT (t − 1) 0 ⋯ 0 ⎤T k k    ⎥ + ⎢  ⎢⎣ ⎥⎦ T−t t (37)

and the incremental forms of the control moves at the time indices t + 1 and T are, respectively, ⎡ 0 ⋯ 0 ΔuT (t ) 0 ⋯ 0 ⎤T k  ⎥ uh; k(t + 1) = uh; k(t ) + ⎢  ⎣ t T−t−1 ⎦ (38) uh; k(T ) = uh; k(t ) ⎡ 0 ⋯ 0 ΔuT (t ) ΔuT (t + 1) ⋯ ΔuT (T − 1) k k k + ⎢  ⎢⎣ t = uh; k(t ) + Δuh; k(t )

(39)

where

T−1

∑ Ψu(i)Δuk(i) + ∑ Ψd(i)(wk− 1(i) + vk(i) i=0

Δuh; k(t ) =

i=0

− vk − 1(i))

0, 0, ... 0 , ΔuTk (t ), ΔuTk (t + 1), ... ΔuTk (T − 1) ]T [  

(33)

t

The state response is naturally composed of contributions of the control moves from the starting point (i = 0) to the ending point (i = T). At the current time index t, with the control moves (Δuk(i),i = 0, ..., t−1) from the initial time point (i = 0) to the last time index (i = t − 1) applied to the batch process, but without control moves beyond the control horizon of the time index (t) (Δuk(t) = Δuk(t+1) = ... = Δuk(T − 1) = 0), the response of the state in the whole batch (xh;k(t)) to the impact of the applied control moves can be written by

T−t

With the incremental forms of the state-space model described above, the prediction until the end of the batch can be easily obtained after the disturbance is discarded: T−1

x h ; k (T ) = x h ; k (t ) +

∑ Ψu(i)Δuk(i) i=t

= x h; k(t ) + ΨuΔuh; k(t )

(40)

t−1

x h ; k (t ) = x k − 1 +

∑ Ψu(i)Δuk(i)

Also, similar to the state estimation in batch-to-batch optimization, the Kalman filter can be applied here to estimate the entire state of the kth batch at time t. The notation x̂h;k(n| m) represents the estimate of xk at time n with the given observations up to time m, m ≤ n. x̂h;k(t|t) is a posteriori state of the kth batch estimated at time t with the given observations up to time t. With the state-space model along the time direction in eq 36, the predicted state and the predicted covariance matrix can be given by

i=0 t−1

+

∑ Ψd(i)(wk− 1(i) + vk(i) − vk− 1(i)) i=0

(34)

Here, xh;k(t) denotes the state in the entire batch without control moves from the time index t to the end of the batch. Similarly, at the time index t + 1, the states of the entire batch process is

x̂h; k (t |t − 1) = x̂h; k (t − 1|t − 1) + Ψu(t − 1)Δuk(t − 1)

t

x h; k(t + 1) = x k − 1 +

(41)

∑ Ψu(i)Δuk(i) i=0

Pk (t |t − 1) = Pk (t − 1|t − 1) + Q k(t )

t

+

∑ Ψd(i)(wk− 1(i) + vk(i) − vk− 1(i))

= Pk (t − 1|t − 1) + Ψd(t )(wk − 1(t ) + vk(t ) − vk − 1(t )) × (wk − 1(t ) + vk(t ) − vk − 1(t ))T ΨdT(t )

i=0

(35)

= Pk (t − 1|t − 1) + Ψd(t )(R w + 2R v)ΨdT(t )

With eqs 34 and 35, the incremental form of the state-space along the time direction can be given by

(42)

wk(t)wTk (t)

vk(t)vTk (t).

where Rw = and Rv = Pk(t|t) is a posteriori error covariance matrix of the kth batch at time t. It is a measure of the accuracy of the estimated state. The error between the measurement and the prediction is

x h; k(t + 1) = x h; k(t ) + Ψu(t )Δuk(t ) + Ψd(t )(wk − 1(t ) + vk(t ) − vk − 1(t ))

⎤T ⎥ ⎥⎦

(36) H

DOI: 10.1021/acs.iecr.7b04691 Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX

Article

Industrial & Engineering Chemistry Research ekz(t ) = zk(t ) − F(t )H(t )x̂k (t |t − 1) ⎡0 0 I 0 0⎤ H (t ) = ⎢ ⎥ ⎣ t−1 T−t ⎦

⏟ ⏟

feedback control in the outer loop only compensates for the disturbances before affecting the inner loop, while feedback control in the inner loop compensates for all of the other unknown disturbances. Similarly, the proposed two optimization methods are used to eliminate different types of disturbances. The BtB ILC-based EMPC is used to reject the measured disturbances as the condition changes in the previous batch before the disturbances affect the current batch. The WB ILC-based EMPC is used to eliminate the disturbance effect on the manipulated variables. With the information from the current batch, the control design for online within-batch optimization allows rapid rejection or reduction of the disturbances before the disturbances effects can affect the control design, resulting in little effect on the final output quality. The disturbances from the initial condition affecting the product quality are compensated by linking the outer loop for batch-to-batch control design with the inner loop for online control within a batch. As a result, the WB ILC-based EMPC may have a better economic performance than the BtB ILCbased EMPC. The better performance of the WB ILC-based EMPC can be briefly explained as follows. Assume the error between the estimated state and the real one at time t of the kth batch is

(43)

The residual covariance should be calculated by Sk (t ) = Lk(t )Pk (t |t − 1)Lk(t )T + R t = Lk(t )Pk (t |t − 1)Lk(t )T + mk(t )mk(t )T = Lk(t )Pk (t |t − 1)Lk(t )T + R m

(44)

where Lk(t) = F(t)H(t). The optimal Kalman gain is K k(t ) = Pk (t |t − 1)Lk T(t )Sk −1(t )

(45)

Thus, the updated state estimation and the updated covariance matrix are computed by x̂h; k (t |t ) = x̂h; k (t |t − 1) + K k(t )ekz(t )

(46)

Pk (t |t ) = (I − K k(t )Lk(t ))Pk (t |t − 1)

(47)

To start the algorithms in eqs 46 and 47, the initial values of Pk(0|0), xh;k(0|0) and uh;k(0) are Pk(0|0) = Pk−1, x̂h;k(0|0) = x̂k−1|k−1 and uh;k(0) = uk−1, respectively. With the posteriori estimation of the state at the previous time point (t−1) and the change of the input from the previous time point, ILC-based EMPC of within-batch optimization at the current time point (t) can be rewritten.

εh; k (t ) = x̂h; k (t ) − x h; k(t )

It can be obtained from the Kalman filter that |E(εh; k (t ))| < |E(εh; k (t − 1))|

(48)

|E(εh; k (t ))| ≤ |E(εh; k (0))|

subject to

∀ t ∈ 0: T

(51)

Assume that both the BtB and WB ILC-based EMPC have the same initial condition. Thus, the mean of the error of the WB strategy at the first time step should be equal to that of BtB strategy:

T−1



(50)

Also, it is easy to obtain

min Vk(x̂h; k (T ), uh; k(T ))

Δuh; k(t )

x̂h; k (T |t ) = x̂h; k (t |t ) +

(49)

Ψu(i)Δuk(i)

i=t+1

uh; k(T ) = uh; k(t ) + Δuh; k(t )

E(εh; k (0)) = E(εk − 1)

yk̂ (T |t ) = Γx̂h; k (T )

(52)

From eq 51 and 52, one can make the conclusion that the WB ILC-based EMPC would build a more accurate model than the BtB counterpart, since the former can update the state immediately using the online measurement without completing the batch run. To some extent, the WB ILC-based EMPC is more likely to have a higher economic performance than the BtB one. Furthermore, the algorithm of WB ILC-based EMPC is described as follows: Algorithm: WB ILC-Based EMPC (1) Obtain the LTV model the corresponding nominal optimal state sequence xref and the input sequence uref from the RTO layer. Set the batch index k = 1, and initialize the estimation of the state sequence as x̂0|0 = xref, the initial input sequence as u0 = uref, respectively. Set an initial value to the covariance matrix P0|0. (2) Set the time index t = 0. Set xh:k(0|0) = xk−1|k−1, uh:k(0) = uk−1, and set Pk(0|0) = Pk−1|k−1. (3) At time t, calculate the optimal change of the input * (t) from time t to T − 1 by optimizing the Δuh:k economic optimization problem, according to eq 48. (4) Apply the tth element (Δuk*(t)) to the batch process and measure the process variables zk(t + 1) at the next time index.

The optimal solution of the kth batch at time t is Δuh;k * (t). Although the optimal solution calculates a set of input moves from t to T − 1, only the control move at time index t (Δu*k (t)) is actually implemented. Then, at the next sampling instance, new measurements are acquired and the estimated state is corrected. And the new set of control moves is calculated. Once again, only the control move at the next time point (Δu*k (t+1)) is implemented. These activities are repeated at each sampling instant until the end of this batch. At the initial time point (t = 0), the control moves of Δuh;k(t) of the within-batch optimization in eq 48 is Δuh;k(0) = [Δuk(0), Δuk(1), ..., Δuk(T − 1)]T, which represents the exact control moves of the BtB ILC-based EMPC in eq 25 at batch k. Thus, within-batch optimization is an integrated batch-to-batch and within-batch optimization strategy. Once the control algorithm has been derived and applied to the system during the batch run at any time, the closed-loop stability should be analyzed in order to ensure the controlled system to be stable and convergent. Similarly, the convergence of the WB ILC-based EMPC can be proved easily as that of the BtB ILC-based EMPC, so the proof is not given here. This integrated strategy is similar to cascade control strategies in the conventional continuous control category. Its I

DOI: 10.1021/acs.iecr.7b04691 Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX

Article

Industrial & Engineering Chemistry Research Table 1. Parameters for the Batch Chemical Reactor parameter

value

parameter

value

α1 α2 E1 E2 R V VJ how

4000 L mol−1 s−1 6.2 × 105 s−1 5000 cal g−1 mol−1 10 000 cal g−1 mol−1 2 cal mol−1 K−1 1200 L 500 L 10 850 cal min−1 K−1 dm−2

λ1 λ2 CP CJ ρ ρJ A0

−1.8 × 105 cal mol−1 −2.25 × 105 cal mol−1 1000 cal kg−1 K−1 1000 cal kg−1 K−1 0.8 kg L−1 1 kg L−1 525 dm2

Energy equation for the process:

(5) Update the estimation of the state x̂h:k(t + 1|t + 1) and the covariance matrix Pk(t + 1|t + 1), according to eqs 41−47. (6) Set t ← t + 1 . If t < T, go to (3). (7) If t = T, measure the quality variables yk+1(T) at the end of the batch and update the estimation of the state sequence x̂k+1|k+1 and the covariance matrix Pk+1|k+1, according to eqs 18−24. (8) Set the batch index k ← k + 1, and go to (2).

QJ −λ1 −λ 2 dT = k1CA 2 − k 2C B − dt Vρ C P ρC P ρC P

Energy equation for the cooling jacket: dTJ dt

CA = 1 mol/L,

(58)

C B = 0 mol/L,

T = TJ = 323 K (59)

The constraint for the flow rate of the cooling water is

where B is the desired product and C is of no consequence in this case. Reactant A is charged into the vessel at the beginning. In this case, the activation energy is lower and the reactant has been heated before being fed into the vessel.24 Thus, the exothermic heat of reactions is quickly released and only the cooling water must be added to the jacket to remove the exothermic heat of reaction, to control the reactions for the maximum economic performance. The differential equations and the simulation condition are presented here to describe the nonlinear batch chemical reactor. In this process, constant density (ρ), volume of the liquid (V), and heat capacity (Cp) are assumed; all of these properties are shown in Table 1. The operation in the reactor is assumed to be well-mixed and the reactor is well-insulated; that is, there are negligible heat losses to the surroundings. According to the above assumptions, the mass balances for components A and B and the energy balance are formulated as follows: Component continuity for A:

0 L/s ≤ Fow ≤ 10 L/s

(60)

and the constraint for the temperature in the batch reactor is 298 K ≤ T ≤ 378 K

(61)

The duration of each batch is T = 1 h. Because of the lack of in situ measurements of the product quality, an accurate measurement of the concentrations (CA and CB) can be taken at the end of the batch run. Alternatively, other variables that are easier to measure, such as the reactor temperature and the cooling jacket temperature (T and TJ, respectively), are used as online indicators for the compositions of the product. The control structure of the system consists of two levels. The higher level of control is needed to ensure the best economic performance of the product quality at the end of each batch run. The economic objective function should be in a general nonlinear form. For simplicity, the economic objective in the RTO layer is defined as follows: T−1 ⎡ ⎤ min JRTO = min⎢(CB(T ) − C B,sp)2 V + k ∑ Fow 2(t )⎥ ⎢⎣ ⎥⎦ i=0

(53)

(62)

Component continuity for B:

where CB and Fow denote the sequences of the concentration of B and the flow rate of the cooling water within a batch, respectively. In eq 62, the first term is the terminal cost. The smaller the difference between CB(T) and the desired CB,sp after one batch run is, the higher the profit one can get. In this case, CB,sp = 0.58 mol/L is the set point of the concentration of B. The second term is the operating cost of the cooling water consumption; it should be as low as possible. k = 0.05 is the normalized price of the cooling water. By optimizing the economic objective function in eq 62 with ODEs, the nominal optimal sequences of states and input sequences (CA,ref, CB,ref,

(54)

where k1 and k2 are the reaction rate constants, which are temperature-dependent, ⎛ E ⎞ k1 = α1 exp⎜ − 1 ⎟ ⎝ RT ⎠ ⎛ E ⎞ k 2 = α2 exp⎜ − 2 ⎟ ⎝ RT ⎠

(57)

The initial conditions of the batch chemical reactor case are

k2

dC B = k1CA 2 − k 2C B dt

QJ FW0 (TJ0 − TJ) + C JVJρJ VJ

Q J = how Ao(T − TJ)

A→B→C

dCA = −k1CA 2 dt

=

Heat-transfer energy equation:

4. CASE STUDY This example is intended to show how the proposed ILC-based EMPC can be applied to a typical exothermic chemical batch reactor. The nonlinear batch chemical reactor involves two consecutive reactions, k1

(56)

(55) J

DOI: 10.1021/acs.iecr.7b04691 Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX

Article

Industrial & Engineering Chemistry Research Tref, TJ,ref, and Fow,ref) within a batch can be obtained. Only temperature policy (Tref) can be set as a reference for the following layer, since it can be easily monitored by sensors. In addition, the LTV model is built up along the reference trajectory by linearization or system identification. In the lower level, to compare the proposed ILC-based EMPC with the ILCbased TMPC, two corresponding objective functions should be defined first. For ILC-based TMPC, the objective is to track the temperature policy as follows: T

min JTMPC = min ∑ (T(i) − Tref (i))2 i=1

(63)

where T(i) is the sequence of the reactor temperature. For EMPC, it still inherits the economic objective function from the RTO layer. ⎡ min JEMPC = min⎢(ΔCB(T ) + CB,ref (T ) − C B,sp)2 V ⎢⎣ T−1 ⎤ + k ∑ (ΔFow (t ) + Fow (t ))2 ⎥ ⎥⎦ i=0

Figure 3. Dynamic paths of the concentration of A (CA) in different batch runs.

(64)

where ΔCB(T) and ΔFow are the change sequences of the concentration of B and the flow rate of the cooling water, respectively. To investigate the improvement of the economic performance using the proposed methods, two cases, including disturbance changes occurring from batch to batch and disturbance changes within a batch run, are tested, respectively. 4.1. Disturbance Change at Batch-to-Batch−Repetitive Disturbance. The disturbance source here is the temperature of the cooling water (TJ0), which is influenced by the upstream stream, and it is not known exactly. However, the optimization problem in the RTO layer is designed without considering the actual disturbance. The nominal temperature of the cooling water is set to be TJ0 = 323 K. When it comes to the implementation, two different offsets of the cooling water temperature are separately considered to determine if the disturbance affects economic performance; one is for the positive offset (5 K) and the other represents the negative offset (−5 K). The variances of stochastic noises w and v, according to eq 12, are 0.4 and 0.3, respectively. Also, the variances of measurements m and n according to eq 1, are 0.06 and 0.005, respectively. In this case, with the increase in the temperature of the cooling water in 5 K, the proposed BtB ILC-based EMPC is first used to reject the batch-to-batch disturbance. Figures 3−6 show the results of the dynamic paths of the state (x), CA, CB, T, and TJ, respectively, using the economic optimization strategy. With the batch evolution, the state of the process will converge. From Figures 3−6, it can be seen clearly that with the batch increasing, the dynamic paths of the 1st, 4th, 10th, and 20th batches are becoming closer to the narrow region of convergence, even if the batch operation is affected by the unknown disturbance. Considering the convergence rate of the state, one can understand the response of the state to change in the disturbance by looking at the physical system. If the cooling water changes, it must affect the jacket temperature (TJ) before the reactor temperature (T) starts to feel the effect; this is shown in Figures 5 and 6. Thus, the response of T is slower than that of TJ to the change in the disturbance. Figure 7 shows

Figure 4. Dynamic paths of concentration of B (CB) in different batch runs.

Figure 5. Dynamic paths of the temperature in the reactor (T) in different batch runs.

K

DOI: 10.1021/acs.iecr.7b04691 Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX

Article

Industrial & Engineering Chemistry Research

Figure 8. Comparison of the economic performance with the unfavorable disturbance among TMPC, BtB ILC-based EMPC, and operation-based nominal design.

Figure 6. Dynamic paths of the temperature of the jacket (TJ) in different batch runs.

TMPC and the BtB ILC-based EMPC are also shown in Figure 8, respectively. With batch evolution, TMPC (marked in red) is almost converged at the 20th batch. Even if more cooling water is added, its economic performance is higher than that of EMPC (marked in blue), by almost 8%. At the beginning, the economic performances of both control strategies have small differences. It is mainly because the estimation done by Kalman filter is not accurate at the beginning, but when the estimation is accurate, EMPC would be better. This is also the reason why the fluctuations of the nominal design are large at the beginning; then they become small with the batch evolved. When the BtB ILC-based TMPC and the BtB ILC-based EMPC converge, the economic performances are close to 1.27 and 1.16, respectively. They are still higher than the nominal one. To clearly make the comparison of both the BtB ILC-based EMPC and the WB ILC-based EMPC, both the performances are shown in Figure 9. It is clearly seen that the performance of the WB ILC-based EMPC is better than that of BtB ILC-based

Figure 7. Dynamic paths of the flow rate (F) in different batch runs.

the corresponding evolution of control moves (the flow rate of the cooling water), using the BtB ILC-based EMPC. With the batch evolution, the dynamic paths of the inputs at the 1st, 4th, 10th, and 20th batches are becoming closer to the narrow region of convergence. The results above only confirm the convergence without showing the optimality of the proposed economic control strategy. To make a comparison among the BtB ILC-based TMPC, the proposed BtB ILC-based EMPC, and the operation-based nominal design, the economic performance of these three strategies are studied respectively (Figure 8). The nominal economic performance obtained from the RTO layer is marked by a black star (★) in Figure 8. As the temperature of the cooling water in 5 K increases, the economic performance of the first batch run significantly deviates from that of the nominal design. At the first batch run, the real economic performance is almost 1.47. It is higher than the nominal one. If the operation-based nominal design without adjustments is applied, the quality would decrease and the economic performance (marked in green point in Figure 8) will be worse. To easily see the performance improvement of both ILC design in each batch, two fitted curves of the BtB ILC-based

Figure 9. Enlarged view of the comparison of the economic performance in unfavorable disturbance between BtB ILC-based EMPC and WB ILC-based EMPC. L

DOI: 10.1021/acs.iecr.7b04691 Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX

Article

Industrial & Engineering Chemistry Research EMPC at the beginning, because, in the WB ILC-based EMPC, the bad performance would be corrected during the batch run without having the batch run completed. However, when the batch runs are evolved, the economic performances of these two methods are nearly the same because the information on the repetitive disturbances can be completely estimated. As shown in Figure 9, the two curves nearly overlap after the 18th batch run. Next, the offset of the temperature of the cooling water in −5 K is considered. It is a helpful disturbance because the decrease of the temperature will lower the cooling water consumption and increase the economic performance. Figure 10 shows the

Figure 11. Comparison of the economic performance in helpful disturbances among BtB ILC-based EMPC and WB ILC-based EMPC.

Figure 10. Comparison of the economic performance in helpful disturbance among TMPC, BtB ILC based EMPC, and operation based nominal design.

economic performances of the BtB ILC-based EMPC, the BtB ILC-based TMPC, and the operation-based nominal design. Their economic performances at the first batch run are almost 0.45. They are lower than the economic performance of the nominal design, but the economic performance of the first batch run is not optimal. Figure 10 also indicates that EMPC has better performance than TMPC. The converged economic performances of TMPC and EMPC are nearly 0.37 and 0.3, respectively. They are lower than the nominal one. The comparison between the BtB ILC-based EMPC and the WB ILC-based EMPC is done in Figure 11. Similar to Figure 9, the WB ILC-based EMPC performs better than the BtB ILC-based EMPC at the beginning, but the evolutions of the economic performances of the BtB ILC-based EMPC and the WB ILCbased EMPC are almost the same and they are overlapped because there is no disturbances occurring at a specific batch run in this case. 4.2. Disturbance Change within a Single Batch Run: Nonrepetitive Disturbance. In this case, the disturbance occurs only at the 21st batch, where the temperature of the cooling water is up by 3 K and it sustains during the whole batch. Figure 12 depicts the result of the economic performance of each batch run using two control strategies (the BtB ILC-based EMPC and the WB ILC-based EMPC). The dynamic paths of the input at the 20th, 21st, and 22nd batches are shown in Figure 13. It is found that the two economic optimization strategies at the 20th batch have the similar performance (Figure 12) and the corresponding inputs

Figure 12. Comparison of the economic performance between the BtB ILC-based EMPC and the WB ILC-based EMPC with the unknown disturbance at the 21st batch.

Figure 13. Changes of the flow rates of BtB ILC-based EMPC and WB ILC-based EMPC with the unknown disturbance at the 21st batch.

M

DOI: 10.1021/acs.iecr.7b04691 Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX

Article

Industrial & Engineering Chemistry Research ORCID

(Figure 13). At the 21st batch, an increase of the temperature of the cooling water in 3 K is introduced and the flow rate of the cooling water should rise in principle. However, the input of the 21st batch in the BtB ILC-based EMPC is still close to that of the 20th batch, because the BtB ILC-based EMPC is adjusted after completing one batch. In contrast, the WB ILCbased EMPC is a closed-loop form control strategy in the time direction. Whenever the WB ILC-based EMPC detects the variation of the temperature along the time direction, corresponding actions shown in Figure 13 would be taken. Moreover, at the 22nd batch, the temperature of the cooling water returns to normal, and the flow rate of the cooling water should decrease in principle. Thus, during the second half of the 22nd batch, the flow rate of the WB ILC-based EMPC at the 22nd batch is back to the same as the flow rate at the 20th batch. However, because of the lag of disturbance information in the BtB ILC-based EMPC, the flow rate at the 22nd batch becomes larger. The poor performance of the BtB ILC-based EMPC is corrected in the next batch runs. In the case of the WB ILC-based EMPC (Figure 12), the disturbances at the 21st batch have been significantly reduced and the nonrepetitive disturbance would not be propagated into the next batch run. Thus, within-batch optimization shows its superiority in dealing with the nonrepetitive disturbance.

Junghui Chen: 0000-0002-9994-839X Lei Xie: 0000-0002-7669-1886 Notes

The authors declare no competing financial interest.



ACKNOWLEDGMENTS The authors would like to thank sponsor and financial support from National Natural Science Foundation of P.R. China (under Grant Nos. 61621002 and 61374121), Natural Science Foundation of Zhejiang, China (under Grant No. LR17F030002), and Ministry of Science and Technology, Taiwan, R.O.C. (MOST 106-2221-E-033-060-MY3).



5. CONCLUSION In this paper, the ILC-based EMPC for batch design is presented. The objective of those algorithms is to obtain higher economic performance by learning unknown repetitive disturbances along the batch horizon. The proposed ILCbased EMPC algorithms can also handle the already-existing repetitive disturbances for the batch-to-batch operation and nonrepetitive disturbances within one batch run. An accurate incremental state-space model plus the unknown disturbance model is used in this paper. Without estimating the disturbances from the historical info, the control design can be done based on the estimated state of the previous batches in batch-to-batch design or the estimated state of the previous time point in the within-batch design, because the state is directly affected by the disturbances. The proposed ILC-based EMPC has an advantage over the ILC-based TMPC in view of treating disturbances. While TMPC rejects the disturbances, because it treats them as the undesired things, EMPC readjusts control design to enhance the economic performance, depending on whether the disturbances are useful or unfavorable. The convergence of the algorithm is proved in this paper and it is found to be successfully achieved in the presented industrial case. The case studies also show the effectiveness and the economic superiority of the proposed ILC-based EMPC. In this paper, a LTV system is used here for practical consideration, because the proposed ILC-based EMPC could be solved easily online. Also, it is assumed that the model used here is completely accurate. However, in reality, there is always model−plant mismatch. The economic performance design with model−plant mismatch for batch processes would be considered in the future.



REFERENCES

(1) Bonvin, D. Optimal operation of batch reactorsa personal view. J. Process Control 1998, 8 (5), 355−368. (2) Lee, K. S.; Chin, I. S.; Lee, H. J.; Lee, J. H. Model predictive control technique combined with iterative learning for batch processes. AIChE J. 1999, 45 (10), 2175−2187. (3) Oh, S.-K.; Lee, J. M. Iterative learning model predictive control for constrained multivariable control of batch processes. Comput. Chem. Eng. 2016, 93, 284−292. (4) Shi, J.; Yang, Y. A new design method of a cascade iterative learning control (ILC) for the batch/repetitive processes. In 2016 Chinese Control and Decision Conference (CCDC); IEEE: 2016; pp 5784−5789. (5) Ellis, M.; Liu, J.; Christofides, P. D. Economic Model Predictive Control: Theory, Formulations and Chemical Process Applications; Springer: Berlin, 2016. (6) Golshan, M.; MacGregor, J. F.; Bruwer, M.-J.; Mhaskar, P. Latent variable model predictive xontrol (LV-MPC) for trajectory tracking in batch processes. J. Process Control 2010, 20 (4), 538−550. (7) Lee, K. S.; Lee, J. H. Iterative learning control-based batch process control technique for integrated control of end product properties and transient profiles of process variables. J. Process Control 2003, 13 (7), 607−621. (8) Shi, J.; Gao, F.; Wu, T. J. Robust iterative learning control design for batch processes with uncertain perturbations and initialization. AIChE J. 2006, 52 (6), 2171−2187. (9) Wang, L.; Mo, S.; Zhou, D.; Gao, F.; Chen, X. Delay-rangedependent robust 2D iterative learning control for batch processes with state delay and uncertainties. J. Process Control 2013, 23 (5), 715−730. (10) Godoy, J.; González, A.; Normey-Rico, J. Constrained latent variable model predictive control for trajectory tracking and economic optimization in batch processes. J. Process Control 2016, 45, 1−11. (11) Li, D.; Xi, Y.; Lu, J.; Gao, F. Synthesis of real-time-feedbackbased 2D iterative learning control−model predictive control for constrained batch processes with unknown input nonlinearity. Ind. Eng. Chem. Res. 2016, 55 (51), 13074−13084. (12) Jia, L.; Han, C.; Chiu, M.-s. An integrated model predictive control strategy for batch processes. In 2016 Chinese Control and Decision Conference (CCDC); IEEE: 2016; pp 5802−5807. (13) Xiong, Z.; Zhang, J.; Wang, X.; Xu, Y. Tracking control for batch processes through integrating batch-to-batch iterative learning control and within-batch on-line control. Ind. Eng. Chem. Res. 2005, 44 (11), 3983−3992. (14) Yu, X.; Xiong, Z.; Huang, D.; Jiang, Y. Model-based iterative learning control for batch processes using generalized hinging hyperplanes. Ind. Eng. Chem. Res. 2013, 52 (4), 1627−1634. (15) Zhang, J. Batch-to-batch optimal control of a batch polymerisation process based on stacked neural network models. Chem. Eng. Sci. 2008, 63 (5), 1273−1281. (16) Kwon, J. S.-I.; Nayhouse, M.; Orkoulas, G.; Ni, D.; Christofides, P. D. A method for handling batch-to-batch parametric drift using

AUTHOR INFORMATION

Corresponding Authors

*Tel.: +886-3-2654107. Fax: +886-3-2654199. E-mail: jason@ wavenet.cycu.edu.tw (J. Chen). *Tel.: +86-0571-87952233-8237. Fax: +86-0571-87952441. [email protected] (L. Xie). N

DOI: 10.1021/acs.iecr.7b04691 Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX

Article

Industrial & Engineering Chemistry Research moving horizon estimation: application to run-to-run MPC of batch crystallization. Chem. Eng. Sci. 2015, 127, 210−219. (17) Wang, Y.; Zhang, H.; Wei, S.; Zhou, D.; Huang, B., Control performance assessment for ILC-controlled batch processes in a 2-D system framework. IEEE Trans. Syst., Man., Cybern.: Syst. 2017. (18) Wang, L.; Zhu, C.; Yu, J.; Ping, L.; Zhang, R.; Gao, F. Fuzzy iterative learning control for batch processes with interval time-varying delays. Ind. Eng. Chem. Res. 2017, 56 (14), 3993−4001. (19) del Rio-Chanona, E. A.; Zhang, D.; Vassiliadis, V. S. Modelbased real-time optimization of a fed-batch cyanobacterial hydrogen production process using economic model predictive control strategy. Chem. Eng. Sci. 2016, 142, 289−298. (20) Rashid, M. M.; Mhaskar, P.; Swartz, C. L. Handling multi-rate and missing data in variable duration economic model predictive control of batch processes. AIChE J. 2017, 63 (7), 2705−2718. (21) Wiederkehr, H. Examples of process improvements in the fine chemicals industry. Chem. Eng. Sci. 1988, 43 (8), 1783−1791. (22) Jaeckle, C. M.; MacGregor, J. F. Industrial applications of product design through the inversion of latent variable models. Chemom. Intell. Lab. Syst. 2000, 50 (2), 199−210. (23) Nagy, Z. K.; Braatz, R. D. Open-loop and closed-loop robust optimal control of batch processes using distributional and worst-case analysis. J. Process Control 2004, 14 (4), 411−422. (24) Bonvin, D.; Srinivasan, B.; Ruppen, D. Dynamic Optimization in the Batch Chemical Industry. AIChE Symp. Ser. 326 2002, 98, 255. (25) Amrit, R.; Rawlings, J. B.; Angeli, D. Economic optimization using model predictive control with a terminal cost. Ann. Rev. Control 2011, 35 (2), 178−186. (26) Angeli, D.; Amrit, R.; Rawlings, J. B. On average performance and stability of economic model predictive control. IEEE Trans. Autom. Control 2012, 57 (7), 1615−1626. (27) Ellis, M.; Durand, H.; Christofides, P. D. A tutorial review of economic model predictive control methods. J. Process Control 2014, 24 (8), 1156−1178. (28) Wang, Y.; Gao, F.; Doyle, F. J. Survey on iterative learning control, repetitive control, and run-to-run control. J. Process Control 2009, 19 (10), 1589−1600. (29) Lee, J. H.; Lee, K. S.; Kim, W. C. Model-based iterative learning control with a quadratic criterion for time-varying linear systems. Automatica 2000, 36 (5), 641−657. (30) Lee, J. H.; Natarajan, S.; Lee, K. S. A model-based predictive control approach to repetitive control of continuous processes with periodic operations. J. Process Control 2001, 11 (2), 195−207. (31) Meinhold, R. J.; Singpurwalla, N. D. Understanding the Kalman filter. Am. Stat. 1983, 37 (2), 123−127.

O

DOI: 10.1021/acs.iecr.7b04691 Ind. Eng. Chem. Res. XXXX, XXX, XXX−XXX