Peer Reviewed: How to Choose the Right Process Analyzer

Peer Reviewed: How to Choose the Right Process Analyzer .... First gene-edited babies born, scientist claimsFirst gene-edited babies born, scientist c...
0 downloads 0 Views 198KB Size
How To Choose the Right 368 A

A N A LY T I C A L C H E M I S T R Y / J U LY 1 , 2 0 0 2

PHOTODISC

Robustness, precision, and sampling sites are important parameters that influence the practical use of process analyzers. ow do plant managers decide which process analyzers to buy and install for monitoring and controlling their processes? Should analyzers be on-line, at-line, or off-line instruments? Slow, but precise, process gas chromatographs or fast, but relatively imprecise, near-IR spectrometers? Often, such decisions are made ad hoc and based on limited information, because extensive development and long trial periods are considered too expensive. However, it is possible to make a rational decision based on computations. Process analytical chemistry is a rapidly growing field, largely attributed to the activities of the Center for Process Analytical Chemistry at the University of Washington, but other research groups have focused their activities on process analytical measurements (1). A considerable number of process analytical chemistry papers discuss issues such as calibration and standardization of process analyzers; building interfaces and equipment for on-line, in-line, and in situ monitoring; and sensor development for taking process analytical measurements. The reported figures of merit in these papers are often limited to precision, determined by the root-meansquared error of prediction (R MSEP), and analysis time. However, precision and analysis time do not tell the whole story. Is a method that is more robust but less precise preferred over an alternative method? What is an acceptable degree of precision (i.e., R MSEP) for a given process? Where in the process should the sample be extracted or the

analyzer interface placed? All of these questions are important for the practical use of process analyzers. Answers to these questions can be found if process analytical measurements are formulated in one unifying theoretical framework. The primary instrument specifications are the locations of the instrument, precision, and analysis time, which describe the technological aspects of the process analyzer. The secondary specifications are cost and the need for operator training, which describe the logistical aspects of operating the process analyzer. The primary instrument specifications can be formulated in a unified framework. In the chemical engineering literature, the problem of optimal sensor location has been addressed, but only some of the primary instrument specifications have been accounted for (2). In this article, we present a framework that accounts for all primary instrument specifications. This framework is based on the measurability theory developed by van der Grinten, which we have expanded (3–7 ).

A simulated case study In this case study, the goal is to monitor the conversion of styrene monomer into polystyrene at the end of a polymerization reactor. Conversion is the amount of reactant converted to product; therefore, it is a measure of the completeness of a reaction. This example, although simulated, closely resembles industrial practice, dealing with a highly relevant reaction of considerable complexity. All calculations were validated using real experiments, which are re-

Process Analyzer

Age K. Smilde Frans W. J. van den Berg Huub C. J. Hoefsloot University of Amsterdam (The Netherlands)

J U LY 1 , 2 0 0 2 / A N A LY T I C A L C H E M I S T R Y

369 A

At-line XSEC

Feed

Reactor

In-line SW-NIR

Product

On-line SW-NIR

At-line NIR

FIGURE 1. Schematic drawing of the styrene polymerization reactor. Temperature, 70 ºC; average residence time, 40 min; initiator concentration, 0.04 ±0.01 mol/L.

ported in the technical section of this issue (7 ). A simplified step-wise reaction scheme in the box below is performed in a 1-m tubular reactor (Figure 1). The reactor tube is fed with a premix of styrene monomer (M) and initiator (I). The I concentration in the reactor feed is fluctuating slightly around its nominal value. These fluctuations are considered process disturbances, and their influence on the conversion of styrene to polystyrene at the end of the reactor has to be monitored. Four types of process analyzers are available for this monitoring task. Both a size-exclusion chromatograph (SEC) (8) and a near-IR (NIR) spectrometer can be operated close to the reactor, which is referred to as at-line. The alternative is a short-wave near-IR (SWNIR) spectrometer, operated in on-line or in-line mode.

