Sie sind auf Seite 1von 6

High Speed Precision Weighing of Pharmaceutical

Capsules

Miran Brmen1, Franjo Pernu1,2, and Botjan Likar1,2


University of Ljubljana, Faculty of Electrical Engineering, Laboratory of Imaging Technologies, Traka 25, 1000 Ljubljana,
Slovenia
2
Sensum, Computer Vision Systems, Teslova 30, 1000 Ljubljana, Slovenia
miran.burmen@fe.uni-lj.si, franjo.pernus@fe.uni-lj.si, and bostjan.likar@fe.uni-lj.si

Abstract-In this paper we present a method for fast and accurate


in-line weighing of hard gelatin capsules based on real-time
processing of the capsule capacitance profile resulting from 5000
capacitance measurements per second. First, the effect of the
shape and size of the capacitive sensor on the sensitivity and
stability of the measurements was investigated in order to
optimize the performance of the system. The method was tested
on hard gelatin capsules with the capsule weight in the range
from 50 mg to 650 mg. The results showed that the capacitance
profile was exceptionally well correlated with the capsule weight
with correlation coefficient exceeding 0.999. The mean precision
of the measurements was in the range from 1 mg to 3 mg,
depending on the size of the capsule and was significantly lower
than the 5% weight tolerances usually used by the
pharmaceutical industry. Therefore, the method was found
feasible for weighing pharmaceutical hard gelatin capsules.
Moreover, the proposed measurement system can be calibrated
by using only two or three sets of capsules with known weight
depending on the size of capsules and measurement range.
However, for most applications it is sufficient to use only empty
and nominally filled capsules for the calibration. Finally, a
practical application of the proposed method shows, that precise
and accurate weighing of up to 100,000 capsules per hour is
possible using just a single measurement system.

I.

INTRODUCTION

The Food and Drug Administrations process analytical


technologies initiative [1] has since 2002 started to promote
the integration throughout the manufacturing process of tools
and techniques that ensure final product quality. The prime
example of such integration is near-infrared spectroscopy [2,
3], which was successfully applied for real time
measurements of various chemical and mechanical properties
of pharmaceutical compounds such as identification of raw
materials, content uniformity, concentration of the active
substance or excipients, film thickness, tablet hardness, and
particle size. However, not all the mechanical properties can
be measured by the abovementioned technique.
Filling capsules at rates well above 50,000 per hour is a
highly complex task performed by capsule filling machines
[4]. Unfortunately, a small percentage of the capsules is not
filled with the specified amount of blend, stays empty or is
damaged during the process. It is essential that these capsules
are identified and removed from the batch and the filling
process adjusted so as to maintain the correct amount of fill in
each capsule. The weight of an intact capsule usually needs to

be within 5% of the specified [5-7], however, the tolerances


can vary slightly depending on the type of pharmaceutical
compound used to fill the capsules. The established procedure
for monitoring the weight of the capsules is to continuously
take samples from the batch and make a laboratory analysis.
Such approach is highly labor intensive, time consuming, and
therefore can not provide the required real-time feedback
necessary for controlling the actual filling process. Another,
better solution is to apply advanced capsule filling machines
with integrated sampling and weighing. However, even in this
case, not all the capsules are being weighed, which usually
results in a small but significant portion of the capsules to be
out of the specified tolerances. In the worst case this could
lead to the rejection of the entire batch, resulting in
significant loss of revenue.
In this paper we present a novel measurement system for
high speed precision weighing of pharmaceutical capsules.
The weight of the capsules used in this study was in the range
from 50 mg to 600 mg mainly depending on the amount of
fill and size of the capsule. At the 5% tolerances usually used
by the pharmaceutical industry, the weighing accuracy of the
the smallest nominally filled capsule must be significantly
better than 14 mg. In order to use such measurement system
in-line, it must be able to handle several thousands of
capsules per hour. Achieving such high speed accurate
measurements by means of mechanical weighing devices is
very difficult, expensive to maintain and therefore
impractical. Instead, we propose an alternative indirect
measurement of the weight by means of measuring the
capacitance profile of the capsule. We are going to show that
the capacitance profile is well correlated with the capsule
weight and that accurate and precise measurements are
possible. Moreover, the initial results show that the method
has the potential of providing additional information on errors
occurring during the filling process, such as damaged or
improperly closed capsule.
II. METHODOLOGY
The main component of the proposed measurement system
is the capacitive sensor consisting of two electrodes and
electronics which are responsible for providing precise
measurements of the capsule capacitance profile while
passing through the sensor. The most prominent factors that
need to be addressed when developing such a measurement
system are the sensitivity of the sensor, dependence of the

