Qualitative Simulation in Physiology with Bond Graphs

Qualitative Simulation in Physiology with Bond Graphs

Copyright © IFAC Modelling ,,,,,I C011l1'01 in Biollledical Systellls. Venice. Italv . I~'HH QUALITATIVE SIMULATION IN PHYSIOLOGY WITH BOND GRAPHS J...

1MB Sizes 2 Downloads 107 Views

Copyright © IFAC Modelling ,,,,,I C011l1'01 in Biollledical Systellls. Venice. Italv . I~'HH

QUALITATIVE SIMULATION IN PHYSIOLOGY WITH BOND GRAPHS J.

M. Barreto*, J. Lefevre**, M. Noirhomme-Fraiture* and W. Celso de Lima*** " llIstitllt d'llIjill'll/{/tiqlll" FN f)P , Nall/ll r, 8r1gillll/ ** Df /)/. Physiology, VeL, 8rll.\.ll'l.l, BI'lgilllll ***Ue/Jt. f;lIg. "-' let rim , UFSC: , Florillllo/JII/is. Bmsil

The simulation of a physiological system involves the construction of a model, generally in the form of mathematical equations. the manipulation of this model to obtain the solution of the equations, and finally the interpretation o f the result . In a qualitative simulation , in a certain sense, we go directl y from the real system to the interpretation without use of the mathematical model . This approach was introduced using artificial intelligence techniques, where we try to reproduce a human reas on ing explaining the behavior of the physical system. The qualitative model is constituted by facts and functioning rules . However it is not easy to chose the cause and effect of a functioning rule well suited in each case. The main goal of the wo rk is t o present a method o logy, based o n bond graphs, and the causal stroke algorithm (C ASA for short), to obtain the antecedent and consequent of rules, model that explains the functioning o f a physiological system . To illustrate the method o logy , it is discussed a qualitative d ynamic compliance model of a ventricle. ~9§!r9f! :

Artificial Intelligence , Modelling, Qualitative Physics, Bond graphs , Approximate reas o ning, Fuzzy sets, Phy siological models .

~~Y~QrQ? :

INTRODUCTION The first step of a simulati o n study is to build a model of the system under stud y. Often we decompo se the initial svstem system in subsystems. These subsystems must contains a representation of the attributes and relations of relevant to the goal of the simulation stud y . Very o ften, when dealing with physi ological systems, the model of the system takes the form of mathematical equations involving numbers and we call it a quantitative simulation. Manipulating the mathematical model results are obtained. (table or graphic form) which must be interpreted. This basic approach suffers, ho wever, from some weakness, mainly in life sciences, due to difficulties in each of the steps followed. Examples of difficulties are : -Difficult choice of the structure of the mathematical model : how a different choice of structure influences the interpretation of the results.

- In life sciences o ften different hypothesis are plausible, resulting in different models: (Noordergraaf & Melbin , 1980). Which must be used to give the kind of interpretation desired? - It is frequently diffi cu lt to have a physi olo gical interpretation for all the parameters used in the model. -The variability of parameters for different subject can be extremely large ; it is difficult to evaluate how this variability is pr o pagated to the results of the simulati o n; - The parameters are often time variant; in this case it ma y be diffi c ult to solve the equations . -Often we only need an interpretation of the results independently from the choice of the mathematical model and choice o f parameters. In such cases it is tempting to utilize a different , more direct approach . Fig . 1 shows such an option. The qualitative simulation is the methodology followed t o go directly from the imprecise knowledge on the system to the interpretation. The quantitative simulation uses a mathematical model .

J.

566

M. Barreto 1'/ 1/1.

QUALITATIVE SIMULATION

MATIIEMATICAL MODEL

QUANTITATIVE SIMULATION

Fig. l:Quantitative versus qualitative simulation

QUALITATIVE MODELLING The first point that we can realize is that the simulation using a mathematical model (numerical), involves several difficult points. some of arbitrary nature. Another option would be a qualitative model. In a qualitative model. instead of going through the use of a mathematical model, we can represent our knowledge on the system including all the imprecision intrinsic to the natural human language. This knowledge comprises the description of the system and the reasoning mechanisms to allow to deduce the desired results of the simulation experiment. In this case the results can be directlv in the form of the desired interpretation. As the parameters, relations and reasoning mechanisms, in this case, are expressed without a necessarv use of numbers, we call it a qualitative simulation. The qualitative approach has received great attention in the artificial intelligence litterature. under different names, all relating to the treatment of imprecision. The main goal of this work is to show how bond graphs, (a tool usually employed in quantitative simulation of dynamical systems) can be useful to describe the behavior of a physical system in qualitative terms . To obtain this description the causal stroke algorithm (Barreto, Lefevre, 1983) (CA5A for short) is used, allowing to determine the antecedent and consequent of if then else expressions, interpreting the description of the system. More formally, we call a model qualitative when the set of values of at least one of the relevant attributes used in the model are is not expressed by numbers. In fact , qualitative physics (Bobrow,1984) tries to reproduce the reasoning of an average man explaining the behavior of a physical system . The term 'behavior' refers to the time evolution of observable changes of values of state of the system in response to an input . In pragmatic terms, a

