Advanced Process Analytical Technology in Combination with Process Modeling for Endpoint and Model Parameter Determination in Lyophilization Process Design and Optimization

: Lyophilization is widely used in the preservation of thermolabile products. The main short-coming is the long processing time. Lyophilization processes are mostly based on a recipe that is not changed, but, with the Quality by Design (QbD) approach and use of Process Analytical Technology (PAT), the process duration can be optimized for maximum productivity while ensuring product safety. In this work, an advanced PAT approach is used for the endpoint determination of primary drying. Manometric temperature measurement (MTM) and comparative pressure measurement are used to determine the endpoint of the batch while a modeling approach is outlined that is able to calculate the endpoint of every vial in the batch. This approach can be used for process development, control and optimization.


Introduction
Lyophilization, or freeze-drying, is widely used in the manufacturing of biologics because it comprises gentle drying conditions that keep temperature-sensitive product safe [1][2][3]. Freeze-drying consists of three steps. In the freezing step, the water of the product solution is transformed to ice. During the primary drying phase, the pressure in the drying chamber is reduced and the shelf temperature can be increased. In this phase, frozen water is removed by sublimation from the product. The last phase, the socalled secondary drying, removes the water by desorption. Here, the shelf temperature is increased and the pressure may be decreased. The main advantages of this drying method are [4][5][6]: -High storage stability; -Gentle removal of water; -Short reconstitution time; -Accurate dosing; -Aseptic handling.
The demand for lyophilization technology will rise because of the increasing number of biological products that are in development [7][8][9]. This increased demand triggers a change in process development from trial-and-error to a quality-by-design-based approach using mathematical models and Process Analytical Technology in order to deepen process understanding and accelerate process development [10,11]. approach using mathematical models and Process Analytical Technology in order to deepen process understanding and accelerate process development [10,11].
In 2004, the US Food and Drug Administration (FDA) presented the guidance for Industry PAT [12] in order to initiate a shift in process development from rigorous testing to a risk-based approach. Crucial elements of the Quality by Design (QbD) approach are the detection, insight and control of critical product and process parameter [12,13]. QbD assists process development and ensures manufacturing efficiency.
In this work, an advanced PAT method for endpoint determination of primary drying is outlined. Manometric temperature measurement (MTM) and comparative pressure measurement are used to determine the endpoint of the whole batch. Furthermore, a pseudo-stationary process model is validated with an experimental Design of Experiments on a pilot scale freeze dryer. The simulated results are in good agreement with the experiments. The process model is useful for process development, control and optimization, while MTM and comparative pressure measurement can be used together as the forwarding condition of primary drying.

Quality by Design in Lyophilization
QbD is a concept that establishes continuous data-driven and risk-based process improvement. An exemplary QbD workflow is shown in Figure 1. First, the Critical Quality Attributes (CQA) of the final product have to be decided.  [14].
A lyophilized product has to meet the following CQAs: -Product integrity and stability; -Drug potency; -Reconstitution time; -Cake appearance.
The CQA are a result of the sum of different process parameters. Process parameters that effect the CQA are Critical Process Parameters (CPP). In lyophilization, the main CPP in each stage are the shelf temperature, chamber pressure and phase duration: -Freezing: temperature, rate; -Annealing: temperature, time; -Primary drying: temperature, pressure, duration; -Secondary drying: temperature, pressure, duration.
The CPP have to be identified by risk assessment and are measured by the implemented PAT [12]. In the risk assessment, the Ishikawa diagram presents possible Figure 1. QbD process development strategy [14].
A lyophilized product has to meet the following CQAs: -Product integrity and stability; -Drug potency; -Reconstitution time; -Cake appearance.
The CQA are a result of the sum of different process parameters. Process parameters that effect the CQA are Critical Process Parameters (CPP). In lyophilization, the main CPP in each stage are the shelf temperature, chamber pressure and phase duration: -Freezing: temperature, rate; -Annealing: temperature, time; -Primary drying: temperature, pressure, duration; -Secondary drying: temperature, pressure, duration.
The CPP have to be identified by risk assessment and are measured by the implemented PAT [12]. In the risk assessment, the Ishikawa diagram presents possible impact factors by category while the Occurrence Impact diagram makes a quantitative assessment for the severeness and frequency of different scenarios. Both are shown in Figure 2.
Processes 2021, 9, x FOR PEER REVIEW 3 of 22 impact factors by category while the Occurrence Impact diagram makes a quantitative assessment for the severeness and frequency of different scenarios. Both are shown in Figure 2. The failure mode effects analysis (FMEA) is based on prior experience. The derived scoring for the Occurrence Impact diagram is shown in Table 1.  The failure mode effects analysis (FMEA) is based on prior experience. The derived scoring for the Occurrence Impact diagram is shown in Table 1.
Another important aspect of QbD is the Design Space. It describes the effects of material and process parameter on the CQA. Inside the chosen Design Space, the necessary product quality has been assured. Therefore, manufacturing inside the Design Space does not need regulatory post approval [13].

