Measurement of the Intertablet Coating Uniformity of a Pharmaceutical Pan Coating Process With Combined Terahertz and Optical Coherence Tomography In-Line Sensing

We present in-line coating thickness measurements acquired simultaneously using 2 independent sensing modalities: terahertz pulsed imaging (TPI) and optical coherence tomography (OCT). Both techniques are suf ﬁ ciently fast to resolve the coating thickness of individual pharmaceutical tablets in situ during the ﬁ lm coating operation, and both techniques are direct structural imaging techniques that do not require multivariate calibration. The TPI sensor is suitable to measure coatings greater than 50 m m and can penetrate through thick coatings even in the presence of pigments over a wide range of ex-cipients. Due to the long wavelength, terahertz radiation is not affected by scattering from dust within the coater. In contrast, OCT can resolve coating layers as thin as 20 m m and is capable of measuring the intratablet coating uniformity and the intertablet coating thickness distribution within the coating pan. However, the OCT technique is less robust when it comes to the compatibility with excipients, dust, and potentially the maximum coating thickness that can be resolved. Using a custom-built laboratory scale coating unit, the coating thickness measurements were acquired independently by the TPI and OCT sensors throughout a ﬁ lm coating operation. Results of the in-line TPI and OCT measurements were compared against one another and validated with off-line TPI and weight gain measurements. Compared with other process analytical technology sensors, such as near-infrared and Raman spectroscopy, the TPI and OCT sensors can resolve the intertablet thickness distribution based on sampling a signi ﬁ cant fraction of the tablet populations in the process. By combining 2 complementary sensing modalities, it was possible to seamlessly monitor the coating process over the range of ﬁ lm thickness from 20 m m to greater than 250 m m. © 2017 The Authors. Published by Elsevier Inc. on behalf of the American Pharmacists Association ® . This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).