sensor output on the small positioning error of the capsule,


and the real-time processing of the measured capacitance
profile all of which significantly contribute to the precision
and accuracy of the weight measurements.
The capacitive sensor should be highly sensitive with very
little or no dependence of the sensor response on the small
displacement of the capsule or the capsule fill from the
central position of the sensor. However, the two requirements
are mutually exclusive. Higher sensitivity requires stronger
electric field and smaller sensor with the capsule filling out as
much of the sensor volume as possible, whereas the low
dependence of the sensor response on the capsule
displacement requires homogeneous electric field which can
be achieved only by increasing the size of the sensor and
thereby decreasing the sensitivity. The influence of the shape
and size of the electrodes on the sensor sensitivity and
dependence of the sensor response on the capsule position
and amount of capsule fill was evaluated for three types of
electrodes, namely symmetric flat (Type I), round (Type II),
and an asymmetric combination of a flat and round (Type III)
electrode as shown in Fig. 1. Each set of the electrodes was
characterized in terms of the abovementioned parameters by
varying the size of the electrodes and measuring the
sensitivity and sensor response to the small displacement of
the capsule. Performing such measurements on a real set of
electrodes is time consuming and quickly becomes
unfeasible.

Fig. 1. Three types of the electrodes, namely Type I, II, and III, which were
used to study the affects of the shape and size of the electrodes on the
sensitivity of the capacitive sensor, and stability of the response to the small
displacement of the capsule. The first column and second column show the
front and side view of the three electrode types, respectively. When moving
through the sensor, the axis of the capsule is aligned with the x axis of the
corresponding set of electrodes.

Therefore, a different approach was used. First, a surface


charge simulation based on a boundary element method [8]

was employed to characterize a set of electrodes. The


simulation results were then compared to the actual
measurements performed on the corresponding set of real
electrodes, thereby verifying the accuracy of the simulation.
Finally, the remaining types of electrodes were characterized
only by simulation.
The capacitance of the sensor C consisting of the two
electrodes was determined by measuring the time tp required
to charge and discharges the capacitive sensor between 20%
and 80% of the full charge. Assuming an exponential function
for both charging and discharging of the capacitor, the
capacitance of the sensor can be expressed as:
k
(1)
C= C ,
tp
where the constant kC depends on the parameters of the circuit
used to measure the capacitance. A high spatial resolution of
the moving capsule position with respect to the electrodes
was obtained by measuring the capacitance of the sensor
5000 times per second. The average capacitance of the
electrodes including the input capacitance of the connected
electronic components without the capsule was estimated to
be in the order of a few picofarads, and was expected to
increase by around 50 fF with the smallest empty capsule
passing through the sensor. Therefore, the required precision
of the capacitance measurements was set to at least 0.5 fF.
The obtained capacitance profiles C(x) (Fig. 2) of the
capsules passing through the sensor as a function of the
capsule displacement x from the center of the sensor were
processed in real-time using an embedded microcontroller
system.
It was assumed that as long as the sensor is longer than the
capsule the weight m of the capsule is proportional to the
maximum rm in the change of the relative permittivity r(x)
which is a function of the capsule displacement x:
C ( x ) C0
(2)
r ( x) =
C0
(3)
r m = max( r ( x)) = r ( x = 0)
The capacitance C0 (Fig. 2) corresponds to the capacitance of
the sensor without the capsule interfering with the electric
field of the sensor.