Steady State Modeling of Primary Drying Phase
The benefits of modeling in lyophilization are: -Allows process design; -Deepens process understanding; -Failure analysis; -Accelerated process development; -Technology transfer and Scale up.
Modeling is, furthermore, a key part of the QbD approach because the definition of the Design Space requires a multi-parameter optimization that would result in a significant experimental effort. Physico-chemical models are able to reduce the experimental workload by model-assisted process design (s. Figure 3). Validated process models are able to assist process development in combination with a few experiments on a laboratory scale.  Physico-chemical process model in process development adopted from [39].
Here, a pseudo-stationary model of the heat and mass transfer of the primary drying phase is used to establish a design space in which the lyophilized product can be considered safe. An exact derivation can be found in study [24]. In this model, pseudo-stationary conditions are assumed for the heat and mass transfer. This is reasonable due to the slow kinetic of the sublimation process; therefore, all heat supplied from the shelf is used for sublimation and the heat accumulation in both phases is neglected. Furthermore, the inert gas is neglected and a mono-dimensional model can describe the heat and mass transfer.  Here, a pseudo-stationary model of the heat and mass transfer of the primary drying phase is used to establish a design space in which the lyophilized product can be considered safe. An exact derivation can be found in study [24]. In this model, pseudo-stationary conditions are assumed for the heat and mass transfer. This is reasonable due to the slow Processes 2021, 9, 1600 5 of 21 kinetic of the sublimation process; therefore, all heat supplied from the shelf is used for sublimation and the heat accumulation in both phases is neglected. Furthermore, the inert gas is neglected and a mono-dimensional model can describe the heat and mass transfer.
The coupled heat and mass transfer is described by: where K v is the heat transfer coefficient, T S is the inlet shelf temperature, T P is the product temperature on the vial bottom, ∆H subl is the sublimation enthalpy, R p is the dry layer resistance, p i is the partial vapor pressure on the sublimation interface and p c is the chamber pressure. The left-hand side of the equation describes the effective heat supplied from the bottom, while the right-hand side describes the heat used for the sublimation of ice. Since heat accumulation is neglected, the heat transfer in the frozen layer can be described by: where L frozen is the length of the frozen area, λ f rozen is the heat conductivity of the frozen product and T i is the product temperature on the sublimation interface. The partial vapor pressure of water on the sublimation interface is calculated with the new sublimationpressure equation with the sublimation interface temperature [40]. The vial heat transfer coefficient K v and the dry layer resistance R P are the model parameters and need to be determined. Experimental aspects and a discussion of the different determination methods can be found in literature [41,42].
K v describes the heat transfer from the shelf into the vial and is described by: ∆Q stands for the necessary heat to provide for sublimation and is the product of sublimed mass and the sublimation enthalpy. ∆t describes the duration of primary drying of the experiment beginning from the point of pressure drop to experiment completion. A v is the cross-sectional outside area of the vial. Furthermore, K v can be split in the different contributions of the heat transfer.
K v = k cond + k r + k gc (4) k cond describes the direct conduction of the shelf to the vial, while k r and k gc quantify the heat transfer by radiation or gas conduction. The radiative heat transfer is more dominant in the edge vials.
Therefore, K v is dependent on the vial type and position, the used freeze dryer and the process conditions [42]. The chamber pressure in the primary drying has a direct influence on the product temperature since it alters the heat transfer. An increase in chamber pressure decreases the driving force of sublimation but the higher heat transfer results in higher product temperature on the sublimation interface. This in turn increases the vapor pressure and results in an increase in the driving force. The pressure dependence of K v can be described by: Different procedures are used to obtain K v : -Gravimetric vial sublimation tests [33,42]; -Tunable Diode Laser Adsorption Spectroscopy (TDLAS) [42][43][44]; -Pressure rise test [45][46][47].
R P describes the resistance of the dried layer to vapor flow from the sublimation interface and is defined as: Processes 2021, 9, 1600

