+ All Categories
Home > Documents > Introducing boundary conditions in semi-quantitative simulation · 2003. 8. 8. · Careful...

Introducing boundary conditions in semi-quantitative simulation · 2003. 8. 8. · Careful...

Date post: 10-Nov-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
10
Introducing boundary conditions in semi-quantitative simulation Abstract : Boundary value problems specifying how external influences on dynamic systems vary over time greatly extend the scope of qualitative reasoning tech- niques, enabling them to achieve a much wider appli- cability. This paper discusses conceptual and practical aspects that underlie the problem of handling bound- ary conditions in SQPC, a sound program for model- ing and simulating dynamic systems in the presence of incomplete knowledge. Issues concerning the on- tology (actions us . measurements), the temporal scale (instantaneous vs . extended changes), the impact of discontinuity on model structure and the consequences of incompleteness in predictions are discussed . On the basis of the experimentation done so far it is claimed that given the generality of the assumptions underly- ing the techniques presented in the paper, and given the relatively low computational cost that is often re- quired to solve a boundary value problem, they are viable and can be utilized to widen the applicability spectrum of Qualitative Reasoning . 1 Introduction Though qualitative simulation [Kuipers, 1994 ; Bo- brow, 1993] plays a crucial role in many Qualitative Reasoning (QR) tasks (such as control, diagnosis or design), few QR tools are able to deal with boundary conditions which specify how external influences on systems vary over time . In fact, except for a few cases (like [Forbus, 1989]), no qualitative simulator takes as input a description of how certain variables evolve over time, and lets them affect the simulation . These tools solve more or less sophisticated initial value problems where initial conditions of autonomous systems are given. Dealing with non-autonomous systems greatly extends the scope of QR techniques, enabling them to achieve a much wider applicability. In fact, they could encompass capabilities such as : " simulating, monitoring and diagnosing systems in realistic situations, where they are affected by time-varying controls and environmental parame- ters ; Giorgio Brajnik Dipartimento di Matematica e Informatica Universiti di Udine Udine - Italy Ph : +39 (432) 272 .210 Fax: +39 (432) 510 .755 giorgio®dimi .uniud .i t " evaluating the effects of control laws (i.e . se- quences of actions) applied to specific systems in dynamically changing situations; " evaluating consistency of models of dynamic sys- tems with respect to sequences of measurements of observable variables (for data interpretation or theory validation) . Consider for example the problem of water supply control . A lake has a dam with floodgates that can be opened or closed to regulate the water flow through power generating turbines, the water level (stage) of the lake, and the downstream flow . The goal of a con- troller is to provide adequate reservoir capacity for power generation, consumption, industrial use, and recreation, as well as downstream flow . In exceptional circumstances, the controller must also work to mini- mize or avoid flooding both above and below the dam . This task is both difficult and vitally important to the residents of surrounding areas . Careful evaluation of the effect of actions in critical and dynamically chang- ing situations is crucial for decision making, and sound modeling and simulation tools could be extremely use- ful to support this activity. They could also be used to evaluate empirically derived models and parameters, or to forewarn of undesired possible future situations . This domain is challenging for existing approaches to modeling and simulation, for it poses many require- ments . Several forms of incomplete information ap- pear in this domain : for example, the precise shape and capacity of lakes or reservoirs is rarely known ; the outflow from opening a dam's floodgates is only crudely measured ; empirical data on the level/flow- rate curve for rivers becomes less and less accurate when flood conditions approach . Nonetheless, rough bounds on quantities are usually accurate enough to support decision. Pure qualitative reasoning tech- niques do not exploit the partial information available and consequently provide too weak predictions . Tradi- tional numeric methods require much more precise in- formation than is available, forcing modelers to make assumptions which may invalidate results and which may be difficult to evaluate. New models need to be
Transcript
Page 1: Introducing boundary conditions in semi-quantitative simulation · 2003. 8. 8. · Careful evaluation of ... independentfrom thespecific frameworkadopted:" Ontology: which ontology

Introducing boundary conditions in semi-quantitativesimulation

Abstract : Boundary value problems specifying howexternal influences on dynamic systems vary over timegreatly extend the scope of qualitative reasoning tech-niques, enabling them to achieve a much wider appli-cability. This paper discusses conceptual and practicalaspects that underlie the problem of handling bound-ary conditions in SQPC, a sound program for model-ing and simulating dynamic systems in the presenceof incomplete knowledge. Issues concerning the on-tology (actions us . measurements), the temporal scale(instantaneous vs . extended changes), the impact ofdiscontinuity on model structure and the consequencesof incompleteness in predictions are discussed . On thebasis of the experimentation done so far it is claimedthat given the generality of the assumptions underly-ing the techniques presented in the paper, and giventhe relatively low computational cost that is often re-quired to solve a boundary value problem, they areviable and can be utilized to widen the applicabilityspectrum of Qualitative Reasoning .

1 IntroductionThough qualitative simulation [Kuipers, 1994; Bo-brow, 1993] plays a crucial role in many QualitativeReasoning (QR) tasks (such as control, diagnosis ordesign), few QR tools are able to deal with boundaryconditions which specify how external influences onsystems vary over time . In fact, except for a few cases(like [Forbus, 1989]), no qualitative simulator takes asinput a description of how certain variables evolve overtime, and lets them affect the simulation . These toolssolve more or less sophisticated initial value problemswhere initial conditions of autonomous systems aregiven. Dealing with non-autonomous systems greatlyextends the scope of QR techniques, enabling them toachieve a much wider applicability. In fact, they couldencompass capabilities such as :

