• Nem Talált Eredményt

Estimation of Concentration Profiles for Industrial

4.2 Simultaneous Spline Approximation for Several Compounds

4.3.2 Estimation of Concentration Profiles for Industrial

The second example is taken from one of the industrial partner of the De-partment of Process Engineering. In the studied industrial batch reactor only the concentrations of the three main components are measured (see Fig. 4.2).

As it will be shown in this example, the proposed grey-box spline smoothing approach can be effectively used in such typical real-world situations. Two approaches were used and compared: Standard cubic spline approximation and simultaneous spline approximation with hard- and soft-constraints.

Because the chemistry of this technology is very complex and not fully known, the reaction network is modeled by the following scheme

A+B→C A→A B→B

C →C (4.26)

where the first reaction represents the product formation, and last three reac-tions represent the decay of three measured components (by-product forma-tion). Due to the fact that the technology is confidential, the components are denoted asA,B andC. As it can be seen in Fig. 4.2, the rate of the reactions

4.3 Application Examples 65

0 50 100 150 200 250

0 50 100 150 200 250 300

time [min]

conc. [g/dm3 ]

A B C

A*

B*

C*

A+B+C+A*+B*+C*

Fig. 4.2. Spline approximation (second example) without constraints

are relatively small until the 60th minutes of operation. At about this time, a catalyst was added into the reactor that makes the product formation much faster. This a priori knowledge is used at the selection of the knot sequence.

Several alternatives were tested with more and fewer number of intervals and different knot sequences, and finally, based on the recipe of the technology and the analysis of the shapes of the trajectories the following knot sequence was set as [0, 57.3, 80.3, 250].

From the visual inspection of the data (see Fig. 4.2, the following con-straints can be defined

CA(0) =CA0, CB(0) =CB0, CC(0) =CC0 (4.27)

and dCA

dt 0, dCB

dt 0 (4.28)

dCC

dt 0 if t≤114 (4.29)

dCA

dt + dCB

dt + dCC

dt 0. (4.30)

The component balance can be formulated as

C0 =CA+CB+CC +CA+CB +CC, (4.31) where C0 =CA0+CB0+CC0.

Although the A, B and C concentrations are not measured, with the use of the assumed kinetic models

dCA(t)

the material balance (4.31) can be used in practice in the following form C0 =CA(t) +CB(t) +CC(t) +k1r θ˜ parameters of the splines. Hence, as the concentration trajectories are rep-resented by the S1, S2 and S3 splines, in the last three terms of (4.33) the product of these parameters appear. Hence, this material balance represents a bilinear constraint defined on the unknown parameters. Such bilinear opti-mization problems are often solved by alternating optiopti-mization (see [69] for a practical application in system identification), this approach results in the following algorithm:

Step 1. Hard-constrained spline identification. The CA(t), CB(t), CC(t) concentration trajectories are represented by the S1, S2, S3 spline functions obtained by simultaneous spline approximation with (4.27)-(4.30) hard-constraints.

Step 2. Identification of the k1,k2,k3 parameters. The three kinetic parameters are identified by linear least squares algorithm from (4.33):

min Step 3. Soft- and Hard-constrained spline identification. In this step, one incorporates the material balance (4.33) into the spline identifi-cation as a soft-constraint, so the new quadratic objective function is:

minθ˜ Q(ˆθ),

4.3 Application Examples 67 and min˜θQ(˜θ) is subject to the constraints (4.27)-(4.30), the optimization problem can be solved by quadratic programming. The results of this step are the S1, S2, S3 splines related to the CA(t), CB(t) and CC(t) concen-tration trajectories.

Step 4. Iteration. Repeat from step 2 until the estimated trajectories converge.

Before the application of the soft-constraint, the ˆt = [ˆt1, . . . ,ˆtNˆ] time instants used for the evaluation of the soft-constraints and the λ parameter have to be selected. In this example, the soft-constrains were evaluated in every minutes of the operation, and the λ parameter was set according to a rough sensitivity analysis. An increase in λ improved the accuracy of the mass balance. Whenλwas greater than 15, this increase did not cause further significant improvement, thus this parameter was chosen as 15 (see Fig. 4.3).

0 50 100 150 200 250

Fig. 4.3. Spline approximation (second example) with constraints

Table 4.5 compares the numerical results of the two methods. The pro-posed constrained method fulfils the mass balance very well, in contrast to the standard spline approximation method. Certainly, the spline that was calculated by the standard method fits to the measured data better, but this difference is quite small. Hence, these numerical results support the conclusion that the proposed method is more accurate.

Table 4.5. Numerical results of spline methods in the second example

without with

constraints constraints mean absolute difference between estimated

and measured concentrations (g/dm3) 5.29 5.99 mean absolute error

in the mass balance (g/dm3) 6.36 0.18 absolute error in the balance at

the end of the experiment (g/dm3) 10.50 0.08

4.4 Summary

In many practical situations, laboratory and industrial experiments are expen-sive and time consuming and accurate measurements cannot be made. This problem results in small number of data points that are often noisy and ob-tained at irregular time intervals. Hence, data smoothening and re-sampling are often required to handle such data sets. A good method for this purpose is the cubic spline approximation. This chapter presented a new algorithm for incorporating a priori knowledge into spline-smoothing of interrelated multi-variate data.

The standard cubic spline approximation uses third-order polynomials to approximate the trajectories. The standard cubic spline approximation is a black-box technique because it only considers the measured points. Some-times, however, the modeler has a priori knowledge about the approximated trajectories and this a priori information can be employed in the spline ap-proximation. So I proposed a method in which the a priori knowledge (e.g.

assumed balance equations) is transformed into linear equality and inequality constraints on the parameters of the splines, and the splines are simultaneously identified from the available data by solving a single quadratic programming problem. Two ways of transforminga priori knowledge into linear constraints were presented. The first way is the hard-constrained approach where the con-straints are defined at the knot points. The second way is the soft-constrained approach that can be handle equality constraints on the complete spline.

To demonstrate the applicability of the method two examples were given.

In the first example, it was applied to identify the kinetic parameters of a simulated reaction network, in the second example, it was used to analyze data taken from an industrial batch reactor. The results demonstrate that when the proposed constrained spline-smoothing method is applied, one obtains not only better fitting to the data points, but also the performance of the estimation of model parameters improves.

The proposed grey-box approach was used to improve cubic spline approxi-mation here, however it can be applied to other approxiapproxi-mation techniques too.

This further research could be aimed at the application of this approach for other black-box techniques.