next up previous
Next: Event Detection and Localization Up: The Simulation Algorithm Previous: Continuous Simulation

Higher Index DAEs

A junction state change may activate algebraic constraints between state variables, leading to higher index DAE problems. An explicit forward Euler integration scheme cannot handle such problems. HYBRSIM solves this by distinguishing between the storage elements in integral and those in derivative causality. Each integration step applies the forward Euler to the independent integral causality state variables without taking the influence of the algebraic loops with the dependent derivative causality variables into account. It then applies conservation of state to find consistent values for both the independent and dependent variables. Presently, the execution of this step is computationally ineffecient. During iteration, a specific fraction of the difference in the stored energy value is added to the dependent state variables and propagated along the bond graph path to be taken out of the independent state variable storage components.

For the nonelastic collision in Fig. 5. If m1 = m2, conservation of momentum and the v1+ = v2+ constraint on the a posteriori velocities determines that the velocity after collision of the combined mass should be half the velocity of m1 before collision. The first steps of the HYBRSIM iteration upon collision for m1 = m2 = 1 and initial velocities v1 = 1 and v2 = 0 is presented in Table 1. For the first iteration step, v1 = 1 and v2 = 0, and, therefore, stored momentum p1 = m1 v1 = 1 and p2 = m2 v2 = 0. If p1 is chosen as the independent state, then its corresponding velocity value is enforced on m2, i.e., p2+ = 1. This means a discontinuous change of momentum from 0 to 1 which is applied by taking a convergence factor $\eta = 0.4$ into account. This factor prevents the iteration from oscillating between two values. The resulting change of momentum, $\Delta p_2 = \eta (p_2^+ - p_2)$ is added to m2, and, therefore, has to be taken out of m1(momentum is conserved).

The new state variables are compared and, because only a fraction was propagated, there is still inconsistency, though less. Again, a fraction of the difference is added to the dependent variable and propagated to be taken out of the independent variable storage components. For the nonelastic collision, at the next iteration p1 = 0.6which results in v1 = 0.6 being enforced on m2. Now, the new momentum would be p2+ = 0.6 but the present value p2 = 0.4, and, again accounting for the convergence factor, 0.4 (0.6 - 0.4) is added to m2 and taken out of m1. This process continues until convergence occurs within a prespecified margin. Note that the total amount of energy is conserved, since whatever is taken out of the independent state variable storage elements is put into the dependent variable storage elements. Also, the discontinuous change in velocity is not explicitly modeled in Fig. 5, but derived from inherent physical principles.

Table 1: Conservation of state iteration, $\eta = 0.4$.
iteration p1 p2+ p2 $\eta (p_2^+ - p_2)$
0 1 1 0 0.4
1 0.6 0.6 0.4 0.08
2 0.52 0.52 0.48 0.016
3 0.504 0.504 0.496 0.0032

If state variables become directly dependent on sources, they may change discontinuously as well with explicit exchange of, e.g., momentum, with the environment (a bouncing ball). In case of combined dependency between storage elements and sources, conservation of state still applies, and HYBRSIM handles this correctly. To illustrate this interaction between storage and source dependency, consider the elastic collision in Fig. 8. Upon collision, the controlled 0-junction becomes active, and there is dependency between m1, m2, and the modulated Sf that models a restitution coefficient, $\epsilon$, of 0.6. In this system, conservation of momentum still applies, but instead of v1+ = v2+ the velocity constraint is $v_2^+ - v_1^+ = -\epsilon (v_2 - v_1)$. Simulation results in Fig. 9 show the HYBRSIM output.

Figure 8: Hybrid bond graph of an elastic collision.
\begin{figure}\center\mbox{\psfig{figure=elas.eps,width=2.85in} }

Figure 9: Elastic collision with m1 = m2 and $\epsilon = 0.6$.
\begin{figure}\center\mbox{\psfig{figure=elas_sim.eps,width=1.9in} }

next up previous
Next: Event Detection and Localization Up: The Simulation Algorithm Previous: Continuous Simulation
Pieter J. Mosterman ER