A General Approach to Classify Operational Parameters and Rectify

May 30, 1980 - A General Approach to Classify Operational Parameters and Rectify Measurement Errors for Complex Chemical Processes...
0 downloads 0 Views 2MB Size
7 A General Approach to Classify Operational Parameters and Rectify Measurement Errors for Complex Chemical Processes G. STEPHANOPOULOS and J. A. ROMAGNOLI

Downloaded by EMORY UNIV on February 29, 2016 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007

Department of Chemical Engineering and Materials Science, University of Minnesota, Minneapolis, MN 55455 The reliability of the process measurements' data is extremely important for good monitoring, control and optimization of chemical process. On-line rectification of a measurement error is possible be it a random error or a gross bias, if additional information is available. Such information is supplied by the extent to which the material and energy balances are satisfied by the recorded data. These balances are simple, involve parameters usually well known, and they should be satisfied independently of the measurements accuracy. Previous works have attempted to resolve the above problem through the solution of a least squares problem, using linear balance equations. Swenker [1] was among the first who employed this idea, which was further developed by Hoffman [2] and Vaclaveck [3]. Almasy and his coworkers [4] outlined an iterative solution for the second order balance equations. They also applied the algorithm to linear dynamic system (Gertler, Almasy, [5]) and they extended the deterministic methods of balance error smoothing to stochastic system (Sztano, Almasy, [6]). Furthermore, Umeda et al. [7] presented a method for the plant data analysis and parameter estimation which relies on a general criterion for fitting multiresponse data suggested by Box and Draper [8]. All these algorithms yield to the Markov estimation of the system variables which correspond to the maximum likelihood estimation for errors with normal distribution and zero mean. The large scale of the correction problem involved in a chemical process make the above approaches cumbersome. This last feature motivated Vaclavek [3,9] to attempt to reduce the size of the least square problem through the classification of the measured and unmeasured process variables. Such classification allow the size reduction of the initial problem and its easier solution. A similar approach was undertaken by Mah et al[12] in their attempt to organize the analysis of the process data and systematize the estimation and measurement correction problems. Of particular interest is the identification of biases and gross errors in the measurements. Vaclaveck and Vosolsobe [11], 0-8412-0549-3/80/47-124-153$05.50/0 © 1980 American Chemical Society

In Computer Applications to Chemical Engineering; Squires, Robert G., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Downloaded by EMORY UNIV on February 29, 2016 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007

154

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

Almasy and Sztano [6] and Mah and his coworkers [12] have dealt with this problem and developed structural or probabilistic rules that w i l l determine the location of the gross error. A throuth review of the related problems and the proposed solutions can be found in [15]. When a l l the measurements are corrected, then they can be used to estimate the value of the variables which are not directly measurable. Such situation entails the solution of a nonlinear estimation problem, in general. In the present work we w i l l deal with a l l the above problems and provide a unified framework to deal with the error correction for static or dynamic systems using multicomponent mass and energy balances. The topological character of the complex pro­ cess is exploited for an easy classification of the measured and unmeasured variable independently of the linearity or nonlineari t y of the balance equations. Statement of the Problem Consider a chemical process containing Κ units. The multicomponent steady-state mass and energy balances are represented by J Σ a u. = 0 for k = 1, 2 , . . . Κ (1) j=l i k

1

3

where u . i s the quantity that i s balanced, a. is the -element of the process incidence matrix which denotes tne topology of units and streams, aj = 1 i f stream j is an input to unit k, ajk = -1 i f j i s an output stream, and = 0 i f stream j i s not associated with unit k. J i s the set of a l l streams i n the process. Chemical reactions can be easily incorporated through a r t i f i c i a l input and output streams. In matrix form equation (1) yields A u

= 0

(2)

The vector u i s an n+m dimensional vector which can be partitioned into two vectors; the η-dimensional vector χ of measured parameters and the m-dimensional vector of unmeasured ones. Some of the unmeasured variables can be evaluated from the measurement of the others variables using the balance equations, and some not. Thus, the unmeasured parameters may be classified as "determinable" or "indeterminable". On the other hand, some of the elements of vector χ of measured variables can be com­ puted from the balances and the rest of the measured parameters. Such measured variables w i l l be called "overdetermined". The rest of the elements of vector χ w i l l be called "just deter­ mined". Measurement of χ i s denoted by χ , and the difference of any measured system parameter and i t s true value is called the "error" denoted by 6, i . e . 6

= χ - χ