Introduction
The process of coating one or more layers of polymer onto tablets is almost ubiquitous in pharmaceutical manufacturing 1 to achieve dosage forms that exhibit uniformity in color from an aesthetic point of view or to achieve light protection, taste masking, and, more recently, in advanced coatings for active and modified release. Pharmaceutical tablet film coating is typically performed in large batches in perforated pan coaters. The quality of the resulting product is determined by the intricacies of the tablet mixing dynamics and the spray gun configuration during the coating process. Hence, the quality is driven by the complex interplay between tablet properties (e.g., size and shape), process parameters (e.g., pan speed, pan loading, spray rate), and devicespecific parameters (e.g., size, geometry and baffles, spray angle).
In an effort to better understand this process, various in-line techniques have been devised and demonstrated for characterizing pharmaceutical film coating, including optical sensing at near-infrared frequencies 2 and Raman spectroscopy. [3][4][5] Comprehensive reviews on the topic have been presented elsewhere. 6,7 Typically, these optical sensing techniques monitor the spectral attenuation of chemical constituents within the tablet or the coating, and the average coating thickness can be inferred using previously calibrated multivariate models (e.g., partial least squares regression). Although such techniques are suitable, and indeed used in the field, to determine process endpoints, the calibration models are time consuming to construct, require ongoing maintenance support, and provide prediction performances that are specific to the formulation and instrument. Even in cases of the same vendor and model of the sensor and the process equipment, the transferability of the models is not always seamless and often must be reconstructed at significant financial and time expense. Furthermore, the sensor readings typically represent a time-averaged measurement over a large number of sampled dosage forms, and information pertaining to the individual dosage form, such as intertablet coating uniformity, is therefore unavailable. Other techniques such as optical imaging 8 can sample individual tablets and therefore provide information on intertablet coating uniformity. Furthermore, it can provide tremendous throughput with the use of modern visual imaging systems that also reduce the equipment cost barrier. However, optical imaging techniques are currently limited in application to monitoring small spherical dosage forms, such as pellets, largely because of the simplicity involved in determining the coating thickness and the smaller relative error in determining the change in dimension due to coating in small pellets. 8 Tablets with complex shapes may therefore pose a challenge to thickness calculation.
In-line sensing with terahertz radiation was previously demonstrated for film coating using a production scale coater. 9 The study exploited the fact that moving tablets have a tendency to align themselves facing toward the metallic mesh of the coating drum and therefore by focusing the terahertz pulses from outside the drum into the coater where the tablets exhibit a preferred orientation toward the sensor, the time of flight between successive reflections from coating interfaces could be measured directly to determine the coating thickness of individual tablets. The terahertz sensor was externally mounted in such a way that its focus plane was just behind the inner surface of the metal mesh of the rotating coating pan. Tablets passing through this terahertz focus point would lead to good terahertz reflections with a distinct arrival time (peak position) that can be used as one of the criteria for differentiating good measurements (e.g., tablets are at the focus position) from bad ones (e.g., tablets are away from the terahertz focus plane). The effect of tablet orientation on the measured terahertz reflection has also been studied previously where terahertz reflections could be acquired through the steel mesh on top of an aluminium tablet holder that held tablets at slightly different angles relative to the mesh. The acquired inline measurements from the coating experiments were automatically processed using a specifically developed algorithm that selected waveforms representative of reflections from the coated tablets that were at the focus of the terahertz beam and aligned at normal angle to the terahertz optics for thickness calculation. As the coating thickness at a given point on a tablet surface is directly proportional to the time delay Dt between adjacent reflection peaks in the measured terahertz waveform, the coating thickness d is determined as 2d ¼ Dtc/n,w h e r en is the coating refractive index at terahertz frequencies and is readily attainable with terahertz time-domain spectroscopy and c is the speed of light in vacuum. No further assumptions are required for the thickness measurement. The combination of the terahertz probe design and the selection algorithms therefore allows terahertz measurements to be reliably performed on fast-moving tables inside a rotating coater. Compared with the aforementioned measurement techniques, terahertz pulsed imaging (TPI) technology is unique in that it can measure the tablet coating thickness directly with sufficiently fast acquisition rate (up to 120 Hz 9 ), obtained only from a single spot of the moving tablets, so that the intertablet coating uniformity of the tablet population within the coating unit can be directly measured. It was also established that the technique could resolve film coating thicknesses greater than 30-40 mm. 9,10 Exploiting a similar measurement principle and configuration is the more recently demonstrated spectral domain-optical coherence tomography (SD-OCT) where coating thickness of individual dosage forms in the coating thickness range of 15-80 mm could be reliably measured with high spatial resolution, both laterally and axially owing to a comparatively shorter wavelength of the radiation used, 11,12 thus making it an ideal alternative sensing modality for thin coatings. The technique can further operate with a high data acquisition rate (MHz has been shown 11 ), enabling the determination of several thickness measurements per tablet. Such data thus yield both intertablet and intratablet coating uniformity information, and it further allows the evaluation of the tablet orientation and velocity. 11,12 OCT measurement was successfully acquired through a perforated coating drum, 12 which was also tested and evaluated at different tablet orientations and velocities under well-defined conditions previously. 11 Coating thickness can be determined in a similar manner to terahertz measurement while taking into account the coating refractive index at optical frequencies that could be measured with spectroscopic ellipsometry. It should be noted that OCT measures the scattered radiation from the tablets, as opposed to the specular reflection in terahertz measurement, and therefore, the tablet orientation is not been an issue.

