analyzing discontinuities in physical system models · analyzing discontinuities in physical system...

10
164 QR-96 Analyzing Discontinuities in Physical System Models Mosterman and Gautam Biswas Abstract Physical systems are by nature continuous . Per- ceived discontinuities in system models are in re- ality nonlinear behaviors that are linearized to re- duce computational complexity and prevent stiff- ness in system analysis and behavior generation . Discontinuities arise primarily from component parameter simplification and time-scale abstrac- tion . Discontinuities in models are handled by in- troducing idealized switching elements controlled by finite state automata to bond graph models . In this paper, we make a systematic study of the nature and effects of discontinuities in phys- ical system models, and present an algorithm that generates consistent and correct behaviors from hybrid models . A primary contribution of this paper is the characterization of discontinu- ous changes, and a systematic method for val- idating system models and behavior generation algorithms . Introduction Pieter J . Center for Intelligent Systems Box 1679, Sta B Vanderbilt University Nashville, TN 37235 . pjm,biswasQvuse .vanderbilt Physical systems are by nature continuous, but often exhibit nonlinearities that make behavior generation complex and hard to analyze especially with qualita- tive reasoning schemes . This complexity is often re- duced by linearizing model constraints so that compo- nent models (e.g ., transistors, oscillators) exhibit mul- tiple piecewise linear behavior or by abstracting time so that component models (e.g ., switches, valves) ex- hibit abrupt discontinuous behavior changes[2, 11] . In either case, the physical components are modeled to operate in multiple modes, and system models exhibit mixed continuous/discontinuous behaviors . Typically, simulation methods for generating phys- ical system behavior, whether quantitative (e .g ., [12]) or qualitative (e.g ., [5, 8]) impose the conservation of energy principle and continuity constraints to ensure that generated behaviors are meaningful . Energy dis- tribution among the elements of the system defines sys- tem state, and energy distribution over time reflects the history of system behavior . .edu Bond graphs[12] provide a general methodology for modeling physical systems in a domain independent way. Its primary elements are two energy storage ele- ments or buffers, called capacitors and inductors, ) and a third element, the resistor, which dissipates energy to the environment[10, 12] . Two other elements, sources of flow and effort, allow transfer of energy between the system and its environment . In addition, the model- ing framework provides idealized junctions that con- nect sets of elements and allow lossless transfer of en- ergy between them . Two other specialized junctions, transformers and gyrators, allow conversion of energy from one form to another . The use of the bond graph modeling language in building compositional models of complex systems has been described elsewhere[l] . State changes in a system are caused by energy ex- change among its components, which is expressed as power, the time derivative, or flow, of energy. Power is defined as a product of two conjugate power vari- ables : effort and flow . Given conservation of energy holds for a system, the time integral relation between energy variables and power variables implies continuity of power, and, therefore, effort and flow . As discussed earlier, discontinuities in behavior are attributed to time scale abstraction and parameter abstraction . Consider an example of an ideal non-elastic collision in Fig . 1 . A bullet of mass m l and velocity v l hits an unattached piece of wood of mass m2, initially at rest . The collision causes the bullet to get implanted in the wood, forming one body of mass rnl + m 2 moving with velocity say v2 . The initial situation is represented as two bond graph fragments . Each fragment has an inertial element (mass) connected by a 1-junction to a zero effort source (Se ) which indicates that there are no forces acting on either the bullet or the wood . Because there are no sources, the momentum after collision is conserved, so mlvl - (m l -fm2)v2, i .e ., v2 - m "'+'m2 vl . i 'Capacitors store energy in the form of generalized displacement and inductors store energy as generalized momentum

Upload: dinhnhan

Post on 30-Aug-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

164 QR-96

Analyzing Discontinuities in Physical System Models

Mosterman and Gautam Biswas

Abstract

Physical systems are by nature continuous . Per-ceived discontinuities in system models are in re-ality nonlinear behaviors that are linearized to re-duce computational complexity and prevent stiff-ness in system analysis and behavior generation .Discontinuities arise primarily from componentparameter simplification and time-scale abstrac-tion . Discontinuities in models are handled by in-troducing idealized switching elements controlledby finite state automata to bond graph models .In this paper, we make a systematic study ofthe nature and effects of discontinuities in phys-ical system models, and present an algorithmthat generates consistent and correct behaviorsfrom hybrid models . A primary contribution ofthis paper is the characterization of discontinu-ous changes, and a systematic method for val-idating system models and behavior generationalgorithms .

Introduction

Pieter J .Center for Intelligent Systems

Box 1679, Sta BVanderbilt UniversityNashville, TN 37235 .

pjm,biswasQvuse .vanderbilt

Physical systems are by nature continuous, but oftenexhibit nonlinearities that make behavior generationcomplex and hard to analyze especially with qualita-tive reasoning schemes . This complexity is often re-duced by linearizing model constraints so that compo-nent models (e.g ., transistors, oscillators) exhibit mul-tiple piecewise linear behavior or by abstracting timeso that component models (e.g ., switches, valves) ex-hibit abrupt discontinuous behavior changes[2, 11] . Ineither case, the physical components are modeled tooperate in multiple modes, and system models exhibitmixed continuous/discontinuous behaviors .