In Computer Applications to Chemical Engineering; Squires, Robert G., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

(3)

7.

STEPHANOPOULOS

AND

155

Operational Parameters

ROMAGNOLi

The estimated value of χ i s denoted by χ and the differ­ ence between any estimate and i t s measured value χ i s called the "correction" for that parameter and i s represented by δ , i . e . 6

= χ -

χ

(4)

Downloaded by EMORY UNIV on February 29, 2016 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007

In general practical situations the mass and energy balances do not yield always linear expressions l i k e equation (2). For example, one device serves for the measurement of mass flow rate and separate analyzers are used to determine the compositions. Consequently the balance may result i n bilinear forms as shown in equation (5). J Σ j=l

a.. Μ. ξ . .

=0

i = 1,2,...,1 + j k

(5)

1,2,..., Κ

where, for i = 1 , 2 , . . . I are the concentrations of the I components i n stream j , and £j (ι+χ) i s the enthalpy of stream j , with Mj i t s flowrate. In the subsequent sections the following problems w i l l be tackled : - Classify the measured variables into overdetermined and just determined. - Classify the unmeasured variables into determinable and indeter­ minable. - Define the subset of balance equations which should be used for the rectification of the measurement errors. - Rectify the measurement errors. - Check the presence of gross biased errors i n the measurements and identify their sources. The above development can be extended to the dynamic systems. The dynamic equivalent of equations (2) and (5) are: w = Gw(t) + Br(t)

(6)

ν

(7)

= Cw(t) + Dr(t)

where, w i s the vector of state variables, r the vector of input variables and ν the vector of output variables. Discretize equations (6) and (7) i n time and introducing the shift-operator z. Eliminate the state variables and develop an input-output relationship ν = [ C(I - ζ Φ ) " where,

1

ζ"" Ψ + D ] r

(8)

1

Φ i s the transition matrix and Ψ(At)

J

Φ(ί-τ)άτ

Β

t-At Expanding the inverse matrix [5] appearing i n the above equation as a fraction of polynomial of ζ~2., leads to the input-output relationship of the form

In Computer Applications to Chemical Engineering; Squires, Robert G., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

156

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

η Σ Σ

ζ"

R .

(9)

1

i=0

η Σ

h

ζ"

1

i=0

where, R . = C F . Ψ Dru with F Q , F - , , . . F η χ η matrices with constant elements and coefficients F and h depend on elements of matrix Φ with the definition F = 0 . We can see that i n each equation both the input and the output are repre­ sented by their present values and as many previous values as the order of the system, i . e . η η h v(k) + Σ ζ " h.v = R r(k) + Σ ζ " R . r (10) i=l ° i=l -i -i Defining the vector e = Σ ζ h.ν - Σ ζ R . r and i=l i=l lumping into the same vector u we have the following balances equations N

-

1

Downloaded by EMORY UNIV on February 29, 2016 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007

N

1

1

1

1

n

n

1

K u +e = where,

u = i j 1

0

(11)

Κ = [ R ; * h ij

LvJ

1

L° °J

and

e = Σ ζ * K.u.

i=l

1

Equation ( 1 1 ) represents the time-discrete dynamic equivalent of the steady-state balance equations ( 2 ) . The dynamic balance equations ( 1 1 ) present some characteristic properties of the sampled-data input and output relationship, that are not present in the corresponding steady-state equations: 1 ) There are as many equations as the number of outputs 2 ) Each equation contain only one output 3 ) Each equation contain, except for special cases, a l l the inputs variables. Classification of the Operational Parameters Starting with the balances as they are given by eq. ( 2 ) for static system (or equation ( 1 1 ) for dynamic systems), we can par­ t i t i o n matrix A into Α. and A? (or equivalent partition Κ into and K 2 ) , i n such a way that eq. ( 2 ) becomes Α

χ

χ +Ay = 2

0

(12)

Where, χ and y are the measured and unmeasured parameters re­ spectively, and A and A are compatibles matrices. The topol­ ogy of the balance equations i s represented by the structure of these matrices. In order to classify the parameters one must f i r s t establish what information each equation is to supply, that i s , to obtain the output set assignment for the balance equations. With the output set assignment we assign to any unmeasured 2

In Computer Applications to Chemical Engineering; Squires, Robert G., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Downloaded by EMORY UNIV on February 29, 2016 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007

7.

STEPHANOPOULOS

AND

ROMAGNOLi

Operational Parameters

157