Laboratory Scale Tablet Coating Unit
To perform film coating thickness measurements of each of the individual tablets during the coating operations with in-line TPI and OCT sensing, a bespoke laboratory scale coating unit was designed and commissioned. A TPI Imaga 2000 (TeraView Ltd., Cambridge, UK) was used as the TPI measurement platform, and a coating unit was designed to fit inside the commercial TPI unit (Fig. 1). The height of the coater was adapted to the height of the terahertz sensor such that surfaces of tablets on the mesh would lie in perpendicular orientation to the propagation direction of the incident terahertz beam to ensure an accurate thickness measurement. The terahertz sensor location therefore lies perpendicular to the center of the coating pan as opposed to radially from the exhaust location. 9 To allow for the precise positioning of the perforated coating pan relative to the fixed terahertz sensor, the coating unit was mounted on a manually adjustable linear translational stage. The rotational movement was driven by an A-max 32 permanent magnet DC motor (Maxon Motor AG, Sachseln, Switzerland) supplied with 24 V. A PWM servo controller (ESCON Module 50/5) was used to maintain closed loop speed control by comparing and dynamically adjusting the speed measured by a 3-channel 100 kHz encoder HEDL 5540 (Maxon Motor AG), against the speed set point configured on the ESCON Studio via USB 2.0 interface. The coating unit had a computer numerical control machined perforated coating pan of 3-mm wall thickness and an overall diameter of 150 mm, whereas each circular perforation had a diameter of 4.2 mm. The patterning of the perforations resulted in a 45% opening on the external surface of the pan. The 1.2 L coating pan was additionally fitted with 3 drive bars or baffles spaced out at 120 apart to facilitate the mixing of the tablet bed. Each baffleh a sa length of 70 mm corresponding to the longitudinal axis of the coating pan, a thickness of 6.2 mm, and a length of 6 mm toward the center of the coating pan. The baffles were dimensioned to account for the spatial limitations inside the coating pan such that they do not interfere with the spray nozzle. The coating pan was housed inside an air tight cylindrical poly(methyl methacrylate) enclosure with relevant cutouts for inlet and outlet airflow, as well as a window for terahertz propagation. Examples of high terahertz transparency window materials include highdensity polyethylene, 13 quartz, and high-resistance silicon. Visi-Jet M3 Crystal-based manifolds were designed, 3-dimensional (3D) printed at 25-mm resolution, and installed on the enclosure to guide the airflow at the inlet and outlet. In addition, the manifolds were fitted with orifices for temperature, humidity, and pressure sensor insertions. In a manner similar to previous in-line measurements, 9,12 the OCT sensor was positioned outside the coating pan at the exhaust of the coater and orientated such that tablet surfaces were perpendicular to the incident beam. The OCT sensor was covered by a micron-thick polyethylene-based plastic cling film to protect it from direct exposure to dust. To validate the integration of in-line TPI and OCT sensing, in-line measurement was initially performed on a batch of previously coated biconvex tablets in the absence of spray. The film coating thickness of 3 randomly selected tablets was measured with offline TPI and OCT for comparison against in-line measurements. 14 The assembled coating unit was bolted to the TPI base plate. It weighed approximately 10 kg and demonstrated good resistance to external vibrations or movement that could distort terahertz measurements.

Tablet Coating Process
Film coating was performed using a Schlick Nano ABC spray nozzle (Düsen-Schlick GmbH, Coburg, Germany) at a spray rate of 1.4 g/min operating at an atomizing air pressure of 1 bar. The coating dispersion was pumped by a Watson Marlow 120S peristatic pump (Spirax-Sarco Engineering, Cheltenham, UK) at 2 rpm. The coating drum rotated at 15 rpm (0.11 ms À1 ). The inlet air flow was supplied by the laboratory compressed air and regulated by a Mass Stream mass flow controller (Bronkhorst High-Tech B.V., Ruurlo, The Netherlands) that interfaced directly to the PC via RS-232. The inlet airflow was set at 20 m 3 /h and kept constant throughout the coating process. The inlet temperature was heated by passing the laboratory compressed air through a 800 W heating element where the electric current to the heating element was regulated by a piccolo P160 PID controller (Eurotherm, Worthing, UK). The inlet temperature was set at 55 Ct oe n s u r e that outlet and exhaust temperature was maintained at 38-43 C. A sustained release coating formulation consisting of Kollicoat SR30D and Kollicoat IR (BASF, Ludwigshafen, Germany), detailed in Table 1, was applied to each batch of tablets. The batch size of uncoated tablet cores was 300 g. The tablet cores (Ludipress LCE; BASF, Ludwigshafen, Germany) were of biconvex geometry of 8mm diameter and embossed (m ¼ 360 mg). The coating formulation was chosen such that it could be measured with both OCT and TPI simultaneously. Due to scattering at nonionizing radiation frequencies, this is not always the case. 12