Fig. 2. An illustration of the capacitance profile corresponding to an empty


and full capsule passing between the electrodes.

To compensate the potential nonlinearity of the sensor a


polynomial function of the maximum change in the
permittivity rm was used to estimate the capsule weight me:

i
me = i =0 K i rm

(4) between the electrodes were all affecting the sensitivity S,


while the change of the sensor response to the small
The N coefficients K{1N} of the polynomial function were
displacement of the capsule was predominantly affected by
determined during the calibration of the measurement system
the distance between the electrodes D, assuming that both the
which was performed using several capsules of known weight
height H and width W of the electrodes were larger than the
mi with different amount of fill ranging from empty to above
corresponding dimension of the capsule (Fig. 3).
nominal. By measuring the maximal change in the
The performance of the measurement system was evaluated
permittivity rm,i for each of the capsules in the calibration
by using two sets of capsules (Table II) of significantly
set and then fitting (5) to the obtained data points (rm,i, mi)
different sizes as shown in Fig. 4. Each set consisted of
in the least-squares sense an estimate for the transfer function
several capsules with different amount of fill ranging from
of the measurement system was obtained.
empty to full. The weight of the capsules in the Set I was in
N
(5) the range from 90 mg to 600 mg consisting of 21 subsets of
K{1... N } = arg min (i(mi j =1 a j rmj ,i ) 2 )
a
five capsules. Likewise, the Set II consisted of 10 subsets of
five capsules weighing from 45 mg to 285 mg. The average
III. EXPERIMENTS
weight difference between two consecutive subsets was
The design of the electrodes was limited to the capsules of
around 25 mg and was the same for both the test sets. The
maximal length of 21 mm and maximal diameter of 7.5 mm
true weight of the capsules in the two sets was determined
which were the largest capsules used with the sensor. These
with accuracy of 0.1 by using a precision laboratory
capsules were also employed for the characterization of the
balance. Each of the two test sets of capsules was divided into
three types of electrodes shown in Fig. 1. It was assumed that
the calibration and validation sets, by splitting each subset of
the positioning error of the capsule within the sensor was
five capsules into two sets of three and two capsules (Table
below 0.2 mm, which was the value of capsule displacement
II). The calibration set was used to estimate the transfer
used to evaluate the relative change of the sensor sensitivity
function and nonlinearity, while the validation set was used to
as a function of capsule displacement in the directions x, y,
asses the accuracy and precision of the measurement system.
and z as illustrated in Fig. 1. The sensor sensitivity S was
However, both the calibration and validation sets were used
defined as the maximal change in the permittivity rm,F
to asses the stability.
induced by a nominally filled capsule passing through the
sensor.
(6)
S = rm, F
The effect of the shape and size of the electrodes on the
sensitivity of the sensor and relative change of the sensitivity
as a function of the capsule displacement (Fig. 3) were
measured for the flat (Type I) and round (Type II) electrodes
(Fig. 1) and simulated for all the three types of electrodes.
The values in Table I show that the results of the simulation
well agree with the corresponding measurements on the real
set of electrodes. Therefore, the remaining set of the
electrodes was characterized only by simulation.
N

{1... N }

TABLE I
THE NORMALIZED SENSITIVITY SN OF THE SENSOR FOR THE THREE TYPES OF
ELECTRODES WITH CORRESPONDING RELATIVE CHANGE IN THE SENSITIVITY
AS A FUNCTION OF 0.2 MM CAPSULE DISPLACEMENT IN THE DIRECTIONS OF
X, Y, AND Z AXIS (FIG. 1). THE MEASUREMENTS PERFORMED ON A REAL SET
OF ELECTRODES ARE GIVEN IN BOLD. THE DIMENSIONS OF THE ELECTRODES
FOR TYPE I WERE W=25 MM, H=15 MM, D=10 MM, AND D=1 MM, FOR TYPE
II W=25 MM, D=1 MM, D1=2 MM, AND R=5 MM, AND FOR TYPE III W=25 MM,
D=1 MM, D1=4 MM, AND R=5 MM.
SN
Direction x (%)
Direction y (%)
Direction z (%)