parameter one equation and i t w i l l produce a directed graph, as is shown in Figure 1 and 2 . Then for the unmeasured parameters we w i l l have the follow­ ing two cases: a. If an unmeasured parameter i s assigned as output to one equa­ tion, then i t is determinable. b. If the unmeasured parameter i s not assigned, then i t is not determinable. The output set assignment is not unique but whether an un­ measured parameter i s determinable or not does not depend on i t . As Steward (13) has proved, a l l the unmeasured variables w i l l be assigned to every possible output set assignment i f they are determinables, i . e . i f there i s no structural singularity. This result i s general and does not depend on the functional form of the balance equations. Consequently, except for isolated numer­ i c a l singularities the determinability of an unmeasured parameter i s specified from whether i t can be assigned i n an output set assignment or not. After the classification of the unmeasured parameters is carried out, the following task i s to classify the measured ones. The overmeasured parameters can be found by the following two step procedure. F i r s t Step. From the output set assignment we obtain equa­ tions that are not assigned. This set Ε of not assigned equa­ tions i s composed of three subsets of equations. 1. Subset E i , of equations not assigned which contain only measured parameters. 2. Subset E 2 of not assigned equations which contain unmeasured but determinable parameters ( i . e . they have been assigned as output to equations not included i n set E ) . 3. Subset E 3 of equations not assigned which contain unmeasured and indeterminable parameters. Then, i t is easy to prove that the following i s true: i. A l l measured parameters contained i n subset E of unassigned equations, are overmeasured (overdetermined) and w i l l be available for measurement correction. ii. For steady balances, a l l the measured parameters (variables) contained i n an equation belonging to subset E 2 are overmeasured i f this equation does not contain an unmeasured composition (enthalpy). That means we have new independent equations which contain new overmeasured parameters along with the previous ones. iii. For dynamic balances a l l the measured parameters contained in an equation belonging to E 2 are overmeasured. That results from the special configuration of the elements i n matrix K, which eliminates the probability of numerical singularities. iv. The subset E 3 does not introduce any new overmeasured parameters.

In Computer Applications to Chemical Engineering; Squires, Robert G., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

Downloaded by EMORY UNIV on February 29, 2016 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007

158

—Κ Figure 1.

MEASURED STREAMS UNMEASURED STREAMS

Flow diagram for a serial system

Figure 2. Signal graph representation for the system in Figure 1

In Computer Applications to Chemical Engineering; Squires, Robert G., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Downloaded by EMORY UNIV on February 29, 2016 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007

7.

Operational Parameters

STEPHANOPOULOS AND ROMAGNOLi

159

Second Step. We identify additional overmeasured parameters by aggregating the balance equations to form a chain of sequent i a l l y solvables sets of equations. Let us consider the case shown i n F i g . 3. Assume one component i n each stream. The flowrates of streams 1,2,5 and 6 are overmeasured as i t can be seen from an overall material balance (over the three units) which contains only measured variables. Such overmeasured variables cannot be detected i n the f i r s t step of the classification procedure for the measured variables described above. Note that the three units i n F i g . 3 constitute a disjoint system of a larger complex and they can be solved independently. The same hold for dynamic balances, but note i n this case that for the general case of several inputs and outputs we always should have an additional equation belonging to set Consequently, i n this second step we attempt to identify a l l the disjoint subsystems (such as the one i n F i g . 3) and this can be easily done from the occurrence matrix once an output set assignment has been specified. Let us assume that the occurrence matrix i s arranged into a block diagonal form D

ll

0

D = PP Where each D j , i = 1,2...,p represents the topology of each d i s joint subsystem. The a g r é g a t i o n of the balance equations to form the chain of disjoint subsystems, eliminate the streams among the units of each disjoint system. This leaves only the streams that w i l l connect a particular disjoint system with similar others. These streams together with the streams connected to one unit are called external and the parameters belonging to these streams are called external parameters. Classification Algorithm. In this section we summarize the various aspects discussed earlier i n a systematized algorithmic approach i n order to classify the parameters for a given system. 1) Consider a l l the measurable parameters as measured and the set C of the required parameters. 2) Construct the occurrence matrix of the balance equations for the system, dividing the parameters i n unmeasured and measured ones. 3) Apply an algorithm to assign the unmeasured parameters, as output of the balance equations. (See appendix A) 4) Classify the unmeasured parameters (set U): a) The unmeasured parameters which are assigned as outputs i n an output set assignment are definedas determinables and constitute the elements of the set b) The remaining unmeasured parameters which have not been assigned, are not determinables and constitute the elements

