{'fraction_non_alphanumeric': 0.03743880729862038, 'fraction_numerical': 0.008066310636404095, 'mean_word_length': 4.427838164251208, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Structural analysis of high-index DAE for process simulation

This paper deals with the structural analysis problem of dynamic lumped process high-index DAE models. We consider two methods for index reduction of such models by differentiation: Pryce's method and the symbolic differential elimination algorithm rifsimp. Discussion and comparison of these methods are given via a class of fundamental process simulation examples. In particular, the efficiency of the Pryce method is illustrated as a function of the number of tanks in process design.


Introduction
Differential-algebraic equations (DAE) systems arise naturally when modelling many dynamic systems. Dynamic process models and their properties form the background of any process control activity including model analysis, model parameter and structure estimation, diagnosis, regulation or optimal control. In particular, the structural analysis of dynamic lumped process models forms an important step in the model building procedure [1], and it is used for the determination of the solvability properties of the model. Furthermore, the dynamic lumped process models often require the consistent initial conditions and solution of high-index differential-algebraic systems.
The index is a notion used in the theory of DAEs for measuring the distance from a DAE to its related ODE. High-index DAE systems need prolongation (differentiation) to reveal all the system's constraints, and to determine consistent initial conditions. The key steps include identifying all hidden constraints on formal power series solutions in the neighborhood of a given point, and are required to prepare the system for numerical integration. So for such differential systems, prolongation is unavoidable. In the present work, Pryce developed a Taylor series method based on his structural analysis method [2,3] and on Pantelides' work in [4]. Pantelides' method gives a systematic way to reduce high-index systems of differential-algebraic equations to lower index, by selectively adding differentiated forms of the equations already present in the system. It is implemented in several significant equation-based simulation programs such as gPROMS [5], Modelica [6] and EMSO [7]. However, the algorithm can fail in some instances. Pryce's structural analysis is based on solving an assignment problem, which can be formulated as an integer linear programming problem. It finds all the constraints for a large class of ODE using only prolongation, which can be considered as fast prolongation method. Corless et al. show Pryce's method can be extended to give a polynomial cost method for numerical solution of differential algebraic equations [8]. Wu et al. give a differential algebraic interpretation of Pryce's method for ODE, which generalizes to a certain class of PDE for finding missing constraints [9]. Mani shows how pre-symbolic simplification can usefully extend the applicability of the Pryce method on models produced by MapleSim [10].
In [11,12], Leitold et al. propose the structural analysis of process models using their representation graphs for the determination of the most important solvability property of lumped dynamic models: the differential index. Their graph-theoretical method depends on the change in the relative position of underspecified and overspecified subgraphs and has an effect to the value of the differential index for complex models. If these subgraphs move further from their original positions the value of differential index increases. In this paper, we consider other approaches for the structural analysis of dynamic lumped process models for high-index DAE systems. In particular, we consider Pryce's method and the symbolic differential elimination package rifsimp. Pryce's method is a robust and reliable method for remedying the drawback of the approach [11,12] and doing so automatically. This is a powerful way to determine the index of the system, its number of degrees of freedom, and exactly which components should be given initial values. The key idea is taken from Pryce's signature-method. The nice feature of the work is a simple and straightforward method for analysing the structure of a differential algebraic system. The rest of this paper is organized as follows. Section 2 describes Pryce's method and introduces the symbolic differential elimination package rifsimp in Maple. Section 3 gives the structural analysis of simple process models using these approaches. Section 4 gives some experimental results. The final section concludes this paper.

Preliminaries
In this section, we give a brief review of Pryce's method and some remarks, and present the symbolic differential elimination with Maple's rifsimp package.

Pryce's method
We review below the main steps of Pryce's structural analysis and the corresponding algorithm following [2,3]. We consider an input system of n equations f = 0, where f = (f 1 , f 2 · · · , f n ) in n dependent variables x 1 (t), x 2 (t), · · · , x n (t).
Step 1. Form the n × n signature matrix Σ = σ ij of the DAE, where highest order of derivative to which the variable x j appears in equation f i , or − ∞ if the variable does not occur.
Step 2. Solve an assignment problem to find a HVT (highest value transversal), which is a subset of indices (i, j) describing just one element in each row and each column, such that σ ij is maximized and finite.
Step 3. Determine the offsets of the problem, which are the vectors c = (c i ) 1≤i≤n , d = (d j ) 1≤j≤n , the smallest such that d j − c i ≥ σ ij , for all 1 ≤ i ≤ n, 1 ≤ j ≤ n with equality on the HVT. This problem can be formulated as an integer linear programming problem (LPP) in the variables c = (c 1 , c 2 , · · · , c n ) and d = (d 1 , d 2 , · · · , d n ): The structural index is then defined as The structural index is no less that the differential index on first order DAE.
Step 4. Form the n × n system Jacobian matrix J where Step 5. Choose a consistent point. If J is non-singular at that point, then the solution can be computed with Taylor series or numerical homotopy continuation techniques in a neighborhood of that point. Remark 1. The computation of c and d only involves the information on differential order and is consequently very fast in Step 3 of Pryce's method. This problem is dual to the assignment problem. The time complexity of the assignment problem can be done at polynomial cost by using the Hungarian Method [13]. Generally, such problems can be solved very efficiently in practice.

Remark 2.
After we obtain the number of prolongation steps c i for each equation from Step 3 of Pryce's method, we can enlarge the system of equations using c. We assume c 1 ≥ c 2 ≥ · · · ≥ c n , and let k c = max i c i = c 1 , which is closely related to the index of DAEs. Consider the equations obtained by taking the t-derivative of f . . .
where (l) denotes d l /dt l 1 . By the definition of σ ij and inequalities (1b), the derivatives of the x j that occur in equations (2) all lie in this set: Represent (3) as a vector X, then (2) can be written as a system where k d = max j d j = d 1 , and assume d 1 ≥ d 2 ≥ · · · ≥ d n . In particular, for 0 ≤ i ≤ k c , F i has fewer variables than F i+1 . The block structure form B i (0 ≤ i < k c ) in the case c i = c i+1 + 1 is given in Table 1.
Remark 3. Fast prolongation produces a simplified system to which a standard numeric solver can be efficiently applied.

Symbolic differential elimination
Maple's rifsimp package can be used to simplify small-and middle-scale DAEs, and overdetermined systems of polynomially nonlinear PDEs or ODEs and inequations to a more useful form [14]. For the DAEs and ODEs the only independent variable is time. It processes systems of polynomially nonlinear PDEs with dependent variables u 1 , u 2 , · · · , u n , which can be functions of several independent variables.
The key idea of algorithm is substitution and differential elimination, which requires a ranking to be defined on the dependent variables and their derivatives. A basic step of differential elimination algorithms linearly appearing is to write the system in solved form with respect to each highest ranked derivative. It is treated by methods involving a combination of Gröber bases and Triangular decompositions. Another key step in such algorithms is the taking of integrability conditions between equations.
The rifsimp algorithm is essentially an extension of the Gaussian elimination to DAEs and systems of nonlinear PDEs. It differentiates the leading nonlinear equations and then reduce them with respect to the leading linear equations. If zero is obtained, it means that the equation is a consequence of the leading linear equations. If not, it means that this equation is a new constraint to the system. This is repeated until no new constraints are found. See Section 3.3 for a simple example.

Structural analysis of simple process models
In this section, we apply the above techniques to structure analysis of dynamic lumped process models DAE systems. The model is taken from dynamic process simulation and multi-domain modeling and simulation of complex systems. Here, the cascade of perfectly stirred tank reactors yields the basic examples of the paper, see Fig.1.

Main algorithm
Suppose a system consists of k perfectly stirred tank reactor. A feed of concentration C 0 (t) is fed into the first tank. The concentrations in the tanks are described by the following equation: where C i (t) is the concentration in the tank i, q(t) is the flow rates from tank to tank and V i (t) is the fixed volume of the tank i. Thus the flow rates between the tanks q i (t) are all the same that q i (t) = q(t) = Q(t), where Q(t) is a specified function of t.
In general, there are two different specifications that can be added to these equations according to the modelling goal: a) in dynamic simulation studies the feed concentration C 0 (t) is given by C 0 = Fig. 1: Sequence of liquid tanks, where for the i-th tank F i−1 and F i (i = 1, 2, · · · , k) are the inlet and outlet flow rate, C i is the concentration and V i is the fixed volume of the i-th tank.
When applied to process system a) and b), the main steps of our approach are: Step 1. Construct the original system as follows based on the equation (5): where k is the number of tanks.
Step 2. Obtain the original condition and add it into F . There are two cases: a) in dynamic simulation the tank feed concentration C 0 (t) is given as a function of time then get 2k + 1 equations in 2k + 1 unknowns: C 0 (t) = C0(t), this is essentially index 1 no matter what k is, and is a trivial system. Symbolic differential elimination can be used for case a); b) in dynamic design the product concentration C k (t) is given as a function: C k (t) = Ck(t). It is a nontrivial system, which is high-index as k increased.
Step 3. Call the Pryce's algorithm of Section 2 to solve the vector c and d, and enlarge the initial system by fast prolongation. Alternatively symbolic differential elimination can be used for case b).
Step 4. Check the Jacobian matrix J with the coefficients of highest derivatives equations and compute the consistent point.

