next up previous
Next: 4.1 The Evaporator Up: Model Semantics and Simulation Previous: 3.3 Model Semantics

4 A Simulation Algorithm

We have implemented the sliding mode algorithm as part of a hybrid system simulation engine using a variable step, forward Euler numerical integration scheme. When a mode switch between fields tex2html_wrap_inline1559 and tex2html_wrap_inline1557 is detected (see Fig. 19), a binary search determines the point of switching to within a pre-specified accuracy. After the mode switch is executed and the state vector is transferred between modes to tex2html_wrap_inline1849 , it is checked whether the new mode, tex2html_wrap_inline1557 , persists for at least one maximum time step, tex2html_wrap_inline1853 . If not, sliding mode simulation is activated. The sliding mode simulation algorithm (Algorithm 1) first computes tex2html_wrap_inline1855 based on tex2html_wrap_inline1773 with tex2html_wrap_inline1849 as initial point. Discontinuous changes may take place, and the resulting tex2html_wrap_inline1861 is inferred. Next, tex2html_wrap_inline1863 is computed to infer tex2html_wrap_inline1775 and tex2html_wrap_inline1867 , which may differ from tex2html_wrap_inline1863 when jumps in the state vector occur between tex2html_wrap_inline1773 and tex2html_wrap_inline1775 . Next, tex2html_wrap_inline1875 is computed based on tex2html_wrap_inline1867 and tex2html_wrap_inline1775 , and jumps between tex2html_wrap_inline1775 and tex2html_wrap_inline1773 are taken into account when tex2html_wrap_inline1885 is inferred. Now, tex2html_wrap_inline1861 is taken as the inital point of a vector tex2html_wrap_inline1889 . A binary search is performed along this vector given a pre-specified number of steps to determine tex2html_wrap_inline1891 on the sliding surface. After tex2html_wrap_inline1893 and its corresponding field are determined, it is checked whether chattering persists and the process continues.

  algorithm335

   figure1119
Figure 19: The sliding mode numerical simulation algorithm.





Pieter J. Mosterman
Mon Aug 18 13:23:03 CDT 1997