Typically, simulation methods for generating phys-ical system behavior, whether quantitative (e .g ., [12])or qualitative (e.g ., [5, 8]) impose the conservation ofenergy principle and continuity constraints to ensurethat generated behaviors are meaningful . Energy dis-tribution among the elements of the system defines sys-tem state, and energy distribution over time reflects thehistory of system behavior .

.edu

Bond graphs[12] provide a general methodology formodeling physical systems in a domain independentway. Its primary elements are two energy storage ele-ments or buffers, called capacitors and inductors, ) anda third element, the resistor, which dissipates energy tothe environment[10, 12] . Two other elements, sourcesof flow and effort, allow transfer of energy between thesystem and its environment . In addition, the model-ing framework provides idealized junctions that con-nect sets of elements and allow lossless transfer of en-ergy between them . Two other specialized junctions,transformers and gyrators, allow conversion of energyfrom one form to another . The use of the bond graphmodeling language in building compositional models ofcomplex systems has been described elsewhere[l] .

State changes in a system are caused by energy ex-change among its components, which is expressed aspower, the time derivative, or flow, of energy. Poweris defined as a product of two conjugate power vari-ables: effort and flow . Given conservation of energyholds for a system, the time integral relation betweenenergy variables and power variables implies continuityof power, and, therefore, effort and flow . As discussedearlier, discontinuities in behavior are attributed totime scale abstraction and parameter abstraction .

Consider an example of an ideal non-elastic collisionin Fig . 1 . A bullet of mass ml and velocity v l hits anunattached piece of wood of mass m2, initially at rest .The collision causes the bullet to get implanted in thewood, forming one body of mass rnl +m2 moving withvelocity say v2 . The initial situation is representedas two bond graph fragments . Each fragment has aninertial element (mass) connected by a 1-junction to azero effort source (Se ) which indicates that there are noforces acting on either the bullet or the wood . Becausethere are no sources, the momentum after collision isconserved, so mlvl - (m l -fm2)v2, i .e ., v2 - m"'+'m2 vl .i

'Capacitors store energy in the form of generalizeddisplacement and inductors store energy as generalizedmomentum

0 0

Figure 1 : Hybrid Model: Ideal non-elastic colli-sion of two masses.

A closer look at the model structure reveals that theinitially independent masses become dependent at theinstant of collision by virtue of a 0-junction connec-tion, with no dissipation or energy storage elementsinvolved . This represents a discontinuous change inthe model, attributed to the modeling assumption thatthe collision is ideal and non-elastic . A more completemodel of the situation would include dissipative andstiffness effects, and the two buffer velocities could notchange instantaneously . If the goal of behavior gener-ation is simply to determine the trajectory and finalvelocity of the bullet-wood system, the more abstractmodel allowing an abrupt change in velocity is reason-able and computationally efficient .Our previous work[9, 10] in developing a uniform ap-

proach to analyzing mixed continuous/discontinuoussystem behavior without violating fundamental physi-cal principles such as conservation of energy and mo-mentum, led to the development of a hybrid modelingand behavior analysis scheme that combines

1 . traditional energy-related bond graph elements tomodel the physical components of the system, and

2 . control flow models based on switching junctionswhose on-off characteristics are modeled by finitestate automata .

The primary characteristics of the hybrid modelingscheme are summarized in the next section . In this pa-per, we establish a theory for modeling discontinuitiesin physical systems and then present a formal method-ology for verifying consistency of hybrid system mod-els .

The Hybrid Modeling SchemeA system with n components each with k behaviormodes, can assume k' overall configurations, how-

ever, in practical situations, only a small fraction ofthe configurations are physically realized . In previ-ous work, researchers have defined a number of ap-proaches, such as transition functions (e .g ., [8]), finitestate automata and switching bonds[2], to handle dis-crete changes in physical system configuration and be-havior . Most of these methods assume that the rangeof system behaviors are pre-enumerated, but, in gen-eral that can be a very difficult task . Recent compo-sitional modeling approaches[1, 4] overcome this prob-lem and build system models dynamically by compos-ing model fragments . Our hybrid modeling schemeadopts this methodology, and implements a dynamicmodel switching methodology in the bond graph mod-eling framework .

Instead of identifying a global control structure andpre-enumerating bond graph models for each of themodes, the overall physical model is developed as onebond graph model that covers the energy flow rela-tions within the system . Discontinuous mechanismsand components in the system are then identified, andeach mechanism is modeled locally as a controlled junc-tion which can assume one of two states - on and off.The local control mechanism for a junction is imple-mented as a finite state automaton and represented asa state transition graph or table.

Controlled Junctions

