Filter löschen
Filter löschen

How to organize Stateflow charts in Simulink model (or vice versa)

3 Ansichten (letzte 30 Tage)
Andrew
Andrew am 26 Aug. 2021
Hi! I'm trying to model the progress of multiple robots who are working together to complete a complex task that often damages one or more robots. The current subtask of each robot is modeled as a state in a Stateflow chart. The remaining capabilities of each robot are assessed via a logic tree in Simulink after every damage incident and at regular intervals. Then all the Stateflow charts update based on each robot's current state, remaining capabilities, and the states and capabilities of the other robots.
My problem is setting up the implementation framework. Does this seem best set up as one or more charts that call Simulink models? Or a Simulink model with state machines running inside it? Or a MATLAB script that calls both? Or something else entirely? Thanks in advance.

Antworten (1)

Abhinaya Kennedy
Abhinaya Kennedy am 4 Jun. 2024
Hi andrew,
The best approach for modeling your scenario depends on the complexity of the interactions and decision logic between robots.
  • For a small number of robots with simple interactions, either Stateflow charts calling Simulink models or a Simulink model with State Machines could work. The choice depends on your preference for model organization.
  • For a larger number of robots with complex interactions and damage assessment logic, consider a combination of Stateflow and Simulink. Use Stateflow for robot behavior and a central Simulink model for communication, data flow, and damage assessment logic.
  • If the robot behavior is very complex and requires advanced state machine features, using Stateflow charts called by a script might be the best option. This approach offers maximum flexibility for modeling complex robot behaviour.

Kategorien

Mehr zu Stateflow finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by