of 21
A p is the internal cross-sectional area of the vial, p i and p c are the pressure at the sublimation front and in the chamber, respectively, and . m is the sublimation rate. R p has a direct influence on the product temperature. A high resistance leads to higher product temperatures and vice versa. Therefore, products with low R P can be subjected to aggressive drying cycles . The resistance of the dried phase increases during the freezedrying process due to an increase in the dry layer height. This can be described by: The dry layer resistance depends on: the freezing protocol, the formulation, the manufacturing environment and the freeze dryer. Amorphous substances can also show a dependence on process conditions if microcollapse occurs.

Construction of the Design Space
The Design Space is a multidimensional room that describes the effects of material and process parameters on the final product [13].
In lyophilization, two constraints are dominant. First, the product temperature must not exceed the critical temperature of the formulation. For crystalline excipients, it is the eutectic temperature and for amorphous formulations it is the collapse temperature. An exceeding of this temperature would result in a loss of structure and cake elegance. This could lead to a whole batch rejection. Second, the used equipment has maximum capacities to ensure pressure control. Therefore, the sublimation flux has to be kept under a certain limit. This limit is related to choked flow, refrigeration capacities and possible transport of particles. A loss in pressure control must be prevented because it can result in a critical increase in product temperature.
The product temperature is not set directly but is a result of shelf temperature and chamber pressure. Therefore, a different set of shelf temperatures and chamber pressures can result in the same product temperature. The Design Space that can be constructed by the stationary heat and mass transfer equation describes this interplay. The exact procedure to build the Design Space is described elsewhere [54]. In Figure 4, an exemplified Design Space is shown. The product temperature isotherms have a linear dependence on the chamber pressure while the shelf temperature isotherms are not linear. The critical temperature in this design space is marked in red. Every combination of shelf temperature and chamber pressure that results in a product temperature under the critical product temperature line can be considered safe. Furthermore, the Design Space considers the equipment constraint. The pressure-dependent line describes the choked flow regime, while the horizontal line exemplifies the equipment failure if the refrigeration capacity is exceeded or if parts of the formulation are transported.
Processes 2021, 9, 1600 7 of 21 temperature in this design space is marked in red. Every combination of shelf temperature and chamber pressure that results in a product temperature under the critical product temperature line can be considered safe. Furthermore, the Design Space considers the equipment constraint. The pressure-dependent line describes the choked flow regime, while the horizontal line exemplifies the equipment failure if the refrigeration capacity is exceeded or if parts of the formulation are transported. It has to be noted that the Design Space alters during the drying because of the increase in the dry layer height. Therefore, a process that is considered safe at first can result in a collapsed product if the process conditions are not adapted. Furthermore, an intrabatch variance of product temperature profiles is seen in a freeze dryer caused by higher radiative heat transfer for the edge vials. The difference in product temperatures is shown in Figure 5.  It has to be noted that the Design Space alters during the drying because of the increase in the dry layer height. Therefore, a process that is considered safe at first can result in a collapsed product if the process conditions are not adapted. Furthermore, an intra-batch variance of product temperature profiles is seen in a freeze dryer caused by higher radiative heat transfer for the edge vials. The difference in product temperatures is shown in Figure 5.  Edge vials are the temperature-limiting vials, while center vials define the shortest drying time. An optimization for edge vials could lead to insufficient drying of center vials, while an optimization solely for center vials could lead to an exceeding of the critical temperature in the edge vials. Both modes would cause quality loss. Therefore, in process development and optimization, both vial classes, edge and center, have to be considered for an optimal process design. The Design Space further depends on the used equipment, and with this approach a technology transfer is possible [33,34].

Process Analytical Technology for Lyophilization
A wide variety of PAT approaches are available to measure different properties of the lyophilization process. They can be classified in different categories, e.g., single vial Edge vials are the temperature-limiting vials, while center vials define the shortest drying time. An optimization for edge vials could lead to insufficient drying of center vials, while an optimization solely for center vials could lead to an exceeding of the critical temperature in the edge vials. Both modes would cause quality loss. Therefore, in process development and optimization, both vial classes, edge and center, have to be considered for an optimal process design. The Design Space further depends on the used equipment, and with this approach a technology transfer is possible [33,34].