qualitative model must be used if the numerical representation is artificial. The details of description are dependent on the background of the person giving the description and so, very different descriptions can exist, some falacious, some incomplete, some redondant and some 'good descriptions', but all interpreting human reasoning. Using such a description (de Kleer, Brown. 1984) it is possible to define the physical system in a convenient wav to be used bv an expert system . This expert system is a materialization of the qualitative simulation . The points of interest that we will treat in this paper, relevant to qualitative modelling are : -the choice of the values of state and values of rules of composition of state; -the causal implication of input and output. The solution of these two points are part of the qualitative modelling activity and as such comprises a great deal of experience, intuition and art from the modeler . Concrete examples can help in the choice of the state values. -For some physical quantities: positive, nUll , negative are the natural values as is the case in the presence or absence of enzymes to accelerate a biochemical reaction. (They are called the quantity space in De Kleer & Brown, (1984». -Some physical quantities have qualitative values without the notion of order. In these cases it is artificial to use any value set with an order relation. Color is an example. In this case there are well established laws of composition, ex: yellow + blue = green (meaning that if we mix yellow with blue inks we get green ink). So, we are going to chose as the state value set, a finite set of linguistic variables not necessarily ordered . The composition laws are not general and must be chosen for each particular problem in view. Frequently a good choice, when there is at least the structure of lattice in the value set. is the set of operations of the classical fuzzy sets 'max', 'min' , etc. (Note that a subset of the unit interval is a lattice for the operations 'max' & 'min'). (See Goguen, 1981). Whether the causality concept, as pointed out by Iwasaki & Simon, (1986), can be perceived and verified in the real world, is a much debated question in philosophy . This leads to formal treatments avoiding causal statements. However, causal ordering is useful. and sometimes natural, in implementing qualitative models. It is more natural to say that a light is "ON" because the power switch is "ON" than the contrary! However. if in a linear resistor of a circuit we have voltage 'v' and current 'i' it is difficult to say which one implies the other. That is the "causal ordering" concept that grew since more than thirty years ago in the field of econometrics (Simon, 1952a,b).

Qualitative Simulatioll in Physiology with Bond GI-aphs

To illustrate the need of determining the causal order, consider an inductor . The fact that it is impossible to have a finite change the current value instantaneously (in reality opening a circuit with an inductor having a current produces an arc (finite tension during a very short time». So, in an inductor, the tension must be the independent variable and the current the dependent one.

BOND GRAPHS Bond Graphs were invented by Paynter, (Paynter, 1960), as a common language to express the mathematical model of a physical system mainly in the case where several energetic domains are present. Since then, it has been used extensively in many different fields. In theoretical biology, bond graphs are used as a graphical representation of reticulation, in a way independent from the nature of energy present (Atlan, 1976, Barreto & Lefevre,1983) . We suppose the reader is familiar with bond graph fundamentals, as presented in Karnop & Rosenberg, (1975) or Thoma (1975). A recent bibliography is presented in Bos & Breedveld, (1985). To assist in the obtention of the constitutive equations of the mathematical model of the physical system, the causal stroke algorithm (CASA for short) is used. CASA consists in providing each bond with a perpendicular bar to the bond, representing the direction in which the effort variable is acting . CASA is also useful in the modelling phase to obtain a minimal and compatible model ( Barret o , Fraiture, 1986). Structural nonminimality (Barreto, Lefevre, 1984b) and the presence of implicit equations (Barreto, Lefevre, 1984a, 1985) can also be detected by the cas a algorithm . Structural nonminimality can be used by the modeler to simplify the model or as an indication of some lacking phenomena. Implicit equations that can be treated using implicit methods, can also be an indication that a more sophisticated model must be adopted: whether the solution is not unique (supposing a unique behavior for the physical system).

accomplished means that we made a good choice of antecedent and consequent of the if_then_else expressions describing the qualitative description of a physical system . The qualitative model is incorporated in a knowledge base to be exploited as an expert system. To show the use of CASA, we consider a simple example. Suppose the circuit of Fig.2, and its bond graph, consisting of a source of tension and a resistence . By definition of an ideal tension source we can say that the value of E is an independent variable, R a parameter and the current i is the consequence. That is the natural causal ordering in this case. (We do not discuss the possibility of existence of an ideal source of tension). So , we have the following equation : i

E~O~R

1'1 11 C 8 9-at

simple circuit and corresponding bond graph

the

the

For the other elements we have (the value of parameters and the initial conditions, charge in C and field in L, are omitted in the if _ then_else for conciseness reasons ): In a C element: C --j

if i_is known then v is known

In a L element : L

r-----

if v_is known then i is known

In a O-junction : 0

1

2

r

if

3

i1 & i2 are_known then i3_known

In a 1-junction : 1

2

if v1 & v2 are known then v3:::known

can then divide the basic bond graphs that we will call covar~ant and contravariant elements . (The nomenclature was taken from temsorial calculus) . Variant elements are the source of effort , L , 1-junction . Covariant eleme~ts are source of flow, C, 0Junct~on. We examined all the possibilities of the bond graph elements in ~erms of causal ordering . It is poss~ble then to resume the findings as a rule or assigning causal ordering. This rule is, in a certain sense, the bond graph correspondent to the method presented in (Iwasaki & Simon, 1986) . eleme~ts in two groups,

R

In

if E_is_known and R_is _known then i_is known

We

Fig. 2:A

= E/ R

written as a causal equation. if_then else form we have:

But how can CASA be used in the selection of the adequate causal order in a qualita~tve model? To have this goal well

E--

567

.J.

5!iH

M. Barrcto

~Q~g gr~Eh~ £~~~~l Qrg~ri~g r~l~: We verify that in covariant elements the causal stroke indicate directly the causal orientation in terms of an output of effort, and in a contravariant element the causal stroke indicates the opposite direction of the causal orientation in terms of an output of flow.

To illustrate the methodology a model taken from hemodynamics (a ventricular model) is discussed . It is shown how CASA can be used to select compatible causal ordering in the component models for the ventriculum and its afterload ( in the hemodynamic sense, i.e., a model representing the input impedance of the aorta and systemic circulation).

A VENTRICULAR QUALITATIVE MODEL To illustrate the methodology we present the classical model of ventricular ejection using the variable compliance model of the ventricle. The main reason for this choice is that it includes elements whose causality can be determined by intuition, and so it is well adapted to confirm our reasonings: they are the valves . In fact the state of the valves being open or shut depends on the difference of pressure between its two sides . It could, in principle , be possible to make an analog study refering to the physiological reality. However, the results would be much more difficult to validate. So, we take as our reality the model presented in Fig. 3 .

RI

E

D1

D2

R2

Cv

C

1"1

(1/.

are represented by a lumped parameter model, the 'afterload' of the ventricle. The input impedance of this circuit can be made to fit experimental data, and some physiological significance can be attached to the parameters. For example, R2 can be said to represent the characteristic impedance of the aorta and R3 to represent the opposition of the capillaries toblood flow, C representing the compliance of the whole arterial system. Two approaches are going to be discussed: - Ih~ ~g~~!iQ~~ ~EErQ£h:

Starting from the circuit we write the equations describing their functioning. We manipulate these equations in order to obtain a set of equations where each variable appears in explicit form in one equation . (In case of incompatibilities this phase is impossible, but it is not always clear where the problem lies) . We chose a quantity space for each variable. We define qualitative operations. We can finally represent the qualitative model and perform a qualitative simulation. This approach was followed by (Warnier & Giaroul, i986).

-Ih~ ~Q~g gr~Eh ~EErQ£h~

From the circuit we obtain the corresponding bond graph. The CASA algorithm is used to assign the causal strokes to all elements . (We suppose that we work with a minimal model, and so, there is no incompatibility in assigning causal strokes ( Barreto & Noirhomme, i986). On the contrary, eventual incompatibilities are detected and eventually the model modified . Following the causal strokes we can build the qualitative model directly. At this point, the concepts of covariant and contravariant elements are used .

R3

From the c ircuit we have equati o ns :

the

following

E -E (Cv} --------

il Fig . 3 : Dynamic compliance model to ventricular ejection

study

In this model the capacitance Cv represents the d y namic compliance of the ventricle and the diodes Dl , D2 the two valves, (mitral and aortic in the case of a left ventricle model ). The use of a time variable capacitance to model the ventricle contraction is usual to simulate the pulsed functioning of the ventricle . This function of time follows experimental data, so that a great value of Cv corresponds to the diastole (relaxed state) and a low value to the sistole (contracted state ) . E represents the venous return pressure . Ri stands for the time constant of ventricular filling. All vessels seen from the input of the aorta

1

if E ) E(Cv}

Rl i f E ( E(Cv)

0

E(Cv } - E (C } i2 =

if E(Cv}

) E(C}

if E(Cv}

( E (C )

:2 {

E(Cv }

= Q(ev} / Cv(t}

E(C}

= Q(C} / C

i3

E (C} / R3

i4

i2 - i3

569

Qualitative Simulation in Ph ysiology with Bond C ra phs

We can point out that it is very difficult to chose (except in the case of the equations giving i1 and i2 a causal order for the variables in these equations. A richer model can make this task really impossible because the only guide is t~ make each variable to appear in the first member at least once... The equations in explicit form state a causal implication between the variables. We can then write a set of equations describing the qualitative model. Examples of such equations are: if pressure_ventricle < Pression aorta then aortic_valve closed. That equation shows a causal order and a set of values of . parameter~. It corresponds to the equat~on of ~2 ~n the set of equations presented. Whether the set of values for the valves is clear, (open or shut), for the pressures and flows it depends on the precision. It is also important to note that a simple definition of values as 'great', 'low', etc, sometimes depend on the context . ~Qnq

g[eEh

~EE[Qe£h~

We start constructing the bond graph of the circuit. Fig. 4 shows the bond graph corresponding to the circuit of Fig . 3 with causal strokes assigned .

RI,D1

R2,D2

Cv

R3

C

linguistic ordered.

variables.

not

necessarily

For each variable a finite set of values was chosen (as in a fuzzy set model (Goguen 1981», and the operations defined by tables . The table that follows is an example (* is the name of the operation) .

*

vI

1

vI I m g vg

vI vI vI

vI vI

1

m

1

m g

g

vg

vI

1

1

m g vg vg

m g vg vg vg

m

m g vg

Meaning: vI : very low 1: low m: normal g : great vg : very great Note that there is a great deal of liberty in the choice of such a table . We think that a good idea is to follow the following prinCiples: -Chose the lowest number of values capable of interpreting the phenomena; the table will be simpler . -If possible, in semantical terms, chose entries giving a table easy to manipulate . A table defining an abelian group is a good choice. This choice has the following pratical advantages: -when three or more rules must be used, the way they are used change the conclusion (associativiness); -there is the possibility of 'no changement' (neutre). -the inverse operation is defined. -in the antecedent of each rule, the order is not important (comutativiness of the abelian group) -to modify a table is equivalent to modify the value of a parameter in a model involving numbers; it can be useful to fit the model with reality . CONCLUSIONS AND FUTURE WORK

Fig. 4:Bond graph corresponding to circuit of Fig.3

the

From the bond graph we can write a set of rules expressing the causal relationship between variables as was explained in the preceeding paragraph in a straightforward way . The model was programmed using FranzLisp on a VAX-7S0 to verify the viability of the methodology used . The energy storing elements are used to determine the future state of the system . This is analogous to the integration of a system of differential equations and in a certain sense corresponds to considering the confluences defined by de (Kleer & Brown 1984). Here, however, we are in a more general context by the following reasons: -The next state is determined by an operation chosen for the case under study and more values than 3 can be used. -The values 'low', great', etc . , were not used in the sense of one being greater than the other. So the methodology can be used in the case of the set of values are

In this paper it was shown how bond graphs can be used in the choice of the causal ordering of concepts used in the qualitative model of a physiological system. To illustrate the presented methodology, the qualitative simulation of the behavior of a ventricular ejection model was analyzed. The modeling activity is an iteractive process. Normallv we start by a reticulation and the selec tion of a model for each subsystem. Then we construct a global model and make experiments with it . The results of these experiments guide in future refinements of the model. Qualitative modelling follows the same pattern . The reticulation consists in the choice of atomic concepts used in the model, that are put together by production rules. The use of the model guides in refinements in the knowledge we have on the system, interacting with the human thinking process, rejecting some models,

.J.

570

M. Barreto I'l al.

suggesting simplification in others and so, helping in the selection of a model compromise between simplicity and expressive power . It is hoped that our qualitative modelling and simulation could be useful in research as well as in teaching but we think that the problem is open:there is much more to be done. Presently we are developing a librarv of models using the concepts presented. One main preocupation is to make all mathematical and logical notions transparent to the user of the models . The theory of qualitative modelling is young . We state here some possible directions of research. In the qualitative simulation of a dynamical system the variable time is present . This suggest the use of temporal logic as a possibility to deal with the problem. The interaction of temporal logic and imprecision must be better understood . There are also, sometimes more than a possible evolution for the system. Modal logic could be used to state concepts of 'necessity', 'possibility', etc. It is possible that the interaction of tools and concepts relating with imprecision and temporal logic in the scope of a qualitative representation would be valuable. ~£~nQ~l~gg~~~n!~:

We acknowledge the remarks of M.Celiktin that helped to improve the present document .

REFERENCES Atlan, H. ,(1976) . Les modeles dynamiques en reseaux et les sources d'information en biologie. In A. Lichnerowicz, F.Perroux, G. Gadoffre (Ed.). ~!r~£!~r~ ~! gYn~~ig~~ g~~ ~Y~!~~~~' Maloine et Doin, Paris, 1976 . Barreto,J. and J.Lefevre, (1983). Model sctructure in physiology: a bond graph approach. In G. Vansteenkiste, P. Young (Ed.). ~Qg~lling ~ng g~!~ ~n~lY~i~ in ~iQ!~£QnQ1Qgy ~ng ~~gi£~l ~ngin~~ring, North-Holland. Barreto,J. and J . Lefevre, (1984a). Bondgraphs fields and implicit equations. ID!~ l~ 21 ~2Q~11iDg ED9 Simulation, vol . 4, 3, pp.102- 105. Barreto~J-:----- and J . Lefevre, ( 1984b) . Structural minimality and modelling of systems. In X. Avula, R. Kalman, A. Liapis, R. Rodin (Ed . ). ~E!D~mE!ifE1 ~QQ~11iDg I~fD21Qgy,

iD ~fi~Df~

EDQ

Pergamon Press, Oxford . Barreto,J. and J.Lefevre, (1985) . R-fields in the solution of Implicit Equations. l~ 21 !D~ ErED~1iD ID§!i!~!~, vol.319, 1-2, pp.227-236. Barreto,J. and M. Noirhomme-Fraiture, (1986). Minimal modelling: A Bond Graph APproach. IMACS ~Qn[~ Qn ~Qg~lling ~ng ~i~~l~!iQn [Qr ~Qn!rQl

Qf

~~~~~g ~ng

~y~!~~§,

Qi§![i~~1~9

Lille, June 3-6 .

e~[~~~!~r

Bobrow,D.G., (1984) . Qualitative Reasoning about Physical Systems : an introduction. br!iiifiE1 ID!~11ig~Df~, 24, pp.1-5. Bos,A . M., P.C . Breedveld , (1985). 1985 Update of the Bond Graph Bibliography . l~ IrED~1iD ID§!i!~!~, vol . 319, 1/2, pp.269-286. Goguen,J . A., (1981). Concept representation in natural and artificial languages: axioms , extensions and applications for fuzzy sets. In E.H.Maodani & B. R.Gaines (Ed . ). E~~~Y ~~~~Qning

~ng

i!~

~~~li£~!iQn~,

Academic Press, pp.67-115. Iwasaki,Y. and H. Simon, (1986). Causality in device behavior. ~r!i[i£i~l ~n!~llig~n£~, 29, 1, pp.3-32 . Karnopp,D. and R.Rosenberg , (1975) . ~Y§!~m dynamics: a unified aQQroach . Willeyinterscience~-New-York . -----de Kleer,J . and J.S.Brown, (1984). "A qualitative physics based on confluences. br!iiifiE1 ID!~11ig~Df~, 24, pp . 7-83 . (1986) . de Kleer,J.D. and J . S.Brown, ordering . Theories of causal 29, 1, Artificial ~n!~llig~n£~,

pp-:-3Z=61-:--

Noordergraaf, A. , J.Melbin, (1980). The development of recognition of component significance in closed-loop cardiovascular control. ~nn~ ~iQ~~g~ ~ng~, 8 , pp . 391-404 . . Paynter,H . (1960) . Analysis and des~gn of engineering systems", M.I.T. Press, Cambridge, Mass. Simon,H . A., (1952a) . A formal theory of interaction in social groups. bm~r~ Sociological R~~., 17, pp . 202-211. Simon~H~A-:--:- -(1952b)~ On the definition of the causal relation . l~ PDi1Q§QEDY, 49, pp . 517-528 . Thoma,J., (1975). Introduction to 9QDQ

!b~ir----~EE1if~!iQD§.

grEED§

EDQ

Pergamon

Press, oxford.

**********