In-Line TPI Sensing
To ensure that the generated terahertz pulses were focused onto the surface of tablets inside the coating pan, the sensor was kept at a fixed distance that matched to the 7-mm focal length of the terahertz sensor optics from the inner wall of the coating pan. Taking into account the distance of travel on the mesh and the tablet tangential speed, reflected time-domain waveforms were recorded at a rate of 30 Hz (acquisition time of a single waveform 33.3 ms) with no signal averaging to ensure that the likelihood of multiple measurements on a single tablet is minimized. The measurements were saved and processed off line (Matlab R2015b; The MathWorks Inc., Natick, MA) using the previously presented analysis algorithm. 9,10 As the strength of the reflections from the coating core interfaces was weaker than the reflections obtained from previously published coating trials, due to a more porous coating as a result of a suboptimally controlled process, additional selection criteria were included into the analysis algorithm to take advantage of ancillary waveform features present in the coating formulation used in this study. Furthermore, a sliding window with fixed window size was used to define the thickness search range as a function of coating time so as to more accurately discriminate the reflections from the coated tablets. Like previously, the settings for the selection criteria were determined based on the off-line analysis of the coated tablets.

Spectral Domain-Optical Coherence Tomography
An in-house fiber-based SD-OCT sensor was developed for inline measurement. As shown in Figure 2, a superluminescent diode (EXALOS AG, Schlieren, Switzerland), centered at a wavelength of 840 nm and with a full width at half maximum bandwidth of 55 nm, was used as the light source. The light beam was firstly coupled into the input port of a 2 Â 2 wideband single-mode fiber coupler (TW850R5F2; Thorlabs Inc., Newton, NJ). The fiber coupler splits the light (50:50) into a reference and a probe port. The light of the reference port was collimated by an adjustable collimator (CFC-2X-B; Thorlabs Inc.), and the light reflected from a reference mirror was coupled back to the reference port by the same collimator (C1). The light of the probe port was focused onto the sample by using another identical collimator (C2). The backscattered light from the sample was collected and coupled back into the probe port by the same collimator. The light from the output port of the fiber coupler, which contains the interference patterns of the reflected and backscattered light form the reference and sample, is delivered to a high-resolution spectrometer (Wasatch Photonics Inc., Logan, UT) with a 2048 line charge-coupled device array.
This fiber-based OCT configuration is highly suitable for in-line monitoring applications because the fiber sample port can be easily integrated into the coater unit through an orifice at the outlet manifold of the coating unit. A photograph of the entire experimental setup is shown in Figure 3. It should be noted that because of the physical space constraint, the OCT sensor described here is only a collimator as opposed to a more integrated design described previously. 12 The focus position of the sample beam was set to the inner surface of the coating pan by using the adjustable aspheric fiber collimator. This gave rise to an approximate distance of 7 mm (numerical aperture of 0.27) between the collimator and the focal point, providing a depth of field of 734 mm. The achieved axial and lateral resolution is approximately 7.5 and 20 mm, respectively. In all OCT measurements, the exposure time and idle time of the spectrometer were set to 65 and 5 ms respectively, providing a data acquisition rate of 14,285 Hz. The onboard memory allows 1000 successive spectral interferograms to be captured and stored at a time before they are transferred to a computer for processing. The signal processing includes (1) subtraction of the reference spectrum that is estimated by averaging all the 1000 acquired spectra, (2) interpolation to convert the spectral interferograms from wavelength domain to wavenumber domain, and (3) fast Fourier transform to convert frequency-domain spectra to time-domain depth profiles. Finally a B-scan, for example, a cross-sectional image consisting of 1000 successive A-scans, is obtained.
As the OCT sensor developed in this work is much more compact, thus vastly different to the previous design, 12 a different data processing solution specific to our OCT system is proposed. To automatically extract the coating thickness from the measured OCT B-scan, further signal and image processing algorithms were used, as shown in Figure 4. In general, A-scans were processed for denoizing purposes, whereas B-scans were used for tablet identification and thickness quantification. Wavelet denoizing was used as the first step to remove the background speckle noise followed by determining the mean intensity profiles. The rationale for this step was because the distance covered in a single B-scan was 7.7 mm and that corresponded to approximately twice the perforation diameter. The B-scan therefore included more than 1 tablet hit, as well as additional features from the metallic mesh and baffle. Although reflections from metallic mesh and baffles generally have magnitudes greater than those of the tablets, the number of peaks and scatterings from tablets on an A-scan was understandably greater due to a mix of particle and air inclusions in the coating. Consequently, the average intensity of an A-scan of a tablet is greater than that of either the metallic mesh or baffles. By exploiting this fact, A-scans with tablets can be easily identified by thresholding the mean intensity profile that is generated by averaging the intensities of all A-scan pixels. The thresholding value is set in this instance to be greater than the maximum intensities from the mesh and baffle and generally does not change for the same process settings. To qualify as a tablet hit, the number of Figure 3. Photos of the experimental setup showing (a) the sensing setup comprising an external OCT system for driving the OCT sensor head integrated into the custom built coating unit inside the TPI for performing combined in-line TPI and OCT sensing of a coating process, that is, managed at (b) the control desk where the pneumatics, motor speed, heating temperature, and mass transfer are monitored. successive A-scans with intensities greater than the mean intensity profile must be greater than 80 on a single B-scan. This value was determined on the basis of the segmentation algorithm used for accurate thickness measurement.
Like in previous work, 12 a graph-based segmentation algorithm was also used to detect the position of the interfaces for automatic thickness calculation. 15 Specifically, the image is represented in the algorithm as a graph, where each pixel of the image is regarded as a node that is connected to neighboring pixels by weighted edges. The algorithm then attempts to find the path from the source (on the left side of the image) to the sink (right side of the image), which is regarded as the shortest or the path of least energy cost. To accomplish this, an energy function is defined as the linear combination of the gradient information in the lateral and depth directions of the image, with the associated coefficients determined by the emerging curvature. This energy is then used to determine the edge weighting cost or cost from moving from one node to the next. Consequently, the precise path can be determined locally leading to efficient detection of the path for fast segmentation of the edges. The coating thickness is then calculated by the distance between the detected interfaces at each transversal pixel scaled by refractive index. It is recognized that further improvements can be made to the processing algorithm. In particular, thickness calculations should take account of interface curvatures for precise measurement. This was not performed in this study due to the embossings on the tablet cores used. Furthermore, the algorithm can be further extended to check if more tablet hits on a same Bscan did actually come from a single tablet.