" simulating, monitoring and diagnosing systems inrealistic situations, where they are affected bytime-varying controls and environmental parame-ters ;

Giorgio BrajnikDipartimento di Matematica e Informatica

Universiti di UdineUdine - Italy

Ph : +39 (432) 272.210Fax: +39 (432) 510.755giorgio®dimi.uniud .i t

" evaluating the effects of control laws (i.e . se-quences of actions) applied to specific systems indynamically changing situations;

" evaluating consistency of models of dynamic sys-tems with respect to sequences of measurementsof observable variables (for data interpretation ortheory validation) .

Consider for example the problem of water supplycontrol . A lake has a dam with floodgates that can beopened or closed to regulate the water flow throughpower generating turbines, the water level (stage) ofthe lake, and the downstream flow . The goal of a con-troller is to provide adequate reservoir capacity forpower generation, consumption, industrial use, andrecreation, as well as downstream flow . In exceptionalcircumstances, the controller must also work to mini-mize or avoid flooding both above and below the dam.This task is both difficult and vitally important to theresidents of surrounding areas . Careful evaluation ofthe effect of actions in critical and dynamically chang-ing situations is crucial for decision making, and soundmodeling and simulation tools could be extremely use-ful to support this activity. They could also be used toevaluate empirically derived models and parameters,or to forewarn of undesired possible future situations .This domain is challenging for existing approaches tomodeling and simulation, for it poses many require-ments . Several forms of incomplete information ap-pear in this domain : for example, the precise shapeand capacity of lakes or reservoirs is rarely known ;the outflow from opening a dam's floodgates is onlycrudely measured; empirical data on the level/flow-rate curve for rivers becomes less and less accuratewhen flood conditions approach . Nonetheless, roughbounds on quantities are usually accurate enough tosupport decision. Pure qualitative reasoning tech-niques do not exploit the partial information availableand consequently provide too weak predictions . Tradi-tional numeric methods require much more precise in-formation than is available, forcing modelers to makeassumptions which may invalidate results and whichmay be difficult to evaluate. New models need to be

Page 2: Introducing boundary conditions in semi-quantitative simulation · 2003. 8. 8. · Careful evaluation of ... independentfrom thespecific frameworkadopted:" Ontology: which ontology

constructed to cope with changes in relevant entities,operating modes, and modeling assumptions. Accu-rate results (instead of approximate ones) are neededto perform an adequate risk evaluation and forewarn-ing.Considering boundary conditions in qualitative sim-

ulation poses a number of basic questions that areindependent from the specific framework adopted:

" Ontology : which ontology better suits the aim?Some approaches already known in literature ex-ploit the concept of action, while others don't rep-resent actions at all but focus on measurements.What is the relationship between the two con-cepts?

Temporal scale: shall instantaneous orextendedactions be allowed? The former may be adequatein certain situations but they introduce disconti-nuities difficult to handle, while the latter mayimpose a too detailed analysis .

" Model structure: how do boundary conditions af-fect the model? Changes in boundary conditionsmay call for changes in the model to cope withvarying modeling assumptions. Do these changesrequire the same mechanism for revising the modelas the ones required when operating regions arecrossed? How do these changes interact with thechosen temporal scale?

" Incomplete knowledge and data : how will incom-pleteness in models and incompleteness in bound-ary conditions affect predictions? What is the sen-sitivity of predictions with respect to such kindsof incompleteness? What is needed to control theadditional ambiguity of predictions caused by con-sidering boundary conditions? How does qualita-tive time used in simulation correspond to "real"time used in observing and acting upon the sys-tem?

This paper discusses the main conceptual and prac-tical aspects that underlie the problem of handlingboundary conditions in SQPC (Semi-QuantitativePhysics Compiler), an implemented program fulfillingthe above mentioned requirements for modeling andsimulating dynamic systems.

2 Semi-Quantitative Physics Com-piler

SQPC [Farquhax and Brajnik, 1995] performs self-monitoring simulations of incompletely known, dy-namic, piecewise-continuous systems. It monitors thesimulation in order to detect violations of model as-sumptions. When this happens it modifies the modeland resumes the simulation.SQPC is built on top ofthe QSIM qualitative simula-

tor [Kuipers, 1986 ; Kuipers, 1994] and extends QPC

[Faxquhar, 1994] . The input to SQPC is a domaintheory and scenario specified in the SQPC modelinglanguage . A domain theory consists of a set of quanti-fied definitions, called modelfragments, each of whichdescribes some aspect of the domain, such as physicallaws (e.g. mass conservation), processes (e.g. liquidflows), devices (e.g . pumps), and objects (e.g . con-tainers) . Each definition applies whenever there ex-ists a set of participants for whom the stated condi-tions are satisfied. SQPC smoothly integrates sym-bolic with numeric information, and is able to pro-vide useful results even when only part of the knowl-edge is numerically bounded. The domain theoryincludes symbolic or numeric magnitudes which rep-resent specific real numbers known with uncertainty(numeric magnitudes constrain such numbers to liewithin given ranges) ; dimensional information; enve-lope schemas (they state the conditions under whicha specific monotonic function over a tuple of variablesis bounded by a pair of numeric functions) and tabu-lar functions (numeric functions defined automaticallyby interpolating multi-dimensional data tables). Thespecific system or situation beingmodeled is describedby the scenario definition, which lists objects that areof interest, some of the initial conditions and relationsthat hold throughout the scenario .