Process Analytical Technology for Lyophilization
A wide variety of PAT approaches are available to measure different properties of the lyophilization process. They can be classified in different categories, e.g., single vial vs. batch or invasive vs. non-invasive.
Most commonly, thermocouples or resistance thermal detectors are used to measure the product temperature of selected vials during the drying process. The measurement is sensitive to the location of the sensing device, and it has to be kept in mind that the probed vials dry differently since the invasive probe leads to a lower supercooling. Newer technologies that measure the product temperature wireless have been presented, e.g., TEMPRIS, WTMplus. The big advantages are the passive operation of the probes and the usage in automatic loading systems that allows for a higher flexibility in the positioning [55,56].
The predominant measurement techniques for the chamber pressure are the Pirani gauge and the capacitance manometer. The Pirani reading is highly dependent on the gas composition since the gas atmosphere cools a heated wire and the chamber pressure is obtained from the wire resistance. In contrast, the capacitance manometer measures the chamber pressure independent of the gas composition. It corresponds the chamber pressure to the deflection of a membrane and the so resulting voltage. Together, Pirani and capacitance measurements can be used as comparative pressure measurements to determine the endpoint of primary drying [56]. At the end of primary drying, the gas composition shifts from water to nitrogen and the pressure readings are approaching each other.
Emerging PAT to observe different properties of the lyophilized product and the progress of drying are: Mass spectrometry (MS); -Near-infrared spectroscopy (NIR); -Raman spectroscopy; -MTM.
TDLAS allows for the measurement of the gas component by the absorption of electromagnetic energy at specific wavelengths [55,56]. In lyophilization, the beam wavelength is tuned to the water vapor adsorption spectra. It only needs optical access to the duct for continuous online monitoring of the freeze-drying process, but the duct needs to be of sufficient length to allow for the measurement. This technology enables the measurement of gas velocity, water vapor flow and endpoint determination.
The quadrupole MS allows for the identification of residual gas based on the mass charge ratio. The drying time determined by MS is essentially the same as the Pirani gauge but the MS can also detect extractables from stoppers, silica oil, leaks and other gas components [56]. It allows for primary and secondary drying endpoint determination. The main drawbacks are the high cost, the complex installation since the device is not steam sterilizable and the device has to be calibrated for every formulation.
NIR and Raman show high potential as inline PAT in the manufacturing of biologics and can be used in lyophilization [57][58][59][60][61][62][63]. Raman and NIR are single vial measurement methods that allow for the measurement of different critical product and process characteristics. For the Raman measurement, the probe is placed on top of the vial while NIR probes are placed at the vial bottom. The combination of Raman and NIR enables the drying endpoint detection. Additionally, Raman and NIR supply valuable data for process development and optimization [63]. The introduction into manufacturing scale is limited due to the complex installation.
MTM uses data from the pressure rise test to estimate product temperature at the sublimation interface, the dry layer resistance and the vial heat transfer coefficient [46,49,64]. Different algorithms can analyze the pressure rise data. They are exemplified in literature [65]. The pressure rise experiments are conducted at defined time intervals. The valve between the drying and condenser chamber is closed and the pressure rise is recorded Processes 2021, 9, 1600 9 of 21 during the test interval. Then, the MTM equation is fitted to the data by an algorithm and yields the product resistance and the vapor pressure of ice at the sublimation front [55]: p(t) describes the increase in chamber pressure during the pressure rise test, p 0 is the chamber pressure before the test, N is the number of dried vials, V is the drying chamber volume, ∆T is the product temperature difference at the sublimation interface and the ground and X is a variable for the linear pressure increase.
It has to be kept in mind that the increase in the pressure during the measurement only rises to the vapor pressure of the coldest vial and that the MTM data are accurate until 2/3 of primary drying because the number of vials still drying alters [46,55]. However, the p i value can still be used to determine the endpoint of primary drying [55]. During the pressure rise test, an increase in product temperature is possible, which can lead to the collapse of the product if the process is near the edge of failure. MTM is a useful tool for process monitoring and model parameter determination.

Freeze-Drying Equipment
All freeze-drying experiments were carried out in an Epsilon 2-6D LSCplus pilot freeze dryer (Martin Christ Gefriertrocknungsanlagen GmbH, Osterode am Harz, Germany), see Figure 6a. A total of 2 mL of the product solution was filled into 6R injection vials (Martin Christ Gefriertrocknungsanlagen GmbH, Osterode am Harz, Germany) with an eppendorf Research ® plus 0.5-5 mL pipette (Eppendorf AG, Hamburg, Germany). In total, 135 vials were used and loaded on the middle shelf of the freeze dryer. "Wireless Temperature Measurement plus" (WTMplus) sensors (Martin Christ Gefriertrocknungsanlagen GmbH, Osterode am Harz, Germany) measured the product temperature during the whole freezedrying process, see Figure 6b. The sensors were placed centrally on the vial bottom and the LPCplus process visualization software (Martin Christ Gefriertrocknungsanlagen GmbH, Osterode am Harz, Germany) recorded the data.