Off-Line Measurement
Owing to the spatial constraint inside the TPI and the likelihood of causing misalignment to the in-line TPI measurements during the coating operation, tablets were not removed throughout the process as was performed in previous studies for validation purposes. 9,12 In contrast, only the film coating thickness and the average weight gain of coated tablets obtained at the process endpoint were measured. Specifically, average weight gain for 18 tablets was measured, and offline thickness determined using the off-line TPI where the top, bottom, and center bands were imaged at a 200-mm lateral resolution. To determine the coating material refractive index at terahertz and optical frequencies, the film coating thickness for a scratched side of a randomly selected coated tablet was measured independently with off-line TPI, OCT, 16 and X-ray computed microtomography (XmCT), 17 where the ratio of the thickness represents the ratio between the refractive indices. The terahertz refractive index was also independently determined based on the primary reflection intensity from all the off-line TPI measurements of the coated tablets. 18 The XmCT measurement was performed on a Skyscan 1172 (control software: Skyscan1172 XuCT Control Program v1.5; Bruker, Kontich, Belgium). Reconstruction was performed using the program NRecon (Bruker; v1.6.9.8) on a single PC using graphics processing uniteaccelerated reconstruction (Windows 7 64-bit workstation, 2 Intel Xeon X5647 with 4 cores each, 48 GB RAM, NVIDIA Quadro 4000 with 256 cores) yielding 3D data with an isotropic voxel size of 2.97 mm. The data acquisition time was 1.5 hours, and the image reconstruction took 0.5-hour size for 356 slices of 1148 Â 1148 pixels. The data were downsampled to a voxel size of 9.9 Â 9.9 Â 9.9 mm 3 in the interest of data processing and visualization. The 3D data (XmCT, OCT, and TPI) was visualized using Avizo Fire (v8.1.1.; FEI Company, Hillsboro, OR).