SQPC employs (inheriting it from QPC) ahybrid ar-chitecture in which the model building portion is sep-arated from the simulator. The domain theory andscenario induce a set of logical axioms. SQPC usesthis database oflogical axioms to infer the set of modelfragment instances that apply during the time coveredby the database (called the active model fragments) .Inferences performed by SQPC concern structural re-lationships between objects declared in the scenario,and the computation of the transitive closure of or-der relationships between quantities . A database witha complete set of model fragment instances definesan initial value problem which is given to QSIM interms of equations and initial conditions . If any ofthe predicted behaviors crosses the operating regionconditions the process is repeated . A new databaseis constructed to describe the system as it crosses theboundaries of the current model, then another com-plete set of active model fragments is determined andanother simulation takes place.

The output of SQPC is a directed rooted graph,whose nodes are either databases or qualitative states .The root of the graph is the initial database, and apossible edge in the graph may: (i) link a databaseto a refined database (obtained by adding more facts,either derived through inference rules or assumed bySQPC when ambiguous situations are to be solved) ;(ii) link a complete database to a state (which is oneof the possible initial states for the only model deriv-able from the database) ; (iii) link a state to a succes-sor state (this link is computed by QSIM); and (iv)

Page 3: Introducing boundary conditions in semi-quantitative simulation · 2003. 8. 8. · Careful evaluation of ... independentfrom thespecific frameworkadopted:" Ontology: which ontology

link a state to a database (the last state of a be-havior that has crossed the operating region to thedatabase which describes the situation just after thetransition occurred) . Each path from the root to aleaf describes one possible temporal evolution of thesystem being modeled and each model in such pathsidentifies a distinct operating region of the system .SQPC is proven to construct all possible sequences ofinitial value problems that are entailed by the domaintheory and scenario . Thanks to QSIM correctness, itproduces also all possible trajectories .

3

Boundary conditions and automatedmodeling

The problem of performing a self-monitored simula-tion is extended by providing as input also a streamof measurements and by requiring that the outputconsists of all possible trajectories that are compati-ble with measurements .A measurement is a time-tagged mapping of values

to a set of variables, which can be either exogenous,(i.e . representing quantities that can be affected by ex-ternal influences), or non-exogenous. The stream ofmeasurements considered in a simulation must satisfythe following two assumptions : all critical points ofall exogenous variables should be measured (samplingassumption) ; and measurements should be chronolog-ically ordered .For generality, we don't require other properties onmeasurements . In particular, they need not includeall variables of the system ; they need not concern eachtime the same set of variables ; they need not be theresult of a periodic sampling process, and their timetags and measured values may be expressed as inter-vals over the real numbers to cope with imprecise dataand noise processing .The following interdependent standpoints provide a

rationale for these assumptions and are tentative an-swers to some of the questions raised in the introduc-tion .

Ontology. An action is an activity done by someagent affecting some exogenous variable, while achange in such variables is the effect of an action . Weprefer to explicitly represent changes and introduceonly implicitly actions because appropriate treatmentof changes is needed even in case actions are explicitlyrepresented . Explicit representation of actions (likethe one adopted in [Forbus, 1989]) could be useful inapplications requiring the generation of control laws(i.e . deciding when to apply a certain action), an is-sue not tackled in this paper.Measurements may or may not yield evidence of

some action : they do it if they concern exogenous vari-ables (the measured value may reveal that a changeoccurred or is occurring) ; they don't if they concernonly non-exogenous ones .

Temporal Scales .

We envision two kinds of action,(hence of changes) : those with a finite duration (extended changes) and those occurring instantaneous13(instantaneous changes) . Both are worth consideringinstantaneous changes may be used when the time-scale of the action is much smaller than the system';one and limited knowledge is available for modelingthe transient during which the action takes place, orthe transient is not interesting enough. For exam-ple, given a medium-term analysis (days or weeks), anin-depth investigation of the transient occurring on atam-lake system during a control action of openinga gate is uninteresting . Such a change can thereforebe conceptualized as instantaneous . Similarly if noknowledge is at hand for modeling the dynamics dur-ing the transient, the effects of operating an electricalswitch can be conceptualized again as instantaneous .On the other hand, extended changes could be prof-itably used when the actual duration is known andpredictions of events occurring during the action arewanted ; for example, to predict what actually hap-pens inside a servo-controlled turbine when an oper-ator changes the power level requested to the turbine .While actions (and changes) may be instantaneous

or not, measurements are assumed to be instantaneousevents . The sampling assumption implies that the be-ginning and end of an extended change are marked bymeasurements, whereas the occurrence of an instan-taneous change is marked by a single measurement .Therefore, during a segment (the time interval be-tween two consecutive measurements of the same vari-able) an exogenous variable may be either constant orstrictly monotonic . Of course, some knowledge is re-quired to correctly interpret a measurement (whetherit marks an instantaneous change or not) since by it-self a measurement does not provide this information .This knowledge derives (in the proposed framework)from properties of measured exogenous variables de-clared in the scenario description . Such variables maybe subject either to extended changes or to instanta-neous ones, but not both.

Continuity.

Continuity is a fundamental assump-tion for qualitative reasoning techniques used to con-strain the possible inter/inter-model changes that canoccur in a system . In order to manage instantaneouschanges, we assume that :

1 . state variables (variables whose time derivative isincluded in the model) are piecewise-Cl (i.e . con-tinuous anywhere, and differentiable everywherebut in a set of isolated points) ;

2 . non-state variables are at least piecewise-G'° (i.e .continuous anywhere but in a set of isolatedpoints) ;

Page 4: Introducing boundary conditions in semi-quantitative simulation · 2003. 8. 8. · Careful evaluation of ... independentfrom thespecific frameworkadopted:" Ontology: which ontology