Experimental Runs
The freeze-drying cycle of the product mixture was adopted from literature [66]. At first, the shelf temperature was lowered to −45 • C at a temperature ramp of 0.2 • C/min and afterwards this temperature was held for 6 h. Next, the drying steps were executed. The shelf temperature and the chamber pressure for the primary drying phase vary as depicted in the Design of Experiments (DoE) ( Table 2). The forwarding condition was implemented with comparative pressure measurement and set to 15%. The temperature ramp to increase the shelf temperature is 1 • C/min. The chamber pressure has been varied between 20% and 90% of ice pressure at the lowest shelf temperature in order to evaluate a system with high and low driving force and the shelf temperature has been chosen inside a range suitable for the drying of mannitol without collapse.
Temperature Measurement plus" (WTMplus) sensors (Martin Christ Gefriertrocknu sanlagen GmbH, Osterode am Harz, Germany) measured the product temperature du the whole freeze-drying process, see Figure 6b. The sensors were placed centrally on vial bottom and the LPCplus process visualization software (Martin Christ Gefriertr nungsanlagen GmbH, Osterode am Harz, Germany) recorded the data.

Experimental Runs
The freeze-drying cycle of the product mixture was adopted from literature [66] first, the shelf temperature was lowered to −45 °C at a temperature ramp of 0.2 °C/ and afterwards this temperature was held for 6 h. Next, the drying steps were execu The shelf temperature and the chamber pressure for the primary drying phase var depicted in the Design of Experiments (DoE) ( Table 2). The forwarding condition was plemented with comparative pressure measurement and set to 15%. The tempera ramp to increase the shelf temperature is 1 °C/min. The chamber pressure has been va between 20% and 90% of ice pressure at the lowest shelf temperature in order to evalu a system with high and low driving force and the shelf temperature has been chosen side a range suitable for the drying of mannitol without collapse.

Software
The DoE was generated by JMP (JMP Inc., SAS Institute, Cary, NC, USA). During freeze-drying, all data are collected by LPCplus and the MTM data were analyzed by MTMplus Analyse (Martin Christ Gefriertrocknungsanlagen GmbH, Osterode am Harz, Germany).

Overall Vial Heat Transfer Coefficient
In this study, K V is determined by the gravimetric method. This procedure is more labour intensive but results in individual values for K V and has been used in different studies before. The 6R vials were filled with 2 mL water and loaded onto the shelf. A selection of vials are weighed before the freeze-drying procedure is started. For scheduling ease, the vials have been frozen overnight and then primary drying began. The shelf temperature and chamber pressure of the primary drying phase are the same as in the DoE depicted above. Primary drying is aborted as soon as the first measured product temperature reaches the shelf temperature within 1 • C difference. The vacuum is broken and the vials are unloaded and then weighed again after thawing. The product temperature of the closest probed vial is taken as the product temperature of the weighed vial. The necessary temperature data are collected by LPCplus.

Dry Layer Resistance
Different procedures can be used to determine the product resistance. In this study, the value is determined by MTM. During primary drying, the valve in the connecting duct is closed and the pressure rise data inside the drying chamber is collected. An optimized periodic MTM is used. The time interval is 10 min and the measurement duration can be up to 30 s depending on the pressure rise. If no significant increase in pressure rise is detected for 3 s, the MTM is finished and the valve opens. The MTM equation is fitted to the pressure rise data by a Levenberg-Marquardt algorithm implemented into the MTMplus Analyse software. During MTM, the increase in chamber pressure leads to an increased heat transfer and could possibly damage the product. The optimized measurement has the advantage that the temperature increase in the product is low. The MTM duration is only kept to the length required to reach equilibrium vapor pressure; thus, the product is exposed to the increased heat transfer for a shorter time compared to the classical method where the duration is a fixed time.

Results
First, the results of the model parameter determination concept are shown. Therefore, the same primary drying setpoints are used as depicted in Table 2. The experiments have been conducted twice. The model parameter determination concept is summarized in Figure 7. During the experiments, the pressure has always been controllable; therefore, no ice slab testing has been used. The eutectic temperature of mannitol has been identified to be around −1.5 • C [66].

Vial Heat Transfer Coefficient
The vial heat transfer coefficient has been determined by ice sublimation tests. A selection of edge and center vials have been used to quantify the impact of the vial position on the vial heat transfer coefficient. For ease of presentation, the vials are grouped into edge and center vials. The heat transfer coefficient of each vial has been determined and the results are shown in Figure A1. Positions and category of the weighed vials and the WTMplus sensors are shown in Figure 8b. The resulting vial heat transfer coefficients are shown in Figure 8a. The error is shown as the standard deviation of the heat transfer coefficient of the vials in the group.