Results and Discussions
To compare the absolute coating thickness, the coating material refractive index is determined to be 1.42 and 1.61 for terahertz and optical frequencies, respectively. The coated tablet has an average coating thickness of 280 mm as measured with XmCT (Fig. 5).
Interestingly, by examining the primary reflection intensity from all the off-line TPI measurements of the faces of the coated tablets removing contributions from embossings and tablet edges, a refractive index value of 1.46 was revealed in close agreement with the XmCT measurements. The maps indicated that the polymer layer is generally uniformly distributed over the surface of the individual tablet faces. By comparing this value with the refractive index of the same coating material coated inside a commercial coater, it showed a reduction by 16%, thus implying the possibility of forming a rather porous coating leading to a reduced effective refractive index (i.e., density) as a result of a suboptimally controlled process. 19 It is also interesting to note that this particular coating formulation at such high coating thicknesses compared with the ones previously studied 16 was still fairly transparent at optical frequencies for OCT to successfully resolve the interfaces in an off-line thickness measurement.
The absolute coating thickness was independently obtained by processing the acquired in-line TPI and OCT measurements automatically by the respective algorithms and taking into account the refractive index at terahertz and optical frequencies. Figure 6 shows the average coating thickness over 30 seconds as a function of process time. As expected, there is a steady increase in coating thickness observed with both the sensing modalities. OCT measurements, owing to a shorter wavelength used and a lower coherence length, is able to resolve thin coatings, and this starts as early as 6 minutes into the process with the detection of 20-mm thick coatings. In contrast, in-line TPI operating with picosecond pulses is sensitive for coatings greater than 50 mm. This is slightly greater than the previously reported resolution of 30-40 mm 9 because of the additional stringent selection criteria used for waveform extraction. This step was necessary so as to filter out the weaker reflection that is buried in noise. Despite this, the in-line TPI measurements, although obtained only from a single measurement of a moving tablet in the coating pans, show a good overlap after 50 minutes of coating and a general good agreement with film thickness growth rate when compared against the OCT measurements. It should also be noted that in OCT measurements, owing to the 2 orders of magnitude higher data acquisition rate,  multiple measurements were taken at a moving tablet and the median of that is used to represent the tablet hit. Alternatively, the average value could be used provided the edge effects are accounted for.
To further compare the measurements, the thickness distributions obtained from the respective sensors are shown in Figure 7 at 20-minute time interval. As expected, process measurements start with OCT where the distribution takes the shape of a log-normal  distribution in the first 40 minutes in a similar manner to the production scale process with in-line TPI sensing. 10 The coating thickness detected with TPI is however below the minimum resolution, thus incomparable with OCT measurement. The distribution then converges closer to a Gaussian distribution in the next 60 minutes from which the number of hits has deteriorated to provide any insightful interpretation. This is evident in Figure 7 where the tablet hits measured with OCT decreases monotonically with process time. In contrast, in-line TPI measurements start after the first 40 minutes of the process with the detection of coatings greater than 50 mm and generally overlap well with the OCT measurements. The number of hits, however, does not increase until after 60 minutes largely because of the stringent waveform amplitude settings used in the selection criteria. The thickness distribution at this time interval nevertheless centers about 85 mm coinciding well with the OCT distribution. In the 80-100 minutes time interval, the shape of the distributions resembles closely despite the thickness distribution of the coating process no longer after a clear Gaussian-like distribution as observed in a commercial coater. 10 This could be in part due to the process being suboptimally controlled, the use of tubular mixing baffles that did not promote axial mixing, or the settings for the selection criteria used. This matter could be independently verified when more tablet hits could be obtained with OCT measurements. Interestingly, however, is the similarity of the distributions during the time intervals of significant thickness overlap that is 60-100 minutes that implies the possibility of a tablet being measured first by OCT then by terahertz. However, considering that the measurements were not synchronized, such hypothesis is unlikely despite of the relative axial positions of the sensors on the coating unit. Opportunities however loom on the prospect of using such sensing arrangement positioned precisely to study mixing dynamics without spray coating or identify the optimal sensing locations when coupled with simulations. After this period, the terahertz thickness distribution still loosely resembles a Gaussian distribution, where some overlaps with the limited OCT measurements are still present and thereby reinforcing the terahertz measurement. The in-line TPI measurements in the final time interval can be validated against the off-line TPI measurements where the in-line measurements lie within the error bars of the off-line TPI measurements of the coated tablets. Specifically, the measurement of 134 tablets by in-line TPI in this period has a coefficient of variation or relative standard deviation (RSD) of 11% comparable to an RSD of 9% from the off-line TPI measurements with 18 tablets. It is interesting to note that this value of RSD is approximately twice than what could be achieved with a commercial coating process of a similar scale operating at half the process time, 12 thereby showing that the existing process has not been optimally controlled.
Further exploiting the comparative higher data acquisition rate in OCT, the acquired B-scans for the tablet hits shown in Figure 8 allow for a visual assessment to determine if the measurements did actually represent physical tablets. As an example, the RSD of OCT measurements in Figure 9 appears to increase with process time exceeding to 20% at 120 minutes. By inspecting the B-scans after 100 minutes, there were indeed B-scans of coated tablets with thicknesses in the order of 80-120 mm at coating times of 125, 130, and 149 minutes. Such low thicknesses were however not detected with terahertz because of the sliding window used in the algorithm designed to capture the weak reflections. Noticeably, the number of tablet hits from OCT measurements reduces after 120 minutes of coating. This is because of a deterioration in signal-to-noise ratio of the acquired B-scans after 120 minutes of coating leading to an increased probability of interface misdetection with the applied segmentation algorithm. The signal-to-noise ratio reduction can be attributed to the increased amount of dust accumulated on the OCT sensor head as opposed to the increased scattering encountered with thicker coating. 16 The dust issue culminates with no tablet detections in OCT measurement after 180 minutes of coating. To remedy the dust issue, we are now exploring the use of a lowpressure compressed air purge alongside the OCT sensor head for in-process sensor clean. The dust issue coupled with increasing coating thickness leads to a reduced contrast from the coating core interface and eventually lowers the number of successfully measured tablets. Consequently, the effects of outliers are greater on the 30-second average values toward the end of the coating process than at the beginning, where at least 200 more tablets were measured. Furthermore, the increasing deviation of the coating thickness measured by OCT from the average coating thickness can be explained by the systematic error introduced by the curvature of the tablet. This error grows with increasing coating thickness and can be as high as 15 mm for a 150-mm thick coating layer. 20 Future work will seek to correct this error by considering the angle of incidence of the optical beam and applying Snell's law. 21 Additional acquired B-scans can be found in the supporting information.
The reliability of the OCT measurements can be further assessed by inspecting the RSD-hits plot (Fig. 9). It should be noted that values of the RSD should only be interpreted alongside the tablet hits recorded as too little hits, or effectively sampling only a very small fraction of tablet population is likely to lead to a meaningless result. As can be seen, after the 80-100 minute interval, OCT measurements become unreliable because the measured RSD has increased as opposed to an expected decrease 22 that is observed with the terahertz measurement. During the same periods, the number of tablets measured with OCT decrease monotonically for reasons described previously, whereas the hits remain relatively constant for terahertz. It is worthwhile to note that no OCT measurements were recorded during 180-200 minute interval, hence, no RSD value. Considering the total number of hits of OCT (1128) and terahertz (1284) for a tablet population of approximately 840 tablets, it is likely that some tablets were measured more than once during this process.