Type I
0.74 (0.7)
0.02 (0.0)
0.15 (0.2)
0.02 (0.0)

Type II
1.00 (1.0)
0.01 (0.0)
0.92 (1.0)
0.31 (0.3)

Type III
0.80
0.01
0.17
5.37

Because of the good performance and simple design of the


Type I electrodes the additional studies on the accuracy,
precision, nonlinearity and stability of the measurement
system was performed only for this type of electrodes. The
results showed, that width W, height H, and distance D

Fig. 3. The effect of the distance between the flat electrodes (Type I) D on
the sensor response at 0.2 mm displacement of the capsule in the directions
of x, y and z axis.

The stability of the measurement system was tested by


estimating the weight of all the capsules in the test sets for
two different ambient temperatures at a fixed relative
humidity (RH) (19OC and 25OC, 55% RH) and for two
different RHs at a fixed ambient temperature (45% and 60%
RH, 23 OC). The stability of the measurement system was
estimated by calculating the root-mean-square difference
(RMSD) between the true and estimated capsule weights me
by using the polynomial coefficients K0,{1N} approximating
the transfer function at the nominal operating conditions of
19OC and 55% RH.

RMSD =

1
M

(mi j =0 K 0, j rm,i )
=1

NL = max | K1, 0 + K1,1 rm i =0 K B ,i rm |


N

(7)

TABLE II
THE TWO SETS OF CAPSULES USED FOR THE CHARACTERIZATION OF THE
MEASUREMENT SYSTEM. THE TRUE WEIGHT OF EACH CAPSULE WAS
DETERMINED WITH ACCURACY OF 0.1 MG.
Capsule Diameter/length Weight range Number of Calibration Validation
set
(mm)
(mg)
samples
set
set
Set I
5.3 / 14.3
45 - 285
5 x 10
3 x 10
2 x 10
Set II
21.7 / 7.6
90 - 600
5 x 21
3 x 21
2 x 21

Fig. 4. Two typical capsules from the Set I and Set II.

The accuracy A of the measurement system at a give


ambient temperature and humidity was calculated as the
average error of the estimated capsule weight me within the
validation set.

rm 1 rm rm 2

(11)

IV. RESULTS
This section summarizes the results obtained by measuring
the response of the measurement system using the flat
electrodes (Type I) to the two test sets of capsules (Table II).
The distance between the electrodes D was set to 10 mm in
order to maintain sufficient space between the capsule and the
electrodes and to minimize the effect of the capsule
positioning error on the weight measurements (Fig 3.). In
order to maximize the sensitivity of the sensor the width W
and height H were set to 25 mm and 15 mm, respectively.
The results showed that fitting a second order polynomial
was sufficient to compensate the small nonlinearity of the
measurement system. The accuracy A (RMSE), precision P,
correlation coefficient k, stability RMSD, and nonlinearity NL
of the measurement system as a function of the ambient
temperature, humidity and capsule size are shown in Table
III.
The response of the sensor rm to the typical empty and
full capsules from Set I and Set II as a function of capsule
displacement in the direction x corresponding to the normal
movement of the capsule through the sensor is shown in Fig.
5.

( mi m e )
A = i =1
M

(8)
M
Additionally the root-mean-square error of the estimated
weight me was calculated for each of the two validation sets.
RMSE =

M
i =1

(mi me )

(9)
M 1
The precision P of the measurement system was estimated
by repeating the measurements of each capsule in the
validation set for several times and then calculating the mean
standard deviation (STD) of the estimated weight me over all
the capsules in the validation set.

STD(me,i )
P = i=1
M

(10)

M
The nonlinearity NL of the measurement system was
characterized by the maximum of the absolute difference
between the line of best fit K1 and the best-fit polynomial KB
yielding the lowest RMSE and at the same time not overfitting
the data. The value of the sensor response rm was limited by
its minimum rm1 and maximum rm2 observed within the
calibration set corresponding to the empty and full capsule,
respectively.

