Systematic model-based steady state and dynamic optimization of combined cooling and antisolvent multistage continuous crystallization processes

: Currently, one of the key challenges in the pharmaceutical industry is the transformation of the traditional batch production methods into robust continuous processes with the intention of reducing manufacturing costs and time and improving product quality. Crystallization is by far the most important purification technology in Pharma as more than 80% of the active pharmaceutical ingredients (API) require at least one crystallization step. A successful crystallization process requires a tight control over crystal size, shape and polymorphic purity. A rigorous and systematic methodology is presented to design and optimize multistage combined cooling and antisolvent continuous (mixed-suspension, mixed-product removal-MSMPR) crystallizers. The crystallization of acetylsalicylic acid (API) in ethanol (solvent) and water (anti-solvent) is used as a case study. A predictable and validated mathematical model of the system, which consists of a one-dimensional population balance model, was used to develop several optimizations strategies. Firstly, the attainable region of the mean particle size was determined for both minimum and maximum attainable crystal size. The method helped identify suitable designs and residence times or volumes for a cascade of continuous crystallizers vessels. The steady state optimization helped determine the optimal operating temperatures and antisolvent flowrates. To minimize the startup time, a series of dynamic optimization strategies were implemented assuming a startup from empty vessels. The optimal dynamic profiles of the temperature and antisolvent flow rate, at different crystallization steps, were identified using a systematic and rigorous approach allowing the reduction of the startup time by 31%.


Introduction
Continuous manufacturing is increasingly seen as a the most flexible and viable options for the pharmaceutical industry [1].However, despite the strides forward, many technical challenges are still to be overcome.Continuous pharmaceutical campaigns are anticipated to have short operating windows [2].This makes the impact of start-up and shut down extremely important on both cost of production and environmental impact.To address some of these key issues, the next generation pharmaceutical plants require systematic, rigorous and robust optimal strategies for process design, operation and control for single processes and integrated plants [2].
Crystallization is widely used in the pharmaceutical industry for its outstanding efficiency and economic performance in purifying active pharmaceutical ingredients (API).The quality of the final product is commonly determined by the crystal size distribution, shape and purity which impact the downstream processability and drug safety and efficacy.Commonly, the higher average crystal size and lower coefficient of variation (CV) means higher quality in pharmaceutical industry [3].
The fundamental driving force for crystallization is supersaturation.Typically, the supersaturation is generated by cooling, solvent evaporation or addition of antisolvent.Most of crystallization literature focused on the design, optimization and control of batch processes.Various model-based and model-free technique have been extensively implemented and thoroughly discussed in the literature.However only few decision and control variables are available to optimally design and operate a batch crystallization process.The most common approach is to use the temperature or/and antisolvent ratio to optimize the crystal size distribution, CV and batch time [4].
Over the last decade, continuous crystallization of active pharmaceutical ingredients (API) received a growing interest.To date, most literatures focused on three main continuous crystallizers: mixed suspension mixed product removal (MSMPR), plug flow crystallizers and continuous oscillatory baffled crystallisers.Currently, the most dominant type of crystallizers in the pharmaceutical industries is based on a stirred tank design which exploits well-established theory and know-how built over decades of batch crystallization.Consequently, many experimental and modelling efforts have been devoted to the continuous MSMPR crystallizers.Several studies focused on the optimization of single, multistage MSMPR and integrated end-to-end continuous pharmaceutical plant with a series of MSMPR crystallizers [5][1][6] [7].Despite the importance of the startup and its anticipated impact on costs and environmental footprint, only few investigations were reported in the literature which identified mainly the optimal dynamic profile of the cooling temperature and antisolvent flowrate [8].However, the MSMPR vessels were assumed to be prefilled with a solution having the steady state composition.This approach is unrealistic and disregards the impact of filling the vessels during the startup which may extend even further the startup time.To date, only Benyahia and coworkers showed the potential impact of different startup scenarios, including starting from empty MSMPR vessels, on continuous pharmaceutical campaigns [2].The later laid the ground to the current investigation, which consists in a systematic optimization approach starting from steady state optimization, aimed at the identification of the attainable mean particle size, followed by different startup optimization strategies including startup from empty vessels.