The input to the finite state automata associated withcontrolled junctions are the power variables, effort andflow, and their output are control signals that deter-mine the on/off state of the associated junction . Eachcontrolled junction has an associated control specifica-tion function, called CSPEC, which switches the junc-tion on and off. The state transition diagram fromwhich the CSPEC is derived may have several inter-nal states that map onto the on and off signals but inevery transition sequence on/off signals have to alter-nate . Furthermore, CSPEC conditions have to resultin at least one continuous mode of operation for allreachable energy distributions .The set of local control mechanisms associated with

controlled junctions constitute the signal flow modelof the system . The signal flow model performs no en-ergy transfer, therefore, it is distinct from the bondgraph model that deals with the dynamic behavior ofthe physical system variables . Signal flow models de-scribe the transitional, i .e ., mode-switching behavior ofthe system . A mode of a system is determined by thecombination of the on/off states of all the controlledjunctions in its bond graph model . Note that the sys-tem modes and transitions are dynamically generated,they do not have to be pre-enumerated .

Mosterman 165

When on, a controlled junction behaves like a nor-mal junction, but when off it forces either the effort orflow value at all connected bonds to become 0, thus in-hibiting energy transfer across thejunction . Therefore,controlled junctions exhibit ideal switch behavior, andmodeling discontinuous behavior in this way is consis-tent with bond graph theory[12] . Deactivating con-trolled junctions can affect the behaviors at adjoiningjunctions, and, therefore, the causal relations amongsystem variables . Controlled junctions are marked bysubscripts (e .g ., 11, 02) . They define the interactionsbetween the signal flow and energy flow models of thesystem .The use of controlled junctions is illustrated for the

bullet-wood system whose hybrid model is shown inFig . l . m1 and m2 are the inertias (masses) of the bul-let and wood block, respectively. When the bullet at-taches itself to the wood block, the model switch occursbecause the 0-junction turns on when X6utlet > xwood .Once the bullet is lodged in the wood there is no mech-anism to dislodge it, therefore, once turned on thisjunction cannot be turned of. This is indicated by theFALSE condition on the on/off' transition for the junc-tion . This example illustrates a seamless integration ofmulti-mode behaviors in one model . Other examplesof hybrid bond graph models are discussed in [9, 10] .

Mode Switching in the Hybrid Model

Discontinuous effects in physical system models oc-cur when energy or power variables cross a certainthreshold value . For example, a diode is modeled tocome on when the voltage drop across it exceeds 0.6V .These discontinuous effects establish or break energeticconnections in the model, and this may cause relatedsignals to change discontinuously. The tank system,Fig . 2, has two pressure valves that open when eitherpressure e1 or e2 crosses a pre-set threshold value . Ifthe specified threshold value for the valve controlledby e1 is >_ the threshold value of the second valve, theopening of the first valve will cause the second to open .If the resistance, capacity, and flow inertia of the con-necting pipe are abstracted out of the model, these twodiscrete changes occur instantaneously and the modewhere only the valve controlled by e 1 is open occursfor a brief instant in time (according to the modelingassumptions it is instantaneous) . Therefore, discon-tinuous changes may cause other signal value changeswhich result in a sequence of discontinuous changes .Since modeling assumptions require that discontinu-ous changes occur instantaneously, these transitionsare called mythical.

In this paper we establish that state variables inthe system do not change during mythical changes .

166 QR-96

Figure 2 : Tank with two pressure controlledvalves .

The system does undergo discrete state changes, deter-mined by the finite state automata associated with thecontrolled junctions . Eventually, a sequence of discreteswitches terminates in a real mode (system behavioragain evolves as a function of time), and the continu-ous state vector for this new mode has to be derived .This is illustrated in Fig . 3 . Mythical modes are de-picted in a white background and real modes in a darkbackground . In real mode Mo a signal value crossesa threshold at time tJ , which causes a discontinuouschange to model configuration M1, represented by thediscrete state vector o" 1 . The power variable values(Ei, Fi) in this new configuration are calculated fromthe original energy distribution (P� Q,) values . If thenew values cause another instantaneous mode change,a new modeM2 is reached, where the new power vari-ables values, (Ei,Fi), are calculated from the originalenergy distribution (P� Q,) . Further mythical modechanges may occur till a real mode, NIN, is reached .The final step involves mapping the energy distribu-tion, or continuous state variable values, of the de-parted real mode to the new real mode . This issue isnon-trivial, and discussed in detail in a later section .Real time continuous simulation resumes at t; so sys-tem behavior in real time implies mode MN followsMo . The formal Mythical Mode Algorithm (MMA) isoutlined below .

1 . Calculate the energy values (Q� P,) and signal val-ues (E� F,) for bond graph model Iuo using (Qo,Po), values at the previous simulation step as initialvalues .

2 . Use CSPEC to infer a possible new mode given(E� F,) .

3 . If one or more controlled junctions switch statesthen :

Figure 3 : State Evolution: Mythical + RealModes.

