# A Hybrid MPC-PID Control System Design for the Continuous Purification and Processing of Active Pharmaceutical Ingredients

^{*}

## Abstract

**:**

## 1. Introduction and Objective

#### 1.1. Objectives

- Present a system-wide hybrid MPC-PID control scheme.
- Quantify the importance of a cascade control scheme in case of pharmaceutical unit operations.
- Present a comparative study between PID-only control and MPC-PID control schemes based on set point tracking and disturbance rejection criteria.

## 2. Background

## 3. Flowsheet Model Description

#### 3.1. Numerical Technique

## 4. A Systematic Framework for Hybrid Control Design

- Identify the critical control variables.
- Identify suitable actuators or manipulating variables to be paired with the control variables.
- Obtain the response of the control variables by implementing a step change to the manipulating variables (from the actual flowsheet model, which has been developed in gPROMS™).
- Fit a transfer function model to relate the control and manipulating variables from the response obtained in the previous step. This has been done using the system identification tool box of MATLAB™.
- Group the control loops into two categories (i.e., MPC controlled and PID controlled)
- Design the hybrid MPC-PID control loops in Simulink™.
- Evaluate the performance of the designed control system in terms of set point tracking and disturbance rejection ability.

## 5. Design Strategy of the Control System

#### 5.1. Selection of the Control Variables and Pairing with Suitable Actuators

**Table 1.**List of control and manipulated variables for each unit operation. API, active pharmaceutical ingredient.

Process | Control variable | Actuators (Manipulating variable) |
---|---|---|

Crystallization | Temperature cooling schedule | Coolant temperature |

Saturation concentration | ||

Drying | Drying gas temperature | Super-heated steam temperature |

Blending | API composition | Excipient flow rate |

Holdup | Weir height |

#### 5.2. Design of Controller

## 6. Results and Discussion

**Figure 2.**Pictorial representation of the closed-loop continuous process. PID (proportional-integral-derivative); MPC (model predictive control); MV (manipulated variable/actuator); CV (control variable).

#### 6.1. Control System Design

PID parameters | |||
---|---|---|---|

Control loop | Gain $\left({K}_{c}\right)$ | Reset Time $\left({\tau}_{I}\right)$ | Rate $\left({\tau}_{D}\right)$ |

Crystallization (slave loop) | −0.166 | 2.95 × ${10}^{4}$ s | 1.09 × ${10}^{4}$ s |

MPC parameters | |||

Control loop | Input Weight | Rate Weight | Output Weight |

Crystallization (master loop) | 0 | 0.1 | 1 |

Drying | 0 | 0.1 | 1 |

Mixing (API composition) | 0 | 0.1 | 1 |

Mixing (holdup) | 0 | 0.1 | 1 |

#### 6.2. Comparison of the Hybrid MPC-PID Scheme with PID-only Scheme

**Table 3.**List of integral time averaged error (ITAE) values for the MPC vs. PID performance assessment.

Set point tracking | ||
---|---|---|

Control loop | MPC-PID | PID-only |

Saturation concentration | 6.322 × ${10}^{5}$ | 2.935 × ${10}^{6}$ |

Drying gas temperature | 7.371 × ${10}^{5}$ | 2.068 × ${10}^{6}$ |

API composition | 1.584 × ${10}^{3}$ | 1.892 × ${10}^{3}$ |

Disturbance rejection | ||

Control loop | MPC-PID | PID only |

Saturation concentration | 3.317 × ${10}^{5}$ | 4.540 × ${10}^{5}$ |

Drying gas temperature | 1.556 × ${10}^{7}$ | 6.193 × ${10}^{7}$ |

**Figure 6.**Controller performance evaluation for the set point tracking of the saturation concentration.

**Figure 8.**Controller performance evaluation for the set point tracking of the drying gas temperature.

## 7. Conclusions

## Acknowledgments

## Nomenclature

Symbol | Description | Units |

A_{c} | Area of heat transfer | m^{2} |

B_{0} | Primary nucleation term | particles/(m^{3}/s) |

b | Kinetic parameter for crystallization | Dimensionless |

C | Solute concentration in crystallization | moles/m^{3} |

C_{sat} | Saturation concentration of solute | moles/m^{3} |

C_{pw} | Specific heat constant for water | J/K |

D_{p} | Crystal diameter | μm |

F | Particle density | particles/m^{3} |

G_{1} | Growth rate | m/s |

G_{2} | Growth rate | m/s |