Materials and Methods
The combined cooling and antisolvent crystallization of aspirin (acetylsalicylic acid, ASA) in ethanol (solvent) and water (antisolvent) is considered as a case study.A dynamic mathematical model of the continuous crystallization process (MSMPR) was derived in conjunction with the literature [8] based on several key assumptions summarized below:  All vessels are assumed to be well-mixed. The total volume of the solvent and antisolvent is additive  The secondary nucleation, breakage and agglomeration are negligible.
The population balance equations (PBE) of the ℎ stage can be written as follow: where refers to the volume of ℎ stage vessel, feed is the inlet flow rate to the first crystallizer, ( , ) is the number density function of the crystals in feed solution, , is the outlet flow rate of ℎ crystallization stage , is the growth rate of API crystals By using the standard method of moment, the ℎ moment at the ℎ stage is defined by: Assuming that the growth rate is size-independent and the volume is constant.Equations 1 and 2 yield: In this case study, the growth rate and nucleation rate equation are adopted from literature [9] The supersaturation (S) is defined by equation 8, where c is the concentration of the API at a given time expressed as mass ratio (equation 9) and * the concentration at saturation calculated by a polynomial model adopted from literature [10] and the coefficients is shown in Table 2.The solubility curve of the API (Acetylsalicylic acid) is expressed as a polynomial equation: The mass balance of API, solvent and antisolvent are shown in equation 11-16.Where is the density of feed, is the density of the solution density at the ℎ stage and is the density of crystal which is 1400 g/kg and is the shape factor .

Steady state optimization
The objective of the steady state optimization is to generate the optimal temperature ( ), antisolvent flow rate ( , ) and residence time ( ) at each stage, which maximize the average crystal size ( ).A three-stage continuous crystallization platform is considered where the supersaturation is created by the combination of cooling and antisolvent addition (Fig. 1) 1.

Figure 1. Cascade of three MSMPR crystallizers
The feed temperature is 40℃ and the minimum and final temperature are both set at 25℃ to generate enough supersaturation.This is captured by the constraints C1 and C7.The concentration of antisolvent is subject to an upper bound which depends on the solubility performance.For the current system, ASA in ethanol (solvent) and water (antisolvent), the solubility of the API decreases as the antisolvent (water) weight ratio increases from 25% to 70%.The maximum antisolvent flow rate in each stage is set at 18.25 g/ minutes, as expressed by the constraint C5.Similarly, the total residence time should not exceed 30 minutes while the minimum residence time in each stage is not less than 1 minutes (constraints C2 and C6).In addition, the constraint C4 ensures that the temperate in ( + 1) ℎ stage is always lower or equal to the temperature of the ℎ stage, which prevents undersaturated conditions and help avoid heating which may lead to the dissolving the API crystals.
The mathematical formulation of steady state single objective optimization problem discussed above, is described below: Where , , , are the temperature, residence time and antisolvent flow rate of the ℎ stage respectively.
This optimization problem was solved by a genetic algorithm using MATLAB2017a with a population size of 50 and maximum number of generations of 500.The maximum average crystal size obtained was 392 (single stage 227 ) which corresponds to the optimal temperatures, antisolvent flowrates and residence times outlined in table 3. The dynamic profiles of the mean crystal size at different crystallization stages shows that the crystal size nearly doubled at the last stage compared to the first stage, due the high supersaturation generated in stage 2 and 3.The first crystallizer has a short residence time and was dominated by nucleation making this stage ideal for seed generation, despite some growth exhibited during this stage.Although, the dynamic mathematical model was used for the sake of steady state optimization, the results also show the intrinsic startup dynamics during which the crystals produced are off specification and will be considered as waste.These represent a significant loss, particularly when considering a short operation steady sate window as anticipated in the pharmaceutical industry [11].