Fig. 5. The normalized response of the sensor to the typical empty and full
capsules from the Set I and Set II as a function of the capsule position x
while passing between the electrodes.

The transfer function with the corresponding correlation


between the measured and estimated capsule weights for the
two test sets is shown in Fig. 6. The two transfer functions
were estimated by the corresponding calibration set, while the
correlation coefficients between the true and estimated
capsule weights were calculated for the corresponding
validation set.

Fig. 6. (a,c) The normalized sensor response to each of the capsules in the corresponding test set and the transfer functions of the measurement system estimated
by a second order polynomial for the test Sets I and II, respectively. (b,d) The correlation coefficient between the estimated and the true capsule weight for the test
Sets I and II, respectively. All the four plots are based on measurement at nominal ambient temperature of 19 OC and RH of 55%.
TABLE III
THE ACCURACY, PRECISION, CORRELATION COEFFICIENT, STABILITY, AND
NONLINEARITY OF THE MEASUREMENT SYSTEM AS A FUNCTION OF THE
AMBIENT TEMPERATURE, HUMIDITY, AND CAPSULE SIZE.
The test sets and the ambient temperature and humidity
55% RH
23 OC
19 OC,
25OC
45% RH
60% RH
Set I Set II Set I Set II Set I Set II Set I Set II
A (mg)
0.1 -0.2 0.0
0.1
0.1
0.1 -0.1 0.2
RMSE (mg) 1.3
2.8
1.2
3.0
1.4
3.1
1.3
3.0
P (mg)
1.5
3.1
1.6
3.1
1.5
3.2
1.6
3.2
k
0.999 0.999 0.999 0.999 0.999 0.999 0.999 0.999
RMSD (mg) 1.1
1.3
0.8
0.6
1.2
1.4
NL (mg)
5.2 10.1 5.1 10.3 4.9 10.5 5.1
9.9

V. DISCUSSION
During the design of the measurement system several
factors affecting the sensitivity and precision of the
measurements were taken into the account among these the
shape and size of the electrodes, ambient temperature, relative
humidity, and complexity of the calibration procedure. A

detailed analysis of each factor was performed in order to


optimize the performance of the measurement system.
The impact of the shape and size of the electrodes on the
sensitivity of the system and stability of the sensor response
with respect to a small displacement of the capsule was found
to be significant (Table I). As expected, the sensitivity of the
Type II (round) and Type III (combination of a flat and
round) electrodes was higher than the sensitivity of the Type I
(flat) electrodes. This was attributed to the fact, that for Type
II and III electrodes the capsule was filling out more of the
space between the electrodes than for the Type I, thereby
inducing a more significant change in the sensor response
rm. However, the relative change of the sensor response to a
small displacement of the capsule from the central position
was found to be significantly higher for the Type II and Type
III of electrodes, whereas it was close to zero for the Type I.
This clearly demonstrates that optimizing the electrodes for
high sensitivity also results in significantly increasing the
sensor response to the displacement of the capsule. It was
decided that the simple design of the Type I electrodes and

highly stable response with respect to the displacement of the