g_{1} | Kinetic parameter for crystallization | Dimensionless |

g_{2} | Kinetic parameter for crystallization | Dimensionless |

k_{g1} | Kinetic parameter for crystallization | m/s |

k_{g2} | Kinetic parameter for crystallization | m/s |

k_{b} | Kinetic parameter for crystallization | particles/(m^{3}/s) |

L_{1} | Internal coordinate for length of solid | m |

L_{2} | Internal coordinate for length of solid | m |

L_{3} | Internal coordinate for length of liquid | m |

M_{w} | Cooling water flow rate | kg/s |

T | Temperature (cooling schedule) | Kelvin |

T_{c} | Temperature of cooling water | Kelvin |

T_{in} | Inlet temperature of water | Kelvin |

U | Overall heat transfer coefficient | W/(m^{2}·K) |

ϵ | Porosity of the cake | Dimensionless |

ρ_{avg} | Average density of wet particles | kg/m^{3} |

ρ_{s} | Density of solid | kg/m^{3} |

∆P | Filter pressure difference | kPa |

μ | Fluid viscosity | kg/(m·s) |

α | Specific cake resistance | m/kg |

A | Filter surface area | m^{2} |

C_{F} | Concentration of solutes in slurry | moles/m^{3} |

c | Mass of solute deposited on filter per unit volume of filtrate | kg/m^{3} |

m_{F} | Mass of wet cake | kg |

m_{c} | Mass of dry cake | kg |

m_{v} | Rate of evaporation during drying | kg/s |

N_{a} | Avogadro number | Dimensionless |

R_{m} | Filter medium resistance | 1/m |

V | Filtrate volume | m^{3} |

V_{p} | Particle volume | m^{3} |

A_{s} | Area of heat transfer | m^{2} |

C_{ps} | Specific heat capacity | J/(kg·K) |

C_{psteam} | Specific heat constant for steam | J/K |

k | Mass transfer coefficient | m/s |

h_{fg} | Specific heat of evaporation | J/kg |

h | Heat transfer coefficient | W/(M^{2}·K) |

T_{s} | Temperature of steam | Kelvin |

T_{p} | Temperature of particle | Kelvin |

T_{g} | Drying gas temperature | Kelvin |

T_{in-steam} | Inlet temperature of steam | Kelvin |

mass_{out} | Outlet flow rate of API crystals from dryer | kg/s |

M_{s} | Steam flow rate | kg/s |

N_{u} | Nusselt’s Number | Dimensionless |

P_{r} | Prandtl Number | Dimensionless |

R_{e} | Reynolds Number | Dimensionless |

S_{h} | Sherwood Number | Dimensionless |

U | Overall heat transfer coefficient | W/(m^{2}·K) |

x_{p} | Liquid content of solid particle | Dimensionless |

x_{eql} | Liquid content of solid particle at equilibrium | Dimensionless |

n | Counter for number of components | Dimensionless |

n_{max} | Maximum number of components | - |

t | Time | s |

V_{f} | Forward axial velocity | m/s |

V_{b} | Backward axial velocity | m/s |

V_{r} | Radial velocity | m/s |

x | Spatial coordinate in axial direction | - |

x_{max} | Maximum number of axial compartments | - |

y | Spatial coordinate in axial direction | - |

y_{max} | Maximum number of radial compartments | - |

y_{API} | Fractional API composition at mixer outlet | Dimensionless |

y_{avg} | Average spatial composition of component A | moles/m^{3} |

y_{i} | Composition of component A in i-th compartment | moles/m^{3} |

## Appendix: Process Model Integrated with the Hybrid MPC-PID Scheme

## Crystallizer

## Filtration Process

## Drying Process

## Mixer

## MPC-PID Controller Equations

## Conflicts of Interest

## References