In Computer Applications to Chemical Engineering; Squires, Robert G., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Downloaded by EMORY UNIV on February 29, 2016 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

I Figure 3.

Disjoint subsystem

In Computer Applications to Chemical Engineering; Squires, Robert G., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Downloaded by EMORY UNIV on February 29, 2016 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007



STEPHANOPOULOS

AND

ROMAGNOLi

Operational Parameters

161

of set U 2 5) Classify the unassigned equations (set E ) : a) Unassigned equations which do not contain unmeasured parameters form the set E b) The subset E 2 i s formed by unassigned equations which contain unmeasured but determinable parameters. c) For multicomuonent mass and energy static balances, form the subset E 2 with the unassigned component or energy balance, which do not contain unmeasured compositions or enthalpies respectively. d) The unassigned equations which contain undeterminable parameters form the subset E 3 . 6) Classify the measured parameters. Let the set M represent a l l the measured parametersWe want to form the set M- (overdetermined parameters) and M 2 (just determined). For steady balances a) A measured parameter belongs to set M i f i t i s contained i n any equation of sets E and E 2 . b) Find a l l the possible disjoint subsystems D - If a given contain at least one external unmeasured parameter, t h e n t h i s disjoint subsystem does not add new parameters to M . Repeat for a l l D ' s . - If a given disjoint subsystem has only measured external parameters then they ajre a l l overmeasured, and they are incorporated i n the set M-j. c) Repeat parts a) and b) considering only flow rates, compositions and enthalpy separately. For dynamic balances a) A measured parameter belong to set M- i f i t i s contained i n any equation of sets E and E 2 . b) A l l the measured parameters i n the considered D , belong to set Mi i f the corresponding contain at least one equation of set E 2 « c) The remaining measured parameters constitute the elements of set M 2 , i . e . the justdetermined parameters. Selection of the Necessary Measurements for the Required Parameters to be Determinables. It follows from the above development that the parameters in set Ml are redundant and can be reconciled. Also the parameters in set M 2 are not redundant and there is no other indirect way of obtaining their values. Hence this classification of parameters can serve to test a given design of measurement places. There i s however another important task concerning this problem. We want ot present an algorithm to select the necessary measurement for a set of required parameters to be completely determinable. Let C be this set of parameters which for various reason should be known. C may be composed of measured and unmeasured parameters. The necessary measurements can be found using the following scheme:

In Computer Applications to Chemical Engineering; Squires, Robert G., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

162

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

1) Check i f the disjunction CflU i s an empty set. If this condition i s not satisfied the problem i s not solvable and has to be reformulated. 2) Consider the sejt Ν of measured and required parameters, i.e. Ν = Μ Π C 3) Identify the "interval" of the required unmeasured parameters (N ) (see Identification algorithm). 4) Check i f Ny Π φ 0, i f i t i s incorporate these parameters to set N and eliminate them from N . 5) If Ν Π "Οχ = φ , identify the set of parameters to be mea­ sured by Ηχ = N n Ν The results are given in the form of three sets of param­ eters: the parameters which must be, need not be and should be measured 2

χ

χ

m

y

Downloaded by EMORY UNIV on February 29, 2016 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007

y

χ

ΜΠ

= do not need to be measured in whole extent Μ - Ό2 - have to be measured χ

χ

are not measured (includes the remaining paramters)

:

Algorithm to identify the"interval" ( N ) . The set C of required parameters is known for a given system. 1) Identify a l l the required determinable parameter Yj which are determined by the intersection of the sets and C., i . e . Yj ε ( ϋ! Π C ) = 2) From the occurrence matrix for each Yj find the now which was assigned to this Yj and take a l l the parameters contained in this equation, except Yj 3) The set Ny of a l l the parameters found i n 2) constitute the "interval" of required unmeasured parameters. y

Rectification of Random Measurement Errors In the previous section we classified the measured parameters into two categories 1) overmeasured (overdetermined) 2) not overmeasured (just determined), so we can correct only the parameters belonging to the f i r s t category. In this way the accuracy of measured data can be improved. The next question i s : how to formulate the appropiate subset of balances to be used i n the rectification by solving the accompanying least square problem. Let us start with equation (12). Divide χ into two vectors, χ'ε M i , and p i M]. Consequently A

l

χ

?

Ξ

A

ll

x

?

+