capsule outweighs the relatively small loss of sensitivity in
comparison to the other two types of electrodes used in this
study. The precision of the measurement system was
estimated to be 1.5 mg for the smaller and 3 mg for the larger
capsule, which is approximately 0.5% of the weight of the
nominally filled capsules and around 3% of the weight of the
empty capsules. This is well below the 5% weight tolerances
usually used by the pharmaceutical industry. The precision
was also found to be independent of the ambient temperature
and humidity for the temperature range from 19OC to 25 OC
and relative humidity range from 45% to 60%. The capsules
were stored in small airtight holders preventing them from
taking on moisture from the air between the measurements,
which would result in a change of the capsule weight and
relative permittivity and thereby affecting the outcome of the
measurements in an unpredictable way. However, this is not a
significant issue for the practical application as the
pharmaceutical environment has very strict tolerances on the
temperature and relative humidity of the air.
The results (Fig. 6) showed that the nonlinearity of the
measurement system could be sufficiently compensated by a
second order polynomial approximation of the transfer
function. As expected the nonlinearity was smaller for the
small capsules, which is due to the more homogeneous
electric field around the capsule. Ignoring the nonlinearity
and instead using a linear transfer function would yield a
measurement error of 2% for the nominally filled capsule,
which is still significantly less then the 5% error usually used
by the pharmaceutical industry. Moreover, the nonlinearity
quickly becomes negligible if only a smaller part of the full
measurement range is being used. If the system is calibrated
only for the capsule fill in the range from 90% to 110% of the
nominal, a linear approximation of the transfer function is
sufficient. Additional advantage of ignoring the nonlinearity
is by using only the empty and nominally filled capsules for
the calibration, thereby eliminating the need for preparation
of custom samples.
The system is capable of handling capsules moving with
top speed in excess of one meter per second, which yields a
0.2 mm movement of the capsule between two consecutive
measurements. This results in handing approximately from
75,000 to 100,000 capsules per hour using a single system.
However, using multiple systems could easily increase the
inspection rate to meet almost any requirements. Additional
advantage of such system is that no mechanical parts are
being used, thereby significantly reducing the cost and the
possibility of failures during normal operation.
There are several ways to further improve the proposed
measurement system. One would be to better use the
information of the capacitance profile for the capsule weight
estimation. Another significant improvement could be
achieved by optimizing the size and shape of the electrodes
for each individual type of capsules to the point of optimal
balance between the sensitivity and response to a small
displacement of the capsule as a result of positioning error

during the measurement. However, in this way each type of


capsules would require a unique set of electrodes thereby
making the system significantly less practical.
VI. CONCLUSION
A detailed analysis of the effect of the shape and size of the
electrodes on the sensitivity and measurement error induced
by the tolerances of the capsule positioning during the
measurements showed that the best results can be achieved by
using a set of flat electrodes. The tested measurement system
for weighing pharmaceutical capsules based on a set of flat
electrodes was proved to be stable producing precise and
accurate measurements with the measurement error in the
range from 1.5 mg to 3 mg corresponding to 0.5% of the
weight of the nominally filled capsule, which is significantly
less then the error margin of 5% usually used by the
pharmaceutical industry. Moreover, the calibration of the
system was proved to be relatively simple requiring only two
to three sets of capsules of known weight. Finally, the tests
showed that a single measurement system is capable of
handling from 75,000 to 100,000 capsules per hour depending
on the size of the capsules.
ACKNOWLEDGMENT
This work was supported by the Ministry of Higher
Education, Science and Technology, Republic of Slovenia
under the grants P2-0232, L2-7381, L2-9758 and Z2-9366.
REFERENCES
[1]

Process Analytical Technology Initiative, U.S. Food and Drug


Administration, http://www.fda.gov/cder/OPS/PAT.htm/ (URL), (10
August 2008)

[2]

G. Reich, "Near-infrared spectroscopy and imaging: Basic principles


and pharmaceutical applications," Advanced Drug Delivery Reviews,
vol. 57, pp. 1109-1143, 2005.

[3]

Y. Roggo, P. Chalus, L. Maurer, C. Lema-Martinez, A. Edmond, and


N. Jent, "A review of near infrared spectroscopy and chemometrics in
pharmaceutical technologies," Journal Of Pharmaceutical And
Biomedical Analysis, vol. 44, pp. 683-700, 2007.

[4]

IMA S.P.A., http://www.ima.it/ (URL), (10 August 2008)

[5]

European Medicines Agency, http://www.emea.europa.eu/ (URL), (10

[6]

U.S. Food and Drug Administration, http://www.fda.gov/ (URL), (10

[7]

United States Pharmacopoeia, 30-NF25 ed, 2007.

[8]

L. C. Wrobel, The Boundary Element Method, 1st ed. New York:

August 2008)
August 2008)

Wiley, 2002.

Das könnte Ihnen auch gefallen