Investigating the Trade-Off between Design and Operational Flexibility in Continuous Manufacturing of Pharmaceutical Tablets: A Case Study of the Fluid Bed Dryer

Market globalisation, shortened patent lifetimes and the ongoing shift towards personalised medicines exert unprecedented pressure on the pharmaceutical industry. In the push for continuous pharmaceutical manufacturing, processes need to be shown to be agile and robust enough to handle variations with respect to product demands and operating conditions. In this paper we examine the use of operational envelopes to study the trade-off between the design and operational flexibility of the fluid bed dryer at the heart of a tablet manufacturing process. The operating flexibility of this unit is key to the flexibility of the full process and its supply chain. The methodology shows that for the fluid bed dryer case study there is significant effect on flexibility of the process at different drying times with the optimal obtained at 700s. The flexibility is not affected by the change in volumetric flowrate, but only by the change in temperature. Here the method used a black box model to show how it could be done without access to the full model equation set, as this often needs to be the case in commercial settings.


Introduction
The power of big data, emanating from the process and from customers, is having a number of effects on manufacturing. With coordinated access to reliable data, a manufacturer can respond more rapidly and efficiently to supply chain demands. However, with data comes the capability and often the demands from internal and external stakeholders (customers, shareholders, regulators, neighbours, etc.) for greater transparency of operations. Industry is going through something of a revolution to realise these aims. It is known as Smart Manufacturing, Industry 4.0 or Digitalisation because of the capabilities enabled by greater computing power, smarter algorithms, better measurement, and wider connectivity. The smart manufacturing revolution is said to have three phases [1,2]: 1. Factory and enterprise integration and plant-wide optimisation, 2. Exploiting manufacturing intelligence, 3. Creating disruptive business models.
For the process industries, all three phases are likely to drive significant change. [1][2][3][4][5][6]. To a considerable extent, the first phase has been well underway for a decade or more, particularly plant wide optimisation. The exploitation of big data from enhanced process measurement, as well as using data for demand, supply and the operating environment, is enabling the second phase which is also to some extent underway. Key enablers are methods to manage flexibility and uncertainty, responsiveness and agility, robustness and security, the prediction of mixture properties and function, and new modelling and mathematics paradigms [2]. The third phase is less clear, but the drivers for personalised medicine may affect the pharmaceutical industry more rapidly. Over the last decade there has been an increasing industrial and research interest in the concept of continuous pharmaceutical manufacturing (CPM). CPM offers the benefits of better resource utilisation, reducing energy costs and the potential for operating at processing conditions that would otherwise be prohibitive within the conventional batch setting [7,8]. A key issue related to CPM is the systematic identification of the attainable regions, typically referred to as the design space, in order to employ optimisation for the design and operation of such processes [9].
Pharmaceutical processes involve a number of features which challenge current modelling and control paradigms. They involve multiple phases: solids, liquids and gases often with multiple liquid phases; they are typically combinations of batch and continuous units; and there are tighter regulatory frameworks for their operation than for chemical processes. Litster and Bogle [10] have highlighted the potential for Smart Manufacturing in processes for formulated products which is the form of many pharmaceuticals. Formulated products are structured, multiphase products (i.e., granules, tablets, emulsions, and suspensions) whose performance characteristics-critical quality attributes (CQAs)-are just as dependent on the product structure as they are on the chemical composition (see for example [11,12]). To this end, a variety of process systems engineering tools have been investigated for materialising Quality by Design (QbD) initiatives (see for example [13]). Diab and Gerogiorgis [14] surveyed recent development for the design space identification and visualisation for CPM while the same authors have proposed the use of flowsheeting for technoeconomic assessment for the synthesis and crystallisation of rufinamide [14] and nevirapine [15]. Recognising the inherent difficulty in accurately deriving first-principles mechanistic models for CPM units, Boukouvala et al. [8,9] proposed the use of Kriging data-driven models for the dynamic modelling of unit operations. In their work, dynamic Kriging models showed the ability to efficiently adapt across transition regimes and outperformed the accuracy of neural network modelling. Recently, Nagy et al. [16] presented a dynamic, integrated flowsheet model for the continuous manufacturing of acetylsalicylic acid which entailed a two-step flow synthesis and crystallisation.
Litster and Bogle [9] outlined the potential challenges and opportunities for Smart Manufacturing for formulated products. Pressures on healthcare providers is requiring greater efficiency and less inventory within a more changeable regulatory environment. Personalised medicine will require much more responsive manufacturing for specific patient groups. The industry is expected to bring products faster to market, as the recent pandemic has demonstrated for vaccines. This all requires greater agility and flexibility within the context of greater uncertainty of demand and of raw materials. This will need greater use of mature model-based tools-for design, control and supply chain optimization-to enable the managing of complexity and uncertainty. Many tools are available but there is a lack of experience and often concern about the fidelity of the models and their ability to predict with sufficient accuracy. This is exacerbated by the tendency of optimisers to push operations to the limits of well understood operation. Recently, Chen et al. [17] surveyed a variety of contributions from the process systems engineering community and outlined challenges and opportunities for the deployment of digital twins in pharmaceutical and biopharmaceutical manufacturing.
Uncertainty is caused by a wide range of factors: variability in quality and supply of raw materials, in customer demand, and in environmental and utility conditions, and in batch processes the effects of manual operations which is required. The potential impact of uncertainty on the quality of pharmaceutical products in the context of continuous pharmaceutical manufacturing has been widely recognized by the FDA [18,19]. Most plants are over-designed to cope with such uncertainty. When data are available through extensive experimentation, multivariate statistical methods such as PLS (partial least squares regression) and PCA (principal component analysis) [20,21] as well as Bayesian tools have been proposed [22]. Nonetheless, investigating the design space of a process through experimentation comes at very high costs, due to the associated raw material and energy utilisation, and is time consuming. To overcome this issue, model-based probabilistic frameworks have been examined. Laky et al. [23] presented two algorithms for the refinement of the flexibility test and index formulations, originally proposed by Swaney and Grossmann [24]. Kusumo et al. [25] examined the use of a nested sampling strategy to reduce the computational time required related to Bayesian approaches for the probabilistic characterisation of design space characterisation. In order to ensure operation within defined ranges it is important to define these regions for complex integrated batch processing schemes. Samsatli et al. [26] developed a multi-scenario optimisation method for determining operational envelopes for batch processes. Since formulated products have a range of critical quality attributes, it is necessary that these envelopes reflect a number of quality conditions. There has been work to include a more systematic approach to handling uncertainty: through stochastic methods which use knowledge of the likelihood of uncertain events or through defining more explicit operational windows where safety and quality can be guaranteed [27,28]. More recently, in the context of CPM work has been published on methods of global sensitivity analysis [29], flexibility analysis [23] and clustering techniques [30]. Finally, the importance of Quality by Control (QbC) has been highlighted by a number of research groups [31][32][33][34] In this paper we examine the use of the concept of operational envelopes for a part of the tableting process for continuous pharmaceutical manufacturing, the fluidised bed dryer which helps control the quality of the tableting process shown in Figure 1. These envelopes can then be used within a schema for rapidly devising new optimal operating schedules for changes in the uncertain conditions which affect the ability to achieve a product of suitable quality. The remainder of the article is organised as follows: in Section 2 the main methodology is outlined, in Section 3 we apply the method of operating envelopes on a segmented fluidised bed dryer and finally in Section 4 conclusions are drawn.