Remark 4.
Based on the structure analysis of Pryce's method, it is practical and efficient for dynamic lumped process models DAE systems. In general, the goal of structural analysis of DAEs is to differentiate the equations in such a way that the coefficient (Jacobian) matrix of the highest derivatives is non-singular. It means that some equations need prolongations on independent variable to balance the coefficients matrix. So it can computing Jacobian matrix of the lower derivatives equations by an iterative procedure for finding all consistent points.
Remark 5. Compared with the structural analysis of process models using their representation graphs method, the advantages of our algorithm are: • We efficiently apply the fast numerical and symbolic computations to a wide variety of physical models generated by the equation-based technique.
• For the large models, we can keep the structural index of system remaining unchanged. Moreover, the prolongation system has a favorable block triangular structure to compute the missing initial conditions more efficiently.
Based on the above ranking, we can obtain the sequence of solving initial value problem for the dynamic lumped process models DAE systems. It is equivalently the block-triangular system that has full row rank for each k.
From (6), F and the original condition C k (t) = Ck(t) have components. The number of variables is Considered as M algebraic equations in N variables, it has a solution (t * , X * ), where and that J is non-singular. Therefore, (t * , X * ) is a consistent point. In a neighborhood of the point (t * , X * ), the solution manifold has D degrees of freedom [3].
The above shows that if we find a solution (t * , X * ), this is a consistent point, and if the number of degrees of freedom D > 0 there are other consistent points nearby for the same t.
Theorem 1. The general dynamic lumped process models DAE systems have degrees of freedom D = d j − c i = k, where k is the number of tanks. The structural index is k + 1.