Conclusion
In this investigation, we have custom built a laboratory scale coating unit within the spatial confines of the TPI to facilitate the measurement of the film thickness of each of the individual tablets during the coating process by combined in-line TPI and OCT sensing. By combining 2 similar yet complementary in-line sensing modalities, it allows for a validation of coating thickness measurements without regular tablet withdrawals for off-line characterization. Furthermore, coating thicknesses starting as low as 20 mm and up to 300 mm and above could be measured potentially also with different coating formulations. The availability of film coating thickness measurements from individual tablets as opposed to the average coating thickness of a large number of tablets can provide substantially more information about the intertablet coating uniformity. The film coating process, however, has not been optimally controlled, and therefore, the finished coatings as evaluated by XmCT and off-line TPI show a reduced effective refractive index compared with what would be expected with a commercial process. In turn, the reduced refractive index implies a reduced coating density or an increased porosity in the coating. Furthermore, the measured coating thickness distribution does not yet follow an optimally controlled process. 10,22 To better understand the present coating process and explain the observed coating distributions measured at different locations of the coating unit, numerical simulation with discrete element method is currently underway. This work nevertheless has resulted in the development of a unique platform exploiting a multiple-sensing arrangement to generate time-resolved and spatially resolved in-process measurements for studying the pharmaceutical film coating process comprehensively for consolidation with numerical modeling.