You are on page 1of 17

Journal of Process Control 113 (2022) 1–17

Contents lists available at ScienceDirect

Journal of Process Control


journal homepage: www.elsevier.com/locate/jprocont

Design of hybrid batch-to-batch and within-batch self-optimizing


control structures for batch processes

Lingjian Ye a , , Feifan Shen b , Hongwei Guan c
a
School of Engineering, Huzhou University, Huzhou 313000, China
b
School of Information Science and Engineering, NingboTech University, Ningbo 315100, China
c
School of Mechanical and Electrical Engineering, Ningbo University of Finance and Economics, Ningbo 315175, China

article info a b s t r a c t

Article history: In this paper, we present a novel framework for hybrid batch-to-batch and within-batch self-
Received 16 December 2021 optimizing control (SOC) of batch processes. In this framework, batch-to-batch and within-batch
Received in revised form 28 February 2022 controlled variables (CVs) are selected respectively corresponding to the point-wise and profile neces-
Accepted 17 March 2022
sary conditions of optimality of batch processes. For the within-batch SOC, the extended combination
Available online 1 April 2022
matrix is introduced, which is structurally constrained to deal with the causality issue, as well as
MSC: practical ways for within-batch implementations. The setpoint strategy for a within-batch SOC scheme
00-01 is also discussed. For the batch-to-batch SOC, which has no causality requirement, the structure of
99-00 the combination matrix is allowed to be full. The overall combination matrix contains two types
of self-optimizing CVs, which will be solved simultaneously in a unified framework. In addition, the
Keywords:
active-set change problem is handled using a conservative approach. The hybrid SOC problem is finally
Self-optimizing control
Hybrid optimization characterized as a constrained nonlinear programming (NLP) problem, where the overall combination
Controlled variable matrix has particular structural constraints. The design approach is applied to two batch examples,
Uncertainty where various benefits and properties of the hybrid SOC methodology are illustrated. The importance
Batch process of using a simple within-batch SOC scheme is also highlighted, in which case the overall combination
matrix is sparse.
© 2022 Elsevier Ltd. All rights reserved.

1. Introduction with uncertainties by seeking a set of controlled variables (CVs)


with invariant setpoints, such that process optimality can be
Operational optimization of chemical processes aims to in- automatically restored via regulatory feedback controllers. This
crease the plant economic profit while ensuring process safety, is contrast to many other approaches, where either parameter
product quality, and so forth [1]. Numerical optimization tech- re-identification [5] or modified optimizations [7] are repeatedly
niques are typically model-based, where the accuracy of process activated to counteract the effects of uncertainties. Basically,
models is the key factor for the success of optimizations. Unfor- it does not require to estimate the uncertain parameters (dis-
tunately, due to the intrinsic complexity of chemical processes, turbances), which is not a trivial task as in other parameter
as well as the constantly varying uncertainties, all mathematical identification based RTO approaches. The online computation
models are only approximations to the physical reality. Optimiza- cost of SOC is therefore very low, because the most extensive
tion on the basis of an inaccurate model is sub-optimal, and may computation is offline for one-shot identification of the optimal
lead to infeasibility in many situations. CVs. On the other hand, nonetheless, there are several limitations
In the presence of plant-model mismatch and various uncer- of SOC that should be well understood. For example, the method-
tainties, it is desired to perform real-time optimization (RTO) ology does not generally guarantee rigorous optimality upon
techniques to restore process optimality. Depending on differ- convergence of the controlled variables, but with an acceptable
ent ways realizing RTO, several well-known branches can be loss. In addition, it assumes that the uncertain disturbances can
distinguished as summarized in [2]. The self-optimizing con- be anticipated for off-line designs. This implies that when there
trol (SOC) [3,4], a promising one among many others [5–9], are unexpected disturbances in reality (such as the structural
has gain much attention since its formal conceptualization by plant-model mismatches), the economic loss of SOC may become
Skogestad in 2000 [3]. A distinct feature of SOC is that it deals large. This is inferior to other RTO approaches, such as the NCO
tracking [6] and modifier adaptation [7], which are capable of
∗ Corresponding author. handling a larger class of uncertainties including structural plant-
E-mail address: lingjian.ye@zjhu.edu.cn (L. Ye). model mismatches. A possible solution to remedy this deficiency

https://doi.org/10.1016/j.jprocont.2022.03.005
0959-1524/© 2022 Elsevier Ltd. All rights reserved.
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

is implementing a two-level control structure that combines batch, unless most of the operational degrees of freedom
the advantages of SOC and other sophisticated RTO approaches are expended for this purpose, c.f. the trajectory following
[10–12]. approach to meet the terminal constraint [38]. This is,
In general, SOC pursuits a simple control hierarchy, while the however, not optimal from a systematic point of view.
economic loss achieves acceptable by using appropriate CVs. To
further reduce the loss, the CVs were further extended as mea- Motivated by the above deficiencies, in this paper we inves-
surements combinations (especially linear combinations) instead tigate again the dynamic SOC solution to batch processes. In
of traditional single physical variables [13–17]. The research on the new proposed within-batch SOC schemes, the CV selection
this topic was initiated as in the background of static SOC prob- and controller design are separated, by using one-step-ahead
lem for continuous processes, under assumptions/approximations measurements in the CV formulations. For the point-wise opti-
of, 1) linear input–output relationships; 2) a quadratic cost func- mality conditions, they are suggested to be handled from batch
tion. With these simplifications, the optimal CVs have been an- to batch. Thereby, this new contribution offers a novel hybrid
alytically derived with explicit solutions [16–18]. Using the local framework, which integrates both batch-to-batch and within-
criterion, fast screening algorithms were also developed to select batch SOC strategies. More specifically, we propose to select
a subset of promising measurements out of many [19–21]. Un- within-batch CVs corresponding to the profile optimality condi-
surprisingly, the practical SOC performances may degrade when tions in the NCO, while batch-to-batch CVs for the point-wise
the physical processes do not well meet these assumptions, par- counterparts. The mathematical difference between the two can
ticularly due to the plant nonlinearity. Therefore, efforts were be ascribed to the structural requirements for the introduced
devoted to eliminate the suboptimality, which is referred as the extended combination matrix. For the within-batch CVs, the fu-
global SOC (gSOC) problem [22–24] that chooses to minimize the ture measurements are factored out such that the causality is
average loss in the entire operating space. In these methods, the respected. Such structural constraints can further be incorporated
nonlinear process model is often used for the computation of the to define the implementation strategies for the within-batch SOC.
optimal CVs, instead of a single linearized input–output model. For the batch-to-batch CVs, which has no causality requirement,
Another promising direction is to extend the SOC methodology the structure of the combination matrix is allowed to be full.
to dynamic systems, such as the batch processes [25–29]. In With a well structured combination matrix, all CVs will be si-
the modern chemical industry, batch manufacturing is becoming multaneously solved, by minimizing the loss function available
more and more important, as it is more flexible to meet cus- from static SOC methods [13]. Finally, we characterize a nonlin-
tomized user demands. The dynamic nature of batch processes, ear programming (NLP) formulation for the overall combination
however, makes it challenging to apply current advance of the matrix, which could be sparse due to the introduced structural
SOC methodology. Toward this problem, a batch-to-batch SOC constraints. Since in general no analytical solutions may exist
method was proposed [30,31], where CVs are tracked batch- for such an NLP problem, numerical optimizers are adopted as
wisely to approach near-optimal operation. This takes the ad- the solution method. In summary, the hybrid approach efficiently
vantage of the fact that, from a batch-wise point of view, there absorbs advantages from both sides. On one hand, the optimizing
is a static mapping between the inputs and outputs, then the speed is accelerated by within-batch optimization, on the other,
static SOC methodology may be applicable. The repetitive feature all NCO elements are handled by the combined two means, thus
has also been widely utilized for batch-to-batch optimization for improving the overall economic performance.
batch processes, for example, the well-known necessary condi- In the rest of this paper, the necessary conditions of optimality
tions of optimality (NCO) tracking techniques [6,32–34]. A main of batch processes are firstly outlined in Section 2, together with
feature of the SOC, compared with the NCO tracking, is that some discussions on the topic of input parametrization. Then, the
it deals with sensitivity components of NCO via output feed- local SOC method for static problems and a conservative approach
back [35], skipping the evaluation of plant gradients (which is dealing with active-set changes are reviewed in Section 3, which
often slow). Batch-to-batch optimization is useful for repetitive will be extended to batch problems. In the subsequent section, we
systems, whilst it also consumes more than a few batches to present the main contribution, namely, the hybrid SOC methodol-
attain convergence. To speed up the optimization effect, within- ogy for batch processes, followed by its solution strategy. The new
batch optimization is favored to realize optimization in a single design approach is demonstrated on two examples in Section 5.
batch. However, a main obstacle for within-batch optimization In the final section, we present some important discussions that
must be considered is the causality of dynamic systems [36]. conclude this article.
That is, the optimal operation of inputs depends on future fac-
tors, such as the varying parameters which cannot be known
2. Necessary conditions of optimality for batch processes
in advance. For the output feedback based SOC, it may require
the information of future measurements to reflect the system
In this paper, the design of self-optimizing structures for batch
status. In the previous work [36], the causality is avoided by
processes calls for the identification of necessary conditions of
selecting a structure-constrained combination matrix, where the
optimality (NCO). This concept has been extensively discussed
future measurements are excluded by enforcing the associated
in detail in the framework of NCO tracking [6,33]. Hence in the
coefficients in the combination matrix zeros. The methodology
following, some established conceptions are briefly reviewed.
therein is a pure within-batch scheme, however, it has two main
limitations:
2.1. Dynamic optimization of batch processes
1. The inputs are directly computed by old measurements
based on the self-optimizing CVs. In general, however, one Dynamic optimization of batch processes is characterized as
may wish to separate the controller design from CV selec-
tion for the sake of other considerations, for example, the min J(x(tf )) (1)
u(t)
robustness of controllers;
2. The methodology applies to limited cases with no active s.t. ẋ(t) = F (x(t), u(t), d(t)), x(0) = x0 (2)
constraints. Unfortunately, batch processes are typically S(x(t), u(t)) ≤ 0 (3)
constrained by, for example, product quality [6,37]. For
point-wise constraints, they are hard to meet within a T (x(tf )) ≤ 0 (4)

2
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

where J is the economic cost to be minimized; u(t) ∈ Rnu(t) Input reparametrization typically gives less adapted parame-
and x(t) ∈ Rnx are the control inputs and states (initially x0 ); ters for real-time optimization. Meanwhile, it alters the plant NCO
d(t) ∈ Rnd are uncertain disturbances; tf is the batch duration; accordingly, which must be reconstructed for further analysis. Let
F , S and T are the nx -dimensional state functions, nS -dimensional the entire input arc be reparametrized as u[0, tf ) → {u[ts , te ), ρ},
path constraints and nT -dimensional terminal constraints, respec- where ts and te are switching times with proper dimensions char-
tively. acterizing u[ts , te ) as sub-arcs in u[0, tf ), ρ is the nρ -dimensional
Define the following auxiliary functions vector containing scalar decision variables from parametrization
(typically, ts , te ⊆ ρ ). Denote the active constraints, which have
H(t) = λT F (x, u, d) + µT S(x, u) (5) been identified by the numerical solver, as S̄ and T̄ , then the NCO
Φ x(tf ) = J x(tf ) + ν T x(tf )
T can now be expressed as [33]
( ) ( ) ( )
(6)
∂ H S̄ [ts , te ) = 0 (path constraints) (11)
λ̇T (t) = − (7)
∂x T̄ = 0 (terminal constraints) (12)
∂Φ
λT tf = ∂H
( )
(8)
∂ x(tf ) [ts , te ) = 0 (path sensitivities) (13)
∂u
where H(t) and Φ x(tf ) are the Hamiltonian function and aug- ∂Ψ
( )
= 0 (terminal sensitivities) (14)
mented terminal cost; λ(t) ̸ = 0, µ ≥ 0 and ν ≥ 0 are the ∂ρ
Lagrange multipliers associated with system equations, path con-
where the time interval [ts , te ] correspond to intervals associated
straints and terminal constraints, respectively. Then the necessary
with the active path constraints S̄ [ts , te ) and path sensitivities
conditions of optimality (NCO) of (1) read [37] ∂H
[t , t ); Ψ is the total terminal cost defined as
∂u s e
∂H ∫ tf
(t) = 0 (9)
∂u Ψ x(tf ), ρ = Φ x(tf ), ρ +
( ) ( )
H(t)dt (15)
µ S = 0, ν T T = 0
T
(10) 0

