(29b) Self-Optimizing Control of a Continuous Pharmaceutical Manufacturing Plant | AIChE

(29b) Self-Optimizing Control of a Continuous Pharmaceutical Manufacturing Plant


Piñeiro, D. P. - Presenter, Norwegian University of Science and Technology
Jäschke, J., Norwegian University of Science and Technology
Braatz, R. D., Massachusetts Institute of Technology
The pharmaceutical industry is increasing its use of continuous manufacturing, which enables easier scale-up, faster time-to-market, and tighter control over product quality [Plumb, 2005]. Continuous operation is well suited for the application of plantwide control approaches such as self-optimizing control (SOC), where the goal is to find a set of controlled variables (CVs) which, when kept at constant setpoints, indirectly lead to near-optimal operation [Skogestad, 2000, Jaschke et al., 2017].

The main idea of SOC is to control optimal invariants, which are process variables whose optimal setpoints are insensitive to disturbances and measurement noise. The ideal SOC variable would be the gradient of the objective function, where the necessary condition for optimality is enforced by controlling the gradient to zero. In real processes, where the gradient cannot be measured directly, selecting self-optimizing controlled variables is equivalent to finding good approximations of the gradient using single measurements or combinations, often linear, of measurements.

An SOC structure is able to track the optimal steady-state operating point of the plant closely in the presence of uncertainty, without the need for re-optimization. In hierarchical control structures which have time-scale separation between the supervisory control and optimization layers, SOC at the supervisory layer can ensure optimal operation when disturbances impact the process, without waiting for setpoint updates given by the upper level optimization layer. Only in the presence of unmodeled disturbances or when large disturbances move the process far away from the nominal operating point, a new setpoint is computed from the optimizer to correct for the steady-state loss of optimality.

This work explores how self-optimizing control can be applied to the continuous-flow synthesis of atropine, and appears to be the first application of self-optimizing control (SOC) to a continuous pharmaceutical manufacturing plant reported in the literature.

This study employs an improved version of a recently published first-principles model of the continuous-flow synthesis of atropine [Nikolakopoulou et al., 2019], which is an active pharmaceutical ingredient (API) with a variety of therapeutic uses, including the treatment of heart rhythm problems. The model was constructed from the process flowsheet and experimental results reported by [Bedard et al., 2017]. The Environmental factor (E-factor, defined by the ratio of the mass of waste per mass of product) is used as the objective function to find the optimal operating point of the plant. The main sources of uncertainty considered when designing the control structure include perturbations in the process variables (disturbances), parametric model uncertainty, and sensor noise.

The controlled variables are selected in two steps. First, local methods [Halvorsen et al., 2003, Kariwala et al., 2008, Alstad et al., 2009, Kariwala and Cao, 2009] are used to screen promising candidate controlled variables around the nominal operating point, where the plant is expected to operate most of the time. These local methods rely on a linearized model of the plant and a quadratic approximation of the objective function. The performance of a given control structure is quantified in terms of the loss of optimality, i.e., the difference between the value of the objective function resulting from constant setpoint control using that particular control structure and the value of the objective function resulting from truly optimal operation [Halvorsen et al., 2003]. The sets of controlled variables are selected by systematically minimizing the average loss of optimality with respect to the given objective function (in this case, the E-factor). In a second step, these preliminary candidate controlled variables are then validated over the entire operating envelope using the original nonlinear model of the plant and Monte Carlo simulations for independent and normally distributed scenarios of disturbances and measurement noise realizations.

It was found that near-optimal operation can be achieved by controlling a linear combination of flow rate and concentration measurements to constant setpoints, with only small losses of optimality for all of the model parametric uncertainties, disturbances, and measurement noise considered in this case study.


Alstad, V., Skogestad, S., and Hori, E. S. (2009). Optimal measurement combinations as controlled variables. Journal of Process Control, 19(1):138–148.

Bedard, A.-C., Longstreet, A. R., Britton, J., Wang, Y., Moriguchi, H., Hicklin, R. W., Green, W. H., and Jamison, T. F. (2017). Minimizing E-factor in the continuous-flow synthesis of diazepam and atropine. Bioorganic & Medicinal Chemistry, 25(23):6233–6241.

Halvorsen, I. J., Skogestad, S., Morud, J. C., and Alstad, V. (2003). Optimal selection of controlled variables. Industrial & Engineering Chemistry Research, 42(14):3273–3284.

Jaschke, J., Cao, Y., and Kariwala, V. (2017). Self-optimizing control – A survey. Annual Reviews in Control, 43:199–223.

Kariwala, V. and Cao, Y. (2009). Bidirectional branch and bound for controlled variable selection. Part II: Exact local method for self-optimizing control. Computers & Chemical Engineering, 33(8):1402–1412.

Kariwala, V., Cao, Y., and Janardhanan, S. (2008). Local self-optimizing control with average loss minimization. Industrial & Engineering Chemistry Research, 47(4):1150–1158.

Nikolakopoulou, A., von Andrian, M., and Braatz, R. D. (2019). Supervisory control of a compact modular reconfigurable system for continuous-flow pharmaceutical manufacturing. In Proceedings of the American Control Conference. in press.

Plumb, K. (2005). Continuous processing in the pharmaceutical industry: Changing the mind set. Chemical Engineering Research Design, 83(6):730–738.

Skogestad, S. (2000). Plantwide control: The search for the self-optimizing control structure. Journal of Process Control, 10(5):487–507.