استراتژی های راه حل کارآمد برای ساخت شبیه سازی سیستم انرژی
|کد مقاله||سال انتشار||مقاله انگلیسی||ترجمه فارسی||تعداد کلمات|
|11627||2001||9 صفحه PDF||سفارش دهید||6840 کلمه|
Publisher : Elsevier - Science Direct (الزویر - ساینس دایرکت)
Journal : Energy and Buildings, , Volume 33, Issue 4, April 2001, Pages 309-317
The efficiencies of methods employed in solution of building simulation models are considered and compared by means of benchmark testing. Direct comparisons between the Simulation Problem Analysis and Research Kernel (SPARK) and the HVACSIM+ programs are presented, as are results for SPARK versus conventional and sparse matrix methods. An indirect comparison between SPARK and the IDA program is carried out by solving one of the benchmark test suite problems using the sparse methods employed in that program. The test suite consisted of two problems chosen to span the range of expected performance advantage. SPARK execution times versus problem size are compared to those obtained with conventional and sparse matrix implementations of these problems. Then, to see if the results of these limiting cases extend to actual problems in building simulation, a detailed control system for a heating, ventilating and air conditioning (HVAC) system is simulated with and without the use of SPARK cut set reduction. Execution times for the reduced and non-reduced SPARK models are compared with those for an HVACSIM+ model of the same system. Results show that the graph-theoretic techniques employed in SPARK offer significant speed advantages over the other methods for significantly reducible problems and that by using sparse methods in combination with graph-theoretic methods even problem portions with little reduction potential can be solved efficiently.
Detailed simulation of building energy systems involves the solution of large sets of non-linear algebraic and differential equations. These equations emerge from component-based simulators such as TRNSYS  or HVACSIM+ , or equation-based tools such as SPARK  or IDA . Since each of these tools employs a different solution strategy, the question arises as to which strategy is most appropriate for the kinds of equations encountered in the building simulation domain. TRNSYS and HVACSIM+ are both based on subroutines containing algorithmic models of the underlying physics for the represented building system component. TRNSYS, the program with the longest and perhaps most wide spread usage, employs a “block iterative” strategy, calling the component subroutines in a sequence largely determined by the order in which they appear in the user’s problem definition. Convergence is sought using successive substitution of calculated interface variables into the block inputs on the next iteration. If convergence is indeed obtained, solution is often fast since the number of iteration variables is small and there are no vector-matrix operations. However, the successive substitution method is unreliable in general, so convergence is often slow or not obtained at all. The HVACSIM+ program, which is much like TRNSYS at the problem definition level, assembles a vector of the interface variables throughout the model and employs a Newton-like solution strategy. The advantages sought with this approach are robustness and efficiency, since the information in the Jacobian allows calculation of a better next guess than the previous value alone. Indeed, provided that initial values of the interface variables are within the radius of convergence, the solution is approached quadratically. However, HVACSIM+ often is less efficient than TRNSYS in practice because of the need to calculate the Jacobian and solve the linear equation set that it represents at each iteration. Because no reduction is attempted, the size of this set is the total number of block interface variables, ni and solving it is O(ni3). Consequently, the more rapid and robust convergence can be overwhelmed, resulting in the longer runtimes often experienced relative to an equivalent TRANSYS model. The IDA and SPARK modeling environments represent a new departure in that they formulate the model and its solution, in terms of equations rather than the algorithmic subroutines employed in TRNSYS and HVACSIM+. One advantage of this approach is that the models of individual components are input/output free. That is, the same component model can be used for a variety of different input and output designations. This allows conceptual separation of the model from the problem, the model is general, and a specific problem is defined only when a specific set of inputs is designated. Although, the two modeling environments are similar in this important respect, the solution methods employed are radically different. In IDA, the equations are formed as residual formulas, e.g. R=f(x,y,z) and R is forced to zero at the solution point. Residual equations comprising math models of individual physical component are grouped into component models, with variables relevant at the system level exposed to the interface. An IDA system model consists of a set of such component models together with set of coupling equations that, in effect, equate equivalent interface variables at different component models. The coupling equations are all linear, of the identification form p1−p2=0 or the conservation form m1+m2−m3=0, but are large in number so that IDA equation sets tend to be quite large and sparse. For example, a simple example used in IDA reports  has 26 coupling equations augmenting 12 model equations. An innovative solution strategy employing sparse matrix methods in a Newton-like iterative process is used to solve the resulting large, sparse system. Because the size added by the coupling equation set is an obvious detriment to overall solution efficiency, the solver has a “compact solution” option for which the coupling variables and equations are, in some sense, removed. However, the expected theoretical performance improvement is not realized in the implementation, as it appears to in fact decrease solution speed . Nonetheless, there is some anecdotal data (from informal discussions with users) to suggest that IDA may be somewhat faster than HVACSIM+ on some problems. Unfortunately, no benchmark testing results have been reported for IDA, so the actual performance remains uncertain. Like IDA, SPARK  is equation-based. However, SPARK relies upon the mathematical graph for model representation and solution rather than the matrix. To support the graph, rather than expressing equations as residuals, they are expressed in the form x=f(y,z), where the functions are symbolic inverses of the user-supplied model equations. This allows graph algorithms to be used to determine a sequence of function evaluations that leads to the solution. This alone is an advantage, since it eliminates the need for coupling equations entirely. Further, it allows the problem to be decomposed into separately solvable (i.e. strongly connected) components. Within each strong component, if no direct sequence is possible, as evidenced by a cyclic problem graph, a small “cut set” is determined so as to minimize the number of variables involved in the subsequent Newton-like iteration. As a result of these reductions, the size of the Jacobian matrix, and hence, the linear set that must be solved at each Newton iteration, is reduced, often significantly. Consequently, as will be shown in this paper, solution speed is greatly reduced. While ideas from graph theory have been used in connection with equation system solving before , , , , ,  and , SPARK applies graph methods directly to the non-linear equations. The graph, rather than the matrix, is the primary data structure for storing the problem structure and data and as already noted, graph algorithms are employed to determine a solution sequence that operates directly on the non-linear equations. Another distinctive attribute of the SPARK approach is that the model equations are stored individually, rather than packaged into modules and are treated as equations rather than as formulae with assignment (algorithms). Symbolic methods are employed to find explicit inverses of the equations, when possible, to ensure computational efficiency. In these ways SPARK is unique. However, increasingly, simulation software is employing some of the ideas embodied in SPARK. For example, Klein, in collaboration with F. Alvarado, produced the Engineering Equation Solver , which employs decomposition using sparse matrix methods. This is conceptually the same as the strong component decomposition done in SPARK. However, reduction within blocks is not done in this software. In addition, TRNSYS has recently been modified to allow “reverse solving” . This is a move toward input/output free (non-algorithmic) modeling, another tenet of SPARK. Also in the building context, Tang has applied graph-theoretic methods to improve matrix-based solution schemes  and . Although, the SPARK methodology is well established, there has been relatively little systematic comparison of solution speed between SPARK and alternative methods available for solving large sets of equations, such as arise in building simulation. In order to begin to fill this gap, a simple benchmarking experiment was designed. Two problems sets were defined: (a) a replicated set of four non-linear equations, and (b) the Laplacian equation, i.e. heat conduction, in a two dimensional grid of various sizes. These two problems, while somewhat removed from mainstream building system simulation, were selected to represent the endpoints in the degree to which problems are suited to the methods used in SPARK. To complement findings from these simple problems, the study was extended to include actual building HVAC systems models of considerable complexity. The system selected is one previously studied by Haves  using a different building simulation tool, thus, providing opportunities for direct comparison. This work was reported at the Building Simulation ’99 Conference  in Kyoto. Discussion at the Kyoto conference raised the question of how effective the SPARK graph-theoretic methods are when compared to state-of-the-art sparse matrix solution methods applied directly to the unreduced problem, as is done in IDA. Specifically, are the techniques routinely applied in sparse matrix packages fully equivalent to SPARK methods, thereby, making it unnecessary to carryout graph-theoretic reduction directly on the non-linear problem? To address this question, one of the problems reported in the Kyoto paper was solved using the sparse matrix package used in IDA, SuperLU . Because SuperLU appears to be one of the most advanced sparse matrix packages, it would seem that if the answer to the question is positive, then it should solve faster than the SPARK implementation. This is shown not to be the case. That is, the new results confirm that the SPARK methods, at least for problems with significant reduction potential, are significantly faster than sparse methods alone. In addition to these new results, more discussion is provided on the comparison to HVACSIM+. Otherwise, the results here are the same as in the Kyoto paper and are presented here for the convenience of the reader.
نتیجه گیری انگلیسی
The principle conclusion that can be drawn from this work is that SPARK outperforms conventional and sparse matrix methods for solution of problems that can be decomposed and/or reduced with graph-theoretical techniques. Roughly speaking, execution time savings will be O(mr3) where r is the ratio of the largest cut set size to the number of equations in the problem, and m is the number of strongly connected components into which the problem partitions. Typical HVAC air flow systems simulation models, including associated controls, are among the problems that benefit from the SPARK solution methodology. The reduction techniques produced close to the maximum reduction in the benchmark HVAC problem, and there are indications that similar reductions can be expected in the broad class of problems involving flow networks and their associated control systems. Reductions in execution time of more than an order of magnitude can be expected relative to full-matrix solvers, such as HVACSIM+. While direct benchmarks were not carried out for IDA, our indirect tests suggest that the sparse methods employed in that program will not be comparable to SPARK for problems in this class. On the other hand, problems characterized by a high degree of interconnectivity, such as energy, mass or momentum transport in homogenous media, allow limited reduction and, therefore, are not prima fascia candidates for SPARK solution methods. However, by proper coercion of matching and cut set selection, significant execution time reduction can still be achieved. Finally, since the reduced Jacobian in homogeneous transport problems is still very sparse, conventional sparse matrix methods can be beneficially applied after SPARK reduction. When this is done, SPARK can be competitive with sparse solvers for homogeneous transport problems, and probably superior for system simulations in which reducible and homogeneous transport components must both be solved.