Startup optimization
As discussed earlier, operating at the steady state optimal conditions (i.e.optimal temperatures and antisolvent flow rates) will ensure the attainment of the maximum mean crystal size at steady state.However, this approach provides no means of control over the intrinsic dynamics exhibited during the startup period during which large amounts of off-specification (waste) material is produced.To minimize the startup time and maximize productivity and reduce wastes, a dynamic optimization approach was developed as described in this section.To allow the dynamic optimization of a process, it is common to optimize piecewise constant and piecewise profiles of the control variables.The approach has been widely used in polymer engineering and related research and industrial sectors [2].However, only few startup optimization approaches were applied to the continuous crystallization processes as reported in the literature [8].The reported work focused mainly on one or two crystallization stages and considered the crystallizers be entirely prefilled.Here, a more systematic and rigorous approach was developed to optimize the startup time of a 3stage MSMPR using piecewise constant profiles of antisolvent flowrate and piecewise continuous profiles of temperatures.The approach also addresses the startup optimization with initially empty vessels.For the sake of brevity, only the optimization results associated with the antisolvent flowrates at different stages are presented here.
The dynamic optimization aims at minimizing the which represents the time to reach the steady state mean crystal size (obtained from steady state optimization) within a relative error band of ±5%.The mathematical formulation of the optimization problem is described below.The piecewise constant (discrete) profile of the antisolvent flowrate consist of five equal time intervals of 10 min.Only the results associated with the antisolvent flow rate, used as decision variables for the startup optimization are presented here.The three vessels were all kept empty at the beginning.For each stage, the flow rate of antisolvent depends on the feed and the outlet flow rates.
In the optimization problem above, , , is the antisolvent flow rate of ℎ stage and ℎ time intervals.The antisolvent flowrate upper and lower bounds were set in C1-3.The optimization problem was solved using a genetic algorithm in MATLAB.The population and other setting are set same as the steady state optimization.The results are summarized in Table 4 below.The optimal dynamic profiles of the average crystal size at different stages are shown in figure 3.With the optimized antisolvent profile, the startup time is shortened to 63.43 min.Compared to the unoptimized startup (startup time of 86.62 minutes), the optimization saved 23.2 mins (26.77% performance improvement) based a startup from empty vessels and using equally spaced piece wise antisolvent flowrate profiles.When the time interval number is increased to 10, the performance become even better.The startup time is shortened to 61.09 min (31.3%performance improvement).t95 was used as an example of the objective function.However, more tight quality requirements can be achieved by using t99.This is particularly useful when the purity is considered as one the critical quality attributes alongside mean crystal size.

Conclusion
A systematic and rigorous model-based optimization approach was implemented to the combined cooling and antisolvent crystallization of ASA in continuous MSMPR cascade crystallizers.The steady state optimization approach, based on the attainable regions, made it possible to design a cascade of three MSMPR crystallizers.In addition, it was possible to identify the optimal temperature, antisolvent flowrate and residence time for each MSMPR.
The minimization of startup is a major challenge in continuous pharmaceutical manufacturing due to the anticipated short operating windows.In order to minimize the startup time of the cascade of MSMPR crystallizers, which in turn maximizes the efficiency by reducing wastes and increasing on-specification products, several dynamic optimization strategies were implemented.More realistic scenarios were considered by starting from empty MSMPR vessels.To address the dynamic optimization problem, several decision/control variables and discretisation rules were adopted to enhance the available degrees of freedom and achieve a more effective optimization.The optimal dynamic profile of cooling temperature, antisolvent flowrate and seed addition were identified and compared.Only the optimal profile of antisolvent flowrates presented here for the sake of brevity.It was shown that the startup optimization improves the startup time by (26.77% and 31.3%)which represents a significant gain in terms of production and waste minimization.

Table 3 .Figure 2 .
Figure 2. (a) Performance of the genetic algorithm showing the mean and best results of the objective function at different generations (b) Optimal mean crystal size at different MSMPR stages.

Figure 3 .
Figure 3. Dynamic profiles of the mean crystal size at different crystallization stages during startup

Table 2 .
Coefficients of the solubility polynomial equation