If an instantaneous change occurs on exogenous vari-ables 0 = {Vi . . . V,,}, in order to correctly deal withthe transient, one needs to determine how the discon-tinuity propagates from A onto other variables of themodel. Fortunately, the abovementioned continuityassumptions suffice to support a sound and effectivecriterion (termed continuity suspension) for identify-ing all the variables that are potentially affected bythe discontinuity of variables in A .Given a model .M, let us say that a variable Z is

totally dependent on a set of variables A iff the modelincludes a non-dynamic, continuous functional rela-tion R(Xi . . . . Xi, Z, Xi+i . . . . Xn) with n >_ 1 suchthat Vi : (Xi E A or Xi is totally dependent on A) .For example, if the model includes the con-straint ((M (+ +)) X Y Z) then X is totally dependent

on

{Y, Z}.

Furthermore,

letTD(A) = {X JX is totally dependent on A} .Let £ be the set of exogenous variables and S the

set of state variables of M. Then define PDo (theset of variables that are potentially affected by thediscontinuity of variables in A) as the maximum setof variables of .M that satisfies :

1 . 0 C PDo (since variables in A are affected bythe discontinuity) ;

2 . S fl PDo = 0 (by continuity assumption, PDocannot contain any state variable) ;

3 . £r1PDA = A (by the sampling and continuity as-sumptions, unmeasured exogenous variables mustbe continuous) ;

4 . TD(S U £ - A) fl PDo = 0 (by definition of to-tal dependency, if Z totally depends on a set ofnecessarily continuous variables, then Z must becontinuous too and cannot belong to PDo).

Continuity suspension handlesdiscontinuous changes of variables in A by comput-ing the set PDo so that, during a transient, variablesin PDo are unconstrained and can therefore get anynew value, whereas those not in PDo will keep theirprevious value.Correctness of continuity suspension is easy to prove:

if PDo were equal to the set of all the variables in themodel, then no restriction would be in effect duringthe transient, yielding all possible value changes, in-cluding the "true" ones . Since conditions 2, 3 and4 would remove from PDo only necessarily continu-ous variables, no variable affected by A will be everremoved from PDo .Unfortunately, continuity suspension is not com-

plete, for the set PDo may include also variables thatare not affected by A (for example, if y = dt belongsto the model and y 0 TD(S U £), then y E PDo).

Rules 1-4 are not sufficiently strong to exclude cer-tain variables from PDo . They exclude only vari-ables that are necessarily continuous, leaving in PDothose that are necessarily discontinuous (like those in0) plus those that are possibly discontinuous (like y) .On the other hand, since PDo is determined on thebasis of the model holding before the transient takesplace, and nothing is known about what happens dur-ing the transient, soundness demands that only nec-essarily continuous variables are removed from PDo .Non-exogenous variables can be measured too, but

unlike exogenous ones their behavior during a segmentis not known in advance andthey do not introduce dis-continuities . Such measurements greatly refine predic-tions (by restricting predicted ranges or by rejectingpredictions that are inconsistent with measured val-ues), if they simultaneously involve several variables .

Model structure. Actions may affect the modelstructure in two ways .First, they may affect the set of modeling assump-

tions, calling for a revision of model structure. Modelrevision may occur either during an extended change(e.g . when a valve is being opened the flow regime ofthe fluid may change from laminas to turbulent), orduring the transient of a discontinuous change (e .g .if opening a valve is an instantaneous action, thena discontinuous change propagates onto other vari-ables, and new models need to be defined to accu-rately cover the possible consequences of such a quickaction) . In the former case no discontinuity is intro-duced, reducing model revision to the "normal" re-vision triggered by the crossing of an operating re-gion (in the previously mentioned example, the regionbeing crossed refers to the variable Reynolds-numberbecoming greater than a certain threshold) . In the lat-ter case (model revision occurring during an instanta-neous change) the discontinuity in PDo weakens theprocess of determining the next model(s) : referringto the previous example, the discontinuous change invalve section affects other variables (like fluid flow,speed, etc.) whose "next" value will not be con-strained by continuity, making it difficult to ascertainwhether the flow, after the change, will still be laminaror will became turbulent . In fact, though conceptu-ally being determined by state variables, variables inPDo - A usually cannot be given a unique new valueif continuity is relaxed because of the inherent ambi-guity of the qualitative algebra of signs.Second, two modeling decisions may be inconsistent .

The decision of determining the set of exogenous vari-ables and the decision of determining the set of statevariables may lead to two kinds of conflicts: (i) ifsome state variables are treated as exogenous the re-sulting model may be overconstrained . Analyticallythis would lead, in general, to a badly defined modelwhereas qualitatively this is not necessarily true, since

Page 5: Introducing boundary conditions in semi-quantitative simulation · 2003. 8. 8. · Careful evaluation of ... independentfrom thespecific frameworkadopted:" Ontology: which ontology

the incomplete knowledge used in the model and statemay supply additional degrees of freedom ; (ii) statevariables may get values which are incompatible withthose measured for exogenous variables . Such discrep-ancies are an indication that the model is clearly awrong description of the system under study. Bothkinds of conflicts are easily identified, though theirautomatic resolution is far from being trivial since itrequires a modeling choice .

4

Semi-Quantitative Boundary Prob-lems

In order to perform a simulation guided by measure-ments the user has to declare which are the exoge-nous variables, which are their properties and how toacquire their measurements . This is done in the sce-nario declaration form (see figure 1) . The propertyof being piecewise-constant or piecewise-monotonicis invariant in a scenario .Including a new measurement in a simulation may