where the last two equalities are known as the complementarity Remark 1. It is worth mentioning that, the invariant active
conditions, which could be discontinuous. Note that it requires constraints could be met for many industrial batch process op-
all elements in the complementarity conditions be zero due to timization applications, which has been assumed in the standard
the requirement of non-negative multipliers. framework of NCO tracking [6,32,33]. Theoretically, this assump-
Unfortunately, analytical analysis guided by the above NCO is tion is valid for infinitesimal disturbances. For other practical
still difficult to derive an expression for the optimal u(t), because problems, however, there may be constraints that are varying
they are coupled with the states and adjoints. In practice, it is between active and inactive across different disturbance regions
more often the case that (1) is solved via the direct approach [37]. (each is called as a critical region). The identification of invariant
In this way, discretization is performed along the time axis such and changing active constraint can be done by, for example,
that a mapping between decisions variables and states can be following the multi-parametric programming approaches [40].
established, followed by a numerical optimizer to solve the static For batch processes, input parametrization is a powerful tool to
formulation, see c.f. [37,39] for reviews of various numerical eliminate the changing active-set. For example, Francois et al. [32]
techniques. discussed possible means of transforming path constraints by
parameterizing switching times between adjacent trajectories.
2.2. Input parametrization Sun et al. [41] demonstrated that the number of critical regions
is substantially reduced via parameterizing the switching times
for the design of multi-parametric NCO tracking controllers for
The solution to (1) numerically solved by the direct approach
dynamic systems. The two examples given in Section 5 show how
is typically composed of a sequence of discontinuous input arcs,
the input path constraints can be efficiently handled. Anyway,
corresponding to different counterparts of the NCO. These input
when the assumption of invariant active constraints does not hold
arcs may, nonetheless, maintain continuous and differentiable
in general, it will be addressed in the framework of SOC, using the
within each interval.
conservative approach [42].
With the structure of the optimal input arcs identified by a
numerical solver, it is often desired to reparametrize the input 2.3. Dealing with the invariant active constraints
trajectory in the presence of uncertainties. This means that the
variations of optimal operation can be more efficiently captured The two types of active constraints, namely, the invariant
by some new variables, other than u(t) itself at some fixed time. ones and varying ones, are handled by different means. In this
For example, discontinuous input arcs are often parametrized subsection, we firstly discuss how to deal with the former, while
using the switching times as additional decision variables, such the latter is discussed in Sections 3.2 and 4.4.
that a variable duration for a subarc is allowed. For input arcs In practice, the enforcement of active constraints can be real-
that are constrained by upper or lower bounds (which often ized by either the within-batch or the batch-to-batch fashion. This
occurs in batch problems), it is sufficient to parametrize the choice is also affected by how the measurements can be taken. For
switching times as decision variables. For sensitivity-seeking in- example, when the measurements are only available at the end of
puts, however, they may be parametrized in diverse ways. For a batch, then no within-batch optimization can be performed, but
example, constant level over an interval is characterized by 1 only in the batch-to-batch fashion. To rule out this factor, how-
variable, or a ramping arc is characterized by 2 variables, and so ever, we hereafter assume that plant measurements are online
on. At this stage, physical interpretations for each input arc are available, such that within-batch optimization is possible.
important [37], as they reflect the intrinsic operation principle for A feature of the proposed hybrid SOC approach is that the
batch processes, such that correctness of the reparametrization CVs, including the active constraints, once determined corre-
is guaranteed. Some quantitative analysis may also be necessary, sponding to counterpart of the NCO, are first assigned with suit-
which can be guided to facilitate making a trade-off between the able manipulated variables to facilitate further analysis. Regard-
optimization performance and operational complexity. ing the path constraints, an obvious and reasonable choice is
3
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

using the corresponding inputs, such that S̄ = 0 is timely To maintain optimality, it calls for that the closed-loop re-
tracked for within-batch optimization. For the point-wise termi- sponse of u coincides with the change of uopt (minimize the norm
nal constraints, T̄ (tf ) = 0, both within-batch and batch-to-batch of eu ). This is done by tracking the controlled variables, c = Hy,
adaptations were considered in literature: at constant set-points, where H is the combination matrix to be
determined.
1. In the within-batch case, the control effect is fast, however,
In the linearized form, the output functions are expressed as
it suffers from the causality problem. That is, adaptations
take place before the availability of terminal constraints, ∆y = Gy ∆u + Gyd ∆d (19)
which can later be influenced by other operational vari-
ables. To this end, one may specify a tracking trajectory where Gy and Gyd are gain matrices. The linear equations are
for T̄ (t) satisfying T̄ (tf ) = 0 [38]. Alternatively, predictions combined with the effect of feedback control ∆c = H ∆y = 0,
are made for T̄ (tf ) along operation, followed by continuous which yields [13]
within-batch adaptations [33]. In the either case, within- ∆u = −(HGy )−1 HGyd ∆d + (HGy )−1 Hn (20)
batch adaptations for T̄ (tf ) may lose degrees of freedom
to tackle other counterpart in the NCO (sensitivities), thus Combining (17), (18) and (20), the loss is given by
failing to realize full real-time optimization. 1  1/2
J (∆u − ∆uopt )2

2. In the batch-to-batch case, the historical measurements of L= uu 2
2
terminal constraints T̄ are used to avoid the causality, then
] d 2
 [ ]
1  1/2 [
no additional degrees of freedom are lost within the batch. =  J −(HGy )−1 HGyd + Juu
−1
Jud
(HGy ) H  −1
In this paper, we consider that the point-wise terminal 2  uu n 
2
constraints are controlled by a subset of scalar variables, [ ]2

1  1/2 d 
ρT̄ ⊆ ρ , which is of dimension nT̄ to form square control J (HGy )−1 H −Gyd + Gy Juu
[ −1
]
=  Jud I  (21)
2  uu n 
pairings. This means that no less than nT̄ scalar decision 2

variables should be parametrized in ρ . It holds when there −1


Define [F ]= −[
Gy Juu Jud +]G[yd ]and let the uncertain
[ ] vector be
are several discontinuous input sub-arcs, thus having suffi-
d Wd 0 d′  d′ 
cient parametrized switching times. Otherwise, part of the scaled as = ′ such that 
 ′  ≤ 1, where
n 0 Wn n n 
discrete points in u[ts , te ) may be separated to fulfill this
Wd and Wn are diagonal matrices with their diagonal elements as
condition. Compared with the within-batch case, batch-to-
the magnitudes of d and n, respectively. Then, it follows that
batch control of the terminal constraints makes it possible
2
to satisfy the full NCO components, as it retains the degrees

 [ ′ ]
of freedom to tackle sensitivities. 1  1/2
 ] d 