Postanalysis signal reconstruction The process analyzer measures the amount of monomer (the process signal) at the physical end of the reactor. The process conditions of the reactor are fixed; hence, the conversion can be calculated and, from this point on, we will measure conversion. Because of the limitations of the process analyzer, continuous and perfect knowledge of this process signal is not possible— every analyzer has a limited precision and analysis time. Therefore, we always have to make do with a “reconstructed signal”: the process signal that we can reconstruct from the measurements of our process analyzer. This idea of signal reconstruction is central to the measurability theory. Suppose that the instrument is perfect and can measure the conversion instantaneously and without error. The results are the blue lines in Figure 2, which represent the true process variation—the varying degree of conversion time. Unfortunately, there are no perfect instruments. Our instrument has a limited precision (indicated by a standard deviation i), and we expect our measurements to be spread ±3i (the confidence interval) around the true value, as shown by the red markers in Figure 2a. We can reconstruct the signal in the best possible way by connecting all these measurements (green line in Figure 2a). This is the best reconstruction we can get postanalysis, that is, after collecting the last results. If there is no systematic error in the measurements, the value of i is an indication of the error made in sampling 370 A

A N A LY T I C A L C H E M I S T R Y / J U LY 1 , 2 0 0 2

the true signal. Obviously, the poorer the precision of the process analyzer, the larger the error in the reconstructed signal. Process measurements have other problems. They can only be taken at a limited frequency, expressed as the interval between sample taking (indicated by Tf). Figure 2b shows the consequence of this limited sampling frequency. Likewise, the sampling itself is not instantaneous. It takes some time to collect, or grab, the sample from the process (indicated by Tg), and during this time, process variation is averaged (Figure 2c). There might also be a response correlation problem, which is carryover in the detector response from one measurement to another (indicated by Ti, the mean correlation time for the instrument). The effect of this is shown in Figure 2d. Finally, the process analyzer can have a significant analysis time (indicated by Td), which causes a delay in the availability of the result (Figure 2e). Of course, postanalysis, this delay could be counteracted by shifting the whole reconstructed signal to the left with a shift equal to Td. In reality, all these imperfections are present to some degree and affect the quality of the reconstructed signal. Moreover, we want to reconstruct the signal in real time. Hence, we cannot interpolate and shift the reconstructed signal anymore, because at time t, the measurement at t + Td is not yet available. The optimal process analyzer reconstructs the process signal in real time and minimizes the distortion of the true process signal.

Real-time signal reconstruction The problems of real-time signal reconstruction are shown in Figure 3a, where an at-line XSEC is used to measure the conversion (X) of a product determined from the polymer and monomer peak areas in the chromatogram. Realistic values for this measurement are Ti = Tg = 0, Td = Tf = 20 min, and a precision of 0.17% conversion (8). Suppose that a sample is taken at t. Again, in practice, the blue line (real process variation) is not known; but for the sake of argument, the line is drawn in the figure. The analysis result of this sample becomes available at t + 20 min and has the value A, indicated by a red dot at t. This value A is not exactly the process value at t because of the limited precision of the XSEC

Initialization k1 2I• + N2 I2–N2 Chain initialization k2 I• + M I–M• Propagation I–M• + M

k3

I–M–M•

Termination I–M–....–M• + •M–...–I

k4

I–M–....–M–I

The process model is based on this simplified stepwise reaction mechanism inside a tube reactor.

(a)

measurement. At t + 20 min, another sample is taken, the result of which becomes available at t + 40 min. The best guess for the process value between t + 20 and t + 40 is the measured value A, indicated by the segment of the green line. In this way, a real-time reconstruction of the process values can be obtained. Clearly, the reconstruction of the signal in real-time analysis is worse than a postanalysis reconstruction. This is the price we pay for monitoring in real time. To compare the quality of signal reconstructions using different process analyzers, a measure of this quality is needed.

(c)