(a) Derive the bond graph for this configuration .(b) Assign causal strokes using the SCAP

algorithm[12] .(c) Calculate the signals (Ei, Fi) for the new mode,

Mi, based on the initial values (Q� P,) .(d) Use CSPEC again to infer a possible new mode

based on (Ei, Fi) for the new mode, Mi .(e) Repeat step 3 till no more mode changes occur .

4 . Establish the final mode, MN, as the new systemconfiguration .

5 . Map (Qo, PO) to the energy distribution for MN,(QN, PN) .

A complete simulation system that incorporates con-tinuous simulation and the MMA algorithm been im-plemented and tested on a number of physical systemexamples [9] .

Analyzing Model DiscontinuitiesSince one discontinuous change may cause a sequenceof mythical changes, what is the guarantee that sim-ulation with a system model will not produce an in-finite loop of mythical mode changes? This can hap-pen if a mythical mode loops back to a mythical modethat has already appeared in the sequence of modechanges . Discontinuous changes are modeled to be in-stantaneous, and the occurrence of a loop during myth-ical mode changes would imply that system behaviordoes not progress over time . This violates physicalreality because all dynamic physical systems have tosatisfy divergence of time[6] . In such situations, thesystem model is incorrect and needs to be modified togenerate correct system behaviors .Our methodology for analyzing the consistency of a

sequence of switches is based on applying the princi-ple of invariance of state to the MMA. This defines a

multiple energy phase space analysis scheme to deter-mine the physical consistency of hybrid models . Theinitial values of energy storing elements in the new realmode are determined by the principle of conservationof state .

The Nature and Effects of DiscontinuitiesAs a first step, we analyze discontinuous changes byconsidering the bullet-wood non-elastic collision illus-trated in Fig . 1 . Conservation of momentum deter-mines that after collision both masses have a commonvelocity, v2 = m+m2

v l . The amount of energy con-tained in the system before the collision is 1M1 V1 2,and, the amount of energy in the system after the col-lision is 2 (rnl -1- m2) ( �a+�,2 v1)

2 = 1m+2m v12 . Thisimplies that the collision causes a loss of energy equal

1

2

1 m1 2

2 _ 1 m,ns2

2to 2mlvl

- a mi+m2 v1

- a ml+m2 vl . Imposition ofconservation of momentum results in a discontinuousloss ofenergy to the environment, and is represented bya Dirac pulse2 whose area is determined by the model .The explanation for this energy loss is that an instan-taneous change in system configuration results in twoindependent buffers (the masses) becoming dependent,which then causes dissipation of energy to the environ-ment as heat . In case the environment is consideredisothermal, this thermal energy flow need not be ex-plicitly modeled by a heat sink between the systemand the environment (like dissipation of resistive el-ements) . Note that the instantaneous loss of energywould not occur if a resistive element modeled materialdeformation between the buffers (i .e ., their connectionwas non-ideal) .From a physical perspective, buffers that become de-

pendent have to be analyzed carefully . Bond graphmodeling theory assumes that physical system behav-iors change slowly enough to satisfy the lumped param-eter assumption where distribution of energy withinenergy buffers is considered homogeneous . Therefore,phenomena like dynamic turbulence effects caused bysudden large pressure differences in a tank cannot beeasily taken into account in system models . The obser-vation of an instantaneous energy redistribution whenbuffers become dependent is basically an artifact of anabstract model operating on a coarse time scale .To study the lumped parameter assumption in de-

tail, consider the free expansion experiment conductedby Gay-Lussac and Joule shown in Fig . 4 [3] . A cham-ber is made up of two connected bulbs with an on-offvalve that switches the connection on or off . Initially,only the left bulb contains a gas and the valve is closed .When the valve connecting the two volumes is opened,

'This is a pulse during an infinitely short interval of timewith a specific area .

Mosterman 167

Figure 4 : Instantaneous free expansion of a gasby diffusion .

the gas in the left bulb expands freely and starts diffus-ing into the right bulb . Even if the connecting orificeis non-resistive this diffusion introduces turbulence ef-fects that result in non-homogeneities, which violatethe lumped parameter assumption . From a thermo-dynamics perspective, when the goal is to computeequilibrium temperatures and pressures, using energybalance on a homogeneous model is adequate .

For the dynamic effects to be negligible in the timescale of interest, they have to occur in a mode of con-tinuous operation . In case of the above experiment,if the valve were closed quickly enough after opening,i .e ., we have two instantaneous changes, the gas cannotdiffuse and the homogeneous distribution over both ofthe volumes is never actually established . For CSPECconditions based on the energy variables involved, thetime scale is too small for the lumped parameter as-sumption to hold, and bond graphs cannot be used tomodel such processes . In effect, an immediate clos-ing of the opening leads to no redistribution of energywhich substantiates the observation that there neverwas a connection in real time.

