Adv. Space Res. 'Col.14, No. 11, pp. (11)307-(11)312, 1994
Copyright© 1994COSPAR Printedin GreatBritain. All rightsreserved. 0273-1177/94$7.00+ 0.00
Pergamon
QUALITATIVE REASONING METHODS FOR CELSS MODELING F. Guerrin,* K. B o u s s o n , * * J.-Ph. Steyer*** and L. T r a v 6 - M a s s u y ~ s * * * InstitutNational de la Recherche Agronomique, Biometrics and Artificial IntelligenceStation,31320 Castanet-Tolosan" France ** Centre National de la Recherche Scientifique,System Analysis and Automatic Control Laboratoire, 31077 Toulouse, France *** Lehigh University,Chemical Process Modeling and Research Center, Bethlehem, PA 18015, U.S.A.
ABSTRACT Quafitative Reasoning (QR) is a branch of Artificial Intelligence that arose from research on engineering problem solving. This paper describes the major QR methods and techniques, which, we believe, are capable of addressing some of the problems that are emphasized in the literature and posed by CELSS modeling, simulation, and control at the supervisory level. INTRODUCTION For the most part, the research on CELSS has focused on studying: (1) micro-ecosystems including two or three functional components; (2) some isolated candidate components (e.g., plant, micro-organisms); (3) factors that might affect them (e.g., microgravity, ~@a_tions); (4) technical devices designed as functional equivalents to biological processes (e.g., organic m ~ e r oxidation)/1/. Some authors emphasize the following problems. Given some species and assuming that their potential is strongly dependent on their physical environment, which environment should be chosen ?/2/. Conversely, which species will best fit any given set of environmental constraints ?/3/. How should diversifted information and knowledge from elementary lXOCeSsesbe integrated in an overall control system 7/4,5/. How should very different rates of change of asynchronous processes be coordinated in ord~ to give the system stability and reliability ?/6/. How should the system's behavior be forecasted according to the number of its components, their degree of functional integration, the existence of functional redundancies, etc./7/. Although 'classical' models accurately describe local quantitatively well-known processes, they often appear to be either inappropriate (due to the ill-known nature of the process) or intractable (due to the computational cost). Qualitative Reasoning (QR) can bring new insights, as it arose from research on engineering problem solving, and aims at automating such complex tasks as design, simulation, data interpretation, troubleshooting and diagnosis, action planning for system recovery, etc/8/. It became clear that to perform such tasks it was necessary to capture the rationale of engineers. Consequently, QR techniques are currently applied to many fields such as eleclronics, compotet integrated manufacturing, medicine, chemical engineering, etc. A basic aspect in QR relies on the belief that reasoning about complex systems is often performed by humans using neithor numerical relations nor numbers to quantify the variables. Signs, tendencies, orders of magnitude, are often much more relevant for the task at hand, and Im3vidc the operator with clearer explanations than real values. Starting from some examples of ecological processes, we will show in this paper some of the basic Qualitative Reasoning formalisms. REASONING ABOUT QUANTITIES Evolution of Ahml Bloontq in Hieh Ram Algal Pond (Examnle~ Phytoplankton evolution does not exhibit there any degradation/production equilibrium, but shows an alternative cycle of growth and decrease phases constituting the algal bloom. The shift between growth and decrease phases is characterized by a discontinuity, i.e. a dystrophic crisis. How does this crisis occur ? Explanations provided by Azov and Sbelef/9/are considered he.after. Within the growth phase, the phytoplankton is increasing, thus it lowers the free CO2 level through photosynthesis. This activates first the hicarhonate-carbonate resources uptake, resulting in a pH inc~tso. This pH increase, in tat'n, accelerates on the one hand the NH4/NH3 equilibrium in the sense of NH3 production that will have, above a certain threshold, a toxic effect on the photosynthesis. On the other hand, the pH increase allows the non-soluble carbonate reserves to reconslitute and thus, accelerates the free CO2 decrease which becomes a limiting factor for photosynthesis. In this way, the pH decreases. (11)307
(11)308
F. Guerrinet al.
Phytoplankton
~
~
F
C02, H20
HC03" +H +
C03"" + H
Fig. 1. Directed signed graph representation of a process in an aquatic ecosystem. This double limitation (NH3 toxic effect and CO2 limitation) results in a high mortality of the phytopiankton biomass that constitutes dead organic mauer: this is the dystrophic crisis. Then, organic matter decay frees CO2 and ammonia nitrogen. Since the pH is still low, it does not prevent the use of carbonates-bicarbonates reserves. Above a certain threshold, the phytoplankton starts to grow again, allowing the cycle to repeat. Dil~ted Sined Cwanh Modelin2 Note that in such relatively complex explanations no numerical functions are involved. However, these reasoning pathways can be modeled using a 'signed graph' representation (Figure 1), where nodes are variables, arrows are causal influences between them, and labels (+,-) are the signs of the functional monotonic dependencies between an effect-variable and its cause. One can notice that textual explanations are exhaustively represented in the rewesentafion given Figure 1, in a far more concise form. Each variable takes its value in a two-elements set called 'Quantity Space': QS = (inc,dec}, where inc (vs. dec) stands for increase (vs. decrease). The basic entities of the model can be encoded as follows: (1) a predicate, influenceCVc,Ve, S), stating the sign S E {+,-} of the influence between a cause-variable V c and an effect-variable Ve; (2) a predicate val(n,Vi, vi), stating for any variable Vi its value v i ~ {inc,dec }, at dine-step n; (3) two rides, allowing one to find out the value v e of variable Ve, from V c and S: If S = {+}, then val(n,Ve, ve) I ve = Vc; otherwise, If S ffi {-}, then val(n, Ve, ve) I v e ;evc Such a model can provide the user with the basic capabilities necessary to achieve supervision tasks such as prediction and diagnosis: Prediction: given the cause(s) find out the effect(s). Taking the example illustrated in Figure 1, starting from val(0,pH,ino) and incorporating all the influences between the variables, the program will genera= all the other variables values, i.e. the successive states of the system: • state 1: val(1,NH3,inc), val(1,phytoplankton,dec), val(1,NH4,dec), val(1,organic-matter, inc), val(1,CO2,inc), val(1,CO3,inc), val(1,HCO3,inc); • state 2: val(2,CO2,inc), val(2,HCO3,inc), val(2,pH,dec), val(2,CO3,inc), val(2,NH3,dec), val(2,phytoplankton, inc), val(2,NH4,inc),val(2,orgnnic-matter,dec); • state 3: val(3,CO2,dec), val(3,HCO3,dec), val(3,pH,inc), etc.; and so forth... When states 2 and 3 are compared (a state corresponds to a single propagation in the signed graph), the alternate behavior of the system becomes clearer, as explained above. ~ : given the effect find out the cause(s). Starting from val(2,organic-matter,dec), the program will generate the proximate cause-variable values: val(1,phytoplankton,dec), val(2,phytoplankton,inc), capable of explaining the organic matl~ value. The diagnosis can be repeated to di~nose every cause and sub-cause. Searching for val(2,phytoplankton,inc) will yield: val(1,NH3,inc), val(2,NH3,dec), val(1,NH4,dec), val(2,NH4,inc), val(1,CO2,inc), val(2,CO2,inc); and so forth... Directed signed graph modeling was applied particularly to chemical engineering processes/10, 11/. Although it is capable of performing reasoning tasks difficult to do 'at hand', the two-sign formalism is semantically limited. Moreover, it has no operator to combine two or more influences.
Qualitative Reasoning Methods for CELSS
(B
0
0
+
?
?
?
0
+
? ?
+
?
+
+
?
?
?
?
?
®
0
(11)309
+
?
+
0
?
0
0
0
0
0
+
-
0
+
?
?
?
0
?
?
Fig. 2. Sign algebra: tables o f ' ~ ' (qualitative sum) a n d ' @' (qualitative multipfication).
~m_Algr2~ These difficulties can be overcome with the sign algebra, in which the Quantity Space is four valued: QS = {-,0,+,7}. The last QS clement '?' stands for ambiguity and is necessary for the closure of the operators '~)' (qualitative sum) and ' ® ' (qnah'tative multiplication). The tables of these two operators arc given in Figure 2. QS elements can be interpreted according to three main viewpoints: (1) a partition of the real line; (2) tendencies, i.e. the sign of dX/dt; (3) the sign of X' = X - X 0, differear,.c between an observed value X and a set-point value X 0. Although, having sufficient mathematical properties and enabling qualitative equations resolution/12/, sign algebra has a strong limitation as it generates ambiguity: e.g., + • - = 7. This would appear, in our example Figure 1, in combining the opposite influences of NI-I3 and NH4 on phytoplankton. A way to overcome this difficulty is to reason about the orders of magnitude of the influences to be combined. ordew 9f Magnitude Order of mam~itude aualitafive algebras. Qualitative algebras can be ranged within a continuum from the least informative (i.e., sign algebra) to the most informative (i.e., interval algebra) partition; note that an infinite partition yields the real numbers themselves 113/. Putting aside these two limit cases, order of magnitude algebras assume a finite partition of ~ . To a given set of qualitative descriptors corresponds here an infinity of partitions according to the choice of the numerical boundaries. Consequently, the tables of operators consistent with 9~ are not unique, and normalization is necessary to perform calculus. However, these algebras do not share the same interesting properties with sign algebra so that qualitative calculus is more difficult, particularly equations solving/14/. Order of magnitude relations. This approach enables the comparison of quantities without referring to an absolute scale. The information about any variable is expressed relative to others. The originator of these models is the formal system FOG/15/, hased on Ouec relations: (1) 'negligible in relation to'; (2) 'close to', and (3) 'has the same sign and order of magnitude as'. In tbe example of algal blooms presented above, this formalism could be used to assign sensitivity degrees to the influences acting on a same variable and to compare them. The rules can then be used to build up a sensitivity lattice and the normalized sensitivity degrees may step in the final combination of influences. Derived from FOG, the O(M) formalism was proposed to make the system accept also numerical values/16/. QUALITATIVE SIMULATION OF DYNAMIC SYSTEMS
Although there exist several qualitative simulation formalisms/17, 18/, we chose to present in this section the Kuipers' qualitative differential equations (QDE) approach, that was implemented in the QSIM simulator/19/. The ODE Formalism Variables describing a system are characterized accanding to: (1) qualitative values, 'qval', corresponding either to landmarks {11,12,...In} or intervals between landmarks; (2) direction of change, 'qdir', correspondin8 to the sign of the variable derivative, then qdiri v {dec,std,inc }. The state of a variable is a pair , and the overall system state is the set of all the individual states. A system is modeled as a set of constraints (i.e., relationships) between variables that constitute a QDE. There arc seven basic constraints: addition, multiplication, minus, derivative, constant, monotonic increasing and decreasing. A table of legal mmsitions between states is given, that arc of two types: (1) P-mmsifions, from a time point to a time inu~rval; (2) I-wansitions, from a time interval to a lime point. Most of these transitions are intuitive as they express continuity properties. The simulation is based on the generate-and-test algorithm: (1) generate all the possible successor states from the current state; (2) filter the solutions with the constraints and some other 'global filters'. The result is a graph in which every branch corresponds to a succession of system states (i.e., an admissible behavior). JASR 14:11-U
(11)310
F. Guerrinet aL
mees-ptt. 7.8
rneeB-N~lt4 = 8.5 rng/L
ffi@5-1,Mnp ,. 13 "C
o l ~ n ( : l = high-wind
J
I TR-q:
I
mees-Oxy = 9,0 mg/L
I Oxy=wind
I
TR-q:WO- decrl0nv(Nm)[']Oxy)
Hg. 3. Causal interpretation of heterogeneous data using SIMAO; a short example in hydroecology. This algorithm guarantees that all the behaviors consistent with the model are produced. However, the weakness of the representation is that some 'spurious'(Le., physically impossible)behaviors may also be produced. Simnhulne pamdatian Dvnmniet with SOUALE SQUALE is a QDE-Imsod simulator to bolp design tasks in simulating processes like those involved in the IntraVehicular Activities suit f ~ astronauts. It is jointly being dcvi~d by Daasauit Aviation and the System Analysis and Automatic Control Lab. (Toulouse, F). It is used here to give an example in population dynamics. The differential equation correspunding to the classiclogistic model is: dN/dt = rN * (K - N')/K, that can be rewritten as: dN/dt = (r/K) * N * D (1) The paramete~ of interest of equation (1), with their corresponding landmarks (in brackets) are: ( 1) N, the size of the population, {0, N 0, +oo} where N O is the ~ population size; (2) dN/dt, thenctincreascspcccL (-oo,0,+oo};
(3) K, the asymptotic limit,{Ka}; (4) D = K-N, {-oo,0, Ka, The QDE of equation (1) is constituted by the 4 following constraints: (1) Const(K), expressing that K must be regarded as a constant; (2) Deriv(N,dN/dt), expressing that dN/dt is the derivative of N, (3) Add(D,N,K), which is equivalent to D = K - N; (4) Mult(N,D,dN/dt), to express the whole equation (1). Since r/K remains constant, it can be ignored in a qualitative model. To start a simulation one needs to specify the initial conditions. For example, the set of initial states: N = , D = <]0,K0[,dec>, K = , dN/dt = <]O,+oo[,inc>, produces the following results: (1) N continuously increases with time; (2) D decreases continuously, that is: N -> K. This simple example shows that quafitative simulation makes it possible to simulate the basic features of a differential equation without knowing any quantitative information about its parameters. CAUSAL REASONING ABOUT HETEROGENEOUS DATA SIMAO: a Svmem to Inteatlret Mt-~lmr~m~ A ~ I v J ~ and ~ t i n r m
A data registrationform genmally i n ~ severalpieces of information:(I) general,such as the location,date and time of sampling, etc.;(2) numerical values,e.g. measurements; (3) linguistic(purelyqualitative)indications, e.g.the color of the water. The problem is:given the values of allthese variables(numericaland linguistic),what can w¢ say about the current system state ? According to the SIMAO's formalism, each'variabletakes its value within a five-valued Quantity Spucc: QS = { p p , p , m , f , f f } , corresponding to u qualitative scale such as: very low, low, me~um, high, very high, respectively.
QualitativeReasoningMethodsfor CELSS
(11)311
SIMAO proceeds as indicated in a short example (for more details refer to/20, 21/) taken in hydrnocology and presentod Figure 3: (1) translate numerical input-valnos (meas-terap, meas-N/NH4, etc.) into qualitative values (temp, NH4, etc.), using "l'R-m' rules; (2) translate linguistic observation (obs-wind) into qualitative value (wind), using "rR-o' rules; (3) calculate the qualitative values of unmeasured variables from the values of their causes, using WR-q rules', corresponding to calculus operators such us '[*]', inv (i.e., opposite), deor, etc. Starting from: very high ionized ammonia value (NH4 ffi f0, high dissolved oxygen value (Oxy = 0, standard pH value (pH ffi m ) , low temperature (temp = p ) , SIMAO generates that unionized ammonia will be high (NH3 = f) and therefore water quality will be poor for fisbeulutre purposes (WQ ffip), although oxygen level is favorable (Oxy = f) mainly because of high wind (wind ffi 0. CA-EN: A Causal En2ine for Intelligent Sunervisorv Control Since human experts naturally use causality for interpretation" explanation, etc., causal reasoning can provide a practical framework for knowledge elicitation and representation, and provide a way to ovea~ome the limitations of the QDE approach in simulation. CA-EN is aimed at reasoning on-lino, to support ~.~kg required in dynamic system supervision such as: (1) assessing the value of non-observable variables; (2) prediction; (3) determining corrective actions in case of faulty behavior;, (4) explaining the process behavior by refecring to its history. CA-EN temporal fealares are on the one hand a logical clock set accordingly set to the swffmess of the ixocess, on the other hand the IxTeT time management system, in which a time-point is represented as a pair of time-instants. The CA-EN modeling formalism involves 'q-automata' to represent the process variables together with the knowledge needed to reason about them/22/. REASONING ABOUT HIERARCHICAL SYSTEMS USING AGGRF~ATION Because of lack of space, we cannot describe accurately another very exciting research area, called 'aggregation'. However, we would like to emphasize three pieces of work that could speciDxally be applied to ecological systems: (1) three-level reasoning about populations/23/; (2) time-scales abstraction/24/, that could help to take into account multiple dynamics in CELSS, e.g. for design purposes; (3) reasoning about modules and compononts circuits/251. If one think to the initial CELSS reference configuration proposed by Rummel and Avemer/26/, this latter approach, aimed at dynamically simplifying topologies by suppressing irrelevant details, could undoubtedly be useful to perform reasoning tasks on such huge amounts of interconnected black-boxes. CONCLUSIONS Our claim is that the use of methods developed within the frame of artificial systems (i.e., man-designed), will help the amount of data and knowledge accumulated by ecological researchers to become more operational, and thus helpfill for natural resources managers as well as for artificial ecosystems designers and controllers. The recent advances made in Qualitative Reasoning, bring now tools that allow one to process qualitative and empirical knowledge of human operators to design and supervise complex systems such as CELSS. REFERENCES 1. F. Ouerrin, Qualitative Reasoning about artificial ecological systems for design and supervision purposes, in: 12th Int. Conf. Artificial Intelligence, Expert Systems, Natural Language, Avignon (F) 1992, p. 763. 2. S.H. Schwartzkopf, Design of an elemental analysis system for CELSS research, Adv. Space Res. 7, #4, 89 (1987). 3. M. Andr6, States of researches of crop plant cultivation in artificial systems, contribution of the laboratory of Ecophysiology, in: DARA/CNES Wshop on Artificial Ecological Systems, Marseille (F) 1990, p. 67. 4. M. Andr6, H. Duclonx, C. Richaud, D. Massimino, A. Daguenet, J. Massimino and A. Getbaud, Etude des relations entre photosynth~,se, respiration, transpiration et nutrition min6rale chez le b16. Adv. Space Res. 7, #4, 105 (1987). 5. T. Volk and J.D.Rummel, Mass balances for a biological life support system simulation model. Adv. Space Res. 7, # 4, 141 (1987). 6. J.D. Rummel and T. Volk, A modular BLSS simulation model, Adv. Space Res. 7, # 4, 59 (1987).
(11)312
F. Guerrinet al.
7. E.P. Glenn and R.J. Frye, Soil bed reactors as endogenenus control systems for CELSS, in: DARA/CNES Workshop on Artificial Ecological Systems, Marseille (F) 1990, p. 41. 8. B.C. Williams and J. DeKleer, Qualitative reasoning about physical systems: a return to roots, Artificial Intelligence 51, # 1-3, 1-9 (1991). 9. Y. Azov and G. Shelef, The effect of pH on the performance of high rate oxidation ponds, in: IAWRPC Int.Conf. on Waste Stabilization Ponds, Lisbon (P) 1987, p. P.35. 10. M. lri, K. Aoki, E. O'Shima and H. Matsuyama, An algorithm for diagnosis of system failures in the chemical process, Computers & Chemical Engineering 3, 489-493 (1979). 11. M.A. Kramer and B.L. Palowich Jr., A rule-based approach to fault diagnosis using the signed directed graph. AIChe Journal 33, # 7, 1067-1078 (1987). 12. J.-L. Dormoy, Nonvelles m6thodes de calcul qualitatif, Revue d'Intelligence Artificielle 3, #4, 39-53 (1989). 13. L. Trav6-Massuy~s and N. Piera, Order of magnitude models as qualitative algebras, llth Int. Joint Conf. on Artificial Intelligence, Delmit (USA) 1989, p.1261. 14. A. Missier, N. Piera and L. Trav6-Massuy~s, Order of magnitude qualitative algebras: a survey, Revue d'Intelligence Artificielle 3, # 4, 95-109 (1989). 15. O. Raiman, Order of magnitude reasoning, in: 5th Nat. Conf. on Artificial Intelfigence (AAAI-86), Philadelphia (USA) 1986, p. 100. 16. M.L. Mavrovouniotis and G. Stephanopoulos, Formal order-of-magnitade reasoning in process engineering, Computer Chemical Engineering 12, 867-880 (1988). 17. J. DeKleer and J.S. Brown, A qualitative physics based on confluences, Artificial Intelligence 24, #1-3, 7-83 (1984). 18. K. Forbus, Qualitative process theory, Artificial Intelligence 24, #1-3, 85-168 (1984). 19. B. Kuipers, Qualitative simulation, Artificial Intelligence 29, 289-338 (1986). 20. F. Guerrin, Interpretation of measurements, analyses and observations in partially-known processes, in: 9th Nat. Conf. on Artificial Intelligence (AAAI-91), Model-Based Reasoning Workshop, Anaheim (USA) 1991. 21. F. Guerrin, Qualitative reasoning about an ecological process : interpretation in hydmecology, Ecological Modelling 59, # 3-4, 165-201 (1991). 22. K. Bousson and L. Trav6-Massuy~s, A Computational Causal Model For Process Supervision, in: IFAC Int. Symp. on Artificial Intelligence in Real-Tnne Control, Delft (N'L) 1992, p. 183. 23. F.G. Amador and D. Weld, Microscopic and statistical reasoning about populations, in: 9th Nat. Conf. on Artificial Intelligence (AAAI-91), Model-Based Reasoning Workshop, Anaheim (USA) 1991. 24. B. Kuipurs, Abstraction by time-scale in qualitative simulation, in: 6th Nat. Conf. on Artificial Intelligence (AAAI-87), Seattle (USA) 1987, p. 621. 25. Z.Y. Liu and A.M. Farley, Structural aggregation in common-sense reasoning, in: Proc. 9th Nat. Conf. on Artificial Intelligence (AAAI-91), Anaheim (USA) 1991, p. 868. 26. J.D. Rummel and M. Avemer, Bioregenerative life support: the initial CELSS reference configuration, in: 21st Int. Conf. Environmental Systems, San Francisco (USA) 1991, SAE Technical Papers Series, # 911420.