Quality of signal reconstruction The quality of signal reconstruction can be expressed in a simple number, the measurability. If the true value of the process variable xtrue(t), the percentage monomer conversion at t, is known (in reality, this true value is never known, but conceptually it exists), then the variation in xtrue(t) can be expressed as a variance  2true around its target value µ, the nominal operating point of the process (e.g., the nominal degree of conversion). When the measurements are performed at t = 1, . . . , T, an estimate of this variance, s 2true, is given by 2

s true =

1 T [x (t) – µ ]2 T Σ t = 1 true

2

1 T [x (t) – xrec (t) ]2 T Σ t = 1 true

2

Sample time Tg

Response correlation Ti

(e)

Delay time Td

(2)

which we want to minimize. In theoretical studies, integrals are used to calculate s 2error and s 2true instead of summations, but the principle remains the same. It is easier to work with relative errors because s 2error is actually a meaningless number. Therefore, we define the measurability factor M as M=

(d)

Sample frequency Tf

(1)

If the reconstructed signal value at t is written as xrec(t), then the reconstruction error is [xtrue(t) – xrec(t)]2. The average squared error s 2error over time interval T is therefore given by s error =

(b)

Precision σ 2i

FIGURE 2. The effect of different instrument imperfections on signal reconstruction. Time is on the x-axes and signal on the y-axes. Red bars indicate confidence intervals.

2

s true – s error 2

s true

(3)

which is always ≤1. A value of 1 means that s 2error is 0 and that we are perfectly capable of monitoring the process signal. This will never happen in practice. A low M means that s 2error is relatively high and that the measurements do not add much to the knowledge of the variation in the process variable. M can also be interpreted as the “information content” of a measurement— how much dynamic information about the selected process variable (conversion in this case) is contained in the measurement. A value of 0.5–1.0 is considered acceptable (2).

Measurability of conversion in the example We can now apply the concept of measurability to objectively determine the performance of different process analyzers. In all cases,

the analyzers are used to measure conversion in our polymerization reactor example. The at-line XSEC, at-line NIR, and online SW-NIR perform measurements at the outlet of the reactor, whereas the in-line SW-NIR performs its measurements somewhere along the reactor. The primary specifications and measurability factors of the different process analyzers are given in Table 1. In terms of primary instrument specifications, the four process analyzers in our example differ only in Td, Tf, and i. For the current example, Ti and Tg are assumed to be zero. The XSEC, despite its high precision, is clearly too slow to monitor the conversion of the present reaction in real time (samples indicated by red markers in Figure 3a). The result is a poor signal reconstruction (green line). The measurability factor (MXSEC = 0.44) is too low for practical purposes because Td and thus Tf are too long, causing serious delays in reconstruction. J U LY 1 , 2 0 0 2 / A N A LY T I C A L C H E M I S T R Y

371 A

(a)

(b)

12

X

(c)

12

12

11 X

11

X

A

10 9 13:00

11

10

10

9

9

t

t + 40 16:00 13:00 14:00 15:00 16:00 13:00 14:00 15:00 16:00 t + 20 Time Time Time FIGURE 3. Real-time signal reconstructions of the degree of conversion for (a) at-line XSEC, (b) at-line NIR, and (c) in-line SW-NIR.

At-line NIR gives a considerable improvement in measurability compared with the at-line XSEC. Figure 3b shows that the atline NIR is faster than the at-line XSEC, whereas the precision of the at-line NIR is worse. This results in a measurability of MNIR = 0.72. The on-line SW-NIR has a much reduced analysis time without compromising too much on precision (MO-SWN = 0.95). The in-line SW-NIR is positioned near the end of the reactor tube, which turns out to be the optimal location. The measurement results of the SW-NIR at this position are used to predict the conversion in the reactor product (Figure 3c). This prediction is made using a process model. In-line SW-NIR performs slightly better than on-line SW-NIR, although the differences are small (MI-SWN = 0.98). Equation 3 uses the true process variation and reconstructed signal. In practice, we do not know this true process variation and have to calculate M in a different way.