In conclusion, switching conditions based on energystored in buffers that are between dependent and in-dependent without an intervening mode of continuousoperation are inconsistent with bond graph assump-tions and, therefore, prohibited . In this case, eithermodel refinement or another modeling approach hasto be chosen .

Evolution of System Behavior : Invarianceof StateA consequence of the absence of a physical manifesta-tion of mythical modes is that the system cannot ex-change energy with its environment during a sequenceof discontinuous changes, in other words, it is isolated .This is compatible with the fact that there is no re-distribution of stored energy within the system during

168 QR-96

such a sequence .The principle that energy is not redistributed dur-

ing discontinuous, instantaneous changes, but only af-ter a new mode is reached is termed the principle ofinvariance of state . The mythical mode algorithm forderiving discontinuous changes, and the correspondingmodel verification technique are based on this princi-ple .

Consider an ideal elastic collision, Fig . 5 . When theball hits the floor with a velocity v, it induces a forcewhich results in a reaction force by the floor . In case ofan ideal elastic collision this causes the ball to instan-taneously reverse its velocity and start traveling up-wards . In the corresponding hybrid bond graph model,the change of velocity is shown as a modulated flowsource which delivers its power when the controlledjunction 01 comes on . The CSPEC specifies that thisoccurs at the point when the ball hits the floor . Themoment the ball starts to move upwards, the controlledjunction turns off and the ball is represented by a sep-arate model fragment again . The floor is representedas a source to indicate it is part of the system environ-ment and the amount of energy transferred back to theball from the floor becomes a modeling decision . Thechange in momentum of the ball can only occur whena real mode is reached after mythical transitions . Ingeneral, any transfer of energy into or out of the systemcan only be applied in the real mode. However, duringmythical transitions, a Dirac pulse may be generatedand cause further CSPEC transitions . Once generated,their effect on all CSPECs have to be analyzed imme-diately . If the Dirac pulses can be propagated withoutcausing another CSPEC transition, the current modeis established as a real one and the effect of the Diracpulse is taken into account when computing the newstate vector in this mode. Otherwise, this mode is la-beled as mythical, and the active CSPEC is used togenerate the next mode, and the analysis continues asbefore without actually propagating the Dirac pulses .Thus invariance of state holds across a series of myth-ical mode changes and the continuous state vector isinvariant to mythical switches .To correctly infer model configuration changes, all

buffers that become dependent have to be analyzed inderivative causality, i .e ., they generate Dirac pulses .Changes in configuration and independence of buffersmay lead to further model switches .

The Initial Value Problem

After mythical changes, when a new continuous modeof system operation is established, the initial state vec-tor in the new mode has to be derived from the lastsystem state in the previous continuous mode . The

1_77, , 777:777

Figure 5 : Ideal elastic collision .

energy stored in buffers that remain independent doesnot change in the new configuration because of the in-tegral relation they impose on their energy variables .However, the energy content of dependent buffers canchange as determined by the conservation of stateprinciple[3, 13] which states that state variable (chargeand momentum) values are conserved . The depen-dence causes redistribution of the total energy in thebuffers, in the ratio oftheir parameter values as demon-strated by the bullet-wood system .

In case buffers become dependent upon sources, theirenergy changes according to the signal enforced bythe source . An ideal non-elastic collision, depictedin Fig . 6, shows the discontinuous change causing asource-buffer dependency with no dissipative effects(ideal collision) . In the hybrid bond graph model this isdepicted as a flow source of 0 value that gets switchedin at the time of collision . Notice that the momen-tum in the system before collision, mvba11, becomes 0instantaneously . Conservation of state cannot be ap-plied to derive the new value of the stored energy inthe dependent buffer . Instead, this value is completelydetermined by the value of the connected source .

In actuality, the ball and floor could be modeledas one system . For the elastic collision, the floor ismodeled as a buffer with a large stiffness coefficient,producing the behavior shown in Fig . 7 (x is the dis-placement, and v the velocity of the object) . For thenon-elastic collision, the floor is modeled as a large re-sistance, which dissipates energy, and this brings theball to a halt with a very fast time constant . For thesemodels, source-buffer dependencies and modeled Diracsources do not occur, and conservation of state and en-ergy is not violated . Therefore, the apparent violation

Figure 6 : Ideal non-elastic collision .

Figure 7 : Ideal elastic collision with the floormodeled as having a relatively large stiffness .

of these principles can be directly attributed to bufferdependencies in the model .The above examples illustrate that three situations

can be associated with the initial value problem thatresults from discontinuities in a model:

" Switching modes causes no buffer-buffer or source-buffer dependencies . In this case the continuousstate vector is unchanged between real modes .

" Mode transitions cause two or more buffers to be-come dependent, and this causes the size of the statevector to change between real modes . As discussed,individual energy variable values change, but theirtotal remains the same so conservation ofstate holds .The new energy distribution is determined by the to-tal value of stored energy in buffers that are involvedand the ratios of their parameters . Mode transitionsmay result in loss of energy to the environment as a

Mosterman 169

result of changes in the system configuration .