Proof. From Lemma 1, we have degrees of freedom
Because the d 1 = 0, the structural index is max i (c i ) + 1 = k + 1.
Here, we give the degrees of freedom and structural index of the general dynamic lumped process models DAE systems that is a function of the number of tanks k.

A detailed example
Example 1. We propose a simple example to set the number of tanks k := 3 case a) to illustrate the rifsimp algorithm.
Step 1: Construct the original system as follows: Step 2: Obtain the original condition C 0 (t) = C0(t), and add it to sys; Step 3: Call rifsimp algorithm to reduce the system as follows: Remark 6. In this paper, we consider the modelling goal for case a) by the rifsimp algorithm. The main reason is the specific structure of models, which is the quasi-triangular system and has C 0 (t) = C0(t) specified. Therefore, it is only simple check. But it becomes rapidly more complicated as the number k increased for case b).
Example 2. We propose a simple example to set the number of tanks k := 4 case b) and illustrate our algorithms.
Step 1: Construct the original system as follows: Step 2: Obtain the original condition C 4 (t) = C4(t), and add D 3 , C 4 ; q, q (1) , q (2) , q (3) }, equations: 3 , D 10 }. The system Jacobian J is: Step 5: Computing the Jacobian matrix J = − , which is non-singular. And then we can compute the consistent point by numerical methods, such as Taylor series methods, Homotopy methods.
Remark 7. In particular, we can obtain the coefficient (Jacobian) matrix that is sparse dramatically. For the highest derivatives, the determinant of Jacobian matrix is det J = − q(t) k V1(t)V2(t)···V k (t) where k is the number of tanks.

Experimental Results
An efficient practical implementation of Pryce's method is in Maple. The following examples run in the platform of Maple and Inter(R) Core(TM) i3 2.40GHz, 2.00G RAM. We give some experimental results using symbolic differential elimination and fast prolongation for structural analysis of dynamic lumped process models DAE systems. In Fig. 2, we present the time for symbolic differential elimination by rifsimp of Maple package and fast prolongation as the number of tank reactors k increased. In Fig. 3, we present the memory usage for symbolic differential elimination by rifsimp of Maple package and fast prolongation as the number of tank reactors k increased.
The system Jacobian is very sparse for case b). Its determinants are evaluated symbolically to be det J = − q(t) k V1(t)V2(t)···V k (t) where k is the number of tanks, and is non zero. In other examples the alternative is to usually find an approximate point satisfying the constraints by numerical method (eg. Homotopy method) and evaluate the condition number of the Jacobian to carry out he validation.  • The time of structural analysis of dynamic lumped process models DAE systems for fast prolongation is small and ultimately grows slowly in the range of degrees of freedom considered. The time for symbolic differential elimination method grows much faster. The main reason is that fast prolongation only needs to solve an integer linear programming problem, but the symbolic differential elimination needs a large number of eliminations and differentiates. Therefore, the symbolic differential elimination is more difficult for the general high-index DAE systems.
• The memory shows steady growth as the number k increases. The memory usage of symbolic differential elimination grows very quickly.
The above analysis and experimental results, motivates consideration of hybrid techniques involving a combination of symbolic differential elimination and fast prolongation for large DAE models. However, symbolic computations have the disadvantage of intermediate expression swell. In the future, we would like to consider a combination of partial symbolic differential elimination and fast prolongation to model and simulate realistic physical models. We hope to give the specific structural analysis algorithms that exploit the form of systems appearing in applications.

Conclusion
In this paper, we have investigated the high-index structural analysis problem for the class of dynamic lumped process models DAE systems by Pryce's method and symbolic differential elimination. We designed the algorithm to automatically analysis the structural of simple process models, and showed that the rifsimp algorithm of Maple package reduces the original system to standard form. We also gave the degrees of freedom and structural index of the dynamic lumped process models DAE systems that is a function of the number of tanks k. Moreover, those approached can be generalized to a wide variety of physical models and analyzed the structural of square and non-square nonlinear DAE and PDAE systems.