(HGy )−1 H FW d Wn
[
L = Juu

n′ 

2   
3. Local self-optimizing control  
F̃ 2
 [ ′ ]2
The main contribution of this paper is the extension of SOC 1  1/2 d 
=  J (HGy )−1 H F̃
n′ 

methodology to batch processes. Therefore, in this section we 2  uu 2
will briefly review the classical local SOC approaches for static  [ ]2
′ 
1 d
problems, which will be incorporated in the proposed approach. =  M ′  (22)
2 n 
2
3.1. Unconstrained self-optimizing control [ ] 1/2
by defining F̃ = FW d Wn and M = Juu (HGy )−1 H F̃ . The depen-
dency of L on H is established through M and other sensitivity
Assuming that the invariant active constraints can be elim-
matrices are evaluated at the nominal point.
inated by reformulation, consider the following unconstrained
Since the uncertainties d and n are stochastic, while the loss
static optimization problem
in (22) is for a single realization, it is reasonable to minimize
min J(u, d) (16) the average loss, Lav , in the whole span of uncertainties. The
u
average loss around the neighborhood of d has been analytically
s.t. y = G(u, d) derived for common distributions [16], for example, the normal
ym = y + n and uniform types, Lav ∝ 12 ∥M ∥2F . This leads to the following
formulation
where u ∈ Rnu , d ∈ Rnd , y ∈ Rny and J ∈ R1 are the inputs,
disturbances, noise-free outputs and cost function, respectively; 1
min Lav = min ∥M ∥2F (23)
G is the input–output mapping function; n and ym are the noise H H 2
and noisy measurements associated with y. In the literature, the analytical solution to the above prob-
In the local approach, the loss function is defined and then lem has been derived [16,17], giving the following closed-form
approximated as a quadratic term via Taylor expansion [13] expression for the optimal H
1 1/2
L = J(u, d) − J opt (d) ≈ eTu Juu eu (17) H T = (F̃ F̃ T )−1 Gy (GTy (F̃ F̃ T )−1 Gy )−1 Juu (24)
2
where Juu is the Hessian matrix, eu ≜ ∆u − ∆uopt is the deviation
3.2. Self-optimizing control with active-set changes
between the input change ∆u under closed-loop and the optimal
change ∆uopt , due to the occurrence of d. The latter can be
Besides of the invariant active constraints, when there are
estimated by enforcing the first-order variations of the optimality
at least one constraint, g i (u, d) ≤ 0, i = 1, . . . , ng , vary
condition to zero [13] as
between active and inactive with respect to the disturbances,
Ju ≈ Juu ∆uopt + Jud ∆d = 0 then it is referred as the active-set change problem. In general,
this situation is more complicated to handle. Several different
⇒ ∆uopt = −Juu
−1
Jud ∆d (18)
strategies have been proposed in the framework of SOC [42,43].
4
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

1. incorporating the active constraints as equality equations,


then resolving the unconstrained problem;
2. computing the reduced sensitivities as shown in Appendix.
In short, the sensitivities required by the SOC are computed
dy dy d2 J d2 J
as the total derivatives ( du , dd , du2 , dudd ), rather than the partial
ones (Gy , Gd , Juu and Jud ). A numerical example is provided later
in this section.
For within-batch SOC, we aim to identify suitable CVs, c(t) =
Hy(t), such that u(t) is automatically operated toward optimum
along feedback control of c(t), in intervals t ∈ [ts , te ), correspond-
ing to sensitivity profiles (13). In general, the setpoints of CVs
over these intervals should be time-varying, due to the dynamic
nature of batch processes.
Fig. 1. Stacked variables in segment [ts , te ] (divided into N equal grids).
4.1. Defining stacked variables

The one in [42] suggested a conservative solution that aims to The solution method proposed in this paper is numerical, in
guarantee the feasibility of g i in the whole disturbance space. the same fashion as the direct approach to dynamic optimization
While this approach is suboptimal, it does not require partition problems. For better presentation, let us firstly consider a batch
of the disturbance space, as well as online switching for the segment t ∈ [ts , te ), equally discretized into N intervals as shown
control structure. Note that the spirit of SOC is to keep on-line in Fig. 1, where the inputs are considered as piece-wise constants
implementation simple, although there may be some economic in each interval, which is the same as done in control vector
loss. parametrization (CVP).
To enforce the feasibility, consider the linearized form of As illustrated in Fig. 1, the inputs and available measurements
g i (u, d) as for self-optimizing control are defined as the following stacked
variables
g i (u, d) = gui ∆u + gdi ∆d + g0i (25) ]T
...
[
ū ≜ u(0) u(N − 1) (29)
where and gdi are the sensitivities of
gui i
g with respect to u and d, T T
...
[ T
]
ȳ ≜ y(1) y(N) (30)
respectively, g0i is the constraint valueat the linearization point.
Under close-loop control, the variation of u is available via (20). and similarly for d̄ if it might vary within a single batch. From a
Inserting this expression into (25) yields batch-wise point of view, there is a static system with respect to
[ ]
] d′ the stacked variables:
g i (u, d) = [−gui (HGy )−1 HGyd + gdi ]Wd i
[
(HGy )−1 HWn ′ + g0
   n ȳ = Ḡ(ū, d̄) (31)
Ξi
where Ḡ is the mapping between the stacked inputs and outputs.
(26) With this static mapping, the discretized optimization problem is
described by
Assuming that the scaled vector ∥[d′ n′ ]T ∥∞ = 1, then the
maximal of g i is given by min J(ū, d̄) (32)

i,max
g = ∥Ξ ∥ + i
1 g0i (27) s.t. ȳ = Ḡ(ū, d̄)
which will be incorporated into the local SOC formulation, namely, which is in the same form as (16), hence available results in
solve instead the following constrained optimization problem Section 3.1 can be utilized. The following numerical example
1 shows the extension in details.
minLav = min ∥M ∥2F (28) Illustrative example: Consider the following dynamic optimiza-
H H 2
tion problem
s.t. g i,max ≤ 0, i = 1, . . . , ng ∫ tf
which, in general, has no closed-form expression for the optimal min J = (x1 (t)2 + x2 (t)2 + u(t)2 )dt (33)
u(t)
H. 0
s.t. x˙1 = (1 − x22 )x1 − x2 + u + 0.1d
4. Self-optimizing control of batch processes x˙2 = x1
x2 (tf ) ≥ 0.5
Now consider the batch processes. The first step is to identify
the invariant active constraints included in (11) and (12) that where tf = 10 is the duration time, with initial states x1 (0) = 0
would not vary with disturbances. Then, the reduced sensitivities and x2 (0) = 0.6, respectively. The first two equality constraints
should be enforced zero for optimality. For the reduced terminal represent the dynamic system model, and the last inequality is
sensitivities, they can be expressed as ∂∂ρ
Ψ
NT , where NT is the null the terminal constraint. Both the two states are assumed measur-
∂ T̄ able, namely, y = [x1 x2 ]T . For illustrative purpose, we consider
space of [33]. Similarly, the reduced profile sensitivities are
∂ρT̄ that [0, tf ] is equally divided into 4 grids, with constant u(t) over
∂H
[t
∂u s e
, t ) N S with NS the null space of ∂∂ uS̄ [ts , te ) [33]. Practically, each grid. Then, (33) can be solved via dynamic programming
these reduced sensitivities can be identified and approximated optimizers. The optimal input sequence, as well as the state
in the numerical way, by discretizing the continuous profiles trajectories, at the nominal condition d = 0, are shown in Fig. 2.
corresponding to ∂∂ρ
Ψ
NT and ∂∂Hu [ts , te )NS . Two schemes can be Nominally, the terminal constraint x2 (tf ) ≥ 0.5 is active, and
implemented to compute the reduced sensitivities: one can verify its activeness in the neighborhood of d = 0. As
5
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

The above sensitivities, (37) and (38), constitute all necessary


information required by the local SOC algorithm to solve the
optimal CVs outlined in Section 3.1. In the following, we discuss
the structure of the combination matrix to realize within-batch
SOC.

4.2. Mathematical representations for within-batch SOC

Define the extended combination matrix H̄ ∈ Rnū ×nȳ and


stacked CVs c̄ = H̄ ȳ, c̄ ∈ RNnū , where the jth set in c̄ stands
for CVs in the jth time grid in Fig. 1, which are defined by the
multiplication of corresponding rows in H̄ and ȳ. Aided by H̄ and
Fig. 2. Optimal variable trajectories for the numerical example. c̄, it will be shown that a unified framework for dynamic SOC of
batch processes can be formulated. In this framework, a number
of different within-batch SOC schemes can be characterized as
an illustration, let us assume that the first input, u(0), is assigned the selection of a structure-constrained H̄. In the following, we
to control x2 (tf ) at setpoint 0.5. In this case, u(0) will be adapted discuss several possible within-batch SOC schemes that could be
from batch-to-batch as explained earlier, where an integral action considered as practical alternatives.
can be added in the controller to eliminate the tracking offset. Scheme 1: Constant CV with fixed setpoint trajectory. This
is the simplest choice. In this case, CVs over all N grids are c(t) =
Then, we consider within-batch SOC in the segment [2.5, tf ]. The
Hy(t), the setpoint trajectory corresponds to the nominal values
stacked variables over this segment are defined as
of c(t), thus achieving zero local loss. This amounts to selecting
]T
H̄ in a block diagonal form
[
ū ≜ u(1) u(2) u(3) (34)
]T H 0 ··· 0 Hy(1)
[ ⎡ ⎤ ⎡ ⎤
ȳ ≜ [x1 (2) x2 (2)] [x1 (3) x2 (3)] [x1 (4) x2 (4)] (35)
⎢ 0 H ··· 0 ⎥ ⎢ Hy(2) ⎥
where the indexed integer k corresponds to time t = ktf /4 for ⎣ ..
H̄ = ⎢ .. ⎦,
.. ⎥ c̄ = H̄ ȳ = ⎢ .. (39)

. . . .
⎣ ⎦
simplicity. We assume that d does not vary within a single batch,
0 0 ··· H Hy(N)
then d does not involves the stacked form. Using the definitions of
ū and ȳ, the unconstrained optimization formulation is described corresponding to CVs at N discretized grids. To achieve this goal,
by several arrangements can be considered. In each grid t ∈ [k, k+1),
∫ tf
for example, the setpoint trajectory of c(t) can be taken as piece-
min J = (x1 (t)2 + x2 (t)2 + u(t)2 )dt (36) wise constants cs (t) = Hy(k + 1), or smooth transitions that
ū 0 satisfy cs (t)|t =k+1 = Hy∗ (k + 1). Actually, one may consider it as
s.t. x˙1 = (1 − x22 )x1 − x2 + u + 0.2d a path following solution in each time grid [k, k + 1), where the
terminal value of c̄(k + 1) is actively constrained. More practically,
x˙2 = x1
since the setpoint trajectory is predetermined, it is possible to
x2 (tf ) = 0.5 approximate a smooth function in terms of time t using discrete
ȳ in (35) sampled at discrete points values of cs (k), k = 1, . . . , N, for example, polynomials, see the
case studies in the next section.
In (36), the active constraint on x2 (tf ) is enforced by manipu- Scheme 2: Constant CV with setpoint trajectory updated by
lating u(0), which can thus be regarded as an internal state. Using real-time measurements. The same as Scheme 1, in this case
the approach given in Appendix, the nominal sensitivity matrices CVs over all N grids are also c(t) = Hy(t). However, the setpoint
required by the local SOC is evaluated as trajectory cs (t) may be updated in real-time. For example, con-
sider that cs (t)|t =k+1 is updated by measurements sampled at past
0.759 −0.508 0.372
⎡ ⎤
discrete grids, y(1 : k) := [yT (1) · · · yT (k)]T , which have been
⎢ 3.890 −0.138 0.101 ⎥ available at instant t = k + 1. The simplest linear update function
dȳ ⎢−13.141 3.941 −0.439⎥
⎢ ⎥
Gy ≜ =⎢ ⎥, may be considered, as cs (k + 1) = cs∗ (k + 1) − H ′ (k + 1)y(1 : k),
dū ⎢−11.422 3.425 0.874 ⎥ where H ′ (k + 1) is the coefficient matrix to be determined. Then,
⎣ 43.001 −12.899 0.556 ⎦ the extended combination matrix H̄ and stacked CVs c̄ are defined
0 0 0 as
0.062
⎡ ⎤
H 0 ··· 0
⎡ ⎤
⎢ 0.385 ⎥
⎢ H2′ H ··· 0 ⎥
dȳ ⎢−0.964⎥
⎦,
⎢ ⎥
Gyd ≜ =⎢ (37) H̄ = ⎢ .. .. .. .. ⎥
dd ⎢−0.712⎥
⎥ ⎣
. . . .
⎣ 3.066 ⎦ [← HN′ →] H
0 ⎡
Hy(1)

where the last rows are all zeros, corresponding to the active ⎢ Hy(2) + H2′ y(1 : 1) ⎥
constraint x2 (tf ) which is assumed controlled from batch to batch.
c̄ = H̄ ȳ = ⎢ .. ⎥ (40)
.
⎣ ⎦
[
3907.8 −1139.1 −16.78
] Hy(N) + HN′ y(1 : N − 1)
d2 J
Juu ≜ = −1139.1 344.8 4.77 , The above equation corresponds to the scenario that in inter-
dū2 −16.78 4.77 10.49 vals t ∈ [k, k + 1), ∀k, the actual CVs are Hy(t), but with their
274.6 setpoints be modified by −Hk′ y(1 : k), because y(1 : k) are past
[ ]
d2 J
Jud ≜ = −79.5 (38) information that will not vary in this batch. At time instant t = k,
dūdd −0.64 the setpoints for CVs at t = k + 1 are updated, then a new path
6
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

trajectory can be arranged to follow. For implementations, this is k, the available measurements for CVs are up to y(k+1), compared
much more complicated than Scheme 1, although the economic to y(k) in [36]. Therefore, in the new approach, CV selection and
performance may be improved. To simplify, one may consider controller design are separated, note that the design of controllers
special cases where setpoints are updated by some most recent often involves other considerations, for example, the robustness.
measurements [28]. For example, let the setpoints be updated Another benefit is the enhanced controllability by using one-step-
only by measurements in the last grid ahead measurements (a larger Gy ), which helps to reduce the loss

H 0 0··· 0
⎤ (note that L is proportional to the inverse of HGy as shown in
⎢ H2′ H 0 ··· 0 ⎥ (22)). This is particularly important because we want to choose
⎢ 0 H3′ H ··· 0 ⎥ a simple SOC implementation, while the economic performance
H̄ = ⎢ ⎥,
remains acceptable. As will be shown in the case study, even with
⎣ ... .. .. .. .. ⎦
⎢ ⎥
. . . . the most structurally restricted H̄ (Scheme 1), the approach can
0 0 0 HN′ H obtain a good self-optimizing performance. In contrast, it is often

Hy(1)
⎤ necessary to use a complicated solution (Scheme 4) in [36].
⎢ Hy(2) + H2′ y(1) ⎥
⎢ Hy(3) + H3′ y(2) ⎥ Remark 3. Regarding the four within-batch SOC structures, it is
c̄ = H̄ ȳ = ⎢ (41)
.. understandable that the admissible economic performances are

⎢ ⎥
. ranked as ‘‘Scheme 1 < Scheme 2/3 < Scheme 4’’, where ‘‘<’’
⎣ ⎦
Hy(N) + HN′ y(N − 1) reads ‘‘worse than’’, and the rank of control complexity is reversed
in order. The complexity is reflected in two aspects: Firstly, it
where Hk′ (k = 2, . . .) are of the same dimensions. Furthermore,
is more difficult for the latter ones to numerically identify the
additional constraints, Hi′ = Hj′ , ∀i, j, can be incorporated to
optimal H̄, which involves more decision variables; Secondly, and
pursuit a constant update law. In this case, there are only two
perhaps more involved, the latter ones are substantially more
small matrices to be determined. We will investigate this special
complicated to commission in practice, due to the additional
case in the batch column example.
setpoint update/controlled variables switching. It is thus critical
Scheme 3: Switched CVs with fixed setpoint trajectory. The
for a designer to perform comprehensive evaluations such that
extended combination matrix H̄ and stacked CVs c̄ are in the form
an appropriate trade-off can be made. We also wish to high-
of
⎡ ⎤ ⎡ ⎤ light the facts that Scheme 1 is the simplest yet it has a very
H(1) 0 ··· 0 H(1)y(1) promising optimizing performance, which best reflects the spirit
⎢ 0 H(2) ··· 0 ⎥ ⎢ H(2)y(2) ⎥ of self-optimizing control (see the case studies in Section 5).
H̄ = ⎢ .. .. .. ⎥ , c̄ = H̄ ȳ = ⎢ ..
⎢ ⎥ ⎢ ⎥
.

⎣ . . ⎦ ⎣ . ⎦
Remark 4. Since the switching times of subarcs, ts and te , are
0 0 ··· H(N) H(N)y(N) also parametrized as decision variables, which are adapted from
(42) batch to batch, thus are varying, it is convenient to introduce the
′ t
scaled-time as t ′ = tt − s
∈ [0, 1), then the stacked measurements
where H(k) are the combination matrix for interval t ∈ [k − 1, k). e −ts
defined within the arc correspond to fixed points with respect to
Scheme 4: Switched CVs with setpoint trajectory updated
t ′.
by real-time measurements. The extended combination matrix
H̄ and stacked CVs c̄ are Expanding H̄ to cover more sub-arcs. If there are more

H(1) 0 ··· 0
⎤ sub-arcs than the one shown in Fig. 1, ȳ should be defined to
⎢ H2′ H(2) ··· 0 incorporate more measurements corresponding to other arcs,
⎥,

H̄ = ⎢ .. .. .. .. then H̄ expands accordingly to keep align with ȳ. The principle

. . . .

of determining the structure of H̄ is the same as elaborated,
[← HN′ →] H(N) that is, non-zero coefficients are only for those measurements

H(1)y(1)
⎤ that will appear in CVs, depending on the selected schemes for
⎢ H(2)y(2) + H2′ y(1 : 1) ⎥ within-batch SOC.
c̄ = H̄ ȳ = ⎢ .. ⎥ (43)
.
⎣ ⎦
4.3. A unified framework for hybrid batch-to-batch and within-batch
H(N)y(N) + HN′ y(1 : N − 1) SOC
Scheme 3 and Scheme 4 are similar to Scheme 1 and Scheme
2, respectively, except that CVs are now switched for every time The remaining NCO that have not been addressed are the ter-
grids. Mathematically, they are further generalized forms for H̄, minal sensitivities, associated with free (nρ − nT̄ ) scalar variables.
which are hence of higher capacities to improve the economic Since the sensitivities are point-wise, batch-to-batch adaptations
profit. However, they correspond to switching control systems, will be performed similar to the control of point-wise terminal
leading to the difficulty of designing robust yet high-performance constraints. This is done by tracking batch-to-batch CVs, cb2b =
controllers for all CVs. For this reason, Scheme 3 and Scheme Hb2b ȳ, where Hb2b ∈ R(nρ −nT̄ )×nȳ is the additional combination
4 may be practically unfavored, even they admit better perfor- matrix needs to be determined. Different from the within-batch
mances. case, the structure of Hb2b is allowed to be full, as no causality
exists. Structural constraint on Hb2b can, however, be specified
Remark 2. In all schemes, the upper triangular elements of H̄ by the designer for other considerations, for example, to simplify
are enforced zero to respect the aforementioned causality, which the expression of cb2b because the dimension of ȳ is large. Hb2b is
is required for within-batch SOC. Similar ideas were initiated in appended onto H̄ to form an overall combination matrix. With a
the previous work of the authors [36]. However, in that case the little abuse of notations but for simplicity, the overall matrix is
adaptation of u(k) is directly computed in terms of past mea- still denoted by H̄ in the following.
surements. In this paper u(t) is manipulated via normal feedback With the above definitions, all CVs are captured by the overall
controllers to follow designed trajectories. This is achieved by combination matrix, H̄, thus it provides a unified framework for
selecting one-step-ahead measurements in ȳ, namely, at time t = solving the hybrid SOC problem. Using the local average loss
7
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

developed by static SOC approaches, the NLP formulation reads loss in this case is Lav = 3.042 × 10−4 , where the improvement
 )−1 2 is however marginal compared to the previous case.
