Design Considerations for Continuous-Time Modeling in Stateflow

www.kxcad.net Home > CAE Software Index > MATLAB Index >


Your Ad Here

Rationale for Design Considerations

To guarantee the integrity — or smoothness — of the results in continuous-time modeling, you must constrain your Stateflow charts to a restricted subset of Stateflow semantics. The restricted semantics ensure that inputs do not depend on unpredictable factors — or side effects — such as:

By minimizing side effects, Stateflow can maintain the state of the chart at minor time steps and, therefore, update state only during major time steps when mode changes occur. Using this heuristic, Stateflow can always compute outputs based on a constant state for continuous time.

Stateflow generates informative errors to help you correct semantic violations.

Summary of Rules for Continuous-Time Modeling

Here are the rules for modeling continuous-time Stateflow charts:

 Update local data only in transition, entry, and exit actions

 Compute derivatives only in during actions

 Do not read outputs and derivatives in states or transitions

 Use discrete variables to govern conditions in during actions

 Do not use input events in continuous-time Stateflow charts

 Do not use inner transitions

 Do not use temporal logic

 The chart must have at least one substate

 Do not use change detection operators in continuous charts

  


© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments

Your Ad Here