Vial Heat Transfer Coefficient
The vial heat transfer coefficient has been determined by ice sublimation tests. A selection of edge and center vials have been used to quantify the impact of the vial position on the vial heat transfer coefficient. For ease of presentation, the vials are grouped into edge and center vials. The heat transfer coefficient of each vial has been determined and the results are shown in Figure A1. Positions and category of the weighed vials and the WTMplus sensors are shown in Figure 8b. The resulting vial heat transfer coefficients are shown in Figure 8a. The error is shown as the standard deviation of the heat transfer coefficient of the vials in the group.

Vial Heat Transfer Coefficient
The vial heat transfer coefficient has been determined by ice sublimation tests. A selection of edge and center vials have been used to quantify the impact of the vial position on the vial heat transfer coefficient. For ease of presentation, the vials are grouped into edge and center vials. The heat transfer coefficient of each vial has been determined and the results are shown in Figure A1. Positions and category of the weighed vials and the WTMplus sensors are shown in Figure 8b. The resulting vial heat transfer coefficients are shown in Figure 8a. The error is shown as the standard deviation of the heat transfer coefficient of the vials in the group.  In all experiments, the edge vials showed a significantly higher heat transfer coefficient. They receive a higher energy input during primary drying because of an increased radiative contribution, the so-called edge effect. The center vials show a more uniform coefficient. Here, the heat input is mainly caused by conduction from the shelf. An increase in chamber pressure leads to an increased heat transfer coefficient regardless of the vial position caused by an improved gas. An increase in shelf temperature leads to a decrease in the edge effect. The edge vials still show a higher heat transfer coefficient, but the deviation is decreased. Inside the investigated shelf temperatures, no significant increase in vial heat transfer coefficient in the center vials is seen.

Dry Layer Resistance
The dry layer resistance is determined by MTM. This measurement is able to calculate the dry layer resistance of the coldest vial. The parameters of Equation (7) are determined by the minimization of the sum of square errors. The parameters are summarized in Table 3. The dry layer resistance showed no dependence on the process parameter of the primary drying phase.