Description of the Mathematical Model
The dynamic model of the segmented fluidised bed dryer being explored here is implemented in the gPROMS modelling suite as part of the gPROMS FormulatedProducts ® library [31]. The underlying mathematical formulation is based on the mechanistic model presented by Burgschweiger et al. [35,36] and model parameters have been validated using the Diamond Pilot Plant (DiPP) at the University of Sheffield. For the sake of brevity, we omit the presentation of the full mathematical model and the interested reader is referred to Burgschweiger and Tsotsas [36]. Regarding the underlying assumptions of this model, we summarise them as follows: (i) plug flow in the bubble phase; (ii) the particlefree bubble phase and the suspension phase within the bed are modelled separately, (iii) mass and heat transfer between drying gas and bubbles is significant and included in the model; (iv) heat transfer between the bed wall, particles, suspension gas, environment and bubble gas is also included.

Deriving the Operational Envelopes
As described in Samsatli et al. [26] the aim of deriving the operational envelopes of a process or unit operation is to find the maximum range of uncertain operating policies over which the design can be guaranteed to meet specific targets. The union of the maximum range of the uncertainty operating policies is referred to as the "operational envelope". This is particularly important for continuous pharmaceutical manufacturing as a multistage process, since through the use of such decoupled envelopes for each unit operation it can be ensured that the product specifications can be met if we restrict ourselves within the operating limits denoted through these envelopes.
The geometry of these envelopes can be arbitrary. However, in this work we employ hyperrectangular geometry for the sake of computational simplicity. Mathematically, if we denote by ∈ , the vector of uncertain parameters and their respective limits, which can be inferred either by expert knowledge or based on past observations, we seek to maximise the following objective function: (1) where the index 1, … , is the index of the parameters under investigation. Instead of this objective function, which is non-convex, Samsatli et al. [26] proposed the use of a linear counterpart by introducing the difference in the magnitude of the ranges, i.e., Δ ∀ . Following this step, Equation (1) is replaced by the linear Equation (2) which reflects the scaled perimeter of the envelope.
Intuitively, since Equation (2)  With this modification the overall problem that maximises is given by model (M1).
In model (M1), Φ represents the set of initial conditions for the system under study; • represents the vector of equality constraints which are part of the model, e.g., mass/energy balances; • represents the vector of inequality constraints, e.g., product specifications/resource limitations; corresponds to differential state variables; their derivatives with respect to time (t); represents algebraic state variables; while , represent time variant and time invariant controls, respectively. Notice that in (M1) the upper bound of the time horizon is also allowed to be an "envelope" variable in case one wanted to investigate suitable bounds, for example for drying times.
Model (M1) is a semi-infinite programming problem since it needs to be solved for all the possible values of the vector of variables. To overcome this issue, a two-step multiscenario optimisation problem is solved in which the envelope variables are discretised as described in Samsatli et al. [26].