Mode transitions cause source-buffer dependency orexplicitly modeled Dirac sources to become active .In this case the switching causes a source (i .e ., theenvironment) to instantaneously transfer energy intoor out of the system . The new values of stored en-ergy in the buffers involved is primed to the sourceenforced values after the new real mode is estab-lished .

Step 5 of the MMA handles all three cases appropri-ately, and solves the initial value problem correctly af-ter mode transitions .

Analyzing Correctness of System ModelsHaving established the invariance of state principle,the next step is to establish systematic methods forverifying system models that incorporate discontin-uous changes . Given the existence of instantaneousmode changes, it is important to establish that myth-ical transitions do not result in loops and violate theprinciple of divergence of time .As a case of interacting discontinuous changes, con-

sider the two ball examples of the last section . Assumethat

1 . if the ball momentum is greater than a given thresh-old, (pth), an ideal elastic collision occurs,

2 . if the ball momentum is below the threshold, thecollision is ideal and non-elastic .

The ball bounce is modeled to be ideally elastic, andthe amplitude of the bounce decreases with time be-cause of air resistance . Thus its momentum decreaseswith every bounce, and once it falls below a certainthreshold value, Pth, the ball is observed to come torest.' This part of the behavior is modeled as an idealnon-elastic collision . The hybrid model for this systemis shown in Fig . 8 . The system model has two inter-acting switches, and this raises the issue of divergenceof time . To verify that the system model satisfies thiscondition, a multiple energy phase space analysis tech-nique has been developed .Phase space analysis is based on a qualitative repre-

sentation of model behavior . The energy phase space isk-dimensional, where k is the number of independentbuffers or state variables in the system . These energyvariables cannot change discontinuously across a se-quence of mythical modes, therefore, mythical modepoints in this space are invariant and correspond tocontinuous state vectors of the model . To establish

'This example is abstracted from the cam-axis subsys-tem of an automobile engine .

170 QR-96

elastic collision .Figure 8 : A combined ideal elastic and non-

phase space behavior of a hybrid model in terms ofits energy distribution, its switching conditions haveto be expressed in terms of stored energy (i .e ., general-ized momentum and generalized displacement) . How-ever, switching conditions in the model CSPECs arebased on power variables which can be composed ofdifferent state variables, depending on the mode of op-eration . Therefore, an energy phase space has to beconstructed for each mode of operation . The rest ofthis section studies the energy phase space for both thesource-buffer and the buffer-buffer dependency condi-tions that may arise in system models .

Source-Buffer Dependency For the bouncingball, all CSPEC transitions are specified in terms ofswitching invariant state variables (Fig . 8), except forthe force F6,,11 which is Fb.11 = F�, -}- FR1 - Fy , whereg is the gravitational force . To derive the conditionsunder which the flow source, i .e ., junction 01 turns off,Fbail has to be expressed in terms of stored energy vari-ables x6 .11 and Pb .11 . When the flow source is active,buffer dependency causes F�, to be derivative, i .e .,

dFm = d

and, discontinuous changes induce a Dirac pulse, 8 .From the CSPEC for 01, the condition for switchingis Fb411 <_ 0 . When this junction is in its off state,pb .11 = rnvb.11 . When it switches on, the velocity andmomentum of the ball become 0 instantaneously. Fromequation (1), this implies that F�, becomes a Diracpulse whose magnitude approaches positive or negativeinfinity, depending on whether the stored momentumwas negative or positive, respectively . If the momen-tum was 0, F�, equals 0 . Let the function sign bedefined as

-1

if x<0sign(x) =

0

if x = 0

(2)1 ifx>0

MSf

Sf

2: x-

barvba11 0

Figure 9 : Energy phase space: Bouncing Ball .

If p :A 0 the condition for switching becomes F� , =-sign(p)b <_ 0 . Because of the magnitude of the Diracpulse, the effects of friction and the gravitational forcecan be neglected at switching . Therefore, the conditionfor the on-off state transition for 0 1 is sign(P)6 <_ 0 .This inequality holds for all values of p > 0 . If p = 0then F�, = 0 and FR1 = 0 . The condition becomes-F9 < 0 which is never true for g = -9 .81 . The areafor which transition occurs is represented by p > 0which is grayed out in the phase space, shown in Fig . 9 .

Phase spaces are established (Fig . 9) for each of thefour modes of the combined elastic and non-elastic col-lision and labeled 00, 01, 10, and 11, where the firstdigit indicates whether the controlled junction 2 is on(1) or off (0), and the second digit indicates the samefor controlled junction 1 . In the phase spaces the ar-eas that are instantaneously departed are grayed outand the conjunction of the four energy phase spaces isshown in Fig . 10 . This phase space shows that thereis an energy distribution which does not correspond toa real mode of operation . Since the dimensions of theenergy phase space are invariant across switches, this

Figure 10 : Conjunction of the multiple energyphase spaces.