lead to a model revision and/or a state change. SQPChandles each measurement as a transition (calledmeasurement-transition, or M-transition) betweentwo models . When building a new database SQPCadds measured values in the database and recognizesongoing actions by looking ahead in the measure-ment stream for each piecewise-monotonic variable' .The new model will include appropriate constraints :constant for piecewise-constant variables ; constant,increasing or decreasing for piecewise-monotonicones, according to the difference of measured valuesat the ends of the segment.Two decisions are critical when performing a

measurement-guided simulation : realizing when anM-transition occurs and deciding how to revise themodel and its initial state .

Recognizing M-transitions . An M-transitionoccurs when simulation time T, (the time of the laststate being simulated, S) and the time T�, of thenext measurement are the same. Unfortunately, un-less predictions are very precise, this comparison isusually ambiguous, for time ranges might be overlap-ping . Even if measured values were extremely precise(i.e . singleton ranges), as long as predicted ranges fortime have positive length, they would be a source ofambiguity. In the worst case the three possible order-ings between T, and T�, need to be generated .Two situations may occur when deciding whether to

fire an M-transition: the measurement is taken whilesome action is ongoing (i.e. some exogenous variableis moving towards its final - with respect to the on-going action - value) or not . In the former case,

'The depth of such a lookahead is user-defined, and mayrange from the next absolute measurement to the measurementending the next segment of each piecewise-monotonic variable .

information of the value of such variables in state Scan be used to reduce the ambiguity in T, and T�,, : forexample, if such variables reach their values in S andtheir values are measured at time T�� then it followsthat Ts = T. . In the latter case (only piecewise-constant or non-exogenous variables are involved inthe measurement), or when ambiguity is not com-pletely resolved, all three possibilities are explicitlyrepresented (the non-overlap situation is straightfor-ward, and subsumed by the overlap one) :

" T�,, = T8 , and S is indeed the state involved withthe measurement ; if T�, and T, overlap, T�,, = T,is asserted in S (usually restricting T,) .

" T�,, < T,, which means that the simulation ad-vanced too much . Since the M-transition checkis performed at each point state, S must be thefirst point state whose T, is greater than T�, . Anew state S' is generated by copying it from thepredecessor of S (an interval state) and T, = T�,is asserted on S' . S is discarded .

" T�, > T� meaning that we should keep on simulat-ing . No M-transition occurs from S, and T�, > T,is asserted on S .

Revising the model and generating an initialstate. When a model has to be revised on the basisof a measurement, the specific details on how it doeschange depend on which variables are measured andif there are ongoing actions . There are four cases :

1 . the next measurement includes only non exoge-nous variables. In this case the model does notchange, qualitative values inherited by variablesacross the M-transition do not change either, andthe only thing that changes is their new ranges(i.e . measured and predicted ranges are inter-sected in the initial state) ;