Case Study: Segmented Fluidised Bed Dryer
In this section we demonstrate the methodology using the digital model of the continuous pharmaceutical process of the Diamond Pilot Plant (DiPP) at the University of Sheffield, shown in Figure 1. The process is a tableting pilot plant at the heart of which is a fluidised bed dryer (FBD) which is critical to the production of consistent quality product. The fluidised bed dryer (FBD) fluidises the feed granules to reduce their moisture content. In the process high-pressure hot air is introduced through a perforated bed of moist solid granules. The wet solids are lifted from the bottom and when fluidised are suspended in a stream of air. Heat transfer is accomplished by direct contact between the wet solid and hot gases. The vaporised liquid is carried away by the gas stream. The temperature and rate of input gas can be adjusted to save energy by, for example, aiming to shorten the drying time and manipulate the desired product (pharmaceutical granules) quality subject to a required range for the moisture content. The FBD is typically divided into a number of vertical segments.
As the FBD is connected with continuous twin screw granulation, the segmented FBD will ensure the wet granules in one cell are dried whilst the incoming wet granules flow into the neighbouring cell. Once the drying process in one cell is finished, the respective cell is emptied pneumatically and then conveyed to the downstream unit, in this case a mill. More segments contribute to reducing moisture but consume more time. In this study we set the FBD equipment to have two segments. Each segment size is 0.035 m 3 , with initial charge of 0.1 kg wet air and 0.1 kg granulates (lactose), with a particle density of 750 kg/m 2 . With these equipment specifications and initial conditions, the drying time is fixed by setting the volume and mass of the FBD, while temperature and flowrate of input streams are time-varied operating variables for achieving the moisture content objective. We implemented a single-factor experiment using gPROMS to investigate the effect of drying times and the two operational parameters, temperature and flowrate of input gas, on the envelope size. Using these studies enables us to find a suitable design that consumes less time and energy but has a bigger operational envelope.
Within a time interval , , solid particles flow through cells of the FBD, and air with a temperature of and a rate of τ is continuously fed to the bottom of the FBD. Through fluidisation of the particles and consequent drying of the particles, the moisture content τ of feed granules is reduced to the goal of a moisture content (which could be a point or an interval).
is the volumetric flowrate and is the temperature.
Employing the approach for traditional optimal control, we used the FBD model developed within gPROMS as a black box model [31], adding end point and path constraints. We used a black box model in order to show how it could be done without access to the full model equation set since this often needs to be the case in commercial settings.
The mathematical formulation is as follows: where min and max refer to the upper and lower bounds, respectively, for each operational variable that is controllable. and refer to other model parameters that are uncontrollable. The drying time is a design variable and is fixed. For each fixed value of the drying time, we applied the methodology shown in Section 2 to find an optimal operating envelope. We were then able to explore the design sensitivity by varying the value of the drying time to find a suitable design that consumes less time and energy but has a bigger operational envelope. The selected design would be the one that consumes less energy and has more flexibility.
Using the methodology shown in Section 2, to obtain an optimal balance between design and operational variables, we let , , , , and formulate the following problem to determine the optimal operating envelope: The process modeling tool gPROMS [29] was used to implement and solve the model to determine the optimal operating envelopes. The gPROMS modeling platform allows existing models of processes to be converted to the envelope form and optimise their dynamic operation. The solution steps are briefly illustrated as follows: Step 1: fix the value of design variable , the upper and lower bounds ∆ , ∆ and , specify the interested range , , of the bounded variables, and let Step 2: generate scenarios, each with a different set of operational variables ( , ). For scenario 1, ⋯ , , the values are given by: where are normalized positions. For example, an optimization using two scenarios ( 2), one corresponding to the bottom left and another to the top right of the feasible region, we specify: 0,0, … ,0 , 1,1, … ,1 Step 3: Then we define the objective function, variables and constraints from the FBD model within gPROMS, and solve the optimization problem to obtain the best values of , and , . The algorithms were run on a personal computer with four 3.50 GHz processors and 16.0GB RAM using the Windows 10 operating system. The model and the approach can be used to optimise the steady-state and/or the dynamic behaviour of a continuous or batch process; in this case the fluid bed dryer is continuous.
The sampling technique employed in this work was a grid-based quasi-Monte Carlo sampling by using Sobol' low discrepancy sequences [37]. They have been shown to provide good distribution coverage even for fairly small sampling points. The design space was partitioned into a number of square grids and then within each grid sampling points were generated to evaluate feasibility. The interested reader is referred to Kucherenko et al. [38] for an in-depth discussion on the subject. In brief, for a response variable , , … , which is a function of a set of input variables , , … a unit hypercube can be defined over the -dimensions. Combining unit hypercubes over a grid-partitioned design space with quasi-random sequences is the most uniform possible solution to secure coverage. This is due to the fact that quasi-random points are selected from a sequence whilst knowing the position of the previous points and thus filling gaps between them [38].
We constructed an independent FBD model (M2), to minimise drying time and moisture content, respectively, subject to it being in the interval 10%, 40% . Next, we took the following steps: Step 1: Specify the range of the operating variables: Step 2: Determine the feasible operating range with a drying time of 900 s which specifies a range of outputs of interest and hence a range of inputs. We uniformly sampled 13 temperatures in the range 20,80 ℃ and 25 flow rates in the range 240,480 m /h. Next, we simulated the FBD model to detect the feasible region (i.e., 13 25 325 points) that satisfies end point and path constraints. Finally, we found all feasible solutions where the moisture falls in the range 10%, 40% . This is shown in Figure 2. Step 3: Run the optimisation model M3 with a drying time of 900 s to obtain the operating envelope for and .
(a) When ∆ and ∆ are allowed to vary freely we obtain the optimal operational envelope as shown in Figure 3 which maximises the area of the rectangle within the feasible boundary. (b) When we constrain the variation that T and V can have to the following range 5 ∆ 20 ℃ and 10 ∆ 60 m h ⁄ , solving (M3) gives the optimal operational envelope as shown in Figure 4. This maximises the envelope size while also maintaining the maximal distance to the feasible boundary using model (M3).  The final stage is to explore the trade-off between design and operational flexibility as measured by the envelope size. The FBD model indicates that the feasible design space varies with the drying time. Hence, we can select a best drying time by exploring the envelope size. To do this we used a scenario-based algorithm with 10 candidate drying times (600-1500 s) and allowed ∆ and ∆ to vary.
From the results shown in Figure 5, we found that the FBD process can obtain the maximal envelope size with 700 s (as shown Figure 6 where a larger number of sampling points, i.e., 1000, was used to increase the resolution of the results), which means that this design has the best flexibility using the chosen operating variables. Figure 5 shows that there is significant effect on the flexibility of the process at different drying times with the optimal obtained at 700 s. Interestingly, in this case, the flexibility is not affected by the change in ∆ but only by the change in temperature, for the specified ranges of uncertainty. Nonetheless, we should point out that in this work the related nonlinear programming models were solved with a local and not a global optimisation solver which could explain some of the irregularities shown in Figure 5 for design options and envelope sizes.

Conclusions
We have presented results for exploring the operational flexibility for a fluid bed drying unit that is at the heart of formulation processes for tablet manufacture. The methodology obtains a feasible operating envelope which is then reduced to one that allows constrained flexibility in two key parameters (T and V) but maintains an optimal distance from the feasible boundary. Finally, when using this optimal set of conditions, it is possible to explore the trade-off between the envelope size and a key parameter, the drying time. We have demonstrated the value of this approach to a process which is known to have considerable uncertainty and which is key to operational excellence. We aim to broaden the analysis to embrace all elements of the formulation process to explore operational flexibility and demonstrate the value of using a model-based optimisation approach to managing uncertainty in the pharmaceutical industry. It can add to the toolkit of the Quality by Design approach being brought in to pharmaceutical process development and operations. The approach seeks to support systematic development processes: in this case to systematically identify operating flexibility with robustness guarantees subject to model accuracy. Further work in tandem with experimental pilot plant work is needed to fully validate the approach within the tight regulatory regime of pharmaceutical manufacture.