Endpoint Determination
The endpoint of primary drying is a critical process parameter. If the secondary drying started too early, the loss of elegance of the freeze-dried cake can be the result. An increase in the primary drying time above the endpoint of the slowest vial does not cause product loss, but it unnecessarily lengthens the process duration. Therefore, the detection of the primary drying endpoint is necessary to ensure product safety, while maintaining the highest productivity and efficiency of the process.
In this study, the endpoint of primary drying is detected by different PATs (summarized in Table 4). The WTMplus sensors can determine the primary drying endpoint for individual vials but the invasive nature of the sensor reduces the representativity for similar vials. MTM and comparative pressure detect the endpoint of the slowest-drying vials. The proposed modeling approach is able to close the gap between this PAT because it can predict the endpoint of primary drying for each vial given that the model parameters are distinctly determined. In this chapter, the experimental error is calculated by reproducibility for 95% security, while the simulation error has been evaluated by 100 Monte-Carlo-Simulations, where the model parameters have been randomly varied.
First, the batch methods MTM and comparative pressure measurement are compared. Both PATs are non-invasive and able to determine the primary drying endpoint of the slowest-drying vial. The comparison for the different experiments is shown in Figure 9. The MTM criteria is shown together with the comparative pressure measurement in a parity plot. The onset of comparative pressure measurement is in good agreement with the MTM endpoint. Both measurements show the fastest primary drying in the experiment with the high shelf temperature and chamber pressure. MTM detects the endpoint at 17.45 h and comparative pressure at 17.75 h. A low shelf temperature and chamber pressure result in the slowest drying. Here, the endpoint lays at 33.55 h for both measurement techniques. The MTM endpoint for the experiment with the low shelf temperature and high chamber pressure could not be detected since the pressure increase has been too low. This setpoint has been the most inefficient with a primary drying time of 43.8 h. Here, the endpoint lays at 33.55 h for both measurement techniques. The MTM endpoint for the experiment with the low shelf temperature and high chamber pressure could not be detected since the pressure increase has been too low. This setpoint has been the most inefficient with a primary drying time of 43.8 h. Furthermore, the applied forwarding condition lays between the onset and midset of comparative pressure measurement (s. Figure A2). The implementation of the forwarding condition alone reduced the primary drying time compared to the original freeze drying recipe (experiment−−) by around 30% from 48 to 34 h. All experiments yielded elegant cakes without detectable collapse or shrinkage. That concludes that the forwarding condition establishes a safe window for primary drying. In Figure 10, the experimental primary drying endpoint is compared with the simulated endpoint. Since Vial 2.9 is an edge vial, the simulated endpoint is compared to the experimental endpoint determined by the nearest WTMplus sensor. The simulated results show good agreement with the experiments. The experiment with the high shelf temperature and low chamber pressure led to the shortest primary drying duration of 12.9 h in the experiments and 12.99 h in the simulation, while the experiment with the low shelf Furthermore, the applied forwarding condition lays between the onset and midset of comparative pressure measurement (s. Figure A2). The implementation of the forwarding condition alone reduced the primary drying time compared to the original freeze drying recipe (experiment−−) by around 30% from 48 to 34 h. All experiments yielded elegant cakes without detectable collapse or shrinkage. That concludes that the forwarding condition establishes a safe window for primary drying.
In Figure 10, the experimental primary drying endpoint is compared with the simulated endpoint. Since Vial 2.9 is an edge vial, the simulated endpoint is compared to the experimental endpoint determined by the nearest WTMplus sensor. The simulated results show good agreement with the experiments. The experiment with the high shelf temperature and low chamber pressure led to the shortest primary drying duration of 12.9 h in the experiments and 12.99 h in the simulation, while the experiment with the low shelf temperature and chamber pressure showed the slowest primary drying with 19 h in the experiments and 19.12 h in the simulations. An increase in shelf temperature leads to a higher energy input for sublimation; therefore, the sublimation flux increases and the necessary primary drying time decreases. A further improvement of the heat transfer by a rise in chamber pressure leads to slower primary drying based on the decrease in driving force. Here, the increase in heat transfer by improved gas conduction is not able to overcome the decreased pressure difference between the sublimation front and the chamber pressure.  Figure 11 shows the simulated and experimental primary drying endpoints for vial 12.9. The closest WTMplus sensor has determined the experimental drying endpoint. Compared to vial 2.9, vial 12.6 finishes drying later. This difference is caused by the edge effect. Vial 2.9 receives a higher radiative heat transfer compared to vial 12.6 and therefore dries faster.
The simulated and experimental drying endpoints for vial 12.6 show good agreement. The fastest drying process is seen in the experiment with the high shelf temperature and low pressure. Here, the experimental endpoint lays at 16 Figure 11 shows the simulated and experimental primary drying endpoints for vial 12.9. The closest WTMplus sensor has determined the experimental drying endpoint. Compared to vial 2.9, vial 12.6 finishes drying later. This difference is caused by the edge effect. Vial 2.9 receives a higher radiative heat transfer compared to vial 12.6 and therefore dries faster.
The simulated and experimental drying endpoints for vial 12.6 show good agreement. The fastest drying process is seen in the experiment with the high shelf temperature and low pressure. Here, the experimental endpoint lays at 16.95 h and the simulation endpoint at 16.33 h, while the experiments with the low shelf temperature and chamber pressure showed the longest durations, with 33.1 and 27.1 h, respectively. dries faster.
The simulated and experimental drying endpoints for vial 12.6 show good agreement. The fastest drying process is seen in the experiment with the high shelf temperature and low pressure. Here, the experimental endpoint lays at 16.95 h and the simulation endpoint at 16.33 h, while the experiments with the low shelf temperature and chamber pressure showed the longest durations, with 33.1 and 27.1 h, respectively.  The design space model is able to calculate the primary drying endpoint of each vial once the model parameters are determined. MTM is able to determine the dry layer resistance of the lyophilized cake. Together with known product and shelf temperature, the vial heat transfer coefficient can be determined. MTM determines the slowest-drying vial; therefore, the simulated endpoints are compared to the comparative pressure onset results (s. Figure 12). The experimental and simulated drying endpoint are in good agreement. The design space model is able to calculate the primary drying endpoint of each vial once the model parameters are determined. MTM is able to determine the dry layer resistance of the lyophilized cake. Together with known product and shelf temperature, the vial heat transfer coefficient can be determined. MTM determines the slowest-drying vial; therefore, the simulated endpoints are compared to the comparative pressure onset results (s. Figure 12). The experimental and simulated drying endpoint are in good agreement. The highest deviation can be detected in the experiment with the high shelf temperature and chamber pressure. In this experiment, the difference between the pressure on the sublimation front and the chamber pressure is smaller and leads to a smaller pressure rise during MTM. Therefore, the deviations in the fitted values are higher and the vial heat transfer is underestimated. MTM-determined values for the vial heat transfer are more precisely determined in experiments with the high shelf temperature and low chamber pressure. Here, the sublimation rate is high, and the high driving force leads to a more significant pressure increase. This results in a more precise determination of the model parameter. The simulated drying endpoint for the setpoint with the high shelf tempera- The highest deviation can be detected in the experiment with the high shelf temperature and chamber pressure. In this experiment, the difference between the pressure on the sublimation front and the chamber pressure is smaller and leads to a smaller pressure rise during MTM. Therefore, the deviations in the fitted values are higher and the vial heat transfer is underestimated. MTM-determined values for the vial heat transfer are more precisely determined in experiments with the high shelf temperature and low chamber pressure. Here, the sublimation rate is high, and the high driving force leads to a more significant pressure increase. This results in a more precise determination of the model parameter. The simulated drying endpoint for the setpoint with the high shelf temperature and low chamber pressure is 18.9 h, while the experimentally determined endpoint is 20.75 h.
Lastly, pareto plots are used to determine the significant process parameter. The fractional factoriell DoE allows for the consideration of interactions. The plots are shown in Figure 13. In the experiment and simulation, the shelf temperature and the interaction between shelf temperature and chamber pressure are significant. An increase in shelf temperature shortens the primary drying endpoint because it provides the necessary heat for sublimation. The heat transfer can additionally be improved by a rise in chamber pressure. The interaction between shelf temperature and chamber pressure is significant and can decrease the drying duration.