Measurability in the design phase Fortunately, to calculate the measurability index, it is not necessary to know the true process variation or the actual measurements—all that is needed are a process model and the behavior of realistic disturbances. We assume to have a process model obtained from first principles or from system identification tools. With this model, it is possible to compute theoretical measurabilities. This computation of theoretical measurabilities is based on Kalman filtering theory (7). Simply stated, Kalman filtering as used in the current situation can be viewed as an advanced method of error propagation. Suppose that for a two-step analytical method, step one has a precision of 21 and step two has a precision of 22. Error propagation then shows that the total analysis has a precision of 21 + 22, assuming that the two steps are independent. This assessment can be made without performing the experiments. The only requirements are that the individual contributions 21 and 22 are

known and we have a model ( 2tot = 21 + 22). Theoretical measurabilities are similarly calculated by Kalman filtering using a process model. The process model is based on the reaction mechanism shown in the box on p 370. The kinetics of these reactions are known, and, hence, the whole polymerization process can be summarized as mass balances in the form of differential equations related to these reactions (7 ). We want to monitor conversion at the outlet of the reactor. The disturbance in our example is uncertainty in the initiator concentration in the reactor feed. This external process uncertainty can be represented by initiator concentration variance 2init, which can be propagated through the reactor. Fluctuations in initiator concentration travel through the reactor as fluctuations in the monomer concentrations (governed by the reaction kinetics) and result in fluctuations in the conversion X at the end of the reactor. Assuming a certain 2init, the expected fluctuation of X can be calculated, which results in 2X,true, the variation expected at the outlet of the reactor. It is this variation that we want to monitor. Note that we only need to know 2init and not the actual concentrations of the initiator. As with 2init, the expected performance of the process analyzer in measuring the conversion at the outlet can be computed by adding equations for the analyzer to the process model. Using appropriate values for the five instrument specifications Ti, Tg, Tf , Td, and i (Figure 2 and Table 1), a theoretical performance of the process analyzer can be determined. It is the job of process analytical chemists and instrument vendors to supply realistic values of such specifications (e.g., a i = RMSEP of 0.63% for the SW-NIR). Thus, we have the individual contributions Ti, Tg, Tf , Td, i, and a model relating these contributions to the error of estimating the conversion. Next, error propagation can be performed to obtain the expected variance 2X,error of the estimation error of the conversion. The theoretical measurability Mtheor is now given by σX,true – σX,error 2

Table 1. Primary process analyzer specifications. For simplicity, all process analyzers are assumed to work with Ti = Tg = 0 and Tf = Td. At-line XSEC At-line NIR On-line SW-NIR In-line SW-NIR

372 A

T f = Td 20 min 10 min 30 s 30 s

i 0.17% 0.45% 0.63% 0.63%

A N A LY T I C A L C H E M I S T R Y / J U LY 1 , 2 0 0 2

M 0.44 0.72 0.95 0.98

Mtheor =

2

σX,true 2

(4)

which is similar to Equation 3. Figure 4 shows Mtheor for inline SW-NIR at different locations in the reactor tube ( 2init = 0.1  10–3 mol2/L2). The theoretical primary process analyzer characteristics of this instrument are Ti = Tg = 0 s, Tf = Td = 30 s, and i = 0.63% (Table 1).

Performing the in-line SW-NIR measurement close to the reactor entrance would reduce the time needed to observe the process disturbances (because these initiator disturbances occur at the inlet), but the change in monomer concentration due to the disturbance in the initiator concentration is not very strong. Performing the SW-NIR measurement at the reactor exit would result in a much larger signal (the disturbance has traveled through the system and the change in monomer concentration is amplified), but then the disturbance is detected too late. Figure 4 shows that in-line SW-NIR measurements in the first part of the reactor tube yield insufficient information to predict the conversion. In-line SW-NIR in the second half of the reactor tube is much better suited for predicting the conversion in the reactor product. The best compromise for predicting the conversion at the exit is found close to the exit. For this optimum location, the in-line SW-NIR results of Figure 3c were calculated. This theory was tested with a real reactor. The results show good agreement between the theoretical and practical measurabilities (7 ).