energy distribution cannot reach a real mode of oper-ation during a sequence of switches, thus violating thedivergence of time condition .

In this area, when the ball hits the floor, it has pos-itive momentum. For the bouncing ball, this modeis unreachable, and, therefore, the model is physicallyconsistent : The system always moves towards a nega-tive momentum and it instantaneously reverses (de-picted by double arrows in Fig . 10) when the dis-placement becomes zero . Analytically the displace-ment never becomes negative . However, due to nu-merical disturbances, or initial conditions, the modelmay arrive in the physically inconsistent area of oper-ation, especially, in case the floor is another movingbody . Therefore, in such situations, when simulatingthe system, the CSPEC conditions model the desiredphysical scenario inadequately.

To establish a physically correct system, the CSPECswitching conditions have to be modified . From thephysical system it is clear that additional constraintscan be imposed based on the momentum of the ball .Since the switching conditions of the controlled junc-tion 1 are not mutually exclusive, the conditions pbatt >

0 and pbau < 0 can be added to the off/on and on/offtransitions, respectively . This results in the energyphase spaces shown in Fig . 11 . Now, the conjunctionof the energy phase spaces results in a real mode ofoperation for each energy distribution . Because of thecombinatorial switching logic, this real mode of oper-ation is reachable in one switching step . A simulationof the physically consistent system is shown in Fig . 12 .The air resistance (RI), causes the bounce of the ballto dampen until the momentum of the ball falls belowthe threshold value pth and the ball comes to rest onthe floor .

Buffer-Buffer Dependency When two or morebuffers become dependent, redistribution of the statevariable values according to the buffer ratios is re-quired . For the energy phase space analysis this meansthat a number of dimensions collapse into one . This

Mosterman 171

00 Seg ~Xhau

R "Prnm I Pball

~1 J "b 11"Fball