Discussion and Conclusions
This paper proposes a distinct method for the endpoint determination by different PAT and a modeling approach. This is the first step towards offline process optimization and can be further developed for online process control. Mannitol has been used as an excipient because it is a widely used bulking agent to create elegant cakes. A design space model has been developed. Necessary model parameters have been determined. Ice sublimation tests have been used to determine the vial heat transfer coefficient and MTM to determine the dry layer height. The vial heat transfer depends on the chamber pressure and the edge vials show a stronger dependence on the shelf temperature. The dry layer height showed no dependence on the process conditions of the primary drying. In the experiments, the chamber pressure shows no significance while in the simulation it is significant. This is due to the fact that the dry layer resistance for the experiment with the low shelf temperature and high chamber pressure could not be determined because of a low pressure increase. These experiments are considered in the experimental pareto chart. Simulation and experiments show similar significant process parameters. The increased shelf temperature provides the necessary energy for sublimation, while the chamber pressure provides the necessary driving force for sublimation.

Discussion and Conclusions
This paper proposes a distinct method for the endpoint determination by different PAT and a modeling approach. This is the first step towards offline process optimization and can be further developed for online process control. Mannitol has been used as an excipient because it is a widely used bulking agent to create elegant cakes. A design space model has been developed. Necessary model parameters have been determined. Ice sublimation tests have been used to determine the vial heat transfer coefficient and MTM to determine the dry layer height. The vial heat transfer depends on the chamber pressure and the edge vials show a stronger dependence on the shelf temperature. The dry layer height showed no dependence on the process conditions of the primary drying.
The endpoint of primary drying is a CPP. The primary drying step has to be optimized in order to gain the highest productivity while maintaining product safety. Different PAT can be used for endpoint determination. In this study, WTMplus sensors, comparative pressure measurement and MTM have been used. WTMplus sensors are able to determine the endpoint for individual vials while MTM and the comparative pressure measurement determine the endpoint of the whole batch. An experimental fractional factorial DoE has been used for experiments.
At first, MTM was compared to the comparative pressure measurement. The MTM endpoint is in good agreement with the comparative pressure measurement endpoint and is therefore capable of reliably determining the endpoint. MTM has been shown to be a useful tool for endpoint and model parameter determination, but it has to be kept in mind that the pressure increase during the measurement could lead to collapse. In our experiments, the optimized MTM algorithm reduces the measurement time and no significant increase in product temperature could be detected.
To validate the endpoint results of the model, simulated results have been compared to experimental WTM. The simulated endpoints are in good agreement with the experiments. The design space model is able to predict the drying endpoint for different vial positions with good precision and accuracy.
Therefore, the modeling approach is able to calculate the primary drying endpoint of the vials depending on the position. It closes the gap between the batch methods that are able to determine the slowest-drying vial and the individual temperature sensors that determine individual drying endpoints but lead to deviations because of their invasive nature. It can be used for process development to optimize the freeze drying cycle in early process development and to further on reduce the experimental workload to determine the design space.
The presented, data-driven approach for endpoint determination has been shown to be successful. A deeper understanding of the interaction of critical process parameters in primary drying was gained. This approach will be tested for amorphous substances and should further on be used for on-and offline endpoint determination and freeze-drying recipe development and optimization.
Author Contributions: A.J. performed experiments, modeling and simulation and wrote this paper. P.K. and F.H. supported with laboratory and piloting equipment as well as expert knowledge regarding operation and objectives. J.S. is responsible for conception and supervision. All authors have read and agreed to the published version of the manuscript.