1/2
min Lav = 0.5 Juu
(
H̄Gy H̄ F̃  (44) The above numerical example shows step by step how the
 
H̄ F
unified framework is capable of solving the self-optimizing CVs
s.t. H̄ on form of a selected structure numerically for dynamic problems.

where the sensitivity matrices in (44) are computed in the same


way as numerical optimization of batch processes. In the presence 4.4. Accounting for active-set changes
of active constraints, they are computed according to Appendix.
The structure of H̄ depends on the structure of NCO, the selected In cases when there are varying active constraints, in this
schemes for within-batch SOC, as well as measurement selection, paper the conservative approach proposed by [42] will be applied.
and so forth. As a general suggestion for within-batch SOC, one is Since we have established a static mapping between the stacked
encouraged to start with the simplest case: Scheme 1, where H̄ is variables, the varying active-set, g i , i = 1, . . . , ng , can be readily
sparse. Unless the obtained economic performance is far beyond linearized per (26), and the maximal value is computed via (27).
acceptable, we do not suggest more complicated ones. Otherwise, In this case, one solves the following constrained NLP
the difficulty encountered in implementation cannot validate its  2
benefit. 1/2
)−1
min Lav = 0.5 Juu
(
H̄Gy H̄ F̃  (46)
 
Solving the structure-constrained NLP (44) could be difficult, H̄ F
i,max
which is not likely to have an analytical solution, as conjectured s.t. g ≤ 0 , i = 1 , . . . , ng
in [44] for general structure-constrained cases. Therefore, (44)
H̄ on form of a selected structure
will be solved using available numerical optimizers, such as the
state-of-art SQP, IPOPT, and so on [45]. Since the NLP is typi- which can be solved in the same solution method as discussed
cally nonconvex, it may be necessary to perform a number of earlier. Such a case study is provided in the batch reactor example
optimization trials, to escape from unreasonable local optima. in Section 5.2.

Remark 5. A special case has an analytical solution is Scheme Remark 6. The approach [42] adopted above is suboptimal, as
4, where the structure of H̄ is lower block triangular [36,46]. it mainly maintains feasibility rather than optimality. Since only
However, practical usage of the analytical solution may be quite one set of CVs are designed for the entire disturbance space, the
limited, because 1) it requires the input–output sensitivity Gy to implementation is simple, keeping align with the principle of
be lower block triangular, which holds only when there are no ac- SOC. To enforce more rigorous optimality, however, one has to
tive constraints. Otherwise, the structure of reduced sensitivity is consider the switching strategy [43], which might be difficult and
altered through Schur complement of the inverse of a partitioned complicated for online commissioning.
matrix, see (A.2) in the Appendix; 2) Scheme 4 is complicated to
implement in practice, which involves switching CVs.
5. Case studies
Illustrative example (continued): Let us firstly consider the case
that in time segment t ∈ [2.5, tf ], only the within-batch scheme 5.1. Batch distillation column
is adopted. With the definitions of ū and ȳ in (34) and (35), the
dimension of the extended combination matrix H̄ is 3 × 6. For
Scheme 1, the optimization problem deduced from (44) is 5.1.1. Process description
Consider a batch distillation column [47], where the light com-
2
 )−1 
 1/2 ( ponent is distillated at the top as valuable product. The following
min Lav = 0.5 Juu H̄Gy H̄ F̃  (45)
H̄ F assumptions are made: (1) constant molar flows; (2) constant
[
h1 h2 0 0
]
0 0 relative volatility; (3) equilibrium stages; (4) no vapor holdup;
s.t. H̄ = 0 0 h1 h2 0 0 (5) constant liquid holdup on stages and in condenser; (6) total
0 0 0 0 h1 h2 condenser.
Based on the these assumptions, the process model equations
with two scalar decision variables h1 and h2 . Without measure- are:
−1
ment noise, F̃ = FWd = (−Gy Juu Jud + Gyd )Wd is computed as
dM1
F = [0.0021 0.061 − 0.019 0.043 0.022 0]T based on the Reboiler : = −uV (47)
numerical expressions, (37) and (38). It is thus easy to solve dt
V dx1
the above optimization problem. We obtain the optimal solution (x1 − y1 + (1 − u)x2 )
= (48)
[h1 h2 ] = [−29.42 6.00] with Lav = 3.074×10−4 , which suggests M1dt
the self-optimizing CV, c = −29.42x1 + 6.0x2 , in time segment V dxi
Stages : = (yi−1 − yi + (1 − u)(xi+1 − xi )) (49)
t ∈ [2.5, tf ]. dt Mi
Somehow, if one wishes to adapt the last input u(3) from batch dxc V
to batch, then the structure of H̄ is allowed to be Condenser : = (yp − xc ) (50)
dt Mc
h1 h2 0 0 0 0
[ ]
for i = 2, . . . , p. The notations are as follows. p: number of stages;
H̄ = 0 0 h1 h2 0 0 Mi : liquid holdup on stage i (counting from the bottom and stage
h3 h4 h5 h6 h7 h8 1 is the reboiler); xi and yi : molar fraction in liquid and vapor
with 8 scalar decision variables. The optimization problem (45) on stage i; xc : liquid molar fraction in condenser; V : vapor flow;
is solved again and we obtain optimal within-batch CVs c = u: distillate ratio u = D/V , 0 ≤ u ≤ 1. With a total condenser,
−31.90x1 + 6.48x2 in segment t ∈ [2.5, 7.5], and the batch- xc = yp . The vapor–liquid equilibrium relationship is determined
to-batch CV, cb2b = 21.47x1 (2) − 102.12x2 (2) + 91.20x1 (3) + by the relative volatility α :
38.1x2 (3) + 18.22x1 (4) + 51.52x2 (4), is batch-wisely controlled α xi
by u(3) to determine the operation for t ∈ [7.5, tf ]. The minimal yi = (51)
1 + (α − 1)xi
8
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

Table 1 Table 2
Parameter values of batch distillation column. NCO of the batch column.
Parameter Value Unit Parameter Value Unit Pointwise condition Profile condition
p 10 V 15 ± 2 kmol/h Constraint: xd (tf ) = xdes
d –
∂Ψ ∂H
tf 10 h xdes
d 0.9 Sensitivity: N
∂ ts1 T
=0 arc 2: [t , t )
∂ u s1 s2
=0
α 1.5 ± 0.1 M1 (0) 100 kmol
Mi 0.2 kmol xi (0) 0.5
Mc 2 kmol xc (0) 0.5
The terminal quality constraint xd (tf ) = xdes
d , which is point-
wise, is handled from batch to batch. With the above input
parametrization, we reserve the scalar variables ts2 for this pur-
pose. This is owing to the fact that compared to ts1 , ts2 imposes
a bigger impact on xd (tf ). Note that from a steady state point of
view, it makes no difference about how to pair batch-to-batch
variables. The NCO of the column are listed in Table 2.

5.1.3. Identification of self-optimizing controlled variables


The sensitivity conditions are (approximately) satisfied follow-
ing the proposed numerical solution method. More specifically,
within-batch SOC will be performed in arc 2, and batch-to-batch
adaptation for ts1 to switch from arc 1 to arc 2. In both cases, mea-
Fig. 3. Optimal input trajectory at the nominal condition.
surement combinations will be selected as the CVs. The following
two measurement sets will be investigated
]T ]T
,
[ [
y1 = x2 x5 x7 x10 y2 = x1 x2
The accumulated distillate, Md , and its composition, xd , are
Following the numerical approach, the second arc is first
∫ t
equally discretized into 40 grids, which is sufficient to maintain
Md (t) = uV dt = M1 (0) − M1 (t) (52)
0 optimization accuracy. Since the within-batch and batch-to-batch
∑ p
xi (0)Mi (0) − xi (t)Mi (t) self-optimizing CVs will be solved simultaneously, the stacked
i=1
xd (t) = (53) input and measurement vectors are
M1 (0) − M1 (t)
]T
...
[
The operation objective is to maximize the product amount, ū ≜ u(0) u(39) ts1 (56)
Md , over a fixed batch duration [0, tf ], while satisfying the ... T T
[ T
]
ȳ ≜ y(0) y(40) (57)
desired product quality. This yields the following optimization
k(ts2 −ts1 )
problem where the integer k corresponds to time instant t = + ts1 .
40
Note that using ū and ȳ, the reduced sensitivities (Gy , Gd , Juu and
max J = Md (tf ) (54)
u(t) Jud ) required by self-optimizing control are computed as the total
derivatives similar to the numerical example, using the method
s.t. xd (tf ) ≥ xdes
d
presented in Appendix.
0 ≤ u(t) ≤ 1 For the within-batch CVs in arc 2, we start with the case using
dynamic process model : (47)–(53) constant CVs with fixed setpoint trajectory (Scheme 1). For the
batch-to-batch CV, we are able to select a full matrix Hb2b corre-
where xdes
d is the minimal allowable quality. The nominal model sponding to ȳ. In principle, measurements outside of arc 2 are
parameters are given in Table 1. The expected disturbances are α also candidates for batch-to-batch optimizations. However, for
and V , with variation ranges of 1.4 ≤ α ≤ 1.6 and 13 ≤ V ≤ 17 the sake of simplicity and without big loss of performance, in the
kmol/h, respectively. following we consider that only y(0), namely, the measurements
at the switching time ts1 are involved, which reduces Hb2b to be
5.1.2. NCO with input parametrization of dimension 1 × ny . One benefit of restricting y(0) lies in the fact
At the nominal condition, numerical optimization is performed that they are sampled before other decision variables take actions
using the multiple-shooting method. The optimal input trajectory (thus less interaction), which makes cb2b easier to be controlled,
is shown in Fig. 3, which is composed of 3 discontinuous arcs. The see later discussions. The overall extended combination matrix is
first arc (arc 1) maintains u(t) = 0 to speed up the distillation, thus sparse, composed of small scale H and Hb2b , as
then in the second (arc 2) u(t) seeks a balance between the ⎡ 0 H1×ny ··· 0

product collection and distillation performance. Finally, as the .. .. ..
..
operation approaches termination, in the third arc (arc 3) u(t) = 1 . . . .
⎢ ⎥
H̄41×41ny = ⎢ ⎥
to maximize the product volume. It is noted that the quality ⎣ 0 0 ··· H1×ny

constraint xd (tf ) ≥ xdes
d is optimally active, and this can be verified Hb2b,1×ny 0 ··· 0
for the whole disturbance space (to avoid product give-away).
1
Based on Fig. 3, it is reasonable to parametrize u(t) as With respect to H̄, the loss function Lav = 2
∥M ∥2F =
1/2
Juu (H̄Gy )−1 H̄ F̃
is numerically minimized, using the classical se-
ts1
{
quential quadratic programming (SQP) algorithm. Since the prob-
u(t)|t ∈[0,tf ) → u(t)|t ∈[ts1 ,ts2 ) (55)
lem is nonconvex, the optimizer is easily stuck into local optima.
ts2
To deal with this issue, optimizations are repeated 20 times at
where 0 < ts1 < ts2 < tf are switching times defining the three random initial points, then the H̄ with minimal cost function is
discontinuous arcs, u(t)|t ∈[ts1 ,ts2 ) remains continuous in the second considered as the desired solution. Fig. 4 shows the profile of
interval. minimal losses obtained by repeated optimizations.
9
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

Table 3
Local average losses for the four within-batch SOC structures (batch column)a .
within-batch SOC y1 y2
Scheme 1 0.00885 0.95
Scheme 2 0.00181 0.00019(0.00165b )
Scheme 3 0.00081 0.2197
Scheme 4 0.00079 0.00018
a
Local optimal values obtained using the SQP optimizer.
b
Structured on form of (60).

(2) For subsets y2 , which has less and yet insignificant mea-
surements, the obtained minimal loss is 0.952 for Scheme 1,
indicating a worse economic performance than the previous case.
No smaller losses can be found with further trials for optimiza-
tion. Thus, one may relax the structure of H̄ to enhance the
economic performance. We then turn to Scheme 2, which still
adopts constant CV in arc 2, but allow its setpoint to be adjusted
using past measurements. With least complexity, the setpoints
will be only modified only by the last-grid measurements, with
Fig. 4. Minimal losses with optimizations initialized from random points.
constant updating coefficients. For the batch-to-batch CV, the
same structure is considered as in the previous case. Then, the
extended combination matrix is in the form of
H1′ ×2 H1×2 ··· 0 0
⎡ ⎤
.. .. ..
. . .
⎢ ⎥
H̄41×82 = ⎢ 0 0 ⎥ (60)

0 0 ··· H1×2 H1×2
⎣ ⎦
Hb2b,1×2 0 ··· 0 0

Using the above H̄, we obtain a sufficiently small loss, Lav =


0.00165. The corresponding combination matrices are

H = 4.94 −5.57 , H ′ = −4.96 5.61 ,


[ ] [ ]

Hb2b = 592.7 95.9


[ ]
Fig. 5. Setpoint trajectory for within-batch CV, c(t) = Hy1 (t), in arc 2. (61)

implying that the setpoint of CV in arc 2, c(t) = Hy1 (t), is


(t −t )
modified by −H ′ y1 (t − s240 s1 ). The setpoint of batch-to-batch
(1) For subsets y1 , the smallest loss using Scheme 1 is 0.0089,
CV, c = Hb2b y(ts1 ), is computed as 341.8. Results using other
which is sufficiently small and thus self-optimizing. In this case,
structures of Schemes 2–4 are given in Table 3 and a similar
the combination matrices are
trend is observed as for y1 . The incentive here to use a looser
H = −2.6 9.27 −8.75 −1.42 ,
[ ]
structure of H̄ is however higher than the previous case. With
Hb2b = 7.5
[
8.0 2.0 −6.8
]
(58) these motivations, Scheme 2 on the form of (60) is chosen for
further close-loop simulations.
In addition, we also explore the performances of within-batch
SOC Schemes 2–4, as summarized in Table 3. The improvements
are limited, however. Although Schemes 3 and 4 reduce the loss 5.1.4. Within-batch self-optimizing control
by one order of magnitude, the absolute reductions are minor We first investigate the case, implementing only within-batch
as Scheme 1 is already quite satisfactory. Actually, the gained SOC in arc 2, while the two switching times, ts1 and ts2 , are fixed at
benefit may be lost due to the added difficulty for implementation their nominal values. In arc 2, discrete PI controllers are adopted
(see the dynamic case study of y2 ). Therefore, in the subse- to track the CVs obtained earlier. For CS1, the proportional gain
quent design, Scheme 1 will be suitable for y1 to implement the and integral time are set as 0.8 and 1.0 [h] via trial and error;
within-batch SOC. for CS2, the two PI parameters are 0.5 and 0.08 [h], respectively.
Using (58) as the combination matrices, the controlled variable In both cases, the measurements are added with random noise
in arc 2 is c(t) = Hy1 (t). The setpoint trajectory at discrete (uniform noise of magnitude 0.01) to simulate the reality.
grids are computed using nominal values of y1 , as shown in Fig. 6 shows the system response of CS1 for two extreme
Fig. 5. As suggested, these discrete points can be linked by either and opposite disturbance scenarios, [α, V ] = [1.6, 17] and
stepwise lines or, more preferably, a smooth function in terms [1.4, 13], respectively. The fixed setpoint trajectory given by
of time. A seven-order polynomial is fitted using the least-square (78) is tracked in both cases. It can be seen from Fig. 6(b) that
regression, which is given by along with the tracking of CV, the manipulated variable u(t) is
adjusted at different levels for the two disturbance scenarios.
cs (t ′ ) = −3.0 − 2.44t ′ + 19.6t ′2 − 77.0t ′3 Furthermore, tabulated in Table 4, it is interesting to note that
+ 166.5t ′4 − 201.0t ′5 + 126.9t ′6 − 32.7t ′7 (59) the final product qualities xd (tf ) for the two cases are 0.9028 and
0.8934, respectively, which are very close to the desired active
t −ts1
where t = ′
∈ [0, 1) is the scaled time in arc 2. In real-
ts2 −ts1 value, 0.9. In contrast, when the nominal operation is imple-
time, cs (t ′ ) is easily computed and even more preferably to be mented, the obtained product qualities are 0.9343 and 0.8508,
convenientp for implementations. For the batch-to-batch CV, c = which are distant from the active level. Besides of admitting a
Hb2b y(ts1 ), the setpoint is computed as 5.352. better product quality within a single batch, it also implies that
10
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

Table 4
Results of within-batch self-optimizing control for two extreme disturbance
scenarios.
disturbance CS xd (tf ) J (kmol)
[α, V ] = [1.6, 17] True optimum 0.9000 31.69
Nominal operation 0.9343 25.75
CS1 0.9028 31.28
CS2 0.9044 30.74
[α, V ] = [1.4, 13] True optimum 0.9000 13.28
Nominal operation 0.8508 19.69
CS1 0.8934 14.03
CS2 0.8835 15.49

steady-state differences are expected to be minor as revealed


in the previous subsection. The discrepancy rises may due to,
unadapted setpoint trajectory of CS2 in the interval [tts1 , 2], as
well as the fixed ts1 and ts2 , which are assumed optimal in the
first place.

5.1.5. Hybrid self-optimizing control


For further batch-to-batch optimization, the following mul-
tivariable controller is adopted from the kth batch to the next,
Fig. 6. Within-batch self-optimizing control performance of CS1.
[ ] [ ] [ ]
ts1 t cs,b2b − cb2b
= s1 − ΛGs
−1
(62)
ts2 ts2 xdes
d + b − xd (tf )
k+1 k k

where G = ∂[xdesd cb2b ] /∂[ts1 ts2 ] is the batch-wise input–output


T T

gain matrix, which can be evaluated via finite difference; Integral


actions are adopted to account for process nonlinearity, such that
tracking errors is eliminated upon controller convergence; 0 <
Λ ≤ I is a diagonal matrix for controller tuning; b is the back-
off of active constraint, employed to ensure process feasibility
when there are measurement noises. Since it was shown that the
practical performance of CS2 is no better than CS1, for the sake
of brevity, in the following we only summarize the results of CS1
for illustration purpose.
Batch-to-batch variations under disturbance scenarios [α, V ]
= [1.6, 17] and [1.4, 13] are shown in Figs. 8 and 9, re-
spectively. Both the noise-free and with-noise cases are provided
for comparisons. In the first disturbance scenario, the optimal
opt opt
switching times are ts1 = 0.397 h and ts2 = 9.887 h. As can be
seen from Fig. 8, the operation starts with an xd (tf ) close to 0.9,
which benefits from the within-batch SOC. With the additional
batch-to-batch adaptationsp, we have the following results:

1. Via control of cb2b , ts1 is manipulated from the nominal


opt
value toward ts1 . Note that in CS1, ts2 has no effect on
Fig. 7. Within-batch self-optimizing control performance of CS2. cb2b as the used measurements are only sampled at ts1 . The
opt
converged ts1 is around 0.68, where the distance from ts1
is mainly owing to the plant nonlinearity.
in our approach, constraint control could be easier when batch- 2. The tracking error of active constraint can be eliminated
to-batch control of xd (tf ) is implemented. Due to the presence of from batch to batch. In this case, ts2 is mainly utilized to
active constraint, it is not convenient to use the objective function compensate the deviation.
J for fair comparisons. Basically, with under-purified product, the 3. The economic profit J can be improved along the batch-to-
collected product volume is allowed to be large, and vice versa. batch control of xd (tf ) and cb2b . This can be more evidently
Fig. 7 shows the system response of CS2. In this case, the seen from the noise-free case, where the final converged J
setpoint is timely updated using the past information of measure- is 31.625 kmol, very close to the optimal cost, J opt = 31.668
ments. As can be seen from Fig. 7(a), the real CV trajectories for kmol. In the noisy case, however, the profit improvement is
the two disturbance scenarios evolve differently as the operation not so obvious. One important reason, is that the presence
proceeds (the red and green dotted lines). The update of setpoint of constraint backoff requires a larger ts2 to improve the
is initiated at about t = 2 h, to avoid using measurements when product quality, thereby reducing the collected product
the CV has not been well stabilized, otherwise the computed volume.
setpoint of the CV may become unrealistic. For the two cases, the
obtained product qualities xd (tf ) are 0.9044 and 0.8835, which are In the case of [α, V ] = [1.4, 13], the optimal switching times
opt opt
also much closer to 0.9 than the nominal operation. The results, are ts1 = 1.615 h and ts2 = 9.875 h. Similar results are obtained,
however, deviate a bit more from 0.9 than CS1, although their as shown in Fig. 9. In general, 1) along the control of cb2b , ts1
opt
approaches toward ts1 ; 2) by regulating the active constraint
11
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

Table 5
Parameter values for the reactor.
Variable Description Value
k1 Kinetic coefficient (main) 0.053 l mol min−1
k2 Kinetic coefficient (side) 0.128 l mol−1 min−1
cBin Inlet concentration of B 5 mol l−1
cA0 Initial concentration (A) 0.72 mol l−1
cB0 Initial concentration (B) 0.05 mol l−1
cC 0 Initial concentration (C) 0 mol l−1
cD0 Initial concentration (D) 0 mol l−1
V0 Initial holdup 1 l
tf Batch during time 250 min
ω Penalty coefficient 2500 l2 min−1 mol−1

xd (tf ), it helps to increase the profit with guaranteed product


quality. In the noise-free case, the final profit J = 13.234 kmol is
very much close to J opt = 13.28 kmol. When measurement noise
is considered, however, the influence of back-off is more evident,
which requires a larger ts2 to fulfill the product quality. This may
be caused by the fact that [α, V ] = [1.4, 13] is the worst case
for distillation. With a non-optimal ts2 , the final average J is about
0.8 kmol less than J opt .

5.2. Batch reactor example

5.2.1. Process description


Now consider a fed-batch reactor occurring with two reac-
tions: A + B → C and 2B → D [2,48]. A and B are the reactants,
and C and D are the product and byproduct, respectively. During
operation, B is fed continuously at a feed rate of u(t), which is the
Fig. 8. Hybrid batch-to-batch and within-batch self-optimizing control perfor-
input variable and constrained within 0 ≤ u(t) ≤ 0.001 l min−1 .
mance of CS1, [α, V ] = [1.6, 17]. The model equations for this batch reactor are as follows
cA u
ċA = −k1 cA cB − cA − , cA (0) = cA0 (63)
V
(cB − cBin )u
ċB = −k1 cA cB − 2k2 cB2 − , cB (0) = cB0 (64)
V
V̇ = u, V (0) = V0 (65)
cC u
ċC = k1 cA cB − , cC (0) = cC 0 (66)
V
cD u
ċD = k2 cB2 − , cD (0) = cD0 (67)
V
where cX and cX 0 are the concentration of material X in the
reactor and its initial value, V is the reactor holdup initially
be V0 . k1 and k2 are the kinetic coefficients of two reactions,
respectively, cBin is the concentration of B in the feed. The nominal
parameters are listed in Table 5, where three model parameters
are uncertain: k1 , k2 and cBin , whose variation magnitudes are
±50% of their nominal values as shown in Table 5.
The operational objective is to maximize the profit with a
penalty on the added material B:
∫ tf
J = cC (tf )V (tf ) − ω u(t)2 dt (68)
0

where ω = 2500 l2 min−1 mol−1 is the penalty weight for material


B. Besides of the input constraints, the maximum terminal con-
centrations of B and D have upper bounds, defining the following
constraints:
cBf := cB (tf ) ≤ 0.025 mol · l−1 (69)
cDf := cD (tf ) ≤ 0.15 mol · l −1
(70)
Nominally, the constraint (69) is active. It further turns out
that it may become active or inactive within the disturbance
Fig. 9. Hybrid batch-to-batch and within-batch self-optimizing control perfor-
mance of CS1, [α, V ] = [1.4, 13].
variation ranges. However, the trends of optimal input arcs are
generally the same as confirmed in Fig. 10, where 200 random
12
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

≤ 0.025 mol · l−1 (75)


where all sensitivities are conveniently evaluated. This condition
will be incorporated into the optimization problem for solving the
optimal H̄. Under the linear assumption, the worst-case/maixmal
of cBf must occur at one of the vertexes in the polygonal uncer-
tainty space, thus is easily handled by the optimizer.
Following the same solution method as elaborated in the col-
umn case, we finally obtain the following results, with a minimal
local loss index of 0.009 mol:
H = 16.87 28.96 130.4
[ ]
(76)
Hb2b = 1.22 1.22 3.28 −0.37 −0.64 3.28
[ ]
(77)
Fig. 10. Optimal input trajectories for 200 groups of random disturbances.
with setpoint of cs,b2b = 7.53, and the setpoint trajectory of the
within-batch CV, via regression to 5-order, is given by

groups of disturbance scenarios are investigated. The optimal cs (t ′ ) = 143.9 − 2.66t ′ + 48.9t ′2 − 108.0t ′3 + 114.6t ′4 − 46.76t ′5
input arcs are composed of a sensitivity-seeking arc in the first (78)
phase and constrained at u(t) = 0 in the second. Therefore, the
following input parametrization will be performed Again, we alo investigated the minimal local average losses
{ implementing within-batch SOC schemes 2–4, which are 0.0038,
u(t)|t ∈[0,ts ) 0.0012, and 0.0010 mol, respectively. Compared with the loss of
u(t)|t ∈[0,tf ) → (71)
ts Scheme 1 (which actually leaves little room for improvements),
as the new decision variables. Furthermore, the first arc u(t)|t ∈[0,ts ) we therefore draw the conclusion that Scheme 1 is a suitable
will be numerically discretized into 50 grids using the CVP met- choice.
hod, which is able to maintain performance accuracy.
5.3. Performance validations
5.2.2. Solving the hybrid self-optimizing controlled variables
5.3.1. Steady state closed-loop performances
The measurements are selected as
The obtained SOC scheme is firstly evaluated at the steady
[ ]T
y = cA cB V (72) states through the nonlinear reactor model. Here, the steady state
refers to scenarios when all CVs, both the batch-to-batch and
with uniform noise of 1% magnitudes. Motivated by the column within-batch ones, are perfectly controlled at their determined
example, here we restrict to Scheme 1 for within-batch SOC. setpoints. This is done by incorporating the CVs fixed at their set-
Therefore, a constant CV, c(t) = Hy(t), will be controlled at a points as equality constraints when solving the nonlinear process
fixed trajectory in the first arc. For the batch-to-batch SOC, we model. In a single batch, however, the process is still dynamic
choose to select the measurements as the y sampled at t = ts and along the time-axis. The 200 random realizations of disturbance
T
t = tf , namely, the CV is cb2b = Hb2b [y(ts )T y(tf )T ] , controlled by scenarios as in Fig. 10 are investigated. Furthermore, the perfor-
manipulating ts from batch to batch. mances are compared with the nominal operation, as well as the
These considerations define the stacked variables as (again, robust optimization. For the robust optimization, the operation
k
the integer k corresponds to time instant t = 50 ts ) is optimized under the worst-case, d = [0.0265 0.064 7.5]T ,
]T corresponding to variations of [−50%, −50%, +50%], respectively.
...
[
ū ≜ u(0) u(49) ts (73) This scenario tends to push the terminal product cBf maximal, in
T T which case it is actively constrained.
...
[ T T
]
ȳ ≜ y(1) y(50) y(tf ) (74)
Fig. 11 summarizes the results under different operating po-
and the overall combination matrix lices, in terms of cBf and the profit loss. It is quite evident that

H1×3 0 ··· 0 0
⎤ the nominal operation is apt to produce unqualified product, as
.. .. .. cBf frequently violates the maximal allowed limit. In addition, the
. . .
⎢ ⎥
H̄51×153 = ⎢ 0 H1×3 ⎥ robust scheme is quite conservative, with cBf distant from the
0 0 ··· H1×3 0 limit in most cases. On the other hand, the obtained SOC scheme
⎣ ⎦
0 0 ··· [Hb2b →] is effective, where cBf is maintained much closer to the limit.
Note that we do not directly control cBf but the identified self-
An underlying difficulty in this example is that the constraint
optimizing CVs. The benefit is reflected in the economics. The
for cBf , (69), switches between active and inactive with respect to
average and maximal economic losses of SOC are calculated to
disturbances. The Hu et al.’s approach [42] to enforce constraint
be 0.0065 mol and 0.0226 mol, respectively. While for the robust
feasibility in the whole disturbance space, however, applies to
case, the average and maximal economic losses are 0.0256 mol
cases when the constraint is nominally inactive. To circumvent
and 0.0516 mol, respectively, which are substantially worse.
this issue, we shift the linearization point for the constraint to
d0 = [0.0625 0.128 3.45]T , instead of the nominal condition.
5.3.2. Dynamic simulations
The new linearization point corresponds to cBf 0
= 0.021, which is
In this study, we investigate the detailed dynamic closed-loop
relatively a center point for its distribution. Therefore, cBf appears
simulation for a particular scenario, the aforementioned worst-
in the linear form of
case, d = [0.0265 0.064 7.5]T . Figs. 12 and 13 summarize the re-
∂ cBf ∂ cBf sults by implementing the hybrid batch-to-batch SOC embedded
cBf = ∆ū + ∆d + cBf0
∂ ū ∂d with within-batch SOC, where we also adopted the PI controllers.
][ ]
d − d0 Measurement noise is not included for the sake of clear visual-
[
= ∂∂cūBf (H̄Gy )−1 H̄Gyd + ∂∂cBfd (H̄Gy )−1 H̄ + cBf0 izations of the results. It can be observed from Fig. 12(a) that the
n
13
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

Fig. 13. Response of the hybrid batch-to-batch and within-batch self-optimizing


control: (a) the batch-to-batch CV, cb2b ; (b) cBf ; (c) cost function, J.
Fig. 11. Steady state performances of the hybrid SOC scheme for 200 random
disturbances for the batch reactor.

caused by the limitations of the local SOC approach and the linear
constraint estimation (75). More discussions concerning this issue
are presented in the next section.

6. Conclusions and discussions

In this paper, we presented a novel framework for designing


hybrid batch-to-batch and within-batch self-optimizing control
(SOC) structures for batch processes. The point-wise NCO are
handled from batch to batch, and profile NCO are met within a
single batch. The difficulty of within-batch SOC to respect causal-
ity is lumped into the structural requirements for the introduced
extended combination matrix. Several promising structures were
discussed, which deliver different commissioning complexities.
On the other hand, the combination matrix associated with the
batch-to-batch CVs is allowed to be full. Aided by the previous lo-
cal SOC criterion, a new NLP formulation unifying the hybrid SOC
problem was proposed to solve all CVs simultaneously. Two simu-
lated batch processes have been studied to investigate the hybrid
Fig. 12. Response of the hybrid batch-to-batch and within-batch self-optimizing SOC approach. More discussions and potential improvements to
control: (a) input arcs (b) with-batch CV in the scaled interval.
the current approach are as follows.

6.1. Main advantages of the proposed approach


response of u(t) drops in the initial phase, due to the negative
tracking error for the within-batch CV, then u(t) returns back to The proposed approach inherits the main advantages of the
normal as the error vanishes. A less aggressive controller could be SOC, that is, operations are automatically steered toward the
tuned to reduce such abrupt changes, however, it unfortunately true optimum via feedback control of appropriate CVs. During
turns out to sacrifice the control accuracy on the whole interval online implementations, it does not require identification of un-
[0, ts ]. Basically, according to Fig. 12(b), the within-batch tracking certain disturbances as compared to many state-of-art dynamic
of c(t) = Hy(t) is quite satisfactory for all batches. For controlling optimization and real-time optimization techniques. Without the
the batch-to-batch CV, cb2b , on the other hand, more than a few information of unknown parameters, the latter approaches easily
batches are consumed according to Fig. 13(a). It is done by iter- lead to substantial sub-optimality and/or infeasibility. Although
atively adapting the switching time ts , finally to about 153.5 min the general framework of (44)/(46) to identify a big H̄ seems
upon the convergence as shown in Fig. 12(a). Meanwhile, the complicated, especially for the within-batch SOC schemes, for
constraint cBf is reduced to 0.021 mol · l, thereby satisfying the practical problems one often obtains a simple SOC structure.
feasibility in this worst-case. The final profit function is J = The most promising one is Scheme 1, which adopts constant
0.2095 mol, which amounts to a true loss of less than 0.02 within-batch CVs with time-varying setpoints. Using the setpoint
mol (10% relative to the optimal profit). Note from Fig. 12(a) strategy (regression with respect to time), the within-batch SOC
that the final input profile differs from the true optimal profile, is further simplified. Concerning the implementation, the added
14
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

complexity of Scheme 1 over the traditional static SOC is just that


the setpoints are time-varying, which is however reasonable for
batch processes in our view. For the batch-to-batch counterpart
of SOC, however, it is very simple to commission. Actually, it has
been a common practice for control and optimization of batch
processes. In all case studies, the PI controllers are adopted with
satisfactory performances, even for the within-batch CVs whose
setpoint trajectories are time-varying. Depending on the tracking
quality, one may also consider other advanced controllers such
as the model predictive control, however, at the expense of
additional design cost.

6.2. Multi-scale control problem

The proposed hybrid SOC approach is designed to minimize


the steady-state loss, corresponding to scenarios when all batch-
to-batch and within-batch CVs are maintained at designed set-
points. However, the control loops are interacting in separated
time scales, how to guarantee (fast) convergence has not been Fig. 14. Comparison for tracking the within-batch CVs: (a) the 1st batch when
ts1 and ts2 are nominal; (b) the 20th batch when ts1 and ts2 are sufficiently
taken into account, which is practically of paramount impor-
adapted.
tance. [49,50] discussed the dynamic issues for SOC of continuous
processes. For batch problems, there is a distinct time-scale sep-
aration between the batch-to-batch and within-batch control of
two kinds of CVs. In our solution, the invariant active constraints combined with controllability analysis is still open, especially for
are assumed with perfect control in the first place. Since the batch problems.
point-wise elements are controlled from batch to batch, there are
transitional batches that cannot satisfy the precondition. This is 6.4. Effect of measurement noise
not only detrimental to the economic performance, but also to the
control of within-batch CVs. For example, for the column case, The influence of measurement noise is typically detrimental,
Fig. 14 compares the tracking performance of the within-batch especially for the control of batch-to-batch CVs, see Figs. 8 and
CV ([α, V ] = [1.4, 13]), between cases when ts1 and ts2 are 9 in the column example. Although noise has been considered in
nominal (the 1st batch) and when sufficiently adapted (the 20th the SOC formulation, an underlying assumption is that it occurs
batch). In the former case, the CV cannot be well controlled in in the same time scale as the disturbance variables. In practice,
the early stage of [ts1 , ts2 ], as indicated by the green circle. In the however, the noise associated with measurements are typically in
latter case, however, the large tracking error is eliminated using higher frequencies than the disturbances, which were advocated
the same controller. In the former case, it is extremely difficult to be addressed in different ways [17]. Well-known techniques
to tune a controller that can achieve better control of the within- include the moving horizon estimation (MHE), Kalman filter and
batch CV in the early phase of [ts1 , ts2 ]. Basically, it tends to use its variants [54]. In the presence of uncertain disturbances how-
an aggressive controller but easily leads to instability or input sat- ever, it calls for robust or learning observers to account for
uration. This phenomenon further demonstrates the importance plant-model mismatches. Recently, iterative learning Kalman fil-
of separation of CV selection and controller design. Notice that, ters were proposed for batch processes [55], which are able to
in literatures the batch-to-batch control can be enhanced by a compensate repetitive disturbances. It is of interest, and very
broad class of state-of-art control techniques, such as the iterative challenging, to extend the results to nonlinear batch systems,
learning control [51–53]. especially when the operation has several distinct subarcs.

6.3. Selection of measurements 6.5. Process nonlinearity

In this paper, measurement selection problem has not been The success of an SOC structure relies on two main factors:
systematically studied, which is important to simplify the CVs (1) accurate estimate of the ‘‘moving’’ optimum in terms of dis-
(note hat the dimension of the stacked vector ȳ is large). Previ- turbances (∆u = −Juu Jud ∆d), (2) accurate computations of the
ously, fast algorithms have been proposed to screening variables system inputs under the closed-loop control ((20)) to coincide
for continuous processes [19–21]. In the batch case, however, with the moving optimum. The local SOC criterion adopted in
ȳ contains not only different process variables, but also their this paper use local sensitivities to predict the above two terms. It
samplings along the time, hence the significance of measurement may lead to performance loss, and may also to infeasibility, when
selection also implies the optimal sensoring strategy, namely, to the nonlinear systems drift from the nominal point. For example:
decide when to measure. Besides of the steady state performance, (1) For the parameter ts1 in the column case, it computes that
it should also take into account of how well the CVs can be ∆ts1 = ±0.436 h to restore optimality in the extremal case.
actually controlled. In the column example, we selected cb2b be However, through optimization of (54) using the known uncer-
composed of measurements sampled at ts1 , at which point no tain parameters, it turns out that ∆ts1 = −0.574 h and 0.645 h
other decision inputs are implemented. This implies that the for [α, V ] = [1.6, 17] and [1.4, 13], respectively. (2) For the
control loop, cb2b ↔ ts1 , is decoupled from the others. It has investigated disturbance scenario in the batch reactor case, rig-
been investigated that with more afterward measurements added orous optimization reveals that
[ ts is ]the most significant variable
T
into cb2b , the CV becomes more difficult to control because of in the input sequence ū = u(i) ts that needs to be changed
the interaction. Thus, the overall economic performance actually compared to the nominal condition, while others should remain
degrades, although from the steady state point of view it is ex- relatively stable. The input response in Fig. 12(a) actually fit well
pected to improve. Currently, the study of measurement selection with the calculations from (20). These discrepancies cannot be
15
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

eliminated on the basis of local analysis. One way to attenuate the d2 J


= Lu2 d − Lu2 u1 Gu−11 Gd + GuT2 Gu−1T (Lu1 d − Lu1 u1 Gu−11 Gd ) (A.6)
effect of nonlinearity is using the gSOC approach [22,24], where du2 dd
the system behavior is considered in the entire operating condi- where the sensitivities required for computations can be available
tions. The global consideration may also better handle active-set through the numerical optimizer [56].
change problems, for example, by considering chance constraints
to reduce the conservativeness [24]. However, the increased com-
References
putational expense may become intractable for batch processes,
which requires further research. [1] T.F. Edgar, D.M. Himmelblau, L. S.Lasdon, second ed., McGraw-Hill, 2001.
[2] B. Chachuat, B. Srinivasan, D. Bonvin, Adaptation strategies for real-time
CRediT authorship contribution statement optimization, Comput. Chem. Eng. 33 (10) (2009) 1557–1567.
[3] S. Skogestad, Plantwide control: The search for the self-optimizing control
Lingjian Ye: Conceptualization, Methodology, Writing – orig- structure., J. Process Control 10 (5) (2000) 487–507.
inal draft, Supervision. Feifan Shen: Software, Visualization, Val- [4] J. Jäschke, Y. Cao, V. Kariwala, Self-optimizing control–A survey, Annu. Rev.
Control 43 (2017) 199–223.
idation. Hongwei Guan: Resources, Writing – review & editing.
[5] T.E. Marlin, A.N. Hrymak, Real-time operations optimization of continuous
processes, in: AIChE Symposium Series, vol. 93, (316) New York, NY:
Declaration of competing interest American Institute of Chemical Engineers, 1971-c2002., 1997, pp. 156–164.
[6] B. Srinivasan, D. Bonvin, E. Visser, S. Palanki, Dynamic optimization of
The authors declare that they have no known competing finan- batch processes - II. Role of measurements in handling uncertainty,
cial interests or personal relationships that could have appeared Comput. Chem. Eng. 27 (1) (2003) 27–44.
to influence the work reported in this paper. [7] A. Marchetti, B. Chachuat, D. Bonvin, Modifier-adaptation methodology for
real-time optimization, Ind. Eng. Chem. Res. 48 (13) (2009) 6022–6033.
[8] K.B. Ariyur, M. Krstic, Real-Time Optimization By Extremum-Seeking
Acknowledgments
Control, John Wiley & Sons, 2003.
[9] J.S. Mandur, H.M. Budman, Simultaneous model identification and opti-
The financial support from National Natural Science Founda- mization in presence of model-plant mismatch, Chem. Eng. Sci. 129 (2015)
tion of China (61673349, 62103360), Natural Science Foundation 106–115.
of Zhejiang Province, China (LGG19F030006, LQ19F030004) are [10] J. Jaschke, S. Skogestad, NCO tracking and self-optimizing control in
the context of real-time optimization, J. Process Control 21 (10) (2011)
acknowledged.
1407–1416.
[11] L. Ye, A. Miao, H. Zhang, Real-time optimization of gold cyanidation
Appendix. Computation of the reduced sensitivities leaching process in a two-layer control architecture integrating self-
optimizing control and modifier adaptation, Ind. Eng. Chem. Res. (2017)
For the following constrained optimization problem 4002–4016.
[12] J. Straus, D. Krishnamoorthy, S. Skogestad, On combining self-optimizing
min J(u, d) (A.1) control and extremum-seeking control–applied to an ammonia reactor case
u
study, J. Process Control 78 (2019) 78–87.
s.t. G (u, d) = 0 [13] I.J. Halvorsen, S. Skogestad, J.C. Morud, V. Alstad, Optimal selection of
y = G(u, d) controlled variables, Ind. Eng. Chem. Res. 42 (14) (2003) 3273–3284.
[14] V. Alstad, S. Skogestad, Null space method for selecting optimal measure-
where G ∈ RnG are the identified active constraints that should ment combinations as controlled variables, Ind. Eng. Chem. Res. 46 (3)
be enforced when d vary in a neighborhood; J and G are twice (2007) 846–853.
[15] V. Kariwala, Optimal measurement combination for local self-optimizing
continuously differentiable with respect to u and d; ∂ G /∂ u is of control, Ind. Eng. Chem. Res. 46 (11) (2007) 3629–3634.
full row rank. [16] V. Kariwala, Y. Cao, S. Janardhanan, Local self-optimizing control with
Assume that a subset of the inputs, u1 ⊂ u, is assigned to average loss minimization, Ind. Eng. Chem. Res. 47 (4) (2008) 1150–1158.
control G . The dimension of u1 equals to nG to formulate a square [17] V. Alstad, S. Skogestad, E.S. Hori, Optimal measurement combinations as
control problem. For self-optimizing control of the reduced un- controlled variables, J. Process Control 19 (1) (2009) 138–148.
[18] R. Yelchuru, S. Skogestad, Convex formulations for optimal selection of
constrained space, the required sensitivities are computed with controlled variables and measurements using mixed integer quadratic
respect to the remaining inputs, u2 = u\u1 . The objective is to programming, J. Proc. Control 22 (2012) 995–1007.
dy d2 J d2 J
evaluate the total derivatives, du , dd , 2 , du dd , instead of partial
dy [19] Y. Cao, V. Kariwala, Bidirectional branch and bound for controlled variable
2 du2 2 selection: Part I. Principles and minimum singular value criterion, Comput.
ones. It is easy to derive that Chem. Engng. 32 (10) (2008) 2306–2319.
dy du1 [20] V. Kariwala, Y. Cao, Bidirectional branch and bound for controlled variable
= Gu2 + Gu1 = Gu2 − Gu1 Gu−11 Gu2 (A.2) selection: Part II. Exact local method for self-optimizing control, Comput.
du2 du2 Chem. Eng. 33 (8) (2009) 1402–1412.
dy du1 [21] V. Kariwala, Y. Cao, Bidirectional branch and bound for controlled variable
= Gd + Gu1 = Gd − Gu1 Gu−11 Gd (A.3) selection: Part III. Local average loss minimization, IEEE Trans. Ind. Inf. 6
dd dd (1) (2010) 54–61.
where notations follow the definition ab := (∂ a/∂ b). [22] L. Ye, Y. Cao, Y. Xiao, Global approximation of self-optimizing controlled
d2 J d2 J variables with average loss minimization, Ind. Eng. Chem. Res. 54 (48)
For 2 and du dd , it is necessary to define the Lagrange func-
du2 2 (2015) 12040–12053.
tion [23] L. Ye, Y. Cao, Y. Li, Z. Song, Approximating necessary conditions of
optimality as controlled variables, Ind. Eng. Chem. Res. 52 (2) (2013)
L(u, d, λ) = J(u, d) + λT G (u, d) (A.4) 798–808.
[24] L. Ye, Y. Cao, S. Yang, Global self-optimizing control with active-set
where λ ∈ R nG
are the Lagrangian multipliers. We skip the changes: A polynomial chaos approach, Comput. Chem. Eng. 159 (2022)
step-to-step derivation in the following. In fact, it is identical 107662.
to the case when the system is constrained by equality state [25] H. Dahl-Olsen, S. Narasimhan, S. Skogestad, Optimal output selection for
functions [35], by making analogies that u1 and G are the states control of batch processes, in: Proc. of American Control Conference, 2008.
[26] W. Hu, J. Mao, G. Xiao, V. Kariwala, Selection of self-optimizing controlled
and implicit functions, respectively. The results are presented as
variables for dynamic processes, in: 8th Intl. Symposium on ADCHEM,
follows 2012, pp. 774–779.
d2 J [27] V. Oliveira, J. Jäschke, S. Skogestad, Null-space method for optimal op-
= Lu2 u2 − Lu2 u1 Gu−11 Gu2 − GuT2 Gu−1T (Lu1 u2 − Lu1 u1 Gu−11 Gu2 ) eration of transient processes, in: 11th IFAC Symposium on Dynamics
du22 and Control of Process Systems, Including Biosystems (DYCOPS-CAB 2016),
(A.5) Trondheim, Norway, 2016, pp. 418–423,

16
L. Ye, F. Shen and H. Guan Journal of Process Control 113 (2022) 1–17

[28] A.S. Grema, Y. Cao, Optimal feedback control of oil reservoir waterflooding [42] W. Hu, L.M. Umar, G. Xiao, V. Kariwala, Local self-optimizing control of
processes, Int. J. Autom. Comput. 13 (1) (2016) 73–80. constrained processes, J. Process Control 22 (2) (2012) 488–493.
[29] L. Ye, V. Kariwala, Y. Cao, Dynamic optimization for batch processes with [43] H. Manum, S. Skogestad, Self-optimizing control with active set changes,
uncertainties via approximating invariant, in: The 8th IEEE Conference on J. Process Control 22 (5) (2012) 873–883.
Industrial Electronics and Applications, ICIEA, 2013, pp. 1786–1791. [44] S. Heldt, Dealing with structural constraints in self-optimizing control
[30] L. Ye, H. Guan, X. Yuan, X. Ma, Run-to-run optimization of batch processes engineering, J. Process Control 20 (9) (2010) 1049–1058.
with self-optimizing control strategy, Can. J. Chem. Eng. 95 (4) (2017) [45] L.T. Biegler, V.M. Zavala, Large-scale nonlinear programming using IPOPT:
724–736. An integrating framework for enterprise-wide dynamic optimization,
[31] L. Ye, Z. Song, X. Ma, Batch-to-batch self-optimizing control for batch Comput. Chem. Eng. 33 (3) (2009) 575–582.
processes, Huagong Xuebao/CIESC J. 66 (7) (2015) 2573–2580. [46] L. Ye, Within-batch self-optimizing control for batch processes, Acta
[32] G. Francois, B. Srinivasan, D. Bonvin, Use of measurements for enforcing Automat. Sinica 45 (in press) (2020) 1–11.
the necessary conditions of optimality in the presence of constraints and [47] C. Welz, B. Srinivasan, D. Bonvin, Evaluation of measurement-based
uncertainty, J. Process Control 15 (6) (2005) 701–712. optimization schemes for batch distillation, Barcelona, Spain, 2002, pp.
[33] B. Srinivasan, D. Bonvin, Real-time optimization of batch processes by 1586–1601.
tracking the necessary conditions of optimality, Ind. Eng. Chem. Res. 46 [48] D. Ruppen, D. Bonvin, D. Rippin, Implementation of adaptive optimal
(2) (2007) 492–504. operation for a semi-batch reaction system, Comput. Chem. Eng. 22 (1)
[34] L. Ye, F. Shen, X. Ma, H. Zhang, An active approach to space-reduced NCO (1998) 185–199.
tracking and output feedback optimizing control for batch processes with
[49] J.R.A. Klemets, M. Hovd, Accounting for dynamics in self-optimizing
parametric uncertainty, J. Process Control 89 (2020) 30–44.
control, J. Process Control 76 (2019) 15–26.
[35] S. Gros, B. Srinivasan, D. Bonvin, Optimizing control based on output
[50] M. Baldea, A. Araujo, S. Skogestad, P. Daoutidis, Dynamic considerations in
feedback, Comput. Chem. Eng. 33 (2009) 191–198.
the synthesis of self-optimizing control structures, AIChE J. 54 (7) (2008)
[36] L. Ye, S. Skogestad, Dynamic self-optimizing control for unconstrained
1830–1841.
batch processes, Comput. Chem. Eng. 117 (2018) 451–468.
[51] J.H. Lee, K.S. Lee, Iterative learning control applied to batch processes: An
[37] B. Srinivasan, S. Palanki, D. Bonvin, Dynamic optimization of batch pro-
overview, Control Eng. Pract. 15 (10) (2007) 1306–1318.
cesses: I. Characterization of the nominal solution, Comput. Chem. Eng. 27
[52] L. Jia, C. Han, M.-s. Chiu, Dynamic R-parameter based integrated model
(1) (2003) 1–26.
predictive iterative learning control for batch processes, J. Process Control
[38] C. Welz, B. Srinivasan, D. Bonvin, Measurement-based optimization of
49 (2017) 26–35.
batch processes: Meeting terminal constraints on-line via trajectory
following, J. Process Control 18 (3) (2008) 375–382. [53] L. Zhou, L. Jia, Y.-L. Wang, D. Peng, W. Tan, An integrated robust iterative
[39] L.T. Biegler, An overview of simultaneous strategies for dynamic learning control strategy for batch processes based on 2D system, J. Process
optimization, Chem. Eng. Process. Process Intensif. 46 (11) (2007) Control 85 (2020) 136–148.
1043–1053. [54] E.L. Haseltine, J.B. Rawlings, Critical evaluation of extended Kalman filter-
[40] E.N. Pistikopoulos, L. Dominguez, C. Panos, K. Kouramas, A. Chinchuluun, ing and moving-horizon estimation, Ind. Eng. Chem. Res. 44 (8) (2005)
Theoretical and algorithmic advances in multi-parametric programming 2451–2460.
and control, Comput. Manag. Sci. 9 (2) (2012) 183–203. [55] Z. Cao, J. Lu, R. Zhang, F. Gao, Iterative learning Kalman filter for repetitive
[41] M. Sun, B. Chachuat, E.N. Pistikopoulos, Design of multi-parametric NCO processes, J. Process Control 46 (2016) 92–104.
tracking controllers for linear dynamic systems, Comput. Chem. Eng. 92 [56] H. Pirnay, R. López-Negrete, L.T. Biegler, Optimal sensitivity based on
(2016) 64–77. IPOPT, Math. Program. Comput. 4 (4) (2012) 307–331.

17

You might also like