- 111{ 1xba1151~nPba11Z _Pthv'I4u'$

_

_.;hRttS5(D 2 : Xnan50 nPnau< 'Pm

Ol Se zs

_ R P

Rl 1 Phail

e},u "ball A~l Fba11

1 1:sign(p bau ) S > 0Iti1SI- ~hall

SfO 2:xballson Pbau<-Pm

10 Se Xbang a l

:Pm LI

m `n,` .RR1 Pb 1,11

~Fhau

F 1 : xha1150nPba112-P1hMSf Sf' 2:X ball>O- "ball 1)

11 Se >+ng

R Pll,m RI

,02 "ba11 0l ba11

stgn(

:,

P-n )

. .

1 : S > 0

00 X ball

Pball

1 : Xb.1150 n Pb .u2 - P,tAPbaul 02 : Xba1150APball'-Ptb

10

...,.. . ~Xha11

.y.Pbau

1: Xba1150nPbau2 -PW^ Pba11'4 02: x6.11>0

of

Pbau

1 : sign(pb.:1) S> 0^ Pb.u2 0

2: Xb .1150n Pb.11' -P h

P,b

1 : sign(p bau)S> On Pbau2 02: Xba11>0

+r

Figure 11 : Modified multiple energy phasespaces.

172 QR-96

mo - w~

.m

wo

mo~ ,oo

`mo

Figure 12 : Bouncing ball : Physically consistentsimulation.

is illustrated by the two capacitor system in Fig . 13 .When the relay is open, the capacitors are indepen-dent and charge individually. When the voltage differ-ence between the two crosses a threshold value, say 0,the relay closes and the capacitors become dependent,causing an immediate redistribution in charge (statevariable) among the capacitors so both capacitors havethe same effort value, e =

1+ 2

_ s_ . Substitution ofc,+c2 - C,these values for Vl and V2 in the relay's CSPEC yieldsthe switching condition c= < ~ . This is true in theentire energy phase space (Fig . 14) . Notice that a de-gree of freedom is lost because the buffer dependencycauses the two-dimensional phase space to collapse intoa one-dimensional phase space . When the two energyphase spaces are analyzed, it is apparent that diver-gence of time is not guaranteed . The inconsistency re-sults from the equal sign in the switching off conditionfor the relay . When the relay is on, and both voltages

Figure 13 : Dependent capacitors.

0

#q2R ~ 32.CCC C 12

'C,

1/_

1*1k A__\ I20- 1R7-0

1C C- 1/Vi V2"A Imo\ll0~ 1R__'4 0

R: CSC .5 S

Conclusions and Discussion

Figure 14 : Dependent Capacitors: Energy phasespaces.

become equal it will be switched off instantaneouslyand vice versa . To solve this problem, the conditionfor switching needs to be changed to Vi < V2 . Thenthe relay does not switch out of its on state and diver-gence of time is guaranteed . This example illustratesthat the energy phase space analysis applies even whendependency relations among the buffers cause changesin the system model .

Physical systems are by nature continuous . Discon-tinuities introduced in system models are in realitynonlinear behaviors that are linearized to : (i) preventstiffness when performing numerical simulation, (ii) re-duce computational complexity in system configura-tions and behavior analysis, and (iii) apply qualitativereasoning methods to gain a better understanding ofoverall system behavior . Our hybrid modeling frame-work combines bond graphs, controlled junctions, andfinite state automata to model and analyze disconti-nuities in physical system behavior[9, 10] . In somesituations, the hybrid models seem to violate the ba-sic physical principles of conservation of energy and

conservation of momentum . A primary contributionof this paper is the development of a systematic ap-proach to analyze the correctness of the mode transi-tion algorithm (MMA), and also verify the consistencyof physical system models .

This approach is based on characterizing discontin-uous transitions as those that involve (i) no change inthe independence of buffers in the system, (ii) two ormore buffers within the system become dependent, and(iii) explicitly modeled Dirac source and source-bufferdependencies occur, where energy exchange takes placewith the environment . It is shown that these effects arecorrectly handled by the mythical mode algorithm .Complex hybrid models may contain multiple con-

trolled junctions, and, in general, there is no guaranteethat a switching process, once initiated, will ever ter-minate . We have discussed that these situations vio-late the principle of divergence of time and, therefore,indicate modeling inconsistencies . A multiple energyphase space analysis technique is developed to analyzethe divergence of time in individual model modes, andvalidated against the principle of invariance of state .Therefore, this research extends previous work by Alur,Henzinger, and Nicollin[6] who show divergence of timeonly for models that have a constant rate of change ofvariable values .Iwasaki et al . introduce the concept of hypertime to

represent the instantaneous switching time stamp as aninfinitely short interval of time[7] . Switches are thensaid to occur in hypertime, where there is an infinitelysmall interval of hypertime between each . Effectivelythis introduces small time constants of parasitic effectsin the simulation engine that were abstracted awayfrom the model . This renders it possible to simulatephysically inconsistent models, only valid by merit ofexecution semantics and the legitimacy of the resultsis questionable since energy exchange takes place dur-ing switching . Moreover, this does not eliminate theproblem of numerical stiffness and disregards the alter-natives of tightening switching conditions or modifyinglandmarks to ensure consistency .

In summary, we have investigated the nature, ef-fects, and consistency of discontinuities in physical sys-tem models, and developed algorithms and systematicevaluation methods for validating our algorithm andmodel . Future work will focus on more general analy-sis of hybrid models in terms of reachability as well asthe issue of time complexity by partitioning the modelin instantaneously independent parts .

References[1] G . Biswas and X. Yu . A formal modeling scheme

for continuous systems : Focus on diagnosis . Proc .

IJCAI-93, pp . 1474--1479, Charnbery, France, Au-gust 1993 .

[2] J.F . Broenink and K .C.J . Wijbrans . Describin gdiscontinuities in bond graphs . Proceedings of theInternational Conference on Bond Graph Model-ing, pp . 120-125, San Diego, California, 1993 .

[3] G . Falk and W . Ruppel .

Energie and En-tropie: Eine Einfuhrung in die Thermodynamik .Springer-Verlag, Berlin, Heidelberg, New York,1976 . ISBN 3-540-07814-2 .

[4] B . Falkenhainer and K . Forbus . Compositionalmodeling : Finding the right model for the job .Artificial Intelligence, 51 :95-143, 1991 .

[5] K .D . Forbus . The qualitative process engine .Readings in Qualitative Reasoning about PhysicalSystems, pp . 220-235, 1990 .

[6] T.A . Henzinger, X. Nicollin, J . Sifakis, and S .Yovine . Symbolic model checking for real-timesystems . Information and Computation, 111 :193-244, 1994 .

Y . Iwasaki, A . Farquhar, V . Saraswat, D. Bobrow,and V. Gupta . Modeling time in hybrid systems :How fast is "instantaneous"? 1995 InternationalConference on Qualitative Reasoning, pp . 94-103,Amsterdam, May 1995 . University of Amsterdam .

[8] B . Kuipers . Qualitative simulation . Artificial In-telligence, 29 :289-338, 1986 .

[9 ] P.J . Mosterman and G . Biswas . Modeling discon-tinuous behavior with hybrid bond graphs . 1995International Conference on Qualitative Reason-ing, pp . 139-147, Amsterdam, May 1995 . Univer-sity of Amsterdam .

[10] P.J . Mosterman and G. Biswas . A formal hybridmodeling scheme for handling discontinuities inphysical system models. To appear, Proc . AAAI-96, 1996 .

[11] T . Nishida and S . Doshita . Reasoning about dis-continuous change . Proc . AAAI-87, pp . 643-648,Seattle, Washington, 1987.

[12] R.C . Rosenberg and D . Karnopp . Introduction toPhysical System Dynamics . McGraw-Hill Publish-ing Company, New York, New York, 1983 .

[13] J .J . van Dixhoorn and P.C . Breedveld . Technis-che Systeemleer. University of Twente, Twente,Netherlands, fourth edition, February 1985 . classpack .

Mosterman 173