Extensions of the method The measurability index can be readily extended to include more than one process variable. Suppose that not only the conversion but also the molar mass distribution [e.g., expressed as Mn (number average of the molecular weight) and Mw (weight average of the molecular weight) moments] of the polymer are important. Polymer chain growth has a direct relationship to styrene monomer conversion. By estimating the conversion from process analytical measurements, Mn and Mw of the polystyrene product using a process model of our reactor system can be inferred. Again, error propagation can be used, but this now results in an uncertainty covariance matrix error of size 3  3 for conversion, Mn, and Mw. For the external process disturbances, the variation of the three process variables in the product stream is expressed in a covariance matrix true, which is also of size 3  3. The matrices true and error are natural extensions of 2X,true and 2X,error, respectively. The measurMbe generalized to ability definition (Equation 4) can thus

Mtheor =

Work to be done For computing the measurability index, a fundamental model of the process has to be available. A fundamental model will contain constants (e.g., kinetic constants) using estimated measurements. Such estimates carry uncertainty, and the consequences of this uncertainty on the calculated measurability have to be established. The theory presented in this article works only for continuous processes. Batch processes are also used in industry, and extending the theory to batch processes would be worthwhile. In addition, if the fundamental model is incomplete, then experiments can be run and so-called gray models can be built. These are hybrid models that are part fundamental and part empirical. The use of such models for calculating measurability indexes is under investigation. Age K. Smilde is a professor of process analysis and Huub C. J. Hoefsloot is an associate professor at the University of Amsterdam (The Netherlands). Smilde’s research interests include on-line analysis and chemometrics. Hoefsloot’s research interests include polymer engineering. Frans W. J. van den Berg is currently a postdoctoral fellow at the Royal Veterinary and Agricultural University (Denmark). His research interests include chemometrics. Address correspondence about this article to Smilde at [email protected].

References (1) (2) (3) (4) (5) (6) (7)

tr (Σtrue) – tr(Σerror)

(5)

tr (Σtrue)

in which tr is the trace of a matrix (the sum of its diagonal elements). This trace of true and error comes down to summing all variances of true and estimated conversions, Mn and Mw, respectively. It is also possible to extend the approach to accommodate several measurements performed simultaneously (e.g., using an inline SW-NIR along the reactor and a NIR at the end). The measurability index constructed can be used to calculate the performance of competing primary analyzSteam coil er configurations already in the design phase of a process. Naturally, it can also be used for an existing process. Hence, to

answer one of the questions posed at the beginning: Plant managers can decide which process analyzers to use by computing their measurabilities.

(8)

Callis, J. B.; Illman, D. L.; Kowalski, B. R. Anal. Chem. 1987, 59, 624 A–637 A. Harris, Th. J.; MacGregor, J. F.; Wright, J. D. AIChE J. 1980, 26, 910–916. van der Grinten, P. M. E. M. Statistica Neerlandica 1968, 22, 43–63. Didden, C.; Duisings, J. Process Control Qual. 1992, 3, 263–271. van den Berg, F. W. J.; Boelens, H. F. M.; Hoefsloot, H. C. J.; Smilde, A. K. Chem. Eng. Sci. 2000, 55, 827–837. van den Berg, F. W. J.; Boelens, H. F. M.; Hoefsloot, H. C. J.; Smilde, A. K. AIChE J. 2001, 47, 2503–2514. van den Berg, F. W. J.; Hoefsloot, H. C. J.; Smilde, A. K. Anal. Chem. 2002, 74, 3105–3111. Lousberg, H. H. A.; Boelens, H. F. M.; Hoefsloot, H. C. J.; Schoenmakers, P.; Smilde, A. K. J. Polym. Anal. Charact. 2002, in press.

Reactor

Feed

Product

1

0 FIGURE 4. Measurability factor for the in-line SW-NIR analyzer as a function of position along the reactor tube. J U LY 1 , 2 0 0 2 / A N A LY T I C A L C H E M I S T R Y

373 A