- Food and Drug Administration. Guidance for Industry. Q8 Pharmaceutical Development; U.S. Food and Drug Administration: Rockville, MD, USA, 2006.
- Food and Drug Administration. Guidance for Industry. PAT-A Framework for Innovative Pharmaceutical Development, Manufacturing and Quality Assurance; U.S. Food and Drug Administration: Rockville, MD, USA, 2004.
- Ogunnaike, B.A.; Ray, W.H. Process Dynamics, Modeling, and Control; Oxford University Press: New York, NY, USA, 1994. [Google Scholar]
- Richalet, J. Industrial applications of model based predictive control. Automatica
**1993**, 29, 1251–1274. [Google Scholar] [CrossRef] - Garcia, C.E.; Prett, D.M.; Morari, M. Model predictive control: Theory and practice-A survey. Automatica
**1989**, 25, 335–348. [Google Scholar] [CrossRef] - Singh, R.; Ierapetritou, M.; Ramachandran, R. System-wide hybrid MPC-PID control of a continuous pharmaceutical tablet manufacturing process via direct compaction. Eur. J. Pharm. Biopharm.
**2013**, 85, 1164–1182. [Google Scholar] [CrossRef] [PubMed] - Pantelides, C.C.; Renfro, J.G. The online use of first-principles models in process operations: Review, current status and future needs. Comput. Chem. Eng.
**2013**, 51, 136–148. [Google Scholar] [CrossRef] - Boukouvala, F.; Niotis, V.; Ramachandran, R.; Muzzio, F.; Ierapetritou, M.G. An integrated approach for dynamic flowsheet modeling and sensitivity analysis of a continuous tablet manufacturing process: An integrated approach. Comput. Chem. Eng.
**2012**, 42, 30–47. [Google Scholar] [CrossRef] - Boukouvala, F.; Chaudhury, A.; Sen, M.; Zhou, R.; Mioduszewski, L.; Ierapetritou, M.G.; Ramachandran, R. Computer-aided flowsheet simulation of a pharmaceutical tablet manufacturing process incorporating wet granulation. J. Pharm. Innov.
**2013**, 8, 11–27. [Google Scholar] [CrossRef] - Sen, M.; Chaudhury, A.; Singh, R.; John, J.; Ramachandran, R. Multi-scale flowsheet simulation of an integrated continuous purification-downstream pharmaceutical manufacturing process. Int. J. Pharm.
**2013**, 445, 29–38. [Google Scholar] [CrossRef] [PubMed] - Sen, M.; Rogers, A.; Singh, R.; Chaudhury, A.; John, J.; Ierapetritou, M.G.; Ramachandran, R. Flowsheet optimization of an integrated continuous purification-processing pharmaceutical manufacturing operation. Chem. Eng. Sci.
**2013**, 102, 56–66. [Google Scholar] [CrossRef] - Gnoth, S.; Jenzsch, M.; Simutis, R.; Luubert, A. Process analytical technology (PAT): Batch-to-batch reproducibility of fermentation processes by robust process operational design and control. J. Biotechnol.
**2007**, 132, 180–186. [Google Scholar] [CrossRef] [PubMed] - Sen, M.; Singh, R.; Ramachandran, R. Simulation-based design of an efficient control system for the continuous purification and processing of active pharmaceutical ingredients. J. Pharm. Innov.
**2014**. [Google Scholar] [CrossRef] - Singh, R.; Ierapetritou, M.; Ramachandran, R. An engineering study on the enhanced control and operation of continuous manufacturing of pharmaceutical tablets via roller compaction. Int. J. Pharm.
**2012**, 438, 307–326. [Google Scholar] [CrossRef] [PubMed] - Dougherty, D.; Cooper, D. A practical multiple model adaptive strategy for single-loop MPC. Control Eng. Pract.
**2003**, 11, 141–159. [Google Scholar] [CrossRef] - Sanders, C.F.W.; Hounslow, M.J.; Doyle, F.J., III. Identification of models for control of wet granulation. Powder Technol.
**2009**, 188, 255–263. [Google Scholar] [CrossRef] - Mesbah, A.; Nagy, Z.K.; Huesman, A.E.M.; Kramer, H.J.M.; van den Hof, P.M.J. Nonlinear model-based control of a semi-industrial batch crystallizer using population balance modeling framework. IEEE Trans. Control Syst. Technol.
**2012**, 20, 1188–1201. [Google Scholar] [CrossRef] - Kwon, J.S.; Nayhouse, M.; Christofides, P.D.; Orkoulas, G. Protein crystal shape and size control in batch crystallization: Comparing model predictive control with conventional operating policies. Ind. Eng. Chem. Res.
**2014**, 53, 5002–5014. [Google Scholar] [CrossRef] - Dufour, P. Control engineering in drying technology: Review and trends. Dry. Technol.
**2006**, 24, 889–904. [Google Scholar] [CrossRef] - Daraoui, N.; Dufour, P.; Hammouri, H.; Hottot, A. Model predictive control during the primary drying stage of lyophilisation. Control Eng. Pract.
**2010**, 18, 483–494. [Google Scholar] [CrossRef] - Pisano, R.; Fissore, D.; Barresi, A.A. Freeze drying cycle optimization using model predictive control techniques. Ind. Eng. Chem. Res.
**2011**, 50, 7363–7379. [Google Scholar] [CrossRef] - Hsu, S.; Reklaitis, G.V.; Venkatasubramanian, V. Modeling and control of roller compaction for pharmaceutical manufacturing. Part I: Process dynamics and control framework. J. Pharm. Innov.
**2010**, 5, 14–23. [Google Scholar] [CrossRef] - Hsu, S.; Reklaitis, G.V.; Venkatasubramanian, V. Modeling and control of roller compaction for pharmaceutical manufacturing. Part II: Control and system design. J. Pharm. Innov.
**2010**, 5, 24–36. [Google Scholar] [CrossRef] - Bardin, M.; Knight, P.C.; Seville, J.P.K. On control of particle size distribution in granulation using high shear mixers. Powder Technol.
**2004**, 140, 169–175. [Google Scholar] [CrossRef] - Burggraeve, A.; Monteyne, T.; Vervaet, C.; Remon, J.P.; Beer, T.D. Process analytical tools for monitoring, understanding, and control of pharmaceutical fluidized bed granulation: A review. Eur. J. Pharm. Biopharm.
**2013**, 83, 2–15. [Google Scholar] [CrossRef] [PubMed] - Ramachandran, R.; Chaudhury, A. Model-based design and control of continuous drum granulation processes. Chem. Eng. Res. Design
**2011**, 90, 1063–1073. [Google Scholar] [CrossRef] - Gatzke, E.P.; Doyle, F.J. Model predictive control of a granulation system using soft output constraints and prioritized control objectives. Powder Technol.
**2001**, 121, 149–158. [Google Scholar] [CrossRef] - Long, C.E.; Polisetty, P.K.; Gatzke, E.P. Deterministic global optimization for non-linear model predictive control of hybrid dynamic systems. Int. J. Rob. Nonlin. Control
**2007**, 17, 1232–1250. [Google Scholar] - Pottmann, M.; Ogunnaike, B.A.; Adetayo, A.A.; Ennis, B.J. Model-based control of a granulation process. Powder Technol.
**2000**, 108, 192–201. [Google Scholar] [CrossRef] - Ramachandran, R.; Arjunan, J.; Chaudhury, A.; Ierapetritou, M.G. Model-based control loop performance assessment of a continuous direct compaction pharmaceutical processes. J. Pharm. Innov.
**2012**, 6, 249–263. [Google Scholar] [CrossRef] - Singh, R.; Ierapetritou, M.; Ramachandran, R. Hybrid advanced control of flexible multipurpose continuous tablet manufacturing process via direct compaction. Comput. Aid. Chem. Eng.
**2013**, 32, 757–762. [Google Scholar] - Singh, R.; Barrasso, D.; Chaudhury, A.; Sen, M.; Ierapetritou, M.; Ramachandran, R. Closed-loop feedback control of a continuous pharmaceutical tablet manufacturing process via wet granulation. J. Pharm. Innov.
**2014**. [Google Scholar] [CrossRef] - Singh, R.; Sahay, A.; Oka, S.; Liu, X.; Ramachandran, R.; Ierapetritou, M.; Muzzio, F. Online monitoring, advanced control and operation of robust continuous pharmaceutical tablet manufacturing process. BioPharma Mag. Asia
**2013**, 2, 18–23. [Google Scholar] - Benyahia, B.; Lakerveld, R.; Barton, P.I. A plant-wide dynamic model of a continuous pharmaceutical process. Ind. Eng. Chem. Res.
**2012**, 51, 15393–15412. [Google Scholar] [CrossRef] - Lakerveld, R.; Benyahia, B.; Braatz, R.D.; Barton, P.I. Model-based design of a plant-wide control strategy for a continuous pharmaceutical plant. AIChE J.
**2013**, 59, 3671–3685. [Google Scholar] [CrossRef][Green Version] - Lakerveld, R.; Benyahia, B.; Heider, P.L.; Zhang, H.; Braatz, R.D.; Barton, P.I. Averaging level control to reduce off-spec material in a continuous pharmaceutical pilot plant. Processes
**2013**, 1, 330–348. [Google Scholar] [CrossRef][Green Version] - Pregelj, B.; Gerksic, S. Hybrid explicit model predictive control of a nonlinear process approximated with a piecewise affine model. J. Process Control
**2010**, 20, 832–839. [Google Scholar] [CrossRef] - Zhu, G.; Henson, M.A.; Ogunnaike, B.A. A hybrid model predictive control strategy for nonlinear plant-wide control. J. Process Control
**2000**, 10, 449–458. [Google Scholar] [CrossRef] - Song, C.; Wu, B.; Li, P. A hybrid model-based optimal control method for nonlinear systems using simultaneous dynamic optimization strategies. J. Process Control
**2012**, 22, 852–860. [Google Scholar] [CrossRef] - Mccabe, W.L.; Smith, J.C.; Harriott, P. Unit Operations of Chemical Engineering; McGraw-Hill: New York, NY, USA, 2001. [Google Scholar]
- Mezhericher, A.; Levy, A.; Borde, I. Modelling of particle breakage during drying. Chem. Eng. Process.
**2008**, 47, 1404–1411. [Google Scholar] [CrossRef] - Sen, M.; Singh, R.; Vanarase, A.; John, J.; Ramachandran, R. Multi-dimensional population balance modeling and experimental validation of continuous powder mixing processes. Chem. Eng. Sci.
**2012**, 80, 349–360. [Google Scholar] [CrossRef] - Robles, A.; Ruano, M.V.; Ribes, J.; Ferrer, J. Advanced control system for optimal filtration in submerged anaerobic MBRs (SAnMBRs). J. Membr. Sci.
**2013**, 430, 330–340. [Google Scholar] [CrossRef] - Peiris, R.H.; Budman, H.; Moresoli, C.; Legge, R.L. Fouling control and optimization of a drinking water membrane filtration process with real-time model parameter adaptation using fluorescence and permeate flux measurements. J. Process Control
**2013**, 23, 70–77. [Google Scholar] [CrossRef] - Hammond, A.; Smith, M. The role of PAT, condition monitoring and adaptive control in delivering QbD. In Proceedings of the AIChE Annual Meeting, Pittsburg, PA, USA, 28 October–2 November 2012.
- Sen, M.; Dubey, A.; Singh, R.; Ramachandran, R. Mathematical development and comparison of a hybrid PBM-DEM description of a continuous powder mixing process. J. Powder Technol.
**2013**. [Google Scholar] [CrossRef] - Stephanopoulos, G. Chemical Process Control; Prentice-Hall, Inc.: Englewood Cliffs, NJ, USA, 2006. [Google Scholar]
- Schultz, W.C.; Rideout, V.C. Control system performance measures: Past, present and future. IRE Trans. Autom. Control
**1961**, AC-6, 22–35. [Google Scholar] [CrossRef] - Singh, R.; Sahay, A.; Muzzio, F.; Ierapetritou, M.; Ramachandran, R. Systematic framework for onsite design and implementation of the control system in continuous tablet manufacturing process. Comput. Chem. Eng.
**2014**. [Google Scholar] [CrossRef] - Miki, H.; Terashima, T.; Asakuma, Y.; Maeda, K.; Fukui, K. Inclusion of mother liquor inside KDP crystals in a continuous MSMPR crystallizer. Separ. Purif. Technol.
**2005**, 43, 71–76. [Google Scholar] [CrossRef] - Gunawan, R.; Fusman, I.; Braatz, R.D. High resolution algorithms for multidimensional population balance equations. AIChE J.
**2004**, 50, 2738–2749. [Google Scholar] [CrossRef] - Sen, M.; Ramachandran, R. A multi-dimensional population balance model approach to continuous powder mixing processes. Adv. Powder Technol.
**2013**, 24, 51–59. [Google Scholar] [CrossRef]

© 2014 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).

## Share and Cite

**MDPI and ACS Style**

Sen, M.; Singh, R.; Ramachandran, R.
A Hybrid MPC-PID Control System Design for the Continuous Purification and Processing of Active Pharmaceutical Ingredients. *Processes* **2014**, *2*, 392-418.
https://doi.org/10.3390/pr2020392

**AMA Style**

Sen M, Singh R, Ramachandran R.
A Hybrid MPC-PID Control System Design for the Continuous Purification and Processing of Active Pharmaceutical Ingredients. *Processes*. 2014; 2(2):392-418.
https://doi.org/10.3390/pr2020392

**Chicago/Turabian Style**

Sen, Maitraye, Ravendra Singh, and Rohit Ramachandran.
2014. "A Hybrid MPC-PID Control System Design for the Continuous Purification and Processing of Active Pharmaceutical Ingredients" *Processes* 2, no. 2: 392-418.
https://doi.org/10.3390/pr2020392