2 . the next measurement includes only piecewise-constant exogenous variables A. Continuity sus-pension is applied across the M-transition by(i) assigning measured values to variables in A,(ii) inheriting previous values for variables notin PDo, and (iii) leaving variables in PDo - Aunspecified . When SQPC constructs a databasefrom the model and the state originating the M-transition, the usual SQPC refinement mecha-nisms (including QSIM's state completion) will beused to deduce appropriate initial values for vari-ables in PDo - A.

3 . a set of piecewise-monotonic exogenous variablesM are affected by some ongoing actions . In or-der to revise the model, SQPC does a looka-head searching for the next measured value for

Page 6: Introducing boundary conditions in semi-quantitative simulation · 2003. 8. 8. · Careful evaluation of ... independentfrom thespecific frameworkadopted:" Ontology: which ontology

(DefScenario LakeTravis:entities ((travis

:type lakes)(colorado-dn :type rivers)(colorado-up :type rivers)(mansfield

:type dams)(turbine-1

:type mansfield-turbines)):structural-relations ((flows-into colorado-up travis)

(connects mansfield travis colorado-dn)(has-valve mansfield turbine-1))

:landmarks ((top-of-dam :variables ((stage travis)) :value 714)) ; ft:initial-conditions ((_ (power turbine-1) 20)

; Mw(_ (stage travis) (690 .25 690 .3))

; ft(_ (flow-rate colorado-up) (900 950))

; cfs(_ (base turbine-1) 564))

; ft:exogenous-variables

(((power turbine-1)

:type :pw-constant)((flow-rate colorado-up) :type :pw-monotonic))

:measurements (((7 .Oe5 7 .01e5)

sec((power turbine-1) 10)) ; Mw

((4 .32e6 4 .33e6)

; sec((flow-rate colorado-up) (400 420))))

; cfs

Figure 1 : Declaration of exogenous variables in scenario definition (clause :exogenous-variables) : (powerturbine-1) is declared piecewise-constant while (flow-rate colorado-up) is piecewise-monotonic. Two mea-surements are given (clause :measurements) : one after approx . 8 days (between 7.Oe5 and 7.Ole5 sec.) regardingan instantaneous action which brings (power turbine-1) to the value of 10 Mw, the other regarding an actionlasting approx . 50 days (4.32e6 and 4.33e6 sec.) specifying a decrease of (flow-rate colorado-up) from itsinitial value to a value comprised_between 400 and 420 cfs.

each variable in M. By comparing their cur-rent values with measured ones, appropriate time-dependent constraints (saying that a variable iseither increasing, decreasing or constant on itsnext segment) are added to the model (if no nextmeasurement is available the variable is assumedconstant). The new model is then initialized withvalues inherited from the transition state, since allvariables are continuous across the M-transition .

4. any combination of previous cases (1, 2 and 3) .This is dealt with by a straightforward combi-nation of respective operations, since there is nocomplex interaction between the effects of simulta-neous measurements of variables having differentproperties.

4.1

Implementation issues

The solution outlined above leads to two pragmaticissues . First, SQPC performs a model revision stepfor each considered measurement. Since model re-vision steps are expensive in terms of computing re-sources (empirically, they consume up to 75% of thetime required by a simulation), it is worth investigat-ing whether this activity can be made more efficient .Fortunately, it turns out that model revision triggeredby M-transition is limited and well defined. On onehand, if no piecewise-constant variables are involvedin the measurement, the only part of the model thatis subject to change are the constraints on exogenous

variables and their quantity spaces . No complex rea-soning is needed to generate the new model nor itsinitial state: both can be directly derived from previ-ous ones. On the other hand, if the measurement in-volves some piecewise-constant variables, propagatingtheir discontinuities onto other variables may causeambiguousevaluation of operating conditions ofmodelfragments, leading to expensive branching in simula-tion . Even in this case, however, there is a simplesyntactic criterion that can be used to detect whetherthe discontinuity affects the set of active model frag-ments . In fact, if variables in PDA are not used inconditions of any model fragment, then no model frag-ment depends on them, the model structure does notchange and continuity suspension suffices to computethe next state. This criterion has a dramatic effect onrun-times: an activity which requires few minutes isperformed in just a few seconds.

Second, measurements introduce a number of dis-tinctions that would go unnoticed in a non-guidedsimulation .First, each measured value is normally associated to alandmark, which needs to be totally ordered in re-spective quantity space. In general, increasing thecardinality of quantity spaces increases the numberof distinctions that the qualitative simulator does .In SQPC landmark creation can be disabled acrossM-transitions, reducing the resolution of the out-put (since variables' values across M-transitions are

Page 7: Introducing boundary conditions in semi-quantitative simulation · 2003. 8. 8. · Careful evaluation of ... independentfrom thespecific frameworkadopted:" Ontology: which ontology

Table 1 : A portion of the table describing turbinebehavior . E.g., given a head of 120 ft and a powersetting of 8 Mw, the discharge rate is expected to be1054 cfs .

not represented as landmarks labeled with numericranges), but reducing also the ambiguity that can oc-cur when suspending continuity.Second, a three-way branch occurs if simulation timeoverlaps with measurement time. One branch ismarked with the assumption T�i = Ts , where Ts is thetime of a qualitative event (e.g . some variable reachinga landmark). Though theoretically sound, the proba-bility that a measurement - an instantaneous event- is taken at the same time of an independent, instan-taneous qualitative event (e.g . measuring a gate open-ing exactly when the lake stage reaches a threshold) isinfinitesimal . This is another sort of distinctions thatcan be neglected without much loss of information .Third, another sort of ambiguity is caused by distinc-tions made on order relationships between overlap-ping ranges of consecutive measurements of an exoge-nous variable . Special purpose user-defined predicatescan be used by SQPC for comparing two overlappingranges in order to reduce ambiguity.

5

An exampleWe will demonstrate SQPC on a problem regardingthe domain of water supply control . Consider a por-tion ofthe system of lakes and rivers to be found in thescenic hill country surrounding Austin, Texas. TheColorado river flows into Lake Travis ; the MansfieldDam on Lake Travis produces hydroelectric power,controls the level of the lake and the flow into thedownstream leg of the Colorado .The problem is to evaluate the effects of some actions

in a "what-if" scenario (figure 1) . We are given aninitial level for Lake Travis (a value between 690.2 and690.3 ft), a rough initial inflow from the Colorado river(between 900 and 950 cfs) and an initial requested rateof 20 Mw for the power delivered by the hydroelectricplant . In addition it is known that the input flow isdecreasing - its minimum rate has been estimatedbetween 400 and 420 cfs after 50 days . The task is todetermine what happens to the lake level and evaluatethe effect of reducing the requested power from 20 to10 Mw after 8 days .Several model fragments describe the behavior of

lakes, rivers, dams, turbine, etc . and envelopeschemas provide numeric bounds on relations betweenquantities . Most envelopes are derived from tabu-lar data resulting from engineering estimates . Ta-ble 1 partially describes the behavior of turbines inMansfield Dam.' In this example, tables are in-terpolated stepwise by SQPC to provide piecewise-constant (rather imprecise, but accurate) upper andlower bounds . Turbines are controlled by servo-mechanisms designed to generate the desired amountof power regardless of the hydraulic pressure, which isdetermined by the head at the turbine . This is possi-ble as long as there is sufficient head : when it dropsbelow the minimum threshold for a given power out-put then less power is released . Different sets of modelfragments capture these operating modes accurately.

1

Z

645

539

Figure 2 : Two behaviors are predicted for the sce-nario, ending both in quiescent states . Each involvesfour models (black squares), two M-transitions andone transition (from model 2 to 5 for the first behav-ior, from 1 to 3 for the second one) from a servo-controlled to a non controlled operating regime of theturbine_

Figure 2 shows the two predicted behaviors . Theyare generated because of the time-ambiguity betweenthe second measurement and the transition of the tur-bine to a new operating region (the latter event occur-ring between 9 and 87 days) . Figure 3 shows the timeplot of some of the variables in the first behavior. Un-der the specified boundary conditions the power levelof 20 Mw will surely be maintained until time T1, thetime of the first measurement (8 days) ; then, thoughreducing the requested power, eventually there will beinsufficient hydraulic pressure to supply the requestedpower . This will happen for the first behavior (fig-ure 3) at time T3, between 50 and 76 days (i.e . afterthe measurement of the input flow rate is taken) . Forthe second behavior, not shown, after at least 8 daysand not beyond 50 days (i.e . before the measurement) .Finally, the lake system reaches equilibrium with thelake level stabilized between 568 and 588 ft .Notice the instantaneous change occurring on vari-

able TURBINE-1 . POWER at time T1 which affects othervariables like TURBINE-1 . DISCHARGE-RATE. Continu-ity suspension is applied to these variables and their

2The Lower Colorado River Authority has contributed ac-tual tables of empirical data to the Qualitative ReasoningGroup of the University of Texas for evaluation .

Head (ft) Power (Mw) Discharge-rate (cfs)120 8 1,054120 9 1,150

125 . .8 1,026

150 .30 2,936

Page 8: Introducing boundary conditions in semi-quantitative simulation · 2003. 8. 8. · Careful evaluation of ... independentfrom thespecific frameworkadopted:" Ontology: which ontology

0r n mTO T1 T2 T3 T4

- IMP

-N-E

- C-716

' .y . . . . . . . . . . .m. . . . .. . . . . ..N-

COLORADO-UP .FLOW-RATE

TIME

[900 950)

(400 9501

[400 420]

01

-OF-DAM 1714 7141

(690 . 690 .)

TRAVIS .STAGE

Figure 3 : Plot of some of the variables for the first of two behaviors predicted for the sce-nario .

The first M-transition occurs at time T1 (notice the sudden drop of TURBINE-1 . POWER and af-fected variables TURBINE-1 . DISCHARGE-RATE and COLORADO-DN .FLOW-RATE) . The second one at T2, whereCOLORADO-UP .FLOW-RATE becomes constant . Finally, at T3 a transition occurs to a region where the turbine isno longer servo-controlled (TRAVIS . STAGE reaches the threshold 688 ft) . TURBINE-1 .POWER is no longer treatedas an exogenous variables (since the servo-mechanism does not operate any more) and it becomes a dependent

^13ip

behavior across the M-transition occurring at Ti isnot constrained . On the other hand, the second M-transition occurs when the input flow rate reachesits lowest value and since it involves a piecewise-monotonic variable, all variables are continuous acrossthe transition .If measurements included observations for other

(non-exogenous) variables, then the ambiguity intimes could disappear and certain ranges shrink . Forexample, if the second measurement were

((4 .32e6 4 .33e6)((flow-rate colorado-up) (400 420))((stage travis) (688 .5 688.7)))

(i.e . of the same input flow-rate, taken at the sametime [4.32e6 4.33e6] but involving in addition the non-exogenous variable stage travis), then only the firstbehavior would be consistent with the observed valueof the lake stage . In fact, only in the first behavior theordering of the events "head reaching the minimum

o. . . . . o . .

o. . . . ... . . . .m. . .

IN,i

-N-6

-N-3

0

-MINDu

.

u

rTO T1 T2 T3 T4

TURBINE-1 .POWER

-INI{

T IIU

-TU-

COLORADO-DN.FLOW-RATE

5.1

Implementation status

(20 201

1 (10 101

75 [0 10)

01

X17 [2528 26751

0 [252B 2675)

threshold (when stage= 688 ft)" and "measurementat time [4.32e6 4.33e6]" is compatible.

SQPC is fully implemented in Lucid Common Lisp asan extension to QPC, which in turn uses QSIM. Weaxe currently experimenting SQPC in the water sup-ply control domain and in economics . It has been runon several examples comparable to the one shown inthis paper.The runtime for this example is around 8 minutes ona Sun 20 . The bulk of this time is spent computingorder relations with interpreted rules during the threefull-fledged modeling steps . Using a special purposeinequality reasoner, whose implementation is under-way, will result in a substantial (orders of magnitude)speedup .

[689 690]

-TRI 1 [688 6881

'~ TR "' 19 (568 688)

23 (1258 12581

'~ TU- Ib6 (400 42017. . . . .t . . . . .T. . . . .t .

-0 n3 01

-0 01 - MIIf'm rr nu r

T3 T4 TO T1 T2 T3 T4

TURBINE-1 . DISCHARGE-RATE

- INP

. "tT4 14 .32E+6 +INF]-C- 7 (2528 26751

-C- (2528 26751-T3 [4 .32E+6 6.63E+61

-TU 23 11258 12581-T2 [4 .32E+6 4.33E+61

(400 4201

-T1 17 .00E+5 7.01E+51 0 10 01

-TO [0 01 -MIFFnT3 T4

n . u rTO Ti T2 T3 T4

Page 9: Introducing boundary conditions in semi-quantitative simulation · 2003. 8. 8. · Careful evaluation of ... independentfrom thespecific frameworkadopted:" Ontology: which ontology

6

Related workSeveral efforts facing the issues discussed in this paperhave been reported in literature, but none of themcovers the whole problem or provides viable andsoundsolutions.[Kuipers and Shults, 1994] and [Forbus, 1989] pro-

vide some means to represent external influences on asystem and to implement a guided simulation . Expres-sive Behavior Tree Logic [Kuipers and Shults, 1994] isa temporal logic (integrated in QSIM) that can beused to specify, in logical statements, the qualitativebehavior of variables and have QSIM generate a sim-ulation compatible with them . This method, still un-der development, is complementary with respect tothe one presented in this paper since it does not han-dle model revisions caused by external influences norquantitative information.Forbus [Forbus, 1989] explicitly introduces the con-cept of action, with pre and post-conditions. Thepurely qualitative total envisionment that is gener-ated includes all possible instantiation of known ac-tions. Forbus allows only instantaneous actions andadopts heuristic criteria to handle discontinuities . Noprovision is made to handle quantitative information,nor to focus the envisionment process.Onework that centers on discontinuities either causedby external influences or autonomous, is that of[Nishida and Doshita, 1987] . Nishida and Doshita de-scribe two methods for handling discontinuities : (i)approximatinga discontinuous change by a quick con-tinuous change and (ii) introducing mythical states todescribe how a system is supposed to go through dur-ing a discontinuous change . The former requires acomplex machinery to compute the limit of the quickchange, whereas the second is based on heuristic cri-teria for selecting appropriate states .Many other approaches have been described which

aim to interpret measurements of dynamic systems .Some of them do not perform a simulation, likeDATMI [DeCoste, 1991] which interprets measure-ments with respect to a total envisionment . Oth-ers, like MIMIC [Dvorak, 1992], though performing asemi-quantitative simulation and refining predictionswith measured data, do not cope with model revi-sions nor with guided simulations. (Indeed, some ofthe ideas presented in SQPC descend from techniquesfirst applied in MIMIC, e.g . for integrating measure-ments into simulations.)

7 ConclusionThe main issues arising from considering measure-ments in a self-monitoring simulation have been dis-cussed . Boundary conditions expressed in terms ofinstantaneous or extended changes of exogenous vari-ables are used to guide and refine an online or of-fline (depending on the depth of the lookahead) in-cremental simulation of incompletely known lumped-

parameters systems.From the conceptual analysis and from the experi-

mental activity done so far it appears that consideringboundary conditions by itself does not aggravate theuncertainty of predictions. If measurements are addedto a scenario of an incompletely known situation, theprecision of the output does not change significantly.Nor does it change if measured values become lessprecise. It does worsen considerably though if uncer-tainty affects the time ofevents, because ofrange over-lap, which is dealt with by representing the differentorderings of events . If inter-dependent variables aresimultaneously measured, however, the output preci-sion increases since ranges can be restricted and in-consistent behaviors refuted. Furthermore, it wouldbe straightforward to extend SQPC in such a way tosuggest to the user when some additional measure-ment would be needed to reduce the ambiguity.Discontinuous changes are comparatively more dif-

ficult to handle. The adopted criterion to handle thetransient, continuity suspension, limits the combina-torial growth of possible trajectories taking place dur-ing the transient by restricting the number of variablesthat could be affected by discontinuities. The methodis correct and, though being incomplete, it has notproven yet to be a bottleneck . Furthermore, thoughbeing used only on M-transitions, continuity suspen-sion is a general criterion that could be used also tohandle other kinds of transitions imposing discontinu-ous changes on variables (for example to model abruptfaults) .Computationally, the cost of handling non-

autonomous systems is often relatively low (even incases where a limited model revision is needed). Itmay well happen, however, that dealing with instan-taneous changes requires a complex modeling activ-ity. Even though appropriate precautions are taken tolimit the number of such activities, a substantial num-ber of measurements with ambiguous events quicklyleads to intractable problems .In conclusion, we believe that given the generality of

the assumptions underlying the techniques presentedin the paper, and given the relatively low computa-tional cost that is often required to solve a boundaryvalue problem, it seems worthwhile employingthem towiden the applicability spectrum of Qualitative Rea-soning .

AcknowledgmentsPart of the research reported in this paper took placewhile I was visiting the UT Qualitative ReasoningGroup, at Austin, TX during 1992. I'm indebted withBen Kuipers for many illuminating discussions, andwith Adam Farquhar for letting me use his QPC pro-gram . Many thanks to Dan Clancy and Bert Kay formaking me understand several parts of QSIM and toFranco Ceotto for his help in implementing SQPC.

Page 10: Introducing boundary conditions in semi-quantitative simulation · 2003. 8. 8. · Careful evaluation of ... independentfrom thespecific frameworkadopted:" Ontology: which ontology

References[Bobrow, 1993] D . Bobrow. Special volume : AI in

perspective. Artificial Intelligence, 59(1-2) :103-146, 1993 .

[DeCoste, 1991] D. DeCoste. Dynamic across-timemeasurement interpretation . Artificial Intelligence,51, 1991 .

[Dvorak, 1992] Daniel L. Dvorak . Monitoring and di-agnosis of continuous dynamic systems using semi-quantitative simulation . Technical Report AI 92-170, Artificial Intelligence Laboratory, The Univer-sity of Texas at Austin, 1992 .

[Farquhar and Brajnik, 1995] Adam Farquhar andGiorgio Brajnik. A semi-quantitative physics com-piler. In Tenth International Conference on Ap-plications of Artificial Intelligence in Engineering.,Udine, Italy, July 1995 . Presented also at theEighth International Workshop on Qualitative Rea-soning on- Physical Systems, 1994, Nara, Japan.

[Farquhar, 1994] A. Farquhar . A qualitative physicscompiler. In Proc. of the 12th National Conferenceon Artificial Intelligence, pages 1168-1174 . AAAIPress / The MIT Press, 1994 .

[Forbus, 1989] K. Forbus . Introducing actions intoqualitative simulation . In IJCAI-89, pages 1273-1278,1989 .

[Kuipers and Shults, 1994] B. Kuipers and B. Shults .Reasoning in logic about continuous systems. In8th International Workshop on Qualitative Reason-ing about physical systems, pages 164-175, Nara,Japan, 1994 .

[Kuipers, 1986] Benjamin Kuipers. Qualitative simu-lation . Artificial Intelligence, 29:289-338, 1986 .

[Kuipers, 1994] B. Kuipers.

Qualitative Reasoning:modeling and simulation with incomplete knowl-edge. MIT Press, Cambridge, Massachusetts, 1994.

[Nishida and Doshita, 1987] T.

Nishida

andS. Doshita. Reasoning about discontinuous change .In AAAI87, pages 643-648,1987 .


Recommended