A

12

p

=

A

ll

χ

'

+

q

with q = Αχ2 Ρ. Introducing the measurement errors. equations (12) becomes A



(x

f

(

1

3

)

The balance

+ 6) + A y + q = 0 2

In Computer Applications to Chemical Engineering; Squires, Robert G., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

(14)

7.

STEPHANOPOULOS A N D

Operational Parameters

ROMAGNOLi

163

But from the classification strategy outlined earlier we can find those equations, which contain only measured (overmea­ sured) parameters i . e . the system of balance equation can be regrouped into the following form A

(χ' + δ) = 0

q

(15)

where; A : matrix whose rows (equations) contain only measured parameters and x e M]. If we allow bilinear balances as we de­ scribed before, following the same procedure we arrive to a similar result Downloaded by EMORY UNIV on February 29, 2016 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007

f

Σ .. a

T

x

f

+ Σ Σ e..

n

χ .. χ\ 1

0

=0

i = 1,2...Κ

(16)

where; K: number of equations. We notice that the equations(16) in addition to the linear terms of the measured parameters, they also contain quadratic terms. In matrix natation and introducing the measurement noise, each row may be written as g. = a . ι

T

(x

?

+ δ) + (κ

+ δ ) Ε. Τ

ΙΟ

( χ ' + δ) = 0

(17)

10

This can be extended to dynamic systems. The reduced set of balance equations can be expressed in this case as L

ο



+ δ) + e =

L

ο

δ + e

?

=0

(18)

where; L : matrix whose rowg (equations) contain only overmeasured parameters and e = L x + Κ z~îu. Now when a new sample i s taken, the present value or δ are computed while the present and previous values of χ are available from the measurements and the previous values of δ are taken from previous computa­ tions. The reconciliation problem is equivalent to that formu­ lated for steady state case and has been solved by Gertler [5] using the weighted least squares. It is clear from the above procedure that equations (15),(17) or (18) should be linearly independent. The selection of the linearly independent balances can be done rather easily, using the earlier method of parameters classification. From the clas­ sification problem we obtained a set of unassigned equations Ε which contain the subsets E , E and E of unassigned equations. For steady balances a l l the equations in subset Εχ are consid­ ered for the correction of measurements. The equations i n the subset E are modified by substituting the unmeasured parameters by the measured ones which belong to their "intervals". On the other hand these are not a l l the possible equations that should be considered. From the block-diagonal form D, we obtained the D i i ' which are disjoint subsystems, and which are going to intro­ duce more equations containing only overmeasured parameters. But we must be careful to select which equation to incorporate to q

Q

1

2

2

2

s

In Computer Applications to Chemical Engineering; Squires, Robert G., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

164

COMPUTER

APPLICATIONS T O C H E M I C A L ENGINEERING

avoid redundancies. If a l l the flow rates are measured we can incorporate a redundant overall mass balance equation and i f we consider a system with η-components then we can only incorporate n-1 equations from the disjoint subsystems i f a l l the composi­ tions of the external streams are measured. We w i l l have a similar situation i f we consider the heat balances. For dynamic balances a l l the equations i n subsets Εχ and E 2 are considered for the reconciliation problem with equations in E modified by substituting the parameters in set u i by their"intervals". The systematized algorithmic approach to construct the system matrix i s as follow. Downloaded by EMORY UNIV on February 29, 2016 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007

2

Algorithm. 1) Consider the set E of the equation to be used for measurement reconciliation. E 4 i s i n i t i a l l y empty. For steady balances. 2) A l l the equations i n set E belong to set E 3 ) A l l the equationsin set E belong to set E 4 after a l l the parameter i n set have been replaced by their "intervals" 4) Identify a l l the whose external parameters are measured. Intoduce into the set E the following balances resulting from each D - j . a) An overall total mass balance i f a l l the external flow rates are measured. b) A component mass (tatal energy) balance i f a l l the external compositions (enthapies) are measured. For dynamic balances. 5) A l l the equations in set Ε χ and E belong to set E 4 , after a l l the unmeasured determinables parameters have been replaced by their "intervals". From the set E of equations the construction of the system matrices follow directly. The approach outlined before, making use of the classification strategy allows the general reduction of the i n i t i a l balances into a set of equations smaller in size than that suggested by Vaclavek. The reduced set of balance equa­ tions given by eq. (15), or (18) define now the following weighted least squares problem for the reconciliation of the measurement errors. In the linear case 2

2

Min